Mercurial > noffle
comparison src/database.c @ 282:baa6408d1bbc noffle
[svn] * src/database.c,src/post.c,src/protocol.h,src/protocol.c: When posting,
check the article for those headers that are specified in section
5 of the IETF draft and ensure they only occur once.
* src/post.c: Clean up a conditional.
author | bears |
---|---|
date | Mon, 06 Jan 2003 18:16:18 +0000 |
parents | 5eece4dfd945 |
children | 994e9ab2c24f |
comparison
equal
deleted
inserted
replaced
281:5eece4dfd945 | 282:baa6408d1bbc |
---|---|
1 /* | 1 /* |
2 database.c | 2 database.c |
3 | 3 |
4 $Id: database.c 413 2002-12-27 21:48:25Z bears $ | 4 $Id: database.c 414 2003-01-06 18:16:18Z bears $ |
5 | 5 |
6 Uses GNU gdbm library. Using Berkeley db (included in libc6) was | 6 Uses GNU gdbm library. Using Berkeley db (included in libc6) was |
7 cumbersome. It is based on Berkeley db 1.85, which has severe bugs | 7 cumbersome. It is based on Berkeley db 1.85, which has severe bugs |
8 (e.g. it is not recommended to delete or overwrite entries with | 8 (e.g. it is not recommended to delete or overwrite entries with |
9 overflow pages). | 9 overflow pages). |
273 DynStr_clear( db.txt ); | 273 DynStr_clear( db.txt ); |
274 | 274 |
275 /* Read header */ | 275 /* Read header */ |
276 while ( ( artTxt = Utl_getHeaderLn( lineEx, artTxt ) ) != NULL ) | 276 while ( ( artTxt = Utl_getHeaderLn( lineEx, artTxt ) ) != NULL ) |
277 { | 277 { |
278 Bool continuation; | |
279 | |
278 if ( lineEx[ 0 ] == '\0' ) | 280 if ( lineEx[ 0 ] == '\0' ) |
279 { | 281 { |
280 DynStr_appLn( db.txt, lineEx ); | 282 DynStr_appLn( db.txt, lineEx ); |
281 break; | 283 break; |
282 } | 284 } |
283 /* Remove fields already in overview and handle x-noffle | 285 /* Remove fields already in overview and handle x-noffle |
284 headers correctly in case of cascading NOFFLEs */ | 286 headers correctly in case of cascading NOFFLEs */ |
285 if ( Prt_getField( field, value, lineEx ) ) | 287 if ( Prt_getField( field, value, &continuation, lineEx ) ) |
286 { | 288 { |
287 if ( strcmp( field, "x-noffle-status" ) == 0 ) | 289 if ( strcmp( field, "x-noffle-status" ) == 0 ) |
288 { | 290 { |
289 if ( strstr( value, "NOT_DOWNLOADED" ) != 0 ) | 291 if ( strstr( value, "NOT_DOWNLOADED" ) != 0 ) |
290 db.status |= DB_NOT_DOWNLOADED; | 292 db.status |= DB_NOT_DOWNLOADED; |