Skip to content
Snippets Groups Projects
Commit fbcbdb83 authored by rswindell's avatar rswindell
Browse files

Add new command-line option:

-r    = display raw message body text (not MIME-decoded)
parent e8eebc0d
No related branches found
No related tags found
No related merge requests found
...@@ -94,6 +94,7 @@ FILE* statfp; ...@@ -94,6 +94,7 @@ FILE* statfp;
BOOL pause_on_exit=FALSE; BOOL pause_on_exit=FALSE;
BOOL pause_on_error=FALSE; BOOL pause_on_error=FALSE;
char* beep=""; char* beep="";
long msgtxtmode = GETMSGTXT_ALL|GETMSGTXT_PLAIN;
/************************/ /************************/
/* Program usage/syntax */ /* Program usage/syntax */
...@@ -134,6 +135,7 @@ char *usage= ...@@ -134,6 +135,7 @@ char *usage=
" -p = wait for keypress (pause) on exit\n" " -p = wait for keypress (pause) on exit\n"
" -! = wait for keypress (pause) on error\n" " -! = wait for keypress (pause) on error\n"
" -b = beep on error\n" " -b = beep on error\n"
" -r = display raw message body text (not MIME-decoded)\n"
" -C = continue after some (normally fatal) error conditions\n" " -C = continue after some (normally fatal) error conditions\n"
" -t<s> = set 'to' user name for imported message\n" " -t<s> = set 'to' user name for imported message\n"
" -n<s> = set 'to' netmail address for imported message\n" " -n<s> = set 'to' netmail address for imported message\n"
...@@ -1411,7 +1413,7 @@ void readmsgs(ulong start) ...@@ -1411,7 +1413,7 @@ void readmsgs(ulong start)
printf("\n\n"); printf("\n\n");
if((inbuf=smb_getmsgtxt(&smb,&msg,GETMSGTXT_ALL|GETMSGTXT_PLAIN))!=NULL) { if((inbuf=smb_getmsgtxt(&smb,&msg, msgtxtmode))!=NULL) {
printf("%s",inbuf); printf("%s",inbuf);
free(inbuf); free(inbuf);
} }
...@@ -1683,6 +1685,9 @@ int main(int argc, char **argv) ...@@ -1683,6 +1685,9 @@ int main(int argc, char **argv)
case '!': case '!':
pause_on_error=TRUE; pause_on_error=TRUE;
break; break;
case 'r':
msgtxtmode = GETMSGTXT_ALL;
break;
case 'b': case 'b':
beep="\a"; beep="\a";
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment