{N_("Chdir"), OP_CHANGE_DIRECTORY},
{N_("Mask"), OP_ENTER_MASK},
{N_("Help"), OP_HELP},
- {NULL}
+ {NULL, OP_NULL}
};
#ifdef USE_NNTP
{N_("Catchup"), OP_CATCHUP},
{N_("Mask"), OP_ENTER_MASK},
{N_("Help"), OP_HELP},
- {NULL}
+ {NULL, OP_NULL}
};
#endif
const char *elsestring,
unsigned long data, format_flag flags)
{
- char fn[SHORT_STRING], tmp[SHORT_STRING], permission[11];
- char date[16], *t_fmt;
+ char fn[SHORT_STRING], tmp[SHORT_STRING], permission[11], date[16];
+ const char *t_fmt;
time_t tnow;
FOLDER *folder = (FOLDER *) data;
struct passwd *pw;
case 'f':
{
- char *s;
+ const char *s;
#ifdef USE_IMAP
if (folder->ff->imap)
"latin6", "iso-8859-10"}, /* this is not a bug */
{
"l6", "iso-8859-10"}, {
- "csISOLatin6" "iso-8859-10"}, {
+ "csISOLatin6", "iso-8859-10"}, {
"csKOI8r", "koi8-r"}, {
"MS_Kanji", "Shift_JIS"}, /* Note the underscore! */
{
return (iconv_t) (-1);
}
-size_t iconv (iconv_t cd, ICONV_CONST char **inbuf, size_t * inbytesleft,
+size_t iconv (iconv_t cd, const char **inbuf, size_t * inbytesleft,
char **outbuf, size_t * outbytesleft)
{
return 0;
* if you're supplying an outrepl, the target charset should be.
*/
-size_t mutt_iconv (iconv_t cd, ICONV_CONST char **inbuf, size_t * inbytesleft,
+size_t mutt_iconv (iconv_t cd, const char **inbuf, size_t * inbytesleft,
char **outbuf, size_t * outbytesleft,
- ICONV_CONST char **inrepls, const char *outrepl)
+ const char **inrepls, const char *outrepl)
{
size_t ret = 0, ret1;
- ICONV_CONST char *ib = *inbuf;
+ const char *ib = *inbuf;
size_t ibl = *inbytesleft;
char *ob = *outbuf;
size_t obl = *outbytesleft;
if (ibl && obl && errno == EILSEQ) {
if (inrepls) {
/* Try replacing the input */
- ICONV_CONST char **t;
+ const char **t;
for (t = inrepls; *t; t++) {
- ICONV_CONST char *ib1 = *t;
+ const char *ib1 = *t;
size_t ibl1 = str_len (*t);
char *ob1 = ob;
size_t obl1 = obl;
int flags)
{
iconv_t cd;
- ICONV_CONST char *repls[] = { "\357\277\275", "?", 0 };
+ const char *repls[] = { "\357\277\275", "?", 0 };
char *s = *ps;
if (!s || !*s)
if (to && from && (cd = mutt_iconv_open (to, from, flags)) != (iconv_t) - 1) {
int len;
- ICONV_CONST char *ib;
+ const char *ib;
char *buf, *ob;
size_t ibl, obl;
- ICONV_CONST char **inrepls = 0;
- char *outrepl = 0;
+ const char **inrepls = NULL;
+ const char *outrepl = NULL;
if (mutt_is_utf8 (to))
outrepl = "\357\277\275";
char *ob;
char *ib;
size_t ibl;
- ICONV_CONST char **inrepls;
+ const char **inrepls;
};
struct fgetconv_not {
{
struct fgetconv_s *fc;
iconv_t cd = (iconv_t) - 1;
- static ICONV_CONST char *repls[] = { "\357\277\275", "?", 0 };
+ static const char *repls[] = { "\357\277\275", "?", 0 };
if (from && to)
cd = mutt_iconv_open (to, from, flags);
if (fc->ibl) {
size_t obl = sizeof (fc->bufo);
- iconv (fc->cd, (ICONV_CONST char **) &fc->ib, &fc->ibl, &fc->ob, &obl);
+ iconv (fc->cd, (const char **) &fc->ib, &fc->ibl, &fc->ob, &obl);
if (fc->p < fc->ob)
return (unsigned char) *(fc->p)++;
}
if (fc->ibl) {
size_t obl = sizeof (fc->bufo);
- mutt_iconv (fc->cd, (ICONV_CONST char **) &fc->ib, &fc->ibl, &fc->ob,
+ mutt_iconv (fc->cd, (const char **) &fc->ib, &fc->ibl, &fc->ob,
&obl, fc->inrepls, 0);
if (fc->p < fc->ob)
return (unsigned char) *(fc->p)++;
mem_free (_fc);
}
-char *mutt_get_first_charset (const char *charset)
+const char *mutt_get_first_charset (const char *charset)
{
static char fcharset[SHORT_STRING];
const char *c, *c1;
return fcharset;
}
-static size_t convert_string (ICONV_CONST char *f, size_t flen,
+static size_t convert_string (const char *f, size_t flen,
const char *from, const char *to,
char **t, size_t * tlen)
{
#endif
#ifndef HAVE_ICONV
-#define ICONV_CONST const
iconv_t iconv_open (const char *, const char *);
-size_t iconv (iconv_t, ICONV_CONST char **, size_t *, char **, size_t *);
+size_t iconv (iconv_t, const char **, size_t *, char **, size_t *);
int iconv_close (iconv_t);
#endif
int mutt_convert_string (char **, const char *, const char *, int);
-char *mutt_get_first_charset (const char *);
+const char *mutt_get_first_charset (const char *);
int mutt_convert_nonmime_string (char **);
iconv_t mutt_iconv_open (const char *, const char *, int);
-size_t mutt_iconv (iconv_t, ICONV_CONST char **, size_t *, char **, size_t *,
- ICONV_CONST char **, const char *);
+size_t mutt_iconv (iconv_t, const char **, size_t *, char **, size_t *,
+ const char **, const char *);
typedef void *FGETCONV;
#ifdef USE_IMAP
/* we can use '/' as a delimiter, imap_complete rewrites it */
if (*s == '=' || *s == '+' || *s == '!') {
- if (*s == '!')
- p = NONULL (Spoolfile);
- else
- p = NONULL (Maildir);
-
- mutt_concat_path (imap_path, p, s + 1, sizeof (imap_path));
+ const char *q = NONULL(*s == '!' ? Spoolfile : Maildir);
+ mutt_concat_path (imap_path, q, s + 1, sizeof (imap_path));
}
else
strfcpy (imap_path, s, sizeof (imap_path));
if (_chs && (cd = mutt_iconv_open (_chs, "utf-8", 0)) != (iconv_t) - 1) {
int n = s - uid + 1; /* chars available in original buffer */
char *buf;
- ICONV_CONST char *ib;
+ const char *ib;
char *ob;
size_t ibl, obl;
outleft = freemem_size - sizeof (size_t);
if (iconv (domain->conv,
- (ICONV_CONST char **) &inptr, &inleft,
+ (const char **) &inptr, &inleft,
&outptr, &outleft)
!= (size_t) (-1))
{
static size_t wcrtomb_iconv (char *s, wchar_t wc, iconv_t cd)
{
char buf[MB_LEN_MAX];
- ICONV_CONST char *ib;
+ const char *ib;
char *ob;
size_t ibl, obl, r;
mbstate_t * ps, iconv_t cd)
{
static mbstate_t mbstate;
- ICONV_CONST char *ib, *ibmax;
+ const char *ib, *ibmax;
char *ob, *t;
size_t ibl, obl, k, r;
char bufi[8], bufo[6];
extern char RFC822Specials[];
-typedef size_t (*encoder_t) (char *, ICONV_CONST char *, size_t,
+typedef size_t (*encoder_t) (char *, const char *, size_t,
const char *);
-static size_t convert_string (ICONV_CONST char *f, size_t flen,
+static size_t convert_string (const char *f, size_t flen,
const char *from, const char *to,
char **t, size_t * tlen)
{
return tocode;
}
-static size_t b_encoder (char *s, ICONV_CONST char *d, size_t dlen,
+static size_t b_encoder (char *s, const char *d, size_t dlen,
const char *tocode)
{
char *s0 = s;
return s - s0;
}
-static size_t q_encoder (char *s, ICONV_CONST char *d, size_t dlen,
+static size_t q_encoder (char *s, const char *d, size_t dlen,
const char *tocode)
{
char hex[] = "0123456789ABCDEF";
* tocode, unless fromcode is 0, in which case the data is assumed to
* be already in tocode, which should be 8-bit and stateless.
*/
-static size_t try_block (ICONV_CONST char *d, size_t dlen,
+static size_t try_block (const char *d, size_t dlen,
const char *fromcode, const char *tocode,
encoder_t * encoder, size_t * wlen)
{
char buf1[ENCWORD_LEN_MAX - ENCWORD_LEN_MIN + 1];
iconv_t cd;
- ICONV_CONST char *ib;
+ const char *ib;
char *ob, *p;
size_t ibl, obl;
int count, len, len_b, len_q;
{
char buf1[ENCWORD_LEN_MAX - ENCWORD_LEN_MIN + 1];
iconv_t cd;
- ICONV_CONST char *ib;
+ const char *ib;
char *ob;
size_t ibl, obl, n1, n2;
* The input data is assumed to be a single line starting at column col;
* if col is non-zero, the preceding character was a space.
*/
-static int rfc2047_encode (ICONV_CONST char *d, size_t dlen, int col,
+static int rfc2047_encode (const char *d, size_t dlen, int col,
const char *fromcode, const char *charsets,
char **e, size_t * elen, char *specials)
{
#ifdef HAVE_ICONV
iconv_t cd1, *cd;
char bufi[256], bufu[512], bufo[4 * sizeof (bufi)];
- ICONV_CONST char *ib, *ub;
+ const char *ib, *ub;
char *ob;
size_t ibl, obl, ubl, ubl1, n, ret;
int i;
void mutt_convert_to_state (iconv_t cd, char *bufi, size_t * l, STATE * s)
{
char bufo[BUFO_SIZE];
- ICONV_CONST char *ib;
+ const char *ib;
char *ob;
size_t ibl, obl;