Mercurial > octave
comparison src/dirfns.cc @ 2095:36903d507b0e
[project @ 1996-04-28 09:00:07 by jwe]
author | jwe |
---|---|
date | Sun, 28 Apr 1996 09:00:07 +0000 |
parents | bfb775fb6fe8 |
children | 0dff6c159542 |
comparison
equal
deleted
inserted
replaced
2094:a23645b0364e | 2095:36903d507b0e |
---|---|
388 add_unwind_protect (cleanup_iprocstream, cmd); | 388 add_unwind_protect (cleanup_iprocstream, cmd); |
389 | 389 |
390 if (cmd && *cmd) | 390 if (cmd && *cmd) |
391 { | 391 { |
392 int ch; | 392 int ch; |
393 ostrstream output_buf; | |
394 while ((ch = cmd->get ()) != EOF) | 393 while ((ch = cmd->get ()) != EOF) |
395 output_buf << (char) ch; | 394 octave_stdout << (char) ch; |
396 output_buf << ends; | |
397 | |
398 maybe_page_output (output_buf); | |
399 } | 395 } |
400 else | 396 else |
401 error ("couldn't start process for ls!"); | 397 error ("couldn't start process for ls!"); |
402 | 398 |
403 run_unwind_protect (); | 399 run_unwind_protect (); |
424 directory = get_working_directory ("pwd"); | 420 directory = get_working_directory ("pwd"); |
425 | 421 |
426 if (! directory.empty ()) | 422 if (! directory.empty ()) |
427 { | 423 { |
428 if (nargout == 0) | 424 if (nargout == 0) |
429 { | 425 octave_stdout << directory << "\n"; |
430 ostrstream output_buf; | |
431 output_buf << directory << "\n" << ends; | |
432 maybe_page_output (output_buf); | |
433 } | |
434 else | 426 else |
435 retval = directory; | 427 retval = directory; |
436 } | 428 } |
437 | 429 |
438 return retval; | 430 return retval; |