Annotation of src/include/wchar.h, Revision 1.1.2.1
1.1 kleink 1: /*-
1.1.2.1 ! minoura 2: * Copyright (c)1999 Citrus Project,
1.1 kleink 3: * 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
9: * notice, this list of conditions and the following disclaimer.
10: * 2. Redistributions in binary form must reproduce the above copyright
11: * notice, this list of conditions and the following disclaimer in the
12: * documentation and/or other materials provided with the distribution.
13: *
1.1.2.1 ! minoura 14: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
! 15: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
! 16: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
! 17: * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
! 18: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
! 19: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
! 20: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
! 21: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
! 22: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
! 23: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
! 24: * SUCH DAMAGE.
! 25: *
! 26: * $Id: wchar.h,v 1.2 2000/01/25 14:24:21 cvscitrus Exp $
1.1 kleink 27: */
28:
29: #ifndef _WCHAR_H_
1.1.2.1 ! minoura 30: #define _WCHAR_H_
! 31:
! 32: #undef __IN_WCHAR_H
! 33: #define __IN_WCHAR_H
! 34: #include <wctype.h>
! 35: #undef __IN_WCHAR_H
! 36:
! 37: #ifdef _BSD_SIZE_T_
! 38: typedef _BSD_SIZE_T_ size_t;
! 39: #undef _BSD_SIZE_T_
! 40: #endif
! 41:
! 42: #ifdef _BSD_WCHAR_T_
! 43: typedef _BSD_WCHAR_T_ wchar_t;
! 44: #undef _BSD_WCHAR_T_
! 45: #endif
1.1 kleink 46:
1.1.2.1 ! minoura 47: #ifdef _BSD_MBSTATE_T_
! 48: typedef _BSD_MBSTATE_T_ mbstate_t;
! 49: #undef _BSD_MBSTATE_T_
! 50: #endif
! 51:
! 52: #ifndef WCHAR_MAX
! 53: #define WCHAR_MAX (2147483647)
! 54: #endif
1.1 kleink 55:
1.1.2.1 ! minoura 56: #ifndef WCHAR_MIN
! 57: #define WCHAR_MIN (0)
1.1 kleink 58: #endif
59:
1.1.2.1 ! minoura 60: #ifndef NULL
! 61: #define NULL (0)
1.1 kleink 62: #endif
63:
1.1.2.1 ! minoura 64: __BEGIN_DECLS
! 65: #if 0 /* XXX: not implemented */
! 66: /*
! 67: wint_t btowc __P((int));
! 68: int fwprintf __P((FILE *, const wchar_t *, ...));
! 69: int fwscanf __P((FILE *, const wchar_t *, ...));
! 70: */
! 71: #endif /* XXX: not implemented */
! 72: #if 0
! 73: /* defined in wctype.h commonly */
! 74: /*
! 75: int iswalnum __P((wint_t));
! 76: int iswalpha __P((wint_t));
! 77: int iswcntrl __P((wint_t));
! 78: int iswdigit __P((wint_t));
! 79: int iswgraph __P((wint_t));
! 80: int iswlower __P((wint_t));
! 81: int iswprint __P((wint_t));
! 82: int iswpunct __P((wint_t));
! 83: int iswspace __P((wint_t));
! 84: int iswupper __P((wint_t));
! 85: int iswxdigit __P((wint_t));
! 86: */
! 87: #endif
! 88: #if 0 /* XXX: not implemented */
! 89: /*
! 90: int iswctype __P((wint_t, wctype_t));
! 91: wint_t fgetwc __P((FILE *));
! 92: wchar_t *fgetws __P((wchar_t *, int, FILE *));
! 93: wint_t fputwc __P((wchar_t, FILE *));
! 94: int fputws __P((const wchar_t *, FILE *));
! 95: int fwide __P((FILE *, int));
! 96: wint_t getwc __P((FILE *));
! 97: wint_t getwchar __P((void));
! 98: */
! 99: #endif /* XXX: not implemented */
! 100: int mbsinit __P((const mbstate_t *));
! 101: size_t mbrlen __P((const char *, size_t, mbstate_t *));
! 102: size_t mbrtowc __P((wchar_t *, const char *, size_t,
! 103: mbstate_t *));
! 104: size_t mbsrtowcs __P((wchar_t *, const char **, size_t,
! 105: mbstate_t *));
! 106: #if 0 /* XXX: not implemented */
! 107: /*
! 108: wint_t putwc __P((wchar_t, FILE *));
! 109: wint_t putwchar __P((wchar_t));
! 110: int swprintf __P((wchar_t *, size_t, const wchar_t *, ...));
! 111: int swscanf __P((const wchar_t *, const wchar_t *, ...));
! 112: */
! 113: #endif /* XXX: not implemented */
! 114: #if 0 /* defined in wctype.h commonly */
! 115: /*
! 116: wint_t towlower __P((wint_t));
! 117: wint_t towupper __P((wint_t));
! 118: */
1.1 kleink 119: #endif
1.1.2.1 ! minoura 120: #if 0 /* XXX: not implemented */
! 121: /*
! 122: wint_t ungetwc __P((wint_t, FILE *));
! 123: int vfwprintf __P((FILE *, const wchar_t *, va_list));
! 124: int vwprintf __P((const wchar_t *, va_list));
! 125: int vswprintf __P((wchar_t *, size_t, const wchar_t *,
! 126: va_list));
! 127: */
! 128: #endif /* XXX: not implemented */
! 129: size_t wcrtomb __P((char *, wchar_t, mbstate_t *));
! 130: wchar_t *wcscat __P((wchar_t *, const wchar_t *));
! 131: wchar_t *wcschr __P((const wchar_t *, wchar_t));
! 132: int wcscmp __P((const wchar_t *, const wchar_t *));
! 133: #if 0 /* XXX: not implemented */
! 134: /*
! 135: int wcscoll __P((const wchar_t *, const wchar_t *));
! 136: */
! 137: #endif /* XXX: not implemented */
! 138: wchar_t *wcscpy __P((wchar_t *, const wchar_t *));
! 139: size_t wcscspn __P((const wchar_t *, const wchar_t *));
! 140: #if 0 /* XXX: not implemented */
! 141: /*
! 142: size_t wcsftime __P((wchar_t *, size_t, const wchar_t *,
! 143: const struct tm *));
! 144: */
! 145: #endif /* XXX: not implemented */
! 146: size_t wcslen __P((const wchar_t *));
! 147: wchar_t *wcsncat __P((wchar_t *, const wchar_t *, size_t));
! 148: int wcsncmp __P((const wchar_t *, const wchar_t *,
! 149: size_t));
! 150: wchar_t *wcsncpy __P((wchar_t *, const wchar_t *, size_t));
! 151: wchar_t *wcspbrk __P((const wchar_t *, const wchar_t *));
! 152: wchar_t *wcsrchr __P((const wchar_t *, wchar_t));
! 153: size_t wcsrtombs __P((char *, const wchar_t **, size_t,
! 154: mbstate_t *));
! 155: size_t wcsspn __P((const wchar_t *, const wchar_t *));
! 156: wchar_t *wcsstr __P((const wchar_t *, const wchar_t *));
! 157: #if 0 /* XXX: not implemented */
! 158: /*
! 159: double wcstod __P((const wchar_t *, wchar_t **));
! 160: wchar_t *wcstok __P((wchar_t *, const wchar_t *, wchar_t **));
! 161: long int wcstol __P((const wchar_t *, wchar_t **, int));
! 162: unsigned long int wcstoul __P((const wchar_t *, wchar_t **, int));
! 163: wchar_t *wcswcs __P((const wchar_t *, const wchar_t *));
! 164: */
! 165: #endif /* XXX: not implemented */
! 166: int wcswidth __P((const wchar_t *, size_t));
! 167: #if 0 /* XXX: not implemented */
! 168: /*
! 169: size_t wcsxfrm __P((wchar_t *, const wchar_t *, size_t));
! 170: int wctob __P((wint_t));
! 171: wctype_t wctype __P((const char *));
! 172: */
! 173: #endif /* XXX: not implemented */
! 174: int wcwidth __P((wchar_t));
! 175: wchar_t *wmemchr __P((const wchar_t *, wchar_t, size_t));
! 176: int wmemcmp __P((const wchar_t *, const wchar_t *,
! 177: size_t));
! 178: wchar_t *wmemcpy __P((wchar_t *, const wchar_t *, size_t));
! 179: wchar_t *wmemmove __P((wchar_t *, const wchar_t *, size_t));
! 180: wchar_t *wmemset __P((wchar_t *, wchar_t, size_t));
! 181: #if 0 /* XXX: not implemented */
! 182: /*
! 183: int wprintf __P((const wchar_t *, ...));
! 184: int wscanf __P((const wchar_t *, ...));
! 185: */
! 186: #endif /* XXX: not implemented */
! 187: __END_DECLS
1.1 kleink 188:
1.1.2.1 ! minoura 189: #if defined(__FreeBSD__)
! 190: #define wcwidth(c) ((unsigned)__maskrune_w((c), _SWM)>>_SWS)
! 191: #endif
! 192:
! 193: #endif
CVSweb <webmaster@jp.NetBSD.org>