home *** CD-ROM | disk | FTP | other *** search
- /** WCHAR.H National Language Support OS2 Include File
- *.
- *. (C) COPYRIGHT International Business Machines Corp. 1985, 1990
- *. All Rights Reserved
- *. Licensed Materials - Property of IBM
- *.
- *. US Government Users Restricted Rights - Use, duplication or
- *. disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- *.
- ** Description:
- *
- * The WCHAR.H file is part of the National Language Support
- * system for OS/2 and AIX operating systems. Programmers
- * interested in writing NLS enabled applications would include
- * this file in their source files.
- *
- ** Notes:
- *
- *) For OS/2 development the NLS libraries must precede any C Set/2
- * libraries, in order to supercede C Set/2 obsolete NLS routines.
- *
- *) For AIX development, this file is not needed since NLS is imbedded
- * in all AIX system include files.
- *
- *) Future versions of C Set/2 will support this version of NLS and at
- * that time this include file, and its associated libraries may be removed
- * from the build process (the make file).
- *
- **/
- /** Constants NLS DataTypes and Constants
- *
- ** Notes:
- *
- *) The wchar_t datatype is 16-bits in this implementation, however the
- * the X/OPEN XPG4 standard allows other sizes.
- **/
-
- /* Compiler specific defines/macros */
- #if (_MSC_VER >= 600)
- #define _MSC
- #define SYSTEM _far _cdecl
- #define OPTLINK _far _pascal
- #endif
-
- #if (defined __IBMC__) || (defined __IBMCPP__)
- #ifdef __32BIT__
- #define _IBMC32
- #define SYSTEM _System
- #define OPTLINK _Optlink
- #endif
- #endif
-
- #ifndef __stdarg_h
- #include <stdarg.h>
- #endif /* __stdarg_h */
-
- #ifndef __stdio_h
- #include <stdio.h>
- #endif /* __stdio_h */
-
- #ifndef __time_h
- #include <time.h>
- #endif /* __time_h */
-
- #ifndef NULL
- #if (defined(__EXTENDED__) || defined(__cplusplus))
- #define NULL 0
- #else
- #define NULL ((void *)0)
- #endif
- #endif
-
- #ifndef _SIZE_T /* preempt standard definition */
- #define _SIZE_T
- #endif
-
-
- #ifndef __size_t /* NLS definition */
- #define __size_t
- #ifndef _MSC
- typedef unsigned long size_t;
- #endif
- #endif
-
- #ifndef _WCHAR_T /* preempt standard definition */
- #define _WCHAR_T
- #endif
-
- #ifndef __wchar_t /* NLS definition */
- #define __wchar_t
- typedef unsigned short wchar_t;
- #endif
-
- #ifndef _WCTYPE_T
- #define _WCTYPE_T
- #ifdef _MSC
- typedef unsigned long wctype_t;
- #else
- typedef unsigned int wctype_t;
- #endif
- #endif
-
-
- #ifndef _WINT_T
- #define _WINT_T
- #ifdef _MSC
- typedef long wint_t;
- #else
- typedef int wint_t;
- #endif
- #endif
-
-
- #ifndef fcvt /* floating point conversion */
- #define fcvt _fcvt
- #endif
-
- #ifndef TRUE
- #define TRUE 1
- #endif
-
- #ifndef FALSE
- #define FALSE 0
- #endif
-
- #define True TRUE
- #define False FALSE
- #define FROM 0
- #define TO 1
-
-
- #ifdef _MSC
- typedef long nl_item;
- #else
- typedef int nl_item;
- #endif
-
-
- typedef unsigned char uchar_t;
- typedef unsigned short ushort_t;
- typedef unsigned int uint_t;
- typedef unsigned long ulong_t;
-
- #ifdef _MSC
- typedef signed long ssize_t;
- #else
- typedef signed int ssize_t;
- #endif
-
-
- #define _ISALPHA 0x001
- #define _ISALNUM 0x002
- #define _ISBLANK 0x004
- #define _ISCNTRL 0x008
- #define _ISDIGIT 0x010
- #define _ISGRAPH 0x020
- #define _ISLOWER 0x040
- #define _ISPRINT 0x080
- #define _ISPUNCT 0x100
- #define _ISSPACE 0x200
- #define _ISUPPER 0x400
- #define _ISXDIGIT 0x800
-
-
- /** Error codes
- *
- ** Notes:
- *
- * The ANSI, POSIX, and XOPEN standards require that certain values be
- * in errno.h. The standards allow additional macro definitions,
- * beginning with an E and an uppercase letter.
- *
- **/
-
-
- #ifndef _MSC
- extern int errno;
- #endif
-
- #ifndef __errno_h
- #define EBADF 9 /* Bad file descriptor */
- #define EINVAL 22 /* Invalid argument */
- #define ERANGE 34 /* Result too large */
- #endif
-
- #ifndef ENOMEM
- #define ENOMEM 12 /* Not enough space */
- #endif
-
- #define E2BIG 7 /* Arg list too long */
-
- #define ENAMETOOLONG 86 /* File name too long */
- #define EILSEQ 116 /* Invalid wide character */
- #define ECLONEME ERESTART /* this is the way we clone a stream ... */
-
- #define _IOUNGETWC 0x0008 /* UNGETWC flag mask */
-
- #define MB_MAX_LEN 4
-
- #ifdef MB_LEN_MAX
- #undef MB_LEN_MAX
- #endif
- #define MB_LEN_MAX 4
-
- #ifndef MB_CUR_MAX
- #define MB_CUR_MAX 4
- #endif
-
- /** Prototypes Available NLS Functions
- *
- ** Notes:
- *
- *) These functions are based on the X/OPEN XPG4 specification
- *
- **/
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #ifdef _MSC
- #define setlocale(a,b) setlocale16(a,b)
- char _FAR_ * _far _cdecl setlocale16(short, const char _FAR_ *);
-
- #define strftime(a,b,c,d) strftime16(a,b,c,d)
- size_t _far _cdecl strftime16(char _FAR_ * s,
- size_t maxsize,
- const char _FAR_ * format,
- const struct tm _FAR_ * timeptr);
-
- #define strfmon strfmon16
- ssize_t _far _cdecl strfmon16(char _FAR_ *s,
- size_t maxsize,
- const char _FAR_ *format, va_list _FAR_ va);
-
- #define strptime(buf,fmt,tm) strptime16(buf,fmt,tm)
- char _FAR_ * _far _cdecl strptime16(const char _FAR_ *buf,
- const char _FAR_ *fmt,
- struct tm _FAR_ *tm);
-
- #define wcsftime(ws,maxsize,format,timeptr) wcsftime16(ws,maxsize,format,timeptr);
- size_t _far _cdecl wcsftime16(wchar_t *ws,
- size_t maxsize,
- const char _FAR_ * format,
- const struct tm _FAR_ * timeptr);
-
- #define wcscspn(ws1,ws2) wcscspn16(ws1,ws2 )
- size_t _far _cdecl wcscspn16 (const wchar_t _FAR_ *ws1,
- const wchar_t _FAR_ *ws2);
-
- #define wcslen(ws) wcslen16(ws)
- size_t _far _cdecl wcslen16 (const wchar_t _FAR_ *ws);
-
- #define wcscat(ws1,ws2) wcscat16(ws1,ws2)
- wchar_t _FAR_ * _far _cdecl wcscat16 (wchar_t _FAR_ *ws1,
- const wchar_t _FAR_ *ws2);
-
- #define wcscpy(ws1,ws2) wcscpy16(ws1,ws2)
- wchar_t _FAR_ * _far _cdecl wcscpy16 (wchar_t _FAR_ *ws1,
- const wchar_t _FAR_ *ws2);
-
- #define wcscmp(ws1,ws2) wcscmp16(ws1,ws2)
- short _far _cdecl wcscmp16 (const wchar_t _FAR_ *ws1,
- const wchar_t _FAR_ *ws2);
-
- #define wcsncmp(ws1,ws2,n) wcsncmp16(ws1,ws2,n)
- short _far _cdecl wcsncmp16 (const wchar_t _FAR_ * ws1,
- const wchar_t _FAR_ * ws2,
- size_t n);
-
- #define wcspbrk(ws1,ws2) wcspbrk16(ws1,ws2)
- wchar_t _FAR_ * _far _cdecl wcspbrk (const wchar_t _FAR_ *ws1,
- const wchar_t _FAR_ *ws2);
-
- #define wcsncpy(ws1,ws2,n) wcsncpy16(ws1,ws2,n)
- wchar_t _FAR_ *_far _cdecl wcsncpy16 (wchar_t _FAR_ *ws1,
- const wchar_t _FAR_ *ws2,
- size_t n);
-
- #define wcsspn(ws1,ws2) wcsspn16(ws1,ws2)
- size_t _far _cdecl wcsspn16 (const wchar_t _FAR_ *ws1,
- const wchar_t _FAR_ *ws2);
-
- #define wcschr(ws1,wc) wcschr16(ws1,wc)
- wchar_t _FAR_ * _far _cdecl wcschr16 (wchar_t _FAR_ *ws1,
- wint_t wc);
-
- #define wcsncat(ws1,ws2,n) wcsncat16(ws1,ws2,n)
- wchar_t _FAR_ * _far _cdecl wcsncat16 (wchar_t _FAR_ *ws1,
- const wchar_t _FAR_ *ws2,
- size_t n);
-
- #define wcsrchr(ws1,wc) wcsrchr16(ws1,wc)
- wchar_t _FAR_ * _far _cdecl wcsrchr16 (wchar_t _FAR_ *ws1,
- wint_t wc);
-
- #define wcstok(ws1,ws2) wcstok16(ws1,ws2)
- wchar_t _FAR_ * _far _cdecl wcstok16 (wchar_t _FAR_ *ws1,
- const wchar_t _FAR_ *ws2);
-
- #define wcswcs(ws1,ws2) wcswcs16(ws1,ws2)
- wchar_t _FAR_ * _far _cdecl wcswcs16 (const wchar_t _FAR_ *ws1,
- const wchar_t _FAR_ *ws2);
-
- #define wcstol(nptr,endptr,base) wcstol16(nptr,endptr,base)
- long int _far _cdecl wcstol (const wchar_t _FAR_ *nptr,
- wchar_t _FAR_ * _FAR_ *endptr,
- short base);
-
- #define wcstoul(nptr,endptr,base) wcstoul16(nptr,endptr,base)
- unsigned long _far _cdecl wcstoul16 (const wchar_t _FAR_ *nptr,
- wchar_t _FAR_ * _FAR_ *endptr,
- short base);
-
- #endif
-
-
- #ifdef _IBMC32
- char * setlocale(int, const char *);
- char * _Seg16 _Far16 _Cdecl setlocale16(short, const char * _Seg16);
-
- size_t strftime(char *s, size_t maxsize, const char *format,
- const struct tm *timeptr);
- short _Far16 _Cdecl strftime16(char * _Seg16 s, short maxsize,
- const char * _Seg16 format, const struct tm * _Seg16 timeptr);
-
- ssize_t strfmon(char *s, size_t maxsize, const char *format, ...);
-
- ssize_t _Far16 _Cdecl strfmon16(char * _Seg16 s,
- short maxsize,
- const char * _Seg16 format, va_list _Seg16 va);
-
- char * strptime(const char *buf, const char *fmt, struct tm *tm);
- char * _Seg16 _Far16 _Cdecl strptime16(const char * _Seg16 buf,
- const char * _Seg16 fmt,
- struct tm * _Seg16 tm);
-
- size_t wcsftime(wchar_t *ws, size_t maxsize,
- const char *format, const struct tm *timeptr);
- short _Far16 _Cdecl wcsftime16(wchar_t * _Seg16 ws,
- short maxsize,
- const char * _Seg16 format,
- const struct tm * _Seg16 timeptr);
-
- size_t wcscspn (const wchar_t *ws1, const wchar_t *ws2);
- short _Far16 _Cdecl wcscspn16 (const wchar_t * _Seg16 ws1,
- const wchar_t * _Seg16 ws2);
-
- size_t wcslen (const wchar_t *ws);
- short _Far16 _Cdecl wcslen16 (const wchar_t * _Seg16 ws);
-
- wchar_t *wcscat (wchar_t *ws1, const wchar_t *ws2);
- wchar_t * _Seg16 _Far16 _Cdecl wcscat16 (wchar_t * _Seg16 ws1,
- const wchar_t * _Seg16 ws2);
-
- wchar_t *wcscpy (wchar_t *ws1, const wchar_t *ws2);
- wchar_t * _Seg16 _Far16 _Cdecl wcscpy16 (wchar_t * _Seg16 ws1,
- const wchar_t * _Seg16 ws2);
-
- int wcscmp (const wchar_t *ws1, const wchar_t *ws2);
- short _Far16 _Cdecl wcscmp16 (const wchar_t * _Seg16 ws1,
- const wchar_t * _Seg16 ws2);
-
- int wcsncmp (const wchar_t *ws1, const wchar_t *ws2, size_t n);
- short _Far16 _Cdecl wcsncmp16 (const wchar_t * _Seg16 ws1,
- const wchar_t * _Seg16 ws2,
- short n);
-
- wchar_t *wcspbrk (const wchar_t *ws1, const wchar_t *ws2);
- wchar_t * _Seg16 _Far16 _Cdecl wcspbrk16 (const wchar_t * _Seg16 ws1,
- const wchar_t * _Seg16 ws2);
-
- wchar_t *wcsncpy (wchar_t *ws1, const wchar_t *ws2, size_t n);
- wchar_t * _Seg16 _Far16 _Cdecl wcsncpy16 ( wchar_t * _Seg16 ws1,
- const wchar_t * _Seg16 ws2,
- short n);
-
- size_t wcsspn (const wchar_t *ws1, const wchar_t *ws2);
- short _Far16 _Cdecl wcsspn16 (const wchar_t * _Seg16 ws1,
- const wchar_t * _Seg16 ws2);
-
- wchar_t *wcschr (wchar_t *ws1, wint_t wc);
- wchar_t * _Seg16 _Far16 _Cdecl wcschr16 (wchar_t * _Seg16 ws1, wint_t wc);
-
- wchar_t *wcsncat (wchar_t *ws1, const wchar_t *ws2, size_t n);
- wchar_t * _Seg16 _Far16 _Cdecl wcsncat16 (wchar_t * _Seg16 ws1,
- const wchar_t * _Seg16 ws2,
- short n);
-
- wchar_t *wcsrchr (wchar_t *ws1, wint_t wc);
- wchar_t * _Seg16 _Far16 _Cdecl wcsrchr16 (wchar_t * _Seg16 ws1, wint_t wc);
-
- wchar_t *wcstok (wchar_t *ws1, const wchar_t *ws2);
- wchar_t * _Seg16 _Far16 _Cdecl wcstok16 (wchar_t * _Seg16 ws1,
- const wchar_t * _Seg16 ws2);
-
- wchar_t *wcswcs (const wchar_t *ws1, const wchar_t *ws2);
- wchar_t * _Seg16 _Far16 _Cdecl wcswcs16 (const wchar_t * _Seg16 ws1,
- const wchar_t * _Seg16 ws2);
-
- long wcstol (const wchar_t *nptr, wchar_t **endptr, int base);
- long _Far16 _Cdecl wcstol16 (const wchar_t * _Seg16 nptr,
- wchar_t * _Seg16 * _Seg16 endptr,
- short base);
-
- unsigned long wcstoul (const wchar_t *nptr, wchar_t **endptr, int base);
- unsigned long _Far16 _Cdecl wcstoul16 (const wchar_t * _Seg16 nptr,
- wchar_t * _Seg16 * _Seg16 endptr,
- short base);
-
- #endif
-
-
- #pragma checkout( suspend )
- #undef printf
- #undef sprintf
- #undef fprintf
-
- #define printf wprintf
- #define sprintf wsprintf
- #define fprintf wfprintf
-
- #undef scanf
- #undef sscanf
- #undef fscanf
-
- #define scanf wscanf
- #define sscanf wsscanf
- #define fscanf wfscanf
- #pragma checkout( resume )
-
- int _xprint(char print_type, void * ostream, char * oformat,va_list oargs);
-
- int _xscan(char scan_type, void * ostream, char * oformat, va_list oargs );
-
- #ifdef _MSC
-
- #define wprintf wprintf16
- short _far _cdecl wprintf16 (char * _FAR_ oformat,...);
-
- #define wsprintf wsprintf16
- short _far _cdecl wsprintf16 (char * _FAR_ ostring, char * _FAR_ oformat, ...);
-
- #define wfprintf wfprintf16
- short _far _cdecl wfprintf16 (FILE * _FAR_ ostream, char * _FAR_ oformat, ...);
-
- #define wscanf wscanf16
- short _far _cdecl wscanf16 (char * _FAR_ oformat,...);
-
- #define wsscanf wsscanf16
- short _far _cdecl wsscanf16 (char * _FAR_ ostring, char * _FAR_ oformat, ...);
-
- #define wfscanf wfscanf16
- short _far _cdecl wfscanf16 (FILE * _FAR_ ostream, char * _FAR_ oformat, ...);
-
- #define fgetwc(stream) fgetwc16(stream)
- wint_t _far _cdecl fgetwc16(FILE * _FAR_ stream);
-
- #define fgetws(s,n,stream) fgetws16(s,n,stream)
- wchar_t _FAR_ * _far _cdecl fgetws16(wchar_t * _FAR_ s, int n, FILE * _FAR_ stream);
-
- #define fputwc(c,stream) fputwc16(c,stream)
- wint_t _far _cdecl fputwc16(const wint_t c, FILE * _FAR_ stream);
-
- #define fputws(s,stream) fputws16(s,stream)
- int _far _cdecl fputws(const wchar_t * _FAR_ s,FILE * _FAR_ stream);
-
- #define getw(stream) getw16(stream)
- int _far _cdecl getw16(register FILE * _FAR_ stream);
-
- #define getwc(stream) getwc16(stream)
- wint_t _far _cdecl getwc16 (stream);
-
- #define getwchar getwchar16
- wint_t _far _cdecl getwchar16(void);
-
- #define getws(s) getws16(s)
- wchar_t _FAR_ * _far _cdecl getws16(wchar_t * _FAR_ s);
-
- #define putw(w,stream) putw16(w,stream)
- int _far _cdecl putw16(int w, register FILE * _FAR_ stream);
-
- #define putwc(c,stream) putwc16(c,stream)
- wint_t _far _cdecl putwc16(wint_t c, FILE * _FAR_ stream);
-
- #define putwchar(c) putwchar16(c)
- wint_t _far _cdecl putwchar16(wint_t c);
-
- #define putws(s) putws16(s)
- short _far _cdecl putws16(const wchar_t * _FAR_ s);
-
- #define ungetwc(c,stream) ungetwc16(c,stream)
- wint_t _far _cdecl ungetwc16(wint_t c, FILE * _FAR_ stream);
-
-
- #define localeconv(void) localeconv16(void)
- struct lconv _FAR_ * _far _cdecl localeconv16(void);
-
- #define nl_langinfo(item) nl_langinfo16(item)
- char _FAR_ * _far _cdecl nl_langinfo16(nl_item item);
-
- #define mbstowcs(pwcs,s,n) mbstowcs16(pwcs,s,n)
- short _far _cdecl mbstowcs16(wchar_t * _FAR_ pwcs,
- const char * _FAR_ s, short n);
-
- #define mbtowc(pwc,s,len) mbtowc16(pwc,s,len)
- short _far _cdecl mbtowc16(wchar_t * _FAR_ pwc,
- const char * _FAR_ s, short len);
-
- #define mblen(s,n) mblen16(s,n)
- short _far _cdecl mblen16(const char * _FAR_ s, short n);
-
- #define wcswidth(wcs,n) wcswidth16(wcs,n)
- short _far _cdecl wcswidth16(wchar_t * _FAR_ wcs, short n);
-
- #define wctomb(s,pwc) wctomb16(s,pwc)
- short _far _cdecl wctomb16(char * _FAR_ s, wchar_t pwc);
-
- #define wcwidth(wc) wcwidth16(wc)
- short _far _cdecl wcwidth16(wchar_t wc);
-
- #define wcstombs(s,pwcs,n) wcstombs16(s,pwcs,n)
- short _far _cdecl wcstombs16(char * _FAR_ s,
- const wchar_t * _FAR_ pwcs, short n);
-
- #define strcoll(s1,s2) strcoll16(s1,s2)
- short _far _cdecl strcoll16(const char * _FAR_ s1,
- const char * _FAR_ s2);
-
- #define towlower(wc) towlower16(wc)
- wint_t _far _cdecl towlower16(wint_t wc);
-
- #define wcscoll(wcs1,wcs2) wcscoll16(wcs1,wcs2)
- short _far _cdecl wcscoll16(const wchar_t * _FAR_ wcs1,
- const wchar_t * _FAR_ wcs2);
-
- #define wcsxfrm(ws1,ws2,n) wcsxfrm16(ws1,ws2,n)
- short _far _cdecl wcsxfrm16(wchar_t * _FAR_ ws1,
- const wchar_t * _FAR_ ws2, short n);
-
- #define isalnum(c) isalnum16(c)
- #define isalpha(c) isalpha16(c)
- #define iscntrl(c) iscntrl16(c)
- #define isdigit(c) isdigit16(c)
- #define isgraph(c) isgraph16(c)
- #define islower(c) islower16(c)
- #define isprint(c) isprint16(c)
- #define ispunct(c) ispunct16(c)
- #define isspace(c) isspace16(c)
- #define isupper(c) isupper16(c)
- #define iswalnum(pc) iswalnum16(pc)
- #define iswalpha(pc) iswalpha16(pc)
- #define iswcntrl(pc) iswcntrl16(pc)
- #define iswdigit(pc) iswdigit16(pc)
- #define iswgraph(pc) iswgraph16(pc)
- #define iswlower(pc) iswlower16(pc)
- #define iswprint(pc) iswprint16(pc)
- #define iswpunct(pc) iswpunct16(pc)
- #define iswspace(pc) iswspace16(pc)
- #define iswupper(pc) iswupper16(pc)
- #define iswxdigit(pc) iswxdigit16(pc)
- #define isxdigit(c) isxdigit16(c)
- #define iswctype(wc,mask) is_wctype16(wc,mask)
-
- short _far _cdecl isalnum16(short c);
- short _far _cdecl isalpha16(short c);
- short _far _cdecl iscntrl16(short c);
- short _far _cdecl isdigit16(short c);
- short _far _cdecl isgraph16(short c);
- short _far _cdecl islower16(short c);
- short _far _cdecl isprint16(short c);
- short _far _cdecl ispunct16(short c);
- short _far _cdecl isspace16(short c);
- short _far _cdecl isupper16(short c);
- short _far _cdecl iswalnum16(wint_t pc);
- short _far _cdecl iswalpha16(wint_t pc);
- short _far _cdecl iswcntrl16(wint_t pc);
- short _far _cdecl iswdigit16(wint_t pc);
- short _far _cdecl iswgraph16(wint_t pc);
- short _far _cdecl iswlower16(wint_t pc);
- short _far _cdecl iswprint16(wint_t pc);
- short _far _cdecl iswpunct16(wint_t pc);
- short _far _cdecl iswspace16(wint_t pc);
- short _far _cdecl iswupper16(wint_t pc);
- short _far _cdecl iswxdigit16(wint_t pc);
- short _far _cdecl isxdigit16(short c);
- short _far _cdecl is_wctype16(wint_t wc, wctype_t mask);
-
- #define wctype(name) get_wctype16(name)
- #define wcsid(wc) wcsid16(wc)
- #define tolower(c) tolower16(c)
- #define toupper(c) toupper16(c)
- #define towlower(wc) towlower16(wc)
- #define towupper(wc) towupper16(wc)
- #define csid(mbs) csid16(mbs)
-
- wctype_t _far _cdecl get_wctype16(char * _FAR_ name);
- short _far _cdecl wcsid16(wchar_t wc);
- short _far _cdecl tolower16(short c);
- short _far _cdecl toupper16(short c);
- wint_t _far _cdecl towlower16(wint_t wc);
- wint_t _far _cdecl towupper16(wint_t wc);
- short _far _cdecl csid16(char * _FAR_ mbs);
-
-
- #endif /* MSC */
-
-
- #ifdef _IBMC32
-
- int wprintf (char * oformat, ...);
-
- short _Far16 _Cdecl wprintf16 (char * _Seg16 oformat, ...);
-
- int wsprintf (char * ostring, char * oformat, ...);
- short _Far16 _Cdecl wsprintf16 (char * _Seg16 ostring, char * _Seg16 oformat, ...);
-
- int wfprintf (FILE * ostream, char * oformat, ...);
-
- int wscanf (char * oformat, ...);
-
- short _Far16 _Cdecl wscanf16 (char * _Seg16 oformat, ...);
-
- int wsscanf (char * ostring, char * oformat, ...);
- short _Far16 _Cdecl wsscanf16 (char * _Seg16 ostring, char * _Seg16 oformat, ...);
-
- int wfscanf (FILE * ostream, char * oformat, ...);
-
- wint_t fgetwc(FILE *stream);
-
- wchar_t * fgetws(wchar_t *s, int n, FILE *stream);
-
- wint_t fputwc(const wint_t c, FILE *stream);
-
- int fputws(const wchar_t *s,FILE *stream);
-
- int getw(register FILE *stream);
-
- wint_t getwc (FILE *stream);
-
- wint_t getwchar (void);
- wint_t _Far16 _Cdecl getwchar16(void);
-
- wchar_t * getws(wchar_t *s);
- wchar_t * _Far16 _Cdecl getws16(wchar_t * _Seg16 s);
-
- int putw(int w, register FILE *stream);
-
- wint_t putwc(wint_t c, FILE *stream);
-
- wint_t putwchar(wint_t c);
- short _Far16 _Cdecl putwchar16(short c);
-
- int putws(const wchar_t *s);
- short _Far16 _Cdecl putws16(const wchar_t * _Seg16 s);
-
- wint_t ungetwc(wint_t c, FILE *stream);
-
-
- struct lconv * localeconv(void);
- struct lconv * _Seg16 _Far16 _Cdecl localeconv16(void);
-
- char * nl_langinfo(nl_item item);
- char * _Seg16 _Far16 _Cdecl nl_langinfo16(nl_item item);
-
- size_t mbstowcs(wchar_t *pwcs, const char *s, size_t n);
- short _Far16 _Cdecl mbstowcs16(wchar_t * _Seg16 pwcs,
- const char * _Seg16 s, short n);
-
- int mbtowc(wchar_t *pwc, const char *s, size_t len);
- short _Far16 _Cdecl mbtowc16(wchar_t * _Seg16 pwc,
- const char * _Seg16 s, short len);
-
- int mblen(const char *s, size_t n);
- short _Far16 _Cdecl mblen16(const char * _Seg16 s, short n);
-
- int wcswidth(wchar_t *wcs, size_t n);
- short _Far16 _Cdecl wcswidth16(wchar_t * _Seg16 wcs, short n);
-
- int wctomb(char *s, wchar_t pwc);
- short _Far16 _Cdecl wctomb16(char * _Seg16 s, wchar_t pwc);
-
- int wcwidth(wchar_t wc);
- short _Far16 _Cdecl wcwidth16(wchar_t wc);
-
- size_t wcstombs(char *s, const wchar_t *pwcs, size_t n);
- short _Far16 _Cdecl wcstombs16(char * _Seg16 s,
- const wchar_t * _Seg16 pwcs, short n);
-
- int strcoll(const char *s1, const char *s2);
- short _Far16 _Cdecl strcoll16(const char * _Seg16 s1,
- const char * _Seg16 s2);
-
- wint_t towlower(wint_t wc);
- wint_t _Far16 _Cdecl towlower16(wint_t wc);
-
- int wcscoll(const wchar_t *wcs1, const wchar_t *wcs2);
- short _Far16 _Cdecl wcscoll16(const wchar_t * _Seg16 wcs1,
- const wchar_t * _Seg16 wcs2);
-
- size_t wcsxfrm(wchar_t *ws1, const wchar_t *ws2, size_t n);
- short _Far16 _Cdecl wcsxfrm16(wchar_t * _Seg16 ws1,
- const wchar_t * _Seg16 ws2, short n);
-
- int isalnum(int c);
- int isalpha(int c);
- int iscntrl(int c);
- int isdigit(int c);
- int isgraph(int c);
- int islower(int c);
- int isprint(int c);
- int ispunct(int c);
- int isspace(int c);
- int isupper(int c);
- int iswalnum(wint_t pc);
- int iswalpha(wint_t pc);
- int iswcntrl(wint_t pc);
- int iswdigit(wint_t pc);
- int iswgraph(wint_t pc);
- int iswlower(wint_t pc);
- int iswprint(wint_t pc);
- int iswpunct(wint_t pc);
- int iswspace(wint_t pc);
- int iswupper(wint_t pc);
- int iswxdigit(wint_t pc);
- int isxdigit(int c);
- int iswctype(wint_t wc, wctype_t mask);
-
- short _Far16 _Cdecl isalnum16(short c);
- short _Far16 _Cdecl isalpha16(short c);
- short _Far16 _Cdecl iscntrl16(short c);
- short _Far16 _Cdecl isdigit16(short c);
- short _Far16 _Cdecl isgraph16(short c);
- short _Far16 _Cdecl islower16(short c);
- short _Far16 _Cdecl isprint16(short c);
- short _Far16 _Cdecl ispunct16(short c);
- short _Far16 _Cdecl isspace16(short c);
- short _Far16 _Cdecl isupper16(short c);
- short _Far16 _Cdecl iswalnum16(wint_t pc);
- short _Far16 _Cdecl iswalpha16(wint_t pc);
- short _Far16 _Cdecl iswcntrl16(wint_t pc);
- short _Far16 _Cdecl iswdigit16(wint_t pc);
- short _Far16 _Cdecl iswgraph16(wint_t pc);
- short _Far16 _Cdecl iswlower16(wint_t pc);
- short _Far16 _Cdecl iswprint16(wint_t pc);
- short _Far16 _Cdecl iswpunct16(wint_t pc);
- short _Far16 _Cdecl iswspace16(wint_t pc);
- short _Far16 _Cdecl iswupper16(wint_t pc);
- short _Far16 _Cdecl iswxdigit16(wint_t pc);
- short _Far16 _Cdecl isxdigit16(short c);
- short _Far16 _Cdecl is_wctype16(wint_t wc, wctype_t mask);
-
- wctype_t wctype(char *name);
- int wcsid(wchar_t wc);
- int tolower(int c);
- int toupper(int c);
- wint_t towlower(wint_t wc);
- wint_t towupper(wint_t wc);
- int csid(char *mbs);
-
- wctype_t _Far16 _Cdecl get_wctype16(char * _Seg16 name);
- short _Far16 _Cdecl wcsid16(wchar_t wc);
- short _Far16 _Cdecl tolower16(short c);
- short _Far16 _Cdecl toupper16(short c);
- wint_t _Far16 _Cdecl towlower16(wint_t wc);
- wint_t _Far16 _Cdecl towupper16(wint_t wc);
- short _Far16 _Cdecl csid16(char * _Seg16 mbs);
-
- #endif /* IBMC32 */
-
-
- /******************************************************
- ** replacement prototype for the AIX load subroutine **
- ******************************************************/
-
- int *load(char *FilePath, int Flags, char *LibraryPath);
-
-
-
- /*******************************************************
- * the following was added to support the cat functions *
- ********************************************************/
-
- typedef struct _catalog_descriptor *nl_catd;
-
- nl_catd catopen(const char *catname, int oflag);
- char *catgets(nl_catd catd, int setno, int msgno, const char *def);
- nl_catd _do_open(nl_catd);
- static FILE *opencatfile(char*);
- static void add_open_cat(nl_catd);
- static void cat_hard_close(nl_catd); /*---- phyically closes the cat ----*/
- static nl_catd cat_already_open(char*); /*---- used to see if the cat has
- already been opened ----*/
- nl_catd NLcatopen(char *cat, int dummy);
-
-
-
- #define ERR (-1)
- #define TRUE 1
- #define FALSE 0
-
- #define QTSTR "$quote"
- #define SETSTR "$set"
-
- /* #define PATH_FORMAT "/usr/lpp/msg/%L/%N:/usr/lpp/msg/prime/%N" */
- #define PATH_C "/usr/lpp/msg/C/%N"
- #define DEFAULT_LANG "C"
-
- #define MSGMIN 0
- #define MSGMAX 65535
- #define SETMIN 1
- #define SETMAX 65535
-
- extern int errno;
- #define RETURN(s) return((errno = errno_save), s)
-
- #define skip_to_white(s) while (*s && *s > ' ') s++
- #define skip_to_nwhite(s) while (*s && (*s == ' ' || *s == '\t')) s++
- #define die(s) puts(s), exit(1)
-
- char *NLgetamsg(char *cat, int setno, int msgno, char* def);
-
- /********************************************************/
-
- #ifdef __cplusplus
- }
- #endif
-
-
- #ifdef _OS2_CORE
- #include <LC_CORE.H>
- #include <LOCALE.H>
- #include <LANGINFO.H>
- /* #include <CATIO.H> */
- #endif
-