Keep track when processing files. More...
#include "config.h"
#include <inttypes.h>
#include <limits.h>
#include <stdarg.h>
#include <stdio.h>
#include <wchar.h>
#include "state.h"
#include "charset.h"
#include "date.h"
#include "random.h"
Go to the source code of this file.
Functions | |
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. | |
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_attach_puts (struct State *state, const char *t) |
Write a string to the state. | |
static int | state_putwc (struct State *state, wchar_t wc) |
Write a wide character to the state. | |
int | state_putws (struct State *state, const wchar_t *ws) |
Write a wide 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,...) |
Write a formatted string to the State. | |
void | state_prefix_put (struct State *state, const char *buf, size_t buflen) |
Write a prefixed fixed-string to the State. | |
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.c.
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.
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.
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.
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.
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.
|
static |
Write a wide character to the state.
state | State to write to |
wc | Wide character to write |
0 | Success |
-1 | Error |
Definition at line 127 of file state.c.
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.
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.
int state_printf | ( | struct State * | state, |
const char * | fmt, | ||
... | |||
) |
Write a formatted string to the State.
state | State to write to |
fmt | printf format string |
... | Arguments to formatting string |
num | Number of characters written |
Definition at line 187 of file state.c.
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.