/*
* Copyright (c) 1996, 1998 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#endif /* LIBC_SCCS and not lint */
#include <ctype.h>
#include <resolv.h>
static char
xtob(
register int c
)
{
return (char)(c - (((c >= '0') && (c <= '9')) ? '0' : '7'));
}
const char *ascii,
int maxlen
)
{
if (c == '.' || c == '+' || c == '/')
continue;
if (!isascii(c))
return (0);
if (islower(c))
if (isxdigit(c)) {
c = *ascii++;
if (c != '\0') {
if (isxdigit(c)) {
len++;
} else
return (0);
}
else
return (0);
}
else
return (0);
}
return (len);
}
char *
int binlen,
register char *ascii
)
{
register int nib;
int i;
char *start;
if (ascii)
else {
}
if (binlen > 255)
binlen = 255;
for (i = 0; i < binlen; i++) {
*ascii++ = '.';
}
*ascii = '\0';
return (start);
}