diff options
author | Russ Cox <russcox@gmail.com> | 2009-09-25 01:43:54 -0400 |
---|---|---|
committer | Russ Cox <russcox@gmail.com> | 2009-09-25 01:43:54 -0400 |
commit | daea2c7d501c3e825bede80992ade6b241efdce1 (patch) | |
tree | 7b222116d5eb48265654660917dbd0b5be630fcc /src/cmd/acme/text.c | |
parent | 1961ee822320bdc107e55f10b2db1bfe8f70d382 (diff) | |
download | plan9port-daea2c7d501c3e825bede80992ade6b241efdce1.tar.gz plan9port-daea2c7d501c3e825bede80992ade6b241efdce1.tar.bz2 plan9port-daea2c7d501c3e825bede80992ade6b241efdce1.zip |
acme: correct modified message after initial load; more detail in
message
http://codereview.appspot.com/123051
Diffstat (limited to 'src/cmd/acme/text.c')
-rw-r--r-- | src/cmd/acme/text.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cmd/acme/text.c b/src/cmd/acme/text.c index 1b56076c..7ea4131c 100644 --- a/src/cmd/acme/text.c +++ b/src/cmd/acme/text.c @@ -188,7 +188,7 @@ textcolumnate(Text *t, Dirlist **dlp, int ndl) } } -uint +int textload(Text *t, uint q0, char *file, int setqid) { Rune *rp; @@ -203,16 +203,16 @@ textload(Text *t, uint q0, char *file, int setqid) error("text.load"); if(t->w->isdir && t->file->nname==0){ warning(nil, "empty directory name"); - return 0; + return -1; } if(ismtpt(file)){ warning(nil, "will not open self mount point %s\n", file); - return 0; + return -1; } fd = open(file, OREAD); if(fd < 0){ warning(nil, "can't open %s: %r\n", file); - return 0; + return -1; } d = dirfstat(fd); if(d == nil){ @@ -303,7 +303,7 @@ textload(Text *t, uint q0, char *file, int setqid) Rescue: close(fd); - return 0; + return -1; } uint |