From 3a86d2170bfeb4bc75bd9c2b74d12b223493ef06 Mon Sep 17 00:00:00 2001 From: Christopher Kobayashi Date: Tue, 21 Apr 2020 20:52:18 +0900 Subject: [PATCH] Rename to dsk2dc42 --- Makefile | 6 +++--- makedc42.c => dsk2dc42.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) rename makedc42.c => dsk2dc42.c (96%) diff --git a/Makefile b/Makefile index 923c652..fb43435 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ CFLAGS= -O2 -Wall -Werror -ggdb -all: dc42cksm makedc42 +all: dc42cksm dsk2dc42 install: all - install -m755 dc42cksm makedc42 /usr/local/bin/ + install -m755 dc42cksm dsk2dc42 /usr/local/bin/ clean: - rm -f dc42cksm makedc42 *.o + rm -f dc42cksm dsk2dc42 *.o diff --git a/makedc42.c b/dsk2dc42.c similarity index 96% rename from makedc42.c rename to dsk2dc42.c index b813377..37789f1 100644 --- a/makedc42.c +++ b/dsk2dc42.c @@ -53,8 +53,6 @@ int main(int argc, char **argv) printf("%s: could not stat\n", argv[1]); } - printf("%s: size is %li\n", argv[1], inputfile_stat.st_size); - file_buffer = calloc(1, inputfile_stat.st_size); if (!file_buffer) { printf("%s: could not allocate buffer\n", argv[1]); @@ -62,7 +60,7 @@ int main(int argc, char **argv) return -1; } - printf("%s: read %li bytes into buffer\n", argv[1], + printf("%s: size %li bytes\n", argv[1], fread(file_buffer, 1, inputfile_stat.st_size, inputfile)); fclose(inputfile); @@ -126,6 +124,8 @@ int main(int argc, char **argv) fwrite(&header, sizeof(header), 1, outputfile); fwrite(file_buffer, inputfile_stat.st_size, 1, outputfile); + printf("%s: ensure \"%s\" type/creator is dImg/dCpy\n", argv[1], outputfilename); + if (file_buffer != NULL) free(file_buffer);