From ccef20a48e758594256dbfa246dc6c4bcffc9003 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Sun, 18 Mar 2007 11:09:25 +0000 Subject: * configure.ac, Makefile.am: Add mflib * NEWS: Update * mflib: New subdirectory * mflib/match_dnsbl.mf, mflib/strip_domain_part.mf, mflib/heloarg_test.mf, mflib/is_ip.mf, mflib/safedb.mf, mflib/mx.mf, mflib/dns.mf, mflib/revip.mf, mflib/valid_domain.mf, mflib/match_rhsbl.mf, mflib/spf.mf, mflib/Makefile.am, mflib/match_cidr.mf: New files * doc/Makefile.am: Remove extract.awk * doc/extract.awk: Remove * doc/mailfromd.texi: Update * src/symtab.c, src/gram.y, src/mailfromd.h: Implement optional arguments for user functions * src/lex.l: Implement #include_once * src/prog.c (name_destroy): Free the object * src/bi_ipaddr.m4 (match_cidr): Remove. The function is implemented in MFL (mflib/match_cidr.mf) * testsuite/lib/mailfromd.exp, testsuite/etc/cidr.rc, testsuite/etc/catch.rc, testsuite/etc/catch01.rc, etc/mailfromd.rc: Use includes when necessary git-svn-id: file:///svnroot/mailfromd/trunk@1292 7a8a7f39-df28-0410-adc6-e0d955640f24 --- NEWS | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 16ee4efe..2fb9957c 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -Mailfromd NEWS -- history of user-visible changes. 2007-03-17 +Mailfromd NEWS -- history of user-visible changes. 2007-03-18 Copyright (C) 2005, 2006, 2007 Sergey Poznyakoff See the end of file for copying conditions. @@ -7,6 +7,39 @@ Please send mailfromd bug reports to Version 3.1.91, SVN +* Optional arguments in user-defined functions + +User-defined functions can take optional arguments. In declaration, +optional arguments are separated from the mandatory ones by a +semicolon. For example: + + func foo(number a, number b; string c) + +This function is declared with two mandatory arguments (a and b), and +an optional one (c). Subsequently it can be invoked either as + + foo(x, y, z) + +or + + foo(x, y) + +When invoking such functions, any missing arguments are replaced with +default values: + + - 0 for numeric arguments + - "" for string arguments + +Thus, continuing our previous example, the invocation `foo(x, y)' is +equivalent to `foo(x, y, "")'. + +* New statement #include_once + +This statement works exactly like `#include' except that it keeps +track of the included files. If the requested file has already been +included, `#include_once' returns silently, while `#include' issues +an error message. + * Internet address manipulation functions - number ntohl (number N) @@ -18,6 +51,37 @@ Version 3.1.91, SVN - number len_to_netmask (number N) - number netmask_to_len (number N) +* DNS functions + +DNS functions are reemplemented in two layers: + +1. Primitive calls: + +- string primitive_hostname (string IP) +- string primitive_resolve (string S [, string DOMAIN]) +- number primitive_hasmx (string DOMAIN) +- number primitive_ismx (string DOMAIN, string IP) + +These functions throw an exception if the requested lookup operation +fails. + +2. Traditional calls: + +- string hostname (string IP) +- string resolve (string S [, string DOMAIN]) +- number hasmx (string DOMAIN) +- number ismx (string DOMAIN, string IP) + +These are implemented in MFL and work exactly as their predecessors in +3.1.x branch. + +To use the traditional calls, include file "dns.mf". + +* Function `match_cidr' + +This function has been reemplemented in MFL. To use it, include +"match_cidr.mf". + * New statement `throw' The `throw' statement throws the given exception. For example: -- cgit v1.2.1