CVS commit: src/games/pig
Module Name:src Committed By: dholland Date: Wed Aug 12 08:22:24 UTC 2009 Modified Files: src/games/pig: pig.c Log Message: sprinkle static To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/games/pig/pig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/pig/pig.c diff -u src/games/pig/pig.c:1.13 src/games/pig/pig.c:1.14 --- src/games/pig/pig.c:1.13 Sun Jul 20 01:03:21 2008 +++ src/games/pig/pig.c Wed Aug 12 08:22:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pig.c,v 1.13 2008/07/20 01:03:21 lukem Exp $ */ +/* $NetBSD: pig.c,v 1.14 2009/08/12 08:22:24 dholland Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)pig.c 8.2 (Berkeley) 5/4/95; #else -__RCSID($NetBSD: pig.c,v 1.13 2008/07/20 01:03:21 lukem Exp $); +__RCSID($NetBSD: pig.c,v 1.14 2009/08/12 08:22:24 dholland Exp $); #endif #endif /* not lint */ @@ -53,8 +53,8 @@ #include unistd.h int main(int, char *[]); -void pigout(char *, int); -void usage(void) __dead; +static void pigout(char *, int); +static void usage(void) __dead; int main(argc, argv) @@ -90,7 +90,7 @@ exit(0); } -void +static void pigout(buf, len) char *buf; int len; @@ -131,7 +131,7 @@ (void)printf(%.*s%s, olen, buf + start, allupper ? AY : ay); } -void +static void usage() { (void)fprintf(stderr, usage: pig\n);
CVS commit: src/games/pom
Module Name:src Committed By: dholland Date: Wed Aug 12 08:23:20 UTC 2009 Modified Files: src/games/pom: pom.c Log Message: sprinkle static To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/games/pom/pom.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/pom/pom.c diff -u src/games/pom/pom.c:1.18 src/games/pom/pom.c:1.19 --- src/games/pom/pom.c:1.18 Sun Jul 26 03:05:52 2009 +++ src/games/pom/pom.c Wed Aug 12 08:23:20 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pom.c,v 1.18 2009/07/26 03:05:52 dholland Exp $ */ +/* $NetBSD: pom.c,v 1.19 2009/08/12 08:23:20 dholland Exp $ */ /* * Copyright (c) 1989, 1993 @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = @(#)pom.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: pom.c,v 1.18 2009/07/26 03:05:52 dholland Exp $); +__RCSID($NetBSD: pom.c,v 1.19 2009/08/12 08:23:20 dholland Exp $); #endif #endif /* not lint */ @@ -84,12 +84,12 @@ #define Pzero 36.340410 /* lunar mean long of perigee at EPOCH */ #define Nzero 318.510107 /* lunar mean long of node at EPOCH */ -void adj360(double *); -double dtor(double); int main(int, char *[]); -double potm(double); -time_t parsetime(char *); -void badformat(void) __dead; +static void adj360(double *); +static double dtor(double); +static double potm(double); +static time_t parsetime(char *); +static void badformat(void) __dead; int main(int argc, char *argv[]) @@ -148,7 +148,7 @@ * potm -- * return phase of the moon */ -double +static double potm(double days) { double N, Msol, Ec, LambdaSol, l, Mm, Ev, Ac, A3, Mmprime; @@ -184,7 +184,7 @@ * dtor -- * convert degrees to radians */ -double +static double dtor(double deg) { return(deg * PI / 180); @@ -194,7 +194,7 @@ * adj360 -- * adjust value so 0 = deg = 360 */ -void +static void adj360(double *deg) { for (;;) @@ -207,7 +207,7 @@ } #define ATOI2(ar) ((ar)[0] - '0') * 10 + ((ar)[1] - '0'); (ar) += 2; -time_t +static time_t parsetime(char *p) { struct tm *lt; @@ -268,7 +268,7 @@ return (tval); } -void +static void badformat(void) { warnx(illegal time format);
CVS commit: src/games/ppt
Module Name:src Committed By: dholland Date: Wed Aug 12 08:24:20 UTC 2009 Modified Files: src/games/ppt: ppt.c Log Message: sprinkle static To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/games/ppt/ppt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/ppt/ppt.c diff -u src/games/ppt/ppt.c:1.17 src/games/ppt/ppt.c:1.18 --- src/games/ppt/ppt.c:1.17 Sun Jul 20 01:03:22 2008 +++ src/games/ppt/ppt.c Wed Aug 12 08:24:20 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ppt.c,v 1.17 2008/07/20 01:03:22 lukem Exp $ */ +/* $NetBSD: ppt.c,v 1.18 2009/08/12 08:24:20 dholland Exp $ */ /* * Copyright (c) 1988, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)ppt.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: ppt.c,v 1.17 2008/07/20 01:03:22 lukem Exp $); +__RCSID($NetBSD: ppt.c,v 1.18 2009/08/12 08:24:20 dholland Exp $); #endif #endif /* not lint */ @@ -51,12 +51,10 @@ #define EDGE ___ - void usage(void); - int main(int, char *[]); -static void putppt(int); - int getppt(const char *); +static void putppt(int); +static int getppt(const char *); -void +static void usage(void) { extern char *__progname; @@ -65,9 +63,7 @@ } int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { char *p, buf[132]; int c, start, neednl, dflag; @@ -149,7 +145,7 @@ (void) putchar('\n'); } -int +static int getppt(const char *buf) { const char *p = strchr(buf, '.');
CVS commit: src/games/primes
Module Name:src Committed By: dholland Date: Wed Aug 12 08:25:27 UTC 2009 Modified Files: src/games/primes: primes.c Log Message: sprinkle static To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/games/primes/primes.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/primes/primes.c diff -u src/games/primes/primes.c:1.16 src/games/primes/primes.c:1.17 --- src/games/primes/primes.c:1.16 Sun Jul 20 01:03:22 2008 +++ src/games/primes/primes.c Wed Aug 12 08:25:27 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: primes.c,v 1.16 2008/07/20 01:03:22 lukem Exp $ */ +/* $NetBSD: primes.c,v 1.17 2009/08/12 08:25:27 dholland Exp $ */ /* * Copyright (c) 1989, 1993 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = @(#)primes.c 8.5 (Berkeley) 5/10/95; #else -__RCSID($NetBSD: primes.c,v 1.16 2008/07/20 01:03:22 lukem Exp $); +__RCSID($NetBSD: primes.c,v 1.17 2009/08/12 08:25:27 dholland Exp $); #endif #endif /* not lint */ @@ -84,7 +84,7 @@ * * We make TABSIZE large to reduce the overhead of inner loop setup. */ -char table[TABSIZE]; /* Eratosthenes sieve of odd numbers */ +static char table[TABSIZE]; /* Eratosthenes sieve of odd numbers */ /* * prime[i] is the (i-1)th prime. @@ -103,12 +103,11 @@ extern const char pattern[]; extern const int pattern_size; /* length of pattern array */ -int dflag; +static int dflag; -int main(int, char *[]); -void primes(ubig, ubig); -ubig read_num_buf(void); -void usage(void) __dead; +static void primes(ubig, ubig); +static ubig read_num_buf(void); +static void usage(void) __dead; int main(int argc, char *argv[])
CVS commit: src/games/quiz
Module Name:src Committed By: dholland Date: Wed Aug 12 08:26:49 UTC 2009 Modified Files: src/games/quiz: quiz.c Log Message: sprinkle static To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/games/quiz/quiz.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/quiz/quiz.c diff -u src/games/quiz/quiz.c:1.23 src/games/quiz/quiz.c:1.24 --- src/games/quiz/quiz.c:1.23 Sun Jul 20 01:03:22 2008 +++ src/games/quiz/quiz.c Wed Aug 12 08:26:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: quiz.c,v 1.23 2008/07/20 01:03:22 lukem Exp $ */ +/* $NetBSD: quiz.c,v 1.24 2009/08/12 08:26:49 dholland Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -43,7 +43,7 @@ #if 0 static char sccsid[] = @(#)quiz.c 8.3 (Berkeley) 5/4/95; #else -__RCSID($NetBSD: quiz.c,v 1.23 2008/07/20 01:03:22 lukem Exp $); +__RCSID($NetBSD: quiz.c,v 1.24 2009/08/12 08:26:49 dholland Exp $); #endif #endif /* not lint */ @@ -64,16 +64,16 @@ static int catone, cattwo, tflag; static u_int qsize; -char *appdstr(char *, const char *, size_t); -void downcase(char *); -void get_cats(char *, char *); -void get_file(const char *); int main(int, char *[]); -const char *next_cat(const char *); -void quiz(void); -void score(u_int, u_int, u_int); -void show_index(void); -void usage(void) __dead; +static char *appdstr(char *, const char *, size_t); +static void downcase(char *); +static void get_cats(char *, char *); +static void get_file(const char *); +static const char *next_cat(const char *); +static void quiz(void); +static void score(u_int, u_int, u_int); +static void show_index(void); +static void usage(void) __dead; int main(argc, argv) @@ -118,7 +118,7 @@ exit(0); } -void +static void get_file(file) const char *file; { @@ -158,7 +158,7 @@ (void)fclose(fp); } -void +static void show_index() { QE *qp; @@ -191,7 +191,7 @@ (void)pclose(pf); } -void +static void get_cats(cat1, cat2) char *cat1, *cat2; { @@ -224,7 +224,7 @@ errx(1, invalid categories); } -void +static void quiz() { QE *qp; @@ -307,7 +307,7 @@ score(rights, wrongs, guesses); } -const char * +static const char * next_cat(s) const char * s; { @@ -331,7 +331,7 @@ /* NOTREACHED */ } -char * +static char * appdstr(s, tp, len) char *s; const char *tp; @@ -358,7 +358,7 @@ return (m); } -void +static void score(r, w, g) u_int r, w, g; { @@ -368,7 +368,7 @@ (void)printf( score %d%%\n, (r + w + g) ? r * 100 / (r + w + g) : 0); } -void +static void downcase(p) char *p; { @@ -379,7 +379,7 @@ *p = tolower(ch); } -void +static void usage() { (void)fprintf(stderr, quiz [-t] [-i file] category1 category2\n);
CVS commit: src/games/random
Module Name:src Committed By: dholland Date: Wed Aug 12 08:27:24 UTC 2009 Modified Files: src/games/random: random.c Log Message: sprinkle static To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/games/random/random.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/random/random.c diff -u src/games/random/random.c:1.13 src/games/random/random.c:1.14 --- src/games/random/random.c:1.13 Mon Jul 20 05:33:35 2009 +++ src/games/random/random.c Wed Aug 12 08:27:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: random.c,v 1.13 2009/07/20 05:33:35 dholland Exp $ */ +/* $NetBSD: random.c,v 1.14 2009/08/12 08:27:24 dholland Exp $ */ /* * Copyright (c) 1994 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = @(#)random.c 8.6 (Berkeley) 6/1/94; #else -__RCSID($NetBSD: random.c,v 1.13 2009/07/20 05:33:35 dholland Exp $); +__RCSID($NetBSD: random.c,v 1.14 2009/08/12 08:27:24 dholland Exp $); #endif #endif /* not lint */ @@ -57,7 +57,7 @@ #include unistd.h #include limits.h -void usage(void) __dead; +static void usage(void) __dead; int main(int argc, char *argv[]) @@ -143,7 +143,7 @@ return 0; } -void +static void usage(void) {
CVS commit: src/games/robots
Module Name:src Committed By: dholland Date: Wed Aug 12 08:30:55 UTC 2009 Modified Files: src/games/robots: main.c move.c rnd_pos.c robots.h score.c Log Message: sprinkle static To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/games/robots/main.c cvs rdiff -u -r1.15 -r1.16 src/games/robots/move.c cvs rdiff -u -r1.9 -r1.10 src/games/robots/rnd_pos.c cvs rdiff -u -r1.21 -r1.22 src/games/robots/robots.h cvs rdiff -u -r1.22 -r1.23 src/games/robots/score.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/robots/main.c diff -u src/games/robots/main.c:1.31 src/games/robots/main.c:1.32 --- src/games/robots/main.c:1.31 Wed Aug 5 19:34:09 2009 +++ src/games/robots/main.c Wed Aug 12 08:30:55 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.31 2009/08/05 19:34:09 christos Exp $ */ +/* $NetBSD: main.c,v 1.32 2009/08/12 08:30:55 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)main.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: main.c,v 1.31 2009/08/05 19:34:09 christos Exp $); +__RCSID($NetBSD: main.c,v 1.32 2009/08/12 08:30:55 dholland Exp $); #endif #endif /* not lint */ @@ -57,6 +57,8 @@ extern const char *Scorefile; extern int Max_per_uid; +static bool another(void); + int main(int argc, char **argv) { @@ -210,7 +212,7 @@ * another: * See if another game is desired */ -bool +static bool another(void) { int y; Index: src/games/robots/move.c diff -u src/games/robots/move.c:1.15 src/games/robots/move.c:1.16 --- src/games/robots/move.c:1.15 Mon Jul 20 06:39:06 2009 +++ src/games/robots/move.c Wed Aug 12 08:30:55 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: move.c,v 1.15 2009/07/20 06:39:06 dholland Exp $ */ +/* $NetBSD: move.c,v 1.16 2009/08/12 08:30:55 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)move.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: move.c,v 1.15 2009/07/20 06:39:06 dholland Exp $); +__RCSID($NetBSD: move.c,v 1.16 2009/08/12 08:30:55 dholland Exp $); #endif #endif /* not lint */ @@ -47,6 +47,10 @@ #define ESC '\033' +static bool do_move(int, int); +static bool eaten(const COORD *); +static bool must_telep(void); + /* * get_move: * Get and execute a move from the player @@ -212,7 +216,7 @@ * Must I teleport; i.e., is there anywhere I can move without * being eaten? */ -bool +static bool must_telep(void) { int x, y; @@ -244,7 +248,7 @@ * do_move: * Execute a move */ -bool +static bool do_move(int dy, int dx) { static COORD newpos; @@ -280,7 +284,7 @@ * eaten: * Player would get eaten at this place */ -bool +static bool eaten(const COORD *pos) { int x, y; Index: src/games/robots/rnd_pos.c diff -u src/games/robots/rnd_pos.c:1.9 src/games/robots/rnd_pos.c:1.10 --- src/games/robots/rnd_pos.c:1.9 Mon Jul 20 06:43:18 2009 +++ src/games/robots/rnd_pos.c Wed Aug 12 08:30:55 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rnd_pos.c,v 1.9 2009/07/20 06:43:18 dholland Exp $ */ +/* $NetBSD: rnd_pos.c,v 1.10 2009/08/12 08:30:55 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)rnd_pos.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: rnd_pos.c,v 1.9 2009/07/20 06:43:18 dholland Exp $); +__RCSID($NetBSD: rnd_pos.c,v 1.10 2009/08/12 08:30:55 dholland Exp $); #endif #endif /* not lint */ @@ -44,6 +44,8 @@ #define IS_SAME(p,y,x) ((p).y != -1 (p).y == y (p).x == x) +static int rnd(int); + /* * rnd_pos: * Pick a random, unoccupied position @@ -63,7 +65,7 @@ return pos; } -int +static int rnd(int range) { Index: src/games/robots/robots.h diff -u src/games/robots/robots.h:1.21 src/games/robots/robots.h:1.22 --- src/games/robots/robots.h:1.21 Mon Jul 20 06:39:06 2009 +++ src/games/robots/robots.h Wed Aug 12 08:30:55 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: robots.h,v 1.21 2009/07/20 06:39:06 dholland Exp $ */ +/* $NetBSD: robots.h,v 1.22 2009/08/12 08:30:55 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -110,26 +110,19 @@ */ void add_score(int); -bool another(void); char automove(void); -int cmp_sc(const void *, const void *); -bool do_move(int, int); -bool eaten(const COORD *); void flush_in(void); void get_move(void); void init_field(void); bool jumping(void); void make_level(void); void move_robots(int); -bool must_telep(void); void play_level(void); int query(const char *); void quit(int) __dead; void reset_count(void); -int rnd(int); COORD *rnd_pos(void); void score(int); -void set_name(SCORE *); void show_score(void); int sign(int); void telmsg(int); Index: src/games/robots/score.c diff -u src/games/robots/score.c:1.22 src/games/robots/score.c:1.23 --- src/games/robots/score.c:1.22 Mon Aug 3 06:04:12 2009 +++ src/games/robots/score.c Wed Aug 12 08:30:55 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: score.c,v 1.22 2009/08/03
CVS commit: src/games/rogue
Module Name:src Committed By: dholland Date: Wed Aug 12 08:44:45 UTC 2009 Modified Files: src/games/rogue: inventory.c message.c monster.c move.c object.c pack.c random.c rogue.h room.c score.c throw.c trap.c use.c Log Message: sprinkle static To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/games/rogue/inventory.c \ src/games/rogue/message.c src/games/rogue/object.c cvs rdiff -u -r1.14 -r1.15 src/games/rogue/monster.c src/games/rogue/score.c cvs rdiff -u -r1.11 -r1.12 src/games/rogue/move.c cvs rdiff -u -r1.10 -r1.11 src/games/rogue/pack.c src/games/rogue/throw.c cvs rdiff -u -r1.7 -r1.8 src/games/rogue/random.c cvs rdiff -u -r1.19 -r1.20 src/games/rogue/rogue.h cvs rdiff -u -r1.12 -r1.13 src/games/rogue/room.c cvs rdiff -u -r1.9 -r1.10 src/games/rogue/trap.c src/games/rogue/use.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/rogue/inventory.c diff -u src/games/rogue/inventory.c:1.13 src/games/rogue/inventory.c:1.14 --- src/games/rogue/inventory.c:1.13 Mon Jan 14 03:50:01 2008 +++ src/games/rogue/inventory.c Wed Aug 12 08:44:45 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: inventory.c,v 1.13 2008/01/14 03:50:01 dholland Exp $ */ +/* $NetBSD: inventory.c,v 1.14 2009/08/12 08:44:45 dholland Exp $ */ /* * Copyright (c) 1988, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)inventory.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: inventory.c,v 1.13 2008/01/14 03:50:01 dholland Exp $); +__RCSID($NetBSD: inventory.c,v 1.14 2009/08/12 08:44:45 dholland Exp $); #endif #endif /* not lint */ @@ -211,6 +211,10 @@ {'q', q quaff potion } }; +static int get_com_id(int *, short); +static int pr_com_id(int); +static int pr_motion_char(int); + void inventory(const object *pack, unsigned short mask) { @@ -355,7 +359,7 @@ } } -int +static int pr_com_id(int ch) { int i; @@ -368,7 +372,7 @@ return(1); } -int +static int get_com_id(int *indexp, short ch) { short i; @@ -382,7 +386,7 @@ return(0); } -int +static int pr_motion_char(int ch) { if ( (ch == 'J') || Index: src/games/rogue/message.c diff -u src/games/rogue/message.c:1.13 src/games/rogue/message.c:1.14 --- src/games/rogue/message.c:1.13 Mon Jan 14 03:50:01 2008 +++ src/games/rogue/message.c Wed Aug 12 08:44:45 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: message.c,v 1.13 2008/01/14 03:50:01 dholland Exp $ */ +/* $NetBSD: message.c,v 1.14 2009/08/12 08:44:45 dholland Exp $ */ /* * Copyright (c) 1988, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)message.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: message.c,v 1.13 2008/01/14 03:50:01 dholland Exp $); +__RCSID($NetBSD: message.c,v 1.14 2009/08/12 08:44:45 dholland Exp $); #endif #endif /* not lint */ @@ -67,6 +67,8 @@ char hunger_str[HUNGER_STR_LEN] = ; const char *more = -more-; +static void save_screen(void); + static void message(const char *msg, boolean intrpt) @@ -316,7 +318,7 @@ refresh(); } -void +static void save_screen(void) { FILE *fp; Index: src/games/rogue/object.c diff -u src/games/rogue/object.c:1.13 src/games/rogue/object.c:1.14 --- src/games/rogue/object.c:1.13 Mon Jan 14 03:50:02 2008 +++ src/games/rogue/object.c Wed Aug 12 08:44:45 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: object.c,v 1.13 2008/01/14 03:50:02 dholland Exp $ */ +/* $NetBSD: object.c,v 1.14 2009/08/12 08:44:45 dholland Exp $ */ /* * Copyright (c) 1988, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)object.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: object.c,v 1.13 2008/01/14 03:50:02 dholland Exp $); +__RCSID($NetBSD: object.c,v 1.14 2009/08/12 08:44:45 dholland Exp $); #endif #endif /* not lint */ @@ -162,6 +162,17 @@ {270, , of searching ,0}, }; +static void gr_armor(object *); +static void gr_potion(object *); +static void gr_scroll(object *); +static void gr_wand(object *); +static void gr_weapon(object *, int); +static unsigned short gr_what_is(void); +static void make_party(void); +static void plant_gold(short, short, boolean); +static void put_gold(void); +static void rand_place(object *); + void put_objects(void) { @@ -185,7 +196,7 @@ put_gold(); } -void +static void put_gold(void) { short i, j; @@ -215,7 +226,7 @@ } } -void +static void plant_gold(short row, short col, boolean is_maze) { object *obj; @@ -379,7 +390,7 @@ return(obj); } -unsigned short +static unsigned short gr_what_is(void) { short percent; @@ -405,7 +416,7 @@ return(what_is); } -void +static void gr_scroll(object *obj) { short percent; @@ -443,7 +454,7 @@ } } -void +static void gr_potion(object *obj) { short percent; @@ -483,7 +494,7 @@ } } -void +static void gr_weapon(object *obj, int assign_wk) { short percent; @@ -547,7 +558,7 @@ } } -void +static void gr_armor(object *obj) { short percent; @@ -573,7 +584,7 @@ } } -void
CVS commit: src/games/snake/snake
Module Name:src Committed By: dholland Date: Wed Aug 12 08:48:15 UTC 2009 Modified Files: src/games/snake/snake: snake.c Log Message: sprinkle static To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/games/snake/snake/snake.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/snake/snake/snake.c diff -u src/games/snake/snake/snake.c:1.25 src/games/snake/snake/snake.c:1.26 --- src/games/snake/snake/snake.c:1.25 Fri Aug 8 16:10:47 2008 +++ src/games/snake/snake/snake.c Wed Aug 12 08:48:15 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: snake.c,v 1.25 2008/08/08 16:10:47 drochner Exp $ */ +/* $NetBSD: snake.c,v 1.26 2009/08/12 08:48:15 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)snake.c 8.2 (Berkeley) 1/7/94; #else -__RCSID($NetBSD: snake.c,v 1.25 2008/08/08 16:10:47 drochner Exp $); +__RCSID($NetBSD: snake.c,v 1.26 2009/08/12 08:48:15 dholland Exp $); #endif #endif/* not lint */ @@ -99,44 +99,43 @@ #define pchar(point, c) mvaddch((point)-line + 1, (point)-col + 1, (c)) #define delay(t) usleep(t * 5); -struct point you; -struct point money; -struct point finish; -struct point snake[6]; - -int loot, penalty; -int moves; -int fast = 1; - -int rawscores; -FILE *logfile; - -int lcnt, ccnt; /* user's idea of screen size */ -int chunk; /* amount of money given at a time */ - -void chase(struct point *, struct point *); -int chk(const struct point *); -void drawbox(void); -void flushi(void); -void home(void); -void length(int); -void logit(const char *); +static struct point you; +static struct point money; +static struct point finish; +static struct point snake[6]; + +static int loot, penalty; +static int moves; +static int fast = 1; + +static int rawscores; +static FILE *logfile; + +static int lcnt, ccnt; /* user's idea of screen size */ +static int chunk; /* amount of money given at a time */ + +static void chase(struct point *, struct point *); +static int chk(const struct point *); +static void drawbox(void); +static void flushi(void); +static void length(int); +static void logit(const char *); +static void mainloop(void) __dead; +static struct point *point(struct point *, int, int); +static int post(int, int); +static int pushsnake(void); +static void setup(void); +static void snap(void); +static void snrand(struct point *); +static void spacewarp(int); +static void stop(int) __dead; +static int stretch(const struct point *); +static void surround(struct point *); +static void suspend(void); +static void win(const struct point *); +static void winnings(int); + int main(int, char **); -void mainloop(void) __dead; -struct point *point(struct point *, int, int); -int post(int, int); -int pushsnake(void); -void right(const struct point *); -void setup(void); -void snap(void); -void snrand(struct point *); -void spacewarp(int); -void stop(int) __dead; -int stretch(const struct point *); -void surround(struct point *); -void suspend(void); -void win(const struct point *); -void winnings(int); int main(argc, argv) @@ -247,7 +246,7 @@ return (0); } -struct point * +static struct point * point(ps, x, y) struct point *ps; int x, y; @@ -258,7 +257,7 @@ } /* Main command loop */ -void +static void mainloop() { int k; @@ -447,7 +446,7 @@ /* * setup the board */ -void +static void setup() { int i; @@ -464,7 +463,7 @@ refresh(); } -void +static void drawbox() { int i; @@ -479,7 +478,7 @@ } } -void +static void snrand(sp) struct point *sp; { @@ -509,7 +508,7 @@ *sp = p; } -int +static int post(iscore, flag) int iscore, flag; { @@ -584,24 +583,24 @@ * overshooting. This loses horribly at 9600 baud, but works nicely * if the terminal gets behind. */ -void +static void flushi() { tcflush(0, TCIFLUSH); } -const int mx[8] = { +static const int mx[8] = { 0, 1, 1, 1, 0, -1, -1, -1 }; -const int my[8] = { +static const int my[8] = { -1, -1, 0, 1, 1, 1, 0, -1 }; -const float absv[8] = { +static const float absv[8] = { 1, 1.4, 1, 1.4, 1, 1.4, 1, 1.4 }; -int oldw = 0; +static int oldw = 0; -void +static void chase(np, sp) struct point *sp, *np; { @@ -663,7 +662,7 @@ point(np, sp-col + mx[w], sp-line + my[w]); } -void +static void spacewarp(w) int w; { @@ -697,7 +696,7 @@ winnings(cashvalue); } -void +static void snap() { #if 0 /* This code doesn't really make sense. */ @@ -744,7 +743,7 @@ refresh(); } -int +static int stretch(ps) const struct point *ps; { @@ -792,7 +791,7 @@ return (0); } -void +static void surround(ps) struct point *ps; { @@ -836,7 +835,7 @@ delay(6); } -void +static void win(ps) const struct point *ps; { @@ -869,7 +868,7 @@ } } -int +static int pushsnake() { int i, bonus; @@ -926,7 +925,7 @@ return
CVS commit: src/games/snake/snscore
Module Name:src Committed By: dholland Date: Wed Aug 12 08:48:56 UTC 2009 Modified Files: src/games/snake/snscore: snscore.c Log Message: sprinkle static To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/games/snake/snscore/snscore.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/snake/snscore/snscore.c diff -u src/games/snake/snscore/snscore.c:1.17 src/games/snake/snscore/snscore.c:1.18 --- src/games/snake/snscore/snscore.c:1.17 Sun Jul 20 01:03:22 2008 +++ src/games/snake/snscore/snscore.c Wed Aug 12 08:48:56 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: snscore.c,v 1.17 2008/07/20 01:03:22 lukem Exp $ */ +/* $NetBSD: snscore.c,v 1.18 2009/08/12 08:48:56 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)snscore.c 8.1 (Berkeley) 7/19/93; #else -__RCSID($NetBSD: snscore.c,v 1.17 2008/07/20 01:03:22 lukem Exp $); +__RCSID($NetBSD: snscore.c,v 1.18 2009/08/12 08:48:56 dholland Exp $); #endif #endif /* not lint */ @@ -52,14 +52,16 @@ #include unistd.h #include pathnames.h -const char *recfile = _PATH_RAWSCORES; +static const char *recfile = _PATH_RAWSCORES; #define MAXPLAYERS 256 struct player { short uids; short scores; char *name; -} players[MAXPLAYERS], temp; +}; + +static struct player players[MAXPLAYERS], temp; int main(void);
CVS commit: src/games/tetris
Module Name:src Committed By: dholland Date: Wed Aug 12 08:51:22 UTC 2009 Modified Files: src/games/tetris: screen.c screen.h tetris.c tetris.h Log Message: sprinkle static To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/games/tetris/screen.c cvs rdiff -u -r1.8 -r1.9 src/games/tetris/screen.h cvs rdiff -u -r1.21 -r1.22 src/games/tetris/tetris.c cvs rdiff -u -r1.11 -r1.12 src/games/tetris/tetris.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/tetris/screen.c diff -u src/games/tetris/screen.c:1.23 src/games/tetris/screen.c:1.24 --- src/games/tetris/screen.c:1.23 Mon May 25 04:33:53 2009 +++ src/games/tetris/screen.c Wed Aug 12 08:51:21 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: screen.c,v 1.23 2009/05/25 04:33:53 dholland Exp $ */ +/* $NetBSD: screen.c,v 1.24 2009/08/12 08:51:21 dholland Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -70,7 +70,7 @@ /* * Capabilities from TERMCAP. */ -short ospeed; +extern short ospeed; static char *bcstr, /* backspace char */ @@ -94,7 +94,7 @@ MSflag; /* can move in standout mode */ -struct tcsinfo { /* termcap string info; some abbrevs above */ +static struct tcsinfo { /* termcap string info; some abbrevs above */ char tcname[3]; char **tcaddr; } tcstrings[] = { @@ -136,7 +136,7 @@ */ #define putstr(s) (void)fputs(s, stdout) -void +static void moveto(int r, int c) { char buf[256]; Index: src/games/tetris/screen.h diff -u src/games/tetris/screen.h:1.8 src/games/tetris/screen.h:1.9 --- src/games/tetris/screen.h:1.8 Tue Jan 27 20:30:30 2004 +++ src/games/tetris/screen.h Wed Aug 12 08:51:21 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: screen.h,v 1.8 2004/01/27 20:30:30 jsm Exp $ */ +/* $NetBSD: screen.h,v 1.9 2009/08/12 08:51:21 dholland Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -45,7 +45,6 @@ */ #define putpad(s) tputs(s, 1, put) -voidmoveto(int, int); int put(int); /* just calls putchar; for tputs */ void scr_clear(void); void scr_end(void); Index: src/games/tetris/tetris.c diff -u src/games/tetris/tetris.c:1.21 src/games/tetris/tetris.c:1.22 --- src/games/tetris/tetris.c:1.21 Mon May 25 04:33:53 2009 +++ src/games/tetris/tetris.c Wed Aug 12 08:51:21 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: tetris.c,v 1.21 2009/05/25 04:33:53 dholland Exp $ */ +/* $NetBSD: tetris.c,v 1.22 2009/08/12 08:51:21 dholland Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -63,7 +63,7 @@ int Rows, Cols; /* current screen size */ -const struct shape *curshape; +static const struct shape *curshape; const struct shape *nextshape; long fallrate; /* less than 1 million; smaller = faster */ @@ -74,11 +74,10 @@ char key_msg[100]; int showpreview; -static void elide(void); -static void setup_board(void); - int main(int, char **); - void onintr(int) __dead; - void usage(void) __dead; +static void elide(void); +static void setup_board(void); +static void onintr(int) __dead; +static void usage(void) __dead; /* * Set up the initial board. The bottom display row is completely set, @@ -318,7 +317,7 @@ exit(0); } -void +static void onintr(int signo __unused) { scr_clear(); @@ -326,7 +325,7 @@ exit(0); } -void +static void usage(void) { (void)fprintf(stderr, usage: tetris [-ps] [-k keys] [-l level]\n); Index: src/games/tetris/tetris.h diff -u src/games/tetris/tetris.h:1.11 src/games/tetris/tetris.h:1.12 --- src/games/tetris/tetris.h:1.11 Mon May 25 04:33:53 2009 +++ src/games/tetris/tetris.h Wed Aug 12 08:51:21 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: tetris.h,v 1.11 2009/05/25 04:33:53 dholland Exp $ */ +/* $NetBSD: tetris.h,v 1.12 2009/08/12 08:51:21 dholland Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -130,7 +130,6 @@ extern const struct shape shapes[]; #define randshape() (shapes[random() % 7]) -extern const struct shape *curshape; extern const struct shape *nextshape; /*
CVS commit: src/games/trek
Module Name:src Committed By: dholland Date: Wed Aug 12 08:54:54 UTC 2009 Modified Files: src/games/trek: capture.c computer.c dumpgame.c getpar.c help.c lose.c phaser.c play.c shield.c srscan.c trek.h visual.c Log Message: sprinkle static To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/games/trek/capture.c src/games/trek/play.c cvs rdiff -u -r1.15 -r1.16 src/games/trek/computer.c cvs rdiff -u -r1.14 -r1.15 src/games/trek/dumpgame.c src/games/trek/phaser.c cvs rdiff -u -r1.17 -r1.18 src/games/trek/getpar.c src/games/trek/trek.h cvs rdiff -u -r1.12 -r1.13 src/games/trek/help.c src/games/trek/shield.c cvs rdiff -u -r1.9 -r1.10 src/games/trek/lose.c src/games/trek/visual.c cvs rdiff -u -r1.10 -r1.11 src/games/trek/srscan.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/trek/capture.c diff -u src/games/trek/capture.c:1.11 src/games/trek/capture.c:1.12 --- src/games/trek/capture.c:1.11 Sun May 24 22:55:03 2009 +++ src/games/trek/capture.c Wed Aug 12 08:54:54 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: capture.c,v 1.11 2009/05/24 22:55:03 dholland Exp $ */ +/* $NetBSD: capture.c,v 1.12 2009/08/12 08:54:54 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,13 +34,15 @@ #if 0 static char sccsid[] = @(#)capture.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: capture.c,v 1.11 2009/05/24 22:55:03 dholland Exp $); +__RCSID($NetBSD: capture.c,v 1.12 2009/08/12 08:54:54 dholland Exp $); #endif #endif /* not lint */ #include stdio.h #include trek.h +static struct kling *selectklingon(void); + /* ** Ask a Klingon To Surrender ** @@ -121,7 +123,7 @@ ** Cruddy, just takes one at random. Should ask the captain. */ -struct kling * +static struct kling * selectklingon(void) { int i; Index: src/games/trek/play.c diff -u src/games/trek/play.c:1.11 src/games/trek/play.c:1.12 --- src/games/trek/play.c:1.11 Sun May 24 21:44:56 2009 +++ src/games/trek/play.c Wed Aug 12 08:54:54 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: play.c,v 1.11 2009/05/24 21:44:56 dholland Exp $ */ +/* $NetBSD: play.c,v 1.12 2009/08/12 08:54:54 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)play.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: play.c,v 1.11 2009/05/24 21:44:56 dholland Exp $); +__RCSID($NetBSD: play.c,v 1.12 2009/08/12 08:54:54 dholland Exp $); #endif #endif /* not lint */ @@ -43,6 +43,8 @@ #include trek.h #include getpar.h +static void myreset(int) __dead; + /* ** INSTRUCTION READ AND MAIN PLAY LOOP ** @@ -56,7 +58,7 @@ extern jmp_buf env; -const struct cvntab Comtab[] = { +static const struct cvntab Comtab[] = { { abandon, , abandon, 0 }, { ca, pture, capture, 0 }, { cl, oak, shield, -1 }, @@ -84,7 +86,7 @@ }; /*ARGSUSED*/ -void +static void myreset(int v __unused) { Index: src/games/trek/computer.c diff -u src/games/trek/computer.c:1.15 src/games/trek/computer.c:1.16 --- src/games/trek/computer.c:1.15 Sun May 24 23:20:22 2009 +++ src/games/trek/computer.c Wed Aug 12 08:54:54 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: computer.c,v 1.15 2009/05/24 23:20:22 dholland Exp $ */ +/* $NetBSD: computer.c,v 1.16 2009/08/12 08:54:54 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)computer.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: computer.c,v 1.15 2009/05/24 23:20:22 dholland Exp $); +__RCSID($NetBSD: computer.c,v 1.16 2009/08/12 08:54:54 dholland Exp $); #endif #endif /* not lint */ @@ -90,7 +90,7 @@ ** command processor. */ -struct cvntab Cputab[] = { +static struct cvntab Cputab[] = { { ch, art, (cmdfun)1, 0 }, { t, rajectory, (cmdfun)2, 0 }, { c, ourse, (cmdfun)3, 0 }, Index: src/games/trek/dumpgame.c diff -u src/games/trek/dumpgame.c:1.14 src/games/trek/dumpgame.c:1.15 --- src/games/trek/dumpgame.c:1.14 Sun May 24 21:44:56 2009 +++ src/games/trek/dumpgame.c Wed Aug 12 08:54:54 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: dumpgame.c,v 1.14 2009/05/24 21:44:56 dholland Exp $ */ +/* $NetBSD: dumpgame.c,v 1.15 2009/08/12 08:54:54 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)dumpgame.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: dumpgame.c,v 1.14 2009/05/24 21:44:56 dholland Exp $); +__RCSID($NetBSD: dumpgame.c,v 1.15 2009/08/12 08:54:54 dholland Exp $); #endif #endif /* not lint */ @@ -55,7 +55,7 @@ static int readdump(int); -struct dump Dump_template[] = { +static struct dump Dump_template[] = { { (char *)Ship, sizeof (Ship) }, { (char *)Now, sizeof (Now) }, { (char *)Param, sizeof (Param) }, Index: src/games/trek/phaser.c diff -u src/games/trek/phaser.c:1.14 src/games/trek/phaser.c:1.15 --- src/games/trek/phaser.c:1.14 Sun May 24 22:55:03 2009 +++ src/games/trek/phaser.c Wed Aug 12 08:54:54 2009 @@ -1,4 +1,4 @@ -/* $NetBSD:
CVS commit: src/games/worm
Module Name:src Committed By: dholland Date: Wed Aug 12 08:56:41 UTC 2009 Modified Files: src/games/worm: worm.c Log Message: sprinkle static To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/games/worm/worm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/worm/worm.c diff -u src/games/worm/worm.c:1.28 src/games/worm/worm.c:1.29 --- src/games/worm/worm.c:1.28 Fri Aug 8 16:10:47 2008 +++ src/games/worm/worm.c Wed Aug 12 08:56:41 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: worm.c,v 1.28 2008/08/08 16:10:47 drochner Exp $ */ +/* $NetBSD: worm.c,v 1.29 2009/08/12 08:56:41 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)worm.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: worm.c,v 1.28 2008/08/08 16:10:47 drochner Exp $); +__RCSID($NetBSD: worm.c,v 1.29 2009/08/12 08:56:41 dholland Exp $); #endif #endif /* not lint */ @@ -63,34 +63,36 @@ #define RUNLEN 8 #define CNTRL(p) (p-'A'+1) -WINDOW *tv; -WINDOW *stw; struct body { int x; int y; struct body *prev; struct body *next; -} *head, *tail, goody; -int growing = 0; -int running = 0; -int slow = 0; -int score = 0; -int start_len = LENGTH; -int visible_len; -int lastch; -char outbuf[BUFSIZ]; +}; + +static WINDOW *tv; +static WINDOW *stw; +static struct body *head, *tail, goody; +static int growing = 0; +static int running = 0; +static int slow = 0; +static int score = 0; +static int start_len = LENGTH; +static int visible_len; +static int lastch; +static char outbuf[BUFSIZ]; -void crash(void) __dead; -void display(const struct body *, char); int main(int, char **); -void leave(int) __dead; -void life(void); -void newpos(struct body *); -void process(int); -void prize(void); -int rnd(int); -void setup(void); -void wake(int); +static void crash(void) __dead; +static void display(const struct body *, char); +static void leave(int) __dead; +static void life(void); +static void newpos(struct body *); +static void process(int); +static void prize(void); +static int rnd(int); +static void setup(void); +static void wake(int); int main(argc, argv) @@ -155,7 +157,7 @@ } } -void +static void life() { struct body *bp, *np; @@ -190,7 +192,7 @@ visible_len = start_len + 1; } -void +static void display(pos, chr) const struct body *pos; char chr; @@ -199,7 +201,7 @@ waddch(tv, chr); } -void +static void leave(dummy) int dummy; { @@ -212,7 +214,7 @@ exit(0); } -void +static void wake(dummy) int dummy __unused; { @@ -221,14 +223,14 @@ process(lastch); } -int +static int rnd(range) int range; { return abs((rand()5)+(rand()5)) % range; } -void +static void newpos(bp) struct body * bp; { @@ -246,7 +248,7 @@ } while(winch(tv) != ' '); } -void +static void prize() { int value; @@ -257,7 +259,7 @@ wrefresh(tv); } -void +static void process(ch) int ch; { @@ -352,13 +354,13 @@ alarm(1); } -void +static void crash() { leave(0); } -void +static void setup() { clear();
CVS commit: src/games/worms
Module Name:src Committed By: dholland Date: Wed Aug 12 08:57:30 UTC 2009 Modified Files: src/games/worms: worms.c Log Message: sprinkle static To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/games/worms/worms.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/worms/worms.c diff -u src/games/worms/worms.c:1.19 src/games/worms/worms.c:1.20 --- src/games/worms/worms.c:1.19 Fri Aug 8 16:10:47 2008 +++ src/games/worms/worms.c Wed Aug 12 08:57:30 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: worms.c,v 1.19 2008/08/08 16:10:47 drochner Exp $ */ +/* $NetBSD: worms.c,v 1.20 2009/08/12 08:57:30 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)worms.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: worms.c,v 1.19 2008/08/08 16:10:47 drochner Exp $); +__RCSID($NetBSD: worms.c,v 1.20 2009/08/12 08:57:30 dholland Exp $); #endif #endif /* not lint */ @@ -177,11 +177,11 @@ short *xpos, *ypos; } *worm; -volatile sig_atomic_t sig_caught = 0; +static volatile sig_atomic_t sig_caught = 0; int main(int, char **); -void nomem(void) __dead; -void onsig(int); +static void nomem(void) __dead; +static void onsig(int); int main(argc, argv) @@ -339,14 +339,14 @@ } } -void +static void onsig(signo) int signo __unused; { sig_caught = 1; } -void +static void nomem() { errx(1, not enough memory.);
CVS commit: src/games/wump
Module Name:src Committed By: dholland Date: Wed Aug 12 09:00:10 UTC 2009 Modified Files: src/games/wump: wump.c Log Message: sprinkle static To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/games/wump/wump.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/wump/wump.c diff -u src/games/wump/wump.c:1.23 src/games/wump/wump.c:1.24 --- src/games/wump/wump.c:1.23 Sun Jul 20 01:03:22 2008 +++ src/games/wump/wump.c Wed Aug 12 09:00:10 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: wump.c,v 1.23 2008/07/20 01:03:22 lukem Exp $ */ +/* $NetBSD: wump.c,v 1.24 2009/08/12 09:00:10 dholland Exp $ */ /* * Copyright (c) 1989, 1993 @@ -43,7 +43,7 @@ #if 0 static char sccsid[] = @(#)wump.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: wump.c,v 1.23 2008/07/20 01:03:22 lukem Exp $); +__RCSID($NetBSD: wump.c,v 1.24 2009/08/12 09:00:10 dholland Exp $); #endif #endif /* not lint */ @@ -86,7 +86,7 @@ #define plural(n) (n == 1 ? : s) /* simple cave data structure; +1 so we can index from '1' not '0' */ -struct room_record { +static struct room_record { int tunnel[MAX_LINKS_IN_ROOM]; int has_a_pit, has_a_bat; } cave[MAX_ROOMS_IN_CAVE+1]; @@ -95,47 +95,47 @@ * global variables so we can keep track of where the player is, how * many arrows they still have, where el wumpo is, and so on... */ -int player_loc = -1; /* player location */ -int wumpus_loc = -1; /* The Bad Guy location */ -int level = EASY; /* level of play */ -int arrows_left; /* arrows unshot */ +static int player_loc = -1; /* player location */ +static int wumpus_loc = -1; /* The Bad Guy location */ +static int level = EASY; /* level of play */ +static int arrows_left; /* arrows unshot */ #ifdef DEBUG -int debug = 0; +static int debug = 0; #endif -int pit_num = PIT_COUNT; /* # pits in cave */ -int bat_num = BAT_COUNT; /* # bats */ -int room_num = ROOMS_IN_CAVE; /* # rooms in cave */ -int link_num = LINKS_IN_ROOM; /* links per room */ -int arrow_num = NUMBER_OF_ARROWS; /* arrow inventory */ - -char answer[20]; /* user input */ - -int bats_nearby(void); -void cave_init(void); -void clear_things_in_cave(void); -void display_room_stats(void); -int gcd(int, int); -int getans(const char *); -void initialize_things_in_cave(void); -void instructions(void); -int int_compare(const void *, const void *); -void jump(int); -void kill_wump(void); +static int pit_num = PIT_COUNT; /* # pits in cave */ +static int bat_num = BAT_COUNT; /* # bats */ +static int room_num = ROOMS_IN_CAVE; /* # rooms in cave */ +static int link_num = LINKS_IN_ROOM; /* links per room */ +static int arrow_num = NUMBER_OF_ARROWS;/* arrow inventory */ + +static char answer[20]; /* user input */ + int main(int, char **); -int move_to(const char *); -void move_wump(void); -void no_arrows(void); -void pit_kill(void); -int pit_nearby(void); -void pit_survive(void); -int shoot(char *); -void shoot_self(void); -int take_action(void); -void usage(void) __dead; -void wump_kill(void); -int wump_nearby(void); +static int bats_nearby(void); +static void cave_init(void); +static void clear_things_in_cave(void); +static void display_room_stats(void); +static int gcd(int, int); +static int getans(const char *); +static void initialize_things_in_cave(void); +static void instructions(void); +static int int_compare(const void *, const void *); +static void jump(int); +static void kill_wump(void); +static int move_to(const char *); +static void move_wump(void); +static void no_arrows(void); +static void pit_kill(void); +static int pit_nearby(void); +static void pit_survive(void); +static int shoot(char *); +static void shoot_self(void); +static int take_action(void); +static void usage(void) __dead; +static void wump_kill(void); +static int wump_nearby(void); int main(argc, argv) @@ -254,7 +254,7 @@ return (0); } -void +static void display_room_stats() { int i; @@ -284,7 +284,7 @@ (void)printf(and %d.\n, cave[player_loc].tunnel[link_num - 1]); } -int +static int take_action() { /* @@ -313,7 +313,7 @@ return(0); } -int +static int move_to(room_number) const char *room_number; { @@ -405,7 +405,7 @@ return(0); } -int +static int shoot(room_list) char *room_list; { @@ -518,7 +518,7 @@ return(0); } -int +static int gcd(a, b) int a, b; { @@ -530,7 +530,7 @@ return (gcd(b, r)); } -void +static void cave_init() { int i, j, k, lnk; @@ -610,7 +610,7 @@ #endif } -void +static void clear_things_in_cave() { int i; @@ -623,7 +623,7 @@ cave[i].has_a_bat = cave[i].has_a_pit = 0; } -void +static void initialize_things_in_cave() { int i, loc; @@ -667,7 +667,7 @@ (i 100 player_loc != wumpus_loc)); } -int +static int getans(prompt) const char *prompt; { @@ -693,7 +693,7 @@ /* NOTREACHED */ } -int +static int bats_nearby() { int i; @@ -705,7 +705,7 @@
CVS commit: src/games/sail
Module Name:src Committed By: dholland Date: Wed Aug 12 09:05:08 UTC 2009 Modified Files: src/games/sail: extern.h globals.c lo_main.c pl_7.c player.h Log Message: sprinkle static To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/games/sail/extern.h cvs rdiff -u -r1.14 -r1.15 src/games/sail/globals.c cvs rdiff -u -r1.16 -r1.17 src/games/sail/lo_main.c cvs rdiff -u -r1.37 -r1.38 src/games/sail/pl_7.c cvs rdiff -u -r1.12 -r1.13 src/games/sail/player.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/sail/extern.h diff -u src/games/sail/extern.h:1.34 src/games/sail/extern.h:1.35 --- src/games/sail/extern.h:1.34 Sun Mar 15 03:33:56 2009 +++ src/games/sail/extern.h Wed Aug 12 09:05:08 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.34 2009/03/15 03:33:56 dholland Exp $ */ +/* $NetBSD: extern.h,v 1.35 2009/08/12 09:05:08 dholland Exp $ */ /* * Copyright (c) 1983, 1993 @@ -209,7 +209,6 @@ int rig4; short pts; }; -extern struct shipspecs specs[]; extern struct scenario *cc; /* the current scenario */ extern struct ship *ls; /* cc-ship[cc-vessels] */ @@ -343,7 +342,6 @@ __attribute__((__format__(__printf__,1,3))); void Msg(const char *, ...) __attribute__((__format__(__printf__,1,2))); -void prompt(const char *, struct ship *); int sgetch(const char *, struct ship *, int); void sgetstr(const char *, char *, int); void centerview(void); Index: src/games/sail/globals.c diff -u src/games/sail/globals.c:1.14 src/games/sail/globals.c:1.15 --- src/games/sail/globals.c:1.14 Sat Mar 14 19:35:13 2009 +++ src/games/sail/globals.c Wed Aug 12 09:05:08 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: globals.c,v 1.14 2009/03/14 19:35:13 dholland Exp $ */ +/* $NetBSD: globals.c,v 1.15 2009/08/12 09:05:08 dholland Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)globals.c 8.2 (Berkeley) 4/28/95; #else -__RCSID($NetBSD: globals.c,v 1.14 2009/03/14 19:35:13 dholland Exp $); +__RCSID($NetBSD: globals.c,v 1.15 2009/08/12 09:05:08 dholland Exp $); #endif #endif /* not lint */ @@ -42,6 +42,8 @@ #include setjmp.h #include extern.h +static struct shipspecs specs[]; + struct scenario scene[] = { /* * int winddir; @@ -313,7 +315,7 @@ }; int nscene = sizeof scene / sizeof (struct scenario); -struct shipspecs specs[] = { +static struct shipspecs specs[] = { /* bs fs ta guns hull crew1 crew3gunR carR rig2 rig4 pts */ /* class qual crew2gunL carL rig1 rig3*/ /*00*/{ 4, 7, 3, 19, 5, 5, 4, 2, 2, 2, 2, 2, 0, 0, 4, 4, 4, 4, 7 }, Index: src/games/sail/lo_main.c diff -u src/games/sail/lo_main.c:1.16 src/games/sail/lo_main.c:1.17 --- src/games/sail/lo_main.c:1.16 Sat Mar 14 20:14:56 2009 +++ src/games/sail/lo_main.c Wed Aug 12 09:05:08 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: lo_main.c,v 1.16 2009/03/14 20:14:56 dholland Exp $ */ +/* $NetBSD: lo_main.c,v 1.17 2009/08/12 09:05:08 dholland Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)lo_main.c 8.2 (Berkeley) 4/28/95; #else -__RCSID($NetBSD: lo_main.c,v 1.16 2009/03/14 20:14:56 dholland Exp $); +__RCSID($NetBSD: lo_main.c,v 1.17 2009/08/12 09:05:08 dholland Exp $); #endif #endif /* not lint */ @@ -51,7 +51,7 @@ #include extern.h #include pathnames.h -const char *const title[] = { +static const char *const title[] = { Admiral, Commodore, Captain, Captain, Captain, Captain, Captain, Commander, Commander, Lieutenant Index: src/games/sail/pl_7.c diff -u src/games/sail/pl_7.c:1.37 src/games/sail/pl_7.c:1.38 --- src/games/sail/pl_7.c:1.37 Sun Mar 15 22:19:23 2009 +++ src/games/sail/pl_7.c Wed Aug 12 09:05:08 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pl_7.c,v 1.37 2009/03/15 22:19:23 dholland Exp $ */ +/* $NetBSD: pl_7.c,v 1.38 2009/08/12 09:05:08 dholland Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)pl_7.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: pl_7.c,v 1.37 2009/03/15 22:19:23 dholland Exp $); +__RCSID($NetBSD: pl_7.c,v 1.38 2009/08/12 09:05:08 dholland Exp $); #endif #endif /* not lint */ @@ -86,7 +86,7 @@ int done_curses; int loaded, fired, changed, repaired; int dont_adjust; -int viewrow, viewcol; +static int viewrow, viewcol; char movebuf[sizeof SHIP(0)-file-movebuf]; int player; struct ship *ms; /* memorial structure, cc-ship[player] */ @@ -291,7 +291,7 @@ scrollarea_add(buf); } -void +static void prompt(const char *p, struct ship *ship) { static char buf[BUFSIZ]; Index: src/games/sail/player.h diff -u src/games/sail/player.h:1.12 src/games/sail/player.h:1.13 --- src/games/sail/player.h:1.12 Sat Mar 14 20:10:43 2009 +++ src/games/sail/player.h Wed Aug 12 09:05:08 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: player.h,v 1.12 2009/03/14 20:10:43 dholland Exp $ */ +/* $NetBSD: player.h,v 1.13
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Wed Aug 12 10:03:30 UTC 2009 Modified Files: src/sys/arch/hppa/hppa: pmap.c Log Message: Fix non-DEBUG builds. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/arch/hppa/hppa/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.51 src/sys/arch/hppa/hppa/pmap.c:1.52 --- src/sys/arch/hppa/hppa/pmap.c:1.51 Wed Aug 12 07:46:36 2009 +++ src/sys/arch/hppa/hppa/pmap.c Wed Aug 12 10:03:30 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.51 2009/08/12 07:46:36 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.52 2009/08/12 10:03:30 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.51 2009/08/12 07:46:36 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.52 2009/08/12 10:03:30 skrll Exp $); #include sys/param.h #include sys/systm.h @@ -1730,11 +1730,10 @@ void pmap_zero_page(paddr_t pa) { - struct vm_page *pg = PHYS_TO_VM_PAGE(pa); DPRINTF(PDB_FOLLOW|PDB_PHYS, (%s(%x)\n, __func__, (int)pa)); - KASSERT(pg-mdpage.pvh_list == NULL); + KASSERT(PHYS_TO_VM_PAGE(pa)-mdpage.pvh_list == NULL); memset((void *)pa, 0, PAGE_SIZE); fdcache(HPPA_SID_KERNEL, pa, PAGE_SIZE); @@ -1749,12 +1748,11 @@ pmap_copy_page(paddr_t spa, paddr_t dpa) { struct vm_page *srcpg = PHYS_TO_VM_PAGE(spa); - struct vm_page *dstpg = PHYS_TO_VM_PAGE(dpa); DPRINTF(PDB_FOLLOW|PDB_PHYS, (%s(%x, %x)\n, __func__, (int)spa, (int)dpa)); - KASSERT(dstpg-mdpage.pvh_list == NULL); + KASSERT(PHYS_TO_VM_PAGE(dpa)-mdpage.pvh_list == NULL); pmap_flush_page(srcpg, false);
CVS commit: src/sys/net
Module Name:src Committed By: msaitoh Date: Wed Aug 12 11:17:17 UTC 2009 Modified Files: src/sys/net: if_media.h Log Message: Add 1000BASE-BX10. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/net/if_media.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if_media.h diff -u src/sys/net/if_media.h:1.51 src/sys/net/if_media.h:1.52 --- src/sys/net/if_media.h:1.51 Tue Sep 9 20:12:18 2008 +++ src/sys/net/if_media.h Wed Aug 12 11:17:17 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_media.h,v 1.51 2008/09/09 20:12:18 mhitch Exp $ */ +/* $NetBSD: if_media.h,v 1.52 2009/08/12 11:17:17 msaitoh Exp $ */ /*- * Copyright (c) 1998, 2000, 2001 The NetBSD Foundation, Inc. @@ -179,6 +179,7 @@ #define IFM_10G_SR 19 /* 10GBase-SR 850nm Multi-mode */ #define IFM_10G_CX4 20 /* 10GBase CX4 copper */ #define IFM_2500_SX 21 /* 2500baseSX - multi-mode fiber */ +#define IFM_1000_BX10 22 /* 1000base-BX10 */ #define IFM_ETH_MASTER 0x0100 /* master mode (1000baseT) */ #define IFM_ETH_RXPAUSE 0x0200 /* receive PAUSE frames */ @@ -410,6 +411,7 @@ { IFM_ETHER | IFM_1000_CX, 1000baseCX }, \ { IFM_ETHER | IFM_1000_CX, 1000CX }, \ { IFM_ETHER | IFM_1000_CX, 1000BASE-CX }, \ + { IFM_ETHER | IFM_1000_BX10, 1000BASE-BX10 }, \ { IFM_ETHER | IFM_1000_T, 1000baseT }, \ { IFM_ETHER | IFM_1000_T, 1000T }, \ { IFM_ETHER | IFM_1000_T, 1000BASE-T }, \
CVS commit: src/doc
Module Name:src Committed By: sborrill Date: Wed Aug 12 12:15:49 UTC 2009 Modified Files: src/doc: 3RDPARTY Log Message: Update to reflect new open-source ath hal To generate a diff of this commit: cvs rdiff -u -r1.712 -r1.713 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.712 src/doc/3RDPARTY:1.713 --- src/doc/3RDPARTY:1.712 Tue Aug 11 19:07:33 2009 +++ src/doc/3RDPARTY Wed Aug 12 12:15:49 2009 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.712 2009/08/11 19:07:33 snj Exp $ +# $NetBSD: 3RDPARTY,v 1.713 2009/08/12 12:15:49 sborrill Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -67,16 +67,16 @@ maintainer for integration in official releases. Package: ath-hal -Version: 0.9.17.2 -Current Vers: 0.9.17.2 +Version: FreeBSD SVN revision number 185521 +Current Vers: FreeBSD SVN revision number 185521 Maintainer: Sam Leffler s...@errno.com Archive Site: none Home Page: none Mailing List: none -Responsible: sam, dyoung, gdamore -License: Redistribution without changes (binary only) +Responsible: sam, alc +License: BSD-like (2 clause), ISC Notes: -The HAL is binary only, and located in src/sys/contrib/dev/ath +The HAL is located in src/sys/external/isc/atheros_hal Package: bc Version: 1.06
CVS commit: src/sys/arch
Module Name:src Committed By: simonb Date: Wed Aug 12 12:56:30 UTC 2009 Modified Files: src/sys/arch/mips/conf: files.sibyte src/sys/arch/mips/sibyte/dev: sbmac.c sbobio.c sbobiovar.h sbscd.c sbscdvar.h sbscn.c sbtimer.c sbwdog.c src/sys/arch/mips/sibyte/include: sb1250_regs.h src/sys/arch/sbmips/conf: GENERIC Log Message: Remove many magic numbers for addresses and interrupt numbers, and use constants defined in SiByte/Broadcom standard header files. Switch from using offsets for locators to actual addresses. Tested on a swarm (my rhone is dead, but should be OK there too). To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mips/conf/files.sibyte cvs rdiff -u -r1.32 -r1.33 src/sys/arch/mips/sibyte/dev/sbmac.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/mips/sibyte/dev/sbobio.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/sibyte/dev/sbobiovar.h \ src/sys/arch/mips/sibyte/dev/sbscdvar.h cvs rdiff -u -r1.14 -r1.15 src/sys/arch/mips/sibyte/dev/sbscd.c cvs rdiff -u -r1.28 -r1.29 src/sys/arch/mips/sibyte/dev/sbscn.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/mips/sibyte/dev/sbtimer.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/sibyte/dev/sbwdog.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/sibyte/include/sb1250_regs.h cvs rdiff -u -r1.74 -r1.75 src/sys/arch/sbmips/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/conf/files.sibyte diff -u src/sys/arch/mips/conf/files.sibyte:1.5 src/sys/arch/mips/conf/files.sibyte:1.6 --- src/sys/arch/mips/conf/files.sibyte:1.5 Sat Oct 25 15:05:00 2003 +++ src/sys/arch/mips/conf/files.sibyte Wed Aug 12 12:56:29 2009 @@ -3,12 +3,12 @@ ### # System Control/Debug -device sbscd {[offset = -1], [intr[2] = {-1,-1}]} +device sbscd {[addr = -1], [intr[2] = {-1,-1}]} attach sbscd at zbbus file arch/mips/sibyte/dev/sbscd.c sbscd # On-board I/O (slow I/O bridge) -device sbobio {[offset = -1], [intr[2] = {-1,-1}]} +device sbobio {[addr = -1], [intr[2] = {-1,-1}]} attach sbobio at zbbus file arch/mips/sibyte/dev/sbobio.c sbobio Index: src/sys/arch/mips/sibyte/dev/sbmac.c diff -u src/sys/arch/mips/sibyte/dev/sbmac.c:1.32 src/sys/arch/mips/sibyte/dev/sbmac.c:1.33 --- src/sys/arch/mips/sibyte/dev/sbmac.c:1.32 Wed Mar 18 17:06:45 2009 +++ src/sys/arch/mips/sibyte/dev/sbmac.c Wed Aug 12 12:56:29 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: sbmac.c,v 1.32 2009/03/18 17:06:45 cegger Exp $ */ +/* $NetBSD: sbmac.c,v 1.33 2009/08/12 12:56:29 simonb Exp $ */ /* * Copyright 2000, 2001, 2004 @@ -33,7 +33,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sbmac.c,v 1.32 2009/03/18 17:06:45 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: sbmac.c,v 1.33 2009/08/12 12:56:29 simonb Exp $); #include bpfilter.h #include opt_inet.h @@ -2284,7 +2284,7 @@ /* Determine controller base address */ - sc-sbm_base = (sbmac_port_t) sap-sa_base + sap-sa_locs.sa_offset; + sc-sbm_base = sap-sa_locs.sa_addr; eaddr = sc-sbm_hwaddr; Index: src/sys/arch/mips/sibyte/dev/sbobio.c diff -u src/sys/arch/mips/sibyte/dev/sbobio.c:1.16 src/sys/arch/mips/sibyte/dev/sbobio.c:1.17 --- src/sys/arch/mips/sibyte/dev/sbobio.c:1.16 Fri Nov 11 06:27:09 2005 +++ src/sys/arch/mips/sibyte/dev/sbobio.c Wed Aug 12 12:56:29 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: sbobio.c,v 1.16 2005/11/11 06:27:09 simonb Exp $ */ +/* $NetBSD: sbobio.c,v 1.17 2009/08/12 12:56:29 simonb Exp $ */ /* * Copyright 2000, 2001 @@ -33,13 +33,14 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sbobio.c,v 1.16 2005/11/11 06:27:09 simonb Exp $); +__KERNEL_RCSID(0, $NetBSD: sbobio.c,v 1.17 2009/08/12 12:56:29 simonb Exp $); #include sys/param.h #include sys/device.h #include sys/systm.h #include machine/locore.h +#include mips/sibyte/include/sb1250_int.h #include mips/sibyte/include/sb1250_regs.h #include mips/sibyte/include/sb1250_scd.h #include mips/sibyte/include/zbbusvar.h @@ -56,49 +57,115 @@ static int sbobio_print(void *, const char *); static const char *sbobio_device_type_name(enum sbobio_device_type type); +/* + * XXXsimonb: + * DUART register addresses seem to offset by 0x100 for some + * reason I can't fathom so we just can't use A_DUART for the + * address of the DUART. Eg, + * A_DUART_CHANREG(0, 0) = 0x001006 + * and R_DUART_MODE_REG_1 = 0x100 (first reg in the duart) + * but the 1125/1250 manual says the DUART starts at + * 0x0010060100. + * We define our own R_DUART_REGBASE to R_DUART_MODE_REG_1 + * so that we can use a symbolic name to refer to the start + * of the duart register space. + */ + static const struct sbobio_attach_locs sb1250_rev1_sbobio_devs[] = { - { 0x, {6,-1}, SBOBIO_DEVTYPE_SMBUS }, - { 0x0008, {7,-1}, SBOBIO_DEVTYPE_SMBUS }, - { 0x0100, {8,9}, SBOBIO_DEVTYPE_DUART }, - { 0x0400, {10,-1}, SBOBIO_DEVTYPE_SYNCSERIAL }, - { 0x0800, {11,-1}, SBOBIO_DEVTYPE_SYNCSERIAL }, + {
CVS commit: src/sys/dev/mii
Module Name:src Committed By: simonb Date: Wed Aug 12 13:33:02 UTC 2009 Modified Files: src/sys/dev/mii: miidevs Log Message: Add Broadcom BCM5464 PHY. To generate a diff of this commit: cvs rdiff -u -r1.88 -r1.89 src/sys/dev/mii/miidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/mii/miidevs diff -u src/sys/dev/mii/miidevs:1.88 src/sys/dev/mii/miidevs:1.89 --- src/sys/dev/mii/miidevs:1.88 Thu Jun 18 11:32:29 2009 +++ src/sys/dev/mii/miidevs Wed Aug 12 13:33:02 2009 @@ -1,4 +1,4 @@ -$NetBSD: miidevs,v 1.88 2009/06/18 11:32:29 rjs Exp $ +$NetBSD: miidevs,v 1.89 2009/08/12 13:33:02 simonb Exp $ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -148,6 +148,7 @@ model BROADCOM BCM5400 0x0004 BCM5400 1000BASE-T media interface model BROADCOM BCM5401 0x0005 BCM5401 1000BASE-T media interface model BROADCOM BCM5411 0x0007 BCM5411 1000BASE-T media interface +model BROADCOM BCM5464 0x000b BCM5464 1000BASE-T media interface model BROADCOM BCM5462 0x000d BCM5462 1000BASE-T media interface model BROADCOM BCM5421 0x000e BCM5421 1000BASE-T media interface model BROADCOM BCM5752 0x0010 BCM5752 1000BASE-T media interface
CVS commit: src/sys/dev
Module Name:src Committed By: macallan Date: Wed Aug 12 19:28:00 UTC 2009 Modified Files: src/sys/dev/pci: files.pci Added Files: src/sys/dev/ic: sm502reg.h src/sys/dev/pci: voyagerfb.c Log Message: add voyagerfb, a driver for the Gdium Liberty 1000's onboard graphics chip To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/dev/ic/sm502reg.h cvs rdiff -u -r1.317 -r1.318 src/sys/dev/pci/files.pci cvs rdiff -u -r0 -r1.1 src/sys/dev/pci/voyagerfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/files.pci diff -u src/sys/dev/pci/files.pci:1.317 src/sys/dev/pci/files.pci:1.318 --- src/sys/dev/pci/files.pci:1.317 Mon Jul 27 15:09:58 2009 +++ src/sys/dev/pci/files.pci Wed Aug 12 19:28:00 2009 @@ -1,4 +1,4 @@ -# $NetBSD: files.pci,v 1.317 2009/07/27 15:09:58 kiyohara Exp $ +# $NetBSD: files.pci,v 1.318 2009/08/12 19:28:00 macallan Exp $ # # Config file and device description for machine-independent PCI code. # Included by ports that need it. Requires that the SCSI files be @@ -977,3 +977,9 @@ # Marvell Serial-ATA Host Controller attach mvsata at pci with mvsata_pci file dev/pci/mvsata_pci.c mvsata_pci + +# Silicon Motion SM502 / Voyager GX +device voyagerfb: wsemuldisplaydev, rasops8, rasops16, rasops32, vcons, videomode, iic, i2c_bitbang +attach voyagerfb at pci +file dev/pci/voyagerfb.c voyagerfb +defflag opt_voyagerfb.h VOYAGERFB_DEBUG Added files: Index: src/sys/dev/ic/sm502reg.h diff -u /dev/null src/sys/dev/ic/sm502reg.h:1.1 --- /dev/null Wed Aug 12 19:28:00 2009 +++ src/sys/dev/ic/sm502reg.h Wed Aug 12 19:28:00 2009 @@ -0,0 +1,266 @@ +/* $NetBSD: sm502reg.h,v 1.1 2009/08/12 19:28:00 macallan Exp $ */ + +/* + * Copyright (c) 2009 Michael Lorenz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* Silicon Motion SM502 / Voyager GX register definitions */ + +#ifndef SM502REG_H +#define SM502REG_H + +/* System Control Registers */ +#define SM502_SYSTEM_CTRL 0x +#define SM502_SYSCTL_PANEL_3STATE 0x0001 +#define SM502_SYSCTL_MEM_3STATE 0x0002 +#define SM502_SYSCTL_CRT_3STATE 0x0004 +#define SM502_SYSCTL_BURST_32 0x +#define SM502_SYSCTL_BURST_64 0x0010 +#define SM502_SYSCTL_BURST_128 0x0020 +#define SM502_SYSCTL_BURST_256 0x0030 +#define SM502_SYSCTL_PCI_CLOCK_RUN_E 0x0040 +#define SM502_SYSCTL_PCI_RETRY_E 0x0080 +#define SM502_SYSCTL_PCI_LOCK 0x0800 +/* stop drawing engine */ +#define SM502_SYSCTL_ENGINE_ABORT 0x3000 +#define SM502_SYSCTL_BURST_READ_E 0x8000 +#define SM502_SYSCTL_ZV_VSYNC_DET 0x0001 +#define SM502_SYSCTL_CRT_FLIP_PENDING 0x0002 +#define SM502_SYSCTL_ENGINE_BUSY 0x0008 +#define SM502_SYSCTL_FIFO_EMPTY 0x0010 +#define SM502_SYSCTL_VIDEO_FLIP_PENDING 0x0040 +#define SM502_SYSCTL_PANEL_FLIP_PENDING 0x0080 +#define SM502_SYSCTL_PCI_LT_E 0x0100 +#define SM502_SYSCTL_PCI_BM_E 0x0200 +#define SM502_SYSCTL_CSC_BUSY 0x1000 +#define SM502_SYSCTL_PCI_BURST_E 0x2000 +#define SM502_SYSCTL_DISABLE_HSYNC 0x4000 +#define SM502_SYSCTL_DISABLE_VSYNC 0x8000 + + +/* Video Controller Registers */ +#define SM502_PANEL_DISP_CRTL 0x08 +#define SM502_PDC_8BIT 0x +#define SM502_PDC_16BIT 0x0001 +#define SM502_PDC_32BIT 0x0002 +#define SM502_PDC_DEPTH_MASK 0x0003 +#define SM502_PDC_PANEL_ENABLE 0x0004 +#define SM502_PDC_GAMMA_ENABLE 0x0008 +#define SM502_PDC_HPAN_AUTO 0x0010 +#define SM502_PDC_HPAN_DIR_LEFT 0x +#define SM502_PDC_HPAN_DIR_RIGHT 0x0020 +#define SM502_PDC_VPAN_AUTO 0x0040 +#define
CVS commit: src/sys/arch/evbmips/conf
Module Name:src Committed By: macallan Date: Wed Aug 12 19:39:51 UTC 2009 Modified Files: src/sys/arch/evbmips/conf: GDIUM Log Message: use voyagerfb To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbmips/conf/GDIUM Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbmips/conf/GDIUM diff -u src/sys/arch/evbmips/conf/GDIUM:1.5 src/sys/arch/evbmips/conf/GDIUM:1.6 --- src/sys/arch/evbmips/conf/GDIUM:1.5 Tue Aug 11 02:36:43 2009 +++ src/sys/arch/evbmips/conf/GDIUM Wed Aug 12 19:39:51 2009 @@ -1,4 +1,4 @@ -# $NetBSD: GDIUM,v 1.5 2009/08/11 02:36:43 matt Exp $ +# $NetBSD: GDIUM,v 1.6 2009/08/12 19:39:51 macallan Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GDIUM-$Revision: 1.5 $ +#ident GDIUM-$Revision: 1.6 $ maxusers 16 @@ -151,9 +151,9 @@ cpu0 at mainbus0 bonito0 at mainbus0 pci0 at bonito0 -#voyagerfb0 at pci0 dev ? function ? -genfb0 at pci0 dev ? function ? -wsdisplay0 at genfb0 +voyagerfb0 at pci0 dev ? function ? +#genfb0 at pci0 dev ? function ? +wsdisplay0 at wsemuldisplaydev? ehci* at pci0 dev ? function ? #options EHCI_DEBUG ohci* at pci0 dev ? function ?
CVS commit: src/doc
Module Name:src Committed By: macallan Date: Wed Aug 12 19:43:00 UTC 2009 Modified Files: src/doc: CHANGES Log Message: mention voyagerfb To generate a diff of this commit: cvs rdiff -u -r1.1272 -r1.1273 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1272 src/doc/CHANGES:1.1273 --- src/doc/CHANGES:1.1272 Sun Aug 9 10:00:34 2009 +++ src/doc/CHANGES Wed Aug 12 19:43:00 2009 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1272 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1273 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -361,3 +361,5 @@ patches. [haad 20090808] gpioiic(4): New driver to create an I2C bus using GPIO pins in bit-banging mode. [mbalmer 20090809] + voyagerfb(8): a driver for the Gdium Liberty 1000's video controller + [macallan 20090812]
CVS commit: [matt-nb5-mips64] src/gnu/dist/gcc4/gcc/config/mips
Module Name:src Committed By: matt Date: Wed Aug 12 19:47:59 UTC 2009 Modified Files: src/gnu/dist/gcc4/gcc/config/mips [matt-nb5-mips64]: netbsd.h Log Message: Merge change for 1.2 from current: Merge most of the builtin_defines from Linux since they are far superior to the ones NetBSD has and it allows easier porting. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.1.1.1.32.1 \ src/gnu/dist/gcc4/gcc/config/mips/netbsd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/dist/gcc4/gcc/config/mips/netbsd.h diff -u src/gnu/dist/gcc4/gcc/config/mips/netbsd.h:1.1.1.1 src/gnu/dist/gcc4/gcc/config/mips/netbsd.h:1.1.1.1.32.1 --- src/gnu/dist/gcc4/gcc/config/mips/netbsd.h:1.1.1.1 Thu Apr 20 09:53:35 2006 +++ src/gnu/dist/gcc4/gcc/config/mips/netbsd.h Wed Aug 12 19:47:59 2009 @@ -29,28 +29,74 @@ #define MACHINE_TYPE NetBSD/mipsel ELF #endif -#define TARGET_OS_CPP_BUILTINS() \ - do \ -{ \ - NETBSD_OS_CPP_BUILTINS_ELF(); \ - builtin_define (__NO_LEADING_UNDERSCORES__); \ - builtin_define (__GP_SUPPORT__); \ - if (TARGET_LONG64)\ - builtin_define (__LONG64); \ - \ - if (TARGET_ABICALLS)\ - builtin_define (__ABICALLS__); \ - \ - if (mips_abi == ABI_EABI)\ - builtin_define (__mips_eabi); \ - else if (mips_abi == ABI_N32) \ - builtin_define (__mips_n32); \ - else if (mips_abi == ABI_64) \ - builtin_define (__mips_n64); \ - else if (mips_abi == ABI_O64) \ - builtin_define (__mips_o64); \ -} \ - while (0) +#define TARGET_OS_CPP_BUILTINS()\ + do\ +{\ + NETBSD_OS_CPP_BUILTINS_ELF();\ + builtin_define (__NO_LEADING_UNDERSCORES__); \ + builtin_define (__GP_SUPPORT__); \ + if (TARGET_LONG64) \ + builtin_define (__LONG64);\ +\ + if (TARGET_ABICALLS) \ + builtin_define (__ABICALLS__); \ +\ +/* The GNU C++ standard library requires this. */ \ +if (c_dialect_cxx ()) \ + builtin_define (_GNU_SOURCE);\ +\ +if (mips_abi == ABI_N32) \ + {\ + builtin_define (__mips_n32);\ +builtin_define (_ABIN32=2);\ +builtin_define (_MIPS_SIM=_ABIN32); \ +builtin_define (_MIPS_SZLONG=32); \ +builtin_define (_MIPS_SZPTR=32); \ + }\ +else if (mips_abi == ABI_64)\ + {\ + builtin_define (__mips_n64);\ +builtin_define (_ABI64=3);\ +builtin_define (_MIPS_SIM=_ABI64); \ +builtin_define (_MIPS_SZLONG=64); \ +builtin_define (_MIPS_SZPTR=64); \ + }\ +else if (mips_abi == ABI_O64)\ + {\ + builtin_define (__mips_o64);\ +builtin_define (_ABIO64=4);\ +builtin_define (_MIPS_SIM=_ABIO64); \ +builtin_define (_MIPS_SZLONG=64); \ +builtin_define (_MIPS_SZPTR=64); \ + }\ +else if (mips_abi == ABI_EABI)\ + {\ + builtin_define (__mips_eabi);\ +builtin_define (_ABIEMB=5);\ +builtin_define (_MIPS_SIM=_ABIEMB); \ + if (TARGET_LONG64) \ + builtin_define (_MIPS_SZLONG=64); \ + else \ + builtin_define (_MIPS_SZLONG=32); \ + if (TARGET_64BIT) \ + builtin_define (_MIPS_SZPTR=64); \ + else \ + builtin_define (_MIPS_SZPTR=32); \ + }\ +else \ + {\ + builtin_define (_ABIO32=1);\ + builtin_define (_MIPS_SIM=_ABIO32); \ +builtin_define (_MIPS_SZLONG=32); \ +builtin_define (_MIPS_SZPTR=32); \ + }\ +if (TARGET_FLOAT64) \ + builtin_define (_MIPS_FPSET=32); \ +else \ + builtin_define (_MIPS_FPSET=16); \ +\ +builtin_define (_MIPS_SZINT=32);\ + } while (0) /* The generic MIPS TARGET_CPU_CPP_BUILTINS are incorrect for NetBSD. Specifically, they define too many namespace-invasive macros. Override
CVS commit: src/sys/arch/hp700/include
Module Name:src Committed By: skrll Date: Wed Aug 12 20:10:41 UTC 2009 Modified Files: src/sys/arch/hp700/include: iomod.h Log Message: Define HPPA_FLEX_SIZE To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hp700/include/iomod.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/include/iomod.h diff -u src/sys/arch/hp700/include/iomod.h:1.6 src/sys/arch/hp700/include/iomod.h:1.7 --- src/sys/arch/hp700/include/iomod.h:1.6 Wed May 27 09:30:14 2009 +++ src/sys/arch/hp700/include/iomod.h Wed Aug 12 20:10:41 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: iomod.h,v 1.6 2009/05/27 09:30:14 skrll Exp $ */ +/* $NetBSD: iomod.h,v 1.7 2009/08/12 20:10:41 skrll Exp $ */ /* $OpenBSD: iomod.h,v 1.18 2007/10/20 16:41:45 miod Exp $ */ @@ -124,6 +124,7 @@ #define MAXMODBUS ((int)(FPA_IOMOD)) /* maximum modules/bus */ #define HPPA_FLEX_MASK 0xFFFC /* (see below) */ +#define HPPA_FLEX_SIZE (~HPPA_FLEX_MASK + 1) #define HPPA_FLEX(a) (((a) HPPA_FLEX_MASK) 18) /* size of HPA space for any device */
CVS commit: src/lib/libc/net
Module Name:src Committed By: seanb Date: Wed Aug 12 20:24:31 UTC 2009 Modified Files: src/lib/libc/net: getnameinfo.c Log Message: Watch getservbyport_r() semantics. sv needs scope while results are being looked at which in turn are no longer valid after a endservent_r(). To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/lib/libc/net/getnameinfo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/net/getnameinfo.c diff -u src/lib/libc/net/getnameinfo.c:1.46 src/lib/libc/net/getnameinfo.c:1.47 --- src/lib/libc/net/getnameinfo.c:1.46 Wed Feb 11 05:25:17 2009 +++ src/lib/libc/net/getnameinfo.c Wed Aug 12 20:24:30 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: getnameinfo.c,v 1.46 2009/02/11 05:25:17 lukem Exp $ */ +/* $NetBSD: getnameinfo.c,v 1.47 2009/08/12 20:24:30 seanb Exp $ */ /* $KAME: getnameinfo.c,v 1.45 2000/09/25 22:43:56 itojun Exp $ */ /* @@ -47,7 +47,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: getnameinfo.c,v 1.46 2009/02/11 05:25:17 lukem Exp $); +__RCSID($NetBSD: getnameinfo.c,v 1.47 2009/08/12 20:24:30 seanb Exp $); #endif /* LIBC_SCCS and not lint */ #include namespace.h @@ -193,21 +193,23 @@ * servlen == 0 means that the caller does not want the result. */ } else { + struct servent_data svd; + struct servent sv; + if (flags NI_NUMERICSERV) sp = NULL; else { - struct servent_data svd; - struct servent sv; - (void)memset(svd, 0, sizeof(svd)); sp = getservbyport_r(port, (flags NI_DGRAM) ? udp : tcp, sv, svd); - endservent_r(svd); } if (sp) { - if (strlen(sp-s_name) + 1 servlen) + if (strlen(sp-s_name) + 1 servlen) { +endservent_r(svd); return EAI_MEMORY; + } strlcpy(serv, sp-s_name, servlen); + endservent_r(svd); } else { snprintf(numserv, sizeof(numserv), %u, ntohs(port)); if (strlen(numserv) + 1 servlen)
CVS commit: src/sys/lib/libkern
Module Name:src Committed By: dsl Date: Wed Aug 12 21:18:43 UTC 2009 Modified Files: src/sys/lib/libkern: Makefile.libkern Log Message: Use stuff from libc/Makefile to auto-remove .c files if a .S has been added. Use it to dispose of tne .c files that were already only conditionally added. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/lib/libkern/Makefile.libkern Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/lib/libkern/Makefile.libkern diff -u src/sys/lib/libkern/Makefile.libkern:1.3 src/sys/lib/libkern/Makefile.libkern:1.4 --- src/sys/lib/libkern/Makefile.libkern:1.3 Tue Jul 21 14:55:33 2009 +++ src/sys/lib/libkern/Makefile.libkern Wed Aug 12 21:18:42 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.libkern,v 1.3 2009/07/21 14:55:33 joerg Exp $ +# $NetBSD: Makefile.libkern,v 1.4 2009/08/12 21:18:42 dsl Exp $ # # Variable definitions for libkern. @@ -54,7 +54,11 @@ SRCS+= md4c.c md5c.c rmd160.c sha1.c sha2.c SRCS+= pmatch.c arc4random.c bcd.c mcount.c mertwist.c crc32.c -SRCS+= strsep.c strstr.c strlcpy.c strlcat.c +SRCS+= strsep.c strstr.c +SRCS+= strlcpy.c strlcat.c +SRCS+= memcpy.c memmove.c +SRCS+= strchr.c strrchr.c +SRCS+= popcount32.c popcount64.c SRCS+= strtoll.c strtoull.c strtoumax.c @@ -65,34 +69,17 @@ # Files to clean up CLEANFILES+= lib${LIB}.o lib${LIB}.po -# XXX these stub builds should be cleaned up even further. - -# if no machine specific memcpy(3), build one out of bcopy(3) based stub. -.if empty(SRCS:Mmemcpy.S) -SRCS+= memcpy.c -.endif - -# if no machine specific memmove(3), build one out of bcopy(3) based stub. -.if empty(SRCS:Mmemmove.S) -SRCS+= memmove.c -.endif - -# if no machine specific strchr(3), build one out of index(3) based stub. -.if empty(SRCS:Mstrchr.S) -SRCS+= strchr.c -.endif - -# if no machine specific strrchr(3), build one out of rindex(3) based stub. -.if empty(SRCS:Mstrrchr.S) -SRCS+= strrchr.c -.endif - -# if no machine specific popcount32(3), build generic version -.if empty(SRCS:Mpopcount32.S) -SRCS+= popcount32.c +# Remove from SRCS the .c files for any .S files added by the MD makefiles, +# also remove from SRCS the .c files for the .S and .c files in NO_SRCS. +# +# Usage: +# Add .S files to NO_SRSC when another .S file provides the entry points. +# Add .c files to NO_SRSC when another .c file provides the entry points. + +.for check_file in ${SRCS:M*.S} ${NO_SRCS} +unwanted_file := ${SRCS:M${check_file:.S=.c}} +.if ${unwanted_file} != +SRCS := ${SRCS:N${unwanted_file}} .endif +.endfor -# if no machine specific popcount64(3), build generic version -.if empty(SRCS:Mpopcount64.S) -SRCS+= popcount64.c -.endif
CVS commit: src/sys/lib/libkern/arch
Module Name:src Committed By: dsl Date: Wed Aug 12 21:20:41 UTC 2009 Modified Files: src/sys/lib/libkern/arch/alpha: Makefile.inc src/sys/lib/libkern/arch/arm: Makefile.inc src/sys/lib/libkern/arch/hppa: Makefile.inc src/sys/lib/libkern/arch/i386: Makefile.inc src/sys/lib/libkern/arch/ia64: Makefile.inc src/sys/lib/libkern/arch/m68k: Makefile.inc src/sys/lib/libkern/arch/mips: Makefile.inc src/sys/lib/libkern/arch/powerpc: Makefile.inc src/sys/lib/libkern/arch/sh3: Makefile.inc src/sys/lib/libkern/arch/sparc: Makefile.inc src/sys/lib/libkern/arch/sparc64: Makefile.inc src/sys/lib/libkern/arch/usermode: Makefile.inc src/sys/lib/libkern/arch/vax: Makefile.inc src/sys/lib/libkern/arch/x86_64: Makefile.inc Log Message: Split the lines that add .c to SRCS from those that add .S No changes (apart from the order) intended. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/lib/libkern/arch/alpha/Makefile.inc cvs rdiff -u -r1.7 -r1.8 src/sys/lib/libkern/arch/arm/Makefile.inc cvs rdiff -u -r1.8 -r1.9 src/sys/lib/libkern/arch/hppa/Makefile.inc cvs rdiff -u -r1.28 -r1.29 src/sys/lib/libkern/arch/i386/Makefile.inc cvs rdiff -u -r1.2 -r1.3 src/sys/lib/libkern/arch/ia64/Makefile.inc cvs rdiff -u -r1.27 -r1.28 src/sys/lib/libkern/arch/m68k/Makefile.inc cvs rdiff -u -r1.18 -r1.19 src/sys/lib/libkern/arch/mips/Makefile.inc cvs rdiff -u -r1.26 -r1.27 src/sys/lib/libkern/arch/powerpc/Makefile.inc cvs rdiff -u -r1.16 -r1.17 src/sys/lib/libkern/arch/sh3/Makefile.inc cvs rdiff -u -r1.32 -r1.33 src/sys/lib/libkern/arch/sparc/Makefile.inc cvs rdiff -u -r1.8 -r1.9 src/sys/lib/libkern/arch/sparc64/Makefile.inc cvs rdiff -u -r1.1 -r1.2 src/sys/lib/libkern/arch/usermode/Makefile.inc cvs rdiff -u -r1.21 -r1.22 src/sys/lib/libkern/arch/vax/Makefile.inc cvs rdiff -u -r1.3 -r1.4 src/sys/lib/libkern/arch/x86_64/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/lib/libkern/arch/alpha/Makefile.inc diff -u src/sys/lib/libkern/arch/alpha/Makefile.inc:1.26 src/sys/lib/libkern/arch/alpha/Makefile.inc:1.27 --- src/sys/lib/libkern/arch/alpha/Makefile.inc:1.26 Wed Mar 18 12:25:06 2009 +++ src/sys/lib/libkern/arch/alpha/Makefile.inc Wed Aug 12 21:20:40 2009 @@ -1,15 +1,19 @@ -# $NetBSD: Makefile.inc,v 1.26 2009/03/18 12:25:06 tsutsui Exp $ +# $NetBSD: Makefile.inc,v 1.27 2009/08/12 21:20:40 dsl Exp $ -SRCS+= __main.c __assert.c _mcount.S \ - imax.c imin.c lmax.c lmin.c max.c min.c ulmax.c ulmin.c \ - byte_swap_2.S byte_swap_4.S bswap64.c \ - ffs.S \ - memchr.c memcmp.c memcpy.S memmove.S memset.c \ - softfloat.c \ - strcat.c strcmp.c strcpy.c strlen.c strcasecmp.c \ - strncasecmp.c strncmp.c strncpy.c strtoul.c \ - scanc.c skpc.c \ - random.c +SRCS+= _mcount.S +SRCS+= byte_swap_2.S byte_swap_4.S +SRCS+= ffs.S +SRCS+= memcpy.S memmove.S + +SRCS+= __main.c __assert.c +SRCS+= imax.c imin.c lmax.c lmin.c max.c min.c ulmax.c ulmin.c +SRCS+= bswap64.c +SRCS+= memchr.c memcmp.c memset.c +SRCS+= softfloat.c +SRCS+= strcat.c strcmp.c strcpy.c strlen.c strcasecmp.c +SRCS+= strncasecmp.c strncmp.c strncpy.c strtoul.c +SRCS+= scanc.c skpc.c +SRCS+= random.c # `source' files built from m4 source SRCS+= __divqu.S __divq.S __divlu.S __divl.S Index: src/sys/lib/libkern/arch/arm/Makefile.inc diff -u src/sys/lib/libkern/arch/arm/Makefile.inc:1.7 src/sys/lib/libkern/arch/arm/Makefile.inc:1.8 --- src/sys/lib/libkern/arch/arm/Makefile.inc:1.7 Tue Oct 14 03:16:20 2008 +++ src/sys/lib/libkern/arch/arm/Makefile.inc Wed Aug 12 21:20:40 2009 @@ -1,10 +1,14 @@ -# $NetBSD: Makefile.inc,v 1.7 2008/10/14 03:16:20 matt Exp $ - -SRCS+= __assert.c __main.c bswap64.c byte_swap_2.S byte_swap_4.S \ - ffs.S imax.c imin.c lmax.c lmin.c max.c min.c random.c scanc.c \ - skpc.c strcat.c strcasecmp.c \ - strcpy.c strlen.c strncasecmp.c \ - strncpy.c strtoul.c ulmax.c ulmin.c +# $NetBSD: Makefile.inc,v 1.8 2009/08/12 21:20:40 dsl Exp $ +SRCS+= byte_swap_2.S byte_swap_4.S +SRCS+= ffs.S SRCS+= divsi3.S clzsi2.S -SRCS+= memchr.c memcmp.S memcpy.S memset.S memmove.S strcmp.S strncmp.S +SRCS+= memcmp.S memcpy.S memset.S memmove.S strcmp.S strncmp.S + +SRCS+= __assert.c __main.c bswap64.c +SRCS+= imax.c imin.c lmax.c lmin.c max.c min.c random.c scanc.c +SRCS+= skpc.c strcat.c strcasecmp.c +SRCS+= strcpy.c strlen.c strncasecmp.c +SRCS+= strncpy.c strtoul.c ulmax.c ulmin.c + +SRCS+= memchr.c Index: src/sys/lib/libkern/arch/hppa/Makefile.inc diff -u src/sys/lib/libkern/arch/hppa/Makefile.inc:1.8 src/sys/lib/libkern/arch/hppa/Makefile.inc:1.9 --- src/sys/lib/libkern/arch/hppa/Makefile.inc:1.8 Wed Mar 18 12:25:06 2009 +++ src/sys/lib/libkern/arch/hppa/Makefile.inc Wed Aug 12 21:20:40 2009 @@ -1,14 +1,11 @@ -# $NetBSD: Makefile.inc,v 1.8 2009/03/18 12:25:06 tsutsui Exp $ - -# $OpenBSD: Makefile.inc,v 1.14 2000/12/29 19:04:41 mickey Exp
CVS commit: src/sys/lib/libkern/arch/m68k
Module Name:src Committed By: dsl Date: Wed Aug 12 21:24:57 UTC 2009 Modified Files: src/sys/lib/libkern/arch/m68k: Makefile.inc Log Message: Remove some .c files accidentally left on the .S lines To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/lib/libkern/arch/m68k/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/lib/libkern/arch/m68k/Makefile.inc diff -u src/sys/lib/libkern/arch/m68k/Makefile.inc:1.28 src/sys/lib/libkern/arch/m68k/Makefile.inc:1.29 --- src/sys/lib/libkern/arch/m68k/Makefile.inc:1.28 Wed Aug 12 21:20:40 2009 +++ src/sys/lib/libkern/arch/m68k/Makefile.inc Wed Aug 12 21:24:57 2009 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile.inc,v 1.28 2009/08/12 21:20:40 dsl Exp $ +# $NetBSD: Makefile.inc,v 1.29 2009/08/12 21:24:57 dsl Exp $ SRCS+= bswap16.S bswap32.S bswap64.S -SRCS+= memchr.c memcmp.S memcpy.S memmove.S memset.S -SRCS+= strcat.S strchr.S strcmp.S strcasecmp.c -SRCS+= strcpy.S strlen.S strncmp.S strncasecmp.c strncpy.S strrchr.S +SRCS+= memcmp.S memcpy.S memmove.S memset.S +SRCS+= strcat.S strchr.S strcmp.S +SRCS+= strcpy.S strlen.S strncmp.S strncpy.S strrchr.S SRCS+= scanc.S skpc.S SRCS+= htonl.S htons.S ntohl.S ntohs.S SRCS+= ffs.S
CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: haad Date: Wed Aug 12 21:52:41 UTC 2009 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: arc.c Log Message: Register callbacks for reclaiming kvm kernel space to arc. Unregister both kvm address space and memory callbacks from kernel during arc_fini call. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c:1.3 src/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c:1.4 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c:1.3 Mon Aug 10 22:38:02 2009 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c Wed Aug 12 21:52:41 2009 @@ -167,6 +167,12 @@ } } static void *zio_arena; + +#include sys/callback.h +/* Structures used for memory and kva space reclaim. */ +static struct callback_entry arc_kva_reclaim_entry; +static struct uvm_reclaim_hook arc_hook; + #endif /* __NetBSD__ */ static kmutex_t arc_reclaim_thr_lock; @@ -3380,6 +3386,19 @@ } } +static int +arc_kva_reclaim_callback(struct callback_entry *ce, void *obj, void *arg) +{ + + + if (mutex_tryenter(arc_reclaim_thr_lock)) { + cv_broadcast(arc_reclaim_thr_cv); + mutex_exit(arc_reclaim_thr_lock); + } + + return CALLBACK_CHAIN_CONTINUE; +} + #endif /* __NetBSD__ */ void @@ -3495,11 +3514,12 @@ TS_RUN, maxclsyspri); #if defined(__NetBSD__) defined(_KERNEL) - static struct uvm_reclaim_hook hook; + arc_hook.uvm_reclaim_hook = arc_uvm_reclaim_hook; - hook.uvm_reclaim_hook = arc_uvm_reclaim_hook; + uvm_reclaim_hook_add(arc_hook); + callback_register(vm_map_to_kernel(kernel_map)-vmk_reclaim_callback, + arc_kva_reclaim_entry, NULL, arc_kva_reclaim_callback); - uvm_reclaim_hook_add(hook); #endif arc_dead = FALSE; @@ -3552,6 +3572,12 @@ mutex_destroy(zfs_write_limit_lock); +#if defined(__NetBSD__) defined(_KERNEL) + uvm_reclaim_hook_del(arc_hook); + callback_unregister(vm_map_to_kernel(kernel_map)-vmk_reclaim_callback, + arc_kva_reclaim_entry); +#endif + buf_fini(); }
CVS commit: src/sys/netinet
Module Name:src Committed By: dyoung Date: Wed Aug 12 22:16:15 UTC 2009 Modified Files: src/sys/netinet: if_arp.c Log Message: Don't require the gateway address to have room for both an interface name and address. Room for an address will do. This should fix a regression in 'arp -s ...' on interfaces such as xennet0 with unusually long names. I will request a pull-up to netbsd-5. To generate a diff of this commit: cvs rdiff -u -r1.145 -r1.146 src/sys/netinet/if_arp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet/if_arp.c diff -u src/sys/netinet/if_arp.c:1.145 src/sys/netinet/if_arp.c:1.146 --- src/sys/netinet/if_arp.c:1.145 Sun Jan 11 02:45:54 2009 +++ src/sys/netinet/if_arp.c Wed Aug 12 22:16:15 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_arp.c,v 1.145 2009/01/11 02:45:54 christos Exp $ */ +/* $NetBSD: if_arp.c,v 1.146 2009/08/12 22:16:15 dyoung Exp $ */ /*- * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_arp.c,v 1.145 2009/01/11 02:45:54 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: if_arp.c,v 1.146 2009/08/12 22:16:15 dyoung Exp $); #include opt_ddb.h #include opt_inet.h @@ -459,8 +459,6 @@ struct in_ifaddr *ia; struct ifaddr *ifa; struct ifnet *ifp = rt-rt_ifp; - uint8_t namelen = strlen(ifp-if_xname); - uint8_t addrlen = ifp-if_addrlen; if (!arpinit_done) { arpinit_done = 1; @@ -581,7 +579,7 @@ /*FALLTHROUGH*/ case RTM_RESOLVE: if (gate-sa_family != AF_LINK || - gate-sa_len sockaddr_dl_measure(namelen, addrlen)) { + gate-sa_len sockaddr_dl_measure(0, ifp-if_addrlen)) { log(LOG_DEBUG, arp_rtrequest: bad gateway value\n); break; } @@ -593,7 +591,7 @@ * Case 2: This route may come from cloning, or a manual route * add with a LL address. */ - switch (satocsdl(gate)-sdl_type) { + switch (ifp-if_type) { #if NTOKEN 0 case IFT_ISO88025: allocsize = sizeof(*la) + sizeof(struct token_rif); @@ -636,8 +634,12 @@ * interface. */ rt-rt_expire = 0; - (void)sockaddr_dl_setaddr(satosdl(gate), gate-sa_len, - CLLADDR(ifp-if_sadl), ifp-if_addrlen); + if (sockaddr_dl_init(satosdl(gate), gate-sa_len, + ifp-if_index, ifp-if_type, NULL, 0, + CLLADDR(ifp-if_sadl), ifp-if_addrlen) == NULL) { +panic(%s(%s): sockaddr_dl_init cannot fail, +__func__, ifp-if_xname); + } if (useloopback) ifp = rt-rt_ifp = lo0ifp; /*
CVS commit: src/sys/arch
Module Name:src Committed By: matt Date: Wed Aug 12 23:29:20 UTC 2009 Modified Files: src/sys/arch/algor/include: Makefile src/sys/arch/arc/include: Makefile src/sys/arch/cobalt/include: Makefile src/sys/arch/evbmips/include: Makefile src/sys/arch/hpcmips/include: Makefile src/sys/arch/mips/mips: cpu_exec.c src/sys/arch/mipsco/include: Makefile src/sys/arch/newsmips/conf: GENERIC WAPIKO src/sys/arch/newsmips/include: Makefile src/sys/arch/pmax/include: Makefile src/sys/arch/sbmips/include: Makefile src/sys/arch/sgimips/include: Makefile Removed Files: src/sys/arch/algor/include: aout_machdep.h bsd-aout.h src/sys/arch/arc/include: aout_machdep.h bsd-aout.h src/sys/arch/cobalt/include: aout_machdep.h bsd-aout.h src/sys/arch/evbmips/include: aout_machdep.h src/sys/arch/hpcmips/include: aout_machdep.h bsd-aout.h src/sys/arch/mips/include: aout_machdep.h bsd-aout.h src/sys/arch/mipsco/include: aout_machdep.h bsd-aout.h src/sys/arch/newsmips/include: aout_machdep.h bsd-aout.h src/sys/arch/pmax/include: aout_machdep.h bsd-aout.h src/sys/arch/sbmips/include: aout_machdep.h bsd-aout.h src/sys/arch/sgimips/include: aout_machdep.h bsd-aout.h Log Message: Nuke a.out support for MIPS. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/algor/include/Makefile cvs rdiff -u -r1.1 -r0 src/sys/arch/algor/include/aout_machdep.h \ src/sys/arch/algor/include/bsd-aout.h cvs rdiff -u -r1.29 -r1.30 src/sys/arch/arc/include/Makefile cvs rdiff -u -r1.5 -r0 src/sys/arch/arc/include/aout_machdep.h \ src/sys/arch/arc/include/bsd-aout.h cvs rdiff -u -r1.18 -r1.19 src/sys/arch/cobalt/include/Makefile cvs rdiff -u -r1.1 -r0 src/sys/arch/cobalt/include/aout_machdep.h \ src/sys/arch/cobalt/include/bsd-aout.h cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbmips/include/Makefile cvs rdiff -u -r1.1 -r0 src/sys/arch/evbmips/include/aout_machdep.h cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hpcmips/include/Makefile cvs rdiff -u -r1.1.1.1 -r0 src/sys/arch/hpcmips/include/aout_machdep.h \ src/sys/arch/hpcmips/include/bsd-aout.h cvs rdiff -u -r1.8 -r0 src/sys/arch/mips/include/aout_machdep.h cvs rdiff -u -r1.5 -r0 src/sys/arch/mips/include/bsd-aout.h cvs rdiff -u -r1.55 -r1.56 src/sys/arch/mips/mips/cpu_exec.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/mipsco/include/Makefile cvs rdiff -u -r1.1 -r0 src/sys/arch/mipsco/include/aout_machdep.h cvs rdiff -u -r1.2 -r0 src/sys/arch/mipsco/include/bsd-aout.h cvs rdiff -u -r1.107 -r1.108 src/sys/arch/newsmips/conf/GENERIC cvs rdiff -u -r1.38 -r1.39 src/sys/arch/newsmips/conf/WAPIKO cvs rdiff -u -r1.32 -r1.33 src/sys/arch/newsmips/include/Makefile cvs rdiff -u -r1.1 -r0 src/sys/arch/newsmips/include/aout_machdep.h cvs rdiff -u -r1.2 -r0 src/sys/arch/newsmips/include/bsd-aout.h cvs rdiff -u -r1.33 -r1.34 src/sys/arch/pmax/include/Makefile cvs rdiff -u -r1.7 -r0 src/sys/arch/pmax/include/aout_machdep.h cvs rdiff -u -r1.4 -r0 src/sys/arch/pmax/include/bsd-aout.h cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sbmips/include/Makefile cvs rdiff -u -r1.1 -r0 src/sys/arch/sbmips/include/aout_machdep.h \ src/sys/arch/sbmips/include/bsd-aout.h cvs rdiff -u -r1.19 -r1.20 src/sys/arch/sgimips/include/Makefile cvs rdiff -u -r1.1 -r0 src/sys/arch/sgimips/include/aout_machdep.h \ src/sys/arch/sgimips/include/bsd-aout.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/algor/include/Makefile diff -u src/sys/arch/algor/include/Makefile:1.11 src/sys/arch/algor/include/Makefile:1.12 --- src/sys/arch/algor/include/Makefile:1.11 Fri Feb 9 21:55:00 2007 +++ src/sys/arch/algor/include/Makefile Wed Aug 12 23:29:18 2009 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.11 2007/02/09 21:55:00 ad Exp $ +# $NetBSD: Makefile,v 1.12 2009/08/12 23:29:18 matt Exp $ INCSDIR=/usr/include/algor -INCS= ansi.h aout_machdep.h asm.h autoconf.h \ - bswap.h bsd-aout.h bus.h \ +INCS= ansi.h asm.h autoconf.h \ + bswap.h bus.h \ cdefs.h cpu.h \ disklabel.h \ ecoff_machdep.h elf_machdep.h endian.h endian_machdep.h \ Index: src/sys/arch/arc/include/Makefile diff -u src/sys/arch/arc/include/Makefile:1.29 src/sys/arch/arc/include/Makefile:1.30 --- src/sys/arch/arc/include/Makefile:1.29 Fri Feb 9 21:55:02 2007 +++ src/sys/arch/arc/include/Makefile Wed Aug 12 23:29:18 2009 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.29 2007/02/09 21:55:02 ad Exp $ +# $NetBSD: Makefile,v 1.30 2009/08/12 23:29:18 matt Exp $ INCSDIR= /usr/include/arc # Header files which are needed from userland. -INCS= ansi.h aout_machdep.h asm.h \ - bswap.h bsd-aout.h \ +INCS= ansi.h asm.h \ + bswap.h \ cdefs.h cpu.h \ disklabel.h \ ecoff_machdep.h elf_machdep.h endian.h endian_machdep.h \ Index: src/sys/arch/cobalt/include/Makefile diff -u
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: matt Date: Wed Aug 12 23:38:20 UTC 2009 Modified Files: src/distrib/sets/lists/comp: ad.mips md.algor md.arc md.cobalt md.evbmips md.hpcmips md.mipsco md.newsmips md.pmax md.sbmips md.sgimips Log Message: We don't install machine/bsd-aout.h and machine/aout_machdep.h on MIPS anymore and we don't build elf2aout for MIPS either. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/distrib/sets/lists/comp/ad.mips cvs rdiff -u -r1.12 -r1.13 src/distrib/sets/lists/comp/md.algor \ src/distrib/sets/lists/comp/md.evbmips cvs rdiff -u -r1.21 -r1.22 src/distrib/sets/lists/comp/md.arc \ src/distrib/sets/lists/comp/md.cobalt cvs rdiff -u -r1.26 -r1.27 src/distrib/sets/lists/comp/md.hpcmips \ src/distrib/sets/lists/comp/md.newsmips cvs rdiff -u -r1.16 -r1.17 src/distrib/sets/lists/comp/md.mipsco cvs rdiff -u -r1.59 -r1.60 src/distrib/sets/lists/comp/md.pmax cvs rdiff -u -r1.11 -r1.12 src/distrib/sets/lists/comp/md.sbmips cvs rdiff -u -r1.13 -r1.14 src/distrib/sets/lists/comp/md.sgimips Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/ad.mips diff -u src/distrib/sets/lists/comp/ad.mips:1.34 src/distrib/sets/lists/comp/ad.mips:1.35 --- src/distrib/sets/lists/comp/ad.mips:1.34 Fri Aug 22 13:42:19 2008 +++ src/distrib/sets/lists/comp/ad.mips Wed Aug 12 23:38:20 2009 @@ -1,11 +1,8 @@ -# $NetBSD: ad.mips,v 1.34 2008/08/22 13:42:19 lukem Exp $ -./usr/bin/elf2aoutcomp-sysutil-bin +# $NetBSD: ad.mips,v 1.35 2009/08/12 23:38:20 matt Exp $ ./usr/bin/elf2ecoffcomp-sysutil-bin ./usr/include/mipscomp-c-include ./usr/include/mips/ansi.h comp-c-include -./usr/include/mips/aout_machdep.h comp-c-include ./usr/include/mips/asm.h comp-c-include -./usr/include/mips/bsd-aout.h comp-c-include ./usr/include/mips/bswap.h comp-c-include ./usr/include/mips/cachectl.h comp-c-include ./usr/include/mips/cdefs.h comp-c-include @@ -59,5 +56,4 @@ ./usr/include/mips/varargs.h comp-c-include ./usr/include/mips/vmparam.h comp-c-include ./usr/include/mips/wchar_limits.h comp-c-include -./usr/libdata/debug/usr/bin/elf2aout.debug comp-sysutil-debug debug ./usr/libdata/debug/usr/bin/elf2ecoff.debug comp-sysutil-debug debug Index: src/distrib/sets/lists/comp/md.algor diff -u src/distrib/sets/lists/comp/md.algor:1.12 src/distrib/sets/lists/comp/md.algor:1.13 --- src/distrib/sets/lists/comp/md.algor:1.12 Fri Feb 9 22:22:32 2007 +++ src/distrib/sets/lists/comp/md.algor Wed Aug 12 23:38:20 2009 @@ -1,11 +1,9 @@ -# $NetBSD: md.algor,v 1.12 2007/02/09 22:22:32 ad Exp $ +# $NetBSD: md.algor,v 1.13 2009/08/12 23:38:20 matt Exp $ ./usr/include/algorcomp-c-include ./usr/include/algor/_G_config.h comp-obsolete obsolete ./usr/include/algor/ansi.h comp-c-include -./usr/include/algor/aout_machdep.h comp-c-include ./usr/include/algor/asm.h comp-c-include ./usr/include/algor/autoconf.h comp-c-include -./usr/include/algor/bsd-aout.h comp-c-include ./usr/include/algor/bswap.h comp-c-include ./usr/include/algor/bus.h comp-c-include ./usr/include/algor/cdefs.h comp-c-include Index: src/distrib/sets/lists/comp/md.evbmips diff -u src/distrib/sets/lists/comp/md.evbmips:1.12 src/distrib/sets/lists/comp/md.evbmips:1.13 --- src/distrib/sets/lists/comp/md.evbmips:1.12 Fri Feb 9 22:22:32 2007 +++ src/distrib/sets/lists/comp/md.evbmips Wed Aug 12 23:38:20 2009 @@ -1,8 +1,7 @@ -# $NetBSD: md.evbmips,v 1.12 2007/02/09 22:22:32 ad Exp $ +# $NetBSD: md.evbmips,v 1.13 2009/08/12 23:38:20 matt Exp $ ./usr/include/evbmipscomp-c-include ./usr/include/evbmips/_G_config.h comp-obsolete obsolete ./usr/include/evbmips/ansi.h comp-c-include -./usr/include/evbmips/aout_machdep.h comp-c-include ./usr/include/evbmips/asm.h comp-c-include ./usr/include/evbmips/bswap.h comp-c-include ./usr/include/evbmips/bus.h comp-c-include Index: src/distrib/sets/lists/comp/md.arc diff -u src/distrib/sets/lists/comp/md.arc:1.21 src/distrib/sets/lists/comp/md.arc:1.22 --- src/distrib/sets/lists/comp/md.arc:1.21 Fri Feb 9 22:22:32 2007 +++ src/distrib/sets/lists/comp/md.arc Wed Aug 12 23:38:20 2009 @@ -1,11 +1,9 @@ -# $NetBSD: md.arc,v 1.21 2007/02/09 22:22:32 ad Exp $ +# $NetBSD: md.arc,v 1.22 2009/08/12 23:38:20 matt Exp $ ./usr/include/arccomp-c-include ./usr/include/arc/_G_config.h comp-obsolete obsolete ./usr/include/arc/ansi.h comp-c-include -./usr/include/arc/aout_machdep.h comp-c-include ./usr/include/arc/asm.hcomp-c-include ./usr/include/arc/autoconf.h comp-obsolete obsolete -./usr/include/arc/bsd-aout.h comp-c-include ./usr/include/arc/bswap.h comp-c-include ./usr/include/arc/cdefs.h comp-c-include ./usr/include/arc/cpu.hcomp-c-include Index: src/distrib/sets/lists/comp/md.cobalt diff -u src/distrib/sets/lists/comp/md.cobalt:1.21
CVS commit: src/lib/libpthread
Module Name:src Committed By: enami Date: Wed Aug 12 23:51:23 UTC 2009 Modified Files: src/lib/libpthread: pthread_cancelstub.c pthread_misc.c Log Message: Make nanosleep cancelable again. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/lib/libpthread/pthread_cancelstub.c cvs rdiff -u -r1.13 -r1.14 src/lib/libpthread/pthread_misc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libpthread/pthread_cancelstub.c diff -u src/lib/libpthread/pthread_cancelstub.c:1.26 src/lib/libpthread/pthread_cancelstub.c:1.27 --- src/lib/libpthread/pthread_cancelstub.c:1.26 Tue Jan 13 01:50:04 2009 +++ src/lib/libpthread/pthread_cancelstub.c Wed Aug 12 23:51:23 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pthread_cancelstub.c,v 1.26 2009/01/13 01:50:04 christos Exp $ */ +/* $NetBSD: pthread_cancelstub.c,v 1.27 2009/08/12 23:51:23 enami Exp $ */ /*- * Copyright (c) 2002, 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: pthread_cancelstub.c,v 1.26 2009/01/13 01:50:04 christos Exp $); +__RCSID($NetBSD: pthread_cancelstub.c,v 1.27 2009/08/12 23:51:23 enami Exp $); #ifndef lint @@ -98,6 +98,8 @@ ssize_t _sys_msgrcv(int, void *, size_t, long, int); int _sys_msgsnd(int, const void *, size_t, int); int _sys___msync13(void *, size_t, int); +int _sys___nanosleep50(const struct timespec *, struct timespec *); +int __nanosleep50(const struct timespec *, struct timespec *); int _sys_open(const char *, int, ...); int _sys_poll(struct pollfd *, nfds_t, int); int _sys___pollts50(struct pollfd *, nfds_t, const struct timespec *, @@ -357,6 +359,24 @@ } int +__nanosleep50(const struct timespec *rqtp, struct timespec *rmtp) +{ + int retval; + pthread_t self; + + self = pthread__self(); + TESTCANCEL(self); + /* + * For now, just nanosleep. In the future, maybe pass a ucontext_t + * to _lwp_nanosleep() and allow it to recycle our kernel stack. + */ + retval = _sys___nanosleep50(rqtp, rmtp); + TESTCANCEL(self); + + return retval; +} + +int poll(struct pollfd *fds, nfds_t nfds, int timeout) { int retval; @@ -563,6 +583,7 @@ __strong_alias(_msgrcv, msgrcv) __strong_alias(_msgsnd, msgsnd) __strong_alias(___msync13, __msync13) +__strong_alias(___nanosleep50, __nanosleep50) __strong_alias(_open, open) __strong_alias(_poll, poll) __strong_alias(_pread, pread) Index: src/lib/libpthread/pthread_misc.c diff -u src/lib/libpthread/pthread_misc.c:1.13 src/lib/libpthread/pthread_misc.c:1.14 --- src/lib/libpthread/pthread_misc.c:1.13 Sun Jan 11 02:46:48 2009 +++ src/lib/libpthread/pthread_misc.c Wed Aug 12 23:51:23 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pthread_misc.c,v 1.13 2009/01/11 02:46:48 christos Exp $ */ +/* $NetBSD: pthread_misc.c,v 1.14 2009/08/12 23:51:23 enami Exp $ */ /*- * Copyright (c) 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: pthread_misc.c,v 1.13 2009/01/11 02:46:48 christos Exp $); +__RCSID($NetBSD: pthread_misc.c,v 1.14 2009/08/12 23:51:23 enami Exp $); #include errno.h #include string.h @@ -50,9 +50,7 @@ int pthread__sched_yield(void); int _sys___sigprocmask14(int, const sigset_t *, sigset_t *); -int _sys___nanosleep50(const struct timespec *, struct timespec *); int _sys_sched_yield(void); -int __nanosleep50(const struct timespec *, struct timespec *); __strong_alias(__libc_thr_sigsetmask,pthread_sigmask) __strong_alias(__sigprocmask14,pthread_sigmask) @@ -150,19 +148,6 @@ return 0; } -#ifndef lint -int -__nanosleep50(const struct timespec *rqtp, struct timespec *rmtp) -{ - - /* - * For now, just nanosleep. In the future, maybe pass a ucontext_t - * to _lwp_nanosleep() and allow it to recycle our kernel stack. - */ - return _sys___nanosleep50(rqtp, rmtp); -} -#endif - int pthread__sched_yield(void) {
CVS commit: src/sys/net
Module Name:src Committed By: dyoung Date: Thu Aug 13 00:23:32 UTC 2009 Modified Files: src/sys/net: if.c if.h Log Message: Use sysctl(9) to expose to userland each interface transmission queue's maximum length, current length, and number of drops. E.g., % sysctl net.interfaces.bnx0 net.interfaces.bnx0.sndq.len = 0 net.interfaces.bnx0.sndq.maxlen = 509 net.interfaces.bnx0.sndq.drops = 0 Let userland adjust the maximum queue length. While I'm here, add a 64-bit generation number, if_index_gen, to ifnet; the pair [ifp-if_index, ifp-if_index_gen] can serve to identify an ifnet for the lifetime of the system. I will use this in an upcoming change. Ok m...@. To generate a diff of this commit: cvs rdiff -u -r1.233 -r1.234 src/sys/net/if.c cvs rdiff -u -r1.142 -r1.143 src/sys/net/if.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if.c diff -u src/sys/net/if.c:1.233 src/sys/net/if.c:1.234 --- src/sys/net/if.c:1.233 Thu Feb 12 19:05:36 2009 +++ src/sys/net/if.c Thu Aug 13 00:23:31 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.233 2009/02/12 19:05:36 christos Exp $ */ +/* $NetBSD: if.c,v 1.234 2009/08/13 00:23:31 dyoung Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -90,7 +90,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if.c,v 1.233 2009/02/12 19:05:36 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: if.c,v 1.234 2009/08/13 00:23:31 dyoung Exp $); #include opt_inet.h @@ -159,11 +159,16 @@ static LIST_HEAD(, if_clone) if_cloners = LIST_HEAD_INITIALIZER(if_cloners); static int if_cloners_count; +static uint64_t index_gen; +static kmutex_t index_gen_mtx; + #ifdef PFIL_HOOKS struct pfil_head if_pfil; /* packet filtering hook for interfaces */ #endif static void if_detach_queues(struct ifnet *, struct ifqueue *); +static void sysctl_sndq_setup(struct sysctllog **, const char *, +struct ifaltq *); /* * Network interface utility routines. @@ -175,6 +180,7 @@ ifinit(void) { + mutex_init(index_gen_mtx, MUTEX_DEFAULT, IPL_NONE); callout_init(if_slowtimo_ch, 0); if_slowtimo(NULL); } @@ -447,6 +453,10 @@ if (ifp-if_ioctl == NULL) ifp-if_ioctl = ifioctl_common; + mutex_enter(index_gen_mtx); + ifp-if_index_gen = index_gen++; + mutex_exit(index_gen_mtx); + ifp-if_index = if_index; if (ifindex2ifnet == NULL) if_index++; @@ -524,6 +534,9 @@ if (ifp-if_snd.ifq_maxlen == 0) ifp-if_snd.ifq_maxlen = ifqmaxlen; + + sysctl_sndq_setup(ifp-if_sysctl_log, ifp-if_xname, ifp-if_snd); + ifp-if_broadcastaddr = 0; /* reliably crash if used uninitialized */ ifp-if_link_state = LINK_STATE_UNKNOWN; @@ -666,6 +679,7 @@ altq_detach(ifp-if_snd); #endif + sysctl_teardown(ifp-if_sysctl_log); #if NCARP 0 /* Remove the interface from any carp group it is a part of. */ @@ -1874,6 +1888,73 @@ } +static void +sysctl_sndq_setup(struct sysctllog **clog, const char *ifname, +struct ifaltq *ifq) +{ + const struct sysctlnode *cnode, *rnode; + + if (sysctl_createv(clog, 0, NULL, rnode, + CTLFLAG_PERMANENT, + CTLTYPE_NODE, net, NULL, + NULL, 0, NULL, 0, + CTL_NET, CTL_EOL) != 0) + goto bad; + + if (sysctl_createv(clog, 0, rnode, rnode, + CTLFLAG_PERMANENT, + CTLTYPE_NODE, interfaces, + SYSCTL_DESCR(Per-interface controls), + NULL, 0, NULL, 0, + CTL_CREATE, CTL_EOL) != 0) + goto bad; + + if (sysctl_createv(clog, 0, rnode, rnode, + CTLFLAG_PERMANENT, + CTLTYPE_NODE, ifname, + SYSCTL_DESCR(Interface controls), + NULL, 0, NULL, 0, + CTL_CREATE, CTL_EOL) != 0) + goto bad; + + if (sysctl_createv(clog, 0, rnode, rnode, + CTLFLAG_PERMANENT, + CTLTYPE_NODE, sndq, + SYSCTL_DESCR(Interface output queue controls), + NULL, 0, NULL, 0, + CTL_CREATE, CTL_EOL) != 0) + goto bad; + + if (sysctl_createv(clog, 0, rnode, cnode, + CTLFLAG_PERMANENT, + CTLTYPE_INT, len, + SYSCTL_DESCR(Current output queue length), + NULL, 0, ifq-ifq_len, 0, + CTL_CREATE, CTL_EOL) != 0) + goto bad; + + if (sysctl_createv(clog, 0, rnode, cnode, + CTLFLAG_PERMANENT|CTLFLAG_READWRITE, + CTLTYPE_INT, maxlen, + SYSCTL_DESCR(Maximum allowed output queue length), + NULL, 0, ifq-ifq_maxlen, 0, + CTL_CREATE, CTL_EOL) != 0) + goto bad; + + if (sysctl_createv(clog, 0, rnode, cnode, + CTLFLAG_PERMANENT, + CTLTYPE_INT, drops, + SYSCTL_DESCR(Packets dropped due to full output queue), + NULL, 0, ifq-ifq_drops, 0, + CTL_CREATE, CTL_EOL) != 0) + goto bad; + + return; +bad: + printf(%s: could not attach sysctl nodes\n, ifname); + return; +} + #if defined(INET) || defined(INET6) static void sysctl_net_ifq_setup(struct sysctllog **clog, Index: src/sys/net/if.h diff -u
CVS commit: src/sys/netinet6
Module Name:src Committed By: dyoung Date: Thu Aug 13 00:34:05 UTC 2009 Modified Files: src/sys/netinet6: in6.c in6_ifattach.c in6_ifattach.h Log Message: Postpone to a workqueue adding link-local and loopback IPv6 addresses to an interface. This keeps the kernel from entering ifp-if_ioctl recursively, which can deadlock if if_ioctl takes locks. This will fix deadlocks LOCKDEBUG errors in agr(4) (kern/39940) and in gre(4). To generate a diff of this commit: cvs rdiff -u -r1.151 -r1.152 src/sys/netinet6/in6.c cvs rdiff -u -r1.82 -r1.83 src/sys/netinet6/in6_ifattach.c cvs rdiff -u -r1.11 -r1.12 src/sys/netinet6/in6_ifattach.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/in6.c diff -u src/sys/netinet6/in6.c:1.151 src/sys/netinet6/in6.c:1.152 --- src/sys/netinet6/in6.c:1.151 Tue May 12 23:01:26 2009 +++ src/sys/netinet6/in6.c Thu Aug 13 00:34:04 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: in6.c,v 1.151 2009/05/12 23:01:26 elad Exp $ */ +/* $NetBSD: in6.c,v 1.152 2009/08/13 00:34:04 dyoung Exp $ */ /* $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: in6.c,v 1.151 2009/05/12 23:01:26 elad Exp $); +__KERNEL_RCSID(0, $NetBSD: in6.c,v 1.152 2009/08/13 00:34:04 dyoung Exp $); #include opt_inet.h #include opt_pfil_hooks.h @@ -76,6 +76,7 @@ #include sys/socketvar.h #include sys/sockio.h #include sys/systm.h +#include sys/once.h #include sys/proc.h #include sys/time.h #include sys/kernel.h @@ -2230,8 +2231,11 @@ void * in6_domifattach(struct ifnet *ifp) { + static ONCE_DECL(ifwqest); struct in6_ifextra *ext; + RUN_ONCE(ifwqest, in6_ifaddrs_wq_establish); + ext = malloc(sizeof(*ext), M_IFADDR, M_WAITOK|M_ZERO); ext-in6_ifstat = malloc(sizeof(struct in6_ifstat), Index: src/sys/netinet6/in6_ifattach.c diff -u src/sys/netinet6/in6_ifattach.c:1.82 src/sys/netinet6/in6_ifattach.c:1.83 --- src/sys/netinet6/in6_ifattach.c:1.82 Thu Jul 30 17:28:36 2009 +++ src/sys/netinet6/in6_ifattach.c Thu Aug 13 00:34:04 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: in6_ifattach.c,v 1.82 2009/07/30 17:28:36 dyoung Exp $ */ +/* $NetBSD: in6_ifattach.c,v 1.83 2009/08/13 00:34:04 dyoung Exp $ */ /* $KAME: in6_ifattach.c,v 1.124 2001/07/18 08:32:51 jinmei Exp $ */ /* @@ -31,10 +31,11 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: in6_ifattach.c,v 1.82 2009/07/30 17:28:36 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: in6_ifattach.c,v 1.83 2009/08/13 00:34:04 dyoung Exp $); #include sys/param.h #include sys/systm.h +#include sys/kmem.h #include sys/malloc.h #include sys/socket.h #include sys/sockio.h @@ -42,6 +43,7 @@ #include sys/syslog.h #include sys/md5.h #include sys/socketvar.h +#include sys/workqueue.h #include net/if.h #include net/if_dl.h @@ -60,12 +62,41 @@ #include net/net_osdep.h +/* Record of an interface to add a link-local and possibly a loopback + * IPv6 address to, processed on a workqueue(9) by in6_ifaddrs_worker. + */ +struct in6_ifaddr_work { + struct work iw_work; + struct ifindexgen { + int ig_idx; /* Interface index */ + int ig_gen; /* Interface index generation */ + } iw_idxgen, /* Identify of the interface + * to receive a link-local and + * possibly a loopback address. + */ + iw_alt_idxgen; /* Optional identity of a second + * interface. If iw_alt_present + * is true, this field + * identifies a second interface + * whose EUI64 we use to derive + * the link-local address for + * the interface indicated by + * iw_idxgen. + */ + bool iw_alt_present; /* iff true, iw_alt_idxgen is valid. */ +}; + unsigned long in6_maxmtu = 0; int ip6_auto_linklocal = 1; /* enable by default */ callout_t in6_tmpaddrtimer_ch; +static struct workqueue *in6_ifaddrs_wq = NULL; + +static void in6_ifaddrs_schedule(struct ifnet *, struct ifnet *); +static void in6_ifaddrs_init(struct ifnet *, struct ifnet *); +static void in6_ifaddrs_worker(struct work *, void *); #if 0 static int get_hostid_ifid(struct ifnet *, struct in6_addr *); @@ -751,8 +782,6 @@ void in6_ifattach(struct ifnet *ifp, struct ifnet *altifp) { - struct in6_ifaddr *ia; - struct in6_addr in6; /* some of the interfaces are inherently not IPv6 capable */ switch (ifp-if_type) { @@ -811,6 +840,26 @@ return; } + /* Assign addresses to ifp in another thread in order to + * avoid re-entering ifp-if_ioctl(). + */ + in6_ifaddrs_schedule(ifp, altifp); +} + +/* in6_ifaddrs_init + * + * Add a link-local address to ifp, and if ifp is a loopback address, + * add a loopback address to it, too. + * + * If altifp is not NULL, derive the link-local address of ifp from the + * EUI64 of altifp. + */ +void +in6_ifaddrs_init(struct ifnet *ifp, struct ifnet *altifp) +{ + struct in6_addr in6; + struct in6_ifaddr *ia; + /* * assign loopback address
CVS commit: src/usr.bin/error
Module Name:src Committed By: dholland Date: Thu Aug 13 02:10:50 UTC 2009 Modified Files: src/usr.bin/error: error.h filter.c input.c main.c pi.c subr.c touch.c Log Message: sprinkle static To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.bin/error/error.h \ src/usr.bin/error/filter.c cvs rdiff -u -r1.11 -r1.12 src/usr.bin/error/input.c src/usr.bin/error/main.c cvs rdiff -u -r1.12 -r1.13 src/usr.bin/error/pi.c cvs rdiff -u -r1.14 -r1.15 src/usr.bin/error/subr.c cvs rdiff -u -r1.16 -r1.17 src/usr.bin/error/touch.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/error/error.h diff -u src/usr.bin/error/error.h:1.10 src/usr.bin/error/error.h:1.11 --- src/usr.bin/error/error.h:1.10 Thu Jul 19 05:43:23 2007 +++ src/usr.bin/error/error.h Thu Aug 13 02:10:50 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: error.h,v 1.10 2007/07/19 05:43:23 lukem Exp $ */ +/* $NetBSD: error.h,v 1.11 2009/08/13 02:10:50 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -123,15 +123,6 @@ #define Q_YES 3 /* 'Y' */ #define Q_yes 4 /* 'y' */ -int probethisfile(char *); -/* - * codes for probethisfile to return - */ -#define F_NOTEXIST 1 -#define F_NOTREAD 2 -#define F_NOTWRITE 3 -#define F_TOUCHIT 4 - /* * Describes attributes about a language */ @@ -189,7 +180,7 @@ */ extern int nerrors; extern Eptr er_head; -extern Eptr *errors; + /* * Resources for each of the files mentioned */ @@ -210,40 +201,25 @@ void arrayify(int *, Eptr **, Eptr); char *Calloc(int, int); void clob_last(char *, char); -int countfiles(Eptr *); Errorclass discardit(Eptr); -void diverterrors(char *, int, Eptr **, int, boolean, int); void eaterrors(int *, Eptr **); -boolean edit(char *); void erroradd(int, char **, Errorclass, Errorclass); -void errorprint(FILE *, Eptr, boolean); -void execvarg(int, int *, char ***); void filenames(int, Eptr **); void findfiles(int, Eptr *, int *, Eptr ***); char firstchar(char *); void getignored(char *); -void hackfile(char *, Eptr **, int, int); -void insert(int); char lastchar(char *); -int mustoverwrite(FILE *, FILE *); -int mustwrite(char *, int, FILE *); char next_lastchar(char *); -int nopertain(Eptr **); -int oktotouch(char *); void onintr(int); boolean persperdexplode(char *, char **, char **); +Errorclass pi(void); int position(char *, char); -boolean preview(char *, int, Eptr **, int); void printerrors(boolean, int, Eptr []); char *plural(int); -boolean qpersperdexplode(char *, char **, char **); -int settotouch(char *); char *substitute(char *, char, char); -void text(Eptr, boolean); boolean touchfiles(int, Eptr **, int *, char ***); char *verbform(int); void wordvbuild(char *, int*, char ***); int wordvcmp(char **, int, char **); void wordvprint(FILE *, int, char **); char **wordvsplice(int, int, char **); -boolean writetouched(int); Index: src/usr.bin/error/filter.c diff -u src/usr.bin/error/filter.c:1.10 src/usr.bin/error/filter.c:1.11 --- src/usr.bin/error/filter.c:1.10 Thu Aug 7 11:13:37 2003 +++ src/usr.bin/error/filter.c Thu Aug 13 02:10:50 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: filter.c,v 1.10 2003/08/07 11:13:37 agc Exp $ */ +/* $NetBSD: filter.c,v 1.11 2009/08/13 02:10:50 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)filter.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: filter.c,v 1.10 2003/08/07 11:13:37 agc Exp $); +__RCSID($NetBSD: filter.c,v 1.11 2009/08/13 02:10:50 dholland Exp $); #endif /* not lint */ #include sys/param.h @@ -47,15 +47,16 @@ #include error.h #include pathnames.h -char *lint_libs[] = { +static char *lint_libs[] = { IG_FILE1, IG_FILE2, IG_FILE3, IG_FILE4, 0 }; -int lexsort(const void *, const void *); -int search_ignore(char *); + +static int lexsort(const void *, const void *); +static int search_ignore(char *); /* * Read the file ERRORNAME of the names of functions in lint @@ -129,7 +130,7 @@ #endif } -int +static int lexsort(const void *c1, const void *c2) { char **cpp1, **cpp2; @@ -139,7 +140,7 @@ return(strcmp(*cpp1, *cpp2)); } -int +static int search_ignore(char *key) { int ub, lb; Index: src/usr.bin/error/input.c diff -u src/usr.bin/error/input.c:1.11 src/usr.bin/error/input.c:1.12 --- src/usr.bin/error/input.c:1.11 Sun Apr 9 19:27:22 2006 +++ src/usr.bin/error/input.c Thu Aug 13 02:10:50 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: input.c,v 1.11 2006/04/09 19:27:22 christos Exp $ */ +/* $NetBSD: input.c,v 1.12 2009/08/13 02:10:50 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)input.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: input.c,v 1.11 2006/04/09 19:27:22 christos Exp $); +__RCSID($NetBSD: input.c,v 1.12 2009/08/13 02:10:50 dholland Exp $); #endif /* not lint */ #include stdio.h @@ -46,21 +46,20 @@ int wordc; /*
CVS commit: src/usr.bin/error
Module Name:src Committed By: dholland Date: Thu Aug 13 03:10:03 UTC 2009 Modified Files: src/usr.bin/error: main.c Log Message: woops (doh!) To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.bin/error/main.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/error/main.c diff -u src/usr.bin/error/main.c:1.13 src/usr.bin/error/main.c:1.14 --- src/usr.bin/error/main.c:1.13 Thu Aug 13 03:07:49 2009 +++ src/usr.bin/error/main.c Thu Aug 13 03:10:03 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.13 2009/08/13 03:07:49 dholland Exp $ */ +/* $NetBSD: main.c,v 1.14 2009/08/13 03:10:03 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)main.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: main.c,v 1.13 2009/08/13 03:07:49 dholland Exp $); +__RCSID($NetBSD: main.c,v 1.14 2009/08/13 03:10:03 dholland Exp $); #endif /* not lint */ #include signal.h @@ -57,7 +57,7 @@ int nignored; char **names_ignored; -int errors = 0; +int nerrors = 0; Eptr er_head; static Eptr *errors;
CVS commit: src/sys/uvm
Module Name:src Committed By: matt Date: Thu Aug 13 03:21:03 UTC 2009 Modified Files: src/sys/uvm: uvm_map.c Log Message: Fix KASSERT() failure reported by Geoff Wing. To generate a diff of this commit: cvs rdiff -u -r1.277 -r1.278 src/sys/uvm/uvm_map.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_map.c diff -u src/sys/uvm/uvm_map.c:1.277 src/sys/uvm/uvm_map.c:1.278 --- src/sys/uvm/uvm_map.c:1.277 Mon Aug 10 16:49:30 2009 +++ src/sys/uvm/uvm_map.c Thu Aug 13 03:21:03 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_map.c,v 1.277 2009/08/10 16:49:30 matt Exp $ */ +/* $NetBSD: uvm_map.c,v 1.278 2009/08/13 03:21:03 matt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -71,7 +71,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_map.c,v 1.277 2009/08/10 16:49:30 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_map.c,v 1.278 2009/08/13 03:21:03 matt Exp $); #include opt_ddb.h #include opt_uvmhist.h @@ -4821,7 +4821,7 @@ KASSERT(deadentry-flags UVM_MAP_KERNEL); KASSERT(deadentry-flags UVM_MAP_KMAPENT); KASSERT(deadentry-next == NULL); - KASSERT(deadentry == ukh-ukh_entries[0]); + KASSERT(deadentry == ukh-ukh_entries[UVM_KMAPENT_CHUNK - 1]); /* * unmap the page from pmap and free it.
CVS commit: xsrc/external/mit/xf86-video-suntcx/dist
Module Name:xsrc Committed By: macallan Date: Thu Aug 13 03:38:25 UTC 2009 Added Files: xsrc/external/mit/xf86-video-suntcx/dist: COPYING ChangeLog Makefile.am Makefile.in README aclocal.m4 config.guess config.h.in config.sub configure configure.ac depcomp install-sh ltmain.sh missing xsrc/external/mit/xf86-video-suntcx/dist/man: Makefile.am Makefile.in suntcx.man xsrc/external/mit/xf86-video-suntcx/dist/src: Makefile.am Makefile.in tcx.h tcx_cursor.c tcx_driver.c tcx_regs.h Log Message: Sun TCX/S24 driver, version 1.1.1 from Xorg To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 xsrc/external/mit/xf86-video-suntcx/dist/COPYING \ xsrc/external/mit/xf86-video-suntcx/dist/ChangeLog \ xsrc/external/mit/xf86-video-suntcx/dist/Makefile.am \ xsrc/external/mit/xf86-video-suntcx/dist/Makefile.in \ xsrc/external/mit/xf86-video-suntcx/dist/README \ xsrc/external/mit/xf86-video-suntcx/dist/aclocal.m4 \ xsrc/external/mit/xf86-video-suntcx/dist/config.guess \ xsrc/external/mit/xf86-video-suntcx/dist/config.h.in \ xsrc/external/mit/xf86-video-suntcx/dist/config.sub \ xsrc/external/mit/xf86-video-suntcx/dist/configure \ xsrc/external/mit/xf86-video-suntcx/dist/configure.ac \ xsrc/external/mit/xf86-video-suntcx/dist/depcomp \ xsrc/external/mit/xf86-video-suntcx/dist/install-sh \ xsrc/external/mit/xf86-video-suntcx/dist/ltmain.sh \ xsrc/external/mit/xf86-video-suntcx/dist/missing cvs rdiff -u -r0 -r1.1 \ xsrc/external/mit/xf86-video-suntcx/dist/man/Makefile.am \ xsrc/external/mit/xf86-video-suntcx/dist/man/Makefile.in \ xsrc/external/mit/xf86-video-suntcx/dist/man/suntcx.man cvs rdiff -u -r0 -r1.1 \ xsrc/external/mit/xf86-video-suntcx/dist/src/Makefile.am \ xsrc/external/mit/xf86-video-suntcx/dist/src/Makefile.in \ xsrc/external/mit/xf86-video-suntcx/dist/src/tcx.h \ xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_cursor.c \ xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c \ xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_regs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. diffs are larger than 1MB and have been omitted
CVS commit: src/usr.bin/error
Module Name:src Committed By: dholland Date: Thu Aug 13 03:50:02 UTC 2009 Modified Files: src/usr.bin/error: error.h filter.c input.c main.c pi.c subr.c touch.c Log Message: Sprinkle const. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.bin/error/error.h \ src/usr.bin/error/filter.c cvs rdiff -u -r1.13 -r1.14 src/usr.bin/error/input.c cvs rdiff -u -r1.14 -r1.15 src/usr.bin/error/main.c src/usr.bin/error/pi.c cvs rdiff -u -r1.16 -r1.17 src/usr.bin/error/subr.c cvs rdiff -u -r1.18 -r1.19 src/usr.bin/error/touch.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/error/error.h diff -u src/usr.bin/error/error.h:1.12 src/usr.bin/error/error.h:1.13 --- src/usr.bin/error/error.h:1.12 Thu Aug 13 03:07:49 2009 +++ src/usr.bin/error/error.h Thu Aug 13 03:50:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: error.h,v 1.12 2009/08/13 03:07:49 dholland Exp $ */ +/* $NetBSD: error.h,v 1.13 2009/08/13 03:50:02 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -115,7 +115,7 @@ extern boolean query; extern boolean terse; -int inquire(char *, ...); /* inquire for yes/no */ +int inquire(const char *, ...); /* inquire for yes/no */ /* * codes for inquire() to return @@ -131,8 +131,8 @@ */ struct lang_desc { char *lang_name; - char *lang_incomment; /* one of the following defines */ - char *lang_outcomment; /* one of the following defines */ + const char *lang_incomment; /* one of the following defines */ + const char *lang_outcomment; /* one of the following defines */ }; extern struct lang_desc lang_table[]; @@ -212,19 +212,19 @@ void erroradd(int, char **, Errorclass, Errorclass); void filenames(int, Eptr **); void findfiles(int, Eptr *, int *, Eptr ***); -char firstchar(char *); -void getignored(char *); -char lastchar(char *); -char next_lastchar(char *); +char firstchar(const char *); +void getignored(const char *); +char lastchar(const char *); +char next_lastchar(const char *); void onintr(int); boolean persperdexplode(char *, char **, char **); Errorclass pi(void); -int position(char *, char); +int position(const char *, char); void printerrors(boolean, int, Eptr []); -char *plural(int); +const char *plural(int); char *substitute(char *, char, char); boolean touchfiles(int, Eptr **, int *, char ***); -char *verbform(int); +const char *verbform(int); void wordvbuild(char *, int*, char ***); int wordvcmp(char **, int, char **); void wordvprint(FILE *, int, char **); Index: src/usr.bin/error/filter.c diff -u src/usr.bin/error/filter.c:1.12 src/usr.bin/error/filter.c:1.13 --- src/usr.bin/error/filter.c:1.12 Thu Aug 13 03:07:49 2009 +++ src/usr.bin/error/filter.c Thu Aug 13 03:50:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: filter.c,v 1.12 2009/08/13 03:07:49 dholland Exp $ */ +/* $NetBSD: filter.c,v 1.13 2009/08/13 03:50:02 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)filter.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: filter.c,v 1.12 2009/08/13 03:07:49 dholland Exp $); +__RCSID($NetBSD: filter.c,v 1.13 2009/08/13 03:50:02 dholland Exp $); #endif /* not lint */ #include sys/param.h @@ -47,7 +47,7 @@ #include error.h #include pathnames.h -static char *lint_libs[] = { +static const char *lint_libs[] = { IG_FILE1, IG_FILE2, IG_FILE3, @@ -56,21 +56,21 @@ }; static int lexsort(const void *, const void *); -static int search_ignore(char *); +static int search_ignore(const char *); /* * Read the file ERRORNAME of the names of functions in lint * to ignore complaints about. */ void -getignored(char *auxname) +getignored(const char *auxname) { int i; FILE *fyle; char inbuffer[256]; uid_t uid; char filename[MAXPATHLEN]; - char *username; + const char *username; struct passwd *passwdentry; nignored = 0; @@ -134,15 +134,16 @@ static int lexsort(const void *c1, const void *c2) { - char **cpp1, **cpp2; + const char *const *cpp1; + const char *const *cpp2; - cpp1 = (char **)c1; - cpp2 = (char **)c2; + cpp1 = c1; + cpp2 = c2; return (strcmp(*cpp1, *cpp2)); } static int -search_ignore(char *key) +search_ignore(const char *key) { int ub, lb; int halfway; Index: src/usr.bin/error/input.c diff -u src/usr.bin/error/input.c:1.13 src/usr.bin/error/input.c:1.14 --- src/usr.bin/error/input.c:1.13 Thu Aug 13 03:07:49 2009 +++ src/usr.bin/error/input.c Thu Aug 13 03:50:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: input.c,v 1.13 2009/08/13 03:07:49 dholland Exp $ */ +/* $NetBSD: input.c,v 1.14 2009/08/13 03:50:02 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)input.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: input.c,v 1.13 2009/08/13 03:07:49 dholland Exp $); +__RCSID($NetBSD: input.c,v 1.14 2009/08/13 03:50:02 dholland Exp $); #endif /* not lint */ #include stdio.h @@ -70,7 +70,7 @@ {
CVS commit: src/sys/compat/common
Module Name:src Committed By: matt Date: Thu Aug 13 03:53:13 UTC 2009 Modified Files: src/sys/compat/common: compat_exec.c Log Message: #include opt_execfmt.h and only compile innards if EXEC_AOUT is defined. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/compat/common/compat_exec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/common/compat_exec.c diff -u src/sys/compat/common/compat_exec.c:1.15 src/sys/compat/common/compat_exec.c:1.16 --- src/sys/compat/common/compat_exec.c:1.15 Sat Dec 8 18:35:53 2007 +++ src/sys/compat/common/compat_exec.c Thu Aug 13 03:53:13 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_exec.c,v 1.15 2007/12/08 18:35:53 dsl Exp $ */ +/* $NetBSD: compat_exec.c,v 1.16 2009/08/13 03:53:13 matt Exp $ */ /* * Copyright (c) 1993, 1994 Christopher G. Demetriou @@ -31,7 +31,11 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: compat_exec.c,v 1.15 2007/12/08 18:35:53 dsl Exp $); +__KERNEL_RCSID(0, $NetBSD: compat_exec.c,v 1.16 2009/08/13 03:53:13 matt Exp $); + +#ifdef _KERNEL_OPT +#include opt_execfmt.h +#endif #include sys/param.h #include sys/systm.h @@ -40,6 +44,7 @@ #include sys/exec.h #include sys/resourcevar.h +#ifdef EXEC_AOUT /* * exec_aout_prep_oldzmagic(): * Prepare the vmcmds to build a vmspace for an old ZMAGIC @@ -174,3 +179,4 @@ epp-ep_dsize = (dsize 0) ? dsize : 0; return (*epp-ep_esch-es_setup_stack)(l, epp); } +#endif /* EXEC_AOUT */
CVS commit: src/sys/compat/linux/arch/mips
Module Name:src Committed By: matt Date: Thu Aug 13 03:56:32 UTC 2009 Modified Files: src/sys/compat/linux/arch/mips: linux_exec.h Log Message: Don't include EXEC_AOUT stuff by default. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/compat/linux/arch/mips/linux_exec.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/arch/mips/linux_exec.h diff -u src/sys/compat/linux/arch/mips/linux_exec.h:1.13 src/sys/compat/linux/arch/mips/linux_exec.h:1.14 --- src/sys/compat/linux/arch/mips/linux_exec.h:1.13 Mon Apr 28 20:23:43 2008 +++ src/sys/compat/linux/arch/mips/linux_exec.h Thu Aug 13 03:56:32 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_exec.h,v 1.13 2008/04/28 20:23:43 martin Exp $ */ +/* $NetBSD: linux_exec.h,v 1.14 2009/08/13 03:56:32 matt Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -32,7 +32,9 @@ #ifndef _MIPS_LINUX_EXEC_H #define _MIPS_LINUX_EXEC_H +#ifdef EXEC_AOUT #include sys/exec_aout.h +#endif #include sys/exec_elf.h #include sys/types.h @@ -41,11 +43,13 @@ */ #define LINUX_ELF_HWCAP (0) +#ifdef EXEC_AOUT /* * Linux a.out format parameters */ #define LINUX_M_MIPS MID_MIPS #define LINUX_MID_MACHINE LINUX_M_MIPS +#endif /* * Linux Elf32 format parameters
CVS commit: src/usr.bin/error
Module Name:src Committed By: dholland Date: Thu Aug 13 04:09:53 UTC 2009 Modified Files: src/usr.bin/error: Makefile filter.c touch.c Log Message: pass -Wshadow To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.bin/error/Makefile cvs rdiff -u -r1.13 -r1.14 src/usr.bin/error/filter.c cvs rdiff -u -r1.19 -r1.20 src/usr.bin/error/touch.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/error/Makefile diff -u src/usr.bin/error/Makefile:1.7 src/usr.bin/error/Makefile:1.8 --- src/usr.bin/error/Makefile:1.7 Tue Apr 14 22:15:19 2009 +++ src/usr.bin/error/Makefile Thu Aug 13 04:09:53 2009 @@ -1,7 +1,7 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 -# $NetBSD: Makefile,v 1.7 2009/04/14 22:15:19 lukem Exp $ +# $NetBSD: Makefile,v 1.8 2009/08/13 04:09:53 dholland Exp $ -WARNS?= 1 # fails -Wcast-qual -Wshadow (etc) +WARNS?= 2 # fails -Wcast-qual -Wshadow (etc) PROG= error SRCS= main.c input.c pi.c subr.c filter.c touch.c Index: src/usr.bin/error/filter.c diff -u src/usr.bin/error/filter.c:1.13 src/usr.bin/error/filter.c:1.14 --- src/usr.bin/error/filter.c:1.13 Thu Aug 13 03:50:02 2009 +++ src/usr.bin/error/filter.c Thu Aug 13 04:09:53 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: filter.c,v 1.13 2009/08/13 03:50:02 dholland Exp $ */ +/* $NetBSD: filter.c,v 1.14 2009/08/13 04:09:53 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)filter.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: filter.c,v 1.13 2009/08/13 03:50:02 dholland Exp $); +__RCSID($NetBSD: filter.c,v 1.14 2009/08/13 04:09:53 dholland Exp $); #endif /* not lint */ #include sys/param.h @@ -173,7 +173,6 @@ Errorclass discardit(Eptr errorp) { - int language; int i; Errorclass errorclass = errorp-error_e_class; @@ -186,8 +185,7 @@ if (errorp-error_lgtext 2) { return (C_NONSPEC); } - language = errorp-error_language; - if (language == INLINT) { + if (errorp-error_language == INLINT) { if (errorclass != C_NONSPEC) { /* no file */ for (i=0; lint_libs[i] != 0; i++) { if (strcmp(errorp-error_text[0], lint_libs[i]) == 0) { Index: src/usr.bin/error/touch.c diff -u src/usr.bin/error/touch.c:1.19 src/usr.bin/error/touch.c:1.20 --- src/usr.bin/error/touch.c:1.19 Thu Aug 13 03:50:02 2009 +++ src/usr.bin/error/touch.c Thu Aug 13 04:09:53 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: touch.c,v 1.19 2009/08/13 03:50:02 dholland Exp $ */ +/* $NetBSD: touch.c,v 1.20 2009/08/13 04:09:53 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)touch.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: touch.c,v 1.19 2009/08/13 03:50:02 dholland Exp $); +__RCSID($NetBSD: touch.c,v 1.20 2009/08/13 04:09:53 dholland Exp $); #endif /* not lint */ #include sys/param.h @@ -54,9 +54,12 @@ * Iterate through errors */ #define EITERATE(p, fv, i) for (p = fv[i]; p fv[i+1]; p++) -#define ECITERATE(ei, p, lb) for (ei = lb; p = errors[ei],ei nerrors; ei++) +#define ECITERATE(ei, p, lb, errs, nerrs) \ + for (ei = lb; p = errs[ei],ei nerrs; ei++) + +#define FILEITERATE(fi, lb, num) \ + for (fi = lb; fi = num; fi++) -#define FILEITERATE(fi, lb) for (fi = lb; fi = nfiles; fi++) static int touchstatus = Q_YES; extern char *suffixlist; @@ -87,28 +90,28 @@ static int probethisfile(const char *); void -findfiles(int nerrors, Eptr *errors, int *r_nfiles, Eptr ***r_files) +findfiles(int my_nerrors, Eptr *my_errors, int *r_nfiles, Eptr ***r_files) { - int nfiles; - Eptr **files; + int my_nfiles; + Eptr **my_files; const char *name; int ei; int fi; Eptr errorp; - nfiles = countfiles(errors); + my_nfiles = countfiles(my_errors); - files = (Eptr**)Calloc(nfiles + 3, sizeof (Eptr*)); - touchedfiles = (boolean *)Calloc(nfiles+3, sizeof(boolean)); + my_files = (Eptr**)Calloc(my_nfiles + 3, sizeof (Eptr*)); + touchedfiles = (boolean *)Calloc(my_nfiles+3, sizeof(boolean)); /* * Now, partition off the error messages * into those that are synchronization, discarded or * not specific to any file, and those that were * nulled or true errors. */ - files[0] = errors[0]; - ECITERATE(ei, errorp, 0) { + my_files[0] = my_errors[0]; + ECITERATE(ei, errorp, 0, my_errors, my_nerrors) { if ( ! (NOTSORTABLE(errorp-error_e_class))) break; } @@ -116,24 +119,24 @@ * Now, and partition off all error messages * for a given file. */ - files[1] = errors[ei]; + my_files[1] = my_errors[ei]; touchedfiles[0] = touchedfiles[1] = FALSE; name = \1; fi = 1; - ECITERATE(ei, errorp, ei) { + ECITERATE(ei, errorp, ei, my_errors, my_nerrors) { if ((errorp-error_e_class == C_NULLED) || (errorp-error_e_class == C_TRUE)) { if (strcmp(errorp-error_text[0], name) != 0) { name = errorp-error_text[0]; touchedfiles[fi] = FALSE; -files[fi] = errors[ei]; +my_files[fi] = my_errors[ei];
CVS commit: src/usr.bin/error
Module Name:src Committed By: dholland Date: Thu Aug 13 05:53:58 UTC 2009 Modified Files: src/usr.bin/error: error.h filter.c input.c main.c pi.c subr.c touch.c Log Message: Assorted minor cleanup: - use stdbool.h (partly) - move extern declarations of data to header files - use right types for calloc() wrapper - remove bogus casts on return values - remove excessive Pascal-style parentheses in conditionals - a couple const fixes - fix some typos in comments To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.bin/error/error.h cvs rdiff -u -r1.14 -r1.15 src/usr.bin/error/filter.c \ src/usr.bin/error/input.c cvs rdiff -u -r1.15 -r1.16 src/usr.bin/error/main.c src/usr.bin/error/pi.c cvs rdiff -u -r1.17 -r1.18 src/usr.bin/error/subr.c cvs rdiff -u -r1.20 -r1.21 src/usr.bin/error/touch.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/error/error.h diff -u src/usr.bin/error/error.h:1.13 src/usr.bin/error/error.h:1.14 --- src/usr.bin/error/error.h:1.13 Thu Aug 13 03:50:02 2009 +++ src/usr.bin/error/error.h Thu Aug 13 05:53:58 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: error.h,v 1.13 2009/08/13 03:50:02 dholland Exp $ */ +/* $NetBSD: error.h,v 1.14 2009/08/13 05:53:58 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -31,13 +31,9 @@ * @(#)error.h 8.1 (Berkeley) 6/6/93 */ -typedef int boolean; - -#define TRUE 1 -#define FALSE 0 +#include stdbool.h -#define true 1 -#define false 0 +typedef int boolean; /* * Descriptors for the various languages we know about. @@ -113,6 +109,8 @@ extern char *processname; extern char *scriptname; +extern char *suffixlist; + extern boolean query; extern boolean terse; int inquire(const char *, ...); /* inquire for yes/no */ @@ -187,6 +185,10 @@ extern int nerrors; extern Eptr er_head; +extern int cur_wordc; +extern char **cur_wordv; + + /* * Resources for each of the files mentioned */ @@ -205,7 +207,7 @@ * Functional forwards */ void arrayify(int *, Eptr **, Eptr); -char *Calloc(int, int); +void *Calloc(size_t, size_t); void clob_last(char *, char); Errorclass discardit(Eptr); void eaterrors(int *, Eptr **); @@ -217,13 +219,13 @@ char lastchar(const char *); char next_lastchar(const char *); void onintr(int); -boolean persperdexplode(char *, char **, char **); +bool persperdexplode(char *, char **, char **); Errorclass pi(void); int position(const char *, char); -void printerrors(boolean, int, Eptr []); +void printerrors(bool, int, Eptr []); const char *plural(int); char *substitute(char *, char, char); -boolean touchfiles(int, Eptr **, int *, char ***); +bool touchfiles(int, Eptr **, int *, char ***); const char *verbform(int); void wordvbuild(char *, int*, char ***); int wordvcmp(char **, int, char **); Index: src/usr.bin/error/filter.c diff -u src/usr.bin/error/filter.c:1.14 src/usr.bin/error/filter.c:1.15 --- src/usr.bin/error/filter.c:1.14 Thu Aug 13 04:09:53 2009 +++ src/usr.bin/error/filter.c Thu Aug 13 05:53:58 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: filter.c,v 1.14 2009/08/13 04:09:53 dholland Exp $ */ +/* $NetBSD: filter.c,v 1.15 2009/08/13 05:53:58 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)filter.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: filter.c,v 1.14 2009/08/13 04:09:53 dholland Exp $); +__RCSID($NetBSD: filter.c,v 1.15 2009/08/13 05:53:58 dholland Exp $); #endif /* not lint */ #include sys/param.h @@ -75,14 +75,14 @@ nignored = 0; if (auxname == 0) { /* use the default */ - if ((username = (char *)getlogin()) == NULL) { + if ((username = getlogin()) == NULL) { username = Unknown; uid = getuid(); - if ((passwdentry = (struct passwd *)getpwuid(uid)) == NULL) { + if ((passwdentry = getpwuid(uid)) == NULL) { return; } } else { - if ((passwdentry = (struct passwd *)getpwnam(username)) == NULL) + if ((passwdentry = getpwnam(username)) == NULL) return; } strlcpy(filename, passwdentry-pw_dir, sizeof(filename)); @@ -107,7 +107,7 @@ for (nignored = 0; fgets(inbuffer, sizeof(inbuffer)-1, fyle) != NULL; nignored++) continue; - names_ignored = (char **)Calloc(nignored+1, sizeof (char *)); + names_ignored = Calloc(nignored+1, sizeof (char *)); fclose(fyle); if (freopen(filename, r, fyle) == NULL) { #ifdef FULLDEBUG Index: src/usr.bin/error/input.c diff -u src/usr.bin/error/input.c:1.14 src/usr.bin/error/input.c:1.15 --- src/usr.bin/error/input.c:1.14 Thu Aug 13 03:50:02 2009 +++ src/usr.bin/error/input.c Thu Aug 13 05:53:58 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: input.c,v 1.14 2009/08/13 03:50:02 dholland Exp $ */ +/* $NetBSD: input.c,v 1.15 2009/08/13 05:53:58 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)input.c 8.1 (Berkeley) 6/6/93; #endif -__RCSID($NetBSD: input.c,v 1.14
CVS commit: src/games/fortune
Module Name:src Committed By: dholland Date: Wed Aug 12 06:06:28 UTC 2009 Modified Files: src/games/fortune/fortune: fortune.c src/games/fortune/strfile: strfile.c Log Message: sprinkle static To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/games/fortune/fortune/fortune.c cvs rdiff -u -r1.28 -r1.29 src/games/fortune/strfile/strfile.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/fortune/fortune/fortune.c diff -u src/games/fortune/fortune/fortune.c:1.51 src/games/fortune/fortune/fortune.c:1.52 --- src/games/fortune/fortune/fortune.c:1.51 Sun Jul 20 01:03:21 2008 +++ src/games/fortune/fortune/fortune.c Wed Aug 12 06:06:28 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: fortune.c,v 1.51 2008/07/20 01:03:21 lukem Exp $ */ +/* $NetBSD: fortune.c,v 1.52 2009/08/12 06:06:28 dholland Exp $ */ /*- * Copyright (c) 1986, 1993 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = @(#)fortune.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: fortune.c,v 1.51 2008/07/20 01:03:21 lukem Exp $); +__RCSID($NetBSD: fortune.c,v 1.52 2009/08/12 06:06:28 dholland Exp $); #endif #endif /* not lint */ @@ -99,73 +99,72 @@ struct fd *next, *prev; } FILEDESC; -bool Found_one; /* did we find a match? */ -bool Find_files = FALSE; /* just find a list of proper fortune files */ -bool Wait = FALSE; /* wait desired after fortune */ -bool Short_only = FALSE; /* short fortune desired */ -bool Long_only = FALSE; /* long fortune desired */ -bool Offend = FALSE; /* offensive fortunes only */ -bool All_forts = FALSE; /* any fortune allowed */ -bool Equal_probs = FALSE; /* scatter un-allocted prob equally */ +static bool Found_one; /* did we find a match? */ +static bool Find_files = FALSE; /* just find a list of proper fortune files */ +static bool Wait = FALSE; /* wait desired after fortune */ +static bool Short_only = FALSE; /* short fortune desired */ +static bool Long_only = FALSE; /* long fortune desired */ +static bool Offend = FALSE; /* offensive fortunes only */ +static bool All_forts = FALSE; /* any fortune allowed */ +static bool Equal_probs = FALSE; /* scatter un-allocted prob equally */ #ifndef NO_REGEX -bool Match = FALSE; /* dump fortunes matching a pattern */ +static bool Match = FALSE; /* dump fortunes matching a pattern */ #endif #ifdef DEBUG -bool Debug = FALSE; /* print debug messages */ +static bool Debug = FALSE; /* print debug messages */ #endif -char *Fortbuf = NULL; /* fortune buffer for -m */ +static char *Fortbuf = NULL; /* fortune buffer for -m */ -int Fort_len = 0; +static int Fort_len = 0; -off_t Seekpts[2]; /* seek pointers to fortunes */ +static off_t Seekpts[2]; /* seek pointers to fortunes */ -FILEDESC *File_list = NULL, /* Head of file list */ +static FILEDESC *File_list = NULL, /* Head of file list */ *File_tail = NULL; /* Tail of file list */ -FILEDESC *Fortfile; /* Fortune file to use */ +static FILEDESC *Fortfile; /* Fortune file to use */ -STRFILE Noprob_tbl; /* sum of data for all no prob files */ +static STRFILE Noprob_tbl; /* sum of data for all no prob files */ -int add_dir(FILEDESC *); -int add_file(int, +static int add_dir(FILEDESC *); +static int add_file(int, const char *, const char *, FILEDESC **, FILEDESC **, FILEDESC *); -void all_forts(FILEDESC *, const char *); -char *copy(const char *, u_int); -void rot13(char *line, int len); -void display(FILEDESC *); -void do_free(void *); -void *do_malloc(u_int); -int form_file_list(char **, int); -int fortlen(void); -void get_fort(void); -void get_pos(FILEDESC *); -void get_tbl(FILEDESC *); -void getargs(int, char *[]); -void init_prob(void); -int is_dir(const char *); -int is_fortfile(const char *, char **, char **, int); -int is_off_name(const char *); -int main(int, char *[]); -int max(int, int); -FILEDESC * - new_fp(void); -char *off_name(const char *); -void open_dat(FILEDESC *); -void open_fp(FILEDESC *); -FILEDESC * - pick_child(FILEDESC *); -void print_file_list(void); -void print_list(FILEDESC *, int); -void sum_noprobs(FILEDESC *); -void sum_tbl(STRFILE *, STRFILE *); -void usage(void) __dead; -void zero_tbl(STRFILE *); +static void all_forts(FILEDESC *, const char *); +static char *copy(const char *, u_int); +static void rot13(char *line, int len); +static void display(FILEDESC *); +static void do_free(void *); +static void *do_malloc(u_int); +static int form_file_list(char **, int); +static int fortlen(void); +static void get_fort(void); +static void get_pos(FILEDESC *); +static void get_tbl(FILEDESC *); +static void getargs(int, char *[]); +static void init_prob(void); +static int is_dir(const char *); +static int is_fortfile(const char *, char **, char **, int); +static int is_off_name(const char *); +static int max(int, int); +static FILEDESC *new_fp(void); +static char *off_name(const char *); +static void
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Wed Aug 12 07:46:36 UTC 2009 Modified Files: src/sys/arch/hppa/hppa: pmap.c Log Message: Remove NOP flushes. pvh_list == NULL. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/arch/hppa/hppa/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.50 src/sys/arch/hppa/hppa/pmap.c:1.51 --- src/sys/arch/hppa/hppa/pmap.c:1.50 Wed Aug 12 07:42:36 2009 +++ src/sys/arch/hppa/hppa/pmap.c Wed Aug 12 07:46:36 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.50 2009/08/12 07:42:36 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.51 2009/08/12 07:46:36 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.50 2009/08/12 07:42:36 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.51 2009/08/12 07:46:36 skrll Exp $); #include sys/param.h #include sys/systm.h @@ -1736,7 +1736,6 @@ KASSERT(pg-mdpage.pvh_list == NULL); - pmap_flush_page(pg, true); memset((void *)pa, 0, PAGE_SIZE); fdcache(HPPA_SID_KERNEL, pa, PAGE_SIZE); } @@ -1758,7 +1757,6 @@ KASSERT(dstpg-mdpage.pvh_list == NULL); pmap_flush_page(srcpg, false); - pmap_flush_page(dstpg, true); memcpy((void *)dpa, (void *)spa, PAGE_SIZE);
CVS commit: src/games/larn
Module Name:src Committed By: dholland Date: Wed Aug 12 08:04:05 UTC 2009 Modified Files: src/games/larn: bill.c display.c extern.h fortune.c help.c io.c main.c monster.c movem.c object.c scores.c store.c Log Message: sprinkle static To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/games/larn/bill.c cvs rdiff -u -r1.8 -r1.9 src/games/larn/display.c cvs rdiff -u -r1.12 -r1.13 src/games/larn/extern.h cvs rdiff -u -r1.6 -r1.7 src/games/larn/fortune.c src/games/larn/movem.c cvs rdiff -u -r1.7 -r1.8 src/games/larn/help.c cvs rdiff -u -r1.23 -r1.24 src/games/larn/io.c src/games/larn/main.c cvs rdiff -u -r1.16 -r1.17 src/games/larn/monster.c cvs rdiff -u -r1.14 -r1.15 src/games/larn/object.c src/games/larn/store.c cvs rdiff -u -r1.17 -r1.18 src/games/larn/scores.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/larn/bill.c diff -u src/games/larn/bill.c:1.9 src/games/larn/bill.c:1.10 --- src/games/larn/bill.c:1.9 Sun Feb 3 03:49:15 2008 +++ src/games/larn/bill.c Wed Aug 12 08:04:05 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bill.c,v 1.9 2008/02/03 03:49:15 dholland Exp $ */ +/* $NetBSD: bill.c,v 1.10 2009/08/12 08:04:05 dholland Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)bill.c 5.2 (Berkeley) 5/28/91; #else -__RCSID($NetBSD: bill.c,v 1.9 2008/02/03 03:49:15 dholland Exp $); +__RCSID($NetBSD: bill.c,v 1.10 2009/08/12 08:04:05 dholland Exp $); #endif #endif /* not lint */ @@ -50,7 +50,7 @@ /* bill.c Larn is copyrighted 1986 by Noah Morgan. */ -const char *mail[] = { +static const char *mail[] = { From: the LRS (Larn Revenue Service)\n, ~s undeclared income\n, \n We have heard you survived the caverns of Larn. Let me be the, Index: src/games/larn/display.c diff -u src/games/larn/display.c:1.8 src/games/larn/display.c:1.9 --- src/games/larn/display.c:1.8 Sun Feb 3 19:20:41 2008 +++ src/games/larn/display.c Wed Aug 12 08:04:05 2009 @@ -1,9 +1,9 @@ -/* $NetBSD: display.c,v 1.8 2008/02/03 19:20:41 dholland Exp $ */ +/* $NetBSD: display.c,v 1.9 2009/08/12 08:04:05 dholland Exp $ */ /* display.c Larn is copyrighted 1986 by Noah Morgan. */ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: display.c,v 1.8 2008/02/03 19:20:41 dholland Exp $); +__RCSID($NetBSD: display.c,v 1.9 2009/08/12 08:04:05 dholland Exp $); #endif /* not lint */ #include header.h @@ -19,7 +19,7 @@ static int minx, maxx, miny, maxy, k, m; static char bot1f = 0, bot2f = 0, bot3f = 0; -charalways = 0; +static char always = 0; /* bottomline() @@ -241,7 +241,7 @@ * If entire lines are being drawn, then they will be cleared first. */ /* for limited screen drawing */ -int d_xmin = 0, d_xmax = MAXX, d_ymin = 0, d_ymax = MAXY; +static int d_xmin = 0, d_xmax = MAXX, d_ymin = 0, d_ymax = MAXY; void draws(xmin, xmax, ymin, ymax) @@ -280,7 +280,8 @@ subroutine to redraw the whole screen as the player knows it */ -u_charscreen[MAXX][MAXY], d_flag; /* template for the screen */ +u_charscreen[MAXX][MAXY]; /* template for the screen */ +static u_char d_flag; void drawscreen() { Index: src/games/larn/extern.h diff -u src/games/larn/extern.h:1.12 src/games/larn/extern.h:1.13 --- src/games/larn/extern.h:1.12 Tue Feb 19 06:05:26 2008 +++ src/games/larn/extern.h Wed Aug 12 08:04:05 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.12 2008/02/19 06:05:26 dholland Exp $ */ +/* $NetBSD: extern.h,v 1.13 2009/08/12 08:04:05 dholland Exp $ */ /* * Copyright (c) 1997 Christos Zoulas. All rights reserved. @@ -113,7 +113,6 @@ /* help.c */ void help(void); void welcome(void); -void retcont(void); /* io.c */ void setupvt100(void); @@ -150,29 +149,9 @@ /* main.c */ int main(int, char **); -void showstr(void); void qshowstr(void); -void t_setup(int); -void t_endup(int); -void showwear(void); -void showwield(void); -void showread(void); -void showeat(void); -void showquaff(void); -void show1(int, const char *[]); void show3(int); -void randmonst(void); -void parse(void); void parse2(void); -void run(int); -void wield(void); -void ydhi(int); -void ycwi(int); -void wear(void); -void dropobj(void); -void readscr(void); -void eatcookie(void); -void quaff(void); unsigned long readnum(long); void szero(char *); @@ -180,20 +159,9 @@ void createmonster(int); void createitem(int, int); void cast(void); -void speldamage(int); -void loseint(void); -int isconfuse(void); -int nospell(int, int); -int fullhit(int); -void direct(int, int, const char *, int); void godirect(int, int, const char *, int, int); -void ifblind(int, int); -void tdirect(int); -void omnidirect(int, int, const char *); int vxy(int *, int *); -void dirpoly(int); void hitmonster(int, int); -int hitm(int, int, int); void hitplayer(int, int); void
CVS commit: src/games/mille
Module Name:src Committed By: dholland Date: Wed Aug 12 08:07:27 UTC 2009 Modified Files: src/games/mille: extern.c mille.h move.c print.c Log Message: sprinkle static To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/games/mille/extern.c cvs rdiff -u -r1.16 -r1.17 src/games/mille/mille.h src/games/mille/move.c cvs rdiff -u -r1.14 -r1.15 src/games/mille/print.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/mille/extern.c diff -u src/games/mille/extern.c:1.9 src/games/mille/extern.c:1.10 --- src/games/mille/extern.c:1.9 Mon May 25 23:34:50 2009 +++ src/games/mille/extern.c Wed Aug 12 08:07:27 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.c,v 1.9 2009/05/25 23:34:50 dholland Exp $ */ +/* $NetBSD: extern.c,v 1.10 2009/08/12 08:07:27 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)extern.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: extern.c,v 1.9 2009/05/25 23:34:50 dholland Exp $); +__RCSID($NetBSD: extern.c,v 1.10 2009/08/12 08:07:27 dholland Exp $); #endif #endif /* not lint */ @@ -52,9 +52,9 @@ Saved; /* set if game just saved */ char Initstr[INITSTR_SIZE]; /* initial string for error field */ -const char *C_fmt = %-18.18s, /* format for printing cards */ - *Fromfile = NULL, /* startup file for game */ - *const _cn[NUM_CARDS] = { /* Card name buffer */ +const char *C_fmt = %-18.18s; /* format for printing cards */ +const char *Fromfile = NULL; /* startup file for game */ +static const char *const _cn[NUM_CARDS] = {/* Card name buffer */ , 25, 50, @@ -75,8 +75,8 @@ Puncture Proof, Driving Ace, Right of Way - }, - *const *C_name = _cn[1]; /* Card names */ +}; +const char *const *C_name = _cn[1]; /* Card names */ int Card_no, /* Card number for current move */ End, /* End value for current hand */ Index: src/games/mille/mille.h diff -u src/games/mille/mille.h:1.16 src/games/mille/mille.h:1.17 --- src/games/mille/mille.h:1.16 Mon May 25 23:44:04 2009 +++ src/games/mille/mille.h Wed Aug 12 08:07:27 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: mille.h,v 1.16 2009/05/25 23:44:04 dholland Exp $ */ +/* $NetBSD: mille.h,v 1.17 2009/08/12 08:07:27 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -235,7 +235,6 @@ void calcmove(void); int canplay(const PLAY *, const PLAY *, CARD); int check_ext(bool); -void check_go(void); void check_more(void); void die(int) __attribute__((__noreturn__)); void domove(void); @@ -243,16 +242,13 @@ void extrapolate(PLAY *); void finalscore(PLAY *); CARD getcard(void); -void getmove(void); int getyn(int); -int haspicked(const PLAY *); void init(void); int is_repair(CARD); int main(int, char **); void newboard(void); void newscore(void); int onecard(const PLAY *); -int playcard(PLAY *); void prboard(void); void prompt(int); void prscore(bool); @@ -262,8 +258,6 @@ void rub(int); int safety(CARD); bool save(void); -void show_card(int, int, CARD, CARD *); -void show_score(int, int, int, int *); void shuffle(void); void sort(CARD *); void undoex(int); Index: src/games/mille/move.c diff -u src/games/mille/move.c:1.16 src/games/mille/move.c:1.17 --- src/games/mille/move.c:1.16 Mon May 25 23:24:54 2009 +++ src/games/mille/move.c Wed Aug 12 08:07:27 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: move.c,v 1.16 2009/05/25 23:24:54 dholland Exp $ */ +/* $NetBSD: move.c,v 1.17 2009/08/12 08:07:27 dholland Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)move.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: move.c,v 1.16 2009/05/25 23:24:54 dholland Exp $); +__RCSID($NetBSD: move.c,v 1.17 2009/08/12 08:07:27 dholland Exp $); #endif #endif /* not lint */ @@ -56,6 +56,11 @@ #undef CTRL #define CTRL(c) (c - 'A' + 1) +static void check_go(void); +static int playcard(PLAY *); +static void getmove(void); +static int haspicked(const PLAY *); + void domove(void) { @@ -167,7 +172,7 @@ * Check and see if either side can go. If they cannot, * the game is over */ -void +static void check_go(void) { CARD card; @@ -198,7 +203,7 @@ Finished = TRUE; } -int +static int playcard(PLAY *pp) { int v; @@ -347,7 +352,7 @@ return TRUE; } -void +static void getmove(void) { char c; @@ -481,7 +486,7 @@ /* * return whether or not the player has picked */ -int +static int haspicked(const PLAY *pp) { int card; Index: src/games/mille/print.c diff -u src/games/mille/print.c:1.14 src/games/mille/print.c:1.15 --- src/games/mille/print.c:1.14 Mon May 25 23:34:50 2009 +++ src/games/mille/print.c Wed Aug 12 08:07:27 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: print.c,v 1.14 2009/05/25 23:34:50 dholland Exp $ */ +/* $NetBSD: print.c,v 1.15 2009/08/12 08:07:27 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)print.c 8.1 (Berkeley) 5/31/93;
CVS commit: src/games/morse
Module Name:src Committed By: dholland Date: Wed Aug 12 08:11:37 UTC 2009 Modified Files: src/games/morse: morse.c Log Message: sprinkle static To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/games/morse/morse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/morse/morse.c diff -u src/games/morse/morse.c:1.15 src/games/morse/morse.c:1.16 --- src/games/morse/morse.c:1.15 Sun Jul 20 01:03:21 2008 +++ src/games/morse/morse.c Wed Aug 12 08:11:37 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: morse.c,v 1.15 2008/07/20 01:03:21 lukem Exp $ */ +/* $NetBSD: morse.c,v 1.16 2009/08/12 08:11:37 dholland Exp $ */ /* * Copyright (c) 1988, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)morse.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: morse.c,v 1.15 2008/07/20 01:03:21 lukem Exp $); +__RCSID($NetBSD: morse.c,v 1.16 2009/08/12 08:11:37 dholland Exp $); #endif #endif /* not lint */ @@ -91,7 +91,7 @@ --.., }; -const struct punc { +static const struct punc { char c; const char *morse; } other[] = { @@ -111,9 +111,9 @@ }; int main(int, char *[]); -void morse(int); -void decode(const char *); -void show(const char *); +static void morse(int); +static void decode(const char *); +static void show(const char *); static int sflag; static int dflag;
CVS commit: src/games/number
Module Name:src Committed By: dholland Date: Wed Aug 12 08:12:21 UTC 2009 Modified Files: src/games/number: number.c Log Message: sprinkle static To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/games/number/number.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/number/number.c diff -u src/games/number/number.c:1.12 src/games/number/number.c:1.13 --- src/games/number/number.c:1.12 Sun Jul 20 01:03:21 2008 +++ src/games/number/number.c Wed Aug 12 08:12:20 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: number.c,v 1.12 2008/07/20 01:03:21 lukem Exp $ */ +/* $NetBSD: number.c,v 1.13 2009/08/12 08:12:20 dholland Exp $ */ /* * Copyright (c) 1988, 1993, 1994 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)number.c 8.3 (Berkeley) 5/4/95; #else -__RCSID($NetBSD: number.c,v 1.12 2008/07/20 01:03:21 lukem Exp $); +__RCSID($NetBSD: number.c,v 1.13 2009/08/12 08:12:20 dholland Exp $); #endif #endif /* not lint */ @@ -76,14 +76,14 @@ novemdecillion, vigintillion, }; -void convert(char *); int main(int, char *[]); -int number(const char *, int); -void pfract(int); -int unit(int, const char *); -void usage(void) __dead; +static void convert(char *); +static int number(const char *, int); +static void pfract(int); +static int unit(int, const char *); +static void usage(void) __dead; -int lflag; +static int lflag; int main(argc, argv)
CVS commit: src/games/phantasia
Module Name:src Committed By: dholland Date: Wed Aug 12 08:21:41 UTC 2009 Modified Files: src/games/phantasia: fight.c interplayer.c io.c main.c misc.c phantglobs.h Log Message: sprinkle static To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/games/phantasia/fight.c cvs rdiff -u -r1.10 -r1.11 src/games/phantasia/interplayer.c \ src/games/phantasia/phantglobs.h cvs rdiff -u -r1.12 -r1.13 src/games/phantasia/io.c cvs rdiff -u -r1.21 -r1.22 src/games/phantasia/main.c cvs rdiff -u -r1.17 -r1.18 src/games/phantasia/misc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/phantasia/fight.c diff -u src/games/phantasia/fight.c:1.11 src/games/phantasia/fight.c:1.12 --- src/games/phantasia/fight.c:1.11 Mon May 25 23:08:45 2009 +++ src/games/phantasia/fight.c Wed Aug 12 08:21:41 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: fight.c,v 1.11 2009/05/25 23:08:45 dholland Exp $ */ +/* $NetBSD: fight.c,v 1.12 2009/08/12 08:21:41 dholland Exp $ */ /* * fight.c Phantasia monster fighting routines @@ -8,6 +8,17 @@ #undef bool #include curses.h +static void awardtreasure(void); +static void callmonster(int); +static void cancelmonster(void); +static void cursedtreasure(void); +static void hitmonster(double); +static void monsthits(void); +static int pickmonster(void); +static void playerhits(void); +static void scramblestats(void); +static void throwspell(void); + void encounter(int particular) { @@ -152,7 +163,7 @@ clrtobot(); } -int +static int pickmonster(void) { if (Player.p_specialtype == SC_VALAR) @@ -192,7 +203,7 @@ return ((int) ROLL(14.0, 25.0)); } -void +static void playerhits(void) { double inflict; /* damage inflicted */ @@ -335,7 +346,7 @@ } -void +static void monsthits(void) { double inflict; /* damage inflicted */ @@ -585,7 +596,7 @@ } } -void +static void cancelmonster(void) { Curmonster.m_energy = 0.0; @@ -594,7 +605,7 @@ Curmonster.m_flock = 0.0; } -void +static void hitmonster(double inflict) { mvprintw(Lines++, 0, You hit %s %.0f times!, Enemyname, inflict); @@ -621,7 +632,7 @@ } } -void +static void throwspell(void) { double inflict; /* damage inflicted */ @@ -831,7 +842,7 @@ } } -void +static void callmonster(int which) { struct monster Othermonster; /* to find a name for mimics */ @@ -908,7 +919,7 @@ Curmonster.m_melee = Curmonster.m_skirmish = 0.0; } -void +static void awardtreasure(void) { int whichtreasure; /* calculated treasure to grant */ @@ -1332,7 +1343,7 @@ } } -void +static void cursedtreasure(void) { if (Player.p_charms 0) { @@ -1349,7 +1360,7 @@ } } -void +static void scramblestats(void) { double dbuf[6]; /* to put statistic in */ Index: src/games/phantasia/interplayer.c diff -u src/games/phantasia/interplayer.c:1.10 src/games/phantasia/interplayer.c:1.11 --- src/games/phantasia/interplayer.c:1.10 Mon May 25 23:08:45 2009 +++ src/games/phantasia/interplayer.c Wed Aug 12 08:21:41 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: interplayer.c,v 1.10 2009/05/25 23:08:45 dholland Exp $ */ +/* $NetBSD: interplayer.c,v 1.11 2009/08/12 08:21:41 dholland Exp $ */ /* * interplayer.c - player to player routines for Phantasia @@ -8,6 +8,11 @@ #undef bool #include curses.h +static long allocvoid(void); +static void battleplayer(long); +static void myturn(void); +static void tampered(int, double, double); + void checkbattle(void) { @@ -45,7 +50,7 @@ } } -void +static void battleplayer(long foeplace) { double dtemp; /* for temporary calculations */ @@ -273,7 +278,7 @@ death(Interterminal battle); } -void +static void myturn(void) { double dtemp; /* for temporary calculations */ @@ -384,7 +389,7 @@ tampered(Other.p_tampered, Other.p_1scratch, Other.p_2scratch); } -void +static void tampered(int what, double arg1, double arg2) { longloc; /* location in file of other players */ @@ -866,7 +871,7 @@ fseek(Energyvoidfp, 0L, SEEK_SET); } -long +static long allocvoid(void) { longloc = 0L; /* location of new energy void */ Index: src/games/phantasia/phantglobs.h diff -u src/games/phantasia/phantglobs.h:1.10 src/games/phantasia/phantglobs.h:1.11 --- src/games/phantasia/phantglobs.h:1.10 Mon May 25 22:35:01 2009 +++ src/games/phantasia/phantglobs.h Wed Aug 12 08:21:41 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: phantglobs.h,v 1.10 2009/05/25 22:35:01 dholland Exp $ */ +/* $NetBSD: phantglobs.h,v 1.11 2009/08/12 08:21:41 dholland Exp $ */ /* * phantglobs.h - global declarations for Phantasia @@ -66,20 +66,13 @@ void activelist(void); void adjuststats(void); long allocrecord(void); -long allocvoid(void); void allstatslist(void); void altercoordinates(double, double, int); -void awardtreasure(void); -void battleplayer(long); -void callmonster(int); -void cancelmonster(void); -void catchalarm(int) __dead; void