Module Name: src Committed By: joe Date: Tue Jan 7 14:21:11 UTC 2025
Modified Files: src/usr.bin/config: hash.c lint.c main.c mkdevsw.c mkheaders.c pack.c scan.l sem.c util.c Log Message: clear: trailing whitespaces To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/usr.bin/config/hash.c \ src/usr.bin/config/pack.c cvs rdiff -u -r1.16 -r1.17 src/usr.bin/config/lint.c cvs rdiff -u -r1.101 -r1.102 src/usr.bin/config/main.c cvs rdiff -u -r1.15 -r1.16 src/usr.bin/config/mkdevsw.c cvs rdiff -u -r1.29 -r1.30 src/usr.bin/config/mkheaders.c cvs rdiff -u -r1.36 -r1.37 src/usr.bin/config/scan.l cvs rdiff -u -r1.86 -r1.87 src/usr.bin/config/sem.c cvs rdiff -u -r1.22 -r1.23 src/usr.bin/config/util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/config/hash.c diff -u src/usr.bin/config/hash.c:1.11 src/usr.bin/config/hash.c:1.12 --- src/usr.bin/config/hash.c:1.11 Wed Oct 29 17:14:50 2014 +++ src/usr.bin/config/hash.c Tue Jan 7 14:21:11 2025 @@ -1,4 +1,4 @@ -/* $NetBSD: hash.c,v 1.11 2014/10/29 17:14:50 christos Exp $ */ +/* $NetBSD: hash.c,v 1.12 2025/01/07 14:21:11 joe Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include <sys/cdefs.h> -__RCSID("$NetBSD: hash.c,v 1.11 2014/10/29 17:14:50 christos Exp $"); +__RCSID("$NetBSD: hash.c,v 1.12 2025/01/07 14:21:11 joe Exp $"); #include <sys/param.h> #include <assert.h> @@ -357,7 +357,7 @@ ht_enumerate2(struct hashtab *ht, ht_cal struct hashenthead *hpp; size_t i; int rval = 0; - + for (i = 0; i < ht->ht_size; i++) { hpp = &ht->ht_tab[i]; TAILQ_FOREACH(hp, hpp, h_next) @@ -373,7 +373,7 @@ ht_enumerate(struct hashtab *ht, ht_call struct hashenthead *hpp; size_t i; int rval = 0; - + for (i = 0; i < ht->ht_size; i++) { hpp = &ht->ht_tab[i]; TAILQ_FOREACH(hp, hpp, h_next) Index: src/usr.bin/config/pack.c diff -u src/usr.bin/config/pack.c:1.11 src/usr.bin/config/pack.c:1.12 --- src/usr.bin/config/pack.c:1.11 Fri Apr 5 00:43:42 2024 +++ src/usr.bin/config/pack.c Tue Jan 7 14:21:11 2025 @@ -1,4 +1,4 @@ -/* $NetBSD: pack.c,v 1.11 2024/04/05 00:43:42 riastradh Exp $ */ +/* $NetBSD: pack.c,v 1.12 2025/01/07 14:21:11 joe Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include <sys/cdefs.h> -__RCSID("$NetBSD: pack.c,v 1.11 2024/04/05 00:43:42 riastradh Exp $"); +__RCSID("$NetBSD: pack.c,v 1.12 2025/01/07 14:21:11 joe Exp $"); #include <sys/param.h> #include <stdlib.h> @@ -248,7 +248,7 @@ packlocs(void) if ((ps = i->i_pspec) != NULL && (l = ps->p_iattr->a_loclen) > 0) { if (Pflag) { - o = findvec(i->i_locs, + o = findvec(i->i_locs, LOCHASH(i->i_locs[l - 1]), l, samelocs, locators.used); i->i_locoff = o < 0 ? Index: src/usr.bin/config/lint.c diff -u src/usr.bin/config/lint.c:1.16 src/usr.bin/config/lint.c:1.17 --- src/usr.bin/config/lint.c:1.16 Tue Oct 12 17:14:10 2021 +++ src/usr.bin/config/lint.c Tue Jan 7 14:21:11 2025 @@ -1,4 +1,4 @@ -/* $NetBSD: lint.c,v 1.16 2021/10/12 17:14:10 christos Exp $ */ +/* $NetBSD: lint.c,v 1.17 2025/01/07 14:21:11 joe Exp $ */ /* * Copyright (c) 2007 The NetBSD Foundation. @@ -31,7 +31,7 @@ #endif #include <sys/cdefs.h> -__RCSID("$NetBSD: lint.c,v 1.16 2021/10/12 17:14:10 christos Exp $"); +__RCSID("$NetBSD: lint.c,v 1.17 2025/01/07 14:21:11 joe Exp $"); #include <assert.h> #include <stdlib.h> @@ -110,7 +110,6 @@ do_emit_fs(const char *name, struct nvli return 1; } - void emit_options(void) Index: src/usr.bin/config/main.c diff -u src/usr.bin/config/main.c:1.101 src/usr.bin/config/main.c:1.102 --- src/usr.bin/config/main.c:1.101 Thu Jan 18 04:41:37 2024 +++ src/usr.bin/config/main.c Tue Jan 7 14:21:11 2025 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.101 2024/01/18 04:41:37 thorpej Exp $ */ +/* $NetBSD: main.c,v 1.102 2025/01/07 14:21:11 joe Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include <sys/cdefs.h> -__RCSID("$NetBSD: main.c,v 1.101 2024/01/18 04:41:37 thorpej Exp $"); +__RCSID("$NetBSD: main.c,v 1.102 2025/01/07 14:21:11 joe Exp $"); #ifndef MAKE_BOOTSTRAP #include <sys/cdefs.h> @@ -884,7 +884,7 @@ deffilesystem(struct nvlist *fses, struc /* * Implicit attribute definition for filesystem. */ - const char *n; + const char *n; n = strtolower(nv->nv_name); refattr(n); } @@ -1099,7 +1099,7 @@ defoption(const char *fname, struct defo /* - * Define an option for which a value is required. + * Define an option for which a value is required. */ void defparam(const char *fname, struct defoptlist *opts, struct nvlist *deps, int obs) @@ -1206,7 +1206,7 @@ deloption(const char *name, int nowarn) void addfsoption(const char *name) { - const char *n; + const char *n; /* Make sure this is a defined file system. */ if (!OPT_FSOPT(name)) { @@ -1376,7 +1376,7 @@ undo_option(struct hashtab *ht, struct n struct nvlist ***next, const char *name, const char *type, int nowarn) { struct nvlist *nv; - + if (ht_remove(ht, name)) { /* * -U command line option removals are always silent @@ -1610,7 +1610,7 @@ mkident(void) if (ident == NULL) return (0); - + if ((fp = fopen("ident", "w")) == NULL) { warn("cannot write ident"); return (1); @@ -1870,7 +1870,7 @@ extract_config(const char *kname, const (void)close(kfd); (void)munmap(base, (size_t)st.st_size); - + return found; } @@ -1930,7 +1930,7 @@ devbase_has_any_instance(struct devbase return ht_enumerate(deaddevitab, devbase_has_dead_instances, &dhdi); } - + return 0; } @@ -1997,7 +1997,7 @@ addlevelparent(struct devbase *d, struct for (p = parent; p != NULL; p = p->d_levelparent) if (d == p && d->d_level > 1) return 0; - d->d_levelparent = p ? p : &root; + d->d_levelparent = p ? p : &root; d->d_level++; return 1; } @@ -2109,7 +2109,7 @@ do_kill_orphans(struct devbase *d, struc } else if (!changed) goto out; - } + } } for (al = d->d_attrs; al != NULL; al = al->al_next) { Index: src/usr.bin/config/mkdevsw.c diff -u src/usr.bin/config/mkdevsw.c:1.15 src/usr.bin/config/mkdevsw.c:1.16 --- src/usr.bin/config/mkdevsw.c:1.15 Sat Jul 16 07:13:26 2016 +++ src/usr.bin/config/mkdevsw.c Tue Jan 7 14:21:11 2025 @@ -1,4 +1,4 @@ -/* $NetBSD: mkdevsw.c,v 1.15 2016/07/16 07:13:26 pgoyette Exp $ */ +/* $NetBSD: mkdevsw.c,v 1.16 2025/01/07 14:21:11 joe Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ #endif #include <sys/cdefs.h> -__RCSID("$NetBSD: mkdevsw.c,v 1.15 2016/07/16 07:13:26 pgoyette Exp $"); +__RCSID("$NetBSD: mkdevsw.c,v 1.16 2025/01/07 14:21:11 joe Exp $"); #include <stdio.h> #include <string.h> @@ -113,7 +113,7 @@ pentry(FILE *fp, struct hashtab *t, devm dm = ht_lookup(t, intern(mstr)); if (dm) - fprintf(fp, "\t&%s_%cdevsw", dm->dm_name, p); + fprintf(fp, "\t&%s_%cdevsw", dm->dm_name, p); else fputs("\tNULL", fp); Index: src/usr.bin/config/mkheaders.c diff -u src/usr.bin/config/mkheaders.c:1.29 src/usr.bin/config/mkheaders.c:1.30 --- src/usr.bin/config/mkheaders.c:1.29 Thu Sep 3 13:53:36 2015 +++ src/usr.bin/config/mkheaders.c Tue Jan 7 14:21:11 2025 @@ -1,4 +1,4 @@ -/* $NetBSD: mkheaders.c,v 1.29 2015/09/03 13:53:36 uebayasi Exp $ */ +/* $NetBSD: mkheaders.c,v 1.30 2025/01/07 14:21:11 joe Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include <sys/cdefs.h> -__RCSID("$NetBSD: mkheaders.c,v 1.29 2015/09/03 13:53:36 uebayasi Exp $"); +__RCSID("$NetBSD: mkheaders.c,v 1.30 2025/01/07 14:21:11 joe Exp $"); #include <sys/param.h> #include <ctype.h> @@ -208,7 +208,7 @@ fprintstr(FILE *fp, const char *str) } (void)fputc('\t', fp); - + for (; *str; str++) { switch (*str) { case '\\': @@ -362,7 +362,7 @@ emitlocs(void) const char *tfname; int rval; FILE *tfp; - + tfname = "tmp_locators.h"; if ((tfp = fopen(tfname, "w")) == NULL) return (herr("open", tfname, NULL)); @@ -444,9 +444,9 @@ emittime(void) "#define CONFIG_MONTH\t%2d\n" "#define CONFIG_DATE\t%2d\n" "#define CONFIG_HOUR\t%2d\n" - "#define CONFIG_MINS\t%2d\n" + "#define CONFIG_MINS\t%2d\n" "#define CONFIG_SECS\t%2d\n", - buf, (long long)t, + buf, (long long)t, tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec); Index: src/usr.bin/config/scan.l diff -u src/usr.bin/config/scan.l:1.36 src/usr.bin/config/scan.l:1.37 --- src/usr.bin/config/scan.l:1.36 Tue Aug 13 10:14:04 2024 +++ src/usr.bin/config/scan.l Tue Jan 7 14:21:11 2025 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: scan.l,v 1.36 2024/08/13 10:14:04 uwe Exp $ */ +/* $NetBSD: scan.l,v 1.37 2025/01/07 14:21:11 joe Exp $ */ /* * Copyright (c) 1992, 1993 @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: scan.l,v 1.36 2024/08/13 10:14:04 uwe Exp $"); +__RCSID("$NetBSD: scan.l,v 1.37 2025/01/07 14:21:11 joe Exp $"); #include <sys/param.h> #include <errno.h> @@ -124,7 +124,7 @@ SLIST_HEAD(, prefix) curdirs; /* curdir %option noyywrap nounput noinput PATH [A-Za-z_0-9]*[./][-A-Za-z_0-9./]* -QCHARS \"(\\.|[^\\"])*\" +QCHARS \"(\\.|[^\\"])*\" WORD [A-Za-z_][-A-Za-z_0-9]* FILENAME ({PATH}|{QCHARS}) RESTOFLINE [ \t]*(#[^\n]*)?\n Index: src/usr.bin/config/sem.c diff -u src/usr.bin/config/sem.c:1.86 src/usr.bin/config/sem.c:1.87 --- src/usr.bin/config/sem.c:1.86 Wed Aug 25 23:07:34 2021 +++ src/usr.bin/config/sem.c Tue Jan 7 14:21:11 2025 @@ -1,4 +1,4 @@ -/* $NetBSD: sem.c,v 1.86 2021/08/25 23:07:34 rillig Exp $ */ +/* $NetBSD: sem.c,v 1.87 2025/01/07 14:21:11 joe Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include <sys/cdefs.h> -__RCSID("$NetBSD: sem.c,v 1.86 2021/08/25 23:07:34 rillig Exp $"); +__RCSID("$NetBSD: sem.c,v 1.87 2025/01/07 14:21:11 joe Exp $"); #include <sys/param.h> #include <ctype.h> @@ -1211,7 +1211,7 @@ finddevattr(const char *name, const char * * (1) If we're attached to an attribute, then we don't need * look at the parent base device to see what attributes - * it has, and make sure that we can attach to them. + * it has, and make sure that we can attach to them. * * (2) If we're attached to a real device (i.e. named in * the config file), we want to remember that so that @@ -1575,7 +1575,7 @@ deldeva(const char *at, int nowarn) CFGDBG(5, "deselecting deva `%s'", at); if (at[0] == '\0') goto out; - + l = strlen(at) - 1; if (at[l] == '?' || isdigit((unsigned char)at[l])) { char base[NAMESIZE]; @@ -1740,7 +1740,7 @@ addpseudoroot(const char *name) * and, it works, since the pseudoroot device is not included * in ioconf, just used by config to make sure we start from * the right place. - */ + */ snprintf(fakename, sizeof(fakename), "%s_devattrs", buf); fakedev = getdevbase(intern(fakename)); fakedev->d_isdef = 1; @@ -1946,7 +1946,7 @@ getpspec(struct attr *attr, struct devba inst = p->p_inst; ref = p->p_ref; } - + } } @@ -2186,7 +2186,7 @@ selectbase(struct devbase *d, struct dev struct attr *devattr; devattr = refattr(d->d_name); expandattr(devattr, selectattr); - + if (da != NULL) { (void)ht_insert(selecttab, da->d_name, __UNCONST(da->d_name)); CFGDBG(3, "devattr selected `%s'", da->d_name); Index: src/usr.bin/config/util.c diff -u src/usr.bin/config/util.c:1.22 src/usr.bin/config/util.c:1.23 --- src/usr.bin/config/util.c:1.22 Thu Jan 18 04:41:38 2024 +++ src/usr.bin/config/util.c Tue Jan 7 14:21:11 2025 @@ -1,4 +1,4 @@ -/* $NetBSD: util.c,v 1.22 2024/01/18 04:41:38 thorpej Exp $ */ +/* $NetBSD: util.c,v 1.23 2025/01/07 14:21:11 joe Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ #endif #include <sys/cdefs.h> -__RCSID("$NetBSD: util.c,v 1.22 2024/01/18 04:41:38 thorpej Exp $"); +__RCSID("$NetBSD: util.c,v 1.23 2025/01/07 14:21:11 joe Exp $"); #include <sys/types.h> #include <assert.h> @@ -409,7 +409,7 @@ condexpr_create(enum condexpr_types type cx->cx_or.left = NULL; cx->cx_or.right = NULL; break; - + default: panic("condexpr_create: invalid expr type %d", (int)type); }