#include<stdio.h>
#include<stdlib.h>
#include<limits.h>
#include<errno.h>

#include"zither_lint.h"
#include<almemsys/almemsys.h>


int startcheck(int ch, char * data)
{
int ret;
ret = -1;
errno = 0;

char * uu = (char * )calloc(5, sizeof(char));

if(ch == 1){  // NOT SET
   if(-1 != ch_int2(data)){
      ret = 1;
      }
   else{
      if(0 == self_memcmp(data, "NOT")){
         ret = 1;
         }
      }
   }
else{  // SET
   if(1 == char_count(data, ':')){
      uu = delim_get(data, uu, ':', &ret, 0);
      if(-1 != ch_int2(uu)){
         uu = delim_get(data, uu, ':', &ret, 1);
         if(-1 != ch_int2(uu)){
            ret = 1;
            }
         }
      }
   }

free(uu);
return ret;
}

