#include "spice.h"
#include "ftedefs.h"
Go to the source code of this file.
Definition at line 44 of file define.c.
66 for (wl = wlist; wl && (strchr(wl->
wl_word,
')') ==
NULL);
68 (
void) strcat(buf, wl->wl_word);
72 for (t = buf; *t; t++);
73 for (s = wl->wl_word; *s && (*s !=
')'); s++, t++)
79 wl->wl_word =
copy(s);
96 for (b = tbuf; *b; b++)
97 if (isspace(*b) || (*b ==
'(')) {
103 fprintf(
cp_err,
"Error: %s is a predefined function.\n",tbuf);
125 for (s = b; *s; s++) {
131 else if (*s ==
')') {
134 else if (*s ==
',') {
static char buf[MAXPROMPT]
struct pnode * ft_getpnames()
static struct udfunc * udfuncs
Definition at line 458 of file define.c.
467 for (udf =
udfuncs; udf; udf = udn) {
static struct udfunc * udfuncs
struct wordlist * wl_next
struct pnode* ft_substdef |
( |
char * |
name, |
|
|
struct pnode * |
args |
|
) |
| |
Definition at line 302 of file define.c.
310 int arity = 0, rarity;
330 "Warning: the user-defined function %s has %d args\n",
334 for (s = udf->
ud_name; *s; s++)
static struct pnode * trcopy()
static struct udfunc * udfuncs
static struct pnode* ntharg |
( |
| ) |
|
|
static |
static struct pnode* ntharg |
( |
num |
, |
|
|
struct pnode * |
args |
|
) |
| |
|
static |
static void prdefs |
( |
char * |
name | ) |
|
|
static |
Definition at line 212 of file define.c.
220 s = strchr(name,
'(' );
static struct udfunc * udfuncs
static void prtree |
( |
struct udfunc * |
ud | ) |
|
|
static |
Definition at line 242 of file define.c.
250 (void) strcat(buf, ud->
ud_name);
251 for (s = ud->
ud_name; *s; s++);
252 (void) strcat(buf,
" (");
255 (void) strcat(buf, s);
259 (void) strcat(buf,
", ");
262 (void) strcat(buf,
") = ");
static char buf[MAXPROMPT]
static void prtree1 |
( |
struct pnode * |
pn | ) |
|
|
static |
static void savetree |
( |
struct pnode * |
pn | ) |
|
|
static |
static struct pnode* trcopy |
( |
| ) |
|
|
static |
static struct pnode* trcopy |
( |
struct pnode * |
tree, |
|
|
char * |
args, |
|
|
struct pnode * |
nn |
|
) |
| |
|
static |
Definition at line 352 of file define.c.
379 t = d->
v_name + strlen(s) + 2;
380 while (*t && isspace(*t)) t++;
383 func =
alloc(
struct func);
400 func =
alloc(
struct func);
406 else if (tree->
pn_op) {
408 op =
alloc(
struct op);
419 fprintf(
cp_err,
"trcopy: Internal Error: bad parse node\n");
static struct pnode * ntharg()
static struct pnode * trcopy()
struct dvec *(* op_func)()