if (ontty != PITTY)
SIGNAL (SIGINT, intrser);
mhlfile (fp, cp, ofilen, ofilec); /* FALL THROUGH! */
+ free (cp);
for (ap = arglist_head; ap; ap = ap->a_next) {
fmt_free(ap->a_fmt, 0);
SIGNAL (SIGINT, SIG_IGN);
if (mhl_action == NULL && fp != stdin && fp != NULL)
fclose (fp);
- free (cp);
if (holder.c_text) {
free (holder.c_text);
holder.c_text = NULL;
(q = &pq)->pq_next = NULL;
while ((cp = getname (ap))) {
- if ((p = (struct pqpair *) mh_xcalloc ((size_t) 1, sizeof(*p))) == NULL)
- adios (NULL, "unable to allocate pqpair memory");
- else {
- if ((mp = getm (cp, NULL, 0, error, sizeof(error))) == NULL) {
- p->pq_text = getcpy (cp);
- p->pq_error = getcpy (error);
- } else {
- p->pq_text = getcpy (mp->m_text);
- mnfree (mp);
- }
- q = (q->pq_next = p);
- }
+ p = mh_xcalloc(1, sizeof *p);
+ if ((mp = getm (cp, NULL, 0, error, sizeof(error))) == NULL) {
+ p->pq_text = getcpy (cp);
+ p->pq_error = getcpy (error);
+ } else {
+ p->pq_text = getcpy (mp->m_text);
+ mnfree (mp);
+ }
+ q = (q->pq_next = p);
}
for (p = pq.pq_next; p; p = q) {
{
struct mcomp *c1;
- if ((c1 = (struct mcomp *) mh_xcalloc ((size_t) 1, sizeof(*c1))) == NULL)
- adios (NULL, "unable to allocate comp memory");
- else {
- c1->c_flags = flags & ~INIT;
- if ((c1->c_name = name ? getcpy (name) : NULL))
- c1->c_flags |= mcomp_flags (c1->c_name);
- c1->c_text = text ? getcpy (text) : NULL;
- if (flags & INIT) {
- if (global.c_ovtxt)
- c1->c_ovtxt = getcpy (global.c_ovtxt);
- c1->c_offset = global.c_offset;
- c1->c_ovoff = global. c_ovoff;
- c1->c_width = c1->c_length = 0;
- c1->c_cwidth = global.c_cwidth;
- c1->c_flags |= global.c_flags & GFLAGS;
- }
+ c1 = mh_xcalloc(1, sizeof *c1);
+ c1->c_flags = flags & ~INIT;
+ if ((c1->c_name = name ? getcpy (name) : NULL))
+ c1->c_flags |= mcomp_flags (c1->c_name);
+ c1->c_text = text ? getcpy (text) : NULL;
+ if (flags & INIT) {
+ if (global.c_ovtxt)
+ c1->c_ovtxt = getcpy (global.c_ovtxt);
+ c1->c_offset = global.c_offset;
+ c1->c_ovoff = global. c_ovoff;
+ c1->c_width = c1->c_length = 0;
+ c1->c_cwidth = global.c_cwidth;
+ c1->c_flags |= global.c_flags & GFLAGS;
}
if (*head == NULL)
*head = c1;