Transcribe-file handles bad input badly

Kenny Tilton <[email protected]>
Newsgroups gmane.lisp.corman
Message-ID <[email protected]>
I am having great fun with Corman's C parser, but I tend to make this 
mistake:

(ct:transcribe-file "in" "out" :package :option-you-idiot!)

ie, I keep thinking package is a keyword arg.

Transcribe-file begins:

> (defun transcribe-file (in-file out-file 
> 				&optional (package :common-lisp-user)
> 				          (prettyp t))
>   ;; Open IN-FILE, read all forms in it and write them prettily formatted into
>   ;; OUT-FILE.  The output file will therefore have regular Lisp FFI
>   ;; declarations in place of C declaration.  The original formatting and the
>   ;; comments are, of course, lost.  The optinal PRETTYP parameter, a
>   ;; generalized boolean, determines whether the output file forms are printed
>   ;; prettily or not (default is T).
>   (when (string-equal in-file out-file)
>     (error "Input and output file names are the same."))
>   (let ((*package* (find-package package)))...

So I guess *package* gets bound to nil if there is (one would hope!) no 
package named package. This seems to make transcribe-file go away and 
not come back.

FYI


-- 

  kenny tilton
  clinisys, inc
  http://www.tilton-technology.com/
  ---------------------------------------------------------------
"Cells let us walk, talk, think, make love and realize
  the bath water is cold." -- Lorraine Lee Cudmore



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/LIgTpC/vN2EAA/xGHJAA/SyjtlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[email protected]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.