annotate uip/send.c @ 17:76d91e545ea8 default tip

addrsbr and dtimep fix
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 24 Nov 2014 14:49:25 +0900
parents 441a2190cfae
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
bce86c4163a3 Initial revision
kono
parents:
diff changeset
1 /* send.c - send a composed message */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
2 #ifndef lint
12
441a2190cfae Lion fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 10
diff changeset
3 static char ident[] = "@(#)$Id: send.c,v 1.2 2006/12/05 18:18:13 kono Exp $";
0
bce86c4163a3 Initial revision
kono
parents:
diff changeset
4 #endif /* lint */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
5
bce86c4163a3 Initial revision
kono
parents:
diff changeset
6 #include "../h/mh.h"
bce86c4163a3 Initial revision
kono
parents:
diff changeset
7 #include <errno.h>
bce86c4163a3 Initial revision
kono
parents:
diff changeset
8 #include <stdio.h>
bce86c4163a3 Initial revision
kono
parents:
diff changeset
9 #include <signal.h>
bce86c4163a3 Initial revision
kono
parents:
diff changeset
10 #include <sys/types.h>
bce86c4163a3 Initial revision
kono
parents:
diff changeset
11 #include <sys/stat.h>
bce86c4163a3 Initial revision
kono
parents:
diff changeset
12 #ifdef LOCALE
bce86c4163a3 Initial revision
kono
parents:
diff changeset
13 #include <locale.h>
bce86c4163a3 Initial revision
kono
parents:
diff changeset
14 #endif
bce86c4163a3 Initial revision
kono
parents:
diff changeset
15
bce86c4163a3 Initial revision
kono
parents:
diff changeset
16 /* */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
17
bce86c4163a3 Initial revision
kono
parents:
diff changeset
18 #ifndef TMA
bce86c4163a3 Initial revision
kono
parents:
diff changeset
19 #define TMAminc(a) (a)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
20 #else /* TMA */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
21 #define TMAminc(a) 0
bce86c4163a3 Initial revision
kono
parents:
diff changeset
22 #endif /* TMA */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
23
bce86c4163a3 Initial revision
kono
parents:
diff changeset
24 #ifndef MIME
bce86c4163a3 Initial revision
kono
parents:
diff changeset
25 #define MIMEminc(a) (a)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
26 #else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
27 #define MIMEminc(a) 0
bce86c4163a3 Initial revision
kono
parents:
diff changeset
28 #endif
bce86c4163a3 Initial revision
kono
parents:
diff changeset
29
bce86c4163a3 Initial revision
kono
parents:
diff changeset
30 static struct swit switches[] = {
bce86c4163a3 Initial revision
kono
parents:
diff changeset
31 #define ALIASW 0
bce86c4163a3 Initial revision
kono
parents:
diff changeset
32 "alias aliasfile", 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
33
bce86c4163a3 Initial revision
kono
parents:
diff changeset
34 #define DEBUGSW 1
bce86c4163a3 Initial revision
kono
parents:
diff changeset
35 "debug", -5,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
36
bce86c4163a3 Initial revision
kono
parents:
diff changeset
37 #define DRAFTSW 2
bce86c4163a3 Initial revision
kono
parents:
diff changeset
38 "draft", 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
39
bce86c4163a3 Initial revision
kono
parents:
diff changeset
40 #define DFOLDSW 3
bce86c4163a3 Initial revision
kono
parents:
diff changeset
41 "draftfolder +folder", 6,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
42 #define DMSGSW 4
bce86c4163a3 Initial revision
kono
parents:
diff changeset
43 "draftmessage msg", 6,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
44 #define NDFLDSW 5
bce86c4163a3 Initial revision
kono
parents:
diff changeset
45 "nodraftfolder", 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
46
bce86c4163a3 Initial revision
kono
parents:
diff changeset
47 #define ENCRSW 6
bce86c4163a3 Initial revision
kono
parents:
diff changeset
48 "encrypt", TMAminc (-7),
bce86c4163a3 Initial revision
kono
parents:
diff changeset
49 #define NENCRSW 7
bce86c4163a3 Initial revision
kono
parents:
diff changeset
50 "noencrypt", TMAminc (-9),
bce86c4163a3 Initial revision
kono
parents:
diff changeset
51
bce86c4163a3 Initial revision
kono
parents:
diff changeset
52 #define FILTSW 8
bce86c4163a3 Initial revision
kono
parents:
diff changeset
53 "filter filterfile", 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
54 #define NFILTSW 9
bce86c4163a3 Initial revision
kono
parents:
diff changeset
55 "nofilter", 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
56
bce86c4163a3 Initial revision
kono
parents:
diff changeset
57 #define FRMTSW 10
bce86c4163a3 Initial revision
kono
parents:
diff changeset
58 "format", 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
59 #define NFRMTSW 11
bce86c4163a3 Initial revision
kono
parents:
diff changeset
60 "noformat", 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
61
bce86c4163a3 Initial revision
kono
parents:
diff changeset
62 #define FORWSW 12
bce86c4163a3 Initial revision
kono
parents:
diff changeset
63 "forward", 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
64 #define NFORWSW 13
bce86c4163a3 Initial revision
kono
parents:
diff changeset
65 "noforward", 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
66
bce86c4163a3 Initial revision
kono
parents:
diff changeset
67 #define MIMESW 14
bce86c4163a3 Initial revision
kono
parents:
diff changeset
68 "mime", MIMEminc(-4),
bce86c4163a3 Initial revision
kono
parents:
diff changeset
69 #define NMIMESW 15
bce86c4163a3 Initial revision
kono
parents:
diff changeset
70 "nomime", MIMEminc(-6),
bce86c4163a3 Initial revision
kono
parents:
diff changeset
71
bce86c4163a3 Initial revision
kono
parents:
diff changeset
72 #define MSGDSW 16
bce86c4163a3 Initial revision
kono
parents:
diff changeset
73 "msgid", 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
74 #define NMSGDSW 17
bce86c4163a3 Initial revision
kono
parents:
diff changeset
75 "nomsgid", 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
76
bce86c4163a3 Initial revision
kono
parents:
diff changeset
77 #define PUSHSW 18
bce86c4163a3 Initial revision
kono
parents:
diff changeset
78 "push", 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
79 #define NPUSHSW 19
bce86c4163a3 Initial revision
kono
parents:
diff changeset
80 "nopush", 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
81
bce86c4163a3 Initial revision
kono
parents:
diff changeset
82 #define SPLITSW 20
bce86c4163a3 Initial revision
kono
parents:
diff changeset
83 "split seconds", MIMEminc(-5),
bce86c4163a3 Initial revision
kono
parents:
diff changeset
84
bce86c4163a3 Initial revision
kono
parents:
diff changeset
85 #define UNIQSW 21
bce86c4163a3 Initial revision
kono
parents:
diff changeset
86 "unique", -6,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
87 #define NUNIQSW 22
bce86c4163a3 Initial revision
kono
parents:
diff changeset
88 "nounique", -8,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
89
bce86c4163a3 Initial revision
kono
parents:
diff changeset
90 #define VERBSW 23
bce86c4163a3 Initial revision
kono
parents:
diff changeset
91 "verbose", 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
92 #define NVERBSW 24
bce86c4163a3 Initial revision
kono
parents:
diff changeset
93 "noverbose", 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
94
bce86c4163a3 Initial revision
kono
parents:
diff changeset
95 #define WATCSW 25
bce86c4163a3 Initial revision
kono
parents:
diff changeset
96 "watch", 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
97 #define NWATCSW 26
bce86c4163a3 Initial revision
kono
parents:
diff changeset
98 "nowatch", 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
99
bce86c4163a3 Initial revision
kono
parents:
diff changeset
100 #define WIDTHSW 27
bce86c4163a3 Initial revision
kono
parents:
diff changeset
101 "width columns", 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
102
bce86c4163a3 Initial revision
kono
parents:
diff changeset
103 #define HELPSW 28
bce86c4163a3 Initial revision
kono
parents:
diff changeset
104 "help", 4,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
105
bce86c4163a3 Initial revision
kono
parents:
diff changeset
106 #define MAILSW 29
bce86c4163a3 Initial revision
kono
parents:
diff changeset
107 "mail", -4,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
108 #define SAMLSW 30
bce86c4163a3 Initial revision
kono
parents:
diff changeset
109 "saml", -4,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
110 #define SENDSW 31
bce86c4163a3 Initial revision
kono
parents:
diff changeset
111 "send", -4,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
112 #define SOMLSW 32
bce86c4163a3 Initial revision
kono
parents:
diff changeset
113 "soml", -4,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
114
bce86c4163a3 Initial revision
kono
parents:
diff changeset
115 #define CLIESW 33
bce86c4163a3 Initial revision
kono
parents:
diff changeset
116 "client host", -6,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
117 #define SERVSW 34
bce86c4163a3 Initial revision
kono
parents:
diff changeset
118 "server host", -6,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
119 #define SNOOPSW 35
bce86c4163a3 Initial revision
kono
parents:
diff changeset
120 "snoop", -5,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
121
bce86c4163a3 Initial revision
kono
parents:
diff changeset
122 #define QUEUESW 36
bce86c4163a3 Initial revision
kono
parents:
diff changeset
123 "queued", -6,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
124
bce86c4163a3 Initial revision
kono
parents:
diff changeset
125 #define RECORSW 37
bce86c4163a3 Initial revision
kono
parents:
diff changeset
126 "record program", -6,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
127 #define NRECOSW 38
bce86c4163a3 Initial revision
kono
parents:
diff changeset
128 "norecord", -8,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
129
bce86c4163a3 Initial revision
kono
parents:
diff changeset
130 #ifdef MIME_HEADERS
bce86c4163a3 Initial revision
kono
parents:
diff changeset
131 #define HENCDSW 39
bce86c4163a3 Initial revision
kono
parents:
diff changeset
132 "hencode", 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
133 #define NHENCDSW 40
bce86c4163a3 Initial revision
kono
parents:
diff changeset
134 "nohencode", 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
135 #endif /* MIME_HEADERS */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
136
bce86c4163a3 Initial revision
kono
parents:
diff changeset
137 NULL, 0
bce86c4163a3 Initial revision
kono
parents:
diff changeset
138 };
bce86c4163a3 Initial revision
kono
parents:
diff changeset
139
bce86c4163a3 Initial revision
kono
parents:
diff changeset
140 static struct swit anyl[] = {
bce86c4163a3 Initial revision
kono
parents:
diff changeset
141 #define NOSW 0
bce86c4163a3 Initial revision
kono
parents:
diff changeset
142 "no", 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
143 #define YESW 1
bce86c4163a3 Initial revision
kono
parents:
diff changeset
144 "yes", 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
145 #define LISTDSW 2
bce86c4163a3 Initial revision
kono
parents:
diff changeset
146 "list", 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
147
bce86c4163a3 Initial revision
kono
parents:
diff changeset
148 NULL, 0
bce86c4163a3 Initial revision
kono
parents:
diff changeset
149 };
bce86c4163a3 Initial revision
kono
parents:
diff changeset
150
bce86c4163a3 Initial revision
kono
parents:
diff changeset
151 /* */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
152
bce86c4163a3 Initial revision
kono
parents:
diff changeset
153 extern int debugsw; /* from sendsbr.c */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
154 extern int forwsw;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
155 extern int inplace;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
156 extern int mime;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
157 extern int pushsw;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
158 extern int splitsw;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
159 extern int unique;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
160 extern int verbsw;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
161
bce86c4163a3 Initial revision
kono
parents:
diff changeset
162 extern char *altmsg; /* .. */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
163 extern char *annotext;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
164 extern char *distfile;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
165
bce86c4163a3 Initial revision
kono
parents:
diff changeset
166
bce86c4163a3 Initial revision
kono
parents:
diff changeset
167
bce86c4163a3 Initial revision
kono
parents:
diff changeset
168 /* */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
169
bce86c4163a3 Initial revision
kono
parents:
diff changeset
170 /* ARGSUSED */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
171
bce86c4163a3 Initial revision
kono
parents:
diff changeset
172 main (argc, argv)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
173 int argc;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
174 char *argv[];
bce86c4163a3 Initial revision
kono
parents:
diff changeset
175 {
bce86c4163a3 Initial revision
kono
parents:
diff changeset
176 int msgp = 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
177 distsw = 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
178 vecp = 1,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
179 isdf = 0,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
180 msgnum,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
181 status;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
182 char *cp,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
183 *dfolder = NULL,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
184 *maildir = NULL,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
185 buf[100],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
186 **ap,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
187 **argp,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
188 *arguments[MAXARGS],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
189 *msgs[MAXARGS],
bce86c4163a3 Initial revision
kono
parents:
diff changeset
190 *vec[MAXARGS];
bce86c4163a3 Initial revision
kono
parents:
diff changeset
191 struct msgs *mp;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
192 struct stat st;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
193 #ifdef UCI
bce86c4163a3 Initial revision
kono
parents:
diff changeset
194 FILE *fp;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
195 #endif /* UCI */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
196
bce86c4163a3 Initial revision
kono
parents:
diff changeset
197 #ifdef LOCALE
bce86c4163a3 Initial revision
kono
parents:
diff changeset
198 setlocale(LC_ALL, "");
bce86c4163a3 Initial revision
kono
parents:
diff changeset
199 #endif
bce86c4163a3 Initial revision
kono
parents:
diff changeset
200 #ifdef JAPAN
bce86c4163a3 Initial revision
kono
parents:
diff changeset
201 ml_init();
bce86c4163a3 Initial revision
kono
parents:
diff changeset
202 #endif /* JAPAN */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
203 invo_name = r1bindex (argv[0], '/');
bce86c4163a3 Initial revision
kono
parents:
diff changeset
204 if ((cp = m_find (invo_name)) != NULL) {
bce86c4163a3 Initial revision
kono
parents:
diff changeset
205 ap = brkstring (cp = getcpy (cp), " ", "\n");
bce86c4163a3 Initial revision
kono
parents:
diff changeset
206 ap = copyip (ap, arguments);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
207 }
bce86c4163a3 Initial revision
kono
parents:
diff changeset
208 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
209 ap = arguments;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
210 (void) copyip (argv + 1, ap);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
211 argp = arguments;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
212
bce86c4163a3 Initial revision
kono
parents:
diff changeset
213 vec[vecp++] = "-library";
bce86c4163a3 Initial revision
kono
parents:
diff changeset
214 vec[vecp++] = getcpy (m_maildir (""));
bce86c4163a3 Initial revision
kono
parents:
diff changeset
215
bce86c4163a3 Initial revision
kono
parents:
diff changeset
216 /* */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
217
bce86c4163a3 Initial revision
kono
parents:
diff changeset
218 while (cp = *argp++) {
bce86c4163a3 Initial revision
kono
parents:
diff changeset
219 if (*cp == '-')
bce86c4163a3 Initial revision
kono
parents:
diff changeset
220 switch (smatch (++cp, switches)) {
bce86c4163a3 Initial revision
kono
parents:
diff changeset
221 case AMBIGSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
222 ambigsw (cp, switches);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
223 done (1);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
224 case UNKWNSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
225 adios (NULLCP, "-%s unknown\n", cp);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
226 case HELPSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
227 (void) sprintf (buf, "%s [file] [switches]", invo_name);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
228 help (buf, switches);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
229 done (1); /* thanks, phyl */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
230
bce86c4163a3 Initial revision
kono
parents:
diff changeset
231 case DRAFTSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
232 msgs[msgp++] = draft;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
233 continue;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
234
bce86c4163a3 Initial revision
kono
parents:
diff changeset
235 case DFOLDSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
236 if (dfolder)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
237 adios (NULLCP, "only one draft folder at a time!");
bce86c4163a3 Initial revision
kono
parents:
diff changeset
238 if (!(cp = *argp++) || *cp == '-')
bce86c4163a3 Initial revision
kono
parents:
diff changeset
239 adios (NULLCP, "missing argument to %s", argp[-2]);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
240 dfolder = path (*cp == '+' || *cp == '@' ? cp + 1 : cp,
bce86c4163a3 Initial revision
kono
parents:
diff changeset
241 *cp != '@' ? TFOLDER : TSUBCWF);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
242 continue;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
243 case DMSGSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
244 if (!(cp = *argp++) || *cp == '-')
bce86c4163a3 Initial revision
kono
parents:
diff changeset
245 adios (NULLCP, "missing argument to %s", argp[-2]);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
246 msgs[msgp++] = cp;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
247 continue;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
248 case NDFLDSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
249 dfolder = NULL;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
250 isdf = NOTOK;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
251 continue;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
252
bce86c4163a3 Initial revision
kono
parents:
diff changeset
253 case PUSHSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
254 pushsw++;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
255 continue;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
256 case NPUSHSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
257 pushsw = 0;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
258 continue;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
259
bce86c4163a3 Initial revision
kono
parents:
diff changeset
260 case SPLITSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
261 if (!(cp = *argp++) || sscanf (cp, "%d", &splitsw) != 1)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
262 adios (NULLCP, "missing argument to %s", argp[-2]);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
263 continue;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
264
bce86c4163a3 Initial revision
kono
parents:
diff changeset
265 case UNIQSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
266 unique++;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
267 continue;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
268 case NUNIQSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
269 unique = 0;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
270 continue;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
271
bce86c4163a3 Initial revision
kono
parents:
diff changeset
272 case FORWSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
273 forwsw++;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
274 continue;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
275 case NFORWSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
276 forwsw = 0;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
277 continue;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
278
bce86c4163a3 Initial revision
kono
parents:
diff changeset
279 case VERBSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
280 verbsw++;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
281 vec[vecp++] = --cp;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
282 continue;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
283 case NVERBSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
284 verbsw = 0;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
285 vec[vecp++] = --cp;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
286 continue;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
287
bce86c4163a3 Initial revision
kono
parents:
diff changeset
288 case MIMESW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
289 #ifdef MIME
bce86c4163a3 Initial revision
kono
parents:
diff changeset
290 mime++;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
291 vec[vecp++] = --cp;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
292 #endif
bce86c4163a3 Initial revision
kono
parents:
diff changeset
293 continue;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
294 case NMIMESW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
295 #ifdef MIME
bce86c4163a3 Initial revision
kono
parents:
diff changeset
296 mime = 0;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
297 vec[vecp++] = --cp;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
298 #endif
bce86c4163a3 Initial revision
kono
parents:
diff changeset
299 continue;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
300
bce86c4163a3 Initial revision
kono
parents:
diff changeset
301 case DEBUGSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
302 debugsw++; /* fall */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
303 case NFILTSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
304 case FRMTSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
305 case NFRMTSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
306 case MSGDSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
307 case NMSGDSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
308 case WATCSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
309 case NWATCSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
310 case MAILSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
311 case SAMLSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
312 case SENDSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
313 case SOMLSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
314 case ENCRSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
315 case NENCRSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
316 case SNOOPSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
317 case QUEUESW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
318 case NRECOSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
319 #ifdef MIME_HEADERS
bce86c4163a3 Initial revision
kono
parents:
diff changeset
320 case HENCDSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
321 case NHENCDSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
322 #endif /* MIME_HEADERS */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
323 vec[vecp++] = --cp;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
324 continue;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
325
bce86c4163a3 Initial revision
kono
parents:
diff changeset
326 case ALIASW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
327 case FILTSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
328 case WIDTHSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
329 case CLIESW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
330 case SERVSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
331 case RECORSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
332 vec[vecp++] = --cp;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
333 if (!(cp = *argp++) || *cp == '-')
bce86c4163a3 Initial revision
kono
parents:
diff changeset
334 adios (NULLCP, "missing argument to %s", argp[-2]);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
335 vec[vecp++] = cp;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
336 continue;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
337 }
bce86c4163a3 Initial revision
kono
parents:
diff changeset
338 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
339 msgs[msgp++] = cp;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
340 }
bce86c4163a3 Initial revision
kono
parents:
diff changeset
341 if (cp = m_find ("Aliasfile")) { /* allow Aliasfile: profile entry */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
342 char *dp = NULL;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
343
bce86c4163a3 Initial revision
kono
parents:
diff changeset
344 for (ap = brkstring(dp = getcpy(cp), " ", "\n"); ap && *ap; ap++) {
bce86c4163a3 Initial revision
kono
parents:
diff changeset
345 vec[vecp++] = "-alias";
bce86c4163a3 Initial revision
kono
parents:
diff changeset
346 vec[vecp++] = *ap;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
347 }
bce86c4163a3 Initial revision
kono
parents:
diff changeset
348 }
bce86c4163a3 Initial revision
kono
parents:
diff changeset
349
bce86c4163a3 Initial revision
kono
parents:
diff changeset
350 /* */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
351
bce86c4163a3 Initial revision
kono
parents:
diff changeset
352 if (dfolder == NULL) {
bce86c4163a3 Initial revision
kono
parents:
diff changeset
353 if (msgp == 0) {
bce86c4163a3 Initial revision
kono
parents:
diff changeset
354 #ifdef WHATNOW
bce86c4163a3 Initial revision
kono
parents:
diff changeset
355 if ((cp = getenv ("mhdraft")) && *cp) {
bce86c4163a3 Initial revision
kono
parents:
diff changeset
356 msgs[msgp++] = cp;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
357 goto go_to_it;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
358 }
bce86c4163a3 Initial revision
kono
parents:
diff changeset
359 #endif /* WHATNOW */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
360 msgs[msgp++] = getcpy (m_draft (NULLCP, NULLCP, 1, &isdf));
bce86c4163a3 Initial revision
kono
parents:
diff changeset
361 if (stat (msgs[0], &st) == NOTOK)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
362 adios (msgs[0], "unable to stat draft file");
bce86c4163a3 Initial revision
kono
parents:
diff changeset
363 cp = concat ("Use \"", msgs[0], "\"? ", NULLCP);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
364 for (status = LISTDSW; status != YESW;) {
bce86c4163a3 Initial revision
kono
parents:
diff changeset
365 if (!(argp = getans (cp, anyl)))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
366 done (1);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
367 switch (status = smatch (*argp, anyl)) {
bce86c4163a3 Initial revision
kono
parents:
diff changeset
368 case NOSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
369 done (0);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
370 case YESW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
371 break;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
372 case LISTDSW:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
373 (void) showfile (++argp, msgs[0]);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
374 break;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
375 default:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
376 advise (NULLCP, "say what?");
bce86c4163a3 Initial revision
kono
parents:
diff changeset
377 break;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
378 }
bce86c4163a3 Initial revision
kono
parents:
diff changeset
379 }
bce86c4163a3 Initial revision
kono
parents:
diff changeset
380 }
bce86c4163a3 Initial revision
kono
parents:
diff changeset
381 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
382 for (msgnum = 0; msgnum < msgp; msgnum++)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
383 msgs[msgnum] = getcpy (m_maildir (msgs[msgnum]));
bce86c4163a3 Initial revision
kono
parents:
diff changeset
384 }
bce86c4163a3 Initial revision
kono
parents:
diff changeset
385 else {
bce86c4163a3 Initial revision
kono
parents:
diff changeset
386 if (!m_find ("path"))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
387 free (path ("./", TFOLDER));
bce86c4163a3 Initial revision
kono
parents:
diff changeset
388
bce86c4163a3 Initial revision
kono
parents:
diff changeset
389 if (!msgp)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
390 msgs[msgp++] = "cur";
bce86c4163a3 Initial revision
kono
parents:
diff changeset
391 maildir = m_maildir (dfolder);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
392
bce86c4163a3 Initial revision
kono
parents:
diff changeset
393 if (chdir (maildir) == NOTOK)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
394 adios (maildir, "unable to change directory to");
bce86c4163a3 Initial revision
kono
parents:
diff changeset
395 if (!(mp = m_gmsg (dfolder)))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
396 adios (NULLCP, "unable to read folder %s", dfolder);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
397 if (mp -> hghmsg == 0)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
398 adios (NULLCP, "no messages in %s", dfolder);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
399
bce86c4163a3 Initial revision
kono
parents:
diff changeset
400 for (msgnum = 0; msgnum < msgp; msgnum++)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
401 if (!m_convert (mp, msgs[msgnum]))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
402 done (1);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
403 m_setseq (mp);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
404
bce86c4163a3 Initial revision
kono
parents:
diff changeset
405 for (msgp = 0, msgnum = mp -> lowsel; msgnum <= mp -> hghsel; msgnum++)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
406 if (mp -> msgstats[msgnum] & SELECTED) {
bce86c4163a3 Initial revision
kono
parents:
diff changeset
407 msgs[msgp++] = getcpy (m_name (msgnum));
bce86c4163a3 Initial revision
kono
parents:
diff changeset
408 #ifdef notdef
bce86c4163a3 Initial revision
kono
parents:
diff changeset
409 mp -> msgstats[msgnum] |= DELETED;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
410 #endif /* notdef */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
411 mp -> msgstats[msgnum] &= ~EXISTS;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
412 }
bce86c4163a3 Initial revision
kono
parents:
diff changeset
413 mp -> msgflags |= SEQMOD;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
414
bce86c4163a3 Initial revision
kono
parents:
diff changeset
415 m_sync (mp);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
416 }
bce86c4163a3 Initial revision
kono
parents:
diff changeset
417 #ifdef WHATNOW
bce86c4163a3 Initial revision
kono
parents:
diff changeset
418 go_to_it: ;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
419 #endif /* WHATNOW */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
420
bce86c4163a3 Initial revision
kono
parents:
diff changeset
421 /* */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
422
bce86c4163a3 Initial revision
kono
parents:
diff changeset
423 #ifdef TMA
bce86c4163a3 Initial revision
kono
parents:
diff changeset
424 if ((cp = getenv ("KDS")) == NULL || *cp == 0)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
425 if ((cp = m_find ("kdsproc")) && *cp)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
426 (void) m_putenv ("KDS", cp);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
427 if ((cp = getenv ("TMADB")) == NULL || *cp == 0)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
428 if ((cp = m_find ("tmadb")) && *cp)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
429 (void) m_putenv ("TMADB", m_maildir (cp));
bce86c4163a3 Initial revision
kono
parents:
diff changeset
430 #endif /* TMA */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
431
bce86c4163a3 Initial revision
kono
parents:
diff changeset
432 if ((cp = getenv ("SIGNATURE")) == NULL || *cp == 0)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
433 if ((cp = m_find ("signature")) && *cp)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
434 (void) m_putenv ("SIGNATURE", cp);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
435 #ifdef UCI
bce86c4163a3 Initial revision
kono
parents:
diff changeset
436 else {
bce86c4163a3 Initial revision
kono
parents:
diff changeset
437 (void) sprintf (buf, "%s/.signature", mypath);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
438 if ((fp = fopen (buf, "r")) != NULL
bce86c4163a3 Initial revision
kono
parents:
diff changeset
439 && fgets (buf, sizeof buf, fp) != NULL) {
bce86c4163a3 Initial revision
kono
parents:
diff changeset
440 (void) fclose (fp);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
441 if (cp = index (buf, '\n'))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
442 *cp = 0;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
443 (void) m_putenv ("SIGNATURE", buf);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
444 }
bce86c4163a3 Initial revision
kono
parents:
diff changeset
445 }
bce86c4163a3 Initial revision
kono
parents:
diff changeset
446 #endif /* UCI */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
447
bce86c4163a3 Initial revision
kono
parents:
diff changeset
448 for (msgnum = 0; msgnum < msgp; msgnum++)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
449 if (stat (msgs[msgnum], &st) == NOTOK)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
450 adios (msgs[msgnum], "unable to stat draft file");
bce86c4163a3 Initial revision
kono
parents:
diff changeset
451
bce86c4163a3 Initial revision
kono
parents:
diff changeset
452 if ((annotext = getenv ("mhannotate")) == NULL || *annotext == 0)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
453 annotext = NULL;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
454 if (annotext && ((cp = getenv ("mhinplace")) != NULL && *cp != 0))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
455 inplace = atoi (cp);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
456 if ((altmsg = getenv ("mhaltmsg")) == NULL || *altmsg == 0)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
457 altmsg = NULL; /* used by dist interface - see below */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
458
bce86c4163a3 Initial revision
kono
parents:
diff changeset
459 if ((cp = getenv ("mhdist"))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
460 && *cp
bce86c4163a3 Initial revision
kono
parents:
diff changeset
461 && (distsw = atoi (cp))
bce86c4163a3 Initial revision
kono
parents:
diff changeset
462 && altmsg) {
bce86c4163a3 Initial revision
kono
parents:
diff changeset
463 vec[vecp++] = "-dist";
bce86c4163a3 Initial revision
kono
parents:
diff changeset
464 distfile = getcpy (m_scratch (altmsg, invo_name));
bce86c4163a3 Initial revision
kono
parents:
diff changeset
465 if (link (altmsg, distfile) == NOTOK) {
bce86c4163a3 Initial revision
kono
parents:
diff changeset
466 if (errno != EXDEV
bce86c4163a3 Initial revision
kono
parents:
diff changeset
467 #ifdef EISREMOTE
bce86c4163a3 Initial revision
kono
parents:
diff changeset
468 && errno != EISREMOTE
bce86c4163a3 Initial revision
kono
parents:
diff changeset
469 #endif /* EISREMOTE */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
470 )
bce86c4163a3 Initial revision
kono
parents:
diff changeset
471 adios (distfile, "unable to link %s to", altmsg);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
472 free (distfile);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
473 distfile = getcpy (m_tmpfil (invo_name));
bce86c4163a3 Initial revision
kono
parents:
diff changeset
474 {
bce86c4163a3 Initial revision
kono
parents:
diff changeset
475 int in, out;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
476 struct stat st;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
477
bce86c4163a3 Initial revision
kono
parents:
diff changeset
478 if ((in = open (altmsg, 0)) == NOTOK)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
479 adios (altmsg, "unable to open");
bce86c4163a3 Initial revision
kono
parents:
diff changeset
480 (void) fstat(in, &st);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
481 if ((out = creat (distfile, (int) st.st_mode & 0777)) == NOTOK)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
482 adios (distfile, "unable to write");
bce86c4163a3 Initial revision
kono
parents:
diff changeset
483 cpydata (in, out, altmsg, distfile);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
484 (void) close (in);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
485 (void) close (out);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
486 }
bce86c4163a3 Initial revision
kono
parents:
diff changeset
487 }
bce86c4163a3 Initial revision
kono
parents:
diff changeset
488 }
bce86c4163a3 Initial revision
kono
parents:
diff changeset
489 else
bce86c4163a3 Initial revision
kono
parents:
diff changeset
490 distfile = NULL;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
491
bce86c4163a3 Initial revision
kono
parents:
diff changeset
492 if (altmsg == NULL || stat (altmsg, &st) == NOTOK)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
493 st.st_mtime = 0, st.st_dev = 0, st.st_ino = 0;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
494 if (pushsw)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
495 push ();
bce86c4163a3 Initial revision
kono
parents:
diff changeset
496
bce86c4163a3 Initial revision
kono
parents:
diff changeset
497 status = 0;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
498 vec[0] = r1bindex (postproc, '/');
bce86c4163a3 Initial revision
kono
parents:
diff changeset
499 closefds (3);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
500
bce86c4163a3 Initial revision
kono
parents:
diff changeset
501 for (msgnum = 0; msgnum < msgp; msgnum++)
bce86c4163a3 Initial revision
kono
parents:
diff changeset
502 switch (sendsbr (vec, vecp, msgs[msgnum], &st)) {
bce86c4163a3 Initial revision
kono
parents:
diff changeset
503 case DONE:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
504 done (++status);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
505
bce86c4163a3 Initial revision
kono
parents:
diff changeset
506 case NOTOK:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
507 status++; /* fall */
bce86c4163a3 Initial revision
kono
parents:
diff changeset
508 case OK:
bce86c4163a3 Initial revision
kono
parents:
diff changeset
509 break;
bce86c4163a3 Initial revision
kono
parents:
diff changeset
510 }
bce86c4163a3 Initial revision
kono
parents:
diff changeset
511
bce86c4163a3 Initial revision
kono
parents:
diff changeset
512 m_update ();
bce86c4163a3 Initial revision
kono
parents:
diff changeset
513
bce86c4163a3 Initial revision
kono
parents:
diff changeset
514 done (status);
bce86c4163a3 Initial revision
kono
parents:
diff changeset
515 }