weinrich@lightning.rutgers.edu (Timothy M. Weinrich) (03/09/89)
I have 2 Xerox Lisp machines. One is an 1109 and is connected to a Unix fileserver. The other is an 1108 and is not connected to any fileserver. I have a couple of files on the fileserver which were produced in Emacs, but which will load into the 1109 just fine. (One has Interlisp source, and is loaded via il:load, the other is a clisp file, and is loaded via xcl:load.) Recently I copied these files onto floppies and tried to load them into the 1108. They will not load. I get an error concerning having hit the end of file. A bit of probing has strongly implied that the loaders are failing to recognize the newlines in the file. Our fileserver uses ^J (Ascii 10) as a newline, so that is what appears on the floppy, but at least the clisp window (xcl:load) seems to believe that ^M (Ascii 13) is the newline. (I suspect that il:load makes the same assumption.) My conjecture is that Lisp decides what the newline character is depending on where it is reading the file from. So, a file on Unix with ^J as a newline will load just fine, but the identical file on a floppy will not load. Has anyone else had similar problems? Am I correct about the cause? Does anyone know of a clean way to fix it? I would prefer to avoid putting these files into Makefile format if I can help it. Twinerik
cutting.pa@XEROX.COM (03/10/89)
"Recently I copied these files onto floppies and tried to load them into the 1108 ..." "Our fileserver uses ^J (Ascii 10) as a newline, so that is what appears on the floppy ..." These two should not follow. COPYFILE of a text file should do EOL conversion, and FLOPPY's EOL convention is CR (^M). I'd guess that the problem is that COPYFILE for thought the file was a binary because it couldn't find its extension on TCPFTP.DEFALT.FILETYPES, and TCP.DEFAULTFILETYPE is set to BINARY. Add an entry to the former, or set the latter to TEXT, and try copying the files to floppy again. Doug
vanMelle.pa@XEROX.COM (03/10/89)
There is a bug in Floppy in that it does not do EOL conversion on COPYFILE. This is why your floppies have the wrong eol. Patch: (ADVISE '(\PFLOPPY.SETFILEINFO IN \PFLOPPY.OPENFILE) 'BEFORE '(AND (EQ ATTRIBUTE 'EOL) (RETURN))). I assume the premature end of file occurs because the semi-colon reader never finds an eol (i.e., you must be breaking underneath cmlreadsemi). Bill