version 1.5, 2001/11/07 18:44:28 |
version 1.6, 2001/11/24 19:17:47 |
|
|
decls->decl = dec; |
decls->decl = dec; |
tailp = &decls->next; |
tailp = &decls->next; |
/* get args */ |
/* get args */ |
while(peekscan(TOK_COMMA, &tok)) { |
while (peekscan(TOK_COMMA, &tok)) { |
num_args++; |
num_args++; |
get_prog_declaration(&dec, DEF_STRUCT, |
get_prog_declaration(&dec, DEF_STRUCT, |
num_args); |
num_args); |
|
|
cases->case_name = tok.str; |
cases->case_name = tok.str; |
scan(TOK_COLON, &tok); |
scan(TOK_COLON, &tok); |
|
|
}while(peekscan(TOK_CASE,&tok)); |
} while (peekscan(TOK_CASE,&tok)); |
} |
} |
else |
else |
if(flag) |
if(flag) |
|
|
} |
} |
} |
} |
|
|
static char* reserved_words[] = { |
static char *reserved_words[] = { |
"array", |
"array", |
"bytes", |
"bytes", |
"destroy", |
"destroy", |
|
|
NULL |
NULL |
}; |
}; |
|
|
static char* reserved_types[] = { |
static char *reserved_types[] = { |
"opaque", |
"opaque", |
"string", |
"string", |
NULL |
NULL |
|
|
xdr routines that would conflict with internal XDR routines. */ |
xdr routines that would conflict with internal XDR routines. */ |
static check_type_name( name, new_type ) |
static check_type_name( name, new_type ) |
int new_type; |
int new_type; |
char* name; |
char *name; |
{ |
{ |
int i; |
int i; |
char tmp[100]; |
char tmp[100]; |
|
|
sprintf(name, "%s%d", ARGNAME, num); /* default name of argument */ |
sprintf(name, "%s%d", ARGNAME, num); /* default name of argument */ |
|
|
dec->name = (char *)strdup(name); |
dec->name = (char *)strdup(name); |
|
|
if (streq(dec->type, "void")) { |
if (streq(dec->type, "void")) { |
return; |
return; |
} |
} |