Keep track when processing files. More...
#include <stddef.h>#include <stdint.h>#include <stdio.h>
Include dependency graph for state.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | State |
| Keep track when processing files. More... | |
Macros | |
| #define | STATE_NO_FLAGS 0 |
| No flags are set. | |
| #define | STATE_DISPLAY (1 << 0) |
| Output is displayed to the user. | |
| #define | STATE_VERIFY (1 << 1) |
| Perform signature verification. | |
| #define | STATE_PENDINGPREFIX (1 << 2) |
| Prefix to write, but character must follow. | |
| #define | STATE_WEED (1 << 3) |
| Weed headers even when not in display mode. | |
| #define | STATE_CHARCONV (1 << 4) |
| Do character set conversions. | |
| #define | STATE_PRINTING (1 << 5) |
| Are we printing? - STATE_DISPLAY "light". | |
| #define | STATE_REPLYING (1 << 6) |
| Are we replying? | |
| #define | STATE_FIRSTDONE (1 << 7) |
| The first attachment has been done. | |
| #define | STATE_DISPLAY_ATTACH (1 << 8) |
| We are displaying an attachment. | |
| #define | STATE_PAGER (1 << 9) |
| Output will be displayed in the Pager. | |
| #define | state_set_prefix(state) |
| #define | state_reset_prefix(state) |
| #define | state_puts(STATE, STR) |
| #define | state_putc(STATE, STR) |
Typedefs | |
| typedef uint16_t | StateFlags |
| Flags for State->flags, e.g. STATE_DISPLAY. | |
Functions | |
| 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. | |
| void | state_mark_protected_header (struct State *state) |
| Write a unique marker around protected headers. | |
| void | state_prefix_put (struct State *state, const char *buf, size_t buflen) |
| Write a prefixed fixed-string to the State. | |
| void | state_prefix_putc (struct State *state, char c) |
| Write a prefixed character to the state. | |
| int | state_printf (struct State *state, const char *fmt,...) __attribute__((__format__(__printf__ |
| int int | state_putws (struct State *state, const wchar_t *ws) |
| Write a wide string to the state. | |
| const char * | state_attachment_marker (void) |
| Get a unique (per-run) ANSI string to mark PGP messages in an email. | |
| const char * | state_protected_header_marker (void) |
| Get a unique (per-run) ANSI string to mark protected headers in an email. | |
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 STATE_DISPLAY (1 << 0) |
| #define STATE_VERIFY (1 << 1) |
| #define STATE_PENDINGPREFIX (1 << 2) |
| #define STATE_WEED (1 << 3) |
| #define STATE_CHARCONV (1 << 4) |
| #define STATE_PRINTING (1 << 5) |
| #define STATE_FIRSTDONE (1 << 7) |
| #define STATE_DISPLAY_ATTACH (1 << 8) |
| #define STATE_PAGER (1 << 9) |
| #define state_set_prefix | ( | state | ) |
| #define state_reset_prefix | ( | state | ) |
| #define state_puts | ( | STATE, | |
| STR ) |
| #define state_putc | ( | STATE, | |
| STR ) |
| typedef uint16_t StateFlags |
Flags for State->flags, e.g. STATE_DISPLAY.
| void state_attach_puts | ( | struct State * | state, |
| const char * | t ) |
Write a string to the state.
| state | State to write to |
| t | Text to write |
Definition at line 104 of file state.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void state_mark_attach | ( | struct State * | state | ) |
Write a unique marker around content.
| state | State to write to |
Definition at line 73 of file state.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void state_mark_protected_header | ( | struct State * | state | ) |
Write a unique marker around protected headers.
| state | State to write to |
Definition at line 88 of file state.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void state_prefix_put | ( | struct State * | state, |
| const char * | buf, | ||
| size_t | buflen ) |
Write a prefixed fixed-string to the State.
| state | State to write to |
| buf | String to write |
| buflen | Length of string |
Definition at line 205 of file state.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void state_prefix_putc | ( | struct State * | state, |
| char | c ) |
Write a prefixed character to the state.
| state | State to write to |
| c | Character to write |
Definition at line 165 of file state.c.
Here is the caller graph for this function:| int state_printf | ( | struct State * | state, |
| const char * | fmt, | ||
| ... ) |
Here is the call graph for this function:| int int state_putws | ( | struct State * | state, |
| const wchar_t * | ws ) |
Write a wide string to the state.
| state | State to write to |
| ws | Wide string to write |
| 0 | Success |
| -1 | Error |
Definition at line 147 of file state.c.
Here is the call graph for this function:
Here is the caller graph for this function:| const char * state_attachment_marker | ( | void | ) |
Get a unique (per-run) ANSI string to mark PGP messages in an email.
| ptr | Marker |
Definition at line 45 of file state.c.
Here is the call graph for this function:
Here is the caller graph for this function:| 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 59 of file state.c.
Here is the call graph for this function:
Here is the caller graph for this function: