DataMuseum.dk

Presents historical artifacts from the history of:

RC4000/8000/9000

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

See our Wiki for more about RC4000/8000/9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦2bac81261⟧ TextFile

    Length: 27648 (0x6c00)
    Types: TextFile
    Names: »scatup4tx   «

Derivation

└─⟦01e83a425⟧ Bits:30008166 Bånd med SW8010 og SW8500 source code
    └─⟦75ff9bef3⟧ 
        └─⟦this⟧ »scatup4tx   « 

TextFile



comment susercat update       * page 1   28 01 82, 14.51;  

begin

  comment the program handles the s_user_catalog <susercat>.
  the format of <susercat> is shown in s reference manual.
  the following functions has been implemented:

  1. create a new <susercat>. An area <susercat> must be present
  _________
  syntax of call:
  _                                                 *
  scatup newcat.<catalog size in segm> !device name!
  _                                                 1

  2. insert an entry in <susercat>
  _________
  syntax of call:
  _                                                                *
  _                          !<bs. name>.<perm sli>.<perm ent>    !
  _                                         1
  _                          !perm.<bs_name>.<slices>.<entries>   !
  _                                         0
  _                                         1
  _                          !temp.<bs_name>.<slices>.<entries>   !
  _                                         0
  _                          !prio.<integer>                      !
  _                          !comm.<integer>                      !
  _                          !buf.<integer>                       !
  _                          !area.<integer>                      !
  _                          !inter.<integer>                     !
  scatup insert.<entry name> !func.<integer>                      !
  _                          !std.<lower>.<upper>                 !
  _                          !max.<lower>.<upper>                 !
  _                          !user.<lower>.<upper>                !
  _                          !addr.<integer>                      !
  _                          !size.<integer>                      !
  _                          !prog.<prog>                         !
  _                                                                0

  a negative base must be represented as n.<integer>

  if no bs_name is specified, device 0 is used

  the default values are:
  <dev 0>.5.5
  buf.4  area.6
  std.8388605.8388605
  max.8388605.8388605
  user.8388605.8388605
  size.12800  prog.fp
  all others are set to zero

  3. delete an entry in <susercat>
  _________
  syntax of call:
  scatup delete.<entry name>
  ;  

\f



comment susercat update       * page 2   28 01 82, 14.51;  

  comment

  4. list       an entry                 in <susercat>
  ___________   entry 0                   -     -
  ___________   all entries               -     -
  ___________   the bs-device names and
  ___________   the names of all entries  -     -
  syntax of call:
  _                         1
  _           !cat         !
  scatup list.!<entry name>!
  _           !all         !
  _           !names       !
  _                         1

  external procedures used:
  _______________________
  change_area
  claim_proc
  lookup_proc
  long_string
  readparam
  set_proc
  
  januar 82 annette
  april  83   -
  august 88 fgs
  ;  

\f



comment susercat update       * page 3   28 01 82, 14.51;  

  procedure error(no);  
  ______________________
  integer       no;  
  begin
    case no of
    begin
      <*1*>   write(out, "nl", 1, <:syntax:>);  
      <*2*>   write(out, "nl", 1,  param.ln_f, <:  entry unknown:>);  
      <*3*>   write(out, "nl", 1, param.ln_f, "sp", 2,  
      _           <:device not found in nametable:>);  
      <*4*>   write(out, "nl", 1, <:devicename expected after catsize:>);  
      <*5*>   write(out, "nl", 1, param.ln_f, <:   parameter error:>);  
      <*6*>   write(out, "nl", 1, param.ln_f, "sp", 2, <:action unknown:>);  
      <*7*>   write(out, "nl", 1, <:action missing:>);  
      <*8*>   write(out, "nl", 1, <:parameter missing:>);  
      <*9*>   write(out, "nl", 1, <:catalog full:>);  
      <*10*>  write(out, "nl", 1,  <:unknown device name:>); 
      <*11*>  write(out, "nl", 1,  param.ln_f, <:  entry already exists:>);  
      <*12*>  write(out, "nl", 1, <:no output file allowed:>);  
      <*13*>  write(out, "nl", 1, <:too many parameters:>);  
    end;  
    write(out, "nl", 1, <:***scatup  no update performed:>);  
    goto stop;  
  end;  

  integer procedure hash(name, catsize);  
  ___________________________________
  comment compute hashvalue;  
  long array           name;  
  integer              catsize;  
  begin
    integer nv;  
    long name1;  
    name1 := name(1) + name(2);  
    nv := name1 extract 24 + name1 shift (-24);  
    if nv < 0 then nv := - nv;  
    hash :=  nv mod catsize;  
  end;  

  boolean procedure neg;  
  ______________________
  comment the procedure reads a parameter. If the parameter = n
  _       for negativ the procedure is true and it reads 
  _       the next parameter;  
  begin
    neg := false;  
    ip := readparam(param);  
    if ip <> 3 and ip <> 4 then error(1);  
    if ip = 4 then
    begin
      if long param(1) = long <:n:> then
      _          neg := true
      else error(5);  
      if readparam(param) <> 3 then error(5);  
    end;  
  end neg;  

