- FINDCOMP (cptr, "text");
- if (cptr)
- cptr->c_text = date;
- fmt_scan (fmt, buffer, length, dat);
+ cptr = fmt_findcomp ("text");
+ if (cptr) {
+ if (cptr->c_text)
+ free(cptr->c_text);
+ cptr->c_text = getcpy(date);
+ }
+ fmt_scan (fmt, buffer, sizeof buffer - 1, length, dat);