CompuServe Thread

#MPWC & fopen

2 messages in this thread
#132376From: Fritz AndersonJul 19, 1993 3:25 PM
You could do this by editing and recompiling the fopen() code in the MPW stdio library, but, alas, they don't provide source. That one might need more than 20 files open simultaneously is unlikely, but I assume you have explored alternatives (such as saving your offset into an open file and closing it temporarily). It's also pretty rare that stdio is better for an application than doing file I/O with the Mac OS yourself. — F
#132625From: Douglas YoonJul 21, 1993 6:37 AM
Fritz: Thanks for the reply. No, just compiling the fopen() code would not help. The number 20 seems to be hardcoded throughout the stdio library. For instance, sprintf uses the file id 20, so when open() uses this id, the file is not written to. Instead lots of memory gets trashed. I am pretty sure of this, after decompiling the libraries and editing the binaries (lots o' fun, I recommend this to everyone with nothing better to do…). Anyway, the reason for fopen was for portability reasons (stupid UNIX utility, needed on multiple platforms). thanks again, =Douglas Yoon Philips Interactive Media of America Washington, DC