On Sunday 24 February 2008 13:14, [EMAIL PROTECTED] wrote:
> Hi!
>
> Try this, plz!
>
> 1352 vs. 1933 bytes.
Wow, what compiler do you use? I am getting over 1400 for both
with gcc 4.1.2:
# size busybox.t5/printutils/*.o
text data bss dec hex filename
392 0 0 392 188 busybox.t5/printutils/lpq.o
1379 0 0 1379 563 busybox.t5/printutils/lpr.o
142 0 0 142 8e busybox.t5/printutils/parse_prt.o
# size busybox.t6/printutils/*.o
text data bss dec hex filename
1489 0 0 1489 5d1 busybox.t6/printutils/lpr.o
By deleting references to RFC, you made it harder
to verify correctness of the code. And you made
two mistakes because of it:
+ s = xasprintf(
+ "H%.32s\nP%.32s\n"
+ "C%.32s\n"
+ "L%.32s\n"
+ "M%.32s\n"
+ "J%.99s\n"
+ "l%.32s\n"
+ , hostname, user
+ , (opts & LPR_C) ? printer_class : NULL
+ , (opts & LPR_h) ? user : NULL
+ , (opts & LPR_m) ? user : NULL
+ , (opts & LPR_J) ? job_title : ((opts &
_LPR_DUMPED) ? bb_msg_standard_input : *argv)
+ , basename(*argv)
+ );
"l" cmd must contain "data file name", that is, "dfaXXXXX",
not local filename!
Also RFC says J cmd must precede L:
7.5 L - Print banner page
+---+------+----+
| L | User | LF |
+---+------+----+
Command code - 'L'
Operand - Name of user for burst pages
This command causes the banner page to be printed. The user name can
be omitted. The class name for banner page and job name for banner
page commands must precede this command in the control file to be
effective.
But in general I like it and I applied it to svn. Please take a look.
Thanks!
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox