Mercurial > noffle
view src/protocol.h @ 45:32ba1198c6fa noffle
[svn] * Makefile.in, configure, configure.in, docs/Makefile.in, src/Makefile.in:
Added checks for the mail and sort programs. ./configure will abort if
they're not found.
* README: Removed the paragraph about news client software, as it's the same
as the one in docs/NOTES.
* TODO: Removed 'expiring by groups' and
'move some text from noffle.1 to noffle.conf.5'.
* docs/NOTES: Changed the text about -DDEBUG to explain one should use
'./configure --enable-debug'.
* docs/noffle.1, docs/noffle.conf.5: Minor fixes. Added myself and Jim Hague
to the AUTHORS section :-)
* src/client.h, src/common.h, src/configfile.h, src/content.c, src/content.h,
src/control.c, src/control.h, src/database.h, src/dynamicstring.c,
src/dynamicstring.h, src/fetch.h, src/fetchlist.h, src/group.h,
src/itemlist.c, src/itemlist.h, src/lock.h, src/log.c, src/log.h,
src/noffle.c, src/online.h, src/outgoing.h, src/over.c, src/over.h,
src/post.h, src/protocol.h, src/pseudo.h, src/request.h, src/server.h,
src/util.c, src/util.h: Added the <config.h> include.
* src/content.c: Added missing include "content.h". Added a missing 'void'
in the declaration of clearCont().
* src/fetchlist.c: Casted fetchlist.size to (size_t) in a call to qsort(),
as qsort() expects a size_t. This removes a warning.
* src/noffle.c: Made doRequested() static. Added missing void to
enableCorefiles().
* src/log.c, src/protocol.c, src/online.c, src/pseudo.c: Added missing
includes.
* src/pseudo.c: Made genOv() and genPseudo() static.
* src/server.c: Added missing void to postArts(). Made touchArticle() static.
* src/util.c: Casted arguments of malloc() and memcpy() to size_t.
* src/dynamicstring.c, src/itemlist.c, src/over.c, src/request.c, src/util.c:
Removed casting of the result of malloc(). This is not necessary and
can hide a missing include of <stdlib.h>.
author | uh1763 |
---|---|
date | Sat, 06 May 2000 00:49:38 +0100 |
parents | 2842f50feb55 |
children | 6f681d41734c |
line wrap: on
line source
/* protocol.h Functions related with the NNTP protocol which are useful for both the server and the client. $Id: protocol.h 51 2000-05-05 23:49:38Z uh1763 $ */ #ifndef PRT_H #define PRT_H #if HAVE_CONFIG_H #include <config.h> #endif #include "dynamicstring.h" #include "over.h" #define STAT_HELP_FOLLOWS 100 #define STAT_DEBUG_FOLLOWS 199 #define STAT_READY_POST_ALLOW 200 #define STAT_READY_NO_POST_ALLOW 201 #define STAT_CMD_OK 202 #define STAT_GOODBYE 205 #define STAT_GRP_SELECTED 211 #define STAT_GRPS_FOLLOW 215 #define STAT_ART_FOLLOWS 220 #define STAT_HEAD_FOLLOWS 221 #define STAT_BODY_FOLLOWS 222 #define STAT_ART_RETRIEVED 223 #define STAT_OVERS_FOLLOW 224 #define STAT_NEW_GRP_FOLLOW 231 #define STAT_POST_OK 240 #define STAT_AUTH_ACCEPTED 281 #define STAT_SEND_ART 340 #define STAT_MORE_AUTH_REQUIRED 381 #define STAT_NO_SUCH_GRP 411 #define STAT_NO_GRP_SELECTED 412 #define STAT_NO_ART_SELECTED 420 #define STAT_NO_NEXT_ART 421 #define STAT_NO_PREV_ART 422 #define STAT_NO_SUCH_NUMB 423 #define STAT_NO_SUCH_ID 430 #define STAT_ART_REJECTED 437 #define STAT_POST_FAILED 441 #define STAT_AUTH_REQUIRED 480 #define STAT_AUTH_REJECTED 482 #define STAT_NO_SUCH_CMD 500 #define STAT_SYNTAX_ERR 501 #define STAT_NO_PERMISSION 502 #define STAT_PROGRAM_FAULT 503 /* Read next line from f into Str, up to "\n" or "\r\n". Don't save "\n" or "\r\n" in line. Terminate with '\0'. */ Bool Prt_getLn( Str line, FILE *f ); /* Read a text line from server. Returns TRUE if line != ".", removes leading '.' otherwise. */ Bool Prt_getTxtLn( Str line, Bool *err, FILE *f ); /* Write text line to f. Escape "." at the beginning with another ".". Terminate with "\r\n". */ Bool Prt_putTxtLn( const char* line, FILE *f ); /* Write text buffer of lines each ending with '\n'. Replace '\n' by "\r\n". */ Bool Prt_putTxtBuf( const char *buf, FILE *f ); /* Write text-ending "."-line to f */ Bool Prt_putEndOfTxt( FILE *f ); /* Splits line in field and value. Field is converted to lower-case. */ Bool Prt_getField( Str resultField, Str resultValue, const char* line ); /* Search header. Works only with single line headers (ignores continuation lines */ Bool Prt_searchHeader( const char *artTxt, const char* which, Str result ); Bool Prt_isValidMsgId( const char *msgId ); void Prt_genMsgId( Str msgId, const char *from, const char *suffix ); #endif