lisp: convert K&R function definitions to ANSI C

Convert the old-style (K&R) function definitions in lisp/ to ANSI C
prototypes, formatted in the project's convention: the return type on its
own line and each parameter on its own line, indented four spaces, with
the original parameter comments retained.

Builds cleanly under GCC 16 / C23 (with the -std=gnu17 build change).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Andreas Wendleder 2026-06-10 03:49:15 +02:00
parent ee6901c02c
commit dd13fcb777
No known key found for this signature in database
GPG Key ID: 588785BFDFB01ABD
12 changed files with 355 additions and 354 deletions

View File

@ -57,10 +57,10 @@
*/ */
LispObj * LispObj *
LispIsBool (name,s,f) LispIsBool(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *r; LispObj *r;
if (!ARG1P(s) || ARG2P(s)) { if (!ARG1P(s) || ARG2P(s)) {
@ -91,10 +91,10 @@ LispIsBool (name,s,f)
*/ */
LispObj * LispObj *
LispIsSym (name,s,f) LispIsSym(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *r; LispObj *r;
if (!ARG1P(s) || ARG2P(s)) { if (!ARG1P(s) || ARG2P(s)) {
@ -124,10 +124,10 @@ LispIsSym (name,s,f)
*/ */
LispObj * LispObj *
LispIsNumber (name,s,f) LispIsNumber(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *r; LispObj *r;
if (!ARG1P(s) || ARG2P(s)) { if (!ARG1P(s) || ARG2P(s)) {
@ -159,10 +159,10 @@ LispIsNumber (name,s,f)
*/ */
LispObj * LispObj *
LispIsString (name,s,f) LispIsString(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *r; LispObj *r;
if (!ARG1P(s) || ARG2P(s)) { if (!ARG1P(s) || ARG2P(s)) {
@ -194,10 +194,10 @@ LispIsString (name,s,f)
*/ */
LispObj * LispObj *
LispIsProc (name,s,f) LispIsProc(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *r; LispObj *r;
if (!ARG1P(s) || ARG2P(s)) { if (!ARG1P(s) || ARG2P(s)) {
@ -231,10 +231,10 @@ LispIsProc (name,s,f)
*/ */
LispObj * LispObj *
LispIsList (name,s,f) LispIsList(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *r; LispObj *r;
if (!ARG1P(s) || ARG2P(s)) { if (!ARG1P(s) || ARG2P(s)) {
@ -276,10 +276,10 @@ LispIsList (name,s,f)
*/ */
LispObj * LispObj *
LispIsPair (name,s,f) LispIsPair(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *r; LispObj *r;
if (!ARG1P(s) || ARG2P(s)) { if (!ARG1P(s) || ARG2P(s)) {
@ -306,9 +306,9 @@ LispIsPair (name,s,f)
static static
int int
EqualObjects (l1,l2) EqualObjects(
LispObj *l1; LispObj *l1,
LispObj *l2; LispObj *l2)
{ {
if (LTYPE(l1) != LTYPE(l2)) return 0; if (LTYPE(l1) != LTYPE(l2)) return 0;
switch (LTYPE(l1)) { switch (LTYPE(l1)) {
@ -363,10 +363,10 @@ EqualObjects (l1,l2)
*/ */
LispObj * LispObj *
LispEqv (name,s,f) LispEqv(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
if (!ARG1P(s) || !ARG2P(s) || ARG3P(s)) { if (!ARG1P(s) || !ARG2P(s) || ARG3P(s)) {
@ -408,10 +408,10 @@ LispEqv (name,s,f)
*/ */
LispObj * LispObj *
LispCar (name,s,f) LispCar(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
if (!ARG1P(s) || LTYPE(ARG1(s)) != S_LIST || !LLIST(ARG1(s)) || ARG2P(s)) { if (!ARG1P(s) || LTYPE(ARG1(s)) != S_LIST || !LLIST(ARG1(s)) || ARG2P(s)) {
TxPrintf ("Usage: (%s pair)\n",name); TxPrintf ("Usage: (%s pair)\n",name);
@ -438,10 +438,10 @@ LispCar (name,s,f)
*/ */
LispObj * LispObj *
LispCdr (name,s,f) LispCdr(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
if (!ARG1P(s) || LTYPE(ARG1(s)) != S_LIST || !LLIST(ARG1(s)) || ARG2P(s)) { if (!ARG1P(s) || LTYPE(ARG1(s)) != S_LIST || !LLIST(ARG1(s)) || ARG2P(s)) {
TxPrintf ("Usage: (%s pair)\n",name); TxPrintf ("Usage: (%s pair)\n",name);
@ -468,10 +468,10 @@ LispCdr (name,s,f)
*/ */
LispObj * LispObj *
LispCons (name,s,f) LispCons(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
Sexp *t; Sexp *t;
@ -507,10 +507,10 @@ LispCons (name,s,f)
*/ */
LispObj * LispObj *
LispNull (name,s,f) LispNull(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
if (!ARG1P(s) || ARG2P(s)) { if (!ARG1P(s) || ARG2P(s)) {
@ -542,10 +542,10 @@ LispNull (name,s,f)
*/ */
LispObj * LispObj *
LispList (name,s,f) LispList(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
l = LispNewObj (); l = LispNewObj ();
@ -572,10 +572,10 @@ LispList (name,s,f)
*/ */
LispObj * LispObj *
LispLength (name,s,f) LispLength(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
int len; int len;
@ -634,10 +634,10 @@ LispLength (name,s,f)
*/ */
LispObj * LispObj *
LispDefine (name,s,f) LispDefine(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
@ -671,10 +671,10 @@ LispDefine (name,s,f)
*/ */
LispObj * LispObj *
LispSetBang (name,s,f) LispSetBang(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
@ -711,10 +711,10 @@ LispSetBang (name,s,f)
*/ */
LispObj * LispObj *
LispLet (name,s,f) LispLet(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *body, *l; LispObj *body, *l;
Sexp *frame, *saved; Sexp *frame, *saved;
@ -784,10 +784,10 @@ LispLet (name,s,f)
*/ */
LispObj * LispObj *
LispLetRec (name,s,f) LispLetRec(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *body, *l; LispObj *body, *l;
Sexp *frame, *saved; Sexp *frame, *saved;
@ -857,10 +857,10 @@ LispLetRec (name,s,f)
*/ */
LispObj * LispObj *
LispLetStar (name,s,f) LispLetStar(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *body, *l; LispObj *body, *l;
Sexp *frame, *saved; Sexp *frame, *saved;
@ -935,10 +935,10 @@ LispLetStar (name,s,f)
*/ */
LispObj * LispObj *
LispSetCarBang (name,s,f) LispSetCarBang(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
@ -968,10 +968,10 @@ LispSetCarBang (name,s,f)
*/ */
LispObj * LispObj *
LispSetCdrBang (name,s,f) LispSetCdrBang(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
@ -1015,10 +1015,10 @@ LispSetCdrBang (name,s,f)
*/ */
LispObj * LispObj *
Lispeval (name,s,f) Lispeval(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
if (!ARG1P(s) || ARG2P(s)) { if (!ARG1P(s) || ARG2P(s)) {
TxPrintf ("Usage: (%s obj)\n", name); TxPrintf ("Usage: (%s obj)\n", name);
@ -1045,10 +1045,10 @@ Lispeval (name,s,f)
*/ */
LispObj * LispObj *
LispQuote (name,s,f) LispQuote(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
if (!ARG1P(s) || ARG2P(s)) { if (!ARG1P(s) || ARG2P(s)) {
TxPrintf ("Usage: (%s obj)\n",name); TxPrintf ("Usage: (%s obj)\n",name);
@ -1087,10 +1087,10 @@ LispQuote (name,s,f)
*/ */
LispObj * LispObj *
LispIf (name,s,f) LispIf(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
if (!ARG1P(s) || !ARG2P(s) || !ARG3P(s) || LTYPE(ARG1(s)) != S_BOOL if (!ARG1P(s) || !ARG2P(s) || !ARG3P(s) || LTYPE(ARG1(s)) != S_BOOL
|| ARG4P(s)) { || ARG4P(s)) {
@ -1124,10 +1124,10 @@ LispIf (name,s,f)
*/ */
LispObj * LispObj *
LispCond (name,s,f) LispCond(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
LispObj *m; LispObj *m;
@ -1219,10 +1219,10 @@ LispCond (name,s,f)
*/ */
LispObj * LispObj *
LispBegin (name,s,f) LispBegin(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l, *m; LispObj *l, *m;
Sexp *saved; Sexp *saved;
@ -1292,10 +1292,10 @@ LispBegin (name,s,f)
*/ */
LispObj * LispObj *
Lispapply (name,s,f) Lispapply(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
if (!ARG1P(s) || !ARG2P(s) || LTYPE(ARG2(s)) != S_LIST || if (!ARG1P(s) || !ARG2P(s) || LTYPE(ARG2(s)) != S_LIST ||
(LTYPE(ARG1(s)) != S_LAMBDA && LTYPE(ARG1(s)) != S_LAMBDA_BUILTIN && (LTYPE(ARG1(s)) != S_LAMBDA && LTYPE(ARG1(s)) != S_LAMBDA_BUILTIN &&
@ -1330,10 +1330,10 @@ Lispapply (name,s,f)
*/ */
LispObj * LispObj *
LispLambda (name,s,f) LispLambda(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
Sexp *s1; Sexp *s1;
@ -1427,10 +1427,10 @@ LispLambda (name,s,f)
*/ */
LispObj * LispObj *
LispDisplayObj (name,s,f) LispDisplayObj(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
if (!ARG1P(s) || ARG2P(s)) { if (!ARG1P(s) || ARG2P(s)) {
@ -1468,10 +1468,10 @@ LispDisplayObj (name,s,f)
*/ */
LispObj * LispObj *
LispPrintObj (name,s,f) LispPrintObj(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
if (!ARG1P(s) || ARG2P(s)) { if (!ARG1P(s) || ARG2P(s)) {
@ -1503,10 +1503,10 @@ LispPrintObj (name,s,f)
*/ */
LispObj * LispObj *
LispError (name,s,f) LispError(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
int i,j; int i,j;
char *str; char *str;
@ -1547,10 +1547,10 @@ LispError (name,s,f)
*/ */
LispObj * LispObj *
LispShowFrame (name,s,f) LispShowFrame(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;

View File

@ -45,10 +45,10 @@
*----------------------------------------------------------------------------- *-----------------------------------------------------------------------------
*/ */
LispObj * LispObj *
LispAdd (name,s,f) LispAdd(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
double d; double d;
@ -88,10 +88,10 @@ LispAdd (name,s,f)
*----------------------------------------------------------------------------- *-----------------------------------------------------------------------------
*/ */
LispObj * LispObj *
LispSub (name,s,f) LispSub(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
double d; double d;
@ -135,10 +135,10 @@ LispSub (name,s,f)
*----------------------------------------------------------------------------- *-----------------------------------------------------------------------------
*/ */
LispObj * LispObj *
LispMult (name,s,f) LispMult(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
double d; double d;
@ -177,10 +177,10 @@ LispMult (name,s,f)
*----------------------------------------------------------------------------- *-----------------------------------------------------------------------------
*/ */
LispObj * LispObj *
LispDiv (name,s,f) LispDiv(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
double d; double d;
@ -236,10 +236,10 @@ LispDiv (name,s,f)
*----------------------------------------------------------------------------- *-----------------------------------------------------------------------------
*/ */
LispObj * LispObj *
LispTruncate (name,s,f) LispTruncate(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
double d; double d;
@ -273,10 +273,10 @@ LispTruncate (name,s,f)
*----------------------------------------------------------------------------- *-----------------------------------------------------------------------------
*/ */
LispObj * LispObj *
LispZeroQ (name,s,f) LispZeroQ(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
double d; double d;
@ -310,10 +310,10 @@ LispZeroQ (name,s,f)
*----------------------------------------------------------------------------- *-----------------------------------------------------------------------------
*/ */
LispObj * LispObj *
LispPositiveQ (name,s,f) LispPositiveQ(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
double d; double d;
@ -347,10 +347,10 @@ LispPositiveQ (name,s,f)
*----------------------------------------------------------------------------- *-----------------------------------------------------------------------------
*/ */
LispObj * LispObj *
LispNegativeQ (name,s,f) LispNegativeQ(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
double d; double d;

View File

@ -192,8 +192,8 @@ LispFnInit ()
*/ */
int int
ispair (s) ispair(
Sexp *s; Sexp *s)
{ {
while (s && LTYPE(CDR(s)) == S_LIST) while (s && LTYPE(CDR(s)) == S_LIST)
s = LLIST(CDR(s)); s = LLIST(CDR(s));
@ -220,9 +220,9 @@ ispair (s)
*/ */
LispObj * LispObj *
lookup (s,f) lookup(
char *s; char *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
Sexp *f1; Sexp *f1;
@ -263,10 +263,10 @@ lookup (s,f)
*------------------------------------------------------------------------ *------------------------------------------------------------------------
*/ */
LispObj * LispObj *
LispMagicSend (name,s,f) LispMagicSend(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
int trace; int trace;
LispObj *l; LispObj *l;
@ -373,10 +373,10 @@ LispMagicSend (name,s,f)
*/ */
LispObj * LispObj *
LispApply (s,l,f) LispApply(
Sexp *s; Sexp *s,
Sexp *l; Sexp *l,
Sexp *f; Sexp *f)
{ {
int len; int len;
int dp; int dp;
@ -438,10 +438,10 @@ LispApply (s,l,f)
*/ */
LispObj * LispObj *
LispBuiltinApply (num,s,f) LispBuiltinApply(
int num; int num,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
return FnTable[num].f(FnTable[num].name, s, f); return FnTable[num].f(FnTable[num].name, s, f);
} }
@ -464,9 +464,9 @@ LispBuiltinApply (num,s,f)
static static
LispObj * LispObj *
evalList (s,f) evalList(
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
Sexp *t; Sexp *t;
@ -629,9 +629,9 @@ evalList (s,f)
*/ */
LispObj * LispObj *
LispEval (l,f) LispEval(
LispObj *l; LispObj *l,
Sexp *f; Sexp *f)
{ {
LispObj *ret; LispObj *ret;

View File

@ -75,9 +75,9 @@ LispFrameInit ()
*/ */
static static
Sexp * Sexp *
findbinding (name,f) findbinding(
char *name; char *name,
Sexp *f; Sexp *f)
{ {
Sexp *t, *t1; Sexp *t, *t1;
@ -101,9 +101,9 @@ findbinding (name,f)
*/ */
static static
Sexp * Sexp *
revfindbinding (l,f) revfindbinding(
LispObj *l; LispObj *l,
Sexp *f; Sexp *f)
{ {
Sexp *t, *t1; Sexp *t, *t1;
@ -139,9 +139,9 @@ revfindbinding (l,f)
*/ */
LispObj * LispObj *
LispFrameLookup (s,f) LispFrameLookup(
char *s; char *s,
Sexp *f; Sexp *f)
{ {
Sexp *f1; Sexp *f1;
f1 = findbinding (s,f); f1 = findbinding (s,f);
@ -169,9 +169,9 @@ LispFrameLookup (s,f)
*/ */
char * char *
LispFrameRevLookup (l,f) LispFrameRevLookup(
LispObj *l; LispObj *l,
Sexp *f; Sexp *f)
{ {
Sexp *f1; Sexp *f1;
f1 = revfindbinding (l,f); f1 = revfindbinding (l,f);
@ -199,10 +199,10 @@ LispFrameRevLookup (l,f)
*/ */
void void
LispAddBinding (name,val,f) LispAddBinding(
LispObj *name; LispObj *name,
LispObj *val; LispObj *val,
Sexp *f; Sexp *f)
{ {
Sexp *t; Sexp *t;
LispObj *l; LispObj *l;
@ -253,10 +253,10 @@ LispAddBinding (name,val,f)
*/ */
int int
LispModifyBinding (name,val,f) LispModifyBinding(
LispObj *name; LispObj *name,
LispObj *val; LispObj *val,
Sexp *f; Sexp *f)
{ {
Sexp *t; Sexp *t;
LispObj *l; LispObj *l;
@ -287,8 +287,8 @@ LispModifyBinding (name,val,f)
*/ */
Sexp * Sexp *
LispFramePush (f) LispFramePush(
Sexp *f; Sexp *f)
{ {
Sexp *nf; Sexp *nf;
nf = LispNewSexp (); nf = LispNewSexp ();

View File

@ -123,8 +123,8 @@ LispNewObj ()
*/ */
LispObj * LispObj *
LispCopyObj (l) LispCopyObj(
LispObj *l; LispObj *l)
{ {
LispObj *s; LispObj *s;
s = LispNewObj (); s = LispNewObj ();
@ -217,8 +217,8 @@ LispNewSexp ()
*/ */
Sexp * Sexp *
LispCopySexp (s) LispCopySexp(
Sexp *s; Sexp *s)
{ {
Sexp *t; Sexp *t;
t = LispNewSexp (); t = LispNewSexp ();
@ -297,8 +297,8 @@ mergealloc ()
static static
void void
mark_sw (l) mark_sw(
LispObj *l; LispObj *l)
{ {
LispObj *m; LispObj *m;
LispObj *t0,*t1,*t2,*t3; LispObj *t0,*t1,*t2,*t3;
@ -416,8 +416,8 @@ collect_sw ()
static int skip_gc = 50; /* make this bigger if it is too slow :) */ static int skip_gc = 50; /* make this bigger if it is too slow :) */
void void
LispGC (fl) LispGC(
LispObj *fl; LispObj *fl)
{ {
LispObj *l; LispObj *l;
@ -497,10 +497,10 @@ LispGC (fl)
*/ */
LispObj * LispObj *
LispCollectGarbage (name,s,f) LispCollectGarbage(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
extern LispObj *LispMainFrameObj; extern LispObj *LispMainFrameObj;

View File

@ -51,10 +51,10 @@
*/ */
LispObj * LispObj *
LispLoad (name,s,f) LispLoad(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
extern int LispEchoResult; extern int LispEchoResult;
LispObj *l, *inp, *res; LispObj *l, *inp, *res;
@ -234,10 +234,10 @@ LispLoad (name,s,f)
*/ */
LispObj * LispObj *
LispWrite (name,s,f) LispWrite(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
FILE *fp; FILE *fp;
LispObj *l; LispObj *l;
@ -281,10 +281,10 @@ LispWrite (name,s,f)
*/ */
LispObj * LispObj *
LispSpawn (name,s,f) LispSpawn(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
int pid; int pid;
@ -357,10 +357,10 @@ LispSpawn (name,s,f)
*/ */
LispObj * LispObj *
LispWait (name,s,f) LispWait(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
int stat; int stat;

View File

@ -61,10 +61,10 @@ static LispObj *_internal_list;
*/ */
LispObj * LispObj *
LispGetbox (name,s,f) LispGetbox(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
Rect editbox; Rect editbox;
Rect rootBox; Rect rootBox;
@ -116,10 +116,10 @@ LispGetbox (name,s,f)
*/ */
LispObj * LispObj *
LispGetPoint (name,s,f) LispGetPoint(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
MagWindow *w; MagWindow *w;
char buf[128]; char buf[128];
@ -169,10 +169,10 @@ LispGetPoint (name,s,f)
*----------------------------------------------------------------------------- *-----------------------------------------------------------------------------
*/ */
static int static int
lispprinttile (tile, dinfo, cxp) lispprinttile(
Tile *tile; Tile *tile,
TileType dinfo; /* (unused) */ TileType dinfo, /* (unused) */
TreeContext *cxp; TreeContext *cxp)
{ {
TileType type; TileType type;
Transform tt; Transform tt;
@ -210,10 +210,10 @@ lispprinttile (tile, dinfo, cxp)
LispObj * LispObj *
LispGetPaint (name,s,f) LispGetPaint(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
SearchContext scx; SearchContext scx;
TileTypeBitMask mask; TileTypeBitMask mask;
@ -285,10 +285,10 @@ LispGetPaint (name,s,f)
*/ */
LispObj * LispObj *
LispGetSelPaint (name,s,f) LispGetSelPaint(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
SearchContext scx; SearchContext scx;
TileTypeBitMask mask; TileTypeBitMask mask;
@ -341,11 +341,11 @@ LispGetSelPaint (name,s,f)
*----------------------------------------------------------------------------- *-----------------------------------------------------------------------------
*/ */
static int static int
lispprintlabel (scx, label, tpath, cdarg) lispprintlabel(
SearchContext *scx; SearchContext *scx,
Label *label; Label *label,
TerminalPath *tpath; TerminalPath *tpath,
ClientData cdarg; ClientData cdarg)
{ {
LispObj *l; LispObj *l;
Rect sourceRect, targetRect; Rect sourceRect, targetRect;
@ -391,10 +391,10 @@ lispprintlabel (scx, label, tpath, cdarg)
} }
LispObj * LispObj *
LispGetLabel (name,s,f) LispGetLabel(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
SearchContext scx; SearchContext scx;
TileTypeBitMask mask; TileTypeBitMask mask;
@ -458,10 +458,10 @@ LispGetLabel (name,s,f)
*/ */
LispObj * LispObj *
LispGetSelLabel (name,s,f) LispGetSelLabel(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
SearchContext scx; SearchContext scx;
TileTypeBitMask mask; TileTypeBitMask mask;
@ -532,10 +532,10 @@ int lispprintcell (use,cdarg)
LispObj * LispObj *
LispGetCellNames (name,s,f) LispGetCellNames(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
static char cellbuffer[1024]; static char cellbuffer[1024];
LispObj *l; LispObj *l;
@ -573,10 +573,10 @@ LispGetCellNames (name,s,f)
*/ */
LispObj * LispObj *
LispEvalMagic (name,s,f) LispEvalMagic(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
if (!ARG1P(s) || LTYPE(ARG1(s)) != S_SYM || ARG2P(s)) { if (!ARG1P(s) || LTYPE(ARG1(s)) != S_SYM || ARG2P(s)) {

View File

@ -51,10 +51,10 @@ int lispInFile; /* global variable used within the lisp
*------------------------------------------------------------------------ *------------------------------------------------------------------------
*/ */
void void
LispEvaluate (argc, argv, inFile) LispEvaluate(
int argc; int argc,
char **argv; char **argv,
int inFile; int inFile)
{ {
extern Sexp *LispMainFrame; extern Sexp *LispMainFrame;
extern LispObj *LispMainFrameObj; extern LispObj *LispMainFrameObj;
@ -172,8 +172,8 @@ LispInit ()
*/ */
void void
LispSetTech (s) LispSetTech(
char *s; char *s)
{ {
extern Sexp *LispMainFrame; extern Sexp *LispMainFrame;
extern LispObj *LispMainFrameObj; extern LispObj *LispMainFrameObj;
@ -209,8 +209,8 @@ LispSetTech (s)
*/ */
void void
LispSetEdit (s) LispSetEdit(
char *s; char *s)
{ {
extern Sexp *LispMainFrame; extern Sexp *LispMainFrame;
extern LispObj *LispMainFrameObj; extern LispObj *LispMainFrameObj;

View File

@ -56,8 +56,8 @@
strip whitespace from left: returns new string pointer strip whitespace from left: returns new string pointer
*/ */
static char * static char *
stripleft (s) stripleft(
char *s; char *s)
{ {
while (*s && IsSpace (*s)) while (*s && IsSpace (*s))
s++; s++;
@ -115,8 +115,8 @@ char *LispNewString (s)
*/ */
int int
LispStringId (s) LispStringId(
char *s; char *s)
{ {
int i; int i;
HashEntry *h; HashEntry *h;
@ -146,9 +146,9 @@ LispStringId (s)
*/ */
LispObj * LispObj *
LispAtomParse (pstr,quoted) LispAtomParse(
int quoted; char **pstr,
char **pstr; int quoted)
{ {
char *str = *pstr; char *str = *pstr;
char *q, c; char *q, c;
@ -286,8 +286,8 @@ LispAtomParse (pstr,quoted)
*/ */
Sexp * Sexp *
LispIParse (pstr) LispIParse(
char **pstr; char **pstr)
{ {
char *str = *pstr; char *str = *pstr;
Sexp *s; Sexp *s;
@ -395,8 +395,8 @@ LispIParse (pstr)
*/ */
LispObj * LispObj *
LispParseString (str) LispParseString(
char *str; char *str)
{ {
LispObj *l; LispObj *l;

View File

@ -40,9 +40,10 @@
*/ */
static static
void void
LispBufPrintName (s,t,flag) LispBufPrintName(
char *s, *t; char *s,
int flag; char *t,
int flag)
{ {
int i,j, spc; int i,j, spc;
i=0; i=0;
@ -85,9 +86,9 @@ static HashTable PrintTable, GenTable;
static int num_refs; static int num_refs;
static void static void
_LispPrint (fp,l) _LispPrint(
FILE *fp; FILE *fp,
LispObj *l; LispObj *l)
{ {
HashEntry *h; HashEntry *h;
int i; int i;
@ -192,8 +193,8 @@ done:
static void static void
_LispGenTable (l) _LispGenTable(
LispObj *l; LispObj *l)
{ {
HashEntry *h; HashEntry *h;
int i; int i;
@ -250,9 +251,9 @@ _LispGenTable (l)
void void
LispPrint (fp, l) LispPrint(
FILE *fp; FILE *fp,
LispObj *l; LispObj *l)
{ {
HashEntry *h; HashEntry *h;
HashSearch hs; HashSearch hs;
@ -292,9 +293,9 @@ LispPrint (fp, l)
*/ */
void void
LispPrintType (fp,l) LispPrintType(
FILE *fp; FILE *fp,
LispObj *l; LispObj *l)
{ {
switch (LTYPE(l)) { switch (LTYPE(l)) {
case S_INT: case S_INT:

View File

@ -45,10 +45,10 @@
*----------------------------------------------------------------------------- *-----------------------------------------------------------------------------
*/ */
LispObj * LispObj *
LispStrCat (name,s,f) LispStrCat(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
@ -82,10 +82,10 @@ LispStrCat (name,s,f)
*/ */
LispObj * LispObj *
LispSymbolToString (name,s,f) LispSymbolToString(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
if (!ARG1P(s) || LTYPE(ARG1(s)) != S_SYM || ARG2P(s)) { if (!ARG1P(s) || LTYPE(ARG1(s)) != S_SYM || ARG2P(s)) {
@ -117,10 +117,10 @@ LispSymbolToString (name,s,f)
*/ */
LispObj * LispObj *
LispStringToSymbol (name,s,f) LispStringToSymbol(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
if (!ARG1P(s) || LTYPE(ARG1(s)) != S_STRING || ARG2P(s)) { if (!ARG1P(s) || LTYPE(ARG1(s)) != S_STRING || ARG2P(s)) {
@ -151,10 +151,10 @@ LispStringToSymbol (name,s,f)
*/ */
LispObj * LispObj *
LispNumberToString (name,s,f) LispNumberToString(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
char buf[128]; char buf[128];
@ -192,10 +192,10 @@ LispNumberToString (name,s,f)
*/ */
LispObj * LispObj *
LispStringToNumber (name,s,f) LispStringToNumber(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
char *str; char *str;
@ -254,10 +254,10 @@ LispStringToNumber (name,s,f)
*/ */
LispObj * LispObj *
LispStringLength (name,s,f) LispStringLength(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
if (!ARG1P(s) || LTYPE(ARG1(s)) != S_STRING || ARG2P(s)) { if (!ARG1P(s) || LTYPE(ARG1(s)) != S_STRING || ARG2P(s)) {
@ -291,10 +291,10 @@ LispStringLength (name,s,f)
*/ */
LispObj * LispObj *
LispStringCompare (name,s,f) LispStringCompare(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
if (!ARG1P(s) || !ARG2P(s) || LTYPE(ARG1(s)) != S_STRING || if (!ARG1P(s) || !ARG2P(s) || LTYPE(ARG1(s)) != S_STRING ||
@ -326,10 +326,10 @@ LispStringCompare (name,s,f)
*/ */
LispObj * LispObj *
LispStringRef (name,s,f) LispStringRef(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
if (!ARG1P(s) || !ARG2P(s) || LTYPE(ARG1(s)) != S_STRING || if (!ARG1P(s) || !ARG2P(s) || LTYPE(ARG1(s)) != S_STRING ||
@ -365,10 +365,10 @@ LispStringRef (name,s,f)
*/ */
LispObj * LispObj *
LispStringSet (name,s,f) LispStringSet(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;
@ -406,10 +406,10 @@ LispStringSet (name,s,f)
*/ */
LispObj * LispObj *
LispSubString (name,s,f) LispSubString(
char *name; char *name,
Sexp *s; Sexp *s,
Sexp *f; Sexp *f)
{ {
LispObj *l; LispObj *l;

View File

@ -58,8 +58,8 @@ StackNew ()
static static
void void
StackFree (t) StackFree(
TRACE *t; TRACE *t)
{ {
t->n = freeQ; t->n = freeQ;
freeQ = t; freeQ = t;
@ -82,8 +82,8 @@ StackFree (t)
*/ */
void void
LispStackPush (name) LispStackPush(
char *name; char *name)
{ {
TRACE *t; TRACE *t;
t = StackNew(); t = StackNew();