changeset 18006:b992a17767fe

main.in.cc: Replace tabs with spaces. Shorten lines > 80 chars. main.in.cc: Replace tabs with spaces. Shorten lines > 80 chars.
author Rik <rik@octave.org>
date Mon, 25 Nov 2013 18:28:43 -0800
parents 79653c5b6147
children 25b6fbe82827
files src/main.in.cc
diffstat 1 files changed, 58 insertions(+), 57 deletions(-) [+]
line wrap: on
line diff
--- a/src/main.in.cc	Mon Nov 25 16:24:47 2013 -0500
+++ b/src/main.in.cc	Mon Nov 25 18:28:43 2013 -0800
@@ -435,7 +435,8 @@
   return obd.empty () ? subst_octave_home (std::string (OCTAVE_BINDIR)) : obd;
 }
 
-#if defined (__WIN32__) && ! defined (__CYGWIN__) // Adapted from libtool wrapper.
+// Adapted from libtool wrapper.
+#if defined (__WIN32__) && ! defined (__CYGWIN__)
 
 /* Prepares an argument vector before calling spawn().
    Note that spawn() does not by itself call the command interpreter
@@ -482,68 +483,68 @@
       const char *string = argv[i];
 
       if (string[0] == '\0')
-	new_argv[i] = strdup ("\"\"");
+        new_argv[i] = strdup ("\"\"");
       else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
-	{
-	  int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
-	  size_t length;
-	  unsigned int backslashes;
-	  const char *s;
-	  char *quoted_string;
-	  char *p;
+        {
+          int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
+          size_t length;
+          unsigned int backslashes;
+          const char *s;
+          char *quoted_string;
+          char *p;
 
-	  length = 0;
-	  backslashes = 0;
-	  if (quote_around)
-	    length++;
-	  for (s = string; *s != '\0'; s++)
-	    {
-	      char c = *s;
-	      if (c == '"')
-		length += backslashes + 1;
-	      length++;
-	      if (c == '\\')
-		backslashes++;
-	      else
-		backslashes = 0;
-	    }
-	  if (quote_around)
-	    length += backslashes + 1;
+          length = 0;
+          backslashes = 0;
+          if (quote_around)
+            length++;
+          for (s = string; *s != '\0'; s++)
+            {
+              char c = *s;
+              if (c == '"')
+                length += backslashes + 1;
+              length++;
+              if (c == '\\')
+                backslashes++;
+              else
+                backslashes = 0;
+            }
+          if (quote_around)
+            length += backslashes + 1;
 
-	  quoted_string = new char [length + 1];
+          quoted_string = new char [length + 1];
 
-	  p = quoted_string;
-	  backslashes = 0;
-	  if (quote_around)
-	    *p++ = '"';
-	  for (s = string; *s != '\0'; s++)
-	    {
-	      char c = *s;
-	      if (c == '"')
-		{
-		  unsigned int j;
-		  for (j = backslashes + 1; j > 0; j--)
-		    *p++ = '\\';
-		}
-	      *p++ = c;
-	      if (c == '\\')
-		backslashes++;
-	      else
-		backslashes = 0;
-	    }
-	  if (quote_around)
-	    {
-	      unsigned int j;
-	      for (j = backslashes; j > 0; j--)
-		*p++ = '\\';
-	      *p++ = '"';
-	    }
-	  *p = '\0';
+          p = quoted_string;
+          backslashes = 0;
+          if (quote_around)
+            *p++ = '"';
+          for (s = string; *s != '\0'; s++)
+            {
+              char c = *s;
+              if (c == '"')
+                {
+                  unsigned int j;
+                  for (j = backslashes + 1; j > 0; j--)
+                    *p++ = '\\';
+                }
+              *p++ = c;
+              if (c == '\\')
+                backslashes++;
+              else
+                backslashes = 0;
+            }
+          if (quote_around)
+            {
+              unsigned int j;
+              for (j = backslashes; j > 0; j--)
+                *p++ = '\\';
+              *p++ = '"';
+            }
+          *p = '\0';
 
-	  new_argv[i] = quoted_string;
-	}
+          new_argv[i] = quoted_string;
+        }
       else
-	new_argv[i] = (char *) string;
+        new_argv[i] = (char *) string;
     }
   new_argv[argc] = NULL;