Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Mar 1995 08:48:19 +0100
From:      "Philippe Charnier" <charnier@lirmm.fr>
To:        bugs@FreeBSD.org
Subject:   gcc -Wall in bin (patches)
Message-ID:  <199503190748.IAA02310@lirmm.lirmm.fr>

next in thread | raw e-mail | index | archive | help

Hello,

You will find enclosed some changes to make gcc -Wall more happy in
/usr/src/bin. Note that some patches are still needed in that directory.

Index: bin/chmod/chmod.c
===================================================================
RCS file: /home5/FreeBSD.cvsroot/src/bin/chmod/chmod.c,v
retrieving revision 1.3
diff -c -r1.3 chmod.c
*** 1.3	1995/02/03 22:21:09
--- chmod.c	1995/03/18 19:37:00
***************
*** 70,75 ****
--- 70,77 ----
  	int Hflag, Lflag, Pflag, Rflag, ch, fflag, fts_options, hflag, rval;
  	char *ep, *mode;
  
+ 	set = NULL;
+ 	omode = 0;
  	Hflag = Lflag = Pflag = Rflag = fflag = hflag = 0;
  	while ((ch = getopt(argc, argv, "HLPRXfgorstuwx")) != EOF)
  		switch (ch) {
Index: bin/csh/alloc.c
===================================================================
RCS file: /home5/FreeBSD.cvsroot/src/bin/csh/alloc.c,v
retrieving revision 1.2
diff -c -r1.2 alloc.c
*** 1.2	1994/09/24 02:53:45
--- alloc.c	1995/03/18 14:43:43
***************
*** 122,126 ****
  {
      memtop = (char *) sbrk(0);
      (void) fprintf(cshout, "Allocated memory from 0x%lx to 0x%lx (%ld).\n",
! 	    (unsigned long) membot, (unsigned long) memtop, memtop - membot);
  }
--- 122,127 ----
  {
      memtop = (char *) sbrk(0);
      (void) fprintf(cshout, "Allocated memory from 0x%lx to 0x%lx (%ld).\n",
! 	    (unsigned long) membot, (unsigned long) memtop, 
!                 (unsigned long) (memtop - membot));
  }
Index: bin/csh/time.c
===================================================================
RCS file: /home5/FreeBSD.cvsroot/src/bin/csh/time.c,v
retrieving revision 1.3
diff -c -r1.3 time.c
*** 1.3	1995/02/16 09:17:27
--- time.c	1995/03/18 14:50:07
***************
*** 246,252 ****
      struct timeval td;
  
      tvsub(&td, t1, t0);
!     (void) fprintf(cshout, "%d.%01d", td.tv_sec, td.tv_usec / 100000);
  }
  
  void
--- 246,252 ----
      struct timeval td;
  
      tvsub(&td, t1, t0);
!     (void) fprintf(cshout, "%ld.%01ld", td.tv_sec, td.tv_usec / 100000L);
  }
  
  void
Index: bin/df/df.c
===================================================================
RCS file: /home5/FreeBSD.cvsroot/src/bin/df/df.c,v
retrieving revision 1.5
diff -c -r1.5 df.c
*** 1.5	1994/09/24 02:55:11
--- df.c	1995/03/18 19:41:26
***************
*** 76,104 ****
  	char *str;
  	long types;
  } typetab[] = {
! 	"ufs",		MT(MOUNT_UFS),
! 	"local",	MT_LOCAL,
! 	"all",		MT_ALL,
! 	"nfs",		MT(MOUNT_NFS),
! 	"mfs",		MT(MOUNT_MFS),
! 	"lfs",		MT(MOUNT_LFS),
! 	"msdos",	MT(MOUNT_MSDOS),
! 	"fdesc",	MT(MOUNT_FDESC),
! 	"portal",	MT(MOUNT_PORTAL),
  #if 0
  	/* return fsid of underlying FS */
! 	"lofs",		MT(MOUNT_LOFS),
! 	"null",		MT(MOUNT_NULL),
! 	"umap",		MT(MOUNT_UMAP),
  #endif
! 	"kernfs",	MT(MOUNT_KERNFS),
! 	"procfs",	MT(MOUNT_PROCFS),
! 	"afs",		MT(MOUNT_AFS),
! 	"iso9660fs",	MT(MOUNT_CD9660),
! 	"cdfs",		MT(MOUNT_CD9660),
! 	"misc",		MT(MOUNT_LOFS)|MT(MOUNT_FDESC)|MT(MOUNT_PORTAL)|
! 			MT(MOUNT_KERNFS)|MT(MOUNT_PROCFS),
! 	NULL,		0
  };
  
  long	addtype __P((long, char *));
