home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / ECO30603.ZIP / ECO30603.LZH / ECOLIBBS / DEMOS / demopvls.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-03-09  |  1.1 KB  |  46 lines

  1. uses
  2.   dos, eco_node
  3.  
  4.   ;
  5.  
  6.  
  7. var
  8.   nodelist: nodelistobj;
  9.   nl, 
  10.   st, st1 :      string;
  11.   pvt  :           text;
  12.  
  13.  
  14.   function __existfil(pathname: string): boolean;
  15.   var fileinfo : searchrec;
  16.   begin
  17.     findfirst(pathname, anyfile, fileinfo);
  18.     __existfil := (doserror = 0)
  19.   end;
  20.  
  21.  
  22. begin
  23.   writeln('PvtList -- create a EFTP-usable ASCII list of your favorite nodes.');
  24.   writeln('Repeat entering nodenumbers until ready. All will be added.');
  25.   writeln('Edit the nodelist specification:');
  26.   nl := 'D:\S\Z\NODELIST\NODELIST.057';
  27.   writeln(nl);
  28.   {readln(nl);}
  29.   with nodelist do begin
  30.     if not init(nl, paramstr(1) = '/c') then halt;
  31.     assign(pvt, 'EFTP.PVT');
  32.     if __existfil('EFTP.PVT') then append(pvt) else rewrite(pvt);
  33.     repeat
  34.       readln(st);
  35.       if st <> '' then begin
  36.         st1 := getnode(st);
  37.         if st1 = '' then writeln('Not found!') else begin
  38.           writeln(st1); writeln(pvt, st1);
  39.         end;
  40.       end;
  41.     until st = 'exit';
  42.     done(false);           { keep index }
  43.     close(pvt);
  44.   end;
  45. end.
  46.