diff options
author | rgrimes <rgrimes@FreeBSD.org> | 1995-05-30 05:51:47 +0000 |
---|---|---|
committer | rgrimes <rgrimes@FreeBSD.org> | 1995-05-30 05:51:47 +0000 |
commit | f05428e4cd63dde97bac14b84dd146a5c00455e3 (patch) | |
tree | e1331adb5d216f2b3fa6baa6491752348d2e5f10 /lib/libc/gen | |
parent | 6de57e42c294763c78d77b0a9a7c5a08008a378a (diff) | |
download | FreeBSD-src-f05428e4cd63dde97bac14b84dd146a5c00455e3.zip FreeBSD-src-f05428e4cd63dde97bac14b84dd146a5c00455e3.tar.gz |
Remove trailing whitespace.
Diffstat (limited to 'lib/libc/gen')
-rw-r--r-- | lib/libc/gen/Makefile.inc | 4 | ||||
-rw-r--r-- | lib/libc/gen/__xuname.c | 8 | ||||
-rw-r--r-- | lib/libc/gen/config.c | 10 | ||||
-rw-r--r-- | lib/libc/gen/crypt.c | 4 | ||||
-rw-r--r-- | lib/libc/gen/fnmatch.c | 4 | ||||
-rw-r--r-- | lib/libc/gen/fts-compat.c | 12 | ||||
-rw-r--r-- | lib/libc/gen/fts.c | 12 | ||||
-rw-r--r-- | lib/libc/gen/getcap.c | 54 | ||||
-rw-r--r-- | lib/libc/gen/getgrent.c | 4 | ||||
-rw-r--r-- | lib/libc/gen/getnetgrent.c | 2 | ||||
-rw-r--r-- | lib/libc/gen/getpwent.c | 8 | ||||
-rw-r--r-- | lib/libc/gen/getusershell.c | 2 | ||||
-rw-r--r-- | lib/libc/gen/getvfsent.c | 4 | ||||
-rw-r--r-- | lib/libc/gen/glob.c | 46 | ||||
-rw-r--r-- | lib/libc/gen/nlist.c | 4 | ||||
-rw-r--r-- | lib/libc/gen/popen.c | 6 | ||||
-rw-r--r-- | lib/libc/gen/scandir.c | 2 | ||||
-rw-r--r-- | lib/libc/gen/setmode.c | 6 | ||||
-rw-r--r-- | lib/libc/gen/sysconf.c | 2 | ||||
-rw-r--r-- | lib/libc/gen/telldir.c | 2 | ||||
-rw-r--r-- | lib/libc/gen/ttyslot.c | 4 | ||||
-rw-r--r-- | lib/libc/gen/ualarm.c | 2 | ||||
-rw-r--r-- | lib/libc/gen/uname.c | 8 | ||||
-rw-r--r-- | lib/libc/gen/unvis.c | 32 | ||||
-rw-r--r-- | lib/libc/gen/vis.c | 6 |
25 files changed, 124 insertions, 124 deletions
diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index bad41ef..69a434d 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -1,5 +1,5 @@ # From: @(#)Makefile.inc 8.3 (Berkeley) 4/16/94 -# $Id: Makefile.inc,v 1.14 1994/11/13 20:47:41 phk Exp $ +# $Id: Makefile.inc,v 1.15 1994/12/18 14:06:38 guido Exp $ # machine-independent gen sources .PATH: ${.CURDIR}/${MACHINE}/gen ${.CURDIR}/gen @@ -56,7 +56,7 @@ MAN3+= gen/alarm.3 gen/clock.3 gen/confstr.3 gen/config_open.3 \ gen/uname.3 gen/unvis.3 gen/usleep.3 gen/utime.3 gen/valloc.3 gen/vis.3 MLINKS+=config_open.3 config_next.3 config_open.3 config_close.3 \ - config_open.3 config_skip.3 + config_open.3 config_skip.3 MLINKS+=crypt.3 encrypt.3 crypt.3 setkey.3 MLINKS+=directory.3 closedir.3 directory.3 dirfd.3 directory.3 opendir.3 \ directory.3 readdir.3 directory.3 rewinddir.3 directory.3 seekdir.3 \ diff --git a/lib/libc/gen/__xuname.c b/lib/libc/gen/__xuname.c index 1511c1f..63f2956 100644 --- a/lib/libc/gen/__xuname.c +++ b/lib/libc/gen/__xuname.c @@ -34,7 +34,7 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char sccsid[] = "From: @(#)uname.c 8.1 (Berkeley) 1/4/94";*/ static const char rcsid[] = - "$Id$"; + "$Id: uname.c,v 1.2 1994/10/13 20:31:19 wollman Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -58,7 +58,7 @@ uname(name) len = sizeof(name->sysname); oerrno = errno; if (sysctl(mib, 2, &name->sysname, &len, NULL, 0) == -1) { - if(errno == ENOMEM) + if(errno == ENOMEM) errno = oerrno; else rval = -1; @@ -69,7 +69,7 @@ uname(name) len = sizeof(name->nodename); oerrno = errno; if (sysctl(mib, 2, &name->nodename, &len, NULL, 0) == -1) { - if(errno == ENOMEM) + if(errno == ENOMEM) errno = oerrno; else rval = -1; @@ -80,7 +80,7 @@ uname(name) len = sizeof(name->release); oerrno = errno; if (sysctl(mib, 2, &name->release, &len, NULL, 0) == -1) { - if(errno == ENOMEM) + if(errno == ENOMEM) errno = oerrno; else rval = -1; diff --git a/lib/libc/gen/config.c b/lib/libc/gen/config.c index 6ea292b..ffe2766 100644 --- a/lib/libc/gen/config.c +++ b/lib/libc/gen/config.c @@ -6,12 +6,12 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id$ + * $Id: config.c,v 1.1 1994/11/13 20:47:43 phk Exp $ * */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$Id: config.c,v 1.1 1994/01/14 12:24:39 jkh Exp $"; +static char rcsid[] = "$Id: config.c,v 1.1 1994/11/13 20:47:43 phk Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -21,7 +21,7 @@ static char rcsid[] = "$Id: config.c,v 1.1 1994/01/14 12:24:39 jkh Exp $"; * Will open the named file, read it into a private malloc'ed area, * and close the file again. * All lines where the first !isspace() char is '#' are deleted. - * If contlines are non-zero lines where the first char is isspace() + * If contlines are non-zero lines where the first char is isspace() * will be joined to the preceeding line. * In case of trouble the name of the offending system call will be * returned. On success NULL is returned. @@ -93,8 +93,8 @@ config_open(const char *filename, int contlines) /* * /^[ \t]*#[^\n]*$/d - * - * Delete all lines where the first !isspace() char is '#' + * + * Delete all lines where the first !isspace() char is '#' */ ptr = file_buf; diff --git a/lib/libc/gen/crypt.c b/lib/libc/gen/crypt.c index 1aad9c6..1ffb736 100644 --- a/lib/libc/gen/crypt.c +++ b/lib/libc/gen/crypt.c @@ -36,7 +36,7 @@ #if defined(LIBC_SCCS) && !defined(lint) /* from static char sccsid[] = "@(#)crypt.c 5.11 (Berkeley) 6/25/91"; */ -static char rcsid[] = "$Header: /a/cvs/386BSD/src/lib/libc/gen/crypt.c,v 1.6 1993/08/29 22:03:56 nate Exp $"; +static char rcsid[] = "$Header: /home/ncvs/src/lib/libc/gen/crypt.c,v 1.2 1994/08/22 20:38:00 csgr Exp $"; #endif /* LIBC_SCCS and not lint */ #include <unistd.h> @@ -44,7 +44,7 @@ static char rcsid[] = "$Header: /a/cvs/386BSD/src/lib/libc/gen/crypt.c,v 1.6 199 /* * UNIX password, and DES, encryption. - * + * * since this is non-exportable, this is just a dummy. if you want real * encryption, make sure you've got libcrypt.a around. */ diff --git a/lib/libc/gen/fnmatch.c b/lib/libc/gen/fnmatch.c index dc7f151..0c2ca13 100644 --- a/lib/libc/gen/fnmatch.c +++ b/lib/libc/gen/fnmatch.c @@ -149,13 +149,13 @@ rangematch(pattern, test, flags) */ if (negate = (*pattern == '!' || *pattern == '^')) ++pattern; - + for (ok = 0; (c = *pattern++) != ']';) { if (c == '\\' && !(flags & FNM_NOESCAPE)) c = *pattern++; if (c == EOS) return (NULL); - if (*pattern == '-' + if (*pattern == '-' && (c2 = *(pattern+1)) != EOS && c2 != ']') { pattern += 2; if (c2 == '\\' && !(flags & FNM_NOESCAPE)) diff --git a/lib/libc/gen/fts-compat.c b/lib/libc/gen/fts-compat.c index 97a7048..3915b00 100644 --- a/lib/libc/gen/fts-compat.c +++ b/lib/libc/gen/fts-compat.c @@ -313,7 +313,7 @@ fts_read(sp) } p->fts_info = FTS_DP; return (p); - } + } /* Rebuild if only read the names and now traversing. */ if (sp->fts_child && sp->fts_options & FTS_NAMEONLY) { @@ -508,7 +508,7 @@ fts_children(sp, instr) if (instr == FTS_NAMEONLY) { sp->fts_options |= FTS_NAMEONLY; instr = BNAMES; - } else + } else instr = BCHILD; /* @@ -680,7 +680,7 @@ mem1: saved_errno = errno; p->fts_accpath = cur->fts_accpath; } else if (nlinks == 0 #ifdef DT_DIR - || nlinks > 0 && + || nlinks > 0 && dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN #endif ) { @@ -774,7 +774,7 @@ fts_stat(sp, p, follow) /* If user needs stat info, stat buffer already allocated. */ sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp; - + /* * If doing a logical walk, or application requested FTS_FOLLOW, do * a stat(2). If that fails, check for a non-existent symlink. If @@ -786,7 +786,7 @@ fts_stat(sp, p, follow) if (!lstat(p->fts_accpath, sbp)) { errno = 0; return (FTS_SLNONE); - } + } p->fts_errno = saved_errno; goto err; } @@ -919,7 +919,7 @@ fts_lfree(head) * Allow essentially unlimited paths; find, rm, ls should all work on any tree. * Most systems will allow creation of paths much longer than MAXPATHLEN, even * though the kernel won't resolve them. Add the size (not just what's needed) - * plus 256 bytes so don't realloc the path 2 bytes at a time. + * plus 256 bytes so don't realloc the path 2 bytes at a time. */ static int fts_palloc(sp, more) diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c index 97a7048..3915b00 100644 --- a/lib/libc/gen/fts.c +++ b/lib/libc/gen/fts.c @@ -313,7 +313,7 @@ fts_read(sp) } p->fts_info = FTS_DP; return (p); - } + } /* Rebuild if only read the names and now traversing. */ if (sp->fts_child && sp->fts_options & FTS_NAMEONLY) { @@ -508,7 +508,7 @@ fts_children(sp, instr) if (instr == FTS_NAMEONLY) { sp->fts_options |= FTS_NAMEONLY; instr = BNAMES; - } else + } else instr = BCHILD; /* @@ -680,7 +680,7 @@ mem1: saved_errno = errno; p->fts_accpath = cur->fts_accpath; } else if (nlinks == 0 #ifdef DT_DIR - || nlinks > 0 && + || nlinks > 0 && dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN #endif ) { @@ -774,7 +774,7 @@ fts_stat(sp, p, follow) /* If user needs stat info, stat buffer already allocated. */ sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp; - + /* * If doing a logical walk, or application requested FTS_FOLLOW, do * a stat(2). If that fails, check for a non-existent symlink. If @@ -786,7 +786,7 @@ fts_stat(sp, p, follow) if (!lstat(p->fts_accpath, sbp)) { errno = 0; return (FTS_SLNONE); - } + } p->fts_errno = saved_errno; goto err; } @@ -919,7 +919,7 @@ fts_lfree(head) * Allow essentially unlimited paths; find, rm, ls should all work on any tree. * Most systems will allow creation of paths much longer than MAXPATHLEN, even * though the kernel won't resolve them. Add the size (not just what's needed) - * plus 256 bytes so don't realloc the path 2 bytes at a time. + * plus 256 bytes so don't realloc the path 2 bytes at a time. */ static int fts_palloc(sp, more) diff --git a/lib/libc/gen/getcap.c b/lib/libc/gen/getcap.c index f883ec4..6bb4450 100644 --- a/lib/libc/gen/getcap.c +++ b/lib/libc/gen/getcap.c @@ -42,7 +42,7 @@ static char sccsid[] = "@(#)getcap.c 8.3 (Berkeley) 3/25/94"; #include <ctype.h> #include <db.h> -#include <errno.h> +#include <errno.h> #include <fcntl.h> #include <limits.h> #include <stdio.h> @@ -198,7 +198,7 @@ getent(cap, len, db_array, fd, name, depth, nfield) char *record, *cbuf; int tc_not_resolved; char pbuf[_POSIX_PATH_MAX]; - + /* * Return with ``loop detected'' error if we've recursed more than * MAX_RECURSION times. @@ -306,7 +306,7 @@ getent(cap, len, db_array, fd, name, depth, nfield) for (;;) { if (bp >= b_end) { int n; - + n = read(fd, buf, sizeof(buf)); if (n <= 0) { if (myfd) @@ -323,7 +323,7 @@ getent(cap, len, db_array, fd, name, depth, nfield) b_end = buf+n; bp = buf; } - + c = *bp++; if (c == '\n') { if (rp > record && *(rp-1) == '\\') { @@ -335,7 +335,7 @@ getent(cap, len, db_array, fd, name, depth, nfield) *rp++ = c; /* - * Enforce loop invariant: if no room + * Enforce loop invariant: if no room * left in record buffer, try to get * some more. */ @@ -364,13 +364,13 @@ getent(cap, len, db_array, fd, name, depth, nfield) */ if (eof) break; - + /* * Toss blank lines and comments. */ if (*record == '\0' || *record == '#') continue; - + /* * See if this is the record we want ... */ @@ -431,7 +431,7 @@ tc_exp: { tclen = s - tcstart; tcend = s; - iret = getent(&icap, &ilen, db_p, fd, tc, depth+1, + iret = getent(&icap, &ilen, db_p, fd, tc, depth+1, NULL); newicap = icap; /* Put into a register. */ newilen = ilen; @@ -447,11 +447,11 @@ tc_exp: { tc_not_resolved = 1; /* couldn't resolve tc */ if (iret == -1) { - *(s - 1) = ':'; + *(s - 1) = ':'; scan = s - 1; tc_not_resolved = 1; continue; - + } } /* not interested in name field of tc'ed record */ @@ -514,7 +514,7 @@ tc_exp: { */ scan = s-1; } - + } /* * Close file (if we opened it), give back any extra memory, and @@ -524,17 +524,17 @@ tc_exp: { (void)close(fd); *len = rp - record - 1; /* don't count NUL */ if (r_end > rp) - if ((record = + if ((record = realloc(record, (size_t)(rp - record))) == NULL) { errno = ENOMEM; return (-2); } - + *cap = record; if (tc_not_resolved) return (1); return (0); -} +} static int cdbget(capdbp, bp, name) @@ -564,7 +564,7 @@ cdbget(capdbp, bp, name) key.data = (char *)data.data + 1; key.size = data.size - 1; } - + *bp = (char *)data.data + 1; return (((char *)(data.data))[0] == TCERR ? 1 : 0); } @@ -641,7 +641,7 @@ cgetclose() } /* - * Cgetnext() gets either the first or next entry in the logical database + * Cgetnext() gets either the first or next entry in the logical database * specified by db_array. It returns 0 upon completion of the database, 1 * upon returning an entry with more remaining, and -1 if an error occurs. */ @@ -702,10 +702,10 @@ cgetnext(bp, db_array) slash = 1; else slash = 0; - } + } - /* + /* * Line points to a name line. */ i = 0; @@ -745,12 +745,12 @@ cgetnext(bp, db_array) *rp++ = *cp; *rp = '\0'; - /* - * XXX + /* + * XXX * Last argument of getent here should be nbuf if we want true - * sequential access in the case of duplicates. + * sequential access in the case of duplicates. * With NULL, getent will return the first entry found - * rather than the duplicate entry record. This is a + * rather than the duplicate entry record. This is a * matter of semantics that should be resolved. */ status = getent(bp, &dummy, db_array, -1, buf, 0, NULL); @@ -894,10 +894,10 @@ cgetstr(buf, cap, str) * Cgetustr retrieves the value of the string capability cap from the * capability record pointed to by buf. The difference between cgetustr() * and cgetstr() is that cgetustr does not decode escapes but rather treats - * all characters literally. A pointer to a NUL terminated malloc'd - * copy of the string is returned in the char pointed to by str. The + * all characters literally. A pointer to a NUL terminated malloc'd + * copy of the string is returned in the char pointed to by str. The * length of the string not including the trailing NUL is returned on success, - * -1 if the requested string capability couldn't be found, -2 if a system + * -1 if the requested string capability couldn't be found, -2 if a system * error was encountered (storage allocation failure). */ int @@ -1039,10 +1039,10 @@ nfcmp(nf, rec) { char *cp, tmp; int ret; - + for (cp = rec; *cp != ':'; cp++) ; - + tmp = *(cp + 1); *(cp + 1) = '\0'; ret = strcmp(nf, rec); diff --git a/lib/libc/gen/getgrent.c b/lib/libc/gen/getgrent.c index a13e7c3..e9b9d1f 100644 --- a/lib/libc/gen/getgrent.c +++ b/lib/libc/gen/getgrent.c @@ -338,7 +338,7 @@ _getypgroup(struct group *gr, const char *name, char *map) return 0; } - if(yp_match(_gr_yp_domain, map, name, strlen(name), + if(yp_match(_gr_yp_domain, map, name, strlen(name), &result, &resultlen)) return 0; @@ -402,5 +402,5 @@ unpack: } return 1; } - + #endif /* YP */ diff --git a/lib/libc/gen/getnetgrent.c b/lib/libc/gen/getnetgrent.c index c60cc4e..1ad838e 100644 --- a/lib/libc/gen/getnetgrent.c +++ b/lib/libc/gen/getnetgrent.c @@ -192,7 +192,7 @@ innetgr(group, host, user, dom) char *hst, *usr, *dm; /* Sanity check */ - + if (group == NULL || !strlen(group)) return (0); diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index 46482b4..22b1485 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -355,7 +355,7 @@ _createcaches() n->next = namehead; namehead = n; } - /* + /* * If netgroup 'foo' doesn't exist, * try group 'foo' instead. */ @@ -419,7 +419,7 @@ _createcaches() n->next = namehead; namehead = n; } - /* + /* * If netgroup 'foo' doesn't exist, * try group 'foo' instead. */ @@ -599,7 +599,7 @@ _getyppass(struct passwd *pw, const char *name, const char *map) gotmaster++; } - if(yp_match(_pw_yp_domain, (char *)&mastermap, name, strlen(name), + if(yp_match(_pw_yp_domain, (char *)&mastermap, name, strlen(name), &result, &resultlen)) return 0; @@ -739,5 +739,5 @@ unpack: } return 1; } - + #endif /* YP */ diff --git a/lib/libc/gen/getusershell.c b/lib/libc/gen/getusershell.c index 2bcdaf7..408f9f3 100644 --- a/lib/libc/gen/getusershell.c +++ b/lib/libc/gen/getusershell.c @@ -72,7 +72,7 @@ getusershell() void endusershell() { - + if (shells != NULL) free(shells); shells = NULL; diff --git a/lib/libc/gen/getvfsent.c b/lib/libc/gen/getvfsent.c index 79f9dd4..63fb1da 100644 --- a/lib/libc/gen/getvfsent.c +++ b/lib/libc/gen/getvfsent.c @@ -83,7 +83,7 @@ getvfsbyname(const char *name) } for(i = 0; i < _vfslistlen; i++) { - if( ! strcmp(_vfslist[i].vfc_name, name) ) + if( ! strcmp(_vfslist[i].vfc_name, name) ) break; } @@ -113,7 +113,7 @@ getvfsbytype(int type) } for(i = 0; i < _vfslistlen; i++) { - if(_vfslist[i].vfc_index == type) + if(_vfslist[i].vfc_index == type) break; } diff --git a/lib/libc/gen/glob.c b/lib/libc/gen/glob.c index 8c8e162..2105f2a 100644 --- a/lib/libc/gen/glob.c +++ b/lib/libc/gen/glob.c @@ -58,7 +58,7 @@ static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93"; * GLOB_TILDE: * expand ~user/foo to the /home/dir/of/user/foo * GLOB_BRACE: - * expand {1,2}{a,b} to 1a 1b 2a 2b + * expand {1,2}{a,b} to 1a 1b 2a 2b * gl_matchc: * Number of matches in the current invocation of glob. */ @@ -173,7 +173,7 @@ glob(pattern, flags, errfunc, pglob) bufend = bufnext + MAXPATHLEN; if (flags & GLOB_QUOTE) { /* Protect the quoted characters. */ - while (bufnext < bufend && (c = *patnext++) != EOS) + while (bufnext < bufend && (c = *patnext++) != EOS) if (c == QUOTE) { if ((c = *patnext++) == EOS) { c = QUOTE; @@ -184,8 +184,8 @@ glob(pattern, flags, errfunc, pglob) else *bufnext++ = c; } - else - while (bufnext < bufend && (c = *patnext++) != EOS) + else + while (bufnext < bufend && (c = *patnext++) != EOS) *bufnext++ = c; *bufnext = EOS; @@ -246,7 +246,7 @@ static int globexp2(ptr, pattern, pglob, rv) for (pm = pe++; *pe != RBRACKET && *pe != EOS; pe++) continue; if (*pe == EOS) { - /* + /* * We could not find a matching RBRACKET. * Ignore and just look for RBRACE */ @@ -274,7 +274,7 @@ static int globexp2(ptr, pattern, pglob, rv) for (pl = pm++; *pm != RBRACKET && *pm != EOS; pm++) continue; if (*pm == EOS) { - /* + /* * We could not find a matching RBRACKET. * Ignore and just look for RBRACE */ @@ -299,7 +299,7 @@ static int globexp2(ptr, pattern, pglob, rv) /* Append the current string */ for (lm = ls; (pl < pm); *lm++ = *pl++) continue; - /* + /* * Append the rest of the pattern after the * closing brace */ @@ -344,15 +344,15 @@ globtilde(pattern, patbuf, pglob) return pattern; /* Copy up to the end of the string or / */ - for (p = pattern + 1, h = (char *) patbuf; *p && *p != SLASH; + for (p = pattern + 1, h = (char *) patbuf; *p && *p != SLASH; *h++ = *p++) continue; *h = EOS; if (((char *) patbuf)[0] == EOS) { - /* - * handle a plain ~ or ~/ by expanding $HOME + /* + * handle a plain ~ or ~/ by expanding $HOME * first and then trying the password file */ if ((h = getenv("HOME")) == NULL) { @@ -375,14 +375,14 @@ globtilde(pattern, patbuf, pglob) /* Copy the home directory */ for (b = patbuf; *h; *b++ = *h++) continue; - + /* Append the rest of the pattern */ while ((*b++ = *p++) != EOS) continue; return patbuf; } - + /* * The main glob() routine: compiles the pattern (optionally processing @@ -440,7 +440,7 @@ glob0(pattern, pglob) break; case STAR: pglob->gl_flags |= GLOB_MAGCHAR; - /* collapse adjacent stars to one, + /* collapse adjacent stars to one, * to avoid exponential behavior */ if (bufnext == patbuf || bufnext[-1] != M_ALL) @@ -460,17 +460,17 @@ glob0(pattern, pglob) return(err); /* - * If there was no match we are going to append the pattern + * If there was no match we are going to append the pattern * if GLOB_NOCHECK was specified or if GLOB_NOMAGIC was specified * and the pattern did not contain any magic characters * GLOB_NOMAGIC is there just for compatibility with csh. */ - if (pglob->gl_pathc == oldpathc && - ((pglob->gl_flags & GLOB_NOCHECK) || + if (pglob->gl_pathc == oldpathc && + ((pglob->gl_flags & GLOB_NOCHECK) || ((pglob->gl_flags & GLOB_NOMAGIC) && !(pglob->gl_flags & GLOB_MAGCHAR)))) return(globextend(pattern, pglob)); - else if (!(pglob->gl_flags & GLOB_NOSORT)) + else if (!(pglob->gl_flags & GLOB_NOSORT)) qsort(pglob->gl_pathv + pglob->gl_offs + oldpathc, pglob->gl_pathc - oldpathc, sizeof(char *), compare); return(0); @@ -519,7 +519,7 @@ glob2(pathbuf, pathend, pattern, pglob) *pathend = EOS; if (g_lstat(pathbuf, &sb, pglob)) return(0); - + if (((pglob->gl_flags & GLOB_MARK) && pathend[-1] != SEP) && (S_ISDIR(sb.st_mode) || (S_ISLNK(sb.st_mode) && @@ -572,7 +572,7 @@ glob3(pathbuf, pathend, pattern, restpattern, pglob) *pathend = EOS; errno = 0; - + if ((dirp = g_opendir(pathbuf, pglob)) == NULL) { /* TODO: don't call for ENOENT or ENOTDIR? */ if (pglob->gl_errfunc) { @@ -598,7 +598,7 @@ glob3(pathbuf, pathend, pattern, restpattern, pglob) /* Initial DOT must be matched literally. */ if (dp->d_name[0] == DOT && *pattern != DOT) continue; - for (sc = (u_char *) dp->d_name, dc = pathend; + for (sc = (u_char *) dp->d_name, dc = pathend; (*dc++ = *sc++) != EOS;) continue; if (!match(pathend, pattern, restpattern)) { @@ -644,7 +644,7 @@ globextend(path, pglob) const Char *p; newsize = sizeof(*pathv) * (2 + pglob->gl_pathc + pglob->gl_offs); - pathv = pglob->gl_pathv ? + pathv = pglob->gl_pathv ? realloc((char *)pglob->gl_pathv, newsize) : malloc(newsize); if (pathv == NULL) @@ -686,7 +686,7 @@ match(name, pat, patend) case M_ALL: if (pat == patend) return(1); - do + do if (match(name, pat, patend)) return(1); while (*name++ != EOS); @@ -825,7 +825,7 @@ g_Ctoc(str, buf) } #ifdef DEBUG -static void +static void qprintf(str, s) const char *str; register Char *s; diff --git a/lib/libc/gen/nlist.c b/lib/libc/gen/nlist.c index 5dc3de1..9993dca 100644 --- a/lib/libc/gen/nlist.c +++ b/lib/libc/gen/nlist.c @@ -95,8 +95,8 @@ __fdnlist(fd, list) * does not start at a page boundary - we save ourselves a * lot of nastiness by mmapping the whole file. * - * This gives us an easy way to randomly access all the strings, - * without making the memory allocation permanent as with + * This gives us an easy way to randomly access all the strings, + * without making the memory allocation permanent as with * malloc/free (i.e., munmap will return it to the system). */ a_out_mmap = mmap(NULL, (size_t)st.st_size, PROT_READ, 0, fd, (off_t)0); diff --git a/lib/libc/gen/popen.c b/lib/libc/gen/popen.c index 89aba16..4affdf4 100644 --- a/lib/libc/gen/popen.c +++ b/lib/libc/gen/popen.c @@ -53,8 +53,8 @@ static struct pid { struct pid *next; FILE *fp; pid_t pid; -} *pidlist; - +} *pidlist; + FILE * popen(program, type) const char *program; @@ -155,6 +155,6 @@ pclose(iop) else last->next = cur->next; free(cur); - + return (pid == -1 ? -1 : pstat.w_status); } diff --git a/lib/libc/gen/scandir.c b/lib/libc/gen/scandir.c index 395df8d..e6e8408 100644 --- a/lib/libc/gen/scandir.c +++ b/lib/libc/gen/scandir.c @@ -79,7 +79,7 @@ scandir(dirname, namelist, select, dcomp) /* * estimate the array size by taking the size of the directory file - * and dividing it by a multiple of the minimum size entry. + * and dividing it by a multiple of the minimum size entry. */ arraysz = (stb.st_size / 24); names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); diff --git a/lib/libc/gen/setmode.c b/lib/libc/gen/setmode.c index 84cadcb..2190b4e 100644 --- a/lib/libc/gen/setmode.c +++ b/lib/libc/gen/setmode.c @@ -190,7 +190,7 @@ setmode(p) (void)sigprocmask(SIG_SETMASK, &sigoset, NULL); setlen = SET_LEN + 2; - + if ((set = malloc((u_int)(sizeof(BITCMD) * setlen))) == NULL) return (NULL); saveset = set; @@ -368,7 +368,7 @@ addcmd(set, op, who, oparg, mask) set->cmd2 = CMD2_UBITS | CMD2_GBITS | CMD2_OBITS; set->bits = mask; } - + if (oparg == '+') set->cmd2 |= CMD2_SET; else if (oparg == '-') @@ -399,7 +399,7 @@ dumpmode(set) /* * Given an array of bitcmd structures, compress by compacting consecutive * '+', '-' and 'X' commands into at most 3 commands, one of each. The 'u', - * 'g' and 'o' commands continue to be separate. They could probably be + * 'g' and 'o' commands continue to be separate. They could probably be * compacted, but it's not worth the effort. */ static int diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c index 83f21a3..2994505 100644 --- a/lib/libc/gen/sysconf.c +++ b/lib/libc/gen/sysconf.c @@ -184,5 +184,5 @@ yesno: if (sysctl(mib, 2, &value, &len, NULL, 0) == -1) errno = EINVAL; return (-1); } - return (sysctl(mib, 2, &value, &len, NULL, 0) == -1 ? -1 : value); + return (sysctl(mib, 2, &value, &len, NULL, 0) == -1 ? -1 : value); } diff --git a/lib/libc/gen/telldir.c b/lib/libc/gen/telldir.c index eeba295..ab23d9d 100644 --- a/lib/libc/gen/telldir.c +++ b/lib/libc/gen/telldir.c @@ -49,7 +49,7 @@ static char sccsid[] = "@(#)telldir.c 8.1 (Berkeley) 6/4/93"; /* * One of these structures is malloced to describe the current directory - * position each time telldir is called. It records the current magic + * position each time telldir is called. It records the current magic * cookie returned by getdirentries and the offset within the buffer * associated with that return value. */ diff --git a/lib/libc/gen/ttyslot.c b/lib/libc/gen/ttyslot.c index 3d9fee6..066f2f9 100644 --- a/lib/libc/gen/ttyslot.c +++ b/lib/libc/gen/ttyslot.c @@ -50,9 +50,9 @@ ttyslot() char *name; setttyent(); - for (cnt = 0; cnt < 3; ++cnt) + for (cnt = 0; cnt < 3; ++cnt) if (name = ttyname(cnt)) { - if (p = rindex(name, '/')) + if (p = rindex(name, '/')) ++p; else p = name; diff --git a/lib/libc/gen/ualarm.c b/lib/libc/gen/ualarm.c index e9e051d..ec49a2d 100644 --- a/lib/libc/gen/ualarm.c +++ b/lib/libc/gen/ualarm.c @@ -54,7 +54,7 @@ ualarm(usecs, reload) new.it_interval.tv_usec = reload % USPS; new.it_interval.tv_sec = reload / USPS; - + new.it_value.tv_usec = usecs % USPS; new.it_value.tv_sec = usecs / USPS; diff --git a/lib/libc/gen/uname.c b/lib/libc/gen/uname.c index 1511c1f..63f2956 100644 --- a/lib/libc/gen/uname.c +++ b/lib/libc/gen/uname.c @@ -34,7 +34,7 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char sccsid[] = "From: @(#)uname.c 8.1 (Berkeley) 1/4/94";*/ static const char rcsid[] = - "$Id$"; + "$Id: uname.c,v 1.2 1994/10/13 20:31:19 wollman Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -58,7 +58,7 @@ uname(name) len = sizeof(name->sysname); oerrno = errno; if (sysctl(mib, 2, &name->sysname, &len, NULL, 0) == -1) { - if(errno == ENOMEM) + if(errno == ENOMEM) errno = oerrno; else rval = -1; @@ -69,7 +69,7 @@ uname(name) len = sizeof(name->nodename); oerrno = errno; if (sysctl(mib, 2, &name->nodename, &len, NULL, 0) == -1) { - if(errno == ENOMEM) + if(errno == ENOMEM) errno = oerrno; else rval = -1; @@ -80,7 +80,7 @@ uname(name) len = sizeof(name->release); oerrno = errno; if (sysctl(mib, 2, &name->release, &len, NULL, 0) == -1) { - if(errno == ENOMEM) + if(errno == ENOMEM) errno = oerrno; else rval = -1; diff --git a/lib/libc/gen/unvis.c b/lib/libc/gen/unvis.c index 6126d6a..5470483 100644 --- a/lib/libc/gen/unvis.c +++ b/lib/libc/gen/unvis.c @@ -65,7 +65,7 @@ unvis(cp, c, astate, flag) if (*astate == S_OCTAL2 || *astate == S_OCTAL3) { *astate = S_GROUND; return (UNVIS_VALID); - } + } return (*astate == S_GROUND ? UNVIS_NOCHAR : UNVIS_SYNBAD); } @@ -76,7 +76,7 @@ unvis(cp, c, astate, flag) if (c == '\\') { *astate = S_START; return (0); - } + } *cp = c; return (UNVIS_VALID); @@ -149,7 +149,7 @@ unvis(cp, c, astate, flag) } *astate = S_GROUND; return (UNVIS_SYNBAD); - + case S_META: if (c == '-') *astate = S_META1; @@ -160,12 +160,12 @@ unvis(cp, c, astate, flag) return (UNVIS_SYNBAD); } return (0); - + case S_META1: *astate = S_GROUND; *cp |= c; return (UNVIS_VALID); - + case S_CTRL: if (c == '?') *cp |= 0177; @@ -176,15 +176,15 @@ unvis(cp, c, astate, flag) case S_OCTAL2: /* second possible octal digit */ if (isoctal(c)) { - /* - * yes - and maybe a third + /* + * yes - and maybe a third */ *cp = (*cp << 3) + (c - '0'); - *astate = S_OCTAL3; + *astate = S_OCTAL3; return (0); - } - /* - * no - done with current sequence, push back passed char + } + /* + * no - done with current sequence, push back passed char */ *astate = S_GROUND; return (UNVIS_VALIDPUSH); @@ -199,10 +199,10 @@ unvis(cp, c, astate, flag) * we were done, push back passed char */ return (UNVIS_VALIDPUSH); - - default: - /* - * decoder in unknown state - (probably uninitialized) + + default: + /* + * decoder in unknown state - (probably uninitialized) */ *astate = S_GROUND; return (UNVIS_SYNBAD); @@ -210,7 +210,7 @@ unvis(cp, c, astate, flag) } /* - * strunvis - decode src into dst + * strunvis - decode src into dst * * Number of chars decoded into dst is returned, -1 on error. * Dst is null terminated. diff --git a/lib/libc/gen/vis.c b/lib/libc/gen/vis.c index 2232149..e12226a 100644 --- a/lib/libc/gen/vis.c +++ b/lib/libc/gen/vis.c @@ -111,7 +111,7 @@ vis(dst, c, flag, nextc) goto done; } } - if (((c & 0177) == ' ') || (flag & VIS_OCTAL)) { + if (((c & 0177) == ' ') || (flag & VIS_OCTAL)) { *dst++ = '\\'; *dst++ = ((u_char)c >> 6 & 07) + '0'; *dst++ = ((u_char)c >> 3 & 07) + '0'; @@ -141,10 +141,10 @@ done: /* * strvis, strvisx - visually encode characters from src into dst - * + * * Dst must be 4 times the size of src to account for possible * expansion. The length of dst, not including the trailing NULL, - * is returned. + * is returned. * * Strvisx encodes exactly len bytes from src into dst. * This is useful for encoding a block of data. |