File: mf.h

package info (click to toggle)
nmh 1.6-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 6,204 kB
  • ctags: 3,851
  • sloc: ansic: 48,922; sh: 16,422; makefile: 559; perl: 509; lex: 402; awk: 74
file content (78 lines) | stat: -rw-r--r-- 1,425 bytes parent folder | download | duplicates (2)
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

/*
 * mf.h -- include file for mailbox filters
 */

#include <h/nmh.h>

#ifndef	TRUE
# define TRUE 1
#endif

#ifndef	FALSE
# define FALSE 0
#endif

#ifndef	NOTOK
# define NOTOK (-1)
#endif

#ifndef	OK
# define OK 0
#endif

#ifndef	DONE
# define DONE 1
#endif

#define	LINESIZ	512

#define	MBXMODE	0600
#define	TMPMODE	0600

#define	OWIDTH	75		/* length of a header line */

#define	HFROM	1		/* header has From: component	 */
#define	HSNDR	2		/* header has Sender: component  */
#define	HADDR	3		/* header has address component	 */
#define	HDATE	4		/* header has Date: component	 */
#define	HOTHR	5		/* header is unimportant	 */


struct adrx {
    char *text;
    char *pers;
    char *mbox;
    char *host;
    char *path;
    char *grp;
    int ingrp;
    char *note;
    char *err;
};


/* 
 *    Codes returned by uucp2mmdf(), mmdf2uucp()
 */

#define	MFOK	0		/* all went well		 */
 /* remaining codes must > DONE	 */
#define	MFPRM	2		/* bad parameter		 */
#define	MFSIO	3		/* stdio package went screwy	 */
#define	MFROM	4		/* from line was bad		 */
#define	MFHDR	5		/* headers were bad		 */
#define	MFTXT	6		/* text was bad			 */
#define	MFERR	7		/* I/O or system error		 */
#define	MFDLM	8		/* Bad delimiter in MMDF file	 */


/*
 * prototypes
 */
int isfrom(const char *);
int lequal (const char *, const char *);
int mfgets (FILE *, char **);
char *legal_person (const char *);
struct adrx *getadrx (const char *);