>> If you can give me any sort of advice how to format 
>> output so that it stays readable even on regular screens 
>> like y*80, please do. I can't expect users to have screens 
>> 400 chars wide to fit some stuff.
> 
> The only one thing I'm asking you is removing unnecessary _trailing_ spaces.

This clears up the issue as I was talking about 
leading spaces (left padding).

> I.e. instead of displaying:
> "-o<outname>        output file name                                          
> "
> please simply display:
> "-o<outname>        output file name"
> it will not change the visual form in 80 columns terminal helping all
> tools which see hidden difference between space and untouched character
> cell in application output and greatly increase readability in terminals
> with smaller number of columns.
> It happens because MemoLine() returns space padded text, i.e.:

Trimming right padding is not a problem and should be fixed, 
I didn't know MemoLine() would pad lines.

>   nLines := MLCount( cText, MaxCol() - 7 )
>   FOR nLine := 1 TO nLines
>      IF ! Empty( tmp := MemoLine( cText, MaxCol() - 7, nLine ) )
>                         ^^^^^^^^
>         IF nLine == 1
>            OutStd( PadR( "hbmk2:", 7 ) )
>         ELSE
>            OutStd( Space( 7 ) )
>         ENDIF
>         OutStd( tmp + hb_osNewLine() )
>      ENDIF
>   NEXT
> 
> so please simply change:
>   IF ! Empty( tmp := MemoLine( cText, MaxCol() - 7, nLine ) )
> to:
>   IF ! Empty( tmp := RTrim( MemoLine( cText, MaxCol() - 7, nLine ) ) )

Okay.

> I'm also not a fun of breaking the line to 79 columns especially when
> output is redirected because it makes output parsing much harder but I can
> leave with it. It would be nice to make:
>   hbmk2 -info ... | grep "^hbmk2:"
> and catch only and _full_ hbmk2 messages but in this it's not important
> enough for me to discuss about it.

If you have any suggestion how to solve that, pls tell, 
maybe it's possible to detect redirection and adjust col 
limit accordingly?

> If you can also replace all hb_osNewLine() used in output with some macro
> like:
>   #define OUT_EOL      hb_osNewLine()
> then later we can easy switch to OS level EOL translation by adding:
>   hb_osTextOutputMode( .T. ) // or any other name you may suggest

How about this:
   hb_osOutputMode( FD_TEXT )
Or:
   hb_osOutputTextMode( .T. )

> and changing this macro to:
>   #define OUT_EOL      Chr( 10 )
> what will resolve the stairs effect problem in output from embedded
> Harbour compiler.

That's okay, I'll change it when the core function 
is in place.

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