1 /* kfile.h 2 */ 3 /* This software is copyrighted as detailed in the LICENSE file. */ 4 5 6 #define KF_GLOBAL 0 7 #define KF_LOCAL 1 8 9 #define KFS_LOCAL_CHANGES 0x0001 10 #define KFS_THREAD_CHANGES 0x0002 11 #define KFS_NORMAL_LINES 0x0010 12 #define KFS_THREAD_LINES 0x0020 13 #define KFS_GLOBAL_THREADFILE 0x1000 14 15 #define AUTO_KILL_THD 0x8000 16 #define AUTO_KILL_SBJ 0x4000 17 #define AUTO_KILL_FOL 0x2000 18 #define AUTO_KILL_1 0x1000 19 #define AUTO_SEL_THD 0x0800 20 #define AUTO_SEL_SBJ 0x0400 21 #define AUTO_SEL_FOL 0x0200 22 #define AUTO_SEL_1 0x0100 23 #define AUTO_OLD 0x0080 24 25 #define AUTO_KILLS 0xF000 26 #define AUTO_SELS 0x0F00 27 28 /* The following defines are only valid as flags to function calls, used 29 * in combination with the AUTO_* flags above. */ 30 #define AFFECT_UNSEL 0 31 #define AFFECT_ALL 0x0001 32 #define ALSO_ECHO 0x0002 /* only works with [un]select_article() */ 33 #define SET_TORETURN 0x0004 /* only works with kill_*() */ 34 35 #define KF_AGE_MASK 0x003F 36 #define KF_DAYNUM(x) ((long)time((time_t*)NULL) / 86400 - 10490 - (x)) 37 38 #define KF_MAXDAYS 30 39 40 #ifdef KILLFILES 41 EXT FILE* globkfp INIT(NULL); /* global article killer file */ 42 EXT FILE* localkfp INIT(NULL); /* local (for this newsgroup) file */ 43 EXT int kf_state; /* the state of our kill files */ 44 EXT int kfs_local_change_clear; /* bits to clear local changes */ 45 EXT int kfs_thread_change_set; /* bits to set for thread changes */ 46 EXT int kf_thread_cnt; /* # entries in the thread kfile */ 47 EXT int kf_changethd_cnt; /* # entries changed from old to new */ 48 EXT long kf_daynum; /* day number for thread killfile */ 49 EXT ART_NUM killfirst; /* used as firstart when killing */ 50 #endif 51 52 /* DON'T EDIT BELOW THIS LINE OR YOUR CHANGES WILL BE LOST! */ 53 54 void kfile_init _((void)); 55 int do_kfile _((FILE*,int)); 56 void kill_unwanted _((ART_NUM,char*,int)); 57 void rewrite_kfile _((ART_NUM)); 58 void update_thread_kfile _((void)); 59 void change_auto_flags _((ARTICLE*,int)); 60 void clear_auto_flags _((ARTICLE*)); 61 void perform_auto_flags _((ARTICLE*,int,int,int)); 62 int edit_kfile _((void)); 63 #ifdef KILLFILES 64 void open_kfile _((int)); 65 #endif 66 void kf_append _((char*,bool_int)); 67