home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!think.com!hsdndev!nmr-z!amber.mgh.harvard.edu!burglin
- From: burglin@amber.mgh.harvard.edu (Thomas Burglin)
- Newsgroups: comp.sys.mac.programmer
- Subject: Reading ASCII files, best way??
- Message-ID: <30DEC199217572057@amber.mgh.harvard.edu>
- Date: 30 Dec 92 22:57:00 GMT
- Sender: usenet@nmr-z.mgh.harvard.edu (User for USENET news postings)
- Organization: Molecular Biology, Massachusetts General Hospital, Boston
- Lines: 20
- News-Software: VAX/VMS VNEWS 1.41
- Nntp-Posting-Host: amber.mgh.harvard.edu
-
- Hi, I am working on a specialized database program.
- It's supposed to read the database as an ASCII text file,
- and interpret the ASCII data properly as numbers or text
- strings.
- I guess I open the file using the standard toolbox calls,
- and subsequently I should read it using FSread(...).
-
- Now, what's the best way of doing that.
- Should I set the buffer to a big size (i.e. 32k) and
- the interpret that whole stuff, or is it as efficient
- to read small chunks like line sized (e.g. 80 char) chunks.
-
- Second, what's the best way of interpreting the data.
- Obviously I could use the sprintf calls to do such conversions,
- but would it be more efficient to decode the ascii buffer
- all in C "myself".
- How well do standard C library calls and mac Toolbox calls mix?
- Thanks for any help. Replies by email preferred.
- Thomas Burglin
- burglin@frodo.mgh.harvard.edu
-