home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / amiga / programm / 12890 < prev    next >
Encoding:
Text File  |  1992-08-30  |  1.4 KB  |  43 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!yale!gumby!destroyer!ubc-cs!unixg.ubc.ca!kakwa.ucs.ualberta.ca!alberta!ken
  3. From: ken@cs.UAlberta.CA (Huisman Kenneth M)
  4. Subject: sending escape codes to printer
  5. Message-ID: <1992Aug31.052400.15097@cs.UAlberta.CA>
  6. Keywords: printing escape codes amiga
  7. Sender: news@cs.UAlberta.CA (News Administrator)
  8. Nntp-Posting-Host: manning.cs.ualberta.ca
  9. Organization: University of Alberta, Edmonton, Canada
  10. Date: Mon, 31 Aug 1992 05:24:00 GMT
  11. Lines: 30
  12.  
  13. I have a question about sending escape codes to a printer from a C program.
  14. how do you do it?  I want a program I am writing to be able to change the
  15. printer setup.  I've tried the following:
  16.  
  17. FILE *printer;
  18.  
  19. printer=fopen("prt:","w"); 
  20.  
  21. fputs("\033\170\060"); /* send an escape sequence to printer */
  22.  
  23.  
  24. but for some reason the above doesn't work.  It won't change the
  25. printer settings.
  26.  
  27. with the above method, I CAN send ordinary text to the printer and have
  28. it print in the default mode, but it won't accept the escape code
  29. sequences for some reason (I know they are valid - I looked them up in
  30. my printer manual).  Its almost like the escape sequences aren't even
  31. getting there.
  32.  
  33. Is there something I am doing wrong?  Is there a better way to do this?
  34.  
  35.  
  36. help would be appreciated, thanks.
  37. (email preferred)
  38.  
  39. Ken
  40.  
  41. ken@cs.ualberta.ca
  42.  
  43.