Changeset 1041
- Timestamp:
- 07/10/07 11:45:41 (1 year ago)
- Files:
-
- 1.8.3/branches/devel/src/extmail.c (modified) (4 diffs)
- 1.8.3/branches/devel/src/warnings.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.8.3/branches/devel/src/extmail.c
r967 r1041 2562 2562 /* Return a longer description of message flags */ 2563 2563 static char tbuf1[BUFFER_LEN]; 2564 2565 tbuf1[0] = '\0'; 2564 char *tp; 2565 2566 tp = tbuf1; 2566 2567 if (Read(mp)) 2567 s trcat(tbuf1, T("Read "));2568 safe_str(T("Read "), tbuf1, &tp); 2568 2569 else 2569 s trcat(tbuf1, T("Unread "));2570 safe_str(T("Unread "), tbuf1, &tp); 2570 2571 if (Cleared(mp)) 2571 s trcat(tbuf1, T("Cleared "));2572 safe_str(T("Cleared "), tbuf1, &tp); 2572 2573 if (Urgent(mp)) 2573 s trcat(tbuf1, T("Urgent "));2574 safe_str(T("Urgent "), tbuf1, &tp); 2574 2575 if (Mass(mp)) 2575 s trcat(tbuf1, T("Mass "));2576 safe_str(T("Mass "), tbuf1, &tp); 2576 2577 if (Forward(mp)) 2577 s trcat(tbuf1, T("Fwd "));2578 safe_str(T("Fwd "), tbuf1, &tp); 2578 2579 if (Tagged(mp)) 2579 strcat(tbuf1, T("Tagged")); 2580 safe_str(T("Tagged"), tbuf1, &tp); 2581 *tp = '\0'; 2580 2582 return tbuf1; 2581 2583 } … … 2822 2824 2823 2825 /* Handle this now so it doesn't clutter code */ 2824 tbuf1[0] = '\0';2826 j = 0; 2825 2827 if (flags & M_URGENT) 2826 strcat(tbuf1, "U");2828 tbuf1[j++] = 'U'; 2827 2829 if (flags & M_FORWARD) 2828 strcat(tbuf1, "F");2830 tbuf1[j++] = 'F'; 2829 2831 if (flags & M_REPLY) 2830 strcat(tbuf1, "R"); 2831 2832 arg = (char *) mush_malloc(BUFFER_LEN, "string"); 2833 arg2 = (char *) mush_malloc(BUFFER_LEN, "string"); 2834 arg3 = (char *) mush_malloc(BUFFER_LEN, "string"); 2835 arg4 = (char *) mush_malloc(BUFFER_LEN, "string"); 2832 tbuf1[j++] = 'R'; 2833 tbuf1[j] = '\0'; 2834 2835 arg = mush_malloc(BUFFER_LEN, "string"); 2836 arg2 = mush_malloc(BUFFER_LEN, "string"); 2837 arg3 = mush_malloc(BUFFER_LEN, "string"); 2838 arg4 = mush_malloc(BUFFER_LEN, "string"); 2836 2839 if (!arg4) 2837 2840 mush_panic("Unable to allocate memory in mailfilter"); … … 2856 2859 PE_DEFAULT, PT_DEFAULT, NULL); 2857 2860 *bp = '\0'; 2858 free( (Malloc_t)asave);2861 free(asave); 2859 2862 if (*buff) { 2860 2863 sprintf(buf, "0:%d", mailnumber); … … 2862 2865 } 2863 2866 2864 mush_free( (Malloc_t)arg, "string");2865 mush_free( (Malloc_t)arg2, "string");2866 mush_free( (Malloc_t)arg3, "string");2867 mush_free( (Malloc_t)arg4, "string");2867 mush_free(arg, "string"); 2868 mush_free(arg2, "string"); 2869 mush_free(arg3, "string"); 2870 mush_free(arg4, "string"); 2868 2871 restore_global_env("filter_mail", wsave); 2869 2872 restore_global_regs("filter_mail", rsave); 1.8.3/branches/devel/src/warnings.c
r905 r1041 378 378 { 379 379 static char tbuf1[BUFFER_LEN]; 380 char *tp; 380 381 int listsize, indexx; 381 382 382 t buf1[0] = '\0';383 tp = tbuf1; 383 384 384 385 /* Get the # of elements in checklist */ … … 392 393 * if the bits set on the_flag is a subset of the bits set on warns 393 394 */ 394 s trcat(tbuf1, checklist[indexx].name);395 s trcat(tbuf1, " ");395 safe_str(checklist[indexx].name, tbuf1, &tp); 396 safe_chr(' ', tbuf1, &tp); 396 397 /* If we've got a flag which subsumes smaller ones, don't 397 398 * list the smaller ones … … 400 401 } 401 402 } 403 *tp = '\0'; 402 404 return tbuf1; 403 405 }
