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