summaryrefslogtreecommitdiff
path: root/libuxre
diff options
context:
space:
mode:
authorThomas Ulmer <thomasmulmer02@gmail.com>2026-06-23 21:34:41 -0700
committerThomas Ulmer <thomasmulmer02@gmail.com>2026-06-23 21:34:41 -0700
commit874d317334fae1ddce316f9b6f4d0ce4e434bf52 (patch)
tree929f924d3c3696d3aa9917aca0e7048bbe3e93e8 /libuxre
parent15bd7946cc838a3151c357e4b0bc1ab85eecda62 (diff)
heirloom vi fixes from arch AUR
Diffstat (limited to 'libuxre')
-rw-r--r--libuxre/CVS/Entries21
-rw-r--r--libuxre/CVS/Repository1
-rw-r--r--libuxre/CVS/Root1
l---------[-rw-r--r--]libuxre/Makefile13
-rw-r--r--libuxre/Makefile.mk32
-rw-r--r--libuxre/bracket.c14
-rw-r--r--libuxre/regcomp.c2
-rw-r--r--libuxre/regdfa.c2
-rw-r--r--libuxre/regerror.c5
-rw-r--r--libuxre/regnfa.c16
-rw-r--r--libuxre/stubs.c58
-rw-r--r--libuxre/wcharm.h4
12 files changed, 99 insertions, 70 deletions
diff --git a/libuxre/CVS/Entries b/libuxre/CVS/Entries
new file mode 100644
index 0000000..3d7a5f2
--- /dev/null
+++ b/libuxre/CVS/Entries
@@ -0,0 +1,21 @@
+/COPYING.LGPL/1.1.1.1/Sat Dec 4 13:51:20 2004//
+/Makefile.mk/1.2/Sun Jan 22 21:47:27 2006//
+/NOTES/1.1.1.1/Sat Dec 4 13:51:18 2004//
+/_collelem.c/1.1.1.1/Sat Dec 4 13:51:19 2004//
+/_collmult.c/1.1.1.1/Sat Dec 4 13:51:19 2004//
+/bracket.c/1.1.1.1/Sat Dec 4 13:51:19 2004//
+/colldata.h/1.1.1.1/Sat Dec 4 13:51:18 2004//
+/onefile.c/1.1.1.1/Sat Dec 4 13:51:19 2004//
+/re.h/1.2/Sun Feb 6 14:58:27 2005//
+/regcomp.c/1.1.1.1/Sat Dec 4 13:51:20 2004//
+/regdfa.c/1.1.1.1/Sat Dec 4 13:51:20 2004//
+/regdfa.h/1.1.1.1/Sat Dec 4 13:51:20 2004//
+/regerror.c/1.1.1.1/Sat Dec 4 13:51:19 2004//
+/regex.h/1.2/Sun Feb 6 14:58:27 2005//
+/regexec.c/1.2/Sun Feb 6 16:14:00 2005//
+/regfree.c/1.1.1.1/Sat Dec 4 13:51:20 2004//
+/regnfa.c/1.2/Sun Feb 6 14:58:27 2005//
+/regparse.c/1.1.1.1/Sat Dec 4 13:51:19 2004//
+/stubs.c/1.3/Sun Jun 26 18:52:43 2005//
+/wcharm.h/1.1.1.1/Sat Dec 4 13:51:19 2004//
+D
diff --git a/libuxre/CVS/Repository b/libuxre/CVS/Repository
new file mode 100644
index 0000000..9a6917a
--- /dev/null
+++ b/libuxre/CVS/Repository
@@ -0,0 +1 @@
+heirloom/libuxre
diff --git a/libuxre/CVS/Root b/libuxre/CVS/Root
new file mode 100644
index 0000000..9a7684b
--- /dev/null
+++ b/libuxre/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@heirloom.cvs.sourceforge.net:/cvsroot/heirloom
diff --git a/libuxre/Makefile b/libuxre/Makefile
index 46d7320..f568cf7 100644..120000
--- a/libuxre/Makefile
+++ b/libuxre/Makefile
@@ -1,12 +1 @@
-CFLAGS = $(COPT) $(RPMCFLAGS) -I.
-OBJS = bracket.o _collelem.o _collmult.o regcomp.o regdfa.o regerror.o regexec.o regfree.o regnfa.o regparse.o stubs.o
-
-.c.o: ; $(CC) $(CFLAGS) -c $<
-
-all: libuxre.a
-
-libuxre.a: $(OBJS)
- ar cr libuxre.a $(OBJS)
-
-clean:
- rm -f libuxre.a $(OBJS) core
+Makefile.mk \ No newline at end of file
diff --git a/libuxre/Makefile.mk b/libuxre/Makefile.mk
new file mode 100644
index 0000000..106e132
--- /dev/null
+++ b/libuxre/Makefile.mk
@@ -0,0 +1,32 @@
+all: libuxre.a
+
+#OBJ = bracket.o _collelem.o _collmult.o regcomp.o regdfa.o regerror.o \
+# regexec.o regfree.o regnfa.o regparse.o stubs.o
+
+OBJ = onefile.o regfree.o regerror.o
+
+libuxre.a: $(OBJ)
+ $(AR) crs $@ $(OBJ)
+
+.c.o:
+ $(CC) $(CFLAGS2) $(CPPFLAGS) $(XO5FL) $(IWCHAR) $(COPT) -I. -c $<
+
+install:
+
+clean:
+ rm -f libuxre.a $(OBJ) core log *~
+
+_collelem.o: colldata.h re.h regex.h wcharm.h
+_collmult.o: colldata.h re.h regex.h wcharm.h
+bracket.o: colldata.h re.h regex.h wcharm.h
+regcomp.o: colldata.h re.h regex.h wcharm.h
+regdfa.o: colldata.h regdfa.h re.h regex.h wcharm.h
+regerror.o: colldata.h re.h regex.h wcharm.h
+regexec.o: colldata.h re.h regex.h wcharm.h
+regfree.o: colldata.h re.h regex.h wcharm.h
+regnfa.o: colldata.h re.h regex.h wcharm.h
+regparse.o: colldata.h re.h regex.h wcharm.h
+stubs.o: colldata.h wcharm.h
+onefile.o: _collelem.c _collmult.c bracket.c regcomp.c regdfa.c regexec.c
+onefile.o: regfree.c regnfa.c regparse.c stubs.c
+MRPROPER = libuxre.a
diff --git a/libuxre/bracket.c b/libuxre/bracket.c
index bc31b23..cb8db72 100644
--- a/libuxre/bracket.c
+++ b/libuxre/bracket.c
@@ -130,6 +130,7 @@ place(Bracket *bp, wchar_t wc, w_type prev, int mb_cur_max)
CollElem spare;
int ret;
+ (void)mb_cur_max;
if ((cep = libuxre_collelem(bp->col, &spare, wc)) != ELEM_ENCODED)
{
if (cep == ELEM_BADCHAR)
@@ -338,7 +339,7 @@ eqcls(Bracket *bp, const unsigned char *s, int n, w_type prev, int mb_cur_max)
* Permit ranges up to the first and
* after the last.
*/
- if (prev > 0 && prev != cep->weight[0]
+ if (prev > 0 && (unsigned)prev != cep->weight[0]
&& (prev = addrange(bp,
cep->weight[0], prev)) != 0)
{
@@ -426,7 +427,7 @@ LIBUXRE_STATIC int
libuxre_bktmbcomp(Bracket *bp, const unsigned char *pat0,
int flags, int mb_cur_max)
{
- static const Bracket zero = {0};
+ static const Bracket zero;
const unsigned char *pat = pat0;
struct lc_collate *savecol;
w_type n, wc, prev = 0;
@@ -709,11 +710,12 @@ libuxre_bktmbexec(Bracket *bp, wchar_t wc,
}
for (;;)
{
- if (iswctype(mb_cur_max==1?btowc(wc):wc, *wctp))
+ if (iswctype(mb_cur_max == 1 ? btowc(wc)
+ : (wint_t)wc, *wctp))
goto match;
if (wc != mcbuf.ch &&
- iswctype(mb_cur_max==1?btowc(mcbuf.ch):mcbuf.ch,
- *wctp))
+ iswctype(mb_cur_max == 1 ? btowc(mcbuf.ch)
+ : (wint_t)mcbuf.ch, *wctp))
goto match;
if (--i == 0)
break;
@@ -801,7 +803,7 @@ libuxre_bktmbexec(Bracket *bp, wchar_t wc,
mcbuf.wc = mcbuf.cep->weight[1];
for (;;)
{
- if (mcbuf.wc == *wucp)
+ if ((wuchar_type)mcbuf.wc == *wucp)
goto match;
if (--i == 0)
break;
diff --git a/libuxre/regcomp.c b/libuxre/regcomp.c
index 20a197d..4f6eb8c 100644
--- a/libuxre/regcomp.c
+++ b/libuxre/regcomp.c
@@ -52,7 +52,7 @@ regcomp(regex_t *ep, const char *pat, int flags)
* doesn't, libuxre_regnfacomp() must be called first, if both are to
* be called.
*/
- if (ep->re_nsub != 0 && (flags & (REG_NOSUB | REG_ONESUB)) == 0
+ if ((ep->re_nsub != 0 && (flags & (REG_NOSUB | REG_ONESUB)) == 0)
|| lex.flags & REG_NFA)
{
ep->re_flags |= REG_NFA;
diff --git a/libuxre/regdfa.c b/libuxre/regdfa.c
index 8142e8d..d4daa17 100644
--- a/libuxre/regdfa.c
+++ b/libuxre/regdfa.c
@@ -457,7 +457,7 @@ addstate(Dfa *dp) /* install state if unique; return its index */
fp = dp->sigfoll;
if ((n = dp->nset) > dp->avail) /* grow strip */
{
- i = dp->avail + n << 1;
+ i = (dp->avail + n) << 1;
if ((fp = realloc(fp, sizeof(size_t) * (i + dp->used))) == 0)
return 0;
dp->avail = i;
diff --git a/libuxre/regerror.c b/libuxre/regerror.c
index 397e3e5..c6958d8 100644
--- a/libuxre/regerror.c
+++ b/libuxre/regerror.c
@@ -69,19 +69,16 @@ regerror(int err, const regex_t *ep, char *str, size_t max)
};
const char *p;
size_t len;
- int i;
+ (void)ep;
if (err < REG_ENOSYS || REG_ILLSEQ < err)
{
- i = unk.index;
p = unk.str;
}
else
{
- i = msgs[err - REG_ENOSYS].index;
p = msgs[err - REG_ENOSYS].str;
}
-/* p = __gtxt(_str_uxlibc, i, p); */
len = strlen(p) + 1;
if (max != 0)
{
diff --git a/libuxre/regnfa.c b/libuxre/regnfa.c
index 6953f1f..40a59eb 100644
--- a/libuxre/regnfa.c
+++ b/libuxre/regnfa.c
@@ -607,7 +607,7 @@ casecmp(const Uchar *s, Exec *xp, ssize_t i, ssize_t n, int mb_cur_max)
w_type wc1, wc2;
int k;
- if (strncmp((char *)s, (char *)p, n) == 0) /* try for exact match */
+ if (strncmp((const char *)s, (const char *)p, n) == 0) /* try for exact match */
return 1;
if ((xp->flags & REG_ICASE) == 0)
return 0;
@@ -808,7 +808,7 @@ libuxre_regnfaexec(Nfa *np, Exec *xp)
if (gp->op != wc)
{
if ((xp->flags & REG_ICASE) == 0
- || gp->op != to_lower(wc))
+ || (wint_t)gp->op != to_lower(wc))
{
goto failed;
}
@@ -850,18 +850,18 @@ libuxre_regnfaexec(Nfa *np, Exec *xp)
w_type pwc;
if (wc != '_' &&
- !iswalnum(mb_cur_max == 1 ? btowc(wc) : wc))
+ !iswalnum(mb_cur_max == 1 ? btowc(wc) : (wint_t)wc))
goto failed;
if (!ISONEBYTE(pwc = *s2))
libuxre_mb2wc(&pwc, &s2[1]);
if (pwc == '_' ||
- iswalnum(mb_cur_max== 1 ? btowc(pwc) : pwc))
+ iswalnum(mb_cur_max== 1 ? btowc(pwc) : (wint_t)pwc))
goto failed;
}
goto tonext;
case ROP_GT:
if (wc == '_' ||
- iswalnum(mb_cur_max == 1 ? btowc(wc) : wc))
+ iswalnum(mb_cur_max == 1 ? btowc(wc) : (wint_t)wc))
goto failed;
goto tonext;
case ROP_BKT:
@@ -895,7 +895,7 @@ libuxre_regnfaexec(Nfa *np, Exec *xp)
goto tonext;
if (casecmp(s1, xp, n, len, mb_cur_max) == 0)
goto failed;
- if ((n = s - s1) >= len)
+ if ((ssize_t)(n = s - s1) >= len)
goto nextwc;
n = len - n;
goto spin;
@@ -922,7 +922,7 @@ libuxre_regnfaexec(Nfa *np, Exec *xp)
* Note the left-most match that's longest.
*/
n = cp->rm[0].rm_so;
- if (rmso < 0 || n < rmso)
+ if (rmso < 0 || (ssize_t)n < rmso)
{
rmso = n;
record:;
@@ -930,7 +930,7 @@ libuxre_regnfaexec(Nfa *np, Exec *xp)
xp->nmatch * sizeof(regmatch_t));
goto failed;
}
- if (rmso < n || xp->match[0].rm_eo > cp->rm[0].rm_eo)
+ if (rmso < (ssize_t)n || xp->match[0].rm_eo > cp->rm[0].rm_eo)
goto failed;
if (xp->match[0].rm_eo < cp->rm[0].rm_eo)
goto record;
diff --git a/libuxre/stubs.c b/libuxre/stubs.c
index bd670db..cbc1028 100644
--- a/libuxre/stubs.c
+++ b/libuxre/stubs.c
@@ -1,7 +1,7 @@
/*
* Changes by Gunnar Ritter, Freiburg i. Br., Germany, November 2002.
*
- * Sccsid @(#)stubs.c 1.24 (gritter) 10/12/04
+ * Sccsid @(#)stubs.c 1.27 (gritter) 6/26/05
*/
/* UNIX(R) Regular Expresssion Library
*
@@ -31,8 +31,9 @@
struct lc_collate *
libuxre_lc_collate(struct lc_collate *cp)
{
- static struct lc_collate curinfo = {0}; /* means CHF_ENCODED */
+ static struct lc_collate curinfo; /* means CHF_ENCODED */
+ (void)cp;
return &curinfo;
}
@@ -53,45 +54,30 @@ libuxre_mb2wc(w_type *wt, const unsigned char *s)
return len > 0 ? len - 1 : len;
}
-#if __GNUC__ >= 3 && __GNUC_MINOR__ >= 4
+#if __GNUC__ >= 3 && __GNUC_MINOR__ >= 4 || __GNUC__ >= 4
#define USED __attribute__ ((used))
#elif defined __GNUC__
#define USED __attribute__ ((unused))
#else
#define USED
#endif
-static const char sccsid[] USED = "@(#)libuxre.sl 1.24 (gritter) 10/12/04";
+static const char sccsid[] USED = "@(#)libuxre.sl 1.27 (gritter) 6/26/05";
+/* SLIST */
/*
-_collelem.c:
- _collelem.c 1.4 (gritter) 10/18/03
-_collmult.c:
- _collmult.c 1.4 (gritter) 9/22/03
-bracket.c:
- bracket.c 1.14 (gritter) 10/18/03
-colldata.h:
- colldata.h 1.4 (gritter) 10/18/03
-onefile.c:
- onefile.c 1.1 (gritter) 9/22/03
-re.h:
- re.h 1.14 (gritter) 10/18/03
-regcomp.c:
- regcomp.c 1.6 (gritter) 9/22/03
-regdfa.c:
- regdfa.c 1.9 (gritter) 9/22/03
-regdfa.h:
- regdfa.h 1.3 (gritter) 9/22/03
-regerror.c:
- regerror.c 1.4 (gritter) 3/29/03
-regex.h:
- regex.h 1.12 (gritter) 9/22/03
-regexec.c:
- regexec.c 1.6 (gritter) 9/22/03
-regfree.c:
- regfree.c 1.3 (gritter) 9/22/03
-regnfa.c:
- regnfa.c 1.7 (gritter) 9/22/03
-regparse.c:
- regparse.c 1.12 (gritter) 9/22/03
-wcharm.h:
- wcharm.h 1.12 (gritter) 10/18/03
+_collelem.c: * Sccsid @(#)_collelem.c 1.4 (gritter) 10/18/03
+_collmult.c: * Sccsid @(#)_collmult.c 1.4 (gritter) 9/22/03
+bracket.c: * Sccsid @(#)bracket.c 1.14 (gritter) 10/18/03
+colldata.h: * Sccsid @(#)colldata.h 1.5 (gritter) 5/1/04
+onefile.c: * Sccsid @(#)onefile.c 1.1 (gritter) 9/22/03
+re.h: * Sccsid @(#)re.h 1.15 (gritter) 2/6/05
+regcomp.c: * Sccsid @(#)regcomp.c 1.6 (gritter) 9/22/03
+regdfa.c: * Sccsid @(#)regdfa.c 1.9 (gritter) 9/22/03
+regdfa.h: * Sccsid @(#)regdfa.h 1.3 (gritter) 9/22/03
+regerror.c: * Sccsid @(#)regerror.c 1.4 (gritter) 3/29/03
+regex.h: * Sccsid @(#)regex.h 1.13 (gritter) 2/6/05
+regexec.c: * Sccsid @(#)regexec.c 1.7 (gritter) 2/6/05
+regfree.c: * Sccsid @(#)regfree.c 1.3 (gritter) 9/22/03
+regnfa.c: * Sccsid @(#)regnfa.c 1.8 (gritter) 2/6/05
+regparse.c: * Sccsid @(#)regparse.c 1.12 (gritter) 9/22/03
+wcharm.h: * Sccsid @(#)wcharm.h 1.12 (gritter) 10/18/03
*/
diff --git a/libuxre/wcharm.h b/libuxre/wcharm.h
index 8985d6b..9df1e8b 100644
--- a/libuxre/wcharm.h
+++ b/libuxre/wcharm.h
@@ -55,8 +55,8 @@ typedef int w_type;
#define ISONEBYTE(ch) (((ch) & 0200) == 0 || mb_cur_max == 1)
-#define to_lower(ch) (mb_cur_max > 1 ? towlower(ch) : tolower(ch))
-#define to_upper(ch) (mb_cur_max > 1 ? towupper(ch) : toupper(ch))
+#define to_lower(ch) (mb_cur_max > 1 ? towlower(ch) : (wint_t)tolower(ch))
+#define to_upper(ch) (mb_cur_max > 1 ? towupper(ch) : (wint_t)toupper(ch))
LIBUXRE_STATIC int libuxre_mb2wc(w_type *, const unsigned char *);