fixed: program - example of libgmime-1.90.6 use and new algorithm to test

Scott Lenser slenser at cs.cmu.edu
Fri Dec 13 20:47:09 CET 2002


> Scott Lenser <slenser at cs.cmu.edu> writes:
> 
> >   Included in this message is a program derived from an ancient
> > version of bogofilter (version 0.7).  I realize this is an ancient
> > version, but I had already made substantial changes that included some
> > additional features but lost some features compared to the standard
> > bogofilter releases before I realized bogofilter had been updated
> > quite a bit.
> 
> It doesn't work with ISO-C++ compilers such as gcc 3.2, so I cannot
> compile it, so I'll revert from glancing at the code.

Sorry about that.  I'm using debian and forgot that gcc-2.95.4 is the default.
I've attached a new version which compiles for me using g++ 3.2.1.  It'll
complain some about deprecated libraries being used (strstream) built it'll
work ok.  This version is will almost certainly only compile using g++.  The
code uses extensions (that I think may have used to be part of the standard).
<mutters about committees unable to keep their grimy hands off of the language>

> It looks as though
> g_mime was pretty clear and not very invasive, so it might get my
> preliminary approval after we've figured how to quelch ALL g_mime*
> warnings and errors.

The new attached version should never output a message from libgmime.

> On the down side, g_mime is HUGE, 256 k. I do
> believe MIME fits in much less. We may want to stuff this libgmime
> interface into a separate module so we have our internal API and can
> exchange libgmime for something better that we run across later.
> 

Sounds good to me.

> [snip lots of stuff about glib and gtk+]

I won't argue that they are good, just common.

> g++ -g -O3  `gmime-config --cflags` -c -o bogofilter.o bogofilter.cc
> In file included from /usr/include/g++/backward/strstream:51,
>                  from bogofilter.cc:91:
> /usr/include/g++/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
> bogofilter.cc:197: specializing `struct __gnu_cxx::hash<std::pair<_T1, _T2> >'
>    in different namespace
> /usr/include/g++/ext/stl_hash_fun.h:71:   from definition of `template<class
>    _Key> struct __gnu_cxx::hash'

fixed

> bogofilter.cc: In function `const char* create_class_file_name(const char*)':
> bogofilter.cc:572: warning: address of local variable `class_filename' returned

This was actually a bug which I have fixed in this version.

- Scott

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bogofilter_srl.tar.bz2
Type: application/octet-stream
Size: 23460 bytes
Desc: bogofilter_srl.tar.bz2
URL: <https://www.bogofilter.org/pipermail/bogofilter-dev/attachments/20021213/559e49f9/attachment.obj>


More information about the bogofilter-dev mailing list