I know I shouldn't follow up my own mail but I have tried moving the piece
of code that parses this option earlier in the code and at appears to work
(without much testing). Here is a patch. Those who know the code better
might be able to decide if it is the correct thing to do.
Cheers.
=============================================================================
Graeme Wood Email: [EMAIL PROTECTED]
Unix Systems Support Phone: +44 131 650 5003
The University of Edinburgh Fax: +44 131 650 6552
=============================================================================
*** lpr.c Mon Apr 1 18:54:54 2002
--- lpr.c.new Thu May 2 14:43:08 2002
***************
*** 88,94 ****
/* scan the input arguments, setting up values */
! Get_parms(argc, argv); /* scan input args */
if( Auth_JOB && !getenv( "AUTH" ) ){
FPRINTF(STDERR,
_("authentication requested (-A option) and AUTH environment variable
not set") );
--- 88,117 ----
/* scan the input arguments, setting up values */
! DEBUG1("lpr: Lpr_opts_DYN '%s', argc %d", Lpr_opts_DYN, argc );
! if( Lpr_opts_DYN ){
! int i, j;
!
! Split_cmd_line( &opts, Lpr_opts_DYN );
! Check_max( &newargs, argc+2+opts.count+2 );
! i = j = 0;
!
! newargs.list[newargs.count++] = argv[0];
! for( j = 0; j < opts.count; ++j ){
! newargs.list[newargs.count++] = opts.list[j];
! }
! for( j = 1; j < argc; ++j ){
! newargs.list[newargs.count++] = argv[j];
! }
! newargs.list[newargs.count] = 0;
! if(DEBUGL1)Dump_line_list("lpr - new options",&newargs );
! Optind = 0;
! Getopt(0,0,0);
! Get_parms(newargs.count, newargs.list); /* scan input args */
! newargs.count = 0;
! } else {
! Get_parms(argc, argv); /* scan input args */
! }
if( Auth_JOB && !getenv( "AUTH" ) ){
FPRINTF(STDERR,
_("authentication requested (-A option) and AUTH environment variable
not set") );
***************
*** 115,142 ****
Get_printer();
Fix_Rm_Rp_info(0,0);
- DEBUG1("lpr: Lpr_opts_DYN '%s', argc %d", Lpr_opts_DYN, argc );
- if( Lpr_opts_DYN ){
- int i, j;
-
- Split_cmd_line( &opts, Lpr_opts_DYN );
- Check_max( &newargs, argc+2+opts.count+2 );
- i = j = 0;
-
- newargs.list[newargs.count++] = argv[0];
- for( j = 0; j < opts.count; ++j ){
- newargs.list[newargs.count++] = opts.list[j];
- }
- for( j = 1; j < argc; ++j ){
- newargs.list[newargs.count++] = argv[j];
- }
- newargs.list[newargs.count] = 0;
- if(DEBUGL1)Dump_line_list("lpr - new options",&newargs );
- Optind = 0;
- Getopt(0,0,0);
- Get_parms(newargs.count, newargs.list); /* scan input args */
- newargs.count = 0;
- }
job_size = Make_job(&prjob);
if(DEBUGL3){
--- 138,143 ----
-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body. For the impatient,
to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------