$eject /*************************************************************** * g l o b a l v a r i a b l e a n d c o n s t a n t * * d a t a d e c l a r a t i o n * ***************************************************************/ global$data: do; declare equ literally 'literally'; declare init equ 'initial'; declare maxline equ '66', /* maximum page length */ maxout equ '128', /* maximum output line length */ pagewidth equ '70', huge equ '100', buflen equ '128', /* the buffer length */ lsize equ '128', eos equ '1', /* end of string */ unknown equ '0', newline equ '2h', /* end of line */ eofile equ '1ah', /* end of file character */ cr equ '0dh', lf equ '10', true equ '1', false equ '0', yes equ '1', no equ '0', pagelen equ '66', backspace equ '08h', underline equ '05h', tab equ '09', pluss equ '2bh', minuss equ '2dh', blank equ '20h', s$quote equ '27h', d$quote equ '22h', pagenum equ '25h'; $eject /* input and output file parameter */ declare eofset byte public init (false), /* end of file flag */ actual$count address public, input$count address public, output$count address public, status address public, aft$in address public, /* aftn for input file */ aft$out address public; /* aftn for output file */ /* page layout parameter */ declare cur$page byte public init (0), /* current output page number */ newpage byte public init (1), /* next output page number */ lineno byte public init (0), /* next line to be printed */ plval byte public init (pagelen), /* page length in lines */ m1$val byte public init (4), /* top margin include header */ m2$val byte public init (2), /* margin after header */ m3$val byte public init (2), /* margin after last text line */ m4$val byte public init (4), /* bottom margin include footer */ bottom byte public init (60), /* last live line */ header (maxout) byte public, footer (maxout) byte public, headflag byte public init (false), footflag byte public init (false), fnot$flag byte public init (false), $eject /* line indent, spacing, margin parameters */ spval byte public, /* blank space line value */ fill byte public init (yes), /* rigth margin justification flag */ lsval byte public init (1), /* current line spacing */ inval byte public init (0), /* current indent */ rmval byte public init (pagewidth), /* right margin value */ tival byte public init (0), /* current temporary indent */ ceval byte public init(0), /* number of lines to be centered */ ulval byte public init (0), /* number of lines to be underlined */ argtyp byte public; /* argument type */ /* buffer and pointer for input and output */ declare outbuf (maxout) byte public, /*output buffer*/ outp byte public init (0), /* last char position in outbuf */ outw byte public init (0), /* width of text currently in outbuf */ outwds byte public init (0), /* number of words in outbuf */ wrdbuf (maxout) byte public, /* word buffer */ wordp byte public, inbuf (buflen) byte public, /* input file buffer */ ibp byte public, /* inbuf pointer */ lbuff (lsize) byte public, /* line buffer */ blankbuf (lsize) byte public init (' ', ' ', ' '), lbp byte public, /* pointer for lbuff */ lblen byte public, /* line length */ textbuf (buflen) byte public, /* output text buffer */ tbp byte public; /* text buffer pointer */ /* parameter for footnote */ declare rmjust byte public init (true); declare error$flag byte public init (false); end global$data; eof