size_t alloclen;
};
+extern struct field free_field;
+
/* m_getfld2() states */
enum state {
LENERR2 = -2, /* Line too long */
static size_t copyname(char *, char *);
static bool is_separator(char *);
+struct field free_field = { "\0", 0, NULL, 0, 0 };
+
/*
** FLD2: We read a (complete) header field
nchars = getline(&tmpline, &len, msg);
if (nchars < 1) {
free(f->value);
- *f = (struct field) { "\0", 0, NULL, 0, 0 };
+ *f = free_field;
if (feof(msg)) {
return FILEEOF2;
} else {
return ret;
case BODY2:
- *f->name = '\0';
- f->namelen = 0;
+ free(f->value);
+ *f = free_field;
nchars = getline(&tmpline, &len, msg);
if (nchars < 1) {
- free(f->value);
- f->value = NULL;
- f->valuelen = 0;
- f->alloclen = 0;
+ free(tmpline);
if (feof(msg)) {
return FILEEOF2;
} else {
ret = LENERR2;
}
- free(f->value);
f->value = tmpline;
f->valuelen = nchars;
f->alloclen = len;
readconfig(struct node **npp, FILE *ib, char *file, int ctx)
{
enum state state;
- struct field f = {{0}};
+ struct field f = free_field;
struct node *np;
struct procstr *ps;
seq_public(struct msgs *mp)
{
enum state state;
- struct field f = {{0}};
+ struct field f = free_field;
char seqfile[PATH_MAX];
FILE *fp;
distout(char *drft, char *msgnam, char *backup)
{
enum state state;
- struct field f = {{0}};
+ struct field f = free_field;
unsigned char *dp;
int resent = 0;
FILE *ifp, *ofp;
ready_msg(char *msgnam)
{
enum state state;
- struct field f = {{0}};
+ struct field f = free_field;
char tmpfil[BUFSIZ];
int out;
FILE *ifp, *ofp;
build_mime(char *infile)
{
enum state state;
- struct field f = {{0}};
+ struct field f = free_field;
int compnum;
char buf[BUFSIZ];
char *cp, *np, *vp;
mhlfile(FILE *fp, char *mname, int ofilen, int ofilec)
{
enum state state;
- struct field f = {{0}};
+ struct field f = free_field;
struct mcomp *c1, *c2, *c3;
char **ip;
get_content(FILE *in, char *file, int toplevel)
{
enum state state;
- struct field f = {{0}};
+ struct field f = free_field;
int compnum;
CT ct;
HF hp;
get_msgnums(char *folder, char *sequences[])
{
enum state state;
- struct field f = {{0}};
+ struct field f = free_field;
char *seqfile = concat(toabsdir(folder), "/", mh_seq, (void *)NULL);
FILE *fp = fopen(seqfile, "r");
char *msgnums = NULL, *this_msgnums, *old_msgnums;
plist
{
enum state state;
- struct field f = {{0}};
+ struct field f = free_field;
char *bp;
struct tws *tw;
int fdi, fdo, i;
char *cp, *drft = NULL;
enum state state;
- struct field f = {{0}};
+ struct field f = free_field;
char buffer[BUFSIZ], tmpfil[BUFSIZ];
char **arguments, **argp;
FILE *in, *out;
{
int char_read = 0, format_len, i;
enum state state;
- struct field f = {{0}};
+ struct field f = free_field;
char **ap;
char *cp, *scanl;
struct comp *cptr;
int mime, char *form, char *filter)
{
enum state state;
- struct field f = {{0}};
+ struct field f = free_field;
int i;
struct comp *cptr;
char **ap;
static int slwidth;
int compnum, i;
enum state state;
- struct field f = {{0}};
+ struct field f = free_field;
char *cp;
struct comp *cptr;
char *scnmsg = NULL;
parse(int fd)
{
enum state state;
- struct field f = {{0}};
+ struct field f = free_field;
int i, fd1;
char *cp, *dp, *lp;
struct pair *p, *q;
get_fields(char *datesw, int msg, struct smsg *smsg)
{
enum state state;
- struct field f = {{0}};
+ struct field f = free_field;
int compnum;
char *msgnam;
struct tws *tw;
main(int argc, char **argv)
{
enum state state;
- struct field f = {{0}};
+ struct field f = free_field;
int compnum;
char *cp, *msg = NULL, **argp, **arguments;
char **sargv, buf[BUFSIZ];
process(char *file)
{
enum state state;
- struct field f = {{0}};
+ struct field f = free_field;
int compnum;
FILE *in;