summaryrefslogtreecommitdiff
path: root/usr/src/cmd/vgrind/regexp.c
diff options
context:
space:
mode:
authorDan McDonald <danmcd@joyent.com>2021-02-17 11:21:04 -0500
committerDan McDonald <danmcd@joyent.com>2021-02-17 11:21:04 -0500
commitc97a57dc5369ecd7d8da38559b01a3fae91e20d4 (patch)
tree99666d6c33a7205ea4479e4376cb2c503f2ce195 /usr/src/cmd/vgrind/regexp.c
parent708960ec010b67946164e0ce8a7d7a5047c98855 (diff)
parent569041adf8e01f8f57e8a53463ab4478ffd71ec0 (diff)
downloadillumos-joyent-c97a57dc5369ecd7d8da38559b01a3fae91e20d4.tar.gz
[illumos-gate merge]
commit 569041adf8e01f8f57e8a53463ab4478ffd71ec0 13546 svr4pkg: symbol 'eptnum' is multiply-defined commit 19a46add205c481c02687f802f63741bc0fd19ca 13537 ldap: multiply-defined symbols commit 1d4c48c4c76a8b6a9ab91af4f76ca68c6556ad61 13536 lp: symbol 'lp_alloc_fail_handler' is multiply-defined commit a6dda84350c269f3e2c54cc01367177554a7cbd8 13548 vgrind: multiply-defined symbols commit 2a6858720cb70fb5eaddbfe3512fe5b55bcaf594 13522 x86pi.so: multiply-defined symbols commit aeaf55833f532850471446fb8721ef54e0b9a36d 13516 loader.efi: efifb_mask_from_pixfmt is missing PixelBltOnly
Diffstat (limited to 'usr/src/cmd/vgrind/regexp.c')
-rw-r--r--usr/src/cmd/vgrind/regexp.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/usr/src/cmd/vgrind/regexp.c b/usr/src/cmd/vgrind/regexp.c
index 027cdc058c..4add5086cf 100644
--- a/usr/src/cmd/vgrind/regexp.c
+++ b/usr/src/cmd/vgrind/regexp.c
@@ -4,8 +4,6 @@
* specifies the terms and conditions for redistribution.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <ctype.h>
typedef int boolean;
@@ -25,7 +23,7 @@ static void expconv(void);
#define makelower(c) (isupper((c)) ? tolower((c)) : (c))
/* STRNCMP - like strncmp except that we convert the
- * first string to lower case before comparing
+ * first string to lower case before comparing
* if l_onecase is set.
*/
@@ -98,7 +96,7 @@ STRNCMP(char *s1, char *s2, int len)
#define SNEXT(A) (A+2+*(A+1)) /* character following the string */
/*
- * bit flags in the descriptor
+ * bit flags in the descriptor
*/
#define OPT 1
#define STR 2
@@ -160,8 +158,9 @@ expconv(void)
*cs = STR;
SCNT(cs) = 1;
ccre += 2;
- } else
+ } else {
SCNT(cs)++;
+ }
*ccre++ = c;
break;
@@ -173,7 +172,7 @@ expconv(void)
if (acs != NIL && acs != cs) {
do {
temp = OCNT(acs);
- OCNT(acs) = ccre - acs;
+ OCNT(acs) = ccre - acs;
acs -= temp;
} while (temp != 0);
acs = NIL;
@@ -185,7 +184,7 @@ expconv(void)
break;
}
break;
-
+
/* just put the symbol in */
case '^':
case '$':
@@ -206,7 +205,7 @@ expconv(void)
/* mark the last match sequence as optional */
case '?':
if (cs)
- *cs = *cs | OPT;
+ *cs = *cs | OPT;
break;
/* recurse and define a subexpression */
@@ -302,12 +301,12 @@ expconv(void)
* The irregular expression must be translated to internal form
* prior to calling this routine
*
- * The value returned is the pointer to the first non \a
+ * The value returned is the pointer to the first non \a
* character matched.
*/
-boolean _escaped; /* true if we are currently _escaped */
-char *Start; /* start of string */
+extern boolean _escaped; /* true if we are currently _escaped */
+extern char *Start; /* start of string */
char *
expmatch(char *s, char *re, char *mstring)
@@ -467,7 +466,7 @@ expmatch(char *s, char *re, char *mstring)
case 'e':
if (_escaped)
return(NIL);
- cs = MNEXT(cs);
+ cs = MNEXT(cs);
break;
/* match any number of tabs and spaces */
@@ -479,12 +478,12 @@ expmatch(char *s, char *re, char *mstring)
/* match, be happy */
matched = 1;
- cs = MNEXT(cs);
+ cs = MNEXT(cs);
} else if (*s == '\n' || *s == '\0') {
/* match, be happy */
matched = 1;
- cs = MNEXT(cs);
+ cs = MNEXT(cs);
} else if (*cs & ALT) {
/* try the next part */