summaryrefslogtreecommitdiff
path: root/plugins/TipperYM/src/str_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TipperYM/src/str_utils.cpp')
-rw-r--r--plugins/TipperYM/src/str_utils.cpp24
1 files changed, 1 insertions, 23 deletions
diff --git a/plugins/TipperYM/src/str_utils.cpp b/plugins/TipperYM/src/str_utils.cpp
index 2189b34312..a79cb3b351 100644
--- a/plugins/TipperYM/src/str_utils.cpp
+++ b/plugins/TipperYM/src/str_utils.cpp
@@ -69,46 +69,34 @@ bool utf2a(const char *us, char *buff, int bufflen)
bool t2w(const TCHAR *ts, wchar_t *buff, int bufflen)
{
-
wcsncpy(buff, ts, bufflen);
return true;
-
}
bool w2t(const wchar_t *ws, TCHAR *buff, int bufflen)
{
-
wcsncpy(buff, ws, bufflen);
return true;
-
}
bool t2a(const TCHAR *ts, char *buff, int bufflen)
{
-
return w2a(ts, buff, bufflen);
-
}
bool a2t(const char *as, TCHAR *buff, int bufflen)
{
-
return a2w(as, buff, bufflen);
-
}
bool t2utf(const TCHAR *ts, char *buff, int bufflen)
{
-
return w2utf(ts, buff, bufflen);
-
}
bool utf2t(const char *us, TCHAR *buff, int bufflen)
{
-
return utf2w(us, buff, bufflen);
-
}
wchar_t *utf2w(const char *us)
@@ -175,49 +163,39 @@ char *a2utf(const char *as)
TCHAR *w2t(const wchar_t *ws)
{
-
return mir_wstrdup(ws);
-
}
wchar_t *t2w(const TCHAR *ts)
{
-
return mir_tstrdup(ts);
-
}
char *t2a(const TCHAR *ts)
{
-
return w2a(ts);
-
}
TCHAR *a2t(const char *as)
{
-
return a2w(as);
-
}
TCHAR *utf2t(const char *utfs)
{
-
return utf2w(utfs);
}
char *t2utf(const TCHAR *ts)
{
-
return w2utf(ts);
}
TCHAR *myfgets(TCHAR *Buf, int MaxCount, FILE *File)
{
_fgetts(Buf, MaxCount, File);
- for (size_t i = _tcslen(Buf) - 1; i >= 0; i--)
+ for (size_t i = _tcslen(Buf) - 1; ; i--)
{
if (Buf[i] == '\n' || Buf[i] == ' ')
Buf[i] = 0;