Example #1
0
GSList *get_gamess_keywords(FILE *fp, gchar *line, gint *ret)
{
gchar *keyword;
GSList *keywords=NULL;

keyword = get_next_keyword(fp, line, TRUE, ret);
while ((g_ascii_strncasecmp(keyword, "$end", 4) != 0) && (*ret == 0))
  {
  keywords = g_slist_append(keywords, keyword);
  keyword = get_next_keyword(fp, line, FALSE, ret);
  }
if (g_ascii_strncasecmp(keyword, "$end", 4) == 0)
  g_free(keyword);
return(keywords);
}
Example #2
0
char*  tokenize_line(char* line)
{
    static char* in_s,*end_s;
    char* cp=NULL;

    if ( line )
    {
        in_s = line;
        end_s = in_s+strlen(line);
    }

    cp=get_next_keyword(in_s);

    if ( cp && *cp != '\0' )
    {
        in_s += strlen(in_s) + 1;
    }
    else if ( cp && *cp == '\0')
        return NULL;
    return cp;
}