\f



comment susercat update       * page 4   28 01 82, 14.51;  

  boolean procedure search(start_segm, end_segm, proc_name, func, upd);  
  ___________________________________________________________
  comment search segment;  
  comment func=1 means: find <proc_name> entry in s_catalog
  -   2   -  : find first unused entry starting at <hash_value>;  
  value            start_segm, end_segm;  
  integer                    start_segm, end_segm, func;  
  long array                proc_name;  
  boolean                             upd;  
  begin
    boolean found;  
    search := found := false;  
    setposition(s_cat, 0, start_segm);  
    for track := start_segm + 1 step 1 until end_segm do
    begin
      repeat
      begin
        if upd then rest := swoprec_6(s_cat, rec_lng)
        else rest := inrec_6(s_cat, rec_lng);  
        h_key := s_cat.h_key_f;  
        begin
          case func of
          begin
            <*1*> 
            begin
              if h_key <> -1 and h_key <> -2 and
              _        s_cat.name_f(1) = proc_name(1) and
              _      s_cat.name_f(2) = proc_name(2) then
              begin
                search := found := true;  
                track := end_segm + 1;  
              end;  
            end;  
            <*2*>
            begin
              if h_key = -1 or h_key = -2 then
              begin
                search := found := true;  
                track := end_segm + 1;  
              end;  
            end;  
          end;  
        end;  
      end;  
      until rest < rec_lng or found;  
    end;  
  end search;  

\f



comment susercat update       * page 5   28 01 82, 14.51;  

  procedure init;  
  _______________
  comment inrec entry 0 and initialize;  
  begin
    inrec_6(s_cat, 4);  
    rec_lng    := s_cat.lng_f;  
    rest     := changerec_6(s_cat, rec_lng);  
    discs     := s_cat.lng_0// 6 - 2;  
    max_tracks := s_cat.segm_f;  
    ln_f     := 0;  
    for t := 1 step 2 until discs do
    begin
      rec_f      := rec_f + 12;  
      d_f         := d_f + 8;  
      disc.d_f(1)  := s_cat.rec_f.lg_f1;  
      disc.d_f(2)  := s_cat.rec_f.lg_f2;  
      sr(t)      := s_cat.rec_f.slice_f;  
      sr(t+1)     := s_cat.rec_f.ref_f;  
    end;  
  end init;  

\f



comment susercat update       * page 6   28 01 82, 14.51;  

  procedure newcat;  
  _________________
  comment create new s_catalog;  
  begin
    integer j, ref;  

    ln_f := 0;  
    ref      := 44 - 8;  
    if readparam(param) = 3 then 
    max_tracks := param(1)   
    else error(1);  

    rest := outrec_6(s_cat, 512);  
    for l_f := 4 step 4 until 512  do
    s_cat.l_f := 0;  

    s_cat.segm_f := max_tracks;  
    t := 0;  
    for j := readparam(param) while j <> 0 do
    begin
      t := t + 1;  
      if j = 1 or j = 2 then
      begin
        integer i, bsno;  
        long array par(1:2);  
