Commit 6c5ec62d authored by Tor Lillqvist's avatar Tor Lillqvist Committed by Tor Lillqvist

glib.h Rename Win32-only functions from gwin_* to g_win32_* to match the

1999-11-01  Tor Lillqvist  <tml@iki.fi>

* glib.h
* glib.def: Rename Win32-only functions from gwin_* to g_win32_*
to match the GLib naming conventions.

* gutils.c
* gwin32.c
* testglib.c
* makefile.{cygwin,msc}: Move the Win32-only functions to the new
file gwin32.c
parent 5bca2880
1999-11-01 Tor Lillqvist <tml@iki.fi>
* glib.h
* glib.def: Rename Win32-only functions from gwin_* to g_win32_*
to match the GLib naming conventions.
* gutils.c
* gwin32.c
* testglib.c
* makefile.{cygwin,msc}: Move the Win32-only functions to the new
file gwin32.c
1999-10-31 Tor Lillqvist <tml@iki.fi>
* gutils.c (gwin_getlocale): New Win32-specific function, returns
......
1999-11-01 Tor Lillqvist <tml@iki.fi>
* glib.h
* glib.def: Rename Win32-only functions from gwin_* to g_win32_*
to match the GLib naming conventions.
* gutils.c
* gwin32.c
* testglib.c
* makefile.{cygwin,msc}: Move the Win32-only functions to the new
file gwin32.c
1999-10-31 Tor Lillqvist <tml@iki.fi>
* gutils.c (gwin_getlocale): New Win32-specific function, returns
......
1999-11-01 Tor Lillqvist <tml@iki.fi>
* glib.h
* glib.def: Rename Win32-only functions from gwin_* to g_win32_*
to match the GLib naming conventions.
* gutils.c
* gwin32.c
* testglib.c
* makefile.{cygwin,msc}: Move the Win32-only functions to the new
file gwin32.c
1999-10-31 Tor Lillqvist <tml@iki.fi>
* gutils.c (gwin_getlocale): New Win32-specific function, returns
......
1999-11-01 Tor Lillqvist <tml@iki.fi>
* glib.h
* glib.def: Rename Win32-only functions from gwin_* to g_win32_*
to match the GLib naming conventions.
* gutils.c
* gwin32.c
* testglib.c
* makefile.{cygwin,msc}: Move the Win32-only functions to the new
file gwin32.c
1999-10-31 Tor Lillqvist <tml@iki.fi>
* gutils.c (gwin_getlocale): New Win32-specific function, returns
......
1999-11-01 Tor Lillqvist <tml@iki.fi>
* glib.h
* glib.def: Rename Win32-only functions from gwin_* to g_win32_*
to match the GLib naming conventions.
* gutils.c
* gwin32.c
* testglib.c
* makefile.{cygwin,msc}: Move the Win32-only functions to the new
file gwin32.c
1999-10-31 Tor Lillqvist <tml@iki.fi>
* gutils.c (gwin_getlocale): New Win32-specific function, returns
......
1999-11-01 Tor Lillqvist <tml@iki.fi>
* glib.h
* glib.def: Rename Win32-only functions from gwin_* to g_win32_*
to match the GLib naming conventions.
* gutils.c
* gwin32.c
* testglib.c
* makefile.{cygwin,msc}: Move the Win32-only functions to the new
file gwin32.c
1999-10-31 Tor Lillqvist <tml@iki.fi>
* gutils.c (gwin_getlocale): New Win32-specific function, returns
......
1999-11-01 Tor Lillqvist <tml@iki.fi>
* glib.h
* glib.def: Rename Win32-only functions from gwin_* to g_win32_*
to match the GLib naming conventions.
* gutils.c
* gwin32.c
* testglib.c
* makefile.{cygwin,msc}: Move the Win32-only functions to the new
file gwin32.c
1999-10-31 Tor Lillqvist <tml@iki.fi>
* gutils.c (gwin_getlocale): New Win32-specific function, returns
......
1999-11-01 Tor Lillqvist <tml@iki.fi>
* glib.h
* glib.def: Rename Win32-only functions from gwin_* to g_win32_*
to match the GLib naming conventions.
* gutils.c
* gwin32.c
* testglib.c
* makefile.{cygwin,msc}: Move the Win32-only functions to the new
file gwin32.c
1999-10-31 Tor Lillqvist <tml@iki.fi>
* gutils.c (gwin_getlocale): New Win32-specific function, returns
......
......@@ -434,14 +434,14 @@ EXPORTS
g_tuples_index
g_usleep
g_vsnprintf
g_win32_closedir
g_win32_ftruncate
g_win32_getlocale
g_win32_opendir
g_win32_readdir
g_win32_rewinddir
glib_binary_age
glib_interface_age
glib_major_version
glib_micro_version
glib_minor_version
gwin_closedir
gwin_ftruncate
gwin_getlocale
gwin_opendir
gwin_readdir
gwin_rewinddir
......@@ -2843,17 +2843,17 @@ typedef int pid_t;
#define pipe(phandles) _pipe (phandles, 4096, _O_BINARY)
/* For some POSIX functions that are not provided by the MS runtime,
* we provide emulators in glib, which are prefixed with gwin_.
* we provide emulators in glib, which are prefixed with g_win32_.
*/
# define ftruncate(fd, size) gwin_ftruncate (fd, size)
# define ftruncate(fd, size) g_win32_ftruncate (fd, size)
/* -lmingw32 also has emulations for these, but we need our own
* for MSVC anyhow, so we might aswell use them always.
*/
# define opendir gwin_opendir
# define readdir gwin_readdir
# define rewinddir gwin_rewinddir
# define closedir gwin_closedir
# define opendir g_win32_opendir
# define readdir g_win32_readdir
# define rewinddir g_win32_rewinddir
# define closedir g_win32_closedir
# define NAME_MAX 255
struct DIR
......@@ -2869,12 +2869,12 @@ struct dirent
gchar d_name[NAME_MAX + 1];
};
/* emulation functions */
extern int gwin_ftruncate (gint f,
guint size);
DIR* gwin_opendir (const gchar *dirname);
struct dirent* gwin_readdir (DIR *dir);
void gwin_rewinddir (DIR *dir);
gint gwin_closedir (DIR *dir);
extern int g_win32_ftruncate (gint f,
guint size);
DIR* g_win32_opendir (const gchar *dirname);
struct dirent* g_win32_readdir (DIR *dir);
void g_win32_rewinddir (DIR *dir);
gint g_win32_closedir (DIR *dir);
/* The MS setlocale uses locale names of the form "English_United
* States.1252" etc. We want the Unixish standard form "en", "zh_TW"
......@@ -2882,7 +2882,7 @@ gint gwin_closedir (DIR *dir);
* returns it as a string of the above form for use in forming file
* names etc. The returned string should be deallocated with g_free().
*/
gchar * gwin_getlocale (void);
gchar * g_win32_getlocale (void);
#endif /* G_OS_WIN32 */
......
......@@ -434,14 +434,14 @@ EXPORTS
g_tuples_index
g_usleep
g_vsnprintf
g_win32_closedir
g_win32_ftruncate
g_win32_getlocale
g_win32_opendir
g_win32_readdir
g_win32_rewinddir
glib_binary_age
glib_interface_age
glib_major_version
glib_micro_version
glib_minor_version
gwin_closedir
gwin_ftruncate
gwin_getlocale
gwin_opendir
gwin_readdir
gwin_rewinddir
......@@ -2843,17 +2843,17 @@ typedef int pid_t;
#define pipe(phandles) _pipe (phandles, 4096, _O_BINARY)
/* For some POSIX functions that are not provided by the MS runtime,
* we provide emulators in glib, which are prefixed with gwin_.
* we provide emulators in glib, which are prefixed with g_win32_.
*/
# define ftruncate(fd, size) gwin_ftruncate (fd, size)
# define ftruncate(fd, size) g_win32_ftruncate (fd, size)
/* -lmingw32 also has emulations for these, but we need our own
* for MSVC anyhow, so we might aswell use them always.
*/
# define opendir gwin_opendir
# define readdir gwin_readdir
# define rewinddir gwin_rewinddir
# define closedir gwin_closedir
# define opendir g_win32_opendir
# define readdir g_win32_readdir
# define rewinddir g_win32_rewinddir
# define closedir g_win32_closedir
# define NAME_MAX 255
struct DIR
......@@ -2869,12 +2869,12 @@ struct dirent
gchar d_name[NAME_MAX + 1];
};
/* emulation functions */
extern int gwin_ftruncate (gint f,
guint size);
DIR* gwin_opendir (const gchar *dirname);
struct dirent* gwin_readdir (DIR *dir);
void gwin_rewinddir (DIR *dir);
gint gwin_closedir (DIR *dir);
extern int g_win32_ftruncate (gint f,
guint size);
DIR* g_win32_opendir (const gchar *dirname);
struct dirent* g_win32_readdir (DIR *dir);
void g_win32_rewinddir (DIR *dir);
gint g_win32_closedir (DIR *dir);
/* The MS setlocale uses locale names of the form "English_United
* States.1252" etc. We want the Unixish standard form "en", "zh_TW"
......@@ -2882,7 +2882,7 @@ gint gwin_closedir (DIR *dir);
* returns it as a string of the above form for use in forming file
* names etc. The returned string should be deallocated with g_free().
*/
gchar * gwin_getlocale (void);
gchar * g_win32_getlocale (void);
#endif /* G_OS_WIN32 */
......
......@@ -53,7 +53,6 @@
#ifdef G_OS_WIN32
# define STRICT /* Strict typing, please */
# include <windows.h>
# include <direct.h>
# include <errno.h>
# include <ctype.h>
# ifdef _MSC_VER
......@@ -703,741 +702,3 @@ g_int_hash (gconstpointer v)
{
return *(const gint*) v;
}
#ifdef G_OS_WIN32
int
gwin_ftruncate (gint fd,
guint size)
{
HANDLE hfile;
guint curpos;
g_return_val_if_fail (fd >= 0, -1);
hfile = (HANDLE) _get_osfhandle (fd);
curpos = SetFilePointer (hfile, 0, NULL, FILE_CURRENT);
if (curpos == 0xFFFFFFFF
|| SetFilePointer (hfile, size, NULL, FILE_BEGIN) == 0xFFFFFFFF
|| !SetEndOfFile (hfile))
{
gint error = GetLastError ();
switch (error)
{
case ERROR_INVALID_HANDLE:
errno = EBADF;
break;
default:
errno = EIO;
break;
}
return -1;
}
return 0;
}
DIR*
gwin_opendir (const char *dirname)
{
DIR *result;
gchar *mask;
guint k;
g_return_val_if_fail (dirname != NULL, NULL);
result = g_new0 (DIR, 1);
result->find_file_data = g_new0 (WIN32_FIND_DATA, 1);
result->dir_name = g_strdup (dirname);
k = strlen (result->dir_name);
if (k && result->dir_name[k - 1] == '\\')
{
result->dir_name[k - 1] = '\0';
k--;
}
mask = g_strdup_printf ("%s\\*", result->dir_name);
result->find_file_handle = (guint) FindFirstFile (mask,
(LPWIN32_FIND_DATA) result->find_file_data);
g_free (mask);
if (result->find_file_handle == (guint) INVALID_HANDLE_VALUE)
{
int error = GetLastError ();
g_free (result->dir_name);
g_free (result->find_file_data);
g_free (result);
switch (error)
{
default:
errno = EIO;
return NULL;
}
}
result->just_opened = TRUE;
return result;
}
struct dirent*
gwin_readdir (DIR *dir)
{
static struct dirent result;
g_return_val_if_fail (dir != NULL, NULL);
if (dir->just_opened)
dir->just_opened = FALSE;
else
{
if (!FindNextFile ((HANDLE) dir->find_file_handle,
(LPWIN32_FIND_DATA) dir->find_file_data))
{
int error = GetLastError ();
switch (error)
{
case ERROR_NO_MORE_FILES:
return NULL;
default:
errno = EIO;
return NULL;
}
}
}
strcpy (result.d_name, g_basename (((LPWIN32_FIND_DATA) dir->find_file_data)->cFileName));
return &result;
}
void
gwin_rewinddir (DIR *dir)
{
gchar *mask;
g_return_if_fail (dir != NULL);
if (!FindClose ((HANDLE) dir->find_file_handle))
g_warning ("gwin_rewinddir(): FindClose() failed\n");
mask = g_strdup_printf ("%s\\*", dir->dir_name);
dir->find_file_handle = (guint) FindFirstFile (mask,
(LPWIN32_FIND_DATA) dir->find_file_data);
g_free (mask);
if (dir->find_file_handle == (guint) INVALID_HANDLE_VALUE)
{
int error = GetLastError ();
switch (error)
{
default:
errno = EIO;
return;
}
}
dir->just_opened = TRUE;
}
gint
gwin_closedir (DIR *dir)
{
g_return_val_if_fail (dir != NULL, -1);
if (!FindClose ((HANDLE) dir->find_file_handle))
{
int error = GetLastError ();
switch (error)
{
default:
errno = EIO; return -1;
}
}
g_free (dir->dir_name);
g_free (dir->find_file_data);
g_free (dir);
return 0;
}
/* Mingw32 headers don't have latest language and sublanguage codes */
#ifndef LANG_AFRIKAANS
#define LANG_AFRIKAANS 0x36
#endif
#ifndef LANG_ALBANIAN
#define LANG_ALBANIAN 0x1c
#endif
#ifndef LANG_ARABIC
#define LANG_ARABIC 0x01
#endif
#ifndef LANG_ARMENIAN
#define LANG_ARMENIAN 0x2b
#endif
#ifndef LANG_ASSAMESE
#define LANG_ASSAMESE 0x4d
#endif
#ifndef LANG_AZERI
#define LANG_AZERI 0x2c
#endif
#ifndef LANG_BASQUE
#define LANG_BASQUE 0x2d
#endif
#ifndef LANG_BELARUSIAN
#define LANG_BELARUSIAN 0x23
#endif
#ifndef LANG_BENGALI
#define LANG_BENGALI 0x45
#endif
#ifndef LANG_CATALAN
#define LANG_CATALAN 0x03
#endif
#ifndef LANG_ESTONIAN
#define LANG_ESTONIAN 0x25
#endif
#ifndef LANG_FAEROESE
#define LANG_FAEROESE 0x38
#endif
#ifndef LANG_FARSI
#define LANG_FARSI 0x29
#endif
#ifndef LANG_GEORGIAN
#define LANG_GEORGIAN 0x37
#endif
#ifndef LANG_GUJARATI
#define LANG_GUJARATI 0x47
#endif
#ifndef LANG_HEBREW
#define LANG_HEBREW 0x0d
#endif
#ifndef LANG_HINDI
#define LANG_HINDI 0x39
#endif
#ifndef LANG_INDONESIAN
#define LANG_INDONESIAN 0x21
#endif
#ifndef LANG_KANNADA
#define LANG_KANNADA 0x4b
#endif
#ifndef LANG_KASHMIRI
#define LANG_KASHMIRI 0x60
#endif
#ifndef LANG_KAZAK
#define LANG_KAZAK 0x3f
#endif
#ifndef LANG_KONKANI
#define LANG_KONKANI 0x57
#endif
#ifndef LANG_LATVIAN
#define LANG_LATVIAN 0x26
#endif
#ifndef LANG_LITHUANIAN
#define LANG_LITHUANIAN 0x27
#endif
#ifndef LANG_MACEDONIAN
#define LANG_MACEDONIAN 0x2f
#endif
#ifndef LANG_MALAY
#define LANG_MALAY 0x3e
#endif
#ifndef LANG_MALAYALAM
#define LANG_MALAYALAM 0x4c
#endif
#ifndef LANG_MANIPURI
#define LANG_MANIPURI 0x58
#endif
#ifndef LANG_MARATHI
#define LANG_MARATHI 0x4e
#endif
#ifndef LANG_NEPALI
#define LANG_NEPALI 0x61
#endif
#ifndef LANG_ORIYA
#define LANG_ORIYA 0x48
#endif
#ifndef LANG_PUNJABI
#define LANG_PUNJABI 0x46
#endif
#ifndef LANG_SANSKRIT
#define LANG_SANSKRIT 0x4f
#endif
#ifndef LANG_SERBIAN
#define LANG_SERBIAN 0x1a
#endif
#ifndef LANG_SINDHI
#define LANG_SINDHI 0x59
#endif
#ifndef LANG_SLOVAK
#define LANG_SLOVAK 0x1b
#endif
#ifndef LANG_SWAHILI
#define LANG_SWAHILI 0x41
#endif
#ifndef LANG_TAMIL
#define LANG_TAMIL 0x49
#endif
#ifndef LANG_TATAR
#define LANG_TATAR 0x44
#endif
#ifndef LANG_TELUGU
#define LANG_TELUGU 0x4a
#endif
#ifndef LANG_THAI
#define LANG_THAI 0x1e
#endif
#ifndef LANG_UKRAINIAN
#define LANG_UKRAINIAN 0x22
#endif
#ifndef LANG_URDU
#define LANG_URDU 0x20
#endif
#ifndef LANG_UZBEK
#define LANG_UZBEK 0x43
#endif
#ifndef LANG_VIETNAMESE
#define LANG_VIETNAMESE 0x2a
#endif
#ifndef SUBLANG_ARABIC_SAUDI_ARABIA
#define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
#endif
#ifndef SUBLANG_ARABIC_IRAQ
#define SUBLANG_ARABIC_IRAQ 0x02
#endif
#ifndef SUBLANG_ARABIC_EGYPT
#define SUBLANG_ARABIC_EGYPT 0x03
#endif
#ifndef SUBLANG_ARABIC_LIBYA
#define SUBLANG_ARABIC_LIBYA 0x04
#endif
#ifndef SUBLANG_ARABIC_ALGERIA
#define SUBLANG_ARABIC_ALGERIA 0x05
#endif
#ifndef SUBLANG_ARABIC_MOROCCO
#define SUBLANG_ARABIC_MOROCCO 0x06
#endif
#ifndef SUBLANG_ARABIC_TUNISIA
#define SUBLANG_ARABIC_TUNISIA 0x07
#endif
#ifndef SUBLANG_ARABIC_OMAN
#define SUBLANG_ARABIC_OMAN 0x08
#endif
#ifndef SUBLANG_ARABIC_YEMEN
#define SUBLANG_ARABIC_YEMEN 0x09
#endif
#ifndef SUBLANG_ARABIC_SYRIA
#define SUBLANG_ARABIC_SYRIA 0x0a
#endif
#ifndef SUBLANG_ARABIC_JORDAN
#define SUBLANG_ARABIC_JORDAN 0x0b
#endif
#ifndef SUBLANG_ARABIC_LEBANON
#define SUBLANG_ARABIC_LEBANON 0x0c
#endif
#ifndef SUBLANG_ARABIC_KUWAIT
#define SUBLANG_ARABIC_KUWAIT 0x0d
#endif
#ifndef SUBLANG_ARABIC_UAE
#define SUBLANG_ARABIC_UAE 0x0e
#endif
#ifndef SUBLANG_ARABIC_BAHRAIN
#define SUBLANG_ARABIC_BAHRAIN 0x0f
#endif
#ifndef SUBLANG_ARABIC_QATAR
#define SUBLANG_ARABIC_QATAR 0x10
#endif
#ifndef SUBLANG_AZERI_LATIN
#define SUBLANG_AZERI_LATIN 0x01
#endif
#ifndef SUBLANG_AZERI_CYRILLIC
#define SUBLANG_AZERI_CYRILLIC 0x02
#endif
#ifndef SUBLANG_CHINESE_MACAU
#define SUBLANG_CHINESE_MACAU 0x05
#endif
#ifndef SUBLANG_ENGLISH_SOUTH_AFRICA
#define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
#endif
#ifndef SUBLANG_ENGLISH_JAMAICA
#define SUBLANG_ENGLISH_JAMAICA 0x08
#endif
#ifndef SUBLANG_ENGLISH_CARIBBEAN
#define SUBLANG_ENGLISH_CARIBBEAN 0x09
#endif
#ifndef SUBLANG_ENGLISH_BELIZE
#define SUBLANG_ENGLISH_BELIZE 0x0a
#endif
#ifndef SUBLANG_ENGLISH_TRINIDAD
#define SUBLANG_ENGLISH_TRINIDAD 0x0b
#endif
#ifndef SUBLANG_ENGLISH_ZIMBABWE
#define SUBLANG_ENGLISH_ZIMBABWE 0x0c
#endif
#ifndef SUBLANG_ENGLISH_PHILIPPINES
#define SUBLANG_ENGLISH_PHILIPPINES 0x0d
#endif
#ifndef SUBLANG_FRENCH_LUXEMBOURG
#define SUBLANG_FRENCH_LUXEMBOURG 0x05
#endif
#ifndef SUBLANG_FRENCH_MONACO
#define SUBLANG_FRENCH_MONACO 0x06
#endif
#ifndef SUBLANG_GERMAN_LUXEMBOURG
#define SUBLANG_GERMAN_LUXEMBOURG 0x04
#endif
#ifndef SUBLANG_GERMAN_LIECHTENSTEIN
#define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
#endif
#ifndef SUBLANG_KASHMIRI_INDIA
#define SUBLANG_KASHMIRI_INDIA 0x02
#endif
#ifndef SUBLANG_MALAY_MALAYSIA
#define SUBLANG_MALAY_MALAYSIA 0x01
#endif
#ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM
#define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
#endif
#ifndef SUBLANG_NEPALI_INDIA
#define SUBLANG_NEPALI_INDIA 0x02
#endif
#ifndef SUBLANG_SERBIAN_LATIN
#define SUBLANG_SERBIAN_LATIN 0x02
#endif
#ifndef SUBLANG_SERBIAN_CYRILLIC
#define SUBLANG_SERBIAN_CYRILLIC 0x03
#endif
#ifndef SUBLANG_SPANISH_GUATEMALA
#define SUBLANG_SPANISH_GUATEMALA 0x04
#endif
#ifndef SUBLANG_SPANISH_COSTA_RICA
#define SUBLANG_SPANISH_COSTA_RICA 0x05
#endif
#ifndef SUBLANG_SPANISH_PANAMA
#define SUBLANG_SPANISH_PANAMA 0x06
#endif
#ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC
#define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
#endif
#ifndef SUBLANG_SPANISH_VENEZUELA
#define SUBLANG_SPANISH_VENEZUELA 0x08
#endif
#ifndef SUBLANG_SPANISH_COLOMBIA
#define SUBLANG_SPANISH_COLOMBIA 0x09
#endif
#ifndef SUBLANG_SPANISH_PERU
#define SUBLANG_SPANISH_PERU 0x0a
#endif
#ifndef SUBLANG_SPANISH_ARGENTINA
#define SUBLANG_SPANISH_ARGENTINA 0x0b
#endif
#ifndef SUBLANG_SPANISH_ECUADOR
#define SUBLANG_SPANISH_ECUADOR 0x0c
#endif
#ifndef SUBLANG_SPANISH_CHILE
#define SUBLANG_SPANISH_CHILE 0x0d
#endif
#ifndef SUBLANG_SPANISH_URUGUAY
#define SUBLANG_SPANISH_URUGUAY 0x0e
#endif
#ifndef SUBLANG_SPANISH_PARAGUAY
#define SUBLANG_SPANISH_PARAGUAY 0x0f
#endif
#ifndef SUBLANG_SPANISH_BOLIVIA
#define SUBLANG_SPANISH_BOLIVIA 0x10
#endif
#ifndef SUBLANG_SPANISH_EL_SALVADOR
#define SUBLANG_SPANISH_EL_SALVADOR 0x11
#endif
#ifndef SUBLANG_SPANISH_HONDURAS
#define SUBLANG_SPANISH_HONDURAS 0x12
#endif
#ifndef SUBLANG_SPANISH_NICARAGUA
#define SUBLANG_SPANISH_NICARAGUA 0x13
#endif
#ifndef SUBLANG_SPANISH_PUERTO_RICO
#define SUBLANG_SPANISH_PUERTO_RICO 0x14
#endif
#ifndef SUBLANG_SWEDISH_FINLAND
#define SUBLANG_SWEDISH_FINLAND 0x02
#endif
#ifndef SUBLANG_URDU_PAKISTAN
#define SUBLANG_URDU_PAKISTAN 0x01
#endif
#ifndef SUBLANG_URDU_INDIA
#define SUBLANG_URDU_INDIA 0x02
#endif
#ifndef SUBLANG_UZBEK_LATIN
#define SUBLANG_UZBEK_LATIN 0x01
#endif
#ifndef SUBLANG_UZBEK_CYRILLIC
#define SUBLANG_UZBEK_CYRILLIC 0x02
#endif
gchar *
gwin_getlocale (void)
{
LCID lcid = GetThreadLocale ();
gint primary, sub;
gchar *l = NULL, *sl = NULL;
gchar bfr[20];
primary = PRIMARYLANGID (LANGIDFROMLCID (lcid));
sub = SUBLANGID (LANGIDFROMLCID (lcid));
switch (primary)