diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-05-10 15:03:43 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-05-10 17:21:54 +0300 |
commit | 8b04169265fb9762b2c1dfca3f43068f5b8233be (patch) | |
tree | 43049c1809b2b70b21ed9300ebdd286d18833c8b /src/cmdline.opt | |
parent | bb242e454d5cf8b0c6bb1ca5d009ec18e86c0c2b (diff) | |
download | wydawca-8b04169265fb9762b2c1dfca3f43068f5b8233be.tar.gz wydawca-8b04169265fb9762b2c1dfca3f43068f5b8233be.tar.bz2 |
Update grecs.
* Makefile.am (ChangeLog): Use git2chg.awk.
* bootstrap.conf (gnulib_modules): Don't access grecs/gnulib.modules.
* configure.ac (GRECS_SETUP): Add options.
* gnulib.modules (getopt,gitlog-to-changelog)
(hash,error,version-etc): Remove.
* src/Makefile.am: Remove getopt.m4, use one from grecs.
* src/getopt.m4: Remove.
* src/cmdline.opt: Rewrite.
* src/config.c: Update.
* src/wydawca.h (spool) <aliases>: Change data type.
(all_spool_aliases): Change data type.
(config_finish): New proto.
* src/wydawca.c: Use grecs functions.
* src/dictionary.c: Likewise.
* src/net.c: Likewise.
* src/process.c: Likewise.
* src/mail.c: Use grecs_symtab.
* src/timer.c: Likewise.
* src/triplet.c: Likewise.
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) |