diff --git a/src/frontend/device.c b/src/frontend/device.c index 0062bbeef..00cb3b881 100644 --- a/src/frontend/device.c +++ b/src/frontend/device.c @@ -1542,6 +1542,7 @@ com_alter_mod(wordlist *wl) if (modfile == NULL) { fprintf(cp_err, "Warning: Could not open file %s, altermod ignored\n", filename); + perror(" Cause: "); tfree(input); tfree(filename); return; diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 1f90d2732..2263b7b82 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -583,6 +583,7 @@ static struct library *read_a_lib(const char *y, const char *dir_name) if (!newfp) { fprintf(cp_err, "Error: Could not open library file %s\n", y); + perror(" Cause: "); return NULL; } @@ -1564,6 +1565,7 @@ static struct inp_read_t inp_read(FILE* fp, int call_depth, const char* dir_name else fprintf(cp_err, " While reading %s\n", y_resolved); } + perror(" Cause: "); tfree(buffer); /* allocated by readline() above */ controlled_exit(EXIT_FAILURE); } diff --git a/src/frontend/measure.c b/src/frontend/measure.c index b7b6680cc..4efd1d7bf 100644 --- a/src/frontend/measure.c +++ b/src/frontend/measure.c @@ -255,8 +255,10 @@ do_measure( if (cp_getvar("measoutfile", CP_STRING, out_file, sizeof(out_file))) { measout = fopen(out_file, "w"); - if (!measout) + if (!measout) { fprintf(stderr, " Warning: Could not open file %s\n", out_file); + perror(" Cause: "); + } } /* Evaluating the linked list of .meas cards, assembled from the input deck