+/* func to free buffy for list_del() */
+static void buffy_free (void** p) {
+ FREE(&(*((BUFFY**) p))->path);
+ FREE(p);
+}
+
+int buffy_lookup (const char* path) {
+ int i = 0;
+ if (list_empty(Incoming) || !path || !*path)
+ return (-1);
+ for (i = 0; i < Incoming->length; i++) {
+ if (mutt_strcmp (((BUFFY*) Incoming->data[i])->path, path) == 0)
+ return (i);
+ }
+ return (-1);
+}
+