Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Strange argv[]

Author: Odd Gunnar Malin

Date: 14:45:18 02/13/02

Go up one level in this thread


On February 13, 2002 at 17:18:12, Ron Murawski wrote:

>On February 13, 2002 at 15:55:11, Odd Gunnar Malin wrote:
>
>>On February 13, 2002 at 11:53:59, Ron Murawski wrote:
>>
>>>On February 13, 2002 at 07:16:38, Odd Gunnar Malin wrote:
>>>
>>>>On February 13, 2002 at 06:03:53, Dann Corbit wrote:
>>>>
>>>>>On February 13, 2002 at 05:23:50, Odd Gunnar Malin wrote:
>>>>>
>>>>>>Hi.
>>>>>>
>>>>>>When I try to start a consoleprogram from CA as Winboard Engine or UCI engine
>>>>>>the programpath is split in the argv[] (int main(int argc, char* argv[])).
>>>>>>
>>>>>>Ex.
>>>>>>Winboardengine
>>>>>>c:\Program Files\Chess Assistant6\PolarEngine.exe
>>>>>>would give
>>>>>>argv[0] = c:\Program
>>>>>>argv[1] = Files\Chess
>>>>>>argv[2] = Assistant6\PolarEngine.exe
>>>>>>
>>>>>>and not as from other program
>>>>>>argv[0]=c:\Program Files\Chess Assistant6\PolarEngine.exe
>>>>>>argv[1]=<empty>
>>>>>>
>>>>>>Is this an error in CA or in some common .dll files that follows
>>>>>>Delphi-programs?
>>>>>
>>>>>Try:
>>>>>"c:\Program Files\Chess Assistant6\PolarEngine.exe"
>>>>>
>>>>>The parser sees the white space as marking a new token.
>>>>
>>>>You are probably right but since I don't have the source to CA I can not change
>>>>it :)
>>>>It either don't allow to put "" in the filename, but this had been a little hard
>>>>to ask all user's to do.
>>>>
>>>>In normale startup procedure with use of CreateProcess(...) this problem don't
>>>>exist.
>>>>
>>>>It's because of this I ask if this problem is in any Delphi .dll or in CA
>>>>itself. If it is a delphi problem a patch could maybe be found but if it is in
>>>>CA I guess we must wait and use /switch or -switch in the meantime for all
>>>>parameters.
>>>>
>>>>Some Delhi programmer out there??
>>>>
>>>>Odd Gunnar
>>>
>>>I don't know Delphi, but I've gotten bitten by some
>>>spaces-contained-in-a-pathname bugs. I usually install
>>>to C:\Chess to avoid this problem. For Chess Assistant
>>>perhaps you could install to C:\Chess\CA
>>>
>>>Without the spaces the problem goes away.
>>>
>>>Best regards,
>>>Ron
>>
>>Yes of course I could do that, but this wasn't the problem.
>>The problem is that you must take this into account if you write an engine that
>>you would like to be run in Chess Assistant, and if it's a Delphi problem there
>>is probably more GUI with the same problem. I would guess that most users
>>install program in their default directory.
>>That I do in my engine is to allow all command that could be given when the
>>engine have started also could be added to the commandline or ini file for
>>therby have the possibility to set up many different personalities without
>>copying the the engine to different folders.
>>
>>Odd Gunnar
>
>Ah, now I understand.
>
>Since you had no access to the CA source code I thought
>you were asking for a work-around rather than a full
>programming solution.
>
>Ron

I know even when I speak all people take what I say serious. I did add a :) to
that sentence.

Odd Gunnar
(What do they think about my coffee table, the man has lost his mind)



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.