cppfiles.c (find_position, [...]): Use `unsigned long' variables consistently to...
authorZack Weinberg <zack@rabi.columbia.edu>
Sun, 18 Apr 1999 14:54:35 +0000 (14:54 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Sun, 18 Apr 1999 14:54:35 +0000 (14:54 +0000)
1999-04-18 17:46 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
* cppfiles.c (find_position, read_and_prescan): Use `unsigned
long' variables consistently to count line and column numbers.

From-SVN: r26539

gcc/ChangeLog
gcc/cppfiles.c

index 37cb3f08a9e55c7ad53e4067d57ee8bcf55ca611..f8f5aa336615333a05d6c115b38d9f2305087d85 100644 (file)
@@ -1,3 +1,8 @@
+1999-04-18 17:46 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
+
+       * cppfiles.c (find_position, read_and_prescan): Use `unsigned
+       long' variables consistently to count line and column numbers.
+
 Sun Apr 18 15:50:33 EDT 1999  John Wehle  (john@feith.com)
 
        * output.h (current_function_is_leaf,
index 6fd240787fdecbfa4c44faf6037225692b23df01..e2305c6ad6cb1852707674eb1eec443539c064e3 100644 (file)
@@ -764,10 +764,10 @@ static void
 find_position (start, limit, linep, colp)
      U_CHAR *start;
      U_CHAR *limit;
-     long *linep;
-     long *colp;
+     unsigned long *linep;
+     unsigned long *colp;
 {
-  long line = *linep, col = 0;
+  unsigned long line = *linep, col = 0;
   while (start < limit)
     {
       U_CHAR ch = *start++;
@@ -818,7 +818,8 @@ read_and_prescan (pfile, fp, desc, len)
   U_CHAR *buf = (U_CHAR *) xmalloc (len);
   U_CHAR *ip, *op, *line_base;
   U_CHAR *ibase;
-  unsigned int line, deferred_newlines;
+  unsigned long line;
+  unsigned int deferred_newlines;
   int count;
   size_t offset;
   /* PIPE_BUF bytes of buffer proper, 2 to detect running off the end
@@ -1014,7 +1015,7 @@ read_and_prescan (pfile, fp, desc, len)
 
                if (CPP_OPTIONS (pfile)->warn_trigraphs)
                  {
-                   long col;
+                   unsigned long col;
                    find_position (line_base, op, &line, &col);
                    line_base = op - col;
                    cpp_warning_with_line (pfile, line, col,
@@ -1066,7 +1067,7 @@ read_and_prescan (pfile, fp, desc, len)
 
   if (op[-1] != '\n')
     {
-      long col;
+      unsigned long col;
       find_position (line_base, op, &line, &col);
       cpp_warning_with_line (pfile, line, col, "no newline at end of file\n");
       if (offset + 1 > len)