> "\n" is correct. Please note that using standalone compiler with
> exactly the same code you do not have stairs effect problem.
> Just simply by default "\n" in stdout and stderr streams are
> automatically translated to "\r\n" if it's necessary.
> 
>> I see such problem on hbmk2 which has this kinf of output:
>> <pre>
>> (E:\REPOSITORY\HARBOUR\tests)hbmk2 -mt speedtst.prg
>> hbmk2: Processing environment options: -mt -compiler=gcc
>> hbmk2: Processing configuration: E:\harbour\bin\hbmk.cfg
>> Harbour 2.0.0beta3 (Rev. 13066)
>>                               Copyright (c) 1999-2009, 
>> http://www.harbour-proje
>> ct.org/
>>       Compiling 'speedtst.prg'...
>> Lines 1204, Functions/Procedures 79
>>                                   Generating C source output to 
>> 'speedtst.c'...
>> Done.
>> </pre>
> 
> The problem is caused by:
>   hb_fsSetDevMode( s_hFilenoStdout, FD_BINARY );
>   hb_fsSetDevMode( s_hFilenoStderr, FD_BINARY );
> inside src/rtl/console.c
> We can remove it or add function to revert this setting on user request,
> i.e. add this functions to src/rtl/console.c:
> 
>   HB_FUNC( HB_STDTEXTMODE )
>   {
>      USHORT uiDevMode = hb_parldef( 1, TRUE ) ? FD_TEXT : FD_BINARY;
> 
>      hb_fsSetDevMode( s_hFilenoStdout, uiDevMode );
>      hb_fsSetDevMode( s_hFilenoStderr, uiDevMode );
>   }
> 
> and then to hbmk2.prg:
>   hb_stdTextMode( .T. )
> Just before calling hb_compile() and then revert it.
> You can also make it globally but in such case you will have to replace
> hb_osNewLine() in HBMK2 output with simple e"\n" ( chr( 10 ) )

I can't decide which is better. Both look terribly hacky 
and ugly to me. (sry)

> BTW for me more important is removing space padding in hbmk2 output,
> i.e. try to redirect any hbmk2 output to file to see it.

If you mean left padding, it's there to spit out 
readable output. If you just dump all long lines to 
terminal, it would look like an ugly mess. (that's 
where I started from)

> It badly interacts with tools which allows to catch some data from
> application output, i.e. even simple mouse mark and past in terminal
> window is confused by this spaces and cannot select text only.
> Additionally when terminal window has less then 80 columns the text
> is wrongly formatted.

I use MaxCol() to determine screen width. There is no 
any sort of 80 columns limit I'm aware of.

Help can look ugly below ~30 columns, that's true.

Brgds,
Viktor

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to