34 if(!txt)
return(dest);
45 if(a == NULL || b == NULL)
48 while(*a == *b && *a !=
'\0' && *b !=
'\0'){ a++; b++; }
50 if(*a == *b)
return 0;
57 if(a == NULL || b == NULL)
60 return strcasecmp(a, b);
65 if(a == NULL || b == NULL)
68 return strncmp(a, b, i);
73 if(a == NULL || b == NULL)
76 return strncasecmp(a, b, i);
95 char *
j_attr(
const char** atts,
const char *attr)
99 while(atts[i] !=
'\0')
101 if(
j_strcmp(atts[i],attr) == 0)
return (
char*)atts[i+1];
112 for(count = 0; count < n; count++)
113 if(s[count] == (
char) c)
114 return &((
char *)s)[count];
139 s->
len += strlen(goodstr);
149 if(str == NULL || strlen(str) == 0)
157 if(raw == NULL || len <= 0)
176 arg = va_arg(ap,
char *);
191 if(s == NULL || s->
len == 0 || s->
first == NULL)
225 arg = va_arg(ap,
char *);
243 if (buf == NULL)
return(NULL);
245 if (strchr(buf,
'&') == NULL)
return(buf);
248 temp =
pmalloc(p,strlen(buf)+1);
250 temp = malloc(strlen(buf)+1);
252 if (temp == NULL)
return(NULL);
254 for(i=0;i<strlen(buf);i++)
258 if (strncmp(&buf[i],
"&",5)==0)
262 }
else if (strncmp(&buf[i],
""",6)==0) {
265 }
else if (strncmp(&buf[i],
"'",6)==0) {
268 }
else if (strncmp(&buf[i],
"<",4)==0) {
271 }
else if (strncmp(&buf[i],
">",4)==0) {
287 int i,j,newlen = len;
290 if (buf == NULL || len < 0)
return NULL;
317 temp = malloc(newlen+1);
320 memcpy(temp,buf,len);
330 memcpy(&temp[j],
"&",5);
334 memcpy(&temp[j],
"'",6);
338 memcpy(&temp[j],
""",6);
342 memcpy(&temp[j],
"<",4);
346 memcpy(&temp[j],
">",4);
359 unsigned char hashval[20];
367 # include <openssl/sha.h>
368 SHA1((
unsigned char *)str, strlen(str), hashval);
370 sha1_hash((
unsigned char *)str, strlen(str), hashval);