Change unsigned char to uint8_t.

This commit is contained in:
2019-03-20 22:34:21 +00:00
parent 31cdaed693
commit 8abcacc22e
6 changed files with 70 additions and 68 deletions

View File

@@ -1030,31 +1030,31 @@ typedef struct ImageInfo
/** Sector tags contained by the image */
//List<SectorTagType> ReadableSectorTags;
/** Image version */
unsigned char *Version;
uint8_t *Version;
/** Application that created the image */
unsigned char *Application;
uint8_t *Application;
/** Version of the application that created the image */
unsigned char *ApplicationVersion;
uint8_t *ApplicationVersion;
/** Who (person) created the image? */
unsigned char *Creator;
uint8_t *Creator;
/** Image creation time */
int64_t CreationTime;
/** Image last modification time */
int64_t LastModificationTime;
/** Title of the media represented by the image */
unsigned char *MediaTitle;
uint8_t *MediaTitle;
/** Image comments */
unsigned char *Comments;
uint8_t *Comments;
/** Manufacturer of the media represented by the image */
unsigned char *MediaManufacturer;
uint8_t *MediaManufacturer;
/** Model of the media represented by the image */
unsigned char *MediaModel;
uint8_t *MediaModel;
/** Serial number of the media represented by the image */
unsigned char *MediaSerialNumber;
uint8_t *MediaSerialNumber;
/** Barcode of the media represented by the image */
unsigned char *MediaBarcode;
uint8_t *MediaBarcode;
/** Part number of the media represented by the image */
unsigned char *MediaPartNumber;
uint8_t *MediaPartNumber;
/** Media type represented by the image */
uint32_t MediaType;
/** Number in sequence for the media represented by the image */
@@ -1062,13 +1062,13 @@ typedef struct ImageInfo
/** Last media of the sequence the media represented by the image corresponds to */
int32_t LastMediaSequence;
/** 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 */
unsigned char *DriveModel;
uint8_t *DriveModel;
/** 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 */
unsigned char *DriveFirmwareRevision;
uint8_t *DriveFirmwareRevision;
/** Type of the media represented by the image to use in XML sidecars */
int32_t XmlMediaType;
// CHS geometry...

View File

@@ -45,13 +45,13 @@ typedef struct dicformatContext
DicHeader header;
struct dataLinkedList *mediaTagsHead;
struct dataLinkedList *mediaTagsTail;
unsigned char *sectorPrefix;
unsigned char *sectorPrefixCorrected;
unsigned char *sectorSuffix;
unsigned char *sectorSuffixCorrected;
unsigned char *sectorSubchannel;
unsigned char *mode2Subheaders;
unsigned char shift;
uint8_t *sectorPrefix;
uint8_t *sectorPrefixCorrected;
uint8_t *sectorSuffix;
uint8_t *sectorSuffixCorrected;
uint8_t *sectorSubchannel;
uint8_t *mode2Subheaders;
uint8_t shift;
bool inMemoryDdt;
uint64_t *userDataDdt;
size_t mappedMemoryDdtSize;
@@ -59,11 +59,11 @@ typedef struct dicformatContext
uint32_t *sectorSuffixDdt;
GeometryBlockHeader geometryBlock;
MetadataBlockHeader metadataBlockHeader;
unsigned char *metadataBlock;
uint8_t *metadataBlock;
TracksHeader tracksHeader;
TrackEntry *trackEntries;
CicmMetadataBlock cicmBlockHeader;
unsigned char *cicmBlock;
uint8_t *cicmBlock;
DumpHardwareHeader dumpHardwareHeader;
struct DumpHardwareEntriesWithData *dumpHardwareEntriesWithData;
struct ImageInfo imageInfo;
@@ -73,7 +73,7 @@ typedef struct dataLinkedList
{
struct dataLinkedList *previous;
struct dataLinkedList *next;
unsigned char *data;
uint8_t *data;
int type;
} dataLinkedList;
@@ -81,14 +81,14 @@ typedef struct DumpHardwareEntriesWithData
{
DumpHardwareEntry entry;
struct DumpExtent *extents;
unsigned char *manufacturer;
unsigned char *model;
unsigned char *revision;
unsigned char *firmware;
unsigned char *serial;
unsigned char *softwareName;
unsigned char *softwareVersion;
unsigned char *softwareOperatingSystem;
uint8_t *manufacturer;
uint8_t *model;
uint8_t *revision;
uint8_t *firmware;
uint8_t *serial;
uint8_t *softwareName;
uint8_t *softwareVersion;
uint8_t *softwareOperatingSystem;
} DumpHardwareEntriesWithData;
#pragma pack(push, 1)

View File

@@ -33,6 +33,8 @@
#ifndef LIBDICFORMAT_DECLS_H
#define LIBDICFORMAT_DECLS_H
#include <stdint.h>
int identify(const char *filename);
int identifyStream(FILE *imageStream);
@@ -41,7 +43,7 @@ void *open(const char *filepath);
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

View File

@@ -47,7 +47,7 @@ typedef struct DicHeader
/**Header identifier, <see cref="DIC_MAGIC" /> */
uint64_t identifier;
/**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 */
uint8_t imageMajorVersion;
/**Image format minor version. A new minor version indicates a compatible change of format */
@@ -230,7 +230,7 @@ typedef struct TrackEntry
/**Track session */
uint8_t session;
/**Track's ISRC in ASCII */
unsigned char isrc[13];
uint8_t isrc[13];
/**Track flags */
uint8_t flags;
} TrackEntry;

View File

@@ -47,7 +47,7 @@ void *open(const char *filepath)
long pos;
IndexHeader idxHeader;
IndexEntry *idxEntries;
unsigned char *data;
uint8_t *data;
memset(ctx, 0, sizeof(dicformatContext));

View File

@@ -33,7 +33,7 @@
#include <dicformat.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)
{