Subject: [clisp-list] Problems with latest CVS version of comment5.c

From: Aurelio Bignoli <[email-masked]>
Date: Wed Jul 31 15:51:04 2002

Yesterday I updated my local copy from CVS and then I tried to rebuild
CLISP, but I got the following error:

$ make
gcc -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type  -fomit-frame-pointer -Wno-sign-compare -O2 -fexpensive-optimizations -DUNICODE -DDYNAMIC_FFI -I. -x none ../utils/comment5.c -o comment5
ln -s ../utils/ansidecl.d ansidecl.d
./comment5 ansidecl.d ansidecl.c
ansidecl.d: Success
make: *** [ansidecl] Error 124
$

When not zero, comment5 exit status is the number of the line where
the error occurred:

   120    /* close files: */
   121    fclose(infile);
   122    fclose(outfile);
   123    if (ferror(infile))
   124      { perror(infilenamebuffer); exit(__LINE__); }
   125    if (ferror(outfile))
   126      { perror(outfilenamebuffer); exit(__LINE__); }
   127    exit(0); /* OK */

Does it make sense to test file error after closing the file? I moved
the tests before fclose and it worked as usual.

Ciao,
Aurelio

-- 
   Aurelio Bignoli
   Via Viviani, 10                  [email-masked]
   I-28100 Novara NO   Italia