/* $Id: strio.c,v 1.4 2003-06-16 06:57:34 btb Exp $ */ /* * strio.c: string/file manipulation functions by Victor Rachels */ #ifdef HAVE_CONFIG_H #include #endif #include #include "cfile.h" #include "strio.h" //added on 9/16/98 by adb to add memory tracking for this module #include "u_mem.h" //end additions - adb char* fsplitword(CFILE *f, char splitchar) { int x,y,mem,memx; char *word,*buf; memx=1; mem=memx*256; word=(char *) d_malloc(sizeof(char) * mem); x=0; word[x] = cfgetc(f); while(word[x] != splitchar && !cfeof(f)) { x++; if(x==mem) { buf=word; memx*=2; mem=memx*256; word=(char *) d_malloc(sizeof(char) * mem); for(y=0;y