? buildit.ksh
? env.sh
Index: gcalctool/display.c
===================================================================
RCS file: /cvs/gnome/gcalctool/gcalctool/display.c,v
retrieving revision 1.34
diff -u -r1.34 display.c
--- gcalctool/display.c	3 Dec 2003 22:20:02 -0000	1.34
+++ gcalctool/display.c	5 Dec 2003 17:54:46 -0000
@@ -76,17 +76,33 @@
 
 void
 remove_tsep(char *str) {
+    gboolean found = FALSE;
     char *srcp = str;
     char *dstp = str;
 
+/* If there are no thousands separators in the numeric string, just return
+ * without doing anything. This is needed because the initial constant
+ * definitions are potentially in read-only memory, and shouldn't be adjusted.
+ */
+
     while (*srcp != '\0') {
         if (*srcp == ',') {
-            srcp++;
-            continue;
+            found = TRUE;
+        }
+        srcp++;
+    }
+
+    if (found == TRUE) {
+        dstp = srcp = str;
+        while (*srcp != '\0') {
+            if (*srcp == ',') {
+                srcp++;
+                continue;
+            }
+            *dstp++ = *srcp++;
         }
-        *dstp++ = *srcp++;
+        *dstp++ = '\0';
     }
-    *dstp++ = '\0';
 }
 
 
