fclose(composition_file);
/* We're ready to roll! */
- sprintf(buf, "mhbuild %s", composition_file_name);
- if (system(buf) != 0) {
+ if (execprogl("mhbuild", "mhbuild", composition_file_name,
+ (char *)NULL) != 0) {
/* some problem */
clean_up_temporary_files();
return (NOTOK);
char buf[BUFSIZ];
int dosign = 0;
int doenc = 0;
+ int ret;
if (!(draft_file = fopen(draft_file_name, "r"))) {
adios(NULL, "can't open draft file `%s'.", draft_file_name);
strcpy(composition_file_name, draft_file_name);
/* We're ready to roll! */
- sprintf(buf, "mhsign -m%s '%s'", doenc ? " -e" : "",
- draft_file_name);
- if (system(buf) != 0) {
+ if (doenc) {
+ ret = execprogl("mhsign", "mhsign", "-m", "-e",
+ draft_file_name, (char *)NULL);
+ } else {
+ ret = execprogl("mhsign", "mhsign", "-m",
+ draft_file_name, (char *)NULL);
+ }
+ if (ret != 0) {
/* some problem */
return (NOTOK);
}