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/directive.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/directive.c')
-rw-r--r-- | src/directive.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/directive.c b/src/directive.c index 08a14df..fadaedf 100644 --- a/src/directive.c +++ b/src/directive.c | |||
@@ -34,7 +34,7 @@ directive_parse (struct file_triplet *trp) | |||
34 | if (*p == '\n') | 34 | if (*p == '\n') |
35 | dcount++; | 35 | dcount++; |
36 | 36 | ||
37 | trp->directive = xcalloc (dcount + 1, sizeof trp->directive[0]); | 37 | trp->directive = grecs_calloc (dcount + 1, sizeof trp->directive[0]); |
38 | p = trp->blurb; | 38 | p = trp->blurb; |
39 | for (i = j = 0; i < dcount; i++) | 39 | for (i = j = 0; i < dcount; i++) |
40 | { | 40 | { |
@@ -111,7 +111,7 @@ _directive_seq_get (int n, struct file_triplet *trp, | |||
111 | if (len + 1 > trp->tmpsize) | 111 | if (len + 1 > trp->tmpsize) |
112 | { | 112 | { |
113 | trp->tmpsize = len + 1; | 113 | trp->tmpsize = len + 1; |
114 | trp->tmp = x2realloc (trp->tmp, &trp->tmpsize); | 114 | trp->tmp = grecs_realloc (trp->tmp, trp->tmpsize); |
115 | } | 115 | } |
116 | memcpy (trp->tmp, trp->directive[n], len); | 116 | memcpy (trp->tmp, trp->directive[n], len); |
117 | trp->tmp[len] = 0; | 117 | trp->tmp[len] = 0; |
@@ -380,7 +380,7 @@ stderr_redirector (const char *tag) | |||
380 | fp = fdopen (p[0], "r"); | 380 | fp = fdopen (p[0], "r"); |
381 | if (!fp) | 381 | if (!fp) |
382 | _exit (127); | 382 | _exit (127); |
383 | while (getline (&buf, &size, fp) >= 0) | 383 | while (grecs_getline (&buf, &size, fp) >= 0) |
384 | { | 384 | { |
385 | trim_crlf (buf); | 385 | trim_crlf (buf); |
386 | logmsg (LOG_NOTICE, "%s: %s", tag, buf); | 386 | logmsg (LOG_NOTICE, "%s: %s", tag, buf); |
@@ -493,7 +493,7 @@ run_check_script (const char *script, struct file_triplet *trp, | |||
493 | size = total = 0; | 493 | size = total = 0; |
494 | if (debug_level > 2) | 494 | if (debug_level > 2) |
495 | logmsg (LOG_DEBUG, _("reading script output...")); | 495 | logmsg (LOG_DEBUG, _("reading script output...")); |
496 | while (getline (&buf, &size, fp) > 0) | 496 | while (grecs_getline (&buf, &size, fp) > 0) |
497 | { | 497 | { |
498 | size_t len = strlen (buf); | 498 | size_t len = strlen (buf); |
499 | if (debug_level > 2) | 499 | if (debug_level > 2) |