[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: ps output redirection problem
From:       Ignacio_García_Pérez <iggarpe () terra ! es>
Date:       2007-03-30 7:55:56
Message-ID: 460CC28C.5080408 () terra ! es
[Download RAW message or body]


>> IMHO my fix is better.
>>     
>
> -       printf("%.*s\n", terminal_width, buffer);
> +       if (terminal_width < buffer_width) buffer[terminal_width] = 0;
> +       printf("%s\n", buffer);
>   
I was expecting such a reply :-)

I noticed it's bigger, but come on, it may translate to about a dozen 
bytes of code, which would be 10 if we substract the ".*" we are saving. 
10 bytes should be less than 1% of the total ps code size.

Is that 1% worth a less robust code?

(robust against different libc particularities, I mean)

Regards.
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic