- }
-}
-
-static void call_cmd(char **ptr)
-{
- lispobj thing = parse_lispobj(ptr), function, result, cons, args[3];
- int numargs;
-
- if (LowtagOf(thing) == type_OtherPointer) {
- switch (TypeOf(*(lispobj *)(thing-type_OtherPointer))) {
- case type_SymbolHeader:
- for (cons = SymbolValue(INITIAL_FDEFN_OBJECTS);
- cons != NIL;
- cons = CONS(cons)->cdr) {
- if (FDEFN(CONS(cons)->car)->name == thing) {
- thing = CONS(cons)->car;
- goto fdefn;
- }
- }
- printf("symbol 0x%08lx is undefined.\n", thing);
- return;
-
- case type_Fdefn:
- fdefn:
- function = FDEFN(thing)->function;
- if (function == NIL) {
- printf("fdefn 0x%08lx is undefined.\n", thing);
- return;
- }
- break;
- default:
- printf(
- "0x%08lx is not a function pointer, symbol, or fdefn object.\n",
- thing);
- return;
- }
- }
- else if (LowtagOf(thing) != type_FunctionPointer) {
- printf("0x%08lx is not a function pointer, symbol, or fdefn object.\n",
- thing);
- return;
- }
- else
- function = thing;
-
- numargs = 0;
- while (more_p(ptr)) {
- if (numargs >= 3) {
- printf("Too many arguments. (3 at most)\n");
- return;