bts@sas.UUCP (Brian T. Schellenberger) (02/27/88)
I am having some difficulting running TeX on the Apollo and I am hoping that somebody will be able to help. I am working from old code that I inherited. The header comments on the change file say it is a merge of changes by Tom Hedges and Rick Tobin, merged by Thom Hickey at OCLC. The problem is that whenever TeX tries to read a line from a file that is more than 256 characters long, it dies with the message ``supplied buffer too small.'' I cannot seem to figure out what this message is trying to tell me. The traceback shows it dying in a call to the Pascal builtin EOF() (!) Then, in preparation for sending in a bug-report to Apollo on this, I tried to reproduce it with a simple little program. However, it won't compile due to what looks to me like *another* Pascal bug. The only thing is . . . I've not used Pascal in a long time, and I understand that Aegis is written mostly in Pascal, so I find it hard to believe that the Pascal run-time and library could possibly be this buggy! Can somebody help me??? (e-mail please, or: Brian T. Schellenberger | if I don't reply to e-mail in a week, Box 8000 SAS Circle | please post---it means we ain't communicating! Cary, NC 27513) The file I'm running on, the TeX invocation, traceback, pascal source, and error message all shown below. % cat long.tex abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456789 abcdefghijklmnopqrstuvwxyz0123456 % tex long This is TeX, Apollo version 2.0. SAS Institute Inc. (preloaded format=plain 86.9.17) Apollo fault: warning: supplied buffer too small (stream manager/IOS) % tb warning: supplied buffer too small (stream manager/IOS) In routine "PFM_$ERROR_TRAP" Called from "ERROR" line 395 Called from "PAS_$GET_CHK" line 1412 Called from "PAS_$EOF" line 2066 Called from "INPUTLN" line 443 Called from "STARTINPUT" line 2146 Called from "TEX" line 5881 Called from "PM_$CALL" % % % cat test.pas program test; %include '/sys/ins/base.ins.pas'; {Try to demo the bug} const bufsize = 80; var f : file of char; iostat : status_$t; buf : array[1..bufsize] of char; begin open( f, 'long.tex', 'OLD', iostat.all ); writeln( 'iostat.all = ', iostat.all ); reset( f ); while not eof(f) do begin writeln( 'not at end' ); {this is a comment} read( f, buf ); end end. % pas test (0024) read( f, buf ); ******** Line 24: [Error 079] Assignment statement expression is not compatible with the assignment variable. 1 error, no warnings, Pascal Rev 7.3808 -- --Brian. (Brian T. Schellenberger) ...!mcnc!rti!sas!bts DISCLAIMER: Whereas Brian Schellenberger (hereinafter "the party of the first
krowitz@mit-richter.UUCP (David Krowitz) (03/01/88)
You have indeed run into a Pascal bug which was introduced at SR9.6 It showed up in a program of mine that was using temporary pascal files (ie. I used the Pascal OPEN statement with a name of '', so that the file would go away after it was closed.) The problem went away when I started using real names for the files and explicitly deleting them when I was done. Apollo replied to my UCR and said that if I had been using something other than status='unknown', that I would not have seen the problem. (ie. I could have used file='' and status='old' and it would have worked). I haven't checked this, since I had already developed my own work around. Your OPEN statement will also have to specify a maximum record size which is large enough to handle the longest line in your file. -- David Krowitz krowitz@richter.mit.edu (18.83.0.109) krowitz%richter@eddie.mit.edu mit-erl!mit-richter!krowitz@eddie.mit.edu mit-erl!mit-richter!krowitz@mit-eddie.arpa krowitz@mit-mc.arpa (in order of decreasing preference)
lnz@edsel.UUCP (Leonard Zubkoff) (03/01/88)
I ran into this same problem, and hacked the change file to use IOS calls for input files rather than using the Pascal runtime system. I'll see if I can dredge up the code.