+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#ifndef _WCTYPE_H
#define _WCTYPE_H
#endif
-#include "../../libc/sysdeps/linux/common/bits/uClibc_ctype.h"
+#include UCLIBC_CTYPE_HEADER
/* #define CTYPE_PACKED */
char *s0;
char *s1;
int n;
-
+
s0 = strrchr(*argv, '/');
if (!s0) {
s0 = *argv;
} else {
++s0;
}
- s1 = strchr(s0, '.');
+ s1 = strrchr(s0, '.');
if (!s1) {
n = strlen(s0);
} else {
if ((c != 0) || 1) {
u = towupper(c);
l = towlower(c);
-
+
if (u >= 0x80) u = csd[numsets].w2c[u];
if (l >= 0x80) l = csd[numsets].w2c[l];
#if 1
wrow[i & (C2WC_ROW_LEN-1)] = csd[numsets].c2w[i];
if ((i & (C2WC_ROW_LEN-1)) == (C2WC_ROW_LEN-1)) {
- p = (char *) c2wc_tbl;
+ p = (unsigned char *) c2wc_tbl;
for (j=0 ; j < n_c2wc_rows ; j++) {
if (!memcmp(p, (char *) wrow, 2*C2WC_ROW_LEN)) {
break;
fprintf(out, "\nstatic const unsigned short __LOCALE_DATA_Cc2wc_data[%d] = {\n",
n_c2wc_rows * C2WC_ROW_LEN);
- p = (char *) c2wc_tbl;
+ p = (unsigned char *) c2wc_tbl;
for (j=0 ; j < n_c2wc_rows ; j++) {
fprintf(out, "\t");
for (i=0 ; i < C2WC_ROW_LEN ; i++) {