CVS commit: src/external/bsd/nvi/dist/common

2016-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jan  7 14:07:01 UTC 2016

Modified Files:
src/external/bsd/nvi/dist/common: key.h

Log Message:
remove CONST; it is unused from Brad Harder


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/nvi/dist/common/key.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2017-11-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  4 03:26:41 UTC 2017

Modified Files:
src/external/bsd/nvi/dist/common: recover.c

Log Message:
be more careful about opening recovery files... in particular deal with
people trying to get 'vi -r' stuck using named pipes, symlink attacks,
and coercing others opening recovery files they did not create.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/nvi/dist/common/recover.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2017-11-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  4 06:12:26 UTC 2017

Modified Files:
src/external/bsd/nvi/dist/common: recover.c

Log Message:
Deal safely with recovery mail files.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/nvi/dist/common/recover.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2017-11-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  4 06:15:56 UTC 2017

Modified Files:
src/external/bsd/nvi/dist/common: recover.c

Log Message:
oops, accidendally committed an earlier non-working version; fixed.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/nvi/dist/common/recover.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2017-11-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  4 14:20:13 UTC 2017

Modified Files:
src/external/bsd/nvi/dist/common: recover.c

Log Message:
Don't use popenve() for portability; forking an extra shell here is not an
issue.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/nvi/dist/common/recover.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2017-11-05 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov  6 03:02:22 UTC 2017

Modified Files:
src/external/bsd/nvi/dist/common: conv.c

Log Message:
Fix buffer overrun caused by lines longer than CONV_BUFFER_SIZE.
Take care of errno == E2BIG case of iconv(3) appropriately.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/nvi/dist/common/conv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2017-11-05 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov  6 03:03:54 UTC 2017

Modified Files:
src/external/bsd/nvi/dist/common: msg.c

Log Message:
Fix bogus file location in percentage.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/nvi/dist/common/msg.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2017-11-05 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov  6 03:17:37 UTC 2017

Modified Files:
src/external/bsd/nvi/dist/common: options.c

Log Message:
Fix corruption in numbering of options without GTAGS compile-time option.
Now nvi works without GTAGS.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/nvi/dist/common/options.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2017-11-05 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov  6 03:21:13 UTC 2017

Modified Files:
src/external/bsd/nvi/dist/common: options.c

Log Message:
Entries of abbrev[] should be sorted for bsearch(3) to work.
Fix the problem that option abbreviation "fe" is neglected.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/nvi/dist/common/options.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2017-11-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov 10 16:35:54 UTC 2017

Modified Files:
src/external/bsd/nvi/dist/common: recover.c

Log Message:
make the checkok test stricter to avoid races, and use O_REGULAR.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/nvi/dist/common/recover.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2017-11-10 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Nov 10 18:08:11 UTC 2017

Modified Files:
src/external/bsd/nvi/dist/common: conv.c

Log Message:
Restore the initial state at the end of line.
This matters for stateful encodings like iso-2022-jp.
Fix taken from yamt via nvi2.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/nvi/dist/common/conv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2017-11-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov 10 20:01:11 UTC 2017

Modified Files:
src/external/bsd/nvi/dist/common: recover.c

Log Message:
Instead of opening the file and using popen(3), pass the file descriptor
to sendmail directory. Idea and code from Todd Miller.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/nvi/dist/common/recover.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2017-11-12 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Nov 12 15:23:51 UTC 2017

Modified Files:
src/external/bsd/nvi/dist/common: put.c

Log Message:
Fix argument type of put() in common_extern.h


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/nvi/dist/common/put.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2017-11-12 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Nov 12 15:26:34 UTC 2017

Modified Files:
src/external/bsd/nvi/dist/common: util.c

Log Message:
No need to cast endp in both cases of USE_WIDECHAR == "yes" nor "no".
Note that RCHAR_T is intended to use for bundled regex, not for nvi itself.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/nvi/dist/common/util.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2017-11-12 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov 13 01:34:59 UTC 2017

Modified Files:
src/external/bsd/nvi/dist/common: multibyte.h

Log Message:
Remove duplicate definition for ISUPPER.
No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/nvi/dist/common/multibyte.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2017-11-12 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov 13 04:21:55 UTC 2017

Modified Files:
src/external/bsd/nvi/dist/common: conv.c

Log Message:
Protect iconv stuffs by USE_WIDECHAR in addition to USE_ICONV.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/nvi/dist/common/conv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2017-11-20 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Nov 21 02:00:29 UTC 2017

Modified Files:
src/external/bsd/nvi/dist/common: conv.c

Log Message:
Fix use of uninitialized variable, found by clang.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/nvi/dist/common/conv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2017-11-20 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Nov 21 02:04:39 UTC 2017

Modified Files:
src/external/bsd/nvi/dist/common: mem.h

Log Message:
Fix -Wsign-compare issue for BINC_GOTO in a similar manner to BINC_RET.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/nvi/dist/common/mem.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2017-11-20 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Nov 21 02:11:44 UTC 2017

Modified Files:
src/external/bsd/nvi/dist/common: conv.c

Log Message:
Fix resource leaks due to missing of iconv_close(3).


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/nvi/dist/common/conv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2017-11-20 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Nov 21 02:36:45 UTC 2017

Modified Files:
src/external/bsd/nvi/dist/common: conv.c

Log Message:
Enable to compile & run without USE_ICONV.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/nvi/dist/common/conv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2017-11-22 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Nov 22 16:17:30 UTC 2017

