Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib Use C89 functions definitions.



details:   https://anonhg.NetBSD.org/src/rev/bc723fedd02b
branches:  trunk
changeset: 778271:bc723fedd02b
user:      matt <matt%NetBSD.org@localhost>
date:      Wed Mar 21 05:33:26 2012 +0000

description:
Use C89 functions definitions.
Remove use of __P

diffstat:

 lib/libcrypt/bcrypt.c   |    8 +-
 lib/libedit/readline.c  |    6 +-
 lib/libisns/isns_pdu.c  |    6 +-
 lib/libisns/isns_util.c |    6 +-
 lib/libmenu/item.c      |    8 +-
 lib/libmenu/menu.c      |   11 +-
 lib/libtelnet/auth.c    |  125 ++++++++++-----------------
 lib/libtelnet/enc_des.c |  160 ++++++++++++------------------------
 lib/libtelnet/encrypt.c |  211 +++++++++++++++++++----------------------------
 lib/libtelnet/genget.c  |   20 ++--
 lib/libtelnet/getent.c  |   10 +-
 lib/libtelnet/misc.c    |   29 ++----
 12 files changed, 229 insertions(+), 371 deletions(-)

diffs (truncated from 1451 to 300 lines):

diff -r c12357b3b237 -r bc723fedd02b lib/libcrypt/bcrypt.c
--- a/lib/libcrypt/bcrypt.c     Wed Mar 21 03:20:22 2012 +0000
+++ b/lib/libcrypt/bcrypt.c     Wed Mar 21 05:33:26 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcrypt.c,v 1.15 2011/12/28 03:12:38 christos Exp $     */
+/*     $NetBSD: bcrypt.c,v 1.16 2012/03/21 05:33:26 matt Exp $ */
 /*     $OpenBSD: bcrypt.c,v 1.16 2002/02/19 19:39:36 millert Exp $     */
 
 /*
@@ -46,7 +46,7 @@
  *
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: bcrypt.c,v 1.15 2011/12/28 03:12:38 christos Exp $");
+__RCSID("$NetBSD: bcrypt.c,v 1.16 2012/03/21 05:33:26 matt Exp $");
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -210,9 +210,7 @@
    i.e. $2$04$iwouldntknowwhattosayetKdJ6iFtacBqJdKe6aW7ou */
 
 char   *
-__bcrypt(key, salt)
-       const char   *key;
-       const char   *salt;
+__bcrypt(const char *key, const char *salt)
 {
        blf_ctx state;
        u_int32_t rounds, i, k;
diff -r c12357b3b237 -r bc723fedd02b lib/libedit/readline.c
--- a/lib/libedit/readline.c    Wed Mar 21 03:20:22 2012 +0000
+++ b/lib/libedit/readline.c    Wed Mar 21 05:33:26 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: readline.c,v 1.100 2011/11/18 20:38:42 christos Exp $  */
+/*     $NetBSD: readline.c,v 1.101 2012/03/21 05:33:26 matt Exp $      */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include "config.h"
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: readline.c,v 1.100 2011/11/18 20:38:42 christos Exp $");
+__RCSID("$NetBSD: readline.c,v 1.101 2012/03/21 05:33:26 matt Exp $");
 #endif /* not lint && not SCCSID */
 
 #include <sys/types.h>
@@ -1922,7 +1922,7 @@
 }
 
 void
