Small uLisp enhancement


#1

Hi,
with a common lisp background, I’m used to type :

(defun myfun(x) ....)

with no spaces between myfun and the parameters list. I’ve been hit a few minutes by strange error messages before I notice that a separation space was necessary.

So I’ve slightly modified the nextitem() function to also use the ‘(’ char as a separator :

while(!isspace(ch) && ch != ')' && ch != '(' && index < buflen){
    buffer[index++] = ch;
    int temp = digitvalue(ch);
    result = result * base + temp;
    isnumber = isnumber && (digitvalue(ch)<base);
    ch = Getc();
  }

  buffer[index] = '\0';
  if (ch == ')') LastChar = ')';
  if (ch == '(') LastChar = '(';

It seems to function but I thought I would post it to get some input from the author to be sure I’ve not broken something else :-)

Cheers,
Sébastien.


#2

Good suggestion - I’ll incorporate it in the next release.