Imagen BSD VAX Dviimp change file @x \font\ninerm=cmr9 \let\mc=\ninerm % medium caps for names like PASCAL \def\PASCAL{{\mc PASCAL}} \let\swap=\leftrightarrow \font\logo=logo10 % font used for the METAFONT logo \def\MF{{\logo META}\-{\logo FONT}} @y \let\mc=\ninerm % medium caps for names like PASCAL \def\PASCAL{{\mc PASCAL}} \let\swap=\leftrightarrow \font\logo=manfnt % font used for the METAFONT logo \def\MF{{\logo META}\-{\logo FONT}} @z @x \centerline{(Version 0.99, April 1986)} @y \centerline{(Imagen BSD VAX Version 0.99A, April 1986)} @z @x @d banner=='This is DVIIMP, Version 0.99' {printed when the program starts} @y @d banner=='This is DVIIMP, Imagen BSD VAX Version 0.99A' @z @x @d random== {change this to `$\\{random}\equiv\null$` for random access} @d modnar== {change this to `$\\{modnar}\equiv\null$` for random access} @d not_random==@{ @d modnar_ton==@t@>@} @f random == begin @f modnar == end @f not_random == begin @f modnar_ton == end @y @d random==@{ {change this to `$\\{random}\equiv\null$` for random access} @d modnar==@t@>@} {change this to `$\\{modnar}\equiv\null$` for random access} @d not_random== @d modnar_ton== @f random == begin @f modnar == end @f not_random == begin @f modnar_ton == end @z @x @p program DVI_IMP(@!dvi_file,@!im_file,@!output); @y @p program DVI_IMP(@!dvi_file,@!im_file,@!output,@!input); @z @x begin print_ln(banner);@/ @y begin print_ln(banner);@/ @@/ @z @x @d text_char == char {the data type of characters in text files} @d first_text_char=0 {ordinal number of the smallest element of |text_char|} @d last_text_char=127 {ordinal number of the largest element of |text_char|} @= @!text_file=packed file of text_char; @y @d text_char == char {the data type of characters in text files} @d first_text_char=0 {ordinal number of the smallest element of |text_char|} @d last_text_char=127 {ordinal number of the largest element of |text_char|} @= @!text_file=text; @z @x @!byte_file=packed file of eight_bits; {files that contain binary data} @y @!byte_file=text_file; {files that contain binary data} @z @x @d gf_read(#)==begin read(gf_file,#); end @y @d gf_read(#)==begin #:=gf_byte; end @z @x @d dvi_byte(#)==begin read(dvi_file,#); end @y @d dvi_byte(#)==begin #:= get_byte; end @z @x while not eof(gf_file) do m:=gf_byte; {to close out file} @y @z @x @!mm_store:packed array [0..m1_max,4..m2_max] of eight_bits; @y @!mm_store:array [0..m1_max,4..m2_max] of eight_bits; @z @x @d update_terminal == break(term_out) {empty the terminal output buffer} @y @d update_terminal == {empty the terminal output buffer} @z @x @d default_directory_name=='TeXGFs:' {change this to the correct name} @d default_directory_name_length=7 {change this to the correct length} @d dflt_tfm_directory_name=='TeXfonts:' {change this to the correct name} @d dflt_tfm_directory_name_length=9 {change this to the correct length} @y @d default_directory_name=='/rd/tex/gf/' {change this to the correct name} @d default_directory_name_length=11 {change this to the correct length} @d dflt_tfm_directory_name=='/rd/tex/fonts/' {change this to the correct name} @d dflt_tfm_directory_name_length=14 {change this to the correct length} @z @x h_org:=resolution; v_org:=resolution; @y h_org:=0; v_org:=0; @z @x im_byte(im_eof); close_file(im_file); @y im_byte(im_eof); { kludge necessary because an Apollo won't flush output buffer} write_ln(im_file); close_file(im_file); @z @x @* System-dependent changes. This section should be replaced, if necessary, by changes to the program that are necessary to make \.{DVIIMP} 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. @^system dependencies@> @y @* System-dependent changes. Here are the changes to the program that are necessary to make \.{DVIIMP} work on BSD VAX. @ This code is done before the initialization of variables, and is used to read in the filename off the command line. If no file is given there, it will prompt the user for the \.{DVI} and \.{IMPRESS} filenames. @== @!file_name,@!def_file_name:array[1..300] of char; @ @= argv(1,def_file_name); for i:= 1 to 300 do file_name[i] := ' '; i:=1; while def_file_name[i] <> ' ' do begin file_name[i] := def_file_name[i]; incr(i); end; file_name[i] := '.'; file_name[i+1] := 'd'; file_name[i+2] := 'v'; file_name[i+3] := 'i'; reset(dvi_file,file_name); for i:= 1 to 300 do file_name[i] := ' '; i:=1; while def_file_name[i] <> ' ' do begin file_name[i] := def_file_name[i]; incr(i); end; file_name[i] := '.'; file_name[i+1] := 'i'; file_name[i+2] := 'm'; file_name[i+3] := 'p'; rewrite(im_file,file_name); @z