(svn r14555) -Codechange: replace ttd_strlcat and ttd_strlcpy with strecat and strecpy where direct conversion is possible

This commit is contained in:
skidd13
2008-11-02 11:20:15 +00:00
parent c03e55b32a
commit 706dd0f86c
23 changed files with 85 additions and 85 deletions

View File

@@ -803,7 +803,7 @@ void FiosGetDrives()
fios->type = FIOS_TYPE_DRIVE;
fios->mtime = 0;
snprintf(fios->name, lengthof(fios->name), PATHSEP "");
ttd_strlcpy(fios->title, fios->name, lengthof(fios->title));
strecpy(fios->title, fios->name, lastof(fios->title));
#else
TCHAR drives[256];
const TCHAR *s;
@@ -814,7 +814,7 @@ void FiosGetDrives()
fios->type = FIOS_TYPE_DRIVE;
fios->mtime = 0;
snprintf(fios->name, lengthof(fios->name), "%c:", s[0] & 0xFF);
ttd_strlcpy(fios->title, fios->name, lengthof(fios->title));
strecpy(fios->title, fios->name, lastof(fios->title));
while (*s++ != '\0') { /* Nothing */ }
}
#endif
@@ -1127,7 +1127,7 @@ bool InsertTextBufferClipboard(Textbuf *tb)
cbuf = GetClipboardData(CF_TEXT);
ptr = (const char*)GlobalLock(cbuf);
ttd_strlcpy(utf8_buf, FS2OTTD(ptr), lengthof(utf8_buf));
strecpy(utf8_buf, FS2OTTD(ptr), lastof(utf8_buf));
GlobalUnlock(cbuf);
CloseClipboard();