/* mutt_account_getuser: retrieve username into ACCOUNT, if necessary */
int mutt_account_getuser (ACCOUNT * account)
{
- char prompt[SHORT_STRING];
+ char prompt[STRING];
/* already set */
if (account->flags & M_ACCT_USER)
/* mutt_account_getpass: fetch password into ACCOUNT, if neccessary */
int mutt_account_getpass (ACCOUNT * account)
{
- char prompt[SHORT_STRING];
+ char prompt[STRING];
if (account->flags & M_ACCT_PASS)
return 0;
void mutt_create_alias(ENVELOPE *cur, address_t *iadr)
{
- char buf[LONG_STRING], prompt[SHORT_STRING];
+ char buf[LONG_STRING], prompt[STRING];
address_t *adr = iadr;
alias_t *new;
FILE *rc;
const char *elsestring __attribute__ ((unused)),
unsigned long data, format_flag flags __attribute__ ((unused)))
{
- char tmp[SHORT_STRING], adr[SHORT_STRING];
+ char tmp[STRING], adr[STRING];
alias_t *alias = (alias_t *) data;
switch (op) {
int t = -1;
int i, done = 0;
int op;
- char helpstr[SHORT_STRING];
+ char helpstr[STRING];
int omax;
doxygen.cfg
html
latex
+man
# If the EXTRACT_STATIC tag is set to YES all static members of a file
# will be included in the documentation.
-EXTRACT_STATIC = NO
+EXTRACT_STATIC = YES
# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
# defined locally in source files will be included in the documentation.
# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
# in the documentation. The default is NO.
-SHOW_DIRECTORIES = NO
+SHOW_DIRECTORIES = YES
# The FILE_VERSION_FILTER tag can be used to specify a program or script that
# doxygen should invoke to get the current version for each file (typically from the
# Note: To get rid of all source code in the generated output, make sure also
# VERBATIM_HEADERS is set to NO.
-SOURCE_BROWSER = NO
+SOURCE_BROWSER = YES
# Setting the INLINE_SOURCES tag to YES will include the body
# of functions and classes directly in the documentation.
int mutt_is_autoview (BODY * b, const char *type)
{
string_list_t *t = AutoViewList;
- char _type[SHORT_STRING];
+ char _type[STRING];
int i;
if (!type)
const char *elsestring,
unsigned long data, format_flag flags)
{
- char fn[SHORT_STRING], tmp[SHORT_STRING], permission[11], date[16];
+ char fn[STRING], tmp[STRING], permission[11], date[16];
const char *t_fmt;
time_t tnow;
FOLDER *folder = (FOLDER *) data;
unsigned long data,
format_flag flags)
{
- char fn[SHORT_STRING], tmp[SHORT_STRING];
+ char fn[STRING], tmp[STRING];
FOLDER *folder = (FOLDER *) data;
switch (op) {
struct stat s;
DIR *dp;
struct dirent *de;
- char buffer[_POSIX_PATH_MAX + SHORT_STRING];
+ char buffer[_POSIX_PATH_MAX + STRING];
int i = -1;
while (stat (d, &s) == -1) {
{
char buf[_POSIX_PATH_MAX];
char prefix[_POSIX_PATH_MAX] = "";
- char helpstr[SHORT_STRING];
+ char helpstr[STRING];
char title[STRING];
struct browser_state state;
MUTTMENU *menu;
if (!state.entry[menu->current].imap)
mutt_error (_("Delete is only supported for IMAP mailboxes"));
else {
- char msg[SHORT_STRING];
+ char msg[STRING];
IMAP_MBOX mx;
int nentry = menu->current;
void charset_initialize(void)
{
#ifdef HAVE_LANGINFO_CODESET
- char buff[SHORT_STRING];
- char buff2[SHORT_STRING];
+ char buff[STRING];
+ char buff2[STRING];
m_strcpy(buff, sizeof(buff), nl_langinfo(CODESET));
charset_canonicalize(buff2, sizeof(buff2), buff);
void charset_canonicalize(char *dest, ssize_t dlen, const char *name)
{
const struct cset_pair *cp;
- char scratch[SHORT_STRING];
+ char scratch[STRING];
const char *p;
int i = 0;
/* XXX: MC: UGLY return of local static */
const char *charset_getfirst(const char *charset)
{
- static char fcharset[SHORT_STRING];
+ static char fcharset[STRING];
const char *p;
if (m_strisempty(charset))
int charset_is_utf8(const char *s)
{
- char buf[SHORT_STRING];
+ char buf[STRING];
charset_canonicalize(buf, sizeof(buf), s);
return !m_strcmp(buf, "utf-8");
}
int charset_is_us_ascii(const char *s)
{
- char buf[SHORT_STRING];
+ char buf[STRING];
charset_canonicalize(buf, sizeof(buf), s);
return !m_strcmp(buf, "us-ascii");
}
/* Like iconv_open, but canonicalises the charsets */
iconv_t mutt_iconv_open(const char *tocode, const char *fromcode, int flags)
{
- char tocode1[SHORT_STRING];
- char fromcode1[SHORT_STRING];
+ char tocode1[STRING];
+ char fromcode1[STRING];
const char *tmp;
iconv_t cd;
void ci_bounce_message (HEADER * h, int *redraw)
{
- char prompt[SHORT_STRING];
+ char prompt[STRING];
char buf[HUGE_STRING] = { 0 };
address_t *adr = NULL;
char *err = NULL;
void mutt_enter_command (void)
{
BUFFER err, token;
- char buffer[LONG_STRING], errbuf[SHORT_STRING];
+ char buffer[LONG_STRING], errbuf[STRING];
int r;
buffer[0] = 0;
void mutt_display_address (ENVELOPE * env)
{
const char *pfx = NULL;
- char buf[SHORT_STRING];
+ char buf[STRING];
address_t *adr = NULL;
adr = mutt_get_address(env, &pfx);
int decode, int decrypt, int *redraw) {
int i, need_buffy_cleanup;
int need_passphrase = 0, app = 0;
- char prompt[SHORT_STRING], buf[_POSIX_PATH_MAX];
+ char prompt[STRING], buf[_POSIX_PATH_MAX];
CONTEXT ctx;
struct stat st;
struct utimbuf ut;
{
int i, r;
struct stat st;
- char pretty[_POSIX_PATH_MAX], msg[_POSIX_PATH_MAX + SHORT_STRING];
+ char pretty[_POSIX_PATH_MAX], msg[_POSIX_PATH_MAX + STRING];
for (i = 0; i < idxlen; i++) {
m_strcpy(pretty, sizeof(pretty), idx[i]->content->filename);
const char *elsestring,
unsigned long data, format_flag flags)
{
- char fmt[SHORT_STRING], tmp[SHORT_STRING];
+ char fmt[STRING], tmp[STRING];
int optional = (flags & M_FORMAT_OPTIONAL);
MUTTMENU *menu = (MUTTMENU *) data;
ssize_t fcclen,
HEADER * cur __attribute__ ((unused)))
{ /* current message */
- char helpstr[SHORT_STRING];
+ char helpstr[STRING];
char buf[LONG_STRING];
char fname[_POSIX_PATH_MAX];
MUTTMENU *menu;
mutt_copy_header (FILE * in, HEADER * h, FILE * out, int flags,
const char *prefix)
{
- char buffer[SHORT_STRING];
+ char buffer[STRING];
if (h->env)
flags |= (h->env->irt_changed ? CH_UPDATE_IRT : 0) |
return (-1);
if (flags & CH_TXTPLAIN) {
- char chsbuf[SHORT_STRING];
+ char chsbuf[STRING];
fputs ("MIME-Version: 1.0\n", out);
fputs ("Content-Transfer-Encoding: 8bit\n", out);
_mutt_copy_message (FILE * fpout, FILE * fpin, HEADER * hdr, BODY * body,
int flags, int chflags)
{
- char prefix[SHORT_STRING];
+ char prefix[STRING];
STATE s;
off_t new_offset = -1;
int rc = 0;
else if (hdr->attach_del && (chflags & CH_UPDATE_LEN)) {
int new_lines;
off_t new_length = body->length;
- char date[SHORT_STRING];
+ char date[STRING];
mutt_make_date (date, sizeof (date));
date[5] = date[m_strlen(date) - 1] = '\"';
WHERE char Errorbuf[STRING];
WHERE char AttachmentMarker[STRING];
-WHERE char Quotebuf[SHORT_STRING];
+WHERE char Quotebuf[STRING];
WHERE char *MuttDotlock;
static void mutt_decode_uuencoded (STATE * s, long len, int istext, iconv_t cd)
{
- char tmps[SHORT_STRING];
+ char tmps[STRING];
char linelen, c, l, out;
char *pt;
char bufi[BUFI_SIZE];
void mutt_make_help (char *d, ssize_t dlen, char *txt, int menu, int op)
{
- char buf[SHORT_STRING];
+ char buf[STRING];
if (km_expand_key (buf, sizeof (buf), km_find_func (menu, op)) ||
km_expand_key (buf, sizeof (buf), km_find_func (MENU_GENERIC, op)))
{
struct keymap_t *map;
struct binding_t *b;
- char buf[SHORT_STRING];
+ char buf[STRING];
/* browse through the keymap table */
for (map = Keymaps[menu]; map; map = map->next) {
void mutt_help (int menu)
{
char tmp[_POSIX_PATH_MAX];
- char buf[SHORT_STRING];
+ char buf[STRING];
const char *desc;
FILE *f;
struct binding_t *funcs;
/* imap_auth_login: Plain LOGIN support */
imap_auth_res_t imap_auth_login(IMAP_DATA *idata, const char *method __attribute__ ((unused)))
{
- char q_user[SHORT_STRING], q_pass[SHORT_STRING];
+ char q_user[STRING], q_pass[STRING];
char buf[STRING];
int rc;
IMAP_DATA *idata;
IMAP_MBOX mx;
char buf[LONG_STRING];
- char newname[SHORT_STRING];
+ char newname[STRING];
if (imap_parse_path (mailbox, &mx) < 0) {
return -1;
/* msg_parse_fetch: handle headers returned from header fetch */
static int msg_parse_fetch (IMAP_HEADER * h, char *s)
{
- char tmp[SHORT_STRING];
+ char tmp[STRING];
char *ptmp;
if (!s)
/* imap_wordcasecmp: find word a in word list b */
int imap_wordcasecmp (const char *a, const char *b)
{
- char tmp[SHORT_STRING];
+ char tmp[STRING];
char *s = (char *) b;
int i;
- tmp[SHORT_STRING - 1] = 0;
- for (i = 0; i < SHORT_STRING - 2; i++, s++) {
+ tmp[STRING - 1] = 0;
+ for (i = 0; i < STRING - 2; i++, s++) {
if (!*s || ISSPACE (*s)) {
tmp[i] = 0;
break;
static int mutt_execute_commands (string_list_t * p)
{
BUFFER err, token;
- char errstr[SHORT_STRING];
+ char errstr[STRING];
p_clear(&err, 1);
err.data = errstr;
static int parsekeys (const char *str, keycode_t * d, int max)
{
int n, len = max;
- char buff[SHORT_STRING];
+ char buff[STRING];
char c;
char *s, *t;
void km_error_key (int menu)
{
- char buf[SHORT_STRING];
+ char buf[STRING];
struct keymap_t *key;
if (!(key = km_find_func (menu, OP_HELP)))
case '[':
{
const char *cp;
- char buf2[SHORT_STRING], *p;
+ char buf2[STRING], *p;
int do_locales;
struct tm *tm;
ssize_t len;
const char *s = NULL, *s2 = NULL;
time_t tt = 0;
struct tm *tm;
- char shortbuf[SHORT_STRING];
+ char shortbuf[STRING];
unsigned long aval = 0;
const char *delim;
int is_pgp = 0;
crypt_key_t **key_table;
MUTTMENU *menu;
int i, done = 0;
- char helpstr[SHORT_STRING], buf[LONG_STRING];
+ char helpstr[STRING], buf[LONG_STRING];
crypt_key_t *k;
int (*f) (const void *, const void *);
int menu_to_use = 0;
unsigned int app, int *forced_valid)
{
crypt_key_t *key;
- char resp[SHORT_STRING];
+ char resp[STRING];
struct crypt_cache *l = NULL;
int dummy;
static int gpgme_send_menu (HEADER * msg, int *redraw, int is_smime)
{
crypt_key_t *p;
- char input_signas[SHORT_STRING];
+ char input_signas[STRING];
int choice;
if (msg->security & APPLICATION_PGP)
int pgp_send_menu (HEADER * msg, int *redraw)
{
pgp_key_t p;
- char input_signas[SHORT_STRING];
+ char input_signas[STRING];
char prompt[LONG_STRING];
void pgp_invoke_import (const char *fname)
{
- char _fname[_POSIX_PATH_MAX + SHORT_STRING];
+ char _fname[_POSIX_PATH_MAX + STRING];
char cmd[HUGE_STRING];
struct pgp_command_context cctx;
{
const char *cp;
- char buf2[SHORT_STRING], *p;
+ char buf2[STRING], *p;
int do_locales;
struct tm *tm;
ssize_t len;
pgp_uid_t **KeyTable;
MUTTMENU *menu;
int i, done = 0;
- char helpstr[SHORT_STRING], buf[LONG_STRING], tmpbuf[STRING];
+ char helpstr[STRING], buf[LONG_STRING], tmpbuf[STRING];
char cmd[LONG_STRING], tempfile[_POSIX_PATH_MAX];
FILE *fp, *devnull;
pid_t thepid;
short abilities, pgp_ring_t keyring)
{
pgp_key_t key;
- char resp[SHORT_STRING];
+ char resp[STRING];
struct pgp_cache *l = NULL;
mutt_clear_error ();
* Copyright © 2006 Pierre Habouzit
*/
+/** \addtogroup mutt_strings */
+/*@{*/
+
+/** \file str.c
+ * \brief Madmutt string API module implementation.
+ * \author Pierre Habouzit <madcoder@debian.org>
+ */
+
#include "lib-lib.h"
+#ifndef _DOXYGEN_SKIP_ME
#define XX 255
unsigned char const __m_strdigits[128] = {
XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, XX, XX,
'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
'U', 'V', 'W', 'X', 'Y', 'Z'
};
+#endif
-
+/** \brief safe strcpy.
+ *
+ * Copies at most <tt>n-1</tt> characters from \c src into \c dst, always
+ * adding a final \c '\\0' in \c dst.
+ *
+ * \param[in] dst destination buffer.
+ * \param[in] n size of the buffer. Negative sizes are allowed.
+ * \param[in] src source string.
+ *
+ * \return \c src \e length. If this value is \>= \c n then the copy was
+ * truncated.
+ */
ssize_t m_strcpy(char *dst, ssize_t n, const char *src)
{
ssize_t len = m_strlen(src);
- if (dst && n > 0) {
+ if (n > 0) {
ssize_t dlen = MIN(n - 1, len);
memcpy(dst, src, dlen);
dst[dlen] = '\0';
{
ssize_t len = MIN(m_strlen(src), l);
- if (dst && n > 0) {
+ if (n > 0) {
ssize_t dlen = MIN(n - 1, len);
memcpy(dst, src, dlen);
dst[dlen] = '\0';
return 0;
}
+
+/*@}*/
#ifndef MUTT_LIB_LIB_STR_H
#define MUTT_LIB_LIB_STR_H
-/** \file str.h.
- * \brief Madmutt string API.
+/** \defgroup mutt_strings Madmutt string API
*
- * \author Pierre Habouzit <madcoder@debian.org>
- *
- * This header contains the prefered string API to be used in Madmutt.
+ * This module contains the prefered string API to be used in Madmutt.
*
* Those function reimplement many usual calls (strlen, strcpy, strcat, …)
* It's intended to provide a uniform and consistent API to deal with usual C
* stupid semantics à la strncpy.
* - function try to always work on buffers with its size (including the
* ending \c '\\0') to prevent buffer overflows.
- * - string and buffers sizes are ssize_t, negative values are allowed and
+ * - string and buffers sizes are \c ssize_t, negative values are allowed and
* supported.
* - functions use a à la sprintf semantics (for those that produce strings)
* meaning that they all return the len that could have fit in the buffer
* if it would have been big enough. We never try to reallocate the
* buffers, it's up to the caller if it's needed.
*/
+/*@{*/
+/** \file str.h
+ * \brief Madmutt string API header.
+ * \author Pierre Habouzit <madcoder@debian.org>
+ */
#define HUGE_STRING 5120 /**< \brief Huge buffers */
#define LONG_STRING 1024 /**< \brief Long buffers */
with emtpy strings */
#define ISSPACE(c) isspace((unsigned char)c) /**< \brief safe isspace */
-
+/** \brief Convert ascii digits into ints.
+ *
+ * Convert ascii digits into its integer value in base 36.
+ * Non convertible values are converted to 255.
+ *
+ * Translating a digit \c c into its numerical value in base \c x is just doing:
+ * \code
+ * return (c & ~127) && __m_strdigits[c] < x ? __m_strdigits[c] : -1;
+ * \endcode
+ */
extern unsigned char const __m_strdigits[128];
+/** \brief Convert an ascii base64 digit into ints.
+ *
+ * Convert an a char base64 digit into its int value.
+ * Used by base64val(). Unlike #__m_strdigits, the invalid values are set to
+ * -1 instead of 255.
+ */
extern signed char const __m_b64digits[128];
-extern char const __m_b64chars[64];
+/** \brief Convert ints from 0–64 into the corresponding base64 digit. */
+extern char const __m_b64chars[64];
+/** \brief Convert ints from 0–36 into a base36 lowercase digit. */
extern char const __m_b36chars_lower[36];
+/** \brief Convert ints from 0–36 into a base36 uppercase digit. */
extern char const __m_b36chars_upper[36];
/****************************************************************************/
return 1;
}
-ssize_t m_strcpy(char *dst, ssize_t n, const char *src);
-ssize_t m_strncpy(char *dst, ssize_t n, const char *src, ssize_t l);
+ssize_t m_strcpy(char *dst, ssize_t n, const char *src)
+ __attribute__((nonnull(1)));
+
+ssize_t m_strncpy(char *dst, ssize_t n, const char *src, ssize_t l)
+ __attribute__((nonnull(1)));
static inline ssize_t m_strcat(char *dst, ssize_t n, const char *src) {
ssize_t dlen = m_strnlen(dst, n - 1);
return (char *)skipspaces(s);
}
-char *m_strrtrim(char *s);
+char *m_strrtrim(char *s)
+ __attribute__((nonnull(1)));
/****************************************************************************/
/* search */
return m_stristrn(haystack, needle, m_strlen(needle));
}
+/*@}*/
#endif /* MUTT_LIB_LIB_STR_H */
return 0;
}
- mutt_check_lookup_list (a, type, SHORT_STRING);
+ mutt_check_lookup_list (a, type, STRING);
while (!found && *curr) {
x = 0;
const char *p = charsets;
while (*p) {
- char cset[SHORT_STRING];
+ char cset[STRING];
const char *q;
char *s;
ssize_t slen, n;
* field, so we can attempt to convert the type to BODY here.
*/
switch (ct->type) {
- char buffer[SHORT_STRING];
+ char buffer[STRING];
case TYPETEXT:
ct->subtype = m_strdup("plain");
time_t mutt_parse_date(const char *s, HEADER *h)
{
int zhours = 0, zminutes = 0, zoccident = 0;
- char scratch[SHORT_STRING];
+ char scratch[STRING];
struct tm tm;
int count = 0;
char *p;
p_clear(&tm, 1);
while ((p = strtok (p, " \t")) != NULL) {
- char tzstr[SHORT_STRING];
+ char tzstr[STRING];
const char *ptz;
switch (count) {
unsigned long data,
format_flag flags __attribute__ ((unused)))
{
- char tmp[SHORT_STRING];
+ char tmp[STRING];
CONTEXT *ctx = (CONTEXT *) data;
static int invoke_dotlock (const char *path, int flags, int retry)
{
char cmd[LONG_STRING + _POSIX_PATH_MAX];
- char f[SHORT_STRING + _POSIX_PATH_MAX];
- char r[SHORT_STRING];
+ char f[STRING + _POSIX_PATH_MAX];
+ char r[STRING];
if (flags & DL_FL_RETRY)
snprintf (r, sizeof (r), "-r %d ", retry ? MAXLOCKATTEMPT : 0);
int isSpool = 0;
CONTEXT f;
char mbox[_POSIX_PATH_MAX];
- char buf[SHORT_STRING];
+ char buf[STRING];
if (!ctx)
return 0;
}
if (ctx->deleted) {
- char buf[SHORT_STRING];
+ char buf[STRING];
snprintf (buf, sizeof (buf), ctx->deleted == 1
? _("Purge %d deleted message?") :
static char *x509_get_part (char *line, const char *ndx)
{
- static char ret[SHORT_STRING];
+ static char ret[STRING];
char *c, *c2;
m_strcpy(ret, sizeof(ret), _("Unknown"));
static int ssl_check_certificate (sslsockdata * data)
{
char *part[] = { "/CN=", "/Email=", "/O=", "/OU=", "/L=", "/ST=", "/C=" };
- char helpstr[SHORT_STRING];
- char buf[SHORT_STRING];
+ char helpstr[STRING];
+ char buf[STRING];
MUTTMENU *menu;
int done, row, i;
FILE *fp;
menu->max = 19;
menu->dialog = p_new(char *, menu->max);
for (i = 0; i < menu->max; i++)
- menu->dialog[i] = p_new(char, SHORT_STRING);
+ menu->dialog[i] = p_new(char, STRING);
row = 0;
- m_strcpy(menu->dialog[row], SHORT_STRING,
+ m_strcpy(menu->dialog[row], STRING,
_("This certificate belongs to:"));
row++;
name = X509_NAME_oneline (X509_get_subject_name (data->cert),
buf, sizeof (buf));
for (i = 0; i < 5; i++) {
c = x509_get_part (name, part[i]);
- snprintf (menu->dialog[row++], SHORT_STRING, " %s", c);
+ snprintf (menu->dialog[row++], STRING, " %s", c);
}
row++;
- m_strcpy(menu->dialog[row], SHORT_STRING,
+ m_strcpy(menu->dialog[row], STRING,
_("This certificate was issued by:"));
row++;
name = X509_NAME_oneline (X509_get_issuer_name (data->cert),
buf, sizeof (buf));
for (i = 0; i < 5; i++) {
c = x509_get_part (name, part[i]);
- snprintf (menu->dialog[row++], SHORT_STRING, " %s", c);
+ snprintf (menu->dialog[row++], STRING, " %s", c);
}
row++;
- snprintf (menu->dialog[row++], SHORT_STRING, "%s",
+ snprintf (menu->dialog[row++], STRING, "%s",
_("This certificate is valid"));
- snprintf (menu->dialog[row++], SHORT_STRING, _(" from %s"),
+ snprintf (menu->dialog[row++], STRING, _(" from %s"),
asn1time_to_string (X509_get_notBefore (data->cert)));
- snprintf (menu->dialog[row++], SHORT_STRING, _(" to %s"),
+ snprintf (menu->dialog[row++], STRING, _(" to %s"),
asn1time_to_string (X509_get_notAfter (data->cert)));
row++;
buf[0] = '\0';
x509_fingerprint (buf, sizeof (buf), data->cert);
- snprintf (menu->dialog[row++], SHORT_STRING, _("Fingerprint: %s"), buf);
+ snprintf (menu->dialog[row++], STRING, _("Fingerprint: %s"), buf);
menu->title = _("SSL Certificate check");
{
tlssockdata *data = conn->sockdata;
gnutls_session state = data->state;
- char helpstr[SHORT_STRING];
- char buf[SHORT_STRING];
- char fpbuf[SHORT_STRING];
+ char helpstr[STRING];
+ char buf[STRING];
+ char fpbuf[STRING];
ssize_t buflen;
- char dn_common_name[SHORT_STRING];
- char dn_email[SHORT_STRING];
- char dn_organization[SHORT_STRING];
- char dn_organizational_unit[SHORT_STRING];
- char dn_locality[SHORT_STRING];
- char dn_province[SHORT_STRING];
- char dn_country[SHORT_STRING];
+ char dn_common_name[STRING];
+ char dn_email[STRING];
+ char dn_organization[STRING];
+ char dn_organizational_unit[STRING];
+ char dn_locality[STRING];
+ char dn_province[STRING];
+ char dn_country[STRING];
MUTTMENU *menu;
int done, row, i, ret;
FILE *fp;
menu->max = 25;
menu->dialog = p_new(char*, menu->max);
for (i = 0; i < menu->max; i++)
- menu->dialog[i] = p_new(char, SHORT_STRING);
+ menu->dialog[i] = p_new(char, STRING);
row = 0;
- m_strcpy(menu->dialog[row], SHORT_STRING,
+ m_strcpy(menu->dialog[row], STRING,
_("This certificate belongs to:"));
row++;
dn_country, (size_t *)&buflen) != 0)
dn_country[0] = '\0';
- snprintf (menu->dialog[row++], SHORT_STRING, " %s %s", dn_common_name,
+ snprintf (menu->dialog[row++], STRING, " %s %s", dn_common_name,
dn_email);
- snprintf (menu->dialog[row++], SHORT_STRING, " %s", dn_organization);
- snprintf (menu->dialog[row++], SHORT_STRING, " %s",
+ snprintf (menu->dialog[row++], STRING, " %s", dn_organization);
+ snprintf (menu->dialog[row++], STRING, " %s",
dn_organizational_unit);
- snprintf (menu->dialog[row++], SHORT_STRING, " %s %s %s", dn_locality,
+ snprintf (menu->dialog[row++], STRING, " %s %s %s", dn_locality,
dn_province, dn_country);
row++;
- m_strcpy(menu->dialog[row], SHORT_STRING,
+ m_strcpy(menu->dialog[row], STRING,
_("This certificate was issued by:"));
row++;
(cert, GNUTLS_OID_X520_COUNTRY_NAME, 0, 0, dn_country, (size_t *)&buflen) != 0)
dn_country[0] = '\0';
- snprintf (menu->dialog[row++], SHORT_STRING, " %s %s", dn_common_name,
+ snprintf (menu->dialog[row++], STRING, " %s %s", dn_common_name,
dn_email);
- snprintf (menu->dialog[row++], SHORT_STRING, " %s", dn_organization);
- snprintf (menu->dialog[row++], SHORT_STRING, " %s",
+ snprintf (menu->dialog[row++], STRING, " %s", dn_organization);
+ snprintf (menu->dialog[row++], STRING, " %s",
dn_organizational_unit);
- snprintf (menu->dialog[row++], SHORT_STRING, " %s %s %s", dn_locality,
+ snprintf (menu->dialog[row++], STRING, " %s %s %s", dn_locality,
dn_province, dn_country);
row++;
- snprintf (menu->dialog[row++], SHORT_STRING,
+ snprintf (menu->dialog[row++], STRING,
_("This certificate is valid"));
t = gnutls_x509_crt_get_activation_time (cert);
- snprintf (menu->dialog[row++], SHORT_STRING, _(" from %s"),
+ snprintf (menu->dialog[row++], STRING, _(" from %s"),
tls_make_date (t, datestr, 30));
t = gnutls_x509_crt_get_expiration_time (cert);
- snprintf (menu->dialog[row++], SHORT_STRING, _(" to %s"),
+ snprintf (menu->dialog[row++], STRING, _(" to %s"),
tls_make_date (t, datestr, 30));
fpbuf[0] = '\0';
tls_fingerprint (GNUTLS_DIG_SHA, fpbuf, sizeof (fpbuf), &cert_list[0]);
- snprintf (menu->dialog[row++], SHORT_STRING, _("SHA1 Fingerprint: %s"),
+ snprintf (menu->dialog[row++], STRING, _("SHA1 Fingerprint: %s"),
fpbuf);
fpbuf[0] = '\0';
tls_fingerprint (GNUTLS_DIG_MD5, fpbuf, sizeof (fpbuf), &cert_list[0]);
- snprintf (menu->dialog[row++], SHORT_STRING, _("MD5 Fingerprint: %s"),
+ snprintf (menu->dialog[row++], STRING, _("MD5 Fingerprint: %s"),
fpbuf);
if (certerr_notyetvalid) {
row++;
- m_strcpy(menu->dialog[row], SHORT_STRING,
+ m_strcpy(menu->dialog[row], STRING,
_("WARNING: Server certificate is not yet valid"));
}
if (certerr_expired) {
row++;
- m_strcpy(menu->dialog[row], SHORT_STRING,
+ m_strcpy(menu->dialog[row], STRING,
_("WARNING: Server certificate has expired"));
}
if (certerr_revoked) {
row++;
- m_strcpy(menu->dialog[row], SHORT_STRING,
+ m_strcpy(menu->dialog[row], STRING,
_("WARNING: Server certificate has been revoked"));
}
if (certerr_hostname) {
row++;
- m_strcpy(menu->dialog[row], SHORT_STRING,
+ m_strcpy(menu->dialog[row], STRING,
_("WARNING: Server hostname does not match certificate"));
}
if (certerr_signernotca) {
row++;
- m_strcpy(menu->dialog[row], SHORT_STRING,
+ m_strcpy(menu->dialog[row], STRING,
_("WARNING: Signer of server certificate is not a CA"));
}
int i;
#if defined (USE_SLANG_CURSES)
- char fgc[SHORT_STRING], bgc[SHORT_STRING];
+ char fgc[STRING], bgc[STRING];
#endif
/* check to see if this color is already allocated to save space */
}
void mutt_progress_bar (progress_t* progress, long pos) {
- char posstr[SHORT_STRING];
+ char posstr[STRING];
if (!pos) {
if (!NetInc)
*/
int mutt_index_menu (void)
{
- char buf[LONG_STRING], helpstr[SHORT_STRING];
+ char buf[LONG_STRING], helpstr[STRING];
int flags;
int op = OP_NULL;
int done = 0; /* controls when to exit the "event" loop */
const char* msg;
long pos;
long size;
- char sizestr[SHORT_STRING];
+ char sizestr[STRING];
} progress_t;
void mutt_progress_bar (progress_t* progress, long pos);
struct hdr_format_info *hfi = (struct hdr_format_info *) data;
HEADER *hdr, *htmp;
CONTEXT *ctx;
- char fmt[SHORT_STRING], buf2[SHORT_STRING], ch, *p;
+ char fmt[STRING], buf2[STRING], ch, *p;
int do_locales, i;
int optional = (flags & M_FORMAT_OPTIONAL);
int threads = ((Sort & SORT_MASK) == SORT_THREADS);
int j = 0;
for (i = 0; hdr->env->from && hdr->env->from->personal &&
- hdr->env->from->personal[i] && j < SHORT_STRING - 1; i++) {
+ hdr->env->from->personal[i] && j < STRING - 1; i++) {
if (isalpha ((int) hdr->env->from->personal[i])) {
if (!iflag) {
buf2[j++] = hdr->env->from->personal[i];
void menu_jump (MUTTMENU * menu)
{
int n;
- char buf[SHORT_STRING];
+ char buf[STRING];
if (menu->max) {
mutt_ungetch (LastKey, 0);
int r;
int searchDir;
regex_t re;
- char buf[SHORT_STRING];
+ char buf[STRING];
if (op != OP_SEARCH_NEXT && op != OP_SEARCH_OPPOSITE) {
m_strcpy(buf, sizeof(buf), NONULL(menu->searchBuf));
static void query_entry (char *s, ssize_t slen, MUTTMENU * m, int num)
{
ENTRY *table = (ENTRY *) m->data;
- char buf2[SHORT_STRING], buf[SHORT_STRING] = "";
+ char buf2[STRING], buf[STRING] = "";
/* need a query format ... hard coded constants are not good */
while (FirstColumn + SecondColumn > 70) {
QUERY *queryp = NULL;
int i, done = 0;
int op;
- char helpstr[SHORT_STRING];
+ char helpstr[STRING];
char title[STRING];
snprintf (title, sizeof (title), _("Query")); /* FIXME */
const char* src, const char* fmt,
const char* ifstr, const char* elstr,
unsigned long data, format_flag flags) {
- char tmp[SHORT_STRING];
+ char tmp[STRING];
BUFFY* b = Incoming.arr[data];
int opt = flags & M_FORMAT_OPTIONAL;
int c = Context && !m_strcmp(Context->path, b->path);
static int make_sidebar_entry (char* sbox, int idx, ssize_t len)
{
int shortened = 0, lencnt = 0;
- char no[SHORT_STRING], entry[SHORT_STRING];
+ char no[STRING], entry[STRING];
int l = m_strlen(ImapHomeNamespace);
int l_m = m_strlen(Maildir);
i = 0,line;
BUFFY *tmp;
ssize_t delim_len = m_strlen(SidebarDelim);
- char blank[SHORT_STRING];
+ char blank[STRING];
known_lines=last_line-first_line;
const char *elsestring,
unsigned long data, format_flag flags)
{
- char fmt[SHORT_STRING], tmp[SHORT_STRING];
+ char fmt[STRING], tmp[STRING];
const char *cp, *p;
int count, optional = (flags & M_FORMAT_OPTIONAL);
MUTTMENU *menu = (MUTTMENU *) data;
int mutt_sasl_interact (sasl_interact_t * interaction)
{
- char prompt[SHORT_STRING];
- char resp[SHORT_STRING];
+ char prompt[STRING];
+ char resp[STRING];
while (interaction->id != SASL_CB_LIST_END) {
snprintf (prompt, sizeof (prompt), "%s: ", interaction->prompt);
unsigned long data, /* callback data */
format_flag flags)
{ /* callback flags */
- char prefix[SHORT_STRING], buf[LONG_STRING], *cp, *wptr = dest, ch;
- char ifstring[SHORT_STRING], elsestring[SHORT_STRING];
+ char prefix[STRING], buf[LONG_STRING], *cp, *wptr = dest, ch;
+ char ifstring[STRING], elsestring[STRING];
ssize_t wlen, wid, count, col, len;
prefix[0] = '\0';
const char *ifstring, const char *elsestring,
unsigned long data, format_flag flags)
{
- char fn[SHORT_STRING], tmp[SHORT_STRING];
+ char fn[STRING], tmp[STRING];
switch (op) {
case 's':
static int nntp_reconnect (NNTP_SERVER * serv)
{
- char buf[SHORT_STRING];
+ char buf[STRING];
mutt_socket_close (serv->conn);
/* Load list of all newsgroups from active */
int nntp_get_active (NNTP_SERVER * serv)
{
- char msg[SHORT_STRING];
+ char msg[STRING];
NNTP_DATA nntp_data;
string_list_t *tmp;
{
static char searchbuf[STRING];
char buffer[LONG_STRING];
- char helpstr[SHORT_STRING * 2];
- char tmphelp[SHORT_STRING * 2];
+ char helpstr[STRING * 2];
+ char tmphelp[STRING * 2];
int maxLine, lastLine = 0;
struct line_t *lineInfo;
struct q_class_t *QuoteList = NULL;
void pop_fetch_mail (void)
{
char buffer[LONG_STRING];
- char msgbuf[SHORT_STRING];
+ char msgbuf[STRING];
char *url, *p;
int i, delanswer, last = 0, msgs, bytes, rset = 0;
pop_query_status ret;
{
MUTTMENU *menu;
int i, done = 0, r = -1;
- char helpstr[SHORT_STRING];
+ char helpstr[STRING];
short orig_sort;
menu = mutt_new_menu ();
unsigned long data, format_flag flags)
{
char fmt[16];
- char tmp[SHORT_STRING];
- char charset[SHORT_STRING];
+ char tmp[STRING];
+ char charset[STRING];
ATTACHPTR *aptr = (ATTACHPTR *) data;
int optional = (flags & M_FORMAT_OPTIONAL);
ssize_t l;
}
if (mutt_is_message_type(aptr->content) && MsgFmt && aptr->content->hdr)
{
- char s[SHORT_STRING];
+ char s[STRING];
_mutt_make_string (s, sizeof (s), MsgFmt, NULL, aptr->content->hdr,
M_FORMAT_FORCESUBJ | M_FORMAT_MAKEPRINT |
void mutt_pipe_attachment_list (FILE * fp, int tag, BODY * top, int afilter)
{
STATE state;
- char buf[SHORT_STRING];
+ char buf[STRING];
pid_t thepid;
if (fp)
int secured = 0;
int need_secured = 0;
- char helpstr[SHORT_STRING];
+ char helpstr[STRING];
MUTTMENU *menu;
BODY *cur = NULL;
MESSAGE *msg;
HEADER * hdr, FILE * ofp, char *_prefix)
{
int chflags = CH_DECODE;
- char prefix[SHORT_STRING];
+ char prefix[STRING];
if (option (OPTWEED))
chflags |= CH_WEED | CH_REORDER;
char tmpbody[_POSIX_PATH_MAX];
FILE *tmpfp;
- char prefix[SHORT_STRING];
+ char prefix[STRING];
int rc;
#ifdef USE_NNTP
struct coord *coords = NULL;
MUTTMENU *menu;
- char helpstr[SHORT_STRING];
+ char helpstr[STRING];
short loop = 1;
int op;
int mutt_write_mime_body (BODY * a, FILE * f)
{
const char *p;
- char boundary[SHORT_STRING];
- char send_charset[SHORT_STRING];
+ char boundary[STRING];
+ char send_charset[STRING];
FILE *fpin;
BODY *t;
fgetconv_t *fc;
/* determine which Content-Transfer-Encoding to use */
static void mutt_set_encoding (BODY * b, CONTENT * info)
{
- char send_charset[SHORT_STRING];
+ char send_charset[STRING];
if (b->type == TYPETEXT) {
char *chsname =
static char *mutt_gen_msgid (void)
{
- char buf[SHORT_STRING];
- char localpart[SHORT_STRING];
+ char buf[STRING];
+ char localpart[STRING];
const char *fqdn;
if (!(fqdn = mutt_fqdn(0)))
{
int i, ret = 0;
FILE *f;
- char date[SHORT_STRING], tempfile[_POSIX_PATH_MAX];
+ char date[STRING], tempfile[_POSIX_PATH_MAX];
MESSAGE *msg = NULL;
if (!h) {
Quotebuf[i++] = c;
Quotebuf[i] = '\0';
if (i == sizeof (Quotebuf) - 1 || c == '\n') {
- char buf[2 * SHORT_STRING];
+ char buf[2 * STRING];
int j = 0, offset = 0;
regmatch_t pmatch[1];