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