aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2008-03-09 16:20:50 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2008-03-09 16:20:50 +0000
commit67f891b804218ca7b42318fadeedfeec9243a0d6 (patch)
tree8b6b14e31236a91108865b85241b02f069a30b0e
parent14cc2f2806c7b66992ca4a41d6f8da6020931194 (diff)
downloadmailfromd-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--ChangeLog24
-rw-r--r--configure.ac2
-rw-r--r--doc/mailfromd.texi128
-rw-r--r--src/bi_db.m422
-rw-r--r--src/bi_dns.m422
-rw-r--r--src/bi_gettext.m44
-rw-r--r--src/bi_io.m416
-rw-r--r--src/bi_ipaddr.m46
-rw-r--r--src/bi_mail.m414
-rw-r--r--src/bi_other.m414
-rw-r--r--src/bi_poll.m418
-rw-r--r--src/bi_sa.m452
-rw-r--r--src/bi_sieve.m413
-rw-r--r--src/bi_spf.m42
-rw-r--r--src/bi_string.m48
-rw-r--r--src/bi_system.m42
-rw-r--r--src/bi_vars.m42
-rw-r--r--src/drivers.c6
-rw-r--r--src/gram.y12
-rw-r--r--src/lex.l2
-rw-r--r--src/mailfromd.h54
-rw-r--r--src/mf-status.mfi12
-rw-r--r--src/mfstat.awk8
-rw-r--r--src/prog.c28
-rw-r--r--src/snarf.m42
-rw-r--r--src/status.mfi8
26 files changed, 267 insertions, 214 deletions
diff --git a/ChangeLog b/ChangeLog
index 9abbf87e..66cdf707 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,29 @@
12008-03-09 Sergey Poznyakoff <gray@gnu.org.ua> 12008-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 @@
17AC_PREREQ(2.59) 17AC_PREREQ(2.59)
18m4_define([MF_VERSION_MAJOR], 4) 18m4_define([MF_VERSION_MAJOR], 4)
19m4_define([MF_VERSION_MINOR], 3) 19m4_define([MF_VERSION_MINOR], 3)
20m4_define([MF_VERSION_PATCH], 1) 20m4_define([MF_VERSION_PATCH], 90)
21AC_INIT([mailfromd], 21AC_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
134Building the Package 134Building 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
3173RUNTIME ERROR near foo.c:34: Macro not defined: @{client_adr@} 3180RUNTIME 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
5392substr("mailfrom", 4) @result{} "from" 5399substr("mailfrom", 4) @result{} "from"
@@ -5520,7 +5527,7 @@ supplied arguments match their corresponding conversion specifiers.
5520By default, the arguments are used in the order given, where each 5527By 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
5522insufficiently many arguments are given, @code{sprintf} raises 5529insufficiently 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
5524argument is taken, at each place where an argument is required, by 5531argument is taken, at each place where an argument is required, by
5525writing @samp{%@var{m}$}, instead of @samp{%} and @samp{*@var{m}$} 5532writing @samp{%@var{m}$}, instead of @samp{%} and @samp{*@var{m}$}
5526instead of @samp{*}, where the decimal integer @var{m} denotes the 5533instead 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
5660exception @code{failure}. 5667exception @code{e_failure}.
5661 5668
5662For example: 5669For 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}
56762047. The function returns the decoded string. If the decoding fails, 56832047. The function returns the decoded string. If the decoding fails,
5677it raises @code{failure} exception. The optional argument 5684it 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
5734In contrast to @code{strictpoll} function, this function does not use 5741In contrast to @code{strictpoll} function, this function does not use
5735cache database and does not fall back to polling @acronym{MX} servers if the 5742cache database and does not fall back to polling @acronym{MX} servers if the
5736main poll tempfails. The function can throw one of the following 5743main poll tempfails. The function can throw one of the following
5737exceptions: @code{failure}, @code{temp_failure}. 5744exceptions: @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.
5746In contrast to @code{stdpoll} function, @code{_pollmx} does 5753In contrast to @code{stdpoll} function, @code{_pollmx} does
5747not use cache database and does not fall back to polling the @var{ip} 5754not use cache database and does not fall back to polling the @var{ip}
5748if the poll fails. The function can throw one of the following 5755if the poll fails. The function can throw one of the following
5749exceptions: @code{failure}, @code{temp_failure}. 5756exceptions: @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.
5757Returns 0 or 1 depending on the result of the test. Can raise one of 5764Returns 0 or 1 depending on the result of the test. Can raise one of
5758the following exceptions: @code{failure}, @code{temp_failure}. 5765the 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}