[BusyBox] [patch] new applet lpr

walter harms wharms at bfs.de
Mon Jun 13 08:30:20 UTC 2005


hi mike,
thanks for the hints.
i dont see any problems with asprintf/strdup.
i will keep the controlfile this way because i am thinking about using
open_memstream to avoid a file in the first place.

enum:
mike, personly i find 0x01,... harder to read.
I use the 1<<x style for bits  and
the other 0x1,x02,0x03 for *real* numbers

if you do not mind, i will keep it that way.


i have found some other questions:

is the scanf("%as") gnu-extension allowed ?

the rfc allows 28 Options with the controlfile. As seen i support a 
small subset only.
i have planned a verbose output. should i remove that ?

btw:
there is no timeout for xconnect(). is there a special bb version for that ?

re,
	walter




Mike Frysinger wrote:
> On Sunday 12 June 2005 07:15 am, walter harms wrote:
> 
>>this is the first version of lpr. it has his own dir for now.
> 
> 
> some notes:
>  - use bb_xasprintf() instead of asprintf()
>  - use xstrndup() instead of strndup()
>  - if you combine all the fprintf() calls in make_controlfile() that will 
> often save a bunch of space
>  - handle_options() might be smaller if you use bb_getopt_ulflags()
>  - the enum would be easier to read if you just defined them as 0x00, 0x01, 
> 0x02, 0x04, 0x08, etc...
> -mike
> _______________________________________________
> busybox mailing list
> busybox at mail.busybox.net
> http://busybox.net/mailman/listinfo/busybox
> 
> 
> 



More information about the busybox mailing list