Mercurial > noffle
comparison src/filter.c @ 185:fed1334d766b noffle
[svn] * src/client.c: Change variable only used on constant to 'const'.
* src/filter.c: Add a couple of 'return's after ASSERT() to remove
compiler warnings about functions needing returns.
* NEWS,TODO,configure,configure.in,noffle.conf.example,docs/NOTES,
docs/noffle.conf.5,src/client.c,src/configfile.c,src/content.c,
src/control.c,src/database.c,src/fetch.c,src/fetchlist.c,src/filter.c,
src/group.c,src/lock.c,src/log.c,src/log.h,src/noffle.c,src/outgoing.c,
src/post.c,src/protocol.c,src/request.c,src/server.c,src/util.c:
Debug logging is always compiled and selected via noffle.conf. All debug
logs are classified as all, none, config, control, expire, fetch,
filter, newsbase, noffle, post, protocol, requests and server.
| author | bears |
|---|---|
| date | Sun, 05 Aug 2001 09:24:22 +0100 |
| parents | 8897b7e3b108 |
| children | a4e9a20e50e5 |
comparison
equal
deleted
inserted
replaced
| 184:9854ea5f295f | 185:fed1334d766b |
|---|---|
| 1 /* | 1 /* |
| 2 filter.c | 2 filter.c |
| 3 | 3 |
| 4 Article filtering. | 4 Article filtering. |
| 5 | 5 |
| 6 $Id: filter.c 189 2000-08-09 21:19:17Z bears $ | 6 $Id: filter.c 300 2001-08-05 08:24:22Z bears $ |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #if HAVE_CONFIG_H | 9 #if HAVE_CONFIG_H |
| 10 #include <config.h> | 10 #include <config.h> |
| 11 #endif | 11 #endif |
| 149 ul = countGroups( newsgroups ); | 149 ul = countGroups( newsgroups ); |
| 150 return ( ul > r->data.amount ); | 150 return ( ul > r->data.amount ); |
| 151 } | 151 } |
| 152 | 152 |
| 153 ASSERT( FALSE ); /* Shouldn't get here */ | 153 ASSERT( FALSE ); /* Shouldn't get here */ |
| 154 return 0; /* Keep compiler quiet */ | |
| 154 } | 155 } |
| 155 | 156 |
| 156 /* Check a single filter to see if it fires. */ | 157 /* Check a single filter to see if it fires. */ |
| 157 static Bool | 158 static Bool |
| 158 checkFilter( const char *thisGrp, const char *newsgroups, | 159 checkFilter( const char *thisGrp, const char *newsgroups, |
| 200 int i; | 201 int i; |
| 201 | 202 |
| 202 for ( i = 0; i < filter.nFilters; i++ ) | 203 for ( i = 0; i < filter.nFilters; i++ ) |
| 203 if ( checkFilter( thisGrp, newsgroups, ov, filter.filters[ i ] ) ) | 204 if ( checkFilter( thisGrp, newsgroups, ov, filter.filters[ i ] ) ) |
| 204 { | 205 { |
| 205 Log_dbg( "Filter %d fired on message %s", i, Ov_msgId( ov ) ); | 206 Log_dbg( LOG_DBG_FILTER, |
| 207 "Filter %d fired on message %s", | |
| 208 i, Ov_msgId( ov ) ); | |
| 206 return filter.filters[ i ]->action; | 209 return filter.filters[ i ]->action; |
| 207 } | 210 } |
| 208 | 211 |
| 209 switch( mode ) | 212 switch( mode ) |
| 210 { | 213 { |
| 212 case THREAD: return FILTER_THREAD; | 215 case THREAD: return FILTER_THREAD; |
| 213 case OVER: return FILTER_XOVER; | 216 case OVER: return FILTER_XOVER; |
| 214 } | 217 } |
| 215 | 218 |
| 216 ASSERT( FALSE ); /* Shouldn't get here */ | 219 ASSERT( FALSE ); /* Shouldn't get here */ |
| 220 return FILTER_FULL; /* Keep compiler quiet */ | |
| 217 } | 221 } |
| 218 | 222 |
| 219 Filter * | 223 Filter * |
| 220 new_Filter( void ) | 224 new_Filter( void ) |
| 221 { | 225 { |
