diff --git a/lib-src/libnyquist/nyquist/xlisp/xlftab.c b/lib-src/libnyquist/nyquist/xlisp/xlftab.c index 07f65170c..559b37f8a 100644 --- a/lib-src/libnyquist/nyquist/xlisp/xlftab.c +++ b/lib-src/libnyquist/nyquist/xlisp/xlftab.c @@ -4,6 +4,8 @@ Permission is granted for unrestricted non-commercial use HISTORY +23-Apr-11 Dannenberg/Crook + EXIT instruction removed by using NULL for funtab[195].fd_name. 23-Apr-03 Mazzoni Eliminated some compiler warnings 1-Apr-88 Dale Amon at CSD @@ -357,7 +359,7 @@ FUNDEF funtab[] = { /* end of functions specific to xldmem.c */ { "TYPE-OF", S, xtype }, /* 194 */ -{ "EXIT", S, xexit }, /* 195 */ +{ NULL, S, xexit }, /* 195 */ /* fd_name used to be "EXIT" */ #ifdef PEEK_AND_POKE { "PEEK", S, xpeek }, /* 196 */ { "POKE", S, xpoke }, /* 197 */ diff --git a/lib-src/libnyquist/nyquist/xlisp/xlisp.c b/lib-src/libnyquist/nyquist/xlisp/xlisp.c index 8b2a3958e..9fba0c082 100644 --- a/lib-src/libnyquist/nyquist/xlisp/xlisp.c +++ b/lib-src/libnyquist/nyquist/xlisp/xlisp.c @@ -4,6 +4,7 @@ Permission is granted for unrestricted non-commercial use */ /* CHANGELOG: + 23 Apr 11 (Dannenberg/Crook) xlrand() now retuns zero on zero range. 8 Oct 90 (Dannenberg) changed main() to xlisp_main_init and xlisp_main. made xlisp run as a module that evaluates expressions and retains state @@ -76,11 +77,12 @@ long random() { /* xlrand - return next random number in sequence */ long xlrand (long range) { + if (range == 0) return 0; #ifdef USE_RAND - return rand() % range; + return rand() % range; #endif #ifdef USE_RANDOM - return random() % range; + return random() % range; #endif }