1 /* ngdata.h
2  */
3 /* This software is copyrighted as detailed in the LICENSE file. */
4 
5 
6 struct ngdata {
7     NGDATA* prev;
8     NGDATA* next;
9     NEWSRC* rc;		/* which rc is this line from? */
10     char* rcline;	/* pointer to group's .newsrc line */
11     ART_NUM abs1st;	/* 1st real article in newsgroup */
12     ART_NUM ngmax;	/* high message num for the group */
13     ART_UNREAD toread;	/* number of articles to be read in newsgroup */
14 			/* < 0 is invalid or unsubscribed newsgroup */
15     NG_NUM num;		/* a possible sort order for this group */
16     int numoffset;	/* offset from rcline to numbers on line */
17     char subscribechar;	/* holds the character : or ! while spot is \0 */
18     char flags;  	/* flags for each group */
19 };
20 
21 EXT LIST* ngdata_list INIT(NULL); /* a list of NGDATA */
22 EXT int ngdata_cnt INIT(0);
23 EXT NG_NUM newsgroup_cnt INIT(0); /* all newsgroups in our current newsrc(s) */
24 EXT NG_NUM newsgroup_toread INIT(0);
25 EXT ART_UNREAD ng_min_toread INIT(1); /* == TR_ONE or TR_NONE */
26 
27 EXT NGDATA* first_ng INIT(NULL);
28 EXT NGDATA* last_ng INIT(NULL);
29 EXT NGDATA* ngptr INIT(NULL);	/* current newsgroup data ptr */
30 
31 EXT NGDATA* current_ng INIT(NULL);/* stable current newsgroup so we can ditz with ngptr */
32 EXT NGDATA* recent_ng INIT(NULL); /* the prior newsgroup we visited */
33 EXT NGDATA* starthere INIT(NULL); /* set to the first newsgroup with unread news on startup */
34 
35 #define ngdata_ptr(ngnum) ((NGDATA*)listnum2listitem(ngdata_list,(long)(ngnum)))
36 /*#define ngdata_num(ngptr) listitem2listnum(ngdata_list,(char*)ngptr)*/
37 
38 EXT NGDATA* sel_page_np;
39 EXT NGDATA* sel_next_np;
40 
41 EXT ART_NUM absfirst INIT(0);	/* 1st real article in current newsgroup */
42 EXT ART_NUM firstart INIT(0);	/* minimum unread article number in newsgroup */
43 EXT ART_NUM lastart INIT(0);	/* maximum article number in newsgroup */
44 EXT ART_UNREAD missing_count;	/* for reports on missing articles */
45 
46 EXT char* moderated;
47 EXT char* redirected;
48 EXT bool ThreadedGroup;
49 
50 /* CAA goto-newsgroup extensions */
51 EXT NGDATA* ng_go_ngptr INIT(NULL);
52 EXT ART_NUM ng_go_artnum INIT(0);
53 EXT char* ng_go_msgid INIT(NULL);
54 
55 /* DON'T EDIT BELOW THIS LINE OR YOUR CHANGES WILL BE LOST! */
56 
57 void ngdata_init _((void));
58 void set_ng _((NGDATA*));
59 int access_ng _((void));
60 void chdir_newsdir _((void));
61 void grow_ng _((ART_NUM));
62 void sort_newsgroups _((void));
63 void ng_skip _((void));
64 ART_NUM getngsize _((NGDATA*));
65