home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / text / tex / pastex / source / driver / util / version.h < prev   
Encoding:
Text File  |  1995-06-06  |  31.6 KB  |  732 lines

  1. /*
  2.  * The programs ShowDVI and DVIprint are copyright Georg Heßmann.
  3.  * You can change and distribute the programs under the terms of
  4.  * the GNU general public license. See the file COPYING.
  5.  *
  6.  * Don't delete the copyright notice from the programs.
  7.  *
  8.  * If you spread a changed version of the programs, they still have to
  9.  * call "WarningStr(NULL)" to show my copyright message.
  10.  * But you should append a short notice to the message to show, that
  11.  * this is no original version.
  12.  *
  13.  * Don't delete or change this header.
  14.  *
  15.  * Georg Heßmann (hessmann@informatik.uni-hamburg.de)
  16.  *               (http://tech-www.informatik.uni-hamburg.de/Personal/hessmann)
  17.  * 26.May.95
  18.  *
  19.  */
  20.  
  21.  
  22. /**********************************************************************/
  23. /************************  Program Version  ***************************/
  24. /**********************************************************************/
  25. /***********************   13.11.89  (hes)   **************************/
  26. /**********************************************************************/
  27.  
  28.  
  29. /* Change log:
  30.  *
  31.  * Early 1985, (nmh) -- ported sun version to Apollo.
  32.  * 30-Mar-85 (nmh) -- added -a option to specify a different PXL area
  33.  * 12-Jun-85 (nmh) -- v1.02 - process DVI pages in reverse order
  34.  * 20-Aug-85 (nmh) -- v1.03
  35.  * 24-Aug-85 (nmh) -- v2.00
  36.  * 15-Mar-88 (rbs) -- ported sun version to atari st
  37.  *                 -- v3.00
  38.  * 06-Apr-88 (rbs) -- v3.12
  39.  * 30-Apr-88 (rbs) -- v3.13
  40.  * 31-May-88 (rbs) -- v3.14
  41.  * 02-Jun-88 (rbs) -- ported for screen-output (Atari ST 1040)
  42.  *                 -- v3.99a
  43.  * 04-Jul-88 (hes) -- ported on AMIGA 1000
  44.  *                 -- v3.99m
  45.  * 23-Jul-88 (hes) -- added functions to jump trough the dvi-file
  46.  *                 -- v3.991m
  47.  * 28-Jul-88 (hes) -- added functions to change the displayed dvi-file
  48.  *                 -- v3.992m
  49.  * 19-Aug-88 (rbs) -- reported on ATARI ST
  50.  *                 -- v3.99n
  51.  * 20-Aug-88 (rbs) -- revised list functions
  52.  *                    added scanning for pointer to the begin of pages
  53.  *                     in the dvifile (to find a specified page faster)
  54.  *                 -- v3.991n
  55.  * 26-Jan-89 (hes) -- little changes in the message system,
  56.  *              report the loading (removing) of the fonts,
  57.  *              Changed name of the logfile.
  58.  *              Add in globals.h SHOWDVI_LOGFILE
  59.  *              CHANGED the Version number!! (for better increasing)
  60.  *           -- v0.50    (without index!)
  61.  * 12-Feb-89 (hes) -- merged dviprint, showdvi and flib in one dir. system
  62.  *              add file 'dvihand.c', a part of 'dviprint.c' which
  63.  *              used in showdvi and dviprint.
  64.  *              Added a new Fatal-Mes. in 'liste.c' (in_list).
  65.  *              Make the arrows on the (AMIGA) scrollbars.
  66.  *           -- v0.51
  67.  * 09-Jun-89 (hes) -- Inserted author names (crypted).
  68.  *              Updating prog-arguments, add -? help text.
  69.  *              Changing the default hoffset and voffset.
  70.  *              Correcting the offsets by changing to the draft-modus
  71.  *              in dviprint.c.
  72.  *           -- v0.52
  73.  * 11-Jul-89 (hes) -- Changing the Fatal-handling (errorn numbers).
  74.  *              Many changes in amscreen.c.
  75.  *              Adding page_counter function in showdvi.c.
  76.  *           -- v0.53
  77.  * August 89 (rbs) -- porting code to ANSI compiler (Turbo C 1.1 for ATARI ST)
  78.  *                    fixing a few bugs
  79.  *               now IMG files can be include within the special command
  80.  *           -- v0.53
  81.  * 04-Sep-89 (rbs) -- pre-release of an ATARI-version for screen previewing
  82.  *           -- v0.54
  83.  * 09-Oct-89 (hes) -- Adding Pop-Up-Menu to AMIGA-Version (am_menu.c),
  84.  *              little changes in amscreen.c and gadget.c,
  85.  *              added define FONTS_IN_CHIPMEM for using system
  86.  *              CopyBitArray (but, it is a little bit to slow,
  87.  *                    too much overhead).
  88.  *           -- v0.54
  89.  * 05-Nov-89 (hes) -- Adding color/about/help-requester (am_requ.c),
  90.  *                    Add KOMM+4L : load NEW DVI-File,
  91.  *                    change load file again - do not change page-number!
  92.  *                 -- v0.55
  93.  * 26-Nov-89 (hes) -- all change logs now here in util/version.h,
  94.  *              dviprint: now module newhard.c, make the same as
  95.  *                hardcopy.c but FASTER.
  96.  *                split the giant switch-command in
  97.  *                three pieces.
  98.  *                Add -z option to change the dpi.
  99.  *                   -- v0.60
  100.  *              showdvi:  add filerequester+little changes in
  101.  *                AMIGA part.
  102.  *                Add -z option to change the dpi.
  103.  *                -- v0.60
  104.  *              flib:     change version number :->
  105.  *                -- v0.60
  106.  * 03-Dec-89 (hes) -- add SAVE_BITS_X,Y in bitmap.[ch] for adding
  107.  *              1/4 inch distance to the right/lower border.
  108.  *              h/v-offset now in any unit (in,cm,mm,...) available.
  109.  *              showdvi:    submenus for the popup-menu,
  110.  *                change resolution 83dpi - 100dpi - 120dpi
  111.  *                not totaly implemented, because init_fontmt
  112.  *                work with fixed resolution :-(
  113.  *                correct the screen-sizing alg. in amscreen.c.
  114.  *                -- v0.61
  115.  *              dviprint: Revising DecodeArgs and Print Help,
  116.  *                add -u option,
  117.  *                fix bug in fast_copy.SetChar(),
  118.  *                add SAVE_BITS_X,Y in bitmap.c for adding
  119.  *                1/5 inch distance to the lower and 
  120.  *                1/2 inch to the right border.
  121.  *                -- v0.61
  122.  * 07-Dec-89 (hes) -- showdvi:    AMIGA-Version...
  123.  *                work correct with pages which are smaller than
  124.  *                the window.
  125.  *                -- v0.62
  126.  *              dviprint: add -d option.
  127.  *                -d 1 prints on a HP-DeskJet.
  128.  *                -- v0.62
  129.  * 02-Jan-90 (hes) -- showdvi:  bug fix in full-screen modi,
  130.  *                add '!' command, open a new shell-window.
  131.  *                -- v0.63
  132.  * 13-Feb-90 (rbs) -- adapting Georg's code to Atari ST
  133.  *                -- showdvi: using only GEM routines (should work
  134.  *                            on all monitors)
  135.  *                            implemented windows
  136.  *                -- v0.64
  137.  * 06-Mar-90 (hes) -- fixed bug in fontmt.c (crash if flib not found).
  138.  *              fixed bug in fontmt.c/alloc_char return value incorrect.
  139.  *              dviprint: add -m and -e options to control the memory
  140.  *                usage of the program.
  141.  *                add -d 2 option. Prints on a Epson-FX printer.
  142.  *                  -- v0.63
  143.  *              showdvi:    add three new lines to the config-file:
  144.  *                beep on warnings, default resolution and resolution menu.
  145.  *                revised page-scroll-modus. Now it works correct!
  146.  *                -- v0.65
  147.  * 11-Mar-90 (hes) -- adapting it for AMIGA Aztec-C 5.0,
  148.  *              change all function definitions to ANSI-style.
  149.  *              dviprint: --v0.64
  150.  *              showdvi:    --v0.66
  151.  * 20-Mar-90 (hes) -- brand new fonthandling!!
  152.  *              Now works with _ALL_ magsteps or whatever!
  153.  *              New files flmt.[chi] (flib handling) and new_font.[chi]
  154.  *              (fonthandling). pkload.c changed to newpk.c.
  155.  *              Complex search strategy for font searching:
  156.  *            1. search for defined fonts; in flibs or pk-files (defined in user-file)
  157.  *            2. search for defined flibs (defined in user-file)
  158.  *            3. search flib in searchlist of directories (environment var)
  159.  *            4. search _pk-file_ in searchlist of directories (env. var)
  160.  *              Define the config-directory in an environment-variable.
  161.  *              dviprint:
  162.  *                -- v0.70
  163.  *              showdvi:    implement the change resolution menu.
  164.  *                add AMIGA-w key-function for save_configuration.
  165.  *                -- v0.70
  166.  * 23-Mar-90 (rbs) -- improved Georg's fonthandling, fixed a few bugs
  167.  *                in new_font.c.
  168.  *              substituted fonts are now shared with the orig fonts
  169.  *                      (changed font structures in new_font.h)
  170.  *              showdvi:
  171.  *                implemented file selecetor box for ATARI
  172.  *                 -- v0.74
  173.  * 29-Mar-90 (rbs) -- fixed a few bugs in showdvi (list handling)
  174.  *              now corrupted DVI files can be printed and displayed
  175.  *              showdvi:
  176.  *                -- v0.76
  177.  *              dviprint:
  178.  *                -- v0.72
  179.  * 03-Apr-90 (hes) -- fixed little bugs in new_font.c and other little changes.
  180.  *              create font groups (saves memory).
  181.  *              change the ^C handling for the lattice compiler (AMIGA)
  182.  *              dviprint:
  183.  *                revised the fonthandling (define and load)
  184.  *                -- v0.74
  185.  *              showdvi:    (AMIGA)
  186.  *                now the file select box works correct,
  187.  *                implement an ARexx Port,
  188.  *                implement function-key assignment.
  189.  *                new define variable: esc_exit (on/off)
  190.  *                -- v0.78
  191.  * 10-Apr-90 (rbs) -- changed the order of font structures in new_font.h
  192.  *                (Turbo C V1.1 for Atari ST bombed with the old order !?)
  193.  *              fixed a few bugs in new_font.c (swapping of fonts)
  194.  *              showdvi:
  195.  *                -- v0.80
  196.  *              dviprint:
  197.  *                -- v0.76
  198.  *        PS: Georg, what's about version number 1.0?
  199.  * 20-Apr-90 (rbs) -- fixed a few int-long conversions in newhard.c
  200.  *              dviprint:
  201.  *                -- v0.78
  202.  * 24-Apr-90 (hes) -- fixed little bugs in new_font.c and showdvi.c
  203.  *              dviprint: -- v0.79
  204.  *              showdvi:  (AMIGA)
  205.  *                new modus for the pop-up menu.
  206.  *                new entry in the config file (int-menu)
  207.  *                -- v0.81
  208.  * 02-Mai-90 (hes) -- add a 'special' string handling for the AMIGA.
  209.  *              Works with an auxiliary program witch the special string
  210.  *              evalute and returns a bitmap.
  211.  *              New source files: util/amiga/special.[ch] and
  212.  *              an example as aux. program: util/amiga/specialhost.c 
  213.  *              dviprint:    Add default printer, resolution and
  214.  *                print direction to the files globals.h and
  215.  *                dviprint.c.
  216.  *                -- v0.80
  217.  *              showdvi:    Fixed bug in the full-screen modi (div 0).    
  218.  *                Copy the key-handling from amscreen.c to amkey.c
  219.  *                and improve it.
  220.  *                -- v0.82
  221.  * 18-Jun-90 (hes) -- dviprint: Change the -d numbers of the printers.
  222.  *                Add a new Epson and a new Deskjet driver.
  223.  *                Improve ^C handling.
  224.  *                -- v0.83
  225.  *              showdvi:    add skippage.[ch] to skip pages without preamble.
  226.  *                (AMIGA)
  227.  *                Do not leave the program, if a other window
  228.  *                is on the screen.
  229.  *                Add AmigaTeX ARexx commands.
  230.  *                -- v0.83
  231.  * 23-Jun-90 (hes) -- Add the font-caching algoithmus from AmigaTeX to our
  232.  *              Amiga Version. Look in the file TeX:pk/fontvols and
  233.  *              copy pk-files to TeX:pk/...
  234.  *              dviprint: Change _abort for dviprint/AMIGA.
  235.  *                -- v0.84
  236.  *              showdvi:    Load font topaz 11, use it for the popup-menu.
  237.  *                (AMIGA)
  238.  *                -- v0.84
  239.  * 26-Jun-90 (hes) -- This is the pre-release Version vor c't (AMIGA).
  240.  *              dviprint:    -- v0.90
  241.  *              showdvi:    -- v0.90
  242.  * 02-Jul-90 (hes) -- Fixed bug in new_font.c, initialize font location in
  243.  *              common elements.
  244.  *              Possible compiler fault: Error in parsit (new_font.c).
  245.  *              New search list structure (it's smaller and works).
  246.  *              New entrys in Logfile with -s option (new_font.c).
  247.  *              dviprint:    -- v0.91
  248.  *              showdvi:    change the algotithmus of parse_line in config.c
  249.  *                (only AMIGA)
  250.  *                -- v0.91
  251.  * 16-Jul-90 (hes) -- showdvi:  Fix open font bug, close fonts, refresh gadgets
  252.  *                if the window becomes activated. (only AMIGA)
  253.  *                -- v0.92
  254.  *              dviprint: Add landscape code (module landscap.[ci])
  255.  *                (but still dosn't work)
  256.  *                -- v0.92
  257.  * 01-Aug-90 (hes) -- Change the \special-handling (AMIGA Version).
  258.  *              This is the release Version!
  259.  *              showdvi:    unset pscro if printing (AMIGA).
  260.  *                -- v1.00
  261.  *              dviprint:    Landscape modus now works.
  262.  *                Add -i Option to print to IFF-Files (AMIGA).
  263.  *                -- v1.00
  264.  * 19-Aug-90 (hes) -- Add a new ARexx-Port to ShowDVI and DVIprint to call
  265.  *              Metafont, if an font dosn't exists.
  266.  *              Use the environment var "CALLMF". (only ENV: variable!)
  267.  *              showdvi:    Fixed bug in arexx.c/loadagain. (AMIGA)
  268.  *                Change 'realy' to 'really' in am_requ.h.
  269.  *                -- v1.01
  270.  *              dviprint:    -- v1.01
  271.  * 06-Sep-90 (hes) -- Add %x to the font format-strings.
  272.  *              Change call_mf. Call it once if a font aren't found.
  273.  *              Use only ENV: Environment-Variables.
  274.  *              showdvi:    close the dvi-file while scrolling (fclose-fopen).
  275.  *                -- v1.02
  276.  *              dviprint:    -- v1.02
  277.  * 19-Sep-90 (hes) -- Add %h %v and %y to the font format-strings.
  278.  *              %x now works korrect.
  279.  *              Add 'pkdir_str' and 'pkdir' keywords to the fontdef files.
  280.  *              showdvi and dviprint now 'pure'.
  281.  *              showdvi:    fixed many small bugs (scrollbars, requester..)
  282.  *                add keymap handling to amkey.c
  283.  *                don't make fatal if printing dosn't work
  284.  *                -- v1.03
  285.  *              dviprint: -- v1.03
  286.  * 17-Nov-90 (hes) -- Change new_font.[ch]. Every font/lib has now it's own
  287.  *              format-string. 
  288.  *              AMIGA: Fix bug in DoSpecial.
  289.  *              Both, DVIprint and ShowDVI now uses only 4kB stack.
  290.  *              AMIGA: Delete stack checking code.
  291.  *              list.
  292.  *              dviprint:    fix little bug in dviprint.c, don't call
  293.  *                DoSpecial in SkipMode.
  294.  *                -- v1.04
  295.  *              showdvi:    fix bug of confused about-requester.
  296.  *                Change liste.[chi] and showdvi.c.
  297.  *                Store the physical page number in the list.
  298.  *                -- v1.04
  299.  * 27-Nov-90 (hes) -- Fix some little bugs. :-)
  300.  *              showdvi:    Add physical pagenumbering code.
  301.  *                I.e. new var 'current_page_phy'
  302.  * 29-Nov-90 (hes) -- showdvi:    Physical page numbers now work correct.
  303.  *                Add 'secundary_nr' page number to list structure.
  304.  *                Add 'screen-mode' to the config file. Now you
  305.  *                can contol the type of the ShowDVI screen (under
  306.  *                Amiga Dos 2.0).
  307.  *                -- v1.05
  308.  * 06-Dec-90 (hes) -- dviprint: Updated newhard.c from J.C. Hoehle.
  309.  *                New Epson Modus....
  310.  *                Fix ^C bug (AMIGA) (also thank's to J.C. Hoehle!) !!
  311.  *                -- v1.05
  312.  *              showdvi:    Add 'physikal-number' to the config file.
  313.  *                Fix empty line bug in the config file (AMIGA).
  314.  * 17-Dec-90 (hes) -- Changes for the "Level 0 DVI Driver Standard"
  315.  *              Add the new rounding scheme. See MoveOver, MoveDown, setmotion.
  316.  *              Set NPXLCHARS to 256. Don't store the unpacked font into the
  317.  *              internal mem. Only the packed chars are stored and unpacked if
  318.  *              needet. Get the memory for the unpacked chars via 'malloc'.
  319.  *              dviprint:    New NEC P6 modus (without 'ESC $' skips).
  320.  *                -- v1.06
  321.  *              showdvi:    AMIGA: Add application window for OS 2.0.
  322.  *                -- v1.06
  323.  * 24-Jan-91 (hes) -- Change all (execpt in bitmap.c) malloc's to xmalloc's.
  324.  *              Don't search always font's at the default path.
  325.  *              If env-vars FLIBDIR or PKDIR set, delete the default path.
  326.  *              (see define ALWAYS_DEFAULT in new_font.c)
  327.  *              AMIGA: if Stats, close/open the Logfile after every line.
  328.  *              AMIGA: fix bug in do_special/draw_border.
  329.  *              dviprint: Add Epson-LQ mode (does not jet working!).
  330.  *                -- v1.07
  331.  *              showdvi:    Fix little bug at page change without scrollbars.
  332.  *                -- v1.07
  333.  * 10-Feb-91 (hes) -- dviprint: Fix malloc bug with HP-part.
  334.  *              showdvi:    Fix little bug with menu-change-res and fullpage.
  335.  *                -- PasTeX 1.2a release
  336.  * 14-Feb-91 (hes) -- dviprint:    Add -d 0 for AMIGA (generic printer)!
  337.  *                Fix Bugs in EpsonLQ part (draft <> highq).
  338.  *                Add -S option for fclose/fopen logfile (AMIGA).
  339.  *                New feature with -z option. Now you can
  340.  *                specify a horizontal and vertical resolution.
  341.  *                -- v1.08
  342.  *              showdvi:    Add -S option. (AMIGA)
  343.  *                -- v1.08
  344.  * 30-Mai-91 (hes) -- new_font.[ch] von Bernd eingebaut.
  345.  *              thinspace/backspace/.space Berechnung von Bernd eingebaut.
  346.  *              Reload Font wird nicht mehr am Bildschirm angezeigt.
  347.  *              Reload Font ueberarbeitet. Ein Font wird nun nur noch
  348.  *              dann wieder in's fontmem geladen, wenn ein Char
  349.  *              wirklich gebraucht wird.
  350.  *              DVIprint: Fix bug: 'IFFBase == NULL' (AMIGA)
  351.  *                Add -O option (DENSITY), -1 -2 option and -> option.
  352.  *                -- v1.09
  353.  *              ShowDVI:    (AMIGA)
  354.  *                Add AMIGA-Menues (pop-up-menue off),
  355.  *                add auto-load-again (on/off).
  356.  *                add screen-size 0,0.
  357.  *                Save the app-win position in the '.info' file.
  358.  *                Change the follow_gad. Set ModifyIDCMP(MOUSEMOVE).
  359.  *                Change the 'newcli' function for OS2.0.
  360.  *                Fix little bug (SPACE-'b' handling).
  361.  *                -- v1.09
  362.  * 24-Jun-91 (hes) -- Das 'reload' Prinzip verbessert/Bug freier gemacht.
  363.  *              Den maxstring fuer Message... vergroessert.
  364.  *              ShowDVI:    (AMIGA)
  365.  *                Color-File Requester nun aus der "req.library".
  366.  *                AboutRequester zu einem AboutWindow mit IText Strukturen
  367.  *                umgebaut.
  368.  *                Screen-Font auf NULL gesetzt. Das Programm kann nun mit
  369.  *                beliebig grossen System-Fonts umgehen.
  370.  *                FullPage Modus so umgebaut, dass er nicht mehr direkt in einen
  371.  *                Window/Screen Rast-Port schreibt. Allociert nun seinen eigenen
  372.  *                RastPort. Damit ist ShowDVI voellig 'clean' und schreibt
  373.  *                nirgens mehr direkt in eine Bitmap!
  374.  * 24-Jun-91 (jch) -- parsef Modul zum lesen von Konfigurationsdateien
  375.  *              new_font.c benutzt parsef.
  376.  *              DVIprint: Ansteuerung der Nadeldrucker nun ueber config-File
  377.  *                DVIprint.printers.
  378.  *
  379.  *  9-Jul-91 (hes) -- hoffset_in_fix, voffset_in_fix eingefuehrt.
  380.  *              h/v-offset wird nun an die Magnification angepasst.
  381.  *              Neues GetOpt eingebaut. Vollkommen neue
  382.  *            Parameter. Nun auch WB Unterstuetzung
  383.  *              ENV: Variablen "ShowDVI-dir" und "ShowDVI-file" gesetzt.
  384.  *              DVIprint: 
  385.  *                -- v1.10
  386.  *              ShowDVI:    (AMIGA)
  387.  *                Timer.device ausgebaut, verwende nun INTUITICKS.
  388.  *                Full-screen Algorithmus stark verbessert.
  389.  *                Neue Features:
  390.  *                - PublicScreen unter 2.0
  391.  *                - 4 Farben Screen
  392.  *                - AutoScroll wenn screen-size angegeben
  393.  *                - middle-menu unter 2.0
  394.  *                - Measure Window
  395.  *                - Unit Menu
  396.  *                - border line Anzeige
  397.  *                - run cmmand + script eingebaut (Name im config-File).
  398.  *                -- v1.10
  399.  *  9-Jul-91 (jch) -- DVIprint: Bessere Optimierung bei der Druckausgabe.
  400.  *                Unterer Rand wird nicht geskippt sondern es wird sofort FF
  401.  *                gemacht.
  402.  *                HP Treiber wieder angepasst.
  403.  * 15-Jul-91 (jch) -- DVIprint: Fuer jeden Drucker in DVIprint.printers Breite
  404.  *                definiert, dadurch rechter Rand setzbar, keine zu
  405.  *                lange Grafik mehr an Drucker geschickt.
  406.  *                Preferences Drucker skaliert grosse Seiten *nicht*
  407.  *                mehr, daher grosser Geschw. Gewinn. (thank @cbmvax)
  408.  *                'printer help' Option nun verfuegbar.
  409.  *              ShowDVI:  GetOpt Optionen angepasst
  410.  * 18-Jul-91 (hes) -- ShowDVI:    (AMIGA)
  411.  *                add SubMenu "Shell commands" / SpecialHost Menu-entry
  412.  *                add new ARexx commands: getstring, getlong, okay1, okay2
  413.  *                and menu.
  414.  * 19-Jul-91 (hes) -- ShowDVI:    (AMIGA)
  415.  *                New for V37.x and higher: Menu-Help
  416.  *                Help text for every menu entry in the file TeX:config/ShowDVI.help
  417.  *  7-Aug-91 (hes) -- Changed GetOpt (WB Args).
  418.  *              Changed startup-code (ShowUmain.c, PrintUmain.c).
  419.  *              ShowDVI:    (AMIGA)
  420.  *                Fixed little bug in arexx.c ("" problem)
  421.  *                Fixed bug in ShowDVI.c. Call "showdvi dir/file" cause problems.
  422.  *                -- v1.11
  423.  *              DVIprint: Some little changes.
  424.  *                -- v1.11
  425.  * 12-Aug-91 (hes) -- Switched to OLDARGS in new_font.c. Changed "pkdir" and "basepkdir". 
  426.  *              They have now two or three arguments (+ vertical resolution).
  427.  *              Changed FontVols alg. Now it uses the basepkdir format-string to search
  428.  *              the font on the FontVol-disks.
  429.  *              ShowDVI:    Now always Amiga-DOS menu available. If pop-up menu, then
  430.  *                use MENUVERIFY and use the Amiga-DOS menu in the top window-
  431.  *                border.
  432.  *                Change open Koo. for the about-window. No it is *always* in
  433.  *                the mid of the screen! (Thanks MWeyer)
  434.  *                Fix bug in init_images()!! Occures if the screen is larger than
  435.  *                1000 pixels.
  436.  *                -- v1.12
  437.  *              DVIprint: -- v1.12
  438.  * 31-Aug-91 (hes) -- Change Logging() in dvihand.c, because SAS/C vsprintf() dosn't
  439.  *              work with '%f'!
  440.  *              new_font.c fontcaching. Set the path of the font to the
  441.  *              destination, not to the source!
  442.  *              ShowDVI:    New entries in the config-file: clone-wb-colors,
  443.  *                quick-exit and new screen mode: workbench.
  444.  *                New menu entry: Clone WB color
  445.  *                New keycodes for the help-window.
  446.  *                If new DVI-file, scroll right (hoffset).
  447.  *                Fix bug in computing of the right border.
  448.  *                Change center screen if new-dvi-file and change res.
  449.  *                -- v1.13    (PasTeX 1.3 release version)
  450.  *              DVIprint: New keywords for DVIprint.printers: NR100 NR10 and NR1
  451.  *                -- v1.13    (PasTeX 1.3 release version)
  452.  * 09-Sep-91 (hes) -- Change OpenConfigFile(), now try to replace old files.
  453.  *              ShowDVI:    New entry in config file: monitor-size
  454.  *                Change MOUSEMOVE handling.
  455.  *                Fix enforcer hit ('i' with measure window active).
  456.  *                -- v1.14
  457.  *              DVIprint:    Add accounting possibility.
  458.  *                Do not open printer.device when iffprint or outtofile.
  459.  *                -- v1.14
  460.  *
  461.  * 14-Sep-91 (hes) -- Add null_x/y in special_dmap message.
  462.  *              ShowDVI:    Fix two bugs around OpenConfigFile()
  463.  *                Full-page now only in the display-rect.
  464.  *                Add menu entry "set screen size".
  465.  *                Add config file entry "border-line".
  466.  *                Add ARexx command "getpubscreenname".
  467.  *                Add priority parameter.
  468.  *                -- v1.15
  469.  *              DVIprint:
  470.  *                Add priority parameter.
  471.  *                -- v1.15
  472.  * 19-Sep-91 (hes) -- Small changes in special.[ch].
  473.  *              ShowDVI:    Add 'Screen Pref' window.
  474.  *                -- v1.16
  475.  *              DVIprint: New printer entry 'LaserJet'.
  476.  *                Add compress mode for DeskJet and LaserJet.
  477.  *                -- v1.16
  478.  * 28-Sep-91 (hes) -- Tiny change in GetOpt.c, there is a bug in ENV reading, but where??
  479.  *              ShowDVI:    Add notify machanism for Auto-Load-Again (under 2.0).
  480.  *                -- v1.17
  481.  *              DVIprint: -- v1.17
  482.  * 12-Okt-91 (hes) -- Change new_font.c/read_atex_file(). Alloc arrays per xmalloc() to
  483.  *              save stack space. So, 4kB stack should be enough.
  484.  *              ShowDVI:    Little change with notify. Don't open the DVI file
  485.  *                immediatly after the notify-signal arrives. Check first,
  486.  *                if the file exists
  487.  * 13-Nov-91 (hes) -- ShowDVI:    Change scrollbars and page-scroll gadget.
  488.  *                Add 'use-own-screen' line to the config file.
  489.  *                -- v1.18
  490.  *              DVIprint: Change MAXGROUPING to 6. (Now should work with 48pins to)
  491.  *                Change 'generic' printing. Don't use NOFORMFEED at the last
  492.  *                pass.
  493.  *                -- v1.18
  494.  * 22-Mai-92 (hes) -- ShowDVI:    Many many small changes...ShowDVI in a window...2.0 look...
  495.  *                Try to fix a non-freed signal (notify)
  496.  *                -- v1.19 ß
  497.  *              DVIprint:    Fix bug in landscape mode.
  498.  *                Add number of pages to print option.
  499.  *                Add Canon mode (not working yet).
  500.  *                Small cosmetic changes in showprinters output.
  501.  *                -- v1.19 ß
  502.  * 22-Sep-92 (hes) -- ShowDVI:    2.0 only program!!
  503.  *                Boopsi images for the arrows.
  504.  *                Screenmode requestor/save numeric ID's (V38).
  505.  *                Village support, bitmap in fast-ram.
  506.  *                Set top/left border command.
  507.  * 29-Sep-92 (hes) -- ShowDVI:  Make main window to a app-window, if it is on a WB screen.
  508.  * 15-Jan-93 (hes) -- ShowDVI:  Delete all gadgets in the window title-bar.
  509.  *                Add ability to load the DVI file into ram.
  510.  *                Add a border to the page.
  511.  *                (Achtung...bei print-page muss der Rand weg!!)
  512.  * 17-Jan-93 (hes) -- ShowDVI:    Include a boopsi gadget for the left/bottom border.
  513.  *                It's a replacement for the old page scrolling mechanism.
  514.  *                Link *not* with catchres.o, because this will cause GURU.
  515.  *                (make 020+ieee version)
  516.  *                Convert scrollbars to newlook + 3D look.
  517.  *                Delete all old pgscro/images.
  518.  *                (full-page error is still present :-( )
  519.  *                -- v1.20ß
  520.  *              DVIprint: 020+ieee version
  521.  *                Also possible to load DVI file into ram...but always disabled.
  522.  *                (Should look for iff-save routines!!)
  523.  *                -- v1.20ß
  524.  * 26-Feb-93 (hes) -- ShowDVI:  Add DOMINO, PICASSO screen mode detection.
  525.  *                Add new scroll mode, use ScrollRaster().
  526.  *                Use ScrollRaster() scrolling if screen is a PICASSO screen.
  527.  *                Not pure! (because of amiga.lib)
  528.  *                -- v1.21ß
  529.  * 03-Mar-93 (hes) -- ShowDVI:    Add Save-As-Iff and Copy menus.
  530.  *                Use RKM functions for scrollbar values.
  531.  *                Not pure! (because of amiga.lib)
  532.  *                -- v1.22ß
  533.  *              DVIprint:    Add new IFF save routines.
  534.  *                Change hoff/voff behavior in Landscape mode.
  535.  *                -- v1.22ß
  536.  * 12-Mar-93 (hes) -- DVIprint: Add PHY option.
  537.  * 15-Mar-93 (hes) -- ShowDVI:    Full localized.
  538.  *                Not pure! (because of amiga.lib)
  539.  *                -- v1.23ß 
  540.  *              DVIprint: Partly localized.
  541.  *                -- v1.23ß
  542.  * 06-Jun-93 (hes) -- Add FatalStr(), MessageStr(), LoggingStr(), WarningStr() functions.
  543.  *              Replace all Message(GetTeXString(...)) with Message(...) and all
  544.  *              Message("...") with MessageStr("..."). Same with the other functions.
  545.  *              Change struct Options {} to localize the help texts.
  546.  *              ShowDVI:    Really full localized (CLI parameters).
  547.  *                Fix problem with the menu colors.
  548.  *                -- v1.24ß
  549.  *              DVIprint: Full localized.
  550.  *                -- v1.24ß
  551.  * 18-Jun-93 (hes) -- DVIprint: Add LaserJet4 (draft=300dpi, hq=600dpi) (not tested)
  552.  *
  553.  *
  554.  * ******************  F I V E    Y E A R S    D E V E L O P M E N T   ******************
  555.  *
  556.  *
  557.  * 18-Jul-93 (hes) -- Add WIDTH/HEIGHT options to define page size.
  558.  *              Add MARK options to mark all used fonts.
  559.  *              ShowDVI:    Fix enforcer hit in SetShowDVIVars().
  560.  *                Add AmigaGuide support/GadgetHelp.
  561.  *                Page can now also in FAST-RAM!
  562.  *                Add two new config-lines for scrolling/fast-ram.
  563.  *                -- v1.25ß
  564.  *              DVIprint:    LaserJet4 seems to work.
  565.  *                -- v1.25ß
  566.  *
  567.  * 23-Oct-93 (hes) -- ShowDVI:  Use C-version of fast_cp.c (hope this fixes the missing chars)
  568.  *                -- v1.26ß
  569.  *              DVIprint: Add TWOup, MOFFset and BOOK (not working!) options.
  570.  *                -- v1.26ß
  571.  * 31-Dec-93 (hes) -- ShowDVI:    Fix bug with fullpage/lace. Comment out some stupit code.
  572.  *                Page smaller than window...delete one line of the
  573.  *                scrollbar...fixed.
  574.  *                Compiled with SAS/C 6.50.
  575.  *              DVIprint: Compiled with SAS/C 6.50.
  576.  * 01-Jan-94 (hes) -- ShowDVI:    Make CURSOR behavior style-guide compatible.
  577.  *                ScreenPref window: toggle ownscreen -- enable/disable gadgets.
  578.  *                Use ?SetScrollerValues/?FindScrollerTop in amscreen.c.
  579.  * 11-Jan-94 (hes) -- ShowDVI:    Fix bug in show_full_page if window larger than page.
  580.  *                -- v1.27ß
  581.  *              DVIprint: -- v1.27ß
  582.  * 18-Jan-94 (hes) -- ShowDVI:  Small changes in sleep-pointer handling. Add os3 function.
  583.  *                -- v1.28ß
  584.  * 22-Jan-94 (hes) -- ShowDVI:    Compiled with SAS/C 6.51.
  585.  *                -- v1.29ß
  586.  *              DVIprint: Compiled with SAS/C 6.51.
  587.  *                -- v1.29ß
  588.  * 26-Jan-94 (hes) -- ShowDVI:  sleep_win does now also make block_win.
  589.  *                    DVIprint:    Fix some things with \special + border + twopage.
  590.  * 06-Feb-94 (hes) -- ShowDVI:    Fix some things with the mess-win.
  591.  *                Catalog: totaly -> totally
  592.  *                Fix AREXX commands: getfile/getdir/loadnew
  593.  *                -- v1.30ß
  594.  *              DVIprint: -- v1.30ß
  595.  * 16-Mar-94 (hes) -- Free distributable BETA version. No BETACOPYRIGHT.
  596.  *              Fix some things in GetOpt.c (HIDDEN+'true'in)
  597.  *              ShowDVI:    Delete Interlace button in Screen-config.
  598.  *                Fix bug with filerequester and empty file gad.
  599.  *                Make PageGad work correctly.
  600.  *                -- v1.31ß
  601.  *              DVIprint: -- v1.31ß
  602.  *                    --BETA 1--
  603.  * 01-Apr-94 (hes) -- ShowDVI:    Move ReplyMsg() before the switch statement.
  604.  *                Fixes some bugs (crashes!) is the screen is closed and reopened.
  605.  *                Add PUBSCREEN arg.
  606.  *                Fix some bugs in the prefwin.
  607.  *                -- v1.32ß
  608.  *              DVIprint: Add PUBSCREEN arg (hidden).
  609.  *                Add PAPER option.
  610.  *                -- v1.32ß
  611.  *
  612.  *              --BETA 2--
  613.  * 05-Apr-94 (hes) -- ShowDVI:    Fix Bug in win_mov. SetWriteMask is a V39 function!
  614.  *                -- v1.33ß
  615.  * 13-Apr-94 (hes) -- ShowDVI:    Make black-on-white work.
  616.  *                Fix pot_x gad bug (ghost gadget).
  617.  *                Better update of the mess-window (key event).
  618.  *                Replace 'interlace' with 'black on white' in pref-win.
  619.  *                Add config entry for black on white writing.
  620.  * 15-Apr-94 (hes) -- Change offset-mode in fast_cp.c and dospecial.c
  621.  *              Fix WIDTH/HEIGHT options.
  622.  *              Change catalog version number to the number of the programs.
  623.  *              ShowDVI:    Add PAPER option.
  624.  *                Fix problems in messwin if page smaller than window.
  625.  *                -- v1.34ß
  626.  *              DVIprint: Fix (?) offsets in landscape / twoup mode (hint: use neg. voffset).
  627.  *                Forbit TWOUP + REVERSE.
  628.  *                Fix ODD/EVEN in TWOUP.
  629.  *                Fix printing of last leftpage in TWOUP.
  630.  *                Increase MAX_GROUPING to 12.
  631.  *                -- v1.34ß
  632.  * 19-Apr-94 (hes) -- ShowDVI:    ARexx command getfile: remove .dvi extension.
  633.  *              --BETA 3--
  634.  * 03-May-94 (hes) -- ShowDVI:    Add set_checked...() to the messwin procs.
  635.  *                Fix two small bugs with WriteMask and ClipIt in win_mov().
  636.  * 08-May-94 (hes) -- ShowDVI:    Fix small bug (Workbech) of german locale file.
  637.  *                Deactivate LACE menu, if !own_scr
  638.  * 12-May-94 (hes) -- Change badpk() in loadfont. Only one GetTeXString().
  639.  *              ShowDVI:    Add NameFromLock() in init_task_name(). (Stefan Scherer)
  640.  *               --BETA 4--
  641.  * 24-May-94 (hes) -- Change PAPER option to PAPERSIZE (Dan Barret).
  642.  * 09-Jun-94 (hes) -- ShowDVI:  -- v1.36ß
  643.  *              DVIprint: Add _alpha_ MUI GUI. (option GUI)
  644.  *                Recognice directories/.tex files as input.
  645.  *                -- v1.36ß
  646.  *                    --BETA 5--
  647.  * 16-Jun-94 (hes) -- ShowDVI:    Fix 'confuse program' with wrong option (uninitialized menu) (YET).
  648.  *                (This fixes also the program with start of second ShowDVI)
  649.  *                Add black on white for fullpage.
  650.  *                Fix mungwall hit if stopping the program within fullpage mode (Stefan Schmieta).
  651.  *                Add ARexx command 'getnumofpages' (arma).
  652.  *                ARexx 'getpage' returns error rc=5, if no dvi-file loaded.
  653.  * 22-Jun-94 (hes) -- Break Fatal() loop. Don't call cleanupt, if already done.
  654.  *              ShowDVI:    Now use the real width/height of with scroller arrows and sizing gadget.
  655.  *                Should now work together with 'sysihack' (reported from olk).
  656.  *                Fix checkmark menu entries. Now doppel-klick does nothing. (reported from Dan Barret)
  657.  * 29-Jun-94 (hes) -- Fix TPIC special call: Wrong offset in twoup mode.
  658.  *              ShowDVI:    Add AMIGA-H shortcut for 'start SpecialHost'
  659.  *                   -- v1.37ß
  660.  *              DVIprint: Add PUBSCREEN arg. Works only with the GUI option.
  661.  *                Use MUI 2.1 (version 8). Change lokale files.
  662.  *                   -- v1.37ß
  663.  * 10-Jul-94 (hes) -- Do a bit profiling and make Read?Byte() inline. Some other small changes in fast_cp.c
  664.  *              loadfont.c newfont.c and unpack.c. Hope it makes things a bit faster.
  665.  *              ShowDVI:    Add search string feature (menu+'s')
  666.  * 14-Jul-94 (hes) -- ShowDVI:    Now really sysihack compatible.
  667.  * 20-Jul-94 (hes) -- ShowDVI:    Fix some problems with the physical page numbering (reported from Matthias Berberich)
  668.  * 21-Jul-94 (hes) -- ShowDVI:    Highlight the found string.
  669.  * 07-Aug-94 (hes) -- Add version check into the locale function.
  670.  *              ShowDVI:    Add Search-Window.
  671.  *                Fix something about starting second ShowDVI.
  672.  *                Show BETA requester only once.
  673.  *                -- v1.38ß
  674.  *                    DVIprint:    -- v1.38ß
  675.  * 10-Aug-94 (hes) -- Add SPECIALhost option.
  676.  *                    --BETA 6--
  677.  * 29-Sep-94 (hes) -- Add some things into the special-message. (Check the size of the message!)
  678.  *              ShowDVI:    -- v1.39ß
  679.  *              DVIprint:    -- v1.39ß
  680.  * 12-Nov-94 (hes) -- Use EVPaths for OpenConfigFile.
  681.  *
  682.  * 25-May-95 (hes) -- ********* RELEASE THE SOURCE TO THE PUBLIC !!! **********
  683.  *              ShowDVI:    -- v1.40
  684.  *              DVIprint:    -- v1.40
  685.  * 05-Jul-95 (hes) -- Fix magnification problem in dospecia.c/draw_border().
  686.  *              Both programs need new PasTeX.catalog version.
  687.  *              ShowDVI:    Make scrolling on graphic cards (esp. CyBER*) faster.
  688.  *                Use BltTemplate() in ClipIt().
  689.  *                Two new lines in the config file. You can set now the a/b pens.
  690.  *                So if you use ShowDVI on a public screen with more colors, you can choose
  691.  *                your favorite color combination.
  692.  *                Shorten the filename in the window titelbar.
  693.  *                Bug? Border lines doesn't work on CyBERvision.
  694.  *                -- v1.41
  695.  *              DVIprint:    -- v1.41
  696.  *
  697.  */
  698.  
  699.  
  700.  
  701.  
  702. /* If you want uncrypted version strings, undef it */
  703.  
  704. #define CRYPT
  705.  
  706.  
  707. #define  VERSION_FORMAT_STRING    "%s V%s%c %s"
  708.  
  709. #define COMPILER        ' '    /* no more 'ß' */
  710.  
  711. #define DVIPRINT_VERSION    "1.41"
  712. #define SHOWDVI_VERSION        "1.41"
  713.  
  714. #define PROGRAMTITLE_SHOW    "ShowDVI"
  715. #define PROGRAMTITLE_FLIB    "FontLib Manager"
  716. #define PROGRAMTITLE_PRINT    "DVIPrint"
  717.  
  718. #define PROGRAMKENNUNG        "Copyright © 1990-1995 by Georg Heßmann. All Rights Reserved."
  719.  
  720.  
  721. #define AUTHOR_D_FORMAT        "\n\t%s\n\t\t%s\n\t\t%s\n"
  722. #define AUTHOR_S_FORMAT        "\n\t%s\n\t\t%s\n"
  723. #define AUTHOR_TITLE        "The Authors:"
  724. #define AUTHOR1            "Georg Heßmann (Hessmann@Informatik.Uni-Hamburg.De)"
  725. #define AUTHOR3            "Jörg Höhle (hoehle@cs.uni-sb.de)"
  726.  
  727.  
  728. #if defined(BETACOPYRIGHT)
  729. # define COPYRIGHT        "This is *no* public version!! \"PLEASE DON'T SPREAD IT\""
  730. #endif
  731.  
  732.