Modified Files:
src/external/bsd/nvi/dist/common: search.c

Log Message:
Fix missing of "search wrapped" message when searching from the last char of
file, taken from nvi2:
https://github.com/lichray/nvi2/commit/a59e892d23212559eb1001e5d2a312a02e357651


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/nvi/dist/common/search.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2017-12-01 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Dec  1 18:35:58 UTC 2017

Modified Files:
src/external/bsd/nvi/dist/common: common.h

Log Message:
Remove ex_printf duplicate with ex_extern.h.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/nvi/dist/common/common.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2013-11-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 27 18:11:50 UTC 2013

Modified Files:
src/external/bsd/nvi/dist/common: exf.c

Log Message:
CID 1132768 Clarify assign


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/nvi/dist/common/exf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2013-11-27 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Wed Nov 27 20:31:01 UTC 2013

Modified Files:
src/external/bsd/nvi/dist/common: exf.c

Log Message:
Fix compiler error caused by last change:
db_env_create() returns an integer. So we must not compare its return
value with NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/nvi/dist/common/exf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2013-11-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 27 21:17:36 UTC 2013

Modified Files:
src/external/bsd/nvi/dist/common: recover.c

Log Message:
CID 272343: Fix resource leak


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/nvi/dist/common/recover.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2013-11-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov 28 03:14:28 UTC 2013

Modified Files:
src/external/bsd/nvi/dist/common: vi_db.c

Log Message:
fix syntax error


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/nvi/dist/common/vi_db.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2013-11-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov 29 16:36:11 UTC 2013

Modified Files:
src/external/bsd/nvi/dist/common: log1.c trace.c

Log Message:
fix compilation of log debugging


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/nvi/dist/common/log1.c \
src/external/bsd/nvi/dist/common/trace.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2013-11-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov 29 21:57:31 UTC 2013

Modified Files:
src/external/bsd/nvi/dist/common: vi_db1.c

Log Message:
make the debugging code work again.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/nvi/dist/common/vi_db1.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2013-11-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov 30 14:54:29 UTC 2013

Modified Files:
src/external/bsd/nvi/dist/common: recover.c vi_db1.c

Log Message:
Fix recovery mode, there were multiple issues:
1. the btree filename was not set so that we always used a transient
   in-memory db for the data
2. we did not call sync after creation with R_RECNOSYNC so that the header
   of the btree was never written
3. we did not call the right flavor of sync before copying the tree to the
   preserved files


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/nvi/dist/common/recover.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/nvi/dist/common/vi_db1.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2013-11-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  1 02:21:58 UTC 2013

Modified Files:
src/external/bsd/nvi/dist/common: vi_db1.c

Log Message:
fix indentantion


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/nvi/dist/common/vi_db1.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2014-01-05 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Jan  6 07:56:47 UTC 2014

Modified Files:
src/external/bsd/nvi/dist/common: screen.c

Log Message:
screen_end can be called multiple times for the same screen.
Work around segfault in TAILQ_REMOVE by abusing the tqe_prev pointer
as a flag that identifies an already removed node.

This should really be solved by calling screen_end only once or by
keeping state explicitely in the screen structure.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/nvi/dist/common/screen.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2014-01-06 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Jan  7 02:14:02 UTC 2014

Modified Files:
src/external/bsd/nvi/dist/common: common.h

Log Message:
Check format strings for ex_printf.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/nvi/dist/common/common.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2014-01-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan  7 21:46:47 UTC 2014

Modified Files:
src/external/bsd/nvi/dist/common: conv.c

Log Message:
handle unaligned accesses


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/nvi/dist/common/conv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2018-06-16 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sat Jun 16 18:54:52 UTC 2018

Modified Files:
src/external/bsd/nvi/dist/common: log.c

Log Message:
Do not cause Undefined Behavior in vi(1)

Replace unportable manual calculation of alignof() that causes UB, with
a GCC extension __alignof__.

This fixes a problem reported by UBSan with the MKSANITIZER distribution.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/nvi/dist/common/log.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2018-06-16 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sat Jun 16 21:00:12 UTC 2018

Modified Files:
src/external/bsd/nvi/dist/common: log.c

Log Message:
Correct previous change to CHAR_T_OFFSET

The intended operation is offsetof(), not alignof().

Noted by 


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/nvi/dist/common/log.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2018-06-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Jun 25 17:42:34 UTC 2018

Modified Files:
src/external/bsd/nvi/dist/common: log1.c

Log Message:
Avoid unportable offsetof(3) calculation in nvi in log1.c

Detected with MKSANITIZER/UBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/nvi/dist/common/log1.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2018-06-25 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Jun 25 18:36:36 UTC 2018

Modified Files:
src/external/bsd/nvi/dist/common: log1.c

Log Message:
Include  for offsetof(3)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/nvi/dist/common/log1.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2018-07-31 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Aug  1 02:48:47 UTC 2018

Modified Files:
src/external/bsd/nvi/dist/common: conv.h

Log Message:
As described in comments, we treat non-spacing chars as single-width ones.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/nvi/dist/common/conv.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/nvi/dist/common

2018-08-07 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Aug  7 11:25:45 UTC 2018

Modified Files:
src/external/bsd/nvi/dist/common: vi_db1.c

Log Message:
Remove unnecessary buffer allocation and memcpy.
Partially taken from nvi2.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/nvi/dist/common/vi_db1.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.