From 815943a9a1f6f09a47f8144a50c7ce1bd2138967 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Thu, 16 Oct 2008 01:52:34 +0000 Subject: [PATCH] * Silence -Wold-style-definition (i.e., ansify). * Remove 'register'. * Remove P() and friends. --- usr.bin/colldef/scan.l | 4 +- usr.bin/ctags/test/ctags.test | 4 +- usr.bin/doscmd/AsyncIO.c | 4 +- usr.bin/doscmd/dos.c | 6 +- usr.bin/doscmd/i386-pinsn.c | 4 +- usr.bin/ee/ee.c | 190 ++++++++++++++++++++---------------------- usr.bin/gencat/gencat.c | 84 +++++++------------ usr.bin/gprof/gprof.c | 4 +- usr.bin/kdump/kdump.c | 26 +++--- usr.bin/lex/flex.skl | 39 +++++---- usr.bin/lex/gen.c | 14 ++-- usr.bin/lex/lex.1 | 4 +- usr.bin/lex/parse.y | 4 +- usr.bin/lex/scan.l | 4 +- usr.bin/pr/egetopt.c | 6 +- usr.bin/pr/pr.c | 92 ++++++++++---------- usr.bin/rdist/docmd.c | 48 +++++------ usr.bin/rdist/expand.c | 40 ++++----- usr.bin/rdist/gram.y | 27 +++--- usr.bin/rdist/lookup.c | 12 +-- usr.bin/rdist/main.c | 10 +-- usr.bin/rdist/server.c | 32 +++---- usr.bin/renice/renice.c | 4 +- usr.bin/rev/rev.c | 4 +- usr.bin/rpcgen/rpc_cout.c | 13 ++- usr.bin/rpcgen/rpc_main.c | 18 ++-- usr.bin/rpcgen/rpc_scan.c | 6 +- usr.bin/rpcgen/rpc_svcout.c | 5 +- usr.bin/rusers/rusers.c | 6 +- usr.bin/rwho/rwho.c | 4 +- usr.bin/symorder/symorder.c | 30 +++---- usr.bin/systat/cmds.c | 16 ++-- usr.bin/systat/devs.c | 10 +-- usr.bin/systat/icmp6.c | 5 +- usr.bin/systat/iostat.c | 12 +-- usr.bin/systat/ip6.c | 5 +- usr.bin/systat/main.c | 4 +- usr.bin/systat/mbufs.c | 4 +- usr.bin/systat/netcmds.c | 20 ++--- usr.bin/systat/netstat.c | 14 ++-- usr.bin/systat/pigs.c | 4 +- usr.bin/systat/swap.c | 4 +- usr.bin/systat/vmstat.c | 8 +- usr.bin/talk/get_names.c | 4 +- usr.bin/talk/look_up.c | 4 +- usr.bin/tcopy/tcopy.c | 10 +-- usr.bin/telnet/externs.h | 10 +-- usr.bin/telnet/ring.h | 12 +-- usr.bin/tftp/main.c | 32 +++---- usr.bin/tftp/tftp.c | 18 ++-- usr.bin/tftp/tftpsubs.c | 18 ++-- usr.bin/top/machine.c | 78 ++++++++--------- usr.bin/truss/i386-fbsd.c | 4 +- usr.bin/tset/misc.c | 4 +- usr.bin/tset/wrterm.c | 6 +- usr.bin/uniq/uniq.c | 8 +- usr.bin/vgrind/regexp.c | 20 ++--- usr.bin/vgrind/vfontedpr.c | 18 ++-- usr.bin/vgrind/vgrindefs.c | 28 +++---- usr.bin/vis/foldit.c | 4 +- usr.bin/vis/vis.c | 6 +- 61 files changed, 539 insertions(+), 599 deletions(-) diff --git a/usr.bin/colldef/scan.l b/usr.bin/colldef/scan.l index df253b5840..64b2256eaa 100644 --- a/usr.bin/colldef/scan.l +++ b/usr.bin/colldef/scan.l @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.bin/colldef/scan.l,v 1.11.2.2 2002/10/11 10:43:45 ache Exp $ - * $DragonFly: src/usr.bin/colldef/scan.l,v 1.3 2005/03/02 07:16:23 joerg Exp $ + * $DragonFly: src/usr.bin/colldef/scan.l,v 1.4 2008/10/16 01:52:32 swildner Exp $ */ #include @@ -278,7 +278,7 @@ int yylex(void); } %% #ifdef FLEX_DEBUG -main() +main(void) { while(yylex()) ; diff --git a/usr.bin/ctags/test/ctags.test b/usr.bin/ctags/test/ctags.test index 1f334ac2b8..abfdd44270 100644 --- a/usr.bin/ctags/test/ctags.test +++ b/usr.bin/ctags/test/ctags.test @@ -1,3 +1,5 @@ +/* $DragonFly: src/usr.bin/ctags/test/ctags.test,v 1.2 2008/10/16 01:52:32 swildner Exp $ */ + int bar = (1 + 5); FOO("here is a #define test: ) {"); @@ -55,7 +57,7 @@ routine1(one,two) /* comments here are fun... */ char two[10]; { typedef unsigned char u_char; - register struct buf *bp; + struct buf *bp; five(one,two); } routine2 (one,two) { puts("hello\n"); } diff --git a/usr.bin/doscmd/AsyncIO.c b/usr.bin/doscmd/AsyncIO.c index d7336e3d72..1f81a2071b 100644 --- a/usr.bin/doscmd/AsyncIO.c +++ b/usr.bin/doscmd/AsyncIO.c @@ -30,7 +30,7 @@ * BSDI AsyncIO.c,v 2.2 1996/04/08 19:32:10 bostic Exp * * $FreeBSD: src/usr.bin/doscmd/AsyncIO.c,v 1.3.2.3 2002/05/21 11:49:47 tg Exp $ - * $DragonFly: src/usr.bin/doscmd/AsyncIO.c,v 1.2 2003/06/17 04:29:25 dillon Exp $ + * $DragonFly: src/usr.bin/doscmd/AsyncIO.c,v 1.3 2008/10/16 01:52:32 swildner Exp $ */ #include @@ -126,7 +126,7 @@ printf("%d: Invalid FD\n", fd); } static void -CleanIO() +CleanIO(void) { int x; static struct timeval tv; diff --git a/usr.bin/doscmd/dos.c b/usr.bin/doscmd/dos.c index 345c5af026..72eaa394f8 100644 --- a/usr.bin/doscmd/dos.c +++ b/usr.bin/doscmd/dos.c @@ -32,7 +32,7 @@ * BSDI int21.c,v 2.2 1996/04/08 19:32:51 bostic Exp * * $FreeBSD: src/usr.bin/doscmd/dos.c,v 1.7.2.5 2002/04/25 11:04:50 tg Exp $ - * $DragonFly: src/usr.bin/doscmd/dos.c,v 1.2 2003/06/17 04:29:25 dillon Exp $ + * $DragonFly: src/usr.bin/doscmd/dos.c,v 1.3 2008/10/16 01:52:32 swildner Exp $ */ #include @@ -2054,9 +2054,7 @@ setfcb_rec(struct fcb *fcbp, int n) } static void -fcb_to_string(fcbp, buf) - struct fcb *fcbp; - u_char *buf; +fcb_to_string(struct fcb *fcbp, u_char *buf) { if (fcbp->fcbDriveID != 0x00) { diff --git a/usr.bin/doscmd/i386-pinsn.c b/usr.bin/doscmd/i386-pinsn.c index 048b0a5184..62e993b376 100644 --- a/usr.bin/doscmd/i386-pinsn.c +++ b/usr.bin/doscmd/i386-pinsn.c @@ -1,6 +1,6 @@ /* * $FreeBSD: src/usr.bin/doscmd/i386-pinsn.c,v 1.1.6.1 2002/04/25 11:04:51 tg Exp $ - * $DragonFly: src/usr.bin/doscmd/i386-pinsn.c,v 1.3 2003/10/04 20:36:43 hmp Exp $ + * $DragonFly: src/usr.bin/doscmd/i386-pinsn.c,v 1.4 2008/10/16 01:52:32 swildner Exp $ */ #ifdef DISASSEMBLER @@ -1522,7 +1522,7 @@ oappend(const char *s) } static void -append_prefix() +append_prefix(void) { if (prefixes & PREFIX_CS) oappend ("%cs:"); diff --git a/usr.bin/ee/ee.c b/usr.bin/ee/ee.c index dc5d3cff18..294bf86996 100644 --- a/usr.bin/ee/ee.c +++ b/usr.bin/ee/ee.c @@ -50,7 +50,7 @@ | copyright. All rights are reserved. * * $FreeBSD: src/usr.bin/ee/ee.c,v 1.16.2.6 2002/05/11 16:33:06 mp Exp $ - * $DragonFly: src/usr.bin/ee/ee.c,v 1.4 2006/01/15 00:07:31 corecode Exp $ + * $DragonFly: src/usr.bin/ee/ee.c,v 1.5 2008/10/16 01:52:32 swildner Exp $ */ char *ee_copyright_message = @@ -222,13 +222,6 @@ WINDOW *help_win; WINDOW *info_win; WINDOW *count_win; -#if defined(__STDC__) || defined(__cplusplus) -#define P_(s) s -#else -#define P_(s) () -#endif - - /* | The following structure allows menu items to be flexibly declared. | The first item is the string describing the selection, the second @@ -250,101 +243,100 @@ WINDOW *count_win; struct menu_entries { char *item_string; - int (*procedure)P_((struct menu_entries *)); + int (*procedure)(struct menu_entries *); struct menu_entries *ptr_argument; - int (*iprocedure)P_((int)); - void (*nprocedure)P_((void)); + int (*iprocedure)(int); + void (*nprocedure)(void); int argument; }; -int main P_((int argc, char *argv[])); -unsigned char *resiz_line P_((int factor, struct text *rline, int rpos)); -void insert P_((int character)); -void delete P_((int disp)); -void scanline P_((unsigned char *pos)); -int tabshift P_((int temp_int)); -int out_char P_((WINDOW *window, int character, int column)); -int len_char P_((int character, int column)); -void draw_line P_((int vertical, int horiz, unsigned char *ptr, int t_pos, int length)); -void insert_line P_((int disp)); -struct text *txtalloc P_((void)); -struct files *name_alloc P_((void)); -unsigned char *next_word P_((unsigned char *string)); -void prev_word P_((void)); -void control P_((void)); -void emacs_control P_((void)); -void bottom P_((void)); -void top P_((void)); -void nextline P_((void)); -void prevline P_((void)); -void left P_((int disp)); -void right P_((int disp)); -void find_pos P_((void)); -void up P_((void)); -void down P_((void)); -void function_key P_((void)); -void print_buffer P_((void)); -void command_prompt P_((void)); -void command P_((char *cmd_str1)); -int scan P_((char *line, int offset, int column)); -char *get_string P_((char *prompt, int advance)); -int compare P_((char *string1, char *string2, int sensitive)); -void goto_line P_((char *cmd_str)); -void midscreen P_((int line, unsigned char *pnt)); -void get_options P_((int numargs, char *arguments[])); -void check_fp P_((void)); -void get_file P_((char *file_name)); -void get_line P_((int length, unsigned char *in_string, int *append)); -void draw_screen P_((void)); -void finish P_((void)); -int quit P_((int noverify)); -void edit_abort P_((int arg)); -void delete_text P_((void)); -int write_file P_((char *file_name, int warn_if_exists)); -int search P_((int display_message)); -void search_prompt P_((void)); -void del_char P_((void)); -void undel_char P_((void)); -void del_word P_((void)); -void undel_word P_((void)); -void del_line P_((void)); -void undel_line P_((void)); -void adv_word P_((void)); -void move_rel P_((char *direction, int lines)); -void eol P_((void)); -void bol P_((void)); -void adv_line P_((void)); -void sh_command P_((char *string)); -void set_up_term P_((void)); -void resize_check P_((void)); -int menu_op P_((struct menu_entries *)); -void paint_menu P_((struct menu_entries menu_list[], int max_width, int max_height, int list_size, int top_offset, WINDOW *menu_win, int off_start, int vert_size)); -void help P_((void)); -void paint_info_win P_((void)); -void no_info_window P_((void)); -void create_info_window P_((void)); -int file_op P_((int arg)); -void shell_op P_((void)); -void leave_op P_((void)); -void redraw P_((void)); -int Blank_Line P_((struct text *test_line)); -void Format P_((void)); -void ee_init P_((void)); -void dump_ee_conf P_((void)); -void echo_string P_((char *string)); -void spell_op P_((void)); -void ispell_op P_((void)); -int first_word_len P_((struct text *test_line)); -void Auto_Format P_((void)); -void modes_op P_((void)); -char *is_in_string P_((char *string, char *substring)); -char *resolve_name P_((char *name)); -int restrict_mode P_((void)); -int unique_test P_((char *string, char *list[])); -void renumber_lines P_((struct text *firstline, int startnumber)); -void strings_init P_((void)); - -#undef P_ +int main(int argc, char *argv[]); +unsigned char *resiz_line(int factor, struct text *rline, int rpos); +void insert(int character); +void delete(int disp); +void scanline(unsigned char *pos); +int tabshift(int temp_int); +int out_char(WINDOW *window, int character, int column); +int len_char(int character, int column); +void draw_line(int vertical, int horiz, unsigned char *ptr, int t_pos, int length); +void insert_line(int disp); +struct text *txtalloc(void); +struct files *name_alloc(void); +unsigned char *next_word(unsigned char *string); +void prev_word(void); +void control(void); +void emacs_control(void); +void bottom(void); +void top(void); +void nextline(void); +void prevline(void); +void left(int disp); +void right(int disp); +void find_pos(void); +void up(void); +void down(void); +void function_key(void); +void print_buffer(void); +void command_prompt(void); +void command(char *cmd_str1); +int scan(char *line, int offset, int column); +char *get_string(char *prompt, int advance); +int compare(char *string1, char *string2, int sensitive); +void goto_line(char *cmd_str); +void midscreen(int line, unsigned char *pnt); +void get_options(int numargs, char *arguments[]); +void check_fp(void); +void get_file(char *file_name); +void get_line(int length, unsigned char *in_string, int *append); +void draw_screen(void); +void finish(void); +int quit(int noverify); +void edit_abort(int arg); +void delete_text(void); +int write_file(char *file_name, int warn_if_exists); +int search(int display_message); +void search_prompt(void); +void del_char(void); +void undel_char(void); +void del_word(void); +void undel_word(void); +void del_line(void); +void undel_line(void); +void adv_word(void); +void move_rel(char *direction, int lines); +void eol(void); +void bol(void); +void adv_line(void); +void sh_command(char *string); +void set_up_term(void); +void resize_check(void); +int menu_op(struct menu_entries *); +void paint_menu(struct menu_entries menu_list[], int max_width, int max_height, int list_size, int top_offset, WINDOW *menu_win, int off_start, int vert_size); +void help(void); +void paint_info_win(void); +void no_info_window(void); +void create_info_window(void); +int file_op(int arg); +void shell_op(void); +void leave_op(void); +void redraw(void); +int Blank_Line(struct text *test_line); +void Format(void); +void ee_init(void); +void dump_ee_conf(void); +void echo_string(char *string); +void spell_op(void); +void ispell_op(void); +int first_word_len(struct text *test_line); +void Auto_Format(void); +void modes_op(void); +char *is_in_string(char *string, char *substring); +char *resolve_name(char *name); +int restrict_mode(void); +int unique_test(char *string, char *list[]); +void renumber_lines(struct text *firstline, int startnumber); +void strings_init(void); + /* | allocate space here for the strings that will be in the menu */ diff --git a/usr.bin/gencat/gencat.c b/usr.bin/gencat/gencat.c index 1412fc7274..b461aa8fd2 100644 --- a/usr.bin/gencat/gencat.c +++ b/usr.bin/gencat/gencat.c @@ -1,5 +1,5 @@ /* $NetBSD: src/usr.bin/gencat/gencat.c,v 1.19 2004/01/05 23:23:34 jmmv Exp $ */ -/* $DragonFly: src/usr.bin/gencat/gencat.c,v 1.4 2005/08/31 18:11:05 swildner Exp $ */ +/* $DragonFly: src/usr.bin/gencat/gencat.c,v 1.5 2008/10/16 01:52:32 swildner Exp $ */ /* * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -122,28 +122,26 @@ static char *xstrdup(const char *); static void *xmalloc(size_t); static void *xrealloc(void *, size_t); -void MCParse __P((int fd)); -void MCReadCat __P((int fd)); -void MCWriteCat __P((int fd)); -void MCDelMsg __P((int msgId)); -void MCAddMsg __P((int msgId, const char *msg)); -void MCAddSet __P((int setId)); -void MCDelSet __P((int setId)); -int main __P((int, char **)); -void usage __P((void)); +void MCParse(int fd); +void MCReadCat(int fd); +void MCWriteCat(int fd); +void MCDelMsg(int msgId); +void MCAddMsg(int msgId, const char *msg); +void MCAddSet(int setId); +void MCDelSet(int setId); +int main(int, char **); +void usage(void); void -usage() +usage(void) { fprintf(stderr, "usage: %s catfile msgfile ...\n", getprogname()); exit(1); } int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int ofd, ifd; char *catfile = NULL; @@ -179,9 +177,7 @@ main(argc, argv) } static void -warning(cptr, msg) - char *cptr; - char *msg; +warning(char *cptr, char *msg) { fprintf(stderr, "%s: %s on line %ld\n", getprogname(), msg, lineno); fprintf(stderr, "%s\n", curline); @@ -194,9 +190,7 @@ warning(cptr, msg) } static void -error(cptr, msg) - char *cptr; - char *msg; +error(char *cptr, char *msg) { warning(cptr, msg); exit(1); @@ -204,21 +198,20 @@ error(cptr, msg) #if 0 /* XXX unused */ static void -corrupt() +corrupt(void) { error(NULL, "corrupt message catalog"); } #endif static void -nomem() +nomem(void) { error(NULL, "out of memory"); } static void * -xmalloc(len) - size_t len; +xmalloc(size_t len) { void *p; @@ -228,9 +221,7 @@ xmalloc(len) } static void * -xrealloc(ptr, size) - void *ptr; - size_t size; +xrealloc(void *ptr, size_t size) { if ((ptr = realloc(ptr, size)) == NULL) nomem(); @@ -238,8 +229,7 @@ xrealloc(ptr, size) } static char * -xstrdup(str) - const char *str; +xstrdup(const char *str) { char *nstr; @@ -249,8 +239,7 @@ xstrdup(str) } static char * -getline(fd) - int fd; +getline(int fd) { static long curlen = BUFSIZ; static char buf[BUFSIZ], *bptr = buf, *bend = buf; @@ -293,8 +282,7 @@ getline(fd) } static char * -wskip(cptr) - char *cptr; +wskip(char *cptr) { if (!*cptr || !isspace((unsigned char) *cptr)) { warning(cptr, "expected a space"); @@ -306,8 +294,7 @@ wskip(cptr) } static char * -cskip(cptr) - char *cptr; +cskip(char *cptr) { if (!*cptr || isspace((unsigned char) *cptr)) { warning(cptr, "wasn't expecting a space"); @@ -319,10 +306,7 @@ cskip(cptr) } static char * -getmsg(fd, cptr, quote) - int fd; - char *cptr; - char quote; +getmsg(int fd, char *cptr, char quote) { static char *msg = NULL; static long msglen = 0; @@ -422,8 +406,7 @@ getmsg(fd, cptr, quote) } void -MCParse(fd) - int fd; +MCParse(int fd) { char *cptr, *str; int setid, msgid = 0; @@ -500,8 +483,7 @@ MCParse(fd) } void -MCReadCat(fd) - int fd; +MCReadCat(int fd) { #if 0 MCHeaderT mcHead; @@ -592,8 +574,7 @@ MCReadCat(fd) * that would otherwise be required. */ void -MCWriteCat(fd) - int fd; +MCWriteCat(int fd) { int nsets; /* number of sets */ int nmsgs; /* number of msgs */ @@ -698,8 +679,7 @@ MCWriteCat(fd) } void -MCAddSet(setId) - int setId; +MCAddSet(int setId) { struct _setT *p, *q; @@ -736,9 +716,7 @@ MCAddSet(setId) } void -MCAddMsg(msgId, str) - int msgId; - const char *str; +MCAddMsg(int msgId, const char *str) { struct _msgT *p, *q; @@ -776,8 +754,7 @@ MCAddMsg(msgId, str) } void -MCDelSet(setId) - int setId; +MCDelSet(int setId) { struct _setT *set; struct _msgT *msg; @@ -800,8 +777,7 @@ MCDelSet(setId) } void -MCDelMsg(msgId) - int msgId; +MCDelMsg(int msgId) { struct _msgT *msg; diff --git a/usr.bin/gprof/gprof.c b/usr.bin/gprof/gprof.c index 507c6e35f4..e188a0320f 100644 --- a/usr.bin/gprof/gprof.c +++ b/usr.bin/gprof/gprof.c @@ -33,7 +33,7 @@ * @(#) Copyright (c) 1983, 1993 The Regents of the University of California. All rights reserved. * @(#)gprof.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/gprof/gprof.c,v 1.11 1999/08/28 01:01:55 peter Exp $ - * $DragonFly: src/usr.bin/gprof/gprof.c,v 1.5 2006/01/22 03:43:37 swildner Exp $ + * $DragonFly: src/usr.bin/gprof/gprof.c,v 1.6 2008/10/16 01:52:32 swildner Exp $ */ #include @@ -399,7 +399,7 @@ valcmp(const void *v1, const void *v2) readsamples(FILE *pfile) { - register i; + int i; UNIT sample; if (samples == 0) { diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index beaccfabe2..89e578d9bc 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -33,7 +33,7 @@ * @(#) Copyright (c) 1988, 1993 The Regents of the University of California. All rights reserved. * @(#)kdump.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/kdump/kdump.c,v 1.29 2006/05/20 14:27:22 netchild Exp $ - * $DragonFly: src/usr.bin/kdump/kdump.c,v 1.12 2008/10/15 16:04:11 hasso Exp $ + * $DragonFly: src/usr.bin/kdump/kdump.c,v 1.13 2008/10/16 01:52:32 swildner Exp $ */ #define _KERNEL_STRUCTURES @@ -67,7 +67,7 @@ main(int argc, char **argv) { int ch, col, ktrlen, size; pid_t do_pid = -1; - register void *m; + void *m; int trpoints = ALL_POINTS; char *cp; @@ -244,10 +244,10 @@ static char *ptrace_ops[] = { "PT_KILL", "PT_STEP", "PT_ATTACH", "PT_DETACH", }; -ktrsyscall(register struct ktr_syscall *ktr) +ktrsyscall(struct ktr_syscall *ktr) { - register narg = ktr->ktr_narg; - register register_t *ip; + int narg = ktr->ktr_narg; + register_t *ip; char *ioctlname(); if (ktr->ktr_code >= nsyscalls || ktr->ktr_code < 0) @@ -658,9 +658,9 @@ ktrsyscall(register struct ktr_syscall *ktr) ktrsysret(struct ktr_sysret *ktr) { - register register_t ret = ktr->ktr_retval; - register int error = ktr->ktr_error; - register int code = ktr->ktr_code; + register_t ret = ktr->ktr_retval; + int error = ktr->ktr_error; + int code = ktr->ktr_code; if (code >= nsyscalls || code < 0) (void)printf("[%d] ", code); @@ -697,11 +697,11 @@ ktrnamei(char *cp, int len) ktrgenio(struct ktr_genio *ktr, int len) { - register int datalen = len - sizeof (struct ktr_genio); - register char *dp = (char *)ktr + sizeof (struct ktr_genio); - register char *cp; - register int col = 0; - register width; + int datalen = len - sizeof (struct ktr_genio); + char *dp = (char *)ktr + sizeof (struct ktr_genio); + char *cp; + int col = 0; + int width; char visbuf[5]; static screenwidth = 0; diff --git a/usr.bin/lex/flex.skl b/usr.bin/lex/flex.skl index 9eaff001f1..dca7ee513d 100644 --- a/usr.bin/lex/flex.skl +++ b/usr.bin/lex/flex.skl @@ -3,7 +3,7 @@ /* Scanner skeleton version: * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ * $FreeBSD: src/usr.bin/lex/flex.skl,v 1.4 1999/10/27 07:56:44 obrien Exp $ - * $DragonFly: src/usr.bin/lex/flex.skl,v 1.8 2008/06/21 19:32:14 swildner Exp $ + * $DragonFly: src/usr.bin/lex/flex.skl,v 1.9 2008/10/16 01:52:32 swildner Exp $ */ #define FLEX_SCANNER @@ -448,9 +448,9 @@ YY_MALLOC_DECL YY_DECL { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; %% user's declarations go here @@ -747,9 +747,9 @@ static int yy_get_next_buffer() int yyFlexLexer::yy_get_next_buffer() %* { - register char *dest = yy_current_buffer->yy_ch_buf; - register char *source = yytext_ptr; - register int number_to_move, i; + char *dest = yy_current_buffer->yy_ch_buf; + char *source = yytext_ptr; + int number_to_move, i; int ret_val; if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) @@ -887,8 +887,8 @@ static yy_state_type yy_get_previous_state() yy_state_type yyFlexLexer::yy_get_previous_state() %* { - register yy_state_type yy_current_state; - register char *yy_cp; + yy_state_type yy_current_state; + char *yy_cp; %% code to get the start state into yy_current_state goes here @@ -918,7 +918,7 @@ yy_state_type yy_current_state; yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state ) %* { - register int yy_is_jam; + int yy_is_jam; %% code to find the next state, and perhaps do backing up, goes here return yy_is_jam ? 0 : yy_current_state; @@ -928,17 +928,17 @@ yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state ) %- #ifndef YY_NO_UNPUT #ifdef YY_USE_PROTOS -static void yyunput( int c, register char *yy_bp ) +static void yyunput( int c, char *yy_bp ) #else static void yyunput( c, yy_bp ) int c; -register char *yy_bp; +char *yy_bp; #endif %+ -void yyFlexLexer::yyunput( int c, register char* yy_bp ) +void yyFlexLexer::yyunput( int c, char* yy_bp ) %* { - register char *yy_cp = yy_c_buf_p; + char *yy_cp = yy_c_buf_p; /* undo effects of setting up yytext */ *yy_cp = yy_hold_char; @@ -946,11 +946,10 @@ void yyFlexLexer::yyunput( int c, register char* yy_bp ) if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ - register int number_to_move = yy_n_chars + 2; - register char *dest = &yy_current_buffer->yy_ch_buf[ + int number_to_move = yy_n_chars + 2; + char *dest = &yy_current_buffer->yy_ch_buf[ yy_current_buffer->yy_buf_size + 2]; - register char *source = - &yy_current_buffer->yy_ch_buf[number_to_move]; + char *source = &yy_current_buffer->yy_ch_buf[number_to_move]; while ( source > yy_current_buffer->yy_ch_buf ) *--dest = *--source; @@ -1485,7 +1484,7 @@ yyconst char *s2; int n; #endif { - register int i; + int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } @@ -1499,7 +1498,7 @@ static int yy_flex_strlen( s ) yyconst char *s; #endif { - register int n; + int n; for ( n = 0; s[n]; ++n ) ; diff --git a/usr.bin/lex/gen.c b/usr.bin/lex/gen.c index a86992f754..74419589ec 100644 --- a/usr.bin/lex/gen.c +++ b/usr.bin/lex/gen.c @@ -28,7 +28,7 @@ /* $Header: /home/daffy/u0/vern/flex/RCS/gen.c,v 2.56 96/05/25 20:43:38 vern Exp $ */ /* $FreeBSD: src/usr.bin/lex/gen.c,v 1.5 1999/10/27 07:56:44 obrien Exp $ */ -/* $DragonFly: src/usr.bin/lex/gen.c,v 1.5 2008/02/03 13:14:12 corecode Exp $ */ +/* $DragonFly: src/usr.bin/lex/gen.c,v 1.6 2008/10/16 01:52:32 swildner Exp $ */ #include "flexdef.h" @@ -446,7 +446,7 @@ void genftbl(void) void gen_next_compressed_state(char *char_map) { - indent_put2s( "register YY_CHAR yy_c = %s;", char_map ); + indent_put2s( "YY_CHAR yy_c = %s;", char_map ); /* Save the backing-up info \before/ computing the next state * because we always compute one more state than needed - we @@ -533,8 +533,8 @@ void gen_next_match(void) { indent_puts( "{" ); /* } for vi */ indent_puts( - "register yyconst struct yy_trans_info *yy_trans_info;\n" ); - indent_puts( "register YY_CHAR yy_c;\n" ); + "yyconst struct yy_trans_info *yy_trans_info;\n" ); + indent_puts( "YY_CHAR yy_c;\n" ); indent_put2s( "for ( yy_c = %s;", char_map ); indent_puts( " (yy_trans_info = &yy_current_state[(unsigned int) yy_c])->" ); @@ -674,7 +674,7 @@ void gen_NUL_trans(void) /* We're going to need yy_cp lying around for the call * below to gen_backing_up(). */ - indent_puts( "register char *yy_cp = yy_c_buf_p;" ); + indent_puts( "char *yy_cp = yy_c_buf_p;" ); outc( '\n' ); @@ -696,10 +696,10 @@ void gen_NUL_trans(void) else if ( fullspd ) { do_indent(); - out_dec( "register int yy_c = %d;\n", NUL_ec ); + out_dec( "int yy_c = %d;\n", NUL_ec ); indent_puts( - "register yyconst struct yy_trans_info *yy_trans_info;\n" ); + "yyconst struct yy_trans_info *yy_trans_info;\n" ); indent_puts( "yy_trans_info = &yy_current_state[(unsigned int) yy_c];" ); indent_puts( "yy_current_state += yy_trans_info->yy_nxt;" ); diff --git a/usr.bin/lex/lex.1 b/usr.bin/lex/lex.1 index a7dd102aad..b0970515a9 100644 --- a/usr.bin/lex/lex.1 +++ b/usr.bin/lex/lex.1 @@ -1,5 +1,5 @@ .\" $FreeBSD: src/usr.bin/lex/lex.1,v 1.10.2.6 2003/02/24 22:37:41 trhodes Exp $ -.\" $DragonFly: src/usr.bin/lex/lex.1,v 1.2 2003/06/17 04:29:27 dillon Exp $ +.\" $DragonFly: src/usr.bin/lex/lex.1,v 1.3 2008/10/16 01:52:32 swildner Exp $ .\" .TH FLEX 1 "April 1995" "Version 2.5" .SH NAME @@ -946,7 +946,7 @@ the following is one way to eat up C comments: %% "/*" { - register int c; + int c; for ( ; ; ) { diff --git a/usr.bin/lex/parse.y b/usr.bin/lex/parse.y index 813bd4a853..46fb0c1a2a 100644 --- a/usr.bin/lex/parse.y +++ b/usr.bin/lex/parse.y @@ -35,7 +35,7 @@ /* $Header: /home/daffy/u0/vern/flex/RCS/parse.y,v 2.28 95/04/21 11:51:51 vern Exp $ */ /* $FreeBSD: src/usr.bin/lex/parse.y,v 1.3 1999/10/27 07:56:46 obrien Exp $ */ -/* $DragonFly: src/usr.bin/lex/parse.y,v 1.4 2008/06/21 19:29:21 swildner Exp $ */ +/* $DragonFly: src/usr.bin/lex/parse.y,v 1.5 2008/10/16 01:52:32 swildner Exp $ */ /* Some versions of bison are broken in that they use alloca() but don't @@ -769,7 +769,7 @@ string : string CHAR void build_eof_action( void ) { - register int i; + int i; char action_text[MAXLINE]; for ( i = 1; i <= scon_stk_ptr; ++i ) diff --git a/usr.bin/lex/scan.l b/usr.bin/lex/scan.l index 61bbe4b182..ce9fdfd647 100644 --- a/usr.bin/lex/scan.l +++ b/usr.bin/lex/scan.l @@ -29,7 +29,7 @@ /* $Header: /home/daffy/u0/vern/flex/RCS/scan.l,v 2.56 95/04/24 12:17:19 vern Exp $ */ /* $FreeBSD: src/usr.bin/lex/scan.l,v 1.5 1999/10/27 07:56:46 obrien Exp $ */ -/* $DragonFly: src/usr.bin/lex/scan.l,v 1.3 2008/06/21 19:29:21 swildner Exp $ */ +/* $DragonFly: src/usr.bin/lex/scan.l,v 1.4 2008/10/16 01:52:32 swildner Exp $ */ #include "flexdef.h" #include "parse.h" @@ -435,7 +435,7 @@ LEXOPT [aceknopr] } "{"{NAME}"}" { - register Char *nmdefptr; + Char *nmdefptr; Char *ndlookup(); strcpy( nmstr, yytext + 1 ); diff --git a/usr.bin/pr/egetopt.c b/usr.bin/pr/egetopt.c index 7416e66b64..53602f02e2 100644 --- a/usr.bin/pr/egetopt.c +++ b/usr.bin/pr/egetopt.c @@ -36,7 +36,7 @@ * * @(#)egetopt.c 8.1 (Berkeley) 6/6/93 * - * $DragonFly: src/usr.bin/pr/egetopt.c,v 1.3 2003/10/04 20:36:50 hmp Exp $ + * $DragonFly: src/usr.bin/pr/egetopt.c,v 1.4 2008/10/16 01:52:32 swildner Exp $ */ #include @@ -70,9 +70,9 @@ int egetopt(int nargc, char * const *nargv, const char *ostr) { static char *place = EMSG; /* option letter processing */ - register char *oli; /* option letter list index */ + char *oli; /* option letter list index */ static int delim; /* which option delimeter */ - register char *p; + char *p; static char savec = '\0'; if (savec != '\0') { diff --git a/usr.bin/pr/pr.c b/usr.bin/pr/pr.c index e4b25ba827..56d176e8ff 100644 --- a/usr.bin/pr/pr.c +++ b/usr.bin/pr/pr.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.bin/pr/pr.c,v 1.9.2.4 2002/04/15 17:16:57 jmallett Exp $ - * $DragonFly: src/usr.bin/pr/pr.c,v 1.3 2003/10/04 20:36:50 hmp Exp $ + * $DragonFly: src/usr.bin/pr/pr.c,v 1.4 2008/10/16 01:52:32 swildner Exp $ * * @(#) Copyright (c) 1993 The Regents of the University of California. All rights reserved. * @(#)pr.c 8.2 (Berkeley) 4/16/94 @@ -160,11 +160,11 @@ ttypause(int pagecnt) int onecol(int argc, char **argv) { - register int cnt = -1; - register int off; - register int lrgln; - register int linecnt; - register int num; + int cnt = -1; + int off; + int lrgln; + int linecnt; + int num; int lncnt; int pagecnt; int ips; @@ -305,13 +305,13 @@ onecol(int argc, char **argv) int vertcol(int argc, char **argv) { - register char *ptbf; - register char **lstdat; - register int i; - register int j; - register int cnt = -1; - register int pln; - register int *indy; + char *ptbf; + char **lstdat; + int i; + int j; + int cnt = -1; + int pln; + int *indy; int cvc; int *lindy; int lncnt; @@ -626,13 +626,13 @@ vertcol(int argc, char **argv) int horzcol(int argc, char **argv) { - register char *ptbf; - register int pln; - register int cnt = -1; - register char *lstdat; - register int col = colwd + 1; - register int j; - register int i; + char *ptbf; + int pln; + int cnt = -1; + char *lstdat; + int col = colwd + 1; + int j; + int i; int lncnt; int pagecnt; char *buf; @@ -769,12 +769,12 @@ horzcol(int argc, char **argv) int mulfile(int argc, char **argv) { - register char *ptbf; - register int j; - register int pln; - register int cnt; - register char *lstdat; - register int i; + char *ptbf; + int j; + int pln; + int cnt; + char *lstdat; + int i; FILE **fbuf; int actf; int lncnt; @@ -981,13 +981,13 @@ mulfile(int argc, char **argv) * mor: set if more data in line (not truncated) */ int -inln(FILE *inf, char *buf, register int lim, int *cps, int trnc, int *mor) +inln(FILE *inf, char *buf, int lim, int *cps, int trnc, int *mor) { - register int col; - register int gap = ingap; - register int ch = EOF; - register char *ptbuf; - register int chk = (int)inchar; + int col; + int gap = ingap; + int ch = EOF; + char *ptbuf; + int chk = (int)inchar; ptbuf = buf; @@ -1086,13 +1086,13 @@ inln(FILE *inf, char *buf, register int lim, int *cps, int trnc, int *mor) * 1 is more, 0 is complete, -1 is no \n's */ int -otln(register char *buf, int cnt, int *svips, int *svops, int mor) +otln(char *buf, int cnt, int *svips, int *svops, int mor) { - register int ops; /* last col output */ - register int ips; /* last col in buf examined */ - register int gap = ogap; - register int tbps; - register char *endbuf; + int ops; /* last col output */ + int ips; /* last col in buf examined */ + int gap = ogap; + int tbps; + char *endbuf; if (ogap) { /* @@ -1223,10 +1223,10 @@ otln(register char *buf, int cnt, int *svips, int *svops, int mor) * lncnt number of lines per page */ int -inskip(FILE *inf, register int pgcnt, register int lncnt) +inskip(FILE *inf, int pgcnt, int lncnt) { - register int c; - register int cnt; + int c; + int cnt; while(--pgcnt > 0) { cnt = lncnt; @@ -1387,9 +1387,9 @@ nxtfile(int argc, char **argv, char **fname, char *buf, int dt) * numbers as part of the column so spaces may be replaced. */ void -addnum(register char *buf, register int wdth, register int line) +addnum(char *buf, int wdth, int line) { - register char *pt = buf + wdth; + char *pt = buf + wdth; do { *--pt = digs[line % 10]; @@ -1447,7 +1447,7 @@ prhead(char *buf, char *fname, int pagcnt) * incomp was a '\n' missing from last line output */ int -prtail(register int cnt, int incomp) +prtail(int cnt, int incomp) { if (nohead) { /* @@ -1561,9 +1561,9 @@ usage(void) * checks on options */ int -setup(register int argc, register char **argv) +setup(int argc, char **argv) { - register int c; + int c; int d_first; int eflag = 0; int iflag = 0; diff --git a/usr.bin/rdist/docmd.c b/usr.bin/rdist/docmd.c index 4b4b0efc88..0c5ca7f6dd 100644 --- a/usr.bin/rdist/docmd.c +++ b/usr.bin/rdist/docmd.c @@ -32,7 +32,7 @@ * * @(#)docmd.c 8.1 (Berkeley) 6/9/93 * $FreeBSD: src/usr.bin/rdist/docmd.c,v 1.12 1999/08/28 01:05:06 peter Exp $ - * $DragonFly: src/usr.bin/rdist/docmd.c,v 1.4 2004/07/24 19:45:10 eirikn Exp $ + * $DragonFly: src/usr.bin/rdist/docmd.c,v 1.5 2008/10/16 01:52:32 swildner Exp $ */ #include @@ -65,9 +65,9 @@ static int remotecmd(char *, char *, char *, char *); void docmds(char **dhosts, int argc, char **argv) { - register struct cmd *c; - register struct namelist *f; - register char **cpp; + struct cmd *c; + struct namelist *f; + char **cpp; extern struct cmd *cmds; signal(SIGHUP, cleanup); @@ -118,9 +118,9 @@ docmds(char **dhosts, int argc, char **argv) static void doarrow(char **filev, struct namelist *files, char *rhost, struct subcmd *cmds) { - register struct namelist *f; - register struct subcmd *sc; - register char **cpp; + struct namelist *f; + struct subcmd *sc; + char **cpp; int n, ddir, opts = options; if (debug) @@ -244,7 +244,7 @@ static int remotecmd(char *rhost, char *luser, char *ruser, char *cmd) static int makeconn(char *rhost) { - register char *ruser, *cp; + char *ruser, *cp; static char *cur_host = NULL; static int port = -1; char tuser[20]; @@ -335,7 +335,7 @@ makeconn(char *rhost) * Signal end of previous connection. */ static void -closeconn() +closeconn(void) { if (debug) printf("closeconn()\n"); @@ -357,10 +357,10 @@ lostconn(int signo) } static int -okname(register char *name) +okname(char *name) { - register char *cp; - register int c; + char *cp; + int c; cp = name; @@ -388,9 +388,9 @@ extern char target[], *tp; static void dodcolon(char **filev, struct namelist *files, char *stamp, struct subcmd *cmds) { - register struct subcmd *sc; - register struct namelist *f; - register char **cpp; + struct subcmd *sc; + struct namelist *f; + char **cpp; struct timeval tv[2]; struct timezone tz; struct stat stb; @@ -498,9 +498,9 @@ cmptime(char *name) static void rcmptime(struct stat *st) { - register DIR *d; - register struct dirent *dp; - register char *cp; + DIR *d; + struct dirent *dp; + char *cp; char *otp; int len; @@ -539,9 +539,9 @@ rcmptime(struct stat *st) * stamp file. */ static void -notify(char *file, char *rhost, register struct namelist *to, time_t lmod) +notify(char *file, char *rhost, struct namelist *to, time_t lmod) { - register int fd, len; + int fd, len; struct stat stb; FILE *pf; @@ -617,7 +617,7 @@ notify(char *file, char *rhost, register struct namelist *to, time_t lmod) int inlist(struct namelist *list, char *file) { - register struct namelist *nl; + struct namelist *nl; for (nl = list; nl != NULL; nl = nl->n_next) if (!strcmp(file, nl->n_name)) @@ -631,8 +631,8 @@ inlist(struct namelist *list, char *file) int except(char *file) { - register struct subcmd *sc; - register struct namelist *nl; + struct subcmd *sc; + struct namelist *nl; regex_t rx; int val; @@ -661,7 +661,7 @@ except(char *file) } char * -colon(register char *cp) +colon(char *cp) { while (*cp) { diff --git a/usr.bin/rdist/expand.c b/usr.bin/rdist/expand.c index f730383a48..af375cc3ba 100644 --- a/usr.bin/rdist/expand.c +++ b/usr.bin/rdist/expand.c @@ -32,7 +32,7 @@ * * @(#)expand.c 8.1 (Berkeley) 6/9/93 * $FreeBSD: src/usr.bin/rdist/expand.c,v 1.8 1999/08/28 01:05:06 peter Exp $ - * $DragonFly: src/usr.bin/rdist/expand.c,v 1.5 2007/11/25 18:10:07 swildner Exp $ + * $DragonFly: src/usr.bin/rdist/expand.c,v 1.6 2008/10/16 01:52:33 swildner Exp $ */ #include "defs.h" @@ -83,8 +83,8 @@ static int smatch(char *, char *); struct namelist * expand(struct namelist *list, int wh) { - register struct namelist *nl, *prev; - register int n; + struct namelist *nl, *prev; + int n; char pathbuf[BUFSIZ]; char *argvbuf[GAVSIZ]; @@ -94,7 +94,7 @@ expand(struct namelist *list, int wh) } if (wh == 0) { - register char *cp; + char *cp; for (nl = list; nl != NULL; nl = nl->n_next) for (cp = nl->n_name; *cp; cp++) @@ -140,8 +140,8 @@ expand(struct namelist *list, int wh) static void expstr(char *s) { - register char *cp, *cp1; - register struct namelist *tp; + char *cp, *cp1; + struct namelist *tp; char *tail; char buf[BUFSIZ]; int savec, oeargc; @@ -252,8 +252,8 @@ argcmp(const void *a1, const void *a2) static void expsh(char *s) { - register char *cp; - register char *spathp, *oldcp; + char *cp; + char *spathp, *oldcp; struct stat stb; spathp = pathp; @@ -290,7 +290,7 @@ static void matchdir(char *pattern) { struct stat stb; - register struct dirent *dp; + struct dirent *dp; DIR *dirp; dirp = opendir(path); @@ -330,7 +330,7 @@ static int execbrc(char *p, char *s) { char restbuf[BUFSIZ + 2]; - register char *pe, *pm, *pl; + char *pe, *pm, *pl; int brclev; char *lm, savec, *spathp; @@ -410,8 +410,8 @@ doit: static int match(char *s, char *p) { - register int c; - register char *sentp; + int c; + char *sentp; char sexpany; sexpany = expany; @@ -426,9 +426,9 @@ match(char *s, char *p) } static int -amatch(register char *s, register char *p) +amatch(char *s, char *p) { - register int scc; + int scc; int ok, lc, c, cc; char *spathp; struct stat stb; @@ -514,9 +514,9 @@ slash: } static int -smatch(register char *s, register char *p) +smatch(char *s, char *p) { - register int scc; + int scc; int ok, lc, c, cc; for (;;) { @@ -571,10 +571,10 @@ smatch(register char *s, register char *p) } static void -Cat(register char *s1, register char *s2) +Cat(char *s1, char *s2) { int len; - register char *s; + char *s; len = strlen(s1) + strlen(s2) + 1; nleft -= len; @@ -609,9 +609,9 @@ addpath(int c) * part corresponding to `file'. */ char * -exptilde(char buf[], register char *file, int maxlen) +exptilde(char buf[], char *file, int maxlen) { - register char *s1, *s2, *s3; + char *s1, *s2, *s3; extern char homedir[]; if (strlen(file) >= maxlen) diff --git a/usr.bin/rdist/gram.y b/usr.bin/rdist/gram.y index 65c2bb84c4..5784ba906a 100644 --- a/usr.bin/rdist/gram.y +++ b/usr.bin/rdist/gram.y @@ -33,7 +33,7 @@ * * @(#)gram.y 8.1 (Berkeley) 6/9/93 * $FreeBSD: src/usr.bin/rdist/gram.y,v 1.6 1999/08/28 01:05:07 peter Exp $ - * $DragonFly: src/usr.bin/rdist/gram.y,v 1.4 2004/07/24 19:45:10 eirikn Exp $ + * $DragonFly: src/usr.bin/rdist/gram.y,v 1.5 2008/10/16 01:52:33 swildner Exp $ */ #include @@ -141,7 +141,7 @@ cmdlist: /* VOID */ { ; cmd: INSTALL options opt_namelist SM = { - register struct namelist *nl; + struct namelist *nl; $1->sc_options = $2 | options; if ($3 != NULL) { @@ -214,11 +214,11 @@ int yylineno = 1; extern FILE *fin; int -yylex() +yylex(void) { static char yytext[INMAX]; - register int c; - register char *cp1, *cp2; + int c; + char *cp1, *cp2; static char quotechars[] = "[]{}*?$"; again: @@ -365,7 +365,7 @@ again: } int -any(register int c, register char *str) +any(int c, char *str) { while (*str) if (c == *str++) @@ -379,8 +379,8 @@ any(register int c, register char *str) void insert(char *label, struct namelist *files, struct namelist *hosts, struct subcmd *subcmds) { - register struct cmd *c, *prev, *nc; - register struct namelist *h, *next_h; + struct cmd *c, *prev, *nc; + struct namelist *h, *next_h; files = expand(files, E_VARS|E_SHELL); hosts = expand(hosts, E_ALL); @@ -427,7 +427,7 @@ insert(char *label, struct namelist *files, struct namelist *hosts, struct subcm void append(char *label, struct namelist *files, char *stamp, struct subcmd *subcmds) { - register struct cmd *c; + struct cmd *c; c = ALLOC(cmd); if (c == NULL) @@ -450,8 +450,7 @@ append(char *label, struct namelist *files, char *stamp, struct subcmd *subcmds) * Error printing routine in parser. */ void -yyerror(s) - char *s; +yyerror(char *s) { ++nerrs; fflush(stdout); @@ -464,7 +463,7 @@ yyerror(s) static char * makestr(char *str) { - register char *cp, *s; + char *cp, *s; str = cp = malloc(strlen(s = str) + 1); if (cp == NULL) @@ -480,7 +479,7 @@ makestr(char *str) struct namelist * makenl(char *name) { - register struct namelist *nl; + struct namelist *nl; nl = ALLOC(namelist); if (nl == NULL) @@ -496,7 +495,7 @@ makenl(char *name) struct subcmd * makesubcmd(int type) { - register struct subcmd *sc; + struct subcmd *sc; sc = ALLOC(subcmd); if (sc == NULL) diff --git a/usr.bin/rdist/lookup.c b/usr.bin/rdist/lookup.c index 9fb5339bd9..6d19eba02c 100644 --- a/usr.bin/rdist/lookup.c +++ b/usr.bin/rdist/lookup.c @@ -32,7 +32,7 @@ * * @(#)lookup.c 8.1 (Berkeley) 6/9/93 * $FreeBSD: src/usr.bin/rdist/lookup.c,v 1.6 1999/08/28 01:05:07 peter Exp $ - * $DragonFly: src/usr.bin/rdist/lookup.c,v 1.3 2004/07/24 19:45:10 eirikn Exp $ + * $DragonFly: src/usr.bin/rdist/lookup.c,v 1.4 2008/10/16 01:52:33 swildner Exp $ */ #include "defs.h" @@ -56,8 +56,8 @@ static struct syment *hashtab[HASHSIZE]; void define(char *name) { - register char *cp, *s; - register struct namelist *nl; + char *cp, *s; + struct namelist *nl; struct namelist *value; value = NULL; @@ -120,9 +120,9 @@ define(char *name) struct namelist * lookup(char *name, int action, struct namelist *value) { - register unsigned n; - register char *cp; - register struct syment *s; + unsigned n; + char *cp; + struct syment *s; char buf[BUFSIZ]; if (debug) diff --git a/usr.bin/rdist/main.c b/usr.bin/rdist/main.c index 316602a83e..fe5e2bdae2 100644 --- a/usr.bin/rdist/main.c +++ b/usr.bin/rdist/main.c @@ -33,7 +33,7 @@ * @(#) Copyright (c) 1983, 1993 The Regents of the University of California. All rights reserved. * @(#)main.c 8.1 (Berkeley) 6/9/93 * $FreeBSD: src/usr.bin/rdist/main.c,v 1.5 1999/08/28 01:05:07 peter Exp $ - * $DragonFly: src/usr.bin/rdist/main.c,v 1.4 2004/07/24 19:45:10 eirikn Exp $ + * $DragonFly: src/usr.bin/rdist/main.c,v 1.5 2008/10/16 01:52:33 swildner Exp $ */ /* * Remote distribution program. @@ -75,7 +75,7 @@ static void docmdargs(int, char *[]); int main(int argc, char **argv) { - register char *arg; + char *arg; int cmdargs; char *dhosts[NHOSTS], **hp = dhosts; @@ -238,8 +238,8 @@ usage(void) static void docmdargs(int nargs, char **args) { - register struct namelist *nl, *prev; - register char *cp; + struct namelist *nl, *prev; + char *cp; struct namelist *files, *hosts; struct subcmd *cmds; char *dest; @@ -292,7 +292,7 @@ docmdargs(int nargs, char **args) * Print a list of NAME blocks (mostly for debugging). */ void -prnames(register struct namelist *nl) +prnames(struct namelist *nl) { printf("( "); while (nl != NULL) { diff --git a/usr.bin/rdist/server.c b/usr.bin/rdist/server.c index 4c8d3a6834..288659e302 100644 --- a/usr.bin/rdist/server.c +++ b/usr.bin/rdist/server.c @@ -32,7 +32,7 @@ * * @(#)server.c 8.1 (Berkeley) 6/9/93 * $FreeBSD: src/usr.bin/rdist/server.c,v 1.10 1999/08/28 01:05:09 peter Exp $ - * $DragonFly: src/usr.bin/rdist/server.c,v 1.6 2006/08/03 16:40:48 swildner Exp $ + * $DragonFly: src/usr.bin/rdist/server.c,v 1.7 2008/10/16 01:52:33 swildner Exp $ */ #include @@ -82,10 +82,10 @@ static int update(char *, int, struct stat *); * Qname - Query if file exists. Return mtime & size if it does. */ void -server() +server(void) { char cmdbuf[BUFSIZ]; - register char *cp; + char *cp; signal(SIGHUP, cleanup); signal(SIGINT, cleanup); @@ -346,7 +346,7 @@ installlink(struct linkbuf *lp, char *rname, int opts) static void sendf(char *rname, int opts) { - register struct subcmd *sc; + struct subcmd *sc; struct stat stb; int sizerr, f, u, len; off_t i; @@ -580,9 +580,9 @@ savelink(struct stat *stp) static int update(char *rname, int opts, struct stat *stp) { - register char *cp, *s; - register off_t size; - register time_t mtime; + char *cp, *s; + off_t size; + time_t mtime; if (debug) printf("update(%s, %x, %p)\n", rname, opts, stp); @@ -714,7 +714,7 @@ query(char *name) static void recvf(char *cmd, int type) { - register char *cp; + char *cp; int f, mode, opts, wrerr, olderrno; off_t i, size; time_t mtime; @@ -970,7 +970,7 @@ badtarget: error("%s:%s: %s\n", host, target, strerror(errno)); static void hardlink(char *cmd) { - register char *cp; + char *cp; struct stat stb; char *oldname; int opts, exists; @@ -1028,7 +1028,7 @@ hardlink(char *cmd) static int chkparent(char *name) { - register char *cp; + char *cp; struct stat stb; cp = rindex(name, '/'); @@ -1055,7 +1055,7 @@ chkparent(char *name) static int fchog(int fd, char *file, char *owner, char *group, int mode) { - register int i; + int i; int uid, gid; extern char user[]; extern int userid; @@ -1116,7 +1116,7 @@ ok: if ((fd != -1 && fchown(fd, uid, gid) < 0) || chown(file, uid, gid) < 0) static void rmchk(int opts) { - register char *cp, *s; + char *cp, *s; struct stat stb; if (debug) @@ -1195,10 +1195,10 @@ rmchk(int opts) * for extraneous files and remove them. */ static void -clean(register char *cp) +clean(char *cp) { DIR *d; - register struct dirent *dp; + struct dirent *dp; struct stat stb; char *otp; int len, opts; @@ -1271,7 +1271,7 @@ removeit(struct stat *stp) { DIR *d; struct dirent *dp; - register char *cp; + char *cp; struct stat stb; char *otp; int len; @@ -1338,7 +1338,7 @@ static void dospecial(char *cmd) { int fd[2], status, pid, i; - register char *cp, *s; + char *cp, *s; char sbuf[BUFSIZ]; extern int userid, groupid; diff --git a/usr.bin/renice/renice.c b/usr.bin/renice/renice.c index 65f593294d..1f0e08b4c7 100644 --- a/usr.bin/renice/renice.c +++ b/usr.bin/renice/renice.c @@ -33,7 +33,7 @@ * @(#) Copyright (c) 1983, 1989, 1993 The Regents of the University of California. All rights reserved. * @(#)renice.c 8.1 (Berkeley) 6/9/93 * $FreeBSD: src/usr.bin/renice/renice.c,v 1.4.2.3 2002/06/17 23:58:46 tjr Exp $ - * $DragonFly: src/usr.bin/renice/renice.c,v 1.4 2005/02/10 21:06:36 liamfoy Exp $ + * $DragonFly: src/usr.bin/renice/renice.c,v 1.5 2008/10/16 01:52:33 swildner Exp $ */ #include @@ -166,7 +166,7 @@ getnum(const char *com, const char *str, int *val) } static void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n", "usage: renice [priority | [-n incr]] [[-p] pid ...] [[-g] pgrp ...]", diff --git a/usr.bin/rev/rev.c b/usr.bin/rev/rev.c index f018f6b499..80737bfc38 100644 --- a/usr.bin/rev/rev.c +++ b/usr.bin/rev/rev.c @@ -32,7 +32,7 @@ * * @(#) Copyright (c) 1987, 1992, 1993 The Regents of the University of California. All rights reserved. * @(#)rev.c 8.3 (Berkeley) 5/4/95 - * $DragonFly: src/usr.bin/rev/rev.c,v 1.7 2006/07/30 06:49:39 dillon Exp $ + * $DragonFly: src/usr.bin/rev/rev.c,v 1.8 2008/10/16 01:52:33 swildner Exp $ */ #include @@ -80,7 +80,7 @@ main(int argc, char **argv) } static void -usage() +usage(void) { fprintf(stderr, "usage: rev [file ...]\n"); exit(1); diff --git a/usr.bin/rpcgen/rpc_cout.c b/usr.bin/rpcgen/rpc_cout.c index 47a63c5b62..eac1105272 100644 --- a/usr.bin/rpcgen/rpc_cout.c +++ b/usr.bin/rpcgen/rpc_cout.c @@ -28,7 +28,7 @@ * * @(#)rpc_cout.c 1.13 89/02/22 (C) 1987 SMI * $FreeBSD: src/usr.bin/rpcgen/rpc_cout.c,v 1.7 1999/08/28 01:05:16 peter Exp $ - * $DragonFly: src/usr.bin/rpcgen/rpc_cout.c,v 1.4 2004/06/19 16:40:36 joerg Exp $ + * $DragonFly: src/usr.bin/rpcgen/rpc_cout.c,v 1.5 2008/10/16 01:52:33 swildner Exp $ */ #ident "@(#)rpc_cout.c 1.14 93/07/05 SMI" @@ -126,14 +126,14 @@ print_generic_header(char *procname, int pointerp) f_print(fout, "bool_t\n"); if (Cflag) { f_print(fout, "xdr_%s(", procname); - f_print(fout, "register XDR *xdrs, "); + f_print(fout, "XDR *xdrs, "); f_print(fout, "%s ", procname); if (pointerp) f_print(fout, "*"); f_print(fout, "objp)\n{\n\n"); } else { f_print(fout, "xdr_%s(xdrs, objp)\n", procname); - f_print(fout, "\tregister XDR *xdrs;\n"); + f_print(fout, "\tXDR *xdrs;\n"); f_print(fout, "\t%s ", procname); if (pointerp) f_print(fout, "*"); @@ -152,7 +152,7 @@ print_header(definition *def) if (rpcgen_inline == 0) return; /* May cause lint to complain. but ... */ - f_print(fout, "\tregister long *buf;\n\n"); + f_print(fout, "\tlong *buf;\n\n"); } static void @@ -531,8 +531,7 @@ inline_struct(definition *def, int flag) } static void -emit_struct(def) - definition *def; +emit_struct(definition *def) { decl_list *dl; int j, size, flag; @@ -642,7 +641,7 @@ emit_inline(int indent, declaration *decl, int flag) tabify(fout, indent); f_print(fout, "{\n"); tabify(fout, indent + 1); - f_print(fout, "register %s *genp;\n\n", decl->type); + f_print(fout, "%s *genp;\n\n", decl->type); tabify(fout, indent + 1); f_print(fout, "for (i = 0, genp = objp->%s;\n", decl->name); tabify(fout, indent + 2); diff --git a/usr.bin/rpcgen/rpc_main.c b/usr.bin/rpcgen/rpc_main.c index 93e7132f8b..570848c5d9 100644 --- a/usr.bin/rpcgen/rpc_main.c +++ b/usr.bin/rpcgen/rpc_main.c @@ -28,7 +28,7 @@ * * @(#)rpc_main.c 1.30 89/03/30 (C) 1987 SMI * $FreeBSD: src/usr.bin/rpcgen/rpc_main.c,v 1.11 1999/08/28 01:05:16 peter Exp $ - * $DragonFly: src/usr.bin/rpcgen/rpc_main.c,v 1.11 2007/08/25 08:55:26 corecode Exp $ + * $DragonFly: src/usr.bin/rpcgen/rpc_main.c,v 1.12 2008/10/16 01:52:33 swildner Exp $ */ @@ -352,9 +352,8 @@ static char* valid_i_nettypes[] = NULL }; -static int check_nettype(name, list_to_check) -char* name; -char* list_to_check[]; +static int +check_nettype(char *name, char *list_to_check[]) { int i; for (i = 0; list_to_check[i] != NULL; i++) { @@ -425,7 +424,8 @@ char rpcgen_table_dcl[] = "struct rpcgen_table {\n\ unsigned len_res; \n\ }; \n"; -char *generate_guard(char *pathname) +char * +generate_guard(char *pathname) { char* filename, *guard, *tmp; @@ -760,8 +760,8 @@ clnt_output(char *infile, char *define, int extend, char *outfile) } -static void mkfile_output(cmd) -struct commandline *cmd; +static void +mkfile_output(struct commandline *cmd) { char *mkfilename, *clientname, *clntname, *xdrname, *hdrname; char *servername, *svcname, *servprogname, *clntprogname; @@ -898,9 +898,7 @@ addarg(char *cp) } static void -putarg(where, cp) - char *cp; - int where; +putarg(int where, char *cp) { if (where >= ARGLISTLEN) { warnx("arglist coding error"); diff --git a/usr.bin/rpcgen/rpc_scan.c b/usr.bin/rpcgen/rpc_scan.c index e6cae495be..573b5468a0 100644 --- a/usr.bin/rpcgen/rpc_scan.c +++ b/usr.bin/rpcgen/rpc_scan.c @@ -27,7 +27,7 @@ * Mountain View, California 94043 * * $FreeBSD: src/usr.bin/rpcgen/rpc_scan.c,v 1.4.8.1 2001/03/04 08:59:50 kris Exp $ - * $DragonFly: src/usr.bin/rpcgen/rpc_scan.c,v 1.4 2004/06/19 16:40:36 joerg Exp $ + * $DragonFly: src/usr.bin/rpcgen/rpc_scan.c,v 1.5 2008/10/16 01:52:33 swildner Exp $ * * @(#)rpc_scan.c 1.11 89/02/22 (C) 1987 SMI */ @@ -353,9 +353,7 @@ findchrconst(char **str, char **val) } static void -findconst(str, val) - char **str; - char **val; +findconst(char **str, char **val) { char *p; int size; diff --git a/usr.bin/rpcgen/rpc_svcout.c b/usr.bin/rpcgen/rpc_svcout.c index 5ecd8ec4ae..a9dec19088 100644 --- a/usr.bin/rpcgen/rpc_svcout.c +++ b/usr.bin/rpcgen/rpc_svcout.c @@ -28,7 +28,7 @@ * * @(#)rpc_svcout.c 1.29 89/03/30 (C) 1987 SMI * $FreeBSD: src/usr.bin/rpcgen/rpc_svcout.c,v 1.6.6.1 2001/07/19 01:38:22 kris Exp $ - * $DragonFly: src/usr.bin/rpcgen/rpc_svcout.c,v 1.4 2004/06/19 16:40:36 joerg Exp $ + * $DragonFly: src/usr.bin/rpcgen/rpc_svcout.c,v 1.5 2008/10/16 01:52:33 swildner Exp $ */ #ident "@(#)rpc_svcout.c 1.4 90/04/13 SMI" @@ -645,8 +645,7 @@ write_inetmost(char *infile) } static void -print_return(space) - char *space; +print_return(char *space) { if (exitnow) f_print(fout, "%sexit(0);\n", space); diff --git a/usr.bin/rusers/rusers.c b/usr.bin/rusers/rusers.c index 26660bba7f..05e7fe90de 100644 --- a/usr.bin/rusers/rusers.c +++ b/usr.bin/rusers/rusers.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.bin/rusers/rusers.c,v 1.8.2.1 2001/07/02 23:43:05 mikeh Exp $ - * $DragonFly: src/usr.bin/rusers/rusers.c,v 1.3 2004/07/17 21:10:42 hmp Exp $ + * $DragonFly: src/usr.bin/rusers/rusers.c,v 1.4 2008/10/16 01:52:33 swildner Exp $ */ #include @@ -193,7 +193,7 @@ onehost(char *host) } void -allhosts() +allhosts(void) { utmpidlearr up; enum clnt_stat clnt_stat; @@ -207,7 +207,7 @@ allhosts() } static void -usage() +usage(void) { fprintf(stderr, "usage: rusers [-la] [hosts ...]\n"); diff --git a/usr.bin/rwho/rwho.c b/usr.bin/rwho/rwho.c index 2d02b562b7..a3d8685054 100644 --- a/usr.bin/rwho/rwho.c +++ b/usr.bin/rwho/rwho.c @@ -33,7 +33,7 @@ * @(#) Copyright (c) 1983, 1993 The Regents of the University of California. All rights reserved. * @(#)rwho.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/rwho/rwho.c,v 1.13.2.1 2002/03/12 19:49:09 phantom Exp $ - * $DragonFly: src/usr.bin/rwho/rwho.c,v 1.4 2005/01/09 16:20:54 liamfoy Exp $ + * $DragonFly: src/usr.bin/rwho/rwho.c,v 1.5 2008/10/16 01:52:33 swildner Exp $ */ #include @@ -184,7 +184,7 @@ main(int argc, char **argv) static void -usage() +usage(void) { fprintf(stderr, "usage: rwho [-a]\n"); exit(1); diff --git a/usr.bin/symorder/symorder.c b/usr.bin/symorder/symorder.c index 2e9ef2659b..c230f04f5e 100644 --- a/usr.bin/symorder/symorder.c +++ b/usr.bin/symorder/symorder.c @@ -33,7 +33,7 @@ * @(#) Copyright (c) 1980 The Regents of the University of California. All rights reserved. * @(#)symorder.c 5.8 (Berkeley) 4/1/91 * $FreeBSD: src/usr.bin/symorder/symorder.c,v 1.15 1999/08/28 01:05:57 peter Exp $ - * $DragonFly: src/usr.bin/symorder/symorder.c,v 1.3 2003/10/04 20:36:51 hmp Exp $ + * $DragonFly: src/usr.bin/symorder/symorder.c,v 1.4 2008/10/16 01:52:33 swildner Exp $ */ /* @@ -78,10 +78,10 @@ static void usage(void); int main(int argc, char **argv) { - register struct nlist *p, *symp; - register FILE *f, *xfile; - register int i; - register char *start, *t, *xfilename; + struct nlist *p, *symp; + FILE *f, *xfile; + int i; + char *start, *t, *xfilename; int ch, n, o; xfilename = NULL; @@ -254,7 +254,7 @@ main(int argc, char **argv) } int -savesymb(register struct nlist *s) +savesymb(struct nlist *s) { if ((s->n_type & N_EXT) != N_EXT) return 0; @@ -268,10 +268,10 @@ savesymb(register struct nlist *s) } void -reorder(register struct nlist *st1, register struct nlist *st2, int entries) +reorder(struct nlist *st1, struct nlist *st2, int entries) { - register struct nlist *p; - register int i, n; + struct nlist *p; + int i, n; for (p = st1, n = entries; --n >= 0; ++p) if (inlist(p) != -1) @@ -289,10 +289,10 @@ reorder(register struct nlist *st1, register struct nlist *st2, int entries) } int -inlist(register struct nlist *p) +inlist(struct nlist *p) { - register char *nam; - register struct nlist *op; + char *nam; + struct nlist *op; if (p->n_type & N_STAB || p->n_un.n_strx == 0) return (-1); @@ -309,10 +309,10 @@ inlist(register struct nlist *p) } int -excluded(register struct nlist *p) +excluded(struct nlist *p) { - register char *nam; - register int x; + char *nam; + int x; if (p->n_type & N_STAB || p->n_un.n_strx == 0) return (0); diff --git a/usr.bin/systat/cmds.c b/usr.bin/systat/cmds.c index e89362fb4a..9051e0ee74 100644 --- a/usr.bin/systat/cmds.c +++ b/usr.bin/systat/cmds.c @@ -32,7 +32,7 @@ * * @(#)cmds.c 8.2 (Berkeley) 4/29/95 * $FreeBSD: src/usr.bin/systat/cmds.c,v 1.3 1999/08/28 01:05:58 peter Exp $ - * $DragonFly: src/usr.bin/systat/cmds.c,v 1.4 2003/10/04 20:36:51 hmp Exp $ + * $DragonFly: src/usr.bin/systat/cmds.c,v 1.5 2008/10/16 01:52:33 swildner Exp $ */ #include @@ -46,8 +46,8 @@ void command(char *cmd) { - register struct cmdtab *p; - register char *cp; + struct cmdtab *p; + char *cp; int omask; double interval; @@ -142,11 +142,11 @@ done: } struct cmdtab * -lookup(register char *name) +lookup(char *name) { - register char *p, *q; - register struct cmdtab *c, *found; - register int nmatches, longest; + char *p, *q; + struct cmdtab *c, *found; + int nmatches, longest; longest = 0; nmatches = 0; @@ -178,7 +178,7 @@ status(void) } int -prefix(register char *s1, register char *s2) +prefix(char *s1, char *s2) { while (*s1 == *s2) { diff --git a/usr.bin/systat/devs.c b/usr.bin/systat/devs.c index a5194ecaaa..c91f6d19d9 100644 --- a/usr.bin/systat/devs.c +++ b/usr.bin/systat/devs.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.bin/systat/devs.c,v 1.4 1999/08/28 01:05:59 peter Exp $ - * $DragonFly: src/usr.bin/systat/devs.c,v 1.6 2004/12/22 11:01:49 joerg Exp $ + * $DragonFly: src/usr.bin/systat/devs.c,v 1.7 2008/10/16 01:52:33 swildner Exp $ */ /* * Some code and ideas taken from the old disks.c. @@ -176,7 +176,7 @@ dscmd(char *cmd, char *args, int maxshowdevs, struct statinfo *s1) return(2); } if (prefix(cmd, "drives")) { - register int i; + int i; move(CMDLINE, 0); clrtoeol(); for (i = 0; i < num_devices; i++) { @@ -195,7 +195,7 @@ dsmatchselect(char *args, devstat_select_mode select_mode, int maxshowdevs, char **tempstr; char *tstr[100]; int num_args = 0; - register int i; + int i; int retval = 0; /* @@ -251,8 +251,8 @@ static int dsselect(char *args, devstat_select_mode select_mode, int maxshowdevs, struct statinfo *s1) { - register char *cp; - register int i; + char *cp; + int i; int retval = 0; /* diff --git a/usr.bin/systat/icmp6.c b/usr.bin/systat/icmp6.c index f4a01d9cc5..317dabe9c3 100644 --- a/usr.bin/systat/icmp6.c +++ b/usr.bin/systat/icmp6.c @@ -32,7 +32,7 @@ * * @(#)mbufs.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/systat/icmp6.c,v 1.3 2006/04/30 04:47:23 bde Exp $ - * $DragonFly: src/usr.bin/systat/icmp6.c,v 1.2 2008/04/20 13:44:26 swildner Exp $ + * $DragonFly: src/usr.bin/systat/icmp6.c,v 1.3 2008/10/16 01:52:33 swildner Exp $ */ #include @@ -88,8 +88,7 @@ openicmp6(void) } void -closeicmp6(w) - WINDOW *w; +closeicmp6(WINDOW *w) { if (w == NULL) return; diff --git a/usr.bin/systat/iostat.c b/usr.bin/systat/iostat.c index fa8651ca9a..36fc5fe40d 100644 --- a/usr.bin/systat/iostat.c +++ b/usr.bin/systat/iostat.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.bin/systat/iostat.c,v 1.9.2.1 2000/07/02 10:03:17 ps Exp $ - * $DragonFly: src/usr.bin/systat/iostat.c,v 1.5 2005/01/13 12:45:39 y0netan1 Exp $ + * $DragonFly: src/usr.bin/systat/iostat.c,v 1.6 2008/10/16 01:52:33 swildner Exp $ * * @(#)iostat.c 8.1 (Berkeley) 6/6/93 */ @@ -251,8 +251,8 @@ barlabels(int row) void showiostat(void) { - register long t; - register int i, row, col; + long t; + int i, row, col; struct kinfo_cputime diff_cp_time; uint64_t cp_total; @@ -342,7 +342,7 @@ devstats(int row, int col, int dn) static void stat1(int row, uint64_t difference, uint64_t total) { - register int i; + int i; double time; if (total > 0) @@ -358,8 +358,8 @@ static void histogram(long double val, int colwidth, double scale) { char buf[10]; - register int k; - register int v = (int)(val * scale) + 0.5; + int k; + int v = (int)(val * scale) + 0.5; if (val <= 0) v = 0; diff --git a/usr.bin/systat/ip6.c b/usr.bin/systat/ip6.c index 8d24c2cd40..5400393af8 100644 --- a/usr.bin/systat/ip6.c +++ b/usr.bin/systat/ip6.c @@ -32,7 +32,7 @@ * * @(#)mbufs.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/systat/ip6.c,v 1.3 2006/04/30 04:47:23 bde Exp $ - * $DragonFly: src/usr.bin/systat/ip6.c,v 1.1 2007/05/31 11:38:36 hasso Exp $ + * $DragonFly: src/usr.bin/systat/ip6.c,v 1.2 2008/10/16 01:52:33 swildner Exp $ */ #include @@ -92,8 +92,7 @@ openip6(void) } void -closeip6(w) - WINDOW *w; +closeip6(WINDOW *w) { if (w == NULL) return; diff --git a/usr.bin/systat/main.c b/usr.bin/systat/main.c index 43d86059d4..bef5c0e2f4 100644 --- a/usr.bin/systat/main.c +++ b/usr.bin/systat/main.c @@ -33,7 +33,7 @@ * @(#) Copyright (c) 1980, 1992, 1993 The Regents of the University of California. All rights reserved. * @(#)main.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/systat/main.c,v 1.11.2.1 2001/06/06 20:26:01 tmm Exp $ - * $DragonFly: src/usr.bin/systat/main.c,v 1.5 2003/11/08 09:30:32 asmodai Exp $ + * $DragonFly: src/usr.bin/systat/main.c,v 1.6 2008/10/16 01:52:33 swildner Exp $ */ #include @@ -172,7 +172,7 @@ labels(void) void display(int signo) { - register int i, j; + int i, j; struct itimerval ctv; /* Get the load average over the last minute. */ diff --git a/usr.bin/systat/mbufs.c b/usr.bin/systat/mbufs.c index c7b4c300a9..f158c877da 100644 --- a/usr.bin/systat/mbufs.c +++ b/usr.bin/systat/mbufs.c @@ -32,7 +32,7 @@ * * @(#)mbufs.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/systat/mbufs.c,v 1.10.2.1 2000/08/26 09:36:55 ps Exp $ - * $DragonFly: src/usr.bin/systat/mbufs.c,v 1.6 2006/05/21 03:43:47 dillon Exp $ + * $DragonFly: src/usr.bin/systat/mbufs.c,v 1.7 2008/10/16 01:52:33 swildner Exp $ */ #define _KERNEL_STRUCTURES @@ -92,7 +92,7 @@ labelmbufs(void) void showmbufs(void) { - register int i, j, max, index; + int i, j, max, index; char buf[10]; char *mtname; diff --git a/usr.bin/systat/netcmds.c b/usr.bin/systat/netcmds.c index 2cab8bfecc..6dbcf7c0d1 100644 --- a/usr.bin/systat/netcmds.c +++ b/usr.bin/systat/netcmds.c @@ -32,7 +32,7 @@ * * @(#)netcmds.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/systat/netcmds.c,v 1.9 1999/08/28 01:06:04 peter Exp $ - * $DragonFly: src/usr.bin/systat/netcmds.c,v 1.5 2004/09/03 20:38:01 dillon Exp $ + * $DragonFly: src/usr.bin/systat/netcmds.c,v 1.6 2008/10/16 01:52:33 swildner Exp $ */ /* @@ -124,7 +124,7 @@ netcmd(char *cmd, char *args) static void changeitems(char *args, int onoff) { - register char *cp; + char *cp; struct servent *sp; struct hostent *hp; struct in_addr in; @@ -197,7 +197,7 @@ static struct pitem { static int selectport(long port, int onoff) { - register struct pitem *p; + struct pitem *p; if (port == -1) { if (ports == 0) @@ -222,9 +222,9 @@ selectport(long port, int onoff) } int -checkport(register struct inpcb *inp) +checkport(struct inpcb *inp) { - register struct pitem *p; + struct pitem *p; if (ports) for (p = ports; p < ports+nports; p++) @@ -236,7 +236,7 @@ checkport(register struct inpcb *inp) static void showports(void) { - register struct pitem *p; + struct pitem *p; struct servent *sp; for (p = ports; p < ports+nports; p++) { @@ -254,7 +254,7 @@ showports(void) static int selecthost(struct in_addr *in, int onoff) { - register struct hitem *p; + struct hitem *p; if (in == 0) { if (hosts == 0) @@ -279,9 +279,9 @@ selecthost(struct in_addr *in, int onoff) } int -checkhost(register struct inpcb *inp) +checkhost(struct inpcb *inp) { - register struct hitem *p; + struct hitem *p; if (hosts) for (p = hosts; p < hosts+nhosts; p++) @@ -294,7 +294,7 @@ checkhost(register struct inpcb *inp) static void showhosts(void) { - register struct hitem *p; + struct hitem *p; struct hostent *hp; for (p = hosts; p < hosts+nhosts; p++) { diff --git a/usr.bin/systat/netstat.c b/usr.bin/systat/netstat.c index 1163652183..da5f31f42e 100644 --- a/usr.bin/systat/netstat.c +++ b/usr.bin/systat/netstat.c @@ -32,7 +32,7 @@ * * @(#)netstat.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/systat/netstat.c,v 1.13 1999/08/30 08:18:08 peter Exp $ - * $DragonFly: src/usr.bin/systat/netstat.c,v 1.9 2007/05/31 11:38:36 hasso Exp $ + * $DragonFly: src/usr.bin/systat/netstat.c,v 1.10 2008/10/16 01:52:33 swildner Exp $ */ /* @@ -121,7 +121,7 @@ static int lastrow = 1; void closenetstat(WINDOW *w) { - register struct netinfo *p; + struct netinfo *p; endhostent(); endnetent(); @@ -224,7 +224,7 @@ fetchnetstat_proto(void (*enter_proto)(void *), void fetchnetstat(void) { - register struct netinfo *p; + struct netinfo *p; for (p = netcb.ni_forw; p != (struct netinfo *)&netcb; p = p->ni_forw) p->ni_seen = 0; @@ -237,7 +237,7 @@ fetchnetstat(void) static void enter(struct inpcb *inp, struct xsocket *so, int state, const char *proto) { - register struct netinfo *p; + struct netinfo *p; if (!aflag && inet_lnaof(inp->inp_laddr) == INADDR_ANY) return; @@ -316,7 +316,7 @@ labelnetstat(void) void shownetstat(void) { - register struct netinfo *p, *q; + struct netinfo *p, *q; /* * First, delete any connections that have gone @@ -390,7 +390,7 @@ shownetstat(void) * If the nflag was specified, use numbers instead of names. */ static void -inetprint(register struct in_addr *in, int port, const char *proto) +inetprint(struct in_addr *in, int port, const char *proto) { struct servent *sp = 0; char line[80], *cp; @@ -457,7 +457,7 @@ inetname(struct in_addr in) int cmdnetstat(char *cmd, char *args) { - register struct netinfo *p; + struct netinfo *p; if (prefix(cmd, "all")) { aflag = !aflag; diff --git a/usr.bin/systat/pigs.c b/usr.bin/systat/pigs.c index e88be1d6dc..ee3a714580 100644 --- a/usr.bin/systat/pigs.c +++ b/usr.bin/systat/pigs.c @@ -32,7 +32,7 @@ * * @(#)pigs.c 8.2 (Berkeley) 9/23/93 * - * $DragonFly: src/usr.bin/systat/pigs.c,v 1.14 2007/02/16 23:11:40 corecode Exp $ + * $DragonFly: src/usr.bin/systat/pigs.c,v 1.15 2008/10/16 01:52:33 swildner Exp $ */ /* @@ -87,7 +87,7 @@ closepigs(WINDOW *w) void showpigs(void) { - register int i, j, y, k; + int i, j, y, k; float total; int factor; char *uname, *pname, pidname[30]; diff --git a/usr.bin/systat/swap.c b/usr.bin/systat/swap.c index 070a768ba6..5ad0198be6 100644 --- a/usr.bin/systat/swap.c +++ b/usr.bin/systat/swap.c @@ -32,7 +32,7 @@ * * @(#)swap.c 8.3 (Berkeley) 4/29/95 * $FreeBSD: src/usr.bin/systat/swap.c,v 1.12.2.2 2001/07/04 22:54:14 kris Exp $ - * $DragonFly: src/usr.bin/systat/swap.c,v 1.3 2003/10/04 20:36:51 hmp Exp $ + * $DragonFly: src/usr.bin/systat/swap.c,v 1.4 2008/10/16 01:52:33 swildner Exp $ */ /* @@ -118,7 +118,7 @@ fetchswap(void) } void -labelswap() +labelswap(void) { char *header, *p; int row, i; diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c index 90046d584e..525ba240c8 100644 --- a/usr.bin/systat/vmstat.c +++ b/usr.bin/systat/vmstat.c @@ -32,7 +32,7 @@ * * @(#)vmstat.c 8.2 (Berkeley) 1/12/94 * $FreeBSD: src/usr.bin/systat/vmstat.c,v 1.38.2.4 2002/03/12 19:50:23 phantom Exp $ - * $DragonFly: src/usr.bin/systat/vmstat.c,v 1.10 2008/06/28 23:45:20 dillon Exp $ + * $DragonFly: src/usr.bin/systat/vmstat.c,v 1.11 2008/10/16 01:52:33 swildner Exp $ */ /* @@ -273,7 +273,7 @@ fetchkre(void) void labelkre(void) { - register int i, j; + int i, j; clear(); mvprintw(STATROW, STATCOL + 4, "users Load"); @@ -646,7 +646,7 @@ cmdkre(char *cmd, char *args) static int ucount(void) { - register int nusers = 0; + int nusers = 0; if (ut < 0) return (0); @@ -810,7 +810,7 @@ allocinfo(struct Info *s) } static void -copyinfo(register struct Info *from, register struct Info *to) +copyinfo(struct Info *from, struct Info *to) { long *intrcnt; diff --git a/usr.bin/talk/get_names.c b/usr.bin/talk/get_names.c index f2cb05caea..ed463e96c1 100644 --- a/usr.bin/talk/get_names.c +++ b/usr.bin/talk/get_names.c @@ -32,7 +32,7 @@ * * @(#)get_names.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/talk/get_names.c,v 1.6.2.1 2001/07/30 10:31:29 dd Exp $ - * $DragonFly: src/usr.bin/talk/get_names.c,v 1.4 2004/08/30 18:06:50 eirikn Exp $ + * $DragonFly: src/usr.bin/talk/get_names.c,v 1.5 2008/10/16 01:52:33 swildner Exp $ */ #include @@ -61,7 +61,7 @@ get_names(int argc, char **argv) char *his_name, *my_name; char *my_machine_name, *his_machine_name; char *my_tty, *his_tty; - register char *cp; + char *cp; if (argc < 2 ) usage(); diff --git a/usr.bin/talk/look_up.c b/usr.bin/talk/look_up.c index 9db7e89b8c..fae780d659 100644 --- a/usr.bin/talk/look_up.c +++ b/usr.bin/talk/look_up.c @@ -32,7 +32,7 @@ * * @(#)look_up.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/talk/look_up.c,v 1.5 1999/08/28 01:06:14 peter Exp $ - * $DragonFly: src/usr.bin/talk/look_up.c,v 1.4 2004/08/19 23:32:02 joerg Exp $ + * $DragonFly: src/usr.bin/talk/look_up.c,v 1.5 2008/10/16 01:52:33 swildner Exp $ */ #include @@ -49,7 +49,7 @@ int check_local(void) { CTL_RESPONSE response; - register CTL_RESPONSE *rp = &response; + CTL_RESPONSE *rp = &response; /* the rest of msg was set up in get_names */ #ifdef MSG_EOR diff --git a/usr.bin/tcopy/tcopy.c b/usr.bin/tcopy/tcopy.c index 01506f7c84..a6dfbcca8f 100644 --- a/usr.bin/tcopy/tcopy.c +++ b/usr.bin/tcopy/tcopy.c @@ -33,7 +33,7 @@ * @(#) Copyright (c) 1985, 1987, 1993 The Regents of the University of California. All rights reserved. * @(#)tcopy.c 8.2 (Berkeley) 4/17/94 * $FreeBSD: src/usr.bin/tcopy/tcopy.c,v 1.7.2.1 2002/11/07 17:54:42 imp Exp $ - * $DragonFly: src/usr.bin/tcopy/tcopy.c,v 1.3 2003/10/04 20:36:52 hmp Exp $ + * $DragonFly: src/usr.bin/tcopy/tcopy.c,v 1.4 2008/10/16 01:52:33 swildner Exp $ */ #include @@ -69,7 +69,7 @@ void rewind_tape(int); int main(int argc, char **argv) { - register int lastnread, nread, nw, inp, outp; + int lastnread, nread, nw, inp, outp; enum {READ, VERIFY, COPY, COPYVERIFY} op = READ; sig_t oldsig; int ch, needeof; @@ -215,10 +215,10 @@ r1: guesslen = 0; } void -verify(register int inp, register int outp, register char *outb) +verify(int inp, int outp, char *outb) { - register int eot, inmaxblk, inn, outmaxblk, outn; - register char *inb; + int eot, inmaxblk, inn, outmaxblk, outn; + char *inb; inb = getspace(maxblk); inmaxblk = outmaxblk = maxblk; diff --git a/usr.bin/telnet/externs.h b/usr.bin/telnet/externs.h index 00deb6675c..3727ba1a6c 100644 --- a/usr.bin/telnet/externs.h +++ b/usr.bin/telnet/externs.h @@ -32,7 +32,7 @@ * * @(#)externs.h 8.3 (Berkeley) 5/30/95 * $FreeBSD: src/usr.bin/telnet/externs.h,v 1.5.2.2 2002/04/13 11:07:13 markm Exp $ - * $DragonFly: src/usr.bin/telnet/externs.h,v 1.2 2003/06/17 04:29:32 dillon Exp $ + * $DragonFly: src/usr.bin/telnet/externs.h,v 1.3 2008/10/16 01:52:33 swildner Exp $ */ #ifndef BSD @@ -93,14 +93,6 @@ extern char *ipsec_policy_out; #define SUBBUFSIZE 256 -#if !defined(P) -# ifdef __STDC__ -# define P(x) x -# else -# define P(x) () -# endif -#endif - extern int autologin, /* Autologin enabled */ skiprc, /* Don't process the ~/.telnetrc file */ diff --git a/usr.bin/telnet/ring.h b/usr.bin/telnet/ring.h index 3298822047..dea010d118 100644 --- a/usr.bin/telnet/ring.h +++ b/usr.bin/telnet/ring.h @@ -32,19 +32,9 @@ * * @(#)ring.h 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/telnet/ring.h,v 1.2.14.1 2002/04/13 11:07:13 markm Exp $ - * $DragonFly: src/usr.bin/telnet/ring.h,v 1.2 2003/06/17 04:29:32 dillon Exp $ + * $DragonFly: src/usr.bin/telnet/ring.h,v 1.3 2008/10/16 01:52:33 swildner Exp $ */ -#if defined(P) -# undef P -#endif - -#if defined(__STDC__) || defined(LINT_ARGS) -# define P(x) x -#else -# define P(x) () -#endif - /* * This defines a structure for a ring buffer. * diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c index 5a3229bd81..1a354385e4 100644 --- a/usr.bin/tftp/main.c +++ b/usr.bin/tftp/main.c @@ -33,7 +33,7 @@ * @(#) Copyright (c) 1983, 1993 The Regents of the University of California. All rights reserved. * @(#)main.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/tftp/main.c,v 1.8.2.3 2002/05/14 22:08:07 bsd Exp $ - * $DragonFly: src/usr.bin/tftp/main.c,v 1.5 2004/08/30 18:06:50 eirikn Exp $ + * $DragonFly: src/usr.bin/tftp/main.c,v 1.6 2008/10/16 01:52:33 swildner Exp $ */ /* Many bug fixes are from Jim Guyton */ @@ -266,7 +266,7 @@ struct modes { void modecmd(int argc, char **argv) { - register struct modes *p; + struct modes *p; char *sep; if (argc < 2) { @@ -326,8 +326,8 @@ void put(int argc, char **argv) { int fd; - register int n; - register char *cp, *targ; + int n; + char *cp, *targ; if (argc < 2) { strcpy(line, "send "); @@ -408,8 +408,8 @@ void get(int argc, char **argv) { int fd; - register int n; - register char *cp; + int n; + char *cp; char *src; if (argc < 2) { @@ -557,7 +557,7 @@ intr(void) char * tail(char *filename) { - register char *s; + char *s; while (*filename) { s = strrchr(filename, '/'); @@ -576,7 +576,7 @@ tail(char *filename) static void command(void) { - register struct cmd *c; + struct cmd *c; char *cp; for (;;) { @@ -609,11 +609,11 @@ command(void) } struct cmd * -getcmd(register char *name) +getcmd(char *name) { - register char *p, *q; - register struct cmd *c, *found; - register int nmatches, longest; + char *p, *q; + struct cmd *c, *found; + int nmatches, longest; longest = 0; nmatches = 0; @@ -642,8 +642,8 @@ getcmd(register char *name) static void makeargv(void) { - register char *cp; - register char **argp = margv; + char *cp; + char **argp = margv; margc = 0; if ((cp = strchr(line, '\n'))) @@ -677,7 +677,7 @@ quit(int argc, char **argv) void help(int argc, char **argv) { - register struct cmd *c; + struct cmd *c; if (argc == 1) { printf("Commands may be abbreviated. Commands are:\n\n"); @@ -686,7 +686,7 @@ help(int argc, char **argv) return; } while (--argc > 0) { - register char *arg; + char *arg; arg = *++argv; c = getcmd(arg); if (c == (struct cmd *)-1) diff --git a/usr.bin/tftp/tftp.c b/usr.bin/tftp/tftp.c index b29405f2aa..8bf098ca31 100644 --- a/usr.bin/tftp/tftp.c +++ b/usr.bin/tftp/tftp.c @@ -32,7 +32,7 @@ * * @(#)tftp.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/tftp/tftp.c,v 1.5.2.3 2002/05/14 22:08:07 bsd Exp $ - * $DragonFly: src/usr.bin/tftp/tftp.c,v 1.5 2004/09/03 20:38:01 dillon Exp $ + * $DragonFly: src/usr.bin/tftp/tftp.c,v 1.6 2008/10/16 01:52:33 swildner Exp $ */ /* Many bug fixes are from Jim Guyton */ @@ -89,9 +89,9 @@ static int cmpport(struct sockaddr *, struct sockaddr *); void xmitfile(int fd, char *name, char *mode) { - register struct tftphdr *ap; /* data and ack packets */ + struct tftphdr *ap; /* data and ack packets */ struct tftphdr *r_init(), *dp; - register int n; + int n; volatile unsigned short block; volatile int size, convert; volatile unsigned long amount; @@ -204,9 +204,9 @@ abort: void recvfile(int fd, char *name, char *mode) { - register struct tftphdr *ap; + struct tftphdr *ap; struct tftphdr *dp, *w_init(); - register int n; + int n; volatile unsigned short block; volatile int size, firsttrip; volatile unsigned long amount; @@ -323,7 +323,7 @@ abort: /* ok to ack, since user */ static int makerequest(int request, const char *name, struct tftphdr *tp, const char *mode) { - register char *cp; + char *cp; tp->th_opcode = htons((u_short)request); cp = tp->th_stuff; @@ -360,8 +360,8 @@ struct errmsg { static void nak(int error, struct sockaddr *peer) { - register struct errmsg *pe; - register struct tftphdr *tp; + struct errmsg *pe; + struct tftphdr *tp; int length; char *strerror(); @@ -388,7 +388,7 @@ tpacket(const char *s, struct tftphdr *tp, int n) { static char *opcodes[] = { "#0", "RRQ", "WRQ", "DATA", "ACK", "ERROR" }; - register char *cp, *file; + char *cp, *file; u_short op = ntohs(tp->th_opcode); if (op < RRQ || op > ERROR) diff --git a/usr.bin/tftp/tftpsubs.c b/usr.bin/tftp/tftpsubs.c index a64300a9d8..432d015d90 100644 --- a/usr.bin/tftp/tftpsubs.c +++ b/usr.bin/tftp/tftpsubs.c @@ -32,7 +32,7 @@ * * @(#)tftpsubs.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/tftp/tftpsubs.c,v 1.3.2.1 2002/04/26 17:22:43 ume Exp $ - * $DragonFly: src/usr.bin/tftp/tftpsubs.c,v 1.3 2003/10/04 20:36:52 hmp Exp $ + * $DragonFly: src/usr.bin/tftp/tftpsubs.c,v 1.4 2008/10/16 01:52:33 swildner Exp $ */ /* Simple minded read-ahead/write-behind subroutines for tftp user and @@ -78,8 +78,8 @@ int prevchar = -1; /* putbuf: previous char (cr check) */ static struct tftphdr *rw_init(); -struct tftphdr *w_init() { return rw_init(0); } /* write-behind */ -struct tftphdr *r_init() { return rw_init(1); } /* read-ahead */ +struct tftphdr *w_init(void) { return rw_init(0); } /* write-behind */ +struct tftphdr *r_init(void) { return rw_init(1); } /* read-ahead */ static struct tftphdr * rw_init(int x /* zero for write-behind, one for read-head */ @@ -124,9 +124,9 @@ readit(FILE *file, /* file opened for read */ void read_ahead(FILE *file, int convert) { - register int i; - register char *p; - register int c; + int i; + char *p; + int c; struct bf *b; struct tftphdr *dp; @@ -191,9 +191,9 @@ write_behind(FILE *file, int convert) { char *buf; int count; - register int ct; - register char *p; - register int c; /* current character */ + int ct; + char *p; + int c; /* current character */ struct bf *b; struct tftphdr *dp; diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index cfad65cdfd..733d5c768c 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -21,7 +21,7 @@ * Hiten Pandya * * $FreeBSD: src/usr.bin/top/machine.c,v 1.29.2.2 2001/07/31 20:27:05 tmm Exp $ - * $DragonFly: src/usr.bin/top/machine.c,v 1.25 2008/03/01 18:49:00 nant Exp $ + * $DragonFly: src/usr.bin/top/machine.c,v 1.26 2008/10/16 01:52:33 swildner Exp $ */ @@ -229,8 +229,8 @@ cputime_percentages(int out[CPU_STATES], struct kinfo_cputime *new, int machine_init(struct statics *statics) { - register int i = 0; - register int pagesize; + int i = 0; + int pagesize; size_t modelen; struct passwd *pw; @@ -295,9 +295,9 @@ machine_init(struct statics *statics) return(0); } -char *format_header(register char *uname_field) +char *format_header(char *uname_field) { - register char *ptr; + char *ptr; static char Header[128]; snprintf(Header, sizeof(Header), smpmode ? smp_header : up_header, @@ -447,11 +447,11 @@ static struct handle handle; caddr_t get_process_info(struct system_info *si, struct process_select *sel, int (*compare)()) { - register int i; - register int total_procs; - register int active_procs; - register struct kinfo_proc **prefp; - register struct kinfo_proc *pp; + int i; + int total_procs; + int active_procs; + struct kinfo_proc **prefp; + struct kinfo_proc *pp; /* these are copied out of sel for speed */ int show_idle; @@ -661,9 +661,9 @@ char *format_next_process(caddr_t handle, char *(*get_userid)()) * number of symbols NOT found. */ -static int check_nlist(register struct nlist *nlst) +static int check_nlist(struct nlist *nlst) { - register int i; + int i; /* check to see if we got ALL the symbols we requested */ /* this will write one line to stderr for every symbol not found */ @@ -747,10 +747,10 @@ compare_cpu(struct proc **pp1, struct proc **pp2) proc_compare(struct proc **pp1, struct proc **pp2) #endif { - register struct kinfo_proc *p1; - register struct kinfo_proc *p2; - register int result; - register pctcpu lresult; + struct kinfo_proc *p1; + struct kinfo_proc *p2; + int result; + pctcpu lresult; /* remove one level of indirection */ p1 = *(struct kinfo_proc **) pp1; @@ -786,10 +786,10 @@ int (*proc_compares[])() = { int compare_size(struct proc **pp1, struct proc **pp2) { - register struct kinfo_proc *p1; - register struct kinfo_proc *p2; - register int result; - register pctcpu lresult; + struct kinfo_proc *p1; + struct kinfo_proc *p2; + int result; + pctcpu lresult; /* remove one level of indirection */ p1 = *(struct kinfo_proc **) pp1; @@ -811,10 +811,10 @@ compare_size(struct proc **pp1, struct proc **pp2) int compare_res(struct proc **pp1, struct proc **pp2) { - register struct kinfo_proc *p1; - register struct kinfo_proc *p2; - register int result; - register pctcpu lresult; + struct kinfo_proc *p1; + struct kinfo_proc *p2; + int result; + pctcpu lresult; /* remove one level of indirection */ p1 = *(struct kinfo_proc **) pp1; @@ -836,10 +836,10 @@ compare_res(struct proc **pp1, struct proc **pp2) int compare_time(struct proc **pp1, struct proc **pp2) { - register struct kinfo_proc *p1; - register struct kinfo_proc *p2; - register int result; - register pctcpu lresult; + struct kinfo_proc *p1; + struct kinfo_proc *p2; + int result; + pctcpu lresult; /* remove one level of indirection */ p1 = *(struct kinfo_proc **) pp1; @@ -863,10 +863,10 @@ compare_time(struct proc **pp1, struct proc **pp2) int compare_prio(struct proc **pp1, struct proc **pp2) { - register struct kinfo_proc *p1; - register struct kinfo_proc *p2; - register int result; - register pctcpu lresult; + struct kinfo_proc *p1; + struct kinfo_proc *p2; + int result; + pctcpu lresult; /* remove one level of indirection */ p1 = *(struct kinfo_proc **) pp1; @@ -888,10 +888,10 @@ compare_prio(struct proc **pp1, struct proc **pp2) int compare_thr(struct proc **pp1, struct proc **pp2) { - register struct kinfo_proc *p1; - register struct kinfo_proc *p2; - register int result; - register pctcpu lresult; + struct kinfo_proc *p1; + struct kinfo_proc *p2; + int result; + pctcpu lresult; /* remove one level of indirection */ p1 = *(struct kinfo_proc **) pp1; @@ -924,9 +924,9 @@ compare_thr(struct proc **pp1, struct proc **pp2) int proc_owner(int pid) { - register int cnt; - register struct kinfo_proc **prefp; - register struct kinfo_proc *pp; + int cnt; + struct kinfo_proc **prefp; + struct kinfo_proc *pp; prefp = pref; cnt = pref_len; diff --git a/usr.bin/truss/i386-fbsd.c b/usr.bin/truss/i386-fbsd.c index 89bedd0c92..7a6dd8637c 100644 --- a/usr.bin/truss/i386-fbsd.c +++ b/usr.bin/truss/i386-fbsd.c @@ -29,7 +29,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/usr.bin/truss/i386-fbsd.c,v 1.7.2.2 2001/10/29 20:12:56 des Exp $ - * $DragonFly: src/usr.bin/truss/i386-fbsd.c,v 1.4 2007/12/27 00:59:25 nth Exp $ + * $DragonFly: src/usr.bin/truss/i386-fbsd.c,v 1.5 2008/10/16 01:52:33 swildner Exp $ */ /* @@ -88,7 +88,7 @@ static struct freebsd_syscall { /* Clear up and free parts of the fsc structure. */ static inline void -clear_fsc() { +clear_fsc(void) { if (fsc.args) { free(fsc.args); } diff --git a/usr.bin/tset/misc.c b/usr.bin/tset/misc.c index 219da2f637..7901950ffb 100644 --- a/usr.bin/tset/misc.c +++ b/usr.bin/tset/misc.c @@ -32,7 +32,7 @@ * * @(#)misc.c 8.1 (Berkeley) 6/9/93 * $FreeBSD: src/usr.bin/tset/misc.c,v 1.4 1999/08/28 01:06:58 peter Exp $ - * $DragonFly: src/usr.bin/tset/misc.c,v 1.3 2003/10/04 20:36:53 hmp Exp $ + * $DragonFly: src/usr.bin/tset/misc.c,v 1.4 2008/10/16 01:52:34 swildner Exp $ */ #include @@ -46,7 +46,7 @@ void cat(char *file) { - register int fd, nr, nw; + int fd, nr, nw; char buf[1024]; if ((fd = open(file, O_RDONLY, 0)) < 0) diff --git a/usr.bin/tset/wrterm.c b/usr.bin/tset/wrterm.c index 0ea205d736..6d1ecad845 100644 --- a/usr.bin/tset/wrterm.c +++ b/usr.bin/tset/wrterm.c @@ -32,7 +32,7 @@ * * @(#)wrterm.c 8.1 (Berkeley) 6/9/93 * $FreeBSD: src/usr.bin/tset/wrterm.c,v 1.3 1999/08/28 01:06:59 peter Exp $ - * $DragonFly: src/usr.bin/tset/wrterm.c,v 1.4 2004/08/30 18:06:50 eirikn Exp $ + * $DragonFly: src/usr.bin/tset/wrterm.c,v 1.5 2008/10/16 01:52:34 swildner Exp $ */ #include @@ -49,8 +49,8 @@ void wrtermcap(char *bp) { - register int ch; - register char *p; + int ch; + char *p; char *t, *sep; /* Find the end of the terminal names. */ diff --git a/usr.bin/uniq/uniq.c b/usr.bin/uniq/uniq.c index 41df198535..f506c9c4f5 100644 --- a/usr.bin/uniq/uniq.c +++ b/usr.bin/uniq/uniq.c @@ -36,7 +36,7 @@ * @(#) Copyright (c) 1989, 1993 The Regents of the University of California. All rights reserved. * @(#)uniq.c 8.3 (Berkeley) 5/4/95 * $FreeBSD: src/usr.bin/uniq/uniq.c,v 1.11.2.3 2002/06/28 08:02:19 tjr Exp $ - * $DragonFly: src/usr.bin/uniq/uniq.c,v 1.4 2005/01/12 01:36:50 cpressey Exp $ + * $DragonFly: src/usr.bin/uniq/uniq.c,v 1.5 2008/10/16 01:52:34 swildner Exp $ */ #include @@ -64,7 +64,7 @@ int stricoll(char *, char*); int main(int argc, char **argv) { - register char *t1, *t2; + char *t1, *t2; FILE *ifp, *ofp; int ch; char *prevline, *thisline, *p; @@ -192,9 +192,9 @@ show(FILE *ofp, char *str) } char * -skip(register char *str) +skip(char *str) { - register int nchars, nfields; + int nchars, nfields; for (nfields = 0; *str != '\0' && nfields++ != numfields; ) { while (isblank((unsigned char)*str)) diff --git a/usr.bin/vgrind/regexp.c b/usr.bin/vgrind/regexp.c index ff4b06c318..b151029dd1 100644 --- a/usr.bin/vgrind/regexp.c +++ b/usr.bin/vgrind/regexp.c @@ -34,7 +34,7 @@ * @(#) Copyright (c) 1980, 1993 The Regents of the University of California. All rights reserved. * @(#)regexp.c 8.1 (Berkeley) 6/6/93 * - * $DragonFly: src/usr.bin/vgrind/regexp.c,v 1.3 2003/10/04 20:36:54 hmp Exp $ + * $DragonFly: src/usr.bin/vgrind/regexp.c,v 1.4 2008/10/16 01:52:34 swildner Exp $ */ #include @@ -60,7 +60,7 @@ boolean l_onecase; /* true if upper and lower equivalent */ */ int -STRNCMP(register char *s1, register char *s2, register int len) +STRNCMP(char *s1, char *s2, int len) { if (l_onecase) { do @@ -143,7 +143,7 @@ static char *ure; /* pointer current position in unconverted exp */ char * convexp(char *re) { - register char *cre; /* pointer to converted regular expression */ + char *cre; /* pointer to converted regular expression */ /* allocate room for the converted expression */ if (re == NIL) @@ -168,10 +168,10 @@ convexp(char *re) static void expconv(void) { - register char *cs; /* pointer to current symbol in converted exp */ - register char c; /* character being processed */ - register char *acs; /* pinter to last alternate */ - register int temp; + char *cs; /* pointer to current symbol in converted exp */ + char c; /* character being processed */ + char *acs; /* pinter to last alternate */ + int temp; /* let the conversion begin */ acs = NIL; @@ -342,10 +342,10 @@ re: a converted irregular expression mstring: where to put whatever matches a \p */ char * -expmatch(register char *s, register char *re, register char *mstring) +expmatch(char *s, char *re, char *mstring) { - register char *cs; /* the current symbol */ - register char *ptr,*s1; /* temporary pointer */ + char *cs; /* the current symbol */ + char *ptr,*s1; /* temporary pointer */ boolean matched; /* a temporary boolean */ /* initial conditions */ diff --git a/usr.bin/vgrind/vfontedpr.c b/usr.bin/vgrind/vfontedpr.c index e0fe928891..fd5da4254f 100644 --- a/usr.bin/vgrind/vfontedpr.c +++ b/usr.bin/vgrind/vfontedpr.c @@ -33,7 +33,7 @@ * @(#) Copyright (c) 1980, 1993 The Regents of the University of California. All rights reserved. * @(#)vfontedpr.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/vgrind/vfontedpr.c,v 1.12 1999/08/28 01:07:21 peter Exp $ - * $DragonFly: src/usr.bin/vgrind/vfontedpr.c,v 1.3 2003/10/04 20:36:54 hmp Exp $ + * $DragonFly: src/usr.bin/vgrind/vfontedpr.c,v 1.4 2008/10/16 01:52:34 swildner Exp $ */ #include @@ -344,7 +344,7 @@ main(int argc, char **argv) static void putScp(char *os) { - register char *s = os; /* pointer to unmatched string */ + char *s = os; /* pointer to unmatched string */ char dummy[BUFSIZ]; /* dummy to be used by expmatch */ char *comptr; /* end of a comment delimiter */ char *acmptr; /* end of a comment delimiter */ @@ -590,9 +590,9 @@ tabs(char *s, char *os) } static int -width(register char *s, register char *os) +width(char *s, char *os) { - register int i = 0; + int i = 0; while (s < os) { if (*s == '\t') { @@ -610,7 +610,7 @@ width(register char *s, register char *os) } static void -putcp(register int c) +putcp(int c) { switch(c) { @@ -692,11 +692,11 @@ isproc(char *s) */ static int -iskw(register char *s) +iskw(char *s) { - register char **ss = l_keywds; - register int i = 1; - register char *cp = s; + char **ss = l_keywds; + int i = 1; + char *cp = s; while (++cp, isidchr(*cp)) i++; diff --git a/usr.bin/vgrind/vgrindefs.c b/usr.bin/vgrind/vgrindefs.c index 59600f0f2c..fecc5e9d53 100644 --- a/usr.bin/vgrind/vgrindefs.c +++ b/usr.bin/vgrind/vgrindefs.c @@ -32,7 +32,7 @@ * * @(#)vgrindefs.c 8.1 (Berkeley) 6/6/93 * - * $DragonFly: src/usr.bin/vgrind/vgrindefs.c,v 1.4 2004/09/03 20:38:01 dillon Exp $ + * $DragonFly: src/usr.bin/vgrind/vgrindefs.c,v 1.5 2008/10/16 01:52:34 swildner Exp $ */ #define BUFSIZ 1024 @@ -69,9 +69,9 @@ char *tdecode(); int tgetent(char *bp, char *name, char *file) { - register char *cp; - register int c; - register int i = 0, cnt = 0; + char *cp; + int c; + int i = 0, cnt = 0; char ibuf[BUFSIZ]; char *cp2; int tf; @@ -129,7 +129,7 @@ tgetent(char *bp, char *name, char *file) int tnchktc(void) { - register char *p, *q; + char *p, *q; char tcname[16]; /* name of similar terminal */ char tcbuf[BUFSIZ]; char *holdtbuf = tbuf; @@ -177,7 +177,7 @@ tnchktc(void) int tnamatch(char *np) { - register char *Np, *Bp; + char *Np, *Bp; Bp = tbuf; if (*Bp == '#') @@ -201,7 +201,7 @@ tnamatch(char *np) * into the termcap file in octal. */ static char * -tskip(register char *bp) +tskip(char *bp) { while (*bp && *bp != ':') @@ -222,8 +222,8 @@ tskip(register char *bp) int tgetnum(char *id) { - register int i, base; - register char *bp = tbuf; + int i, base; + char *bp = tbuf; for (;;) { bp = tskip(bp); @@ -255,7 +255,7 @@ tgetnum(char *id) int tgetflag(char *id) { - register char *bp = tbuf; + char *bp = tbuf; for (;;) { bp = tskip(bp); @@ -281,7 +281,7 @@ tgetflag(char *id) char * tgetstr(char *id, char **area) { - register char *bp = tbuf; + char *bp = tbuf; for (;;) { bp = tskip(bp); @@ -303,10 +303,10 @@ tgetstr(char *id, char **area) * string capability escapes. */ static char * -tdecode(register char *str, char **area) +tdecode(char *str, char **area) { - register char *cp; - register int c; + char *cp; + int c; int i; cp = *area; diff --git a/usr.bin/vis/foldit.c b/usr.bin/vis/foldit.c index 803355c127..f1f9e6b90d 100644 --- a/usr.bin/vis/foldit.c +++ b/usr.bin/vis/foldit.c @@ -32,7 +32,7 @@ * * @(#)foldit.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/vis/foldit.c,v 1.4 1999/08/28 01:07:25 peter Exp $ - * $DragonFly: src/usr.bin/vis/foldit.c,v 1.3 2003/10/04 20:36:54 hmp Exp $ + * $DragonFly: src/usr.bin/vis/foldit.c,v 1.4 2008/10/16 01:52:34 swildner Exp $ */ #include @@ -40,7 +40,7 @@ int foldit(char *chunk, int col, int max) { - register char *cp; + char *cp; /* * Keep track of column position. Insert hidden newline diff --git a/usr.bin/vis/vis.c b/usr.bin/vis/vis.c index 56ce959966..edc0629165 100644 --- a/usr.bin/vis/vis.c +++ b/usr.bin/vis/vis.c @@ -33,7 +33,7 @@ * @(#) Copyright (c) 1989, 1993 The Regents of the University of California. All rights reserved. * @(#)vis.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/vis/vis.c,v 1.6 1999/08/28 01:07:25 peter Exp $ - * $DragonFly: src/usr.bin/vis/vis.c,v 1.3 2003/10/04 20:36:54 hmp Exp $ + * $DragonFly: src/usr.bin/vis/vis.c,v 1.4 2008/10/16 01:52:34 swildner Exp $ */ #include @@ -131,8 +131,8 @@ void process(FILE *fp, char *filename) { static int col = 0; - register char *cp = "\0"+1; /* so *(cp-1) starts out != '\n' */ - register int c, rachar; + char *cp = "\0"+1; /* so *(cp-1) starts out != '\n' */ + int c, rachar; char buff[5]; c = getc(fp); -- 2.11.4.GIT