res_comp.c (176325) | res_comp.c (193023) |
---|---|
1/* 2 * Copyright (c) 1985, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 55 unchanged lines hidden (view full) --- 64 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 65 */ 66 67#if defined(LIBC_SCCS) && !defined(lint) 68static const char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93"; 69static const char rcsid[] = "$Id: res_comp.c,v 1.3.18.2 2005/07/28 07:38:11 marka Exp $"; 70#endif /* LIBC_SCCS and not lint */ 71#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1985, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 55 unchanged lines hidden (view full) --- 64 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 65 */ 66 67#if defined(LIBC_SCCS) && !defined(lint) 68static const char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93"; 69static const char rcsid[] = "$Id: res_comp.c,v 1.3.18.2 2005/07/28 07:38:11 marka Exp $"; 70#endif /* LIBC_SCCS and not lint */ 71#include <sys/cdefs.h> |
72__FBSDID("$FreeBSD: head/lib/libc/resolv/res_comp.c 176325 2008-02-16 00:16:49Z delphij $"); | 72__FBSDID("$FreeBSD: head/lib/libc/resolv/res_comp.c 193023 2009-05-29 07:34:54Z delphij $"); |
73 74#include "port_before.h" 75#include <sys/types.h> 76#include <sys/param.h> 77#include <netinet/in.h> 78#include <arpa/nameser.h> 79#include <ctype.h> 80#include <resolv.h> --- 62 unchanged lines hidden (view full) --- 143#define underscorechar(c) ((c) == 0x5f) 144#define periodchar(c) ((c) == PERIOD) 145#define asterchar(c) ((c) == 0x2a) 146#define alphachar(c) (((c) >= 0x41 && (c) <= 0x5a) \ 147 || ((c) >= 0x61 && (c) <= 0x7a)) 148#define digitchar(c) ((c) >= 0x30 && (c) <= 0x39) 149 150#define borderchar(c) (alphachar(c) || digitchar(c)) | 73 74#include "port_before.h" 75#include <sys/types.h> 76#include <sys/param.h> 77#include <netinet/in.h> 78#include <arpa/nameser.h> 79#include <ctype.h> 80#include <resolv.h> --- 62 unchanged lines hidden (view full) --- 143#define underscorechar(c) ((c) == 0x5f) 144#define periodchar(c) ((c) == PERIOD) 145#define asterchar(c) ((c) == 0x2a) 146#define alphachar(c) (((c) >= 0x41 && (c) <= 0x5a) \ 147 || ((c) >= 0x61 && (c) <= 0x7a)) 148#define digitchar(c) ((c) >= 0x30 && (c) <= 0x39) 149 150#define borderchar(c) (alphachar(c) || digitchar(c)) |
151#ifdef RES_ENFORCE_RFC1034 152#define middlechar(c) (borderchar(c) || hyphenchar(c)) 153#else |
|
151#define middlechar(c) (borderchar(c) || hyphenchar(c) || underscorechar(c)) | 154#define middlechar(c) (borderchar(c) || hyphenchar(c) || underscorechar(c)) |
155#endif |
|
152#define domainchar(c) ((c) > 0x20 && (c) < 0x7f) 153 154int 155res_hnok(const char *dn) { 156 int pch = PERIOD, ch = *dn++; 157 158 while (ch != '\0') { 159 int nch = *dn++; --- 114 unchanged lines hidden --- | 156#define domainchar(c) ((c) > 0x20 && (c) < 0x7f) 157 158int 159res_hnok(const char *dn) { 160 int pch = PERIOD, ch = *dn++; 161 162 while (ch != '\0') { 163 int nch = *dn++; --- 114 unchanged lines hidden --- |