Fixed GetLocaleInfoW to handle Unicode properly and completed
implementation.
Update win.ini and registry on startup when language changed.
More logical priority order for locale environment variables.
Implemented SetLocaleInfoW.
Moved some locale functions to kernel32.dll.

diff --git a/include/thread.h b/include/thread.h
index 44648ab..8725299 100644
--- a/include/thread.h
+++ b/include/thread.h
@@ -103,7 +103,8 @@
     DWORD        unknown6[5];    /* --n 1e8 Unknown */
 
     /* The following are Wine-specific fields (NT: GDI stuff) */
-    DWORD        unused[4];      /* --3 1fc Was server buffer */
+    UINT         code_page;      /* --3 1fc Thread code page */
+    DWORD        unused[3];      /* --3 200 Was server buffer */
     int          request_fd;     /* --3 20c fd for sending server requests */
     int          reply_fd;       /* --3 210 fd for receiving server replies */
     int          wait_fd[2];     /* --3 214 fd for sleeping server requests */
diff --git a/include/winnls.h b/include/winnls.h
index 7cec81b..4f1bc7e 100644
--- a/include/winnls.h
+++ b/include/winnls.h
@@ -39,8 +39,6 @@
 #define	LOCALE_USE_CP_ACP	    0x40000000
 #define	LOCALE_RETURN_NUMBER	    0x20000000
 
-#define LOCALE_LOCALEINFOFLAGSMASK  0xC0000000
-
 /* When adding new defines, don't forget to add an entry to the
  * locale_name2id map in ole/ole2nls.c
  */