[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Removing character styles from files.
Mark Tait asked about a function for stripping character styles out
of files. Here is one I wrote some time ago. Note that it only works if
you run it on the Symbolics *before* shipping the file over to the Sun,
as it makes use of the Symbolics-specific "string-thin". A more useful one
would work on the Sun after the file is already there, but, hey, this is
what I already had. :-)
- Marty Hall
------------------------------------------------------
hall@aplcen.apl.jhu.edu, hall%aplcen@jhunix.bitnet, ..uunet!aplcen!hall
Artificial Intelligence Lab, AAI Corp, PO Box 126, Hunt Valley, MD 21030
(setf (need-p 'disclaimer) NIL)
============================== Cut Here ==============================
(defun Strip-Fonts-from-File (Input-File &optional (Output-File Input-File))
(let (Line)
(with-open-file (Input Input-File)
(with-open-file (Output (concatenate 'string Output-File ".newest")
:direction :output)
(loop
(setq Line (read-line Input nil 'Done))
(if
(equal Line 'Done)
(return "All Done")
(format Output "~%~A" (string-thin Line)))) ))
))