scan: Don't fflush manually. Let stdio care for this.
[mmh] / uip / folder.c
index 7f829f0..b1398e4 100644 (file)
@@ -564,7 +564,7 @@ print_folders(void)
                        }
 
                        /* Add `+' to end of name, if folder is current */
-                       if (strcmp(folder, fi[i].name))
+                       if (strcmp(folder, fi[i].name)!=0)
                                snprintf(tmpname, sizeof(tmpname), "%s",
                                                fi[i].name);
                        else
@@ -652,11 +652,12 @@ readonly_folders(void)
        char atrcur[BUFSIZ];
        register struct node *np;
 
-       snprintf(atrcur, sizeof(atrcur), "atr-%s-", current);
+       snprintf(atrcur, sizeof(atrcur), "atr-%s-", seq_cur);
        atrlen = strlen(atrcur);
 
        for (np = m_defs; np; np = np->n_next)
-               if (isprefix(atrcur, np->n_name)
-                               && !isprefix(nmhdir, np->n_name + atrlen))
+               if (strncmp(np->n_name, atrcur, atrlen)==0 &&
+                               strncmp(np->n_name+atrlen, nmhdir, strlen(nmhdir))!=0)
+                       /* Why do we exclude absolute path names? --meillo */
                        get_folder_info(np->n_name + atrlen, NULL);
 }