(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version



Best of the Newsgroups: xtod vs. lponlcr : stairstepping printers printing


What is this stuff?

If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):



From: Bela Lubkin <belal@caldera.com>
Subject: Re: xtod vs: lponlcr
Date: Wed, 27 Nov 2002 18:11:37 GMT
References: <m18H6GV-0002PKC@cactus.com> 

Jeff Hyman wrote:

>     I have a customer that is having a stair-stepping output issue
> to the printer.  I am not new to this problem and even have a FAQ
> on the topic. My question has to do with command '/usr/lib/lponlcr' 
> which I am not familar with.  I have no 'man' pages on this command. 
> I am most interested in finding out how it compares to what 'xtod' does... 
> if they are even comparable commands.
> 
> # lp -dprinter_name  ascii_file 
> # cat ascii_file | lp -dprinter_name
> # cat ascii_file | xtod | lp -dprinter_name
> # cat ascii_file | /usr/lib/lponlcr | lp -dprinter_name



`xtod` and `lponlcr` are very similar.  xtod's source is more
complicated because it responds to the name you run it under (xtod or
dtox).  lponlcr is _really_ simple.  Aside from a ridiculous copyright
statement about how holy and confidential this stuff is, it's just:

  #include <stdio.h>
  
  main()
  {
          register int c;
  
          while ((c=getchar()) != EOF) {
                  if (c == '\n')
                          putchar('\r');
                  putchar(c);
          }
  }

xtod also: takes an optional single filename to read from instead of
stdin; and appends a control-Z (DOS EOF marker) to the end of the
output.

I believe DOS Merge comes with another set of these utilities, and VP/ix
probably did, and quite a number of utilities have an embedded ability
to do CRLF translation along with something else they're doing (e.g.
`ftp`).  It's a very frequent problem for Unix users, so the wheel has
been reinvented many times.

>Bela<
 



Click here to add your comments



Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar


ad


/Bofcusm/1810.html copyright 1997-2004 (various authors) All Rights Reserved

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.



More:
       - OSR5
       - Bofcusm
       - Bela


Unix/Linux Consultants

Skills Tests

Guest Post Here











My Favorites

Change Congress