mirror of
https://frontier.innolan.net/github/AmigaExamples.git
synced 2026-09-12 03:01:47 +00:00
Added test for makeadf
This commit is contained in:
@@ -20,9 +20,24 @@ clean:
|
||||
|
||||
subdirs: $(SUBDIRS)
|
||||
|
||||
test:
|
||||
@echo ""
|
||||
@echo ""
|
||||
@echo ""
|
||||
@echo "Testing tools/makeadf..."
|
||||
@echo "------------------------"
|
||||
make -C tools/makeadf test
|
||||
@echo ""
|
||||
@echo ""
|
||||
@echo ""
|
||||
@echo "Testing tools/imagecon..."
|
||||
@echo "-------------------------"
|
||||
make -C tools/imagecon test
|
||||
@echo ""
|
||||
@echo ""
|
||||
@echo ""
|
||||
|
||||
$(SUBDIRS):
|
||||
@echo ""
|
||||
make -C $@
|
||||
|
||||
|
||||
|
||||
|
||||
+11
-1
@@ -13,4 +13,14 @@ bin:
|
||||
mkdir bin
|
||||
|
||||
clean:
|
||||
rm -r out bin
|
||||
rm -r out bin *~
|
||||
|
||||
test: $(MAKEADF)
|
||||
$(MAKEADF) reference/bootblock.bin > out/test.adf
|
||||
diff reference/test.adf out/test.adf
|
||||
@echo "______ ___ _____ _____ ___________ "
|
||||
@echo "| ___ \/ _ \ / ___/ ___| ___| _ \ "
|
||||
@echo "| |_/ / /_\ \\\\\ \`--.\ \`--.| |__ | | | | "
|
||||
@echo "| __/| _ | \`--. \\\`--. \ __|| | | | "
|
||||
@echo "| | | | | |/\__/ /\__/ / |___| |/ / "
|
||||
@echo "\_| \_| |_/\____/\____/\____/|___/ "
|
||||
@@ -46,20 +46,21 @@ int main(int argc,char *argv[])
|
||||
if ((f = fopen(argv[1],"rb"))) {
|
||||
len = fread(image,1,DISKSIZE,f);
|
||||
if (len > 0) {
|
||||
if (len < DISKSIZE)
|
||||
if (len < DISKSIZE) {
|
||||
memset(image+len,0,DISKSIZE-len);
|
||||
}
|
||||
boot_chksum(image);
|
||||
fwrite(image,1,DISKSIZE,stdout);
|
||||
rc = 0;
|
||||
}
|
||||
else
|
||||
fprintf(stderr,"Image read error!\n");
|
||||
fprintf(stderr,"%s: image read error!\n", argv[0]);
|
||||
}
|
||||
else
|
||||
fprintf(stderr,"Cannot open '%s'!\n",argv[0]);
|
||||
fprintf(stderr,"%s: file to open open %s\n", argv[0], argv[1]);
|
||||
}
|
||||
else
|
||||
fprintf(stderr,"Usage: %s <image data>\n",argv[0]);
|
||||
fprintf(stderr,"usage: %s <image data>\n", argv[0]);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
Executable
BIN
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user