NetBSD/dist/nvi/common
christos ab35868474 It is ridiculous to truncate files on character conversions without
warning and a chance for recovery. This patch sets the handler to
copy the character, clear the error and proceed instead of bailing
out.

To replicate:
	- unset LANG
	- Create a file that has ~1000 lines. Put a single bad character
	- '\344' in it, around 2/3rds of the file down. Save it.
	- export LANG=en_US.UTF-8
	- edit the file. Notice there is no error for input conversion,
	  since nvi reads the file opportunistically.
	- :w Boom, the file is truncated.

Alternatively, you can put that character in the first line of the file,
and watch the fireworks. If you like to restore the previous behavior
compile with -DERROR_ON_CONVERT

XXX: Pullup to 6, 5 etc.
2013-01-23 18:51:51 +00:00
..
api.c
args.h
common.h PR/45881: Chavdar Ivanov: nvi copy command copies empty lines. 2012-01-27 16:41:22 +00:00
conv.c It is ridiculous to truncate files on character conversions without 2013-01-23 18:51:51 +00:00
conv.h
cut.c PR/45881: Chavdar Ivanov: nvi copy command copies empty lines. 2012-01-27 16:41:22 +00:00
cut.h
db.c
db.h
db1.c
dbinternal.h
delete.c PR/45881: Chavdar Ivanov: nvi copy command copies empty lines. 2012-01-27 16:41:22 +00:00
dldb.c
exf.c Use after free (Coverity 273146) 2012-07-15 09:13:59 +00:00
exf.h
extern.h use ARG_CHAR_T instead of CHAR_T for integer promotion. 2011-11-23 19:25:27 +00:00
gs.c Use __dead 2011-09-16 16:13:41 +00:00
gs.h
key.c
key.h nvi cannot display international character(west european accented chars). 2011-11-14 13:29:07 +00:00
log.c
log.h
log4.c
main.c
mark.c
mark.h
mem.h
msg.c fix raw string formats 2011-08-17 12:56:55 +00:00
msg.h
multibyte.h don't use WEOF directly, for --disable-widechar. 2011-11-23 15:43:39 +00:00
nothread.c
options.awk
options.c
options.h
options_f.c
pthread.c
put.c use ARG_CHAR_T instead of CHAR_T for integer promotion. 2011-11-23 19:25:27 +00:00
recover.c
screen.c
screen.h use ARG_CHAR_T instead of CHAR_T for integer promotion. 2011-11-23 19:25:27 +00:00
search.c
seq.c
seq.h
trace.c
util.c
util.h
util2.c
vi.src
vi_auto.c
vi_auto.h
vi_rec.c