-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.c
46 lines (42 loc) · 1.19 KB
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include "dsk.h"
#include <stdio.h>
int main(int argc, char** argv)
{
if (argc < 2) return 1;
switch (dsk2dir(argv[1])) {
case DSK_FILE_ERROR :
fprintf(stderr, "DSK_FILE_ERROR\n");
break;
case DSK_OK :
fprintf(stderr, "DSK_OK\n");
break;
case DSK_UNKNOWN_FORMAT :
fprintf(stderr, "DSK_UNKNOWN_FORMAT\n");
break;
case DSK_UNSUPPORTED_FORMAT :
fprintf(stderr, "DSK_UNSUPPORTED_FORMAT\n");
break;
case DSK_TOO_LARGE :
fprintf(stderr, "DSK_TOO_LARGE\n");
break;
case DSK_MALFORMED_TRACK_INFO :
fprintf(stderr, "DSK_MALFORMED_TRACK_INFO\n");
break;
case DSK_UNEXPECTED_TRACK :
fprintf(stderr, "DSK_UNEXPECTED_TRACK\n");
break;
case DSK_UNEXPECTED_SIDE :
fprintf(stderr, "DSK_UNEXPECTED_SIDE\n");
break;
case DSK_UNEXPECTED_SECTOR_ID :
fprintf(stderr, "DSK_UNEXPECTED_SECTOR_ID\n");
break;
case DSK_UNEXPECTED_SECTOR_SIZE :
fprintf(stderr, "DSK_UNEXPECTED_SECTOR_SIZE\n");
break;
case DSK_UNEXPECTED_SECTOR_NUMBER :
fprintf(stderr, "DSK_UNEXPECTED_SECTOR_NUMBER\n");
break;
}
return 0;
}