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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -61,10 +61,10 @@ static LispObj *_internal_list;
*/
LispObj *
LispGetbox (name,s,f)
char *name;
Sexp *s;
Sexp *f;
LispGetbox(
char *name,
Sexp *s,
Sexp *f)
{
Rect editbox;
Rect rootBox;
@ -116,10 +116,10 @@ LispGetbox (name,s,f)
*/
LispObj *
LispGetPoint (name,s,f)
char *name;
Sexp *s;
Sexp *f;
LispGetPoint(
char *name,
Sexp *s,
Sexp *f)
{
MagWindow *w;
char buf[128];
@ -169,10 +169,10 @@ LispGetPoint (name,s,f)
*-----------------------------------------------------------------------------
*/
static int
lispprinttile (tile, dinfo, cxp)
Tile *tile;
TileType dinfo; /* (unused) */
TreeContext *cxp;
lispprinttile(
Tile *tile,
TileType dinfo, /* (unused) */
TreeContext *cxp)
{
TileType type;
Transform tt;
@ -210,10 +210,10 @@ lispprinttile (tile, dinfo, cxp)
LispObj *
LispGetPaint (name,s,f)
char *name;
Sexp *s;
Sexp *f;
LispGetPaint(
char *name,
Sexp *s,
Sexp *f)
{
SearchContext scx;
TileTypeBitMask mask;
@ -285,10 +285,10 @@ LispGetPaint (name,s,f)
*/
LispObj *
LispGetSelPaint (name,s,f)
char *name;
Sexp *s;
Sexp *f;
LispGetSelPaint(
char *name,
Sexp *s,
Sexp *f)
{
SearchContext scx;
TileTypeBitMask mask;
@ -341,11 +341,11 @@ LispGetSelPaint (name,s,f)
*-----------------------------------------------------------------------------
*/
static int
lispprintlabel (scx, label, tpath, cdarg)
SearchContext *scx;
Label *label;
TerminalPath *tpath;
ClientData cdarg;
lispprintlabel(
SearchContext *scx,
Label *label,
TerminalPath *tpath,
ClientData cdarg)
{
LispObj *l;
Rect sourceRect, targetRect;
@ -391,10 +391,10 @@ lispprintlabel (scx, label, tpath, cdarg)
}
LispObj *
LispGetLabel (name,s,f)
char *name;
Sexp *s;
Sexp *f;
LispGetLabel(
char *name,
Sexp *s,
Sexp *f)
{
SearchContext scx;
TileTypeBitMask mask;
@ -458,10 +458,10 @@ LispGetLabel (name,s,f)
*/
LispObj *
LispGetSelLabel (name,s,f)
char *name;
Sexp *s;
Sexp *f;
LispGetSelLabel(
char *name,
Sexp *s,
Sexp *f)
{
SearchContext scx;
TileTypeBitMask mask;
@ -532,10 +532,10 @@ int lispprintcell (use,cdarg)
LispObj *
LispGetCellNames (name,s,f)
char *name;
Sexp *s;
Sexp *f;
LispGetCellNames(
char *name,
Sexp *s,
Sexp *f)
{
static char cellbuffer[1024];
LispObj *l;
@ -573,10 +573,10 @@ LispGetCellNames (name,s,f)
*/
LispObj *
LispEvalMagic (name,s,f)
char *name;
Sexp *s;
Sexp *f;
LispEvalMagic(
char *name,
Sexp *s,
Sexp *f)
{
LispObj *l;
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
LispEvaluate (argc, argv, inFile)
int argc;
char **argv;
int inFile;
LispEvaluate(
int argc,
char **argv,
int inFile)
{
extern Sexp *LispMainFrame;
extern LispObj *LispMainFrameObj;
@ -172,8 +172,8 @@ LispInit ()
*/
void
LispSetTech (s)
char *s;
LispSetTech(
char *s)
{
extern Sexp *LispMainFrame;
extern LispObj *LispMainFrameObj;
@ -209,8 +209,8 @@ LispSetTech (s)
*/
void
LispSetEdit (s)
char *s;
LispSetEdit(
char *s)
{
extern Sexp *LispMainFrame;
extern LispObj *LispMainFrameObj;

View File

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

View File

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

View File

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

View File

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