Skip to content

Commit 563c5a4

Browse files
tamlin-mikeXottab-DUTY
authored andcommitted
A few more POSIX -> ISO C++ names (prepending underscore).
1 parent 6e27c40 commit 563c5a4

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

src/xrCore/Animation/Motion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ bool CSMotion::Load(IReader& F)
407407
string64 temp_buf;
408408
for (BoneMotionIt bm_it = bone_mots.begin(); bm_it != bone_mots.end(); bm_it++)
409409
{
410-
bm_it->SetName(itoa(int(bm_it - bone_mots.begin()), temp_buf, 10));
410+
bm_it->SetName(_itoa(int(bm_it - bone_mots.begin()), temp_buf, 10));
411411
bm_it->m_Flags.assign((u8)F.r_u32());
412412
for (int ch = 0; ch < ctMaxChannel; ch++)
413413
{

src/xrCore/FS.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ void FileCompress(const char* fn, const char* sign, void* data, u32 size)
157157
MARK M;
158158
mk_mark(M, sign);
159159

160-
int H = open(fn, O_BINARY | O_CREAT | O_WRONLY | O_TRUNC, S_IREAD | S_IWRITE);
160+
int H = _open(fn, O_BINARY | O_CREAT | O_WRONLY | O_TRUNC, S_IREAD | S_IWRITE);
161161
R_ASSERT2(H > 0, fn);
162162
_write(H, &M, 8);
163163
_writeLZ(H, data, size);
@@ -169,7 +169,7 @@ void* FileDecompress(const char* fn, const char* sign, u32* size)
169169
MARK M, F;
170170
mk_mark(M, sign);
171171

172-
int H = open(fn, O_BINARY | O_RDONLY);
172+
int H = _open(fn, O_BINARY | O_RDONLY);
173173
R_ASSERT2(H > 0, fn);
174174
_read(H, &F, 8);
175175
if (strncmp(M, F, 8) != 0)
@@ -181,7 +181,7 @@ void* FileDecompress(const char* fn, const char* sign, u32* size)
181181

182182
void* ptr = 0;
183183
u32 SZ;
184-
SZ = _readLZ(H, ptr, filelength(H) - 8);
184+
SZ = _readLZ(H, ptr, _filelength(H) - 8);
185185
_close(H);
186186
if (size)
187187
*size = SZ;

src/xrCore/LocatorAPI.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ void CLocatorAPI::LoadArchive(archive& A, LPCSTR entrypoint)
311311
if (A.header)
312312
{
313313
shared_str read_path = A.header->r_string("header", "entry_point");
314-
if (0 == stricmp(read_path.c_str(), "gamedata"))
314+
if (0 == _stricmp(read_path.c_str(), "gamedata"))
315315
{
316316
read_path = "$fs_root$";
317317
PathPairIt P = pathes.find(read_path.c_str());
@@ -1445,7 +1445,7 @@ BOOL CLocatorAPI::dir_delete(LPCSTR initial, LPCSTR nm, BOOL remove_files)
14451445
// const char* entry_begin = entry.name+base_len;
14461446
if (!remove_files)
14471447
return FALSE;
1448-
unlink(entry.name);
1448+
_unlink(entry.name);
14491449
m_files.erase(cur_item);
14501450
}
14511451
else
@@ -1480,7 +1480,7 @@ void CLocatorAPI::file_delete(LPCSTR path, LPCSTR nm)
14801480
if (I != m_files.end())
14811481
{
14821482
// remove file
1483-
unlink(I->name);
1483+
_unlink(I->name);
14841484
char* str = LPSTR(I->name);
14851485
xr_free(str);
14861486
m_files.erase(I);
@@ -1515,7 +1515,7 @@ void CLocatorAPI::file_rename(LPCSTR src, LPCSTR dest, bool bOwerwrite)
15151515
{
15161516
if (!bOwerwrite)
15171517
return;
1518-
unlink(D->name);
1518+
_unlink(D->name);
15191519
char* str = LPSTR(D->name);
15201520
xr_free(str);
15211521
m_files.erase(D);
@@ -1691,7 +1691,7 @@ BOOL CLocatorAPI::can_write_to_folder(LPCSTR path)
16911691
else
16921692
{
16931693
fclose(hf);
1694-
unlink(temp);
1694+
_unlink(temp);
16951695
return TRUE;
16961696
}
16971697
}

src/xrCore/Xr_ini.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ int CInifile::r_token(LPCSTR S, LPCSTR L, const xr_token* token_list) const
680680
{
681681
LPCSTR C = r_string(S, L);
682682
for (int i = 0; token_list[i].name; i++)
683-
if (!stricmp(C, token_list[i].name))
683+
if (!_stricmp(C, token_list[i].name))
684684
return token_list[i].id;
685685
return 0;
686686
}

src/xrCore/xr_trims.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ LPSTR _GetItems(LPCSTR src, int idx_start, int idx_end, LPSTR dst, char separato
109109
u32 _ParseItem(LPCSTR src, xr_token* token_list)
110110
{
111111
for (int i = 0; token_list[i].name; i++)
112-
if (!stricmp(src, token_list[i].name))
112+
if (!_stricmp(src, token_list[i].name))
113113
return token_list[i].id;
114114
return u32(-1);
115115
}

src/xrCore/xrstring.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ struct str_container_impl
7878
u32 crc = crc32(value->value, value->dwLength);
7979
string32 crc_str;
8080
R_ASSERT3(crc == value->dwCRC, "CorePanic: read-only memory corruption (shared_strings)",
81-
itoa(value->dwCRC, crc_str, 16));
81+
_itoa(value->dwCRC, crc_str, 16));
8282
R_ASSERT3(value->dwLength == xr_strlen(value->value),
8383
"CorePanic: read-only memory corruption (shared_strings, internal structures)", value->value);
8484
value = value->next;
@@ -392,8 +392,8 @@ void str_container::verify()
392392
str_value* sv = *it;
393393
u32 crc = crc32(sv->value, sv->dwLength);
394394
string32 crc_str;
395-
R_ASSERT3(
396-
crc == sv->dwCRC, "CorePanic: read-only memory corruption (shared_strings)", itoa(sv->dwCRC, crc_str, 16));
395+
R_ASSERT3(crc == sv->dwCRC,
396+
"CorePanic: read-only memory corruption (shared_strings)", _itoa(sv->dwCRC, crc_str, 16));
397397
R_ASSERT3(sv->dwLength == xr_strlen(sv->value),
398398
"CorePanic: read-only memory corruption (shared_strings, internal structures)", sv->value);
399399
}

0 commit comments

Comments
 (0)