6 static void *funcall (char **stringp
);
7 static void *eval (char **stringp
);
10 funcall (char **stringp
)
12 void *args
[strlen (*stringp
)], **ap
= args
;
13 void *argcookie
= &args
[1];
17 /* Evaluate the next token. */
18 *ap
++ = eval (stringp
);
20 /* Whitespace is irrelevant. */
21 while (isspace (**stringp
))
24 /* Terminate at closing paren or end of line. */
25 } while (**stringp
!= '\0' && **stringp
!= ')');
26 if (**stringp
!= '\0')
27 /* Swallow closing paren. */
31 __builtin_return (__builtin_apply (args
[0],
33 (char *) ap
- (char *) &args
[1]));
40 char *p
= *stringp
, c
;
42 /* Whitespace is irrelevant. */
49 /* String constant. */
54 switch (*strcpy (p
, p
+ 1))
65 while (*p
!= '\0' && *p
++ != '"');
72 return funcall (stringp
);
75 /* Try to parse it as a number. */
76 value
= (void *) strtol (p
, stringp
, 0);
80 /* Anything else is a symbol that produces its address. */
84 while (*p
!= '\0' && !isspace (*p
) && !ispunct (*p
));
87 value
= dlsym (NULL
, value
);
103 while (getline (&buf
, &bufsz
, stdin
) > 0)