--- 76,105 ----
  	char *str;
  	long types;
  } typetab[] = {
! 	{"ufs",		MT(MOUNT_UFS)},
! 	{"local",	MT_LOCAL},
! 	{"all",		MT_ALL},
! 	{"nfs",		MT(MOUNT_NFS)},
! 	{"mfs",		MT(MOUNT_MFS)},
! 	{"lfs",		MT(MOUNT_LFS)},
! 	{"msdos",	MT(MOUNT_MSDOS)},
! 	{"fdesc",	MT(MOUNT_FDESC)},
! 	{"portal",	MT(MOUNT_PORTAL)},
  #if 0
  	/* return fsid of underlying FS */
! 	{"lofs",	MT(MOUNT_LOFS)},
! 	{"null",	MT(MOUNT_NULL)},
! 	{"umap",	MT(MOUNT_UMAP)},
  #endif
! 	{"kernfs",	MT(MOUNT_KERNFS)},
! 	{"procfs",	MT(MOUNT_PROCFS)},
! 	{"afs",		MT(MOUNT_AFS)},
! 	{"iso9660fs",	MT(MOUNT_CD9660)},
! 	{"cdfs",	MT(MOUNT_CD9660)},
! 	{"misc",	MT(MOUNT_LOFS)|MT(MOUNT_FDESC)|MT(MOUNT_PORTAL)|
! 			MT(MOUNT_KERNFS)|MT(MOUNT_PROCFS)},
! 	{NULL,		0}
! 	
  };
  
  long	addtype __P((long, char *));
***************
*** 124,129 ****
--- 125,131 ----
  	char *mntpt;
  
  	iflag = nflag = tflag = 0;
+ 	fsmask = MT_NONE;
  
  	while ((ch = getopt(argc, argv, "iknt:")) != EOF)
  		switch (ch) {
Index: bin/domainname/domainname.c
===================================================================
RCS file: /home5/FreeBSD.cvsroot/src/bin/domainname/domainname.c,v
retrieving revision 1.4
diff -c -r1.4 domainname.c
*** 1.4	1994/09/26 02:14:27
--- domainname.c	1995/03/18 15:22:56
***************
*** 56,62 ****
  	int argc;
  	char *argv[];
  {
! 	char *p, domainname[MAXHOSTNAMELEN];
  
  	argc--, argv++;
  
--- 56,62 ----
  	int argc;
  	char *argv[];
  {
! 	char domainname[MAXHOSTNAMELEN];
  
  	argc--, argv++;
  
Index: bin/ed/cbc.c
===================================================================
RCS file: /home5/FreeBSD.cvsroot/src/bin/ed/cbc.c,v
retrieving revision 1.4
diff -c -r1.4 cbc.c
*** 1.4	1994/09/24 02:55:24
--- cbc.c	1995/03/18 15:48:20
***************
*** 115,121 ****
  
  	des_ct = des_n = 0;
  
! 	/* initialize the initialization vctor */
  	MEMZERO(ivec, 8);
  
  	/* intialize the padding vector */
--- 115,121 ----
  
  	des_ct = des_n = 0;
  
! 	/* initialize the initialization vector */
  	MEMZERO(ivec, 8);
  
  	/* intialize the padding vector */
***************
*** 137,142 ****
--- 137,144 ----
  		des_ct = cbc_decode(des_buf, fp);
  	}
  	return (des_ct > 0) ? des_buf[des_n++] : EOF;
+ #else
+ 	return (getc(fp));
  #endif
  }
  
***************
*** 153,158 ****
--- 155,162 ----
  		des_n = 0;
  	}
  	return (des_ct >= 0) ? (des_buf[des_n++] = c) : EOF;
