aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kmer_frequency_per_sequence.c4
-rw-r--r--kmer_total_count.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/kmer_frequency_per_sequence.c b/kmer_frequency_per_sequence.c
index 9cda533..aa18dd6 100644
--- a/kmer_frequency_per_sequence.c
+++ b/kmer_frequency_per_sequence.c
@@ -1,7 +1,9 @@
// Copyright 2013 Calvin Morrison
+#include <errno.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "kmer_utils.h"
@@ -22,7 +24,7 @@ int main(int argc, char **argv) {
FILE *fh = fopen(argv[1], "r" );
if(fh == NULL) {
- fprintf(stderr, "Couldn't open: %s\n", argv[1]);
+ fprintf(stderr, "Error opening %s - %s\n", argv[1], strerror(errno));
exit(EXIT_FAILURE);
}
diff --git a/kmer_total_count.c b/kmer_total_count.c
index 0f44601..4fadf03 100644
--- a/kmer_total_count.c
+++ b/kmer_total_count.c
@@ -1,7 +1,9 @@
// Copyright 2013 Calvin Morrison
+#include <errno.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "kmer_utils.h"
@@ -23,7 +25,7 @@ int main(int argc, char **argv) {
FILE *fh = fopen(argv[1], "r");
if(fh == NULL) {
- fprintf(stderr, "Couldn't open: %s\n", argv[1]);
+ fprintf(stderr, "Error opening %s - %s\n", argv[1], strerror(errno));
exit(EXIT_FAILURE);
}