ITEM: V4233L

How to print formatted report and unformated data to same queue.



Question:

question: edit the virtual queue
substitute null for carriage return

Response:

Env: 3.2.5
Desc: Customer wants to set the virtual printer up so that it does
not do carriage returns but it does do line feeds.
Act: I had him change _x to nothing and tested it on one of our printers
and it looked as if the printer was doing line feeds and not carriage
returns
Next: Closing Item.

Response:

Response:

Act: I spoke to the customer and setting _x to nothing is not working
He has a software program that is sending 2 carriage returns and he 
needs a way to set up the virtual printer so that it does not 
recognize carriage returns but does recognize line feeds.  Is there
another way to do this in the virtual printer or does the colon file
needed to be edited in some other manner.
Next: Over to B3AP for further assistance

Response:

Response:

Response:

A simple filter should solve this:
_f=c
fc=/usr/local/bin/rcrfilt

/* rcrfilt.c,  compile 'cc -o rcrfilt rcrfilt.c'                        */
/* Program to provide a filter to remove all \\r (carriage returns) in
   the file being printed.
*/

\#include        "stdio.h"
\#include        "termio.h"
\#include        "termios.h"

int main(void)
{        int             c;

        while ( (c = getc(stdin)) != EOF)
        {
                if (c!='\\r') putc(c,stdout);
        }

        exit(0);

Customer is also trying to get a sed script to do this incorporated in
the virtual printer.  I will test this.

Also got the following to work:
fl=sed -f /home/lab/sed.ch
Where sed.ch contained:
s/\^M//g

Response:

Response:

Customer really needed passthrough for some files, and not others.

If we know the start of the file
Reports start with a space
ASCII text start with a line feed.

So set the following attributes:
_d=%Imi
mi=a,p  The datastreams we want.
mp=\\012,\\040  This is the string of lf,sp

The formatter will low select the datastream d based on the first
character of the file.  If the first character is a space, then the
file is treated in passthrough mode (no cr are added to lf).  If
the first character is a lf, (or really anything else) then the file
will be formatted (cr will be added to each lf, and ff at the end
of the file).

Now both the formatted and unformatted files both print ok.

NEXT: Close


Response:

Trans. Jim L. to John T. line-left voice mail

Response:

Customer wants to change all bel chars to fs chars with filter.

Try:
/* bfilt.c,  compile 'cc -o bfilt bfilt.c'                      */
/* Program to provide a filter to add convert the bell character
   decimal 7, to a decimal 28 (fs) character.                   */

\#include        "stdio.h"
\#include        "termio.h"
\#include        "termios.h"

int main(void)
{        int             c;

        while ( (c = getc(stdin)) != EOF)
        {
                if (c==7) c=28;
                putc(c, stdout);
        }

        exit(0);


Support Line: How to print formatted report and unformated data to same queue. ITEM: V4233L
Dated: June 1995 Category: N/A
This HTML file was generated 99/06/24~13:30:34
Comments or suggestions? Contact us