aboutsummaryrefslogtreecommitdiff
path: root/src/directive.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/directive.c')
-rw-r--r--src/directive.c8
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
@@ -31,13 +31,13 @@ directive_parse (struct file_triplet *trp)
31 31
32 dcount = 0; 32 dcount = 0;
33 for (p = trp->blurb; *p; p++) 33 for (p = trp->blurb; *p; p++)
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 {
41 trp->directive[j] = p; 41 trp->directive[j] = p;
42 p = strchr (p, '\n'); 42 p = strchr (p, '\n');
43 if (p) 43 if (p)
@@ -108,13 +108,13 @@ _directive_seq_get (int n, struct file_triplet *trp,
108 108
109 p = strchr (trp->directive[n], ':'); 109 p = strchr (trp->directive[n], ':');
110 len = p - trp->directive[n]; 110 len = p - trp->directive[n];
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;
118 *pkey = trp->tmp; 118 *pkey = trp->tmp;
119 for (p++; *p && isspace (*p); p++) 119 for (p++; *p && isspace (*p); p++)
120 ; 120 ;
@@ -377,13 +377,13 @@ stderr_redirector (const char *tag)
377 char *buf = NULL; 377 char *buf = NULL;
378 378
379 close (p[1]); 379 close (p[1]);
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);
387 } 387 }
388 _exit (0); 388 _exit (0);
389 } 389 }
@@ -490,13 +490,13 @@ run_check_script (const char *script, struct file_triplet *trp,
490 close (p[1]); 490 close (p[1]);
491 fp = fdopen (p[0], "r"); 491 fp = fdopen (p[0], "r");
492 buf = NULL; 492 buf = NULL;
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)
500 logmsg (LOG_DEBUG, _("read: %s"), buf); 500 logmsg (LOG_DEBUG, _("read: %s"), buf);
501 txtacc_grow (trp->acc, buf, len); 501 txtacc_grow (trp->acc, buf, len);
502 total += size; 502 total += size;

Return to:

Send suggestions and report system problems to the System administrator.