changeset 283:d71e5e1f49cf

Fix a few more compiler warnings.
author John "Elwin" Edwards
date Mon, 18 Sep 2017 19:36:14 -0400
parents 8b6aba552f6f
children 6376b514a30b
files arogue5/mdport.c arogue5/util.c arogue7/mdport.c arogue7/util.c arogue7/xcrypt.c srogue/options.c urogue/mdport.c xrogue/util.c
diffstat 8 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/arogue5/mdport.c	Mon Sep 18 19:11:57 2017 -0400
+++ b/arogue5/mdport.c	Mon Sep 18 19:36:14 2017 -0400
@@ -666,7 +666,7 @@
  *	Print a readable version of a certain character
  */
 
-char *
+const char *
 md_unctrl(char ch)
 {
 #if USG5_0
--- a/arogue5/util.c	Mon Sep 18 19:11:57 2017 -0400
+++ b/arogue5/util.c	Mon Sep 18 19:36:14 2017 -0400
@@ -839,7 +839,7 @@
 void
 strucpy(char *s1, char *s2, int len)
 {
-    register char *sp;
+    const char *sp;
 
     while (len--)
     {
--- a/arogue7/mdport.c	Mon Sep 18 19:11:57 2017 -0400
+++ b/arogue7/mdport.c	Mon Sep 18 19:36:14 2017 -0400
@@ -647,7 +647,7 @@
  *	Print a readable version of a certain character
  */
 
-char *
+const char *
 md_unctrl(char ch)
 {
 #if USG5_0
--- a/arogue7/util.c	Mon Sep 18 19:11:57 2017 -0400
+++ b/arogue7/util.c	Mon Sep 18 19:36:14 2017 -0400
@@ -1181,7 +1181,7 @@
 void
 strucpy(char *s1, char *s2, int len)
 {
-    register char *sp;
+    const char *sp;
 
     while (len--)
     {
--- a/arogue7/xcrypt.c	Mon Sep 18 19:11:57 2017 -0400
+++ b/arogue7/xcrypt.c	Mon Sep 18 19:36:14 2017 -0400
@@ -57,6 +57,9 @@
 #endif
 #define _PASSWORD_EFMT1 '_'
 
+unsigned long int md_htonl(unsigned long int x);
+unsigned long int md_ntohl(unsigned long int x);
+
 static unsigned char	IP[64] = {
 	58, 50, 42, 34, 26, 18, 10,  2, 60, 52, 44, 36, 28, 20, 12,  4,
 	62, 54, 46, 38, 30, 22, 14,  6, 64, 56, 48, 40, 32, 24, 16,  8,
--- a/srogue/options.c	Mon Sep 18 19:11:57 2017 -0400
+++ b/srogue/options.c	Mon Sep 18 19:36:14 2017 -0400
@@ -234,7 +234,7 @@
 void
 strucpy(char *s1, char *s2, int len)
 {
-	reg char *sp;
+	const char *sp;
 
 	while (len-- > 0) {
 		strcpy(s1, (sp = unctrl(*s2)));
--- a/urogue/mdport.c	Mon Sep 18 19:11:57 2017 -0400
+++ b/urogue/mdport.c	Mon Sep 18 19:36:14 2017 -0400
@@ -53,6 +53,7 @@
 #include <utmpx.h>
 #endif
 
+#include <ctype.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -724,7 +725,7 @@
  *	Print a readable version of a certain character
  */
 
-char *
+const char *
 md_unctrl(char ch)
 {
 #if USG5_0
--- a/xrogue/util.c	Mon Sep 18 19:11:57 2017 -0400
+++ b/xrogue/util.c	Mon Sep 18 19:36:14 2017 -0400
@@ -1204,7 +1204,7 @@
 void
 strucpy(char *s1, char *s2, int len)
 {
-    register char *sp;
+    const char *sp;
     while (len--)
     {
         strcpy(s1, (sp = unctrl(*s2)));