Update of /cvsroot/mahogany/M/lib/dspam
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14935

Modified Files:
        config.h libdspam.c sqlite_drv.c 
Log Message:
define and use LL[DU]_FMT_SPEC instead of LL_FMT_SPEC

Index: config.h
===================================================================
RCS file: /cvsroot/mahogany/M/lib/dspam/config.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -b -u -2 -r1.4 -r1.5
--- config.h    10 Jul 2004 15:58:11 -0000      1.4
+++ config.h    10 Jul 2004 16:01:18 -0000      1.5
@@ -108,6 +108,7 @@
 #endif
 
-#ifndef LL_FMT_SPEC
-#define LL_FMT_SPEC "ll"
+#ifndef LLU_FMT_SPEC
+#define LLD_FMT_SPEC "lld"
+#define LLU_FMT_SPEC "llu"
 #endif
 

Index: libdspam.c
===================================================================
RCS file: /cvsroot/mahogany/M/lib/dspam/libdspam.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -b -u -2 -r1.6 -r1.7
--- libdspam.c  10 Jul 2004 15:58:11 -0000      1.6
+++ libdspam.c  10 Jul 2004 16:01:18 -0000      1.7
@@ -447,5 +447,5 @@
               (i * sizeof (struct _ds_signature_token)),
               sizeof (struct _ds_signature_token));
-      snprintf (x, sizeof (x), "E: %" LL_FMT_SPEC "u", t.token);
+      snprintf (x, sizeof (x), "E: %" LLU_FMT_SPEC, t.token);
       lht_hit (freq, t.token, x);
       lht_setfrequency (freq, t.token, t.frequency);

Index: sqlite_drv.c
===================================================================
RCS file: /cvsroot/mahogany/M/lib/dspam/sqlite_drv.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -b -u -2 -r1.7 -r1.8
--- sqlite_drv.c        10 Jul 2004 15:58:11 -0000      1.7
+++ sqlite_drv.c        10 Jul 2004 16:01:18 -0000      1.8
@@ -267,5 +267,5 @@
   while (node_lht != NULL)
   {
-    snprintf (scratch, sizeof (scratch), "'%" LL_FMT_SPEC "u'", node_lht->key);
+    snprintf (scratch, sizeof (scratch), "'%" LLU_FMT_SPEC "'", node_lht->key);
     buffer_cat (query, scratch);
     node_lht->s.innocent_hits = 0;
@@ -424,5 +424,5 @@
         snprintf(insert, sizeof (insert),
                  "insert into dspam_token_data(token, spam_hits, "
-                 "innocent_hits, last_hit) values('%" LL_FMT_SPEC "u', %ld, %ld, "
+                 "innocent_hits, last_hit) values('%" LLU_FMT_SPEC "', %ld, %ld, "
                  "date('now'))",
                  node_lht->key,
@@ -439,5 +439,5 @@
     if (stat2.disk == 'Y')
     {
-      snprintf (scratch, sizeof (scratch), "'%" LL_FMT_SPEC "u'", node_lht->key);
+      snprintf (scratch, sizeof (scratch), "'%" LLU_FMT_SPEC "'", node_lht->key);
       buffer_cat (query, scratch);
       update_one = 1;
@@ -498,5 +498,5 @@
   snprintf (query, sizeof (query),
             "select spam_hits, innocent_hits from dspam_token_data "
-            "where token = '%" LL_FMT_SPEC "u' ", token);
+            "where token = '%" LLU_FMT_SPEC "' ", token);
 
   stat->probability = 0.0;
@@ -548,5 +548,5 @@
               "insert into dspam_token_data(token, spam_hits, "
               "innocent_hits, last_hit)"
-              " values('%" LL_FMT_SPEC "u', %ld, %ld, date('now'))",
+              " values('%" LLU_FMT_SPEC "', %ld, %ld, date('now'))",
               token, stat->spam_hits, stat->innocent_hits);
     result = sqlite_exec(s->dbh, query, NULL, NULL, &err);
@@ -559,5 +559,5 @@
               "set spam_hits = %ld, "
               "innocent_hits = %ld "
-              "where token = %" LL_FMT_SPEC "d", stat->spam_hits,
+              "where token = %" LLD_FMT_SPEC, stat->spam_hits,
               stat->innocent_hits, token);
     if (CTX->training_mode == DST_TUM) {
@@ -1277,5 +1277,5 @@
                                                                                 
   snprintf (query, sizeof (query),
-            "delete from dspam_token_data where token = \"%" LL_FMT_SPEC "u\"",
+            "delete from dspam_token_data where token = \"%" LLU_FMT_SPEC "\"",
             token);
                                                                                 
@@ -1325,5 +1325,5 @@
   while (node_lht != NULL)
   {
-    snprintf (scratch, sizeof (scratch), "'%" LL_FMT_SPEC "u'", node_lht->key);
+    snprintf (scratch, sizeof (scratch), "'%" LLU_FMT_SPEC "'", node_lht->key);
     buffer_cat (query, scratch);
     node_lht = c_lht_next (freq, &c_lht);



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to