X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fmhparse.c;h=da19123bc8a795ec391a9bdadd83816243e644fe;hb=cde72ae86fdf635342a573fc1ca5239702ca554e;hp=67d769caf01ea497d3ec1a2056c50b2a7a0c7c20;hpb=04a3dfc70394a517a79340a7d3ecd9c6a23d0bee;p=mmh diff --git a/uip/mhparse.c b/uip/mhparse.c index 67d769c..da19123 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -250,6 +250,9 @@ get_content(FILE *in, char *file, int toplevel) */ for (compnum = 1, state = FLD2;;) { switch (state = m_getfld2(state, &f, in)) { + case LENERR2: + state = FLD2; + /* FALL */ case FLD2: compnum++; @@ -267,11 +270,13 @@ get_content(FILE *in, char *file, int toplevel) ct->c_begin = ftell(in); break; - case LENERR2: case FMTERR2: + advise(NULL, "message format error in component #%d", compnum); + state = FLD2; + continue; + case IOERR2: - adios(EX_DATAERR, NULL, "message format error in component #%d", - compnum); + adios(EX_IOERR, "m_getfld2", "io error"); default: adios(EX_SOFTWARE, NULL, "getfld() returned %d", state); @@ -545,7 +550,7 @@ incl_name_value(unsigned char *buf, char *name, char *value) { ** one, return the entire value. Note that, for example, a name_suffix ** of name will match filename="foo", and return foo. */ -static char * +char * extract_name_value(char *name_suffix, char *value) { char *extracted_name_value = value; char *name_suffix_plus_quote = concat(name_suffix, "=\"", NULL);