summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2021-01-02 20:42:02 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2021-01-02 20:42:02 +0000
commitc797c0ece9deac4f9847b9d99e980f6825459240 (patch)
tree43088d3f2842605c4521317edbd78294c34736df
parentee592ec268059c4cd41bcd0e069b5074528e202a (diff)
Remove two now-unused functions; a result of the categories removal.
From miod@, OK tb@
-rw-r--r--lib/libc/regex/regcomp.c41
1 files changed, 2 insertions, 39 deletions
diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c
index b5c0c32afe7..c41970223f1 100644
--- a/lib/libc/regex/regcomp.c
+++ b/lib/libc/regex/regcomp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: regcomp.c,v 1.41 2020/12/31 17:24:05 millert Exp $ */
+/* $OpenBSD: regcomp.c,v 1.42 2021/01/02 20:42:01 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994 Henry Spencer.
* Copyright (c) 1992, 1993, 1994
@@ -90,8 +90,6 @@ static void freeset(struct parse *, cset *);
static int freezeset(struct parse *, cset *);
static int firstch(struct parse *, cset *);
static int nch(struct parse *, cset *);
-static int isinsets(struct re_guts *, int);
-static int samesets(struct re_guts *, int, int);
static sopno dupl(struct parse *, sopno, sopno);
static void doemit(struct parse *, sop, size_t);
static void doinsert(struct parse *, sop, size_t, sopno);
@@ -1148,41 +1146,6 @@ nch(struct parse *p, cset *cs)
}
/*
- - isinsets - is this character in any sets?
- */
-static int /* predicate */
-isinsets(struct re_guts *g, int c)
-{
- uch *col;
- int i;
- int ncols = (g->ncsets+(CHAR_BIT-1)) / CHAR_BIT;
- unsigned uc = (uch)c;
-
- for (i = 0, col = g->setbits; i < ncols; i++, col += g->csetsize)
- if (col[uc] != 0)
- return(1);
- return(0);
-}
-
-/*
- - samesets - are these two characters in exactly the same sets?
- */
-static int /* predicate */
-samesets(struct re_guts *g, int c1, int c2)
-{
- uch *col;
- int i;
- int ncols = (g->ncsets+(CHAR_BIT-1)) / CHAR_BIT;
- unsigned uc1 = (uch)c1;
- unsigned uc2 = (uch)c2;
-
- for (i = 0, col = g->setbits; i < ncols; i++, col += g->csetsize)
- if (col[uc1] != col[uc2])
- return(0);
- return(1);
-}
-
-/*
- dupl - emit a duplicate of a bunch of sops
*/
static sopno /* start of duplicate */
@@ -1394,7 +1357,7 @@ findmust(struct parse *p, struct re_guts *g)
*cp++ = (char)OPND(s);
}
assert(cp == g->must + g->mlen);
- *cp++ = '\0'; /* just on general principles */
+ *cp = '\0'; /* just on general principles */
}
/*