W
EB
F
ILTER
A
PPENDICES
S
ECTION
A
PPENDIX
B
450
M86 S
ECURITY
U
SER
G
UIDE
word[ll] = '\0';
return word;
}
++ll;
}
}
/* to_upper:
* Change the string to upper case
*/
int to_upper(char *string)
{
int len;
int i;
char *tmp=NULL;
if (string && strlen(string))
{
if (!(tmp=(char*)strdup(string)))
return 0;
len=strlen(string);
for (i=0; i<len; i++)
{
string[i]=toupper(tmp[i]);
}
free(tmp);
}
return 1;
}
void getquery(char *paramd, char **paramv)
{
if (paramd == NULL)
*paramv = NULL;
else
*paramv = (char *)strtok(paramd, "&");
}
void getnextquery(char **paramv)
{
*paramv = (char *)strtok(NULL, "&");
}