if j=2 then
begin
        par(1)  := long param(1);  
        par(2)   := long param(2);  
        bsno  := -1;  
end
else
bsno := param(1) + 1;
        rec_f  := rec_f + 12;  
        ref    := ref + 8;  
        if -, claim_proc(3, bsno,  par, i, i, 
        _      s_cat.rec_f.slice_f) then error(3);  
 s_cat.rec_f.lg_f1 := par(1);
 s_cat.rec_f.lg_f2 := par(2);
        s_cat.rec_f.ref_f := ref;  
      end
      else error(4);  
    end;  
    rec_0_lng := s_cat.lng_0 := 6 + 12 * t;  
    rec_lng   := s_cat.lng_f := 
      if t < 10 then
        44 + 8 * t
      else
        rec_0_lng;  

    setposition(s_cat, 0, 0);  
    rest := swoprec_6(s_cat, rec_lng);  

    for track := 1 step 1 until max_tracks do
    begin
      repeat
      begin
        rest := swoprec_6(s_cat, rec_lng);  
        for l_f := 4 step 4 until rec_lng  do
        s_cat.l_f := 0;  
        s_cat.h_key_f := -1;  
      end;  
      until rest < rec_lng;  
    end;  
  end newcat;  

\f



comment susercat update       * page 7   28 01 82, 14.51;  

  procedure delete;  
  _________________
  comment delete entry <proc_name> in s_catalog;  
  begin
    update := true;  
    init;  
    if readparam(param) = 4 then
    begin
      boolean found;  
      integer h;  
      h := hash(param.ln_f, s_cat.segm_f);  
      found := search(h, max_tracks, param.ln_f, 1, update);  
      if -, found then found := search(0, h, param.ln_f, 1, update);  
      if found then
      begin
        for l_f := 4 step 4 until rec_lng do
        s_cat.l_f := 0;  
        s_cat.h_key_f := -2;  
      end
      else  error(2);  
    end
    else error(5);  
    if readparam(param) <> 0 then error(13);  
  end delete;  

\f



comment susercat update       * page 8   28 01 82, 14.51;  

  procedure insert;  
  _________________
  comment insert entry <proc_name> in s_catalog;  
  begin
    boolean found;  
    integer h;  
    integer field ent_pm_d0_f, segm_pm_d0_f;  

    procedure ins_reso(index);  
    __________________________
    integer                index;  
    begin
      long array bsname(1:2);
      di_f := 44 - 8;  
      d_f := 4 - 8;  
      bsname(1) := param.ln_f(1);
      bsname(2) := param.ln_f(2);
      if readparam(param) = 3 then
      begin
        found := false;  
        for t := 1 step 2 until discs do
        begin
          di_f := di_f + 8;  
          d_f := d_f + 8;  
          if disc.d_f(1) = bs_name(1) and
          _  disc.d_f(2) = bs_name(2) then
          begin
            found := true;  
            s_cat.di_f(index+1):= param(1) * sr(t);  
            if readparam(param) = 3 then
            s_cat.di_f(index) := param(1)
            else error(1);  
          end;  
        end;  
        if -, found then error(10);  
      end
      else error(1);  
    end;  

    update := true;  
    init;  
\f



