]> git.saurik.com Git - wxWidgets.git/commitdiff
more warning fixes
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 13 Jul 2001 14:13:20 +0000 (14:13 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 13 Jul 2001 14:13:20 +0000 (14:13 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/regex/cclass.h
src/regex/cname.h
src/regex/regcomp.c
src/regex/regcomp.ih

index 0c293028e9d52ecc2c88d20348a5141be2f4a8d8..757cdb88c5b5dc687f328888b6b571f03fed919f 100644 (file)
@@ -4,28 +4,28 @@ static struct cclass {
        char *chars;
        char *multis;
 } cclasses[] = {
-       "alnum",        "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
-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",   "",
-       "graph",        "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
-0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
-                                       "",
-       "lower",        "abcdefghijklmnopqrstuvwxyz",
-                                       "",
-       "print",        "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
-0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ ",
-                                       "",
-       "punct",        "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
-                                       "",
-       "space",        "\t\n\v\f\r ",  "",
-       "upper",        "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
-                                       "",
-       "xdigit",       "0123456789ABCDEFabcdef",
-                                       "",
-       NULL,           0,              ""
+       { "alnum",      "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
+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",   "" },
+       { "graph",      "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
+0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~" },
+       {                               "" },
+       { "lower",      "abcdefghijklmnopqrstuvwxyz" },
+       {                               "" },
+       { "print",      "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
+0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ " },
+       {                               "" },
+       { "punct",      "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~" },
+       {                               "" },
+       { "space",      "\t\n\v\f\r ",  "" },
+       { "upper",      "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
+       {                               "" },
+       { "xdigit",     "0123456789ABCDEFabcdef" },
+       {                               "" },
+       { NULL,         0,              "" }
 };
index 02e86e912e3d7ece4ca8995bcb3e7366208b43f9..c1a6dd5656b065442f5f4b364831e1e6ef93a588 100644 (file)
@@ -3,100 +3,100 @@ static struct cname {
        char *name;
        char code;
 } cnames[] = {
-       "NUL",  '\0',
-       "SOH",  '\001',
-       "STX",  '\002',
-       "ETX",  '\003',
-       "EOT",  '\004',
-       "ENQ",  '\005',
-       "ACK",  '\006',
-       "BEL",  '\007',
-       "alert",        '\007',
-       "BS",           '\010',
-       "backspace",    '\b',
-       "HT",           '\011',
-       "tab",          '\t',
-       "LF",           '\012',
-       "newline",      '\n',
-       "VT",           '\013',
-       "vertical-tab", '\v',
-       "FF",           '\014',
-       "form-feed",    '\f',
-       "CR",           '\015',
-       "carriage-return",      '\r',
-       "SO",   '\016',
-       "SI",   '\017',
-       "DLE",  '\020',
-       "DC1",  '\021',
-       "DC2",  '\022',
-       "DC3",  '\023',
-       "DC4",  '\024',
-       "NAK",  '\025',
-       "SYN",  '\026',
-       "ETB",  '\027',
-       "CAN",  '\030',
-       "EM",   '\031',
-       "SUB",  '\032',
-       "ESC",  '\033',
-       "IS4",  '\034',
-       "FS",   '\034',
-       "IS3",  '\035',
-       "GS",   '\035',
-       "IS2",  '\036',
-       "RS",   '\036',
-       "IS1",  '\037',
-       "US",   '\037',
-       "space",                ' ',
-       "exclamation-mark",     '!',
-       "quotation-mark",       '"',
-       "number-sign",          '#',
-       "dollar-sign",          '$',
-       "percent-sign",         '%',
-       "ampersand",            '&',
-       "apostrophe",           '\'',
-       "left-parenthesis",     '(',
-       "right-parenthesis",    ')',
-       "asterisk",     '*',
-       "plus-sign",    '+',
-       "comma",        ',',
-       "hyphen",       '-',
-       "hyphen-minus", '-',
-       "period",       '.',
-       "full-stop",    '.',
-       "slash",        '/',
-       "solidus",      '/',
-       "zero",         '0',
-       "one",          '1',
-       "two",          '2',
-       "three",        '3',
-       "four",         '4',
-       "five",         '5',
-       "six",          '6',
-       "seven",        '7',
-       "eight",        '8',
-       "nine",         '9',
-       "colon",        ':',
-       "semicolon",    ';',
-       "less-than-sign",       '<',
-       "equals-sign",          '=',
-       "greater-than-sign",    '>',
-       "question-mark",        '?',
-       "commercial-at",        '@',
-       "left-square-bracket",  '[',
-       "backslash",            '\\',
-       "reverse-solidus",      '\\',
-       "right-square-bracket", ']',
-       "circumflex",           '^',
-       "circumflex-accent",    '^',
-       "underscore",           '_',
-       "low-line",             '_',
-       "grave-accent",         '`',
-       "left-brace",           '{',
-       "left-curly-bracket",   '{',
-       "vertical-line",        '|',
-       "right-brace",          '}',
-       "right-curly-bracket",  '}',
-       "tilde",                '~',
-       "DEL",  '\177',
-       NULL,   0,
+       { "NUL",        '\0' },
+       { "SOH",        '\001' },
+       { "STX",        '\002' },
+       { "ETX",        '\003' },
+       { "EOT",        '\004' },
+       { "ENQ",        '\005' },
+       { "ACK",        '\006' },
+       { "BEL",        '\007' },
+       { "alert",      '\007' },
+       { "BS",         '\010' },
+       { "backspace",  '\b' },
+       { "HT",         '\011' },
+       { "tab",                '\t' },
+       { "LF",         '\012' },
+       { "newline",    '\n' },
+       { "VT",         '\013' },
+       { "vertical-tab",       '\v' },
+       { "FF",         '\014' },
+       { "form-feed",  '\f' },
+       { "CR",         '\015' },
+       { "carriage-return",    '\r' },
+       { "SO", '\016' },
+       { "SI", '\017' },
+       { "DLE",        '\020' },
+       { "DC1",        '\021' },
+       { "DC2",        '\022' },
+       { "DC3",        '\023' },
+       { "DC4",        '\024' },
+       { "NAK",        '\025' },
+       { "SYN",        '\026' },
+       { "ETB",        '\027' },
+       { "CAN",        '\030' },
+       { "EM", '\031' },
+       { "SUB",        '\032' },
+       { "ESC",        '\033' },
+       { "IS4",        '\034' },
+       { "FS", '\034' },
+       { "IS3",        '\035' },
+       { "GS", '\035' },
+       { "IS2",        '\036' },
+       { "RS", '\036' },
+       { "IS1",        '\037' },
+       { "US", '\037' },
+       { "space",              ' ' },
+       { "exclamation-mark",   '!' },
+       { "quotation-mark",     '"' },
+       { "number-sign",                '#' },
+       { "dollar-sign",                '$' },
+       { "percent-sign",               '%' },
+       { "ampersand",          '&' },
+       { "apostrophe",         '\'' },
+       { "left-parenthesis",   '(' },
+       { "right-parenthesis",  ')' },
+       { "asterisk",   '*' },
+       { "plus-sign",  '+' },
+       { "comma",      ',' },
+       { "hyphen",     '-' },
+       { "hyphen-minus",       '-' },
+       { "period",     '.' },
+       { "full-stop",  '.' },
+       { "slash",      '/' },
+       { "solidus",    '/' },
+       { "zero",               '0' },
+       { "one",                '1' },
+       { "two",                '2' },
+       { "three",      '3' },
+       { "four",               '4' },
+       { "five",               '5' },
+       { "six",                '6' },
+       { "seven",      '7' },
+       { "eight",      '8' },
+       { "nine",               '9' },
+       { "colon",      ':' },
+       { "semicolon",  ';' },
+       { "less-than-sign",     '<' },
+       { "equals-sign",                '=' },
+       { "greater-than-sign",  '>' },
+       { "question-mark",      '?' },
+       { "commercial-at",      '@' },
+       { "left-square-bracket",        '[' },
+       { "backslash",          '\\' },
+       { "reverse-solidus",    '\\' },
+       { "right-square-bracket",       ']' },
+       { "circumflex",         '^' },
+       { "circumflex-accent",  '^' },
+       { "underscore",         '_' },
+       { "low-line",           '_' },
+       { "grave-accent",               '`' },
+       { "left-brace",         '{' },
+       { "left-curly-bracket", '{' },
+       { "vertical-line",      '|' },
+       { "right-brace",                '}' },
+       { "right-curly-bracket",        '}' },
+       { "tilde",              '~' },
+       { "DEL",        '\177' },
+       { NULL, 0 },
 };
index dc4860110995a274b63299c9deff341cedcfced2..8733e373f4713abb32fad017cf2f3b1be8440d4f 100644 (file)
@@ -51,7 +51,7 @@ static char nuls[10];         /* place to point scanner in event of error */
 #define        NEXTn(n)        (p->next += (n))
 #define        GETNEXT()       (*p->next++)
 #define        SETERROR(e)     seterr(p, (e))
-#define        REQUIRE(co, e)  ((co) || SETERROR(e))
+#define        REQUIRE(co, e)  ((void)((co) || SETERROR(e)))
 #define        MUSTSEE(c, e)   (REQUIRE(MORE() && PEEK() == (c), e))
 #define        MUSTEAT(c, e)   (REQUIRE(MORE() && GETNEXT() == (c), e))
 #define        MUSTNOTSEE(c, e)        (REQUIRE(!MORE() || PEEK() != (c), e))
@@ -1169,6 +1169,8 @@ register char *cp;
        cs->multis[cs->smultis - 1] = '\0';
 }
 
+/* these functions don't seem to be used (yet?), suppress warnings */
+#if 0
 /*
  - mcsub - subtract a collating element from a cset
  == static void mcsub(register cset *cs, register char *cp);
@@ -1226,6 +1228,7 @@ register char *cp;
                        return(p);
        return(NULL);
 }
+#endif /* 0 */
 
 /*
  - mcinvert - invert the list of collating elements in a cset
index 0776e7185cd97b54fa47b9545b0674ca3b4aa3aa..6efafebf6022f0c6114b07fd8c89df9b74659300 100644 (file)
@@ -28,9 +28,11 @@ static int freezeset(register struct parse *p, register cset *cs);
 static int firstch(register struct parse *p, register cset *cs);
 static int nch(register struct parse *p, register cset *cs);
 static void mcadd(register struct parse *p, register cset *cs, register char *cp);
+#if 0
 static void mcsub(register cset *cs, register char *cp);
 static int mcin(register cset *cs, register char *cp);
 static char *mcfind(register cset *cs, register char *cp);
+#endif
 static void mcinvert(register struct parse *p, register cset *cs);
 static void mccase(register struct parse *p, register cset *cs);
 static int isinsets(register struct re_guts *g, int c);