- snprintf(buffer, sizeof buffer, "anno -append -nodate '%s' "
- "-comp '%s' -text '+%s %s'",
- drft,
- attach_hdr, mp->foldpath, m_name(mp->lowsel));
- if (system(buffer) != 0) {
+ snprintf(buffer, sizeof buffer, "+%s %s",
+ mp->foldpath, m_name(mp->lowsel));
+ if (execprogl("anno", "anno", "-append", "-nodate",
+ drft, "-comp", attach_hdr, "-text", buffer,
+ (char *)NULL) != 0) {