char *cc, char *fcc, char *subject, char *inputfile)
{
int in;
- int fmtsize, state, char_read = 0;
+ int fmtsize, state;
int i;
register char *nfs;
char *line, tmpfil[BUFSIZ], name[NAMESZ], **ap;
*/
for (state = FLD;;) {
- state = m_getfld(state, name, msgbuf, sizeof(msgbuf), tmp);
+ int msg_count = sizeof msgbuf;
+ state = m_getfld(state, name, msgbuf, &msg_count, tmp);
switch (state) {
case FLD:
case FLDPLUS:
i = fmt_addcomptext(name, msgbuf);
if (i != -1) {
- char_read += msg_count;
while (state == FLDPLUS) {
- state = m_getfld(state, name, msgbuf,
- sizeof(msgbuf), tmp);
+ msg_count = sizeof msgbuf;
+ state = m_getfld(state, name, msgbuf, &msg_count, tmp);
fmt_appendcomp(i, name, msgbuf);
- char_read += msg_count;
}
}
while (state == FLDPLUS)
- state = m_getfld(state, name, msgbuf, sizeof(msgbuf), tmp);
+ msg_count = sizeof msgbuf;
+ state = m_getfld(state, name, msgbuf, &msg_count, tmp);
break;
case LENERR: