Below is the format of replcomps lines 1-2 before MH 6.8. Or, here is the explanation for MH version 6.8 and later.
Lines 1 and 2 of the default replcomps file look like this before MH version 6.8:
%(lit)%(formataddr %<{reply-to}%|%<{from}%|%<{sender}%|%<{return-path}%>%>%>%>)\ %<(nonnull)%(void(width))%(putaddr To: )\n%>\Those lines look for the best address in the original message. The %(lit) erases a storage register that'll hold the address. The %(formataddr ...) formats an address and stores it in the register. The rest of line 1, the argument to formataddr, chooses the address:
%<{reply-to}%|%<{from}%|%<{sender}%|%<{return-path}%>%>%>%>It's several nested if-else tests. It means:
Line 2 starts with a test (%<) that runs the (nonnull) function to see whether formataddr saved an address in line 1. If so, %(void(width)) saves the width of the address. (The Section scan Format Strings has more information about the string and numeric registers where those values are saved.) The %(putaddr To: )\n uses a function named putaddr. It gets the address field that was saved in line 1 and prints To: followed by the address and a newline character (\n). We've got the To: address, if any; the %> ends the test.
Click here to go back to the main thread. It explains the rest of the lines of all recent versions of the default replcomps file.
[Table of Contents] [Index] [Return to: start of MH 6.8 replcomps explanation]
This file is from the third edition of the book MH & xmh: Email for Users & Programmers, ISBN 1-56592-093-7, by Jerry Peek. Copyright © 1991, 1992, 1995 by O'Reilly & Associates, Inc. This file is freely-available; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. For more information, see the file copying.htm.
Suggestions are welcome: Jerry Peek <jerry@ora.com>
HIVE: All information for read only. Please respect copyright! |