1999-11-01 21:46:44 +01:00
|
|
|
/* GLIB - Library of useful routines for C programming
|
|
|
|
* Copyright (C) 1995-1998 Peter Mattis, Spencer Kimball and Josh MacDonald
|
|
|
|
* Copyright (C) 1998-1999 Tor Lillqvist
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
2000-07-26 13:02:02 +02:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
1999-11-01 21:46:44 +01:00
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 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
|
2000-07-26 13:02:02 +02:00
|
|
|
* Lesser General Public License for more details.
|
1999-11-01 21:46:44 +01:00
|
|
|
*
|
2000-07-26 13:02:02 +02:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
1999-11-01 21:46:44 +01:00
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2000-07-26 13:02:02 +02:00
|
|
|
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
1999-11-01 21:46:44 +01:00
|
|
|
* file for a list of people on the GLib Team. See the ChangeLog
|
|
|
|
* files for a list of changes. These files are distributed with
|
|
|
|
* GLib at ftp://ftp.gtk.org/pub/gtk/.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* MT safe for the unix part, FIXME: make the win32 part MT safe as well.
|
|
|
|
*/
|
|
|
|
|
2002-12-04 02:27:44 +01:00
|
|
|
#include "config.h"
|
1999-11-01 21:46:44 +01:00
|
|
|
|
2004-09-16 08:05:53 +02:00
|
|
|
#include "galias.h"
|
1999-11-01 21:46:44 +01:00
|
|
|
#include "glibconfig.h"
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <errno.h>
|
|
|
|
|
|
|
|
#define STRICT /* Strict typing, please */
|
|
|
|
#include <windows.h>
|
2001-03-09 22:31:21 +01:00
|
|
|
#undef STRICT
|
|
|
|
#ifndef G_WITH_CYGWIN
|
1999-11-01 21:46:44 +01:00
|
|
|
#include <direct.h>
|
2001-03-09 22:31:21 +01:00
|
|
|
#endif
|
1999-11-01 21:46:44 +01:00
|
|
|
#include <errno.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
# include <io.h>
|
|
|
|
#endif /* _MSC_VER */
|
|
|
|
|
|
|
|
#include "glib.h"
|
|
|
|
|
2001-03-09 22:31:21 +01:00
|
|
|
#ifdef G_WITH_CYGWIN
|
|
|
|
#include <sys/cygwin.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef G_WITH_CYGWIN
|
|
|
|
|
|
|
|
gint
|
1999-11-01 21:46:44 +01:00
|
|
|
g_win32_ftruncate (gint fd,
|
|
|
|
guint size)
|
|
|
|
{
|
2004-09-15 21:12:19 +02:00
|
|
|
return _chsize (fd, size);
|
1999-11-01 21:46:44 +01:00
|
|
|
}
|
|
|
|
|
2001-03-09 22:31:21 +01:00
|
|
|
#endif
|
1999-11-01 21:46:44 +01:00
|
|
|
|
2001-01-17 22:37:32 +01:00
|
|
|
/**
|
|
|
|
* g_win32_getlocale:
|
|
|
|
*
|
2004-10-31 17:31:41 +01:00
|
|
|
* The setlocale() function in the Microsoft C library uses locale
|
|
|
|
* names of the form "English_United States.1252" etc. We want the
|
|
|
|
* UNIXish standard form "en_US", "zh_TW" etc. This function gets the
|
|
|
|
* current thread locale from Windows - without any encoding info -
|
|
|
|
* and 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().
|
2001-04-16 22:05:25 +02:00
|
|
|
*
|
2001-10-01 20:54:27 +02:00
|
|
|
* Returns: newly-allocated locale name.
|
2001-10-03 22:19:13 +02:00
|
|
|
**/
|
2001-01-17 22:37:32 +01:00
|
|
|
|
2004-04-10 05:43:39 +02:00
|
|
|
/* Borrowed from GNU gettext 0.13.1: */
|
|
|
|
/* Mingw 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_AMHARIC
|
|
|
|
#define LANG_AMHARIC 0x5e
|
|
|
|
#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_BURMESE
|
|
|
|
#define LANG_BURMESE 0x55
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_CAMBODIAN
|
|
|
|
#define LANG_CAMBODIAN 0x53
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_CATALAN
|
|
|
|
#define LANG_CATALAN 0x03
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_CHEROKEE
|
|
|
|
#define LANG_CHEROKEE 0x5c
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_DIVEHI
|
|
|
|
#define LANG_DIVEHI 0x65
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_EDO
|
|
|
|
#define LANG_EDO 0x66
|
|
|
|
#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_FRISIAN
|
|
|
|
#define LANG_FRISIAN 0x62
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_FULFULDE
|
|
|
|
#define LANG_FULFULDE 0x67
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_GAELIC
|
|
|
|
#define LANG_GAELIC 0x3c
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_GALICIAN
|
|
|
|
#define LANG_GALICIAN 0x56
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_GEORGIAN
|
|
|
|
#define LANG_GEORGIAN 0x37
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_GUARANI
|
|
|
|
#define LANG_GUARANI 0x74
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_GUJARATI
|
|
|
|
#define LANG_GUJARATI 0x47
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_HAUSA
|
|
|
|
#define LANG_HAUSA 0x68
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_HAWAIIAN
|
|
|
|
#define LANG_HAWAIIAN 0x75
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_HEBREW
|
|
|
|
#define LANG_HEBREW 0x0d
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_HINDI
|
|
|
|
#define LANG_HINDI 0x39
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_IBIBIO
|
|
|
|
#define LANG_IBIBIO 0x69
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_IGBO
|
|
|
|
#define LANG_IGBO 0x70
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_INDONESIAN
|
|
|
|
#define LANG_INDONESIAN 0x21
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_INUKTITUT
|
|
|
|
#define LANG_INUKTITUT 0x5d
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_KANNADA
|
|
|
|
#define LANG_KANNADA 0x4b
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_KANURI
|
|
|
|
#define LANG_KANURI 0x71
|
|
|
|
#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_KYRGYZ
|
|
|
|
#define LANG_KYRGYZ 0x40
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_LAO
|
|
|
|
#define LANG_LAO 0x54
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_LATIN
|
|
|
|
#define LANG_LATIN 0x76
|
|
|
|
#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_MALTESE
|
|
|
|
#define LANG_MALTESE 0x3a
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_MANIPURI
|
|
|
|
#define LANG_MANIPURI 0x58
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_MARATHI
|
|
|
|
#define LANG_MARATHI 0x4e
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_MONGOLIAN
|
|
|
|
#define LANG_MONGOLIAN 0x50
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_NEPALI
|
|
|
|
#define LANG_NEPALI 0x61
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_ORIYA
|
|
|
|
#define LANG_ORIYA 0x48
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_OROMO
|
|
|
|
#define LANG_OROMO 0x72
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_PAPIAMENTU
|
|
|
|
#define LANG_PAPIAMENTU 0x79
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_PASHTO
|
|
|
|
#define LANG_PASHTO 0x63
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_PUNJABI
|
|
|
|
#define LANG_PUNJABI 0x46
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_RHAETO_ROMANCE
|
|
|
|
#define LANG_RHAETO_ROMANCE 0x17
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_SAAMI
|
|
|
|
#define LANG_SAAMI 0x3b
|
|
|
|
#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_SINHALESE
|
|
|
|
#define LANG_SINHALESE 0x5b
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_SLOVAK
|
|
|
|
#define LANG_SLOVAK 0x1b
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_SOMALI
|
|
|
|
#define LANG_SOMALI 0x77
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_SORBIAN
|
|
|
|
#define LANG_SORBIAN 0x2e
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_SUTU
|
|
|
|
#define LANG_SUTU 0x30
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_SWAHILI
|
|
|
|
#define LANG_SWAHILI 0x41
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_SYRIAC
|
|
|
|
#define LANG_SYRIAC 0x5a
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_TAGALOG
|
|
|
|
#define LANG_TAGALOG 0x64
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_TAJIK
|
|
|
|
#define LANG_TAJIK 0x28
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_TAMAZIGHT
|
|
|
|
#define LANG_TAMAZIGHT 0x5f
|
|
|
|
#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_TIBETAN
|
|
|
|
#define LANG_TIBETAN 0x51
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_TIGRINYA
|
|
|
|
#define LANG_TIGRINYA 0x73
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_TSONGA
|
|
|
|
#define LANG_TSONGA 0x31
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_TSWANA
|
|
|
|
#define LANG_TSWANA 0x32
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_TURKMEN
|
|
|
|
#define LANG_TURKMEN 0x42
|
|
|
|
#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_VENDA
|
|
|
|
#define LANG_VENDA 0x33
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_VIETNAMESE
|
|
|
|
#define LANG_VIETNAMESE 0x2a
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_WELSH
|
|
|
|
#define LANG_WELSH 0x52
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_XHOSA
|
|
|
|
#define LANG_XHOSA 0x34
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_YI
|
|
|
|
#define LANG_YI 0x78
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_YIDDISH
|
|
|
|
#define LANG_YIDDISH 0x3d
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_YORUBA
|
|
|
|
#define LANG_YORUBA 0x6a
|
|
|
|
#endif
|
|
|
|
#ifndef LANG_ZULU
|
|
|
|
#define LANG_ZULU 0x35
|
|
|
|
#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_BENGALI_INDIA
|
|
|
|
#define SUBLANG_BENGALI_INDIA 0x00
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_BENGALI_BANGLADESH
|
|
|
|
#define SUBLANG_BENGALI_BANGLADESH 0x01
|
|
|
|
#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_ENGLISH_INDONESIA
|
|
|
|
#define SUBLANG_ENGLISH_INDONESIA 0x0e
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_ENGLISH_HONGKONG
|
|
|
|
#define SUBLANG_ENGLISH_HONGKONG 0x0f
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_ENGLISH_INDIA
|
|
|
|
#define SUBLANG_ENGLISH_INDIA 0x10
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_ENGLISH_MALAYSIA
|
|
|
|
#define SUBLANG_ENGLISH_MALAYSIA 0x11
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_ENGLISH_SINGAPORE
|
|
|
|
#define SUBLANG_ENGLISH_SINGAPORE 0x12
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_FRENCH_LUXEMBOURG
|
|
|
|
#define SUBLANG_FRENCH_LUXEMBOURG 0x05
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_FRENCH_MONACO
|
|
|
|
#define SUBLANG_FRENCH_MONACO 0x06
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_FRENCH_WESTINDIES
|
|
|
|
#define SUBLANG_FRENCH_WESTINDIES 0x07
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_FRENCH_REUNION
|
|
|
|
#define SUBLANG_FRENCH_REUNION 0x08
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_FRENCH_CONGO
|
|
|
|
#define SUBLANG_FRENCH_CONGO 0x09
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_FRENCH_SENEGAL
|
|
|
|
#define SUBLANG_FRENCH_SENEGAL 0x0a
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_FRENCH_CAMEROON
|
|
|
|
#define SUBLANG_FRENCH_CAMEROON 0x0b
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_FRENCH_COTEDIVOIRE
|
|
|
|
#define SUBLANG_FRENCH_COTEDIVOIRE 0x0c
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_FRENCH_MALI
|
|
|
|
#define SUBLANG_FRENCH_MALI 0x0d
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_FRENCH_MOROCCO
|
|
|
|
#define SUBLANG_FRENCH_MOROCCO 0x0e
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_FRENCH_HAITI
|
|
|
|
#define SUBLANG_FRENCH_HAITI 0x0f
|
|
|
|
#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_PUNJABI_INDIA
|
|
|
|
#define SUBLANG_PUNJABI_INDIA 0x00
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_PUNJABI_PAKISTAN
|
|
|
|
#define SUBLANG_PUNJABI_PAKISTAN 0x01
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_ROMANIAN_ROMANIA
|
|
|
|
#define SUBLANG_ROMANIAN_ROMANIA 0x00
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_ROMANIAN_MOLDOVA
|
|
|
|
#define SUBLANG_ROMANIAN_MOLDOVA 0x01
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_SERBIAN_LATIN
|
|
|
|
#define SUBLANG_SERBIAN_LATIN 0x02
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_SERBIAN_CYRILLIC
|
|
|
|
#define SUBLANG_SERBIAN_CYRILLIC 0x03
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_SINDHI_INDIA
|
|
|
|
#define SUBLANG_SINDHI_INDIA 0x00
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_SINDHI_PAKISTAN
|
|
|
|
#define SUBLANG_SINDHI_PAKISTAN 0x01
|
|
|
|
#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_TAMAZIGHT_ARABIC
|
|
|
|
#define SUBLANG_TAMAZIGHT_ARABIC 0x01
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_TAMAZIGHT_LATIN
|
|
|
|
#define SUBLANG_TAMAZIGHT_LATIN 0x02
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_TIGRINYA_ETHIOPIA
|
|
|
|
#define SUBLANG_TIGRINYA_ETHIOPIA 0x00
|
|
|
|
#endif
|
|
|
|
#ifndef SUBLANG_TIGRINYA_ERITREA
|
|
|
|
#define SUBLANG_TIGRINYA_ERITREA 0x01
|
|
|
|
#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
|
|
|
|
|
1999-11-01 21:46:44 +01:00
|
|
|
gchar *
|
|
|
|
g_win32_getlocale (void)
|
|
|
|
{
|
1999-11-08 10:49:10 +01:00
|
|
|
LCID lcid;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
LANGID langid;
|
1999-11-08 10:49:10 +01:00
|
|
|
gchar *ev;
|
1999-11-01 21:46:44 +01:00
|
|
|
gint primary, sub;
|
2004-04-10 05:43:39 +02:00
|
|
|
gchar *l = "C", *sl = NULL;
|
1999-11-01 21:46:44 +01:00
|
|
|
gchar bfr[20];
|
|
|
|
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
/* Let the user override the system settings through environment
|
|
|
|
variables, as on POSIX systems. */
|
|
|
|
if (((ev = getenv ("LC_ALL")) != NULL && ev[0] != '\0')
|
|
|
|
|| ((ev = getenv ("LC_MESSAGES")) != NULL && ev[0] != '\0')
|
|
|
|
|| ((ev = getenv ("LANG")) != NULL && ev[0] != '\0'))
|
1999-11-08 10:49:10 +01:00
|
|
|
return g_strdup (ev);
|
|
|
|
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
/* Use native Win32 API locale ID. */
|
1999-11-08 10:49:10 +01:00
|
|
|
lcid = GetThreadLocale ();
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
|
|
|
|
/* Strip off the sorting rules, keep only the language part. */
|
|
|
|
langid = LANGIDFROMLCID (lcid);
|
|
|
|
|
|
|
|
/* Split into language and territory part. */
|
|
|
|
primary = PRIMARYLANGID (langid);
|
|
|
|
sub = SUBLANGID (langid);
|
1999-11-01 21:46:44 +01:00
|
|
|
switch (primary)
|
|
|
|
{
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_AFRIKAANS: l = "af"; sl = "ZA"; break;
|
|
|
|
case LANG_ALBANIAN: l = "sq"; sl = "AL"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case LANG_ARABIC:
|
|
|
|
l = "ar";
|
|
|
|
switch (sub)
|
|
|
|
{
|
|
|
|
case SUBLANG_ARABIC_SAUDI_ARABIA: sl = "SA"; break;
|
|
|
|
case SUBLANG_ARABIC_IRAQ: sl = "IQ"; break;
|
|
|
|
case SUBLANG_ARABIC_EGYPT: sl = "EG"; break;
|
|
|
|
case SUBLANG_ARABIC_LIBYA: sl = "LY"; break;
|
|
|
|
case SUBLANG_ARABIC_ALGERIA: sl = "DZ"; break;
|
|
|
|
case SUBLANG_ARABIC_MOROCCO: sl = "MA"; break;
|
|
|
|
case SUBLANG_ARABIC_TUNISIA: sl = "TN"; break;
|
|
|
|
case SUBLANG_ARABIC_OMAN: sl = "OM"; break;
|
|
|
|
case SUBLANG_ARABIC_YEMEN: sl = "YE"; break;
|
|
|
|
case SUBLANG_ARABIC_SYRIA: sl = "SY"; break;
|
|
|
|
case SUBLANG_ARABIC_JORDAN: sl = "JO"; break;
|
|
|
|
case SUBLANG_ARABIC_LEBANON: sl = "LB"; break;
|
|
|
|
case SUBLANG_ARABIC_KUWAIT: sl = "KW"; break;
|
|
|
|
case SUBLANG_ARABIC_UAE: sl = "AE"; break;
|
|
|
|
case SUBLANG_ARABIC_BAHRAIN: sl = "BH"; break;
|
|
|
|
case SUBLANG_ARABIC_QATAR: sl = "QA"; break;
|
|
|
|
}
|
|
|
|
break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_ARMENIAN: l = "hy"; sl = "AM"; break;
|
|
|
|
case LANG_ASSAMESE: l = "as"; sl = "IN"; break;
|
|
|
|
case LANG_AZERI:
|
|
|
|
l = "az";
|
|
|
|
switch (sub)
|
|
|
|
{
|
|
|
|
/* FIXME: Adjust this when Azerbaijani locales appear on Unix. */
|
2004-04-10 05:43:39 +02:00
|
|
|
case SUBLANG_AZERI_LATIN: sl = "AZ@latin"; break;
|
|
|
|
case SUBLANG_AZERI_CYRILLIC: sl = "AZ@cyrillic"; break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case LANG_BASQUE:
|
|
|
|
l = "eu"; /* sl could be "ES" or "FR". */
|
|
|
|
break;
|
|
|
|
case LANG_BELARUSIAN: l = "be"; sl = "BY"; break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case LANG_BENGALI:
|
|
|
|
l = "bn";
|
|
|
|
switch (sub)
|
|
|
|
{
|
|
|
|
case SUBLANG_BENGALI_INDIA: sl = "IN"; break;
|
|
|
|
case SUBLANG_BENGALI_BANGLADESH: sl = "BD"; break;
|
|
|
|
}
|
|
|
|
break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_BULGARIAN: l = "bg"; sl = "BG"; break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case LANG_BURMESE: l = "my"; sl = "MM"; break;
|
|
|
|
case LANG_CAMBODIAN: l = "km"; sl = "KH"; break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_CATALAN: l = "ca"; sl = "ES"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case LANG_CHINESE:
|
|
|
|
l = "zh";
|
|
|
|
switch (sub)
|
|
|
|
{
|
|
|
|
case SUBLANG_CHINESE_TRADITIONAL: sl = "TW"; break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case SUBLANG_CHINESE_SIMPLIFIED: sl = "CN"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case SUBLANG_CHINESE_HONGKONG: sl = "HK"; break;
|
|
|
|
case SUBLANG_CHINESE_SINGAPORE: sl = "SG"; break;
|
|
|
|
case SUBLANG_CHINESE_MACAU: sl = "MO"; break;
|
|
|
|
}
|
|
|
|
break;
|
2003-06-12 00:06:16 +02:00
|
|
|
case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN */
|
1999-11-01 21:46:44 +01:00
|
|
|
switch (sub)
|
|
|
|
{
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
/* FIXME: How to distinguish Croatian and Latin Serbian locales? */
|
2003-06-12 00:06:16 +02:00
|
|
|
case SUBLANG_SERBIAN_LATIN: l = "sr"; sl = "@Latn"; break;
|
|
|
|
case SUBLANG_SERBIAN_CYRILLIC: l = "sr"; break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
default: l = "hr"; sl = "HR";
|
1999-11-01 21:46:44 +01:00
|
|
|
}
|
|
|
|
break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_CZECH: l = "cs"; sl = "CZ"; break;
|
|
|
|
case LANG_DANISH: l = "da"; sl = "DK"; break;
|
2001-11-09 22:21:27 +01:00
|
|
|
case LANG_DIVEHI: l = "div"; sl = "MV"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case LANG_DUTCH:
|
|
|
|
l = "nl";
|
|
|
|
switch (sub)
|
|
|
|
{
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case SUBLANG_DUTCH: sl = "NL"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case SUBLANG_DUTCH_BELGIAN: sl = "BE"; break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case LANG_ENGLISH:
|
|
|
|
l = "en";
|
|
|
|
switch (sub)
|
|
|
|
{
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case SUBLANG_ENGLISH_US: sl = "US"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case SUBLANG_ENGLISH_UK: sl = "GB"; break;
|
|
|
|
case SUBLANG_ENGLISH_AUS: sl = "AU"; break;
|
|
|
|
case SUBLANG_ENGLISH_CAN: sl = "CA"; break;
|
|
|
|
case SUBLANG_ENGLISH_NZ: sl = "NZ"; break;
|
|
|
|
case SUBLANG_ENGLISH_EIRE: sl = "IE"; break;
|
2001-02-04 20:35:04 +01:00
|
|
|
case SUBLANG_ENGLISH_SOUTH_AFRICA: sl = "ZA"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case SUBLANG_ENGLISH_JAMAICA: sl = "JM"; break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case SUBLANG_ENGLISH_CARIBBEAN: sl = "GD"; break; /* Grenada? */
|
1999-11-01 21:46:44 +01:00
|
|
|
case SUBLANG_ENGLISH_BELIZE: sl = "BZ"; break;
|
|
|
|
case SUBLANG_ENGLISH_TRINIDAD: sl = "TT"; break;
|
|
|
|
case SUBLANG_ENGLISH_ZIMBABWE: sl = "ZW"; break;
|
|
|
|
case SUBLANG_ENGLISH_PHILIPPINES: sl = "PH"; break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case SUBLANG_ENGLISH_INDONESIA: sl = "ID"; break;
|
|
|
|
case SUBLANG_ENGLISH_HONGKONG: sl = "HK"; break;
|
|
|
|
case SUBLANG_ENGLISH_INDIA: sl = "IN"; break;
|
|
|
|
case SUBLANG_ENGLISH_MALAYSIA: sl = "MY"; break;
|
|
|
|
case SUBLANG_ENGLISH_SINGAPORE: sl = "SG"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
}
|
|
|
|
break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_ESTONIAN: l = "et"; sl = "EE"; break;
|
|
|
|
case LANG_FAEROESE: l = "fo"; sl = "FO"; break;
|
|
|
|
case LANG_FARSI: l = "fa"; sl = "IR"; break;
|
|
|
|
case LANG_FINNISH: l = "fi"; sl = "FI"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case LANG_FRENCH:
|
|
|
|
l = "fr";
|
|
|
|
switch (sub)
|
|
|
|
{
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case SUBLANG_FRENCH: sl = "FR"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case SUBLANG_FRENCH_BELGIAN: sl = "BE"; break;
|
|
|
|
case SUBLANG_FRENCH_CANADIAN: sl = "CA"; break;
|
|
|
|
case SUBLANG_FRENCH_SWISS: sl = "CH"; break;
|
|
|
|
case SUBLANG_FRENCH_LUXEMBOURG: sl = "LU"; break;
|
|
|
|
case SUBLANG_FRENCH_MONACO: sl = "MC"; break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case SUBLANG_FRENCH_WESTINDIES: break;
|
|
|
|
case SUBLANG_FRENCH_REUNION: sl = "RE"; break;
|
|
|
|
case SUBLANG_FRENCH_CONGO: sl = "CG"; break;
|
|
|
|
case SUBLANG_FRENCH_SENEGAL: sl = "SN"; break;
|
|
|
|
case SUBLANG_FRENCH_CAMEROON: sl = "CM"; break;
|
|
|
|
case SUBLANG_FRENCH_COTEDIVOIRE: sl = "CI"; break;
|
|
|
|
case SUBLANG_FRENCH_MALI: sl = "ML"; break;
|
|
|
|
case SUBLANG_FRENCH_MOROCCO: sl = "MA"; break;
|
|
|
|
case SUBLANG_FRENCH_HAITI: sl = "HT"; break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case LANG_FRISIAN: l = "fy"; sl ="NL"; break;
|
|
|
|
case LANG_FULFULDE: l = "ful"; sl = "NG"; break;
|
|
|
|
case LANG_GAELIC:
|
|
|
|
switch (sub)
|
|
|
|
{
|
|
|
|
case 0x01: /* SCOTTISH */ l = "gd"; sl = "GB"; break;
|
|
|
|
case 0x02: /* IRISH */ l = "ga"; sl = "IE"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
}
|
|
|
|
break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case LANG_GALICIAN: l = "gl"; sl = "ES"; break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_GEORGIAN: l = "ka"; sl = "GE"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case LANG_GERMAN:
|
|
|
|
l = "de";
|
|
|
|
switch (sub)
|
|
|
|
{
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case SUBLANG_GERMAN: sl = "DE"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case SUBLANG_GERMAN_SWISS: sl = "CH"; break;
|
|
|
|
case SUBLANG_GERMAN_AUSTRIAN: sl = "AT"; break;
|
|
|
|
case SUBLANG_GERMAN_LUXEMBOURG: sl = "LU"; break;
|
|
|
|
case SUBLANG_GERMAN_LIECHTENSTEIN: sl = "LI"; break;
|
|
|
|
}
|
|
|
|
break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_GREEK: l = "el"; sl = "GR"; break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case LANG_GUARANI: l = "gn"; sl = "PY"; break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_GUJARATI: l = "gu"; sl = "IN"; break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case LANG_HAUSA: l = "ha"; sl = "NG"; break;
|
|
|
|
case LANG_HAWAIIAN:
|
|
|
|
/* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers)
|
|
|
|
* or Hawaii Creole English ("cpe_US", 600000 speakers)?
|
|
|
|
*/
|
|
|
|
l = "cpe";
|
|
|
|
sl = "US";
|
|
|
|
break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_HEBREW: l = "he"; sl = "IL"; break;
|
|
|
|
case LANG_HINDI: l = "hi"; sl = "IN"; break;
|
|
|
|
case LANG_HUNGARIAN: l = "hu"; sl = "HU"; break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case LANG_IBIBIO: l = "nic"; sl = "NG"; break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_ICELANDIC: l = "is"; sl = "IS"; break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case LANG_IGBO: l = "ibo"; sl = "NG"; break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_INDONESIAN: l = "id"; sl = "ID"; break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case LANG_INUKTITUT: l = "iu"; sl = "CA"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case LANG_ITALIAN:
|
|
|
|
l = "it";
|
|
|
|
switch (sub)
|
|
|
|
{
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case SUBLANG_ITALIAN: sl = "IT"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case SUBLANG_ITALIAN_SWISS: sl = "CH"; break;
|
|
|
|
}
|
|
|
|
break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_JAPANESE: l = "ja"; sl = "JP"; break;
|
|
|
|
case LANG_KANNADA: l = "kn"; sl = "IN"; break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case LANG_KANURI: l = "kau"; sl = "NG"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case LANG_KASHMIRI:
|
|
|
|
l = "ks";
|
|
|
|
switch (sub)
|
|
|
|
{
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case SUBLANG_DEFAULT: sl = "PK"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case SUBLANG_KASHMIRI_INDIA: sl = "IN"; break;
|
|
|
|
}
|
|
|
|
break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_KAZAK: l = "kk"; sl = "KZ"; break;
|
|
|
|
case LANG_KONKANI:
|
|
|
|
/* FIXME: Adjust this when such locales appear on Unix. */
|
2004-04-10 05:43:39 +02:00
|
|
|
l = "kok";
|
|
|
|
sl = "IN";
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
break;
|
|
|
|
case LANG_KOREAN: l = "ko"; sl = "KR"; break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case LANG_KYRGYZ: l = "ky"; sl = "KG"; break;
|
|
|
|
case LANG_LAO: l = "lo"; sl = "LA"; break;
|
|
|
|
case LANG_LATIN: l = "la"; sl = "VA"; break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_LATVIAN: l = "lv"; sl = "LV"; break;
|
|
|
|
case LANG_LITHUANIAN: l = "lt"; sl = "LT"; break;
|
|
|
|
case LANG_MACEDONIAN: l = "mk"; sl = "MK"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case LANG_MALAY:
|
|
|
|
l = "ms";
|
|
|
|
switch (sub)
|
|
|
|
{
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case SUBLANG_MALAY_MALAYSIA: sl = "MY"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case SUBLANG_MALAY_BRUNEI_DARUSSALAM: sl = "BN"; break;
|
|
|
|
}
|
|
|
|
break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_MALAYALAM: l = "ml"; sl = "IN"; break;
|
|
|
|
case LANG_MANIPURI:
|
|
|
|
/* FIXME: Adjust this when such locales appear on Unix. */
|
2004-04-10 05:43:39 +02:00
|
|
|
l = "mni";
|
|
|
|
sl = "IN";
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
break;
|
|
|
|
case LANG_MARATHI: l = "mr"; sl = "IN"; break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case LANG_MONGOLIAN:
|
|
|
|
/* Ambiguous: could be "mn_CN" or "mn_MN". */
|
|
|
|
l = "mn";
|
|
|
|
break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case LANG_NEPALI:
|
|
|
|
l = "ne";
|
|
|
|
switch (sub)
|
|
|
|
{
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case SUBLANG_DEFAULT: sl = "NP"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case SUBLANG_NEPALI_INDIA: sl = "IN"; break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case LANG_NORWEGIAN:
|
|
|
|
l = "no";
|
|
|
|
switch (sub)
|
|
|
|
{
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case SUBLANG_NORWEGIAN_BOKMAL: sl = "NO"; break;
|
|
|
|
case SUBLANG_NORWEGIAN_NYNORSK: l = "nn"; sl = "NO"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
}
|
|
|
|
break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_ORIYA: l = "or"; sl = "IN"; break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case LANG_OROMO: l = "om"; sl = "ET"; break;
|
|
|
|
case LANG_PAPIAMENTU: l = "pap"; sl = "AN"; break;
|
|
|
|
case LANG_PASHTO:
|
|
|
|
/* Ambiguous: could be "ps_PK" or "ps_AF". */
|
|
|
|
l = "ps";
|
|
|
|
break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_POLISH: l = "pl"; sl = "PL"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case LANG_PORTUGUESE:
|
|
|
|
l = "pt";
|
|
|
|
switch (sub)
|
|
|
|
{
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case SUBLANG_PORTUGUESE: sl = "PT"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case SUBLANG_PORTUGUESE_BRAZILIAN: sl = "BR"; break;
|
|
|
|
}
|
|
|
|
break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case LANG_PUNJABI:
|
|
|
|
l = "pa";
|
|
|
|
switch (sub)
|
|
|
|
{
|
|
|
|
case SUBLANG_PUNJABI_INDIA: sl = "IN"; break; /* Gurmukhi script */
|
|
|
|
case SUBLANG_PUNJABI_PAKISTAN: sl = "PK"; break; /* Arabic script */
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case LANG_RHAETO_ROMANCE: l = "rm"; sl = "CH"; break;
|
|
|
|
case LANG_ROMANIAN:
|
|
|
|
l = "ro";
|
|
|
|
switch (sub)
|
|
|
|
{
|
|
|
|
case SUBLANG_ROMANIAN_ROMANIA: sl = "RO"; break;
|
|
|
|
case SUBLANG_ROMANIAN_MOLDOVA: sl = "MD"; break;
|
|
|
|
}
|
|
|
|
break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_RUSSIAN:
|
2004-04-10 05:43:39 +02:00
|
|
|
l = "ru";/* Ambiguous: could be "ru_RU" or "ru_UA" or "ru_MD". */
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case LANG_SAAMI: /* actually Northern Sami */ l = "se"; sl = "NO"; break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_SANSKRIT: l = "sa"; sl = "IN"; break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case LANG_SINDHI: l = "sd";
|
|
|
|
switch (sub)
|
|
|
|
{
|
|
|
|
case SUBLANG_SINDHI_INDIA: sl = "IN"; break;
|
|
|
|
case SUBLANG_SINDHI_PAKISTAN: sl = "PK"; break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case LANG_SINHALESE: l = "si"; sl = "LK"; break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_SLOVAK: l = "sk"; sl = "SK"; break;
|
|
|
|
case LANG_SLOVENIAN: l = "sl"; sl = "SI"; break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case LANG_SOMALI: l = "so"; sl = "SO"; break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_SORBIAN:
|
|
|
|
/* FIXME: Adjust this when such locales appear on Unix. */
|
2004-04-10 05:43:39 +02:00
|
|
|
l = "wen";
|
|
|
|
sl = "DE";
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case LANG_SPANISH:
|
|
|
|
l = "es";
|
|
|
|
switch (sub)
|
|
|
|
{
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case SUBLANG_SPANISH: sl = "ES"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case SUBLANG_SPANISH_MEXICAN: sl = "MX"; break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case SUBLANG_SPANISH_MODERN:
|
|
|
|
sl = "ES@modern"; break; /* not seen on Unix */
|
1999-11-01 21:46:44 +01:00
|
|
|
case SUBLANG_SPANISH_GUATEMALA: sl = "GT"; break;
|
|
|
|
case SUBLANG_SPANISH_COSTA_RICA: sl = "CR"; break;
|
|
|
|
case SUBLANG_SPANISH_PANAMA: sl = "PA"; break;
|
|
|
|
case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: sl = "DO"; break;
|
|
|
|
case SUBLANG_SPANISH_VENEZUELA: sl = "VE"; break;
|
|
|
|
case SUBLANG_SPANISH_COLOMBIA: sl = "CO"; break;
|
|
|
|
case SUBLANG_SPANISH_PERU: sl = "PE"; break;
|
|
|
|
case SUBLANG_SPANISH_ARGENTINA: sl = "AR"; break;
|
|
|
|
case SUBLANG_SPANISH_ECUADOR: sl = "EC"; break;
|
|
|
|
case SUBLANG_SPANISH_CHILE: sl = "CL"; break;
|
|
|
|
case SUBLANG_SPANISH_URUGUAY: sl = "UY"; break;
|
|
|
|
case SUBLANG_SPANISH_PARAGUAY: sl = "PY"; break;
|
|
|
|
case SUBLANG_SPANISH_BOLIVIA: sl = "BO"; break;
|
|
|
|
case SUBLANG_SPANISH_EL_SALVADOR: sl = "SV"; break;
|
|
|
|
case SUBLANG_SPANISH_HONDURAS: sl = "HN"; break;
|
|
|
|
case SUBLANG_SPANISH_NICARAGUA: sl = "NI"; break;
|
|
|
|
case SUBLANG_SPANISH_PUERTO_RICO: sl = "PR"; break;
|
|
|
|
}
|
|
|
|
break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case LANG_SUTU: l = "bnt"; sl = "TZ"; break; /* or "st_LS" or "nso_ZA"? */
|
|
|
|
case LANG_SWAHILI: l = "sw"; sl = "KE"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case LANG_SWEDISH:
|
|
|
|
l = "sv";
|
|
|
|
switch (sub)
|
|
|
|
{
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case SUBLANG_DEFAULT: sl = "SE"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case SUBLANG_SWEDISH_FINLAND: sl = "FI"; break;
|
|
|
|
}
|
|
|
|
break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case LANG_SYRIAC: l = "syr"; sl = "TR"; break; /* An extinct language. */
|
|
|
|
case LANG_TAGALOG: l = "tl"; sl = "PH"; break;
|
|
|
|
case LANG_TAJIK: l = "tg"; sl = "TJ"; break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_TAMIL:
|
2004-04-10 05:43:39 +02:00
|
|
|
l = "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case LANG_TATAR: l = "tt"; sl = "RU"; break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_TELUGU: l = "te"; sl = "IN"; break;
|
|
|
|
case LANG_THAI: l = "th"; sl = "TH"; break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case LANG_TIBETAN: l = "bo"; sl = "CN"; break;
|
|
|
|
case LANG_TIGRINYA:
|
|
|
|
l = "ti";
|
|
|
|
switch (sub)
|
|
|
|
{
|
|
|
|
case SUBLANG_TIGRINYA_ETHIOPIA: sl = "ET"; break;
|
|
|
|
case SUBLANG_TIGRINYA_ERITREA: sl = "ER"; break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case LANG_TSONGA: l = "ts"; sl = "ZA"; break;
|
|
|
|
case LANG_TSWANA: l = "tn"; sl = "BW"; break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_TURKISH: l = "tr"; sl = "TR"; break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case LANG_TURKMEN: l = "tk"; sl = "TM"; break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_UKRAINIAN: l = "uk"; sl = "UA"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
case LANG_URDU:
|
|
|
|
l = "ur";
|
|
|
|
switch (sub)
|
|
|
|
{
|
|
|
|
case SUBLANG_URDU_PAKISTAN: sl = "PK"; break;
|
|
|
|
case SUBLANG_URDU_INDIA: sl = "IN"; break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case LANG_UZBEK:
|
|
|
|
l = "uz";
|
|
|
|
switch (sub)
|
|
|
|
{
|
2004-04-10 05:43:39 +02:00
|
|
|
case SUBLANG_UZBEK_LATIN: sl = "UZ"; break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case SUBLANG_UZBEK_CYRILLIC: sl = "UZ@cyrillic"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
}
|
|
|
|
break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case LANG_VENDA:
|
|
|
|
/* FIXME: It's not clear whether Venda has the ISO 639-2 two-letter code
|
|
|
|
"ve" or not.
|
|
|
|
http://www.loc.gov/standards/iso639-2/englangn.html has it, but
|
|
|
|
http://lcweb.loc.gov/standards/iso639-2/codechanges.html doesn't, */
|
|
|
|
l = "ven"; /* or "ve"? */
|
|
|
|
sl = "ZA";
|
|
|
|
break;
|
When the sublangid is SUBLANG_DEFAULT, return the locale of the language's
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
2001-09-28 00:07:00 +02:00
|
|
|
case LANG_VIETNAMESE: l = "vi"; sl = "VN"; break;
|
2004-04-10 05:43:39 +02:00
|
|
|
case LANG_WELSH: l = "cy"; sl = "GB"; break;
|
|
|
|
case LANG_XHOSA: l = "xh"; sl = "ZA"; break;
|
|
|
|
case LANG_YI: l = "sit"; sl = "CN"; break;
|
|
|
|
case LANG_YIDDISH: l = "yi"; sl = "IL"; break;
|
|
|
|
case LANG_YORUBA: l = "yo"; sl = "NG"; break;
|
|
|
|
case LANG_ZULU: l = "zu"; sl = "ZA"; break;
|
1999-11-01 21:46:44 +01:00
|
|
|
}
|
|
|
|
strcpy (bfr, l);
|
|
|
|
if (sl != NULL)
|
|
|
|
{
|
2001-02-04 20:35:04 +01:00
|
|
|
if (sl[0] != '@')
|
|
|
|
strcat (bfr, "_");
|
1999-11-01 21:46:44 +01:00
|
|
|
strcat (bfr, sl);
|
|
|
|
}
|
|
|
|
|
|
|
|
return g_strdup (bfr);
|
|
|
|
}
|
1999-11-08 10:49:10 +01:00
|
|
|
|
2001-01-17 22:37:32 +01:00
|
|
|
/**
|
|
|
|
* g_win32_error_message:
|
2001-10-01 20:54:27 +02:00
|
|
|
* @error: error code.
|
2001-01-17 22:37:32 +01:00
|
|
|
*
|
|
|
|
* Translate a Win32 error code (as returned by GetLastError()) into
|
|
|
|
* the corresponding message. The message is either language neutral,
|
|
|
|
* or in the thread's language, or the user's language, the system's
|
2004-09-15 21:12:19 +02:00
|
|
|
* language, or US English (see docs for FormatMessage()). The
|
|
|
|
* returned string is in UTF-8. It should be deallocated with
|
|
|
|
* g_free().
|
2001-04-16 22:05:25 +02:00
|
|
|
*
|
2001-10-01 20:54:27 +02:00
|
|
|
* Returns: newly-allocated error message
|
2001-10-03 22:19:13 +02:00
|
|
|
**/
|
1999-11-08 10:49:10 +01:00
|
|
|
gchar *
|
|
|
|
g_win32_error_message (gint error)
|
|
|
|
{
|
|
|
|
gchar *retval;
|
|
|
|
|
2004-11-24 19:07:26 +01:00
|
|
|
if (G_WIN32_HAVE_WIDECHAR_API ())
|
2004-09-15 21:12:19 +02:00
|
|
|
{
|
2004-11-24 19:07:26 +01:00
|
|
|
wchar_t *msg = NULL;
|
|
|
|
int nchars;
|
2000-08-27 12:53:36 +02:00
|
|
|
|
2004-11-24 19:07:26 +01:00
|
|
|
FormatMessageW (FORMAT_MESSAGE_ALLOCATE_BUFFER
|
|
|
|
|FORMAT_MESSAGE_IGNORE_INSERTS
|
|
|
|
|FORMAT_MESSAGE_FROM_SYSTEM,
|
|
|
|
NULL, error, 0,
|
|
|
|
(LPTSTR) &msg, 0, NULL);
|
|
|
|
if (msg != NULL)
|
|
|
|
{
|
|
|
|
nchars = wcslen (msg);
|
1999-11-08 10:49:10 +01:00
|
|
|
|
2004-11-24 19:07:26 +01:00
|
|
|
if (nchars > 2 && msg[nchars-1] == '\n' && msg[nchars-2] == '\r')
|
|
|
|
msg[nchars-2] = '\0';
|
|
|
|
|
|
|
|
retval = g_utf16_to_utf8 (msg, -1, NULL, NULL, NULL);
|
|
|
|
|
|
|
|
LocalFree (msg);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
retval = g_strdup ("");
|
2004-09-15 21:12:19 +02:00
|
|
|
}
|
|
|
|
else
|
2004-11-24 19:07:26 +01:00
|
|
|
{
|
|
|
|
gchar *msg = NULL;
|
|
|
|
int nbytes;
|
|
|
|
|
|
|
|
FormatMessageA (FORMAT_MESSAGE_ALLOCATE_BUFFER
|
|
|
|
|FORMAT_MESSAGE_IGNORE_INSERTS
|
|
|
|
|FORMAT_MESSAGE_FROM_SYSTEM,
|
|
|
|
NULL, error, 0,
|
|
|
|
(LPTSTR) &msg, 0, NULL);
|
|
|
|
if (msg != NULL)
|
|
|
|
{
|
|
|
|
nbytes = strlen (msg);
|
|
|
|
|
|
|
|
if (nbytes > 2 && msg[nbytes-1] == '\n' && msg[nbytes-2] == '\r')
|
|
|
|
msg[nbytes-2] = '\0';
|
|
|
|
|
|
|
|
retval = g_locale_to_utf8 (msg, -1, NULL, NULL, NULL);
|
|
|
|
|
|
|
|
LocalFree (msg);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
retval = g_strdup ("");
|
|
|
|
}
|
1999-11-08 10:49:10 +01:00
|
|
|
|
|
|
|
return retval;
|
|
|
|
}
|
2001-01-16 23:06:23 +01:00
|
|
|
|
2001-01-17 22:37:32 +01:00
|
|
|
static gchar *
|
|
|
|
get_package_directory_from_module (gchar *module_name)
|
2001-01-16 23:06:23 +01:00
|
|
|
{
|
2001-01-17 22:37:32 +01:00
|
|
|
static GHashTable *module_dirs = NULL;
|
2001-09-30 01:19:24 +02:00
|
|
|
G_LOCK_DEFINE_STATIC (module_dirs);
|
2001-01-17 22:37:32 +01:00
|
|
|
HMODULE hmodule = NULL;
|
2001-02-10 01:17:06 +01:00
|
|
|
gchar *fn;
|
2001-01-17 22:37:32 +01:00
|
|
|
gchar *p;
|
2001-01-16 23:06:23 +01:00
|
|
|
gchar *result;
|
2001-01-17 22:37:32 +01:00
|
|
|
|
2001-09-30 01:19:24 +02:00
|
|
|
G_LOCK (module_dirs);
|
|
|
|
|
2001-01-17 22:37:32 +01:00
|
|
|
if (module_dirs == NULL)
|
|
|
|
module_dirs = g_hash_table_new (g_str_hash, g_str_equal);
|
|
|
|
|
|
|
|
result = g_hash_table_lookup (module_dirs, module_name ? module_name : "");
|
|
|
|
|
|
|
|
if (result)
|
2001-09-30 01:19:24 +02:00
|
|
|
{
|
|
|
|
G_UNLOCK (module_dirs);
|
|
|
|
return g_strdup (result);
|
|
|
|
}
|
2001-01-17 22:37:32 +01:00
|
|
|
|
|
|
|
if (module_name)
|
|
|
|
{
|
2004-11-24 19:07:26 +01:00
|
|
|
if (G_WIN32_HAVE_WIDECHAR_API ())
|
|
|
|
{
|
|
|
|
wchar_t *wc_module_name = g_utf8_to_utf16 (module_name, -1, NULL, NULL, NULL);
|
|
|
|
hmodule = GetModuleHandleW (wc_module_name);
|
|
|
|
g_free (wc_module_name);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
char *cp_module_name = g_locale_from_utf8 (module_name, -1, NULL, NULL, NULL);
|
|
|
|
hmodule = GetModuleHandleA (cp_module_name);
|
|
|
|
g_free (cp_module_name);
|
|
|
|
}
|
2001-01-17 22:37:32 +01:00
|
|
|
if (!hmodule)
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2004-11-24 19:07:26 +01:00
|
|
|
if (G_WIN32_HAVE_WIDECHAR_API ())
|
2001-09-30 01:19:24 +02:00
|
|
|
{
|
2004-11-24 19:07:26 +01:00
|
|
|
wchar_t wc_fn[MAX_PATH];
|
|
|
|
if (!GetModuleFileNameW (hmodule, wc_fn, MAX_PATH))
|
|
|
|
{
|
|
|
|
G_UNLOCK (module_dirs);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
fn = g_utf16_to_utf8 (wc_fn, -1, NULL, NULL, NULL);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
gchar cp_fn[MAX_PATH];
|
|
|
|
if (!GetModuleFileNameA (hmodule, cp_fn, MAX_PATH))
|
|
|
|
{
|
|
|
|
G_UNLOCK (module_dirs);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
fn = g_locale_to_utf8 (cp_fn, -1, NULL, NULL, NULL);
|
2001-09-30 01:19:24 +02:00
|
|
|
}
|
2001-01-17 22:37:32 +01:00
|
|
|
|
2001-10-23 01:19:19 +02:00
|
|
|
if ((p = strrchr (fn, G_DIR_SEPARATOR)) != NULL)
|
|
|
|
*p = '\0';
|
|
|
|
|
|
|
|
p = strrchr (fn, G_DIR_SEPARATOR);
|
|
|
|
if (p && (g_ascii_strcasecmp (p + 1, "bin") == 0 ||
|
|
|
|
g_ascii_strcasecmp (p + 1, "lib") == 0))
|
|
|
|
*p = '\0';
|
|
|
|
|
2001-03-09 22:31:21 +01:00
|
|
|
#ifdef G_WITH_CYGWIN
|
|
|
|
/* In Cygwin we need to have POSIX paths */
|
|
|
|
{
|
|
|
|
gchar tmp[MAX_PATH];
|
|
|
|
|
|
|
|
cygwin_conv_to_posix_path(fn, tmp);
|
|
|
|
g_free(fn);
|
|
|
|
fn = g_strdup(tmp);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2001-01-17 22:37:32 +01:00
|
|
|
g_hash_table_insert (module_dirs, module_name ? module_name : "", fn);
|
|
|
|
|
2001-09-30 01:19:24 +02:00
|
|
|
G_UNLOCK (module_dirs);
|
|
|
|
|
2001-01-17 22:37:32 +01:00
|
|
|
return g_strdup (fn);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* g_win32_get_package_installation_directory:
|
2004-11-24 19:07:26 +01:00
|
|
|
* @package: An identifier for a software package, or %NULL, in UTF-8
|
|
|
|
* @dll_name: The name of a DLL that a package provides, or %NULL, in the GLib file name encoding, which is UTF-8 on Windows.
|
2001-01-17 22:37:32 +01:00
|
|
|
*
|
|
|
|
* Try to determine the installation directory for a software package.
|
|
|
|
* Typically used by GNU software packages.
|
|
|
|
*
|
|
|
|
* @package should be a short identifier for the package. Typically it
|
2001-10-01 20:54:27 +02:00
|
|
|
* is the same identifier as used for
|
|
|
|
* <literal>GETTEXT_PACKAGE</literal> in software configured according
|
|
|
|
* to GNU standards. The function first looks in the Windows Registry
|
2002-06-03 19:34:37 +02:00
|
|
|
* for the value <literal>#InstallationDirectory</literal> in the key
|
|
|
|
* <literal>#HKLM\Software\@package</literal>, and if that value
|
2001-10-01 20:54:27 +02:00
|
|
|
* exists and is a string, returns that.
|
2001-01-17 22:37:32 +01:00
|
|
|
*
|
2001-10-01 20:54:27 +02:00
|
|
|
* If @package is %NULL, or the above value isn't found in the
|
|
|
|
* Registry, but @dll_name is non-%NULL, it should name a DLL loaded
|
2001-01-17 22:37:32 +01:00
|
|
|
* into the current process. Typically that would be the name of the
|
|
|
|
* DLL calling this function, looking for its installation
|
|
|
|
* directory. The function then asks Windows what directory that DLL
|
|
|
|
* was loaded from. If that directory's last component is "bin" or
|
|
|
|
* "lib", the parent directory is returned, otherwise the directory
|
|
|
|
* itself. If that DLL isn't loaded, the function proceeds as if
|
2001-10-01 20:54:27 +02:00
|
|
|
* @dll_name was %NULL.
|
2001-01-17 22:37:32 +01:00
|
|
|
*
|
2001-10-05 00:23:03 +02:00
|
|
|
* If both @package and @dll_name are %NULL, the directory from where
|
2001-01-17 22:37:32 +01:00
|
|
|
* the main executable of the process was loaded is uses instead in
|
|
|
|
* the same way as above.
|
|
|
|
*
|
2004-11-24 19:07:26 +01:00
|
|
|
* Returns: a string containing the installation directory for
|
|
|
|
* @package. The string is in the GLib file name encoding, i.e. UTF-8
|
|
|
|
* on Windows. The return value should be freed with g_free() when not
|
|
|
|
* needed any longer.
|
2001-10-01 20:54:27 +02:00
|
|
|
**/
|
|
|
|
|
2001-01-17 22:37:32 +01:00
|
|
|
gchar *
|
|
|
|
g_win32_get_package_installation_directory (gchar *package,
|
|
|
|
gchar *dll_name)
|
|
|
|
{
|
|
|
|
static GHashTable *package_dirs = NULL;
|
2001-09-30 01:19:24 +02:00
|
|
|
G_LOCK_DEFINE_STATIC (package_dirs);
|
2001-01-17 22:37:32 +01:00
|
|
|
gchar *result = NULL;
|
2001-01-16 23:06:23 +01:00
|
|
|
gchar *key;
|
|
|
|
HKEY reg_key = NULL;
|
|
|
|
DWORD type;
|
|
|
|
DWORD nbytes;
|
|
|
|
|
2001-01-17 22:37:32 +01:00
|
|
|
if (package != NULL)
|
2001-01-16 23:06:23 +01:00
|
|
|
{
|
2001-09-30 01:19:24 +02:00
|
|
|
G_LOCK (package_dirs);
|
|
|
|
|
2001-01-17 22:37:32 +01:00
|
|
|
if (package_dirs == NULL)
|
|
|
|
package_dirs = g_hash_table_new (g_str_hash, g_str_equal);
|
|
|
|
|
|
|
|
result = g_hash_table_lookup (package_dirs, package);
|
|
|
|
|
|
|
|
if (result && result[0])
|
2001-09-30 01:19:24 +02:00
|
|
|
{
|
|
|
|
G_UNLOCK (package_dirs);
|
|
|
|
return g_strdup (result);
|
|
|
|
}
|
2001-01-17 22:37:32 +01:00
|
|
|
|
|
|
|
key = g_strconcat ("Software\\", package, NULL);
|
|
|
|
|
|
|
|
nbytes = 0;
|
2004-11-24 19:07:26 +01:00
|
|
|
if (G_WIN32_HAVE_WIDECHAR_API ())
|
2001-01-17 22:37:32 +01:00
|
|
|
{
|
2004-11-24 19:07:26 +01:00
|
|
|
wchar_t *wc_key = g_utf8_to_utf16 (key, -1, NULL, NULL, NULL);
|
|
|
|
if (((RegOpenKeyExW (HKEY_CURRENT_USER, wc_key, 0,
|
|
|
|
KEY_QUERY_VALUE, ®_key) == ERROR_SUCCESS
|
|
|
|
&& RegQueryValueExW (reg_key, L"InstallationDirectory", 0,
|
|
|
|
&type, NULL, &nbytes) == ERROR_SUCCESS)
|
|
|
|
||
|
|
|
|
(RegOpenKeyExW (HKEY_LOCAL_MACHINE, wc_key, 0,
|
|
|
|
KEY_QUERY_VALUE, ®_key) == ERROR_SUCCESS
|
|
|
|
&& RegQueryValueExW (reg_key, L"InstallationDirectory", 0,
|
|
|
|
&type, NULL, &nbytes) == ERROR_SUCCESS))
|
|
|
|
&& type == REG_SZ)
|
|
|
|
{
|
|
|
|
wchar_t *wc_temp = g_new (wchar_t, (nbytes+1)/2 + 1);
|
|
|
|
RegQueryValueExW (reg_key, L"InstallationDirectory", 0,
|
|
|
|
&type, (LPBYTE) wc_temp, &nbytes);
|
|
|
|
wc_temp[nbytes/2] = '\0';
|
|
|
|
result = g_utf16_to_utf8 (wc_temp, -1, NULL, NULL, NULL);
|
|
|
|
g_free (wc_temp);
|
|
|
|
}
|
|
|
|
g_free (wc_key);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
char *cp_key = g_locale_from_utf8 (key, -1, NULL, NULL, NULL);
|
|
|
|
if (((RegOpenKeyExA (HKEY_CURRENT_USER, cp_key, 0,
|
|
|
|
KEY_QUERY_VALUE, ®_key) == ERROR_SUCCESS
|
|
|
|
&& RegQueryValueExA (reg_key, "InstallationDirectory", 0,
|
|
|
|
&type, NULL, &nbytes) == ERROR_SUCCESS)
|
|
|
|
||
|
|
|
|
(RegOpenKeyExA (HKEY_LOCAL_MACHINE, cp_key, 0,
|
|
|
|
KEY_QUERY_VALUE, ®_key) == ERROR_SUCCESS
|
|
|
|
&& RegQueryValueExA (reg_key, "InstallationDirectory", 0,
|
|
|
|
&type, NULL, &nbytes) == ERROR_SUCCESS))
|
|
|
|
&& type == REG_SZ)
|
|
|
|
{
|
|
|
|
char *cp_temp = g_malloc (nbytes + 1);
|
|
|
|
RegQueryValueExA (reg_key, "InstallationDirectory", 0,
|
|
|
|
&type, cp_temp, &nbytes);
|
|
|
|
cp_temp[nbytes] = '\0';
|
|
|
|
result = g_locale_to_utf8 (cp_temp, -1, NULL, NULL, NULL);
|
|
|
|
g_free (cp_temp);
|
|
|
|
}
|
|
|
|
g_free (cp_key);
|
2001-01-17 22:37:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (reg_key != NULL)
|
|
|
|
RegCloseKey (reg_key);
|
|
|
|
|
|
|
|
g_free (key);
|
2001-09-30 01:19:24 +02:00
|
|
|
|
|
|
|
if (result)
|
|
|
|
{
|
|
|
|
g_hash_table_insert (package_dirs, package, result);
|
|
|
|
G_UNLOCK (package_dirs);
|
2004-11-24 19:07:26 +01:00
|
|
|
return result;
|
2001-09-30 01:19:24 +02:00
|
|
|
}
|
|
|
|
G_UNLOCK (package_dirs);
|
2001-01-16 23:06:23 +01:00
|
|
|
}
|
|
|
|
|
2001-01-17 22:37:32 +01:00
|
|
|
if (dll_name != NULL)
|
|
|
|
result = get_package_directory_from_module (dll_name);
|
2001-01-16 23:06:23 +01:00
|
|
|
|
2001-01-17 22:37:32 +01:00
|
|
|
if (result == NULL)
|
|
|
|
result = get_package_directory_from_module (NULL);
|
2001-01-16 23:06:23 +01:00
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
2001-01-17 22:37:32 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* g_win32_get_package_installation_subdirectory:
|
2001-10-05 00:23:03 +02:00
|
|
|
* @package: An identifier for a software package, or %NULL.
|
|
|
|
* @dll_name: The name of a DLL that a package provides, or %NULL.
|
2001-01-17 22:37:32 +01:00
|
|
|
* @subdir: A subdirectory of the package installation directory.
|
|
|
|
*
|
2001-10-05 00:23:03 +02:00
|
|
|
* Returns a newly-allocated string containing the path of the
|
2001-10-01 20:54:27 +02:00
|
|
|
* subdirectory @subdir in the return value from calling
|
2001-01-17 22:37:32 +01:00
|
|
|
* g_win32_get_package_installation_directory() with the @package and
|
2001-10-05 00:23:03 +02:00
|
|
|
* @dll_name parameters.
|
|
|
|
*
|
2004-11-24 19:07:26 +01:00
|
|
|
* Returns: a string containing the complete path to @subdir inside
|
|
|
|
* the installation directory of @package. The string is in the GLib
|
|
|
|
* file name encoding, i.e. UTF-8 on Windows. The return value should
|
|
|
|
* be freed with g_free() when no longer needed.
|
2001-10-03 22:19:13 +02:00
|
|
|
**/
|
2001-01-17 22:37:32 +01:00
|
|
|
|
|
|
|
gchar *
|
|
|
|
g_win32_get_package_installation_subdirectory (gchar *package,
|
|
|
|
gchar *dll_name,
|
|
|
|
gchar *subdir)
|
|
|
|
{
|
|
|
|
gchar *prefix;
|
2004-04-26 00:51:46 +02:00
|
|
|
gchar *dirname;
|
2001-01-17 22:37:32 +01:00
|
|
|
|
|
|
|
prefix = g_win32_get_package_installation_directory (package, dll_name);
|
|
|
|
|
2004-04-26 00:51:46 +02:00
|
|
|
dirname = g_build_filename (prefix, subdir, NULL);
|
|
|
|
g_free (prefix);
|
|
|
|
|
|
|
|
return dirname;
|
2001-01-17 22:37:32 +01:00
|
|
|
}
|
2004-08-25 17:32:50 +02:00
|
|
|
|
2004-10-26 16:04:52 +02:00
|
|
|
static guint windows_version;
|
|
|
|
|
|
|
|
static void
|
|
|
|
g_win32_windows_version_init (void)
|
2004-08-25 17:32:50 +02:00
|
|
|
{
|
|
|
|
static gboolean beenhere = FALSE;
|
|
|
|
|
|
|
|
if (!beenhere)
|
|
|
|
{
|
2004-10-26 16:04:52 +02:00
|
|
|
beenhere = TRUE;
|
2004-08-25 17:32:50 +02:00
|
|
|
if (getenv ("G_WIN32_PRETEND_WIN9X"))
|
2004-10-26 16:04:52 +02:00
|
|
|
windows_version = 0x80000004;
|
2004-08-25 17:32:50 +02:00
|
|
|
else
|
2004-10-26 16:04:52 +02:00
|
|
|
windows_version = GetVersion ();
|
2004-08-25 17:32:50 +02:00
|
|
|
}
|
2004-10-26 16:04:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
_g_win32_thread_init (void)
|
|
|
|
{
|
|
|
|
g_win32_windows_version_init ();
|
|
|
|
}
|
|
|
|
|
2004-10-31 17:31:41 +01:00
|
|
|
/**
|
|
|
|
* g_win32_get_windows_version:
|
|
|
|
*
|
|
|
|
* Returns version information for the Windows operating system the
|
|
|
|
* code is running on. See MSDN documentation for the GetVersion()
|
|
|
|
* function. To summarize, the most significant bit is one on Win9x,
|
|
|
|
* and zero on NT-based systems. The least significant byte is 4 on
|
|
|
|
* Windows NT 4, 5 on Windows XP. Software that needs really detailled
|
|
|
|
* version and feature information should use Win32 API like
|
|
|
|
* GetVersionEx() and VerifyVersionInfo().
|
|
|
|
*
|
2004-10-31 18:41:29 +01:00
|
|
|
* If there is an environment variable <envar>G_WIN32_PRETEND_WIN9X</envar>
|
|
|
|
* defined (with any value), this function always returns a version
|
|
|
|
* code for Windows 9x. This is mainly an internal debugging aid for
|
|
|
|
* GTK+ and GLib developers, to be able to check the code paths for
|
|
|
|
* Windows 9x.
|
2004-10-31 17:31:41 +01:00
|
|
|
*
|
|
|
|
* Returns: The version information.
|
2004-10-31 18:41:29 +01:00
|
|
|
*
|
|
|
|
* Since: 2.6
|
2004-10-31 17:31:41 +01:00
|
|
|
**/
|
2004-10-26 16:04:52 +02:00
|
|
|
guint
|
|
|
|
g_win32_get_windows_version (void)
|
|
|
|
{
|
|
|
|
g_win32_windows_version_init ();
|
|
|
|
|
|
|
|
return windows_version;
|
2004-08-25 17:32:50 +02:00
|
|
|
}
|