home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 13 / CDA13.ISO / cdactual / demobin / share / program / Pascal / 10TLST.ZIP / QLOG.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1990-10-16  |  20.1 KB  |  694 lines

  1. {$M 32768,0,65536}
  2. Program QLOG;
  3. Uses CRT,TenTools,DOS,QM;
  4.  
  5. TYPE
  6.    ScreenPage = Array[1..4000] of Char;
  7.    ASCII = Set of Char;
  8.    DCharType= (UD,UR,UL,DR,DL,URL,DRL,URD,ULD,RL,URDL);
  9.    Charset = '1'..'Z';
  10.    RDRTable = Array[1..200] of Char;
  11. CONST
  12.    DChar : Array[UD..URDL] of Char= ('│','└','┘','┌','┐','┴','┬','├','┤','─','┼');
  13.  
  14. VAR
  15.    LogTable : DriveArray;
  16.    PTable : PrintArray;
  17.    LoginList : LogArray;
  18.    QJ : Integer;
  19.    L,U : Word;
  20.    C : Charset;
  21.    SR : SearchRec;
  22.    SA : Word;
  23.    RDR : ^RDRTAble;
  24.    ColorScreen : Screenpage absolute $B800:$0000;
  25.    Node : S12;
  26.    UserName : S8;
  27.    PW : S8;
  28.    ScreenSave : ScreenPage;
  29.    Test,LLRet : Word;
  30.    Ret,QI,HoldY,LL : Integer;
  31.    Inchar,GAR : Char;
  32.  
  33. Procedure Beep;
  34. VAR
  35.    I,J : Integer;
  36. Begin
  37.    For J:=1 to 3 do for I:=5 to 10 do
  38.     begin
  39.        Sound(I*J*100);
  40.        Delay(3);
  41.        NoSound;
  42.     end;
  43.    For J:=3 downto 1 do for I:=10 downto 5 do
  44.     begin
  45.        Sound(I*J*100);
  46.        Delay(3);
  47.        NoSound;
  48.     end;
  49.    Sound(400);
  50.    Delay(50);
  51.    NoSound;
  52. End;
  53.  
  54. Procedure Showmounts;
  55. TYPE
  56.   SStr = String[5];
  57. VAR
  58.   I,J,K : Integer;
  59.   C : Charset;
  60.   AvailList : Array[1..30] of SStr;
  61. Begin
  62.    ClrScr;
  63.    TextColor(LightGray);
  64.    I:=14;
  65.    J:=1;
  66.    K:=0;
  67.    If ((Mountlist(LogTable,PTable,I)=0)and (I>0))
  68.    then
  69.     begin
  70.        for C:='A' to Char(I+64) do
  71.         begin
  72.            If J<9 then GotoXY(1,J) else GotoXY(40,J-8);
  73.            If LogTable[C].ServerID<>'            '
  74.            then
  75.             begin
  76.                Write(C,'=',LogTable[C].RPath,',',LogTable[C].ServerID);
  77.                Inc(J);
  78.             end
  79.            else
  80.             begin
  81.                Inc(K);
  82.                AvailList[K]:=C;
  83.             end;
  84.         end;
  85.        for C:='1' to '3' do
  86.         begin
  87.            If J<9 then GotoXY(1,J) else GotoXY(40,J-8);
  88.            If PTable[C].ServerID<>'            '
  89.            then
  90.             begin
  91.                Write('LPT',C,':=','LPT',PTable[C].RPath,',',PTable[C].ServerID);
  92.                Inc(J);
  93.             end
  94.            else
  95.             begin
  96.                Inc(K);
  97.                AvailList[K]:='LPT'+C+':';
  98.             end;
  99.         end;
  100.     end;
  101.    I:=MountsAvail;
  102.    GotoXY(1,9);
  103.    Writeln('');
  104.    Writeln('Total Mounts Available: ',I);
  105.    GotoXY(1,14);
  106.    Write('Mounts Available:  ');
  107.    If K=0 then Write('none')
  108.    else for I:=1 to K do
  109.     begin
  110.        Write(AvailList[I]);
  111.        If not (I=K) then Write(',');
  112.     end;
  113. End;
  114.  
  115.  
  116. Procedure QuickSSSelect(VAR SStation : S12);
  117. VAR
  118.    I,CS,PCS : Integer;
  119.    SSList : NABuffer;
  120.    MaxSS,MaxRows : Integer;
  121.    NetRet : Word;
  122.    QNode,TempNode : S12;
  123.    Sorted : Boolean;
  124.    Inchar,ExChar : Char;
  125.  
  126.    procedure Beep;
  127.     VAR
  128.        I : Integer;
  129.        GAR : Char;
  130.    begin
  131.       Randomize;
  132.       For I:=1 to 300 do
  133.        begin
  134.           Sound(10*Random(1000)+100);
  135.           Delay(1);
  136.        end;
  137.       Nosound;
  138.      While keypressed do GAR:=Readkey;
  139.    end;
  140.  
  141.    procedure ErrorOut(Err : word);
  142.    begin
  143.       Write('Error #',Err,' from NODES procedure');
  144.       Halt;
  145.    end;
  146.  
  147.    Function Loggedin(NodeID : S12) : Boolean;
  148.    VAR
  149.      p : Integer;
  150.    begin
  151.       p:=0;
  152.       While ((p<LL)and not(NodeID=LoginList[p])) do Inc(p);
  153.       Loggedin := Not(p=LL);
  154.    end;
  155.  
  156.    procedure Illustrate(QIndex : Integer);
  157.    begin
  158.       GotoXY(((QIndex-1) div MaxRows)*13+1,(QIndex-1) mod MaxRows+2);
  159.       If (CS=QIndex) then TextBackground(Red) else TextBackground(Black);
  160.       If (SSList[QIndex]=QNode)
  161.       then
  162.        begin
  163.           TextColor(Yellow);
  164.           Write(SSList[QIndex]);
  165.           If Loggedin(SSList[QIndex]) then TextColor(White) else TextColor(LightMagenta);
  166.           GotoXY(((QIndex-1) div MaxRows)*13+1,(QIndex-1) mod MaxRows+2);
  167.           Write(SSList[QIndex][1]);
  168.        end
  169.       else
  170.        begin
  171.           TextColor(LightGreen);
  172.           Write(SSList[QIndex]);
  173.           If Loggedin(SSList[QIndex]) then TextColor(White) else TextColor(LightMagenta);
  174.           GotoXY(((QIndex-1) div MaxRows)*13+1,(QIndex-1) mod MaxRows+2);
  175.           Write(SSList[QIndex][1]);
  176.        end;
  177.       TextBackground(Black);
  178.    end;
  179.  
  180.  
  181. begin
  182.    CS:=0;
  183.    MaxSS:=140;
  184.    NetRet:=Nodes(SSList,MaxSS,True);       {List of Superstations}
  185.    If (NetRet<>0) then ErrorOut(NetRet);
  186.    QNode:=NodeName;
  187.    TextBackground(Black);
  188.    ClrScr;
  189.    {Sort SSList}
  190.    Repeat
  191.       Sorted:=True;
  192.       For I:=1 to MaxSS-1 do
  193.        if SSlist[I]>SSlist[I+1] then
  194.         begin
  195.            TempNode:=SSlist[I];
  196.            SSlist[I]:=SSList[I+1];
  197.            SSlist[I+1]:=TempNode;
  198.            Sorted:=False;
  199.         end;
  200.    Until Sorted;
  201.    MaxRows:=MaxSS div 6;
  202.    If (MaxSS mod 6)>0 then Inc(MaxRows);
  203.    HoldY:=MaxRows+3;
  204.    LLRet:=LogList(LoginList,LL);
  205.    If not (LLRet=0) then LL:=0;
  206.    For I:=1 to MaxSS do
  207.     begin
  208.        If (SSList[I]=SStation) then CS:=I;
  209.        Illustrate(I);
  210.     end;
  211.   Window(1,12,80,25);
  212.   Showmounts;
  213.   Window(1,1,80,25);
  214.   GotoXY(1,MaxRows+3);
  215.   TextColor(LightRed);
  216.   Write(MaxSS,' Superstations on the Network...');
  217.   Repeat
  218.      Illustrate(CS);
  219.      PCS:=CS;
  220.      Inchar:=Upcase(Readkey);
  221.      If (Inchar=#0)
  222.      then
  223.       begin
  224.          Exchar:=Readkey;
  225.           Case Exchar of
  226. {Up}       'H' : If CS>1 then Dec(CS) else Beep;
  227. {Down}     'P' : If CS<MaxSS then Inc(CS) else Beep;
  228. {Left}     'K' : If (CS-MaxRows)>0 then Dec(CS,MaxRows) else Beep;
  229. {Right}    'M' : If (CS+MaxRows)<=MaxSS then Inc(CS,MaxRows) else Beep;
  230. {Home}     'G' : CS:=1;
  231. {End}      'O' : CS:=MaxSS;
  232. {Delete}   'S' : Begin
  233.                     LLRet:=Logoff(SSList[CS]);
  234.                     LLRet:=LogList(LoginList,LL);
  235.                  end;
  236.            else Beep;
  237.           end;
  238.       end
  239.      else if (Inchar=#13)
  240.      then SSTation:=SSList[CS]
  241.      else if (Inchar=#27)
  242.      then SStation:=''
  243.      else Beep;
  244.      Illustrate(PCS);
  245.   Until (Inchar in [#13,#27]);
  246. End;
  247.  
  248.  
  249.  
  250.  
  251. {$V-}
  252. Procedure CellEdit (VAR Cell : String;
  253.                LocX,LocY,Len : Integer;
  254.                InCursor : Integer;
  255.                CursorMode : Char;
  256.                CCase : Char;
  257.            VAR PrvCell : String;
  258.            VAR RetCode : Integer);
  259. { CellEdit(Cell,X,Y,Length,InCursor,['I','O','S'],['U','M','L','C','N'],PrvCell,Ret) }
  260. {Procedure to edit a line (up to 80 characters) beginning at location (LocX,
  261. LocY) and lasting for Len characters (maximum) using standard editing
  262. sequences: Position with arrows, [Del] deletes current character, [<-] deletes
  263. previous character, [Esc] clears cell, ^R returns cell entry, [<-'] accepts
  264. entry and exits CELLEDIT, [Ins] toggles between OVERWRITE and INSERT modes;
  265. on entry, <I>nsert or <O>verwrite (or 'S' for Spreadsheet mode, replacing if
  266. anything is entered) is selected in Cursormode with a character
  267. or <F>ill,which opens in Overwrite mode and exits with a retcode of 0 when
  268. the last character in the cell has been filled. CCase indicates <U>ppercase,
  269. <M>ixed, <L>etters, <C>apital Letters, or <N>umbers.
  270. InCursor is the position of the cursor on entry, with 0 meaning to position
  271. one character to the right of the last character in the line.
  272.      Cell and PrvCell are type LINE (string[80]) the entry (Cell) which is
  273. already on the screen, and an optional previous entry which could be returned
  274. with ^R. ^C and TAB will also exit but with a different retcode for each.
  275. RetCodes:
  276.          0 - Good Edit
  277.          1 - ^C exit
  278.          2 - TAB exit
  279.          4 - Escape Key
  280.          else Function or arrow key was used,
  281.          ordinate of keycode (after #0 is
  282.          returned.
  283. HELP is called within celledit if an F1 key is pressed. Celledit is the
  284. returned to. (added specifically for CVIEW implementation)
  285.  
  286. }
  287. VAR
  288.   Insert : Boolean;
  289.   CaseOK : Boolean;
  290.   Kunit : Char;
  291.   OldCell,TmpCell : String;
  292.   CursorPos : Integer;
  293.           I,J : Integer;
  294.   Regs : Registers;
  295. Function Chop(Cell : String) : Integer;
  296. {This function returns the length of a line of characters not counting trailing
  297. spaces}
  298. VAR
  299.    I : Integer;
  300. Begin
  301.    Chop:=0;
  302.    For I:=1 to Length(Cell) do
  303.    if (Cell[I]<>' ') then Chop:=I;
  304. End;
  305.  
  306. Procedure CursorChange(BIG : Boolean);
  307. Begin
  308.    With Regs do
  309.    begin
  310.       AX:=$0100;
  311.       If BIG then CX:=$0007 else CX:=$0607;
  312.       Intr($10,Regs);
  313.    end;
  314. End;
  315.  
  316. Procedure ClearCell (LocX,LocY,Len : Integer);
  317. {   This procedure clears the current cell as described by the left edge
  318.    (LocX,LocY), and the Len (Length); also leaves cursor at left edge. }
  319.  Begin
  320.     GotoXY(LocX,LocY);
  321.     Write(Copy('                                                                                ',1,Len));
  322.     GotoXY(LocX,LocY);
  323.  end;
  324.  
  325. Begin {Celledit}
  326.    OldCell:=PrvCell;
  327.    If OldCell='' then OldCell:=Cell;
  328.    If (CursorMode ='I') then Insert:=True else Insert:=False;
  329.    CursorChange(Insert);
  330.    GotoXY(LocX,LocY); {Puts cursor at beginning of current entry}
  331.    Write(Cell);
  332.    If Length(Cell)<Len then for I:=1 to Len-Length(Cell) do Write(' ');
  333.    If InCursor>0
  334.    then
  335.     begin
  336.        GotoXY(LocX+InCursor-1,LocY);
  337.        CursorPos:=InCursor-1;
  338.     end
  339.    else CursorPos:=Length(Cell);
  340.    Repeat
  341.       Repeat
  342.          CaseOK:=True;
  343.          KUnit:=ReadKey;
  344.          If CCase='U' then KUnit:=Upcase(KUnit)
  345.          else if CCase='N'
  346.          then
  347.           begin
  348.              If not (KUnit in [#0,#8,#9,#13,#18,#27,#32,#45,#46,#48..#57,#83])
  349.              then
  350.               begin
  351.                  CaseOK:=False;
  352.                  Beep;
  353.               end;
  354.           end;
  355.       Until CaseOK;
  356.       If ((CursorMode='S') and not(KUnit in [#0,#9,#13,#27]))
  357.       then
  358.        begin
  359.           Cell:='';
  360.           ClearCell(LocX,LocY,Len);
  361.           CursorMode:='O';
  362.        end
  363.       else CursorMode:='O';
  364.       Case KUnit of
  365.           #0 : If keypressed
  366.                 then
  367.                  begin
  368.                     KUnit:=ReadKey;
  369.                     Case KUnit of
  370. {home key}          #71 : CursorPos := 0;
  371. {Left key}          #75 : CursorPos := CursorPos -1;
  372. {Control-Left}      #115: CursorPos := CursorPos -8;
  373. {Right key}         #77 : CursorPos := CursorPos +1;
  374. {Control-Right}     #116: CursorPos := CursorPos +8;
  375. {End key}           #79 : CursorPos := Chop(Cell);
  376. {INS key}           #82 : If Insert
  377.                           then
  378.                            begin
  379.                               Insert:=False;
  380.                               CursorChange(False);
  381.                            end
  382.                           else
  383.                            begin
  384.                               Insert:=True;
  385.                               CursorChange(True);
  386.                            end;
  387. {Del key}           #83 : begin
  388.                              Cell := Copy(
  389.                              Concat(Copy(Cell,1,CursorPos),
  390.                              Copy(Cell,CursorPos+2,80),'                    '),1,Len);
  391.                              GotoXY(LocX,LocY);
  392.                              Write(Cell);
  393.                           end;
  394. (*{Help Key}          #59 : begin
  395.                              Help;
  396.                           end;
  397. *)                    else
  398.                      begin
  399.                         RetCode:=Ord(KUnit);
  400.                         KUnit:=#13;
  401.                      end;
  402.                      end; {Case}
  403.                      If CursorPos<0
  404.                      then
  405.                       begin
  406.                          RetCode:=75;
  407.                          KUnit:=#13;
  408.                       end;
  409.                      If CursorPos>(Len-1)
  410.                      then
  411.                       begin
  412.                          RetCode:=77;
  413.                          KUnit:=#13;
  414.                       end;
  415.                      GotoXY(LocX+CursorPos,LocY);
  416.                  end;
  417.            #27 : begin
  418.                     RetCode:=4;
  419.                     KUnit:=#13;
  420.                     Cell:=OldCell;
  421.                  end;
  422. {Case KUnit}#8 : begin
  423.                    If CursorPos>0
  424.                    then
  425.                     begin
  426.                        Cell := Copy(
  427.                        Concat(Copy(Cell,1,CursorPos-1),
  428.                        Copy(Cell,CursorPos+1,(Len-CursorPos)),'                    '),1,Len);
  429.                        GotoXY(LocX,LocY);
  430.                        Write(Cell);
  431.                        CursorPos := CursorPos -1;
  432.                        GotoXY(LocX+CursorPos,LocY);
  433.                     end
  434.                    else Beep;
  435.                 end;
  436.  {TAB}     #9 : begin
  437.                    RetCode:=2;
  438.                    KUnit:=#13;
  439.                 end;
  440.     #32..#126 : begin
  441.                    If CursorPos<Len
  442.                    then
  443.                     begin
  444.                        If Insert
  445.                        then
  446.                         begin
  447.                            Cell := Copy(
  448.                            Concat(Copy(Concat(Cell,'                    ')
  449.                            ,1,CursorPos),KUnit,
  450.                            Copy(Cell,CursorPos+1,80),'                    ')
  451.                            ,1,Len);
  452.                            Write(Copy(Cell,CursorPos+1,Length(Cell)-CursorPos));
  453.                         end
  454.                        else
  455.                         begin
  456.                            If CursorPos>0 then Cell := Copy(
  457.                              Concat(Copy(Concat(Cell,'                    ')
  458.                              ,1,CursorPos),KUnit,
  459.                              Copy(Cell,CursorPos+2,80),'                    '),1,Len)
  460.                            else Cell:=KUnit+Copy(Concat(Cell,'                   ')
  461.                              ,2,Len-1);
  462.                            Write(Cell[CursorPos+1]);
  463.                         end;
  464.                        CursorPos := CursorPos +1;
  465.                        GotoXY(LocX+CursorPos,LocY);
  466.                        If Cursormode='F' then if CursorPos=len then KUnit:=#13;
  467.                     end
  468.                    else Beep;
  469.                 end;
  470.          #18  : begin
  471.                    TmpCell := Cell;
  472.                    Cell := OldCell;
  473.                    OldCell := TmpCell;
  474.                    ClearCell(LocX,LocY,Len);
  475.                    Write(Cell);
  476.                    If InCursor>0
  477.                    then
  478.                     begin
  479.                        GotoXY(LocX+InCursor-1,LocY);
  480.                        CursorPos:=InCursor-1;
  481.                     end
  482.                    else CursorPos:=Length(Cell);
  483.                    GotoXY(LocX+CursorPos,LocY);
  484.                 end;
  485.         #13   : RetCode:=0;
  486.            ^C : Begin
  487.                    RetCode:=1;
  488.                    KUnit:=#13;
  489.                 end;
  490.            #1 : for I:= 1 to 3 do
  491.                     begin
  492.                        For J:=10 to 20 do
  493.                         begin
  494.                            Sound(J*200);
  495.                            Delay(5);
  496.                         end;
  497.                        For J:=20 downto 10 do
  498.                         begin
  499.                            Sound(J*200);
  500.                            Delay(5);
  501.                         end;
  502.                        Nosound;
  503.                     end;
  504.           else Beep;
  505.       end; {case}
  506.    Until KUnit = #13;
  507.    ClearCell(LocX,LocY,Len);
  508.    GotoXY(LocX,LocY);
  509.    Write(Cell);
  510.    CursorChange(False);
  511. end;
  512.  
  513.  
  514. Procedure Outline(X1,Y1,X2,Y2 : Integer;BridgePt : Integer);
  515. VAR
  516.    I : Integer;
  517. Begin
  518.    Window(1,1,80,25);
  519.    GotoXY(X1,Y1);
  520.    Write(DChar[DR]);
  521.    For I:=1 to X2-X1-1 do Write(DChar[RL]);
  522.    Write(DChar[DL]);
  523.    For I:= Y1+1 to Y2-1 do
  524.     begin
  525.        GotoXY(X1,I);
  526.        Write(DChar[UD]);
  527.        GotoXY(X2,I);
  528.        Write(DChar[UD]);
  529.     end;
  530.    GotoXY(X1,Y2);
  531.    Write(DChar[UR]);
  532.    For I:=1 to X2-X1-1 do Write(DChar[RL]);
  533.    Write(DChar[UL]);
  534.    Window(X1+1,Y1+1,X2-1,Y2-1);
  535.    ClrScr;
  536.    Window(1,1,80,25);
  537.    If BridgePt>0
  538.    then
  539.     begin
  540.        GotoXY(X1,Y1+BridgePt);
  541.        Write(DChar[URD]);
  542.        For I:=1 to X2-X1-1 do Write(DChar[RL]);
  543.        Write(DChar[ULD]);
  544.     End;
  545.    Window(X1+1,Y1+1,X2-1,Y2-1);
  546. End;
  547.  
  548. Procedure CenteredWindow(XSize,YSize : Integer);
  549. { Creates a Centered window box on the screen with the width XSize and the
  550.   height YSize. }
  551. VAR
  552.    X1,Y1 : Integer;
  553. Begin
  554.    X1:=(80-XSize)div 2;
  555.    Y1:=(25-YSize)div 2;
  556.    Outline(X1,Y1,X1+XSize,Y1+YSize,0);
  557. End;
  558.  
  559. Procedure Unlog;
  560. VAR I : Integer;
  561. Begin
  562.    I:=13;
  563.    If ((Mountlist(LogTable,PTable,I)=0)and (I>0))
  564.    then for C:='C' to Char(I+64) do if ((LogTable[C].ServerID<>'            ')and(LogTable[C].ServerID<>'Local       '))
  565.    then
  566.     begin
  567.        GotoXY(1,4);
  568.        Write('Unmounting ',C,'=',LogTable[C].RPath,',',LogTable[C].ServerID,'...');
  569.        U:=Unmount(C);
  570.        GotoXY(1,4);
  571.        Write('Logging off ',LogTable[C].ServerID,'!');
  572.        L:=Logoff(LogTable[C].ServerID);
  573.     end;
  574.    If ((LogList(LoginList,I)=0) and (I>0))
  575.    then
  576.     for QJ:=0 to I-1 do
  577.     begin
  578.        GotoXY(1,4);
  579.        Write('Logging off ',LoginList[QJ]);
  580.        L:=Logoff(LoginList[QJ]);
  581.     end;
  582.    GotoXY(1,4);
  583.    ClrEol;
  584. End;
  585.  
  586.  
  587. Begin
  588.    Test:=1;
  589.    HoldY:=WhereY;
  590.    If ParamCount=0
  591.    then
  592.     begin
  593.        Node:='            ';
  594.        For QJ:=1 to 12 do Node[QJ]:=ConfigTable^.CT_NID[QJ];
  595.        QuickSSSelect(Node);
  596.     end
  597.    else Node:=ParamStr(1);
  598.    While (Node<>'') do
  599.     begin
  600.        For QI:=1 to Length(Node) do Node[QI]:=Upcase(Node[QI]);
  601.        While Length(Node)<12 do Node:=Node+' ';
  602.        UserName:=ConfigTable^.CT_LName;
  603.        Test:=1;
  604.        If ((LogList(LoginList,QI)=0) and (QI>0))
  605.        then
  606.         for QJ:=0 to QI-1 do
  607.         begin
  608.            If (LoginList[QJ]=Node)
  609.            then
  610.             begin
  611.                GotoXY(1,HoldY);
  612.                Writeln(UserName,' already logged into ',Node);
  613.                Write('(N)ew Username, (C)ontinue');
  614.                Repeat
  615.                   Inchar:=Upcase(Readkey);
  616.                   If Inchar=#0 then Gar:=Readkey;
  617.                Until (Inchar in ['N','C']);
  618.                If Inchar='C' then Test:=0;
  619.             end;
  620.         end;
  621.        If Test<>0
  622.        then
  623.         begin
  624.            Move(ColorScreen,ScreenSave,4000);
  625.            TextColor(Yellow);
  626.            TextBackground(Cyan);
  627.            CenteredWindow(36,5);
  628.            GotoXY(1,1);
  629.            Write('Logging ',UserName,' into ',Node);
  630.            GotoXY(1,3);
  631.            PW:='';
  632.            Write('Password: ');
  633.            Ret:=80;
  634.             Repeat
  635.                Case Ret of
  636.                80 : CellEdit(PW,11,3,8,1,'S','U',PW,Ret);
  637.                72 : begin
  638.                        CellEdit(UserName,9,1,8,1,'S','U',UserName,Ret);
  639.                        If not (Username=ConfigTable^.CT_LName)
  640.                        then
  641.                         begin
  642.                            For QI:=1 to 8 do ConfigTable^.CT_LName[QI]:=UserName[QI];
  643.                            Unlog;
  644.                         end;
  645.                        If not (Ret=4) then Ret:=80;
  646.                    end;
  647.                4 : begin
  648.                       PW:='';
  649.                       Ret:=0;
  650.                    end;
  651.               else
  652.                begin
  653.                   Beep;
  654.                   Ret:=80;
  655.                end;
  656.              end;
  657.            Until Ret=0;
  658.            If PW<>''
  659.            then
  660.             begin
  661.                TextBackground(Black);
  662.                ClrScr;
  663.                GotoXY(1,3);
  664.                TextColor(White+Blink);
  665.                Write('   Logging into ',Node);
  666.                Test:=Login(Node,PW);
  667.             end
  668.            else Test:=$FFFF;
  669.            Move(ScreenSave,ColorScreen,4000);
  670.            TextBackground(Black);
  671.            TextColor(lightGray);
  672.            Window(1,1,80,25);
  673.            GotoXY(1,HoldY);
  674.         end;
  675.         Case Test of
  676.         0 : Begin
  677.                GotoXY(1,HoldY);
  678.                Writeln('Logged into ',Node);
  679.                QuickMount(Node);
  680.             End;
  681.         $FFFF : Writeln('Login Aborted');
  682.          else Writeln('Login failed: ',Test);
  683.         end;
  684.        If (ParamCount>0) then Node:='' else QuickSSSelect(Node);
  685.     end;
  686.    Window(1,1,80,25);
  687.    For QJ:=1 to HoldY-1 do
  688.     begin
  689.        GotoXY(1,25);
  690.        Writeln('');
  691.     end;
  692.    GotoXY(1,25-HoldY+1);
  693. End.
  694.