Many places in the code NULL is used in integer context, where
plain 0 should be used. This happens to work because we #define NULL to 0, but is stylistically wrong and can cause problems for people trying to port bits of code to other environments. PR: 2752 Submitted by: Arne Henrik Juul <arnej@imf.unit.no>
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "$Id$";
|
static char rcsid[] = "$Id: atof-ieee.c,v 1.7 1997/02/22 15:44:21 peter Exp $";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "as.h"
|
#include "as.h"
|
||||||
@@ -174,7 +174,7 @@ LITTLENUM_TYPE *words; /* Build the binary here. */
|
|||||||
generic_floating_point_number.low = bits + MAX_PRECISION;
|
generic_floating_point_number.low = bits + MAX_PRECISION;
|
||||||
generic_floating_point_number.high = NULL;
|
generic_floating_point_number.high = NULL;
|
||||||
generic_floating_point_number.leader = NULL;
|
generic_floating_point_number.leader = NULL;
|
||||||
generic_floating_point_number.exponent = NULL;
|
generic_floating_point_number.exponent = 0;
|
||||||
generic_floating_point_number.sign = '\0';
|
generic_floating_point_number.sign = '\0';
|
||||||
|
|
||||||
/* Use more LittleNums than seems */
|
/* Use more LittleNums than seems */
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: rtld.c,v 1.47 1997/08/02 04:56:44 jdp Exp $
|
* $Id: rtld.c,v 1.48 1997/08/19 23:33:45 nate Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@@ -2117,7 +2117,7 @@ struct env_scan_tab {
|
|||||||
L("LD_BIND_NOW=", 0, &ld_bind_now)
|
L("LD_BIND_NOW=", 0, &ld_bind_now)
|
||||||
L("LD_SUPPRESS_WARNINGS=", 0, &ld_suppress_warnings)
|
L("LD_SUPPRESS_WARNINGS=", 0, &ld_suppress_warnings)
|
||||||
L("LD_WARN_NON_PURE_CODE=", 0, &ld_warn_non_pure_code)
|
L("LD_WARN_NON_PURE_CODE=", 0, &ld_warn_non_pure_code)
|
||||||
{ NULL, 0, NULL }
|
{ NULL, 0, 0, NULL }
|
||||||
};
|
};
|
||||||
#undef L
|
#undef L
|
||||||
|
|
||||||
|
|||||||
@@ -468,7 +468,7 @@ is_section (name)
|
|||||||
register char **vs;
|
register char **vs;
|
||||||
|
|
||||||
for (vs = section_list; *vs != NULL; vs++)
|
for (vs = section_list; *vs != NULL; vs++)
|
||||||
if ((strcmp (*vs, name) == NULL)
|
if ((strcmp (*vs, name) == 0)
|
||||||
|| (isdigit (name[0]) && strlen(name) == 1))
|
|| (isdigit (name[0]) && strlen(name) == 1))
|
||||||
return strdup (name);
|
return strdup (name);
|
||||||
|
|
||||||
@@ -557,7 +557,7 @@ convert_name (name, to_cat)
|
|||||||
t1 = strrchr (to_name, '/');
|
t1 = strrchr (to_name, '/');
|
||||||
if (t1 != NULL)
|
if (t1 != NULL)
|
||||||
{
|
{
|
||||||
*t1 = NULL;
|
*t1 = '\0';
|
||||||
t2 = strrchr (to_name, '/');
|
t2 = strrchr (to_name, '/');
|
||||||
*t1 = '/';
|
*t1 = '/';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ __bt_first(t, key, erval, exactp)
|
|||||||
* page) and return it.
|
* page) and return it.
|
||||||
*/
|
*/
|
||||||
if ((ep = __bt_search(t, key, exactp)) == NULL)
|
if ((ep = __bt_search(t, key, exactp)) == NULL)
|
||||||
return (NULL);
|
return (0);
|
||||||
if (*exactp) {
|
if (*exactp) {
|
||||||
if (F_ISSET(t, B_NODUPS)) {
|
if (F_ISSET(t, B_NODUPS)) {
|
||||||
*erval = *ep;
|
*erval = *ep;
|
||||||
|
|||||||
@@ -735,7 +735,7 @@ cgetnext(bp, db_array)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
rp = buf;
|
rp = buf;
|
||||||
for(cp = nbuf; *cp != NULL; cp++)
|
for(cp = nbuf; *cp != '\0'; cp++)
|
||||||
if (*cp == '|' || *cp == ':')
|
if (*cp == '|' || *cp == ':')
|
||||||
break;
|
break;
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -424,7 +424,7 @@ static inline int unwind(grp)
|
|||||||
latch++;
|
latch++;
|
||||||
}
|
}
|
||||||
again:
|
again:
|
||||||
if (getnetgrent(&host, &user, &domain) == NULL) {
|
if (getnetgrent(&host, &user, &domain) == 0) {
|
||||||
if ((gr = getgrnam(grp+2)) != NULL)
|
if ((gr = getgrnam(grp+2)) != NULL)
|
||||||
goto grpagain;
|
goto grpagain;
|
||||||
latch = 0;
|
latch = 0;
|
||||||
@@ -448,7 +448,7 @@ static inline int unwind(grp)
|
|||||||
if (grp[1] == '@') {
|
if (grp[1] == '@') {
|
||||||
setnetgrent(grp+2);
|
setnetgrent(grp+2);
|
||||||
rv = 0;
|
rv = 0;
|
||||||
while(getnetgrent(&host, &user, &domain) != NULL) {
|
while(getnetgrent(&host, &user, &domain) != 0) {
|
||||||
store(user);
|
store(user);
|
||||||
rv++;
|
rv++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* Turned inside out. Now returns xfers as new file ids, not as a special
|
* Turned inside out. Now returns xfers as new file ids, not as a special
|
||||||
* `state' of FTP_t
|
* `state' of FTP_t
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id: ftpio.c,v 1.25 1997/02/22 15:06:50 peter Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -417,7 +417,7 @@ get_url_info(char *url_in, char *host_ret, int *port_ret, char *name_ret)
|
|||||||
|
|
||||||
name = host = NULL;
|
name = host = NULL;
|
||||||
/* XXX add http:// here or somewhere reasonable at some point XXX */
|
/* XXX add http:// here or somewhere reasonable at some point XXX */
|
||||||
if (strncmp("ftp://", url_in, 6) != NULL)
|
if (strncmp("ftp://", url_in, 6) != 0)
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
/* We like to stomp a lot on the URL string in dissecting it, so copy it first */
|
/* We like to stomp a lot on the URL string in dissecting it, so copy it first */
|
||||||
strncpy(url, url_in, BUFSIZ);
|
strncpy(url, url_in, BUFSIZ);
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* @(#)ftpcmd.y 8.3 (Berkeley) 4/6/94
|
* @(#)ftpcmd.y 8.3 (Berkeley) 4/6/94
|
||||||
* $Id: ftpcmd.y,v 1.10 1997/02/22 14:21:27 peter Exp $
|
* $Id: ftpcmd.y,v 1.11 1997/07/24 09:26:10 davidn Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -957,7 +957,7 @@ yylex()
|
|||||||
}
|
}
|
||||||
(void) alarm(0);
|
(void) alarm(0);
|
||||||
#ifdef SETPROCTITLE
|
#ifdef SETPROCTITLE
|
||||||
if (strncasecmp(cbuf, "PASS", 4) != NULL)
|
if (strncasecmp(cbuf, "PASS", 4) != 0)
|
||||||
setproctitle("%s: %s", proctitle, cbuf);
|
setproctitle("%s: %s", proctitle, cbuf);
|
||||||
#endif /* SETPROCTITLE */
|
#endif /* SETPROCTITLE */
|
||||||
if ((cp = strchr(cbuf, '\r'))) {
|
if ((cp = strchr(cbuf, '\r'))) {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id: library.c,v 1.7 1997/02/22 14:21:45 peter Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
@@ -544,7 +544,7 @@ mmap_segment (fsp, segment, segbuf, use_mmap)
|
|||||||
MAP_SHARED, fid, seg_byte);
|
MAP_SHARED, fid, seg_byte);
|
||||||
if (*segbuf == MAP_FAILED) {
|
if (*segbuf == MAP_FAILED) {
|
||||||
err(0, "mmap_segment: mmap failed");
|
err(0, "mmap_segment: mmap failed");
|
||||||
return (NULL);
|
return (0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
@@ -555,7 +555,7 @@ mmap_segment (fsp, segment, segbuf, use_mmap)
|
|||||||
*segbuf = malloc(ssize);
|
*segbuf = malloc(ssize);
|
||||||
if (!*segbuf) {
|
if (!*segbuf) {
|
||||||
err(0, "mmap_segment: malloc failed");
|
err(0, "mmap_segment: malloc failed");
|
||||||
return(NULL);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read the segment data into the buffer */
|
/* read the segment data into the buffer */
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
* Center for Telecommunications Research
|
* Center for Telecommunications Research
|
||||||
* Columbia University, New York City
|
* Columbia University, New York City
|
||||||
*
|
*
|
||||||
* $Id: revnetgroup.c,v 1.6 1997/02/22 14:22:03 peter Exp $
|
* $Id: revnetgroup.c,v 1.7 1997/03/28 15:48:15 imp Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
#include "hash.h"
|
#include "hash.h"
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static const char rcsid[] = "$Id: revnetgroup.c,v 1.6 1997/02/22 14:22:03 peter Exp $";
|
static const char rcsid[] = "$Id: revnetgroup.c,v 1.7 1997/03/28 15:48:15 imp Exp $";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Default location of netgroup file. */
|
/* Default location of netgroup file. */
|
||||||
@@ -150,7 +150,7 @@ main(argc, argv)
|
|||||||
gcur = gtable[i];
|
gcur = gtable[i];
|
||||||
while(gcur) {
|
while(gcur) {
|
||||||
__setnetgrent(gcur->key);
|
__setnetgrent(gcur->key);
|
||||||
while(__getnetgrent(&host, &user, &domain) != NULL) {
|
while(__getnetgrent(&host, &user, &domain) != 0) {
|
||||||
if (hosts ? host && strcmp(host,"-") : user && strcmp(user, "-"))
|
if (hosts ? host && strcmp(host,"-") : user && strcmp(user, "-"))
|
||||||
mstore(mtable, hosts ? host : user, gcur->key, domain);
|
mstore(mtable, hosts ? host : user, gcur->key, domain);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: rtld.c,v 1.47 1997/08/02 04:56:44 jdp Exp $
|
* $Id: rtld.c,v 1.48 1997/08/19 23:33:45 nate Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@@ -2117,7 +2117,7 @@ struct env_scan_tab {
|
|||||||
L("LD_BIND_NOW=", 0, &ld_bind_now)
|
L("LD_BIND_NOW=", 0, &ld_bind_now)
|
||||||
L("LD_SUPPRESS_WARNINGS=", 0, &ld_suppress_warnings)
|
L("LD_SUPPRESS_WARNINGS=", 0, &ld_suppress_warnings)
|
||||||
L("LD_WARN_NON_PURE_CODE=", 0, &ld_warn_non_pure_code)
|
L("LD_WARN_NON_PURE_CODE=", 0, &ld_warn_non_pure_code)
|
||||||
{ NULL, 0, NULL }
|
{ NULL, 0, 0, NULL }
|
||||||
};
|
};
|
||||||
#undef L
|
#undef L
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -207,7 +207,7 @@ main(ac, av)
|
|||||||
fatal("kvmread", NULL);
|
fatal("kvmread", NULL);
|
||||||
dev_found = 0;
|
dev_found = 0;
|
||||||
|
|
||||||
while(pos_t!=NULL) {
|
while(pos_t!=0) {
|
||||||
if (kvm_read(kd, pos_t, &buf1, sizeof(struct isa_device)) < 0)
|
if (kvm_read(kd, pos_t, &buf1, sizeof(struct isa_device)) < 0)
|
||||||
fatal("kvmread", NULL);
|
fatal("kvmread", NULL);
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -53,7 +53,7 @@ QIC_Geom geo; /* tape geometry */
|
|||||||
int tvno = 1; /* tape volume number */
|
int tvno = 1; /* tape volume number */
|
||||||
int tvlast; /* TRUE if last volume in set */
|
int tvlast; /* TRUE if last volume in set */
|
||||||
long tvsize = 0; /* tape volume size in bytes */
|
long tvsize = 0; /* tape volume size in bytes */
|
||||||
long tvtime = NULL; /* tape change time */
|
long tvtime = 0; /* tape change time */
|
||||||
char *tvnote = ""; /* tape note */
|
char *tvnote = ""; /* tape note */
|
||||||
int doretension = 0; /* TRUE if we should retension tape */
|
int doretension = 0; /* TRUE if we should retension tape */
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -35,7 +35,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id: dirs.c,v 1.9 1997/06/18 06:28:46 charnier Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
@@ -302,7 +302,7 @@ pathsearch(pathname)
|
|||||||
while (*path == '/')
|
while (*path == '/')
|
||||||
path++;
|
path++;
|
||||||
dp = NULL;
|
dp = NULL;
|
||||||
while ((name = strsep(&path, "/")) != NULL && *name != NULL) {
|
while ((name = strsep(&path, "/")) != NULL && *name != '\0') {
|
||||||
if ((dp = searchdir(ino, name)) == NULL)
|
if ((dp = searchdir(ino, name)) == NULL)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
ino = dp->d_ino;
|
ino = dp->d_ino;
|
||||||
|
|||||||
@@ -817,7 +817,7 @@ checkrestore()
|
|||||||
ep->e_flags &= ~KEEP;
|
ep->e_flags &= ~KEEP;
|
||||||
if (ep->e_type == NODE)
|
if (ep->e_type == NODE)
|
||||||
ep->e_flags &= ~(NEW|EXISTED);
|
ep->e_flags &= ~(NEW|EXISTED);
|
||||||
if (ep->e_flags != NULL)
|
if (ep->e_flags != 0)
|
||||||
badentry(ep, "incomplete operations");
|
badentry(ep, "incomplete operations");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id: day.c,v 1.9 1997/06/23 06:52:12 charnier Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -186,12 +186,12 @@ time_t Mktime (dp)
|
|||||||
|
|
||||||
|
|
||||||
/* day */
|
/* day */
|
||||||
*(date+2) = NULL;
|
*(date+2) = '\0';
|
||||||
tm.tm_mday = atoi(date);
|
tm.tm_mday = atoi(date);
|
||||||
|
|
||||||
/* month */
|
/* month */
|
||||||
if (len >= 4) {
|
if (len >= 4) {
|
||||||
*(date+5) = NULL;
|
*(date+5) = '\0';
|
||||||
tm.tm_mon = atoi(date+3) - 1;
|
tm.tm_mon = atoi(date+3) - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -595,7 +595,7 @@ writetouched(overwrite)
|
|||||||
|
|
||||||
botch = 0;
|
botch = 0;
|
||||||
oktorm = 1;
|
oktorm = 1;
|
||||||
while((nread = fread(edbuf, 1, sizeof(edbuf), o_touchedfile)) != NULL){
|
while((nread = fread(edbuf, 1, sizeof(edbuf), o_touchedfile)) != 0) {
|
||||||
if (nread != fwrite(edbuf, 1, nread, n_touchedfile)){
|
if (nread != fwrite(edbuf, 1, nread, n_touchedfile)){
|
||||||
/*
|
/*
|
||||||
* Catastrophe in temporary area: file system full?
|
* Catastrophe in temporary area: file system full?
|
||||||
@@ -655,7 +655,7 @@ int mustoverwrite(preciousfile, tmpfile)
|
|||||||
{
|
{
|
||||||
int nread;
|
int nread;
|
||||||
|
|
||||||
while((nread = fread(edbuf, 1, sizeof(edbuf), tmpfile)) != NULL){
|
while((nread = fread(edbuf, 1, sizeof(edbuf), tmpfile)) != 0) {
|
||||||
if (mustwrite(edbuf, nread, preciousfile) == 0)
|
if (mustwrite(edbuf, nread, preciousfile) == 0)
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -152,7 +152,7 @@ from(msgvec)
|
|||||||
{
|
{
|
||||||
register int *ip;
|
register int *ip;
|
||||||
|
|
||||||
for (ip = msgvec; *ip != NULL; ip++)
|
for (ip = msgvec; *ip != 0; ip++)
|
||||||
printhead(*ip);
|
printhead(*ip);
|
||||||
if (--ip >= msgvec)
|
if (--ip >= msgvec)
|
||||||
dot = &message[*ip - 1];
|
dot = &message[*ip - 1];
|
||||||
|
|||||||
+13
-13
@@ -58,7 +58,7 @@ next(msgvec)
|
|||||||
register int *ip, *ip2;
|
register int *ip, *ip2;
|
||||||
int list[2], mdot;
|
int list[2], mdot;
|
||||||
|
|
||||||
if (*msgvec != NULL) {
|
if (*msgvec != 0) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If some messages were supplied, find the
|
* If some messages were supplied, find the
|
||||||
@@ -73,10 +73,10 @@ next(msgvec)
|
|||||||
* message list which follows dot.
|
* message list which follows dot.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (ip = msgvec; *ip != NULL; ip++)
|
for (ip = msgvec; *ip != 0; ip++)
|
||||||
if (*ip > mdot)
|
if (*ip > mdot)
|
||||||
break;
|
break;
|
||||||
if (*ip == NULL)
|
if (*ip == 0)
|
||||||
ip = msgvec;
|
ip = msgvec;
|
||||||
ip2 = ip;
|
ip2 = ip;
|
||||||
do {
|
do {
|
||||||
@@ -85,9 +85,9 @@ next(msgvec)
|
|||||||
dot = mp;
|
dot = mp;
|
||||||
goto hitit;
|
goto hitit;
|
||||||
}
|
}
|
||||||
if (*ip2 != NULL)
|
if (*ip2 != 0)
|
||||||
ip2++;
|
ip2++;
|
||||||
if (*ip2 == NULL)
|
if (*ip2 == 0)
|
||||||
ip2 = msgvec;
|
ip2 = msgvec;
|
||||||
} while (ip2 != ip);
|
} while (ip2 != ip);
|
||||||
printf("No messages applicable\n");
|
printf("No messages applicable\n");
|
||||||
@@ -121,7 +121,7 @@ next(msgvec)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
list[0] = dot - &message[0] + 1;
|
list[0] = dot - &message[0] + 1;
|
||||||
list[1] = NULL;
|
list[1] = 0;
|
||||||
return(type(list));
|
return(type(list));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,11 +170,11 @@ save1(str, mark, cmd, ignore)
|
|||||||
return(1);
|
return(1);
|
||||||
if (!f) {
|
if (!f) {
|
||||||
*msgvec = first(0, MMNORM);
|
*msgvec = first(0, MMNORM);
|
||||||
if (*msgvec == NULL) {
|
if (*msgvec == 0) {
|
||||||
printf("No messages to %s.\n", cmd);
|
printf("No messages to %s.\n", cmd);
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
msgvec[1] = NULL;
|
msgvec[1] = 0;
|
||||||
}
|
}
|
||||||
if (f && getmsglist(str, msgvec, 0) < 0)
|
if (f && getmsglist(str, msgvec, 0) < 0)
|
||||||
return(1);
|
return(1);
|
||||||
@@ -291,7 +291,7 @@ deltype(msgvec)
|
|||||||
list[0] = dot - &message[0] + 1;
|
list[0] = dot - &message[0] + 1;
|
||||||
if (list[0] > lastdot) {
|
if (list[0] > lastdot) {
|
||||||
touch(dot);
|
touch(dot);
|
||||||
list[1] = NULL;
|
list[1] = 0;
|
||||||
return(type(list));
|
return(type(list));
|
||||||
}
|
}
|
||||||
printf("At EOF\n");
|
printf("At EOF\n");
|
||||||
@@ -313,18 +313,18 @@ delm(msgvec)
|
|||||||
register *ip;
|
register *ip;
|
||||||
int last;
|
int last;
|
||||||
|
|
||||||
last = NULL;
|
last = 0;
|
||||||
for (ip = msgvec; *ip != NULL; ip++) {
|
for (ip = msgvec; *ip != 0; ip++) {
|
||||||
mp = &message[*ip - 1];
|
mp = &message[*ip - 1];
|
||||||
touch(mp);
|
touch(mp);
|
||||||
mp->m_flag |= MDELETED|MTOUCH;
|
mp->m_flag |= MDELETED|MTOUCH;
|
||||||
mp->m_flag &= ~(MPRESERVE|MSAVED|MBOX);
|
mp->m_flag &= ~(MPRESERVE|MSAVED|MBOX);
|
||||||
last = *ip;
|
last = *ip;
|
||||||
}
|
}
|
||||||
if (last != NULL) {
|
if (last != 0) {
|
||||||
dot = &message[last-1];
|
dot = &message[last-1];
|
||||||
last = first(0, MDELETED);
|
last = first(0, MDELETED);
|
||||||
if (last != NULL) {
|
if (last != 0) {
|
||||||
dot = &message[last-1];
|
dot = &message[last-1];
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -293,7 +293,7 @@ preserve(msgvec)
|
|||||||
printf("Cannot \"preserve\" in edit mode\n");
|
printf("Cannot \"preserve\" in edit mode\n");
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
for (ip = msgvec; *ip != NULL; ip++) {
|
for (ip = msgvec; *ip != 0; ip++) {
|
||||||
mesg = *ip;
|
mesg = *ip;
|
||||||
mp = &message[mesg-1];
|
mp = &message[mesg-1];
|
||||||
mp->m_flag |= MPRESERVE;
|
mp->m_flag |= MPRESERVE;
|
||||||
@@ -312,7 +312,7 @@ unread(msgvec)
|
|||||||
{
|
{
|
||||||
register int *ip;
|
register int *ip;
|
||||||
|
|
||||||
for (ip = msgvec; *ip != NULL; ip++) {
|
for (ip = msgvec; *ip != 0; ip++) {
|
||||||
dot = &message[*ip-1];
|
dot = &message[*ip-1];
|
||||||
dot->m_flag &= ~(MREAD|MTOUCH);
|
dot->m_flag &= ~(MREAD|MTOUCH);
|
||||||
dot->m_flag |= MSTATUS;
|
dot->m_flag |= MSTATUS;
|
||||||
@@ -330,7 +330,7 @@ messize(msgvec)
|
|||||||
register struct message *mp;
|
register struct message *mp;
|
||||||
register int *ip, mesg;
|
register int *ip, mesg;
|
||||||
|
|
||||||
for (ip = msgvec; *ip != NULL; ip++) {
|
for (ip = msgvec; *ip != 0; ip++) {
|
||||||
mesg = *ip;
|
mesg = *ip;
|
||||||
mp = &message[mesg-1];
|
mp = &message[mesg-1];
|
||||||
printf("%d: %d/%ld\n", mesg, mp->m_lines, mp->m_size);
|
printf("%d: %d/%ld\n", mesg, mp->m_lines, mp->m_size);
|
||||||
|
|||||||
@@ -523,11 +523,11 @@ forward(ms, fp, f)
|
|||||||
return(0);
|
return(0);
|
||||||
if (*msgvec == 0) {
|
if (*msgvec == 0) {
|
||||||
*msgvec = first(0, MMNORM);
|
*msgvec = first(0, MMNORM);
|
||||||
if (*msgvec == NULL) {
|
if (*msgvec == 0) {
|
||||||
printf("No appropriate messages\n");
|
printf("No appropriate messages\n");
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
msgvec[1] = NULL;
|
msgvec[1] = 0;
|
||||||
}
|
}
|
||||||
if (f == 'f' || f == 'F')
|
if (f == 'f' || f == 'F')
|
||||||
tabst = NOSTR;
|
tabst = NOSTR;
|
||||||
|
|||||||
+2
-2
@@ -342,9 +342,9 @@ execute(linebuf, contxt)
|
|||||||
if (c == 0) {
|
if (c == 0) {
|
||||||
*msgvec = first(com->c_msgflag,
|
*msgvec = first(com->c_msgflag,
|
||||||
com->c_msgmask);
|
com->c_msgmask);
|
||||||
msgvec[1] = NULL;
|
msgvec[1] = 0;
|
||||||
}
|
}
|
||||||
if (*msgvec == NULL) {
|
if (*msgvec == 0) {
|
||||||
printf("No applicable messages\n");
|
printf("No applicable messages\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ int multitech_dialer (register char *num, char *acu)
|
|||||||
if (lock_baud)
|
if (lock_baud)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
if ((i = speed(number(value(BAUDRATE)))) == NULL)
|
if ((i = speed(number(value(BAUDRATE)))) == 0)
|
||||||
return 0;
|
return 0;
|
||||||
ttysetup (i);
|
ttysetup (i);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
static char sccsid[] = "@(#)unidialer.c 8.1 (Berkeley) 6/6/93";
|
static char sccsid[] = "@(#)unidialer.c 8.1 (Berkeley) 6/6/93";
|
||||||
#endif
|
#endif
|
||||||
static const char rcsid[] =
|
static const char rcsid[] =
|
||||||
"$Id$";
|
"$Id: unidialer.c,v 1.5 1997/08/18 07:15:41 charnier Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -421,7 +421,7 @@ static int unidialer_dialer (register char *num, char *acu)
|
|||||||
|
|
||||||
if (lock_baud) {
|
if (lock_baud) {
|
||||||
int i;
|
int i;
|
||||||
if ((i = speed(number(value(BAUDRATE)))) == NULL)
|
if ((i = speed(number(value(BAUDRATE)))) == 0)
|
||||||
return 0;
|
return 0;
|
||||||
ttysetup (i);
|
ttysetup (i);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ static const char copyright[] =
|
|||||||
static char sccsid[] = "@(#)tip.c 8.1 (Berkeley) 6/6/93";
|
static char sccsid[] = "@(#)tip.c 8.1 (Berkeley) 6/6/93";
|
||||||
#endif
|
#endif
|
||||||
static const char rcsid[] =
|
static const char rcsid[] =
|
||||||
"$Id: tip.c,v 1.5 1997/08/25 05:02:10 imp Exp $";
|
"$Id: tip.c,v 1.6 1997/08/26 10:25:19 eivind Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -189,7 +189,7 @@ main(argc, argv)
|
|||||||
PH = _PATH_PHONES;
|
PH = _PATH_PHONES;
|
||||||
vinit(); /* init variables */
|
vinit(); /* init variables */
|
||||||
setparity("even"); /* set the parity table */
|
setparity("even"); /* set the parity table */
|
||||||
if ((i = speed(number(value(BAUDRATE)))) == NULL) {
|
if ((i = speed(number(value(BAUDRATE)))) == 0) {
|
||||||
printf("tip: bad baud rate %d\n", number(value(BAUDRATE)));
|
printf("tip: bad baud rate %d\n", number(value(BAUDRATE)));
|
||||||
(void)uu_unlock(uucplock);
|
(void)uu_unlock(uucplock);
|
||||||
exit(3);
|
exit(3);
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
static char sccsid[] = "@(#)vars.c 8.1 (Berkeley) 6/6/93";
|
static char sccsid[] = "@(#)vars.c 8.1 (Berkeley) 6/6/93";
|
||||||
#endif
|
#endif
|
||||||
static const char rcsid[] =
|
static const char rcsid[] =
|
||||||
"$Id$";
|
"$Id: vars.c,v 1.2 1997/08/18 07:16:12 charnier Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "tipconf.h"
|
#include "tipconf.h"
|
||||||
@@ -117,5 +117,5 @@ value_t vtable[] = {
|
|||||||
"le", (char *)FALSE },
|
"le", (char *)FALSE },
|
||||||
{ "parity", STRING|INIT|IREMOTE, (READ|WRITE)<<PUBLIC,
|
{ "parity", STRING|INIT|IREMOTE, (READ|WRITE)<<PUBLIC,
|
||||||
"par", (char *)&PA },
|
"par", (char *)&PA },
|
||||||
{ NOSTR, NULL, NULL, NOSTR, NOSTR }
|
{ NOSTR, 0, 0, NOSTR, NOSTR }
|
||||||
};
|
};
|
||||||
|
|||||||
+2
-2
@@ -36,7 +36,7 @@
|
|||||||
static char sccsid[] = "@(#)map.c 8.1 (Berkeley) 6/9/93";
|
static char sccsid[] = "@(#)map.c 8.1 (Berkeley) 6/9/93";
|
||||||
#endif
|
#endif
|
||||||
static const char rcsid[] =
|
static const char rcsid[] =
|
||||||
"$Id$";
|
"$Id: map.c,v 1.4 1997/08/18 07:27:53 charnier Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@@ -142,7 +142,7 @@ next: if (*arg == ':') {
|
|||||||
mapp->speed = baudrate(p);
|
mapp->speed = baudrate(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*arg == NULL) /* Non-optional type. */
|
if (*arg == '\0') /* Non-optional type. */
|
||||||
goto badmopt;
|
goto badmopt;
|
||||||
|
|
||||||
mapp->type = arg;
|
mapp->type = arg;
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ static const char copyright[] =
|
|||||||
static char sccsid[] = "@(#)uudecode.c 8.2 (Berkeley) 4/2/94";
|
static char sccsid[] = "@(#)uudecode.c 8.2 (Berkeley) 4/2/94";
|
||||||
#endif
|
#endif
|
||||||
static const char rcsid[] =
|
static const char rcsid[] =
|
||||||
"$Id$";
|
"$Id: uudecode.c,v 1.9 1997/08/22 06:51:43 charnier Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -160,7 +160,7 @@ decode2(flag)
|
|||||||
warnx("%s: illegal ~user", filename);
|
warnx("%s: illegal ~user", filename);
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
*p++ = NULL;
|
*p++ = '\0';
|
||||||
if (!(pw = getpwnam(buf + 1))) {
|
if (!(pw = getpwnam(buf + 1))) {
|
||||||
warnx("%s: no user %s", filename, buf);
|
warnx("%s: no user %s", filename, buf);
|
||||||
return(1);
|
return(1);
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ static char copyright[] =
|
|||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char sccsid[] = "From: @(#)vacation.c 8.2 (Berkeley) 1/26/94";
|
static char sccsid[] = "From: @(#)vacation.c 8.2 (Berkeley) 1/26/94";
|
||||||
static char rcsid[] =
|
static char rcsid[] =
|
||||||
"$Id: vacation.c,v 1.9 1997/04/23 22:40:19 ache Exp $";
|
"$Id: vacation.c,v 1.10 1997/08/28 04:40:51 imp Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -297,7 +297,7 @@ junkmail()
|
|||||||
} ignore[] = {
|
} ignore[] = {
|
||||||
{"-request", 8}, {"postmaster", 10}, {"uucp", 4},
|
{"-request", 8}, {"postmaster", 10}, {"uucp", 4},
|
||||||
{"mailer-daemon", 13}, {"mailer", 6}, {"-relay", 6},
|
{"mailer-daemon", 13}, {"mailer", 6}, {"-relay", 6},
|
||||||
{NULL, NULL},
|
{NULL, 0},
|
||||||
};
|
};
|
||||||
register struct ignore *cur;
|
register struct ignore *cur;
|
||||||
register int len;
|
register int len;
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ static const char copyright[] =
|
|||||||
static char sccsid[] = "@(#)vfontedpr.c 8.1 (Berkeley) 6/6/93";
|
static char sccsid[] = "@(#)vfontedpr.c 8.1 (Berkeley) 6/6/93";
|
||||||
#endif
|
#endif
|
||||||
static const char rcsid[] =
|
static const char rcsid[] =
|
||||||
"$Id: vfontedpr.c,v 1.8 1997/08/25 06:36:03 charnier Exp $";
|
"$Id: vfontedpr.c,v 1.9 1997/08/26 11:08:24 charnier Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@@ -248,7 +248,7 @@ main(argc, argv)
|
|||||||
cpp = l_keywds;
|
cpp = l_keywds;
|
||||||
while (*cp) {
|
while (*cp) {
|
||||||
while (*cp == ' ' || *cp =='\t')
|
while (*cp == ' ' || *cp =='\t')
|
||||||
*cp++ = NULL;
|
*cp++ = '\0';
|
||||||
if (*cp)
|
if (*cp)
|
||||||
*cpp++ = cp;
|
*cpp++ = cp;
|
||||||
while (*cp != ' ' && *cp != '\t' && *cp)
|
while (*cp != ' ' && *cp != '\t' && *cp)
|
||||||
@@ -292,7 +292,7 @@ main(argc, argv)
|
|||||||
_escaped = FALSE;
|
_escaped = FALSE;
|
||||||
blklevel = 0;
|
blklevel = 0;
|
||||||
for (psptr=0; psptr<PSMAX; psptr++) {
|
for (psptr=0; psptr<PSMAX; psptr++) {
|
||||||
pstack[psptr][0] = NULL;
|
pstack[psptr][0] = '\0';
|
||||||
plstack[psptr] = 0;
|
plstack[psptr] = 0;
|
||||||
}
|
}
|
||||||
psptr = -1;
|
psptr = -1;
|
||||||
@@ -697,7 +697,7 @@ static boolean
|
|||||||
isproc(s)
|
isproc(s)
|
||||||
char *s;
|
char *s;
|
||||||
{
|
{
|
||||||
pname[0] = NULL;
|
pname[0] = '\0';
|
||||||
if (!l_toplex || blklevel == 0)
|
if (!l_toplex || blklevel == 0)
|
||||||
if (expmatch (s, l_prcbeg, pname) != NIL) {
|
if (expmatch (s, l_prcbeg, pname) != NIL) {
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char *rcsid = "$Id: main.c,v 1.13 1997/02/22 16:09:18 peter Exp $";
|
static char *rcsid = "$Id: main.c,v 1.14 1997/03/31 05:10:45 imp Exp $";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -133,7 +133,7 @@ main(int argc, char **argv)
|
|||||||
usage(prog_name, "Missing package name(s)");
|
usage(prog_name, "Missing package name(s)");
|
||||||
else if (ch > 1 && AddMode == MASTER)
|
else if (ch > 1 && AddMode == MASTER)
|
||||||
usage(prog_name, "Only one package name may be specified with master mode");
|
usage(prog_name, "Only one package name may be specified with master mode");
|
||||||
if ((err = pkg_perform(pkgs)) != NULL) {
|
if ((err = pkg_perform(pkgs)) != 0) {
|
||||||
if (Verbose)
|
if (Verbose)
|
||||||
fprintf(stderr, "%d package addition(s) failed.\n", err);
|
fprintf(stderr, "%d package addition(s) failed.\n", err);
|
||||||
return err;
|
return err;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char *rcsid = "$Id: main.c,v 1.8 1997/02/22 16:09:36 peter Exp $";
|
static char *rcsid = "$Id: main.c,v 1.9 1997/03/31 05:10:48 imp Exp $";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -89,7 +89,7 @@ main(int argc, char **argv)
|
|||||||
*pkgs = NULL;
|
*pkgs = NULL;
|
||||||
if (!Fake && getuid() != 0)
|
if (!Fake && getuid() != 0)
|
||||||
errx(1, "You must be root to delete packages.");
|
errx(1, "You must be root to delete packages.");
|
||||||
if ((error = pkg_perform(start)) != NULL) {
|
if ((error = pkg_perform(start)) != 0) {
|
||||||
if (Verbose)
|
if (Verbose)
|
||||||
fprintf(stderr, "%d package deletion(s) failed.\n", error);
|
fprintf(stderr, "%d package deletion(s) failed.\n", error);
|
||||||
return error;
|
return error;
|
||||||
|
|||||||
Reference in New Issue
Block a user