#ifndef lint
#endif
/*
* Copyright (c) 2001,2002 Japan Network Information Center.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set forth bellow.
*
* LICENSE TERMS AND CONDITIONS
*
* The following License Terms and Conditions apply, unless a different
* license is obtained from Japan Network Information Center ("JPNIC"),
* a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
* Chiyoda-ku, Tokyo 101-0047, Japan.
*
* 1. Use, Modification and Redistribution (including distribution of any
* under this License Terms and Conditions.
*
* 2. Redistribution of source code must retain the copyright notices as they
* appear in each source code file, this License Terms and Conditions.
*
* 3. Redistribution in binary form must reproduce the Copyright Notice,
* materials provided with the distribution. For the purposes of binary
* distribution the "Copyright Notice" refers to the following language:
* "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved."
*
* 4. The name of JPNIC may not be used to endorse or promote products
* derived from this Software without specific prior written approval of
* JPNIC.
*
* 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*/
#include <config.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <idn/logmacro.h>
#include <idn/filechecker.h>
#define SUPPORT_VERSIONING
struct idn__filechecker {
};
unsigned long *ucs2);
idn_result_t r;
WARNING(("idn__filechecker_create: cannot open %-.100s\n",
file));
return (idn_nofile);
}
return (idn_nomemory);
return (r);
}
if (r == idn_success) {
} else {
}
return (r);
}
void
TRACE(("idn__filechecker_destroy()\n"));
}
const unsigned long **found) {
idn_result_t r = idn_success;
TRACE(("idn__filechecker_lookup(str=\"%s\")\n",
while (*str != '\0') {
int exists;
if (r != idn_success) {
return (r);
} else if (exists) {
/* Found. */
return (idn_success);
}
str++;
}
return (idn_success);
}
static idn_result_t
idn_result_t r;
int lineno = 0;
char *p = line;
lineno++;
while (isspace((unsigned char)*p))
p++;
if (*p == '\0' || *p == '#')
continue;
#ifdef SUPPORT_VERSIONING
/* Skip version tag. */
continue;
#endif
WARNING(("syntax error in file \"%-.100s\" line %d: "
return (idn_invalid_syntax);
}
return (r);
}
return (idn_success);
}
static int
return (0);
switch (s[0]) {
case '\0':
case '\n':
case '#':
case ';':
return (1);
case '-':
break;
default:
return (0);
}
return (0);
INFO(("idn__filechecker_create: invalid range spec "
return (0);
}
switch (s[0]) {
case '\0':
case '\n':
case '#':
case ';':
return (1);
default:
return (0);
}
}
static char *
char *end;
/* Skip leading space */
while (isspace((unsigned char)*p))
p++;
/* Skip optional 'U+' */
p += 2;
if (end == p) {
INFO(("idn__filechecker_create: UCS code point expected\n"));
return (NULL);
}
p = end;
/* Skip trailing space */
while (isspace((unsigned char)*p))
p++;
return p;
}
}
void
}
const unsigned long **found) {
}