struct KeyEvent ch;
SET_COLOR(MT_COLOR_PROMPT);
- mutt_window_mvaddstr(MuttMessageWindow, 0, 0, (char *) prompt);
+ mutt_window_mvaddstr(MuttMessageWindow, 0, 0, prompt);
addstr(_(" ('?' for list): "));
NORMAL_COLOR;
if (mutt_buffer_len(fname))
* @param head List to receive the references
* @param s String to parse
*/
-static void parse_references(struct ListHead *head, char *s)
+static void parse_references(struct ListHead *head, const char *s)
{
char *m = NULL;
const char *sp = NULL;
if (optional && ((op == '[') || (op == '(')))
{
- char *is = NULL;
now = time(NULL);
struct tm tm = mutt_date_localtime(now);
now -= (op == '(') ? e->received : e->date_sent;
- is = (char *) prec;
+ char *is = (char *) prec;
bool invert = false;
if (*is == '>')
{
static size_t gen_string_hash(union HashKey key, size_t n)
{
size_t h = 0;
- unsigned char *s = (unsigned char *) key.strkey;
+ const unsigned char *s = (const unsigned char *) key.strkey;
while (*s)
h += ((h << 7) + *s++);
static size_t gen_case_string_hash(union HashKey key, size_t n)
{
size_t h = 0;
- unsigned char *s = (unsigned char *) key.strkey;
+ const unsigned char *s = (const unsigned char *) key.strkey;
while (*s)
h += ((h << 7) + tolower(*s++));
{
struct QClass *q_list = *quote_list;
struct QClass *qc = NULL, *tmp = NULL, *ptr = NULL, *save = NULL;
- char *tail_qptr = NULL;
+ const char *tail_qptr = NULL;
int offset, tail_lng;
int index = -1;
q_list = q_list->down;
tail_lng = length - offset;
- tail_qptr = (char *) qptr + offset;
+ tail_qptr = qptr + offset;
while (q_list)
{
q_list = q_list->down;
tail_lng = length - offset;
- tail_qptr = (char *) qptr + offset;
+ tail_qptr = qptr + offset;
continue;
}
static int get_quote_level(const char *line)
{
int quoted = 0;
- char *p = (char *) line;
+ const char *p = line;
while (p && (*p == '>'))
{
* in.
*/
static size_t convert_file_to(FILE *fp, const char *fromcode, int ncodes,
- const char **tocodes, int *tocode, struct Content *info)
+ char const *const *tocodes, int *tocode, struct Content *info)
{
char bufi[256], bufu[512], bufo[4 * sizeof(bufi)];
size_t ret;
continue;
fcode = mutt_str_substr_dup(c, c1);
- ret = convert_file_to(fp, fcode, ncodes, (const char **) tcode, &cn, info);
+ ret = convert_file_to(fp, fcode, ncodes, (char const *const *) tcode, &cn, info);
if (ret != (size_t)(-1))
{
*fromcode = fcode;
else
{
/* There is only one fromcode */
- ret = convert_file_to(fp, fromcodes, ncodes, (const char **) tcode, &cn, info);
+ ret = convert_file_to(fp, fromcodes, ncodes, (char const *const *) tcode, &cn, info);
if (ret != (size_t)(-1))
{
*tocode = tcode[cn];
int mutt_write_one_header(FILE *fp, const char *tag, const char *value,
const char *pfx, int wraplen, CopyHeaderFlags chflags)
{
- char *p = (char *) value;
char *last = NULL, *line = NULL;
int max = 0, w, rc = -1;
int pfxw = mutt_strwidth(pfx);
}
}
- p = v;
+ char *p = v;
last = v;
line = v;
while (p && *p)