3 * fmt_compile.h -- format types
6 /* types that output text */
7 #define FT_COMP 1 /* the text of a component */
8 #define FT_COMPF 2 /* comp text, filled */
9 #define FT_LIT 3 /* literal text */
10 #define FT_LITF 4 /* literal text, filled */
11 #define FT_CHAR 5 /* a single ascii character */
12 #define FT_NUM 6 /* "value" as decimal number */
13 #define FT_NUMF 7 /* "value" as filled dec number */
14 #define FT_STR 8 /* "str" as text */
15 #define FT_STRF 9 /* "str" as text, filled */
16 #define FT_STRFW 10 /* "str" as text, filled, width in "value" */
17 #define FT_STRLIT 11 /* "str" as text, no space compression */
18 #define FT_STRLITZ 12 /* literal text with zero display width */
19 #define FT_PUTADDR 13 /* split and print address line */
21 /* types that modify the "str" or "value" registers */
22 #define FT_LS_COMP 14 /* set "str" to component text */
23 #define FT_LS_LIT 15 /* set "str" to literal text */
24 #define FT_LS_GETENV 16 /* set "str" to getenv(text) */
25 #define FT_LS_CFIND 17 /* set "str" to context_find(text) */
26 #define FT_LS_DECODECOMP 18 /* set "str" to decoded component text */
27 #define FT_LS_DECODE 19 /* decode "str" as RFC-2047 header */
28 #define FT_LS_TRIM 20 /* trim trailing white space from "str" */
29 #define FT_LV_COMP 21 /* set "value" to comp (as dec. num) */
30 #define FT_LV_COMPFLAG 22 /* set "value" to comp flag word */
31 #define FT_LV_LIT 23 /* set "value" to literal num */
32 #define FT_LV_DAT 24 /* set "value" to dat[n] */
33 #define FT_LV_STRLEN 25 /* set "value" to length of "str" */
34 #define FT_LV_PLUS_L 26 /* set "value" += literal */
35 #define FT_LV_MINUS_L 27 /* set "value" -= literal */
36 #define FT_LV_DIVIDE_L 28 /* set "value" to value / literal */
37 #define FT_LV_MODULO_L 29 /* set "value" to value % literal */
38 #define FT_LV_CHAR_LEFT 30 /* set "value" to char left in output */
40 #define FT_LS_MONTH 31 /* set "str" to tws month */
41 #define FT_LS_LMONTH 32 /* set "str" to long tws month */
42 #define FT_LS_ZONE 33 /* set "str" to tws timezone */
43 #define FT_LS_DAY 34 /* set "str" to tws weekday */
44 #define FT_LS_WEEKDAY 35 /* set "str" to long tws weekday */
45 #define FT_LS_822DATE 36 /* set "str" to 822 date str */
46 #define FT_LS_PRETTY 37 /* set "str" to pretty (?) date str */
47 #define FT_LV_SEC 38 /* set "value" to tws second */
48 #define FT_LV_MIN 39 /* set "value" to tws minute */
49 #define FT_LV_HOUR 40 /* set "value" to tws hour */
50 #define FT_LV_MDAY 41 /* set "value" to tws day of month */
51 #define FT_LV_MON 42 /* set "value" to tws month */
52 #define FT_LV_YEAR 43 /* set "value" to tws year */
53 #define FT_LV_YDAY 44 /* set "value" to tws day of year */
54 #define FT_LV_WDAY 45 /* set "value" to tws weekday */
55 #define FT_LV_ZONE 46 /* set "value" to tws timezone */
56 #define FT_LV_CLOCK 47 /* set "value" to tws clock */
57 #define FT_LV_RCLOCK 48 /* set "value" to now - tws clock */
58 #define FT_LV_DAYF 49 /* set "value" to tws day flag */
59 #define FT_LV_DST 50 /* set "value" to tws daylight savings flag */
60 #define FT_LV_ZONEF 51 /* set "value" to tws timezone flag */
62 #define FT_LS_PERS 52 /* set "str" to person part of addr */
63 #define FT_LS_MBOX 53 /* set "str" to mbox part of addr */
64 #define FT_LS_HOST 54 /* set "str" to host part of addr */
65 #define FT_LS_PATH 55 /* set "str" to route part of addr */
66 #define FT_LS_GNAME 56 /* set "str" to group part of addr */
67 #define FT_LS_NOTE 57 /* set "str" to comment part of addr */
68 #define FT_LS_ADDR 58 /* set "str" to mbox@host */
69 #define FT_LS_822ADDR 59 /* set "str" to 822 format addr */
70 #define FT_LS_FRIENDLY 60 /* set "str" to "friendly" format addr */
71 #define FT_LV_HOSTTYPE 61 /* set "value" to addr host type */
72 #define FT_LV_INGRPF 62 /* set "value" to addr in-group flag */
73 #define FT_LS_UNQUOTE 63 /* remove RFC 2822 quotes from "str" */
74 #define FT_LV_NOHOSTF 64 /* set "value" to addr no-host flag */
77 #define FT_LOCALDATE 65 /* Coerce date to local timezone */
78 #define FT_GMTDATE 66 /* Coerce date to gmt */
80 /* pre-format processing */
81 #define FT_PARSEDATE 67 /* parse comp into a date (tws) struct */
82 #define FT_PARSEADDR 68 /* parse comp into a mailaddr struct */
83 #define FT_FORMATADDR 69 /* let external routine format addr */
84 #define FT_CONCATADDR 70 /* formataddr w/out duplicate removal */
85 #define FT_MYMBOX 71 /* do "mymbox" test on comp */
87 /* misc. */ /* ADDTOSEQ only works if you include "options LBL" */
88 #define FT_ADDTOSEQ 72 /* add current msg to a sequence */
90 /* conditionals & control flow (must be last) */
91 #define FT_SAVESTR 73 /* save current str reg */
92 #define FT_DONE 74 /* stop formatting */
93 #define FT_PAUSE 75 /* pause */
94 #define FT_NOP 76 /* nop */
95 #define FT_GOTO 77 /* (relative) goto */
96 #define FT_IF_S_NULL 78 /* test if "str" null */
97 #define FT_IF_S 79 /* test if "str" non-null */
98 #define FT_IF_V_EQ 80 /* test if "value" = literal */
99 #define FT_IF_V_NE 81 /* test if "value" != literal */
100 #define FT_IF_V_GT 82 /* test if "value" > literal */
101 #define FT_IF_MATCH 83 /* test if "str" contains literal */
102 #define FT_IF_AMATCH 84 /* test if "str" starts with literal */
103 #define FT_S_NULL 85 /* V = 1 if "str" null */
104 #define FT_S_NONNULL 86 /* V = 1 if "str" non-null */
105 #define FT_V_EQ 87 /* V = 1 if "value" = literal */
106 #define FT_V_NE 88 /* V = 1 if "value" != literal */
107 #define FT_V_GT 89 /* V = 1 if "value" > literal */
108 #define FT_V_MATCH 90 /* V = 1 if "str" contains literal */
109 #define FT_V_AMATCH 91 /* V = 1 if "str" starts with literal */
111 #define IF_FUNCS FT_S_NULL /* start of "if" functions */