Forward to user32 when appropriate in shlwapi and removed dependencies to libunicode

svn path=/trunk/; revision=13596
This commit is contained in:
Thomas Bluemel 2005-02-16 16:44:54 +00:00
parent dd88251afc
commit 3f7501d7c3
12 changed files with 913 additions and 1007 deletions

View file

@ -41,6 +41,9 @@ BUS = acpi isapnp pci
# vfatlib
LIB_FSLIB = vfatlib
# libunicode, must be empty!
LIBUNICODE =
# Static libraries
LIB_STATIC = string rosrtl epsapi uuid libwine zlib rtl tgetopt pseh adns dxguid strmiids crt rossym wdmguid
@ -59,7 +62,7 @@ DLLS = acledit aclui advapi32 advpack cabinet cards comctl32 crtdll comdlg32 d3d
gdi32 gdiplus glu32 hid imagehlp imm32 iphlpapi kernel32 lzexpand mesa32 midimap mmdrv mpr msacm msafd \
msgina msi msimg32 msvcrt20 msvideo mswsock netapi32 ntdll ole32 oleaut32 oledlg olepro32 opengl32 \
packet psapi riched20 richedit rpcrt4 samlib secur32 setupapi shell32 shlwapi smdll snmpapi syssetup \
twain unicode user32 userenv version wininet winmm winspool ws2help ws2_32 wsock32 wshirda dnsapi \
twain user32 userenv version wininet winmm winspool ws2help ws2_32 wsock32 wshirda dnsapi \
urlmon shdocvw dinput dinput8 dxdiagn devenum dsound $(DLLS_KBD) $(DLLS_CPL) $(DLLS_SHELLEXT)
SUBSYS = smss win32k csrss ntvdm

View file

@ -74,6 +74,7 @@ lib\dinput\dinput.dll 1
lib\dinput8\dinput8.dll 1
lib\dsound\dsound.dll 1
lib\dxdiagn\dxdiagn.dll 1
lib\expat\expat.dll 1
lib\fmifs\fmifs.dll 1
lib\freetype\freetype.dll 1
lib\gdi32\gdi32.dll 1
@ -119,7 +120,6 @@ lib\smdll\smdll.dll 1
lib\syssetup\syssetup.dll 1
lib\twain\twain_32.dll 1
lib\urlmon\urlmon.dll 1
lib\unicode\wine_unicode.dll 1
lib\user32\user32.dll 1
lib\userenv\userenv.dll 1
lib\version\version.dll 1

View file

