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