Mercurial > octave-nkf
comparison liboctave/file-stat.cc @ 11524:bd6e37860be5
use gnulib filemode module
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 14 Jan 2011 06:18:51 -0500 |
parents | fd0a3ac60b0e |
children | 7e9a111cae20 |
comparison
equal
deleted
inserted
replaced
11523:fd0a3ac60b0e | 11524:bd6e37860be5 |
---|---|
28 #include <cstring> | 28 #include <cstring> |
29 | 29 |
30 #include <sys/types.h> | 30 #include <sys/types.h> |
31 #include <unistd.h> | 31 #include <unistd.h> |
32 | 32 |
33 #include "filemode.h" | |
34 | |
33 #include "file-ops.h" | 35 #include "file-ops.h" |
34 #include "file-stat.h" | 36 #include "file-stat.h" |
35 #include "filemode.h" | |
36 #include "statdefs.h" | 37 #include "statdefs.h" |
37 | 38 |
38 // FIXME -- the is_* and mode_as_string functions are only valid | 39 // FIXME -- the is_* and mode_as_string functions are only valid |
39 // for initialized objects. If called for an object that is not | 40 // for initialized objects. If called for an object that is not |
40 // initialized, they should throw an exception. | 41 // initialized, they should throw an exception. |
154 std::string | 155 std::string |
155 base_file_stat::mode_as_string (void) const | 156 base_file_stat::mode_as_string (void) const |
156 { | 157 { |
157 char buf[11]; | 158 char buf[11]; |
158 | 159 |
159 mode_string (fs_mode, buf); | 160 strmode (fs_mode, buf); |
160 | 161 |
161 buf[10] = '\0'; | 162 buf[10] = '\0'; |
162 | 163 |
163 return std::string (buf); | 164 return std::string (buf); |
164 } | 165 } |