47 static char marker[256] = { 0 };
50 snprintf(marker,
sizeof(marker),
"\033]9;%" PRIu64
"\a",
mutt_rand64());
61 static char marker[256] = { 0 };
64 snprintf(marker,
sizeof(marker),
"\033]8;%lld\a", (
long long)
mutt_date_now());
75 if (!state || !state->
fp_out)
90 if (!state || !state->
fp_out)
106 if (!state || !state->
fp_out || !t)
114 if ((*t++ ==
'\n') && *t)
129 char mb[MB_LEN_MAX] = { 0 };
134 if (fputs(mb, state->
fp_out) == EOF)
149 const wchar_t *p = ws;
151 while (p && (*p != L
'\0'))
193 rc = vfprintf(state->
fp_out, fmt, ap);
214 fwrite(buf, buflen, 1, state->
fp_out);
Time and date handling routines.
Conversion between different character encodings.
#define ICONV_ILLEGAL_SEQ
Error value for iconv() - Illegal sequence.
time_t mutt_date_now(void)
Return the number of seconds since the Unix epoch.
void state_attach_puts(struct State *state, const char *t)
Write a string to the state.
void state_mark_attach(struct State *state)
Write a unique marker around content.
int state_printf(struct State *state, const char *fmt,...)
Write a formatted string to the State.
static int state_putwc(struct State *state, wchar_t wc)
Write a wide character to the state.
const char * state_attachment_marker(void)
Get a unique (per-run) ANSI string to mark PGP messages in an email.
void state_prefix_put(struct State *state, const char *buf, size_t buflen)
Write a prefixed fixed-string to the State.
void state_mark_protected_header(struct State *state)
Write a unique marker around protected headers.
int state_putws(struct State *state, const wchar_t *ws)
Write a wide string to the state.
const char * state_protected_header_marker(void)
Get a unique (per-run) ANSI string to mark protected headers in an email.
void state_prefix_putc(struct State *state, char c)
Write a prefixed character to the state.
Keep track when processing files.
#define STATE_PAGER
Output will be displayed in the Pager.
#define state_puts(STATE, STR)
#define state_set_prefix(state)
#define STATE_DISPLAY
Output is displayed to the user.
#define STATE_PENDINGPREFIX
Prefix to write, but character must follow.
#define state_reset_prefix(state)
#define state_putc(STATE, STR)
uint64_t mutt_rand64(void)
Create a 64-bit random number.
Random number/string functions.
Keep track when processing files.
StateFlags flags
Flags, e.g. STATE_DISPLAY.
FILE * fp_out
File to write to.
const char * prefix
String to add to the beginning of each output line.