6 #include "../hunspell/csutil.hxx"
7 #include "firstparser.hxx"
13 FirstParser::FirstParser(const char * wordchars)
18 FirstParser::~FirstParser()
22 char * FirstParser::next_token()
24 char * tabpos = strchr(line[actual],'\t');
25 if ((tabpos) && (tabpos - line[actual]>token))
27 char * t = (char *) malloc(tabpos - line[actual] + 1);
30 fprintf(stderr,"Error - Insufficient Memory\n");
33 t[tabpos - line[actual]] = '\0';
34 token = tabpos - line[actual] +1;
35 return strncpy(t, line[actual], tabpos - line[actual]);