diff options
author | Martijn van Duren <martijn@cvs.openbsd.org> | 2018-11-14 10:59:34 +0000 |
---|---|---|
committer | Martijn van Duren <martijn@cvs.openbsd.org> | 2018-11-14 10:59:34 +0000 |
commit | f771e32bf700140faa3a6b15dd128e0e5c7a6d29 (patch) | |
tree | 9a8aee7653cc0ccb332be359565e8ef2ee51475d /usr.bin/sed/extern.h | |
parent | 8e027e23243c42cceff9b7863b86cd4edc57cdae (diff) |
Make sed's -i flag more compatible with what gsed does.
- Reset the hold-space in between files
- quit the editor as soon as a 'q' command is found
- Make sure the temp-file is written back to the original file if we quit
the editor
temp-file not written back issue found by Time Chase.
Lots of feedback from millert@ and schwarze@
OK millert@
Diffstat (limited to 'usr.bin/sed/extern.h')
-rw-r--r-- | usr.bin/sed/extern.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/sed/extern.h b/usr.bin/sed/extern.h index 77ed8ef1c5d..772f0bab3ef 100644 --- a/usr.bin/sed/extern.h +++ b/usr.bin/sed/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.13 2017/08/01 18:05:53 martijn Exp $ */ +/* $OpenBSD: extern.h,v 1.14 2018/11/14 10:59:33 martijn Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. * Copyright (c) 1992, 1993 @@ -53,8 +53,9 @@ __dead void error(int, const char *, ...); void warning(const char *, ...); int mf_fgets(SPACE *, enum e_spflag); int lastline(void); +void finish_file(void); void process(void); -void resetranges(void); +void resetstate(void); char *strregerror(int, regex_t *); void *xmalloc(size_t); void *xreallocarray(void *, size_t, size_t); |