diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-03-09 16:20:50 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-03-09 16:20:50 +0000 |
commit | 67f891b804218ca7b42318fadeedfeec9243a0d6 (patch) | |
tree | 8b6b14e31236a91108865b85241b02f069a30b0e | |
parent | 14cc2f2806c7b66992ca4a41d6f8da6020931194 (diff) | |
download | mailfromd-67f891b804218ca7b42318fadeedfeec9243a0d6.tar.gz mailfromd-67f891b804218ca7b42318fadeedfeec9243a0d6.tar.bz2 |
Prefix all exception codes with `e_'.
* src/mfstat.awk: Look for mf_exception_code/mf_exception_count.
* src/lex.l (variable_or_const): Add type cast.
* src/mailfromd.h (enum mf_status_code): Retain only first four proper
status codes.
(enum mf_exception_code): New type.
(mf_status_to_exception): New macro
(mf_exception_str,string_to_exception): New functions
(mf_status_str): Rewrite as macro.
(string_to_stat): Remove.
* src/mf-status.mfi: Prefix codes with e_
* src/status.mfi: Prefix exception codes with e_. Retain
succes, not_found, failure, and temp_failure for backward
compatibility.
Retain old exception names if m4 symbol COMPAT_4_3 is defined.
* src/gram.y, src/snarf.m4, src/bi_poll.m4, src/bi_string.m4,
src/drivers.c, src/bi_dns.m4, src/bi_system.m4, src/bi_spf.m4,
src/prog.c, src/bi_ipaddr.m4, src/bi_sa.m4, src/bi_io.m4,
src/bi_sieve.m4, src/bi_vars.m4, src/bi_other.m4, src/bi_mail.m4,
src/bi_gettext.m4, src/bi_db.m4, : Use new exception names.
* configure.ac (MF_VERSION_PATCH): Set to 90
* doc/mailfromd.texi: Document changes.
git-svn-id: file:///svnroot/mailfromd/branches/release_4_3_patches@1628 7a8a7f39-df28-0410-adc6-e0d955640f24
-rw-r--r-- | ChangeLog | 24 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | doc/mailfromd.texi | 128 | ||||
-rw-r--r-- | src/bi_db.m4 | 22 | ||||
-rw-r--r-- | src/bi_dns.m4 | 22 | ||||
-rw-r--r-- | src/bi_gettext.m4 | 4 | ||||
-rw-r--r-- | src/bi_io.m4 | 16 | ||||
-rw-r--r-- | src/bi_ipaddr.m4 | 6 | ||||
-rw-r--r-- | src/bi_mail.m4 | 14 | ||||
-rw-r--r-- | src/bi_other.m4 | 14 | ||||
-rw-r--r-- | src/bi_poll.m4 | 18 | ||||
-rw-r--r-- | src/bi_sa.m4 | 52 | ||||
-rw-r--r-- | src/bi_sieve.m4 | 13 | ||||
-rw-r--r-- | src/bi_spf.m4 | 2 | ||||
-rw-r--r-- | src/bi_string.m4 | 8 | ||||
-rw-r--r-- | src/bi_system.m4 | 2 | ||||
-rw-r--r-- | src/bi_vars.m4 | 2 | ||||
-rw-r--r-- | src/drivers.c | 6 | ||||
-rw-r--r-- | src/gram.y | 12 | ||||
-rw-r--r-- | src/lex.l | 2 | ||||
-rw-r--r-- | src/mailfromd.h | 54 | ||||
-rw-r--r-- | src/mf-status.mfi | 12 | ||||
-rw-r--r-- | src/mfstat.awk | 8 | ||||
-rw-r--r-- | src/prog.c | 28 | ||||
-rw-r--r-- | src/snarf.m4 | 2 | ||||
-rw-r--r-- | src/status.mfi | 8 |
26 files changed, 267 insertions, 214 deletions
@@ -1,5 +1,29 @@ | |||
1 | 2008-03-09 Sergey Poznyakoff <gray@gnu.org.ua> | 1 | 2008-03-09 Sergey Poznyakoff <gray@gnu.org.ua> |
2 | 2 | ||
3 | Prefix all exception codes with `e_'. | ||
4 | |||
5 | * src/mfstat.awk: Look for mf_exception_code/mf_exception_count. | ||
6 | * src/lex.l (variable_or_const): Add type cast. | ||
7 | * src/mailfromd.h (enum mf_status_code): Retain only first four proper | ||
8 | status codes. | ||
9 | (enum mf_exception_code): New type. | ||
10 | (mf_status_to_exception): New macro | ||
11 | (mf_exception_str,string_to_exception): New functions | ||
12 | (mf_status_str): Rewrite as macro. | ||
13 | (string_to_stat): Remove. | ||
14 | * src/mf-status.mfi: Prefix codes with e_ | ||
15 | * src/status.mfi: Prefix exception codes with e_. Retain | ||
16 | succes, not_found, failure, and temp_failure for backward | ||
17 | compatibility. | ||
18 | Retain old exception names if m4 symbol COMPAT_4_3 is defined. | ||
19 | * src/gram.y, src/snarf.m4, src/bi_poll.m4, src/bi_string.m4, | ||
20 | src/drivers.c, src/bi_dns.m4, src/bi_system.m4, src/bi_spf.m4, | ||
21 | src/prog.c, src/bi_ipaddr.m4, src/bi_sa.m4, src/bi_io.m4, | ||
22 | src/bi_sieve.m4, src/bi_vars.m4, src/bi_other.m4, src/bi_mail.m4, | ||
23 | src/bi_gettext.m4, src/bi_db.m4, : Use new exception names. | ||
24 | * configure.ac (MF_VERSION_PATCH): Set to 90 | ||
25 | * doc/mailfromd.texi: Document changes. | ||
26 | |||
3 | Name clashes between constants and variables went unnoticed by the | 27 | Name clashes between constants and variables went unnoticed by the |
4 | compiler. Bug reported by Thomas Lynch. | 28 | compiler. Bug reported by Thomas Lynch. |
5 | Fix this and rename exception codes to minimize chances of such | 29 | Fix this and rename exception codes to minimize chances of such |
diff --git a/configure.ac b/configure.ac index 6b55d68d..c76eae46 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -17,7 +17,7 @@ | |||
17 | AC_PREREQ(2.59) | 17 | AC_PREREQ(2.59) |
18 | m4_define([MF_VERSION_MAJOR], 4) | 18 | m4_define([MF_VERSION_MAJOR], 4) |
19 | m4_define([MF_VERSION_MINOR], 3) | 19 | m4_define([MF_VERSION_MINOR], 3) |
20 | m4_define([MF_VERSION_PATCH], 1) | 20 | m4_define([MF_VERSION_PATCH], 90) |
21 | AC_INIT([mailfromd], | 21 | AC_INIT([mailfromd], |
22 | MF_VERSION_MAJOR.MF_VERSION_MINOR[]m4_ifdef([MF_VERSION_PATCH],.MF_VERSION_PATCH), | 22 | MF_VERSION_MAJOR.MF_VERSION_MINOR[]m4_ifdef([MF_VERSION_PATCH],.MF_VERSION_PATCH), |
23 | [bug-mailfromd@gnu.org.ua]) | 23 | [bug-mailfromd@gnu.org.ua]) |
diff --git a/doc/mailfromd.texi b/doc/mailfromd.texi index e4b456d1..27ff4c46 100644 --- a/doc/mailfromd.texi +++ b/doc/mailfromd.texi | |||
@@ -133,6 +133,7 @@ Sender Address Verification. | |||
133 | 133 | ||
134 | Building the Package | 134 | Building the Package |
135 | 135 | ||
136 | * 43x-440:: Upgrading from 4.3.x to 4.4 | ||
136 | * 420-43x:: Upgrading from 4.2 to 4.3.x | 137 | * 420-43x:: Upgrading from 4.2 to 4.3.x |
137 | * 410-420:: Upgrading from 4.1 to 4.2 | 138 | * 410-420:: Upgrading from 4.1 to 4.2 |
138 | * 400-410:: Upgrading from 4.0 to 4.1 | 139 | * 400-410:: Upgrading from 4.0 to 4.1 |
@@ -987,6 +988,7 @@ the corresponding section below. | |||
987 | @end enumerate | 988 | @end enumerate |
988 | 989 | ||
989 | @menu | 990 | @menu |
991 | * 43x-440:: Upgrading from 4.3.x to 4.4 | ||
990 | * 420-43x:: Upgrading from 4.2 to 4.3.x | 992 | * 420-43x:: Upgrading from 4.2 to 4.3.x |
991 | * 410-420:: Upgrading from 4.1 to 4.2 | 993 | * 410-420:: Upgrading from 4.1 to 4.2 |
992 | * 400-410:: Upgrading from 4.0 to 4.1 | 994 | * 400-410:: Upgrading from 4.0 to 4.1 |
@@ -996,6 +998,11 @@ the corresponding section below. | |||
996 | * 1x-2x:: Upgrading from 1.x to 2.x | 998 | * 1x-2x:: Upgrading from 1.x to 2.x |
997 | @end menu | 999 | @end menu |
998 | 1000 | ||
1001 | @node 43x-440 | ||
1002 | @section Upgrading from 4.3.x to 4.4 | ||
1003 | @cindex Upgrading from 4.3.x to 4.4 | ||
1004 | @UNREVISED{} | ||
1005 | |||
999 | @node 420-43x | 1006 | @node 420-43x |
1000 | @section Upgrading from 4.2 to 4.3.x | 1007 | @section Upgrading from 4.2 to 4.3.x |
1001 | @cindex Upgrading from 4.2 to 4.3.x | 1008 | @cindex Upgrading from 4.2 to 4.3.x |
@@ -3167,7 +3174,7 @@ done | |||
3167 | @end smallexample | 3174 | @end smallexample |
3168 | 3175 | ||
3169 | Another common case are undefined Sendmail macros. In this case the | 3176 | Another common case are undefined Sendmail macros. In this case the |
3170 | @code{macroundef} exception is generated: | 3177 | @code{e_macroundef} exception is generated: |
3171 | 3178 | ||
3172 | @smallexample | 3179 | @smallexample |
3173 | RUNTIME ERROR near foo.c:34: Macro not defined: @{client_adr@} | 3180 | RUNTIME ERROR near foo.c:34: Macro not defined: @{client_adr@} |
@@ -5386,7 +5393,7 @@ starting at @var{start}. If @var{length} is omitted, the rest of | |||
5386 | @var{str} is used. | 5393 | @var{str} is used. |
5387 | 5394 | ||
5388 | If @var{length} is greater than the actual length of the string, the | 5395 | If @var{length} is greater than the actual length of the string, the |
5389 | @code{range} exception is signalled. | 5396 | @code{e_range} exception is signalled. |
5390 | 5397 | ||
5391 | @smallexample | 5398 | @smallexample |
5392 | substr("mailfrom", 4) @result{} "from" | 5399 | substr("mailfrom", 4) @result{} "from" |
@@ -5520,7 +5527,7 @@ supplied arguments match their corresponding conversion specifiers. | |||
5520 | By default, the arguments are used in the order given, where each | 5527 | By default, the arguments are used in the order given, where each |
5521 | @samp{*} and each conversion specifier asks for the next argument. If | 5528 | @samp{*} and each conversion specifier asks for the next argument. If |
5522 | insufficiently many arguments are given, @code{sprintf} raises | 5529 | insufficiently many arguments are given, @code{sprintf} raises |
5523 | @samp{range} exception. One can also specify explicitly which | 5530 | @samp{e_range} exception. One can also specify explicitly which |
5524 | argument is taken, at each place where an argument is required, by | 5531 | argument is taken, at each place where an argument is required, by |
5525 | writing @samp{%@var{m}$}, instead of @samp{%} and @samp{*@var{m}$} | 5532 | writing @samp{%@var{m}$}, instead of @samp{%} and @samp{*@var{m}$} |
5526 | instead of @samp{*}, where the decimal integer @var{m} denotes the | 5533 | instead of @samp{*}, where the decimal integer @var{m} denotes the |
@@ -5657,7 +5664,7 @@ arguments: | |||
5657 | @end table | 5664 | @end table |
5658 | 5665 | ||
5659 | If the function is unable to encode the string, it raises the | 5666 | If the function is unable to encode the string, it raises the |
5660 | exception @code{failure}. | 5667 | exception @code{e_failure}. |
5661 | 5668 | ||
5662 | For example: | 5669 | For example: |
5663 | 5670 | ||
@@ -5674,7 +5681,7 @@ message_header_encode(%string, "ISO-8859-1") | |||
5674 | (string @var{text}, [string @var{charset}]) | 5681 | (string @var{text}, [string @var{charset}]) |
5675 | @var{text} must be a header value encoded in accordance with @acronym{RFC} | 5682 | @var{text} must be a header value encoded in accordance with @acronym{RFC} |
5676 | 2047. The function returns the decoded string. If the decoding fails, | 5683 | 2047. The function returns the decoded string. If the decoding fails, |
5677 | it raises @code{failure} exception. The optional argument | 5684 | it raises @code{e_failure} exception. The optional argument |
5678 | @var{charset} specifies the character set to use (default -- | 5685 | @var{charset} specifies the character set to use (default -- |
5679 | @samp{UTF-8}). | 5686 | @samp{UTF-8}). |
5680 | 5687 | ||
@@ -5734,7 +5741,7 @@ using @var{domain} as @code{EHLO} domain and @var{mailfrom} as | |||
5734 | In contrast to @code{strictpoll} function, this function does not use | 5741 | In contrast to @code{strictpoll} function, this function does not use |
5735 | cache database and does not fall back to polling @acronym{MX} servers if the | 5742 | cache database and does not fall back to polling @acronym{MX} servers if the |
5736 | main poll tempfails. The function can throw one of the following | 5743 | main poll tempfails. The function can throw one of the following |
5737 | exceptions: @code{failure}, @code{temp_failure}. | 5744 | exceptions: @code{e_failure}, @code{e_temp_failure}. |
5738 | @end deftypefn | 5745 | @end deftypefn |
5739 | 5746 | ||
5740 | @deftypefn {Built-in Function} number _pollmx @ | 5747 | @deftypefn {Built-in Function} number _pollmx @ |
@@ -5746,7 +5753,7 @@ FROM} address. Returns 0 or 1 depending on the result of the test. | |||
5746 | In contrast to @code{stdpoll} function, @code{_pollmx} does | 5753 | In contrast to @code{stdpoll} function, @code{_pollmx} does |
5747 | not use cache database and does not fall back to polling the @var{ip} | 5754 | not use cache database and does not fall back to polling the @var{ip} |
5748 | if the poll fails. The function can throw one of the following | 5755 | if the poll fails. The function can throw one of the following |
5749 | exceptions: @code{failure}, @code{temp_failure}. | 5756 | exceptions: @code{e_failure}, @code{e_temp_failure}. |
5750 | @end deftypefn | 5757 | @end deftypefn |
5751 | 5758 | ||
5752 | @deftypefn {Built-in Function} number stdpoll @ | 5759 | @deftypefn {Built-in Function} number stdpoll @ |
@@ -5755,7 +5762,7 @@ exceptions: @code{failure}, @code{temp_failure}. | |||
5755 | Performs standard poll for @var{email}, using @var{domain} as | 5762 | Performs standard poll for @var{email}, using @var{domain} as |
5756 | @code{EHLO} domain and @var{mailfrom} as @code{MAIL FROM} address. | 5763 | @code{EHLO} domain and @var{mailfrom} as @code{MAIL FROM} address. |
5757 | Returns 0 or 1 depending on the result of the test. Can raise one of | 5764 | Returns 0 or 1 depending on the result of the test. Can raise one of |
5758 | the following exceptions: @code{failure}, @code{temp_failure}. | 5765 | the following exceptions: @code{e_failure}, @code{e_temp_failure}. |
5759 | 5766 | ||
5760 | In @code{on} statement context, it is synonymous to @code{poll} | 5767 | In @code{on} statement context, it is synonymous to @code{poll} |