DataMuseum.dk

Presents historical artifacts from the history of:

Bogika Butler

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Bogika Butler

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦dba759163⟧ TextFile

    Length: 2816 (0xb00)
    Types: TextFile
    Names: »TFGLOBAL.PAS«

Derivation

└─⟦59c2ecd8d⟧ Bits:30009789/_.ft.Ibm2.50006600.imd Mogens Pelles Zilog 80,000 / EOS projekt
    └─⟦this⟧ »TFGLOBAL.PAS« 

TextFile

(*$R+*)

const
  divide_file_name  = 'tformat.div';
  revised_file_name = 'tformat.rev';
  buffer_file_name  = 'tformat.buf';
  figure_file_name  = 'tformat.f';

type
  attribute_set = set of attribute;
  index = 1..f_len;
  index0= 0..f_len;
  f_string_elt =  record
                    attr: attribute_set;
                    case boolean of
                      false : (ch : char); (* if not space in attr *)
                      true  : (sp_len : integer); (* if space in attr *)
                  end;
  f_string = array (.index.) of f_string_elt;
  command_type = (set_line_spacing,
                  set_page_nr,
                  set_hf_left,
                  set_hf_right,
                  set_hf_line_spacing,
                  set_head_height,
                  set_foot_height,
                  set_page_height,
                  open_block,
                  close_block,
                  open_figure,
                  close_figure,
                  paste,
                  open_par,
                  close_par,
                  open_heading,
                  close_heading,
                  eject,
                  figure);
  place = (head, foot);
  justification = (left_side, middle, right_side);

  name = string (.30.);

const
  cr = #13;

  undefined = -maxint;
  irrelevant = 0;

function min(x, y : integer) : integer;
begin
  if x < y then min := x else min := y
end;

function max(x, y : integer) : integer;
begin
  if x > y then max := x else max := y
end;

function f_pos(goal : char; var line : f_string;
               first, last : index0) : index0;
  var c : char; i : index0;
begin
  if last < first then
    f_pos := first-1
  else begin
    with line(.last.) do begin
      c := ch; ch := goal;
      i := first;
      while line(.i.).ch <> goal do i := i+1;
      ch := c;
    end;
    if line(.i.).ch = goal then f_pos := i else f_pos := first-1;
  end;
end;

procedure f_fill(c : char; at : attribute_set; var line : f_string;
                 first, last : index0);
  var i : index0; elt : f_string_elt;
begin
  elt.ch := c; elt.attr := at;
  for i := first to last do line(.i.) := elt;
end;

procedure f_copy(var line1 : f_string; first1, last1 : index0;
                 var line2 : f_string; first2 : index0);
  var i1, i2 : index0;
begin
  i2 := first2;
  for i1 := first1 to last1 do begin
    line2(.i2.) := line1(.i1.); i2 := i2+1;
  end;
end;

procedure f_space(width : integer; var line : f_string; pos : index);
begin
  with line(.pos.) do begin
    sp_len := width; attr := (.space.)
  end
end;

function getkey : char;
  var ch : char;
begin
  read(kbd, ch); getkey := ch;
end;




«eof»