| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | $NetBSD: patch-af,v 1.5 2010/05/24 19:49:45 christos Exp $ | | 1 | $NetBSD: patch-af,v 1.6 2014/10/08 22:52:04 christos Exp $ |
2 | | | 2 | |
3 | *** old/commands.c Fri Sep 4 11:22:06 1998 | | 3 | *** old/commands.c Fri Sep 4 11:22:06 1998 |
4 | --- commands.c Fri Sep 4 11:21:28 1998 | | 4 | --- commands.c Fri Sep 4 11:21:28 1998 |
5 | *************** | | 5 | *************** |
6 | *** 493,499 **** | | 6 | *** 493,499 **** |
7 | --- 493,503 ---- | | 7 | --- 493,503 ---- |
8 | char **argv, *list; | | 8 | char **argv, *list; |
9 | { | | 9 | { |
10 | register char *cmd = *argv; | | 10 | register char *cmd = *argv; |
11 | + #ifndef MSGS_DYNAMIC | | 11 | + #ifndef MSGS_DYNAMIC |
12 | char list1[MAXMSGS_BITS]; | | 12 | char list1[MAXMSGS_BITS]; |
13 | + #else | | 13 | + #else |
14 | + char *list1 = (char *) alloca(MSGS_BITS(msg_cnt)); | | 14 | + char *list1 = (char *) alloca(MSGS_BITS(msg_cnt)); |
| @@ -231,120 +231,112 @@ $NetBSD: patch-af,v 1.5 2010/05/24 19:49 | | | @@ -231,120 +231,112 @@ $NetBSD: patch-af,v 1.5 2010/05/24 19:49 |
231 | *** 1286,1292 **** | | 231 | *** 1286,1292 **** |
232 | --- 1306,1316 ---- | | 232 | --- 1306,1316 ---- |
233 | #else | | 233 | #else |
234 | # ifdef REGCOMP | | 234 | # ifdef REGCOMP |
235 | /* XXX: regfree */ | | 235 | /* XXX: regfree */ |
236 | + # ifdef REG_EXTENDED | | 236 | + # ifdef REG_EXTENDED |
237 | + regfree(&rex); | | 237 | + regfree(&rex); |
238 | + # else | | 238 | + # else |
239 | free(rex); | | 239 | free(rex); |
240 | + # endif | | 240 | + # endif |
241 | # endif | | 241 | # endif |
242 | #endif | | 242 | #endif |
243 | return NULL; | | 243 | return NULL; |
244 | *** old/mail.c Fri Sep 4 11:22:09 1998 | | 244 | --- old/mail.c 2014-10-08 18:47:38.000000000 -0400 |
245 | --- mail.c Fri Sep 4 11:21:28 1998 | | 245 | +++ mail.c 2014-10-08 18:48:42.000000000 -0400 |
246 | *************** | | 246 | @@ -34,7 +34,12 @@ |
247 | *** 34,40 **** | | 247 | char firstchar = (argv)? **argv: 'm'; |
248 | char firstchar = (argv)? **argv: 'm'; | | 248 | char *to = NULL, *cc = NULL, *addcc = NULL, *bcc = NULL, *subj = NULL; |
249 | char *to = NULL, *cc = NULL, *addcc = NULL, *bcc = NULL, *subj = NULL; | | 249 | char *route = NULL; |
250 | char *route = NULL; | | 250 | - char inc_list[MAXMSGS_BITS], buf[HDRSIZ]; |
251 | ! char inc_list[MAXMSGS_BITS], buf[HDRSIZ]; | | 251 | + char buf[HDRSIZ]; |
252 | u_long flgs = 0; | | 252 | +#ifndef MSGS_DYNAMIC |
253 | | | 253 | + char inc_list[MAXMSGS_BITS]; |
254 | if (ison(glob_flags, IS_GETTING)) { | | 254 | +#else |
255 | --- 34,45 ---- | | 255 | + char *inc_list = (char *) alloca(MSGS_BITS(msg_cnt)); |
256 | char firstchar = (argv)? **argv: 'm'; | | 256 | +#endif |
257 | char *to = NULL, *cc = NULL, *addcc = NULL, *bcc = NULL, *subj = NULL; | | 257 | u_long flgs = 0; |
258 | char *route = NULL; | | 258 | |
259 | ! char buf[HDRSIZ]; | | 259 | if (ison(glob_flags, IS_GETTING)) { |
260 | ! #ifndef MSGS_DYNAMIC | | 260 | @@ -350,7 +355,11 @@ |
261 | ! char inc_list[MAXMSGS_BITS]; | | 261 | |
262 | ! #else | | 262 | /* If forwarding w/o editing, start a new file for each. */ |
263 | ! char *inc_list = (char *) alloca(MSGS_BITS(msg_cnt)); | | 263 | if (ison(flags, FORWARD) && ison(flags, SEND_NOW)) { |
264 | ! #endif | | 264 | +#ifndef MSGS_DYNAMIC |
265 | u_long flgs = 0; | | 265 | char fwd[MAXMSGS_BITS]; |
266 | | | 266 | +#else |
267 | if (ison(glob_flags, IS_GETTING)) { | | 267 | + char *fwd = (char *) alloca(MSGS_BITS(msg_cnt)); |
268 | *************** | | 268 | +#endif |
269 | *** 350,356 **** | | 269 | register int i; |
270 | --- 355,365 ---- | | 270 | clear_msg_list(fwd); |
271 | | | 271 | for (i = 0; i < msg_cnt; i++) |
272 | /* If forwarding w/o editing, start a new file for each. */ | | 272 | @@ -694,7 +703,11 @@ |
273 | if (ison(flags, FORWARD) && ison(flags, SEND_NOW)) { | | 273 | putstring(p2, ed_fp); |
274 | + #ifndef MSGS_DYNAMIC | | 274 | } |
275 | char fwd[MAXMSGS_BITS]; | | 275 | when ':': { |
276 | + #else | | 276 | +#ifndef MSGS_DYNAMIC |
277 | + char *fwd = (char *) alloca(MSGS_BITS(msg_cnt)); | | 277 | char new[MAXMSGS_BITS]; |
278 | + #endif | | 278 | +#else |
279 | register int i; | | 279 | + char *new = (char *) alloca(MSGS_BITS(msg_cnt)); |
280 | clear_msg_list(fwd); | | 280 | +#endif |
281 | for (i = 0; i < msg_cnt; i++) | | 281 | u_long save_flags = glob_flags; |
282 | *************** | | 282 | |
283 | *** 694,700 **** | | 283 | turnon(glob_flags, IGN_SIGS); |
284 | --- 703,713 ---- | | 284 | @@ -706,7 +719,11 @@ |
285 | putstring(p2, ed_fp); | | 285 | when 'i': case 'f': case 'I': case 'm': { |
286 | } | | 286 | int n; |
287 | when ':': { | | 287 | u_long copy_flgs = 0; |
288 | + #ifndef MSGS_DYNAMIC | | 288 | +#ifndef MSGS_DYNAMIC |
289 | char new[MAXMSGS_BITS]; | | 289 | char list[MAXMSGS_BITS]; |
290 | + #else | | 290 | +#else |
291 | + char *new = (char *) alloca(MSGS_BITS(msg_cnt)); | | 291 | + char *list = (char *) alloca(MSGS_BITS(msg_cnt)); |
292 | + #endif | | 292 | +#endif |
293 | u_long save_flags = glob_flags; | | 293 | |
294 | | | 294 | if (!msg_cnt) { |
295 | turnon(glob_flags, IGN_SIGS); | | 295 | wprint("No messages.\n"); |
296 | *************** | | 296 | @@ -962,6 +979,7 @@ |
297 | *** 706,712 **** | | 297 | register char *p; |
298 | --- 719,729 ---- | | 298 | int c; |
299 | when 'i': case 'f': case 'I': case 'm': { | | 299 | char buf[MAXPATHLEN]; |
300 | int n; | | 300 | + static char gpat[] = "{,{,*[ \\,]}mail{,[ \\,]*}}"; |
301 | u_long copy_flgs = 0; | | 301 | |
302 | + #ifndef MSGS_DYNAMIC | | 302 | /* forwarded mail has no additional personalized text */ |
303 | char list[MAXMSGS_BITS]; | | 303 | if (ison(flags, FORWARD)) { |
304 | + #else | | 304 | @@ -985,8 +1003,7 @@ |
305 | + char *list = (char *) alloca(MSGS_BITS(msg_cnt)); | | 305 | p = NULL; |
306 | + #endif | | 306 | if (!strncmp(Cc, "~v", 2) || |
307 | | | 307 | /* Flashy test for $verify either empty or set to "mail" */ |
308 | if (!msg_cnt) { | | 308 | - glob(p = do_set(set_options, "verify"), |
309 | wprint("No messages.\n"); | | 309 | - "{,{,*[ \\,]}mail{,[ \\,]*}}")) { |
310 | *************** | | 310 | + glob(p = do_set(set_options, "verify"), gpat)) { |
311 | *** 962,967 **** | | 311 | if (!p) /* so we don't Cc to ~v! */ |
312 | --- 979,985 ---- | | 312 | *Cc = 0; |
313 | register char *p; | | 313 | for (;;) { |
314 | int c; | | 314 | @@ -1679,6 +1696,7 @@ |
315 | char buf[MAXPATHLEN]; | | 315 | else if (!lcase_strncmp(p, "subject:", 8)) |
316 | + static char gpat[] = "{,{,*[ \\,]}mail{,[ \\,]*}}"; | | 316 | (print_hdr = FALSE), strdup(subj, p); |
317 | | | 317 | else if (!lcase_strncmp(p, "from:", 5)) { |
318 | /* forwarded mail has no additional personalized text */ | | 318 | +#if 0 |
319 | if (ison(flags, FORWARD)) { | | 319 | char not_me[BUFSIZ]; |
320 | *************** | | 320 | (void) strcpy(not_me, buf + 5); |
321 | *** 985,992 **** | | 321 | take_me_off(not_me); |
322 | p = NULL; | | 322 | @@ -1692,6 +1710,7 @@ |
323 | if (!strncmp(Cc, "~v", 2) || | | 323 | (void) no_newln(buf); |
324 | /* Flashy test for $verify either empty or set to "mail" */ | | 324 | } |
325 | ! glob(p = do_set(set_options, "verify"), | | 325 | } |
326 | ! "{,{,*[ \\,]}mail{,[ \\,]*}}")) { | | 326 | +#endif |
327 | if (!p) /* so we don't Cc to ~v! */ | | 327 | got_from = TRUE; |
328 | *Cc = 0; | | 328 | #ifdef PICKY_MAILER |
329 | for (;;) { | | 329 | /* don't send From: to mta -- fool "for loop" below |
330 | --- 1003,1009 ---- | | | |
331 | p = NULL; | | | |
332 | if (!strncmp(Cc, "~v", 2) || | | | |
333 | /* Flashy test for $verify either empty or set to "mail" */ | | | |
334 | ! glob(p = do_set(set_options, "verify"), gpat)) { | | | |
335 | if (!p) /* so we don't Cc to ~v! */ | | | |
336 | *Cc = 0; | | | |
337 | for (;;) { | | | |
338 | *** old/main.c Fri Sep 4 11:22:09 1998 | | 330 | *** old/main.c Fri Sep 4 11:22:09 1998 |
339 | --- main.c Fri Sep 4 11:21:28 1998 | | 331 | --- main.c Fri Sep 4 11:21:28 1998 |
340 | *************** | | 332 | *************** |
341 | *** 30,36 **** | | 333 | *** 30,36 **** |
342 | char buf[MAXPATHLEN]; | | 334 | char buf[MAXPATHLEN]; |
343 | register char *p; | | 335 | register char *p; |
344 | struct mush_flags Flags; | | 336 | struct mush_flags Flags; |
345 | ! | | 337 | ! |
346 | #ifndef INTERNAL_MALLOC | | 338 | #ifndef INTERNAL_MALLOC |
347 | extern char *stackbottom; /* used by xfree() */ | | 339 | extern char *stackbottom; /* used by xfree() */ |
348 | | | 340 | |
349 | --- 30,36 ---- | | 341 | --- 30,36 ---- |
350 | char buf[MAXPATHLEN]; | | 342 | char buf[MAXPATHLEN]; |