@x @d banner=='This is GFtype, Version 2.2' {printed when the program starts} @y @d banner=='This is GFType 2.2 for Cedar 6.0' {printed when the program starts} @z @x @d print_ln(#)==write_ln(#) @d print_nl==write_ln @y @d write_ln==writeln @d read_ln==readln @d print_ln(#)==write_ln(#) @d print_nl==write_ln @d max_int==maxint @z @x var @@/ procedure initialize; {this procedure gets things started properly} @y var @@/ @@/ procedure initialize; {this procedure gets things started properly} @z @x @ The following parameters can be changed at compile time to extend or reduce \.{GFtype}'s capacity. The total number of bits in the main |image_array| will be $$\hbox{$|max_row|+1\;\times\;|max_col|+1$}.$$ (\MF's full pixel range is rarely implemented, because it would require 8~megabytes of memory.) @= @!terminal_line_length=150; {maximum number of characters input in a single line of input from the terminal} @!line_length=79; {\\{xxx} strings will not produce lines longer than this} @!max_row=79; {vertical extent of pixel image array} @!max_col=79; {horizontal extent of pixel image array} @y @ The following parameters can be changed at compile time to extend or reduce \.{GFtype}'s capacity. The total number of bits in the main |image_array| will be $$\hbox{$|max_row|+1\;\times\;|max_col|+1$}.$$ (\MF's full pixel range is rarely implemented, because it would require 8~megabytes of memory.) @d max_row==79 {vertical extent of pixel image array} @d max_col==79 {horizontal extent of pixel image array} @= @!terminal_line_length=150; {maximum number of characters input in a single line of input from the terminal} @!line_length=79; {\\{xxx} strings will not produce lines longer than this} @z @x @d last_text_char=127 {ordinal number of the largest element of |text_char|} @y @d last_text_char=255 {ordinal number of the largest element of |text_char|} @z @x begin reset(gf_file); @y begin byte_file_reset(gf_file, 'gf '); @z @x begin update_terminal; reset(term_in); @y begin update_terminal; tty_reset(term_in); @z @x begin rewrite(term_out); {prepare the terminal for output} @y begin tty_rewrite(term_out); {prepare the terminal for output} @z @x @p begin initialize; {get all variables initialized} @y @p begin file_rewrite(output, 'typ '); initialize; {get all variables initialized} @z @x final_end:end. @y final_end: file_close(output); byte_file_close(gf_file); end. @z @x @* System-dependent changes. This section should be replaced, if necessary, by changes to the program that are necessary to make \.{GFtype} 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 @* Externals for things in Cedar. Here they are: @= procedure tty_reset(var f: text); external; {set up for input from terminal} procedure tty_rewrite(var f: text); external; {set up for output to terminal} procedure byte_file_reset(var f: byte_file; ext: alfa); external; {set up for input from byte file} procedure file_rewrite(var f: text; ext: alfa); external; {set up for output to file} procedure file_close(var f: text); external; {close a text file} procedure byte_file_close(var f: byte_file); external; {close a byte file} @ @= output: text_file; @z ºfile: GFType.changes Last changed by Pavel on October 18, 1985 11:10:12 am PDT 002568: Change the banner line. 003438: Change write_ln to writeln, read_ln to readln, and max_int to maxint. 003644: Allow for external procedure and function declarations for things implemented directly in Cedar, rather than in Pascal. 004010: Change max_row and max_col into numeric macros because the Cedar compiler can't handle a PascalInteger (INT) as an array bound. 007429: Change last_text_char to 255. 027192: Hook up open call to Cedar. 031163: Do a reset on the TTY for input. 031762: And a rewrite of the TTY for input. 048331: Set up output file. 048641: Close files. 052082: Define the externals. Êý˜J™J™9J™unit™˜J˜J—˜J˜O—J˜—™M˜J˜J˜—˜J˜J˜J˜J˜J˜—J˜—™˜J˜$J˜C—˜J˜$JšœN˜NJ˜C—J˜—šœ‡™‡šœ˜Jšœé˜é—šœ˜Jšœí˜í—Jšœ˜—šœ%™%šœ˜JšœL˜L—šœ˜JšœL˜L—Jšœ˜—šœ#™#šœ˜Jšœ˜—šœ˜Jšœ-˜-—Jšœ˜—šœ(™(šœ˜Jšœ&˜&—šœ˜Jšœ*˜*—Jšœ˜—šœ+™+šœ˜Jšœ:˜:—šœ˜Jšœ>˜>—Jšœ˜—šœ™šœ˜Jšœ4˜4—šœ˜JšœX˜X—Jšœ˜—šœ™šœ˜Jšœ˜—šœ˜Jšœ ˜ J˜J˜J˜—Jšœ˜—šœ™šœ˜Jšœ‰˜‰—šœ˜Jšœ‡˜‡—Jšœ˜——…—®e