comment susercat update       * page 9   28 01 82, 14.51;  

    if readparam(param) = 4 then
    begin
      h := hash(param.ln_f, s_cat.segm_f);  
      found := search(h, max_tracks, param.ln_f, 1, update);  
      if -, found then found := search(0, h, param.ln_f, 1, update);  
      if found then error(11);  
      found := search(h, max_tracks, param.ln_f, 2, update);  
      if -, found then found := search(0, h, param.ln_f, 2, update);  
      if found then 
      begin
        comment standard values in process entry;  
        _____________________________________
        for l_f := 4 step 4 until rec_lng do
        s_cat.l_f := 0;  

        s_cat.h_key_f     := h;  
        s_cat.name_f(1)   := long param(1);  
        s_cat.name_f(2)   := long param(2);  
        s_cat.buf_area_f  := 4 shift 12 + 6;  
        s_cat.max_lo      := 8388605;  
        s_cat.max_hi      := 8388605;  
        s_cat.std_lo      := 8388605;  
        s_cat.std_hi      := 8388605;  
        s_cat.size        := 12800;  
        s_cat.prog_f(1)   := long <:fp:>;  
        s_cat.usr_lo      := 8388605;  
        s_cat.usr_hi      := 8388605;  
        ent_pm_d0_f       := 50;  
        segm_pm_d0_f      := 52;  
        s_cat.ent_pm_d0_f  := 5;  
        s_cat.segm_pm_d0_f := 5 * sr(1);  

        comment  put in parameter values;  
        ________________________
        for j := readparam(param) while j <> 0 do  
        begin
          if j = 2 then
          action := longstring(tp,  string param(1), case tp of(
          <:prio:>, 
          <:comm:>, 
          <:buf:>, 
          <:area:>, 
          <:inter:>, 
          <:func:>, 
          <:max:>, 
          <:std:>, 
          <:size:>, 
          <:prog:>, 
          <:user:>, 
          <:temp:>,  
          <:perm:>, 
          <:addr:>, 
          <::>))
          else error(1);  
\f



comment susercat update       * page 10   28 01 82, 14.51;  

          begin
            case action of
            begin

              <*_____1_____device name_____*>
              comment insert resources as permanent device 0;  
              ins_reso(3);  

              <*_____2_____prio_____*>
              begin
                if readparam(param) = 3 then
                begin
                  ip := param(1);  
                  s_cat.prio_com_f := ip shift 12;  
                end
                else error(5);  
              end;  

              <*_____3_____comm_____*>
              begin
                if readparam(param) = 3 then
                s_cat.prio_com_f := s_cat.prio_com_f + param(1)  
                else error(5);  
              end;  

              <*_____4_____buf_____*>
              begin
                if readparam(param) = 3 then
                begin
                  ip :=  param(1);  
                  s_cat.buf_area_f := ip shift 12
                  _     + s_cat.buf_area_f extract 12;  
                end
                else error(5);  
              end;  

\f



comment susercat update       * page 11   28 01 82, 14.51;  

              <*_____5_____area_____*>
              begin
                if readparam(param) = 3 then
                begin
                  ip :=  param(1);  
                  s_cat.buf_area_f := s_cat.buf_area_f shift (-12)
                  shift 12 + ip;  
                end
                else error(5);  
              end;  

              <*_____6_____inter_____*>
              begin
                if readparam(param) = 3 then
                begin
                  ip :=  param(1);  
                  s_cat.int_fnc_f := ip shift 12
                  + s_cat.int_fnc_f extract 12;  
                end
                else error(5);  
              end;  

              <*_____7_____func_____*>
              begin
                if readparam(param) = 3 then
                begin
                  ip :=  param(1);  
                  s_cat.int_fnc_f := s_cat.int_fnc_f shift (-12)
                  shift 12 + ip;  
                end
                else error(5);  
              end;  

              <*_____8_____max_____*>
              begin
                if neg then s_cat.max_lo := - param(1)
                else s_cat.max_lo := param(1);  
                if neg then s_cat.max_hi := - param(1)
                else s_cat.max_hi := param(1);  
              end;  

              <*_____9_____std_____*>
              begin
                if neg then s_cat.std_lo := - param(1)
                else s_cat.std_lo := param(1);  
                if neg then s_cat.std_hi := - param(1)
                else s_cat.std_hi := param(1);  
              end;  

              <*____10_____size_____*>
              begin
                if readparam(param) = 3 then
                s_cat.size  := param(1)  
                else error(5);  
              end;  

\f