+ #else
+ 	return (fputc(c, fp));
  #endif
  }
  
***************
*** 168,173 ****
--- 172,179 ----
  		des_n = 0;
  	}
  	return (des_ct >= 0 && cbc_encode(des_buf, des_n, fp) >= 0) ? 0 : EOF;
+ #else
+ 	return (fflush(fp));
  #endif
  }
  
Index: bin/ed/glbl.c
===================================================================
RCS file: /home5/FreeBSD.cvsroot/src/bin/ed/glbl.c,v
retrieving revision 1.2
diff -c -r1.2 glbl.c
*** 1.2	1994/09/24 02:55:26
--- glbl.c	1995/03/18 15:54:32
***************
*** 132,139 ****
  		for (; *ibufp;)
  			if ((status = extract_addr_range()) < 0 ||
  			    (status = exec_command()) < 0 ||
! 			    status > 0 && (status = display_lines(
! 			    current_addr, current_addr, status)) < 0)
  				return status;
  	}
  	return 0;
--- 132,139 ----
  		for (; *ibufp;)
  			if ((status = extract_addr_range()) < 0 ||
  			    (status = exec_command()) < 0 ||
! 			    (status > 0 && (status = display_lines(
! 			    current_addr, current_addr, status)) < 0))
  				return status;
  	}
  	return 0;
Index: bin/ed/io.c
===================================================================
RCS file: /home5/FreeBSD.cvsroot/src/bin/ed/io.c,v
retrieving revision 1.3
diff -c -r1.3 io.c
*** 1.3	1994/09/24 02:55:27
--- io.c	1995/03/18 16:37:45
***************
*** 106,112 ****
  		return ERR;
  	if (appended && size && o_isbinary && o_newline_added)
  		fputs("newline inserted\n", stderr);
! 	else if (newline_added && (!appended || !isbinary && !o_isbinary))
  		fputs("newline appended\n", stderr);
  	if (isbinary && newline_added && !appended)
  	    	size += 1;
--- 106,112 ----
  		return ERR;
  	if (appended && size && o_isbinary && o_newline_added)
  		fputs("newline inserted\n", stderr);
! 	else if (newline_added && (!appended || (!isbinary && !o_isbinary)))
  		fputs("newline appended\n", stderr);
  	if (isbinary && newline_added && !appended)
  	    	size += 1;
***************
*** 128,135 ****
  	register int c;
  	register int i = 0;
  
