Mercurial > hg > octave-nkf
comparison src/syscalls.cc @ 2926:66ef74ee5d9f
[project @ 1997-05-05 03:20:52 by jwe]
author | jwe |
---|---|
date | Mon, 05 May 1997 03:40:21 +0000 |
parents | c5b7a019b9ed |
children | 9d26524e2869 |
comparison
equal
deleted
inserted
replaced
2925:f0665dac8e33 | 2926:66ef74ee5d9f |
---|---|
42 | 42 |
43 #ifdef HAVE_FCNTL_H | 43 #ifdef HAVE_FCNTL_H |
44 #include <fcntl.h> | 44 #include <fcntl.h> |
45 #endif | 45 #endif |
46 | 46 |
47 #include "file-ops.h" | |
48 #include "file-stat.h" | |
49 | |
47 #include "defun.h" | 50 #include "defun.h" |
48 #include "error.h" | 51 #include "error.h" |
49 #include "file-ops.h" | |
50 #include "gripes.h" | 52 #include "gripes.h" |
51 #include "help.h" | 53 #include "help.h" |
52 #include "lo-utils.h" | 54 #include "lo-utils.h" |
53 #include "oct-map.h" | 55 #include "oct-map.h" |
54 #include "oct-obj.h" | 56 #include "oct-obj.h" |
471 { | 473 { |
472 octave_value_list retval; | 474 octave_value_list retval; |
473 | 475 |
474 if (args.length () == 1) | 476 if (args.length () == 1) |
475 { | 477 { |
476 string fname = oct_tilde_expand (args(0).string_value ()); | 478 string fname = file_ops::tilde_expand (args(0).string_value ()); |
477 | 479 |
478 if (! error_state) | 480 if (! error_state) |
479 { | 481 { |
480 file_stat fs (fname, false); | 482 file_stat fs (fname, false); |
481 | 483 |
524 { | 526 { |
525 long mode = static_cast<long> (args(1).double_value ()); | 527 long mode = static_cast<long> (args(1).double_value ()); |
526 | 528 |
527 string msg; | 529 string msg; |
528 | 530 |
529 int status = oct_mkfifo (name, mode, msg); | 531 int status = file_ops::mkfifo (name, mode, msg); |
530 | 532 |
531 retval(0) = static_cast<double> (status); | 533 retval(0) = static_cast<double> (status); |
532 | 534 |
533 if (status < 0) | 535 if (status < 0) |
534 retval(1) = msg; | 536 retval(1) = msg; |
631 { | 633 { |
632 octave_value_list retval; | 634 octave_value_list retval; |
633 | 635 |
634 if (args.length () == 1) | 636 if (args.length () == 1) |
635 { | 637 { |
636 string fname = oct_tilde_expand (args(0).string_value ()); | 638 string fname = file_ops::tilde_expand (args(0).string_value ()); |
637 | 639 |
638 if (! error_state) | 640 if (! error_state) |
639 { | 641 { |
640 file_stat fs (fname); | 642 file_stat fs (fname); |
641 | 643 |
680 { | 682 { |
681 string name = args(0).string_value (); | 683 string name = args(0).string_value (); |
682 | 684 |
683 string msg; | 685 string msg; |
684 | 686 |
685 int status = oct_unlink (name, msg); | 687 int status = file_ops::unlink (name, msg); |
686 | 688 |
687 retval(0) = static_cast<double> (status); | 689 retval(0) = static_cast<double> (status); |
688 | 690 |
689 if (status < 0) | 691 if (status < 0) |
690 retval(1) = msg; | 692 retval(1) = msg; |