m4-commit
[Top][All Lists]
Advanced

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

Changes to m4/src/Attic/input.c,v [branch-1_4]


From: Eric Blake
Subject: Changes to m4/src/Attic/input.c,v [branch-1_4]
Date: Tue, 01 Aug 2006 02:53:37 +0000

CVSROOT:        /sources/m4
Module name:    m4
Branch:         branch-1_4
Changes by:     Eric Blake <ericb>      06/08/01 02:53:36

Index: src/input.c
===================================================================
RCS file: /sources/m4/m4/src/Attic/input.c,v
retrieving revision 1.1.1.1.2.13
retrieving revision 1.1.1.1.2.14
diff -u -b -r1.1.1.1.2.13 -r1.1.1.1.2.14
--- src/input.c 30 Jul 2006 23:46:51 -0000      1.1.1.1.2.13
+++ src/input.c 1 Aug 2006 02:53:35 -0000       1.1.1.1.2.14
@@ -397,7 +397,7 @@
 int
 peek_input (void)
 {
-  register int ch;
+  int ch;
 
   while (1)
     {
@@ -407,7 +407,7 @@
       switch (isp->type)
        {
        case INPUT_STRING:
-         ch = isp->u.u_s.string[0];
+         ch = to_uchar (isp->u.u_s.string[0]);
          if (ch != '\0')
            return ch;
          break;
@@ -446,13 +446,13 @@
 
 #define next_char() \
   (isp && isp->type == INPUT_STRING && isp->u.u_s.string[0]            \
-   ? *isp->u.u_s.string++                                              \
+   ? to_uchar (*isp->u.u_s.string++)                                   \
    : next_char_1 ())
 
 static int
 next_char_1 (void)
 {
-  register int ch;
+  int ch;
 
   if (start_of_input_line)
     {
@@ -468,7 +468,7 @@
       switch (isp->type)
        {
        case INPUT_STRING:
-         ch = *isp->u.u_s.string++;
+         ch = to_uchar (*isp->u.u_s.string++);
          if (ch != '\0')
            return ch;
          break;
@@ -531,14 +531,14 @@
   const char *t;
 
   ch = peek_input ();
-  if (ch != *s)
+  if (ch != to_uchar (*s))
     return 0;                  /* fail */
   (void) next_char ();
 
   if (s[1] == '\0')
     return 1;                  /* short match */
 
-  for (n = 1, t = s++; (ch = peek_input ()) == *s++; n++)
+  for (n = 1, t = s++; (ch = peek_input ()) == to_uchar (*s++); n++)
     {
       (void) next_char ();
       if (*s == '\0')          /* long match */
@@ -564,7 +564,7 @@
 `------------------------------------------------------------------------*/
 
 #define MATCH(ch, s) \
-  ((s)[0] == (ch) \
+  (to_uchar ((s)[0]) == (ch)                                            \
    && (ch) != '\0' \
    && ((s)[1] == '\0' \
        || (match_input ((s) + 1) ? (ch) = peek_input (), 1 : 0)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]