comment susercat update       * page 12   28 01 82, 14.51;  

              <*____11_____prog_____*>
              begin
                if readparam(param) = 4 then
                begin
                  s_cat.prog_f(1) := param.ln_f(1);  
                  s_cat.prog_f(2) := param.ln_f(2);  
                end  
                else error(1)
              end;  

              <*____12_____user_____*>
              begin
                if neg then s_cat.usr_lo := - param(1)
                else s_cat.usr_lo := param(1);  
                if neg then s_cat.usr_hi := - param(1)
                else s_cat.usr_hi := param(1);  
              end;  

              <*____13_____temp _____*>
              begin
                i := readparam(param);  
                if i = 4 then ins_reso(1);  
                if i = 3 then
                begin
                  di_f := 44;  
                  s_cat.di_f(2) := param(1) * sr(1);  
                  if readparam(param) = 3 then 
                  _   s_cat.di_f(1) := param(1)
                  else error(5);  
                end;  
                if i < 3 then error(5);  
              end;  

              <*____14_____perm_____*>
              begin
                i := readparam(param);  
                if i = 4 then ins_reso(3);  
                if i = 3 then
                begin
                  di_f := 44;  
                  s_cat.di_f(4) := param(1) * sr(1);  
                  if readparam(param) = 3 then
                  _     s_cat.di_f(3) := param(1)
                  else error(5);  
                end;  
                if i < 3 then error(5);  
              end;  

              <*____15_____addr_____*>
              begin
                if readparam(param) = 3 then
                s_cat.addr_f := param(1)
                else error(5)
              end;  

            end case action;  
          end;  
        end while;  
      end
      else error(9);  
    end
    else error(5);  
  end insert;  

\f



comment susercat update       * page 13   28 01 82, 14.51;  

  procedure pr_cat(out_z);  
  ________________________
  comment output from entry 0 ;  
  zone       out_z;  
  begin
    comment output of cat reservation;  
    write(out_z, 
    "nl", 3, <:susercat = set 21 0 d.0 0 0 11.0 0:>, 
    "nl", 1, <:scope user    susercat:>);  

    comment output of gen cat entry;  

    write(out_z, "nl", 2, <:scatup newcat:>, <<-ddddddd>, 
    _    <:.:>, s_cat.segm_f, <:,:>, "sp", 4,  
    _    <:catsize:>, "nl", 1);  

    d_f := 4 - 8;  
    for t := 1 step 2 until discs do
    begin
      d_f         := d_f + 8;  
      write(out_z, <:,:>, "nl", 1, true, 12, disc.d_f);  
    end;  
    write(out_z, "nl", 2);  
  end pr_cat;  

\f



comment susercat update       * page 14   28 01 82, 14.51;  

  procedure pr_proc(out_z);  
  _________________________________
  comment output from process entry;  
  zone         out_z;  
  begin

    procedure write_base(basel, baseu, text);  
    __________________________________
    value                 basel, baseu;  
    integer               basel, baseu;  
    string                             text;  
    write(out_z, "nl", 1, text, <<ddddddd>,  
    _     if basel < 0 then <:n.:> else <:  :>, 
    _     if basel >= 0 then basel else 
    _      - basel, <:.:> , if baseu < 0 then <:n.:> else <:  :>, 
    _     if baseu >= 0 then baseu else
    _      - baseu, <:,:>);  

    procedure write_disc(disc_a, disc_name);  
    _________________________________________
    integer array                disc_a;  
    long    array                        disc_name;  
    write(out_z, <:,:>, "nl", 1, <:temp.:>,true,12,   
    _   disc_name, <:.:>,<<dddddd>,
    _    s_cat.di_f(2)//sr(t), <:.:>, s_cat.di_f(1), 
    _   "sp", 9, <:perm.:>, true, 12, disc_name, <:.:>, 
    _   <<dddddd>, disc_a(4)//sr(t), <:.:>,  
    _   <<dddddd>, disc_a(3));  

    begin
      integer s;  
      s := write(out_z, "nl", 1, <:scatup_insert.:>,   
      _     s_cat.name_f, <:,:>);  
      if all then  write(out_z, "nl", 1, <:,:>, "*", s - 2);  
      write(out_z, "nl", 1, <:prio.:>, s_cat.prio_com_f shift (-12),  
      _ "sp", 1, <:comm.:>, s_cat.prio_com_f extract 12, <:,:>,  
      _   "nl", 1, <:buf.:>, s_cat.buf_area_f shift (-12),  
      _ "sp", 1, <:area.:>, s_cat.buf_area_f extract 12, <:,:>,  
      _   "nl", 1, <:inter.:>, s_cat.int_fnc_f shift (-12),  
      _ "sp", 1, <:func.:>, s_cat.int_fnc_f extract 12, <:,:>);  
      write_base(s_cat.std_lo, s_cat.std_hi, <:std .:>);  
      write_base(s_cat.usr_lo, s_cat.usr_hi, <:user.:>);  
      write_base(s_cat.max_lo, s_cat.max_hi, <:max .:>);  
      write(out_z, "nl", 1, <:addr.:>, s_cat.addr_f,  
      _   "sp", 1, <:size.:>, <<ddddddd>, s_cat.size, 
      _ "sp", 1, <:prog.:>, s_cat.prog_f, <:,:>,"nl", 1, 
      <:,resource_________slices___entr:>,"sp",27,<:slices___entr:>);  

      di_f := 44 - 8;  
      d_f := 4 - 8;  
      for t := 1 step 2 until discs do
      begin
        di_f   := di_f + 8;  
        d_f    := d_f + 8;  
        write_disc(s_cat.di_f, disc.d_f);  
      end;  
    end;  

    write(out_z, "nl", 3);  
  end pr_proc;  

