> From [EMAIL PROTECTED] Wed Apr 10 17:49:33 2002
> From: "Adam Fox" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Subject: Re: LPRng: Print filter for IBM proprinter emulation
> Date: Thu, 11 Apr 2002 09:55:19 +0930
>
> That nearly worked, except for the pcl_init string. I had to do this:
>
> pcl_normalpage=\022\033A\014\033CB\033F\033H\033W0\033T\033-0\033O\033R
> pcl_init = [ normalpage ]
>
> and that worked. It didn't print anything when I set pcl_init directly.
>
> One thing tho: the \014 which is a ^L character does not print out for some
> reason. Any ideas on this one?
>
> I also get ^]E characters at the start and end of the job. I set pcl_eoj@
> and pcl_eoj_at_start@ but I still get it at the end of the job. I don't know
> if it affects the printing in any way yet but I'd still like to get rid of
> it if I can.
>
>
> Thanks,
>
> Adam.

I also did not get the FF out... and discovered the reason:

/*
 * char *Fix_option_str( char *str, int remove_ws, int trim, int one_line )
 *  if( remove_ws ) then remove all isspace() characters
 *  if( trim) find and remove all white space before and after \n
 *  if( one_line) change \n to space
 *  do escape substitutions
 */

This routine is used to remove white space so that things like:

xx = this is ok
yy = to send
init_val = [ xx yy ]
 =>  this is ok to send  =>thisisoktosend

usually the xx and yy values are escaped string values... so you
want to remove the white space...  I suspect that FF is a special case here...

Try the following patch:
*** ifhp.c      2002/04/08 01:04:23     1.88
--- ifhp.c      2002/04/12 17:44:33
***************
*** 2211,2217 ****
  
  /*
   * char *Fix_option_str( char *str, int remove_ws, int trim, int one_line )
!  *  if( remove_ws ) then remove all isspace() characters
   *  if( trim) find and remove all white space before and after \n
   *  if( one_line) change \n to space
   *  do escape substitutions
--- 2211,2217 ----
  
  /*
   * char *Fix_option_str( char *str, int remove_ws, int trim, int one_line )
!  *  if( remove_ws ) then remove all whitespace except for FF
   *  if( trim) find and remove all white space before and after \n
   *  if( one_line) change \n to space
   *  do escape substitutions
***************
*** 2405,2411 ****
        }
        if( remove_ws ){
                for( s = t = str; (*t = *s); ++s ){
!                       if( !isspace(cval(t)) ) ++t;
                }
                *t = 0;
        }
--- 2405,2411 ----
        }
        if( remove_ws ){
                for( s = t = str; (*t = *s); ++s ){
!                       if( !isspace(cval(t)) || cval(t) == '\014' ) ++t;
                }
                *t = 0;
        }
***************
*** 4574,4580 ****
                }
        }
        if( Pcl && ( !safestrcmp(language,PCL) || !safestrcmp(language,TEXT) ) ){
!               Put_outbuf_str( PCL_EXIT_str );
        }
        if( Ps && !safestrcmp(language,PS) ){
                if( Ps_eoj && Ps_eoj_at_end ) Put_outbuf_str( CTRL_D );
--- 4574,4580 ----
                }
        }
        if( Pcl && ( !safestrcmp(language,PCL) || !safestrcmp(language,TEXT) ) ){
!               if( Pcl_eoj_at_end ) Put_outbuf_str( PCL_EXIT_str );
        }
        if( Ps && !safestrcmp(language,PS) ){
                if( Ps_eoj && Ps_eoj_at_end ) Put_outbuf_str( CTRL_D );



-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------

Reply via email to