Skip to content

Commit

Permalink
The regex library got some updates so let's chase them.
Browse files Browse the repository at this point in the history
Ed itself did not get any updates.
  • Loading branch information
ibara committed Jan 5, 2021
1 parent c8d7a1e commit 54f06e1
Show file tree
Hide file tree
Showing 9 changed files with 102 additions and 244 deletions.
20 changes: 10 additions & 10 deletions CVS/Entries
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
/buf.c/1.24/Sat Dec 21 21:51:59 2019//
D/USD.doc////
D/test////
/Makefile/1.12/Fri May 22 22:22:54 2020//
/POSIX/1.8/Fri May 22 22:22:48 2020//
/README/1.5/Fri May 22 22:22:54 2020//
/ed.1/1.75/Fri May 22 22:22:48 2020//
/ed.h/1.22/Fri May 22 22:22:48 2020//
/glbl.c/1.20/Fri May 22 22:22:48 2020//
/io.c/1.24/Fri May 22 22:22:48 2020//
/re.c/1.19/Fri May 22 22:22:48 2020//
/sub.c/1.18/Fri May 22 22:22:48 2020//
/undo.c/1.14/Fri May 22 22:22:48 2020//
/Makefile/1.12/Tue Jan 5 23:15:24 2021//
/POSIX/1.8/Tue Jan 5 23:11:26 2021//
/README/1.5/Tue Jan 5 23:15:24 2021//
/ed.1/1.75/Tue Jan 5 23:11:26 2021//
/ed.h/1.22/Tue Jan 5 23:11:26 2021//
/glbl.c/1.20/Tue Jan 5 23:11:26 2021//
/io.c/1.24/Tue Jan 5 23:11:26 2021//
/re.c/1.19/Tue Jan 5 23:11:26 2021//
/sub.c/1.18/Tue Jan 5 23:11:26 2021//
/undo.c/1.14/Tue Jan 5 23:11:26 2021//
42 changes: 17 additions & 25 deletions cclass.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: cclass.h,v 1.5 2003/06/02 20:18:36 millert Exp $ */
/* $OpenBSD: cclass.h,v 1.7 2020/12/30 08:54:42 tb Exp $ */

/*-
* Copyright (c) 1992, 1993, 1994 Henry Spencer.
Expand Down Expand Up @@ -36,33 +36,25 @@
*/

/* character-class table */
static struct cclass {
char *name;
char *chars;
char *multis;
static const struct cclass {
const char *name;
const char *chars;
} cclasses[] = {
{ "alnum", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
0123456789", ""} ,
{ "alpha", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
""} ,
{ "blank", " \t", ""} ,
0123456789" },
{ "alpha", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" },
{ "blank", " \t" },
{ "cntrl", "\007\b\t\n\v\f\r\1\2\3\4\5\6\16\17\20\21\22\23\24\
\25\26\27\30\31\32\33\34\35\36\37\177", ""} ,
{ "digit", "0123456789", ""} ,
\25\26\27\30\31\32\33\34\35\36\37\177" },
{ "digit", "0123456789" },
{ "graph", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
""} ,
{ "lower", "abcdefghijklmnopqrstuvwxyz",
""} ,
0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~" },
{ "lower", "abcdefghijklmnopqrstuvwxyz" },
{ "print", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ ",
""} ,
{ "punct", "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
""} ,
{ "space", "\t\n\v\f\r ", ""} ,
{ "upper", "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
""} ,
{ "xdigit", "0123456789ABCDEFabcdef",
""} ,
{ NULL, 0, "" }
0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ " },
{ "punct", "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~" },
{ "space", "\t\n\v\f\r " },
{ "upper", "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
{ "xdigit", "0123456789ABCDEFabcdef" },
{ NULL, 0 }
};
6 changes: 3 additions & 3 deletions cname.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: cname.h,v 1.5 2003/06/02 20:18:36 millert Exp $ */
/* $OpenBSD: cname.h,v 1.6 2020/12/30 08:53:30 tb Exp $ */

/*-
* Copyright (c) 1992, 1993, 1994 Henry Spencer.
Expand Down Expand Up @@ -36,8 +36,8 @@
*/

/* character-name table */
static struct cname {
char *name;
static const struct cname {
const char *name;
char code;
} cnames[] = {
{ "NUL", '\0' },
Expand Down
4 changes: 2 additions & 2 deletions engine.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: engine.c,v 1.25 2018/07/11 12:38:46 martijn Exp $ */
/* $OpenBSD: engine.c,v 1.26 2020/12/28 21:41:55 millert Exp $ */

/*-
* Copyright (c) 1992, 1993, 1994 Henry Spencer.
Expand Down Expand Up @@ -935,7 +935,7 @@ step(struct re_guts *g,
OP(s = g->strip[pc+look]) != O_CH;
look += OPND(s))
assert(OP(s) == OOR2);
FWD(aft, aft, look);
FWD(aft, aft, look + 1);
}
break;
case OOR2: /* propagate OCH_'s marking */
Expand Down
Loading

0 comments on commit 54f06e1

Please sign in to comment.