X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=adns%2Fadns.c;h=53a1b01b61ae452ea91eea08dc5d6b23c2d547ad;hb=dea4e335a78d52ed5f4b71908aa8fcbf392e96be;hp=2ff423e3b9cddfa45530da0af38e3333ae684e0c;hpb=3340221c68f8c948db9d2d3b553692fe642dd0f8;p=chiark-tcl.git diff --git a/adns/adns.c b/adns/adns.c index 2ff423e..53a1b01 100644 --- a/adns/adns.c +++ b/adns/adns.c @@ -1,5 +1,3 @@ -/* - */ /* * adns lookup TYPE DOMAIN [QUERY-OPTIONS] => [list RDATA] * if no or dontknow, throws an exception, with errorCode one of @@ -56,6 +54,28 @@ * * adns destroy-resolver RESOLVER * cancels outstanding queries + * + */ +/* ---8<--- end of documentation comment --8<-- */ + +/* + * adns.c - adns binding for Tcl + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. */ #define _GNU_SOURCE @@ -469,7 +489,8 @@ static int query_submit(Tcl_Interp *ip, r= inet_pton(*af,domain,&sa); if (!r) goto af_found; } - return cht_staticerr(ip,"invalid address for adns reverse submit",""); + return cht_staticerr(ip,"invalid address for adns reverse submit", + "ADNS REVERSE INVALID"); af_found:; } @@ -791,7 +812,4 @@ int cht_do_adnstoplevel_adns(ClientData cd, Tcl_Interp *ip, return subcmd->func(0,ip,objc,objv); } -extern int Chiark_tcl_adns_Init(Tcl_Interp *ip); /* called by Tcl's "load" */ -int Chiark_tcl_adns_Init(Tcl_Interp *ip) { - return cht_initextension(ip, cht_adnstoplevel_entries, 0); -} +CHT_INIT(adns, {}, CHTI_COMMANDS(cht_adnstoplevel_entries))