1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
/*
M A K E L I S T . C
Possibilities:
1- makelist(int, string)
2- makelist(int, string, older, string) -- younger ok too
The parser may have inserted the int-argument as int O_FILE
*/
#include "iccomp.h"
ESTRUC_ *makelist(ESTRUC_ *args, E_TYPE_ type)
{
if
( /* first arg not int */
!test_type(codestruc(args, 0), e_int)
|| /* or second not string */
!test_type(codestruc(args, 1), e_str)
|| /* or three arguments, but */
(
args->type == 3
&& /* last is not string */
!test_type(codestruc(args, 2), e_str)
)
)
{
semantic(type_conflict, funstring[f_makelist]);
return (args);
}
catargs(args); /* catenate all arguments */
if ((OPCODE_)type != op_hlt) /* hidden function called */
callhidden((OPCODE_)type == op_younger, args);
else
callrss(args, f_makelist);
return (args); /* return called function code */
}
|