From e73027f2b8891eb84abd700c7832efd0dcbf0898 Mon Sep 17 00:00:00 2001 From: Max Lingua Date: Fri, 10 Jan 2014 00:50:58 -0500 Subject: PS2: fixed tabs and alignment --- .../platform/ps2/iop/CoDyVDfs/common/codyvdirx.h | 14 ++-- backends/platform/ps2/iop/CoDyVDfs/iop/cdtypes.h | 88 +++++++++++----------- backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c | 62 +++++++-------- backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.h | 28 +++---- backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c | 6 +- backends/platform/ps2/iop/rpckbd/include/ps2kbd.h | 4 +- 6 files changed, 101 insertions(+), 101 deletions(-) (limited to 'backends/platform/ps2/iop') diff --git a/backends/platform/ps2/iop/CoDyVDfs/common/codyvdirx.h b/backends/platform/ps2/iop/CoDyVDfs/common/codyvdirx.h index e94e7dc8d6..59b4975702 100644 --- a/backends/platform/ps2/iop/CoDyVDfs/common/codyvdirx.h +++ b/backends/platform/ps2/iop/CoDyVDfs/common/codyvdirx.h @@ -26,13 +26,13 @@ #define CDVDFS_IRX_ID 0xD004352 // commands: -#define READ_RTC 0 -#define SET_READ_SPEED 1 -#define DRIVE_STOP 2 -#define DRIVE_STANDBY 3 +#define READ_RTC 0 +#define SET_READ_SPEED 1 +#define DRIVE_STOP 2 +#define DRIVE_STANDBY 3 -#define CdTrayOpen 0 -#define CdTrayClose 1 -#define CdTrayCheck 2 +#define CdTrayOpen 0 +#define CdTrayClose 1 +#define CdTrayCheck 2 #endif // CDVDFS_COMMON_H diff --git a/backends/platform/ps2/iop/CoDyVDfs/iop/cdtypes.h b/backends/platform/ps2/iop/CoDyVDfs/iop/cdtypes.h index ad86631cfd..66c583794f 100644 --- a/backends/platform/ps2/iop/CoDyVDfs/iop/cdtypes.h +++ b/backends/platform/ps2/iop/CoDyVDfs/iop/cdtypes.h @@ -39,24 +39,24 @@ typedef struct { } ISOPathTableRecord __attribute__ ((packed)); typedef struct { - uint8 year; // Number of years since 1900 - uint8 month; // Month of the year from 1 to 12 - uint8 day; // Day of the Month from 1 to 31 - uint8 hour; // Hour of the day from 0 to 23 - uint8 min; // Minute of the hour from 0 to 59 - uint8 sec; // second of the minute from 0 to 59 - uint8 gmtOff; // Offset from Greenwich Mean Time in number of 15 minute intervals from -48(West) to +52(East) + uint8 year; // Number of years since 1900 + uint8 month; // Month of the year from 1 to 12 + uint8 day; // Day of the Month from 1 to 31 + uint8 hour; // Hour of the day from 0 to 23 + uint8 min; // Minute of the hour from 0 to 59 + uint8 sec; // second of the minute from 0 to 59 + uint8 gmtOff; // Offset from Greenwich Mean Time in number of 15 minute intervals from -48(West) to +52(East) uint8 padding[10]; } ISOTime __attribute__ ((packed)); typedef struct { - uint8 year; // Number of years since 1900 - uint8 month; // Month of the year from 1 to 12 - uint8 day; // Day of the Month from 1 to 31 - uint8 hour; // Hour of the day from 0 to 23 - uint8 min; // Minute of the hour from 0 to 59 - uint8 sec; // second of the minute from 0 to 59 - uint8 gmtOff; // Offset from Greenwich Mean Time in number of 15 minute intervals from -48(West) to +52(East) + uint8 year; // Number of years since 1900 + uint8 month; // Month of the year from 1 to 12 + uint8 day; // Day of the Month from 1 to 31 + uint8 hour; // Hour of the day from 0 to 23 + uint8 min; // Minute of the hour from 0 to 59 + uint8 sec; // second of the minute from 0 to 59 + uint8 gmtOff; // Offset from Greenwich Mean Time in number of 15 minute intervals from -48(West) to +52(East) //uint8 padding[10]; } ISOFileTime __attribute__ ((packed)); @@ -96,38 +96,38 @@ typedef struct { uint8 reserved[6]; uint8 reserved2; uint8 reserved3; -} ISORoot __attribute__((packed)); // 0x22 +} ISORoot __attribute__((packed)); // 0x22 typedef struct { - uint8 type; // 0x00 - char identifier[5]; // 0x01 - uint8 version; // 0x06 - uint8 reserved1; // 0x07 - char systemIdentifier[32]; // 0x08 + uint8 type; // 0x00 + char identifier[5]; // 0x01 + uint8 version; // 0x06 + uint8 reserved1; // 0x07 + char systemIdentifier[32]; // 0x08 char volumeIdentifier[32]; // 0x28 - uint8 reserved2[8]; // 0x48 - uint32 volumeSpaceSize; // 0x50 - uint32 volumeSpaceSizeBE; // 0x54 - char reserved3[32]; // 0x58 - uint32 volumeSetSize; // 0x78 - uint32 volumeSequenceNumber; // 0x7C - uint32 logicalBlockSize; // 0x80 - uint32 pathTableSize; // 0x84 - uint32 pathTableSizeBE; // 0x88 - uint32 pathTablePos; // 0x8C - uint32 pathTable2Pos; // 0x90 - uint32 pathTablePosBE; // 0x94 - uint32 pathTable2PosBE; // 0x98 - ISORoot rootDir; // 0x9C - ISOIds ids; // 0xBE - ISOTime creation; // 0x32D - ISOTime modification; // 0x33E - ISOTime expiration; // 0x34F - ISOTime effective; // 0x360 - uint8 fileStructureVersion; // 0x371 - uint8 reserved4; // 0x372 - uint8 applicationUse[512]; // 0x373 - uint8 reserved5[653]; // 0x573 -} ISOPvd __attribute__ ((packed)); // 0x800 + uint8 reserved2[8]; // 0x48 + uint32 volumeSpaceSize; // 0x50 + uint32 volumeSpaceSizeBE; // 0x54 + char reserved3[32]; // 0x58 + uint32 volumeSetSize; // 0x78 + uint32 volumeSequenceNumber; // 0x7C + uint32 logicalBlockSize; // 0x80 + uint32 pathTableSize; // 0x84 + uint32 pathTableSizeBE; // 0x88 + uint32 pathTablePos; // 0x8C + uint32 pathTable2Pos; // 0x90 + uint32 pathTablePosBE; // 0x94 + uint32 pathTable2PosBE; // 0x98 + ISORoot rootDir; // 0x9C + ISOIds ids; // 0xBE + ISOTime creation; // 0x32D + ISOTime modification; // 0x33E + ISOTime expiration; // 0x34F + ISOTime effective; // 0x360 + uint8 fileStructureVersion; // 0x371 + uint8 reserved4; // 0x372 + uint8 applicationUse[512]; // 0x373 + uint8 reserved5[653]; // 0x573 +} ISOPvd __attribute__ ((packed)); // 0x800 #endif // __CDTYPES_H__ diff --git a/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c b/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c index 932d589a3b..2a94560843 100644 --- a/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c +++ b/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c @@ -59,7 +59,7 @@ int verifyDriveReady(void) { return -1; // drive still not ready } } - if (mediaType == DISC_NONE) + if (mediaType == DISC_NONE) return -1; return 0; } @@ -72,7 +72,7 @@ int cacheEnterDir(ISODirectoryRecord *dir) { cachedDirOfs = 0; cacheName = cachedDir + strlen(cachedDir); memcpy(cacheName, dir->name, dir->len_fi); - cacheName[dir->len_fi] = '/'; + cacheName[dir->len_fi] = '/'; cacheName[dir->len_fi + 1] = '\0'; return cdReadSectors(cachedDirLba, 1, cacheBuf, &rmode); } @@ -104,7 +104,7 @@ ISODirectoryRecord *findEntryInCache(const char *name, int nameLen) { if (i != cachedDirOfs) { if (cdReadSectors(cachedDirLba + i, 1, cacheBuf, &rmode) < 0) return NULL; - cachedDirOfs = i; + cachedDirOfs = i; } while (entry->len_dr && ((uint8 *)entry < cacheBuf + SECTOR_SIZE)) { @@ -118,7 +118,7 @@ ISODirectoryRecord *findEntryInCache(const char *name, int nameLen) { entry = (ISODirectoryRecord *)( (uint8 *)entry + entry->len_dr ); } } - return NULL; + return NULL; } ISODirectoryRecord *findPath(const char *path) { @@ -257,7 +257,7 @@ int initDisc(void) { mediaType = discType; DBG_PRINTF("Root directory in sector %d\n", fsRootLba); - return initRootCache(); + return initRootCache(); } } } @@ -290,46 +290,46 @@ int cd_init(iop_device_t *dev) { } iop_device_ops_t FS_ops = { - (void *) cd_init, - (void *) cd_dummy, - (void *) cd_dummy, - (void *) cd_open, - (void *) cd_close, - (void *) cd_read, - (void *) cd_dummy, - (void *) cd_lseek, - (void *) cd_dummy, - (void *) cd_dummy, - (void *) cd_dummy, - (void *) cd_dummy, - (void *) cd_dopen, - (void *) cd_dclose, - (void *) cd_dread, - (void *) cd_dummy, - (void *) cd_dummy, + (void *) cd_init, + (void *) cd_dummy, + (void *) cd_dummy, + (void *) cd_open, + (void *) cd_close, + (void *) cd_read, + (void *) cd_dummy, + (void *) cd_lseek, + (void *) cd_dummy, + (void *) cd_dummy, + (void *) cd_dummy, + (void *) cd_dummy, + (void *) cd_dopen, + (void *) cd_dclose, + (void *) cd_dread, + (void *) cd_dummy, + (void *) cd_dummy, }; #define FS_NAME "cdfs" #define FS_DESC "CD-ROM" iop_device_t fsdriver = { - FS_NAME, - IOP_DT_FS | IOP_DT_FSEXT, - 1, - FS_DESC, - &FS_ops + FS_NAME, + IOP_DT_FS | IOP_DT_FSEXT, + 1, + FS_DESC, + &FS_ops }; int _start(void) { - printf("CoDyVDfs v0.01\n"); + printf("CoDyVDfs v0.01\n"); CdInit(1); - DelDrv(FS_NAME); - AddDrv(&fsdriver); + DelDrv(FS_NAME); + AddDrv(&fsdriver); initRpc(); initFio(); - return(0); + return(0); } int strnicmp(const char *s1, const char *s2, int n) { diff --git a/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.h b/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.h index b9f1edc194..93124f9037 100644 --- a/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.h +++ b/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.h @@ -51,20 +51,20 @@ enum ReadModes { }; enum { - CdDiskNone = 0x00, - CdDiskDetect, // 0x01 - CdDiskDetectCD, // 0x02 - CdDiskDetectDVD, // 0x03 - CdDiskDetectUnk = 0x05, - CdDiskCDPS1 = 0x10, - CdDiskCDDAPS1 = 0x11, - CdDiskCDPS2 = 0x12, - CdDiskCDDAPS2 = 0x13, - CdDiskDVDPS2 = 0x14, - CdDiskDVDV2 = 0xFC, - CdDiskCDDA = 0xFD, - CdDiskDVDV = 0xFE, - CdDiskIllegal = 0xFF + CdDiskNone = 0x00, + CdDiskDetect, // 0x01 + CdDiskDetectCD, // 0x02 + CdDiskDetectDVD, // 0x03 + CdDiskDetectUnk = 0x05, + CdDiskCDPS1 = 0x10, + CdDiskCDDAPS1 = 0x11, + CdDiskCDPS2 = 0x12, + CdDiskCDDAPS2 = 0x13, + CdDiskDVDPS2 = 0x14, + CdDiskDVDV2 = 0xFC, + CdDiskCDDA = 0xFD, + CdDiskDVDV = 0xFE, + CdDiskIllegal = 0xFF }; #define DISC_NOT_READY(type) ((type > CdDiskNone) && (type < CdDiskCDPS1) && (type != CdDiskDetectUnk)) diff --git a/backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c b/backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c index 5c5cbf94ef..611211a715 100644 --- a/backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c +++ b/backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c @@ -171,13 +171,13 @@ int cd_read(iop_file_t *handle, void *dest, int length) { numLba = bytesLeft >> 11; if (cdReadSectors(readLba, numLba, destPos, &rmode) != 0) break; - readLba += numLba; + readLba += numLba; fd->pos += numLba << 11; destPos += numLba << 11; bytesLeft &= 0x7FF; } } - return destPos - (uint8 *)dest; + return destPos - (uint8 *)dest; } int cd_close(iop_file_t *handle) { @@ -252,7 +252,7 @@ int cd_dread(iop_file_t *handle, iox_dirent_t *buf) { } } } - return 0; + return 0; } int cd_dclose(iop_file_t *handle) { diff --git a/backends/platform/ps2/iop/rpckbd/include/ps2kbd.h b/backends/platform/ps2/iop/rpckbd/include/ps2kbd.h index 07d9c3d7f9..6bef7caefa 100644 --- a/backends/platform/ps2/iop/rpckbd/include/ps2kbd.h +++ b/backends/platform/ps2/iop/rpckbd/include/ps2kbd.h @@ -87,8 +87,8 @@ typedef struct _kbd_keymap #define KBD_RPC_SETSPECIALMAP 7 /* Sets the special key mapping */ #define KBD_RPC_FLUSHBUFFER 9 /* Flush the internal buffer, probably best after a keymap change */ #define KBD_RPC_RESETKEYMAP 10 /* Reset keymaps to default states */ -#define KBD_RPC_READKEY 11 -#define KBD_RPC_READRAW 12 +#define KBD_RPC_READKEY 11 +#define KBD_RPC_READRAW 12 /* Note on keymaps. In normal keymap a 0 would indicate no key */ /* Key maps are represented by 3 256*8bit tables. First table maps USB key to a char when not shifted */ -- cgit v1.2.3