X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=adns.git;a=blobdiff_plain;f=client%2Fadh-main.c;h=b6f3bd4d0d2ada0b3658b7b41a0b51f893467b34;hp=7065d58ecd53bd2afd82a7497d52cb2ad95296a4;hb=938b0228d88a9166f9e808fe9fe8313f8d940977;hpb=401c256aeefcfa8b23668bee45b3174792df4f62 diff --git a/client/adh-main.c b/client/adh-main.c index 7065d58..b6f3bd4 100644 --- a/client/adh-main.c +++ b/client/adh-main.c @@ -4,12 +4,11 @@ * main program and useful subroutines */ /* - * This file is - * Copyright (C) 1997-2000 Ian Jackson - * - * It is part of adns, which is - * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999-2000 Tony Finch + * This file is part of adns, which is + * Copyright (C) 1997-2000,2003,2006 Ian Jackson + * Copyright (C) 1999-2000,2003,2006 Tony Finch + * Copyright (C) 1991 Massachusetts Institute of Technology + * (See the file INSTALL for full details.) * * 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 @@ -111,6 +110,14 @@ void of_type(const struct optioninfo *oi, const char *arg, const char *arg2) { }; const struct typename *tnp; + unsigned long unknowntype; + char *ep; + + if (strlen(arg) > 4 && !memcmp(arg,"type",4) && + (unknowntype= strtoul(arg+4, &ep, 10), !*ep) && unknowntype < 65536) { + ov_type= unknowntype | adns_r_unknown; + return; + } for (tnp=typenames; tnp->type && strcmp(arg,tnp->desc);