Adding of _t to (u)int types, and WChar to char32_t

See: eaae0bb5e
This commit is contained in:
Jonathan G Rennison
2024-01-07 16:41:53 +00:00
parent 55d78a23be
commit 97e6f3062e
655 changed files with 7555 additions and 7555 deletions

View File

@@ -301,7 +301,7 @@ void Win32FontCache::ClearFontCache()
return glyphs[0] != 0xFFFF ? glyphs[0] : 0;
}
/* virtual */ const void *Win32FontCache::InternalGetFontTable(uint32 tag, size_t &length)
/* virtual */ const void *Win32FontCache::InternalGetFontTable(uint32_t tag, size_t &length)
{
DWORD len = GetFontData(this->dc, tag, 0, nullptr, 0);

View File

@@ -26,7 +26,7 @@ private:
void SetFontSize(int pixels);
protected:
const void *InternalGetFontTable(uint32 tag, size_t &length) override;
const void *InternalGetFontTable(uint32_t tag, size_t &length) override;
const Sprite *InternalGetGlyph(GlyphID key, bool aa) override;
public:

View File

@@ -55,7 +55,7 @@ struct UniscribeRun {
};
/** Break a string into language formatting ranges. */
static std::vector<SCRIPT_ITEM> UniscribeItemizeString(UniscribeParagraphLayoutFactory::CharType *buff, int32 length);
static std::vector<SCRIPT_ITEM> UniscribeItemizeString(UniscribeParagraphLayoutFactory::CharType *buff, int32_t length);
/** Generate and place glyphs for a run of characters. */
static bool UniscribeShapeRun(const UniscribeParagraphLayoutFactory::CharType *buff, UniscribeRun &range);
@@ -248,7 +248,7 @@ static bool UniscribeShapeRun(const UniscribeParagraphLayoutFactory::CharType *b
return true;
}
static std::vector<SCRIPT_ITEM> UniscribeItemizeString(UniscribeParagraphLayoutFactory::CharType *buff, int32 length)
static std::vector<SCRIPT_ITEM> UniscribeItemizeString(UniscribeParagraphLayoutFactory::CharType *buff, int32_t length)
{
/* Itemize text. */
SCRIPT_CONTROL control;
@@ -281,7 +281,7 @@ static std::vector<SCRIPT_ITEM> UniscribeItemizeString(UniscribeParagraphLayoutF
/* static */ ParagraphLayouter *UniscribeParagraphLayoutFactory::GetParagraphLayout(CharType *buff, CharType *buff_end, FontMap &fontMapping)
{
int32 length = buff_end - buff;
int32_t length = buff_end - buff;
/* Can't layout an empty string. */
if (length == 0) return nullptr;
@@ -555,7 +555,7 @@ const int *UniscribeParagraphLayout::UniscribeVisualRun::GetGlyphToCharMap() con
if (!utf16_str.empty()) {
/* Itemize string into language runs. */
std::vector<SCRIPT_ITEM> runs = UniscribeItemizeString(&utf16_str[0], (int32)utf16_str.size());
std::vector<SCRIPT_ITEM> runs = UniscribeItemizeString(&utf16_str[0], (int32_t)utf16_str.size());
for (std::vector<SCRIPT_ITEM>::const_iterator run = runs.begin(); !runs.empty() && run != runs.end() - 1; run++) {
/* Get information on valid word and character break.s */

View File

@@ -233,16 +233,16 @@ void FiosGetDrives(FileList &file_list)
bool FiosIsValidFile(const char *path, const struct dirent *ent, struct stat *sb)
{
/* hectonanoseconds between Windows and POSIX epoch */
static const int64 posix_epoch_hns = 0x019DB1DED53E8000LL;
static const int64_t posix_epoch_hns = 0x019DB1DED53E8000LL;
const WIN32_FIND_DATA *fd = &ent->dir->fd;
sb->st_size = ((uint64) fd->nFileSizeHigh << 32) + fd->nFileSizeLow;
sb->st_size = ((uint64_t) fd->nFileSizeHigh << 32) + fd->nFileSizeLow;
/* UTC FILETIME to seconds-since-1970 UTC
* we just have to subtract POSIX epoch and scale down to units of seconds.
* http://www.gamedev.net/community/forums/topic.asp?topic_id=294070&whichpage=1&#1860504
* XXX - not entirely correct, since filetimes on FAT aren't UTC but local,
* this won't entirely be correct, but we use the time only for comparison. */
sb->st_mtime = (time_t)((*(const uint64*)&fd->ftLastWriteTime - posix_epoch_hns) / 1E7);
sb->st_mtime = (time_t)((*(const uint64_t*)&fd->ftLastWriteTime - posix_epoch_hns) / 1E7);
sb->st_mode = (fd->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)? S_IFDIR : S_IFREG;
return true;