1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 02:51:27 +00:00

Convert custom HeadSpin integer types to standard types from stdint.h

This commit is contained in:
2012-01-19 21:19:26 -05:00
parent a0d54e2644
commit 5027b5a4ac
1301 changed files with 14497 additions and 14532 deletions

View File

@ -76,7 +76,7 @@ enum EFileError {
EFileError AsyncGetLastFileError ();
const wchar * FileErrorToString (EFileError error);
const wchar_t * FileErrorToString (EFileError error);
/****************************************************************************
@ -99,19 +99,19 @@ struct AsyncNotifyFile {
};
struct AsyncNotifyFileConnect : AsyncNotifyFile {
qword fileSize;
qword fileLastWriteTime;
uint64_t fileSize;
uint64_t fileLastWriteTime;
};
struct AsyncNotifyFileFlush : AsyncNotifyFile {
EFileError error;
qword truncateSize;
uint64_t truncateSize;
};
struct AsyncNotifyFileRead : AsyncNotifyFile {
qword offset;
byte * buffer;
unsigned bytes;
uint64_t offset;
uint8_t * buffer;
unsigned bytes;
};
typedef AsyncNotifyFileRead AsyncNotifyFileWrite;
@ -147,19 +147,19 @@ const unsigned kAsyncFileShareRead = 0x00000001;
const unsigned kAsyncFileShareWrite = 0x00000002;
AsyncFile AsyncFileOpen (
const wchar fullPath[],
const wchar_t fullPath[],
FAsyncNotifyFileProc notifyProc,
EFileError * error,
unsigned desiredAccess,
unsigned openMode,
unsigned shareModeFlags, // optional
void * userState, // optional
qword * fileSize, // optional
qword * fileLastWriteTime // optional
uint64_t * fileSize, // optional
uint64_t * fileLastWriteTime // optional
);
// Use with AsyncFileDelete/AsyncFileFlushBuffers
const qword kAsyncFileDontTruncate = (qword) -1;
const uint64_t kAsyncFileDontTruncate = (uint64_t) -1;
// This function may ONLY be called when there is no outstanding I/O against a file
// and no more I/O will be initiated against it. This function guarantees that it
@ -167,23 +167,23 @@ const qword kAsyncFileDontTruncate = (qword) -1;
// the same filename can succeed.
void AsyncFileClose (
AsyncFile file,
qword truncateSize
uint64_t truncateSize
);
void AsyncFileSetLastWriteTime (
AsyncFile file,
qword lastWriteTime
uint64_t lastWriteTime
);
qword AsyncFileGetLastWriteTime (
const wchar fileName[]
uint64_t AsyncFileGetLastWriteTime (
const wchar_t fileName[]
);
// Truncation occurs atomically, any writes which occur after
// AsyncFileFlushBuffers will be queued until the truncation completes
AsyncId AsyncFileFlushBuffers (
AsyncFile file,
qword truncateSize,
uint64_t truncateSize,
bool notify,
void * param
);
@ -193,7 +193,7 @@ const unsigned kAsyncFileRwSync = 1<<1;
AsyncId AsyncFileRead (
AsyncFile file,
qword offset,
uint64_t offset,
void * buffer,
unsigned bytes,
unsigned flags,
@ -203,7 +203,7 @@ AsyncId AsyncFileRead (
// Buffer must stay valid until I/O is completed
AsyncId AsyncFileWrite (
AsyncFile file,
qword offset,
uint64_t offset,
const void * buffer,
unsigned bytes,
unsigned flags,
@ -227,7 +227,7 @@ enum EFileSeekFrom {
bool AsyncFileSeek (
AsyncFile file,
qword distance,
uint64_t distance,
EFileSeekFrom seekFrom
);
@ -240,11 +240,11 @@ bool AsyncFileSeek (
#include <PshPack1.h>
struct AsyncSocketConnectPacket {
byte connType;
word hdrBytes;
dword buildId;
dword buildType;
dword branchId;
uint8_t connType;
uint16_t hdrBytes;
uint32_t buildId;
uint32_t buildType;
uint32_t branchId;
Uuid productId;
};
#include <PopPack.h>
@ -282,13 +282,13 @@ struct AsyncNotifySocketListen : AsyncNotifySocketConnect {
unsigned branchId;
Uuid productId;
NetAddress addr;
byte * buffer;
uint8_t * buffer;
unsigned bytes;
unsigned bytesProcessed;
};
struct AsyncNotifySocketRead : AsyncNotifySocket {
byte * buffer;
uint8_t * buffer;
unsigned bytes;
unsigned bytesProcessed;
};
@ -344,7 +344,7 @@ COMPILER_ASSERT_HEADER(EConnType, kNumConnTypes < 256);
void AsyncSocketRegisterNotifyProc (
byte connType,
uint8_t connType,
FAsyncNotifySocketProc notifyProc,
unsigned buildId = 0,
unsigned buildType = 0,
@ -353,7 +353,7 @@ void AsyncSocketRegisterNotifyProc (
);
void AsyncSocketUnregisterNotifyProc (
byte connType,
uint8_t connType,
FAsyncNotifySocketProc notifyProc,
unsigned buildId = 0,
unsigned buildType = 0,
@ -362,7 +362,7 @@ void AsyncSocketUnregisterNotifyProc (
);
FAsyncNotifySocketProc AsyncSocketFindNotifyProc (
const byte buffer[],
const uint8_t buffer[],
unsigned bytes,
unsigned * bytesProcessed,
unsigned * connType,
@ -465,7 +465,7 @@ void AsyncSocketEnableNagling (
typedef void (* FAsyncLookupProc) (
void * param,
const wchar name[],
const wchar_t name[],
unsigned addrCount,
const NetAddress addrs[]
);
@ -473,7 +473,7 @@ typedef void (* FAsyncLookupProc) (
void AsyncAddressLookupName (
AsyncCancelId * cancelId,
FAsyncLookupProc lookupProc,
const wchar name[],
const wchar_t name[],
unsigned port,
void * param
);

View File

@ -67,7 +67,7 @@ static FLogHandler s_asyncHandlers[kMaxHandlers];
***/
//===========================================================================
static void Dispatch (ELogSeverity severity, const wchar msg[]) {
static void Dispatch (ELogSeverity severity, const wchar_t msg[]) {
// Dispatch to default debug handler
char dbg[1024];
@ -132,7 +132,7 @@ void __cdecl LogMsg (ELogSeverity severity, const char format[], ...) {
}
//===========================================================================
void __cdecl LogMsg (ELogSeverity severity, const wchar format[], ...) {
void __cdecl LogMsg (ELogSeverity severity, const wchar_t format[], ...) {
ASSERT(format);
va_list args;
@ -148,18 +148,18 @@ void LogMsgV (ELogSeverity severity, const char format[], va_list args) {
char msg[1024];
StrPrintfV(msg, arrsize(msg), format, args);
wchar uniMsg[1024];
wchar_t uniMsg[1024];
StrToUnicode(uniMsg, msg, arrsize(uniMsg));
Dispatch(severity, uniMsg);
}
//===========================================================================
void LogMsgV (ELogSeverity severity, const wchar format[], va_list args) {
void LogMsgV (ELogSeverity severity, const wchar_t format[], va_list args) {
ASSERT(format);
ASSERT(args);
wchar msg[1024];
wchar_t msg[1024];
StrPrintfV(msg, arrsize(msg), format, args);
Dispatch(severity, msg);
@ -179,7 +179,7 @@ void LogMsgDebug (const char format[], ...) {
//============================================================================
#ifdef HS_DEBUGGING
void LogMsgDebug (const wchar format[], ...) {
void LogMsgDebug (const wchar_t format[], ...) {
ASSERT(format);
va_list args;

View File

@ -77,32 +77,32 @@ enum ELogSeverity {
};
void LogMsg (ELogSeverity severity, const char format[], ...);
void LogMsg (ELogSeverity severity, const wchar format[], ...);
void LogMsg (ELogSeverity severity, const wchar_t format[], ...);
void LogMsgV (ELogSeverity severity, const char format[], va_list args);
void LogMsgV (ELogSeverity severity, const wchar format[], va_list args);
void LogMsgV (ELogSeverity severity, const wchar_t format[], va_list args);
void LogBreakOnErrors (bool breakOnErrors);
void AsyncLogInitialize (
const wchar logDirName[],
const wchar_t logDirName[],
bool breakOnErrors
);
void AsyncLogDestroy ();
void AsyncLogFlush ();
void AsyncLogGetDirectory (wchar * dest, unsigned destChars);
void AsyncLogGetDirectory (wchar_t * dest, unsigned destChars);
// Low(er) level log API; call this from your LogHander function
// if you want to use the asynchronous log facility.
void AsyncLogWriteMsg (
const wchar facility[],
const wchar_t facility[],
ELogSeverity severity,
const wchar msg[]
const wchar_t msg[]
);
// FLogHandler must be capable of handling multiple threads and re-entrancy
typedef void (* FLogHandler) (ELogSeverity severity, const wchar msg[]);
typedef void (* FLogHandler) (ELogSeverity severity, const wchar_t msg[]);
void LogRegisterHandler (FLogHandler callback);
void LogUnregisterHandler (FLogHandler callback);
@ -117,11 +117,11 @@ void LogUnregisterHandler (FLogHandler callback);
#ifdef HS_DEBUGGING
void LogMsgDebug (const char format[], ...);
void LogMsgDebug (const wchar format[], ...);
void LogMsgDebug (const wchar_t format[], ...);
#else
inline void LogMsgDebug (const char *, ...) { }
inline void LogMsgDebug (const wchar *, ...) { }
inline void LogMsgDebug (const wchar_t *, ...) { }
#endif

View File

@ -83,7 +83,7 @@ struct AsyncThread {
void * handle;
void * argument;
unsigned workTimeMs;
wchar name[16];
wchar_t name[16];
};
/*****************************************************************************
@ -95,7 +95,7 @@ struct AsyncThread {
void * AsyncThreadCreate (
FAsyncThreadProc proc,
void * argument,
const wchar name[]
const wchar_t name[]
);
// This function should ONLY be called during shutdown while waiting for things to expire
@ -141,6 +141,6 @@ void AsyncThreadTaskAdd (
AsyncThreadTaskList * taskList,
FAsyncThreadTask callback,
void * param,
const wchar debugStr[],
const wchar_t debugStr[],
EThreadTaskPriority priority = kThreadTaskPriorityNormal
);