s[strlen(s)] = '\0';
int min(int a,int b,int c) //Function to return the minimum.
{
if(a < b)
{
if(a < c)return a;
else if(a > c)return c;
else return a;
}
else if(a > b)
{
if(b < c)return b;
else if(b > c)return c;
else return b;
}
else
{
if(a < c) return a;
else if(a > c) return c;
else return a;
}
}
This kind of things make me hate my work.
int t;
if ((t > 1) && (t < 2))
{
errorString = errorBuffer;
return -1;
}
file = fopen(argv[1], "r");
if (file == NULL){}
exit(EXIT_FAILURE);
Those silly curly braces.
...
if (alignEntrySize & 1)
alignEntrySize++;
if (alignEntrySize & 2)
alignEntrySize += 2;
...
int my_strcmp(const char *out, const char *in ){
for( ;*(in) , *(out) && *(in) == *(out); *out++,*in++ );
return *in <= *out ? *out > *in : -1 ;
}
I don't know why but it works )))