! 	while (((c = des ? get_des_char(fp) : getc(fp)) != EOF || !feof(fp) &&
! 	    !ferror(fp)) && c != '\n') {
  		REALLOC(sbuf, sbufsz, i + 1, ERR);
  		if (!(sbuf[i++] = c))
  			isbinary = 1;
--- 128,135 ----
  	register int c;
  	register int i = 0;
  
! 	while (((c = des ? get_des_char(fp) : getc(fp)) != EOF || (!feof(fp) &&
! 	    !ferror(fp))) && c != '\n') {
  		REALLOC(sbuf, sbufsz, i + 1, ERR);
  		if (!(sbuf[i++] = c))
  			isbinary = 1;
Index: bin/ed/main.c
===================================================================
RCS file: /home5/FreeBSD.cvsroot/src/bin/ed/main.c,v
retrieving revision 1.3
diff -c -r1.3 main.c
*** 1.3	1994/09/24 02:55:28
--- main.c	1995/03/18 16:26:46
***************
*** 154,162 ****
  	signal(SIGQUIT, SIG_IGN);
  	signal(SIGINT, signal_int);
  #ifdef _POSIX_SOURCE
! 	if (status = sigsetjmp(env, 1))
  #else
! 	if (status = setjmp(env))
  #endif
  	{
  		fputs("\n?\n", stderr);
--- 154,162 ----
  	signal(SIGQUIT, SIG_IGN);
  	signal(SIGINT, signal_int);
  #ifdef _POSIX_SOURCE
! 	if ((status = sigsetjmp(env, 1)))
  #else
! 	if ((status = setjmp(env)))
  #endif
  	{
  		fputs("\n?\n", stderr);
***************
*** 213,219 ****
  		isglobal = 0;
  		if ((status = extract_addr_range()) >= 0 &&
  		    (status = exec_command()) >= 0)
! 			if (!status || status &&
  			    (status = display_lines(current_addr, current_addr,
  			        status)) >= 0)
  				continue;
--- 213,219 ----
  		isglobal = 0;
  		if ((status = extract_addr_range()) >= 0 &&
  		    (status = exec_command()) >= 0)
! 			if (!status || 
  			    (status = display_lines(current_addr, current_addr,
  			        status)) >= 0)
  				continue;
***************
*** 544,550 ****
  			return ERR;
  		else if (build_active_list(c == 'g' || c == 'G') < 0)
  			return ERR;
! 		else if (n = (c == 'G' || c == 'V'))
  			GET_COMMAND_SUFFIX();
  		isglobal++;
  		if (exec_global(n, gflag) < 0)
--- 544,550 ----
  			return ERR;
  		else if (build_active_list(c == 'g' || c == 'G') < 0)
  			return ERR;
! 		else if ((n = (c == 'G' || c == 'V')))
  			GET_COMMAND_SUFFIX();
  		isglobal++;
  		if (exec_global(n, gflag) < 0)
***************
*** 840,846 ****
  		break;
  	case '=':
  		GET_COMMAND_SUFFIX();
! 		printf("%d\n", addr_cnt ? second_addr : addr_last);
  		break;
  	case '!':
  		if (addr_cnt > 0) {
--- 840,846 ----
  		break;
  	case '=':
  		GET_COMMAND_SUFFIX();
! 		printf("%ld\n", addr_cnt ? second_addr : addr_last);
  		break;
  	case '!':
  		if (addr_cnt > 0) {
***************
*** 902,908 ****
  
  	if (!pat) return ERR;
  	do {
! 		if (n = dir ? INC_MOD(n, addr_last) : DEC_MOD(n, addr_last)) {
  			lp = get_addressed_line_node(n);
  			if ((s = get_sbuf_line(lp)) == NULL)
  				return ERR;
--- 902,908 ----
  
  	if (!pat) return ERR;
  	do {
! 	       if ((n = dir ? INC_MOD(n, addr_last) : DEC_MOD(n, addr_last))) {
  			lp = get_addressed_line_node(n);
  			if ((s = get_sbuf_line(lp)) == NULL)
  				return ERR;
***************
*** 910,916 ****
  				NUL_TO_NEWLINE(s, lp->len);
  			if (!regexec(pat, s, 0, NULL, 0))
  				return n;
! 		}
  	} while (n != current_addr);
  	sprintf(errmsg, "no match");
  	return  ERR;
--- 910,916 ----
  				NUL_TO_NEWLINE(s, lp->len);
  			if (!regexec(pat, s, 0, NULL, 0))
  				return n;
! 	       }
  	} while (n != current_addr);
  	sprintf(errmsg, "no match");
  	return  ERR;
***************
*** 1339,1345 ****
  
  	REALLOC(file, filesz, MAXPATHLEN + 1, NULL);
  	/* assert: no trailing escape */
! 	while (file[i++] = (*s == '\\') ? *++s : *s)
  		s++;
  	return file;
  }
--- 1339,1345 ----
  
  	REALLOC(file, filesz, MAXPATHLEN + 1, NULL);
  	/* assert: no trailing escape */
! 	while ((file[i++] = (*s == '\\') ? *++s : *s))
  		s++;
  	return file;
  }
Index: bin/ed/re.c
===================================================================
RCS file: /home5/FreeBSD.cvsroot/src/bin/ed/re.c,v
retrieving revision 1.8
diff -c -r1.8 re.c
*** 1.8	1994/09/24 02:55:29
--- re.c	1995/03/18 16:27:27
***************
*** 67,73 ****
  		return NULL;
  	}
  	patlock = 0;
! 	if (n = regcomp(exp, exps, 0)) {
  		regerror(n, exp, errmsg, sizeof errmsg);
  		free(exp);
  		return exp = NULL;
--- 67,73 ----
  		return NULL;
  	}
  	patlock = 0;
! 	if ((n = regcomp(exp, exps, 0))) {
  		regerror(n, exp, errmsg, sizeof errmsg);
  		free(exp);
  		return exp = NULL;
Index: bin/ed/sub.c
===================================================================
RCS file: /home5/FreeBSD.cvsroot/src/bin/ed/sub.c,v
retrieving revision 1.4
diff -c -r1.4 sub.c
*** 1.4	1995/01/14 11:47:16
--- sub.c	1995/03/18 16:32:51
***************
*** 97,103 ****
  			;
  		else if (!isglobal) {
  			while ((n = get_tty_line()) == 0 ||
! 			    n > 0 && ibuf[n - 1] != '\n')
  				clearerr(stdin);
  			if (n < 0)
  				return NULL;
--- 97,103 ----
  			;
  		else if (!isglobal) {
  			while ((n = get_tty_line()) == 0 ||
! 			    (n > 0 && ibuf[n - 1] != '\n'))
  				clearerr(stdin);
  			if (n < 0)
  				return NULL;
***************
*** 213,220 ****
  				off += i;
  			}
  			txt += rm[0].rm_eo;
! 		} while (*txt && (!changed || (gflag & GSG) && rm[0].rm_eo) &&
! 		    !regexec(pat, txt, SE_MAX, rm, REG_NOTBOL));
  		i = eot - txt;
  		REALLOC(rbuf, rbufsz, off + i + 2, ERR);
  		if (i > 0 && !rm[0].rm_eo && (gflag & GSG)) {
--- 213,221 ----
  				off += i;
  			}
  			txt += rm[0].rm_eo;
! 		} while (*txt && 
!                         (!changed || ((gflag & GSG) && rm[0].rm_eo)) &&
! 		        !regexec(pat, txt, SE_MAX, rm, REG_NOTBOL));
  		i = eot - txt;
  		REALLOC(rbuf, rbufsz, off + i + 2, ERR);
  		if (i > 0 && !rm[0].rm_eo && (gflag & GSG)) {
Index: bin/expr/expr.y
===================================================================
RCS file: /home5/FreeBSD.cvsroot/src/bin/expr/expr.y,v
retrieving revision 1.8
diff -c -r1.8 expr.y
*** 1.8	1994/09/24 02:55:37
--- expr.y	1995/03/18 16:42:12
***************
*** 193,199 ****
  int
  yylex ()
  {
- 	struct val *vp;
  	char *p;
  
  	if (*av == NULL)
--- 193,198 ----
***************
*** 227,232 ****
--- 226,233 ----
  	}
  	/* NOTREACHED */
  }
+ 
+ int yyparse ();
  
  void
  main (argc, argv)
Index: bin/ls/ls.c
===================================================================
RCS file: /home5/FreeBSD.cvsroot/src/bin/ls/ls.c,v
retrieving revision 1.4
diff -c -r1.4 ls.c
*** 1.4	1994/12/18 19:00:01
--- ls.c	1995/03/18 16:52:05
***************
*** 117,123 ****
  	} else {
  		f_singlecol = 1;
  		/* retrieve environment variable, in case of explicit -C */
! 		if (p = getenv("COLUMNS"))
  			termwidth = atoi(p);
  	}
  
--- 117,123 ----
  	} else {
  		f_singlecol = 1;
  		/* retrieve environment variable, in case of explicit -C */
! 		if ((p = getenv("COLUMNS")))
  			termwidth = atoi(p);
  	}
  
***************
*** 371,376 ****
--- 371,377 ----
  	btotal = maxblock = maxinode = maxlen = maxnlink = 0;
  	bcfile = 0;
  	maxuser = maxgroup = maxflags = 0;
+ 	flags = NULL;
  	maxsize = 0;
  	for (cur = list, entries = 0; cur; cur = cur->fts_link) {
  		if (cur->fts_info == FTS_ERR || cur->fts_info == FTS_NS) {
Index: bin/ls/print.c
===================================================================
RCS file: /home5/FreeBSD.cvsroot/src/bin/ls/print.c,v
retrieving revision 1.2
diff -c -r1.2 print.c
*** 1.2	1994/09/24 02:55:56
--- print.c	1995/03/18 17:28:34
***************
*** 188,194 ****
  			    dp->s_block);
  			if ((base += numrows) >= num)
  				break;
! 			while ((cnt = (chcnt + TAB & ~(TAB - 1))) <= endcol) {
  				(void)putchar('\t');
  				chcnt = cnt;
  			}
--- 188,194 ----
  			    dp->s_block);
  			if ((base += numrows) >= num)
  				break;
! 			while ((cnt = ((chcnt + TAB) & ~(TAB - 1))) <= endcol){
  				(void)putchar('\t');
  				chcnt = cnt;
  			}
Index: bin/pax/gen_subs.c
===================================================================
RCS file: /home5/FreeBSD.cvsroot/src/bin/pax/gen_subs.c,v
retrieving revision 1.2
diff -c -r1.2 gen_subs.c
*** 1.2	1994/09/24 02:56:22
--- gen_subs.c	1995/03/18 17:56:20
***************
*** 135,141 ****
  #		ifdef NET2_STAT
  		(void)printf("%4u,%4u ", MAJOR(sbp->st_rdev),
  #		else
! 		(void)printf("%4lu,%4lu ", MAJOR(sbp->st_rdev),
  #		endif
  		    MINOR(sbp->st_rdev));
  	else {
--- 135,141 ----
  #		ifdef NET2_STAT
  		(void)printf("%4u,%4u ", MAJOR(sbp->st_rdev),
  #		else
! 		(void)printf("%4lu,%4lu ", (unsigned long)MAJOR(sbp->st_rdev),
  #		endif
  		    MINOR(sbp->st_rdev));
  	else {
Index: bin/pax/options.c
===================================================================
RCS file: /home5/FreeBSD.cvsroot/src/bin/pax/options.c,v
retrieving revision 1.2
diff -c -r1.2 options.c
*** 1.2	1994/09/24 02:56:22
--- options.c	1995/03/18 18:02:43
***************
*** 90,123 ****
  
  FSUB fsub[] = {
  /* 0: OLD BINARY CPIO */
! 	"bcpio", 5120, sizeof(HD_BCPIO), 1, 0, 0, 1, bcpio_id, cpio_strd,
  	bcpio_rd, bcpio_endrd, cpio_stwr, bcpio_wr, cpio_endwr, cpio_trail,
! 	rd_wrfile, wr_rdfile, bad_opt,
  
  /* 1: OLD OCTAL CHARACTER CPIO */
! 	"cpio", 5120, sizeof(HD_CPIO), 1, 0, 0, 1, cpio_id, cpio_strd,
  	cpio_rd, cpio_endrd, cpio_stwr, cpio_wr, cpio_endwr, cpio_trail,
! 	rd_wrfile, wr_rdfile, bad_opt,
  
  /* 2: SVR4 HEX CPIO */
! 	"sv4cpio", 5120, sizeof(HD_VCPIO), 1, 0, 0, 1, vcpio_id, cpio_strd,
  	vcpio_rd, vcpio_endrd, cpio_stwr, vcpio_wr, cpio_endwr, cpio_trail,
! 	rd_wrfile, wr_rdfile, bad_opt,
  
  /* 3: SVR4 HEX CPIO WITH CRC */
! 	"sv4crc", 5120, sizeof(HD_VCPIO), 1, 0, 0, 1, crc_id, crc_strd,
  	vcpio_rd, vcpio_endrd, crc_stwr, vcpio_wr, cpio_endwr, cpio_trail,
! 	rd_wrfile, wr_rdfile, bad_opt,
  
  /* 4: OLD TAR */
! 	"tar", 10240, BLKMULT, 0, 1, BLKMULT, 0, tar_id, no_op,
  	tar_rd, tar_endrd, no_op, tar_wr, tar_endwr, tar_trail,
! 	rd_wrfile, wr_rdfile, tar_opt,
  
  /* 5: POSIX USTAR */
! 	"ustar", 10240, BLKMULT, 0, 1, BLKMULT, 0, ustar_id, ustar_strd,
  	ustar_rd, tar_endrd, ustar_stwr, ustar_wr, tar_endwr, tar_trail,
! 	rd_wrfile, wr_rdfile, bad_opt,
  };
  #define F_TAR	4	/* format when called as tar */
  #define DEFLT	5	/* default write format from list above */
--- 90,123 ----
  
  FSUB fsub[] = {
  /* 0: OLD BINARY CPIO */
! 	{"bcpio", 5120, sizeof(HD_BCPIO), 1, 0, 0, 1, bcpio_id, cpio_strd,
  	bcpio_rd, bcpio_endrd, cpio_stwr, bcpio_wr, cpio_endwr, cpio_trail,
! 	rd_wrfile, wr_rdfile, bad_opt},
  
  /* 1: OLD OCTAL CHARACTER CPIO */
! 	{"cpio", 5120, sizeof(HD_CPIO), 1, 0, 0, 1, cpio_id, cpio_strd,
  	cpio_rd, cpio_endrd, cpio_stwr, cpio_wr, cpio_endwr, cpio_trail,
! 	rd_wrfile, wr_rdfile, bad_opt},
  
  /* 2: SVR4 HEX CPIO */
! 	{"sv4cpio", 5120, sizeof(HD_VCPIO), 1, 0, 0, 1, vcpio_id, cpio_strd,
  	vcpio_rd, vcpio_endrd, cpio_stwr, vcpio_wr, cpio_endwr, cpio_trail,
! 	rd_wrfile, wr_rdfile, bad_opt},
  
  /* 3: SVR4 HEX CPIO WITH CRC */
! 	{"sv4crc", 5120, sizeof(HD_VCPIO), 1, 0, 0, 1, crc_id, crc_strd,
  	vcpio_rd, vcpio_endrd, crc_stwr, vcpio_wr, cpio_endwr, cpio_trail,
! 	rd_wrfile, wr_rdfile, bad_opt},
  
  /* 4: OLD TAR */
! 	{"tar", 10240, BLKMULT, 0, 1, BLKMULT, 0, tar_id, no_op,
  	tar_rd, tar_endrd, no_op, tar_wr, tar_endwr, tar_trail,
! 	rd_wrfile, wr_rdfile, tar_opt},
  
  /* 5: POSIX USTAR */
! 	{"ustar", 10240, BLKMULT, 0, 1, BLKMULT, 0, ustar_id, ustar_strd,
  	ustar_rd, tar_endrd, ustar_stwr, ustar_wr, tar_endwr, tar_trail,
! 	rd_wrfile, wr_rdfile, bad_opt},
  };
  #define F_TAR	4	/* format when called as tar */
  #define DEFLT	5	/* default write format from list above */
***************
*** 367,374 ****
  			 * specify an archive format on write
  			 */
  			tmp.name = optarg;
! 			if (frmt = (FSUB *)bsearch((void *)&tmp, (void *)fsub,
! 			    sizeof(fsub)/sizeof(FSUB), sizeof(FSUB), c_frmt)) {
  				flg |= XF;
  				break;
  			}
--- 367,374 ----
  			 * specify an archive format on write
  			 */
  			tmp.name = optarg;
! 			if ((frmt = (FSUB *)bsearch((void *)&tmp, (void *)fsub,
! 			   sizeof(fsub)/sizeof(FSUB), sizeof(FSUB), c_frmt))) {
  				flg |= XF;
  				break;
  			}
***************
*** 823,829 ****
  	int pos = 0;
  
  	(void)fprintf(stderr,"%s: Invalid combination of options:", argv0);
! 	while (nxt = ffs(flg)) {
  		flg = flg >> nxt;
  		pos += nxt;
  		(void)fprintf(stderr, " -%c", flgch[pos-1]);
--- 823,829 ----
  	int pos = 0;
  
  	(void)fprintf(stderr,"%s: Invalid combination of options:", argv0);
! 	while ((nxt = ffs(flg))) {
  		flg = flg >> nxt;
  		pos += nxt;
  		(void)fprintf(stderr, " -%c", flgch[pos-1]);
Index: bin/pax/pat_rep.c
===================================================================
RCS file: /home5/FreeBSD.cvsroot/src/bin/pax/pat_rep.c,v
retrieving revision 1.2
diff -c -r1.2 pat_rep.c
*** 1.2	1994/09/24 02:56:24
--- pat_rep.c	1995/03/18 18:04:09
***************
*** 617,623 ****
  	int negate;
  	int ok = 0;
  
! 	if (negate = (*pattern == '!'))
  		++pattern;
  
  	while ((c = *pattern++) != ']') {
--- 617,623 ----
  	int negate;
  	int ok = 0;
  
! 	if ((negate = (*pattern == '!')))
  		++pattern;
  
  	while ((c = *pattern++) != ']') {
Index: bin/ps/print.c
===================================================================
RCS file: /home5/FreeBSD.cvsroot/src/bin/ps/print.c,v
retrieving revision 1.5
diff -c -r1.5 print.c
*** 1.5	1994/10/02 14:11:32
--- print.c	1995/03/18 18:07:08
***************
*** 664,670 ****
  	if (v->flag & LJUST)
  		*cp++ = '-';
  	*cp++ = '*';
! 	while (*cp++ = *fcp++);
  
  	switch (v->type) {
  	case CHAR:
--- 664,670 ----
  	if (v->flag & LJUST)
  		*cp++ = '-';
  	*cp++ = '*';
! 	while ((*cp++ = *fcp++));
  
  	switch (v->type) {
  	case CHAR:
Index: bin/ps/ps.c
===================================================================
RCS file: /home5/FreeBSD.cvsroot/src/bin/ps/ps.c,v
retrieving revision 1.5
diff -c -r1.5 ps.c
*** 1.5	1994/10/18 04:27:46
--- ps.c	1995/03/18 19:49:24
***************
*** 486,493 ****
  	 * if there's a trailing number, and not a preceding 'p' (pid) or
  	 * 't' (tty) flag, then assume it's a pid and insert a 'p' flag.
  	 */
! 	if (isdigit(*cp) && (cp == s || cp[-1] != 't' && cp[-1] != 'p' &&
! 	    (cp - 1 == s || cp[-2] != 't')))
  		*ns++ = 'p';
  	(void)strcpy(ns, cp);		/* and append the number */
  
--- 486,494 ----
  	 * if there's a trailing number, and not a preceding 'p' (pid) or
  	 * 't' (tty) flag, then assume it's a pid and insert a 'p' flag.
  	 */
! 	if (isdigit(*cp) && 
! 	    (cp == s || (cp[-1] != 't' && cp[-1] != 'p')) &&
! 	    (cp - 1 == s || cp[-2] != 't'))
  		*ns++ = 'p';
  	(void)strcpy(ns, cp);		/* and append the number */
  
Index: bin/rmail/rmail.c
===================================================================
RCS file: /home5/FreeBSD.cvsroot/src/bin/rmail/rmail.c,v
retrieving revision 1.3
diff -c -r1.3 rmail.c
*** 1.3	1995/03/05 08:27:14
--- rmail.c	1995/03/18 19:50:37
***************
*** 119,124 ****
--- 119,126 ----
  	if (argc < 1)
  		usage();
  
+ 	fplen = fptlen = 0;
+ 	addrp = "";
  	from_path = from_sys = from_user = NULL;
  	for (offset = 0;;) {
  

--------                                                        --------
Philippe Charnier                                      charnier@lirmm.fr
                               

         LIRMM, 161 rue Ada, 34392 Montpellier cedex 5 -- France
------------------------------------------------------------------------




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503190748.IAA02310>