X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=nntp.h;h=f8a389f7c4e37f26c878665c8937c6e8496677df;hp=335f094bf919cf36b7eaeb4686ae1fdec8f2fe8e;hb=c3e57678c8be193fc137854020f3a90887be97c9;hpb=5b4a22b1ca2870e26906d208d830624f297d40f4 diff --git a/nntp.h b/nntp.h index 335f094..f8a389f 100644 --- a/nntp.h +++ b/nntp.h @@ -1,22 +1,13 @@ /* + * Copyright notice from original mutt: * Copyright (C) 1998 Brandon Long * Copyright (C) 1999 Andrej Gritsenko * Copyright (C) 2000-2002 Vsevolod Volkov - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ + * + * This file is part of mutt-ng, see http://www.muttng.org/. + * It's licensed under the GNU General Public License, + * please see the file GPL in the top level source directory. + */ #ifndef _NNTP_H_ #define _NNTP_H_ 1 @@ -32,26 +23,23 @@ /* number of entries in the hash table */ #define NNTP_CACHE_LEN 10 -enum -{ +enum { NNTP_NONE = 0, NNTP_OK, NNTP_BYE }; -typedef struct -{ +typedef struct { int first; int last; } NEWSRC_ENTRY; -typedef struct -{ - unsigned int hasXPAT : 1; - unsigned int hasXGTITLE : 1; - unsigned int hasXOVER : 1; - unsigned int hasLISTGROUP : 1; - unsigned int status : 3; +typedef struct { + unsigned int hasXPAT:1; + unsigned int hasXGTITLE:1; + unsigned int hasXOVER:1; + unsigned int hasLISTGROUP:1; + unsigned int status:3; char *newsrc; char *cache; int stat; @@ -60,32 +48,30 @@ typedef struct time_t newgroups_time; time_t check_time; HASH *newsgroups; - LIST *list; /* list of newsgroups */ - LIST *tail; /* last entry of list */ + LIST *list; /* list of newsgroups */ + LIST *tail; /* last entry of list */ CONNECTION *conn; } NNTP_SERVER; -typedef struct -{ +typedef struct { unsigned int index; char *path; } NNTP_CACHE; -typedef struct -{ +typedef struct { NEWSRC_ENTRY *entries; - unsigned int num; /* number of used entries */ - unsigned int max; /* number of allocated entries */ + unsigned int num; /* number of used entries */ + unsigned int max; /* number of allocated entries */ unsigned int unread; unsigned int firstMessage; unsigned int lastMessage; unsigned int lastLoaded; unsigned int lastCached; - unsigned int subscribed : 1; - unsigned int rc : 1; - unsigned int new : 1; - unsigned int allowed : 1; - unsigned int deleted : 1; + unsigned int subscribed:1; + unsigned int rc:1; + unsigned int new:1; + unsigned int allowed:1; + unsigned int deleted:1; char *group; char *desc; char *cache; @@ -129,7 +115,8 @@ void nntp_buffy (char *); void nntp_expand_path (char *, size_t, ACCOUNT *); void nntp_logout_all (); const char *nntp_format_str (char *, size_t, char, const char *, const char *, - const char *, const char *, unsigned long, format_flag); + const char *, const char *, unsigned long, + format_flag); NNTP_SERVER *CurrentNewsSrv INITVAL (NULL);