Corrected bug which stopped(!) crtdll from compiling

svn path=/trunk/; revision=397
This commit is contained in:
David Welch 1999-04-18 12:13:55 +00:00
parent 4946832715
commit d2f7f11cfc
119 changed files with 541 additions and 112 deletions

View file

@ -0,0 +1,422 @@
#ifndef __WINE_WINNLS_H
#define __WINE_WINNLS_H
/* flags to GetLocaleInfo */
//#define LOCALE_NOUSEROVERRIDE 0x80000000
#define LOCALE_USE_CP_ACP 0x40000000
#define LOCALE_LOCALEINFOFLAGSMASK 0xC0000000
/* When adding new defines, don't forget to add an entry to the
* locale2id map in misc/ole2nls.c
*/
#define LOCALE_SNATIVEDIGITS 0x00000013
#define LOCALE_SINTLSYMBOL 0x00000015
#define LOCALE_SISO639LANGNAME 0x00000059
#define LOCALE_SISO3166CTRYNAME 0x0000005A
#define LOCALE_IDEFAULTMACCODEPAGE 0x00001011
#define LOCALE_IINTLCURRDIGITS 0x0000001A
#define LOCALE_ITIMEMARKPOSN 0x00001005
#define LOCALE_ICENTURY 0x00000024
#define LOCALE_FONTSIGNATURE 0x00000058
#if 0
#define LOCALE_ILANGUAGE 0x00000001
#define LOCALE_SLANGUAGE 0x00000002
#define LOCALE_SENGLANGUAGE 0x00001001
#define LOCALE_SABBREVLANGNAME 0x00000003
#define LOCALE_SNATIVELANGNAME 0x00000004
#define LOCALE_ICOUNTRY 0x00000005
#define LOCALE_SCOUNTRY 0x00000006
#define LOCALE_SENGCOUNTRY 0x00001002
#define LOCALE_SABBREVCTRYNAME 0x00000007
#define LOCALE_SNATIVECTRYNAME 0x00000008
#define LOCALE_IDEFAULTLANGUAGE 0x00000009
#define LOCALE_IDEFAULTCOUNTRY 0x0000000A
#define LOCALE_IDEFAULTCODEPAGE 0x0000000B
#define LOCALE_IDEFAULTANSICODEPAGE 0x00001004
#define LOCALE_SLIST 0x0000000C
#define LOCALE_IMEASURE 0x0000000D
#define LOCALE_SDECIMAL 0x0000000E
#define LOCALE_STHOUSAND 0x0000000F
#define LOCALE_SGROUPING 0x00000010
#define LOCALE_IDIGITS 0x00000011
#define LOCALE_ILZERO 0x00000012
#define LOCALE_INEGNUMBER 0x00001010
#define LOCALE_SCURRENCY 0x00000014
#define LOCALE_SMONDECIMALSEP 0x00000016
#define LOCALE_SMONTHOUSANDSEP 0x00000017
#define LOCALE_SMONGROUPING 0x00000018
#define LOCALE_ICURRDIGITS 0x00000019
#define LOCALE_ICURRENCY 0x0000001B
#define LOCALE_INEGCURR 0x0000001C
#define LOCALE_SDATE 0x0000001D
#define LOCALE_STIME 0x0000001E
#define LOCALE_SSHORTDATE 0x0000001F
#define LOCALE_SLONGDATE 0x00000020
#define LOCALE_STIMEFORMAT 0x00001003
#define LOCALE_IDATE 0x00000021
#define LOCALE_ILDATE 0x00000022
#define LOCALE_ITIME 0x00000023
#define LOCALE_ITLZERO 0x00000025
#define LOCALE_IDAYLZERO 0x00000026
#define LOCALE_IMONLZERO 0x00000027
#define LOCALE_S1159 0x00000028
#define LOCALE_S2359 0x00000029
#define LOCALE_ICALENDARTYPE 0x00001009
#define LOCALE_IOPTIONALCALENDAR 0x0000100B
#define LOCALE_IFIRSTDAYOFWEEK 0x0000100C
#define LOCALE_IFIRSTWEEKOFYEAR 0x0000100D
#define LOCALE_SDAYNAME1 0x0000002A
#define LOCALE_SDAYNAME2 0x0000002B
#define LOCALE_SDAYNAME3 0x0000002C
#define LOCALE_SDAYNAME4 0x0000002D
#define LOCALE_SDAYNAME5 0x0000002E
#define LOCALE_SDAYNAME6 0x0000002F
#define LOCALE_SDAYNAME7 0x00000030
#define LOCALE_SABBREVDAYNAME1 0x00000031
#define LOCALE_SABBREVDAYNAME2 0x00000032
#define LOCALE_SABBREVDAYNAME3 0x00000033
#define LOCALE_SABBREVDAYNAME4 0x00000034
#define LOCALE_SABBREVDAYNAME5 0x00000035
#define LOCALE_SABBREVDAYNAME6 0x00000036
#define LOCALE_SABBREVDAYNAME7 0x00000037
#define LOCALE_SMONTHNAME1 0x00000038
#define LOCALE_SMONTHNAME2 0x00000039
#define LOCALE_SMONTHNAME3 0x0000003A
#define LOCALE_SMONTHNAME4 0x0000003B
#define LOCALE_SMONTHNAME5 0x0000003C
#define LOCALE_SMONTHNAME6 0x0000003D
#define LOCALE_SMONTHNAME7 0x0000003E
#define LOCALE_SMONTHNAME8 0x0000003F
#define LOCALE_SMONTHNAME9 0x00000040
#define LOCALE_SMONTHNAME10 0x00000041
#define LOCALE_SMONTHNAME11 0x00000042
#define LOCALE_SMONTHNAME12 0x00000043
#define LOCALE_SMONTHNAME13 0x0000100E
#define LOCALE_SABBREVMONTHNAME1 0x00000044
#define LOCALE_SABBREVMONTHNAME2 0x00000045
#define LOCALE_SABBREVMONTHNAME3 0x00000046
#define LOCALE_SABBREVMONTHNAME4 0x00000047
#define LOCALE_SABBREVMONTHNAME5 0x00000048
#define LOCALE_SABBREVMONTHNAME6 0x00000049
#define LOCALE_SABBREVMONTHNAME7 0x0000004A
#define LOCALE_SABBREVMONTHNAME8 0x0000004B
#define LOCALE_SABBREVMONTHNAME9 0x0000004C
#define LOCALE_SABBREVMONTHNAME10 0x0000004D
#define LOCALE_SABBREVMONTHNAME11 0x0000004E
#define LOCALE_SABBREVMONTHNAME12 0x0000004F
#define LOCALE_SABBREVMONTHNAME13 0x0000100F
#define LOCALE_SPOSITIVESIGN 0x00000050
#define LOCALE_SNEGATIVESIGN 0x00000051
#define LOCALE_IPOSSIGNPOSN 0x00000052
#define LOCALE_INEGSIGNPOSN 0x00000053
#define LOCALE_IPOSSYMPRECEDES 0x00000054
#define LOCALE_IPOSSEPBYSPACE 0x00000055
#define LOCALE_INEGSYMPRECEDES 0x00000056
#define LOCALE_INEGSEPBYSPACE 0x00000057
#endif
#if 0
#define NORM_IGNORECASE 1
#define NORM_IGNORENONSPACE 2
#define NORM_IGNORESYMBOLS 4
#define NORM_STRINGSORT 0x1000
#define NORM_IGNOREKANATYPE 0x00010000
#define NORM_IGNOREWIDTH 0x00020000
#endif
#if 0
#define CP_ACP 0
#define CP_OEMCP 1
#endif
#if 0
#define WC_DEFAULTCHECK 0x00000100
#define WC_COMPOSITECHECK 0x00000200
#define WC_DISCARDNS 0x00000010
#define WC_SEPCHARS 0x00000020
#define WC_DEFAULTCHAR 0x00000040
#endif
#if 0
#define MAKELCID(l, s) (MAKELONG(l, s))
#define MAKELANGID(p, s) ((((WORD)(s))<<10) | (WORD)(p))
#define PRIMARYLANGID(l) ((WORD)(l) & 0x3ff)
#define SUBLANGID(l) ((WORD)(l) >> 10)
#endif
#if 0
#define LANG_SYSTEM_DEFAULT (MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT))
#define LANG_USER_DEFAULT (MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT))
#define LOCALE_SYSTEM_DEFAULT (MAKELCID(LANG_SYSTEM_DEFAULT, SORT_DEFAULT))
#define LOCALE_USER_DEFAULT (MAKELCID(LANG_USER_DEFAULT, SORT_DEFAULT))
#define LOCALE_NEUTRAL (MAKELCID(MAKELANGID(LANG_NEUTRAL,SUBLANG_NEUTRAL),SORT_DEFAULT))
#endif
/* Language IDs (were in winnt.h, for some reason) */
/* Language IDs */
/* FIXME: are the symbolic names correct for LIDs: 0x17, 0x20, 0x28,
* 0x2a, 0x2b, 0x2c, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35,
* 0x37, 0x39, 0x3a, 0x3b, 0x3c, 0x3e, 0x3f, 0x41, 0x43, 0x44,
* 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e,
* 0x4f, 0x57
*/
#define LANG_CATALAN 0x03
#define LANG_THAI 0x1e
/* non standard; keep the number high enough (but < 0xff) */
#define LANG_ESPERANTO 0x8f
#if 0
#define LANG_NEUTRAL 0x00
#define LANG_AFRIKAANS 0x36
#define LANG_ALBANIAN 0x1c
#define LANG_ARABIC 0x01
#define LANG_ARMENIAN 0x2b
#define LANG_ASSAMESE 0x4d
#define LANG_AZERI 0x2c
#define LANG_BASQUE 0x2d
#define LANG_BENGALI 0x45
#define LANG_BULGARIAN 0x02
#define LANG_BYELORUSSIAN 0x23
#define LANG_CHINESE 0x04
#define LANG_SERBO_CROATIAN 0x1a
#define LANG_CROATIAN LANG_SERBO_CROATIAN
#define LANG_SERBIAN LANG_SERBO_CROATIAN
#define LANG_CZECH 0x05
#define LANG_DANISH 0x06
#define LANG_DUTCH 0x13
#define LANG_ENGLISH 0x09
#define LANG_ESTONIAN 0x25
#define LANG_FAEROESE 0x38
#define LANG_FARSI 0x29
#define LANG_FINNISH 0x0b
#define LANG_FRENCH 0x0c
#define LANG_GAELIC 0x3c
#define LANG_GEORGIAN 0x37
#define LANG_GERMAN 0x07
#define LANG_GREEK 0x08
#define LANG_GUJARATI 0x47
#define LANG_HEBREW 0x0D
#define LANG_HINDI 0x39
#define LANG_HUNGARIAN 0x0e
#define LANG_ICELANDIC 0x0f
#define LANG_INDONESIAN 0x21
#define LANG_ITALIAN 0x10
#define LANG_JAPANESE 0x11
#define LANG_KANNADA 0x4b
#define LANG_KAZAKH 0x3f
#define LANG_KONKANI 0x57
#define LANG_KOREAN 0x12
#define LANG_LATVIAN 0x26
#define LANG_LITHUANIAN 0x27
#define LANG_MACEDONIAN 0x2f
#define LANG_MALAY 0x3e
#define LANG_MALAYALAM 0x4c
#define LANG_MALTESE 0x3a
#define LANG_MAORI 0x28
#define LANG_MARATHI 0x4e
#define LANG_NORWEGIAN 0x14
#define LANG_ORIYA 0x48
#define LANG_POLISH 0x15
#define LANG_PORTUGUESE 0x16
#define LANG_PUNJABI 0x46
#define LANG_RHAETO_ROMANCE 0x17
#define LANG_ROMANIAN 0x18
#define LANG_RUSSIAN 0x19
#define LANG_SAAMI 0x3b
#define LANG_SANSKRIT 0x4f
#define LANG_SLOVAK 0x1b
#define LANG_SLOVENIAN 0x24
#define LANG_SORBIAN 0x2e
#define LANG_SPANISH 0x0a
#define LANG_SUTU 0x30
#define LANG_SWAHILI 0x41
#define LANG_SWEDISH 0x1d
#define LANG_TAMIL 0x49
#define LANG_TATAR 0x44
#define LANG_TELUGU 0x4a
#define LANG_TSONGA 0x31
#define LANG_TSWANA 0x32
#define LANG_TURKISH 0x1f
#define LANG_UKRAINIAN 0x22
#define LANG_URDU 0x20
#define LANG_UZBEK 0x43
#define LANG_VENDA 0x33
#define LANG_VIETNAMESE 0x2a
#define LANG_XHOSA 0x34
#define LANG_ZULU 0x35
#endif
/* Sublanguage definitions */
//#define SUBLANG_NEUTRAL 0x00 /* language neutral */
//#define SUBLANG_DEFAULT 0x01 /* user default */
//#define SUBLANG_SYS_DEFAULT 0x02 /* system default */
#define SUBLANG_ARABIC 0x01
#define SUBLANG_ARABIC_IRAQ 0x02
#define SUBLANG_ARABIC_EGYPT 0x03
#define SUBLANG_ARABIC_LIBYA 0x04
#define SUBLANG_ARABIC_ALGERIA 0x05
#define SUBLANG_ARABIC_MOROCCO 0x06
#define SUBLANG_ARABIC_TUNISIA 0x07
#define SUBLANG_ARABIC_OMAN 0x08
#define SUBLANG_ARABIC_YEMEN 0x09
#define SUBLANG_ARABIC_SYRIA 0x0a
#define SUBLANG_ARABIC_JORDAN 0x0b
#define SUBLANG_ARABIC_LEBANON 0x0c
#define SUBLANG_ARABIC_KUWAIT 0x0d
#define SUBLANG_ARABIC_UAE 0x0e
#define SUBLANG_ARABIC_BAHRAIN 0x0f
#define SUBLANG_ARABIC_QATAR 0x10
//#define SUBLANG_CHINESE_TRADITIONAL 0x01
//#define SUBLANG_CHINESE_SIMPLIFIED 0x02
//#define SUBLANG_CHINESE_HONGKONG 0x03
//#define SUBLANG_CHINESE_SINGAPORE 0x04
#define SUBLANG_CHINESE_MACAU 0x05
//#define SUBLANG_DUTCH 0x01
//#define SUBLANG_DUTCH_BELGIAN 0x02
#define SUBLANG_DUTCH_SURINAM 0x03
//#define SUBLANG_ENGLISH_US 0x01
//#define SUBLANG_ENGLISH_UK 0x02
//#define SUBLANG_ENGLISH_AUS 0x03
//#define SUBLANG_ENGLISH_CAN 0x04
//#define SUBLANG_ENGLISH_NZ 0x05
//#define SUBLANG_ENGLISH_EIRE 0x06
#define SUBLANG_ENGLISH_SAFRICA 0x07
#define SUBLANG_ENGLISH_JAMAICA 0x08
#define SUBLANG_ENGLISH_CARRIBEAN 0x09
#define SUBLANG_ENGLISH_BELIZE 0x0a
#define SUBLANG_ENGLISH_TRINIDAD 0x0b
#define SUBLANG_ENGLISH_ZIMBABWE 0x0c
#define SUBLANG_ENGLISH_PHILIPPINES 0x0d
//#define SUBLANG_FRENCH 0x01
//#define SUBLANG_FRENCH_BELGIAN 0x02
//#define SUBLANG_FRENCH_CANADIAN 0x03
//#define SUBLANG_FRENCH_SWISS 0x04
#define SUBLANG_FRENCH_LUXEMBOURG 0x05
#define SUBLANG_FRENCH_MONACO 0x06
//#define SUBLANG_GERMAN 0x01
//#define SUBLANG_GERMAN_SWISS 0x02
//#define SUBLANG_GERMAN_AUSTRIAN 0x03
#define SUBLANG_GERMAN_LUXEMBOURG 0x04
#define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
//#define SUBLANG_ITALIAN 0x01
//#define SUBLANG_ITALIAN_SWISS 0x02
#define SUBLANG_KOREAN 0x01
#define SUBLANG_KOREAN_JOHAB 0x02
//#define SUBLANG_NORWEGIAN_BOKMAL 0x01
//#define SUBLANG_NORWEGIAN_NYNORSK 0x02
//#define SUBLANG_PORTUGUESE 0x02
//#define SUBLANG_PORTUGUESE_BRAZILIAN 0x01
//#define SUBLANG_SPANISH 0x01
//#define SUBLANG_SPANISH_MEXICAN 0x02
//#define SUBLANG_SPANISH_MODERN 0x03
#define SUBLANG_SPANISH_GUATEMALA 0x04
#define SUBLANG_SPANISH_COSTARICA 0x05
#define SUBLANG_SPANISH_PANAMA 0x06
#define SUBLANG_SPANISH_DOMINICAN 0x07
#define SUBLANG_SPANISH_VENEZUELA 0x08
#define SUBLANG_SPANISH_COLOMBIA 0x09
#define SUBLANG_SPANISH_PERU 0x0a
#define SUBLANG_SPANISH_ARGENTINA 0x0b
#define SUBLANG_SPANISH_ECUADOR 0x0c
#define SUBLANG_SPANISH_CHILE 0x0d
#define SUBLANG_SPANISH_URUGUAY 0x0e
#define SUBLANG_SPANISH_PARAGUAY 0x0f
#define SUBLANG_SPANISH_BOLIVIA 0x10
#define SUBLANG_SPANISH_EL_SALVADOR 0x11
#define SUBLANG_SPANISH_HONDURAS 0x12
#define SUBLANG_SPANISH_NICARAGUA 0x13
#define SUBLANG_SPANISH_PUERTO_RICO 0x14
/* FIXME: I don't know the symbolic names for those */
#define SUBLANG_ROMANIAN 0x01
#define SUBLANG_ROMANIAN_MOLDAVIA 0x02
#define SUBLANG_RUSSIAN 0x01
#define SUBLANG_RUSSIAN_MOLDAVIA 0x02
#define SUBLANG_CROATIAN 0x01
#define SUBLANG_SERBIAN 0x02
#define SUBLANG_SERBIAN_LATIN 0x03
#define SUBLANG_SWEDISH 0x01
#define SUBLANG_SWEDISH_FINLAND 0x02
#define SUBLANG_LITHUANIAN 0x01
#define SUBLANG_LITHUANIAN_CLASSIC 0x02
#define SUBLANG_AZERI 0x01
#define SUBLANG_AZERI_CYRILLIC 0x02
#define SUBLANG_GAELIC 0x01
#define SUBLANG_GAELIC_SCOTTISH 0x02
#define SUBLANG_MALAY 0x01
#define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
#define SUBLANG_UZBEK 0x01
#define SUBLANG_UZBEK_CYRILLIC 0x02
/* Sort definitions */
//#define SORT_DEFAULT 0x0
//#define SORT_JAPANESE_XJIS 0x0
//#define SORT_JAPANESE_UNICODE 0x1
//#define SORT_CHINESE_BIG5 0x0
//#define SORT_CHINESE_UNICODE 0x1
//#define SORT_KOREAN_KSC 0x0
//#define SORT_KOREAN_UNICODE 0x1
/* Locale Dependent Mapping Flags */
#if 0
#define LCMAP_LOWERCASE 0x00000100 /* lower case letters */
#define LCMAP_UPPERCASE 0x00000200 /* upper case letters */
#define LCMAP_SORTKEY 0x00000400 /* WC sort key (normalize) */
#define LCMAP_BYTEREV 0x00000800 /* byte reversal */
#endif
//#define SORT_STRINGSORT 0x00001000 /* take punctuation into account */
#if 0
#define LCMAP_HIRAGANA 0x00100000 /* map katakana to hiragana */
#define LCMAP_KATAKANA 0x00200000 /* map hiragana to katakana */
#define LCMAP_HALFWIDTH 0x00400000 /* map double byte to single byte */
#define LCMAP_FULLWIDTH 0x00800000 /* map single byte to double byte */
#endif
/* Date Flags for GetDateFormat. */
#if 0
#define DATE_SHORTDATE 0x00000001 /* use short date picture */
#define DATE_LONGDATE 0x00000002 /* use long date picture */
#define DATE_USE_ALT_CALENDAR 0x00000004 /* use alternate calendar */
/* alt. calendar support is broken anyway */
#endif
#if 0
#define TIME_FORCE24HOURFORMAT 0x00000008 /* force 24 hour format*/
#define TIME_NOTIMEMARKER 0x00000004 /* show no AM/PM */
#define TIME_NOSECONDS 0x00000002 /* show no seconds */
#define TIME_NOMINUTESORSECONDS 0x0000001 /* show no minutes either */
#endif
/* internal flags for GetDateFormat system */
#define DATE_DATEVARSONLY 0x00000100 /* only date stuff: yMdg */
#define TIME_TIMEVARSONLY 0x00000200 /* only time stuff: hHmst */
/* use this in a WineLib program if you really want all types */
#define LOCALE_TIMEDATEBOTH 0x00000300 /* full set */
/* Prototypes for Unicode case conversion routines */
WCHAR towupper(WCHAR);
WCHAR towlower(WCHAR);
#if 0
/* Definitions for IsTextUnicode() function */
#define IS_TEXT_UNICODE_ASCII16 0x0001
#define IS_TEXT_UNICODE_SIGNATURE 0x0008
#define IS_TEXT_UNICODE_REVERSE_ASCII16 0x0010
#define IS_TEXT_UNICODE_REVERSE_SIGNATURE 0x0080
#define IS_TEXT_UNICODE_ILLEGAL_CHARS 0x0100
#define IS_TEXT_UNICODE_ODD_LENGTH 0x0200
#endif
/* Tests that we currently implement */
#define ITU_IMPLEMENTED_TESTS \
IS_TEXT_UNICODE_SIGNATURE| \
IS_TEXT_UNICODE_ODD_LENGTH
#endif /* __WINE_WINNLS_H */

