Anthony Bentley.
Date:formatfield="%<(nodate{text})%{text}%|%(pretty{text})%>"
To:
cc:
-From:decode
+From:formatfield="%(unquote(decode{text}))"
Subject:decode
:
extras:nocomponent
Date:formatfield="%<(nodate{text})%{text}%|%(pretty{text})%>"
To:
cc:
-From:decode
+From:formatfield="%(unquote(decode{text}))"
Subject:decode
:
extras:nocomponent
;
; default message filter for `repl' (repl -format)
;
-from:nocomponent,formatfield="%(decode(friendly{text})) writes:"
+from:nocomponent,formatfield="%(unquote(decode(friendly{text}))) writes:"
body:component="> ",overflowtext="> ",overflowoffset=0
;
; message filter for `repl' (repl -format) that excludes the message body
;
-from:nocomponent,formatfield="%(decode(friendly{text})) writes:"
+from:nocomponent,formatfield="%(unquote(decode(friendly{text}))) writes:"
%;
%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
%02(mon{date})/%02(mday{date})/%(void(year{date}))%02(modulo 100)%<{date} %|*%>\
-%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
-%<(zero)%17(decode(friendly{from}))%> \
+%<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
+%<(zero)%17(unquote(decode(friendly{from})))%> \
%(decode{subject})%<{body}<<%{body}>>%>
%;
%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
%4(year{date})-%02(mon{date})-%02(mday{date})%<{date} %|*%>\
-%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
-%<(zero)%17(decode(friendly{from}))%> \
+%<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
+%<(zero)%17(unquote(decode(friendly{from})))%> \
%(decode{subject})%<{body}<<%{body}>>%>
%;
%; If the message is from me, print out who the message was sent to.
%; Otherwise, print out who it was from.
-%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
-%<(zero)%17(decode(friendly{from}))%> \
+%<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
+%<(zero)%17(unquote(decode(friendly{from})))%> \
%;
%; Print out the subject and any of th mesage body that will fit on the
%; rest of the line. After that, print the terminal reset code to reset
%;
%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
%02(mon{date})/%02(mday{date})%<{date} %|*%>\
-%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
-%<(zero)%17(decode(friendly{from}))%> \
+%<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
+%<(zero)%17(unquote(decode(friendly{from})))%> \
%(decode{subject})%<{body}<<%{body}>>%>
%<(unseen)%(zputlit(lit \e[36;40m))%>\
%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
%02(mon{date})/%02(mday{date})%<{date} %|*%>\
-%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
-%<(zero)%17(decode(friendly{from}))%> \
+%<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
+%<(zero)%17(unquote(decode(friendly{from})))%> \
%(decode{subject})%<{body}<<%{body}>>%>%(zputlit(lit \e[m))
%<{status} %|N%>\
%<{replied}R%?{encrypted}E%| %>\
%4(msg) \
-%<(mymbox{from})%<{to}To: %13(decode(friendly{to}))%>%>\
-%<(zero)%17(decode(friendly{from}))%> \
+%<(mymbox{from})%<{to}To: %13(unquote(decode(friendly{to})))%>%>\
+%<(zero)%17(unquote(decode(friendly{from})))%> \
%3(day{date}) %3(month{date}) %02(mday{date}) \
%02(hour{date}):%02(min{date}) \
%(decode{subject})
%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
%02(mon{date})/%02(mday{date})%<{date} %|*%>\
%5(size) \
-%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
-%<(zero)%17(decode(friendly{from}))%> \
+%<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
+%<(zero)%17(unquote(decode(friendly{from})))%> \
%(decode{subject})%<{body}<<%{body}%>
%02(mon{date})/%02(mday{date}) \
%02(hour{date}):%02(min{date})%3(tzone{date})\
%<{date} %|*%>\
-%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
-%<(zero)%17(decode(friendly{from}))%> \
+%<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
+%<(zero)%17(unquote(decode(friendly{from})))%> \
%(decode{subject})%<{body}<<%{body}%>
%?(gt 86400) %(day{date}) %|\
%02(hour{date}):%02(min{date})%>\
%<{date} %|*%>\
-%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
-%<(zero)%17(decode(friendly{from}))%> \
+%<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
+%<(zero)%17(unquote(decode(friendly{from})))%> \
%(decode{subject})%<{body}<<%{body}%>
%4(msg)%<(cur)+%| %>%<(unseen)U%| %>%<{replied}-%?{encrypted}E%| %>\
%02(mon{date})/%02(mday{date})%<{date} %|*%>\
-%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
-%<(zero)%17(decode(friendly{from}))%> \
+%<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
+%<(zero)%17(unquote(decode(friendly{from})))%> \
%(decode{subject})%<{body}<<%{body}>>%>
EOF
run_prog $fmtdump >$actual 2>&1
-check $expected $actual 'keep first'
+check $expected $actual
# check -form
+cat >$expected <<EOF
+ LV_DAT, value dat[0]
+ NUMF, width 4, fill ' '
+ LV_DAT, value dat[1]
+ IF_V_NE 0 continue else goto L0
+ CHAR '+'
+ GOTO L1
+L0: CHAR ' '
+L1: LS_COMP, comp "replied"
+ IF_S continue else goto L2
+ CHAR '-'
+ GOTO L3
+L2: LS_COMP, comp "encrypted"
+ IF_S continue else goto L4
+ CHAR 'E'
+L3: GOTO L5
+L4: CHAR ' '
+L5: PARSEDATE, c_name "date", c_type <DATE>
+ LV_MON, c_name "date", c_type <DATE>
+ NUMF, width 2, fill '0'
+ CHAR '/'
+ PARSEDATE, c_name "date", c_type <DATE>
+ LV_MDAY, c_name "date", c_type <DATE>
+ NUMF, width 2, fill '0'
+ LS_COMP, comp "date", c_type <DATE>
+ IF_S continue else goto L6
+ CHAR ' '
+ GOTO L7
+L6: CHAR '*'
+L7: MYMBOX, c_name "from", c_type <ADDR>
+ LV_COMPFLAG, comp "from", c_type <ADDR>
+ IF_V_NE 0 continue else goto L8
+ LS_COMP, comp "to", c_type <ADDR>
+ IF_S continue else goto L8
+ LIT "To:"
+ PARSEADDR, c_name "to", c_type <ADDR>
+ LS_FRIENDLY, c_name "to", c_type <ADDR>
+ FT_LS_DECODE
+
+ STRF, width 14, fill ' '
+L8: IF_V_EQ 0 continue else goto L9
+ PARSEADDR, c_name "from", c_type <ADDR>
+ LS_FRIENDLY, c_name "from", c_type <ADDR>
+ FT_LS_DECODE
+
+ STRF, width 17, fill ' '
+L9: LIT " "
+ LS_COMP, comp "subject"
+ FT_LS_DECODE
+ STR
+ LS_COMP, comp "body"
+ IF_S continue else goto L10
+ LIT "<<"
+ COMP, comp "body"
+ LIT ">>"
+L10: CHAR '\n'
+ DONE
+EOF
+
run_prog $fmtdump -form "$MH_INST_DIR${nmhetcdir}/scan.default" >$actual 2>&1
check $expected $actual