-rl_callback_read_char()
+rl_callback_read_char(void)
 {
        int count = 0, done = 0;
        const char *buf = el_gets(e, &count);
diff -r c12357b3b237 -r bc723fedd02b lib/libisns/isns_pdu.c
--- a/lib/libisns/isns_pdu.c    Wed Mar 21 03:20:22 2012 +0000
+++ b/lib/libisns/isns_pdu.c    Wed Mar 21 05:33:26 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: isns_pdu.c,v 1.2 2011/10/25 00:02:30 christos Exp $    */
+/*     $NetBSD: isns_pdu.c,v 1.3 2012/03/21 05:33:27 matt Exp $        */
 
 /*-
  * Copyright (c) 2004,2009 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: isns_pdu.c,v 1.2 2011/10/25 00:02:30 christos Exp $");
+__RCSID("$NetBSD: isns_pdu.c,v 1.3 2012/03/21 05:33:27 matt Exp $");
 
 
 #include <sys/types.h>
@@ -93,7 +93,7 @@
  * isns_init_buffer_pool - initialize buffer pool for use
  */
 void
-isns_init_buffer_pool()
+isns_init_buffer_pool(void)
 {
        pthread_mutexattr_t mutexattr;
 
diff -r c12357b3b237 -r bc723fedd02b lib/libisns/isns_util.c
--- a/lib/libisns/isns_util.c   Wed Mar 21 03:20:22 2012 +0000
+++ b/lib/libisns/isns_util.c   Wed Mar 21 05:33:26 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: isns_util.c,v 1.1.1.1 2011/01/16 01:22:50 agc Exp $    */
+/*     $NetBSD: isns_util.c,v 1.2 2012/03/21 05:33:27 matt Exp $       */
 
 /*-
  * Copyright (c) 2004,2009 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: isns_util.c,v 1.1.1.1 2011/01/16 01:22:50 agc Exp $");
+__RCSID("$NetBSD: isns_util.c,v 1.2 2012/03/21 05:33:27 matt Exp $");
 
 
 #include <sys/types.h>
@@ -82,7 +82,7 @@
 
 
 struct isns_config_s *
-isns_new_config()
+isns_new_config(void)
 {
        struct isns_config_s *cfg_p;
        pthread_mutexattr_t mutexattr;
diff -r c12357b3b237 -r bc723fedd02b lib/libmenu/item.c
--- a/lib/libmenu/item.c        Wed Mar 21 03:20:22 2012 +0000
+++ b/lib/libmenu/item.c        Wed Mar 21 05:33:26 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: item.c,v 1.11 2007/07/23 12:12:19 blymn Exp $  */
+/*     $NetBSD: item.c,v 1.12 2012/03/21 05:33:27 matt Exp $   */
 
 /*-
  * Copyright (c) 1998-1999 Brett Lymn (blymn%baea.com.au@localhost, brett_lymn%yahoo.com.au@localhost)
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: item.c,v 1.11 2007/07/23 12:12:19 blymn Exp $");
+__RCSID("$NetBSD: item.c,v 1.12 2012/03/21 05:33:27 matt Exp $");
 
 #include <menu.h>
 #include <stdlib.h>
@@ -185,9 +185,7 @@
  * defaults.
  */
 int
-set_item_opts(item, opts)
-        ITEM *item;
-        OPTIONS opts;
+set_item_opts(ITEM *item, OPTIONS opts)
 {
           /* selectable seems to be the only allowable item opt! */
         if (opts != O_SELECTABLE)
diff -r c12357b3b237 -r bc723fedd02b lib/libmenu/menu.c
--- a/lib/libmenu/menu.c        Wed Mar 21 03:20:22 2012 +0000
+++ b/lib/libmenu/menu.c        Wed Mar 21 05:33:26 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: menu.c,v 1.16 2003/03/09 01:08:48 lukem Exp $  */
+/*     $NetBSD: menu.c,v 1.17 2012/03/21 05:33:27 matt Exp $   */
 
 /*-
  * Copyright (c) 1998-1999 Brett Lymn (blymn%baea.com.au@localhost, brett_lymn%yahoo.com.au@localhost)
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: menu.c,v 1.16 2003/03/09 01:08:48 lukem Exp $");
+__RCSID("$NetBSD: menu.c,v 1.17 2012/03/21 05:33:27 matt Exp $");
 
 #include <ctype.h>
 #include <menu.h>
@@ -135,8 +135,7 @@
  * Return the menu unmark string for the menu.
  */
 char *
-menu_unmark(menu)
-        MENU *menu;
+menu_unmark(MENU *menu)
 {
        if (menu == NULL)
                return _menui_default_menu.unmark.string;
@@ -181,9 +180,7 @@
  * Set the menu subwindow for the menu.
  */
 int
-set_menu_sub(menu, sub)
-        MENU *menu;
-        WINDOW *sub;
+set_menu_sub(MENU *menu, WINDOW *sub)
 {
        if (menu == NULL) {
                _menui_default_menu.menu_subwin = sub;
diff -r c12357b3b237 -r bc723fedd02b lib/libtelnet/auth.c
--- a/lib/libtelnet/auth.c      Wed Mar 21 03:20:22 2012 +0000
+++ b/lib/libtelnet/auth.c      Wed Mar 21 05:33:26 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: auth.c,v 1.20 2012/01/09 15:25:33 christos Exp $       */
+/*     $NetBSD: auth.c,v 1.21 2012/03/21 05:33:27 matt Exp $   */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)auth.c     8.3 (Berkeley) 5/30/95"
 #else
-__RCSID("$NetBSD: auth.c,v 1.20 2012/01/09 15:25:33 christos Exp $");
+__RCSID("$NetBSD: auth.c,v 1.21 2012/03/21 05:33:27 matt Exp $");
 #endif
 #endif /* not lint */
 
@@ -167,10 +167,8 @@
 static int     i_support = 0;
 static int     i_wont_support = 0;
 
-       Authenticator *
-findauthenticator(type, way)
-       int type;
-       int way;
+Authenticator *
+findauthenticator(int type, int way)
 {
        Authenticator *ap = authenticators;
 
@@ -179,10 +177,8 @@
        return(ap->type ? ap : 0);
 }
 
-       void
-auth_init(name, server)
-       const char *name;
-       int server;
+void
+auth_init(const char *name, int server)
 {
        Authenticator *ap = authenticators;
 
@@ -207,9 +203,8 @@
        }
 }
 
-       void
-auth_disable_name(name)
-       char *name;
+void
+auth_disable_name(char *name)
 {
        int x;
        for (x = 0; x < AUTHTYPE_CNT; ++x) {
@@ -220,10 +215,8 @@
        }
 }
 
-       int
-getauthmask(type, maskp)
-       char *type;
-       int *maskp;
+int
+getauthmask(char *type, int *maskp)
 {
        register int x;
 
@@ -241,24 +234,20 @@
        return(0);
 }
 
-       int
-auth_enable(type)
-       char *type;
+int
+auth_enable(char *type)
 {
        return(auth_onoff(type, 1));
 }
 
-       int
-auth_disable(type)
-       char *type;
+int
+auth_disable(char *type)
 {
        return(auth_onoff(type, 0));
 }
 
-       int
-auth_onoff(type, on)
-       char *type;
-       int on;
+int
+auth_onoff(char *type, int on)
 {
        int i, mask = -1;
        Authenticator *ap;
@@ -288,9 +277,8 @@
        return(1);
 }
 
-       int
-auth_togdebug(on)
-       int on;
+int
+auth_togdebug(int on)
 {
        if (on < 0)
                auth_debug_mode ^= 1;
@@ -300,9 +288,8 @@
        return(1);
 }
 
-       int
-auth_status(s)
-       char *s;
+int
+auth_status(char *s)
 {



Home | Main Index | Thread Index | Old Index