View file

@ -136,14 +136,13 @@ crtdll.dll: $(DLLMAIN) $(OBJECTS) crtdll.def
$(DLLTOOL) --dllname crtdll.dll --def crtdll.def \
--output-lib crtdll.a
$(CC) -specs=crt_specs -mdll -o junk.tmp \
-Wl,--base-file,base.tmp crtdll.o ../kernel32/kernel32.a \
../ntdll/ntdll.a
-Wl,--base-file,base.tmp crtdll.o ../kernel32/kernel32.a
- $(RM) junk.tmp
$(DLLTOOL) --dllname crtdll.dll --base-file base.tmp \
--output-exp temp.exp --def crtdll.def
- $(RM) base.tmp
$(CC) -specs=crt_specs -mdll -o crtdll.dll crtdll.o \
../kernel32/kernel32.a ../ntdll/ntdll.a\
../kernel32/kernel32.a
-Wl,--image-base,0x20000000 \
-Wl,--file-alignment,0x1000 \
-Wl,--section-alignment,0x1000 \

View file

@ -1,4 +1,16 @@
#if 1
long double modfl(long double __x, long double *__i)
{
}
double modf(double __x, double *__i)
{
}
#else
/* @(#)s_modf.c 1.3 95/01/18 */
/*
@ -132,4 +144,5 @@ long double modfl(long double __x, long double *__i)
}
}
}
#endif

View file

@ -22,6 +22,15 @@ Cambridge, MA 02139, USA. */
#include <crtdll/wchar.h>
#include <crtdll/alloc.h>
#if 1
int fscanf(FILE *stream,const char *format, ...)
{
}
#else
int __vfscanf (FILE *s, const char *format, va_list argptr);
/* Read formatted input from STREAM according to the format string FORMAT. */
/* VARARGS2 */
@ -57,3 +66,4 @@ fwscanf(FILE *stream, const wchar_t *fmt, ...)
return done;
}
#endif

