# HG changeset patch # User bears # Date 1089386840 -3600 # Node ID 48be71391b9d9ee69e25fa7daf0b4449a274a221 # Parent 29cccddfc307633e9af0cc209c56244c0dfe955e [svn] * docs/noffle.1,src/noffle.c: When outputing the entire message base using 'noffle --article all', ditch the previous casual header for each article and switch to the 'rnews' format. diff -r 29cccddfc307 -r 48be71391b9d ChangeLog --- a/ChangeLog Tue Mar 16 11:44:43 2004 +0000 +++ b/ChangeLog Fri Jul 09 16:27:20 2004 +0100 @@ -1,3 +1,9 @@ +Tue Mar 16 2004 Jim Hague + +* docs/noffle.1,src/noffle.c: When outputing the entire message base + using 'noffle --article all', ditch the previous casual header for each + article and switch to the 'rnews' format. + Tue Mar 16 2004 Jim Hague * src/authenticate.c: Move includes of grp.h and pwd.h to after the diff -r 29cccddfc307 -r 48be71391b9d docs/noffle.1 --- a/docs/noffle.1 Tue Mar 16 11:44:43 2004 +0000 +++ b/docs/noffle.1 Fri Jul 09 16:27:20 2004 +0100 @@ -1,5 +1,5 @@ .TH noffle 1 -.\" $Id: noffle.1 619 2003-10-31 15:54:59Z godisch $ +.\" $Id: noffle.1 624 2004-07-09 15:27:20Z bears $ .SH NAME noffle \- Usenet package optimized for dialup connections. @@ -136,7 +136,13 @@ the leading '<' and trailing '>' (quote the argument to avoid shell interpretation of '<' and '>'). .br -If "all" is given as message Id, all articles are shown. +If "all" is given as message Id, all articles are written using the +.B rnews +news batch format. In the format, recognised by the UUCP +.BR rnews (1) +program, each article is prefixed with a header line. The line +consists of '#! rnews ', where is the size of the +entire message including headers in bytes. .TP .B \-c, \-\-cancel @@ -441,6 +447,7 @@ .SH SEE ALSO .BR inews (1), +.BR rnews (1) .BR noffle.conf (5), .BR crond (8), .BR inetd (8), diff -r 29cccddfc307 -r 48be71391b9d src/noffle.c --- a/src/noffle.c Tue Mar 16 11:44:43 2004 +0000 +++ b/src/noffle.c Fri Jul 09 16:27:20 2004 +0100 @@ -10,7 +10,7 @@ received for some seconds (to allow multiple clients connect at the same time). - $Id: noffle.c 621 2003-11-29 23:53:31Z bears $ + $Id: noffle.c 624 2004-07-09 15:27:20Z bears $ */ #if HAVE_CONFIG_H @@ -75,12 +75,17 @@ else do { - printf( "From %s %s\n" - "%s\n" - "%s\n", - Db_from( id ), Db_date( id ), - Db_header( id ), - Db_body( id ) ); + /* + * Output articles in rnews format. The number after + * the rnews header is the length of the article in bytes, + * counting line endings as '\n'. + */ + const char *header = Db_header( id ); + const char *body = Db_body( id ); + + printf( "#! rnews %d\n%s\n%s\n", + strlen(header) + strlen(body) + 2, + header, body); res = TRUE; } while ( Db_next( &id ) );