From ea62077b850076c4d7dc3cf78ebd1888928c6ddf Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sat, 14 Oct 2006 02:23:43 +0000 Subject: add open_read_close() and similar stuff --- editors/vi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'editors') diff --git a/editors/vi.c b/editors/vi.c index fa30cf29c..a25e96657 100644 --- a/editors/vi.c +++ b/editors/vi.c @@ -2353,7 +2353,7 @@ static int file_insert(Byte * fn, Byte * p, int size) #endif fd = open((char *) fn, O_RDONLY); // try read-only if (fd < 0) { - psbs("\"%s\" %s", fn, "could not open file"); + psbs("\"%s\" %s", fn, "cannot open file"); goto fi0; } #ifdef CONFIG_FEATURE_VI_READONLY @@ -2367,11 +2367,11 @@ static int file_insert(Byte * fn, Byte * p, int size) if (cnt < 0) { cnt = -1; p = text_hole_delete(p, p + size - 1); // un-do buffer insert - psbs("could not read file \"%s\"", fn); + psbs("cannot read file \"%s\"", fn); } else if (cnt < size) { // There was a partial read, shrink unused space text[] p = text_hole_delete(p + cnt, p + (size - cnt) - 1); // un-do buffer insert - psbs("could not read all of file \"%s\"", fn); + psbs("cannot read all of file \"%s\"", fn); } if (cnt >= size) file_modified++; -- cgit v1.2.3