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

⟦523654fb0⟧ TextFile

    Length: 5632 (0x1600)
    Types: TextFile
    Names: »INITWT.SA«

Derivation

└─⟦909f4eb2b⟧ Bits:30009789/_.ft.Ibm2.50006622.imd Mogens Pelles Zilog 80,000 / EOS projekt
    └─⟦this⟧ »INITWT.SA« 
└─⟦e12db5ad4⟧ Bits:30009789/_.ft.Ibm2.50007357.imd Mogens Pelles Zilog 80,000 / EOS projekt
    └─⟦this⟧ »INITWT.SA« 

TextFile

 
æ*****************************************************************
                        Copyright 1984 by
                        NCR Corporation
                        Dayton, Ohio  U.S.A.
                        All Rights Reserved
******************************************************************
                        EOS Software produced by:
                        NCR Systems Engineering - Copenhagen
                        Copenhagen
                        DENMARK
*****************************************************************å
 
OBJECT PROGRAM Initwt;
æ$H=0  no heap spaceå
 
CONST
  ProcId = 'Initwt  vers  1.00  83-12-01 ';
 
æ
 
 
                    I N I T  - W T
 
Changes:
  vers. 1.00  83-12-01, EAR  initial version
 
 
This EOS program calls the Initwtsys entry of the window terminal system
 
Program Call:
 
   initwt <termname>
 
å
 
CONST
  ResultId = 'INITWT: sNo OrgSy Au Ar OrgNo Fa Ma';
  OrgSys   = 7014;
 
æ$Eå
æ$L-å
æ$F=FAMILY.UNIV.IDå
æ$F=FAMILY.KNEL.IDå
æ$F=FAMILY.ALLOC.IDå
æ$F=FAMILY.SCHED.IDå
æ$F=FAMILY.OBJDIR.IDå
æ$F=FAMILY.IOSYS.IDå
æ$F=FAMILY.APPLI.IDå
æ$F=PRIVATE.WINDOWFS.IDå
æ*** NEXT LINE ENTERED BY VIR ***å
æ$F=PRIVATE.SHCLFS.IDå
æ$F=PRIVATE.UNIJCS.IDå
 
æ$F=PASINCLU.CHKPROCS.SAå
æ$F=PASINCLU.TERMTOOL.SAå
 
æ$L+å
æ*****     Local pointers     *****å
 
TYPE
 
  apLocals = RECORD
      code     : ^^;
      objDirref : ^^ObjDir;
      groupref  : ^^;
      unixjcs   : ^^unips;
      wtref     : ^^windowfs;
      scfs      : ^^;
      stdIn    : faoRefType;
      stdOut   : faoRefType;
      stdError : faoRefType;
   END;  æapLocalså
 
æ$Eå
 
PROGRAM iInitwt OBJECT Application WITH apLocals;
 
ENTRY Run  æfileEnv, jobSys ; progId Æ, options...Åå
  WITH RECORD
         t     : ^^;
         ioSys : iosysRefType;
       END;
 
æ$Eå
 
CONST
æprivate error causeså
  privFam = -1;
 
  nameToLong       = 1;
  missparam        = 2;
 
 
 
 
PROCEDURE printLine (line : shortId;
                     txt  : shortId);
BEGIN
  clearText (line);
  putText (line, txt);
  putNl (line);
  xCheck ( termIo (stdOut, WriteSeq, line));
END;  æprintLineå
 
 
FUNCTION lastchar(s:fullid) : integer;
VAR i, last, length : integer;
 
BEGIN
  i:= 0; length:= elements(s); last := length;
  WHILE ( i < length) AND (last = length) do begin
    i := i+1;
    IF ord (sÆiÅ) <= 32 THEN last := i-1;
  END;
lastchar := last;
END;
 
 
æ$Eå
VAR
  i, j, k, paramNo, used, kind : integer;
  line : array Æ1..90Å of char;
  res : resultType;
  param : fullId;
  termname, name: arrayÆ1..48Å of char;
  contermname: arrayÆ1..57Å of char;
  wt: arrayÆ1..9Å of char;
  wtname: arrayÆ1..48Å of char;
 
 
 
BEGIN
æ*b*   PS ('Start of INITWT ');   *e*å
 
  IN
    wt := 'windowfs/';
    res := OkResult;
    xCheck ( Copy (fileEnv^^Æ1Å, stdIn));
    xCheck ( Copy (fileEnv^^Æ2Å, stdOut));
    xCheck ( Copy (fileEnv^^Æ3Å, stdError));
 
    æ Wellcome message on terminalå
    printLine (line, procId);
 
 
    IF nextValArg (param) THEN
    BEGIN
      j := elements (param);
      k := 48;
      IF k < j THEN
        Exception (Makeres (nameToLong,privfam,-paramno,0));
      FOR i := 1 to j do
      BEGIN
        termnameÆiÅ := paramÆiÅ;
        IF paramÆiÅ = '/' THEN
           nameÆiÅ := '-'
        ELSE
           nameÆiÅ := paramÆiÅ;
      END;
      FOR i := j+1 to k do
      BEGIN
        termnameÆiÅ := chr(0);
        nameÆiÅ := chr(0);
     END;
   END
   ELSE
     Exception (Makeres (missparam,privfam,-paramno,0));
 
   æ concat wt and termname å
   j := 1;
   FOR i := 1 to 9 do
     contermnameÆiÅ := wtÆiÅ;
   FOR i := 10 to 57 do
   BEGIN
     contermnameÆiÅ := termnameÆjÅ;
     j := j + 1;
   END;
   res := (objdirref.getref (OUT groupref; IN name,OUT i, OUT kind));
   IF res.main = OK THEN
   Nocheck (unixjcs.exclude (groupref));
   Xcheck (wtref.initwtsys (;IN termnameÆ1..lastchar(termname)Å,1,24));
   Xcheck (unixjcs.include (OUT groupref, IN scfs;
                            IN contermnameÆ1..lastchar(contermname)Å,
                            IN '/unixfs//bin/sh'));
   Xcheck (unixjcs.include (OUT groupref, IN scfs;
                            IN contermnameÆ1..lastchar(contermname)Å,
                            IN '/unixfs//bin/sh'));
 
 
 
 
 
  DO
    BEGIN
      res := GetException;
æ*b*å ps ('initwt error '); pr (res);  æ*e*å
      IF res.family = privFam THEN
      BEGIN
        clearText (line);
        putText (line, '***');
        CASE res.main OF
 
          1: BEGIN
               putText (line, 'termname to long');
             END;
          2: BEGIN
               putText (line, 'termname missing');
             END;
 
         otherwise
             BEGIN
               putText (line, 'unknown error');
               putInt  (line, res.main, 4);
             END;
        END;  æcaseå
        putNl (line);
        res.main := ok;
      END  æfamily = privFam, own error codeså
      ELSE
        putError (line, res, '', 0);
 
      res := call( termIo (stdError, writeSeq, line));
æ*b*   printVar ('error msg line = ', line);   *e*å
      ObjReturn (res);
    END;
END;  æentry Runå
 
OTHERWISE  unknown
  with record t : ^^; end;
BEGIN
  exception (makeRes (-EntryIllegal, Universal, 0, 0));
END;
 
END;  æprogram initwtå
 
INITIALIZE
  iinitwt 'initwt' :
  ObjDirref  'objdir',
  wtref 'windowfs',
  unixjcs 'unips',
  scfs  'scfs'
 
END.  æ initwt å
 
«eof»