slocum@hi-csc.UUCP (Brett Slocum) (05/01/87)
I've been trying to get TeX up on our Apollo network, and I'm using the Apollo mods from srt. Everything is fine, except that the program can't read the font files in the form I got them off the Stanford distribution tape. Apollo Pascal returns an error when trying to open them, because they are of type 'uasc' when they should be type 'rec'. This is the way 'tar' created them. I've tried changing the type of the file with 'obty', I've tried a program that read the files as characters, and then wrote them as 'file of integer', nothing seems to work. Can someone give me some suggestions? I'm completely stuck.
srt@CS.UCLA.EDU (05/02/87)
> I've been trying to get TeX up on our Apollo network, > and I'm using the Apollo mods from srt. Everything is > fine, except that the program can't read the font files > in the form I got them off the Stanford distribution tape. > Apollo Pascal returns an error when trying to open them, > because they are of type 'uasc' when they should be type > 'rec'. This is the way 'tar' created them. I've tried > changing the type of the file with 'obty', I've tried > a program that read the files as characters, and then > wrote them as 'file of integer', nothing seems to work. Aaah. I'd forgotten about this (and I've forgotten how I fixed it). I believe the trick I used was to create a 0 length file of the appropriate type (rec) by writing a little Pascal program (or maybe by using obty). Then I'd do the following (using trip.tfm as an example): % mv trip.tfm trip.tfm.old ; rename UASC % cp foo trip.tfm ; copy 0 length rec file ; to the correct name % cat trip.tfm.old >> trip.tfm ; dump UASC -> REC Strangely enough, this works. You'll note that the file changes sizes when it gets turned into a REC, which seems quite reasonable. I thought I wrote a shell script to do this, but I can't find it so you'll have to recreate it. Hope this helps! -- Scott Turner
madler@apollo.UUCP (05/05/87)
Actually, Apollo Pascal doesn't require that an existing FILE OF FOO be a REC file. It only expects that non-text files be marked as binary, not ascii, data. You can use the following program to set the binary bit in the files' headers. The program takes the target file name from the command line. -Michael Adler Apollo Computer PROGRAM set_binary; %NOLIST; %INCLUDE '/sys/ins/base.ins.pas'; %INCLUDE '/sys/ins/ios.ins.pas'; %INCLUDE '/sys/ins/pgm.ins.pas'; %INCLUDE '/sys/ins/error.ins.pas'; %LIST; VAR status : status_$t; ios_id : ios_$id_t; pname : name_$pname_t; pname_len : integer; PROCEDURE error_check( IN status: status_$t ); BEGIN IF status.all <> status_$ok THEN BEGIN error_$print( status ); pgm_$set_severity( pgm_$error ); pgm_$exit; END; END; BEGIN pname_len := pgm_$get_arg( 1, pname, status, SIZEOF( pname ) ); error_check( status ); ios_id := ios_$open( pname, pname_len, [ios_$write_opt], status ); error_check( status ); ios_$set_obj_flag( ios_id, ios_$of_ascii, FALSE, status ); error_check( status ); ios_$close( ios_id, status ); error_check( status ); END.
slocum@hi-csc.UUCP (Brett Slocum) (05/12/87)
I tried srt's fix to my problem, and it didn't work. When I did the 'cat cmr10.tfm.old >> cmr10.tfm' command, I got the error message 'cmr10.tfm: No such file or directory'. The file did get created as 'rec', and the size was 1024, instead of 1328, but when I ran 'initex plain \\dump' (cmr10.tfm is the first file to be read by this), it still said '! Font \tenrm=cmr10 not loadable: Metric (TFM) file not found.' When I tried Michael Adler's solution, the program worked okay, but when I ran 'initex', this time I got '! Font \tenrm=cmr10 not loadable: Bad metric (TFM) file.' It apparently found the file, but it was damaged, or something. Anymore ideas, anyone? --Brett Slocum ...ihnp4!umn-cs!hi-csc!slocum hi-csc!slocum@umn-cs.arpa