@ -7,41 +7,6 @@
#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_t def_char; /* default char value (can be double-byte) */
wchar_t def_unicode_char; /* default Unicode char value */
const char *name; /* code page name */
};
struct sbcs_table
{
struct cp_info info;
const wchar_t *cp2uni; /* code page -> Unicode map */
const unsigned char *uni2cp_low; /* Unicode -> code page map */
const unsigned short *uni2cp_high;
};
struct dbcs_table
{
struct cp_info info;
const wchar_t *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;
};
#define strlenW(s) wcslen((const wchar_t *)(s))
#define strcpyW(d,s) wcscpy((wchar_t *)(d),(const wchar_t *)(s))
#define strcatW(d,s) wcscat((wchar_t *)(d),(const wchar_t *)(s))
@ -54,6 +19,7 @@ union cptable
#define strcmpW(s1,s2) wcscmp((const wchar_t *)(s1),(const wchar_t *)(s2))
#define strcmpiW(s1,s2) _wcsicmp((const wchar_t *)(s1),(const wchar_t *)(s2))
#define strncmpiW(s1,s2,n) _wcsnicmp((const wchar_t *)(s1),(const wchar_t *)(s2),(n))
#define strtoulW(s1,s2,b) wcstoul((const wchar_t *)(s1),(wchar_t **)(s2),(b))
#define tolowerW(n) towlower((n))
#define toupperW(n) towupper((n))
#define islowerW(n) iswlower((n))
@ -67,21 +33,14 @@ union cptable
#define atolW(s) _wtol((const wchar_t *)(s))
#define strlwrW(s) _wcslwr((wchar_t *)(s))
#define struprW(s) _wcsupr((wchar_t *)(s))
#define sprintfW wsprintfW
#define sprintfW swprintf
#define snprintfW _snwprintf
#define vsnprintfW vsnwprintf
#ifndef WINE_UNICODE_API
#define WINE_UNICODE_API __attribute__((dllimport))
#endif
/* the character type contains the C1_* flags in the low 12 bits */
/* and the C2_* type in the high 4 bits */
static inline unsigned short get_char_typeW( wchar_t ch )
{
extern WINE_UNICODE_API const unsigned short wine_wctype_table[];
return wine_wctype_table[wine_wctype_table[ch >> 8] + (ch & 0xff)];
}
static inline WCHAR *strpbrkW( const WCHAR *str, const WCHAR *accept )
{
for ( ; *str; str++) if (strchrW( accept, *str )) return (WCHAR *)str;

View file

@ -5,7 +5,7 @@ TARGET_OBJECTS = @C_SRCS@
TARGET_CFLAGS = -D__REACTOS__ @EXTRADEFS@
TARGET_SDKLIBS = @IMPORTS@ wine.a wine_unicode.a wine_uuid.a ntdll.a winspool.a
TARGET_SDKLIBS = @IMPORTS@ wine.a wine_uuid.a ntdll.a winspool.a
TARGET_BASE = $(TARGET_BASE_LIB_COMDLG32)

View file

@ -6,7 +6,7 @@ TARGET_OBJECTS = @C_SRCS@ @EXTRA_OBJS@
TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__
TARGET_SDKLIBS = @IMPORTS@ winmm.a wine.a wine_uuid.a wine_unicode.a ntdll.a
TARGET_SDKLIBS = @IMPORTS@ winmm.a wine.a wine_uuid.a ntdll.a
TARGET_BASE = $(TARGET_BASE_LIB_WINMM)

View file

@ -6,7 +6,7 @@ TARGET_OBJECTS = @C_SRCS@
TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__
TARGET_SDKLIBS = @IMPORTS@ winmm.a wine.a wine_uuid.a wine_unicode.a ntdll.a
TARGET_SDKLIBS = @IMPORTS@ winmm.a wine.a wine_uuid.a ntdll.a
TARGET_BASE = $(TARGET_BASE_LIB_OLEAUT32)

View file

@ -6,7 +6,7 @@ TARGET_OBJECTS = @C_SRCS@
TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__ -D__WINESRC__
TARGET_SDKLIBS = @IMPORTS@ wine.a ntdll.a wine_unicode.a
TARGET_SDKLIBS = @IMPORTS@ wine.a ntdll.a
TARGET_BASE = $(TARGET_BASE_LIB_SETUPAPI)

View file

@ -1,21 +1,21 @@
# $Id: Makefile.ros-template 12852 2005-01-06 13:58:04Z mf $
TARGET_NAME = setupapi
TARGET_OBJECTS = @C_SRCS@
TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__ -D__WINESRC__
TARGET_SDKLIBS = @IMPORTS@ wine.a ntdll.a wine_unicode.a
TARGET_BASE = $(TARGET_BASE_LIB_SETUPAPI)
TARGET_RC_SRCS = @RC_SRCS@
TARGET_RC_BINSRC = @RC_BINSRC@
TARGET_RC_BINARIES = @RC_BINARIES@
default: all
DEP_OBJECTS = $(TARGET_OBJECTS)
include $(TOOLS_PATH)/depend.mk
# $Id: Makefile.ros-template 12852 2005-01-06 13:58:04Z mf $
TARGET_NAME = setupapi
TARGET_OBJECTS = @C_SRCS@
TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__ -D__WINESRC__
TARGET_SDKLIBS = @IMPORTS@ wine.a ntdll.a
TARGET_BASE = $(TARGET_BASE_LIB_SETUPAPI)
TARGET_RC_SRCS = @RC_SRCS@
TARGET_RC_BINSRC = @RC_BINSRC@
TARGET_RC_BINARIES = @RC_BINARIES@
default: all
DEP_OBJECTS = $(TARGET_OBJECTS)
include $(TOOLS_PATH)/depend.mk

View file

@ -1,22 +1,22 @@
# $Id: Makefile.ros-template 11910 2004-12-03 23:37:44Z blight $
TARGET_NAME = shlwapi
TARGET_OBJECTS = @C_SRCS@
TARGET_CFLAGS = -DWINSHLWAPI= -D__REACTOS__ @EXTRADEFS@
# FIXME: we don't do delayed imports yet so oleaut32.a is listed explicitly
# NOTE: msvcrt.a must be listed before ntdll.a, because sprintf that is
# exported from ntdll doesn't support printing of float types (%f)
TARGET_SDKLIBS = msvcrt.a @IMPORTS@ oleaut32.a wine.a wine_uuid.a wine_unicode.a msvcrt.a ntdll.a
TARGET_NORC = yes
TARGET_BASE = $(TARGET_BASE_LIB_SHLWAPI)
default: all
DEP_OBJECTS = $(TARGET_OBJECTS)
include $(TOOLS_PATH)/depend.mk
# $Id: Makefile.ros-template 11910 2004-12-03 23:37:44Z blight $
TARGET_NAME = shlwapi
TARGET_OBJECTS = @C_SRCS@
TARGET_CFLAGS = -DWINSHLWAPI= -D__REACTOS__ @EXTRADEFS@
# FIXME: we don't do delayed imports yet so oleaut32.a is listed explicitly
# NOTE: msvcrt.a must be listed before ntdll.a, because sprintf that is
# exported from ntdll doesn't support printing of float types (%f)
TARGET_SDKLIBS = msvcrt.a @IMPORTS@ oleaut32.a wine.a wine_uuid.a msvcrt.a ntdll.a
TARGET_NORC = yes
TARGET_BASE = $(TARGET_BASE_LIB_SHLWAPI)
default: all
DEP_OBJECTS = $(TARGET_OBJECTS)
include $(TOOLS_PATH)/depend.mk

View file

@ -680,74 +680,6 @@ INT WINAPI SHStringFromGUIDW(REFGUID guid, LPWSTR lpszDest, INT cchMax)
return iLen;
}
/*************************************************************************
* @ [SHLWAPI.25]
*
* Determine if a Unicode character is alphabetic.
*
* PARAMS
* wc [I] Character to check.
*
* RETURNS
* TRUE, if wc is alphabetic,
* FALSE otherwise.
*/
BOOL WINAPI IsCharAlphaWrapW(WCHAR wc)
{
return (get_char_typeW(wc) & C1_ALPHA) != 0;
}
/*************************************************************************
* @ [SHLWAPI.26]
*
* Determine if a Unicode character is upper-case.
*
* PARAMS
* wc [I] Character to check.
*
* RETURNS
* TRUE, if wc is upper-case,
* FALSE otherwise.
*/
BOOL WINAPI IsCharUpperWrapW(WCHAR wc)
{
return (get_char_typeW(wc) & C1_UPPER) != 0;
}
/*************************************************************************
* @ [SHLWAPI.27]
*
* Determine if a Unicode character is lower-case.
*
* PARAMS
* wc [I] Character to check.
*
* RETURNS
* TRUE, if wc is lower-case,
* FALSE otherwise.
*/
BOOL WINAPI IsCharLowerWrapW(WCHAR wc)
{
return (get_char_typeW(wc) & C1_LOWER) != 0;
}
/*************************************************************************
* @ [SHLWAPI.28]
*
* Determine if a Unicode character is alphabetic or a digit.
*
* PARAMS
* wc [I] Character to check.
*
* RETURNS
* TRUE, if wc is alphabetic or a digit,
* FALSE otherwise.
*/
BOOL WINAPI IsCharAlphaNumericWrapW(WCHAR wc)
{
return (get_char_typeW(wc) & (C1_ALPHA|C1_DIGIT)) != 0;
}
/*************************************************************************
* @ [SHLWAPI.29]
*
@ -762,7 +694,9 @@ BOOL WINAPI IsCharAlphaNumericWrapW(WCHAR wc)
*/
BOOL WINAPI IsCharSpaceW(WCHAR wc)
{
return (get_char_typeW(wc) & C1_SPACE) != 0;
WORD CharType;
return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_SPACE);
}
/*************************************************************************
@ -780,7 +714,9 @@ BOOL WINAPI IsCharSpaceW(WCHAR wc)
*/
BOOL WINAPI IsCharBlankW(WCHAR wc)
{
return (get_char_typeW(wc) & C1_BLANK) != 0;
WORD CharType;
return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_BLANK);
}
/*************************************************************************
@ -797,7 +733,9 @@ BOOL WINAPI IsCharBlankW(WCHAR wc)
*/
BOOL WINAPI IsCharPunctW(WCHAR wc)
{
return (get_char_typeW(wc) & C1_PUNCT) != 0;
WORD CharType;
return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_PUNCT);
}
/*************************************************************************
@ -814,7 +752,9 @@ BOOL WINAPI IsCharPunctW(WCHAR wc)
*/
BOOL WINAPI IsCharCntrlW(WCHAR wc)
{
return (get_char_typeW(wc) & C1_CNTRL) != 0;
WORD CharType;
return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_CNTRL);
}
/*************************************************************************
@ -831,7 +771,9 @@ BOOL WINAPI IsCharCntrlW(WCHAR wc)
*/
BOOL WINAPI IsCharDigitW(WCHAR wc)
{
return (get_char_typeW(wc) & C1_DIGIT) != 0;
WORD CharType;
return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_DIGIT);
}
/*************************************************************************
@ -848,7 +790,9 @@ BOOL WINAPI IsCharDigitW(WCHAR wc)
*/
BOOL WINAPI IsCharXDigitW(WCHAR wc)
{
return (get_char_typeW(wc) & C1_XDIGIT) != 0;
WORD CharType;
return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_XDIGIT);
}
/*************************************************************************

File diff suppressed because it is too large Load diff

View file

@ -27,7 +27,7 @@ TARGET_CFLAGS += -D_DISABLE_TIDENTS
TARGET_LFLAGS = -nostartfiles -nostdlib
TARGET_SDKLIBS = wine.a wine_unicode.a ntdll.a kernel32.a
TARGET_SDKLIBS = wine.a ntdll.a kernel32.a
TARGET_OBJECTS = info.o stubs.o