Project/app_code/variable.c
int str_cmp(char a[],char b[])
{
        int i,j;
        int cnt;
	int ret;

        cnt = Lexicon.count;

        i = get_count(a);
        j = get_count(b);

        if(i > cnt || j > cnt)
        {
		fprintf(stderr,"\nVAR NOT DECLARED\n");
                ret = -1;
        }
	else if(Lexicon.Entry[i].str == NULL || Lexicon.Entry[j].str ==NULL)
        {
               fprintf(stderr,"\nERROR:- VAR NOT DECLARED\n");
		ret = -1;
        }

        else
        {
                if(strcmp(Lexicon.Entry[i].str,Lexicon.Entry[j].str)==0)
                {
                        ret = 0;
                }
                else
                {
                        ret = 1;
                }
        }

	return ret;
}
/*RETURN 0/1 IF MATCHES OR NOT*/
RETURN 0/1 IF MATCHES OR NOT
RETURN 0 / 1 IF MATCHES OR NOT
int str_cmp(char a[],char b[])
{
        int i,j;
        int cnt;
	int ret;
        cnt = Lexicon.count;
        i = get_count(a);
        j = get_count(b);
        if(i > cnt || j > cnt)
        {
		fprintf(stderr,"\nVAR NOT DECLARED\n");
                ret = -1;
        }
	else if(Lexicon.Entry[i].str == NULL || Lexicon.Entry[j].str ==NULL)
        {
               fprintf(stderr,"\nERROR:- VAR NOT DECLARED\n");
		ret = -1;
        }
        else
        {
                if(strcmp(Lexicon.Entry[i].str,Lexicon.Entry[j].str)==0)
                {
                        ret = 0;
                }
                else
                {
                        ret = 1;
                }
        }
	return ret;
}
int str_cmp ( char a [ ] , char b [ ] ) { int i , j ; int cnt ; int ret ; cnt = Lexicon . count ; i = get_count ( a ) ; j = get_count ( b ) ; if ( i > cnt || j > cnt ) { fprintf ( stderr , " \n \n " ) ; ret = -1 ; } else if ( Lexicon . Entry [ i ] . str == NULL || Lexicon . Entry [ j ] . str == NULL ) { fprintf ( stderr , " \n \n " ) ; ret = -1 ; } else { if ( strcmp ( Lexicon . Entry [ i ] . str , Lexicon . Entry [ j ] . str ) == 0 ) { ret = 0 ; } else { ret = 1 ; } } return ret ; }
RETURN 0/1 IF MATCHES OR NOT
RETURN 0 / 1 IF MATCHES OR NOT