diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
commit | 6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch) | |
tree | 2e8bb660c908b54914abd562af8aafa4a486c846 /plugins/Spamotron/src/bayes.cpp | |
parent | a61c8728b379057fe7f0a0d86fe0b037598229dd (diff) |
less TCHARs:
- TCHAR is replaced with wchar_t everywhere;
- LPGENT replaced with either LPGENW or LPGEN;
- fixes for ANSI plugins that improperly used _t functions;
- TCHAR *t removed from MAllStrings;
- ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz*
git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Spamotron/src/bayes.cpp')
-rw-r--r-- | plugins/Spamotron/src/bayes.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/Spamotron/src/bayes.cpp b/plugins/Spamotron/src/bayes.cpp index d6d582a59b..aa377760a7 100644 --- a/plugins/Spamotron/src/bayes.cpp +++ b/plugins/Spamotron/src/bayes.cpp @@ -177,7 +177,7 @@ int get_token_score(int type, char *token) return score;
}
-double get_msg_score(TCHAR *msg)
+double get_msg_score(wchar_t *msg)
{
char *message, *token;
double spam_prob, ham_prob, tmp1 = 1, tmp2 = 1;
@@ -220,7 +220,7 @@ double get_msg_score(TCHAR *msg) return tmp1 / (tmp1 + tmp2);
}
-void queue_message(MCONTACT hContact, DWORD msgtime, TCHAR *message)
+void queue_message(MCONTACT hContact, DWORD msgtime, wchar_t *message)
{
char *tmp;
sqlite3_stmt *stmt;
@@ -247,7 +247,7 @@ void queue_message(MCONTACT hContact, DWORD msgtime, TCHAR *message) void bayes_approve_contact(MCONTACT hContact)
{
const char *message;
- TCHAR *messageW;
+ wchar_t *messageW;
int d = 0;
sqlite3_stmt *stmt;
@@ -279,7 +279,7 @@ void dequeue_messages() time_t t = time(NULL);
sqlite3_stmt *stmt;
const char *message;
- TCHAR *messageW;
+ wchar_t *messageW;
int d = 0;
if (bayesdb == NULL)
@@ -306,7 +306,7 @@ void dequeue_messages() }
/* Learn one message as either SPAM or HAM as specified in type parameter */
-void learn(int type, TCHAR *msg)
+void learn(int type, wchar_t *msg)
{
char *tok, *message;
BYTE digest[16];
@@ -375,12 +375,12 @@ void learn(int type, TCHAR *msg) mir_free(message);
}
-void learn_ham(TCHAR *msg)
+void learn_ham(wchar_t *msg)
{
learn(0, msg);
}
-void learn_spam(TCHAR *msg)
+void learn_spam(wchar_t *msg)
{
learn(1, msg);
}
\ No newline at end of file |