[GODCC][COMMITTED] Avoid hidding prelude definitions

Jose E. Marchesi jemarch@gnu.org
Sun Nov 2 21:08:14 GMT 2025


---
 src/json.a68  | 26 +++++++++++++-------------
 src/utils.a68 |  4 ++--
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/json.a68 b/src/json.a68
index eabf0b5..5e79d0a 100644
--- a/src/json.a68
+++ b/src/json.a68
@@ -161,7 +161,7 @@ begin
       char ungetch := eof_char, ch;
       int usedchars;
 
-      proc getchar = char:
+      proc getachar = char:
       begin if usedchars > maxchars then ch := eof_char
             elif ungetch /= eof_char
             then ch := ungetch; ungetch := eof_char
@@ -170,7 +170,7 @@ begin
             ch
       end;
 
-      proc ungetchar = (char c) void:
+      proc ungetachar = (char c) void:
          ungetch := c;
 
       { A few utility routines.  }
@@ -178,7 +178,7 @@ begin
       proc expect = (string s) void:
          for i to UPB s
          do char c = s[i];
-            if getchar = eof_char orel ch /= c
+            if getachar = eof_char orel ch /= c
             then parse_error ("expected ''" + c + "''")
             fi
          od;
@@ -196,18 +196,18 @@ begin
             proc parse_number = int:
             begin int num := 0;
                   while num := num * 10 + ABS ch - ABS "0";
-                        isdigit (getchar)
+                        isdigit (getachar)
                   do ~ od;
-                  ungetchar (ch);
+                  ungetachar (ch);
                   num
             end;
 
             proc parse_string = string:
             begin string res;
-                  while getchar /= """"
+                  while getachar /= """"
                   do if ch = eof_char then json_error ("while parsing string")
                      elif ch = "\"
-                     then ch = getchar;
+                     then ch = getachar;
                           if ch = eof_char then json_error ("unterminated string escape")
                           elif ch = "n" then res +:= "'n"
                           elif ch = "t" then res +:= "'t"
@@ -223,9 +223,9 @@ begin
 
             proc parse_array = ref JSON_Arr:
             begin ref JSON_Elm elems;
-                  for i while getchar /= "]"
-                  do ungetchar (ch);
-                     if i > 1 then ungetchar (ch); expect (",") fi;
+                  for i while getachar /= "]"
+                  do ungetachar (ch);
+                     if i > 1 then ungetachar (ch); expect (",") fi;
                      JSON_Val val = parse_value (charsleft - usedchars);
                      { Array elements should keep written order.  }
                      elems := (elems :=: json_no_elm
@@ -244,8 +244,8 @@ begin
 
             proc parse_object = ref JSON_Obj:
             begin ref JSON_Fld fields;
-                  for i while getchar /= "}"
-                  do ungetchar (ch);
+                  for i while getachar /= "}"
+                  do ungetachar (ch);
                      if i > 1 then expect (",") fi;
                      JSON_Val name = parse_value (charsleft - usedchars);
                      expect (":");
@@ -258,7 +258,7 @@ begin
                   res
             end;
 
-            getchar;
+            getachar;
             (ch = "t" | expect ("rue"); true
              |: ch = "f" | expect ("alse"); false
              |: isdigit (ch) | parse_number
diff --git a/src/utils.a68 b/src/utils.a68
index 1cb4cb2..b90a67d 100644
--- a/src/utils.a68
+++ b/src/utils.a68
@@ -77,8 +77,8 @@ end;
 
 proc read_from_file = (string path) ref string:
 begin int fd = (path = "-" | 0 | fopen_checked (path, file_o_rdonly));
-      long long int fsize = fsize_checked (path, fd);
-      (fsize > LENG LENG max_int | error ("input file is too big"));
+      long long int size = fsize_checked (path, fd);
+      (size > LENG LENG max_int | error ("input file is too big"));
       fgets (fd, SHORTEN SHORTEN fsize_checked (path, fd))
 end;
 
-- 
2.30.2



More information about the Algol68 mailing list