diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-05-13 10:21:43 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-05-13 10:33:34 +0300 |
commit | de3fbe3e8d4dd2a89f7755906d76055784c437cc (patch) | |
tree | 65356dd7b5a9010499550c468e960c93515a7e15 /src/config.c | |
parent | f569a6f2628b9ddef4dfb4424aff2dad644a8f19 (diff) | |
download | wydawca-de3fbe3e8d4dd2a89f7755906d76055784c437cc.tar.gz wydawca-de3fbe3e8d4dd2a89f7755906d76055784c437cc.tar.bz2 |
Drop gnulib.
* bootstrap: Rewrite.
* bootstrap.conf: Remove.
* configure.ac: Remove gl_EARLY/gl_INIT
* src/backup.c: New file.
* src/txtacc.c (txtacc_finish): Make sure a new entry is
appended only once to the list.
* (all sources): Use grecs memory allocation functions.
* src/wydawca.h" Include fnmatch.h and regex.h
(backup_type): New enum.
(simple_backup_suffix): New extern.
(find_backup_file_name): New proto.
* tests/bkupname.c: New file.
* tests/backup00.at: New file.
* tests/backup01.at: New file.
* tests/backup02.at: New file.
* tests/backup03.at: New file.
* tests/Makefile.am: Add new tests.
* tests/testsuite.at: Add new tests.
* grecs: Update.
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/config.c b/src/config.c index df9816e..8250749 100644 --- a/src/config.c +++ b/src/config.c @@ -146,7 +146,7 @@ safe_file_name (char *file_name) char * safe_file_name_alloc (const char *file_name) { - char *s = xstrdup (file_name); + char *s = grecs_strdup (file_name); char *ns = safe_file_name (s); if (!ns) free (s); @@ -549,8 +549,8 @@ cb_sql_host (enum grecs_callback_command cmd, *p++ = 0; if (p[0] == '/') { - pconn->socket = xstrdup (p); - pconn->host = xstrdup ("localhost"); + pconn->socket = grecs_strdup (p); + pconn->host = grecs_strdup ("localhost"); } else { @@ -569,11 +569,11 @@ cb_sql_host (enum grecs_callback_command cmd, } pconn->port = n; /* Save host name */ - pconn->host = xstrdup (value->v.string); + pconn->host = grecs_strdup (value->v.string); } } else - pconn->host = xstrdup (value->v.string); + pconn->host = grecs_strdup (value->v.string); return 0; } @@ -594,7 +594,7 @@ cb_sql (enum grecs_callback_command cmd, grecs_error(locus, 0, _("tag must be a string")); return 0; } - pconn = xzalloc (sizeof (*pconn)); + pconn = grecs_zalloc (sizeof (*pconn)); pconn->ident = strdup (value->v.string); *pdata = pconn; break; @@ -896,7 +896,7 @@ cb_notify_event (enum grecs_callback_command cmd, switch (cmd) { case grecs_callback_section_begin: - ntf = xzalloc (sizeof (*ntf)); + ntf = grecs_zalloc (sizeof (*ntf)); *pdata = ntf; break; @@ -984,7 +984,7 @@ cb_dictionary_params (enum grecs_callback_command cmd, struct grecs_list_entry *ep; meth->parmc = size; - meth->parmv = xcalloc (size + 1, sizeof (meth->parmv[0])); + meth->parmv = grecs_calloc (size + 1, sizeof (meth->parmv[0])); for (i = 0, ep = value->v.list->head; ep; ep = ep->next, i++) { @@ -993,7 +993,7 @@ cb_dictionary_params (enum grecs_callback_command cmd, if (assert_string_arg (locus, cmd, vp)) break; - meth->parmv[i] = xstrdup (vp->v.string); + meth->parmv[i] = grecs_strdup (vp->v.string); } meth->parmv[i] = NULL; } @@ -1159,8 +1159,8 @@ cb_spool (enum grecs_callback_command cmd, grecs_error (locus, 0, _("tag must be a string")); return 1; } - spool = xzalloc (sizeof (*spool)); - spool->tag = xstrdup (value->v.string); + spool = grecs_zalloc (sizeof (*spool)); + spool->tag = grecs_strdup (value->v.string); spool->file_sweep_time = file_sweep_time; for (i = 0; i < NITEMS (spool->dictionary); i++) spool->dictionary[i] = default_dictionary[i]; @@ -1277,8 +1277,8 @@ cb_supp_groups (enum grecs_callback_command cmd, int i; struct grecs_list_entry *ep; - wydawca_supp_groups = xcalloc (wydawca_supp_groupc, - sizeof (wydawca_supp_groups[0])); + wydawca_supp_groups = grecs_calloc (wydawca_supp_groupc, + sizeof (wydawca_supp_groups[0])); for (i = 0, ep = value->v.list->head; ep; ep = ep->next, i++) { |