Skip to content

Instantly share code, notes, and snippets.

@yotamN
Last active August 29, 2015 14:21
Show Gist options
  • Save yotamN/a74e0275b55695f8706d to your computer and use it in GitHub Desktop.
Save yotamN/a74e0275b55695f8706d to your computer and use it in GitHub Desktop.
int check(file* sign, file* f)
{
int i, j, t;
for(i=0; i<f->l - sign->l; i++)
{
t = 0;
for(j=0; j<sign->l; j++)
{
t++;
if(*((sign->s) + j) != *((f->s) + j + i))
{
// TODO: Think on a way without break because ran doesn't like this
break;
}
}
if(t == sign->l)
return TRUE;
}
return FALSE;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment