Add braces in initializers.
Fix RCSID's Remove unused variables
This commit is contained in:
parent
3127e6a7cf
commit
05e3795ec8
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: regerror.c,v 1.5 1997/01/23 14:02:12 mrg Exp $ */
|
||||
/* $NetBSD: regerror.c,v 1.6 1997/07/13 20:05:37 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993, 1994 Henry Spencer.
|
||||
@ -39,11 +39,12 @@
|
||||
* @(#)regerror.c 8.4 (Berkeley) 3/20/94
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)regerror.c 8.4 (Berkeley) 3/20/94";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: regerror.c,v 1.5 1997/01/23 14:02:12 mrg Exp $";
|
||||
__RCSID("$NetBSD: regerror.c,v 1.6 1997/07/13 20:05:37 christos Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
@ -94,23 +95,23 @@ static struct rerr {
|
||||
char *name;
|
||||
char *explain;
|
||||
} rerrs[] = {
|
||||
REG_NOMATCH, "REG_NOMATCH", "regexec() failed to match",
|
||||
REG_BADPAT, "REG_BADPAT", "invalid regular expression",
|
||||
REG_ECOLLATE, "REG_ECOLLATE", "invalid collating element",
|
||||
REG_ECTYPE, "REG_ECTYPE", "invalid character class",
|
||||
REG_EESCAPE, "REG_EESCAPE", "trailing backslash (\\)",
|
||||
REG_ESUBREG, "REG_ESUBREG", "invalid backreference number",
|
||||
REG_EBRACK, "REG_EBRACK", "brackets ([ ]) not balanced",
|
||||
REG_EPAREN, "REG_EPAREN", "parentheses not balanced",
|
||||
REG_EBRACE, "REG_EBRACE", "braces not balanced",
|
||||
REG_BADBR, "REG_BADBR", "invalid repetition count(s)",
|
||||
REG_ERANGE, "REG_ERANGE", "invalid character range",
|
||||
REG_ESPACE, "REG_ESPACE", "out of memory",
|
||||
REG_BADRPT, "REG_BADRPT", "repetition-operator operand invalid",
|
||||
REG_EMPTY, "REG_EMPTY", "empty (sub)expression",
|
||||
REG_ASSERT, "REG_ASSERT", "\"can't happen\" -- you found a bug",
|
||||
REG_INVARG, "REG_INVARG", "invalid argument to regex routine",
|
||||
0, "", "*** unknown regexp error code ***",
|
||||
{ REG_NOMATCH, "REG_NOMATCH", "regexec() failed to match" },
|
||||
{ REG_BADPAT, "REG_BADPAT", "invalid regular expression" },
|
||||
{ REG_ECOLLATE, "REG_ECOLLATE", "invalid collating element" },
|
||||
{ REG_ECTYPE, "REG_ECTYPE", "invalid character class" },
|
||||
{ REG_EESCAPE, "REG_EESCAPE", "trailing backslash (\\)" },
|
||||
{ REG_ESUBREG, "REG_ESUBREG", "invalid backreference number" },
|
||||
{ REG_EBRACK, "REG_EBRACK", "brackets ([ ]) not balanced" },
|
||||
{ REG_EPAREN, "REG_EPAREN", "parentheses not balanced" },
|
||||
{ REG_EBRACE, "REG_EBRACE", "braces not balanced" },
|
||||
{ REG_BADBR, "REG_BADBR", "invalid repetition count(s)" },
|
||||
{ REG_ERANGE, "REG_ERANGE", "invalid character range" },
|
||||
{ REG_ESPACE, "REG_ESPACE", "out of memory" },
|
||||
{ REG_BADRPT, "REG_BADRPT", "repetition-operator operand invalid" },
|
||||
{ REG_EMPTY, "REG_EMPTY", "empty (sub)expression" },
|
||||
{ REG_ASSERT, "REG_ASSERT", "\"can't happen\" -- you found a bug" },
|
||||
{ REG_INVARG, "REG_INVARG", "invalid argument to regex routine" },
|
||||
{ 0, "", "*** unknown regexp error code ***" }
|
||||
};
|
||||
|
||||
/*
|
||||
@ -169,8 +170,6 @@ char *localbuf;
|
||||
int buflen;
|
||||
{
|
||||
register struct rerr *r;
|
||||
register size_t siz;
|
||||
register char *p;
|
||||
|
||||
for (r = rerrs; r->code != 0; r++)
|
||||
if (strcmp(r->name, preg->re_endp) == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user