rin
1597af3dd8
Compare ap->len wide chars, not ap->len bytes.
2017-12-01 20:01:31 +00:00
rin
c14a835e62
Check format strings for ex_printf.
2017-12-01 18:39:49 +00:00
rin
a90a8d8c63
Remove ex_printf duplicate with ex_extern.h.
2017-12-01 18:35:58 +00:00
christos
888e2fefae
add more DW_ATE_ constants
2017-11-30 19:45:53 +00:00
rin
59cd10f512
Fix missing of "search wrapped" message when searching from the last char of
...
file, taken from nvi2:
a59e892d23
2017-11-22 16:17:30 +00:00
rin
f8052d784e
Fix backward memcpy in :e +cmd, taken from nvi2 (and OpenBSD):
...
7ab02500a2
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/vi/ex/ex.c#rev1.21
2017-11-22 13:13:18 +00:00
rin
a07ca21052
Fix segmentation fault in corner case of backward sentence deletion,
...
taken from nvi2 (and Debian Bug report #193498 ):
e84d40ec20
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=193498
2017-11-22 12:47:30 +00:00
rin
ba5f7ef194
Remove more files that should be removed when tre was imported from github
...
repository.
2017-11-21 08:19:54 +00:00
rin
7419ae3a04
Use ISMULTIWIDTH() macro. No binary changes.
2017-11-21 07:48:07 +00:00
rin
a8ee716c25
A boundary between single- and multi-width chars is regarded as a word boundary.
...
Suggested on tech-userland@ without any objections.
2017-11-21 07:43:47 +00:00
rin
f10703c63c
Fix screen corruption by rewriting only a part of a multi-width character.
2017-11-21 06:35:22 +00:00
rin
17bc61630c
Bump WARNS to 5 (via ../Makefile.inc).
...
Remove unnecessary -Wno-stack-protector flag.
2017-11-21 03:09:41 +00:00
rin
4f43870bc3
Bump WARNS to 5.
2017-11-21 03:03:31 +00:00
rin
b2085f3f9f
Add REG_INVARG and REG_STARTEND ifndef TRE_USE_SYSTEM_REGEX_H.
...
No functional changes at the moment.
2017-11-21 02:53:20 +00:00
rin
b3178392f5
Some systems need <stdint.h> for SIZE_MAX.
...
No functional changes on NetBSD.
2017-11-21 02:50:35 +00:00
rin
b6a6fbff71
Bump WARNS to 5. Add -Wno-old-style-definition to regex.c for gcc.
2017-11-21 02:47:14 +00:00
rin
63e761a651
Enable -Wuninitialized -Wformat-security for clang.
2017-11-21 02:45:03 +00:00
rin
0c92db7399
We always need -Wno-format-nonliteral for v_increment.c whether compiler is
...
gcc or clang.
2017-11-21 02:44:13 +00:00
rin
a1deadaca4
Cosmetic changes. No functional changes.
2017-11-21 02:42:08 +00:00
rin
4fc00db461
Enable to compile & run without USE_ICONV.
2017-11-21 02:36:45 +00:00
rin
d43bd23851
Fix resource leaks due to missing of iconv_close(3).
2017-11-21 02:11:44 +00:00
rin
03a096c4f1
Fix -Wsign-compare issue for BINC_GOTO in a similar manner to BINC_RET.
2017-11-21 02:04:39 +00:00
rin
bd6bbecf8a
Fix use of uninitialized variable, found by clang.
2017-11-21 02:00:29 +00:00
rin
bc436ad3c5
Fix an apparent typo.
2017-11-19 21:54:31 +00:00
rin
98796d9c59
Add missing integer overflow checks to avoid out-of-bound write reported in
...
CVE-2016-8859, partially taken from musl libc:
https://git.musl-libc.org/cgit/musl/commit/src/regex/regexec.c?id=c3edc06d1e1360f3570db9155d6b318ae0d0f0f7
https://git.musl-libc.org/cgit/musl/commit/src/regex/regexec.c?id=6582baa752a8facb2c8a7b5b3dcf67331429cdc1
2017-11-19 14:03:35 +00:00
rin
27d137ae33
Fix memory leak when input contains illegal multibyte sequence, partially
...
taken from musl libc:
https://git.musl-libc.org/cgit/musl/commit/src/regex/regexec.c?id=546f6b322bcafa2452925c19f9607d9689c75f95
2017-11-19 13:22:58 +00:00
rin
99fb528edf
ret should be reg_errcode_t.
2017-11-19 13:21:02 +00:00
rin
42ec3f9a8a
nmatch and pmatch should be ignored when regex was compiled with REG_NOSUB,
...
partially taken from musl libc:
https://git.musl-libc.org/cgit/musl/commit/src/regex/regexec.c?id=72ed3d47e567b1635a35d3c1d174c8a8b2787e30
2017-11-19 13:00:31 +00:00
rin
b259d3eb4b
Fix use of uninitialized value, taken from musl libc:
...
https://git.musl-libc.org/cgit/musl/commit/src/regex/regcomp.c?id=51eeb6ebc94d965768143c45e9f39b0a7998bdbd
2017-11-19 12:35:39 +00:00
rin
3e69e8b8e0
Check error code from allocating function, from musl libc:
...
https://git.musl-libc.org/cgit/musl/commit/src/regex/regcomp.c?id=4260dfe1ecc43d92d1e6d30daa0f22bd746d1740
2017-11-19 12:26:25 +00:00
rin
f6cec12c68
Fix allocation size with wrong use of sizeof, taken from musl libc:
...
https://git.musl-libc.org/cgit/musl/commit/src/regex/regcomp.c?id=1e81fa4524ecfd51e6a6578ff8038b4c05393101
2017-11-19 12:13:14 +00:00
rin
b62effec65
Add ChangeLog.old, which has been newly added to github repository.
2017-11-17 16:44:01 +00:00
rin
27e1684d1f
Add tre.pc to be installed into /usr/lib/pkgconfig (not yet).
2017-11-17 16:18:06 +00:00
rin
8da3505fc4
Regen. Actually stop using alloca(3).
2017-11-17 16:17:06 +00:00
rin
d8dd61809f
Disable tre_reg*b() when we don't have REG_USEBYTES.
2017-11-17 16:16:19 +00:00
rin
13498f309b
Merge tre as of 20171117.
2017-11-17 16:14:30 +00:00
rin
1580a27b92
Import tre from https://github.com/laurikari/tre as of 10171117:
...
- tre_reg*b() functions are added, that take bytes literally.
- minor bug fixes
2017-11-17 16:11:11 +00:00
rin
83236858b0
Add tre2netbsd script based on nvi2netbsd.
2017-11-17 16:08:20 +00:00
rin
27e310595e
Specify TRE_REGEX_T_FIELD in CPPFLAGS when we want ABI compatible with libc,
...
in a similar manner to TRE_SYSTEM_REGEX_H_PATH and TRE_USE_SYSTEM_REGEX_H.
No binary changes.
2017-11-17 14:37:37 +00:00
rin
3a5fc74837
Fix cursor movement for the case of USE_WIDECHAR != "yes", where the argument
...
of INTISWIDE() is not evaluated.
2017-11-14 12:20:55 +00:00
rin
d3727deea0
Protect iconv stuffs by USE_WIDECHAR in addition to USE_ICONV.
2017-11-13 04:21:55 +00:00
rin
4a32e20dee
Sorry, remove illegal indents. Real fix for build with USE_WIDECHAR != "yes".
2017-11-13 04:09:41 +00:00
rin
66231ee6b4
- Add -Wno-unused and -Wno-unsequenced for gcc and clang, respectively.
...
This is because encoding conversion macros yield such like:
#define FILE2INT5(sp,buf,n,nlen,w,wlen) (w = n, wlen = nlen, 0)
- Silence gcc warnings on nonliteral arguments for snprintf(3) in v_increment.c,
that are overlooked for swprintf(3) in the case of USE_WIDECHAR == "yes".
2017-11-13 02:33:13 +00:00
rin
2b97f00020
Use mvwchgat(3), which is not a macro in general (and in our case).
2017-11-13 01:51:47 +00:00
rin
aee2cbfef0
Make sure to cast arguments of ISFOO and TOFOO macros into UCHAR_T.
2017-11-13 01:40:37 +00:00
rin
94d00a62d3
Use ISBLANK macro instead of isblank(3).
2017-11-13 01:37:48 +00:00
rin
0446123c92
Remove duplicate definition for ISUPPER.
...
No binary changes.
2017-11-13 01:34:59 +00:00
rin
ed21979a9e
Apply the previous fix to tre_regwexec().
2017-11-13 00:53:05 +00:00
christos
9b217b091f
check more eo, initialize shift, remove useless variable.
2017-11-12 20:56:37 +00:00
christos
ac02d96ecd
PR/52671: Ralph Geier, return the wide character when changing case (because
...
it could be wide).
2017-11-12 16:33:31 +00:00