* @retval 0 Selection made
* @retval -1 Aborted
*/
-int mutt_get_field_unbuffered(char *msg, char *buf, size_t buflen, int flags)
+int mutt_get_field_unbuffered(const char *msg, char *buf, size_t buflen, int flags)
{
int rc;
void mutt_getch_timeout(int delay);
struct Event mutt_getch(void);
int mutt_get_field_full(const char *field, char *buf, size_t buflen, int complete, bool multiple, char ***files, int *numfiles);
-int mutt_get_field_unbuffered(char *msg, char *buf, size_t buflen, int flags);
+int mutt_get_field_unbuffered(const char *msg, char *buf, size_t buflen, int flags);
int mutt_multi_choice(const char *prompt, const char *letters);
void mutt_need_hard_redraw(void);
void mutt_paddstr(int n, const char *s);
* @param s Language string
* @param ct Body of the email
*/
-static void parse_content_language(char *s, struct Body *ct)
+static void parse_content_language(const char *s, struct Body *ct)
{
if (!s || !ct)
return;
*
* e.g. parse a string "inline" and set #DISP_INLINE.
*/
-void mutt_parse_content_type(char *s, struct Body *ct)
+void mutt_parse_content_type(const char *s, struct Body *ct)
{
FREE(&ct->subtype);
mutt_param_free(&ct->parameter);
char * mutt_extract_message_id(const char *s, const char **saveptr);
bool mutt_is_message_type(int type, const char *subtype);
bool mutt_matches_ignore(const char *s);
-void mutt_parse_content_type(char *s, struct Body *ct);
+void mutt_parse_content_type(const char *s, struct Body *ct);
struct Body * mutt_parse_multipart(FILE *fp, const char *boundary, LOFF_T end_off, bool digest);
void mutt_parse_part(FILE *fp, struct Body *b);
struct Body * mutt_read_mime_header(FILE *fp, bool digest);
* Return a new allocated string containing tags separated by space
*/
static char *driver_tags_getter(struct TagHead *head, bool show_hidden,
- bool show_transformed, char *filter)
+ bool show_transformed, const char *filter)
{
if (!head)
return NULL;
* Return a new allocated string containing all tags separated by space even
* the hiddens.
*/
-char *driver_tags_get_transformed_for(char *name, struct TagHead *head)
+char *driver_tags_get_transformed_for(const char *name, struct TagHead *head)
{
return driver_tags_getter(head, true, true, name);
}
void driver_tags_free(struct TagHead *head);
char *driver_tags_get(struct TagHead *head);
char *driver_tags_get_transformed(struct TagHead *head);
-char *driver_tags_get_transformed_for(char *name, struct TagHead *head);
+char *driver_tags_get_transformed_for(const char *name, struct TagHead *head);
char *driver_tags_get_with_hidden(struct TagHead *head);
bool driver_tags_replace(struct TagHead *head, char *tags);
* @retval ptr Best performing charset
* @retval NULL None could be found
*/
-char *mutt_ch_choose(const char *fromcode, const char *charsets, char *u,
+char *mutt_ch_choose(const char *fromcode, const char *charsets, const char *u,
size_t ulen, char **d, size_t *dlen)
{
char *e = NULL, *tocode = NULL;
const char * mutt_ch_charset_lookup(const char *chs);
int mutt_ch_check(const char *s, size_t slen, const char *from, const char *to);
bool mutt_ch_check_charset(const char *cs, bool strict);
-char * mutt_ch_choose(const char *fromcode, const char *charsets, char *u, size_t ulen, char **d, size_t *dlen);
+char * mutt_ch_choose(const char *fromcode, const char *charsets, const char *u, size_t ulen, char **d, size_t *dlen);
bool mutt_ch_chscmp(const char *cs1, const char *cs2);
int mutt_ch_convert_nonmime_string(char **ps);
int mutt_ch_convert_string(char **ps, const char *from, const char *to, int flags);
* @retval num Unix time
* @retval 0 Error
*/
-time_t mutt_date_parse_imap(char *s)
+time_t mutt_date_parse_imap(const char *s)
{
struct tm t;
time_t tz;
int mutt_date_make_tls(char *buf, size_t buflen, time_t timestamp);
void mutt_date_normalize_time(struct tm *tm);
time_t mutt_date_parse_date(const char *s, struct Tz *tz_out);
-time_t mutt_date_parse_imap(char *s);
+time_t mutt_date_parse_imap(const char *s);
#endif /* MUTT_LIB_DATE_H */
* @note on access(2) use No dangling symlink problems here due to
* mutt_file_fopen().
*/
-int mutt_file_rename(char *oldfile, char *newfile)
+int mutt_file_rename(const char *oldfile, const char *newfile)
{
FILE *ofp = NULL, *nfp = NULL;
size_t mutt_file_quote_filename(const char *filename, char *buf, size_t buflen);
char * mutt_file_read_keyword(const char *file, char *buf, size_t buflen);
char * mutt_file_read_line(char *line, size_t *size, FILE *fp, int *line_num, int flags);
-int mutt_file_rename(char *oldfile, char *newfile);
+int mutt_file_rename(const char *oldfile, const char *newfile);
int mutt_file_rmtree(const char *path);
int mutt_file_safe_rename(const char *src, const char *target);
void mutt_file_sanitize_filename(char *f, bool slash);
* @param[out] matches All the matching lines
* @retval num Matches found
*/
-int mutt_hist_search(char *search_buf, enum HistoryClass hclass, char **matches)
+int mutt_hist_search(const char *search_buf, enum HistoryClass hclass, char **matches)
{
struct History *h = get_history(hclass);
int match_count = 0, cur;
void mutt_hist_read_file(void);
void mutt_hist_reset_state(enum HistoryClass hclass);
void mutt_hist_save_scratch(enum HistoryClass hclass, const char *str);
-int mutt_hist_search(char *search_buf, enum HistoryClass hclass, char **matches);
+int mutt_hist_search(const char *search_buf, enum HistoryClass hclass, char **matches);
#endif /* MUTT_LIB_HISTORY_H */
* %n is the integer number of sub-parts in the multipart
* %F is "content-type filename" repeated for each sub-part
*/
-int rfc1524_expand_command(struct Body *a, char *filename, char *type, char *command, int clen)
+int rfc1524_expand_command(struct Body *a, const char *filename, const char *type, char *command, int clen)
{
int x = 0, y = 0;
int needspipe = true;
* for a "%s". If none is found, the nametemplate is used as the template for
* newfile. The first path component of the nametemplate and oldfile are ignored.
*/
-int rfc1524_expand_filename(char *nametemplate, char *oldfile, char *newfile, size_t nflen)
+int rfc1524_expand_filename(const char *nametemplate, const char *oldfile, char *newfile, size_t nflen)
{
int i, j, k, ps;
char *s = NULL;
struct Rfc1524MailcapEntry *rfc1524_new_entry(void);
void rfc1524_free_entry(struct Rfc1524MailcapEntry **entry);
-int rfc1524_expand_command(struct Body *a, char *filename, char *type, char *command, int clen);
-int rfc1524_expand_filename(char *nametemplate, char *oldfile, char *newfile, size_t nflen);
+int rfc1524_expand_command(struct Body *a, const char *filename, const char *type, char *command, int clen);
+int rfc1524_expand_filename(const char *nametemplate, const char *oldfile, char *newfile, size_t nflen);
int rfc1524_mailcap_lookup(struct Body *a, char *type, struct Rfc1524MailcapEntry *entry, int opt);
#endif /* MUTT_RFC1524_H */
* @retval -1 Message was aborted or an error occurred
* @retval 1 Message was postponed
*/
-int ci_send_message(int flags, struct Email *msg, char *tempfile,
+int ci_send_message(int flags, struct Email *msg, const char *tempfile,
struct Context *ctx, struct Email *cur)
{
char buf[LONG_STRING];
#define SEND_TO_SENDER (1 << 12)
#define SEND_NEWS (1 << 13)
-int ci_send_message(int flags, struct Email *msg, char *tempfile, struct Context *ctx, struct Email *cur);
+int ci_send_message(int flags, struct Email *msg, const char *tempfile, struct Context *ctx, struct Email *cur);
void mutt_add_to_reference_headers(struct Envelope *env, struct Envelope *curenv);
struct Address *mutt_default_from(void);
void mutt_encode_descriptions(struct Body *b, bool recurse);