Article View: news.software.readers
Article #12358Re: How do I use % and MAILCALL?
From: Wayne Davison
Date: Thu, 03 Nov 1994 18:58
Date: Thu, 03 Nov 1994 18:58
51 lines
2642 bytes
2642 bytes
According to Yeechang Lee <ycl6@columbia.edu>: > -EMAILCALL="%`mw -f -C`" At the moment the string isn't interp'ed, it's just copied into the prompt line via printf. I just twiddled the code to enhace this, and it seems to be ok. Keep in mind that this command will get executed at lots of prompts once you receive mail, so don't make it too slow. The appended patch will let you check it out. This is based on my current source, so don't worry if the line numbers are wrong. -- Wayne Davison davison@borland.com ---8<------8<------8<------8<---cut here--->8------>8------>8------>8--- Index:art.c @@ -1010,8 +1010,9 @@ setdfltcmd(); standout(); /* enter standout mode */ + interp(buf, sizeof buf, mailcall); #ifdef CHARSUBST - printf(prompt,mailcall,current_charsubst(),dfltcmd); + printf(prompt,buf,current_charsubst(),dfltcmd); #else - printf(prompt,mailcall,dfltcmd); + printf(prompt,buf,dfltcmd); #endif /* print prompt, whatever it is */ Index:ng.c @@ -360,8 +360,9 @@ standout(); /* enter standout mode */ /* print prompt, whatever it is */ + interp(buf, sizeof buf, mailcall); #ifdef CHARSUBST - printf(prompt,mailcall,current_charsubst(),dfltcmd); + printf(prompt,buf,current_charsubst(),dfltcmd); #else - printf(prompt,mailcall,dfltcmd); + printf(prompt,buf,dfltcmd); #endif un_standout(); /* leave standout mode */ Index:rt-select.c @@ -242,5 +242,6 @@ (long)((sel_prior_arts+sel_page_arts)*100 / sel_total_arts), page_char, end_char); - sprintf(promptbuf, "%s-- %s %s (%s%s order) -- %s", mailcall, + interp(buf, sizeof buf, mailcall); + sprintf(promptbuf, "%s-- %s %s (%s%s order) -- %s", buf, sel_exclusive? "SELECTED" : "Select", sel_mode_string, sel_direction<0? "reverse " : nullstr, sel_sort_string, cmd_buf); ---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
Technical Details
Message-ID:
<CypGos.B56@borland.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!bga.com!news.sprintlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!news.mathworks.com!yeshua.marcam.com!charnel.ecst.csuchico.edu!csusac!csus.edu!borland.com!davisonReferences:
<399jgl$cq7@apakabar.cc.columbia.edu>Show Full Headers
Complete Article Headers
Message-ID: <CypGos.B56@borland.com> Subject: Re: How do I use % and MAILCALL? Date: Thu, 3 Nov 1994 18:58:03 GMT From: davison@borland.com (Wayne Davison) References: <399jgl$cq7@apakabar.cc.columbia.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!bga.com!news.sprintlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!news.mathworks.com!yeshua.marcam.com!charnel.ecst.csuchico.edu!csusac!csus.edu!borland.com!davison Newsgroups: news.software.readers Organization: Borland International Lines: 51