Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2000-10

Ok. It's my configuration problem.

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

KO Myung-Hun

Hi/2 all.

All what Hajny said are correct. Problem is there in my configuration.

But configuration is PATH environment not PPC386.CFG. Before, Jonas said

that tools for FPC must be in first 255 chars of PATH. I forgot it.

Path for emx binary is 255 chars later in PATH. By correcting it, I

could get correct result.

But, I still have a question. Apparently, I set 'search for tools'

options to correct emx binary path with -FD option in PPC386.CFG.

Nevertheless, FPC do not recognize emx binaries. Why ? FPC do not use

-FD argument internally ?

And Hajny's saying about DosCalls.PAS also correct. I'm sorry. ^^;

Finally, I fixed fexpand function in dos.pas. Below is fixed fexpand

source.

--------
function fexpand(const path:pathstr):pathstr;
    function get_current_drive:byte;assembler;
    asm
        movb $0x19,%ah
        call syscall
    end;
var s,pa:string;
    i,j:longint;
begin
    getdir(0,s);
    if FileNameCaseSensitive then
        pa := path
    else
        pa:=upcase(path);
    {Allow slash as backslash}
    for i:=1 to length(pa) do
        if pa[i]='/' then
            pa[i]:='\';
    if (length(pa)>1) and (pa[1] in ['A'..'Z']) and (pa[2]=':') then
        begin
            {We must get the right directory}
            getdir(byte(pa[1])-byte('A')+1,s);
(* ---------------- fix start. *)
           if pa[ 0 ] = #2 then
                pa := s
            else
            if (byte(pa[0])>2) and (pa[3]'\') then
                if pa[1]=s[1] then
                begin
                    if s[ 0 ] = #3 then
                        Dec( s[ 0 ]);
                    pa:=s+'\'+copy (pa,3,length(pa))
                end
                else
                    pa:=pa[1]+':\'+copy (pa,3,length(pa))
(*----------------- fix end. *)
        end
    else
        if pa[1]='\' then
            pa:=s[1]+':'+pa
        else if s[0]=#3 then
            pa:=s+pa
        else
            pa:=s+'\'+pa;
    {First remove all references to '\.\'}
    i:=pos('\.\',pa);
    while i0 do
        begin
            delete(pa,i,2);
            i:=pos('\.\',pa);
        end;
    {Now remove also all references to '\..\' + of course previous
dirs..}
    repeat
        i:=pos('\..\',pa);
        if i0 then
            begin
                j:=i-1;
                while (j>1) and (pa[j]'\') do
                    dec(j);
                delete (pa,j,i-j+3);
            end;
    until i=0;
(* removed routine for end . and \ *)
    fexpand:=pa;
end;
-------

This fix bugs below.

- if path is 'x:dir' and 'x:\' is current dir,
then return value is 'x:\\dir'

- if pa is 'x:\', then return value is 'x:'

- removed routine for end '.' and '\',
because BP 7.0 does not so.

For the better FPC !!!

from KO Myung-Hun...

Reply by email

Unknown author
to KO Myung-Hun

Date sent: Mon, 23 Oct 2000 23:11:48 +0900
From: KO Myung-Hun
To: FPC mail
Subject: [fpc-devel]Ok. It's my configuration problem. Send reply to:

Hi,

All what Hajny said are correct. Problem is there in my configuration.

BTW, my first name is Tomas, not Hajny (yes, Michael used my surname when creating the cvs account :-)); I must admit I have a problem with your name as well myself :-) - Myung-Hun is your first name, right?

But configuration is PATH environment not PPC386.CFG. Before, Jonas

I was guessing something related to your path setting as well, that's why I suggested which, but I forgot the 255 char limitation, unfortunately.

Nevertheless, FPC do not recognize emx binaries. Why ? FPC do not use -FD argument internally ?

Good question. ;-) It should, for sure. Did you use your older configuration file, or did you let the installation program to create it from scratch when installing 1.0.2? Could you send me the config file, please?

And Hajny's saying about DosCalls.PAS also correct. I'm sorry. ^^;

No problem.

Finally, I fixed fexpand function in dos.pas. Below is fixed fexpand source.

Thanks, I'll have a look at it (and check it) and submit to CVS if everything works correctly.

Tomas

Reply by email

Unknown author
to KO Myung-Hun: Hi/2 all. All what Hajny said are correct. Problem is there in my configuration. But…

Date sent: Mon, 23 Oct 2000 23:11:48 +0900
From: KO Myung-Hun
To: FPC mail
Subject: [fpc-devel]Ok. It's my configuration problem. Send reply to:

Hi,

.
.

Finally, I fixed fexpand function in dos.pas. Below is fixed fexpand source.

.
.

I've incorporated your patch into CVS now (and fixed some more problems with the previous implementation). Please, check whether it works for you as well now (it seems to do it here).

Tomas

Reply by email