home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / ECO30603.ZIP / ECO30603.LZH / ECOLIBII / DEMOS / DEMOFILE.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-03-01  |  1.8 KB  |  68 lines

  1. {$A-,B-,D-,E-,F+,I-,L-,N-,O-,R-,S-,V-}
  2. {$M 63768, 0, 655360}
  3. uses
  4.   crt, dos,
  5.   eco_lib, eco_file
  6.  
  7.   ;
  8.  
  9.  
  10. const
  11.   filesonly : boolean =  true;
  12.   nrofretkeys = 3;
  13.   filesretkeys : array[1..nrofretkeys] of word = (_c_r, _enter, _c_p);
  14.  
  15.  
  16. var
  17.   checkdriv :          char;
  18.   i, j      :          word;
  19.   st        :        string;
  20.   retkey    :          word;
  21.   files     : filespanelobj;
  22.  
  23.  
  24.   procedure putopts;
  25.   begin
  26.     with files do setoptions(
  27.       true, true, 0,
  28.       41, 1, 80, 24,
  29.       06, { panel_f,   }    00, { panel_b,    }
  30.       15, { header_f,  }    00, { header_b,   }
  31.       15, { footer_f,  }    00, { footer_b,   }
  32.       true,
  33.       50, 5, 70, 9, 
  34.       00, { popup_f,    }   07, { popup_b,    }
  35.       15, { tagnocsr_f, }   00, { tagnocsr_b, }
  36.       15, { tagcsr_f,   }   07, { tagcsr_b,   }
  37.       00, { scrollbar_f,}   07, { scrollbar_b,}
  38.       06, { curactbar_f,}   08  { curactbar_b }
  39.     );
  40.   end;
  41.  
  42.  
  43. {main}begin
  44.   __stdio; if scn4 = nil then new(scn4); __savscn(scn4);
  45.   with files do begin 
  46.     newfiloff := true; init; putopts; readfiles(__curdir); startsorting; draw;
  47.     { if not really altered by child process, that is: }
  48.     {retagfiles(readconfig, @tempfiltagar);} { pointer to array of booleans }
  49.     repeat
  50.       retkey := $00; putopts;
  51.       st := walk_files_(
  52.         @filesretkeys, nrofretkeys, filesonly, retkey
  53.       );
  54.       if (
  55.         ((retkey = _enter) or (retkey = _padenter)) and
  56.         ((filarray^[filescursor].attr and directory) > 0)
  57.       ) then begin
  58.         chdir(filarray^[filescursor+filoff].name);
  59.         readfiles(__curdir); startsorting; filoff := 0; filescursor := 0;
  60.         newfiloff := false; 
  61.         {with tree do begin tree.jump_curpath; newtreeoff := true end;}
  62.         draw;
  63.       end;
  64.     until retkey = _a_q;
  65.   end; { with }
  66.   __resscn(scn4);
  67. end.
  68.