diff src/sysdep.c @ 1271:44186d7cf4dd

[xemacs-hg @ 2003-02-07 21:05:32 by james] Return the parameter for both strlwr and strupr, and make the definition of strupr depend on no HAVE_STRUPR definition.
author james
date Fri, 07 Feb 2003 21:05:35 +0000
parents e22b0213b713
children 70921960b980
line wrap: on
line diff
--- a/src/sysdep.c	Fri Feb 07 20:46:02 2003 +0000
+++ b/src/sysdep.c	Fri Feb 07 21:05:35 2003 +0000
@@ -3355,23 +3355,27 @@
 char *
 strlwr (char *s)
 {
-  while (*s)
+  REGISTER char *c;
+
+  for (c = s; *c; c++)
     {
-      *s = tolower (*s);
-      ++s;
+      *c = tolower (*c);
     }
+  return s;
 }
 #endif
 
-#ifndef HAVE_STRLWR
+#ifndef HAVE_STRUPR
 char *
 strupr (char *s)
 {
-  while (*s)
+  REGISTER char *c;
+
+  for (c = s; *c; c++)
     {
-      *s = toupper (*s);
-      ++s;
+      *c = toupper (*c);
     }
+  return s;
 }
 #endif