home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / programm / 13154 < prev    next >
Encoding:
Text File  |  1992-07-29  |  2.2 KB  |  50 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!stanford.edu!kronos.arc.nasa.gov!iscnvx!gary
  3. From: gary@iscnvx.lmsc.lockheed.com (Gary Henderson)
  4. Subject: Re: Mac programming problem
  5. Message-ID: <1992Jul29.134353.9540@iscnvx.lmsc.lockheed.com>
  6. Organization: Lockheed Missiles and Space Co.
  7. X-Newsreader: Tin 1.1 PL4
  8. References: <joel.712326550@vincent1.iastate.edu>
  9. Date: Wed, 29 Jul 92 13:43:53 GMT
  10. Lines: 38
  11.  
  12. joel@iastate.edu (Joel A Rybolt) writes:
  13. : Help ...
  14. : I am currently working on a project involving Think C 5.0 on the Macintosh.
  15. : Unfortunatly I have never programmed on a Mac before and this was going to be
  16. : quick and simple for a friend.  In this project I am trying to read in a text
  17. : file and print it out in one of three various label formats.  I have the print
  18. : routines down and when inputting data from the console I can get what I want
  19. : on my screen.
  20. : The problem is I learned how to program in C on a UNIX machine and have no idea
  21. : how to simply open the file I want to read from.  This file will be in the same
  22. : folder as the program and always called the same thing.  i would like to open
  23. : the file and read blocks of data from it, not all at once !
  24.  
  25. As I think someone's already stated, you can just use fopen.  Since the file will
  26. be in the same directory as the program, you only need the filename, and not a
  27. full pathname.
  28.  
  29. : My other problem involves printing.  I wold like to bypass messing with the
  30. : print manager and instead get a "direct connectin".  I want to send it some ESC 
  31. : codes (15cpi, 8lines per inch, ect..).  Then just dump my charecter to it
  32. : instead of the screen.
  33. : I am creating three separate application to provide the reports and am not
  34. : interested in following the Human interface guidlines all my friend would like
  35. : to do is Double-click an application and it open the file print the report
  36. : and terminate when finished !!
  37.  
  38. If your friend is willing to go through an extra step, I might suggest a real
  39. quick-and-dirty way out:  Write the report to an output (text) file, and use
  40. TeachText (or just about any word processor) to print it.  You don't have to
  41. mess with any printing code.
  42.  
  43. -- 
  44. Gary J. Henderson
  45. gary@iscnvx.lmsc.lockheed.com
  46. #include <std/disclaimer.h>
  47.