diff options
| author | 2011-08-25 17:58:46 +0000 | |
|---|---|---|
| committer | 2011-08-25 17:58:46 +0000 | |
| commit | 2811f1f8f7cbea4bdbb0959e020f44d46ca27abc (patch) | |
| tree | 3c1a74b46430836f2156c07e69704f6932edc46b /src/lib | |
| parent | 7bb097de2e8e0c52227910dcb41e84280710394b (diff) | |
Cleanups and version bump
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/formats/flopimg.c | 4 | ||||
| -rw-r--r-- | src/lib/formats/flopimg.h | 4 | ||||
| -rw-r--r-- | src/lib/formats/st_dsk.c | 2 | ||||
| -rw-r--r-- | src/lib/util/cdrom.c | 22 | ||||
| -rw-r--r-- | src/lib/util/chdcd.c | 18 |
5 files changed, 25 insertions, 25 deletions
diff --git a/src/lib/formats/flopimg.c b/src/lib/formats/flopimg.c index 4f9f1a188fc..14268e28c58 100644 --- a/src/lib/formats/flopimg.c +++ b/src/lib/formats/flopimg.c @@ -1042,7 +1042,7 @@ bool floppy_image_format_t::type_no_data(int type) const bool floppy_image_format_t::type_data_mfm(int type, int p1, const gen_crc_info *crcs) const { - return !type_no_data(type) && + return !type_no_data(type) && type != RAW && type != RAWBITS && (type != CRC || (crcs[p1].type != CRC_CCITT && crcs[p1].type != CRC_AMIGA)); @@ -1179,7 +1179,7 @@ void floppy_image_format_t::generate_track(const desc_e *desc, UINT8 track, UINT int sector_limit = 0; while(desc[index].type != END) { - // printf("%d.%d.%d (%d) - %d %d\n", desc[index].type, desc[index].p1, desc[index].p2, index, offset, offset/8); + // printf("%d.%d.%d (%d) - %d %d\n", desc[index].type, desc[index].p1, desc[index].p2, index, offset, offset/8); switch(desc[index].type) { case MFM: for(int i=0; i<desc[index].p2; i++) diff --git a/src/lib/formats/flopimg.h b/src/lib/formats/flopimg.h index cbebaa2a2e5..3b9d2f1899b 100644 --- a/src/lib/formats/flopimg.h +++ b/src/lib/formats/flopimg.h @@ -271,8 +271,8 @@ protected: int size; // Sector size, int bytes const UINT8 *data; // Sector data }; - - + + // Generate one track according to the description vector // "sect" is a vector indexed by sector id // "track_size" is in _cells_, i.e. 100000 for a usual 2us-per-cell track at 300rpm diff --git a/src/lib/formats/st_dsk.c b/src/lib/formats/st_dsk.c index c7821ffe1c9..8804583270f 100644 --- a/src/lib/formats/st_dsk.c +++ b/src/lib/formats/st_dsk.c @@ -41,7 +41,7 @@ st_gen_format::st_gen_format(const char *name,const char *extensions,const char { MFM, 0xfb, 1 }, \ { SECTOR_DATA, -1 }, \ { CRC_END, cid+1 }, \ - { CRC, cid+1 } + { CRC, cid+1 } const floppy_image_format_t::desc_e st_gen_format::desc_fcp_9[] = { { MFM, 0x4e, 501 }, diff --git a/src/lib/util/cdrom.c b/src/lib/util/cdrom.c index 6825bd6a417..0e0da82e1fb 100644 --- a/src/lib/util/cdrom.c +++ b/src/lib/util/cdrom.c @@ -125,11 +125,11 @@ INLINE UINT32 physical_to_chd_lba(cdrom_file *file, UINT32 physlba, UINT32 *trac ***************************************************************************/ cdrom_file *cdrom_open(const char *inputfile) -{ +{ int i; cdrom_file *file; - UINT32 physofs; - + UINT32 physofs; + /* allocate memory for the CD-ROM file */ file = (cdrom_file *)malloc(sizeof(cdrom_file)); if (file == NULL) @@ -193,7 +193,7 @@ cdrom_file *cdrom_open(const char *inputfile) return NULL; } - return file; + return file; } /*------------------------------------------------- @@ -289,15 +289,15 @@ void cdrom_close(cdrom_file *file) /* free the cache */ if (file->cache) free(file->cache); - - if (file->chd == NULL) + + if (file->chd == NULL) { for (int i = 0; i < file->cdtoc.numtrks; i++) { core_fclose(file->fhandle[i]); } } - + free(file); } @@ -726,18 +726,18 @@ static chd_error read_sector_into_cache(cdrom_file *file, UINT32 lbasector, UINT err = chd_read(file->chd, hunknum, file->cache); if (err != CHDERR_NONE) return err; - } else { + } else { core_file *srcfile = file->fhandle[*tracknum]; UINT64 sourcefileoffset = file->track_info.offset[*tracknum]; - int bytespersector = file->cdtoc.tracks[*tracknum].datasize + file->cdtoc.tracks[*tracknum].subsize; + int bytespersector = file->cdtoc.tracks[*tracknum].datasize + file->cdtoc.tracks[*tracknum].subsize; sourcefileoffset += chdsector * bytespersector; core_fseek(srcfile, sourcefileoffset, SEEK_SET); core_fread(srcfile, file->cache, bytespersector); - if (file->track_info.swap[*tracknum]) + if (file->track_info.swap[*tracknum]) { for (int swapindex = 0; swapindex < 2352; swapindex += 2 ) { @@ -747,7 +747,7 @@ static chd_error read_sector_into_cache(cdrom_file *file, UINT32 lbasector, UINT } } } - + file->cachehunk = hunknum; } return CHDERR_NONE; diff --git a/src/lib/util/chdcd.c b/src/lib/util/chdcd.c index b5ce1de3a77..0c827e36098 100644 --- a/src/lib/util/chdcd.c +++ b/src/lib/util/chdcd.c @@ -38,7 +38,7 @@ static char linebuffer[512]; ***************************************************************************/ static astring get_file_path(astring &path) -{ +{ int pos = path.rchr( 0, '\\'); if (pos!=-1) { path = path.substr(0,pos+1); @@ -313,7 +313,7 @@ chd_error chdcd_parse_nero(const char *tocfname, cdrom_toc *outtoc, chdcd_track_ astring path = astring(tocfname); - infile = fopen(tocfname, "rt"); + infile = fopen(tocfname, "rt"); path = get_file_path(path); if (infile == (FILE *)NULL) @@ -460,7 +460,7 @@ static chd_error chdcd_parse_gdi(const char *tocfname, cdrom_toc *outtoc, chdcd_ astring path = astring(tocfname); - infile = fopen(tocfname, "rt"); + infile = fopen(tocfname, "rt"); path = get_file_path(path); if (infile == (FILE *)NULL) @@ -526,12 +526,12 @@ static chd_error chdcd_parse_gdi(const char *tocfname, cdrom_toc *outtoc, chdcd_ } astring name; - - tok=strtok(NULL," "); + + tok=strtok(NULL," "); name = tok; if (tok[0]=='"') { do { - tok=strtok(NULL," "); + tok=strtok(NULL," "); if (tok!=NULL) { name += " "; name += tok; @@ -541,7 +541,7 @@ static chd_error chdcd_parse_gdi(const char *tocfname, cdrom_toc *outtoc, chdcd_ } strncpy(outinfo->fname[trknum], path.cstr(), 256); strncat(outinfo->fname[trknum], name, 256); - + sz=get_file_size(outinfo->fname[trknum]); outtoc->tracks[trknum].frames=sz/trksize; @@ -593,7 +593,7 @@ chd_error chdcd_parse_cue(const char *tocfname, cdrom_toc *outtoc, chdcd_track_i UINT32 wavlen, wavoffs; astring path = astring(tocfname); - infile = fopen(tocfname, "rt"); + infile = fopen(tocfname, "rt"); path = get_file_path(path); if (infile == (FILE *)NULL) { @@ -869,7 +869,7 @@ chd_error chdcd_parse_toc(const char *tocfname, cdrom_toc *outtoc, chdcd_track_i astring path = astring(tocfname); - infile = fopen(tocfname, "rt"); + infile = fopen(tocfname, "rt"); path = get_file_path(path); if (infile == (FILE *)NULL) |
