2 dnl ### NSC 2.0 -- Library Functions For DNS Processing
3 dnl ### (c) 1997 Martin Mares <mj@gts.cz>
7 # Current date and time
9 define(`curdate', translit(esyscmd(`date'),`
14 define(minutes, `eval($1*60)')
15 define(hours, `eval($1*3600)')
16 define(days, `eval($1*86400)')
18 # Reversal of IP address
20 define(revIPa, `ifelse($#, 1, `$1', `revIPa(shift($@)).$1')')
21 define(revaddr, `revIPa(translit($1, `.', `,'))')
23 # Add explicit dot at the end if the name contains domain part
25 define(corr_dot, `$1`'ifelse(index($1,`.'),-1,,`.')')
29 define(itera, `ifelse($#, 1, `iter($1)', `iter($1)`'itera(shift($@))')')
30 define(iterate, `define(`iter', defn(`$1'))itera($2)')