File: articles.h

package info (click to toggle)
nn 6.7.3-16.1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 3,688 kB
  • sloc: ansic: 32,039; sh: 1,491; awk: 138; makefile: 80
file content (80 lines) | stat: -rw-r--r-- 2,558 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
 *	(c) Copyright 1990, Kim Fabricius Storm.  All rights reserved.
 *      Copyright (c) 1996-2003 Michael T Pins.  All rights reserved.
 *
 *	Memory handling
 */

#ifndef _NN_ARTICLES_H
#define _NN_ARTICLES_H 1

/* article headers */

extern article_number  n_articles;
extern article_header **articles;


typedef struct thunk {
    char           *this_thunk;
    struct thunk   *next_thunk;
    long            thunk_size;
}               thunk;


typedef struct {
    thunk          *sm_cur_t;
    int             sm_size;
    char           *sm_next;
}               string_marker;


typedef struct {
    string_marker   mm_string;
    thunk          *mm_cur_t;
    int             mm_size;
    article_header *mm_next;
    long            mm_nart;
}               memory_marker;


article_header *alloc_art(void);
char           *alloc_str(int);
void            free_memory(void);
void            mark_str(string_marker *);
void            release_str(string_marker *);
void            mark_memory(memory_marker *);
void            release_memory(memory_marker *);
void            merge_memory(void);
void            add_article(article_header *);
int             access_group(register group_header *, article_number, article_number, register flag_type, char *);


/* flags to access_group */

#define	ACC_ALSO_CROSS_POSTINGS	FLAG(1)	/* */
#define	ACC_DONT_SORT_ARTICLES	FLAG(2)	/* */
#define	ACC_DONT_SPLIT_DIGESTS	FLAG(3)	/* only full digest */
#define	ACC_ALSO_FULL_DIGEST	FLAG(4)	/* also full digest */
#define ACC_EXTRA_ARTICLES	FLAG(5)	/* add to current menu */
#define ACC_ALSO_READ_ARTICLES	FLAG(6)	/* */
#define ACC_ONLY_READ_ARTICLES	FLAG(7)	/* unread are already collected */
#define ACC_MERGED_MENU		FLAG(8)	/* set a_group field */
#define ACC_ORIG_NEWSRC		FLAG(9)	/* get previously unread articles */
#define ACC_VALIDATE_ONLY	FLAG(10)	/* don't save articles */
#define ACC_SPEW_MODE		FLAG(11)	/* */
#define ACC_ON_SENDER		FLAG(12)	/* match on sender (only) */
#define ACC_ON_SUBJECT		FLAG(13)	/* match on subject (also) */
#define ACC_DO_KILL		FLAG(14)	/* do auto-kill/select */
#define	ACC_PARSE_VARIABLES	FLAG(15)	/* kill, split, etc. */
#define ACC_MERGED_NEWSRC	FLAG(16)	/* merge orig and cur .newsrc */
#define ACC_ALSO_UNSUB_GROUPS	FLAG(17)	/* kill x-posts based on
						 * unsub also */

#ifdef ART_GREP
#define ACC_ON_GREP_UNREAD	FLAG(18)	/* grep article body, unread
						 * articles */
#define ACC_ON_GREP_ALL		FLAG(19)	/* grep article body, all
						 * articles */
#endif				/* ART_GREP */

#endif				/* _NN_ARTICLES_H */