1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 20:06:18 +00:00

libwine: Move libwine private definitions out of the global wine/unicode.h

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2020-11-29 21:30:08 +01:00
parent 1fdbf850ee
commit 00d067769e
74 changed files with 157 additions and 108 deletions

View File

@ -43,42 +43,6 @@ extern "C" {
#define WINE_UNICODE_INLINE static FORCEINLINE
#endif
/* code page info common to SBCS and DBCS */
struct cp_info
{
unsigned int codepage; /* codepage id */
unsigned int char_size; /* char size (1 or 2 bytes) */
WCHAR def_char; /* default char value (can be double-byte) */
WCHAR def_unicode_char; /* default Unicode char value */
const char *name; /* code page name */
};
struct sbcs_table
{
struct cp_info info;
const WCHAR *cp2uni; /* code page -> Unicode map */
const WCHAR *cp2uni_glyphs; /* code page -> Unicode map with glyph chars */
const unsigned char *uni2cp_low; /* Unicode -> code page map */
const unsigned short *uni2cp_high;
};
struct dbcs_table
{
struct cp_info info;
const WCHAR *cp2uni; /* code page -> Unicode map */
const unsigned char *cp2uni_leadbytes;
const unsigned short *uni2cp_low; /* Unicode -> code page map */
const unsigned short *uni2cp_high;
unsigned char lead_bytes[12]; /* lead bytes ranges */
};
union cptable
{
struct cp_info info;
struct sbcs_table sbcs;
struct dbcs_table dbcs;
};
WINE_UNICODE_INLINE WCHAR tolowerW( WCHAR ch )
{
extern const WCHAR wine_casemap_lower[];

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[15616] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[32000] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[23040] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[20992] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[29184] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[23808] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[512] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[512] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[512] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[512] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[512] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[512] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[512] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[512] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[512] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[512] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[512] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[512] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[512] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[512] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[512] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[512] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[256] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[15616] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[32512] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[32512] =
{

View File

@ -6,7 +6,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static const WCHAR cp2uni[32512] =
{

View File

@ -23,7 +23,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
/* return -1 on dst buffer overflow */
int wine_cpsymbol_mbstowcs_obsolete( const char *src, int srclen, WCHAR *dst, int dstlen)

View File

@ -24,7 +24,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
/* Everything below this line is generated automatically by make_unicode */
/* ### cpmap begin ### */

View File

@ -22,7 +22,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
static inline WCHAR to_unicode_digit( WCHAR ch )
{

View File

@ -24,7 +24,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
extern const unsigned short nfd_table[] DECLSPEC_HIDDEN;

View File

@ -22,7 +22,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
extern const unsigned int collation_table[];
extern const unsigned short nfd_table[] DECLSPEC_HIDDEN;

85
libs/wine/unicode.h Normal file
View File

@ -0,0 +1,85 @@
/*
* Wine internal Unicode definitions
*
* Copyright 2000 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_UNICODE_H
#define __WINE_UNICODE_H
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <winnls.h>
/* code page info common to SBCS and DBCS */
struct cp_info
{
unsigned int codepage; /* codepage id */
unsigned int char_size; /* char size (1 or 2 bytes) */
WCHAR def_char; /* default char value (can be double-byte) */
WCHAR def_unicode_char; /* default Unicode char value */
const char *name; /* code page name */
};
struct sbcs_table
{
struct cp_info info;
const WCHAR *cp2uni; /* code page -> Unicode map */
const WCHAR *cp2uni_glyphs; /* code page -> Unicode map with glyph chars */
const unsigned char *uni2cp_low; /* Unicode -> code page map */
const unsigned short *uni2cp_high;
};
struct dbcs_table
{
struct cp_info info;
const WCHAR *cp2uni; /* code page -> Unicode map */
const unsigned char *cp2uni_leadbytes;
const unsigned short *uni2cp_low; /* Unicode -> code page map */
const unsigned short *uni2cp_high;
unsigned char lead_bytes[12]; /* lead bytes ranges */
};
union cptable
{
struct cp_info info;
struct sbcs_table sbcs;
struct dbcs_table dbcs;
};
static inline unsigned int strlenW( const WCHAR *str )
{
const WCHAR *s = str;
while (*s) s++;
return s - str;
}
static inline unsigned short get_char_typeW( WCHAR ch )
{
extern const unsigned short wine_wctype_table[];
return wine_wctype_table[wine_wctype_table[ch >> 8] + (ch & 0xff)];
}
static inline WCHAR tolowerW( WCHAR ch )
{
extern const WCHAR wine_casemap_lower[];
return ch + wine_casemap_lower[wine_casemap_lower[ch >> 8] + (ch & 0xff)];
}
#endif /* __WINE_UNICODE_H */

View File

@ -24,7 +24,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
extern WCHAR wine_compose( const WCHAR *str ) DECLSPEC_HIDDEN;

View File

@ -24,7 +24,7 @@
#ifdef __ASM_OBSOLETE
#include "wine/unicode.h"
#include "unicode.h"
extern WCHAR wine_compose( const WCHAR *str ) DECLSPEC_HIDDEN;