Menu

#445 read-preserving-whitespace eats whitespace after quoted obj

closed-fixed
clisp (524)
5
2008-02-11
2008-02-11
No

Bug Info (also see Version Info below):

I believe I have found a bug in CLISP involving read-preserving-whitespace. It would seem that if you enter a quoted object to read-preserving-whitespace, it will eat the whitespace character immediately following the object (typically a newline). This can be demonstrated with the following test case (under CLISP 2.42 mingw small):

[7]> (progn (read-preserving-whitespace) (read-char-no-hang))
'a
NIL
[8]> (progn (read-preserving-whitespace) (read-char-no-hang))
a
#\Newline

Under SBCL, this works properly:

* (progn (read-preserving-whitespace) (read-char-no-hang))
'a

#\Newline
* (progn (read-preserving-whitespace) (read-char-no-hang))
a

#\Newline

Note that it only eats up one whitespace character, so if you enter a space following 'a before the newline, then it seems to get the newline properly:

[9]> (progn (read-preserving-whitespace) (read-char-no-hang))
'a[#\Space]
#\Newline

Version Info:

Windows XP SP 2. Using clisp-2.42-win32-with-readline-and-gettext.zip, downloaded on about 2007-11-21. Also tried clisp-2.44-win32-mingw-big-install.exe.

> clisp --version
GNU CLISP 2.42 (2007-10-16) (built on stnt067 [192.168.0.1])
Software: GNU C 3.4.5 (mingw special)
gcc -mno-cygwin -O2 -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-ty
pe -Wmissing-declarations -Wno-sign-compare -O2 -fexpensive-optimizations -falig
n-functions=4 -D_WIN32 -DUNICODE -DDYNAMIC_FFI -I. -x none /usr/local/lib/libint
l.a -L/usr/local/lib -L/mingw/lib /usr/local/lib/libiconv.a -L/usr/local/lib lib
charset.a libavcall.a libcallback.a /usr/local/lib/libreadline.a -ltermcap -lus
er32 -lws2_32 -lole32 -loleaut32 -luuid /usr/local/lib/libiconv.a -L/usr/local/l
ib -L/mingw/lib -L/usr/local/lib -lsigsegv
SAFETY=0 HEAPCODES STANDARD_HEAPCODES GENERATIONAL_GC SPVW_BLOCKS SPVW_MIXED TRI
VIALMAP_MEMORY
libsigsegv 2.4
libiconv 1.11
libreadline 5.0
Features:
(READLINE REGEXP SYSCALLS I18N LOOP COMPILER CLOS MOP CLISP ANSI-CL COMMON-LISP
LISP=CL INTERPRETER SOCKETS GENERIC-STREAMS LOGICAL-PATHNAMES SCREEN FFI
GETTEXT UNICODE BASE-CHAR=CHARACTER PC386 WIN32)
C Modules: (clisp i18n syscalls regexp readline)
Installation directory: C:\Program Files\clisp-2.42\ User language: ENGLISH
Machine: PC/386 (PC/?86) blackthorn [128.54.223.161]

Discussion

  • Sam Steingold

    Sam Steingold - 2008-02-11

    Logged In: YES
    user_id=5735
    Originator: NO

    thank you for your bug report.
    the bug has been fixed in the CVS tree.
    you can either wait for the next release (recommended)
    or check out the current CVS tree (see http://clisp.cons.org\)
    and build CLISP from the sources (be advised that between
    releases the CVS tree is very unstable and may not even build
    on your platform).

     
  • Sam Steingold

    Sam Steingold - 2008-02-11
    • assigned_to: haible --> sds
    • status: open --> closed-fixed
     

Log in to post a comment.