[m-dev.] trivial diff: trace/mercury_trace_vars.c: use MR_isdigit()

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Jun 8 07:53:15 AEST 1999


Estimated hours taken: 0.1

trace/mercury_trace_vars.c:
	Use MR_isdigit() rather than isdigit(), to avoid problems
	on systems where `char' is signed.

Workspace: /home/mercury0/fjh/mercury-other
Index: trace/mercury_trace_vars.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_vars.c,v
retrieving revision 1.5
diff -u -r1.5 mercury_trace_vars.c
--- mercury_trace_vars.c	1999/05/28 07:28:22	1.5
+++ mercury_trace_vars.c	1999/06/07 21:48:38
@@ -353,7 +353,7 @@
 		copy = MR_copy_string(name);
 		copylen = strlen(copy);
 		s = copy + copylen - 1;
-		while (s > copy && isdigit(*s)) {
+		while (s > copy && MR_isdigit(*s)) {
 			s--;
 		}
 
@@ -363,7 +363,7 @@
 			MR_point.MR_point_vars[slot].MR_var_num_suffix = -1;
 			MR_point.MR_point_vars[slot].MR_var_basename = copy;
 		} else {
-			if (isdigit(*s)) {
+			if (MR_isdigit(*s)) {
 				fatal_error("variable name starts with digit");
 			}
 

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list