]> diplodocus.org Git - nmh/blobdiff - uip/mhcachesbr.c
Added check of -pack to test-pop.
[nmh] / uip / mhcachesbr.c
index 2c188653a3a8d104aed9c15c15cce034dceb9b20..5970a9d1c322c3a522fafe27690bee24a97387e0 100644 (file)
@@ -108,14 +108,6 @@ cache_content (CT ct)
        return;
     }
 
-/* THIS NEEDS TO BE FIXED */
-#if 0
-    if (ct->c_ceopenfnx == openMail) {
-       advise (NULL, "a radish may no know Greek, but I do...");
-       return;
-    }
-#endif
-
     if (find_cache (NULL, wcachesw != CACHE_NEVER ? wcachesw : CACHE_ASK,
                    &cachetype, ct->c_id, cachefile, sizeof(cachefile))
            == NOTOK) {
@@ -391,18 +383,19 @@ find_cache_aux2 (char *mapfile, char *id, char *mapname, int namelen)
     for (state = FLD;;) {
        int result;
        char *cp, *dp;
+       int bufsz = sizeof buf;
 
-       switch (state = m_getfld (state, name, buf, sizeof(buf), fp)) {
+       switch (state = m_getfld (state, name, buf, &bufsz, fp)) {
            case FLD:
            case FLDPLUS:
-           case FLDEOF:
                strncpy (mapname, name, namelen);
                if (state != FLDPLUS)
                    cp = buf;
                else {
                    cp = add (buf, NULL);
                    while (state == FLDPLUS) {
-                       state = m_getfld (state, name, buf, sizeof(buf), fp);
+                       bufsz = sizeof buf;
+                       state = m_getfld (state, name, buf, &bufsz, fp);
                        cp = add (buf, cp);
                    }
                }
@@ -418,12 +411,9 @@ find_cache_aux2 (char *mapfile, char *id, char *mapname, int namelen)
                    lkfclose (fp, mapfile);
                    return OK;
                }
-               if (state != FLDEOF)
-                   continue;
-               /* else fall... */
+               continue;
 
            case BODY:
-           case BODYEOF:
            case FILEEOF:
            default:
                break;