continued formatting work
This commit is contained in:
parent
52debcf045
commit
a3a83f692c
|
@ -2278,34 +2278,55 @@ builtinp(symbol_t name)
|
|||
return (untwist(name) >= BUILTINS);
|
||||
}
|
||||
|
||||
int checkkeyword (object *obj) {
|
||||
if (!keywordp(obj)) error("argument is not a keyword", obj);
|
||||
builtin_t kname = builtin(obj->name);
|
||||
uint8_t context = getminmax(kname);
|
||||
if (context != 0 && context != Context) error(invalidkey, obj);
|
||||
return ((int)lookupfn(kname));
|
||||
int
|
||||
checkkeyword(object *obj)
|
||||
{
|
||||
if (!keywordp(obj)) {
|
||||
error("argument is not a keyword", obj);
|
||||
}
|
||||
|
||||
builtin_t kname = builtin(obj->name);
|
||||
uint8_t context = getminmax(kname);
|
||||
if (context != 0 && context !e Context) {
|
||||
error(invalidkey, obj);
|
||||
}
|
||||
|
||||
return ((int)lookupfn(kname));
|
||||
}
|
||||
|
||||
/*
|
||||
checkargs - checks that the number of objects in the list args
|
||||
is within the range specified in the symbol lookup table
|
||||
*/
|
||||
void checkargs (object *args) {
|
||||
int nargs = listlength(args);
|
||||
checkminmax(Context, nargs);
|
||||
void
|
||||
checkargs(object *args)
|
||||
{
|
||||
int nargs = listlength(args);
|
||||
|
||||
checkminmax(Context, nargs);
|
||||
}
|
||||
|
||||
/*
|
||||
eqlongsymbol - checks whether two long symbols are equal
|
||||
*/
|
||||
bool eqlongsymbol (symbol_t sym1, symbol_t sym2) {
|
||||
object *arg1 = (object *)sym1; object *arg2 = (object *)sym2;
|
||||
while ((arg1 != NULL) || (arg2 != NULL)) {
|
||||
if (arg1 == NULL || arg2 == NULL) return false;
|
||||
if (arg1->chars != arg2->chars) return false;
|
||||
arg1 = car(arg1); arg2 = car(arg2);
|
||||
}
|
||||
return true;
|
||||
bool
|
||||
eqlongsymbol(symbol_t sym1, symbol_t sym2)
|
||||
{
|
||||
object *arg1 = (object *)sym1; object *arg2 = (object *)sym2;
|
||||
|
||||
while ((arg1 != NULL) || (arg2 != NULL)) {
|
||||
if (arg1 == NULL || arg2 == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (arg1->chars != arg2->chars) {
|
||||
return false;
|
||||
}
|
||||
|
||||
arg1 = car(arg1); arg2 = car(arg2);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue