diff --git a/Makefile b/Makefile index 50105fc..a224c6c 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ VERSION = 0.1 PREFIX = /usr/local -CPPFLAGS_SROHTML = -DVERSION=\"${VERSION}\" ${CPPFLAGS} +CPPFLAGS_SROHTML = -DBIN=\"${BIN}\" -DVERSION=\"${VERSION}\" ${CPPFLAGS} # debug #CFLAGS_SROHTML = -ggdb -ansi -pedantic ${CPPFLAGS_SROHTML} ${CLAGS} CFLAGS_SROHTML = -Os -ansi -pedantic ${CPPFLAGS_SROHTML} ${CFLAGS} diff --git a/srohtml.c b/srohtml.c index 6639894..70aea12 100644 --- a/srohtml.c +++ b/srohtml.c @@ -602,7 +602,7 @@ main (int argc, char *argv[]) in = fopen(argv[1], "r"); if (in == NULL) { - fprintf(stderr, "Can't open %s.\n", argv[1]); + fprintf(stderr, BIN ": Can't open %s.\n", argv[1]); return 1; } @@ -660,7 +660,7 @@ main (int argc, char *argv[]) else out = fopen(argv[2], "w"); if (out == NULL) { - fprintf(stderr, "Can't open %s.\n", argv[2]); + fprintf(stderr, BIN ": Can't open %s.\n", argv[2]); return 1; } @@ -788,7 +788,7 @@ safe_malloc(const size_t size) ptr = malloc(size); if (ptr == NULL) { - fprintf(stderr, "Can't allocate %lu bytes.\n", size); + fprintf(stderr, BIN ": Can't allocate %lu bytes.\n", size); exit(1); } @@ -802,7 +802,7 @@ safe_realloc(void *ptr, const size_t size) new = realloc(ptr, size); if (new == NULL) { - fprintf(stderr, "Can't allocate %lu bytes.\n", size); + fprintf(stderr, BIN ": Can't allocate %lu bytes.\n", size); exit(1); }