]>
diplodocus.org Git - nmh/blob - uip/mhshowsbr.c
3 * mhshowsbr.c -- routines to display the contents of MIME messages
5 * This code is Copyright (c) 2002, by the authors of nmh. See the
6 * COPYRIGHT file in the root directory of the nmh distribution for
7 * complete copyright information.
12 #include <h/signals.h>
18 #include <h/mhparse.h>
22 #endif /* ! HAVE_ICONV */
32 /* flags for moreproc/header display */
38 static sigjmp_buf intrenv
;
42 int part_ok (CT
, int);
43 int type_ok (CT
, int);
44 void content_error (char *, CT
, char *, ...);
45 void flush_errors (void);
48 int list_switch (CT
, int, int, int, int);
49 int list_content (CT
, int, int, int, int);
54 void show_all_messages (CT
*);
55 int show_content_aux (CT
, int, int, char *, char *);
60 static void show_single_message (CT
, char *);
61 static void DisplayMsgHeader (CT
, char *);
62 static int show_switch (CT
, int, int);
63 static int show_content (CT
, int, int);
64 static int show_content_aux2 (CT
, int, int, char *, char *, int, int, int, int, int);
65 static int show_text (CT
, int, int);
66 static int show_multi (CT
, int, int);
67 static int show_multi_internal (CT
, int, int);
68 static int show_multi_aux (CT
, int, int, char *);
69 static int show_message_rfc822 (CT
, int, int);
70 static int show_partial (CT
, int, int);
71 static int show_external (CT
, int, int);
72 static void intrser (int);
76 * Top level entry point to show/display a group of messages
80 show_all_messages (CT
*cts
)
85 * If form is not specified, then get default form
86 * for showing headers of MIME messages.
89 formsw
= getcpy (etcpath ("mhl.headers"));
92 * If form is "mhl.null", suppress display of header.
94 if (!strcmp (formsw
, "mhl.null"))
97 for (ctp
= cts
; *ctp
; ctp
++) {
100 /* if top-level type is ok, then display message */
102 show_single_message (ct
, formsw
);
108 * Entry point to show/display a single message
112 show_single_message (CT ct
, char *form
)
118 /* Allow user executable bit so that temporary directories created by
119 * the viewer (e.g., lynx) are going to be accessible */
120 umask (ct
->c_umask
& ~(0100));
123 * If you have a format file, then display
124 * the message headers.
127 DisplayMsgHeader(ct
, form
);
131 /* Show the body of the message */
132 show_switch (ct
, 1, 0);
138 if (ct
->c_ceclosefnx
)
139 (*ct
->c_ceclosefnx
) (ct
);
141 /* block a few signals */
143 sigaddset (&set
, SIGHUP
);
144 sigaddset (&set
, SIGINT
);
145 sigaddset (&set
, SIGQUIT
);
146 sigaddset (&set
, SIGTERM
);
147 sigprocmask (SIG_BLOCK
, &set
, &oset
);
149 while (wait (&status
) != NOTOK
) {
154 /* reset the signal mask */
155 sigprocmask (SIG_SETMASK
, &oset
, &set
);
163 * Use the mhlproc to show the header fields
167 DisplayMsgHeader (CT ct
, char *form
)
174 vec
= argsplit(mhlproc
, &file
, &vecp
);
175 vec
[vecp
++] = getcpy("-form");
176 vec
[vecp
++] = getcpy(form
);
177 vec
[vecp
++] = getcpy("-nobody");
178 vec
[vecp
++] = getcpy(ct
->c_file
);
181 * If we've specified -(no)moreproc,
182 * then just pass that along.
185 vec
[vecp
++] = getcpy("-nomoreproc");
187 vec
[vecp
++] = getcpy("-moreproc");
188 vec
[vecp
++] = getcpy(progsw
);
194 for (i
= 0; (child_id
= fork()) == NOTOK
&& i
< 5; i
++)
199 adios ("fork", "unable to");
204 fprintf (stderr
, "unable to exec ");
214 arglist_free(file
, vec
);
219 * Switching routine. Call the correct routine
220 * based on content type.
224 show_switch (CT ct
, int serial
, int alternate
)
226 switch (ct
->c_type
) {
228 return show_multi (ct
, serial
, alternate
);
231 switch (ct
->c_subtype
) {
232 case MESSAGE_PARTIAL
:
233 return show_partial (ct
, serial
, alternate
);
235 case MESSAGE_EXTERNAL
:
236 return show_external (ct
, serial
, alternate
);
240 return show_message_rfc822 (ct
, serial
, alternate
);
244 return show_text (ct
, serial
, alternate
);
250 return show_content (ct
, serial
, alternate
);
253 adios (NULL
, "unknown content type %d", ct
->c_type
);
256 return 0; /* NOT REACHED */
261 * Generic method for displaying content
265 show_content (CT ct
, int serial
, int alternate
)
267 char *cp
, buffer
[BUFSIZ
];
268 CI ci
= &ct
->c_ctinfo
;
270 /* Check for invo_name-show-type/subtype */
271 snprintf (buffer
, sizeof(buffer
), "%s-show-%s/%s",
272 invo_name
, ci
->ci_type
, ci
->ci_subtype
);
273 if ((cp
= context_find (buffer
)) && *cp
!= '\0')
274 return show_content_aux (ct
, serial
, alternate
, cp
, NULL
);
276 /* Check for invo_name-show-type */
277 snprintf (buffer
, sizeof(buffer
), "%s-show-%s", invo_name
, ci
->ci_type
);
278 if ((cp
= context_find (buffer
)) && *cp
!= '\0')
279 return show_content_aux (ct
, serial
, alternate
, cp
, NULL
);
281 if ((cp
= ct
->c_showproc
))
282 return show_content_aux (ct
, serial
, alternate
, cp
, NULL
);
284 /* complain if we are not a part of a multipart/alternative */
286 content_error (NULL
, ct
, "don't know how to display content");
293 * Parse the display string for displaying generic content
297 show_content_aux (CT ct
, int serial
, int alternate
, char *cp
, char *cracked
)
299 int fd
, len
, buflen
, quoted
;
300 int xstdin
, xlist
, xpause
, xtty
;
301 char *bp
, *pp
, *file
, buffer
[BUFSIZ
];
302 CI ci
= &ct
->c_ctinfo
;
304 if (!ct
->c_ceopenfnx
) {
306 content_error (NULL
, ct
, "don't know how to decode content");
312 if ((fd
= (*ct
->c_ceopenfnx
) (ct
, &file
)) == NOTOK
)
314 if (ct
->c_showproc
&& !strcmp (ct
->c_showproc
, "true"))
315 return (alternate
? DONE
: OK
);
323 strncpy (buffer
, cp
, sizeof(buffer
));
327 /* get buffer ready to go */
329 buflen
= sizeof(buffer
) - 1;
330 bp
[0] = bp
[buflen
] = '\0';
333 /* Now parse display string */
334 for ( ; *cp
&& buflen
> 0; cp
++) {
340 /* insert parameters from Content-Type field */
345 for (ap
= ci
->ci_attrs
, ep
= ci
->ci_values
; *ap
; ap
++, ep
++) {
346 snprintf (bp
, buflen
, "%s%s=\"%s\"", s
, *ap
, *ep
);
356 /* insert content description */
360 s
= trimcpy (ct
->c_descr
);
361 strncpy (bp
, s
, buflen
);
367 /* exclusive execution */
372 /* %e, %f, and stdin is terminal not content */
378 /* insert filename containing content */
379 snprintf (bp
, buflen
, "'%s'", file
);
380 /* since we've quoted the file argument, set things up
381 * to look past it, to avoid problems with the quoting
382 * logic below. (I know, I should figure out what's
383 * broken with the quoting logic, but..)
392 /* %l, and pause prior to displaying content */
397 /* display listing prior to displaying content */
402 /* insert subtype of content */
403 strncpy (bp
, ci
->ci_subtype
, buflen
);
407 /* insert character % */
420 /* Did we actually insert something? */
422 /* Insert single quote if not inside quotes already */
423 if (!quoted
&& buflen
) {
425 memmove (pp
+ 1, pp
, len
);
430 /* Escape existing quotes */
431 while ((pp
= strchr (pp
, '\'')) && buflen
> 3) {
433 memmove (pp
+ 3, pp
, len
);
440 /* If pp is still set, that means we ran out of space. */
443 if (!quoted
&& buflen
) {
461 (ct
->c_termproc
&& (size_t) buflen
<= strlen(ct
->c_termproc
))) {
462 /* content_error would provide a more useful error message
463 * here, except that if we got overrun, it probably would
466 fprintf(stderr
, "Buffer overflow constructing show command!\n");
470 /* use charset string to modify display method */
471 if (ct
->c_termproc
) {
474 strncpy (term
, buffer
, sizeof(term
));
475 snprintf (buffer
, sizeof(buffer
), ct
->c_termproc
, term
);
479 return show_content_aux2 (ct
, serial
, alternate
, cracked
, buffer
,
480 fd
, xlist
, xpause
, xstdin
, xtty
);
485 * Routine to actually display the content
489 show_content_aux2 (CT ct
, int serial
, int alternate
, char *cracked
, char *buffer
,
490 int fd
, int xlist
, int xpause
, int xstdin
, int xtty
)
494 char *vec
[4], exec
[BUFSIZ
+ sizeof "exec "];
496 if (debugsw
|| cracked
) {
499 fprintf (stderr
, "%s msg %s", cracked
? "storing" : "show",
502 fprintf (stderr
, " part %s", ct
->c_partno
);
504 fprintf (stderr
, " using command (cd %s; %s)\n", cracked
, buffer
);
506 fprintf (stderr
, " using command %s\n", buffer
);
509 if (xpid
< 0 || (xtty
&& xpid
)) {
512 pidcheck(pidwait (xpid
, NOTOK
));
519 if (ct
->c_type
== CT_MULTIPART
)
520 list_content (ct
, -1, 1, 0, 0);
522 list_switch (ct
, -1, 1, 0, 0);
524 if (xpause
&& isatty (fileno (stdout
))) {
526 SIGNAL_HANDLER istat
;
528 if (SOprintf ("Press <return> to show content..."))
529 printf ("Press <return> to show content...");
531 istat
= SIGNAL (SIGINT
, intrser
);
532 if ((intr
= sigsetjmp (intrenv
, 1)) == OK
) {
535 read (fileno (stdout
), prompt
, sizeof(prompt
));
537 SIGNAL (SIGINT
, istat
);
538 if (intr
!= OK
|| prompt
[0] == 'n') {
539 (*ct
->c_ceclosefnx
) (ct
);
540 return (alternate
? DONE
: NOTOK
);
542 if (prompt
[0] == 'q') done(OK
);
546 snprintf (exec
, sizeof(exec
), "exec %s", buffer
);
555 for (i
= 0; (child_id
= fork()) == NOTOK
&& i
< 5; i
++)
559 advise ("fork", "unable to");
560 (*ct
->c_ceclosefnx
) (ct
);
569 execvp ("/bin/sh", vec
);
570 fprintf (stderr
, "unable to exec ");
577 ct
->c_pid
= child_id
;
581 pidcheck (pidXwait (child_id
, NULL
));
585 (*ct
->c_ceclosefnx
) (ct
);
586 return (alternate
? DONE
: OK
);
592 * show content of type "text"
596 show_text (CT ct
, int serial
, int alternate
)
598 char *cp
, buffer
[BUFSIZ
];
599 CI ci
= &ct
->c_ctinfo
;
601 /* Check for invo_name-show-type/subtype */
602 snprintf (buffer
, sizeof(buffer
), "%s-show-%s/%s",
603 invo_name
, ci
->ci_type
, ci
->ci_subtype
);
604 if ((cp
= context_find (buffer
)) && *cp
!= '\0')
605 return show_content_aux (ct
, serial
, alternate
, cp
, NULL
);
607 /* Check for invo_name-show-type */
608 snprintf (buffer
, sizeof(buffer
), "%s-show-%s", invo_name
, ci
->ci_type
);
609 if ((cp
= context_find (buffer
)) && *cp
!= '\0')
610 return show_content_aux (ct
, serial
, alternate
, cp
, NULL
);
613 * Use default method if content is text/plain, or if
614 * if it is not a text part of a multipart/alternative
616 if (!alternate
|| ct
->c_subtype
== TEXT_PLAIN
) {
617 snprintf (buffer
, sizeof(buffer
), "%%p%s '%%F'", progsw
? progsw
:
618 moreproc
&& *moreproc
? moreproc
: DEFAULT_PAGER
);
619 cp
= (ct
->c_showproc
= add (buffer
, NULL
));
620 return show_content_aux (ct
, serial
, alternate
, cp
, NULL
);
628 * show message body of type "multipart"
632 show_multi (CT ct
, int serial
, int alternate
)
634 char *cp
, buffer
[BUFSIZ
];
635 CI ci
= &ct
->c_ctinfo
;
637 /* Check for invo_name-show-type/subtype */
638 snprintf (buffer
, sizeof(buffer
), "%s-show-%s/%s",
639 invo_name
, ci
->ci_type
, ci
->ci_subtype
);
640 if ((cp
= context_find (buffer
)) && *cp
!= '\0')
641 return show_multi_aux (ct
, serial
, alternate
, cp
);
643 /* Check for invo_name-show-type */
644 snprintf (buffer
, sizeof(buffer
), "%s-show-%s", invo_name
, ci
->ci_type
);
645 if ((cp
= context_find (buffer
)) && *cp
!= '\0')
646 return show_multi_aux (ct
, serial
, alternate
, cp
);
648 if ((cp
= ct
->c_showproc
))
649 return show_multi_aux (ct
, serial
, alternate
, cp
);
652 * Use default method to display this multipart content. Even
653 * unknown types are displayable, since they're treated as mixed
656 return show_multi_internal (ct
, serial
, alternate
);
661 * show message body of subtypes of multipart that
662 * we understand directly (mixed, alternate, etc...)
666 show_multi_internal (CT ct
, int serial
, int alternate
)
668 int alternating
, nowalternate
, nowserial
, result
;
669 struct multipart
*m
= (struct multipart
*) ct
->c_ctparams
;
675 nowalternate
= alternate
;
677 if (ct
->c_subtype
== MULTI_PARALLEL
) {
678 nowserial
= serialsw
;
679 } else if (ct
->c_subtype
== MULTI_ALTERNATE
) {
687 * unknown subtypes of multipart (treat as mixed per rfc2046)
692 /* block a few signals */
695 sigaddset (&set
, SIGHUP
);
696 sigaddset (&set
, SIGINT
);
697 sigaddset (&set
, SIGQUIT
);
698 sigaddset (&set
, SIGTERM
);
699 sigprocmask (SIG_BLOCK
, &set
, &oset
);
703 * alternate -> we are a part inside an multipart/alternative
704 * alternating -> we are a multipart/alternative
707 result
= alternate
? NOTOK
: OK
;
709 for (part
= m
->mp_parts
; part
; part
= part
->mp_next
) {
712 if (part_ok (p
, 1) && type_ok (p
, 1)) {
715 inneresult
= show_switch (p
, nowserial
, nowalternate
);
716 switch (inneresult
) {
718 if (alternate
&& !alternating
) {
731 alternate
= nowalternate
= 0;
741 if (alternating
&& !part
) {
743 content_error (NULL
, ct
, "don't know how to display any of the contents");
748 if (serial
&& !nowserial
) {
754 for (part
= m
->mp_parts
; part
; part
= part
->mp_next
) {
758 if (kill (p
->c_pid
, 0) == NOTOK
)
765 while (kids
> 0 && (pid
= wait (&status
)) != NOTOK
) {
768 for (part
= m
->mp_parts
; part
; part
= part
->mp_next
) {
773 if (p
->c_pid
== pid
) {
784 /* reset the signal mask */
785 sigprocmask (SIG_SETMASK
, &oset
, &set
);
793 * Parse display string for multipart content
794 * and use external program to display it.
798 show_multi_aux (CT ct
, int serial
, int alternate
, char *cp
)
800 int len
, buflen
, quoted
;
801 int xlist
, xpause
, xtty
;
802 char *bp
, *pp
, *file
, buffer
[BUFSIZ
];
803 struct multipart
*m
= (struct multipart
*) ct
->c_ctparams
;
805 CI ci
= &ct
->c_ctinfo
;
808 for (part
= m
->mp_parts
; part
; part
= part
->mp_next
) {
811 if (!p
->c_ceopenfnx
) {
813 content_error (NULL
, p
, "don't know how to decode content");
817 if (p
->c_storage
== NULL
) {
819 if ((*p
->c_ceopenfnx
) (p
, &file
) == NOTOK
)
822 /* I'm not sure if this is necessary? */
823 p
->c_storage
= add (file
, NULL
);
825 if (p
->c_showproc
&& !strcmp (p
->c_showproc
, "true"))
826 return (alternate
? DONE
: OK
);
827 (*p
->c_ceclosefnx
) (p
);
835 /* get buffer ready to go */
837 buflen
= sizeof(buffer
) - 1;
838 bp
[0] = bp
[buflen
] = '\0';
841 /* Now parse display string */
842 for ( ; *cp
&& buflen
> 0; cp
++) {
847 /* insert parameters from Content-Type field */
852 for (ap
= ci
->ci_attrs
, ep
= ci
->ci_values
; *ap
; ap
++, ep
++) {
853 snprintf (bp
, buflen
, "%s%s=\"%s\"", s
, *ap
, *ep
);
863 /* insert content description */
867 s
= trimcpy (ct
->c_descr
);
868 strncpy (bp
, s
, buflen
);
874 /* exclusive execution */
884 /* insert filename(s) containing content */
888 for (part
= m
->mp_parts
; part
; part
= part
->mp_next
) {
891 snprintf (bp
, buflen
, "%s'%s'", s
, p
->c_storage
);
897 /* set our starting pointer back to bp, to avoid
898 * requoting the filenames we just added
905 /* %l, and pause prior to displaying content */
910 /* display listing prior to displaying content */
915 /* insert subtype of content */
916 strncpy (bp
, ci
->ci_subtype
, buflen
);
920 /* insert character % */
933 /* Did we actually insert something? */
935 /* Insert single quote if not inside quotes already */
936 if (!quoted
&& buflen
) {
938 memmove (pp
+ 1, pp
, len
);
943 /* Escape existing quotes */
944 while ((pp
= strchr (pp
, '\'')) && buflen
> 3) {
946 memmove (pp
+ 3, pp
, len
);
953 /* If pp is still set, that means we ran out of space. */
956 if (!quoted
&& buflen
) {
974 (ct
->c_termproc
&& buflen
<= (ssize_t
) strlen(ct
->c_termproc
))) {
975 /* content_error would provide a more useful error message
976 * here, except that if we got overrun, it probably would
979 fprintf(stderr
, "Buffer overflow constructing show command!\n");
983 /* use charset string to modify display method */
984 if (ct
->c_termproc
) {
987 strncpy (term
, buffer
, sizeof(term
));
988 snprintf (buffer
, sizeof(buffer
), ct
->c_termproc
, term
);
991 return show_content_aux2 (ct
, serial
, alternate
, NULL
, buffer
,
992 NOTOK
, xlist
, xpause
, 0, xtty
);
997 * show content of type "message/rfc822"
1001 show_message_rfc822 (CT ct
, int serial
, int alternate
)
1003 char *cp
, buffer
[BUFSIZ
];
1004 CI ci
= &ct
->c_ctinfo
;
1006 /* Check for invo_name-show-type/subtype */
1007 snprintf (buffer
, sizeof(buffer
), "%s-show-%s/%s",
1008 invo_name
, ci
->ci_type
, ci
->ci_subtype
);
1009 if ((cp
= context_find (buffer
)) && *cp
!= '\0')
1010 return show_content_aux (ct
, serial
, alternate
, cp
, NULL
);
1012 /* Check for invo_name-show-type */
1013 snprintf (buffer
, sizeof(buffer
), "%s-show-%s", invo_name
, ci
->ci_type
);
1014 if ((cp
= context_find (buffer
)) && *cp
!= '\0')
1015 return show_content_aux (ct
, serial
, alternate
, cp
, NULL
);
1017 if ((cp
= ct
->c_showproc
))
1018 return show_content_aux (ct
, serial
, alternate
, cp
, NULL
);
1020 /* default method for message/rfc822 */
1021 if (ct
->c_subtype
== MESSAGE_RFC822
) {
1022 cp
= (ct
->c_showproc
= add ("%pshow -file '%F'", NULL
));
1023 return show_content_aux (ct
, serial
, alternate
, cp
, NULL
);
1026 /* complain if we are not a part of a multipart/alternative */
1028 content_error (NULL
, ct
, "don't know how to display content");
1035 * Show content of type "message/partial".
1039 show_partial (CT ct
, int serial
, int alternate
)
1041 NMH_UNUSED (serial
);
1042 NMH_UNUSED (alternate
);
1044 content_error (NULL
, ct
,
1045 "in order to display this message, you must reassemble it");
1051 * Show content of type "message/external".
1053 * THE ERROR CHECKING IN THIS ONE IS NOT DONE YET.
1057 show_external (CT ct
, int serial
, int alternate
)
1059 struct exbody
*e
= (struct exbody
*) ct
->c_ctparams
;
1060 CT p
= e
->eb_content
;
1062 if (!type_ok (p
, 0))
1065 return show_switch (p
, serial
, alternate
);
1070 convert_charset (CT ct
, char *dest_charset
, int *message_mods
) {
1071 char *src_charset
= content_charset (ct
);
1074 /* norm_charmap() is case sensitive. */
1075 char *src_charset_u
= upcase (src_charset
);
1076 char *dest_charset_u
= upcase (dest_charset
);
1077 int different_charsets
=
1078 strcmp (norm_charmap (src_charset
), norm_charmap (dest_charset
));
1080 free (dest_charset_u
);
1081 free (src_charset_u
);
1083 if (different_charsets
) {
1085 iconv_t conv_desc
= NULL
;
1092 int opened_input_file
= 0;
1093 char src_buffer
[BUFSIZ
];
1097 if ((conv_desc
= iconv_open (dest_charset
, src_charset
)) ==
1099 advise (NULL
, "Can't convert %s to %s", src_charset
, dest_charset
);
1103 if ((tempfile
= m_mktemp2 (NULL
, invo_name
, &fd
, NULL
)) == NULL
) {
1104 adios (NULL
, "unable to create temporary file in %s",
1107 dest
= add (tempfile
, NULL
);
1109 if (ct
->c_cefile
.ce_file
) {
1110 file
= &ct
->c_cefile
.ce_file
;
1111 fp
= &ct
->c_cefile
.ce_fp
;
1113 } else if (ct
->c_file
) {
1116 begin
= (size_t) ct
->c_begin
;
1117 end
= (size_t) ct
->c_end
;
1118 } /* else no input file: shouldn't happen */
1120 if (file
&& *file
&& fp
) {
1122 if ((*fp
= fopen (*file
, "r")) == NULL
) {
1123 advise (*file
, "unable to open for reading");
1126 opened_input_file
= 1;
1133 size_t bytes_to_read
=
1134 end
> 0 && end
> begin
? end
- begin
: sizeof src_buffer
;
1136 fseeko (*fp
, begin
, SEEK_SET
);
1137 while ((inbytes
= fread (src_buffer
, 1,
1138 min (bytes_to_read
, sizeof src_buffer
),
1140 char dest_buffer
[BUFSIZ
];
1141 ICONV_CONST
char *ib
= src_buffer
;
1142 char *ob
= dest_buffer
;
1143 size_t outbytes
= sizeof dest_buffer
;
1144 size_t outbytes_before
= outbytes
;
1146 if (end
> 0) bytes_to_read
-= inbytes
;
1148 if (iconv (conv_desc
, &ib
, &inbytes
, &ob
, &outbytes
) ==
1153 write (fd
, dest_buffer
, outbytes_before
- outbytes
);
1157 if (opened_input_file
) {
1163 iconv_close (conv_desc
);
1167 /* Replace the decoded file with the converted one. */
1168 if (ct
->c_cefile
.ce_file
) {
1169 if (ct
->c_cefile
.ce_unlink
) {
1170 (void) m_unlink (ct
->c_cefile
.ce_file
);
1172 free (ct
->c_cefile
.ce_file
);
1174 ct
->c_cefile
.ce_file
= dest
;
1175 ct
->c_cefile
.ce_unlink
= 1;
1179 /* Update ci_attrs. */
1180 src_charset
= dest_charset
;
1182 /* Update ct->c_ctline. */
1185 update_attr (ct
->c_ctline
, "charset=", dest_charset
);
1187 free (ct
->c_ctline
);
1188 ct
->c_ctline
= ctline
;
1189 } /* else no CT line, which is odd */
1191 /* Update Content-Type header field. */
1192 for (hf
= ct
->c_first_hf
; hf
; hf
= hf
->next
) {
1193 if (! strcasecmp (TYPE_FIELD
, hf
->name
)) {
1194 char *ctline_less_newline
=
1195 update_attr (hf
->value
, "charset=", dest_charset
);
1196 char *ctline
= concat (ctline_less_newline
, "\n", NULL
);
1197 free (ctline_less_newline
);
1205 (void) m_unlink (dest
);
1207 #else /* ! HAVE_ICONV */
1208 NMH_UNUSED (message_mods
);
1210 advise (NULL
, "Can't convert %s to %s without iconv", src_charset
,
1213 #endif /* ! HAVE_ICONV */
1226 siglongjmp (intrenv
, DONE
);