- if ((f = popen_in_dir(cwd, buf, "r"))) {
- while (fgets(shell, sizeof(shell), f)) {
- *(strchr(shell, '\n')) = '\0';
-
- if (*shell == '/')
- sprintf(file, "%s", shell);
- else {
- sprintf(file, "%s/%s", cwd,
- shell);
- }
- if (execprogl("anno", "anno",
- "-nodate",
- "-append", "-comp",
- attach_hdr, "-text",
- file, drft,
- (char *)NULL)
- != 0) {
- advise(NULL, "Could not add attachment header.");
- }
- }
-
- pclose(f);
- } else {