e1e595a649
* Makefile.in (install-headers): Remove extra command to install regex.h. (uninstall-headers): Remove extra command to uninstall regex.h. * nlsfuncs.cc (collate_lcid): Make externally available to allow access to collation internals from regex functions. (collate_charset): Ditto. * wchar.h: Add __cplusplus guards to make C-clean. * include/regex.h: New file, replacing regex/regex.h. Remove UCB advertising clause. * regex/COPYRIGHT: Accommodate BSD license. Remove UCB advertising clause. * regex/cclass.h: Remove. * regex/cname.h: New file from FreeBSD. * regex/engine.c: Ditto. (NONCHAR): Tweak for Cygwin. * regex/engine.ih: Remove. * regex/mkh: Remove. * regex/regcomp.c: New file from FreeBSD. Tweak slightly for Cygwin. Import required collate internals from nlsfunc.cc. (p_ere_exp): Add GNU-specific \< and \> handling for word boundaries. (p_simp_re): Ditto. (__collate_range_cmp): Define. (p_b_term): Use Cygwin-specific collate internals. (findmust): Ditto. * regex/regcomp.ih: Remove. * regex/regerror.c: New file from FreeBSD. Fix a few compiler warnings. * regex/regerror.ih: Remove. * regex/regex.7: New file from FreeBSD. Remove UCB advertising clause. * regex/regex.h: Remove. Replaced by include/regex.h. * regex/regexec.c: New file from FreeBSD. Fix a few compiler warnings. * regex/regfree.c: New file from FreeBSD. * regex/tests: Remove. * regex/utils.h: New file from FreeBSD.
76 lines
2.1 KiB
C
76 lines
2.1 KiB
C
/* wchar.h: Extra wchar defs
|
|
|
|
Copyright 2007, 2009, 2010 Red Hat, Inc.
|
|
|
|
This file is part of Cygwin.
|
|
|
|
This software is a copyrighted work licensed under the terms of the
|
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
|
details. */
|
|
|
|
#ifndef _CYGWIN_WCHAR_H
|
|
#define _CYGWIN_WCHAR_H
|
|
|
|
#include_next <wchar.h>
|
|
|
|
#define ENCODING_LEN 31
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef int mbtowc_f (struct _reent *, wchar_t *, const char *, size_t,
|
|
const char *, mbstate_t *);
|
|
typedef mbtowc_f *mbtowc_p;
|
|
|
|
extern mbtowc_p __mbtowc;
|
|
extern mbtowc_f __ascii_mbtowc;
|
|
extern mbtowc_f __utf8_mbtowc;
|
|
extern mbtowc_f __iso_mbtowc;
|
|
extern mbtowc_f __cp_mbtowc;
|
|
extern mbtowc_f __sjis_mbtowc;
|
|
extern mbtowc_f __eucjp_mbtowc;
|
|
extern mbtowc_f __gbk_mbtowc;
|
|
extern mbtowc_f __kr_mbtowc;
|
|
extern mbtowc_f __big5_mbtowc;
|
|
|
|
typedef int wctomb_f (struct _reent *, char *, wchar_t, const char *,
|
|
mbstate_t *);
|
|
typedef wctomb_f *wctomb_p;
|
|
|
|
extern wctomb_p __wctomb;
|
|
extern wctomb_f __ascii_wctomb;
|
|
extern wctomb_f __utf8_wctomb;
|
|
|
|
extern char *__locale_charset ();
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#ifdef __INSIDE_CYGWIN__
|
|
#ifdef __cplusplus
|
|
size_t __stdcall sys_cp_wcstombs (wctomb_p, const char *, char *, size_t,
|
|
const wchar_t *, size_t = (size_t) -1)
|
|
__attribute__ ((regparm(3)));
|
|
size_t __stdcall sys_wcstombs (char *dst, size_t len, const wchar_t * src,
|
|
size_t nwc = (size_t) -1)
|
|
__attribute__ ((regparm(3)));
|
|
size_t __stdcall sys_wcstombs_alloc (char **, int, const wchar_t *,
|
|
size_t = (size_t) -1)
|
|
__attribute__ ((regparm(3)));
|
|
|
|
size_t __stdcall sys_cp_mbstowcs (mbtowc_p, const char *, wchar_t *, size_t,
|
|
const char *, size_t = (size_t) -1)
|
|
__attribute__ ((regparm(3)));
|
|
size_t __stdcall sys_mbstowcs (wchar_t * dst, size_t dlen, const char *src,
|
|
size_t nms = (size_t) -1)
|
|
__attribute__ ((regparm(3)));
|
|
size_t __stdcall sys_mbstowcs_alloc (wchar_t **, int, const char *,
|
|
size_t = (size_t) -1)
|
|
__attribute__ ((regparm(3)));
|
|
#endif /* __cplusplus */
|
|
#endif /* __INSIDE_CYGWIN__ */
|
|
|
|
#endif /* _CYGWIN_WCHAR_H */
|