From 2c3b12ff2e6328b98b9597f17be7b929f0e84a55 Mon Sep 17 00:00:00 2001 From: David Rhodus Date: Thu, 4 Aug 2005 17:27:09 +0000 Subject: [PATCH] ANSI-fy some functions, remove some duplicate CVS tags and add in some missging $DragonFly$ tags. --- lib/libcrypt/crypt-md5.c | 8 +- lib/libcrypt/crypt.c | 4 +- lib/libcrypt/misc.c | 7 +- lib/libedit/chared.c | 94 +++++++--------------- lib/libedit/common.c | 142 +++++++++------------------------ lib/libedit/el.c | 29 +++---- lib/libedit/emacs.c | 78 +++++------------- lib/libipx/ipx_addr.c | 19 ++--- lib/libipx/ipx_ntoa.c | 8 +- lib/libopie/opieextra.c | 12 +-- lib/libposix1e/acl_delete.c | 4 +- lib/libposix1e/acl_free.c | 4 +- lib/libposix1e/acl_from_text.c | 4 +- lib/libposix1e/acl_get.c | 4 +- lib/libposix1e/acl_init.c | 4 +- lib/libposix1e/acl_set.c | 4 +- lib/libposix1e/acl_support.c | 4 +- lib/libposix1e/acl_to_text.c | 4 +- lib/libposix1e/acl_valid.c | 4 +- lib/librpcsvc/rnusers.c | 8 +- 20 files changed, 130 insertions(+), 315 deletions(-) diff --git a/lib/libcrypt/crypt-md5.c b/lib/libcrypt/crypt-md5.c index 39905a3a88..2ad074feb7 100644 --- a/lib/libcrypt/crypt-md5.c +++ b/lib/libcrypt/crypt-md5.c @@ -7,9 +7,7 @@ * ---------------------------------------------------------------------------- * * $FreeBSD: src/lib/libcrypt/crypt-md5.c,v 1.5.2.1 2001/05/24 12:20:02 markm Exp $ - * $DragonFly: src/lib/libcrypt/crypt-md5.c,v 1.2 2003/06/17 04:26:49 dillon Exp $ - * - * $FreeBSD: src/lib/libcrypt/crypt-md5.c,v 1.5.2.1 2001/05/24 12:20:02 markm Exp $ + * $DragonFly: src/lib/libcrypt/crypt-md5.c,v 1.3 2005/08/04 17:27:09 drhodus Exp $ */ #include @@ -24,9 +22,7 @@ */ char * -crypt_md5(pw, salt) - const char *pw; - const char *salt; +crypt_md5(const char *pw, const char *salt) { static char *magic = "$1$"; /* * This string is magic for diff --git a/lib/libcrypt/crypt.c b/lib/libcrypt/crypt.c index 212625fb0f..4d16ff1de7 100644 --- a/lib/libcrypt/crypt.c +++ b/lib/libcrypt/crypt.c @@ -24,9 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/lib/libcrypt/crypt.c,v 1.14.2.2 2001/05/24 12:20:02 markm Exp $ - * $DragonFly: src/lib/libcrypt/crypt.c,v 1.2 2003/06/17 04:26:49 dillon Exp $ - * - * $FreeBSD: src/lib/libcrypt/crypt.c,v 1.14.2.2 2001/05/24 12:20:02 markm Exp $ + * $DragonFly: src/lib/libcrypt/crypt.c,v 1.3 2005/08/04 17:27:09 drhodus Exp $ */ #include diff --git a/lib/libcrypt/misc.c b/lib/libcrypt/misc.c index d014608c68..290c8f3782 100644 --- a/lib/libcrypt/misc.c +++ b/lib/libcrypt/misc.c @@ -27,7 +27,7 @@ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/lib/libcrypt/misc.c,v 1.1 1999/09/20 12:45:49 markm Exp $ - * $DragonFly: src/lib/libcrypt/misc.c,v 1.2 2003/06/17 04:26:49 dillon Exp $ + * $DragonFly: src/lib/libcrypt/misc.c,v 1.3 2005/08/04 17:27:09 drhodus Exp $ * */ @@ -35,10 +35,7 @@ static unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */ "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; void -_crypt_to64(s, v, n) - char *s; - unsigned long v; - int n; +_crypt_to64(char *s, unsigned long v, int n) { while (--n >= 0) { *s++ = itoa64[v&0x3f]; diff --git a/lib/libedit/chared.c b/lib/libedit/chared.c index e25538210a..da1b9d1c33 100644 --- a/lib/libedit/chared.c +++ b/lib/libedit/chared.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)chared.c 8.1 (Berkeley) 6/4/93 - * $DragonFly: src/lib/libedit/chared.c,v 1.5 2004/10/25 19:38:45 drhodus Exp $ + * $DragonFly: src/lib/libedit/chared.c,v 1.6 2005/08/04 17:27:09 drhodus Exp $ */ /* @@ -49,10 +49,7 @@ * Handle state for the vi undo command */ protected void -cv_undo(el, action, size, ptr) - EditLine *el; - int action, size; - char *ptr; +cv_undo(EditLine *el, int action, int size, char *ptr) { c_undo_t *vu = &el->el_chared.c_undo; vu->action = action; @@ -70,9 +67,7 @@ cv_undo(el, action, size, ptr) * Insert num characters */ protected void -c_insert(el, num) - EditLine *el; - int num; +c_insert(EditLine *el, int num) { char *cp; @@ -92,9 +87,7 @@ c_insert(el, num) * Delete num characters after the cursor */ protected void -c_delafter(el, num) - EditLine *el; - int num; +c_delafter(EditLine *el, int num) { if (el->el_line.cursor + num > el->el_line.lastchar) @@ -118,9 +111,7 @@ c_delafter(el, num) * Delete num characters before the cursor */ protected void -c_delbefore(el, num) - EditLine *el; - int num; +c_delbefore(EditLine *el, int num) { if (el->el_line.cursor - num < el->el_line.buffer) @@ -144,8 +135,7 @@ c_delbefore(el, num) * Return if p is part of a word according to emacs */ protected int -ce__isword(p) - int p; +ce__isword(int p) { return isalpha((unsigned char) p) || isdigit((unsigned char) p) || strchr("*?_-.[]~=", p) != NULL; } @@ -155,8 +145,7 @@ ce__isword(p) * Return type of word for p according to vi */ protected int -cv__isword(p) - int p; +cv__isword(int p) { if (isspace((unsigned char) p)) return 0; @@ -170,8 +159,7 @@ cv__isword(p) * Return if p is part of a space-delimited word (!isspace) */ protected int -c___isword(p) - int p; +c___isword(int p) { return !isspace((unsigned char) p); } @@ -181,10 +169,7 @@ c___isword(p) * Find the previous word */ protected char * -c__prev_word(p, low, n, wtest) - char *p, *low; - int n; - int (*wtest) (int); +c__prev_word(char *p, char *low, int n, int (*wtest)(int)) { p--; @@ -208,10 +193,7 @@ c__prev_word(p, low, n, wtest) * Find the next word */ protected char * -c__next_word(p, high, n, wtest) - char *p, *high; - int n; - int (*wtest) (int); +c__next_word(char *p, char *high, int n, int (*wtest)(int)) { while (n--) { while ((p < high) && !(*wtest)((unsigned char) *p)) @@ -229,11 +211,7 @@ c__next_word(p, high, n, wtest) * Find the next word vi style */ protected char * -cv_next_word(el, p, high, n, wtest) - EditLine *el; - char *p, *high; - int n; - int (*wtest) (int); +cv_next_word(EditLine *el, char *p, char *high, int n, int (*wtest)(int)) { int test; @@ -262,11 +240,7 @@ cv_next_word(el, p, high, n, wtest) * Find the previous word vi style */ protected char * -cv_prev_word(el, p, low, n, wtest) - EditLine *el; - char *p, *low; - int n; - int (*wtest) (int); +cv_prev_word(EditLine *el, char *p, char *low, int n, int (*wtest)(int)) { int test; @@ -302,10 +276,11 @@ cv_prev_word(el, p, low, n, wtest) * Return p pointing to last char used. */ protected char * -c__number(p, num, dval) - char *p; /* character position */ - int *num; /* Return value */ - int dval; /* dval is the number to subtract from like $-3 */ +c__number( + char *p, /* character position */ + int *num, /* Return value */ + int dval, /* dval is the number to subtract from like $-3 */ +) { int i; int sign = 1; @@ -333,8 +308,7 @@ c__number(p, num, dval) * Finish vi delete action */ protected void -cv_delfini(el) - EditLine *el; +cv_delfini(EditLine *el) { int size; int oaction; @@ -388,9 +362,7 @@ cv_delfini(el) * Go to the end of this word according to emacs */ protected char * -ce__endword(p, high, n) - char *p, *high; - int n; +ce__endword(char *p, char *high, int n) { p++; @@ -411,9 +383,7 @@ ce__endword(p, high, n) * Go to the end of this word according to vi */ protected char * -cv__endword(p, high, n) - char *p, *high; - int n; +cv__endword(char *p, char *high, int n) { p++; @@ -437,8 +407,7 @@ cv__endword(p, high, n) * Initialize the character editor */ protected int -ch_init(el) - EditLine *el; +ch_init(EditLine *el) { el->el_line.buffer = (char *) el_malloc(EL_BUFSIZ); (void) memset(el->el_line.buffer, 0, EL_BUFSIZ); @@ -481,8 +450,7 @@ ch_init(el) * Reset the character editor */ protected void -ch_reset(el) - EditLine *el; +ch_reset(EditLine *el) { el->el_line.cursor = el->el_line.buffer; el->el_line.lastchar = el->el_line.buffer; @@ -516,8 +484,7 @@ ch_reset(el) * Free the data structures used by the editor */ protected void -ch_end(el) - EditLine *el; +ch_end(EditLine *el) { el_free((ptr_t) el->el_line.buffer); el->el_line.buffer = NULL; @@ -536,9 +503,7 @@ ch_end(el) * Insert string at cursorI */ public int -el_insertstr(el, s) - EditLine *el; - char *s; +el_insertstr(EditLine *el, char *s) { int len; @@ -558,9 +523,7 @@ el_insertstr(el, s) * Delete num characters before the cursor */ public void -el_deletestr(el, n) - EditLine *el; - int n; +el_deletestr(EditLine *el, int n) { if (n <= 0) return; @@ -578,9 +541,7 @@ el_deletestr(el, n) * Get a string */ protected int -c_gets(el, buf) - EditLine *el; - char *buf; +c_gets(EditLine *el, char *buf) { char ch; int len = 0; @@ -633,8 +594,7 @@ c_gets(el, buf) * Return the current horizontal position of the cursor */ protected int -c_hpos(el) - EditLine *el; +c_hpos(EditLine *el) { char *ptr; diff --git a/lib/libedit/common.c b/lib/libedit/common.c index a16e697ad1..415e152a2d 100644 --- a/lib/libedit/common.c +++ b/lib/libedit/common.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)common.c 8.1 (Berkeley) 6/4/93 - * $DragonFly: src/lib/libedit/common.c,v 1.3 2004/10/25 19:38:45 drhodus Exp $ + * $DragonFly: src/lib/libedit/common.c,v 1.4 2005/08/04 17:27:09 drhodus Exp $ */ /* @@ -49,9 +49,7 @@ */ protected el_action_t /*ARGSUSED*/ -ed_end_of_file(el, c) - EditLine *el; - int c; +ed_end_of_file(EditLine *el, int c) { re_goto_bottom(el); *el->el_line.lastchar = '\0'; @@ -64,9 +62,7 @@ ed_end_of_file(el, c) * Insert a character [bound to all insert keys] */ protected el_action_t -ed_insert(el, c) - EditLine *el; - int c; +ed_insert(EditLine *el, int c) { int i; @@ -125,9 +121,7 @@ ed_insert(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_delete_prev_word(el, c) - EditLine *el; - int c; +ed_delete_prev_word(EditLine *el, int c) { char *cp, *p, *kp; @@ -155,9 +149,7 @@ ed_delete_prev_word(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_delete_next_char(el, c) - EditLine *el; - int c; +ed_delete_next_char(EditLine *el, int c) { #ifdef notdef /* XXX */ #define EL el->el_line @@ -204,9 +196,7 @@ fprintf(stderr, "\nD(b: %x(%s) c: %x(%s) last: %x(%s) limit: %x(%s)\n", */ protected el_action_t /*ARGSUSED*/ -ed_kill_line(el, c) - EditLine *el; - int c; +ed_kill_line(EditLine *el, int c) { char *kp, *cp; @@ -226,9 +216,7 @@ ed_kill_line(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_move_to_end(el, c) - EditLine *el; - int c; +ed_move_to_end(EditLine *el, int c) { el->el_line.cursor = el->el_line.lastchar; if (el->el_map.type == MAP_VI) { @@ -250,9 +238,7 @@ ed_move_to_end(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_move_to_beg(el, c) - EditLine *el; - int c; +ed_move_to_beg(EditLine *el, int c) { el->el_line.cursor = el->el_line.buffer; @@ -275,9 +261,7 @@ ed_move_to_beg(el, c) * [^T] [^T] */ protected el_action_t -ed_transpose_chars(el, c) - EditLine *el; - int c; +ed_transpose_chars(EditLine *el, int c) { if (el->el_line.cursor < el->el_line.lastchar) { if (el->el_line.lastchar <= &el->el_line.buffer[1]) @@ -303,9 +287,7 @@ ed_transpose_chars(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_next_char(el, c) - EditLine *el; - int c; +ed_next_char(EditLine *el, int c) { if (el->el_line.cursor >= el->el_line.lastchar) return CC_ERROR; @@ -330,9 +312,7 @@ ed_next_char(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_prev_word(el, c) - EditLine *el; - int c; +ed_prev_word(EditLine *el, int c) { if (el->el_line.cursor == el->el_line.buffer) return CC_ERROR; @@ -357,9 +337,7 @@ ed_prev_word(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_prev_char(el, c) - EditLine *el; - int c; +ed_prev_char(EditLine *el, int c) { if (el->el_line.cursor > el->el_line.buffer) { el->el_line.cursor -= el->el_state.argument; @@ -384,9 +362,7 @@ ed_prev_char(el, c) * [^V] [^V] */ protected el_action_t -ed_quoted_insert(el, c) - EditLine *el; - int c; +ed_quoted_insert(EditLine *el, int c) { int num; char tc; @@ -406,9 +382,7 @@ ed_quoted_insert(el, c) * Adds to argument or enters a digit */ protected el_action_t -ed_digit(el, c) - EditLine *el; - int c; +ed_digit(EditLine *el, int c) { if (!isdigit((unsigned char) c)) return CC_ERROR; @@ -449,9 +423,7 @@ ed_digit(el, c) * For ESC-n */ protected el_action_t -ed_argument_digit(el, c) - EditLine *el; - int c; +ed_argument_digit(EditLine *el, int c) { if (!isdigit((unsigned char) c)) return CC_ERROR; @@ -475,9 +447,7 @@ ed_argument_digit(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_unassigned(el, c) - EditLine *el; - int c; +ed_unassigned(EditLine *el, int c) { term_beep(el); term__flush(); @@ -495,9 +465,7 @@ ed_unassigned(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_tty_sigint(el, c) - EditLine *el; - int c; +ed_tty_sigint(EditLine *el, int c) { return CC_NORM; } @@ -509,9 +477,7 @@ ed_tty_sigint(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_tty_dsusp(el, c) - EditLine *el; - int c; +ed_tty_dsusp(EditLine *el, int c) { return CC_NORM; } @@ -523,9 +489,7 @@ ed_tty_dsusp(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_tty_flush_output(el, c) - EditLine *el; - int c; +ed_tty_flush_output(EditLine *el, int c) { return CC_NORM; } @@ -537,9 +501,7 @@ ed_tty_flush_output(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_tty_sigquit(el, c) - EditLine *el; - int c; +ed_tty_sigquit(EditLine *el, int c) { return CC_NORM; } @@ -551,9 +513,7 @@ ed_tty_sigquit(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_tty_sigtstp(el, c) - EditLine *el; - int c; +ed_tty_sigtstp(EditLine *el, int c) { return CC_NORM; } @@ -565,9 +525,7 @@ ed_tty_sigtstp(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_tty_stop_output(el, c) - EditLine *el; - int c; +ed_tty_stop_output(EditLine *el, int c) { return CC_NORM; } @@ -579,9 +537,7 @@ ed_tty_stop_output(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_tty_start_output(el, c) - EditLine *el; - int c; +ed_tty_start_output(EditLine *el, int c) { return CC_NORM; } @@ -593,9 +549,7 @@ ed_tty_start_output(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_newline(el, c) - EditLine *el; - int c; +ed_newline(EditLine *el, int c) { re_goto_bottom(el); *el->el_line.lastchar++ = '\n'; @@ -612,9 +566,7 @@ ed_newline(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_delete_prev_char(el, c) - EditLine *el; - int c; +ed_delete_prev_char(EditLine *el, int c) { if (el->el_line.cursor <= el->el_line.buffer) return CC_ERROR; @@ -633,9 +585,7 @@ ed_delete_prev_char(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_clear_screen(el, c) - EditLine *el; - int c; +ed_clear_screen(EditLine *el, int c) { term_clear_screen(el); /* clear the whole real screen */ re_clear_display(el); /* reset everything */ @@ -649,9 +599,7 @@ ed_clear_screen(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_redisplay(el, c) - EditLine *el; - int c; +ed_redisplay(EditLine *el, int c) { return CC_REDISPLAY; } @@ -663,9 +611,7 @@ ed_redisplay(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_start_over(el, c) - EditLine *el; - int c; +ed_start_over(EditLine *el, int c) { ch_reset(el); return CC_REFRESH; @@ -678,9 +624,7 @@ ed_start_over(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_sequence_lead_in(el, c) - EditLine *el; - int c; +ed_sequence_lead_in(EditLine *el, int c) { return CC_NORM; } @@ -692,9 +636,7 @@ ed_sequence_lead_in(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_prev_history(el, c) - EditLine *el; - int c; +ed_prev_history(EditLine *el, int c) { char beep = 0; @@ -729,9 +671,7 @@ ed_prev_history(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_next_history(el, c) - EditLine *el; - int c; +ed_next_history(EditLine *el, int c) { el->el_chared.c_undo.action = NOP; *el->el_line.lastchar = '\0'; /* just in case */ @@ -753,9 +693,7 @@ ed_next_history(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_search_prev_history(el, c) - EditLine *el; - int c; +ed_search_prev_history(EditLine *el, int c) { const char *hp; int h; @@ -825,9 +763,7 @@ ed_search_prev_history(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_search_next_history(el, c) - EditLine *el; - int c; +ed_search_next_history(EditLine *el, int c) { const char *hp; int h; @@ -882,9 +818,7 @@ ed_search_next_history(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_prev_line(el, c) - EditLine *el; - int c; +ed_prev_line(EditLine *el, int c) { char *ptr; int nchars = c_hpos(el); @@ -927,9 +861,7 @@ ed_prev_line(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_next_line(el, c) - EditLine *el; - int c; +ed_next_line(EditLine *el, int c) { char *ptr; int nchars = c_hpos(el); @@ -963,9 +895,7 @@ ed_next_line(el, c) */ protected el_action_t /*ARGSUSED*/ -ed_command(el, c) - EditLine *el; - int c; +ed_command(EditLine *el, int c) { char tmpbuf[EL_BUFSIZ]; int tmplen; diff --git a/lib/libedit/el.c b/lib/libedit/el.c index 981a1ed55b..b46920f88e 100644 --- a/lib/libedit/el.c +++ b/lib/libedit/el.c @@ -35,7 +35,7 @@ * * @(#)el.c 8.2 (Berkeley) 1/3/94 * $FreeBSD: src/lib/libedit/el.c,v 1.6.2.1 2000/05/22 06:07:00 imp Exp $ - * $DragonFly: src/lib/libedit/el.c,v 1.3 2004/07/27 11:22:34 asmodai Exp $ + * $DragonFly: src/lib/libedit/el.c,v 1.4 2005/08/04 17:27:09 drhodus Exp $ */ /* @@ -55,9 +55,7 @@ * Initialize editline and set default parameters. */ public EditLine * -el_init(prog, fin, fout) - const char *prog; - FILE *fin, *fout; +el_init(const char *prog, FILE *fin, FILE *fout) { EditLine *el = (EditLine *) el_malloc(sizeof(EditLine)); #ifdef DEBUG @@ -109,8 +107,7 @@ el_init(prog, fin, fout) * Clean up. */ public void -el_end(el) - EditLine *el; +el_end(EditLine *el) { if (el == NULL) return; @@ -136,8 +133,7 @@ el_end(el) * Reset the tty and the parser */ public void -el_reset(el) - EditLine *el; +el_reset(EditLine *el) { tty_cookedmode(el); ch_reset(el); /* XXX: Do we want that? */ @@ -251,8 +247,7 @@ el_set(EditLine *el, int op, ...) * Return editing info */ public const LineInfo * -el_line(el) - EditLine *el; +el_line(EditLine *el) { return (const LineInfo *) &el->el_line; } @@ -263,9 +258,7 @@ static const char elpath[] = "/.editrc"; * Source a file */ public int -el_source(el, fname) - EditLine *el; - const char *fname; +el_source(EditLine *el, const char *fname) { FILE *fp; size_t len; @@ -301,8 +294,7 @@ el_source(el, fname) * Called from program when terminal is resized */ public void -el_resize(el) - EditLine *el; +el_resize(EditLine *el) { int lins, cols; sigset_t oset, nset; @@ -318,9 +310,7 @@ el_resize(el) } public void -el_data_set (el, data) - EditLine *el; - void *data; +el_data_set(EditLine *el, void *data) { el->data = data; @@ -328,8 +318,7 @@ el_data_set (el, data) } public void * -el_data_get (el) - EditLine *el; +el_data_get(EditLine *el) { if (el->data) return (el->data); diff --git a/lib/libedit/emacs.c b/lib/libedit/emacs.c index d12c76b65e..1e2c868dfc 100644 --- a/lib/libedit/emacs.c +++ b/lib/libedit/emacs.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)emacs.c 8.1 (Berkeley) 6/4/93 - * $DragonFly: src/lib/libedit/emacs.c,v 1.3 2004/10/25 19:38:45 drhodus Exp $ + * $DragonFly: src/lib/libedit/emacs.c,v 1.4 2005/08/04 17:27:09 drhodus Exp $ */ /* @@ -49,9 +49,7 @@ */ protected el_action_t /*ARGSUSED*/ -em_delete_or_list(el, c) - EditLine *el; - int c; +em_delete_or_list(EditLine *el, int c) { if (el->el_line.cursor == el->el_line.lastchar) { /* if I'm at the end */ if (el->el_line.cursor == el->el_line.buffer) { /* and the beginning */ @@ -80,9 +78,7 @@ em_delete_or_list(el, c) */ protected el_action_t /*ARGSUSED*/ -em_delete_next_word(el, c) - EditLine *el; - int c; +em_delete_next_word(EditLine *el, int c) { char *cp, *p, *kp; @@ -110,9 +106,7 @@ em_delete_next_word(el, c) */ protected el_action_t /*ARGSUSED*/ -em_yank(el, c) - EditLine *el; - int c; +em_yank(EditLine *el, int c) { char *kp, *cp; @@ -147,9 +141,7 @@ em_yank(el, c) */ protected el_action_t /*ARGSUSED*/ -em_kill_line(el, c) - EditLine *el; - int c; +em_kill_line(EditLine *el, int c) { char *kp, *cp; @@ -170,9 +162,7 @@ em_kill_line(el, c) */ protected el_action_t /*ARGSUSED*/ -em_kill_region(el, c) - EditLine *el; - int c; +em_kill_region(EditLine *el, int c) { char *kp, *cp; @@ -206,9 +196,7 @@ em_kill_region(el, c) */ protected el_action_t /*ARGSUSED*/ -em_copy_region(el, c) - EditLine *el; - int c; +em_copy_region(EditLine *el, int c) { char *kp, *cp; @@ -238,9 +226,7 @@ em_copy_region(el, c) * Gosling emacs transpose chars [^T] */ protected el_action_t -em_gosmacs_traspose(el, c) - EditLine *el; - int c; +em_gosmacs_traspose(EditLine *el, int c) { if (el->el_line.cursor > &el->el_line.buffer[1]) { @@ -261,9 +247,7 @@ em_gosmacs_traspose(el, c) */ protected el_action_t /*ARGSUSED*/ -em_next_word(el, c) - EditLine *el; - int c; +em_next_word(EditLine *el, int c) { if (el->el_line.cursor == el->el_line.lastchar) return CC_ERROR; @@ -287,9 +271,7 @@ em_next_word(el, c) */ protected el_action_t /*ARGSUSED*/ -em_upper_case(el, c) - EditLine *el; - int c; +em_upper_case(EditLine *el, int c) { char *cp, *ep; @@ -313,9 +295,7 @@ em_upper_case(el, c) */ protected el_action_t /*ARGSUSED*/ -em_capitol_case(el, c) - EditLine *el; - int c; +em_capitol_case(EditLine *el, int c) { char *cp, *ep; @@ -346,9 +326,7 @@ em_capitol_case(el, c) */ protected el_action_t /*ARGSUSED*/ -em_lower_case(el, c) - EditLine *el; - int c; +em_lower_case(EditLine *el, int c) { char *cp, *ep; @@ -372,9 +350,7 @@ em_lower_case(el, c) */ protected el_action_t /*ARGSUSED*/ -em_set_mark(el, c) - EditLine *el; - int c; +em_set_mark(EditLine *el, int c) { el->el_chared.c_kill.mark = el->el_line.cursor; return CC_NORM; @@ -387,9 +363,7 @@ em_set_mark(el, c) */ protected el_action_t /*ARGSUSED*/ -em_exchange_mark(el, c) - EditLine *el; - int c; +em_exchange_mark(EditLine *el, int c) { char *cp; @@ -405,9 +379,7 @@ em_exchange_mark(el, c) */ protected el_action_t /*ARGSUSED*/ -em_universal_argument(el, c) - EditLine *el; - int c; +em_universal_argument(EditLine *el, int c) { /* multiply current argument by 4 */ if (el->el_state.argument > 1000000) return CC_ERROR; @@ -422,9 +394,7 @@ em_universal_argument(el, c) */ protected el_action_t /*ARGSUSED*/ -em_meta_next(el, c) - EditLine *el; - int c; +em_meta_next(EditLine *el, int c) { el->el_state.metanext = 1; return CC_ARGHACK; @@ -436,9 +406,7 @@ em_meta_next(el, c) */ protected el_action_t /*ARGSUSED*/ -em_toggle_overwrite(el, c) - EditLine *el; - int c; +em_toggle_overwrite(EditLine *el, int c) { el->el_state.inputmode = (el->el_state.inputmode == MODE_INSERT) ? MODE_REPLACE : MODE_INSERT; @@ -451,9 +419,7 @@ em_toggle_overwrite(el, c) */ protected el_action_t /*ARGSUSED*/ -em_copy_prev_word(el, c) - EditLine *el; - int c; +em_copy_prev_word(EditLine *el, int c) { char *cp, *oldc, *dp; @@ -480,9 +446,7 @@ em_copy_prev_word(el, c) */ protected el_action_t /*ARGSUSED*/ -em_inc_search_next(el, c) - EditLine *el; - int c; +em_inc_search_next(EditLine *el, int c) { el->el_search.patlen = 0; return ce_inc_search(el, ED_SEARCH_NEXT_HISTORY); @@ -494,9 +458,7 @@ em_inc_search_next(el, c) */ protected el_action_t /*ARGSUSED*/ -em_inc_search_prev(el, c) - EditLine *el; - int c; +em_inc_search_prev(EditLine *el, int c) { el->el_search.patlen = 0; return ce_inc_search(el, ED_SEARCH_PREV_HISTORY); diff --git a/lib/libipx/ipx_addr.c b/lib/libipx/ipx_addr.c index 3378e3100f..8abeaaaaec 100644 --- a/lib/libipx/ipx_addr.c +++ b/lib/libipx/ipx_addr.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/lib/libipx/ipx_addr.c,v 1.2.8.1 2001/03/05 06:21:40 kris Exp $ - * $DragonFly: src/lib/libipx/ipx_addr.c,v 1.3 2004/10/25 19:38:45 drhodus Exp $ + * $DragonFly: src/lib/libipx/ipx_addr.c,v 1.4 2005/08/04 17:27:09 drhodus Exp $ * * @(#)ipx_addr.c */ @@ -49,8 +49,7 @@ static struct ipx_addr addr, zero_addr; static void Field(), cvtbase(); struct ipx_addr -ipx_addr(name) - const char *name; +ipx_addr(const char *name) { char separator; char *hostname, *socketname, *cp; @@ -96,10 +95,7 @@ ipx_addr(name) } static void -Field(buf, out, len) - char *buf; - u_char *out; - int len; +Field(char *buf, u_char *out, int len) { char *bp = buf; int i, ibase, base16 = 0, base10 = 0, clen = 0; @@ -200,13 +196,8 @@ Field(buf, out, len) } static void -cvtbase(oldbase,newbase,input,inlen,result,reslen) - long oldbase; - int newbase; - int input[]; - int inlen; - unsigned char result[]; - int reslen; +cvtbase(long oldbase, int newbase, int input[], int inlen, + unsigned char result[], int reslen) { int d, e; long sum; diff --git a/lib/libipx/ipx_ntoa.c b/lib/libipx/ipx_ntoa.c index 9943b76e2b..0508462d74 100644 --- a/lib/libipx/ipx_ntoa.c +++ b/lib/libipx/ipx_ntoa.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ipx_ntoa.c - * $DragonFly: src/lib/libipx/ipx_ntoa.c,v 1.4 2005/05/07 15:01:36 corecode Exp $ + * $DragonFly: src/lib/libipx/ipx_ntoa.c,v 1.5 2005/08/04 17:27:09 drhodus Exp $ */ #include @@ -42,8 +42,7 @@ static char *spectHex(char *); char * -ipx_ntoa(addr) - struct ipx_addr addr; +ipx_ntoa(struct ipx_addr addr) { static char obuf[40]; union { union ipx_net net_e; u_long long_e; } net; @@ -79,8 +78,7 @@ ipx_ntoa(addr) } static char * -spectHex(p0) - char *p0; +spectHex(char *p0) { int ok = 0; int nonzero = 0; diff --git a/lib/libopie/opieextra.c b/lib/libopie/opieextra.c index 3f7348844e..c78c19bbdd 100644 --- a/lib/libopie/opieextra.c +++ b/lib/libopie/opieextra.c @@ -4,7 +4,7 @@ * and possibly others. * * $FreeBSD: src/lib/libopie/opieextra.c,v 1.1.2.2 2002/07/15 14:17:08 des Exp $ - * $DragonFly: src/lib/libopie/opieextra.c,v 1.2 2003/06/17 04:26:50 dillon Exp $ + * $DragonFly: src/lib/libopie/opieextra.c,v 1.3 2005/08/04 17:27:09 drhodus Exp $ */ #include @@ -18,8 +18,7 @@ * */ int -opie_haskey(username) -char *username; +opie_haskey(char *username) { struct opie opie; @@ -34,8 +33,7 @@ char *username; * */ char * -opie_keyinfo(username) -char *username; +opie_keyinfo(char *username) { int i; static char str[OPIE_CHALLENGE_MAX]; @@ -58,9 +56,7 @@ char *username; * */ int -opie_passverify(username, passwd) -char *username; -char *passwd; +opie_passverify(char *username, char *passwd) { int i; struct opie opie; diff --git a/lib/libposix1e/acl_delete.c b/lib/libposix1e/acl_delete.c index 00e1c42776..501e9f56fa 100644 --- a/lib/libposix1e/acl_delete.c +++ b/lib/libposix1e/acl_delete.c @@ -23,8 +23,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libposix1e/acl_delete.c,v 1.4 2000/01/26 04:19:36 rwatson Exp $ - * $DragonFly: src/lib/libposix1e/acl_delete.c,v 1.2 2003/06/17 04:26:51 dillon Exp $ + *$FreeBSD: src/lib/libposix1e/acl_delete.c,v 1.4 2000/01/26 04:19:36 rwatson Exp $ + *$DragonFly: src/lib/libposix1e/acl_delete.c,v 1.3 2005/08/04 17:27:09 drhodus Exp $ */ /* * acl_delete_def_file -- remove a default acl from a file diff --git a/lib/libposix1e/acl_free.c b/lib/libposix1e/acl_free.c index 06034807d6..3e1c80facf 100644 --- a/lib/libposix1e/acl_free.c +++ b/lib/libposix1e/acl_free.c @@ -23,8 +23,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libposix1e/acl_free.c,v 1.1 2000/01/15 19:44:23 rwatson Exp $ - * $DragonFly: src/lib/libposix1e/acl_free.c,v 1.2 2003/06/17 04:26:51 dillon Exp $ + *$FreeBSD: src/lib/libposix1e/acl_free.c,v 1.1 2000/01/15 19:44:23 rwatson Exp $ + *$DragonFly: src/lib/libposix1e/acl_free.c,v 1.3 2005/08/04 17:27:09 drhodus Exp $ */ /* * acl_free -- free ACL objects from user memory diff --git a/lib/libposix1e/acl_from_text.c b/lib/libposix1e/acl_from_text.c index 3c1745b130..76b3965614 100644 --- a/lib/libposix1e/acl_from_text.c +++ b/lib/libposix1e/acl_from_text.c @@ -23,8 +23,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libposix1e/acl_from_text.c,v 1.1 2000/01/15 19:44:24 rwatson Exp $ - * $DragonFly: src/lib/libposix1e/acl_from_text.c,v 1.2 2003/06/17 04:26:51 dillon Exp $ + *$FreeBSD: src/lib/libposix1e/acl_from_text.c,v 1.1 2000/01/15 19:44:24 rwatson Exp $ + *$DragonFly: src/lib/libposix1e/acl_from_text.c,v 1.3 2005/08/04 17:27:09 drhodus Exp $ */ /* * acl_from_text: convert a text-form ACL from a string to an acl_t diff --git a/lib/libposix1e/acl_get.c b/lib/libposix1e/acl_get.c index c3b2348fe0..5a8e5ae11e 100644 --- a/lib/libposix1e/acl_get.c +++ b/lib/libposix1e/acl_get.c @@ -23,8 +23,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libposix1e/acl_get.c,v 1.3 2000/01/26 04:19:37 rwatson Exp $ - * $DragonFly: src/lib/libposix1e/acl_get.c,v 1.2 2003/06/17 04:26:51 dillon Exp $ + *$FreeBSD: src/lib/libposix1e/acl_get.c,v 1.3 2000/01/26 04:19:37 rwatson Exp $ + *$DragonFly: src/lib/libposix1e/acl_get.c,v 1.3 2005/08/04 17:27:09 drhodus Exp $ */ /* * acl_get_file - syscall wrapper for retrieving ACL by filename diff --git a/lib/libposix1e/acl_init.c b/lib/libposix1e/acl_init.c index c35e79b750..fa88907824 100644 --- a/lib/libposix1e/acl_init.c +++ b/lib/libposix1e/acl_init.c @@ -23,8 +23,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libposix1e/acl_init.c,v 1.3 2000/01/26 04:19:37 rwatson Exp $ - * $DragonFly: src/lib/libposix1e/acl_init.c,v 1.2 2003/06/17 04:26:51 dillon Exp $ + *$FreeBSD: src/lib/libposix1e/acl_init.c,v 1.3 2000/01/26 04:19:37 rwatson Exp $ + *$DragonFly: src/lib/libposix1e/acl_init.c,v 1.3 2005/08/04 17:27:09 drhodus Exp $ */ /* * acl_init -- return a fresh acl structure diff --git a/lib/libposix1e/acl_set.c b/lib/libposix1e/acl_set.c index d6b960b1d5..79a3547950 100644 --- a/lib/libposix1e/acl_set.c +++ b/lib/libposix1e/acl_set.c @@ -23,8 +23,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libposix1e/acl_set.c,v 1.3 2000/01/26 04:19:37 rwatson Exp $ - * $DragonFly: src/lib/libposix1e/acl_set.c,v 1.2 2003/06/17 04:26:51 dillon Exp $ + *$FreeBSD: src/lib/libposix1e/acl_set.c,v 1.3 2000/01/26 04:19:37 rwatson Exp $ + *$DragonFly: src/lib/libposix1e/acl_set.c,v 1.3 2005/08/04 17:27:09 drhodus Exp $ */ /* * acl_set_file -- set a file/directory ACL by name diff --git a/lib/libposix1e/acl_support.c b/lib/libposix1e/acl_support.c index 2997b63146..6f20bc2d54 100644 --- a/lib/libposix1e/acl_support.c +++ b/lib/libposix1e/acl_support.c @@ -23,8 +23,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libposix1e/acl_support.c,v 1.3 2000/01/26 04:19:37 rwatson Exp $ - * $DragonFly: src/lib/libposix1e/acl_support.c,v 1.2 2003/06/17 04:26:51 dillon Exp $ + *$FreeBSD: src/lib/libposix1e/acl_support.c,v 1.3 2000/01/26 04:19:37 rwatson Exp $ + *$DragonFly: src/lib/libposix1e/acl_support.c,v 1.3 2005/08/04 17:27:09 drhodus Exp $ */ /* * Support functionality for the POSIX.1e ACL interface diff --git a/lib/libposix1e/acl_to_text.c b/lib/libposix1e/acl_to_text.c index 5437cc222e..ca9dadbbc8 100644 --- a/lib/libposix1e/acl_to_text.c +++ b/lib/libposix1e/acl_to_text.c @@ -23,8 +23,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libposix1e/acl_to_text.c,v 1.2 2000/01/26 04:19:38 rwatson Exp $ - * $DragonFly: src/lib/libposix1e/acl_to_text.c,v 1.2 2003/06/17 04:26:51 dillon Exp $ + *$FreeBSD: src/lib/libposix1e/acl_to_text.c,v 1.2 2000/01/26 04:19:38 rwatson Exp $ + *$DragonFly: src/lib/libposix1e/acl_to_text.c,v 1.3 2005/08/04 17:27:09 drhodus Exp $ */ /* * acl_to_text - return a text string with a text representation of the acl diff --git a/lib/libposix1e/acl_valid.c b/lib/libposix1e/acl_valid.c index b030c548e1..e77250405f 100644 --- a/lib/libposix1e/acl_valid.c +++ b/lib/libposix1e/acl_valid.c @@ -23,8 +23,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libposix1e/acl_valid.c,v 1.4 2000/01/28 20:07:00 rwatson Exp $ - * $DragonFly: src/lib/libposix1e/acl_valid.c,v 1.2 2003/06/17 04:26:51 dillon Exp $ + *$FreeBSD: src/lib/libposix1e/acl_valid.c,v 1.4 2000/01/28 20:07:00 rwatson Exp $ + *$DragonFly: src/lib/libposix1e/acl_valid.c,v 1.3 2005/08/04 17:27:09 drhodus Exp $ */ /* * acl_valid -- POSIX.1e ACL check routine diff --git a/lib/librpcsvc/rnusers.c b/lib/librpcsvc/rnusers.c index fcd9dd000a..c5ee97dc7e 100644 --- a/lib/librpcsvc/rnusers.c +++ b/lib/librpcsvc/rnusers.c @@ -28,6 +28,7 @@ * Mountain View, California 94043 * * @(#)rnusers.c 1.2 91/03/11 TIRPC 1.0; from 1.7 89/03/24 SMI + * $DragonFly: src/lib/librpcsvc/rnusers.c,v 1.3 2005/08/04 17:27:09 drhodus Exp $ */ /* @@ -42,9 +43,7 @@ #include int -rusers(host, up) - char *host; - struct utmpidlearr *up; +rusers(char *host, struct utmpidlearr *up) { return (callrpc(host, RUSERSPROG, RUSERSVERS_IDLE, RUSERSPROC_NAMES, xdr_void, (char *) NULL, @@ -52,8 +51,7 @@ rusers(host, up) } int -rnusers(host) - char *host; +rnusers(char *host) { int nusers; -- 2.41.0