Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!sdd.hp.com!uakari.primate.wisc.edu!aplcen!haven!mimsy!chris From: chris@mimsy.umd.edu (Chris Torek) Newsgroups: comp.text.tex Subject: Re: DVI files from Sun (etc) to Vax? Message-ID: <26181@mimsy.umd.edu> Date: 23 Aug 90 21:01:03 GMT References: Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 60 In article bglenden@mandrill.cv.nrao.edu (Brian Glendenning) writes: >Does anyone have any advice on how one can get a .dvi file from a Sun >(in my case) to a VMS VAX in a non-mangled fashion - i.e. so that the >file can be generated on the Sun but printed on the Vax? (We >have ftp/binary - I presume the problem is in byte orderings etc? Is >the problem even tractable?). Thanks. The problem is not bit or byte ordering. DVI files have an exactly defined byte order, and any machine with 8-bit bytes has the same bit order as any other machine *at the byte level* (which is where all communication takes place). The problem is, quite simply, VMS. More specifically, it is the fact that VMS has file formats. (`These concepts fill a much-needed gap in other operating systems.' [Thompson]) There is no such thing as `a file' in VMS: rather, there is `a fixed block file', `an ISAM file', `a stream-LF file' (relatively new), and so forth. The first step is to figure out what file format(s) the TeX on the VMS VAX uses. The best format would be stream-LF files, but because these are new it may use fixed 512-byte records. In any case, the next step is to find out whether the DVI interpreter software on the VMS VAX makes any special requirements. For instance, with 512-byte records, the last record may have to be padded with DVI filler bytes (code 223 decimal) to make it a multiple of 512 bytes. Once you have this information, you can decide whether DVI files from the Sun must be altered (typically by padding with filler bytes) before they can be printed---TeX pads with four to seven bytes only, so as to make the file size a multiple of four; you may need 4 to 515---and if so you must decide where to put this step (on the Sun or the VAX). Finally, you must find out how to control the FTP software on the VMS machine so as to have it write out the proper kind of file. Chances are this consists of telling it to write a `binary' file or maybe a `structured' file (but this will depend on whose FTP software you have). If you are lucky, the VMS VAX will have and use stream-LF files, the FTP software will use these for `binary' transfers, and you will be able to do something like this: foosun% ftp foovax [log in sequence] ftp>bin [acknowledgement] ftp>put foo.dvi [succeeds] ftp>quit [close down] foosun% If you are not lucky, the easiest solution is probably to write a special program on the Sun that pads the DVI file, connects to the FTP server, sends the appropriate control commands, and then sends the file. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 405 2750) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris