FreeBSD Bugzilla – Attachment 177332 Details for
Bug 214783
[patch] awk(1) POSIX character classes never match backslash
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to escape chars in POSIX character classes
awk-posix-relex.patch (text/plain), 673 bytes, created by
martin
on 2016-11-23 14:00:33 UTC
(
hide
)
Description:
Patch to escape chars in POSIX character classes
Filename:
MIME Type:
Creator:
martin
Created:
2016-11-23 14:00:33 UTC
Size:
673 bytes
patch
obsolete
>--- contrib/one-true-awk/b.c.orig 2014-11-11 20:01:20.000000000 +0000 >+++ contrib/one-true-awk/b.c 2016-11-23 13:47:00.553302112 +0000 >@@ -842,9 +842,12 @@ > prestr[2 + cc->cc_namelen] == ']') { > prestr += cc->cc_namelen + 3; > for (i = 0; i < NCHARS; i++) { >- if (!adjbuf((char **) &buf, &bufsz, bp-buf+1, 100, (char **) &bp, "relex2")) >+ if (!adjbuf((char **) &buf, &bufsz, bp-buf+2, 100, (char **) &bp, "relex2")) > FATAL("out of space for reg expr %.10s...", lastre); > if (cc->cc_func(i)) { >+ if (i == '\\' || i == '-') { /* escape for cclenter */ >+ *bp++ = '\\'; >+ } > *bp++ = i; > n++; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 214783
: 177332