* `cur' points to the name of the current folder, `folders' points to the
* name of a .folder (if NULL, crawl all folders), and `sequences' points to
* the array of sequences for which to look.
+ *
+ * An empty list is returned as first=last=NULL.
*/
static void
check_folders(struct node **first, struct node **last,
char *line;
size_t len;
- *first = *cur_node = NULL;
+ *first = *last = *cur_node = NULL;
*maxlen = 0;
b.first = first;
char *unseen;
struct node *folder;
+ sequences[0] = NULL;
+ sequences[1] = NULL;
+
#ifdef LOCALE
setlocale(LC_ALL, "");
#endif
snprintf (help, sizeof(help), "%s [switches] [sequences]",
invo_name);
print_help (help, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case FOLDERSSW:
if (!(folders = *argp++) || *folders == '-')
/* have a sequence argument */
if (!seq_in_list(cp, sequences)) {
sequences[i++] = cp;
+ sequences[i] = NULL;
}
}