View file

@ -21,6 +21,14 @@ Cambridge, MA 02139, USA. */
#include <crtdll/wchar.h>
#include <crtdll/alloc.h>
#if 1
int scanf (const char *format, ...)
{
}
#else
/* The function `vscanf' is not defined in ISO C. Therefore we must
use the protected form here. In stdio it is called `__vscanf' and
in libio `_IO_vscanf'. */
@ -35,8 +43,7 @@ int __vscanf (const char *format, va_list arg);
/* Read formatted input from stdin according to the format string FORMAT. */
/* VARARGS1 */
int
scanf (const char *format, ...)
int scanf (const char *format, ...)
{
va_list arg;
int done;
@ -73,3 +80,5 @@ void *alloca(size_t x)
{
return malloc(x);
}
#endif

View file

@ -21,12 +21,19 @@
#include <crtdll/wchar.h>
#include <crtdll/alloc.h>
#if 1
int sscanf (const char *s,const char *format, ...)
{
}
#else
int __vsscanf (const char *s,const char *format,va_list arg);
/* Read formatted input from S, according to the format string FORMAT. */
/* VARARGS2 */
int
sscanf (const char *s,const char *format, ...)
int sscanf (const char *s,const char *format, ...)
{
va_list arg;
int done;
@ -73,3 +80,5 @@ swscanf(const wchar_t *str, const wchar_t *fmt, ...)
}
#endif

View file

@ -3,16 +3,20 @@
/* Compare S1 and S2, returning less than, equal to or
greater than zero if the collated form of S1 is lexicographically
less than, equal to or greater than the collated form of S2. */
int
strcoll (const char *s1,const char *s2)
#if 1
int strcoll (const char* s1, const char* s2)
{
int ret = CompareStringA(LOCALE_USER_DEFAULT,0,s1,strlen(s1),s2,strlen(s2));
if ( ret == 0 )
return 0;
else
return ret - 2;
return 0;
}
#else
int strcoll (const char *s1,const char *s2)
{
int ret;
ret = CompareStringA(LOCALE_USER_DEFAULT,0,s1,strlen(s1),s2,strlen(s2));
if (ret == 0)
return 0;
else
return ret - 2;
return 0;
}
#endif

View file

@ -1,6 +1,11 @@
#include <windows.h>
#include <crtdll/string.h>
#if 1
size_t strxfrm( char *dest, const char *src, size_t n )
{
}
#else
size_t strxfrm( char *dest, const char *src, size_t n )
{
@ -13,4 +18,5 @@ size_t strxfrm( char *dest, const char *src, size_t n )
return -1;
return ret;
}
}
#endif

