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>


Hate these ads?



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<





Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)

Or use any RSS reader

Delivered by FeedBurner


ad

Views for this page
Today This Week This Month This Year  Overall
2219378 1,357

/Bofcusm/1810.html copyright 1997-2004 Bela Lubkin 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

More:
       - Bela




Unix/Linux Consultants

Your ad here - $48.00 yearly!

SCO, OpenServer, UnixWare, software, servers, security, networks, installation, administration, troubleshooting, maintenance, Watchguard, firewalls, VPNs, e-mail. Visit us at http://opensystemscomputing.com and www.go2unix.com.


http://www.breakthru.com.au SCO (Openserver and Unixware), Unix, Solaris and Linux Consulting services including: Secure Networking Solutions; Linux based Firewalls; Backup Solutions; Secure Home to Office Network Setup; Phone, Remote and On-Site Support available - Satisfaction Guaranteed!


http://www.cleverminds.net Need expert advice? Want a second opinion? CleverMinds is a one-stop-shop for a wide range of technology solutions. We support Unix, Linux, SCO as well as CMS, ecom, blogs, podcasts, search engines consulting and more. Contact us at web2.0@cleverminds.net 0r (617) 894-1282



Twitter
  • Nov 18 20:41
    I'll be out all day Wednesday the 19th, hard to reach even by phone. Leave a message and have patience.
  • Nov 18 10:07
    What am I doing? Not doing what I WANT to be doing! Oh, well, in every life a little work must fall..




card_image








Change Congress


Related Posts