Source-Changes-HG archive

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

[src/trunk]: src/lib/libtelnet more const



details:   https://anonhg.NetBSD.org/src/rev/61d1a570e8f6
branches:  trunk
changeset: 446699:61d1a570e8f6
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Dec 14 23:42:39 2018 +0000

description:
more const

diffstat:

 lib/libtelnet/auth-proto.h |  12 ++++++------
 lib/libtelnet/auth.c       |  14 +++++++-------
 lib/libtelnet/genget.c     |  10 +++++-----
 lib/libtelnet/misc.h       |   6 +++---
 4 files changed, 21 insertions(+), 21 deletions(-)

diffs (145 lines):

diff -r 9d072cb2aa16 -r 61d1a570e8f6 lib/libtelnet/auth-proto.h
--- a/lib/libtelnet/auth-proto.h        Fri Dec 14 23:40:17 2018 +0000
+++ b/lib/libtelnet/auth-proto.h        Fri Dec 14 23:42:39 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: auth-proto.h,v 1.15 2006/03/20 21:23:47 christos Exp $ */
+/*     $NetBSD: auth-proto.h,v 1.16 2018/12/14 23:42:39 christos Exp $ */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -68,12 +68,12 @@
 void auth_disable_name(char *);
 void auth_gen_printsub(unsigned char *, int, unsigned char *, int);
 
-int getauthmask(char *, int *);
-int auth_enable(char *);
-int auth_disable(char *);
-int auth_onoff(char *, int);
+int getauthmask(const char *, int *);
+int auth_enable(const char *);
+int auth_disable(const char *);
+int auth_onoff(const char *, int);
 int auth_togdebug(int);
-int auth_status(char *);
+int auth_status(const char *);
 void auth_name(unsigned char *, int);
 int auth_sendname(unsigned char *, int);
 void auth_finished(Authenticator *, int);
diff -r 9d072cb2aa16 -r 61d1a570e8f6 lib/libtelnet/auth.c
--- a/lib/libtelnet/auth.c      Fri Dec 14 23:40:17 2018 +0000
+++ b/lib/libtelnet/auth.c      Fri Dec 14 23:42:39 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: auth.c,v 1.21 2012/03/21 05:33:27 matt Exp $   */
+/*     $NetBSD: auth.c,v 1.22 2018/12/14 23:42:39 christos 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.21 2012/03/21 05:33:27 matt Exp $");
+__RCSID("$NetBSD: auth.c,v 1.22 2018/12/14 23:42:39 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -216,7 +216,7 @@
 }
 
 int
-getauthmask(char *type, int *maskp)
+getauthmask(const char *type, int *maskp)
 {
        register int x;
 
@@ -235,19 +235,19 @@
 }
 
 int
-auth_enable(char *type)
+auth_enable(const char *type)
 {
        return(auth_onoff(type, 1));
 }
 
 int
-auth_disable(char *type)
+auth_disable(const char *type)
 {
        return(auth_onoff(type, 0));
 }
 
 int
-auth_onoff(char *type, int on)
+auth_onoff(const char *type, int on)
 {
        int i, mask = -1;
        Authenticator *ap;
@@ -289,7 +289,7 @@
 }
 
 int
-auth_status(char *s)
+auth_status(const char *s)
 {
        Authenticator *ap;
        int i, mask;
diff -r 9d072cb2aa16 -r 61d1a570e8f6 lib/libtelnet/genget.c
--- a/lib/libtelnet/genget.c    Fri Dec 14 23:40:17 2018 +0000
+++ b/lib/libtelnet/genget.c    Fri Dec 14 23:42:39 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: genget.c,v 1.13 2012/03/21 05:33:27 matt Exp $ */
+/*     $NetBSD: genget.c,v 1.14 2018/12/14 23:42:39 christos Exp $     */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)genget.c   8.2 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: genget.c,v 1.13 2012/03/21 05:33:27 matt Exp $");
+__RCSID("$NetBSD: genget.c,v 1.14 2018/12/14 23:42:39 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -50,9 +50,9 @@
  * the length of *s1 is returned.
  */
 int
-isprefix(char *s1, const char *s2)
+isprefix(const char *s1, const char *s2)
 {
-       char *os1;
+       const char *os1;
        char c1, c2;
 
        if (*s1 == '\0')
@@ -72,7 +72,7 @@
 static char *ambiguous;                /* special return value for command routines */
 
 char **
-genget( char   *name,          /* name to match */
+genget(const char *name,               /* name to match */
        char    **table,        /* name entry in table */
        int     stlen)
 {
diff -r 9d072cb2aa16 -r 61d1a570e8f6 lib/libtelnet/misc.h
--- a/lib/libtelnet/misc.h      Fri Dec 14 23:40:17 2018 +0000
+++ b/lib/libtelnet/misc.h      Fri Dec 14 23:42:39 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: misc.h,v 1.9 2012/01/09 15:25:34 christos Exp $        */
+/*     $NetBSD: misc.h,v 1.10 2018/12/14 23:42:39 christos Exp $       */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -38,8 +38,8 @@
 extern int ConnectedCount;
 extern int ReservedPort;
 
-int isprefix(char *, const char *);
-char **genget(char *, char **, int);
+int isprefix(const char *, const char *);
+char **genget(const char *, char **, int);
 int Ambiguous(void *);
 __END_DECLS
 



Home | Main Index | Thread Index | Old Index