Initialize "flags" field.
Showing
1 changed file
with
96 additions
and
71 deletions
... | @@ -18,81 +18,106 @@ | ... | @@ -18,81 +18,106 @@ |
18 | #include "mail.h" | 18 | #include "mail.h" |
19 | 19 | ||
20 | const struct mail_command_entry mail_command_table[] = { | 20 | const struct mail_command_entry mail_command_table[] = { |
21 | { "a", "alias", 0, mail_alias, | 21 | { "a", "alias", 0, mail_alias, |
22 | "a[lias] [alias [address...]]" }, | 22 | "a[lias] [alias [address...]]" }, |
23 | { "alt", "alternates", 0, mail_alt, "alt[ernates] name..." }, | 23 | { "alt", "alternates", 0, mail_alt, "alt[ernates] name..." }, |
24 | { "C", "Copy", 0, mail_copy, "C[opy] [msglist]" }, | 24 | { "C", "Copy", 0, mail_copy, "C[opy] [msglist]" }, |
25 | { "cd", "cd", 0, mail_cd, "cd [directory]" }, | 25 | { "cd", "cd", 0, mail_cd, "cd [directory]" }, |
26 | { "ch", "chdir", 0, mail_cd, "ch[dir] directory" }, | 26 | { "ch", "chdir", 0, mail_cd, "ch[dir] directory" }, |
27 | { "c", "copy", 0, mail_copy, "c[opy] [[msglist] file]" }, | 27 | { "c", "copy", 0, mail_copy, "c[opy] [[msglist] file]" }, |
28 | { "d", "delete", 0, mail_delete, "d[elete] [msglist]" }, | 28 | { "d", "delete", 0, mail_delete, "d[elete] [msglist]" }, |
29 | { "di", "discard", 0, mail_discard, | 29 | { "di", "discard", 0, mail_discard, |
30 | "di[scard] [header-field...]" }, | 30 | "di[scard] [header-field...]" }, |
31 | { "dp", "dp", 0, mail_dp, "dp [msglist]" }, | 31 | { "dp", "dp", 0, mail_dp, "dp [msglist]" }, |
32 | { "dt", "dt", 0, mail_dp, "dt [msglist]" }, | 32 | { "dt", "dt", 0, mail_dp, "dt [msglist]" }, |
33 | { "ec", "echo", 0, mail_echo, "ec[ho] string ..." }, | 33 | { "ec", "echo", 0, mail_echo, "ec[ho] string ..." }, |
34 | { "e", "edit", 0, mail_edit, "e[dit] [msglist]" }, | 34 | { "e", "edit", 0, mail_edit, "e[dit] [msglist]" }, |
35 | { "el", "else", 1, mail_else, "el[se]" }, | 35 | { "el", "else", EF_FLOW, mail_else, "el[se]" }, |
36 | { "en", "endif", 1, mail_endif, "en[dif]" }, | 36 | { "en", "endif", EF_FLOW, mail_endif, "en[dif]" }, |
37 | { "ex", "exit", 0, mail_exit, "ex[it]" }, | 37 | { "ex", "exit", 0, mail_exit, "ex[it]" }, |
38 | { "F", "Followup", 0, mail_followup,"F[ollowup] [msglist]" }, | 38 | { "F", "Followup", EF_SEND, mail_followup,"F[ollowup] [msglist]" }, |
39 | { "fi", "file", 0, mail_file, "fi[le] [file]" }, | 39 | { "fi", "file", 0, mail_file, "fi[le] [file]" }, |
40 | { "fold", "folder", 0, mail_file, "fold[er] [file]" }, | 40 | { "fold", "folder", 0, mail_file, "fold[er] [file]" }, |
41 | { "folders", "folders", 0, mail_folders,"folders" }, | 41 | { "folders", "folders", 0, mail_folders,"folders" }, |
42 | { "fo", "followup", 0, mail_followup,"fo[llowup] [msglist]" }, | 42 | { "fo", "followup", EF_SEND, mail_followup,"fo[llowup] [msglist]" }, |
43 | { "f", "from", 0, mail_from, "f[rom] [msglist]" }, | 43 | { "f", "from", 0, mail_from, "f[rom] [msglist]" }, |
44 | { "g", "group", 0, mail_alias, | 44 | { "g", "group", 0, mail_alias, |
45 | "g[roup] [alias [address...]]" }, | 45 | "g[roup] [alias [address...]]" }, |
46 | { "h", "headers", 0, mail_headers,"h[eaders] [msglist]" }, | 46 | { "h", "headers", 0, mail_headers,"h[eaders] [msglist]" }, |
47 | { "hel", "help", 0, mail_help, "hel[p] [command...]" }, | 47 | { "hel", "help", 0, mail_help, "hel[p] [command...]" }, |
48 | { "ho", "hold", 0, mail_hold, "ho[ld] [msglist]" }, | 48 | { "ho", "hold", 0, mail_hold, "ho[ld] [msglist]" }, |
49 | { "i", "if", 1, mail_if, "i[f] s|r|t" }, | 49 | { "i", "if", EF_FLOW, mail_if, "i[f] s|r|t" }, |
50 | { "ig", "ignore", 0, mail_discard,"ig[nore] [header-field...]" }, | 50 | { "ig", "ignore", 0, mail_discard,"ig[nore] [header-field...]" }, |
51 | { "l", "list", 0, mail_list, "l[ist]" }, | 51 | { "l", "list", 0, mail_list, "l[ist]" }, |
52 | { "m", "mail", 0, mail_send, "m[ail] [address...]" }, | 52 | { "m", "mail", EF_SEND, mail_send, "m[ail] [address...]" }, |
53 | { "mb", "mbox", 0, mail_mbox, "mb[ox] [msglist]" }, | 53 | { "mb", "mbox", 0, mail_mbox, "mb[ox] [msglist]" }, |
54 | { "n", "next", 0, mail_next, "n[ext] [message]" }, | 54 | { "n", "next", 0, mail_next, "n[ext] [message]" }, |
55 | { "P", "Print", 0, mail_print, "P[rint] [msglist]" }, | 55 | { "P", "Print", 0, mail_print, "P[rint] [msglist]" }, |
56 | { "pi", "pipe", 0, mail_pipe, "pi[pe] [[msglist] command]" }, | 56 | { "pi", "pipe", 0, mail_pipe, "pi[pe] [[msglist] command]" }, |
57 | { "pre", "preserve", 0, mail_hold, "pre[serve] [msglist]" }, | 57 | { "pre", "preserve", 0, mail_hold, "pre[serve] [msglist]" }, |
58 | { "prev", "previous", 0, mail_previous,"prev[ious] [message]" }, | 58 | { "prev", "previous", 0, mail_previous,"prev[ious] [message]" }, |
59 | { "p", "print", 0, mail_print, "p[rint] [msglist]" }, | 59 | { "p", "print", 0, mail_print, "p[rint] [msglist]" }, |
60 | { "q", "quit", 0, mail_quit, "q[uit]" }, | 60 | { "q", "quit", 0, mail_quit, "q[uit]" }, |
61 | { "R", "Reply", 0, mail_reply, "R[eply] [msglist]" }, | 61 | { "R", "Reply", EF_SEND, mail_reply, "R[eply] [msglist]" }, |
62 | { "R", "Respond", 0, mail_reply, "R[espond] [msglist]" }, | 62 | { "R", "Respond", EF_SEND, mail_reply, "R[espond] [msglist]" }, |
63 | { "r", "reply", 0, mail_reply, "r[eply] [msglist]" }, | 63 | { "r", "reply", EF_SEND, mail_reply, "r[eply] [msglist]" }, |
64 | { "r", "respond", 0, mail_reply, "r[espond] [msglist]" }, | 64 | { "r", "respond", EF_SEND, mail_reply, "r[espond] [msglist]" }, |
65 | { "ret", "retain", 0, mail_retain, "ret[ain] [header-field]" }, | 65 | { "ret", "retain", 0, mail_retain, "ret[ain] [header-field]" }, |
66 | { "S", "Save", 0, mail_save, "S[ave] [msglist]" }, | 66 | { "S", "Save", 0, mail_save, "S[ave] [msglist]" }, |
67 | { "s", "save", 0, mail_save, "s[ave] [[msglist] file]" }, | 67 | { "s", "save", 0, mail_save, "s[ave] [[msglist] file]" }, |
68 | { "se", "set", 0, mail_set, | 68 | { "se", "set", 0, mail_set, |
69 | "se[t] [name[=[string]]...] [name=number...] [noname...]" }, | 69 | "se[t] [name[=[string]]...] [name=number...] [noname...]" }, |
70 | { "sh", "shell", 0, mail_shell, "sh[ell] [command]" }, | 70 | { "sh", "shell", 0, mail_shell, "sh[ell] [command]" }, |
71 | { "si", "size", 0, mail_size, "si[ze] [msglist]" }, | 71 | { "si", "size", 0, mail_size, "si[ze] [msglist]" }, |
72 | { "so", "source", 0, mail_source, "so[urce] file" }, | 72 | { "so", "source", 0, mail_source, "so[urce] file" }, |
73 | { "T", "Type", 0, mail_print, "T[ype] [msglist]" }, | 73 | { "T", "Type", 0, mail_print, "T[ype] [msglist]" }, |
74 | { "to", "top", 0, mail_top, "to[p] [msglist]" }, | 74 | { "to", "top", 0, mail_top, "to[p] [msglist]" }, |
75 | { "tou", "touch", 0, mail_touch, "tou[ch] [msglist]" }, | 75 | { "tou", "touch", 0, mail_touch, "tou[ch] [msglist]" }, |
76 | { "t", "type", 0, mail_print, "t[ype] [msglist]" }, | 76 | { "t", "type", 0, mail_print, "t[ype] [msglist]" }, |
77 | { "una", "unalias", 0, mail_unalias,"una[lias] [alias]..." }, | 77 | { "una", "unalias", 0, mail_unalias,"una[lias] [alias]..." }, |
78 | { "u", "undelete", 0, mail_undelete,"u[ndelete] [msglist]" }, | 78 | { "u", "undelete", 0, mail_undelete,"u[ndelete] [msglist]" }, |
79 | { "uns", "unset", 0, mail_unset, "uns[et] name..." }, | 79 | { "uns", "unset", 0, mail_unset, "uns[et] name..." }, |
80 | { "v", "visual", 0, mail_visual, "v[isual] [msglist]" }, | 80 | { "v", "visual", 0, mail_visual, "v[isual] [msglist]" }, |
81 | { "W", "Write", 0, mail_write, "W[rite] [msglist]" }, | 81 | { "wa", "warranty", 0, mail_warranty,"wa[rranty]" }, |
82 | { "w", "write", 0, mail_write, "w[rite] [[msglist] file]" }, | 82 | { "W", "Write", 0, mail_write, "W[rite] [msglist]" }, |
83 | { "x", "xit", 0, mail_exit, "x[it]" }, | 83 | { "w", "write", 0, mail_write, "w[rite] [[msglist] file]" }, |
84 | { "z", "", 0, mail_z, "z[+|-|. [count]]" }, | 84 | { "x", "xit", 0, mail_exit, "x[it]" }, |
85 | { "?", "?", 0, mail_help, "? [command...]" }, | 85 | { "z", "", 0, mail_z, "z[+|-|. [count]]" }, |
86 | { "!", "", 0, mail_shell, "![command]" }, | 86 | { "?", "?", 0, mail_help, "? [command...]" }, |
87 | { "=", "=", 0, mail_eq, "=" }, | 87 | { "!", "", 0, mail_shell, "![command]" }, |
88 | { "#", "#", 0, NULL, "# comment" }, | 88 | { "=", "=", 0, mail_eq, "=" }, |
89 | { "*", "*", 0, mail_list, "*" }, | 89 | { "#", "#", 0, NULL, "# comment" }, |
90 | { "+", "+", 0, mail_next, "+ [message]" }, | 90 | { "*", "*", 0, mail_list, "*" }, |
91 | { "|", "|", 0, mail_pipe, "| [[msglist] command]" }, | 91 | { "+", "+", 0, mail_next, "+ [message]" }, |
92 | { "-", "-", 0, mail_previous,"- [message]" }, | 92 | { "|", "|", 0, mail_pipe, "| [[msglist] command]" }, |
93 | { "-", "-", 0, mail_previous,"- [message]" }, | ||
93 | { 0, 0, 0, 0, 0} | 94 | { 0, 0, 0, 0, 0} |
94 | }; | 95 | }; |
95 | 96 | ||
96 | const struct mail_command_entry mail_escape_table[] = { | 97 | const struct mail_command_entry mail_escape_table[] = { |
98 | {"!", "!", 0, var_shell, "![shell-command]"}, | ||
99 | {":", ":", 0, var_command, ":[mail-command]"}, | ||
100 | {"-", "-", 0, var_command, "-[mail-command]"}, | ||
101 | {"?", "?", 0, var_help, "?"}, | ||
102 | {"A", "A", 0, var_sign, "A"}, | ||
103 | {"a", "a", 0, var_sign, "a"}, | ||
104 | {"b", "b", 0, var_bcc, "b[bcc-list]"}, | ||
105 | {"c", "c", 0, var_cc, "c[cc-list]"}, | ||
106 | {"d", "d", 0, var_deadletter, "d"}, | ||
107 | {"e", "e", 0, var_editor, "e"}, | ||
108 | {"f", "f", 0, var_print, "f[mesg-list]"}, | ||
109 | {"F", "F", 0, var_print, "F[mesg-list]"}, | ||
110 | {"h", "h", 0, var_headers, "h"}, | ||
111 | {"i", "i", 0, var_insert, "i[var-name]"}, | ||
112 | {"m", "m", 0, var_quote, "m[mesg-list]"}, | ||
113 | {"M", "M", 0, var_quote, "M[mesg-list]"}, | ||
114 | {"p", "p", 0, var_type_input,"p"}, | ||
115 | {"r", "<", 0, var_read, "r[filename]"}, | ||
116 | {"s", "s", 0, var_subj, "s[string]"}, | ||
117 | {"t", "t", 0, var_to, "t[name-list]"}, | ||
118 | {"v", "v", 0, var_visual, "v"}, | ||
119 | {"w", "w", 0, var_write, "w[filename]"}, | ||
120 | {"x", "x", 0, var_exit, "x"}, | ||
121 | {"|", "|", 0, var_pipe, "|[shell-command]"}, | ||
97 | {0, 0, 0, 0} | 122 | {0, 0, 0, 0} |
98 | }; | 123 | }; | ... | ... |
-
Please register or sign in to post a comment