Fixes for ISO C89
This commit is contained in:
parent
5cc4591ae7
commit
2ded25d138
3 changed files with 4 additions and 3 deletions
|
|
@ -955,6 +955,7 @@ int yylex(void) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* SWIG directives */
|
/* SWIG directives */
|
||||||
|
String *stext = 0;
|
||||||
if (strcmp(yytext, "%module") == 0)
|
if (strcmp(yytext, "%module") == 0)
|
||||||
return (MODULE);
|
return (MODULE);
|
||||||
if (strcmp(yytext, "%insert") == 0)
|
if (strcmp(yytext, "%insert") == 0)
|
||||||
|
|
@ -1041,7 +1042,7 @@ int yylex(void) {
|
||||||
* the operator.
|
* the operator.
|
||||||
*/
|
*/
|
||||||
cparse_unknown_directive = NewString(yytext);
|
cparse_unknown_directive = NewString(yytext);
|
||||||
String *stext = NewString(yytext + 1);
|
stext = NewString(yytext + 1);
|
||||||
Seek(stext,0,SEEK_SET);
|
Seek(stext,0,SEEK_SET);
|
||||||
Setfile(stext,cparse_file);
|
Setfile(stext,cparse_file);
|
||||||
Setline(stext,cparse_line);
|
Setline(stext,cparse_line);
|
||||||
|
|
|
||||||
|
|
@ -1101,6 +1101,7 @@ static int name_regexmatch_value(Node *n, String *pattern, String *s) {
|
||||||
int errornum;
|
int errornum;
|
||||||
size_t errpos;
|
size_t errpos;
|
||||||
int rc;
|
int rc;
|
||||||
|
pcre2_match_data *match_data = 0;
|
||||||
|
|
||||||
compiled_pat = pcre2_compile((PCRE2_SPTR8)Char(pattern), PCRE2_ZERO_TERMINATED, 0, &errornum, &errpos, NULL);
|
compiled_pat = pcre2_compile((PCRE2_SPTR8)Char(pattern), PCRE2_ZERO_TERMINATED, 0, &errornum, &errpos, NULL);
|
||||||
if (!compiled_pat) {
|
if (!compiled_pat) {
|
||||||
|
|
@ -1111,7 +1112,6 @@ static int name_regexmatch_value(Node *n, String *pattern, String *s) {
|
||||||
Exit(EXIT_FAILURE);
|
Exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
pcre2_match_data *match_data = 0;
|
|
||||||
match_data = pcre2_match_data_create_from_pattern (compiled_pat, NULL);
|
match_data = pcre2_match_data_create_from_pattern (compiled_pat, NULL);
|
||||||
rc = pcre2_match(compiled_pat, (PCRE2_SPTR8)Char(s), PCRE2_ZERO_TERMINATED, 0, 0, match_data, 0);
|
rc = pcre2_match(compiled_pat, (PCRE2_SPTR8)Char(s), PCRE2_ZERO_TERMINATED, 0, 0, match_data, 0);
|
||||||
pcre2_code_free(compiled_pat);
|
pcre2_code_free(compiled_pat);
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,7 @@ static void print_indent(int l) {
|
||||||
void Swig_print_node(Node *obj) {
|
void Swig_print_node(Node *obj) {
|
||||||
Iterator ki;
|
Iterator ki;
|
||||||
Node *cobj;
|
Node *cobj;
|
||||||
|
List *keys = Keys(obj);
|
||||||
|
|
||||||
print_indent(0);
|
print_indent(0);
|
||||||
if (debug_quiet)
|
if (debug_quiet)
|
||||||
|
|
@ -87,7 +88,6 @@ void Swig_print_node(Node *obj) {
|
||||||
else
|
else
|
||||||
Printf(stdout, "+++ %s - %p ----------------------------------------\n", nodeType(obj), obj);
|
Printf(stdout, "+++ %s - %p ----------------------------------------\n", nodeType(obj), obj);
|
||||||
|
|
||||||
List *keys = Keys(obj);
|
|
||||||
SortList(keys, 0);
|
SortList(keys, 0);
|
||||||
ki = First(keys);
|
ki = First(keys);
|
||||||
while (ki.item) {
|
while (ki.item) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue