PCOMPUTE works
[pspp] / tests / language / lexer / command-name-test.c
index d63b8a20abca85ca303292a627bb9a4634a5234a..59a00f1ea44c8b795b3c0adff8b93c7fc1309a5b 100644 (file)
@@ -118,6 +118,17 @@ parse_options (int argc, char **argv)
 
     }
 
+  for (int i = optind; i < argc; i++)
+    {
+      /* Replace ++ by nonbreaking space in UTF-8. */
+      for (char *p = argv[i]; *p != '\0'; p++)
+        if (p[0] == '+' && p[1] == '+')
+          {
+            p[0] = 0xc2;
+            p[1] = 0xa0;
+          }
+    }
+
   for (breakpoint = optind; ; breakpoint++)
     if (breakpoint >= argc)
       error (1, 0, "missing ',' on command line; use --help for help");