#include "Yam2NN.h"

#ifndef __SASC
char *Stptok(const char *s, char *tok, int toklen, const char *brk)
{
    int pos;

    if((s == NULL) || (tok == NULL) || (brk == NULL))
        return(NULL);

    if(*s == 0)
        return(NULL);
    pos = 0;
    while(1)
    {
        if(*s == 0)
            break;
        if(strchr(brk, *s))
            break;

        tok[pos++] = *s;
        if(pos >= toklen)
            break;

        s++;
    }
    tok[pos] = 0;
    return(s);
}

char *Stpblk(const char *str)
{
    while(isspace(*str) && *str)
        str++;
    return(str);
}

int Astcsma(char *s, char *p)
{
    char out[255];

    if(ParsePatternNoCase(p, out, sizeof(out)) > 0)
        if(MatchPatternNoCase(out, s))
            return(TRUE);

    return(FALSE);
}
#endif

