mirror of
https://github.com/aaru-dps/libaaruformat.git
synced 2025-12-16 19:24:40 +00:00
Change unsigned char to uint8_t.
This commit is contained in:
@@ -1016,68 +1016,68 @@ typedef enum
|
|||||||
typedef struct ImageInfo
|
typedef struct ImageInfo
|
||||||
{
|
{
|
||||||
/** Image contains partitions (or tracks for optical media) */
|
/** Image contains partitions (or tracks for optical media) */
|
||||||
uint8_t HasPartitions;
|
uint8_t HasPartitions;
|
||||||
/** Image contains sessions (optical media only) */
|
/** Image contains sessions (optical media only) */
|
||||||
uint8_t HasSessions;
|
uint8_t HasSessions;
|
||||||
/** Size of the image without headers */
|
/** Size of the image without headers */
|
||||||
uint64_t ImageSize;
|
uint64_t ImageSize;
|
||||||
/** Sectors contained in the image */
|
/** Sectors contained in the image */
|
||||||
uint64_t Sectors;
|
uint64_t Sectors;
|
||||||
/** Size of sectors contained in the image */
|
/** Size of sectors contained in the image */
|
||||||
uint32_t SectorSize;
|
uint32_t SectorSize;
|
||||||
/** Media tags contained by the image */
|
/** Media tags contained by the image */
|
||||||
//List<MediaTagType> ReadableMediaTags;
|
//List<MediaTagType> ReadableMediaTags;
|
||||||
/** Sector tags contained by the image */
|
/** Sector tags contained by the image */
|
||||||
//List<SectorTagType> ReadableSectorTags;
|
//List<SectorTagType> ReadableSectorTags;
|
||||||
/** Image version */
|
/** Image version */
|
||||||
unsigned char *Version;
|
uint8_t *Version;
|
||||||
/** Application that created the image */
|
/** Application that created the image */
|
||||||
unsigned char *Application;
|
uint8_t *Application;
|
||||||
/** Version of the application that created the image */
|
/** Version of the application that created the image */
|
||||||
unsigned char *ApplicationVersion;
|
uint8_t *ApplicationVersion;
|
||||||
/** Who (person) created the image? */
|
/** Who (person) created the image? */
|
||||||
unsigned char *Creator;
|
uint8_t *Creator;
|
||||||
/** Image creation time */
|
/** Image creation time */
|
||||||
int64_t CreationTime;
|
int64_t CreationTime;
|
||||||
/** Image last modification time */
|
/** Image last modification time */
|
||||||
int64_t LastModificationTime;
|
int64_t LastModificationTime;
|
||||||
/** Title of the media represented by the image */
|
/** Title of the media represented by the image */
|
||||||
unsigned char *MediaTitle;
|
uint8_t *MediaTitle;
|
||||||
/** Image comments */
|
/** Image comments */
|
||||||
unsigned char *Comments;
|
uint8_t *Comments;
|
||||||
/** Manufacturer of the media represented by the image */
|
/** Manufacturer of the media represented by the image */
|
||||||
unsigned char *MediaManufacturer;
|
uint8_t *MediaManufacturer;
|
||||||
/** Model of the media represented by the image */
|
/** Model of the media represented by the image */
|
||||||
unsigned char *MediaModel;
|
uint8_t *MediaModel;
|
||||||
/** Serial number of the media represented by the image */
|
/** Serial number of the media represented by the image */
|
||||||
unsigned char *MediaSerialNumber;
|
uint8_t *MediaSerialNumber;
|
||||||
/** Barcode of the media represented by the image */
|
/** Barcode of the media represented by the image */
|
||||||
unsigned char *MediaBarcode;
|
uint8_t *MediaBarcode;
|
||||||
/** Part number of the media represented by the image */
|
/** Part number of the media represented by the image */
|
||||||
unsigned char *MediaPartNumber;
|
uint8_t *MediaPartNumber;
|
||||||
/** Media type represented by the image */
|
/** Media type represented by the image */
|
||||||
uint32_t MediaType;
|
uint32_t MediaType;
|
||||||
/** Number in sequence for the media represented by the image */
|
/** Number in sequence for the media represented by the image */
|
||||||
int32_t MediaSequence;
|
int32_t MediaSequence;
|
||||||
/** Last media of the sequence the media represented by the image corresponds to */
|
/** Last media of the sequence the media represented by the image corresponds to */
|
||||||
int32_t LastMediaSequence;
|
int32_t LastMediaSequence;
|
||||||
/** Manufacturer of the drive used to read the media represented by the image */
|
/** Manufacturer of the drive used to read the media represented by the image */
|
||||||
unsigned char *DriveManufacturer;
|
uint8_t *DriveManufacturer;
|
||||||
/** Model of the drive used to read the media represented by the image */
|
/** Model of the drive used to read the media represented by the image */
|
||||||
unsigned char *DriveModel;
|
uint8_t *DriveModel;
|
||||||
/** Serial number of the drive used to read the media represented by the image */
|
/** Serial number of the drive used to read the media represented by the image */
|
||||||
unsigned char *DriveSerialNumber;
|
uint8_t *DriveSerialNumber;
|
||||||
/** Firmware revision of the drive used to read the media represented by the image */
|
/** Firmware revision of the drive used to read the media represented by the image */
|
||||||
unsigned char *DriveFirmwareRevision;
|
uint8_t *DriveFirmwareRevision;
|
||||||
/** Type of the media represented by the image to use in XML sidecars */
|
/** Type of the media represented by the image to use in XML sidecars */
|
||||||
int32_t XmlMediaType;
|
int32_t XmlMediaType;
|
||||||
// CHS geometry...
|
// CHS geometry...
|
||||||
/** Cylinders of the media represented by the image */
|
/** Cylinders of the media represented by the image */
|
||||||
uint32_t Cylinders;
|
uint32_t Cylinders;
|
||||||
/** Heads of the media represented by the image */
|
/** Heads of the media represented by the image */
|
||||||
uint32_t Heads;
|
uint32_t Heads;
|
||||||
/** Sectors per track of the media represented by the image (for variable image, the smallest) */
|
/** Sectors per track of the media represented by the image (for variable image, the smallest) */
|
||||||
uint32_t SectorsPerTrack;
|
uint32_t SectorsPerTrack;
|
||||||
} ImageInfo;
|
} ImageInfo;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -45,13 +45,13 @@ typedef struct dicformatContext
|
|||||||
DicHeader header;
|
DicHeader header;
|
||||||
struct dataLinkedList *mediaTagsHead;
|
struct dataLinkedList *mediaTagsHead;
|
||||||
struct dataLinkedList *mediaTagsTail;
|
struct dataLinkedList *mediaTagsTail;
|
||||||
unsigned char *sectorPrefix;
|
uint8_t *sectorPrefix;
|
||||||
unsigned char *sectorPrefixCorrected;
|
uint8_t *sectorPrefixCorrected;
|
||||||
unsigned char *sectorSuffix;
|
uint8_t *sectorSuffix;
|
||||||
unsigned char *sectorSuffixCorrected;
|
uint8_t *sectorSuffixCorrected;
|
||||||
unsigned char *sectorSubchannel;
|
uint8_t *sectorSubchannel;
|
||||||
unsigned char *mode2Subheaders;
|
uint8_t *mode2Subheaders;
|
||||||
unsigned char shift;
|
uint8_t shift;
|
||||||
bool inMemoryDdt;
|
bool inMemoryDdt;
|
||||||
uint64_t *userDataDdt;
|
uint64_t *userDataDdt;
|
||||||
size_t mappedMemoryDdtSize;
|
size_t mappedMemoryDdtSize;
|
||||||
@@ -59,11 +59,11 @@ typedef struct dicformatContext
|
|||||||
uint32_t *sectorSuffixDdt;
|
uint32_t *sectorSuffixDdt;
|
||||||
GeometryBlockHeader geometryBlock;
|
GeometryBlockHeader geometryBlock;
|
||||||
MetadataBlockHeader metadataBlockHeader;
|
MetadataBlockHeader metadataBlockHeader;
|
||||||
unsigned char *metadataBlock;
|
uint8_t *metadataBlock;
|
||||||
TracksHeader tracksHeader;
|
TracksHeader tracksHeader;
|
||||||
TrackEntry *trackEntries;
|
TrackEntry *trackEntries;
|
||||||
CicmMetadataBlock cicmBlockHeader;
|
CicmMetadataBlock cicmBlockHeader;
|
||||||
unsigned char *cicmBlock;
|
uint8_t *cicmBlock;
|
||||||
DumpHardwareHeader dumpHardwareHeader;
|
DumpHardwareHeader dumpHardwareHeader;
|
||||||
struct DumpHardwareEntriesWithData *dumpHardwareEntriesWithData;
|
struct DumpHardwareEntriesWithData *dumpHardwareEntriesWithData;
|
||||||
struct ImageInfo imageInfo;
|
struct ImageInfo imageInfo;
|
||||||
@@ -73,7 +73,7 @@ typedef struct dataLinkedList
|
|||||||
{
|
{
|
||||||
struct dataLinkedList *previous;
|
struct dataLinkedList *previous;
|
||||||
struct dataLinkedList *next;
|
struct dataLinkedList *next;
|
||||||
unsigned char *data;
|
uint8_t *data;
|
||||||
int type;
|
int type;
|
||||||
} dataLinkedList;
|
} dataLinkedList;
|
||||||
|
|
||||||
@@ -81,14 +81,14 @@ typedef struct DumpHardwareEntriesWithData
|
|||||||
{
|
{
|
||||||
DumpHardwareEntry entry;
|
DumpHardwareEntry entry;
|
||||||
struct DumpExtent *extents;
|
struct DumpExtent *extents;
|
||||||
unsigned char *manufacturer;
|
uint8_t *manufacturer;
|
||||||
unsigned char *model;
|
uint8_t *model;
|
||||||
unsigned char *revision;
|
uint8_t *revision;
|
||||||
unsigned char *firmware;
|
uint8_t *firmware;
|
||||||
unsigned char *serial;
|
uint8_t *serial;
|
||||||
unsigned char *softwareName;
|
uint8_t *softwareName;
|
||||||
unsigned char *softwareVersion;
|
uint8_t *softwareVersion;
|
||||||
unsigned char *softwareOperatingSystem;
|
uint8_t *softwareOperatingSystem;
|
||||||
} DumpHardwareEntriesWithData;
|
} DumpHardwareEntriesWithData;
|
||||||
|
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
|
|||||||
@@ -33,6 +33,8 @@
|
|||||||
#ifndef LIBDICFORMAT_DECLS_H
|
#ifndef LIBDICFORMAT_DECLS_H
|
||||||
#define LIBDICFORMAT_DECLS_H
|
#define LIBDICFORMAT_DECLS_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
int identify(const char *filename);
|
int identify(const char *filename);
|
||||||
|
|
||||||
int identifyStream(FILE *imageStream);
|
int identifyStream(FILE *imageStream);
|
||||||
@@ -41,7 +43,7 @@ void *open(const char *filepath);
|
|||||||
|
|
||||||
int close(void *context);
|
int close(void *context);
|
||||||
|
|
||||||
unsigned char *read_media_tag(void *context, int tag);
|
uint8_t *read_media_tag(void *context, int tag);
|
||||||
|
|
||||||
|
|
||||||
#endif //LIBDICFORMAT_DECLS_H
|
#endif //LIBDICFORMAT_DECLS_H
|
||||||
|
|||||||
@@ -45,25 +45,25 @@
|
|||||||
typedef struct DicHeader
|
typedef struct DicHeader
|
||||||
{
|
{
|
||||||
/**Header identifier, <see cref="DIC_MAGIC" /> */
|
/**Header identifier, <see cref="DIC_MAGIC" /> */
|
||||||
uint64_t identifier;
|
uint64_t identifier;
|
||||||
/**UTF-16LE name of the application that created the image */
|
/**UTF-16LE name of the application that created the image */
|
||||||
unsigned char application[64];
|
uint8_t application[64];
|
||||||
/**Image format major version. A new major version means a possibly incompatible change of format */
|
/**Image format major version. A new major version means a possibly incompatible change of format */
|
||||||
uint8_t imageMajorVersion;
|
uint8_t imageMajorVersion;
|
||||||
/**Image format minor version. A new minor version indicates a compatible change of format */
|
/**Image format minor version. A new minor version indicates a compatible change of format */
|
||||||
uint8_t imageMinorVersion;
|
uint8_t imageMinorVersion;
|
||||||
/**Major version of the application that created the image */
|
/**Major version of the application that created the image */
|
||||||
uint8_t applicationMajorVersion;
|
uint8_t applicationMajorVersion;
|
||||||
/**Minor version of the application that created the image */
|
/**Minor version of the application that created the image */
|
||||||
uint8_t applicationMinorVersion;
|
uint8_t applicationMinorVersion;
|
||||||
/**Type of media contained on image */
|
/**Type of media contained on image */
|
||||||
uint32_t mediaType;
|
uint32_t mediaType;
|
||||||
/**Offset to index */
|
/**Offset to index */
|
||||||
uint64_t indexOffset;
|
uint64_t indexOffset;
|
||||||
/**Windows filetime (100 nanoseconds since 1601/01/01 00:00:00 UTC) of image creation time */
|
/**Windows filetime (100 nanoseconds since 1601/01/01 00:00:00 UTC) of image creation time */
|
||||||
int64_t creationTime;
|
int64_t creationTime;
|
||||||
/**Windows filetime (100 nanoseconds since 1601/01/01 00:00:00 UTC) of image last written time */
|
/**Windows filetime (100 nanoseconds since 1601/01/01 00:00:00 UTC) of image last written time */
|
||||||
int64_t lastWrittenTime;
|
int64_t lastWrittenTime;
|
||||||
} DicHeader;
|
} DicHeader;
|
||||||
|
|
||||||
/**Header for a deduplication table. Table follows it */
|
/**Header for a deduplication table. Table follows it */
|
||||||
@@ -218,21 +218,21 @@ typedef struct TracksHeader
|
|||||||
typedef struct TrackEntry
|
typedef struct TrackEntry
|
||||||
{
|
{
|
||||||
/**Track sequence */
|
/**Track sequence */
|
||||||
uint8_t sequence;
|
uint8_t sequence;
|
||||||
/**Track type */
|
/**Track type */
|
||||||
uint8_t type;
|
uint8_t type;
|
||||||
/**Track starting LBA */
|
/**Track starting LBA */
|
||||||
int64_t start;
|
int64_t start;
|
||||||
/**Track last LBA */
|
/**Track last LBA */
|
||||||
int64_t end;
|
int64_t end;
|
||||||
/**Track pregap in sectors */
|
/**Track pregap in sectors */
|
||||||
int64_t pregap;
|
int64_t pregap;
|
||||||
/**Track session */
|
/**Track session */
|
||||||
uint8_t session;
|
uint8_t session;
|
||||||
/**Track's ISRC in ASCII */
|
/**Track's ISRC in ASCII */
|
||||||
unsigned char isrc[13];
|
uint8_t isrc[13];
|
||||||
/**Track flags */
|
/**Track flags */
|
||||||
uint8_t flags;
|
uint8_t flags;
|
||||||
} TrackEntry;
|
} TrackEntry;
|
||||||
|
|
||||||
/**Geometry block, contains physical geometry information */
|
/**Geometry block, contains physical geometry information */
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ void *open(const char *filepath)
|
|||||||
long pos;
|
long pos;
|
||||||
IndexHeader idxHeader;
|
IndexHeader idxHeader;
|
||||||
IndexEntry *idxEntries;
|
IndexEntry *idxEntries;
|
||||||
unsigned char *data;
|
uint8_t *data;
|
||||||
|
|
||||||
memset(ctx, 0, sizeof(dicformatContext));
|
memset(ctx, 0, sizeof(dicformatContext));
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
#include <dicformat.h>
|
#include <dicformat.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
unsigned char *read_media_tag(void *context, int tag)
|
uint8_t *read_media_tag(void *context, int tag)
|
||||||
{
|
{
|
||||||
if(context == NULL)
|
if(context == NULL)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user