summaryrefslogtreecommitdiff
path: root/support/rnototex/rnototex.pas
blob: 804ce4d7a7e26aa9b74d0c65b571dd2363c1a882 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
[INHERIT('BASICFILEOPS','CONVERSION',
'LATEXOPS','TREEANDLISTOPS','FLAGOPS','DSROPS','INIOPS')]

PROGRAM RNOTOTEX( INPUT, OUTPUT);

{ PROGRAM TO CONVERT A RUNOFF FORMAT FILE TO TEX FORMAT }
{ DEVELOPED BY RANDALL VENHOLA, SUMMER 1987 ON CCRS SMOKE:: }
{ USING VAX PASCAL }

LABEL

  ENDOFPROGRAM;

CONST
   DEFAULTFONT = 10;
   DEFAULTSTYLE = 'report';

VAR
 
  RNO, TEX, INI                 : TEXT;         
  RUNOFFTREE                   : ARGTREE;
  CURRENTDATE, CURRENTTIME    : DATETIMETYPE;
  INPUTFID, OUTPUTFID         : FIDTYPE;                   
  LASTINPUTCHAR, CURRENTCHAR : [GLOBAL] CHAR;
  TOTALLINES, TOTALCHARS      : [GLOBAL] INTEGER;
  TOTALGOODDSRCOMMANDS       : [GLOBAL] INTEGER;
  TOTALBADDSRCOMMANDS        : [GLOBAL] INTEGER;
  TABRECORD                    : [GLOBAL] TABRECORDTYPE;
  LOG	                        : [GLOBAL] TEXT;
  COLUMNCOUNTER                : [GLOBAL] INTEGER;
         
{emergency exit procedure}
[GLOBAL] PROCEDURE GOTOENDOFPROGRAM;
BEGIN
   GOTO ENDOFPROGRAM
END;


BEGIN

    OPENLOGFILE;
    GREETUSER( CURRENTDATE, CURRENTTIME );
    USERINTERFACE( INPUTFID, OUTPUTFID, RNO, TEX );
    SETUPTREE( INI, RUNOFFTREE );
    PUTCOMMENTSTOOUTPUT( TEX, INPUTFID, CURRENTDATE, CURRENTTIME);
    STARTLATEX( TEX, DEFAULTFONT, DEFAULTSTYLE );
    INITFLAGTABLE;
    INITGLOBALVARS;
    INITCHARREADER( RNO );
    PARSEFILE(RNO, TEX, RUNOFFTREE );
    ENDLATEX( TEX );

ENDOFPROGRAM:

    WRITELN(LOG,'[TOTAL GOOD DSR COMMANDS = ',TOTALGOODDSRCOMMANDS,']');
    WRITELN(LOG,'[TOTAL  BAD DSR COMMANDS = ',TOTALBADDSRCOMMANDS,']');
    CLOSEFILES( RNO, TEX );
    CLOSELOGFILE          

END.