From daea2c7d501c3e825bede80992ade6b241efdce1 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 25 Sep 2009 01:43:54 -0400 Subject: acme: correct modified message after initial load; more detail in message http://codereview.appspot.com/123051 --- src/cmd/acme/text.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/cmd/acme/text.c') 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 -- cgit v1.2.3