Keep track when processing files. More...
#include <stdint.h>
#include <stdio.h>
#include <wchar.h>
Go to the source code of this file.
Data Structures | |
struct | State |
Keep track when processing files. More... | |
Macros | |
#define | MUTT_STATE_NO_FLAGS 0 |
No flags are set. More... | |
#define | MUTT_DISPLAY (1 << 0) |
Output is displayed to the user. More... | |
#define | MUTT_VERIFY (1 << 1) |
Perform signature verification. More... | |
#define | MUTT_PENDINGPREFIX (1 << 2) |
Prefix to write, but character must follow. More... | |
#define | MUTT_WEED (1 << 3) |
Weed headers even when not in display mode. More... | |
#define | MUTT_CHARCONV (1 << 4) |
Do character set conversions. More... | |
#define | MUTT_PRINTING (1 << 5) |
Are we printing? - MUTT_DISPLAY "light". More... | |
#define | MUTT_REPLYING (1 << 6) |
Are we replying? More... | |
#define | MUTT_FIRSTDONE (1 << 7) |
The first attachment has been done. More... | |
#define | MUTT_DISPLAY_ATTACH (1 << 8) |
We are displaying an attachment. More... | |
#define | state_set_prefix(state) ((state)->flags |= MUTT_PENDINGPREFIX) |
#define | state_reset_prefix(state) ((state)->flags &= ~MUTT_PENDINGPREFIX) |
#define | state_puts(STATE, STR) fputs(STR, (STATE)->fp_out) |
#define | state_putc(STATE, STR) fputc(STR, (STATE)->fp_out) |
Typedefs | |
typedef uint16_t | StateFlags |
Flags for State->flags, e.g. MUTT_DISPLAY. More... | |
Functions | |
void | state_attach_puts (struct State *s, const char *t) |
Write a string to the state. More... | |
void | state_mark_attach (struct State *s) |
Write a unique marker around content. More... | |
void | state_mark_protected_header (struct State *s) |
Write a unique marker around protected headers. More... | |
void | state_prefix_put (struct State *s, const char *buf, size_t buflen) |
Write a prefixed fixed-string to the State. More... | |
void | state_prefix_putc (struct State *s, char c) |
Write a prefixed character to the state. More... | |
int | state_printf (struct State *s, const char *fmt,...) |
Write a formatted string to the State. More... | |
int | state_putws (struct State *s, const wchar_t *ws) |
Write a wide string to the state. More... | |
const char * | state_attachment_marker (void) |
Get a unique (per-run) ANSI string to mark PGP messages in an email. More... | |
const char * | state_protected_header_marker (void) |
Get a unique (per-run) ANSI string to mark protected headers in an email. More... | |
Keep track when processing files.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file state.h.
#define MUTT_DISPLAY (1 << 0) |
#define MUTT_PENDINGPREFIX (1 << 2) |
#define MUTT_WEED (1 << 3) |
#define MUTT_PRINTING (1 << 5) |
#define MUTT_FIRSTDONE (1 << 7) |
#define MUTT_DISPLAY_ATTACH (1 << 8) |
#define state_set_prefix | ( | state | ) | ((state)->flags |= MUTT_PENDINGPREFIX) |
#define state_reset_prefix | ( | state | ) | ((state)->flags &= ~MUTT_PENDINGPREFIX) |
#define state_puts | ( | STATE, | |
STR | |||
) | fputs(STR, (STATE)->fp_out) |
#define state_putc | ( | STATE, | |
STR | |||
) | fputc(STR, (STATE)->fp_out) |
typedef uint16_t StateFlags |
Flags for State->flags, e.g. MUTT_DISPLAY.
void state_attach_puts | ( | struct State * | s, |
const char * | t | ||
) |
Write a string to the state.
s | State to write to |
t | Text to write |
Definition at line 100 of file state.c.
void state_mark_attach | ( | struct State * | s | ) |
Write a unique marker around content.
s | State to write to |
Definition at line 71 of file state.c.
void state_mark_protected_header | ( | struct State * | s | ) |
Write a unique marker around protected headers.
s | State to write to |
Definition at line 86 of file state.c.
void state_prefix_put | ( | struct State * | s, |
const char * | buf, | ||
size_t | buflen | ||
) |
Write a prefixed fixed-string to the State.
s | State to write to |
buf | String to write |
buflen | Length of string |
Definition at line 201 of file state.c.
void state_prefix_putc | ( | struct State * | s, |
char | c | ||
) |
Write a prefixed character to the state.
s | State to write to |
c | Character to write |
Definition at line 161 of file state.c.
int state_printf | ( | struct State * | s, |
const char * | fmt, | ||
... | |||
) |
int state_putws | ( | struct State * | s, |
const wchar_t * | ws | ||
) |
Write a wide string to the state.
s | State to write to |
ws | Wide string to write |
0 | Success |
-1 | Error |
Definition at line 143 of file state.c.
const char* state_attachment_marker | ( | void | ) |
const char* state_protected_header_marker | ( | void | ) |
Get a unique (per-run) ANSI string to mark protected headers in an email.
ptr | Marker |
Definition at line 57 of file state.c.