slang-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [slang-users] Error compiling slang2 on OS/2


John E. Davis wrote:

>>Besides: linking of slrnpull fails with unresoved externs all starting
>>>>with _v_
>
>>
>> I think that you need to add -lvideo to the slrnpull linker line in
>> the makefile.

Yes, that did the trick.

>> Regarding sltest:
>> [...]
>>
>
>>>>Testing dollar strings ...Failed: %$1${}%
>>>>Traceback: error
>>>>Traceback: verror
>>>>***string***: Run-Time Error
>>>>Traceback: failed
>>>>.\inc.sl: Run-Time Error
>>>> Local Variables:
>>>>	String_Type s = "%$1${}%"
>>>>.\dollar.sl:77: Run-Time Error
>>>>.\dollar.sl:79: Run-Time Error
>
>>
>>
>> This is really bizarre.  In dollar.sl, change:
>>
>> if ("%$1${}%"$ != "%Dollar-1%")
>>   failed ("%s","%$1${}%");
>>
>> to
>>
>> $2 = "%$1${}%"$;
>> if ($2 != "%Dollar-1%")
>>   failed ("%s, found \"%s\"","%$1${}%", $2);
>>
>> It should still fail this test but at least it will show how this is
>> being parsed.  After running the test again and sending me the result,


Ok I think my setup is not standard and causes the error.

E:\...es\Progr\C\slang-pre2-r5\src\test>sltest dollar.sl
Testing dollar strings ...Failed: %$1${}%, found "%Dollar-1/K
E:\os2tools\os2ini
t.cmd%"
Traceback: error
Traceback: verror
***string***: Run-Time Error
Traceback: failed
.\inc.sl: Run-Time Error
   Local Variables:
         String_Type s = "%$1${}%, found "%Dollar-1/K
E:\os2tools\os2init.cmd%""
.\dollar.sl:78: Run-Time Error
.\dollar.sl:80: Run-Time Error
Run-Time Error


When I look at my environement I use a seldom used feature of OS/2. I have

SET OS2_SHELL=C:\OS2\CMD.EXE /K E:\os2tools\os2init.cmd

defined in Config.sys.

This defines cmd.exe as the commandshell but calls os2init.cmd whenever
a new OS/2 VIO session is started. In this init script I set Window size
and modify the commandprompt.


>> please make the following change to the push_dollar_string function in
>> slang.c:
>>
>> --- slang.c~	Mon Feb 21 13:35:50 2005
>> +++ slang.c	Sat Feb 26 12:18:43 2005
>> @@ -3206,6 +3206,14 @@
>>  	char *env;
>>  	int j;
>>
>> +	if (*name == 0)
>> +	  {
>> +	     if (-1 == SLang_push_string (name))
>> +	       goto free_return;
>> +
>> +	     continue;
>> +	  }
>> +
>>  	j = find_local_variable_index (name);
>>  	if (j != -1)
>>  	  {
>>
>> Does the above change have any impact?


Yes this solved the problem

E:\...es\Progr\C\slang-pre2-r5\src\test>sltest dollar.sl
Testing dollar strings ...Ok

    Ciao,  Hannes

--
Johannes Hromadka     | Email: Johannes.Hromadka@xxxxxxx
Vienna/Austria/Europe | OECC: http://www.oecc.org/

>>> Du musst die Details kennen (Geni Weber) <<<


[2005 date index] [2005 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]