$Log$
+ Revision 601.6 2002/09/15 03:24:28 ajc
+ * Renamed decode_base64() to CtdlDecodeBase64()
+ * Renamed decode_quoted_printable() to CtdlDecodeQuotedPrintable()
+ * These changes are to avoid namespace conflict with libical
+
Revision 601.5 2002/09/13 15:41:39 ajc
* serv_calendar.c: #include "serv_calendar.h", not "serv_ical.h"
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
fp = fopen(pwfile, "r");
if (fp == NULL) return;
while (fgets(buf64, sizeof buf64, fp) != NULL) {
- decode_base64(buf, buf64, sizeof(buf64));
+ CtdlDecodeBase64(buf, buf64, sizeof(buf64));
extract(hostbuf, buf, 0);
extract(portbuf, buf, 1);
extract(ubuf, buf, 2);
fp = fopen(pwfile, "w");
if (fp == NULL) fp = fopen("/dev/null", "w");
while (fgets(buf64, sizeof buf64, oldfp) != NULL) {
- decode_base64(buf, buf64, sizeof(buf64));
+ CtdlDecodeBase64(buf, buf64, sizeof(buf64));
extract(hostbuf, buf, 0);
extract(portbuf, buf, 1);
extract(ubuf, buf, 2);
/*
* Convert "quoted-printable" to binary. Returns number of bytes decoded.
*/
-int decode_quoted_printable(char *decoded, char *encoded, int sourcelen) {
+int CtdlDecodeQuotedPrintable(char *decoded, char *encoded, int sourcelen) {
char buf[SIZ];
int buf_length = 0;
int soft_line_break = 0;
}
if (!strcasecmp(encoding, "base64")) {
- bytes_decoded = decode_base64(decoded, part_start, length);
+ bytes_decoded = CtdlDecodeBase64(decoded, part_start, length);
}
else if (!strcasecmp(encoding, "quoted-printable")) {
- bytes_decoded = decode_quoted_printable(decoded,
+ bytes_decoded = CtdlDecodeQuotedPrintable(decoded,
part_start, length);
}
void imap_auth_login_user(char *cmd) {
char buf[SIZ];
- decode_base64(buf, cmd, SIZ);
+ CtdlDecodeBase64(buf, cmd, SIZ);
CtdlLoginExistingUser(buf);
encode_base64(buf, "Password:");
cprintf("+ %s\r\n", buf);
void imap_auth_login_pass(char *cmd) {
char buf[SIZ];
- decode_base64(buf, cmd, SIZ);
+ CtdlDecodeBase64(buf, cmd, SIZ);
if (CtdlTryPassword(buf) == pass_ok) {
cprintf("%s OK authentication succeeded\r\n", IMAP->authseq);
}
char buf[SIZ];
char username[SIZ];
- decode_base64(username, argbuf, SIZ);
+ CtdlDecodeBase64(username, argbuf, SIZ);
lprintf(9, "Trying <%s>\n", username);
if (CtdlLoginExistingUser(username) == login_ok) {
encode_base64(buf, "Password:");
void smtp_get_pass(char *argbuf) {
char password[SIZ];
- decode_base64(password, argbuf, SIZ);
+ CtdlDecodeBase64(password, argbuf, SIZ);
lprintf(9, "Trying <%s>\n", password);
if (CtdlTryPassword(password) == pass_ok) {
cprintf("235 Hello, %s\r\n", CC->usersupp.fullname);
/*
- * decode_base64() and encode_base64() are adaptations of code by
+ * CtdlDecodeBase64() and encode_base64() are adaptations of code by
* John Walker, found in full in the file "base64.c" included with this
* distribution. The difference between those functions and these is that
* these are intended to encode/decode small string buffers, and those are
* Convert base64-encoded to binary. Returns the length of the decoded data.
* It will stop after reading 'length' bytes.
*/
-int decode_base64(char *dest, char *source, size_t length)
+int CtdlDecodeBase64(char *dest, char *source, size_t length)
{
int i, c;
int dpos = 0;
int extract_int (char *source, int parmnum);
long int extract_long (char *source, long int parmnum);
void encode_base64(char *dest, char *source);
-int decode_base64(char *dest, char *source, size_t length);
+int CtdlDecodeBase64(char *dest, char *source, size_t length);
void striplt(char *);
int haschar(const char *st, int ch);
int collapsed_strcmp(char *s1, char *s2);