1 /* $Id: strio.c,v 1.6 2004-12-01 12:48:13 btb Exp $ */
3 * strio.c: string/file manipulation functions by Victor Rachels
15 //added on 9/16/98 by adb to add memory tracking for this module
19 char *fgets_unlimited(PHYSFS_file *f)
24 MALLOC(word, char, mem);
27 while (word && cfgets(p, mem, f) == word + mem) {
30 // Make a bigger buffer, because it read to the end of the buffer.
33 MALLOC(word, char, mem);
34 for (i = 0; i < mem/2; i++)
42 char* splitword(char *s, char splitchar)
48 for(x=0;s[x]!=splitchar&&x<l;x++);
51 word = (char *) d_malloc(sizeof(char) * (l2+1));