\f



comment susercat update       * page 15   28 01 82, 14.51;  

  procedure list(out_z);  
  _____________________
  comment subprogram list;  
  zone         out_z;  
  begin
    init;  
    update := false;  
    all := false;  
    if readparam(param) = 4 then
    begin
      action := longstring(tp,  string param(1), case tp of (
      <:cat:>, 
      <:all:>, 
      <:names:>,  
      <::>));  

      case action of
      begin

        <*1_____list process_____ *>
        begin
          boolean found;  
          integer  h;  
          h := hash(param.ln_f, s_cat.segm_f);  
          found := search(h, max_tracks, param.ln_f, 1, update);  
          if -, found then found := search(0, h, param.ln_f, 1, update);  
          if found then               
          begin
            write(out_z, "nl", 1, <:scatup delete.:>, s_cat.name_f);  
            pr_proc(out_z);  
          end
          else error(2);  
        end;  

        <*2_____list entry 0_____ *>
        pr_cat(out_z);  

        <*3_____list all_____ *>
        begin
          all := true;  
          pr_cat(out_z);  
          ip := 1;  
          for track := 1 step 1 until max_tracks do
          begin
            repeat
            begin
              rest := inrec_6(s_cat, rec_lng);  
              begin 
                h_key := s_cat.h_key_f;  
                if h_key <> -1 and h_key <> -2 then   
                begin
                  if ip mod 3 = 0 then  write(out_z, "ff", 1);  
                  pr_proc(out_z);  
                  ip := ip + 1;  
                end;  
              end;  
            end;  
            until rest < rec_lng;  
          end;  
          write(out_z, <:scatup list.names:>);  
        end;  

\f



comment susercat update       * page 16   28 01 82, 14.51;  

        <*4_____list process names_____ *>
        begin
          write(out_z, "ff", 1, "nl", 2, <:,device names in susercat:>);  
          d_f  := 4 - 8;  
          for t := 1 step 2 until discs do
          begin
            d_f  := d_f + 8;  
            write(out_z, "nl", 1, <:,:>, disc.d_f);  
          end;  

          write(out_z, "nl", 1, <:,process names in susercat :>);  
          for track := 1 step 1 until max_tracks do
          begin
            repeat
            begin
              rest := inrec_6(s_cat, rec_lng);  
              begin 
                h_key := s_cat.h_key_f;  
                if h_key <> -1 and h_key <> -2 then
                _    write(out_z, "nl", 1, <:,:>, s_cat.name_f);  
              end;  
            end;  
            until rest < rec_lng;  
          end;  
        end;  

      end;  
    end  
    else error(8);  
    if readparam(param) <> 0 then error(13);  
  end list;  

\f