View file

@ -62,7 +62,9 @@ CloseHandle = CloseHandle@4
;CommConfigDialogW@12
;CompareFileTime@8
;CompareStringA@24
;CompareStringA = CompareStringA@24
;CompareStringW@24
;CompareStringW = CompareStringW@24
;ConnectNamedPipe@8
;ConsoleMenuControl@12
;ContinueDebugEvent@12

View file

@ -42,7 +42,7 @@ NLS_OBJECTS = nls/codepage.o nls/cpmisc.o nls/cptable.o\
nls/lcHRV.o nls/lcHUN.o nls/lcIND.o nls/lcISL.o nls/lcITA.o nls/lcITS.o nls/lcLTH.o nls/lcLVI.o nls/lcNLB.o\
nls/lcNLD.o nls/lcNON.o nls/lcNOR.o nls/lcPLK.o nls/lcPTB.o nls/lcPTG.o nls/lcROM.o nls/lcRUS.o nls/lcSKY.o\
nls/lcSLV.o nls/lcSQI.o nls/lcSRB.o nls/lcSRL.o nls/lcSVE.o nls/lcSVF.o nls/lcTRK.o nls/lcUKR.o\
nls/locale.o nls/mbtowc.o nls/wctomb.o
nls/locale.o nls/mbtowc.o nls/wctomb.o nls/ole2nls.o
THREAD_OBJECTS = thread/thread.o
@ -58,7 +58,7 @@ EXCEPT_OBJECTS = except/except.o
OBJECTS = $(MISC_OBJECTS) $(FILE_OBJECTS) $(THREAD_OBJECTS) \
$(PROCESS_OBJECTS) $(STRING_OBJECTS) $(MEM_OBJECTS) \
$(INTERNAL_OBJECTS) $(SYNCH_OBJECTS) $(EXCEPT_OBJECTS)
$(INTERNAL_OBJECTS) $(SYNCH_OBJECTS) $(EXCEPT_OBJECTS)
ifeq ($(DOSCLI),yes)
CLEAN_FILES = except\*.o file\*.o internal\*.o mem\*.o misc\*.o nls\*.o \
@ -70,6 +70,9 @@ CLEAN_FILES = except/*.o file/*.o internal/*.o mem/*.o misc/*.o nls/*.o \
kernel32.o kernel32.a junk.tmp base.tmp temp.exp kernel32.dll kernel32.sym
endif
nls/ole2nls.o: nls/ole2nls.c
$(CC) $(CFLAGS) -I. nls/ole2nls.c
kernel32.a: $(OBJECTS)
$(AR) csr kernel32.a $(OBJECTS)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -8,15 +8,16 @@
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include "windows.h"
#include "heap.h"
#include "ole.h"
#include "options.h"
#include "winnls.h"
#include "winreg.h"
#include "winerror.h"
#include "debug.h"
#include "main.h"
#include <windows.h>
#include <kernel32/winnls.h>
//#include "heap.h"
//#include "ole.h"
//#include "options.h"
//#include "winnls.h"
//#include "winreg.h"
//#include "winerror.h"
//#include "debug.h"
//#include "main.h"
struct NLS_langlocale {
const int lang;
@ -573,6 +574,7 @@ LCID WINAPI GetSystemDefaultLCID()
/***********************************************************************
* GetUserDefaultLangID (OLE2NLS.3)
*/
#if 0
LANGID WINAPI GetUserDefaultLangID()
{
/* caching result, if defined from environment, which should (?) not change during a WINE session */
@ -616,6 +618,7 @@ LANGID WINAPI GetUserDefaultLangID()
}
return userLCID;
}
#endif
/***********************************************************************
* GetSystemDefaultLangID (OLE2NLS.4)
@ -625,28 +628,19 @@ LANGID WINAPI GetSystemDefaultLangID()
return GetUserDefaultLangID();
}
/******************************************************************************
* GetLocaleInfo16 [OLE2NLS.5]
* Is the last parameter really WORD for Win16?
*/
INT16 WINAPI GetLocaleInfo16(LCID lcid,LCTYPE LCType,LPSTR buf,INT16 len)
{
return GetLocaleInfo32A(lcid,LCType,buf,len);
}
/******************************************************************************
* GetLocaleInfo32A [KERNEL32.342]
*
* NOTES
* LANG_NEUTRAL is equal to LOCALE_SYSTEM_DEFAULT
*/
INT32 WINAPI GetLocaleInfo32A(LCID lcid,LCTYPE LCType,LPSTR buf,INT32 len)
ULONG WINAPI GetLocaleInfo32A(LCID lcid,LCTYPE LCType,LPSTR buf,ULONG len)
{
LPCSTR retString;
int found,i;
int lang=0;
TRACE(ole,"(lcid=0x%lx,lctype=0x%lx,%p,%x)\n",lcid,LCType,buf,len);
DPRINT("(lcid=0x%lx,lctype=0x%lx,%p,%x)\n",lcid,LCType,buf,len);
if (len && (! buf) ) {
SetLastError(ERROR_INSUFFICIENT_BUFFER);
@ -724,7 +718,7 @@ INT32 WINAPI GetLocaleInfo32A(LCID lcid,LCTYPE LCType,LPSTR buf,INT32 len)
* GetLocaleInfo32W [KERNEL32.343]
*
*/
INT32 WINAPI GetLocaleInfo32W(LCID lcid,LCTYPE LCType,LPWSTR wbuf,INT32 len)
ULONG WINAPI GetLocaleInfo32W(LCID lcid,LCTYPE LCType,LPWSTR wbuf,ULONG len)
{ WORD wlen;
LPSTR abuf;
@ -1357,19 +1351,11 @@ static const WORD CT_CType3_LUT[] = {
0x8003 /* ÿ - 255 */
};
/******************************************************************************
* GetStringType16 [OLE2NLS.7]
*/
BOOL16 WINAPI GetStringType16(LCID locale,DWORD dwInfoType,LPCSTR src,
INT16 cchSrc,LPWORD chartype)
{
return GetStringTypeEx32A(locale,dwInfoType,src,cchSrc,chartype);
}
/******************************************************************************
* GetStringType32A [KERNEL32.396]
*/
BOOL32 WINAPI GetStringType32A(LCID locale,DWORD dwInfoType,LPCSTR src,
INT32 cchSrc,LPWORD chartype)
ULONG cchSrc,LPWORD chartype)
{
return GetStringTypeEx32A(locale,dwInfoType,src,cchSrc,chartype);
}
@ -1380,7 +1366,7 @@ BOOL32 WINAPI GetStringType32A(LCID locale,DWORD dwInfoType,LPCSTR src,
* FIXME: Ignores the locale.
*/
BOOL32 WINAPI GetStringTypeEx32A(LCID locale,DWORD dwInfoType,LPCSTR src,
INT32 cchSrc,LPWORD chartype)
ULONG cchSrc,LPWORD chartype)
{
int i;
@ -1438,7 +1424,7 @@ BOOL32 WINAPI GetStringTypeEx32A(LCID locale,DWORD dwInfoType,LPCSTR src,
* NOTES
* Yes, this is missing LCID locale. MS fault.
*/
BOOL32 WINAPI GetStringType32W(DWORD dwInfoType,LPCWSTR src,INT32 cchSrc,
BOOL32 WINAPI GetStringType32W(DWORD dwInfoType,LPCWSTR src,ULONG cchSrc,
LPWORD chartype)
{
return GetStringTypeEx32W(0/*defaultlocale*/,dwInfoType,src,cchSrc,chartype);
@ -1450,9 +1436,9 @@ BOOL32 WINAPI GetStringType32W(DWORD dwInfoType,LPCWSTR src,INT32 cchSrc,
* FIXME: unicode chars are assumed chars
*/
BOOL32 WINAPI GetStringTypeEx32W(LCID locale,DWORD dwInfoType,LPCWSTR src,
INT32 cchSrc,LPWORD chartype)
ULONG cchSrc,LPWORD chartype)
{
int i;
int i;
if (cchSrc==-1)
@ -1484,42 +1470,11 @@ BOOL32 WINAPI GetStringTypeEx32W(LCID locale,DWORD dwInfoType,LPCWSTR src,
return TRUE;
}
/*****************************************************************
* VerLanguageName16 [VER.10]
*/
DWORD WINAPI VerLanguageName16(UINT16 langid,LPSTR langname,UINT16 langnamelen)
{
int i;
DWORD result;
char buffer[80];
TRACE(ver,"(%d,%p,%d)\n",langid,langname,langnamelen);
/* First, check \System\CurrentControlSet\control\Nls\Locale\<langid>
* from the registry.
*/
sprintf(buffer,
"\\System\\CurrentControlSet\\control\\Nls\\Locale\\%08x",
langid);
result = RegQueryValue16(HKEY_LOCAL_MACHINE, buffer, langname,
(LPDWORD)&langnamelen);
if (result == ERROR_SUCCESS) {
langname[langnamelen-1]='\0';
return langnamelen;
}
/* if that fails, use the internal table */
for (i=0;languages[i].langid!=0;i++)
if (langid==languages[i].langid)
break;
strncpy(langname,languages[i].langname,langnamelen);
langname[langnamelen-1]='\0';
return strlen(languages[i].langname);
}
/*****************************************************************
* VerLanguageName32A [VERSION.9]
*/
DWORD WINAPI VerLanguageName32A(UINT32 langid,LPSTR langname,
UINT32 langnamelen)
DWORD WINAPI VerLanguageName32A(ULONG langid,LPSTR langname,
ULONG langnamelen)
{
return VerLanguageName16(langid,langname,langnamelen);
}
@ -1527,8 +1482,8 @@ DWORD WINAPI VerLanguageName32A(UINT32 langid,LPSTR langname,
/*****************************************************************
* VerLanguageName32W [VERSION.10]
*/
DWORD WINAPI VerLanguageName32W(UINT32 langid,LPWSTR langname,
UINT32 langnamelen)
DWORD WINAPI VerLanguageName32W(ULONG langid,LPWSTR langname,
ULONG langnamelen)
{
int i;
LPWSTR keyname;
@ -1994,15 +1949,15 @@ static int identity(int c)
* to make MS Word 95 not print several thousand fixme messages for
* this function.
*/
INT32 WINAPI LCMapString32A(
ULONG WINAPI LCMapString32A(
LCID lcid /* locale identifier created with MAKELCID;
LOCALE_SYSTEM_DEFAULT and LOCALE_USER_DEFAULT are
predefined values. */,
DWORD mapflags /* flags */,
LPCSTR srcstr /* source buffer */,
INT32 srclen /* source length */,
ULONG srclen /* source length */,
LPSTR dststr /* destination buffer */,
INT32 dstlen /* destination buffer length */)
ULONG dstlen /* destination buffer length */)
{
int i;
@ -2197,9 +2152,9 @@ INT32 WINAPI LCMapString32A(
*
* See LCMapString32A for documentation
*/
INT32 WINAPI LCMapString32W(
LCID lcid,DWORD mapflags,LPCWSTR srcstr,INT32 srclen,LPWSTR dststr,
INT32 dstlen)
ULONG WINAPI LCMapString32W(
LCID lcid,DWORD mapflags,LPCWSTR srcstr,ULONG srclen,LPWSTR dststr,
ULONG dstlen)
{
int i;
@ -2271,7 +2226,7 @@ UINT16 WINAPI CompareString16(DWORD lcid,DWORD fdwStyle,
*
* Quite inefficient.
*/
UINT32 WINAPI CompareString32A(
ULONG WINAPI CompareStringA(
DWORD lcid, /* locale ID */
DWORD fdwStyle, /* comparison-style options */
LPCSTR s1, /* first string */
@ -2334,7 +2289,7 @@ UINT32 WINAPI CompareString32A(
* FIXME : Does only string sort. Should
* be reimplemented the same way as CompareString32A.
*/
UINT32 WINAPI CompareString32W(DWORD lcid, DWORD fdwStyle,
ULONG WINAPI CompareStringW(DWORD lcid, DWORD fdwStyle,
LPCWSTR s1, DWORD l1, LPCWSTR s2,DWORD l2)
{
int len,ret;
@ -2394,15 +2349,15 @@ UINT32 WINAPI CompareString32W(DWORD lcid, DWORD fdwStyle,
These functions REQUIRE valid locale, date, and format.
*/
static INT32 OLE_GetFormatA(LCID locale,
static ULONG OLE_GetFormatA(LCID locale,
DWORD flags,
DWORD tflags,
LPSYSTEMTIME xtime,
LPCSTR _format, /*in*/
LPSTR date, /*out*/
INT32 datelen)
ULONG datelen)
{
INT32 inpos, outpos;
ULONG inpos, outpos;
int count, type, inquote, Overflow;
char buf[40];
char format[40];
@ -2606,12 +2561,12 @@ static INT32 OLE_GetFormatA(LCID locale,
/******************************************************************************
* OLE_GetFormatW [INTERNAL]
*/
static INT32 OLE_GetFormatW(LCID locale, DWORD flags, DWORD tflags,
static ULONG OLE_GetFormatW(LCID locale, DWORD flags, DWORD tflags,
LPSYSTEMTIME xtime,
LPCWSTR format,
LPWSTR output, INT32 outlen)
LPWSTR output, ULONG outlen)
{
INT32 inpos, outpos;
ULONG inpos, outpos;
int count, type=0, inquote;
int Overflow; /* loop check */
WCHAR buf[40];
@ -2829,9 +2784,9 @@ static INT32 OLE_GetFormatW(LCID locale, DWORD flags, DWORD tflags,
* - gg era string
*
*/
INT32 WINAPI GetDateFormat32A(LCID locale,DWORD flags,
ULONG WINAPI GetDateFormat32A(LCID locale,DWORD flags,
LPSYSTEMTIME xtime,
LPCSTR format, LPSTR date,INT32 datelen)
LPCSTR format, LPSTR date,ULONG datelen)
{
char format_buf[40];
@ -2839,7 +2794,7 @@ INT32 WINAPI GetDateFormat32A(LCID locale,DWORD flags,
SYSTEMTIME t;
LPSYSTEMTIME thistime;
LCID thislocale;
INT32 ret;
ULONG ret;
TRACE(ole,"(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",
locale,flags,xtime,format,date,datelen);
@ -2892,7 +2847,7 @@ INT32 WINAPI GetDateFormat32A(LCID locale,DWORD flags,
* Accepts & returns sizes as counts of Unicode characters.
*
*/
INT32 WINAPI GetDateFormat32W(LCID locale,DWORD flags,
ULONG WINAPI GetDateFormat32W(LCID locale,DWORD flags,
LPSYSTEMTIME xtime,
LPCWSTR format,
LPWSTR date, INT32 datelen)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more