*** toplev.cc.orig 2008-01-05 22:01:14.000000000 +0400 --- toplev.cc 2008-01-05 22:25:27.000000000 +0400 *************** *** 453,497 **** DEFUN (system, args, nargout, "-*- texinfo -*-\n\ ! @deftypefn {Built-in Function} {} system (@var{string}, @var{return_output}, @var{type})\n\ ! Execute a shell command specified by @var{string}. The second\n\ ! argument is optional. If @var{type} is @code{\"async\"}, the process\n\ ! is started in the background and the process id of the child process\n\ ! is returned immediately. Otherwise, the process is started, and\n\ ! Octave waits until it exits. If @var{type} argument is omitted, a\n\ ! value of @code{\"sync\"} is assumed.\n\ ! \n\ ! If two input arguments are given (the actual value of\n\ ! @var{return_output} is irrelevant) and the subprocess is started\n\ ! synchronously, or if @var{system} is called with one input argument and\n\ ! one or more output arguments, the output from the command is returned.\n\ ! Otherwise, if the subprocess is executed synchronously, its output is\n\ ! sent to the standard output. To send the output of a command executed\n\ ! with @var{system} through the pager, use a command like\n\ \n\ ! @example\n\ ! disp (system (cmd, 1));\n\ ! @end example\n\ \n\ ! @noindent\n\ ! or\n\ \n\ @example\n\ ! printf (\"%s\n\", system (cmd, 1));\n\ @end example\n\ \n\ ! The @code{system} function can return two values. The first is the\n\ ! exit status of the command and the second is any output from the\n\ ! command that was written to the standard output stream. For example,\n\ \n\ @example\n\ ! [status, output] = system (\"echo foo; exit 2\");\n\ @end example\n\ - \n\ - @noindent\n\ - will set the variable @code{output} to the string @samp{foo}, and the\n\ - variable @code{status} to the integer @samp{2}.\n\ @end deftypefn") { octave_value_list retval; --- 453,486 ---- DEFUN (system, args, nargout, "-*- texinfo -*-\n\ ! @deftypefn {Built-in Function} address@hidden, @var{output}] =} system (@var{string}, @var{return_output}, @var{type})\n\ ! Execute a shell command specified by @var{string}. @var{type} determines\n\ ! the mode of execution, and may take the values @code{\"sync\"} or @code{\"async\"}.\n\ ! If one or two input arguments are provided, sync mode is assumed.\n\ ! \n\ ! In sync mode, the process is started, and Octave waits until it exits.\n\ ! The exit status is always returned (in @var{status}, if given)\n\ ! If @var{return_output} is specified (the value is irrelevant), output\n\ ! (stdout only) is redirected to @var{output} if given; otherwise, no output is generated.\n\ \n\ ! In async mode, the process is started in the background and the process id\n\ ! of the child process is returned immediately. @var{return_output} is ignored.\n\ \n\ ! To send the output of a command executed with @var{system} through the\n\ ! pager, use a command like\n\ \n\ @example\n\ ! [a,b] = system (cmd, 1);disp(b);\n\ @end example\n\ \n\ ! @noindent\n\ ! or\n\ \n\ @example\n\ ! [a,b] = system (cmd, 1); printf ("%s",b );\n\ @end example\n\ @end deftypefn") + { octave_value_list retval;