Subject: [clisp-list] bug report: 2.30 writes garbage to stdout

From: "Hoehle, Joerg-Cyril" <[email-masked]>
Date: Mon Nov 11 07:22:02 2002

Hi,

>A lot of CLISP low-level stuff is a hold-over from the Amiga days where
>probably there was no difference between stdout and stderr.

Er, CLISP was initially written on the Atari, in assembly language(!). When I joined in, in 1992, with interest in an Amiga port, Bruno decided that using the assembly version was a dead end - I never saw it. He and Marcus Stoll had already rewritten most (all?) parts in C - which is still very similar to the CLISP sources we see nowadays. CLISP once ran using 1,5MB of RAM on my box.

The AmigaOS distinguishes stdout from stderr, even though the AmigaOS port has never used a C std library (it used the equivalent of .dll and native OS functions instead, e.g. dos.library/Delete() instead of unlink() or remove()).

>At any rate, making asciz_out() print to stderr instead of stdout is
>probably not a very good idea.

Probably another function need be included to write to stderr (or its equivalent on other systems) - not sure. debug_out() and asciz_out() are really low-level issues, possibly from Atari times. A UNIX programmer nowadays would just presuppose the existence of stderr.

Note however that CLISP tried not to mix levels. It did not use (or not at all) use std C I/O (e.g. fopen, fprintf, stdout, stderr names) and sticked to the (UNIX-like) level below (e.g. open, read, write) - in many ports.

To me, using names like stderr or stdout means including all of C std I/O, even if it's otherwise completely avoided in the source - there was a reason.

Regards,
	Jorg Hohle.