Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

DWED first alpha (Announce)

posted by rr Homepage E-mail, Berlin, Germany, 08.12.2020, 23:17

> > I noticed, that this "does not work", when I'm outside the DWED.EXE
> folder,
> > i.e., I configured my DOS PATH variable like SET
> > PATH=\DWED;%PATH%.
> >
> > "does not work" means, that it looks like DWED does nothing, when I
> press
> > F5. No error message. Nothing.
>
> Thanks!
> (I think, i saw this bug and fix few days ago - dont load .cfg from current
> dir - only main from install-dir)

I already used the latest version, but it still doesn't work for me. Not in FreeDOS. Not in Windows XP.

function load_config(var ctx : TEditorContext; fname : string):boolean;
var f : word;
        i          : integer;
        str        : string;
        key, value : string;
begin
        f := lfn.lopen_r(fname);
        if f <> 0 then begin
                while not lfn.leof(f) do begin
                        lfn.lreadln(f, str);
                        split(str, key, value);
                        process_param(ctx, key, value);
                end;
                lfn.lclose(f);
        end;
        load_config := i <> 0;
end;


Where do you set i in your function? :confused:

This one looks better to me:

function load_config(var ctx : TEditorContext; fname : string):boolean;
var     f : word;
        str        : string;
        key, value : string;
begin
        f := lfn.lopen_r(fname);
        if f <> 0 then begin
                while not lfn.leof(f) do begin
                        lfn.lreadln(f, str);
                        split(str, key, value);
                        process_param(ctx, key, value);
                end;
                lfn.lclose(f);
        end;
        load_config := f <> 0;
end;

---
Forum admin

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 214 users online (0 registered, 214 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum