home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / ARCTV26B.ZIP / ARCTV.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-01-04  |  3.4 KB  |  164 lines

  1.  
  2. (*
  3.  * (C) 1987 Samuel H. Smith, 26-apr-87 (rev. 12-Dec-87)
  4.  *
  5.  * This program is provided courtesy of:
  6.  *         The Tool Shop
  7.  *         Phoenix, Az
  8.  *         (602) 279-2673
  9.  *
  10.  * This program uses many of the building-blocks in the Tool Shop Library,
  11.  * which is available for download from the Tool Shop.   
  12.  *
  13.  *
  14.  * Disclaimer
  15.  * ----------
  16.  *
  17.  * This software is completely FREE.   I ask only for your comments,
  18.  * suggestions and bug reports.   If you modify this program, I would
  19.  * appreciate a copy of the new source code.   Please don't delete my
  20.  * name from the program.
  21.  *
  22.  * I cannot be responsible for any damages resulting from the use or mis-
  23.  * use of this program!
  24.  *
  25.  * If you have any questions, bugs, or suggestions, please contact me at
  26.  * The Tool Shop,  (602) 279-2673.
  27.  *
  28.  * Enjoy!     Samuel H. Smith
  29.  *
  30.  *)
  31.  
  32. {$UNDEF DEBUGGING}             (* #define to enable ALPHA test code *) 
  33.  
  34. {$V-}    {Relax string typing}
  35. {$R-}    {Range checking off}
  36. {$B-}    {Boolean complete evaluation on}
  37. {$S-}    {Stack checking on}
  38. {$I+}    {I/O checking on}
  39. {$N-}    {No numeric coprocessor}
  40. {$M 10000,45000,65000} {minstack,minheap,maxheap}
  41. {$T+,D+}
  42.  
  43. program ArcTV;
  44.  
  45. Uses
  46.   Dos,
  47.   MiniCrt,
  48.   Printer,
  49.   Mdosio,
  50.   Tools,
  51.   CInput;
  52.  
  53.  
  54. {$DEFINE IN_ARCTV}
  55. {$define DISABLE_EXTRACT}
  56.  
  57.  
  58. const
  59.  
  60. {$ifdef DISABLE_EXTRACT}
  61.    whoami      = 'Archive Text Viewer';
  62. {$else}
  63.    whoami      = 'Archive Text View/Extract';
  64. {$endif}
  65.  
  66.    version     = 'v2.6ß7, 04/12/88';
  67.    comfile     = 'ARCTV';
  68.    scratchfile = 'SCRATCH.ARC';
  69.  
  70.  
  71. const
  72.    option = '';
  73.    expert = true;
  74.    dump_user: boolean = false;
  75.    carrier_lost = '<lost>';
  76.  
  77. type
  78.    user_rec = record
  79.         pagelen: integer;
  80.    end;
  81.  
  82. const
  83.    user: user_rec = (pagelen:23);
  84.    o_logoff = 'x'; 
  85.    o_offok = 'x'; 
  86.    o_offerr = 'x';
  87.    red = ''; green = ''; yellow=''; blue='';
  88.    magenta=''; cyan=''; white=''; gray='';
  89.    graphics = false;
  90.  
  91. procedure make_log_entry(s:string;
  92.                          f:boolean);
  93. begin 
  94.    if f then writeln(s);
  95. end;
  96.  
  97. procedure uninit_com; begin end;
  98.  
  99.  
  100. {$i promsgs.INC}   (* message/more processing *)
  101. {$i prounsq.INT}   (* view archive text files - interface *)
  102. {$i prounsq.INC}   (* view archive text files - implementation *)
  103.  
  104.  
  105. (*
  106.  * main program
  107.  *
  108.  *)
  109.  
  110. var
  111.    i,j:    integer;
  112.    par:    anystring;
  113.    time:   real;
  114.  
  115. begin
  116.    assign(stdout,'');
  117.    rewrite(stdout);
  118.  
  119.    time := get_time;
  120.    linenum := 1;
  121.  
  122.    if paramcount = 0 then
  123.    begin
  124.       newline;
  125.       displn(whoami+',  '+version);
  126.       displn('Courtesy of:  S.H.Smith  and  The Tool Shop BBS,  (602) 279-2673.');
  127.       newline;
  128.       displn('Usage:  arctv FILE[.arc] ... FILE  [<IN] [>OUT]');
  129.       halt;
  130.    end;
  131.  
  132.    for i := 1 to paramcount do
  133.    begin
  134.       par := paramstr(i);
  135.  
  136.       if pos('.',par) = 0 then
  137.          par := par + '.ARC';
  138.  
  139.       for j := 1 to length(par) do
  140.          if par[j] = '/' then
  141.             par[j] := '\';
  142.  
  143.       getfiles(par,filetable,filecount);
  144.  
  145.       for j := 1 to filecount do
  146.       begin
  147.          newline;
  148.          displn('Archive: '+filetable[j]^);
  149.          linenum := 1;
  150.          view_archive_text(filetable[j]^);
  151.       end;
  152.    end;
  153.  
  154.    time := get_time - time;
  155.    if time > 240.0 then
  156.    begin
  157.       newline;
  158.       displn(whoami+',  '+version);
  159.       displn('Courtesy of:  S.H.Smith  and  The Tool Shop BBS,  (602) 279-2673.');
  160.       newline;
  161.    end;
  162. end.
  163.  
  164.