According to <a href="http://developer.apple.com/technotes/tn/tn1176.html" target="_blank">Apple</a>, fgets is supported since OS 9 thanks to StdCLib 3.5, now located in /system/library/cfmsupport/.
However, in Project Builder 1.1.1 (OS X.1.5), using the following headers:
#include <Carbon/Carbon.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
it doesn't seem like fgets() supports Mac's <CR> only style. Tracing through code, my buffer is entirely filled, with '\r' (ASCII value 13) where new lines in the orginal document are at. Looping it again will fill my buffer with values following the previous buffer, again, the buffer is entirely filled instead of properly terminated.
Any ideas? ^_^;
<small>[ 07-27-2002, 02:01 PM: Message edited by: Evangellydonut ]</small>