*
* Representation of an email address
*
- * | Data | Description
- * | :----------------- | :--------------------------------------------------
- * | #RFC822Error | An out-of-band error code
- * | #RFC822Errors | Messages for the error codes in #AddressError
- * | #RFC822Specials | Characters with special meaning for email addresses
+ * | Data | Description
+ * | :--------------- | :--------------------------------------------------
+ * | #AddressError | An out-of-band error code
+ * | #AddressErrors | Messages for the error codes in #AddressError
+ * | #AddressSpecials | Characters with special meaning for email addresses
*
* | Function | Description
* | :--------------------------- | :---------------------------------------------------------
#include "mutt_idna.h"
/**
- * RFC822Specials - Characters with special meaning for email addresses
+ * AddressSpecials - Characters with special meaning for email addresses
*/
-const char RFC822Specials[] = "@.,:;<>[]\\\"()";
+const char AddressSpecials[] = "@.,:;<>[]\\\"()";
/**
* is_special - Is this character special to an email address?
*/
-#define is_special(x) strchr(RFC822Specials, x)
+#define is_special(x) strchr(AddressSpecials, x)
/**
- * RFC822Error - An out-of-band error code
+ * AddressError - An out-of-band error code
*
* Many of the Address functions set this variable on error.
* Its values are defined in #AddressError.
- * Text for the errors can be looked up using #RFC822Errors.
+ * Text for the errors can be looked up using #AddressErrors.
*/
-int RFC822Error = 0;
+int AddressError = 0;
/**
- * RFC822Errors - Messages for the error codes in #AddressError
+ * AddressErrors - Messages for the error codes in #AddressError
*
* These must defined in the same order as enum AddressError.
*/
-const char *const RFC822Errors[] = {
+const char *const AddressErrors[] = {
"out of memory", "mismatched parenthesis", "mismatched quotes",
"bad route in <>", "bad address in <>", "bad address spec",
};
}
if (level)
{
- RFC822Error = ERR_MISMATCH_PAREN;
+ AddressError = ERR_MISMATCH_PAREN;
return NULL;
}
return s;
(*tokenlen)++;
s++;
}
- RFC822Error = ERR_MISMATCH_QUOTE;
+ AddressError = ERR_MISMATCH_QUOTE;
return NULL;
}
}
if (!s || *s != ':')
{
- RFC822Error = ERR_BAD_ROUTE;
+ AddressError = ERR_BAD_ROUTE;
return NULL; /* invalid route */
}
if (*s != '>')
{
- RFC822Error = ERR_BAD_ROUTE_ADDR;
+ AddressError = ERR_BAD_ROUTE_ADDR;
return NULL;
}
commentmax, addr);
if (s && *s && *s != ',' && *s != ';')
{
- RFC822Error = ERR_BAD_ADDR_SPEC;
+ AddressError = ERR_BAD_ADDR_SPEC;
return NULL;
}
return s;
size_t phraselen = 0, commentlen = 0;
struct Address *cur = NULL, *last = NULL;
- RFC822Error = 0;
+ AddressError = 0;
last = top;
while (last && last->next)
};
/**
- * enum AddressError - possible values for RFC822Error
+ * enum AddressError - possible values for AddressError
*/
enum AddressError
{
ERR_BAD_ADDR_SPEC
};
-extern int RFC822Error;
-extern const char *const RFC822Errors[];
-extern const char RFC822Specials[];
+extern int AddressError;
+extern const char *const AddressErrors[];
+extern const char AddressSpecials[];
-#define rfc822_error(x) RFC822Errors[x]
+#define address_error(x) AddressErrors[x]
struct Address *mutt_addr_append(struct Address **a, struct Address *b, int prune);
void mutt_addr_cat(char *buf, size_t buflen, const char *value, const char *specials);