[comp.sys.mac] IM rules beef

earleh@dartvax.UUCP (03/27/87)

I recently posted an application and some code that showed how to
achieve draft-quality printing from the Macintosh on most of the world's
printers.  The only thing my code requires is that the printer be able
to generate a new line upon receipt of any of CR, LF, CRLF.  With
embedded control characters in a document, access to a printer's native
fonts is also possible.  Baud rates from 300 to 19200 are supported.
The program and source are free.  I received the following communication
as a result of my posting:

>IM tells how to write applications that do not depend on the printer. In
>particular, if you use the appropriate printer control calls rather than
>sending your own CR/LF etc., it should work on all printers that have drivers
>written according to rules. Remember - the rules are there to make portability
>easy to achieve.

(Signature deleted by me.)

I purchased the Macintosh about two years ago, and I have yet to see
the printer driver that would allow any Macintosh application to 
print on my printer (a Tandy DMP-110).  The problem was in the main
that this printer executed a carriage return and a newline upon
receipt of CR (13, \015, \n, 0x0D, whatever), and another newline
upon receipt of LF.  If I followed the "rules" when I programmed
printing into my application, I would now have a program that prints
on the ImageWriter and LaserWriter, neither of which are owned by me.
I would also have a perfectly good Tandy DMP 110 gathering dust.

I have investigated what it takes to write a printer driver that
follows the rules in Inside Macintosh: rewrite QuickDraw for my 
printer.  I am aware that there exist printer drivers for SOME
third-party printers, would anyone who wrote one care to give 
an estimate of the man-hours involved?

I have read the sections in Inside Macintosh on device-independent
printing, and I must say that the objectives are noble, and the 
concept is admirable.  However, for most of us the only printer
drivers that exist are those released by Apple.  Device-independence
is a fine idea, but it falls flat when only two or three devices
can be addressed by the device-independent code.

Is it just me, or do others share this beef?

mjbo@orstcs.UUCP (03/29/87)

take this line eater (what is a line eater?)

In response to your problems with the DMP110, I had much the same problem
with a DMP105 connected to an IBM compatble--everything came out double-
spaced.   I found the easienst solution was not to muck about with drivers,
but to simply send the printer a set of escape codes telling it not to do
line feeds after carrieage returns, but only aft LF characters.  I did this
with a Turbo Pascal program which also set a selected print density.  You
should be able to do this with just about any programming language on the
mac except Lightspeed pascal.  For som reason, on some macs LSP inserts a
nul (00Hex) after every character when you send directly to the printer.
This makes it impossible to send escape sequences.

Mark Borgerson
Computer Science, Oregon State university
No disclaimer--I get paid for explaining things.

:w
:q
:Exit
:how do I get out of this editor!
m
:q\

:q

m
m

saunders@batcomputer.UUCP (03/30/87)

earleh@dartvax.UUCP (Earle R. Horton) writes:
>I recently posted an application and some code that showed how to
>achieve draft-quality printing from the Macintosh on most of the world's
>printers.  

Sure enough, an IM chauvinist responded:

>>IM tells how to write applications that do not depend on the printer. 

Yeah, you can use the wonderful text-streaming calls that insert semi-random
spaces into your text.  Lovely.  A Daisywheel is better for business use
than an Imagewriter, why should my TEC F10 gather dust?  Let's face facts:
bitmap printing on an Imagewriter is SLOW, and I want my rough draft NOW.
Speaking of standards, why doesn't Apple respect ASCII enough to give me
a standard way to produce control characters on the keyboard?  NIH?  %-)

>Is it just me, or do others share this beef?

   Yes I do, and that's why I incorporated a dumb-but-fast printing routine in
"dumb virtue," my text editor/VT100 terminal emulator, recently posted to
mod.mac.binaries.  That way the program can give you asynchronous
printing too--after all, why should the 68000 have to sit around waiting
for the printer, when the Mac has semi-functional asynchronous serial drivers?

Antinomian to the end,
kevin

"JHVH-1 made me do it!"--Santa K.

-- 
Kevin Eric Saunders			
ARPA: saunders@tcgould.tn.cornell.edu
uw-beaver!cornell!batcomputer!saunders