version 1.1.1.1, 1999/09/28 21:26:21
|
version 1.3, 1999/10/13 20:05:00
|
Line 194 a_line : startL statement EoL
|
Line 194 a_line : startL statement EoL
|
| EoL { YYDBUG_PR1(" a_line <= (CR)\n"); } |
| EoL { YYDBUG_PR1(" a_line <= (CR)\n"); } |
| VERBATIM { YYDBUG_PR1(" a_line <= (VERBATIM)\n"); |
| VERBATIM { YYDBUG_PR1(" a_line <= (VERBATIM)\n"); |
switch(Parsemode_f) { |
switch(Parsemode_f) { |
case TeX_MODE: append_text("\begin{verbatim}"); |
case TeX_MODE: append_text("\\begin{verbatim}"); |
break; |
break; |
case HTML_MODE: append_text("<PRE>"); |
case HTML_MODE: append_text("<PRE>"); |
break; |
break; |
Line 202 a_line : startL statement EoL
|
Line 202 a_line : startL statement EoL
|
append_text($1->s_str); |
append_text($1->s_str); |
capa_mfree($1->s_str); capa_mfree((char *)$1); |
capa_mfree($1->s_str); capa_mfree((char *)$1); |
switch(Parsemode_f) { |
switch(Parsemode_f) { |
case TeX_MODE: append_text("\end{verbatim}"); |
case TeX_MODE: append_text("\\end{verbatim}\n"); |
break; |
break; |
case HTML_MODE: append_text("</PRE>"); |
case HTML_MODE: append_text("</PRE>\n"); |
break; |
break; |
} |
} |
} |
} |
Line 646 answer_comp : ANS_CS {
|
Line 646 answer_comp : ANS_CS {
|
|
|
|
|
map_expr : startM '(' basic_constr ';' var_list ';' arg_list ')' |
map_expr : startM '(' basic_constr ';' var_list ';' arg_list ')' |
{ char key[SIXTEEN]; |
{ char key[SMALL_LINE_BUFFER]; |
char warn_msg[WARN_MSG_LENGTH]; |
char warn_msg[WARN_MSG_LENGTH]; |
int result=0; |
int result=0; |
|
|
Line 674 map_expr : startM '(' basic_constr '
|
Line 674 map_expr : startM '(' basic_constr '
|
free_arglist($7->s_argp); |
free_arglist($7->s_argp); |
} |
} |
| startR '(' basic_constr ';' var_list ';' arg_list ')' |
| startR '(' basic_constr ';' var_list ';' arg_list ')' |
{ char key[SIXTEEN]; |
{ char key[SMALL_LINE_BUFFER]; |
char warn_msg[WARN_MSG_LENGTH]; |
char warn_msg[WARN_MSG_LENGTH]; |
int result=0; |
int result=0; |
|
|
Line 889 Symbol *name,*index;int free_symbols;
|
Line 889 Symbol *name,*index;int free_symbols;
|
Symbol *s_p, *a_p; |
Symbol *s_p, *a_p; |
char *key, *tmp; |
char *key, *tmp; |
int leng, idx_len; |
int leng, idx_len; |
|
|
leng = strlen(name->s_name)+8; /* [ ] */ |
leng = strlen(name->s_name)+8; /* [ ] */ |
|
|
switch(index->s_type) { |
switch(index->s_type) { |
Line 933 Symbol *ar_name;int num_elem;
|
Line 932 Symbol *ar_name;int num_elem;
|
{ |
{ |
int i; |
int i; |
Symbol *arg_list,*a_p; |
Symbol *arg_list,*a_p; |
char idx_str[SIXTEEN]; |
char idx_str[MAX_BUFFER_SIZE]; |
|
|
a_p = find_arrayid(ar_name); |
a_p = find_arrayid(ar_name->s_name); |
i = 1; |
i = 1; |
sprintf(idx_str,"%ld",i); /* create array elements with integer index */ |
sprintf(idx_str,"%s[%d]",ar_name->s_name,i); /* create array elements with integer index */ |
arg_list = find_array_by_index(a_p,idx_str); /* will create a new element if not found */ |
arg_list = find_array_by_index(a_p,idx_str); /* will create a new element if not found */ |
arg_list->s_argc=1; |
arg_list->s_argc=1; |
arg_list->s_argp=new_arglist(arg_list); |
arg_list->s_argp=new_arglist(arg_list); |
|
|
for (i=2;i<=num_elem;i++) { |
for (i=2;i<=num_elem;i++) { |
sprintf(idx_str,"%ld",i); |
sprintf(idx_str,"%s[%d]",ar_name->s_name,i); |
arg_list->s_argc++; |
arg_list->s_argc++; |
arg_list->s_argp=addto_arglist(arg_list->s_argp,find_array_by_index(a_p,idx_str)); |
arg_list->s_argp=addto_arglist(arg_list->s_argp,find_array_by_index(a_p,idx_str)); |
} |
} |
Line 1142 if( a->s_type == IDENTIFIER || b->s_type
|
Line 1141 if( a->s_type == IDENTIFIER || b->s_type
|
switch( b->s_type ) { |
switch( b->s_type ) { |
case I_VAR: |
case I_VAR: |
case I_CONSTANT: |
case I_CONSTANT: |
leng = SIXTEEN; /* assuming a long integer does not exceed 16 digits*/ |
leng = SMALL_LINE_BUFFER; /* assuming a long integer does not exceed 128 digits*/ |
b_str= capa_malloc(sizeof(char), leng); |
b_str= capa_malloc(sizeof(char), leng); |
sprintf(b_str,"%ld", b->s_int); |
sprintf(b_str,"%ld", b->s_int); |
break; |
break; |
Line 1326 char *
|
Line 1325 char *
|
format_toTeX( real ) char *real; |
format_toTeX( real ) char *real; |
{ |
{ |
int idx, length, fraclength, i_exp; |
int idx, length, fraclength, i_exp; |
char *expo_p, fracS[SIXTEEN], result[ONE_K], *areal; |
char *expo_p, fracS[SMALL_LINE_BUFFER], result[ONE_K], *areal; |
char warn_msg[WARN_MSG_LENGTH]; |
char warn_msg[WARN_MSG_LENGTH]; |
|
|
length = strlen(real); |
length = strlen(real); |
Line 1374 char *
|
Line 1373 char *
|
format_toHTML( real ) char *real; |
format_toHTML( real ) char *real; |
{ |
{ |
int idx, length, fraclength, i_exp; |
int idx, length, fraclength, i_exp; |
char *expo_p, fracS[SIXTEEN], result[ONE_K], *areal; |
char *expo_p, fracS[SMALL_LINE_BUFFER], result[ONE_K], *areal; |
char warn_msg[WARN_MSG_LENGTH]; |
char warn_msg[WARN_MSG_LENGTH]; |
|
|
length = strlen(real); |
length = strlen(real); |