home *** CD-ROM | disk | FTP | other *** search
- (*
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓·── ──·▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓│ │░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ DEMONODE was Conceived, Designed and Written ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ by Floor A.C. Naaijkens for ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ UltiHouse Software / The ECO Group. ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ (C) MCMXCII by EUROCON PANATIONAL CORPORATION. ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ All Rights Reserved for The ECO Group. ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ This program demonstrates that tremendous ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ speeds can be obtained using oridinary text- ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ buffers, seeking in normal textfiles. ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓│ │░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓·── ──·░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- *)
- {$A-,B-,D-,E-,F-,I-,L-,N-,O-,R-,S-,V-}
- {$M 65520, 0, 655360}
-
-
- uses
- dos, crt, eco_lib,
- eco_node,
- eco_tree, eco_file
-
- ;
-
-
-
-
- const
- onlyshow : word = $0000;
- tx1 : byte = 10;
- ty1 : byte = 04;
- tx2 : byte = 70;
- ty2 : byte = 22;
- fx1 : byte = 20;
- fy1 : byte = 05;
- fx2 : byte = 59;
- fy2 : byte = 20;
- fx3 : byte = 10;
- fy3 : byte = 10;
- fx4 : byte = 30;
- fy4 : byte = 15;
-
- exitwin_f : byte = 0;
- treewidth : byte = 2;
- inlist : boolean = false;
- _newline = #10;
- noread : boolean = false;
- nrofrets = 4;
- rets : array[1..nrofrets] of word = (
- _space, { pad } _c_r, { treescan } _enter, { confirmation }
- _tab
- );
- nroffilrets = 4;
- filesretkeys : array[1..nroffilrets] of word = (
- _c_r, _enter, _c_p, _tab
- );
-
-
- var
- nodedir,
- _curdir, ff : string;
- falval : boolean;
-
-
- function __givenodel: string;
- var
- returnedkey : word;
- tree : treepanelobj;
- files : filespanelobj;
-
-
- function notex: boolean;
- begin
- with tree do begin
- notex := not(
- __existpath(copy(fexpand(trace_path(walkcsr)), 1,
- length(fexpand(trace_path(walkcsr)))-1)) or (s = '\')
- )
- end;
- end;
-
-
- procedure treefunctions;
- begin
- with files, tree do begin
- jump_curpath; draw;
- __write(1, 1, 6, 0, 'No test performed, whether a NODELIST is chosen.');
- __write(1, 2, 6, 0, 'Some small bugs are present in TREE/FILE interface.');
- repeat
- { TREE }
- __write(2, 25, 15, 0, 'Up/Dn/PgUp/PgDn/Home/End/Left/Right Tab/Enter');
- returnedkey := $0000;
- walk_tree_(@rets, nrofrets, returnedkey);
- nodedir := 'C:'+__backrem(trace_path(walkcsr));
- chdir(nodedir); __savscn(scn1);
- { FILES }
- returnedkey := $0000;
- readfiles(nodedir); startsorting;
- newfiloff := true; filoff := 0; filescursor := 0; falval := false;
- __write(48, 25, 15, 0, '^P');
- __write(2, 24, 15, 0, 'You can use also tagkeys: * Gray- Gray+ Ins ^V');
- ff := walk_files_(
- @filesretkeys, nroffilrets, falval, returnedkey
- );
- __resscn(scn1);
- until returnedkey = _enter;
- save_tree(drivechar + treeinfofile);
- end; { with }
- end; { treefunctions }
-
- begin
- with tree do begin
- init; putdefaults; treewidth := 2;
- if _curdevice=_color then setoptions(
- false, true, true, 0, tx1, ty1, tx2, ty2, 15, 1, 15, 1, 0, 14,
- true, 40, 3, 67, 18, 12, 15, 12, 15, 12, 15, 12, 15, 0, 7
- ) else setoptions(
- false, true, true, 0, tx1, ty1, tx2, ty2, 7, 3, 7, 3, 7, 3,
- true, 40, 3, 67, 18, 0, 7, 0, 7, 0, 7, 0, 7, 0, 7
- );
-
- horspace := __rep(treewidth, ' '); horbar := __rep(treewidth, '─');
-
- if not(__existfil(drivechar + treeinfofile)) then begin
- __savscn(scn1);
- __bandwin(false, x3, y3, x4, y4, popup_f, popup_b, sh_default, bt_double);
- trace_tree; save_tree(drivechar + treeinfofile); __resscn(scn1);
- build_tree(true);
- end else begin load_tree(drivechar + treeinfofile); build_tree(true) end;
- newtreeoff := true; __clrscn(1,1,80,25,7,0, ' ');
- with files do begin
- init;
- setoptions(
- true, true, bt_double,
- fx1, fy1, fx2, fy2,
- 7, 0, 15, 0, 0, 7,
- true,
- fx3, fy3, fx4, fy4,
- 0, 7, 15, 0, 15, 7, 0, 7, 6, 0
- );
- end;
-
- treefunctions;
- end;
- __givenodel := nodedir + '\' + ff;
- end;
-
-
-
- var
- nodelist: nodelistobj;
- max : longint;
- nl,
- st, st1 : string;
-
-
- begin
- _curdir := __curdir; __setblwin(false);
- nl := __givenodel;
- chdir(_curdir);
- with nodelist do begin
- clrscr;
- max := maxavail;
- writeln('Force a recompile: watch that speed!');
- init(NL, true); { name nodelist, compile index }
- max := max - maxavail; writeln('Nodelist memory usage: ', max);
- writeln('Compilation (only 11K index!) complete.');
-
- st := '2:231/77';
- writeln('Seeking: ', st);
- st1 := getnode(st);
- if st1 = '' then writeln('Not found!') else writeln(st1);
-
- st := '2:231/77';
- writeln('Seeking again: ', st);
- st1 := getnode(st);
- if st1 = '' then writeln('Not found!') else writeln(st1);
-
- done(false); { disposes textbuffer, and optionally deletes index }
- end;
- end.
-