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_set_prefix(state) |
| #define | state_reset_prefix(state) |
| #define | state_puts(STATE, STR) |
| #define | state_putc(STATE, STR) |
Typedefs | |
| typedef uint16_t | StateFlags |
Enumerations | |
| enum | StateFlag { STATE_NONE = 0 , STATE_DISPLAY = 1U << 0 , STATE_VERIFY = 1U << 1 , STATE_PENDINGPREFIX = 1U << 2 , STATE_WEED = 1U << 3 , STATE_CHARCONV = 1U << 4 , STATE_PRINTING = 1U << 5 , STATE_REPLYING = 1U << 6 , STATE_FIRSTDONE = 1U << 7 , STATE_DISPLAY_ATTACH = 1U << 8 , STATE_PAGER = 1U << 9 } |
| Flags for State->flags. More... | |
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_set_prefix | ( | state | ) |
| #define state_reset_prefix | ( | state | ) |
| #define state_puts | ( | STATE, | |
| STR ) |
| #define state_putc | ( | STATE, | |
| STR ) |
| typedef uint16_t StateFlags |
| enum StateFlag |
Flags for State->flags.
Definition at line 34 of file state.h.
| 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 211 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 168 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: