diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-09-01 18:30:39 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-09-01 18:30:39 +0000 |
commit | a43ab78081569419e6c61ef03c154da56a667dd8 (patch) | |
tree | 9d27b3251a03c6298aa14827691ac2399227b0e5 /bin | |
parent | 380f0870e4aafdd13a6050959648e2e735f2ea56 (diff) |
i am bored enough to fix terminal space/tab uglies
Diffstat (limited to 'bin')
47 files changed, 218 insertions, 218 deletions
diff --git a/bin/chio/chio.c b/bin/chio/chio.c index 8954ba8dda1..f9065044fec 100644 --- a/bin/chio/chio.c +++ b/bin/chio/chio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: chio.c,v 1.5 1996/12/14 12:17:35 mickey Exp $ */ +/* $OpenBSD: chio.c,v 1.6 1997/09/01 18:29:12 deraadt Exp $ */ /* $NetBSD: chio.c,v 1.1.1.1 1996/04/03 00:34:38 thorpej Exp $ */ /* @@ -35,7 +35,7 @@ #include <sys/param.h> #include <sys/ioctl.h> -#include <sys/chio.h> +#include <sys/chio.h> #include <err.h> #include <errno.h> #include <fcntl.h> diff --git a/bin/cp/cp.c b/bin/cp/cp.c index 34f0d6edbc8..dfed11e277f 100644 --- a/bin/cp/cp.c +++ b/bin/cp/cp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cp.c,v 1.8 1997/08/23 00:01:38 millert Exp $ */ +/* $OpenBSD: cp.c,v 1.9 1997/09/01 18:29:17 deraadt Exp $ */ /* $NetBSD: cp.c,v 1.14 1995/09/07 06:14:51 jtc Exp $ */ /* @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)cp.c 8.5 (Berkeley) 4/29/95"; #else -static char rcsid[] = "$OpenBSD: cp.c,v 1.8 1997/08/23 00:01:38 millert Exp $"; +static char rcsid[] = "$OpenBSD: cp.c,v 1.9 1997/09/01 18:29:17 deraadt Exp $"; #endif #endif /* not lint */ @@ -110,7 +110,7 @@ main(argc, argv) char *p, **av; Hflag = Lflag = Pflag = Rflag = 0; - while ((ch = getopt(argc, argv, "HLPRfipr")) != -1) + while ((ch = getopt(argc, argv, "HLPRfipr")) != -1) switch (ch) { case 'H': Hflag = 1; @@ -192,7 +192,7 @@ main(argc, argv) to.target_end = to.p_end; /* Set end of argument list for fts(3). */ - argv[argc] = NULL; + argv[argc] = NULL; /* Strip trailing slashes from source files */ for (av = argv; *av != NULL; av++) { @@ -221,7 +221,7 @@ main(argc, argv) if (r == -1 || !S_ISDIR(to_stat.st_mode)) { /* * Case (1). Target is not a directory. - */ + */ if (argc > 1) { usage(); exit(1); @@ -238,7 +238,7 @@ main(argc, argv) stat(*argv, &tmp_stat); else lstat(*argv, &tmp_stat); - + if (S_ISDIR(tmp_stat.st_mode) && (Rflag || rflag)) type = DIR_TO_DNE; else @@ -313,10 +313,10 @@ copy(argv, type, fts_options) if (curr->fts_level == FTS_ROOTLEVEL) if (type != DIR_TO_DNE) { p = strrchr(curr->fts_path, '/'); - base = (p == NULL) ? 0 : + base = (p == NULL) ? 0 : (int)(p - curr->fts_path + 1); - if (!strcmp(&curr->fts_path[base], + if (!strcmp(&curr->fts_path[base], "..")) base += 1; } else @@ -329,7 +329,7 @@ copy(argv, type, fts_options) *target_mid++ = '/'; *target_mid = '\0'; if (target_mid - to.p_path + nlen >= MAXPATHLEN) { - warnx("%s%s: name too long (not copied)", + warnx("%s%s: name too long (not copied)", to.p_path, p); rval = 1; continue; @@ -385,7 +385,7 @@ copy(argv, type, fts_options) * umask blocks owner writes, we fail.. */ if (dne) { - if (mkdir(to.p_path, + if (mkdir(to.p_path, curr->fts_statp->st_mode | S_IRWXU) < 0) err(1, "%s", to.p_path); } else if (!S_ISDIR(to_stat.st_mode)) { @@ -401,7 +401,7 @@ copy(argv, type, fts_options) if (pflag && setfile(curr->fts_statp, 0)) rval = 1; else if (dne) - (void)chmod(to.p_path, + (void)chmod(to.p_path, curr->fts_statp->st_mode); break; case S_IFBLK: @@ -417,7 +417,7 @@ copy(argv, type, fts_options) if (Rflag) { if (copy_fifo(curr->fts_statp, !dne)) rval = 1; - } else + } else if (copy_file(curr, dne)) rval = 1; break; diff --git a/bin/cp/utils.c b/bin/cp/utils.c index 33b31ed8d30..7c1c8e84ffd 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -1,4 +1,4 @@ -/* $OpenBSD: utils.c,v 1.8 1997/07/31 17:00:58 kstailey Exp $ */ +/* $OpenBSD: utils.c,v 1.9 1997/09/01 18:29:19 deraadt Exp $ */ /* $NetBSD: utils.c,v 1.6 1997/02/26 14:40:51 cgd Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)utils.c 8.3 (Berkeley) 4/1/94"; #else -static char rcsid[] = "$OpenBSD: utils.c,v 1.8 1997/07/31 17:00:58 kstailey Exp $"; +static char rcsid[] = "$OpenBSD: utils.c,v 1.9 1997/09/01 18:29:19 deraadt Exp $"; #endif #endif /* not lint */ @@ -69,7 +69,7 @@ copy_file(entp, dne) #ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED char *p; #endif - + if ((from_fd = open(entp->fts_path, O_RDONLY, 0)) == -1) { warn("%s", entp->fts_path); return (1); diff --git a/bin/date/netdate.c b/bin/date/netdate.c index 6f6688ccbf2..d240ef25daf 100644 --- a/bin/date/netdate.c +++ b/bin/date/netdate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netdate.c,v 1.9 1997/06/30 07:08:44 deraadt Exp $ */ +/* $OpenBSD: netdate.c,v 1.10 1997/09/01 18:29:22 deraadt Exp $ */ /* $NetBSD: netdate.c,v 1.10 1995/09/07 06:21:06 jtc Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)netdate.c 8.2 (Berkeley) 4/28/95"; #else -static char rcsid[] = "$OpenBSD: netdate.c,v 1.9 1997/06/30 07:08:44 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: netdate.c,v 1.10 1997/09/01 18:29:22 deraadt Exp $"; #endif #endif /* not lint */ @@ -176,7 +176,7 @@ loop: free(fdsp); return (0); default: - warnx("wrong ack received from timed: %s", + warnx("wrong ack received from timed: %s", tsptype[msg.tsp_type]); timed_ack = -1; break; diff --git a/bin/df/df.c b/bin/df/df.c index c77f89763bd..76f3748d547 100644 --- a/bin/df/df.c +++ b/bin/df/df.c @@ -1,4 +1,4 @@ -/* $OpenBSD: df.c,v 1.18 1997/08/19 06:44:54 denny Exp $ */ +/* $OpenBSD: df.c,v 1.19 1997/09/01 18:29:24 deraadt Exp $ */ /* $NetBSD: df.c,v 1.21.2.1 1995/11/01 00:06:11 jtc Exp $ */ /* @@ -49,7 +49,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)df.c 8.7 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: df.c,v 1.18 1997/08/19 06:44:54 denny Exp $"; +static char rcsid[] = "$OpenBSD: df.c,v 1.19 1997/09/01 18:29:24 deraadt Exp $"; #endif #endif /* not lint */ @@ -386,7 +386,7 @@ prtstat(sfsp, maxwidth, headerlen, blocksize) used = inodes - sfsp->f_ffree; (void)printf(" %7ld %7ld %5.0f%% ", used, sfsp->f_ffree, inodes == 0 ? 100.0 : (double)used / (double)inodes * 100.0); - } else + } else (void)printf(" "); (void)printf(" %s\n", sfsp->f_mntonname); } diff --git a/bin/echo/echo.c b/bin/echo/echo.c index 01a78daedae..f13316ff55f 100644 --- a/bin/echo/echo.c +++ b/bin/echo/echo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: echo.c,v 1.3 1996/09/24 16:52:02 michaels Exp $ */ +/* $OpenBSD: echo.c,v 1.4 1997/09/01 18:29:26 deraadt Exp $ */ /* $NetBSD: echo.c,v 1.6 1995/03/21 09:04:27 cgd Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)echo.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: echo.c,v 1.3 1996/09/24 16:52:02 michaels Exp $"; +static char rcsid[] = "$OpenBSD: echo.c,v 1.4 1997/09/01 18:29:26 deraadt Exp $"; #endif #endif /* not lint */ @@ -69,7 +69,7 @@ main(argc, argv) nflag = 0; while (*argv) { - (void)fputs(*argv, stdout); + (void)fputs(*argv, stdout); if (*++argv) putchar(' '); } diff --git a/bin/ed/glbl.c b/bin/ed/glbl.c index 83c092c0435..a0a4d148a7f 100644 --- a/bin/ed/glbl.c +++ b/bin/ed/glbl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: glbl.c,v 1.5 1996/12/14 12:17:53 mickey Exp $ */ +/* $OpenBSD: glbl.c,v 1.6 1997/09/01 18:29:28 deraadt Exp $ */ /* $NetBSD: glbl.c,v 1.2 1995/03/21 09:04:41 cgd Exp $ */ /* glob.c: This file contains the global command routines for the ed line @@ -33,7 +33,7 @@ #if 0 static char *rcsid = "@(#)glob.c,v 1.1 1994/02/01 00:34:40 alm Exp"; #else -static char rcsid[] = "$OpenBSD: glbl.c,v 1.5 1996/12/14 12:17:53 mickey Exp $"; +static char rcsid[] = "$OpenBSD: glbl.c,v 1.6 1997/09/01 18:29:28 deraadt Exp $"; #endif #endif /* not lint */ @@ -163,7 +163,7 @@ set_active_node(lp) #if defined(sun) || defined(NO_REALLOC_NULL) if (active_list != NULL) { #endif - if ((ts = (line_t **) realloc(active_list, + if ((ts = (line_t **) realloc(active_list, (ti += MINBUFSZ) * sizeof(line_t **))) == NULL) { perror(NULL); strcpy(errmsg, "out of memory"); @@ -172,7 +172,7 @@ set_active_node(lp) } #if defined(sun) || defined(NO_REALLOC_NULL) } else { - if ((ts = (line_t **) malloc((ti += MINBUFSZ) * + if ((ts = (line_t **) malloc((ti += MINBUFSZ) * sizeof(line_t **))) == NULL) { perror(NULL); strcpy(errmsg, "out of memory"); diff --git a/bin/ed/main.c b/bin/ed/main.c index 9f665385ea8..e034b58b7a6 100644 --- a/bin/ed/main.c +++ b/bin/ed/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.11 1997/08/05 22:22:55 deraadt Exp $ */ +/* $OpenBSD: main.c,v 1.12 1997/09/01 18:29:30 deraadt Exp $ */ /* $NetBSD: main.c,v 1.3 1995/03/21 09:04:44 cgd Exp $ */ /* main.c: This file contains the main control and user-interface routines @@ -39,7 +39,7 @@ char *copyright = #if 0 static char *rcsid = "@(#)main.c,v 1.1 1994/02/01 00:34:42 alm Exp"; #else -static char rcsid[] = "$OpenBSD: main.c,v 1.11 1997/08/05 22:22:55 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.12 1997/09/01 18:29:30 deraadt Exp $"; #endif #endif /* not lint */ @@ -212,7 +212,7 @@ top: fputs("?\n", stderr); strcpy(errmsg, "warning: file modified"); if (!interactive) { - fprintf(stderr, garrulous ? + fprintf(stderr, garrulous ? "script, line %d: %s\n" : "", lineno, errmsg); quit(2); @@ -245,16 +245,16 @@ top: fputs("?\n", stderr); /* give warning */ strcpy(errmsg, "warning: file modified"); if (!interactive) { - fprintf(stderr, garrulous ? - "script, line %d: %s\n" : + fprintf(stderr, garrulous ? + "script, line %d: %s\n" : "", lineno, errmsg); quit(2); } break; case FATAL: if (!interactive) - fprintf(stderr, garrulous ? - "script, line %d: %s\n" : "", + fprintf(stderr, garrulous ? + "script, line %d: %s\n" : "", lineno, errmsg); else fprintf(stderr, garrulous ? "%s\n" : "", @@ -263,7 +263,7 @@ top: default: fputs("?\n", stderr); if (!interactive) { - fprintf(stderr, garrulous ? + fprintf(stderr, garrulous ? "script, line %d: %s\n" : "", lineno, errmsg); quit(2); @@ -568,7 +568,7 @@ exec_command() GET_COMMAND_SUFFIX(); isglobal++; if (exec_global(n, gflag) < 0) - return ERR; + return ERR; break; case 'h': if (addr_cnt > 0) { @@ -711,7 +711,7 @@ exec_command() sflags |= SGR; ibufp++; break; - case '0': case '1': case '2': case '3': case '4': + case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': STRTOL(sgnum, ibufp); sflags |= SGF; @@ -822,7 +822,7 @@ exec_command() return ERR; } #endif - if ((addr = write_file(*fnp ? fnp : old_filename, + if ((addr = write_file(*fnp ? fnp : old_filename, (c == 'W') ? "a" : "w", first_addr, second_addr)) < 0) return ERR; else if (addr == addr_last) @@ -1168,7 +1168,7 @@ move_lines(addr) REQUE(b2, b1->q_forw); REQUE(a1->q_back, a2); REQUE(b1, a1); - current_addr = addr + ((addr < first_addr) ? + current_addr = addr + ((addr < first_addr) ? second_addr - first_addr + 1 : 0); } if (isglobal) diff --git a/bin/ed/sub.c b/bin/ed/sub.c index c66c2258135..5301ed2e664 100644 --- a/bin/ed/sub.c +++ b/bin/ed/sub.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sub.c,v 1.5 1996/12/14 12:17:58 mickey Exp $ */ +/* $OpenBSD: sub.c,v 1.6 1997/09/01 18:29:31 deraadt Exp $ */ /* $NetBSD: sub.c,v 1.4 1995/03/21 09:04:50 cgd Exp $ */ /* sub.c: This file contains the substitution routines for the ed @@ -33,7 +33,7 @@ #if 0 static char *rcsid = "@(#)sub.c,v 1.1 1994/02/01 00:34:44 alm Exp"; #else -static char rcsid[] = "$OpenBSD: sub.c,v 1.5 1996/12/14 12:17:58 mickey Exp $"; +static char rcsid[] = "$OpenBSD: sub.c,v 1.6 1997/09/01 18:29:31 deraadt Exp $"; #endif #endif /* not lint */ @@ -194,7 +194,7 @@ substitute_matching_text(pat, lp, gflag, kth) if ((txt = get_sbuf_line(lp)) == NULL) return ERR; - if (isbinary) + if (isbinary) NUL_TO_NEWLINE(txt, lp->len); eot = txt + lp->len; if (!regexec(pat, txt, SE_MAX, rm, 0)) { diff --git a/bin/expr/expr.c b/bin/expr/expr.c index 2d6581c16be..60ac198c4ca 100644 --- a/bin/expr/expr.c +++ b/bin/expr/expr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: expr.c,v 1.7 1997/08/19 06:35:13 denny Exp $ */ +/* $OpenBSD: expr.c,v 1.8 1997/09/01 18:29:33 deraadt Exp $ */ /* $NetBSD: expr.c,v 1.3.6.1 1996/06/04 20:41:47 cgd Exp $ */ /* @@ -426,7 +426,7 @@ eval2() default: break; } - } + } free_value(l); free_value(r); diff --git a/bin/ksh/lex.c b/bin/ksh/lex.c index 40469fdd3e3..4be7b5e5e53 100644 --- a/bin/ksh/lex.c +++ b/bin/ksh/lex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lex.c,v 1.8 1997/08/05 21:49:55 grr Exp $ */ +/* $OpenBSD: lex.c,v 1.9 1997/09/01 18:30:08 deraadt Exp $ */ /* * lexical analysis and source input @@ -62,7 +62,7 @@ yylex(cf) #ifdef KSH else if (cf&LETEXPR) { *wp++ = OQUOTE; /* enclose arguments in (double) quotes */ - istate = SDPAREN; + istate = SDPAREN; ndparen = 0; } #endif /* KSH */ diff --git a/bin/ksh/main.c b/bin/ksh/main.c index af8056db065..5bbc327a651 100644 --- a/bin/ksh/main.c +++ b/bin/ksh/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.7 1997/06/19 13:58:45 kstailey Exp $ */ +/* $OpenBSD: main.c,v 1.8 1997/09/01 18:30:09 deraadt Exp $ */ /* * startup, main loop, enviroments and error handling @@ -26,7 +26,7 @@ static int is_restricted ARGS((char *name)); static const char initifs [] = "IFS= \t\n"; /* must be R/W */ -static const char initsubs [] = +static const char initsubs [] = "${PS2=> } ${PS3=#? } ${PS4=+ }"; static const char version_param[] = diff --git a/bin/ksh/syn.c b/bin/ksh/syn.c index acfdea7d145..4b37baa819d 100644 --- a/bin/ksh/syn.c +++ b/bin/ksh/syn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syn.c,v 1.7 1997/06/19 13:58:47 kstailey Exp $ */ +/* $OpenBSD: syn.c,v 1.8 1997/09/01 18:30:12 deraadt Exp $ */ /* * shell parser (C version) @@ -803,7 +803,7 @@ compile(s) * a=[ab] * $ x=typeset; $x a=[ab]; echo "$a" * a=a - * $ + * $ */ static int assign_command(s) diff --git a/bin/ksh/trap.c b/bin/ksh/trap.c index 9bb07c57dbd..f1efe6451d9 100644 --- a/bin/ksh/trap.c +++ b/bin/ksh/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.5 1997/08/05 22:22:58 deraadt Exp $ */ +/* $OpenBSD: trap.c,v 1.6 1997/09/01 18:30:13 deraadt Exp $ */ /* * signal handling @@ -251,7 +251,7 @@ runtrap(p) p->flags |= old_changed; } } - + /* clear pending traps and reset user's trap handlers; used after fork(2) */ void cleartraps() diff --git a/bin/ksh/tree.c b/bin/ksh/tree.c index 87977b5bbb1..93e3f9d7de7 100644 --- a/bin/ksh/tree.c +++ b/bin/ksh/tree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tree.c,v 1.4 1997/06/19 13:58:48 kstailey Exp $ */ +/* $OpenBSD: tree.c,v 1.5 1997/09/01 18:30:15 deraadt Exp $ */ /* * command tree climbing @@ -352,7 +352,7 @@ int #ifdef HAVE_PROTOTYPES fptreef(struct shf *shf, int indent, const char *fmt, ...) #else -fptreef(shf, indent, fmt, va_alist) +fptreef(shf, indent, fmt, va_alist) struct shf *shf; int indent; const char *fmt; @@ -362,7 +362,7 @@ fptreef(shf, indent, fmt, va_alist) va_list va; SH_VA_START(va, fmt); - + vfptreef(shf, indent, fmt, va); va_end(va); return 0; diff --git a/bin/ksh/var.c b/bin/ksh/var.c index f02c5b8f06e..8350846a148 100644 --- a/bin/ksh/var.c +++ b/bin/ksh/var.c @@ -1,4 +1,4 @@ -/* $OpenBSD: var.c,v 1.5 1997/06/19 13:58:49 kstailey Exp $ */ +/* $OpenBSD: var.c,v 1.6 1997/09/01 18:30:16 deraadt Exp $ */ #include "sh.h" #include "ksh_time.h" @@ -159,7 +159,7 @@ global(n) register struct block *l = e->loc; register struct tbl *vp; register int c; - unsigned h; + unsigned h; bool_t array; int val; @@ -405,7 +405,7 @@ getint(vp, nump) int base, neg; int have_base = 0; long num; - + if (vp->flag&SPECIAL) getspec(vp); /* XXX is it possible for ISSET to be set and val.s to be 0? */ @@ -460,7 +460,7 @@ setint_v(vq, vp) { int base; long num; - + if ((base = getint(vp, &num)) == -1) return NULL; if (!(vq->flag & INTEGER) && (vq->flag & ALLOC)) { @@ -583,7 +583,7 @@ typeset(var, set, clr, field, base) return NULL; if (*val == '[') { int len; - + len = array_ref_len(val); if (len == 0) return NULL; diff --git a/bin/ls/print.c b/bin/ls/print.c index aacf602beb2..aa8176a752f 100644 --- a/bin/ls/print.c +++ b/bin/ls/print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print.c,v 1.6 1997/01/03 22:36:08 millert Exp $ */ +/* $OpenBSD: print.c,v 1.7 1997/09/01 18:29:36 deraadt Exp $ */ /* $NetBSD: print.c,v 1.15 1996/12/11 03:25:39 thorpej Exp $ */ /* @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)print.c 8.5 (Berkeley) 7/28/94"; #else -static char rcsid[] = "$OpenBSD: print.c,v 1.6 1997/01/03 22:36:08 millert Exp $"; +static char rcsid[] = "$OpenBSD: print.c,v 1.7 1997/09/01 18:29:36 deraadt Exp $"; #endif #endif /* not lint */ @@ -286,7 +286,7 @@ printlink(p) if (p->fts_level == FTS_ROOTLEVEL) (void)snprintf(name, sizeof(name), "%s", p->fts_name); - else + else (void)snprintf(name, sizeof(name), "%s/%s", p->fts_parent->fts_accpath, p->fts_name); if ((lnklen = readlink(name, path, sizeof(path) - 1)) == -1) { diff --git a/bin/ls/util.c b/bin/ls/util.c index 0914d2f8df0..e42c54790dc 100644 --- a/bin/ls/util.c +++ b/bin/ls/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.2 1996/06/23 14:20:22 deraadt Exp $ */ +/* $OpenBSD: util.c,v 1.3 1997/09/01 18:29:37 deraadt Exp $ */ /* $NetBSD: util.c,v 1.12 1995/09/07 06:43:02 jtc Exp $ */ /* @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)util.c 8.5 (Berkeley) 4/28/95"; #else -static char rcsid[] = "$OpenBSD: util.c,v 1.2 1996/06/23 14:20:22 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: util.c,v 1.3 1997/09/01 18:29:37 deraadt Exp $"; #endif #endif /* not lint */ @@ -73,7 +73,7 @@ prcopy(src, dest, len) void usage() { - (void)fprintf(stderr, + (void)fprintf(stderr, "usage: ls [-1ACFLRSTWacdfikloqrstu] [file ...]\n"); exit(1); } diff --git a/bin/mkdir/mkdir.c b/bin/mkdir/mkdir.c index d0452717dd2..a4c7c04ada8 100644 --- a/bin/mkdir/mkdir.c +++ b/bin/mkdir/mkdir.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mkdir.c,v 1.5 1997/07/23 14:45:15 kstailey Exp $ */ +/* $OpenBSD: mkdir.c,v 1.6 1997/09/01 18:29:39 deraadt Exp $ */ /* $NetBSD: mkdir.c,v 1.14 1995/06/25 21:59:21 mycroft Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)mkdir.c 8.2 (Berkeley) 1/25/94"; #else -static char rcsid[] = "$OpenBSD: mkdir.c,v 1.5 1997/07/23 14:45:15 kstailey Exp $"; +static char rcsid[] = "$OpenBSD: mkdir.c,v 1.6 1997/09/01 18:29:39 deraadt Exp $"; #endif #endif /* not lint */ @@ -101,7 +101,7 @@ main(argc, argv) if (*argv == NULL) usage(); - + for (exitval = 0; *argv != NULL; ++argv) { register char *slash; @@ -157,7 +157,7 @@ mkpath(path, mode, dir_mode) warnx("%s: %s", path, strerror(ENOTDIR)); return (-1); } - + *slash = '/'; } diff --git a/bin/pax/ar_io.c b/bin/pax/ar_io.c index 5509d8c6610..ffda2463aab 100644 --- a/bin/pax/ar_io.c +++ b/bin/pax/ar_io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ar_io.c,v 1.16 1997/07/25 18:58:21 mickey Exp $ */ +/* $OpenBSD: ar_io.c,v 1.17 1997/09/01 18:29:42 deraadt Exp $ */ /* $NetBSD: ar_io.c,v 1.5 1996/03/26 23:54:13 mrg Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)ar_io.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: ar_io.c,v 1.16 1997/07/25 18:58:21 mickey Exp $"; +static char rcsid[] = "$OpenBSD: ar_io.c,v 1.17 1997/09/01 18:29:42 deraadt Exp $"; #endif #endif /* not lint */ @@ -478,7 +478,7 @@ ar_set_wr() * will stop us if the archive containing the trailer was not written */ wr_trail = 0; - + /* * Add any device dependent code as required here */ @@ -612,7 +612,7 @@ ar_read(buf, cnt) else paxwarn(0, "End of archive volume %d reached", arvol); return(res); -} +} /* * ar_write() @@ -730,8 +730,8 @@ ar_write(buf, bsz) paxwarn(1,"Unable to append, trailer re-write failed. Quitting."); return(res); } - - if (res == 0) + + if (res == 0) paxwarn(0, "End of archive volume %d reached", arvol); else if (res < 0) syswarn(1, errno, "Failed write to archive volume: %d", arvol); @@ -811,7 +811,7 @@ ar_rdsync() if ((cpos = lseek(arfd, (off_t)0L, SEEK_CUR)) < 0) break; mpos = fsbz - (cpos % (off_t)fsbz); - if (lseek(arfd, mpos, SEEK_CUR) < 0) + if (lseek(arfd, mpos, SEEK_CUR) < 0) break; lstrval = 1; break; @@ -870,7 +870,7 @@ ar_fow(sksz, skipped) * number of physical blocks to skip (we do not know physical block * size at this point), so we must only read foward on tapes! */ - if (artyp != ISREG) + if (artyp != ISREG) return(0); /* @@ -918,7 +918,7 @@ ar_rev(sksz) { off_t cpos; struct mtop mb; - register int phyblk; + register int phyblk; /* * make sure we do not have try to reverse on a flawed archive @@ -928,7 +928,7 @@ ar_rev(sksz) switch(artyp) { case ISPIPE: - if (sksz <= 0) + if (sksz <= 0) break; /* * cannot go backwards on these critters @@ -1238,7 +1238,7 @@ ar_next() /* * we are to continue with the same device */ - if (ar_open(arcname) >= 0) + if (ar_open(arcname) >= 0) return(0); tty_prnt("Cannot re-open %s, try again\n", arcname); diff --git a/bin/pax/ar_subs.c b/bin/pax/ar_subs.c index cb36d93b822..8727fdb751f 100644 --- a/bin/pax/ar_subs.c +++ b/bin/pax/ar_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ar_subs.c,v 1.11 1997/07/25 18:58:24 mickey Exp $ */ +/* $OpenBSD: ar_subs.c,v 1.12 1997/09/01 18:29:44 deraadt Exp $ */ /* $NetBSD: ar_subs.c,v 1.5 1995/03/21 09:07:06 cgd Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)ar_subs.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: ar_subs.c,v 1.11 1997/07/25 18:58:24 mickey Exp $"; +static char rcsid[] = "$OpenBSD: ar_subs.c,v 1.12 1997/09/01 18:29:44 deraadt Exp $"; #endif #endif /* not lint */ @@ -915,7 +915,7 @@ copy() * try to create a hard link to the src file if requested * but make sure we are not trying to overwrite ourselves. */ - if (lflag) + if (lflag) res = cross_lnk(arcn); else res = chk_same(arcn); @@ -1022,7 +1022,7 @@ next_head(arcn) register int hsz; register int in_resync = 0; /* set when we are in resync mode */ int cnt = 0; /* counter for trailer function */ - + /* * set up initial conditions, we want a whole frmt->hsz block as we * have no data yet. @@ -1166,7 +1166,7 @@ get_arc() register int minhd = BLKMULT; char *hdend; int notice = 0; - + /* * find the smallest header size in all archive formats and then set up * to read the archive. diff --git a/bin/pax/buf_subs.c b/bin/pax/buf_subs.c index f256c2d0826..ad5f78eb7b5 100644 --- a/bin/pax/buf_subs.c +++ b/bin/pax/buf_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buf_subs.c,v 1.6 1997/07/25 18:58:25 mickey Exp $ */ +/* $OpenBSD: buf_subs.c,v 1.7 1997/09/01 18:29:46 deraadt Exp $ */ /* $NetBSD: buf_subs.c,v 1.5 1995/03/21 09:07:08 cgd Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)buf_subs.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: buf_subs.c,v 1.6 1997/07/25 18:58:25 mickey Exp $"; +static char rcsid[] = "$OpenBSD: buf_subs.c,v 1.7 1997/09/01 18:29:46 deraadt Exp $"; #endif #endif /* not lint */ @@ -105,7 +105,7 @@ wr_start() * archive that might be hard to read elsewhere. If all ok, we then * open the first archive volume */ - if (!wrblksz) + if (!wrblksz) wrblksz = frmt->bsz; if (wrblksz > MAXBLK) { paxwarn(1, "Write block size of %d too large, maximium is: %d", @@ -819,7 +819,7 @@ rd_wrfile(arcn, ofd, left) /* * if we failed from archive read, we do not want to skip */ - if ((size > 0L) && (*left == 0L)) + if ((size > 0L) && (*left == 0L)) return(-1); /* @@ -1028,7 +1028,7 @@ buf_flush(bufcnt) /* * write a block and check if it all went out ok */ - cnt = ar_write(buf, blksz); + cnt = ar_write(buf, blksz); if (cnt == blksz) { /* * the write went ok diff --git a/bin/pax/file_subs.c b/bin/pax/file_subs.c index ab0b8b85290..2241c3885f1 100644 --- a/bin/pax/file_subs.c +++ b/bin/pax/file_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file_subs.c,v 1.12 1997/07/25 18:58:29 mickey Exp $ */ +/* $OpenBSD: file_subs.c,v 1.13 1997/09/01 18:29:48 deraadt Exp $ */ /* $NetBSD: file_subs.c,v 1.4 1995/03/21 09:07:18 cgd Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)file_subs.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: file_subs.c,v 1.12 1997/07/25 18:58:29 mickey Exp $"; +static char rcsid[] = "$OpenBSD: file_subs.c,v 1.13 1997/09/01 18:29:48 deraadt Exp $"; #endif #endif /* not lint */ @@ -582,7 +582,7 @@ unlnk_exist(name, type) */ if (rmdir(name) < 0) { if (type == PAX_DIR) - return(1); + return(1); syswarn(1,errno,"Unable to remove directory %s", name); return(-1); } @@ -898,7 +898,7 @@ file_write(fd, str, cnt, rem, isempt, sz, name) register char *end; register int wcnt; register char *st = str; - + /* * while we have data to process */ diff --git a/bin/pax/ftree.c b/bin/pax/ftree.c index 1694f6c9893..5dea2090be2 100644 --- a/bin/pax/ftree.c +++ b/bin/pax/ftree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftree.c,v 1.7 1997/07/25 18:58:30 mickey Exp $ */ +/* $OpenBSD: ftree.c,v 1.8 1997/09/01 18:29:49 deraadt Exp $ */ /* $NetBSD: ftree.c,v 1.4 1995/03/21 09:07:21 cgd Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)ftree.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: ftree.c,v 1.7 1997/07/25 18:58:30 mickey Exp $"; +static char rcsid[] = "$OpenBSD: ftree.c,v 1.8 1997/09/01 18:29:49 deraadt Exp $"; #endif #endif /* not lint */ @@ -220,7 +220,7 @@ ftree_sel(arcn) * when file trees are supplied pax as args. The list is not used when * the trees are read from stdin. */ - if (ftcur != NULL) + if (ftcur != NULL) ftcur->refcnt = 1; /* diff --git a/bin/pax/gen_subs.c b/bin/pax/gen_subs.c index 049cba22ff5..6ff16f0a6eb 100644 --- a/bin/pax/gen_subs.c +++ b/bin/pax/gen_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gen_subs.c,v 1.7 1997/07/25 18:58:31 mickey Exp $ */ +/* $OpenBSD: gen_subs.c,v 1.8 1997/09/01 18:29:51 deraadt Exp $ */ /* $NetBSD: gen_subs.c,v 1.5 1995/03/21 09:07:26 cgd Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)gen_subs.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: gen_subs.c,v 1.7 1997/07/25 18:58:31 mickey Exp $"; +static char rcsid[] = "$OpenBSD: gen_subs.c,v 1.8 1997/09/01 18:29:51 deraadt Exp $"; #endif #endif /* not lint */ @@ -313,7 +313,7 @@ ul_asc(val, str, len, base) { register char *pt; u_long digit; - + /* * WARNING str is not '\0' terminated by this routine */ @@ -328,7 +328,7 @@ ul_asc(val, str, len, base) while (pt >= str) { if ((digit = (val & 0xf)) < 10) *pt-- = '0' + (char)digit; - else + else *pt-- = 'a' + (char)(digit - 10); if ((val = (val >> 4)) == (u_long)0) break; @@ -427,7 +427,7 @@ uqd_asc(val, str, len, base) { register char *pt; u_quad_t digit; - + /* * WARNING str is not '\0' terminated by this routine */ @@ -442,7 +442,7 @@ uqd_asc(val, str, len, base) while (pt >= str) { if ((digit = (val & 0xf)) < 10) *pt-- = '0' + (char)digit; - else + else *pt-- = 'a' + (char)(digit - 10); if ((val = (val >> 4)) == (u_quad_t)0) break; diff --git a/bin/pax/getoldopt.c b/bin/pax/getoldopt.c index 3d5af2f00fe..7da7f85e1aa 100644 --- a/bin/pax/getoldopt.c +++ b/bin/pax/getoldopt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getoldopt.c,v 1.2 1996/06/23 14:20:36 deraadt Exp $ */ +/* $OpenBSD: getoldopt.c,v 1.3 1997/09/01 18:29:52 deraadt Exp $ */ /* $NetBSD: getoldopt.c,v 1.3 1995/03/21 09:07:28 cgd Exp $ */ /* @@ -11,7 +11,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: getoldopt.c,v 1.2 1996/06/23 14:20:36 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: getoldopt.c,v 1.3 1997/09/01 18:29:52 deraadt Exp $"; #endif /* not lint */ #include <stdio.h> @@ -32,7 +32,7 @@ getoldopt(argc, argv, optstring) char *place; optarg = NULL; - + if (key == NULL) { /* First time */ if (argc < 2) return EOF; key = argv[1]; diff --git a/bin/pax/options.c b/bin/pax/options.c index 5f43ff5e861..fc378c84c02 100644 --- a/bin/pax/options.c +++ b/bin/pax/options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options.c,v 1.29 1997/07/25 18:58:32 mickey Exp $ */ +/* $OpenBSD: options.c,v 1.30 1997/09/01 18:29:54 deraadt Exp $ */ /* $NetBSD: options.c,v 1.6 1996/03/26 23:54:18 mrg Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)options.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: options.c,v 1.29 1997/07/25 18:58:32 mickey Exp $"; +static char rcsid[] = "$OpenBSD: options.c,v 1.30 1997/09/01 18:29:54 deraadt Exp $"; #endif #endif /* not lint */ @@ -612,8 +612,8 @@ tar_options(argc, argv) * process option flags */ while ((c = getoldopt(argc, argv, - "b:cef:hmopruts:vwxzBC:HLOPXZ014578")) - != EOF) { + "b:cef:hmopruts:vwxzBC:HLOPXZ014578")) + != EOF) { switch(c) { case 'b': /* @@ -816,7 +816,7 @@ tar_options(argc, argv) default: { int sawpat = 0; - + while (*argv != NULL) { if (strcmp(*argv, "-C") == 0) { if(*++argv == NULL) @@ -833,9 +833,9 @@ tar_options(argc, argv) * if patterns were added, we are doing chdir() * on a file-by-file basis, else, just one * global chdir (if any) after opening input. - */ + */ if (sawpat > 0) - chdname = NULL; + chdname = NULL; } break; case ARCHIVE: diff --git a/bin/pax/pat_rep.c b/bin/pax/pat_rep.c index ad4bbd9ea84..a93809f7436 100644 --- a/bin/pax/pat_rep.c +++ b/bin/pax/pat_rep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pat_rep.c,v 1.10 1997/07/25 18:58:34 mickey Exp $ */ +/* $OpenBSD: pat_rep.c,v 1.11 1997/09/01 18:29:56 deraadt Exp $ */ /* $NetBSD: pat_rep.c,v 1.4 1995/03/21 09:07:33 cgd Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)pat_rep.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: pat_rep.c,v 1.10 1997/07/25 18:58:34 mickey Exp $"; +static char rcsid[] = "$OpenBSD: pat_rep.c,v 1.11 1997/09/01 18:29:56 deraadt Exp $"; #endif #endif /* not lint */ @@ -380,7 +380,7 @@ pat_sel(arcn) */ if (pt->pend != NULL) *pt->pend = '\0'; - + if ((pt->pstr = strdup(arcn->name)) == NULL) { paxwarn(1, "Pattern select out of memory"); if (pt->pend != NULL) @@ -405,7 +405,7 @@ pat_sel(arcn) if (*(pt->pstr + len) == '/') { *(pt->pstr + len) = '\0'; pt->plen = len; - } + } pt->flgs = DIR_MTCH | MTCH; arcn->pat = pt; return(0); @@ -1055,7 +1055,7 @@ rep_name(name, nlen, prnt) */ } while (pt->flgs & GLOB); - if (found) + if (found) break; /* @@ -1078,7 +1078,7 @@ rep_name(name, nlen, prnt) paxwarn(1,"Replacement name too long %s >> %s", name, nname); return(1); - } + } /* * inform the user of the result if wanted @@ -1087,7 +1087,7 @@ rep_name(name, nlen, prnt) if (*nname == '\0') (void)fprintf(stderr,"%s >> <empty string>\n", name); - else + else (void)fprintf(stderr,"%s >> %s\n", name, nname); } @@ -1095,7 +1095,7 @@ rep_name(name, nlen, prnt) * if empty inform the caller this file is to be skipped * otherwise copy the new name over the orig name and return */ - if (*nname == '\0') + if (*nname == '\0') return(1); *nlen = l_strncpy(name, nname, PAXPATHLEN + 1); name[PAXPATHLEN] = '\0'; diff --git a/bin/pax/pax.c b/bin/pax/pax.c index 47c4966bb1a..c5b55527f2b 100644 --- a/bin/pax/pax.c +++ b/bin/pax/pax.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pax.c,v 1.10 1997/07/25 18:58:35 mickey Exp $ */ +/* $OpenBSD: pax.c,v 1.11 1997/09/01 18:29:58 deraadt Exp $ */ /* $NetBSD: pax.c,v 1.5 1996/03/26 23:54:20 mrg Exp $ */ /*- @@ -48,7 +48,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)pax.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: pax.c,v 1.10 1997/07/25 18:58:35 mickey Exp $"; +static char rcsid[] = "$OpenBSD: pax.c,v 1.11 1997/09/01 18:29:58 deraadt Exp $"; #endif #endif /* not lint */ @@ -390,27 +390,27 @@ gen_init() n_hand.sa_handler = sig_cleanup; if ((sigaction(SIGHUP, &n_hand, &o_hand) < 0) && - (o_hand.sa_handler == SIG_IGN) && + (o_hand.sa_handler == SIG_IGN) && (sigaction(SIGHUP, &o_hand, &o_hand) < 0)) goto out; if ((sigaction(SIGTERM, &n_hand, &o_hand) < 0) && - (o_hand.sa_handler == SIG_IGN) && + (o_hand.sa_handler == SIG_IGN) && (sigaction(SIGTERM, &o_hand, &o_hand) < 0)) goto out; if ((sigaction(SIGINT, &n_hand, &o_hand) < 0) && - (o_hand.sa_handler == SIG_IGN) && + (o_hand.sa_handler == SIG_IGN) && (sigaction(SIGINT, &o_hand, &o_hand) < 0)) goto out; if ((sigaction(SIGQUIT, &n_hand, &o_hand) < 0) && - (o_hand.sa_handler == SIG_IGN) && + (o_hand.sa_handler == SIG_IGN) && (sigaction(SIGQUIT, &o_hand, &o_hand) < 0)) goto out; if ((sigaction(SIGXCPU, &n_hand, &o_hand) < 0) && - (o_hand.sa_handler == SIG_IGN) && + (o_hand.sa_handler == SIG_IGN) && (sigaction(SIGXCPU, &o_hand, &o_hand) < 0)) goto out; diff --git a/bin/pax/tables.c b/bin/pax/tables.c index 6be18476bcd..51221d159be 100644 --- a/bin/pax/tables.c +++ b/bin/pax/tables.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tables.c,v 1.8 1997/07/25 18:58:37 mickey Exp $ */ +/* $OpenBSD: tables.c,v 1.9 1997/09/01 18:30:00 deraadt Exp $ */ /* $NetBSD: tables.c,v 1.4 1995/03/21 09:07:45 cgd Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)tables.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: tables.c,v 1.8 1997/07/25 18:58:37 mickey Exp $"; +static char rcsid[] = "$OpenBSD: tables.c,v 1.9 1997/09/01 18:30:00 deraadt Exp $"; #endif #endif /* not lint */ @@ -89,7 +89,7 @@ static DEVT *chk_dev __P((dev_t, int)); /* * hard link table routines * - * The hard link table tries to detect hard links to files using the device and + * The hard link table tries to detect hard links to files using the device and * inode values. We do this when writing an archive, so we can tell the format * write routine that this file is a hard link to another file. The format * write routine then can store this file in whatever way it wants (as a hard @@ -338,10 +338,10 @@ lnk_end() * that this is one HUGE database. To save memory space, the actual file names * are stored in a scatch file and indexed by an in memory hash table. The * hash table is indexed by hashing the file path. The nodes in the table store - * the length of the filename and the lseek offset within the scratch file + * the length of the filename and the lseek offset within the scratch file * where the actual name is stored. Since there are never any deletions to this * table, fragmentation of the scratch file is never a issue. Lookups seem to - * not exhibit any locality at all (files in the database are rarely + * not exhibit any locality at all (files in the database are rarely * looked up more than once...). So caching is just a waste of memory. The * only limitation is the amount of scatch file space available to store the * path names. @@ -472,7 +472,7 @@ chk_ftime(arcn) */ pt->mtime = arcn->sb.st_mtime; return(0); - } + } /* * file is older */ @@ -497,7 +497,7 @@ chk_ftime(arcn) return(0); } syswarn(1, errno, "Failed write to file time table"); - } else + } else syswarn(1, errno, "Failed seek on file time table"); } else paxwarn(1, "File time table ran out of memory"); @@ -571,7 +571,7 @@ add_name(oname, onamelen, nname) * should never happen */ paxwarn(0, "No interactive rename table, links may fail\n"); - return(0); + return(0); } /* @@ -672,7 +672,7 @@ sub_name(oname, onamelen, onamesize) */ return; } - + /* * device/inode mapping table routines * (used with formats that store device and inodes fields) @@ -862,7 +862,7 @@ map_dev(arcn, dev_mask, ino_mask) return(0); /* * check for device and inode truncation, and extract the truncated - * bit pattern. + * bit pattern. */ if ((arcn->sb.st_dev & (dev_t)dev_mask) != arcn->sb.st_dev) ++trc_dev; @@ -1070,7 +1070,7 @@ add_atdir(fname, dev, ino, mtime, atime) return; /* - * make sure this directory is not already in the table, if so just + * make sure this directory is not already in the table, if so just * return (the older entry always has the correct time). The only * way this will happen is when the same subtree can be traversed by * different args to pax and the -n option is aborting fts out of a @@ -1239,7 +1239,7 @@ dir_start() * name is name of the directory, psb the stat buffer with the data in it, * frc_mode is a flag that says whether to force the setting of the mode * (ignoring the user set values for preserving file mode). Frc_mode is - * for the case where we created a file and found that the resulting + * for the case where we created a file and found that the resulting * directory was not writeable and the user asked for file modes to NOT * be preserved. (we have to preserve what was created by default, so we * have to force the setting at the end. this is stated explicitly in the @@ -1318,15 +1318,15 @@ proc_dir() * read the trailer, then the file name, if this fails * just give up. */ - if (lseek(dirfd, -((off_t)sizeof(dblk)), SEEK_CUR) < 0) + if (lseek(dirfd, -((off_t)sizeof(dblk)), SEEK_CUR) < 0) break; if (read(dirfd,(char *)&dblk, sizeof(dblk)) != sizeof(dblk)) break; - if (lseek(dirfd, dblk.npos, SEEK_SET) < 0) + if (lseek(dirfd, dblk.npos, SEEK_SET) < 0) break; if (read(dirfd, name, dblk.nlen) != dblk.nlen) break; - if (lseek(dirfd, dblk.npos, SEEK_SET) < 0) + if (lseek(dirfd, dblk.npos, SEEK_SET) < 0) break; /* diff --git a/bin/pax/tar.c b/bin/pax/tar.c index 9e83f8ed883..6a4c3e00cca 100644 --- a/bin/pax/tar.c +++ b/bin/pax/tar.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tar.c,v 1.11 1997/07/25 18:58:38 mickey Exp $ */ +/* $OpenBSD: tar.c,v 1.12 1997/09/01 18:30:03 deraadt Exp $ */ /* $NetBSD: tar.c,v 1.5 1995/03/21 09:07:49 cgd Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)tar.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: tar.c,v 1.11 1997/07/25 18:58:38 mickey Exp $"; +static char rcsid[] = "$OpenBSD: tar.c,v 1.12 1997/09/01 18:30:03 deraadt Exp $"; #endif #endif /* not lint */ @@ -186,7 +186,7 @@ ul_oct(val, str, len, term) #endif { register char *pt; - + /* * term selects the appropriate character(s) for the end of the string */ @@ -250,7 +250,7 @@ uqd_oct(val, str, len, term) #endif { register char *pt; - + /* * term selects the appropriate character(s) for the end of the string */ @@ -319,8 +319,8 @@ tar_chksm(blk, len) */ pt = blk; stop = blk + CHK_OFFSET; - while (pt < stop) - chksm += (u_long)(*pt++ & 0xff); + while (pt < stop) + chksm += (u_long)(*pt++ & 0xff); /* * move past the checksum field and keep going, spec counts the * checksum field as the sum of 8 blanks (which is pre-computed as @@ -331,7 +331,7 @@ tar_chksm(blk, len) pt += CHK_LEN; stop = blk + len; while (pt < stop) - chksm += (u_long)(*pt++ & 0xff); + chksm += (u_long)(*pt++ & 0xff); return(chksm); } @@ -1032,7 +1032,7 @@ ustar_wr(arcn) l_strncpy(hd->name, pt, sizeof(hd->name) - 1); hd->name[sizeof(hd->name) - 1] = '\0'; - /* + /* * set the fields in the header that are type dependent */ switch(arcn->type) { diff --git a/bin/pdksh/lex.c b/bin/pdksh/lex.c index 40469fdd3e3..4be7b5e5e53 100644 --- a/bin/pdksh/lex.c +++ b/bin/pdksh/lex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lex.c,v 1.8 1997/08/05 21:49:55 grr Exp $ */ +/* $OpenBSD: lex.c,v 1.9 1997/09/01 18:30:08 deraadt Exp $ */ /* * lexical analysis and source input @@ -62,7 +62,7 @@ yylex(cf) #ifdef KSH else if (cf&LETEXPR) { *wp++ = OQUOTE; /* enclose arguments in (double) quotes */ - istate = SDPAREN; + istate = SDPAREN; ndparen = 0; } #endif /* KSH */ diff --git a/bin/pdksh/main.c b/bin/pdksh/main.c index af8056db065..5bbc327a651 100644 --- a/bin/pdksh/main.c +++ b/bin/pdksh/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.7 1997/06/19 13:58:45 kstailey Exp $ */ +/* $OpenBSD: main.c,v 1.8 1997/09/01 18:30:09 deraadt Exp $ */ /* * startup, main loop, enviroments and error handling @@ -26,7 +26,7 @@ static int is_restricted ARGS((char *name)); static const char initifs [] = "IFS= \t\n"; /* must be R/W */ -static const char initsubs [] = +static const char initsubs [] = "${PS2=> } ${PS3=#? } ${PS4=+ }"; static const char version_param[] = diff --git a/bin/pdksh/syn.c b/bin/pdksh/syn.c index acfdea7d145..4b37baa819d 100644 --- a/bin/pdksh/syn.c +++ b/bin/pdksh/syn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syn.c,v 1.7 1997/06/19 13:58:47 kstailey Exp $ */ +/* $OpenBSD: syn.c,v 1.8 1997/09/01 18:30:12 deraadt Exp $ */ /* * shell parser (C version) @@ -803,7 +803,7 @@ compile(s) * a=[ab] * $ x=typeset; $x a=[ab]; echo "$a" * a=a - * $ + * $ */ static int assign_command(s) diff --git a/bin/pdksh/trap.c b/bin/pdksh/trap.c index 9bb07c57dbd..f1efe6451d9 100644 --- a/bin/pdksh/trap.c +++ b/bin/pdksh/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.5 1997/08/05 22:22:58 deraadt Exp $ */ +/* $OpenBSD: trap.c,v 1.6 1997/09/01 18:30:13 deraadt Exp $ */ /* * signal handling @@ -251,7 +251,7 @@ runtrap(p) p->flags |= old_changed; } } - + /* clear pending traps and reset user's trap handlers; used after fork(2) */ void cleartraps() diff --git a/bin/pdksh/tree.c b/bin/pdksh/tree.c index 87977b5bbb1..93e3f9d7de7 100644 --- a/bin/pdksh/tree.c +++ b/bin/pdksh/tree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tree.c,v 1.4 1997/06/19 13:58:48 kstailey Exp $ */ +/* $OpenBSD: tree.c,v 1.5 1997/09/01 18:30:15 deraadt Exp $ */ /* * command tree climbing @@ -352,7 +352,7 @@ int #ifdef HAVE_PROTOTYPES fptreef(struct shf *shf, int indent, const char *fmt, ...) #else -fptreef(shf, indent, fmt, va_alist) +fptreef(shf, indent, fmt, va_alist) struct shf *shf; int indent; const char *fmt; @@ -362,7 +362,7 @@ fptreef(shf, indent, fmt, va_alist) va_list va; SH_VA_START(va, fmt); - + vfptreef(shf, indent, fmt, va); va_end(va); return 0; diff --git a/bin/pdksh/var.c b/bin/pdksh/var.c index f02c5b8f06e..8350846a148 100644 --- a/bin/pdksh/var.c +++ b/bin/pdksh/var.c @@ -1,4 +1,4 @@ -/* $OpenBSD: var.c,v 1.5 1997/06/19 13:58:49 kstailey Exp $ */ +/* $OpenBSD: var.c,v 1.6 1997/09/01 18:30:16 deraadt Exp $ */ #include "sh.h" #include "ksh_time.h" @@ -159,7 +159,7 @@ global(n) register struct block *l = e->loc; register struct tbl *vp; register int c; - unsigned h; + unsigned h; bool_t array; int val; @@ -405,7 +405,7 @@ getint(vp, nump) int base, neg; int have_base = 0; long num; - + if (vp->flag&SPECIAL) getspec(vp); /* XXX is it possible for ISSET to be set and val.s to be 0? */ @@ -460,7 +460,7 @@ setint_v(vq, vp) { int base; long num; - + if ((base = getint(vp, &num)) == -1) return NULL; if (!(vq->flag & INTEGER) && (vq->flag & ALLOC)) { @@ -583,7 +583,7 @@ typeset(var, set, clr, field, base) return NULL; if (*val == '[') { int len; - + len = array_ref_len(val); if (len == 0) return NULL; diff --git a/bin/ps/print.c b/bin/ps/print.c index 1ab2f1669bf..5c4b1fe67cf 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print.c,v 1.7 1997/08/22 20:08:14 kstailey Exp $ */ +/* $OpenBSD: print.c,v 1.8 1997/09/01 18:30:19 deraadt Exp $ */ /* $NetBSD: print.c,v 1.27 1995/09/29 21:58:12 cgd Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94"; #else -static char rcsid[] = "$OpenBSD: print.c,v 1.7 1997/08/22 20:08:14 kstailey Exp $"; +static char rcsid[] = "$OpenBSD: print.c,v 1.8 1997/09/01 18:30:19 deraadt Exp $"; #endif #endif /* not lint */ @@ -422,7 +422,7 @@ wchan(k, ve) v = ve->var; if (KI_PROC(k)->p_wchan) { if (KI_PROC(k)->p_wmesg) - (void)printf("%-*.*s", v->width, v->width, + (void)printf("%-*.*s", v->width, v->width, KI_EPROC(k)->e_wmesg); else (void)printf("%-*lx", v->width, @@ -589,7 +589,7 @@ pagein(k, ve) VAR *v; v = ve->var; - (void)printf("%*ld", v->width, + (void)printf("%*ld", v->width, k->ki_u.u_valid ? k->ki_u.u_ru.ru_majflt : 0); } diff --git a/bin/rcp/rcp.c b/bin/rcp/rcp.c index cd48053b3d6..95c8a206c73 100644 --- a/bin/rcp/rcp.c +++ b/bin/rcp/rcp.c @@ -1,5 +1,5 @@ /* $NetBSD: rcp.c,v 1.9 1995/03/21 08:19:06 cgd Exp $ */ -/* $OpenBSD: rcp.c,v 1.14 1997/07/25 18:58:41 mickey Exp $ */ +/* $OpenBSD: rcp.c,v 1.15 1997/09/01 18:30:22 deraadt Exp $ */ /* * Copyright (c) 1983, 1990, 1992, 1993 @@ -103,7 +103,7 @@ int kerberos __P((char **, char *, char *, char *)); void oldw __P((const char *, ...)); /* XXX from ../../usr.bin/rlogin/krcmd.c */ int krcmd __P((char **, u_short, char *, char *, int *, char *)); -int krcmd_mutual __P((char **, u_short, char *, char *, int *, +int krcmd_mutual __P((char **, u_short, char *, char *, int *, char *, CREDENTIALS *, Key_schedule)); #endif int response __P((void)); @@ -364,10 +364,10 @@ tolocal(argc, argv) if ((bp = malloc(len)) == NULL) err(1, NULL); (void)snprintf(bp, len, "%s -f %s", cmd, src); - rem = + rem = #ifdef KERBEROS - use_kerberos ? - kerberos(&host, bp, pwd->pw_name, suser) : + use_kerberos ? + kerberos(&host, bp, pwd->pw_name, suser) : #endif rcmd(&host, port, pwd->pw_name, suser, bp, 0); (void)free(bp); @@ -711,7 +711,7 @@ bad: run_err("%s: %s", np, strerror(errno)); j = write(ofd, bp->buf, count); if (j != count) { wrerr = YES; - wrerrno = j >= 0 ? EIO : errno; + wrerrno = j >= 0 ? EIO : errno; } } count = 0; @@ -721,7 +721,7 @@ bad: run_err("%s: %s", np, strerror(errno)); if (count != 0 && wrerr == NO && (j = write(ofd, bp->buf, count)) != count) { wrerr = YES; - wrerrno = j >= 0 ? EIO : errno; + wrerrno = j >= 0 ? EIO : errno; } if (ftruncate(ofd, size)) { run_err("%s: truncate: %s", np, strerror(errno)); @@ -777,8 +777,8 @@ again: errno = 0; if (dest_realm == NULL) dest_realm = krb_realmofhost(*host); - rem = - doencrypt ? + rem = + doencrypt ? krcmd_mutual(host, port, user, bp, 0, dest_realm, &cred, schedule) : krcmd(host, port, user, bp, 0, dest_realm); diff --git a/bin/rcp/util.c b/bin/rcp/util.c index eeeaeac31ad..9380ed08c45 100644 --- a/bin/rcp/util.c +++ b/bin/rcp/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.4 1996/12/22 02:57:52 tholo Exp $ */ +/* $OpenBSD: util.c,v 1.5 1997/09/01 18:30:24 deraadt Exp $ */ /* $NetBSD: util.c,v 1.2 1995/03/21 08:19:08 cgd Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)util.c 8.2 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: util.c,v 1.4 1996/12/22 02:57:52 tholo Exp $"; +static char rcsid[] = "$OpenBSD: util.c,v 1.5 1997/09/01 18:30:24 deraadt Exp $"; #endif #endif /* not lint */ @@ -120,7 +120,7 @@ susystem(s, userid) switch (pid) { case -1: return (127); - + case 0: (void)seteuid(userid); (void)setuid(userid); diff --git a/bin/rm/rm.c b/bin/rm/rm.c index de42626d29b..63406f2eb27 100644 --- a/bin/rm/rm.c +++ b/bin/rm/rm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rm.c,v 1.5 1997/06/18 19:08:44 kstailey Exp $ */ +/* $OpenBSD: rm.c,v 1.6 1997/09/01 18:30:26 deraadt Exp $ */ /* $NetBSD: rm.c,v 1.19 1995/09/07 06:48:50 jtc Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)rm.c 8.8 (Berkeley) 4/27/95"; #else -static char rcsid[] = "$OpenBSD: rm.c,v 1.5 1997/06/18 19:08:44 kstailey Exp $"; +static char rcsid[] = "$OpenBSD: rm.c,v 1.6 1997/09/01 18:30:26 deraadt Exp $"; #endif #endif /* not lint */ @@ -214,7 +214,7 @@ rm_tree(argv) switch (p->fts_info) { case FTS_DP: case FTS_DNR: - if (!rmdir(p->fts_accpath) || + if (!rmdir(p->fts_accpath) || (fflag && errno == ENOENT)) continue; break; diff --git a/bin/rmail/rmail.c b/bin/rmail/rmail.c index 399d478c8ed..4bc5282ae32 100644 --- a/bin/rmail/rmail.c +++ b/bin/rmail/rmail.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rmail.c,v 1.7 1997/04/09 18:47:53 felix Exp $ */ +/* $OpenBSD: rmail.c,v 1.8 1997/09/01 18:30:29 deraadt Exp $ */ /* $NetBSD: rmail.c,v 1.8 1995/09/07 06:51:50 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)rmail.c 8.3 (Berkeley) 5/15/95"; #else -static char rcsid[] = "$OpenBSD: rmail.c,v 1.7 1997/04/09 18:47:53 felix Exp $"; +static char rcsid[] = "$OpenBSD: rmail.c,v 1.8 1997/09/01 18:30:29 deraadt Exp $"; #endif #endif /* not lint */ @@ -53,7 +53,7 @@ static char rcsid[] = "$OpenBSD: rmail.c,v 1.7 1997/04/09 18:47:53 felix Exp $"; * * This program reads the >From ... remote from ... lines that UUCP is so * fond of and turns them into something reasonable. It then execs sendmail - * with various options built from these lines. + * with various options built from these lines. * * The expected syntax is: * @@ -288,7 +288,7 @@ main(argc, argv) sprintf (args [i++], "<%s>", *argv); } argv++; - } + } args[i] = 0; if (debug) { diff --git a/bin/stty/cchar.c b/bin/stty/cchar.c index 8404516b77d..05afe92fbb5 100644 --- a/bin/stty/cchar.c +++ b/bin/stty/cchar.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cchar.c,v 1.6 1997/07/23 19:26:46 kstailey Exp $ */ +/* $OpenBSD: cchar.c,v 1.7 1997/09/01 18:30:31 deraadt Exp $ */ /* $NetBSD: cchar.c,v 1.10 1996/05/07 18:20:05 jtc Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)cchar.c 8.5 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: cchar.c,v 1.6 1997/07/23 19:26:46 kstailey Exp $"; +static char rcsid[] = "$OpenBSD: cchar.c,v 1.7 1997/09/01 18:30:31 deraadt Exp $"; #endif #endif /* not lint */ @@ -104,7 +104,7 @@ csearch(argvp, ip) struct cchar *cp, tmp; long val; char *arg, *ep, *name; - + name = **argvp; tmp.name = name; diff --git a/bin/stty/gfmt.c b/bin/stty/gfmt.c index 6010624b730..c06f5ef18f1 100644 --- a/bin/stty/gfmt.c +++ b/bin/stty/gfmt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gfmt.c,v 1.3 1996/06/23 14:21:50 deraadt Exp $ */ +/* $OpenBSD: gfmt.c,v 1.4 1997/09/01 18:30:33 deraadt Exp $ */ /* $NetBSD: gfmt.c,v 1.10 1996/05/07 18:20:08 jtc Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)gfmt.c 8.6 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: gfmt.c,v 1.3 1996/06/23 14:21:50 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: gfmt.c,v 1.4 1997/09/01 18:30:33 deraadt Exp $"; #endif #endif /* not lint */ @@ -77,7 +77,7 @@ gprint(tp, wp, ldisc) } void -gread(tp, s) +gread(tp, s) struct termios *tp; char *s; { diff --git a/bin/stty/print.c b/bin/stty/print.c index 1e1e6af1df7..afbc5920a4a 100644 --- a/bin/stty/print.c +++ b/bin/stty/print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print.c,v 1.5 1996/09/15 23:13:03 millert Exp $ */ +/* $OpenBSD: print.c,v 1.6 1997/09/01 18:30:34 deraadt Exp $ */ /* $NetBSD: print.c,v 1.11 1996/05/07 18:20:10 jtc Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94"; #else -static char rcsid[] = "$OpenBSD: print.c,v 1.5 1996/09/15 23:13:03 millert Exp $"; +static char rcsid[] = "$OpenBSD: print.c,v 1.6 1997/09/01 18:30:34 deraadt Exp $"; #endif #endif /* not lint */ @@ -73,16 +73,16 @@ print(tp, wp, ldisc, fmt) /* Line discipline. */ if (ldisc != TTYDISC) { switch(ldisc) { - case TABLDISC: + case TABLDISC: cnt += printf("tablet disc; "); break; - case SLIPDISC: + case SLIPDISC: cnt += printf("slip disc; "); break; - case PPPDISC: + case PPPDISC: cnt += printf("ppp disc; "); break; - default: + default: cnt += printf("#%d disc; ", ldisc); break; } diff --git a/bin/stty/stty.c b/bin/stty/stty.c index dd013648b38..d03630f00fd 100644 --- a/bin/stty/stty.c +++ b/bin/stty/stty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: stty.c,v 1.5 1997/06/04 04:39:33 deraadt Exp $ */ +/* $OpenBSD: stty.c,v 1.6 1997/09/01 18:30:35 deraadt Exp $ */ /* $NetBSD: stty.c,v 1.11 1995/03/21 09:11:30 cgd Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)stty.c 8.3 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: stty.c,v 1.5 1997/06/04 04:39:33 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: stty.c,v 1.6 1997/09/01 18:30:35 deraadt Exp $"; #endif #endif /* not lint */ @@ -63,7 +63,7 @@ static char rcsid[] = "$OpenBSD: stty.c,v 1.5 1997/06/04 04:39:33 deraadt Exp $" #include "extern.h" int -main(argc, argv) +main(argc, argv) int argc; char *argv[]; { @@ -119,7 +119,7 @@ args: argc -= optind; gprint(&i.t, &i.win, i.ldisc); break; } - + for (i.set = i.wset = 0; *argv; ++argv) { if (ksearch(&argv, &i)) continue; diff --git a/bin/test/test.c b/bin/test/test.c index 2ccf7543b5b..362b1f203ff 100644 --- a/bin/test/test.c +++ b/bin/test/test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: test.c,v 1.4 1997/06/18 20:34:45 kstailey Exp $ */ +/* $OpenBSD: test.c,v 1.5 1997/09/01 18:30:38 deraadt Exp $ */ /* $NetBSD: test.c,v 1.15 1995/03/21 07:04:06 cgd Exp $ */ /* @@ -12,7 +12,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: test.c,v 1.4 1997/06/18 20:34:45 kstailey Exp $"; +static char rcsid[] = "$OpenBSD: test.c,v 1.5 1997/09/01 18:30:38 deraadt Exp $"; #endif #include <sys/types.h> @@ -181,7 +181,7 @@ main(argc, argv) break; case 4: if (argv[1][0] != '!' || argv[1][1] != '\0') { - if (t_lex(argv[2]), + if (t_lex(argv[2]), t_wp_op && t_wp_op->op_type == BINOP) { t_wp = &argv[1]; return (binop() == 0); @@ -190,7 +190,7 @@ main(argc, argv) break; case 5: if (argv[1][0] == '!' && argv[1][1] == '\0') { - if (t_lex(argv[3]), + if (t_lex(argv[3]), t_wp_op && t_wp_op->op_type == BINOP) { t_wp = &argv[2]; return !(binop() == 0); @@ -286,7 +286,7 @@ primary(n) if (t_lex(t_wp[1]), t_wp_op && t_wp_op->op_type == BINOP) { return binop(); - } + } return strlen(*t_wp) > 0; } @@ -303,7 +303,7 @@ binop() if ((opnd2 = *++t_wp) == NULL) syntax(op->op_text, "argument expected"); - + switch (op->op_num) { case STREQ: return strcmp(opnd1, opnd2) == 0; @@ -353,7 +353,7 @@ filstat(nm, mode) return 0; } - if (stat(nm, &s) != 0) + if (stat(nm, &s) != 0) return 0; switch (mode) { @@ -454,7 +454,7 @@ getn(s) while (isspace(*p)) p++; - + if (*p) errx(2, "%s: bad number", s); |