1
- /* uLisp ESP Version 4.0 - www.ulisp.com
2
- David Johnson-Davies - www.technoblogy.com - 7th July 2021
1
+ /* uLisp ESP Version 4.0a - www.ulisp.com
2
+ David Johnson-Davies - www.technoblogy.com - 9th July 2021
3
3
4
4
Licensed under the MIT license: https://opensource.org/licenses/MIT
5
5
*/
@@ -1223,7 +1223,7 @@ object *closure (int tc, symbol_t name, object *function, object *args, object *
1223
1223
return tf_progn (function, *env);
1224
1224
}
1225
1225
1226
- object *apply (symbol_t name, object *function, object *args, object *env) {
1226
+ object *apply (builtin_t name, object *function, object *args, object *env) {
1227
1227
if (symbolp (function)) {
1228
1228
builtin_t fname = builtin (function->name );
1229
1229
if ((fname > FUNCTIONS) && (fname < KEYWORDS)) {
@@ -1232,15 +1232,15 @@ object *apply (symbol_t name, object *function, object *args, object *env) {
1232
1232
} else function = eval (function, env);
1233
1233
}
1234
1234
if (consp (function) && isbuiltin (car (function), LAMBDA)) {
1235
- object *result = closure (0 , name, function, args, &env);
1235
+ object *result = closure (0 , sym ( name) , function, args, &env);
1236
1236
return eval (result, env);
1237
1237
}
1238
1238
if (consp (function) && isbuiltin (car (function), CLOSURE)) {
1239
1239
function = cdr (function);
1240
- object *result = closure (0 , name, function, args, &env);
1240
+ object *result = closure (0 , sym ( name) , function, args, &env);
1241
1241
return eval (result, env);
1242
1242
}
1243
- errorsym (name, PSTR (" illegal function" ), function);
1243
+ error (name, PSTR (" illegal function" ), function);
1244
1244
return NULL ;
1245
1245
}
1246
1246
@@ -4658,8 +4658,9 @@ void pradix40 (symbol_t name, pfun_t pfun) {
4658
4658
uint32_t x = untwist (name);
4659
4659
for (int d=102400000 ; d>0 ; d = d/40 ) {
4660
4660
uint32_t j = x/d;
4661
- pfun (fromradix40 (j));
4662
- x = x - j*d;
4661
+ char c = fromradix40 (j);
4662
+ if (c == 0 ) return ;
4663
+ pfun (c); x = x - j*d;
4663
4664
}
4664
4665
}
4665
4666
0 commit comments