mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-10 18:23:28 +00:00
Removed FALSE/TRUE
SVN revision: 584
This commit is contained in:
parent
ea7a53c07a
commit
8a65fe4f11
23
src/elog.c
23
src/elog.c
@ -6,6 +6,9 @@
|
|||||||
Contents: Electronic logbook utility
|
Contents: Electronic logbook utility
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.8 2003/07/15 12:16:52 midas
|
||||||
|
Removed FALSE/TRUE
|
||||||
|
|
||||||
Revision 1.7 2003/07/15 11:19:45 midas
|
Revision 1.7 2003/07/15 11:19:45 midas
|
||||||
Added -e flag, reply now quotes original text
|
Added -e flag, reply now quotes original text
|
||||||
|
|
||||||
@ -129,20 +132,20 @@ unsigned int t, pad;
|
|||||||
BOOL equal_ustring(char *str1, char *str2)
|
BOOL equal_ustring(char *str1, char *str2)
|
||||||
{
|
{
|
||||||
if (str1 == NULL && str2 != NULL)
|
if (str1 == NULL && str2 != NULL)
|
||||||
return FALSE;
|
return 0;
|
||||||
if (str1 != NULL && str2 == NULL)
|
if (str1 != NULL && str2 == NULL)
|
||||||
return FALSE;
|
return 0;
|
||||||
if (str1 == NULL && str2 == NULL)
|
if (str1 == NULL && str2 == NULL)
|
||||||
return TRUE;
|
return 1;
|
||||||
|
|
||||||
while (*str1)
|
while (*str1)
|
||||||
if (toupper(*str1++) != toupper(*str2++))
|
if (toupper(*str1++) != toupper(*str2++))
|
||||||
return FALSE;
|
return 0;
|
||||||
|
|
||||||
if (*str2)
|
if (*str2)
|
||||||
return FALSE;
|
return 0;
|
||||||
|
|
||||||
return TRUE;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*---- strlcpy and strlcat to avoid buffer overflow ----------------*/
|
/*---- strlcpy and strlcat to avoid buffer overflow ----------------*/
|
||||||
@ -338,12 +341,12 @@ char host_name[256], str[80], *ph, *ps;
|
|||||||
sprintf(request+strlen(request), "Host: %s\r\n", host_name);
|
sprintf(request+strlen(request), "Host: %s\r\n", host_name);
|
||||||
sprintf(request+strlen(request), "User-Agent: ELOG\r\n");
|
sprintf(request+strlen(request), "User-Agent: ELOG\r\n");
|
||||||
|
|
||||||
first = TRUE;
|
first = 1;
|
||||||
if (passwd[0])
|
if (passwd[0])
|
||||||
{
|
{
|
||||||
if (first)
|
if (first)
|
||||||
sprintf(request+strlen(request), "Cookie: ");
|
sprintf(request+strlen(request), "Cookie: ");
|
||||||
first = FALSE;
|
first = 0;
|
||||||
|
|
||||||
base64_encode(passwd, str);
|
base64_encode(passwd, str);
|
||||||
sprintf(request+strlen(request), "wpwd=%s;", str);
|
sprintf(request+strlen(request), "wpwd=%s;", str);
|
||||||
@ -353,7 +356,7 @@ char host_name[256], str[80], *ph, *ps;
|
|||||||
{
|
{
|
||||||
if (first)
|
if (first)
|
||||||
sprintf(request+strlen(request), "Cookie: ");
|
sprintf(request+strlen(request), "Cookie: ");
|
||||||
first = FALSE;
|
first = 0;
|
||||||
|
|
||||||
sprintf(request+strlen(request), "unm=%s;", uname);
|
sprintf(request+strlen(request), "unm=%s;", uname);
|
||||||
}
|
}
|
||||||
@ -362,7 +365,7 @@ char host_name[256], str[80], *ph, *ps;
|
|||||||
{
|
{
|
||||||
if (first)
|
if (first)
|
||||||
sprintf(request+strlen(request), "Cookie: ");
|
sprintf(request+strlen(request), "Cookie: ");
|
||||||
first = FALSE;
|
first = 0;
|
||||||
|
|
||||||
base64_encode(upwd, str);
|
base64_encode(upwd, str);
|
||||||
sprintf(request+strlen(request), "upwd=%s;", str);
|
sprintf(request+strlen(request), "upwd=%s;", str);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user