diff src/toplev.cc @ 5285:fe5ee25a5e6c

[project @ 2005-04-19 15:02:49 by jwe]
author jwe
date Tue, 19 Apr 2005 15:02:49 +0000
parents 23b37da9fd5b
children 539428e4606a
line wrap: on
line diff
--- a/src/toplev.cc
+++ b/src/toplev.cc
@@ -382,6 +382,8 @@
   return retval;
 }
 
+enum system_exec_type { et_sync, et_async };
+
 DEFUN (system, args, nargout,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} system (@var{string}, @var{return_output}, @var{type})\n\
@@ -436,9 +438,7 @@
 
       std::string cmd_str = args(0).string_value ();
 
-      enum exec_type { sync, async };
-
-      exec_type type = sync;
+      system_exec_type type = et_sync;
 
       if (! error_state)
 	{
@@ -449,9 +449,9 @@
 	      if (! error_state)
 		{
 		  if (type_str == "sync")
-		    type = sync;
+		    type = et_sync;
 		  else if (type_str == "async")
-		    type = async;
+		    type = et_async;
 		  else
 		    error ("system: third arg must be \"sync\" or \"async\"");
 		}
@@ -464,7 +464,7 @@
 
       if (! error_state)
 	{
-	  if (type == async)
+	  if (type == et_async)
 	    {
 #ifdef HAVE_FORK
 	      pid_t pid = fork ();