diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-02-28 11:05:09 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-02-28 11:05:09 +0000 |
commit | b1530a48bd67d19f6a18355e04a884b36c696e8b (patch) | |
tree | 539cc8c4387b586658898a146b8876cc133f8783 /plugins/TipperYM/src/str_utils.cpp | |
parent | 4e2a8eb11a9a4286eb0bcb3386bab58e87ae4b69 (diff) |
Tipper:
- minor bugfixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@12284 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TipperYM/src/str_utils.cpp')
-rw-r--r-- | plugins/TipperYM/src/str_utils.cpp | 24 |
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;
|