TeXhax Digest Friday, August 26, 1988 Volume 88 : Issue 77 Moderator: Malcolm Brown Today's Topics: Minor insect in DVI2LN3 V13.0 DVI (with tpic specials) drivers -- Summary Danish letters in LaTeX headings Re: TeXhax Digest V88 #72 LETTER.STY and MERGE.STY Re: TeXhax LaTeX Style for Arizona State Univ. Thesis Wanted date in letters Hercules Driver Using Beebe's Stuff? Wanted (alive): Gary McClelland GFtoPK change file for VMS ---------------------------------------------------------------------- Date: Sun 21 Aug 88 18:01:17-PDT From: BELL%KUPHSX.SPAN@STAR.STANFORD.EDU (Did someone need a Subject: Minor insect in DVI2LN3 V13.0 This is to inform everyone of a minor bug in DVI2LN3 V13.0. The bug is simple to fix and does not require any other alteration. The line to be fixed is in DVI2LN3PK.C and is in the line which issues the Bad PK File error message (printf("\n%DVI2LN3-I-BDPKFL...). I erroneously refer to the variable pkf in the line...that is wrong. The variable referred to in should be font_name[txfno]. If you make this substitution, there should be no problem. No update in version number or date is required. Anyone who received the new driver after August 17 (1988) has the correct version. Thanks to UCC2JDC@NAUVM (no name given) for pointing this error out to me. Ed Bell Dept. of Physics & Astronomy The University of Kansas ------------------------------ Date: Mon, 22 Aug 88 11:10:03 PDT From: kwok@iris.ucdavis.edu (Conrad Kwok) Subject: DVI (with tpic specials) drivers -- Summary First, thanks to all who have responsed to my question. It seems to me that not many DVI drivers currently support tpic specials but a number of people are planning to support tpic specials in their new DVI drivers. Here is the summary. 1) "iptex" written by Chris Torek --- This is for imagen printer. It is included in the UNIX TeX distribution. It is also available for anonymous ftp from a.cs.uiuc.edu in the file iptex.tar 2) "texx" written by Dirk Grunwald --- DVI previewers for X11. It supports most of the tpic specials but not all. It is part of the iptex package. See 1) above. 3) "texsun" written by Dirk Grunwald --- DVI previewers for Sunview window system. It supports most of the tpic specials. It is also part of the iptex package. See 1) above. 4) "dvips" written by Tomas Rokicki and tpic special codes are added by Dorab Patel --- A DVI to Postscript translator. It is available for anonymous ftp from labrea.stanford.edu. 5) L. Michael Gray in the University of New Hamsphire said he has modified dln01 (for DEC LN01S), dvi2ps and xdvi (for X10.4) to handle tpic specials. He may be reached at lmg%unhcs@RELAY.CS.NET. 6) "dviis" previewers for Integrated Solutions. I think it is available on june.cs.washington.edu. 7) DVI previewers written by Randy Buckland for VMS vaxstations. The program is written in Ada. The executable is available for anonymous ftp from argon.rti.org [128.109.139.64]. 8) There are a number of DVI drivers in science.utah.edu but I don't know which one support tpic specials and who one don't. Some of the information here come at second hand. Correct me if any of these are wrong. If you know any DVI drivers that support tpic specials but they are not list here. Please send me a message so that I can keep this list up-to-date. Thanks. --Conrad internet: kwok@iris.ucdavis.edu csnet: kwok@ucd.csnet csnet: kwok%iris.ucdavis.edu@csnet.relay uucp: {ucbvax, uunet, ... }!ucdavis!iris!kwok ------------------------------ Date: Mon, 22 Aug 88 00:02 MET From: Depart. of Economics Subject: Danish letters in LaTeX headings Hello networkers! When LaTeX makes headings, it converts the titles of the \section s into caps as default. This works well until Danish characters are used. To solve the problem, we tried the following TeX-commands: \uccode`\~~Z=`\~~] % \ae \uccode`\~~]=`\~~] % \AE \uccode`\~~\=`\~~_ % \o \uccode`\~~_=`\~~_ % \O but it did not give any result! - And there were no error messages. Surprisingly, the last Scandinavian character \AA \aa did not give any problems! Can anyone help? Thanx in advance! Sincerely Per N. D. Bukh Gustav Jeppesen University of Aarhus Denmark. ECOMAIL@VMS2.UNI-C.DK ------------------------------ Date: Sat, 20 Aug 88 11:48:37 mes From: Michael Haberler Subject: Re: TeXhax Digest V88 #72 TeXhax@Score.Stanford.EDU (TeXhax Digest): > > Where can i get (FTP is ok) a DVI postprocessor that will support HP Try neumann@awiwuw11.bitnet (Dr. Gustaf Neumann). Michael Haberler mah@hpuviea.UUCP Hewlett-Packard Austria GmbH, ...mcvax!tuvie!hpuviea!mah A-1220 Vienna, Austria ...hplabs!hpfcla!hpbbse!hpuviea!mah (0043) (222) 2500 x412 (9-18 CET) michl@awiwuw11.bitnet ------------------------------ Date: Tue, 23 Aug 88 13:17:33 MEZ From: Erich Neuwirth Subject: LETTER.STY and MERGE.STY I have a problem with letter.sty (well, with a modified version, but the same problem appears with letter.sty, I have tested that). I want to use MERGE.STY by Graeme McKinstry as published in TUGBoat 8/1 to do form letters. In principle this works, but with one exception. I am using multiline-addresses and I want to use the recipients name, i.e. the first line of the address, in the header of page 2 an later. LETTER.STY by Leslie Lamport provides a mechanism for that. The \sendingaddress is split in two parts, namely \toname and \toaddress. As long as I use \begin{letter}{firstaddressline\\ secondaddressline} in the letter directly everything is ok. MERGE.STY works by using \begin{letter}{\sendaddress} in a macro where \sendadress is defined via \global\read\addrfile to\sendaddress in another macro. Somehow by all this calls the \processto macro which does the separation into \toname and \toaddress seems not to be able to handle the \\ which is read into \sendaddress correctly, \toname also contains secondaddressline if the lines read in from the addressfile contained a two line address. I there an easy cure for my problem? I enclose a copy of MERGE.STY and of a letter showing my problem ------------------------------- cut here ---------------------------- % merge.sty \typeout{Merge substyle-release 6 October 1986 by Graeme McKinstry} \newbox\store \long\def\contents{\global\setbox\store=\vbox\bgroup} % store the contents \long\def\endcontents{\egroup} % of the letter \def\sendaddress{test} \def\openingtext{test} \newif\iffirsttime \firsttimetrue \newread\addrfile % allocate an input stream \def\@openfile{\openin\addrfile=\mergef@le % open the address file \ifeof\addrfile % i. e., didn't open successfully \loop \immediate\write16{Could not open file \mergefi@le} \closein\addrfile % close the input stream \read16 to \mergef@le % get another filename \openin\addrfile=\mergef@le % open up input stream \ifeof\addrfile \repeat % repeat until successfully opened \fi } \def\merge#1{\def\mergef@le{#1 }\@openfile\readfile \contents} \def\readfile{\global\read\addrfile to\sendaddress % get the address \ifeof\addrfile \else \global\read\addrfile to \openingtext % get the % opening line \iffirsttime \else \endmerge \fi \fi} \newbox\l@tterbox \def\endmerge{\iffirsttime\endcontents\global\firsttimefalse\fi % % end contents if it is the first time \begin{letter}{\sendaddress} \opening{\openingtext\vskip2\parskip} \setbox\l@tterbox=\copy\store % copy the contents % of the letter \unvbox\l@tterbox \end{letter} \ifeof\addrfile \message{End of file} \else \readfile % loop round yet again \fi} ------------------------------- cut here ---------------------------- % testlet.tex \documentstyle[merge]{letter} \address{Erich Neuwirth} \signature{Erich Neuwirth} \pagestyle{headings} \begin{document} \begin{merge}{adfile} This is a Test \newpage And this is the second page \closing{das wars} \end{merge} \end{document} ------------------------------- cut here ---------------------------- % adfile.tex, but REMOVE THIS LINE before using the file. {Konrad Neuwirth \\ Fernkorngasse 44/2/4} {Dear Konrad} {Gabriele Neuwirth \\ Fernkorngasse 44/2/4} {Dear Gabi} ------------------------------- cut here ---------------------------- The last file also MUST NOT contain empty lines at the end -------------------------------------------------------------- ERICH NEUWIRTH A4422DAB at AWIUNI11 in BITNET Intitute for Statistics and Computer Science University of Vienna Universitaetsstr. 5/9 A-1010 VIENNA, Austria ------------------------------ From: VEUILLEN%CERNVM.BITNET@Forsythe.Stanford.EDU Subject: Re: TeXhax I am writing a manual with more than 99 subsections in a section whose number is above 9, and this leads to overwriting in the table of contents. Here follows a minimal TeX file which illustrates the problem. You will notice that I tried to solve it (dottedtocline lines), but to no avail. Thank you very much for your help. %macropackage=LPLAIN \documentstyle[11pt,twoside,A4]{report} %\makeindex \pagestyle{headings} \def\l@section{\@dottedtocline{1}{2.5em}{3.5em}} \def\l@subsection{\@dottedtocline{2}{4.8em}{3.7em}} \makeatother \begin{document} \pagenumbering{roman} \tableofcontents \chapter{Alphabetical Reference List1} \chapter{Alphabetical Reference List2} \chapter{Alphabetical Reference List3} \chapter{Alphabetical Reference List4} \chapter{Alphabetical Reference List5} \chapter{Alphabetical Reference List6} \chapter{Alphabetical Reference List7} \chapter{Alphabetical Reference List8} \chapter{Alphabetical Reference List9} \chapter{Alphabetical Reference List10} \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \section{BUMPST. Steps pointers} \par text \end{document} ------------------------------ Date: Tue, 23 Aug 88 12:31:04 PDT From: forrest@Csa3.LBL.Gov Subject: LaTeX Style for Arizona State Univ. Thesis Wanted Does anyone either know of or have anything to say about a style file that is acceptable for a Master's Thesis at Arizona State University (in the Anthropology Dept. if it matters). I'm already aware of Yap's collection but didn't see one for ASU. Thanks, Jon Forrest FORREST@LBL.GOV ucbvax!lbl-csam!ux1!forrest ------------------------------ Date: Tue, 23 Aug 88 15:39:11 EDT From: toms@ncifcrf.gov Subject: date in letters When I use the LaTeX letter environment I automatically have a date supplied. But the date given is always today, not the day that I wrote and sent the letter, so if I print out a copy of the letter later I get the wrong date. I cannot locate anyplace in the manual that says how to over ride this (under date or letter or today or whatever), or even how to prevent the date from showing (so that I can insert my own). So: how do I prevent dates or over ride the default? \date{mydate} doesn't work. Tom Schneider toms@ncifcrf.gov ------------------------------ Date: Tue, 23 Aug 88 12:36:37 PDT From: forrest@Csa3.LBL.Gov Subject: Hercules Driver Using Beebe's Stuff? I've been thinking about using Beebe's stuff to make a Hercules driver. Has anyone already done so or have anything to say about this? I've started messing with Beebe's code and found that the makefile for Microsoft C seems to require too much memory for the Make program that comes with MSC 5.1. Borland's Make seems to do a better job. Also, I noted that Quick C seems to initially only support the medium memory model. I'll have to look deeper in the documentation to see if there are any ways around this. Does anyone have anything to say about using Turbo C with Beebe's stuff? Jon Forrest FORREST@LBL.GOV ucbvax!lbl-csam!ux1!forrest ------------------------------ Date: Tue, 23 Aug 88 18:05:53 PDT From: lamport@src.dec.com (Leslie Lamport) Subject: Wanted (alive): Gary McClelland Would the person whose return address on a message to V88 #75 was listed as "Gary McClelland, x8122, Psych CB 345" please send me his real net address--or a more complete phone number. Thanks, Leslie Lamport (lamport@src.dec.com) ------------------------------ Date: Tue, 23 Aug 88 22:11:40 EDT From: ingr!b11!guy@uunet.UU.NET Subject: GFtoPK change file for VMS I have seen several people asking for a VAX/VMS change file for GFtoPK. I have one I finessed :-) from another change file. It works for me. Guy Streeter ...uunet!ingr!b11!guy (UUCP) ingr!b11!guy@uunet.uu.net (ARPANET) ================================================================ GFtoPK change file for VAX/VMS Hacked blindly from the GFtoPXL change file Guy Streeter, 18 Apr 88 @x \pageno=\contentspagenumber \advance\pageno by 1 @y \pageno=\contentspagenumber \advance\pageno by 1 \def\title{GFtoPK changes for Vax/VMS} @z @x @d banner=='This is GFtoPK, Version 1.2' {printed when the program starts} @y @d banner=='This is GFtoPK, Vax/VMS Version 1.2' @z @x @d othercases == others: {default for cases not listed explicitly} @d endcases == @+end {follows the default case in an extended |case| statement} @y @d othercases == otherwise {Vax/VMS default for cases not listed explicitly} @d endcases == @+end {follows the default case in an extended |case| statement} @z @x @p program GFtoPK(@!gf_file,@!pxl_file,@!output); @y @p @\@=[inherit('sys$library:starlet')]@>@\ program GF_to_PK(@!gf_file,@!pk_file,@!input,@!output); var i:integer; @z @x procedure initialize; {this procedure gets things started properly} var i:integer; {loop index for initializations} begin print_ln(banner);@/ @y @@\ procedure initialize; {this procedure gets things started properly} var i:integer; {loop index for initializations} begin @@\ print_ln(banner);@/ @z @x @!byte_file=packed file of eight_bits; {files that contain binary data} @y {later we'll define files that contain binary date} @z @x @!gf_file:byte_file; {the stuff we are \.{GFtoPK}ing} @!pk_file:byte_file; {the stuff we have \.{GFtoPK}ed} @y @!gf_file:packed file of byte_block; {the stuff we are \.{GFtoPK}ing} @!pk_file:packed file of byte_block; {the stuff we have \.{GFtoPK}ed} @!gf_count:integer; {number of bytes read from current block of |gf_file|} @!pk_count:integer; {number of bytes written to current block of |pk_file|} @!gf_blocks:integer; {number of blocks in |gf_file|} @z @x begin reset(gf_file); @y begin reset(gf_file); gf_count:=0; @z @x begin rewrite(pk_file); @y begin rewrite(pk_file); pk_count:=0; @z @x @p function gf_byte:integer; {returns the next byte, unsigned} var b:eight_bits; begin if eof(gf_file) then bad_gf('Unexpected end of file!') else begin read(gf_file,b); gf_byte:=b; end; incr(gf_loc); end; @# function gf_signed_quad:integer; {returns the next four bytes, signed} var a,@!b,@!c,@!d:eight_bits; begin read(gf_file,a); read(gf_file,b); read(gf_file,c); read(gf_file,d); if a<128 then gf_signed_quad:=((a*256+b)*256+c)*256+d else gf_signed_quad:=(((a-256)*256+b)*256+c)*256+d; gf_loc := gf_loc + 4 ; end; @y @d read_gf_file(#)==begin if gf_count=VAX_block_length then begin get(gf_file,@=error:=continue@>); gf_count:=0; end; #:=gf_file^[gf_count]; incr(gf_count); end @p function gf_byte:integer; {returns the next byte, unsigned} var b:eight_bits; begin if eof(gf_file) then bad_gf('Unexpected end of file!') else begin read_gf_file(b); incr(gf_loc); gf_byte:=b; end; end; @# function gf_signed_quad:integer; {returns the next four bytes, signed} var a,@!b,@!c,@!d:eight_bits; begin read_gf_file(a); read_gf_file(b); read_gf_file(c); read_gf_file(d); gf_loc:=gf_loc+4; if a<128 then gf_signed_quad:=((a*256+b)*256+c)*256+d else gf_signed_quad:=(((a-256)*256+b)*256+c)*256+d; end; @z @x write(pk_file, a) ; @y pk_file^[pk_count]:=a; incr(pk_count); if pk_count=VAX_block_length then begin put(pk_file,@=error:=continue@>); pk_count:=0; end; @z @x write(pk_file, a div 256) ; write(pk_file, a mod 256) ; pk_loc := pk_loc + 2 ; @y pk_byte( a div 256 ) ; pk_byte( a mod 256 ) ; @z @x write(pk_file, a div 65536 mod 256) ; write(pk_file, a div 256 mod 256) ; write(pk_file, a mod 256) ; pk_loc := pk_loc + 3 ; @y pk_byte ( a div 65536 mod 256 ) ; pk_byte ( a div 256 mod 256 ) ; pk_byte ( a mod 256 ) ; @z @x write(pk_file, b) ; write(pk_file, a div 65536 mod 256) ; write(pk_file, a div 256 mod 256) ; write(pk_file, a mod 256) ; pk_loc := pk_loc + 4 ; @y pk_byte ( b ) ; pk_byte ( a div 65536 mod 256 ) ; pk_byte ( a div 256 mod 256 ) ; pk_byte ( a mod 256 ) ; @z @x set_pos(gf_file, -1) ; gf_len := cur_pos(gf_file) ; @y gf_len:=gf_blocks*VAX_block_length-1; @z @x begin set_pos(gf_file, n); gf_loc := n ; @y var @!blk,@!byt:integer; {block and byte number} begin gf_loc:=n; blk:=n div VAX_block_length; byt:=n-(blk*VAX_block_length); @=find@>(gf_file,blk+1); {VMS starts counting block numbers at 1} gf_count:=byt; @z @x values. The |status| array contains @y values. The |chstat| array contains @z @x @!status: array[0..255] of virgin..sent; {character status} @y @!chstat: array[0..255] of virgin..sent; {character status} @z @x @ Here we initialize all of the character |status| values to |virgin|. @y @ Here we initialize all of the character |chstat| values to |virgin|. @z @x status[i] := virgin ; @y chstat[i] := virgin ; @z @x if status[gf_ch_mod_256] = virgin then begin @y if chstat[gf_ch_mod_256] = virgin then begin @z @x status[gf_ch_mod_256] := sent ; @y chstat[gf_ch_mod_256] := sent ; @z @x if status[gf_ch] <> virgin then @y if chstat[gf_ch] <> virgin then @z @x status[gf_ch] := located ; @y chstat[gf_ch] := located ; @z @x if status[i] = located then @y if chstat[i] = located then @z @x final_end : end . @y while pk_count>0 do pk_byte(0); close(pk_file,@=disposition:=save@>,@=error:=continue@>); final_end : end . @z @x This section should be replaced, if necessary, by changes to the program that are necessary to make \.{GFtoPK} work at a particular installation. It is usually best to design your change file so that all changes to previous sections preserve the section numbering; then everybody's version will be consistent with the printed program. More extensive changes, which introduce new sections, can be inserted here; then only the index itself will get a new section number. @y Here are the remaining changes to the program that are necessary to make \.{GFtoPXL} work on Vax/VMS. @== @!VAX_block_length=512; @ @== @!byte_block=packed array [0..VAX_block_length-1] of 0..255; @ On Vax/VMS we need the following special definitions, types, variables and procedures to be able to get the file name from the command line, or to prompt for them. @d VAX_direct==@=direct@> @d VAX_fixed==@=fixed@> @d VAX_volatile==@=volatile@> @d VAX_immed==@=%immed @> @d VAX_external==@=external@> @d VAX_stdescr==@=%stdescr @> @d VAX_lib_get_foreign==@= lib$get_foreign@> @d VAX_length==@=length @> @d VAX_fab_type==@= FAB$TYPE @> @d VAX_rab_type==@= RAB$TYPE @> @d VAX_xab_type==@= XAB$TYPE @> @d VAX_fab_xab==@= FAB$L_XAB @> @d VAX_xab_nxt==@= XAB$L_NXT @> @d VAX_xab_cod==@= XAB$B_COD @> @d VAX_xab_fhc==@= XAB$C_FHC @> @d VAX_xab_ebk==@= XAB$L_EBK @> @d VAX_xab_ffb==@= XAB$W_FFB @> @ @= @!sixteen_bits= 0..65535; @ @== @!command_line:packed array[1..300] of char; @!cmd_len:sixteen_bits; @!cmd_i:integer; @!file_name,@!def_file_name:varying [300] of char; @!ask,@!got_file_name: boolean; @ @= open(output,'SYS$OUTPUT',@=error:=continue@>); {FIX ME! JUNK FOR RUN-TIME BUG} cmd_i:=0; VAX_lib_get_foreign(command_line,,cmd_len,cmd_i); cmd_i:=1; while (cmd_i<=cmd_len) and (command_line[cmd_i]=' ') do incr(cmd_i); got_file_name:=cmd_i<=cmd_len; if got_file_name then def_file_name:=substr(command_line,cmd_i,cmd_len-cmd_i+1); if got_file_name then begin file_name:=def_file_name+'.GF'; open(gf_file,file_name,@=readonly@>,,VAX_direct, VAX_fixed,@=user_action:=@>gf_open,@=error:=continue@>); ask:=status(gf_file)<>0; if ask then write_ln('Couldn''t open ',file_name); end else ask:=true; while ask do begin got_file_name:=false; write('GF file: '); if eof then goto 9999; read_ln(file_name); open(gf_file,file_name,@=readonly@>,,VAX_direct, VAX_fixed,@=user_action:=@>gf_open,@=error:=continue@>); ask:=status(gf_file)<>0; if ask then write_ln('Couldn''t open ',file_name); end; if got_file_name then begin cmd_i:=1; for cmd_len:=1 to def_file_name.VAX_length do if (def_file_name[cmd_len]=']') or (def_file_name[cmd_len]=':') then cmd_i:=cmd_len+1; if cmd_i<=def_file_name.VAX_length then def_file_name:=substr(def_file_name,cmd_i, def_file_name.VAX_length-cmd_i+1); file_name:=def_file_name+'.PK'; open(pk_file,file_name,@=new,disposition:=delete@>, @=error:=continue@>); ask:=status(pk_file)>0; if ask then write_ln('Couldn''t open ',file_name); end else ask:=true; while ask do begin write('PK file: '); if eof then goto 9999; read_ln(file_name); if file_name.VAX_length=0 then file_name:='SYS$OUTPUT'; open(pk_file,file_name,@=new,disposition:=delete@>, @=error:=continue@>); ask:=status(pk_file)>0; if ask then write_ln('Couldn''t open ',file_name); end; @ Here is the library procedure that gets the user's command line. @= [VAX_external] function VAX_lib_get_foreign( VAX_stdescr cmdlin:[VAX_volatile] packed array [$l1..$u1:integer] of char := VAX_immed 0; VAX_stdescr prompt:[VAX_volatile] packed array [$l2..$u2:integer] of char := VAX_immed 0; var len : [VAX_volatile] sixteen_bits := VAX_immed 0; var flag : [VAX_volatile] integer := VAX_immed 0) :integer; extern; @ Here is how we intervene to find out the length of the |gf_file|. @= function gf_open(var fab:VAX_fab_type; var rab:VAX_rab_type):integer; type XAB_ptr = ^VAX_xab_type; var user_status:integer; xab,fhc:XAB_ptr; begin user_status:=@= $OPEN@>(fab); if odd(user_status) then @= $CONNECT@>(rab); xab:=fab.VAX_fab_xab::XAB_ptr; fhc:=nil; while (xab<>nil) and (fhc=nil) do if xab^.VAX_xab_cod=VAX_xab_fhc then fhc:=xab else xab:=xab^.VAX_xab_nxt::XAB_ptr; if fhc<>nil then if fhc^.VAX_xab_ffb=0 then gf_blocks:=int(fhc^.VAX_xab_ebk) - 1 else gf_blocks:=int(fhc^.VAX_xab_ebk) else gf_blocks:=0; gf_open:=user_status; end; @z ================================================================ ------------------------------ %%% %%% Concerning subscriptions, address changes, unsubscribing: %%% BITNET: send a one-line mail message to LISTSERV@TAMVM1.BITNET: %%% SUBSCRIBE TEX-L % to subscribe %%% %%% All others: send mail to %%% texhax-request@score.stanford.edu %%% please send a valid arpanet address!! %%% %%% %%% All submissions to: texhax@score.stanford.edu %%% %%% Back issues available for FTPing as: %%% machine: directory: filename: %%% [SCORE.STANFORD.EDU]TEXHAXnn.yy %%% nn = issue number %%% yy = last two digits of current year %%%\bye %%% ------------------------------ End of TeXhax Digest ************************** -------