]> git.ipfire.org Git - thirdparty/make.git/commitdiff
VMS fix.
authorPaul Smith <psmith@gnu.org>
Sat, 21 Feb 2004 17:10:41 +0000 (17:10 +0000)
committerPaul Smith <psmith@gnu.org>
Sat, 21 Feb 2004 17:10:41 +0000 (17:10 +0000)
ChangeLog
job.c

index d6c2e4518bc56696d596bdbf71f00530fd476b89..1533989036ed3081b39859945b02a1eefef69d21 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-02-04  Paul D. Smith  <psmith@gnu.org>
+
+       * job.c (vms_handle_apos) [VMS]: Fix various string handling
+       situations in VMS DCL.  Fixes Savannah bug #5533.  Fix provided by
+       Hartmut Becker <Hartmut.Becker@hp.com>.
+
 2004-01-21  Paul D. Smith  <psmith@gnu.org>
 
        * job.c (load_too_high): Implement an algorithm to control the
diff --git a/job.c b/job.c
index d3a8e6b26d6595e94aba86fd7ee05a05d804d81c..1529d293ef12126f1eaa969d9914be8a0d87b757 100644 (file)
--- a/job.c
+++ b/job.c
@@ -370,44 +370,26 @@ static char *
 vms_handle_apos (char *p)
 {
   int alast;
-  int inside;
 
 #define SEPCHARS ",/()= "
 
-  inside = 0;
+  alast = 0;
 
   while (*p != 0)
     {
       if (*p == '"')
        {
-         if (inside)
-           {
-             while ((alast > 0)
-                   && (*p == '"'))
-               {
-                 p++;
-                 alast--;
-               }
-             if (alast == 0)
-               inside = 0;
-             else
-               {
-                 fprintf (stderr, _("Syntax error, still inside '\"'\n"));
-                 exit (3);
-               }
+          if (alast)
+            {
+              alast = 0;
+              p++;
            }
          else
            {
              p++;
              if (strchr (SEPCHARS, *p))
                break;
-             inside = 1;
              alast = 1;
-             while (*p == '"')
-               {
-                 alast++;
-                 p++;
-               }
            }
        }
       else
@@ -2232,7 +2214,7 @@ child_execute_job (char *argv, struct child *child)
              /* Nice places for line breaks are after strings, after
                 comma or space and before slash. */
             case '"':
-              q = vms_handle_apos (q + 1);
+              q = vms_handle_apos (q);
               sep = q;
               break;
             case ',':