char encoding[16];
char istr[1024];
iconv_t ic = (iconv_t)(-1) ;
- char *ibuf; /**< Buffer of characters to be converted */
- char *obuf; /**< Buffer for converted characters */
- size_t ibuflen; /**< Length of input buffer */
- size_t obuflen; /**< Length of output buffer */
- char *isav; /**< Saved pointer to input buffer */
- char *osav; /**< Saved pointer to output buffer */
+ char *ibuf; // Buffer of characters to be converted
+ char *obuf; // Buffer for converted characters
+ size_t ibuflen; // Length of input buffer
+ size_t obuflen; // Length of output buffer
+ char *isav; // Saved pointer to input buffer
+ char *osav; // Saved pointer to output buffer
int passes = 0;
int i, len, delta;
int illegal_non_rfc2047_encoding = 0;
for (i=0; i<len; ++i) {
if ((buf[i] < 32) || (buf[i] > 126)) {
illegal_non_rfc2047_encoding = 1;
- i = len; ///< take a shortcut, it won't be more than one.
+ i = len; // take a shortcut, it won't be more than one.
}
}
if (illegal_non_rfc2047_encoding) {
ibuf = malloc(1024);
isav = ibuf;
- if (!strcasecmp(encoding, "B")) { /**< base64 */
+ if (!strcasecmp(encoding, "B")) { // base64
ibuflen = CtdlDecodeBase64(ibuf, istr, strlen(istr));
}
- else if (!strcasecmp(encoding, "Q")) { /**< quoted-printable */
+ else if (!strcasecmp(encoding, "Q")) { // quoted-printable
size_t len;
unsigned long pos;
ibuflen = CtdlDecodeQuotedPrintable(ibuf, istr, len);
}
else {
- strcpy(ibuf, istr); /**< unknown encoding */
+ strcpy(ibuf, istr); // unknown encoding
ibuflen = strlen(istr);
}
#endif
-
struct trynamebuf {
char buffer1[SIZ];
char buffer2[SIZ];
}
-
/*
* Determine whether a given Internet address belongs to the current user
*/
}
-
-
-
/*
* This function is self explanatory.
* (What can I say, I'm in a weird mood today...)
/*
* Aliasing for network mail.
- * (Error messages have been commented out, because this is a server.)
*/
int alias(char *name)
{ /* process alias and routing info for mail */
}
-
/*
* Validate recipients, count delivery types and errors, and handle aliasing
* FIXME check for dupes!!!!!
EncodedMaxLen = nColons * (sizeof(headerStr) + 3) + SourceLen * 3;
Encoded = (char*) malloc (EncodedMaxLen);
- for (i = 0; i < nColons; i++)
+ for (i = 0; i < nColons; i++) {
source[AddrPtr[i]++] = '\0';
+ }
/* TODO: if libidn, this might get larger*/
user = malloc(SourceLen + 1);
node = malloc(SourceLen + 1);
}
-
/*
* Split an RFC822-style address into userid, host, and full name
*
}
-
/*
* convert_field() is a helper function for convert_internet_message().
* Given start/end positions for an rfc822 field, it converts it to a Citadel
}
-
struct CtdlMessage *convert_internet_message_buf(StrBuf **rfc822)
{
struct CtdlMessage *msg;
}
-
/*
* Look for a particular header field in an RFC822 message text. If the
* requested field is found, it is unfolded (if necessary) and returned to
}
-
/*****************************************************************************
* DIRECTORY MANAGEMENT FUNCTIONS *
*****************************************************************************/