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 WARNS=4 2008-12-05 22:51:42 +00:00
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 fix reliability issue. 2009-04-19 02:28:19 +00:00
cut.c PR/45881: Chavdar Ivanov: nvi copy command copies empty lines. 2012-01-27 16:41:22 +00:00
cut.h 1. fix PR/44455, nonprintable character doesn't show hex-visual 2011-03-21 14:53:02 +00:00
db1.c WARNS=4 2008-12-05 22:51:42 +00:00
db.c PR/40140: Takehiko NOZAKI: fix bug where nvi + x(delete) key may call abort(3) 2008-12-09 16:50:22 +00:00
db.h The cursor emulation was broken, which led to O on an existing first line of 2008-08-05 15:49:18 +00:00
dbinternal.h WARNS=4 2008-12-05 22:51:42 +00:00
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 1. fix PR/44455, nonprintable character doesn't show hex-visual 2011-03-21 14:53:02 +00:00
key.c 1. fix PR/44455, nonprintable character doesn't show hex-visual 2011-03-21 14:53:02 +00:00
key.h nvi cannot display international character(west european accented chars). 2011-11-14 13:29:07 +00:00
log4.c
log.c WARNS=4 2008-12-05 22:51:42 +00:00
log.h
main.c WARNS=4 2008-12-05 22:51:42 +00:00
mark.c fix -Wsign-compare issues 2009-01-18 03:43:45 +00:00
mark.h
mem.h fix -Wsign-compare issues 2009-01-18 03:43:45 +00:00
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_f.c WARNS=4 2008-12-05 22:51:42 +00:00
options.awk put back matchchars 2008-10-01 21:20:09 +00:00
options.c 1. fix PR/44455, nonprintable character doesn't show hex-visual 2011-03-21 14:53:02 +00:00
options.h WARNS=4 2008-12-05 22:51:42 +00:00
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 fix -Wsign-compare issues 2009-01-18 03:43:45 +00:00
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 sign-compare fixes for amd64 2009-01-22 10:33:58 +00:00
seq.c 1. fix PR/44455, nonprintable character doesn't show hex-visual 2011-03-21 14:53:02 +00:00
seq.h
trace.c
util2.c
util.c 1. fix PR/44455, nonprintable character doesn't show hex-visual 2011-03-21 14:53:02 +00:00
util.h fix -Wsign-compare issues 2009-01-18 03:43:45 +00:00
vi_auto.c
vi_auto.h
vi_rec.c
vi.src