#include #include #include void main(int argc, char **argv) { FILE *disk; char *diskname; long disksize=0; if(argc > 1) { if(!stricmp(argv[1], "hf")) { diskname="hardfile"; if(argc > 2) disksize=(atol(argv[2])+16383)/16384*16384; } if(!stricmp(argv[1], "df")) { diskname="diskfile"; disksize=901120; } } if(!disksize) { printf("MakeDisk Version 0.02\xe1\n\n"); printf("Usage:\n\n"); printf("MakeDisk hf \n"); printf(" Makes a large harfile of bytes, must be multiple of\n"); printf(" 16384, otherwize it will be rounded up.\n\n"); printf("MakeDisk df\n"); printf(" Makes a small diskfile.\n"); exit(0); } disk = fopen(diskname, "wb"); fseek(disk, disksize-1, SEEK_SET); fputc(0, disk); fclose(disk); }