comment susercat update       * page 17   28 01 82, 14.51;  

  procedure split(out_z);  
  ________________________
  comment split    find subprogram;  
  zone     out_z;  
  begin

    comment initialize gen cat entry;  
    ___________________________________
    open(s_cat, 4, <:susercat:>, 0);  
    lng_f   := 4;  
    lng_0   := 6;  
    segm_f  := 8;  
    lg_f1   := 4;  
    lg_f2   := 8;  
    slice_f := 10;  
    ref_f   := 12;  
    rec_f   := 8 - 12;  
    d_f     := 4 - 8;  

    comment initialize track process entries;  
    _______________________________________
    h_key_f     := 2;  
    prio_com_f  := 4;  
    name_f      := 4;  
    buf_area_f  := 18;  
    int_fnc_f   := 20;  
    pr_pk_f     := 22;  
    max_lo      := 24;  
    max_hi      := 26;  
    std_lo      := 28;  
    std_hi      := 30;  
    size        := 32;  
    prog_f      := 32;  
    usr_lo      := 42;  
    usr_hi      := 44;  
    addr_f      := 14;  

    action := longstring(tp, string param(1), case tp of(
    <:newca:> add 't', 
    <:delet:> add 'e', 
    <:inser:> add 't', 
    <:list:>,  
    <::>));  

    if action > 1 and action < 5 then
    begin
      comment check "susercat" bases;  
      integer array entry(1:17);  
      monitor(76<*look h & t*>, s_cat, 0, entry);  
      if entry(2) <> -8388607 or
      _  entry(3) <> 8388605 then
      write(out, "nl", 1, 
      _   <:***scatup warning: susercat bases:>, "nl", 1);  
    end;  

    case action of
    begin
      error(6);  
      newcat;  
      delete;  
      insert;  
      list(out_z);  
    end;  
    close(s_cat, true);  
  end split;  

\f



comment susercat update       * page 18   28 01 82, 14.51;  

  comment main prog;  
  ________________
  zone                  s_cat(128, 1, std_error);  

  integer               rec_lng, discs, t, rec_0_lng, pos, max_pos, 
  _                     max_tracks, track, h_key, rest;  

  integer       field   lng_f, lng_0, segm_f, slice_f, ref_f, size, 
  _                     h_key_f, prio_com_f, buf_area_f, int_fnc_f, pr_pk_f, 
  _                     max_lo, max_hi, std_lo, std_hi, usr_lo, usr_hi, addr_f;  
  long          field   lg_f1, lg_f2, l_f;  

  long    array         disc (1:20),  scope(1:2);  

  integer array         sr(1:20), tail(1:10);  

  integer array field   di_f;  

  long    array field   d_f, rec_f, name_f, prog_f, ln_f;  

  integer i, j, action, tp, ip;  
  array param, outfile(1:2);  
  zone  out_z(128, 1, stderror);  
  boolean update, all;  

  j := read_param(param);  
  if j <> -1 then
  begin
    if j = 2 then split(out) else error(7)
  end
  else
  begin
    outfile(1) := param(1);  outfile(2) := param(2);  
    scope(1) := scope(2) := 0;  
    ln_f := 0;  
    i := lookup_proc(scope, outfile.ln_f, tail);  
    if (scope(1) = long <:syste:> add 'm' and scope(2) = 0)
    or  scope(1) = long <:***:> then i := 8;  

    if i <> 0 then
    begin
      for i := 1 step 1 until 10 do tail(i) := 0;  
      ln_f := 2;  
      tail(1) := 1;  <*size*>  
      tail.ln_f(1) := long <:disc:>;  
      tail(6) := systime (7, 0, 0.0);
      ln_f := 0;  
      i := setproc(outfile.ln_f, tail);  
    end create new entry;  
    if i = 0 then
    begin
      open(out_z, 4, outfile, 0);  
      if readparam(param) = 2 then
      begin
        if long param(1) = long <:list:> then split(out_z)
        else error(12);  
      end
      else error(7);  
      write(out_z, "nl", 1, <:end:>, "nl", 1, "em", 3);  
      comment change size to segm count and insert clock;  
      changearea(out_z, 3);  
      close(out_z, true);  
    end
    else
    system(9)alarm:(i, <:<10>settroub:>);  
  end;  
  stop:  <*stop*>
end;  
▶EOF◀