diff options
Diffstat (limited to 'src/cmdline.opt')
-rw-r--r-- | src/cmdline.opt | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/src/cmdline.opt b/src/cmdline.opt index 29eff3a..4c3d22f 100644 --- a/src/cmdline.opt +++ b/src/cmdline.opt @@ -1,4 +1,4 @@ -/* wydawca - automatic release submission daemon +/* wydawca - automatic release submission daemon -*- c -*- Copyright (C) 2007, 2009, 2010 Sergey Poznyakoff Wydawca is free software; you can redistribute it and/or modify it @@ -17,13 +17,13 @@ static struct obstack pp_cmd_stack; static int pp_cmd_stack_init; -static gl_list_t source_list; -static gl_list_t tag_list; +static struct grecs_list *source_list; +static struct grecs_list *tag_list; -static bool -string_eq (const void *elt1, const void *elt2) +static int +string_cmp (const void *elt1, const void *elt2) { - return strcmp ((const char *)elt1, (const char *)elt2) == 0; + return strcmp ((const char *)elt1, (const char *)elt2); } int @@ -36,14 +36,17 @@ int enabled_spool_p (const struct spool *spool) { if (source_list || tag_list) - return (source_list && gl_list_search (source_list, spool->source_dir)) - || (tag_list && gl_list_search (tag_list, spool->tag)); + return (source_list && grecs_list_locate (source_list, spool->source_dir)) + || (tag_list && grecs_list_locate (tag_list, spool->tag)); return 1; } -OPTIONS_BEGIN(gnu, "wydawca", +OPTIONS_BEGIN("wydawca", [<wydawca synchronizes files from a set of upload directories with the corresponding distribution sites>], - [<UID [UID...]>]) + [<UID [UID...]>], + [<gnu>], + [<copyright_year=2011>], + [<copyright_holder=Sergey Poznyakoff>]) GROUP(Selecting program mode) @@ -104,20 +107,22 @@ OPTION(spool,S,TAG, [<process only spool with the given tag (may be used multiple times)>]) BEGIN if (!tag_list) - tag_list = gl_list_create_empty (&gl_linked_list_implementation, - string_eq, NULL, - NULL, false); - gl_list_add_last (tag_list, optarg); + { + tag_list = grecs_list_create (); + tag_list->cmp = string_cmp; + } + grecs_list_append (tag_list, optarg); END OPTION(source,s,SOURCE-DIR, [<process only spool with the given source (may be used multiple times)>]) BEGIN if (!source_list) - source_list = gl_list_create_empty (&gl_linked_list_implementation, - string_eq, NULL, - NULL, false); - gl_list_add_last (source_list, optarg); + { + source_list = grecs_list_create (); + source_list->cmp = string_cmp; + } + grecs_list_append (source_list, optarg); END GROUP(Logging) |