I want to add a new applet, setterm

Lord Sidiuz alastors at gmail.com
Fri Sep 2 14:02:22 UTC 2005


well, hello, how do you feel about adding setterm to bb, don't get
scared it wont use neither ncurses termcap terminfo, notthing actually
just scapes secuences

( please forgive me if some words sounds ugly but writing in english is hard )

in fact I' ve allready coded it and it working great so, tell me your
opinions and if their are positive then teel me who should I've sendit
to.

the total cost for setterm is one enviromental var ( PS3, if you think
of a better name say so please, but since ps1 and ps2 allready are
used for the promt and sometimes ( most times), they have escapes sec.
it seemed natural, and just 32 bytes in the bb binary, yeah I can't
believe it either wend I started in the 0.6 version it was 690 bytes
but whend I passed to 1.0 it only added 32 bytes total.

oh, and regarding :
>> I followed this thread with amusement and now I just wonder: since
>> busybox is meant to be used in size constrained systems, isn't it
>> somewhat incompatible with "internationalization" and all the implied
>> bells and whistles?
>
>Yes.  We haven't implemented it and have no immediate plans to.  I was vaguely
>thinking that support for the UTF8 character set might be useful (since 99%
>of it is just ascii and the rest is high-ascii escape sequences).  I think
>we're collectively boggling at the huge gratuitous behavior changes the
>internationalization people have made without warning, and working out ways
>of avoiding having to deal with this brain damage if at all possible.
>
>> Everyone here is trying to spare a few bytes in each applet, so is it
>> worth trying to support anything but LC_ALL=C? For the full monty thing,
>> we already have the GNU stuff ...
>
>I'd like to replace the GNU stuff in a full working system.  That's why I'm
>looking at someday supporting UTF8, at least as a config option.
>
>In theory, most stuff shouldn't require any changes at all...
>
>> Robin
>
>Rob

if internationalitation is what you wan't it can be done at compile
time, just make usage.h be a symlink to usage_english.h and anyone can
make a usage_spanish.h or usage_deucth.h and then edit the symlink to
get the rigth languaje, ok it would also be nessesary to change every
source that use
 printf ( " hello something error\n " );

to this
 printf ( HELLO_SOMETHING_ERROR );

and make one file containing all the strings e.g.

// file for interna... put your strings here not in the source

#define HELLO_SOMETHING_ERROR " hello something error\n "
#define WHATS_UP_DOC "what's up doc\n "
#define HELLO " hello\n "

and do the same we did for usage.h

god I' ve said to much well I'll shut up now.

good bye.

-- 
No corrijas al necio no sea cosa que te odie, corrije al sabio y te lo
agradecera.
Al que a buen árbol se arrima buena sombra lo cobija.
Debes tener siempre fría la cabeza, caliente el corazón y larga la mano.
Lo mejor que podemos hacer por otro no es sólo compartir con él
nuestras riquezas, sino mostrarle las suyas.



More information about the busybox mailing list