line |
true |
false |
branch |
61
|
596 |
25 |
for (i = 0; i < 16 && name[i]; ++i) { |
|
564 |
32 |
for (i = 0; i < 16 && name[i]; ++i) { |
72
|
241 |
3 |
for (i = 0; i < 16 && rawname[i] != 0xa0; ++i) { |
|
219 |
22 |
for (i = 0; i < 16 && rawname[i] != 0xa0; ++i) { |
85
|
1 |
2 |
if (di->status == 254) { |
100
|
2 |
0 |
while (err->number >= 0) { |
101
|
2 |
0 |
if (di->status == err->number) { |
157
|
1 |
1 |
if (track > 35) { |
162
|
8633 |
7950 |
if (track < 18) { |
164
|
3256 |
4694 |
} else if (track < 25) { |
166
|
2622 |
2072 |
} else if (track < 31) { |
185
|
18 |
17685 |
if (ts.track < 18) { |
187
|
17685 |
0 |
} else if (ts.track < 25) { |
189
|
0 |
0 |
} else if (ts.track < 31) { |
197
|
0 |
0 |
if (ts.track > 35) { |
203
|
0 |
0 |
if (ts.track < 18) { |
205
|
0 |
0 |
} else if (ts.track < 25) { |
207
|
0 |
0 |
} else if (ts.track < 31) { |
236
|
0 |
53 |
if (p[0] > di_tracks(di->type)) { |
239
|
17 |
36 |
} else if (p[1] > di_sectors_per_track(di->type, p[0])) { |
249
|
2 |
0 |
switch (di->type) { |
273
|
0 |
0 |
if (track >= 36) { |
278
|
0 |
0 |
if (track <= 40) { |
296
|
1820 |
52 |
for (track = 1; track <= di_tracks(di->type); ++track) { |
297
|
1768 |
52 |
if (track != di->dir.track) { |
313
|
15 |
0 |
if (bam[ts.track * 4]) { |
322
|
0 |
0 |
if (ts.track < 36) { |
332
|
0 |
0 |
if (ts.track < 41) { |
360
|
0 |
0 |
if (ts.track < 36) { |
372
|
0 |
0 |
if (ts.track < 41) { |
427
|
12 |
0 |
for (ts.track = s1; ts.track <= t1; ++ts.track) { |
428
|
12 |
0 |
if (ts.track != res1) { |
429
|
12 |
0 |
if (bam[ts.track * bpt + boff]) { |
433
|
12 |
0 |
if (di_is_ts_free(di, ts)) { |
442
|
0 |
0 |
if (di->type == D71 || di->type == D81) { |
|
0 |
0 |
if (di->type == D71 || di->type == D81) { |
444
|
0 |
0 |
for (ts.track = s2; ts.track <= t2; ++ts.track) { |
445
|
0 |
0 |
if (ts.track != res2) { |
446
|
0 |
0 |
if (bam[(ts.track - t1) * bpt + boff]) { |
450
|
0 |
0 |
if (di_is_ts_free(di, ts)) { |
472
|
0 |
0 |
if (di_track_blocks_free(di, di->bam.track)) { |
475
|
0 |
0 |
while (ts.track) { |
483
|
0 |
0 |
if (di_is_ts_free(di, ts)) { |
518
|
0 |
0 |
if (ts.track < 36) { |
530
|
0 |
0 |
if (ts.track < 41) { |
548
|
1 |
1 |
while (ts.track) { |
561
|
0 |
1 |
if ((file = fopen(name, "rb")) == NULL) { |
567
|
0 |
1 |
if (fseek(file, 0, SEEK_END)) { |
575
|
0 |
1 |
if ((di = malloc(sizeof(*di))) == NULL) { |
617
|
0 |
1 |
if ((di->image = malloc(filesize)) == NULL) { |
626
|
1 |
1 |
while (read < filesize) { |
627
|
1 |
0 |
if ((l = fread(di->image, 1, filesize - read, file))) { |
652
|
0 |
28 |
if ((di = malloc(sizeof(*di))) == NULL) { |
692
|
0 |
28 |
if ((di->image = malloc(size)) == NULL) { |
714
|
28 |
0 |
if ((file = fopen(di->filename, "wb"))) { |
718
|
28 |
28 |
while (left) { |
719
|
0 |
28 |
if ((l = fwrite(image, 1, left, file)) == 0) { |
733
|
27 |
2 |
if (di->modified) { |
736
|
29 |
0 |
if (di->filename) { |
747
|
76 |
0 |
for (i = 0; i < 16; ++i) { |
748
|
0 |
76 |
if (rawpattern[i] == '*') { |
751
|
8 |
68 |
if (rawname[i] == 0xa0) { |
752
|
8 |
0 |
if (rawpattern[i] == 0xa0) { |
758
|
68 |
0 |
if (rawpattern[i] == '?' || rawpattern[i] == rawname[i]) { |
|
1 |
67 |
if (rawpattern[i] == '?' || rawpattern[i] == rawname[i]) { |
775
|
12 |
4 |
while (ts.track) { |
777
|
40 |
4 |
for (offset = 0; offset < 256; offset += 32) { |
779
|
9 |
31 |
if ((rde->type & ~0x40) == (type | 0x80)) { |
780
|
8 |
1 |
if (match_pattern(rawpattern, rde->rawname)) { |
799
|
12 |
12 |
while (ts.track) { |
801
|
96 |
12 |
for (offset = 0; offset < 256; offset += 32) { |
803
|
0 |
96 |
if (rde->type) { |
804
|
0 |
0 |
if (strncmp(rawname, rde->rawname, 16) == 0) { |
816
|
12 |
0 |
while (ts.track) { |
818
|
12 |
0 |
for (offset = 0; offset < 256; offset += 32) { |
820
|
12 |
0 |
if (rde->type == 0) { |
834
|
0 |
0 |
if (ts.track) { |
857
|
8 |
12 |
if (strcmp("rb", mode) == 0) { |
859
|
0 |
8 |
if ((imgfile = malloc(sizeof(*imgfile))) == NULL) { |
863
|
0 |
8 |
if (strcmp("$", rawname) == 0) { |
868
|
0 |
0 |
if ((di->type == D64) || (di->type == D71)) { |
|
0 |
0 |
if ((di->type == D64) || (di->type == D71)) { |
878
|
3 |
5 |
if ((rde = find_file_entry(di, rawname, type)) == NULL) { |
886
|
0 |
5 |
if (imgfile->ts.track > di_tracks(di->type)) { |
893
|
5 |
0 |
if (imgfile->nextts.track == 0) { |
900
|
12 |
0 |
} else if (strcmp("wb", mode) == 0) { |
902
|
0 |
12 |
if ((rde = alloc_file_entry(di, rawname, type)) == NULL) { |
906
|
0 |
12 |
if ((imgfile = malloc(sizeof(*imgfile))) == NULL) { |
913
|
0 |
12 |
if ((imgfile->buffer = malloc(254)) == NULL) { |
941
|
5 |
1 |
while (len) { |
943
|
2 |
3 |
if (bytesleft == 0) { |
944
|
2 |
0 |
if (imgfile->nextts.track == 0) { |
947
|
0 |
0 |
if (((imgfile->diskimage->type == D64) || (imgfile->diskimage->type == D71)) && imgfile->ts.track == 18 && imgfile->ts.sector == 0) { |
|
0 |
0 |
if (((imgfile->diskimage->type == D64) || (imgfile->diskimage->type == D71)) && imgfile->ts.track == 18 && imgfile->ts.sector == 0) { |
|
0 |
0 |
if (((imgfile->diskimage->type == D64) || (imgfile->diskimage->type == D71)) && imgfile->ts.track == 18 && imgfile->ts.sector == 0) { |
|
0 |
0 |
if (((imgfile->diskimage->type == D64) || (imgfile->diskimage->type == D71)) && imgfile->ts.track == 18 && imgfile->ts.sector == 0) { |
953
|
0 |
0 |
if (imgfile->ts.track == 0) { |
960
|
0 |
0 |
if (imgfile->nextts.track == 0) { |
967
|
2 |
1 |
if (len >= bytesleft) { |
968
|
508 |
2 |
while (bytesleft) { |
976
|
5 |
1 |
while (len) { |
995
|
12 |
12 |
while (len) { |
997
|
0 |
12 |
if (bytesleft == 0) { |
998
|
0 |
0 |
if (imgfile->diskimage->blocksfree == 0) { |
1003
|
0 |
0 |
if (imgfile->ts.track == 0) { |
1016
|
0 |
0 |
if (++(imgfile->rawdirentry->sizelo) == 0) { |
1021
|
0 |
12 |
if (len >= bytesleft) { |
1022
|
0 |
0 |
while (bytesleft) { |
1030
|
98 |
12 |
while (len) { |
1047
|
12 |
4 |
if (imgfile->mode == 'w') { |
1048
|
12 |
0 |
if (imgfile->bufptr) { |
1049
|
12 |
0 |
if (imgfile->diskimage->blocksfree) { |
1051
|
12 |
0 |
if (imgfile->ts.track == 0) { |
1064
|
0 |
12 |
if (++(imgfile->rawdirentry->sizelo) == 0) { |
1090
|
23 |
0 |
if (rawid) { |
1107
|
805 |
23 |
for (ts.track = 1; ts.track <= di_tracks(di->type); ++ts.track) { |
1108
|
15709 |
805 |
for (ts.sector = 0; ts.sector < di_sectors_per_track(di->type, ts.track); ++ts.sector) { |
1125
|
23 |
0 |
if (rawid) { |
1142
|
0 |
0 |
if (rawid) { |
1168
|
0 |
0 |
for (ts.track = 1; ts.track <= di_tracks(di->type); ++ts.track) { |
1169
|
0 |
0 |
if (ts.track != 53) { |
1170
|
0 |
0 |
for (ts.sector = 0; ts.sector < di_sectors_per_track(di->type, ts.track); ++ts.sector) { |
1188
|
0 |
0 |
if (rawid) { |
1205
|
0 |
0 |
if (rawid) { |
1220
|
0 |
0 |
if (rawid) { |
1238
|
0 |
0 |
if (rawid) { |
1246
|
0 |
0 |
for (ts.track = 1; ts.track <= di_tracks(di->type); ++ts.track) { |
1247
|
0 |
0 |
for (ts.sector = 0; ts.sector < di_sectors_per_track(di->type, ts.track); ++ts.sector) { |
1271
|
0 |
0 |
if (rawid) { |
1298
|
1 |
0 |
switch (type) { |
1303
|
1 |
1 |
while ((rde = find_file_entry(di, rawpattern, type))) { |
1308
|
1 |
0 |
if (delcount) { |
1326
|
2 |
0 |
if ((rde = find_file_entry(di, oldrawname, type))) { |