Mercurial > hg > octave-terminal
changeset 1381:4b01352e52d8
[project @ 1995-09-12 07:10:57 by jwe]
author | jwe |
---|---|
date | Tue, 12 Sep 1995 07:10:57 +0000 |
parents | 79f80c6229be |
children | 000325177d87 |
files | src/file-io.cc |
diffstat | 1 files changed, 2 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/file-io.cc +++ b/src/file-io.cc @@ -2458,19 +2458,12 @@ { Octave_map m; - unsigned mode = st.st_mode; - int mode_as_int = 1000 * ((mode & 7000) >> 9) - + 100 * ((mode & 0700) >> 6) - + 10 * ((mode & 0070) >> 3) - + ((mode & 0007) >> 0); - char mode_as_string[11]; - mode_string (mode, mode_as_string); + mode_string (st.st_mode, mode_as_string); mode_as_string[10] = '\0'; m["dev"] = (double) st.st_dev; m["ino"] = (double) st.st_ino; - m["mode"] = (double) mode_as_int; m["modestr"] = mode_as_string; m["nlink"] = (double) st.st_nlink; m["uid"] = (double) st.st_uid; @@ -2500,7 +2493,7 @@ \n\ dev : id of device containing a directory entry for this file\n\ ino : file number of the file\n\ - mode : file mode, as an integer\n\ + modestr : file mode, as a string of ten letters or dashes as in ls -l\n\ nlink : number of links\n\ uid : user id of file's owner\n\ gid : group id of file's group \n\