/* Once a disc is in use (after createdisc or opendisc) it is referred to through a single integer, which those functions return. When creating a disc, its size in specified in multiples of 512 byte blocks */ typedef unsigned char byte; typedef byte block[512]; int createdisc(char *name, long int numblocks); int mountdisc(char *name); void dismountdisc(int discnum); /* when you access a disc, all you can do is read or write a whole block. You must specify which disc, the number of the block to be read or written (blocks are numbered from 0 to numblocks-1), and of course provide the the 512 byte array for the data. These two functions return 1 to indicate success, and 0 to indicate failure. The blocks are declared as void* because C is peculiar. */ long int discsize(int discnum); int writeblock(int discnum, long int blocknum, void *b); int readblock(int discnum, long int blocknum, void *b);