Subject: simple changes to libtelnet?
To: None <tech-userlevel@netbsd.org>
From: Assar Westerlund <assar@sics.se>
List: tech-userlevel
Date: 01/17/2000 06:23:47
I propose doing these simple const and rename modifications to
telnet.  Any objections?

/assar

Index: usr.bin/telnet/authenc.c
===================================================================
RCS file: /cvsroot/basesrc/usr.bin/telnet/authenc.c,v
retrieving revision 1.7
diff -u -w -r1.7 authenc.c
--- usr.bin/telnet/authenc.c	1998/11/06 19:54:18	1.7
+++ usr.bin/telnet/authenc.c	2000/01/17 05:20:42
@@ -55,7 +55,7 @@
 #include "types.h"
 
 	int
-net_write(str, len)
+telnet_net_write(str, len)
 	unsigned char *str;
 	int len;
 {
Index: usr.bin/telnet/externs.h
===================================================================
RCS file: /cvsroot/basesrc/usr.bin/telnet/externs.h,v
retrieving revision 1.15
diff -u -w -r1.15 externs.h
--- usr.bin/telnet/externs.h	1999/07/28 06:35:15	1.15
+++ usr.bin/telnet/externs.h	2000/01/17 05:20:42
@@ -249,7 +249,7 @@
 
 
 /* authenc.c */
-int net_write P((unsigned char *, int));
+int telnet_net_write P((unsigned char *, int));
 void net_encrypt P((void));
 int telnet_spin P((void));
 char *telnet_getenv P((char *));




Index: lib/libtelnet/misc-proto.h
===================================================================
RCS file: /cvsroot/basesrc/lib/libtelnet/misc-proto.h,v
retrieving revision 1.7
diff -u -w -r1.7 misc-proto.h
--- lib/libtelnet/misc-proto.h	1998/07/27 01:45:10	1.7
+++ lib/libtelnet/misc-proto.h	2000/01/17 05:19:24
@@ -63,12 +63,12 @@
 void auth_encrypt_init __P((const char *, const char *, const char *, int));
 void auth_encrypt_user __P((const char *));
 void auth_encrypt_connect __P((int));
-void printd __P((unsigned char *, int));
+void printd __P((const unsigned char *, int));
 
 /*
  * These functions are imported from the application
  */
-int net_write __P((unsigned char *, int));
+int telnet_net_write __P((unsigned char *, int));
 void net_encrypt __P((void));
 int telnet_spin __P((void));
 char *telnet_getenv __P((char *));
Index: lib/libtelnet/misc.c
===================================================================
RCS file: /cvsroot/basesrc/lib/libtelnet/misc.c,v
retrieving revision 1.8
diff -u -w -r1.8 misc.c
--- lib/libtelnet/misc.c	1998/07/28 07:18:12	1.8
+++ lib/libtelnet/misc.c	2000/01/17 05:19:24
@@ -87,7 +87,7 @@
 
 	void
 printd(data, cnt)
-	unsigned char *data;
+	const unsigned char *data;
 	int cnt;
 {
 	if (cnt > 16)
Index: libexec/telnetd/authenc.c
===================================================================
RCS file: /cvsroot/basesrc/libexec/telnetd/authenc.c,v
retrieving revision 1.5
diff -u -w -r1.5 authenc.c
--- libexec/telnetd/authenc.c	1997/10/16 06:46:50	1.5
+++ libexec/telnetd/authenc.c	2000/01/17 05:21:41
@@ -47,7 +47,7 @@
 #include <libtelnet/misc.h>
 
 	int
-net_write(str, len)
+telnet_net_write(str, len)
 	unsigned char *str;
 	int len;
 {