home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / mac / programm / 15398 < prev    next >
Encoding:
Text File  |  1992-09-12  |  1.4 KB  |  32 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!usc!sol.ctr.columbia.edu!destroyer!ubc-cs!unixg.ubc.ca!kakwa.ucs.ualberta.ca!acs.ucalgary.ca!cpsc.ucalgary.ca!valerio
  3. From: valerio@cpsc.ucalgary.ca (Valerio Franceschin)
  4. Subject: problem in converting SFGetFile() to StandardGetFile()
  5. Message-ID: <BuAH8J.4qI@cpsc.ucalgary.ca>
  6. Sender: news@cpsc.ucalgary.ca (News Manager)
  7. Organization: University of Calgary Computer Science
  8. Distribution: na
  9. Date: Wed, 9 Sep 1992 02:21:54 GMT
  10. Lines: 20
  11.  
  12.  
  13. I'm trying to replace SFGetFile() with the new system 7 StandardGetFile().
  14. SFGetFile produces the file name in the 'fname' field of an SFReply record.
  15. I use this field (after converting to C format) in an fopen(), and everything
  16. is fine.  StandardGetFile() produces the file name in the 'name' field of a
  17. record (sfFile) within  a StandardFileReply record.  I use this name (after converting
  18. to C and checking that it's correct) in an fopen(), and this fails.
  19.  
  20. Why is this not working?  Is there something else I should be doing?
  21.  
  22. I know that I can use FSpOpenDF() to get a reference number to the file, and
  23. then read that file with FSRead().  But I want to open the file with fopen() so
  24. I can get a file pointer (FILE *) to use in the numerous fscanf() statements that
  25. already appear in the program.
  26.  
  27. Any replies to this problem would be much appreciated.  Please e-mail me directly.
  28.  
  29. Thanks again.
  30.  
  31. V
  32.