[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

4528.0. "Any printer driver authors out there?" by AISG::LANDINGHAM (Guy M., DLB5-3/E5, 291-9268) Wed Feb 20 1991 15:07

I am experimenting with writing a printer driver and was wondering if anyone
else who has done so can answer a couple of questions...

Question 1:
In data.c, each printer control sequence is specified as a constant string.  For
instance, if my printer uses, say, ESC@ to do a reset, then in data.c:

	"\027@",	/* aRIS (or whatever) */

My question is: how does this work if the control sequence takes one or more
parameters?  As an example, say the printer in question uses the following
sequence to set the left margin: ESCnK, where 0 < n < 81.  How is this supposed
to be specified in data.c?  Would I use "\027nK" letting the "n" serve as a
placeholder?  How is the parameters position in the sequence specified?  Or is
it just left out?


Question 2:
This sort of relates to question 1.  I've looked at several dospecial.c's and
they all seem to implement different printer control sequences.  Does the
printer.device use data.c for some sequences and dospecial.c for others?  What
determines which sequences need to be implemented in dospecial.c?


Thanks for any light shed on this dim subject...
T.RTitleUserPersonal
Name
DateLines
4528.1Found the answer...AISG::LANDINGHAMGuy M., DLB5-3/E5, 291-9268Fri Feb 22 1991 18:176
I'm posting this in case anyone else is interested.

The answer is that any printer control sequence that takes parameters should be
implemented in DoSpecial.c.  Specifying "\377" as the value of a sequence in
Data.c tells the printer device that this function is either not available or
implemented in DoSpecial.c.