]> diplodocus.org Git - nmh/blobdiff - uip/mhcachesbr.c
Added bytes_read to m_getfld() buffer state. This is the
[nmh] / uip / mhcachesbr.c
index 2c188653a3a8d104aed9c15c15cce034dceb9b20..59e27914905c3c5c4ef16021a2faef751c00c2e7 100644 (file)
@@ -108,14 +108,6 @@ cache_content (CT ct)
        return;
     }
 
        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) {
     if (find_cache (NULL, wcachesw != CACHE_NEVER ? wcachesw : CACHE_ASK,
                    &cachetype, ct->c_id, cachefile, sizeof(cachefile))
            == NOTOK) {
@@ -391,8 +383,9 @@ find_cache_aux2 (char *mapfile, char *id, char *mapname, int namelen)
     for (state = FLD;;) {
        int result;
        char *cp, *dp;
     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:
            case FLD:
            case FLDPLUS:
            case FLDEOF:
@@ -402,7 +395,8 @@ find_cache_aux2 (char *mapfile, char *id, char *mapname, int namelen)
                else {
                    cp = add (buf, NULL);
                    while (state == FLDPLUS) {
                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);
                    }
                }
                        cp = add (buf, cp);
                    }
                }