remove glib
This commit is contained in:
parent
3785435414
commit
4d1374a675
|
@ -1,70 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2008 Tor Lillqvist
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; see the file COPYING.LIB.txt. If
|
||||
* not, write to the Free Software Foundation, Inc., 51 Franklin
|
||||
* Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef _LIBINTL_H
|
||||
#define _LIBINTL_H 1
|
||||
|
||||
#include <locale.h>
|
||||
|
||||
#ifndef LC_MESSAGES
|
||||
# define LC_MESSAGES 1729 /* Use same value as in GNU gettext */
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern char *gettext (const char *msgid);
|
||||
|
||||
extern char *dgettext (const char *domainname,
|
||||
const char *msgid);
|
||||
|
||||
extern char *dcgettext (const char *domainname,
|
||||
const char *msgid,
|
||||
int category);
|
||||
|
||||
extern char *ngettext (const char *msgid1,
|
||||
const char *msgid2,
|
||||
unsigned long int n);
|
||||
|
||||
extern char *dngettext (const char *domainname,
|
||||
const char *msgid1,
|
||||
const char *msgid2,
|
||||
unsigned long int n);
|
||||
|
||||
extern char *dcngettext (const char *domainname,
|
||||
const char *msgid1,
|
||||
const char *msgid2,
|
||||
unsigned long int n,
|
||||
int category);
|
||||
|
||||
extern char *textdomain (const char *domainname);
|
||||
|
||||
extern char *bindtextdomain (const char *domainname,
|
||||
const char *dirname);
|
||||
|
||||
extern char *bind_textdomain_codeset (const char *domainname,
|
||||
const char *codeset);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _LIBINTL_H */
|
|
@ -1,2 +0,0 @@
|
|||
This is dirent from mingw-runtime-3.3, separated for MSVC user's
|
||||
benefit.
|
|
@ -1,127 +0,0 @@
|
|||
/*
|
||||
* DIRENT.H (formerly DIRLIB.H)
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is a part of the mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within the package.
|
||||
*
|
||||
*/
|
||||
#ifndef _DIRENT_H_
|
||||
#define _DIRENT_H_
|
||||
|
||||
#include <stdio.h>
|
||||
#include <io.h>
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct dirent
|
||||
{
|
||||
long d_ino; /* Always zero. */
|
||||
unsigned short d_reclen; /* Always zero. */
|
||||
unsigned short d_namlen; /* Length of name in d_name. */
|
||||
char d_name[FILENAME_MAX]; /* File name. */
|
||||
};
|
||||
|
||||
#ifdef _WIN64
|
||||
#define INTPTR __int64
|
||||
#else
|
||||
#define INTPTR long
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This is an internal data structure. Good programmers will not use it
|
||||
* except as an argument to one of the functions below.
|
||||
* dd_stat field is now int (was short in older versions).
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/* disk transfer area for this dir */
|
||||
struct _finddata_t dd_dta;
|
||||
|
||||
/* dirent struct to return from dir (NOTE: this makes this thread
|
||||
* safe as long as only one thread uses a particular DIR struct at
|
||||
* a time) */
|
||||
struct dirent dd_dir;
|
||||
|
||||
/* _findnext handle */
|
||||
INTPTR dd_handle;
|
||||
|
||||
/*
|
||||
* Status of search:
|
||||
* 0 = not started yet (next entry to read is first entry)
|
||||
* -1 = off the end
|
||||
* positive = 0 based index of next entry
|
||||
*/
|
||||
int dd_stat;
|
||||
|
||||
/* given path for dir with search pattern (struct is extended) */
|
||||
char dd_name[1];
|
||||
} DIR;
|
||||
|
||||
DIR* __cdecl opendir (const char*);
|
||||
struct dirent* __cdecl readdir (DIR*);
|
||||
int __cdecl closedir (DIR*);
|
||||
void __cdecl rewinddir (DIR*);
|
||||
long __cdecl telldir (DIR*);
|
||||
void __cdecl seekdir (DIR*, long);
|
||||
|
||||
|
||||
/* wide char versions */
|
||||
|
||||
struct _wdirent
|
||||
{
|
||||
long d_ino; /* Always zero. */
|
||||
unsigned short d_reclen; /* Always zero. */
|
||||
unsigned short d_namlen; /* Length of name in d_name. */
|
||||
wchar_t d_name[FILENAME_MAX]; /* File name. */
|
||||
};
|
||||
|
||||
/*
|
||||
* This is an internal data structure. Good programmers will not use it
|
||||
* except as an argument to one of the functions below.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/* disk transfer area for this dir */
|
||||
struct _wfinddata_t dd_dta;
|
||||
|
||||
/* dirent struct to return from dir (NOTE: this makes this thread
|
||||
* safe as long as only one thread uses a particular DIR struct at
|
||||
* a time) */
|
||||
struct _wdirent dd_dir;
|
||||
|
||||
/* _findnext handle */
|
||||
INTPTR dd_handle;
|
||||
|
||||
/*
|
||||
* Status of search:
|
||||
* 0 = not started yet (next entry to read is first entry)
|
||||
* -1 = off the end
|
||||
* positive = 0 based index of next entry
|
||||
*/
|
||||
int dd_stat;
|
||||
|
||||
/* given path for dir with search pattern (struct is extended) */
|
||||
wchar_t dd_name[1];
|
||||
} _WDIR;
|
||||
|
||||
|
||||
|
||||
_WDIR* __cdecl _wopendir (const wchar_t*);
|
||||
struct _wdirent* __cdecl _wreaddir (_WDIR*);
|
||||
int __cdecl _wclosedir (_WDIR*);
|
||||
void __cdecl _wrewinddir (_WDIR*);
|
||||
long __cdecl _wtelldir (_WDIR*);
|
||||
void __cdecl _wseekdir (_WDIR*, long);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* Not _DIRENT_H_ */
|
|
@ -1,742 +0,0 @@
|
|||
/* config.h.win32.in Merged from two versions generated by configure for gcc and MSVC. */
|
||||
/* config.h. Generated by configure. */
|
||||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* define if asm blocks can use numeric local labels */
|
||||
/* #undef ASM_NUMERIC_LABELS */
|
||||
|
||||
/* poll doesn't work on devices */
|
||||
#define BROKEN_POLL 1
|
||||
|
||||
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for `alloca.c' support on those systems.
|
||||
*/
|
||||
/* #undef CRAY_STACKSEG_END */
|
||||
|
||||
/* Define to 1 if using `alloca.c'. */
|
||||
/* #undef C_ALLOCA */
|
||||
|
||||
/* Whether to disable memory pools */
|
||||
/* #undef DISABLE_MEM_POOLS */
|
||||
|
||||
/* Whether to enable GC friendliness by default */
|
||||
/* #undef ENABLE_GC_FRIENDLY_DEFAULT */
|
||||
|
||||
/* always defined to indicate that i18n is enabled */
|
||||
#define ENABLE_NLS 1
|
||||
|
||||
/* Define the gettext package to be used */
|
||||
#define GETTEXT_PACKAGE "glib20"
|
||||
|
||||
/* Define to the GLIB binary age */
|
||||
#define GLIB_BINARY_AGE 2001
|
||||
|
||||
/* Byte contents of gmutex */
|
||||
/* #undef GLIB_BYTE_CONTENTS_GMUTEX */
|
||||
|
||||
/* Define to the GLIB interface age */
|
||||
#define GLIB_INTERFACE_AGE 1
|
||||
|
||||
/* Define the location where the catalogs will be installed */
|
||||
#define GLIB_LOCALE_DIR "NONE/share/locale"
|
||||
|
||||
/* Define to the GLIB major version */
|
||||
#define GLIB_MAJOR_VERSION 2
|
||||
|
||||
/* Define to the GLIB micro version */
|
||||
#define GLIB_MICRO_VERSION 1
|
||||
|
||||
/* Define to the GLIB minor version */
|
||||
#define GLIB_MINOR_VERSION 20
|
||||
|
||||
/* The size of gmutex, as computed by sizeof. */
|
||||
/* #undef GLIB_SIZEOF_GMUTEX */
|
||||
|
||||
/* The size of system_thread, as computed by sizeof. */
|
||||
#define GLIB_SIZEOF_SYSTEM_THREAD 4
|
||||
|
||||
/* alpha atomic implementation */
|
||||
/* #undef G_ATOMIC_ALPHA */
|
||||
|
||||
/* arm atomic implementation */
|
||||
/* #undef G_ATOMIC_ARM */
|
||||
|
||||
/* i486 atomic implementation */
|
||||
#ifndef _MSC_VER
|
||||
#define G_ATOMIC_I486 1
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* ia64 atomic implementation */
|
||||
/* #undef G_ATOMIC_IA64 */
|
||||
|
||||
/* powerpc atomic implementation */
|
||||
/* #undef G_ATOMIC_POWERPC */
|
||||
|
||||
/* s390 atomic implementation */
|
||||
/* #undef G_ATOMIC_S390 */
|
||||
|
||||
/* sparcv9 atomic implementation */
|
||||
/* #undef G_ATOMIC_SPARCV9 */
|
||||
|
||||
/* x86_64 atomic implementation */
|
||||
/* #undef G_ATOMIC_X86_64 */
|
||||
|
||||
/* Have inline keyword */
|
||||
#ifndef _MSC_VER
|
||||
#define G_HAVE_INLINE 1
|
||||
#else /* _MSC_VER */
|
||||
/* #undef G_HAVE_INLINE */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Have __inline keyword */
|
||||
#define G_HAVE___INLINE 1
|
||||
|
||||
/* Have __inline__ keyword */
|
||||
#if !defined(_MSC_VER) && !defined(__DMC__)
|
||||
#define G_HAVE___INLINE__ 1
|
||||
#else /* _MSC_VER or __DMC__ */
|
||||
/* #undef G_HAVE___INLINE__ */
|
||||
#endif /* _MSC_VER or __DMC__ */
|
||||
|
||||
/* Source file containing theread implementation */
|
||||
#define G_THREAD_SOURCE "gthread-win32.c"
|
||||
|
||||
/* A 'va_copy' style function */
|
||||
#ifndef _MSC_VER
|
||||
#define G_VA_COPY va_copy
|
||||
#else /* _MSC_VER */
|
||||
/* #undef G_VA_COPY */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* 'va_lists' cannot be copies as values */
|
||||
/* #undef G_VA_COPY_AS_ARRAY */
|
||||
|
||||
/* Define to 1 if you have `alloca', as a function or macro. */
|
||||
#define HAVE_ALLOCA 1
|
||||
|
||||
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||
*/
|
||||
/* #undef HAVE_ALLOCA_H */
|
||||
|
||||
/* Define to 1 if you have the `atexit' function. */
|
||||
#define HAVE_ATEXIT 1
|
||||
|
||||
/* Define to 1 if you have the <attr/xattr.h> header file. */
|
||||
/* #undef HAVE_ATTR_XATTR_H */
|
||||
|
||||
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
|
||||
#define HAVE_BIND_TEXTDOMAIN_CODESET 1
|
||||
|
||||
/* Define if you have a version of the snprintf function with semantics as
|
||||
specified by the ISO C99 standard. */
|
||||
/* #undef HAVE_C99_SNPRINTF */
|
||||
|
||||
/* Define if you have a version of the vsnprintf function with semantics as
|
||||
specified by the ISO C99 standard. */
|
||||
/* #undef HAVE_C99_VSNPRINTF */
|
||||
|
||||
/* define to 1 if Carbon is available */
|
||||
/* #undef HAVE_CARBON */
|
||||
|
||||
/* Define to 1 if you have the `chown' function. */
|
||||
/* #undef HAVE_CHOWN */
|
||||
|
||||
/* Define to 1 if you have the `clock_gettime' function. */
|
||||
/* #undef HAVE_CLOCK_GETTIME */
|
||||
|
||||
/* Have nl_langinfo (CODESET) */
|
||||
/* #undef HAVE_CODESET */
|
||||
|
||||
/* Define to 1 if you have the <crt_externs.h> header file. */
|
||||
/* #undef HAVE_CRT_EXTERNS_H */
|
||||
|
||||
/* Define to 1 if you have the `dcgettext' function. */
|
||||
#define HAVE_DCGETTEXT 1
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file. */
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_DIRENT_H 1
|
||||
#else
|
||||
/* #undef HAVE_DIRENT_H */
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
/* #undef HAVE_DLFCN_H */
|
||||
|
||||
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
|
||||
/* #undef HAVE_DOPRNT */
|
||||
|
||||
/* define for working do while(0) macros */
|
||||
#define HAVE_DOWHILE_MACROS 1
|
||||
|
||||
/* Define to 1 if you have the `endmntent' function. */
|
||||
/* #undef HAVE_ENDMNTENT */
|
||||
|
||||
/* Define if we have FAM */
|
||||
/* #undef HAVE_FAM */
|
||||
|
||||
/* Define to 1 if you have the <fam.h> header file. */
|
||||
/* #undef HAVE_FAM_H */
|
||||
|
||||
/* Define if we have FAMNoExists in fam */
|
||||
/* #undef HAVE_FAM_NO_EXISTS */
|
||||
|
||||
/* Define to 1 if you have the `fchmod' function. */
|
||||
/* #undef HAVE_FCHMOD */
|
||||
|
||||
/* Define to 1 if you have the `fchown' function. */
|
||||
/* #undef HAVE_FCHOWN */
|
||||
|
||||
/* Define to 1 if you have the `fdwalk' function. */
|
||||
/* #undef HAVE_FDWALK */
|
||||
|
||||
/* Define to 1 if you have the <float.h> header file. */
|
||||
#define HAVE_FLOAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <fstab.h> header file. */
|
||||
/* #undef HAVE_FSTAB_H */
|
||||
|
||||
/* Define to 1 if you have the `getcwd' function. */
|
||||
#define HAVE_GETCWD 1
|
||||
|
||||
/* Define to 1 if you have the `getc_unlocked' function. */
|
||||
/* #undef HAVE_GETC_UNLOCKED */
|
||||
|
||||
/* Define to 1 if you have the `getgrgid' function. */
|
||||
/* #undef HAVE_GETGRGID */
|
||||
|
||||
/* Define to 1 if you have the `getmntent_r' function. */
|
||||
/* #undef HAVE_GETMNTENT_R */
|
||||
|
||||
/* Define to 1 if you have the `getmntinfo' function. */
|
||||
/* #undef HAVE_GETMNTINFO */
|
||||
|
||||
/* Define to 1 if you have the `getpwuid' function. */
|
||||
/* #undef HAVE_GETPWUID */
|
||||
|
||||
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||
#define HAVE_GETTEXT 1
|
||||
|
||||
/* Define to 1 if you have the `gmtime_r' function. */
|
||||
/* #undef HAVE_GMTIME_R */
|
||||
|
||||
/* define to use system printf */
|
||||
/* #undef HAVE_GOOD_PRINTF */
|
||||
|
||||
/* Define to 1 if you have the <grp.h> header file. */
|
||||
/* #undef HAVE_GRP_H */
|
||||
|
||||
/* Define to 1 if you have the `hasmntopt' function. */
|
||||
/* #undef HAVE_HASMNTOPT */
|
||||
|
||||
/* define to support printing 64-bit integers with format I64 */
|
||||
#define HAVE_INT64_AND_I64 1
|
||||
|
||||
/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_INTMAX_T 1
|
||||
#else /* _MSC_VER */
|
||||
/* #undef HAVE_INTMAX_T */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#else /* _MSC_VER */
|
||||
/* #undef HAVE_INTTYPES_H */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
|
||||
declares uintmax_t. */
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_INTTYPES_H_WITH_UINTMAX 1
|
||||
#else /* _MSC_VER */
|
||||
/* #undef HAVE_INTTYPES_H_WITH_UINTMAX */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
|
||||
/* #undef HAVE_LANGINFO_CODESET */
|
||||
|
||||
/* Define to 1 if you have the `lchown' function. */
|
||||
/* #undef HAVE_LCHOWN */
|
||||
|
||||
/* Define if your <locale.h> file defines LC_MESSAGES. */
|
||||
/* #undef HAVE_LC_MESSAGES */
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define to 1 if you have the `link' function. */
|
||||
/* #undef HAVE_LINK */
|
||||
|
||||
/* Define to 1 if you have the <locale.h> header file. */
|
||||
#define HAVE_LOCALE_H 1
|
||||
|
||||
/* Define to 1 if you have the `localtime_r' function. */
|
||||
/* #undef HAVE_LOCALTIME_R */
|
||||
|
||||
/* Define if you have the 'long double' type. */
|
||||
#define HAVE_LONG_DOUBLE 1
|
||||
|
||||
/* Define if you have the 'long long' type. */
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_LONG_LONG 1
|
||||
#else /* _MSC_VER */
|
||||
/* #undef HAVE_LONG_LONG */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* define if system printf can print long long */
|
||||
#define HAVE_LONG_LONG_FORMAT 1
|
||||
|
||||
/* Define to 1 if you have the `lstat' function. */
|
||||
/* #undef HAVE_LSTAT */
|
||||
|
||||
/* Define to 1 if you have the <malloc.h> header file. */
|
||||
#define HAVE_MALLOC_H 1
|
||||
|
||||
/* Define to 1 if you have the `memalign' function. */
|
||||
/* #undef HAVE_MEMALIGN */
|
||||
|
||||
/* Define to 1 if you have the `memmove' function. */
|
||||
#define HAVE_MEMMOVE 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the `mmap' system call. */
|
||||
/* #undef HAVE_MMAP */
|
||||
|
||||
/* Define to 1 if you have the <mntent.h> header file. */
|
||||
/* #undef HAVE_MNTENT_H */
|
||||
|
||||
/* Have a monotonic clock */
|
||||
/* #undef HAVE_MONOTONIC_CLOCK */
|
||||
|
||||
/* Define to 1 if you have the `nanosleep' function. */
|
||||
/* #undef HAVE_NANOSLEEP */
|
||||
|
||||
/* Have non-POSIX function getgrgid_r */
|
||||
/* #undef HAVE_NONPOSIX_GETGRGID_R */
|
||||
|
||||
/* Have non-POSIX function getpwuid_r */
|
||||
/* #undef HAVE_NONPOSIX_GETPWUID_R */
|
||||
|
||||
/* Define to 1 if you have the `nsleep' function. */
|
||||
/* #undef HAVE_NSLEEP */
|
||||
|
||||
/* Define to 1 if you have the `on_exit' function. */
|
||||
/* #undef HAVE_ON_EXIT */
|
||||
|
||||
/* Define to 1 if you have the `poll' function. */
|
||||
/* #undef HAVE_POLL */
|
||||
|
||||
/* Have POSIX function getgrgid_r */
|
||||
/* #undef HAVE_POSIX_GETGRGID_R */
|
||||
|
||||
/* Have POSIX function getpwuid_r */
|
||||
/* #undef HAVE_POSIX_GETPWUID_R */
|
||||
|
||||
/* Define to 1 if you have the `posix_memalign' function. */
|
||||
/* #undef HAVE_POSIX_MEMALIGN */
|
||||
|
||||
/* Have function pthread_attr_setstacksize */
|
||||
/* #undef HAVE_PTHREAD_ATTR_SETSTACKSIZE */
|
||||
|
||||
/* Define to 1 if the system has the type `ptrdiff_t'. */
|
||||
#define HAVE_PTRDIFF_T 1
|
||||
|
||||
/* Define to 1 if you have the <pwd.h> header file. */
|
||||
/* #undef HAVE_PWD_H */
|
||||
|
||||
/* Define to 1 if you have the `readlink' function. */
|
||||
/* #undef HAVE_READLINK */
|
||||
|
||||
/* Define to 1 if you have the <sched.h> header file. */
|
||||
/* #undef HAVE_SCHED_H */
|
||||
|
||||
/* Define to 1 if libselinux is available */
|
||||
/* #undef HAVE_SELINUX */
|
||||
|
||||
/* Define to 1 if you have the <selinux/selinux.h> header file. */
|
||||
/* #undef HAVE_SELINUX_SELINUX_H */
|
||||
|
||||
/* Define to 1 if you have the `setenv' function. */
|
||||
/* #undef HAVE_SETENV */
|
||||
|
||||
/* Define to 1 if you have the `setlocale' function. */
|
||||
#define HAVE_SETLOCALE 1
|
||||
|
||||
/* Define to 1 if you have the `setmntent' function. */
|
||||
/* #undef HAVE_SETMNTENT */
|
||||
|
||||
/* Define to 1 if you have the `snprintf' function. */
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_SNPRINTF 1
|
||||
#ifdef __DMC__
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
#else /* _MSC_VER */
|
||||
/* #undef HAVE_SNPRINTF */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Define to 1 if you have the `statfs' function. */
|
||||
/* #undef HAVE_STATFS */
|
||||
|
||||
/* Define to 1 if you have the `statvfs' function. */
|
||||
/* #undef HAVE_STATVFS */
|
||||
|
||||
/* Define to 1 if you have the <stddef.h> header file. */
|
||||
#define HAVE_STDDEF_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_STDINT_H 1
|
||||
#else /* _MSC_VER */
|
||||
/* #undef HAVE_STDINT_H */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and
|
||||
declares uintmax_t. */
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_STDINT_H_WITH_UINTMAX 1
|
||||
#else /* _MSC_VER */
|
||||
/* #undef HAVE_STDINT_H_WITH_UINTMAX */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the `stpcpy' function. */
|
||||
/* #undef HAVE_STPCPY */
|
||||
|
||||
/* Define to 1 if you have the `strcasecmp' function. */
|
||||
#if !defined(_MSC_VER) && !defined(__DMC__)
|
||||
#define HAVE_STRCASECMP 1
|
||||
#else /* _MSC_VER or __DMC__ */
|
||||
/* #undef HAVE_STRCASECMP */
|
||||
#endif /* _MSC_VER or __DMC__ */
|
||||
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#if !defined(_MSC_VER) && !defined(__DMC__)
|
||||
#define HAVE_STRINGS_H 1
|
||||
#else /* _MSC_VER or __DMC__ */
|
||||
/* #undef HAVE_STRINGS_H */
|
||||
#endif /* _MSC_VER or __DMC__ */
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Have functions strlcpy and strlcat */
|
||||
/* #undef HAVE_STRLCPY */
|
||||
|
||||
/* Define to 1 if you have the `strncasecmp' function. */
|
||||
#if !defined(_MSC_VER) && !defined(__DMC__)
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#else /* _MSC_VER or __DMC__ */
|
||||
/* #undef HAVE_STRNCASECMP */
|
||||
#endif /* _MSC_VER or __DMC__ */
|
||||
|
||||
/* Define to 1 if you have the `strsignal' function. */
|
||||
/* #undef HAVE_STRSIGNAL */
|
||||
|
||||
/* Define to 1 if `f_bavail' is member of `struct statfs'. */
|
||||
/* #undef HAVE_STRUCT_STATFS_F_BAVAIL */
|
||||
|
||||
/* Define to 1 if `f_fstypename' is member of `struct statfs'. */
|
||||
/* #undef HAVE_STRUCT_STATFS_F_FSTYPENAME */
|
||||
|
||||
/* Define to 1 if `f_basetype' is member of `struct statvfs'. */
|
||||
/* #undef HAVE_STRUCT_STATVFS_F_BASETYPE */
|
||||
|
||||
/* Define to 1 if `st_atimensec' is member of `struct stat'. */
|
||||
/* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */
|
||||
|
||||
/* Define to 1 if `st_atim.tv_nsec' is member of `struct stat'. */
|
||||
/* #undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC */
|
||||
|
||||
/* Define to 1 if `st_blksize' is member of `struct stat'. */
|
||||
/* #undef HAVE_STRUCT_STAT_ST_BLKSIZE */
|
||||
|
||||
/* Define to 1 if `st_blocks' is member of `struct stat'. */
|
||||
/* #undef HAVE_STRUCT_STAT_ST_BLOCKS */
|
||||
|
||||
/* Define to 1 if `st_ctimensec' is member of `struct stat'. */
|
||||
/* #undef HAVE_STRUCT_STAT_ST_CTIMENSEC */
|
||||
|
||||
/* Define to 1 if `st_ctim.tv_nsec' is member of `struct stat'. */
|
||||
/* #undef HAVE_STRUCT_STAT_ST_CTIM_TV_NSEC */
|
||||
|
||||
/* Define to 1 if `st_mtimensec' is member of `struct stat'. */
|
||||
/* #undef HAVE_STRUCT_STAT_ST_MTIMENSEC */
|
||||
|
||||
/* Define to 1 if `st_mtim.tv_nsec' is member of `struct stat'. */
|
||||
/* #undef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC */
|
||||
|
||||
/* Define to 1 if you have the `symlink' function. */
|
||||
/* #undef HAVE_SYMLINK */
|
||||
|
||||
/* Define to 1 if you have the <sys/inotify.h> header file. */
|
||||
/* #undef HAVE_SYS_INOTIFY_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/mntctl.h> header file. */
|
||||
/* #undef HAVE_SYS_MNTCTL_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/mnttab.h> header file. */
|
||||
/* #undef HAVE_SYS_MNTTAB_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/mount.h> header file. */
|
||||
/* #undef HAVE_SYS_MOUNT_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#if !defined(_MSC_VER) && !defined(__DMC__)
|
||||
#define HAVE_SYS_PARAM_H 1
|
||||
#else /* _MSC_VER or __DMC__ */
|
||||
/* #undef HAVE_SYS_PARAM_H */
|
||||
#endif /* _MSC_VER or __DMC__ */
|
||||
|
||||
/* Define to 1 if you have the <sys/poll.h> header file. */
|
||||
/* #undef HAVE_SYS_POLL_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/resource.h> header file. */
|
||||
/* #undef HAVE_SYS_RESOURCE_H */
|
||||
|
||||
/* found fd_set in sys/select.h */
|
||||
/* #undef HAVE_SYS_SELECT_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/statfs.h> header file. */
|
||||
/* #undef HAVE_SYS_STATFS_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/statvfs.h> header file. */
|
||||
/* #undef HAVE_SYS_STATVFS_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/sysctl.h> header file. */
|
||||
/* #undef HAVE_SYS_SYSCTL_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/times.h> header file. */
|
||||
/* #undef HAVE_SYS_TIMES_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
#else /* _MSC_VER */
|
||||
/* #undef HAVE_SYS_TIME_H */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/vfstab.h> header file. */
|
||||
/* #undef HAVE_SYS_VFSTAB_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/vfs.h> header file. */
|
||||
/* #undef HAVE_SYS_VFS_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/vmount.h> header file. */
|
||||
/* #undef HAVE_SYS_VMOUNT_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/wait.h> header file. */
|
||||
/* #undef HAVE_SYS_WAIT_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/xattr.h> header file. */
|
||||
/* #undef HAVE_SYS_XATTR_H */
|
||||
|
||||
/* Define to 1 if you have the `timegm' function. */
|
||||
/* #undef HAVE_TIMEGM */
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_UNISTD_H 1
|
||||
#else /* _MSC_VER */
|
||||
/* #undef HAVE_UNISTD_H */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Define if your printf function family supports positional parameters as
|
||||
specified by Unix98. */
|
||||
/* #undef HAVE_UNIX98_PRINTF */
|
||||
|
||||
/* Define to 1 if you have the `unsetenv' function. */
|
||||
/* #undef HAVE_UNSETENV */
|
||||
|
||||
/* Define to 1 if you have the `utimes' function. */
|
||||
/* #undef HAVE_UTIMES */
|
||||
|
||||
/* Define to 1 if you have the `valloc' function. */
|
||||
/* #undef HAVE_VALLOC */
|
||||
|
||||
/* Define to 1 if you have the <values.h> header file. */
|
||||
#if !defined(_MSC_VER) && !defined(__DMC__)
|
||||
#define HAVE_VALUES_H 1
|
||||
#else /* _MSC_VER or __DMC__ */
|
||||
/* #undef HAVE_VALUES_H */
|
||||
#endif /* _MSC_VER or __DMC__ */
|
||||
|
||||
/* Define to 1 if you have the `vasprintf' function. */
|
||||
#define HAVE_VASPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the `vprintf' function. */
|
||||
#define HAVE_VPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the `vsnprintf' function. */
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#ifdef __DMC__
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
#else /* _MSC_VER */
|
||||
/* #undef HAVE_VSNPRINTF */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Define if you have the 'wchar_t' type. */
|
||||
#define HAVE_WCHAR_T 1
|
||||
|
||||
/* Define to 1 if you have the `wcslen' function. */
|
||||
#define HAVE_WCSLEN 1
|
||||
|
||||
/* Define if you have the 'wint_t' type. */
|
||||
#define HAVE_WINT_T 1
|
||||
|
||||
/* Have a working bcopy */
|
||||
/* #undef HAVE_WORKING_BCOPY */
|
||||
|
||||
/* Define to 1 if xattr is available */
|
||||
/* #undef HAVE_XATTR */
|
||||
|
||||
/* Define to 1 if xattr API uses XATTR_NOFOLLOW */
|
||||
/* #undef HAVE_XATTR_NOFOLLOW */
|
||||
|
||||
/* Define to 1 if you have the `_NSGetEnviron' function. */
|
||||
/* #undef HAVE__NSGETENVIRON */
|
||||
|
||||
/* Do we cache iconv descriptors */
|
||||
#define NEED_ICONV_CACHE 1
|
||||
|
||||
/* didn't find fd_set */
|
||||
#define NO_FD_SET 1
|
||||
|
||||
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||
/* #undef NO_MINUS_C_MINUS_O */
|
||||
|
||||
/* global 'sys_errlist' not found */
|
||||
#define NO_SYS_ERRLIST 1
|
||||
|
||||
/* global 'sys_siglist' not found */
|
||||
#define NO_SYS_SIGLIST 1
|
||||
|
||||
/* global 'sys_siglist' not declared */
|
||||
#define NO_SYS_SIGLIST_DECL 1
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=glib"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "glib"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "glib 2.20.1"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "glib"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "2.20.1"
|
||||
|
||||
/* Maximum POSIX RT priority */
|
||||
/* #undef POSIX_MAX_PRIORITY */
|
||||
|
||||
/* define if posix_memalign() can allocate any size */
|
||||
/* #undef POSIX_MEMALIGN_WITH_COMPLIANT_ALLOCS */
|
||||
|
||||
/* Minimum POSIX RT priority */
|
||||
/* #undef POSIX_MIN_PRIORITY */
|
||||
|
||||
/* The POSIX RT yield function */
|
||||
/* #undef POSIX_YIELD_FUNC */
|
||||
|
||||
/* whether realloc (NULL,) works */
|
||||
#define REALLOC_0_WORKS 1
|
||||
|
||||
/* Define if you have correct malloc prototypes */
|
||||
#ifndef _MSC_VER
|
||||
#define SANE_MALLOC_PROTOS 1
|
||||
#else /* _MSC_VER */
|
||||
/* #undef SANE_MALLOC_PROTOS */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* The size of `char', as computed by sizeof. */
|
||||
#define SIZEOF_CHAR 1
|
||||
|
||||
/* The size of `int', as computed by sizeof. */
|
||||
#define SIZEOF_INT 4
|
||||
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
#define SIZEOF_LONG 4
|
||||
|
||||
/* The size of `long long', as computed by sizeof. */
|
||||
#ifndef _MSC_VER
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#else /* _MSC_VER */
|
||||
#define SIZEOF_LONG_LONG 0
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* The size of `short', as computed by sizeof. */
|
||||
#define SIZEOF_SHORT 2
|
||||
|
||||
/* The size of `size_t', as computed by sizeof. */
|
||||
#define SIZEOF_SIZE_T 4
|
||||
|
||||
/* The size of `void *', as computed by sizeof. */
|
||||
#define SIZEOF_VOID_P 4
|
||||
|
||||
/* The size of `__int64', as computed by sizeof. */
|
||||
#define SIZEOF___INT64 8
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at runtime.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
/* #undef STACK_DIRECTION */
|
||||
|
||||
/* Number of arguments to statfs() */
|
||||
/* #undef STATFS_ARGS */
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Using GNU libiconv */
|
||||
/* #undef USE_LIBICONV_GNU */
|
||||
|
||||
/* Using a native implementation of iconv in a separate library */
|
||||
#define USE_LIBICONV_NATIVE 1
|
||||
|
||||
/* using the system-supplied PCRE library */
|
||||
/* #undef USE_SYSTEM_PCRE */
|
||||
|
||||
/* Define to 1 if your processor stores words with the most significant byte
|
||||
first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||
/* #undef WORDS_BIGENDIAN */
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
/* #undef _FILE_OFFSET_BITS */
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
/* #undef _LARGE_FILES */
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to long or long long if <inttypes.h> and <stdint.h> don't define. */
|
||||
/* #undef intmax_t */
|
||||
|
||||
/* Define to empty if the C compiler doesn't support this keyword. */
|
||||
/* #undef signed */
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
/* #undef size_t */
|
File diff suppressed because it is too large
Load Diff
|
@ -1,63 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_ALLOCA_H__
|
||||
#define __G_ALLOCA_H__
|
||||
|
||||
#include <glib/gtypes.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
/* GCC does the right thing */
|
||||
# undef alloca
|
||||
# define alloca(size) __builtin_alloca (size)
|
||||
#elif defined (GLIB_HAVE_ALLOCA_H)
|
||||
/* a native and working alloca.h is there */
|
||||
# include <alloca.h>
|
||||
#else /* !__GNUC__ && !GLIB_HAVE_ALLOCA_H */
|
||||
# if defined(_MSC_VER) || defined(__DMC__)
|
||||
# include <malloc.h>
|
||||
# define alloca _alloca
|
||||
# else /* !_MSC_VER && !__DMC__ */
|
||||
# ifdef _AIX
|
||||
# pragma alloca
|
||||
# else /* !_AIX */
|
||||
# ifndef alloca /* predefined by HP cc +Olibcalls */
|
||||
G_BEGIN_DECLS
|
||||
char *alloca ();
|
||||
G_END_DECLS
|
||||
# endif /* !alloca */
|
||||
# endif /* !_AIX */
|
||||
# endif /* !_MSC_VER && !__DMC__ */
|
||||
#endif /* !__GNUC__ && !GLIB_HAVE_ALLOCA_H */
|
||||
|
||||
#define g_alloca(size) alloca (size)
|
||||
#define g_newa(struct_type, n_structs) ((struct_type*) g_alloca (sizeof (struct_type) * (gsize) (n_structs)))
|
||||
|
||||
#endif /* __G_ALLOCA_H__ */
|
|
@ -1,169 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_ARRAY_H__
|
||||
#define __G_ARRAY_H__
|
||||
|
||||
#include <glib/gtypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GArray GArray;
|
||||
typedef struct _GByteArray GByteArray;
|
||||
typedef struct _GPtrArray GPtrArray;
|
||||
|
||||
struct _GArray
|
||||
{
|
||||
gchar *data;
|
||||
guint len;
|
||||
};
|
||||
|
||||
struct _GByteArray
|
||||
{
|
||||
guint8 *data;
|
||||
guint len;
|
||||
};
|
||||
|
||||
struct _GPtrArray
|
||||
{
|
||||
gpointer *pdata;
|
||||
guint len;
|
||||
};
|
||||
|
||||
/* Resizable arrays. remove fills any cleared spot and shortens the
|
||||
* array, while preserving the order. remove_fast will distort the
|
||||
* order by moving the last element to the position of the removed.
|
||||
*/
|
||||
|
||||
#define g_array_append_val(a,v) g_array_append_vals (a, &(v), 1)
|
||||
#define g_array_prepend_val(a,v) g_array_prepend_vals (a, &(v), 1)
|
||||
#define g_array_insert_val(a,i,v) g_array_insert_vals (a, i, &(v), 1)
|
||||
#define g_array_index(a,t,i) (((t*) (void *) (a)->data) [(i)])
|
||||
|
||||
GArray* g_array_new (gboolean zero_terminated,
|
||||
gboolean clear_,
|
||||
guint element_size);
|
||||
GArray* g_array_sized_new (gboolean zero_terminated,
|
||||
gboolean clear_,
|
||||
guint element_size,
|
||||
guint reserved_size);
|
||||
gchar* g_array_free (GArray *array,
|
||||
gboolean free_segment);
|
||||
GArray* g_array_append_vals (GArray *array,
|
||||
gconstpointer data,
|
||||
guint len);
|
||||
GArray* g_array_prepend_vals (GArray *array,
|
||||
gconstpointer data,
|
||||
guint len);
|
||||
GArray* g_array_insert_vals (GArray *array,
|
||||
guint index_,
|
||||
gconstpointer data,
|
||||
guint len);
|
||||
GArray* g_array_set_size (GArray *array,
|
||||
guint length);
|
||||
GArray* g_array_remove_index (GArray *array,
|
||||
guint index_);
|
||||
GArray* g_array_remove_index_fast (GArray *array,
|
||||
guint index_);
|
||||
GArray* g_array_remove_range (GArray *array,
|
||||
guint index_,
|
||||
guint length);
|
||||
void g_array_sort (GArray *array,
|
||||
GCompareFunc compare_func);
|
||||
void g_array_sort_with_data (GArray *array,
|
||||
GCompareDataFunc compare_func,
|
||||
gpointer user_data);
|
||||
|
||||
/* Resizable pointer array. This interface is much less complicated
|
||||
* than the above. Add appends a pointer. Remove fills any cleared
|
||||
* spot and shortens the array. remove_fast will again distort order.
|
||||
*/
|
||||
#define g_ptr_array_index(array,index_) ((array)->pdata)[index_]
|
||||
GPtrArray* g_ptr_array_new (void);
|
||||
GPtrArray* g_ptr_array_sized_new (guint reserved_size);
|
||||
gpointer* g_ptr_array_free (GPtrArray *array,
|
||||
gboolean free_seg);
|
||||
void g_ptr_array_set_size (GPtrArray *array,
|
||||
gint length);
|
||||
gpointer g_ptr_array_remove_index (GPtrArray *array,
|
||||
guint index_);
|
||||
gpointer g_ptr_array_remove_index_fast (GPtrArray *array,
|
||||
guint index_);
|
||||
gboolean g_ptr_array_remove (GPtrArray *array,
|
||||
gpointer data);
|
||||
gboolean g_ptr_array_remove_fast (GPtrArray *array,
|
||||
gpointer data);
|
||||
void g_ptr_array_remove_range (GPtrArray *array,
|
||||
guint index_,
|
||||
guint length);
|
||||
void g_ptr_array_add (GPtrArray *array,
|
||||
gpointer data);
|
||||
void g_ptr_array_sort (GPtrArray *array,
|
||||
GCompareFunc compare_func);
|
||||
void g_ptr_array_sort_with_data (GPtrArray *array,
|
||||
GCompareDataFunc compare_func,
|
||||
gpointer user_data);
|
||||
void g_ptr_array_foreach (GPtrArray *array,
|
||||
GFunc func,
|
||||
gpointer user_data);
|
||||
|
||||
|
||||
/* Byte arrays, an array of guint8. Implemented as a GArray,
|
||||
* but type-safe.
|
||||
*/
|
||||
|
||||
GByteArray* g_byte_array_new (void);
|
||||
GByteArray* g_byte_array_sized_new (guint reserved_size);
|
||||
guint8* g_byte_array_free (GByteArray *array,
|
||||
gboolean free_segment);
|
||||
GByteArray* g_byte_array_append (GByteArray *array,
|
||||
const guint8 *data,
|
||||
guint len);
|
||||
GByteArray* g_byte_array_prepend (GByteArray *array,
|
||||
const guint8 *data,
|
||||
guint len);
|
||||
GByteArray* g_byte_array_set_size (GByteArray *array,
|
||||
guint length);
|
||||
GByteArray* g_byte_array_remove_index (GByteArray *array,
|
||||
guint index_);
|
||||
GByteArray* g_byte_array_remove_index_fast (GByteArray *array,
|
||||
guint index_);
|
||||
GByteArray* g_byte_array_remove_range (GByteArray *array,
|
||||
guint index_,
|
||||
guint length);
|
||||
void g_byte_array_sort (GByteArray *array,
|
||||
GCompareFunc compare_func);
|
||||
void g_byte_array_sort_with_data (GByteArray *array,
|
||||
GCompareDataFunc compare_func,
|
||||
gpointer user_data);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_ARRAY_H__ */
|
|
@ -1,120 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_ASYNCQUEUE_H__
|
||||
#define __G_ASYNCQUEUE_H__
|
||||
|
||||
#include <glib/gthread.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GAsyncQueue GAsyncQueue;
|
||||
|
||||
/* Asyncronous Queues, can be used to communicate between threads */
|
||||
|
||||
/* Get a new GAsyncQueue with the ref_count 1 */
|
||||
GAsyncQueue* g_async_queue_new (void);
|
||||
|
||||
GAsyncQueue* g_async_queue_new_full (GDestroyNotify item_free_func);
|
||||
|
||||
/* Lock and unlock a GAsyncQueue. All functions lock the queue for
|
||||
* themselves, but in certain cirumstances you want to hold the lock longer,
|
||||
* thus you lock the queue, call the *_unlocked functions and unlock it again.
|
||||
*/
|
||||
void g_async_queue_lock (GAsyncQueue *queue);
|
||||
void g_async_queue_unlock (GAsyncQueue *queue);
|
||||
|
||||
/* Ref and unref the GAsyncQueue. */
|
||||
GAsyncQueue* g_async_queue_ref (GAsyncQueue *queue);
|
||||
void g_async_queue_unref (GAsyncQueue *queue);
|
||||
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
/* You don't have to hold the lock for calling *_ref and *_unref anymore. */
|
||||
void g_async_queue_ref_unlocked (GAsyncQueue *queue);
|
||||
void g_async_queue_unref_and_unlock (GAsyncQueue *queue);
|
||||
#endif /* !G_DISABLE_DEPRECATED */
|
||||
|
||||
/* Push data into the async queue. Must not be NULL. */
|
||||
void g_async_queue_push (GAsyncQueue *queue,
|
||||
gpointer data);
|
||||
void g_async_queue_push_unlocked (GAsyncQueue *queue,
|
||||
gpointer data);
|
||||
|
||||
void g_async_queue_push_sorted (GAsyncQueue *queue,
|
||||
gpointer data,
|
||||
GCompareDataFunc func,
|
||||
gpointer user_data);
|
||||
void g_async_queue_push_sorted_unlocked (GAsyncQueue *queue,
|
||||
gpointer data,
|
||||
GCompareDataFunc func,
|
||||
gpointer user_data);
|
||||
|
||||
/* Pop data from the async queue. When no data is there, the thread is blocked
|
||||
* until data arrives.
|
||||
*/
|
||||
gpointer g_async_queue_pop (GAsyncQueue *queue);
|
||||
gpointer g_async_queue_pop_unlocked (GAsyncQueue *queue);
|
||||
|
||||
/* Try to pop data. NULL is returned in case of empty queue. */
|
||||
gpointer g_async_queue_try_pop (GAsyncQueue *queue);
|
||||
gpointer g_async_queue_try_pop_unlocked (GAsyncQueue *queue);
|
||||
|
||||
|
||||
|
||||
/* Wait for data until at maximum until end_time is reached. NULL is returned
|
||||
* in case of empty queue.
|
||||
*/
|
||||
gpointer g_async_queue_timed_pop (GAsyncQueue *queue,
|
||||
GTimeVal *end_time);
|
||||
gpointer g_async_queue_timed_pop_unlocked (GAsyncQueue *queue,
|
||||
GTimeVal *end_time);
|
||||
|
||||
/* Return the length of the queue. Negative values mean that threads
|
||||
* are waiting, positve values mean that there are entries in the
|
||||
* queue. Actually this function returns the length of the queue minus
|
||||
* the number of waiting threads, g_async_queue_length == 0 could also
|
||||
* mean 'n' entries in the queue and 'n' thread waiting. Such can
|
||||
* happen due to locking of the queue or due to scheduling.
|
||||
*/
|
||||
gint g_async_queue_length (GAsyncQueue *queue);
|
||||
gint g_async_queue_length_unlocked (GAsyncQueue *queue);
|
||||
void g_async_queue_sort (GAsyncQueue *queue,
|
||||
GCompareDataFunc func,
|
||||
gpointer user_data);
|
||||
void g_async_queue_sort_unlocked (GAsyncQueue *queue,
|
||||
GCompareDataFunc func,
|
||||
gpointer user_data);
|
||||
|
||||
/* Private API */
|
||||
GMutex* _g_async_queue_get_mutex (GAsyncQueue *queue);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_ASYNCQUEUE_H__ */
|
|
@ -1,85 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* g_atomic_*: atomic operations.
|
||||
* Copyright (C) 2003 Sebastian Wilhelmi
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_ATOMIC_H__
|
||||
#define __G_ATOMIC_H__
|
||||
|
||||
#include <glib/gtypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
gint g_atomic_int_exchange_and_add (volatile gint G_GNUC_MAY_ALIAS *atomic,
|
||||
gint val);
|
||||
void g_atomic_int_add (volatile gint G_GNUC_MAY_ALIAS *atomic,
|
||||
gint val);
|
||||
gboolean g_atomic_int_compare_and_exchange (volatile gint G_GNUC_MAY_ALIAS *atomic,
|
||||
gint oldval,
|
||||
gint newval);
|
||||
gboolean g_atomic_pointer_compare_and_exchange (volatile gpointer G_GNUC_MAY_ALIAS *atomic,
|
||||
gpointer oldval,
|
||||
gpointer newval);
|
||||
|
||||
gint g_atomic_int_get (volatile gint G_GNUC_MAY_ALIAS *atomic);
|
||||
void g_atomic_int_set (volatile gint G_GNUC_MAY_ALIAS *atomic,
|
||||
gint newval);
|
||||
gpointer g_atomic_pointer_get (volatile gpointer G_GNUC_MAY_ALIAS *atomic);
|
||||
void g_atomic_pointer_set (volatile gpointer G_GNUC_MAY_ALIAS *atomic,
|
||||
gpointer newval);
|
||||
|
||||
#ifndef G_ATOMIC_OP_MEMORY_BARRIER_NEEDED
|
||||
# define g_atomic_int_get(atomic) ((gint)*(atomic))
|
||||
# define g_atomic_int_set(atomic, newval) ((void) (*(atomic) = (newval)))
|
||||
# define g_atomic_pointer_get(atomic) ((gpointer)*(atomic))
|
||||
# define g_atomic_pointer_set(atomic, newval) ((void) (*(atomic) = (newval)))
|
||||
#else
|
||||
# define g_atomic_int_get(atomic) \
|
||||
((void) sizeof (gchar [sizeof (*(atomic)) == sizeof (gint) ? 1 : -1]), \
|
||||
(g_atomic_int_get) ((volatile gint G_GNUC_MAY_ALIAS *) (void *) (atomic)))
|
||||
# define g_atomic_int_set(atomic, newval) \
|
||||
((void) sizeof (gchar [sizeof (*(atomic)) == sizeof (gint) ? 1 : -1]), \
|
||||
(g_atomic_int_set) ((volatile gint G_GNUC_MAY_ALIAS *) (void *) (atomic), (newval)))
|
||||
# define g_atomic_pointer_get(atomic) \
|
||||
((void) sizeof (gchar [sizeof (*(atomic)) == sizeof (gpointer) ? 1 : -1]), \
|
||||
(g_atomic_pointer_get) ((volatile gpointer G_GNUC_MAY_ALIAS *) (void *) (atomic)))
|
||||
# define g_atomic_pointer_set(atomic, newval) \
|
||||
((void) sizeof (gchar [sizeof (*(atomic)) == sizeof (gpointer) ? 1 : -1]), \
|
||||
(g_atomic_pointer_set) ((volatile gpointer G_GNUC_MAY_ALIAS *) (void *) (atomic), (newval)))
|
||||
#endif /* G_ATOMIC_OP_MEMORY_BARRIER_NEEDED */
|
||||
|
||||
#define g_atomic_int_inc(atomic) (g_atomic_int_add ((atomic), 1))
|
||||
#define g_atomic_int_dec_and_test(atomic) \
|
||||
(g_atomic_int_exchange_and_add ((atomic), -1) == 1)
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_ATOMIC_H__ */
|
|
@ -1,68 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_BACKTRACE_H__
|
||||
#define __G_BACKTRACE_H__
|
||||
|
||||
#include <glib/gtypes.h>
|
||||
#include <signal.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* Fatal error handlers.
|
||||
* g_on_error_query() will prompt the user to either
|
||||
* [E]xit, [H]alt, [P]roceed or show [S]tack trace.
|
||||
* g_on_error_stack_trace() invokes gdb, which attaches to the current
|
||||
* process and shows a stack trace.
|
||||
* These function may cause different actions on non-unix platforms.
|
||||
* The prg_name arg is required by gdb to find the executable, if it is
|
||||
* passed as NULL, g_on_error_query() will try g_get_prgname().
|
||||
*/
|
||||
void g_on_error_query (const gchar *prg_name);
|
||||
void g_on_error_stack_trace (const gchar *prg_name);
|
||||
|
||||
/* Hacker macro to place breakpoints for selected machines.
|
||||
* Actual use is strongly discouraged of course ;)
|
||||
*/
|
||||
#if (defined (__i386__) || defined (__x86_64__)) && defined (__GNUC__) && __GNUC__ >= 2
|
||||
# define G_BREAKPOINT() G_STMT_START{ __asm__ __volatile__ ("int $03"); }G_STMT_END
|
||||
#elif (defined (_MSC_VER) || defined (__DMC__)) && defined (_M_IX86)
|
||||
# define G_BREAKPOINT() G_STMT_START{ __asm int 3h }G_STMT_END
|
||||
#elif defined (_MSC_VER)
|
||||
# define G_BREAKPOINT() G_STMT_START{ __debugbreak(); }G_STMT_END
|
||||
#elif defined (__alpha__) && !defined(__osf__) && defined (__GNUC__) && __GNUC__ >= 2
|
||||
# define G_BREAKPOINT() G_STMT_START{ __asm__ __volatile__ ("bpt"); }G_STMT_END
|
||||
#else /* !__i386__ && !__alpha__ */
|
||||
# define G_BREAKPOINT() G_STMT_START{ raise (SIGTRAP); }G_STMT_END
|
||||
#endif /* __i386__ */
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_BACKTRACE_H__ */
|
|
@ -1,57 +0,0 @@
|
|||
/* gbase64.h - Base64 coding functions
|
||||
*
|
||||
* Copyright (C) 2005 Alexander Larsson <alexl@redhat.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_BASE64_H__
|
||||
#define __G_BASE64_H__
|
||||
|
||||
#include <glib/gtypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
gsize g_base64_encode_step (const guchar *in,
|
||||
gsize len,
|
||||
gboolean break_lines,
|
||||
gchar *out,
|
||||
gint *state,
|
||||
gint *save);
|
||||
gsize g_base64_encode_close (gboolean break_lines,
|
||||
gchar *out,
|
||||
gint *state,
|
||||
gint *save);
|
||||
gchar* g_base64_encode (const guchar *data,
|
||||
gsize len) G_GNUC_MALLOC;
|
||||
gsize g_base64_decode_step (const gchar *in,
|
||||
gsize len,
|
||||
guchar *out,
|
||||
gint *state,
|
||||
guint *save);
|
||||
guchar *g_base64_decode (const gchar *text,
|
||||
gsize *out_len) G_GNUC_MALLOC;
|
||||
guchar *g_base64_decode_inplace (gchar *text,
|
||||
gsize *out_len);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_BASE64_H__ */
|
|
@ -1,191 +0,0 @@
|
|||
/* gbookmarkfile.h: parsing and building desktop bookmarks
|
||||
*
|
||||
* Copyright (C) 2005-2006 Emmanuele Bassi
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_BOOKMARK_FILE_H__
|
||||
#define __G_BOOKMARK_FILE_H__
|
||||
|
||||
#include <glib/gerror.h>
|
||||
#include <time.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* GError enumeration
|
||||
*/
|
||||
#define G_BOOKMARK_FILE_ERROR (g_bookmark_file_error_quark ())
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_BOOKMARK_FILE_ERROR_INVALID_URI,
|
||||
G_BOOKMARK_FILE_ERROR_INVALID_VALUE,
|
||||
G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED,
|
||||
G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND,
|
||||
G_BOOKMARK_FILE_ERROR_READ,
|
||||
G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING,
|
||||
G_BOOKMARK_FILE_ERROR_WRITE,
|
||||
G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND
|
||||
} GBookmarkFileError;
|
||||
|
||||
GQuark g_bookmark_file_error_quark (void);
|
||||
|
||||
/*
|
||||
* GBookmarkFile
|
||||
*/
|
||||
typedef struct _GBookmarkFile GBookmarkFile;
|
||||
|
||||
GBookmarkFile *g_bookmark_file_new (void);
|
||||
void g_bookmark_file_free (GBookmarkFile *bookmark);
|
||||
|
||||
gboolean g_bookmark_file_load_from_file (GBookmarkFile *bookmark,
|
||||
const gchar *filename,
|
||||
GError **error);
|
||||
gboolean g_bookmark_file_load_from_data (GBookmarkFile *bookmark,
|
||||
const gchar *data,
|
||||
gsize length,
|
||||
GError **error);
|
||||
gboolean g_bookmark_file_load_from_data_dirs (GBookmarkFile *bookmark,
|
||||
const gchar *file,
|
||||
gchar **full_path,
|
||||
GError **error);
|
||||
gchar * g_bookmark_file_to_data (GBookmarkFile *bookmark,
|
||||
gsize *length,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
gboolean g_bookmark_file_to_file (GBookmarkFile *bookmark,
|
||||
const gchar *filename,
|
||||
GError **error);
|
||||
|
||||
void g_bookmark_file_set_title (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
const gchar *title);
|
||||
gchar * g_bookmark_file_get_title (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
void g_bookmark_file_set_description (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
const gchar *description);
|
||||
gchar * g_bookmark_file_get_description (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
void g_bookmark_file_set_mime_type (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
const gchar *mime_type);
|
||||
gchar * g_bookmark_file_get_mime_type (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
void g_bookmark_file_set_groups (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
const gchar **groups,
|
||||
gsize length);
|
||||
void g_bookmark_file_add_group (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
const gchar *group);
|
||||
gboolean g_bookmark_file_has_group (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
const gchar *group,
|
||||
GError **error);
|
||||
gchar ** g_bookmark_file_get_groups (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
gsize *length,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
void g_bookmark_file_add_application (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
const gchar *name,
|
||||
const gchar *exec);
|
||||
gboolean g_bookmark_file_has_application (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
const gchar *name,
|
||||
GError **error);
|
||||
gchar ** g_bookmark_file_get_applications (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
gsize *length,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
gboolean g_bookmark_file_set_app_info (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
const gchar *name,
|
||||
const gchar *exec,
|
||||
gint count,
|
||||
time_t stamp,
|
||||
GError **error);
|
||||
gboolean g_bookmark_file_get_app_info (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
const gchar *name,
|
||||
gchar **exec,
|
||||
guint *count,
|
||||
time_t *stamp,
|
||||
GError **error);
|
||||
void g_bookmark_file_set_is_private (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
gboolean is_private);
|
||||
gboolean g_bookmark_file_get_is_private (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
GError **error);
|
||||
void g_bookmark_file_set_icon (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
const gchar *href,
|
||||
const gchar *mime_type);
|
||||
gboolean g_bookmark_file_get_icon (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
gchar **href,
|
||||
gchar **mime_type,
|
||||
GError **error);
|
||||
void g_bookmark_file_set_added (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
time_t added);
|
||||
time_t g_bookmark_file_get_added (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
GError **error);
|
||||
void g_bookmark_file_set_modified (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
time_t modified);
|
||||
time_t g_bookmark_file_get_modified (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
GError **error);
|
||||
void g_bookmark_file_set_visited (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
time_t visited);
|
||||
time_t g_bookmark_file_get_visited (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
GError **error);
|
||||
gboolean g_bookmark_file_has_item (GBookmarkFile *bookmark,
|
||||
const gchar *uri);
|
||||
gint g_bookmark_file_get_size (GBookmarkFile *bookmark);
|
||||
gchar ** g_bookmark_file_get_uris (GBookmarkFile *bookmark,
|
||||
gsize *length) G_GNUC_MALLOC;
|
||||
gboolean g_bookmark_file_remove_group (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
const gchar *group,
|
||||
GError **error);
|
||||
gboolean g_bookmark_file_remove_application (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
const gchar *name,
|
||||
GError **error);
|
||||
gboolean g_bookmark_file_remove_item (GBookmarkFile *bookmark,
|
||||
const gchar *uri,
|
||||
GError **error);
|
||||
gboolean g_bookmark_file_move_item (GBookmarkFile *bookmark,
|
||||
const gchar *old_uri,
|
||||
const gchar *new_uri,
|
||||
GError **error);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_BOOKMARK_FILE_H__ */
|
|
@ -1,303 +0,0 @@
|
|||
/* GBSearchArray - Binary Searchable Array implementation
|
||||
* Copyright (C) 2000-2003 Tim Janik
|
||||
*
|
||||
* This software is provided "as is"; redistribution and modification
|
||||
* is permitted, provided that the following disclaimer is retained.
|
||||
*
|
||||
* This software 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.
|
||||
* In no event shall the authors or contributors be liable for any
|
||||
* direct, indirect, incidental, special, exemplary, or consequential
|
||||
* damages (including, but not limited to, procurement of substitute
|
||||
* goods or services; loss of use, data, or profits; or business
|
||||
* interruption) however caused and on any theory of liability, whether
|
||||
* in contract, strict liability, or tort (including negligence or
|
||||
* otherwise) arising in any way out of the use of this software, even
|
||||
* if advised of the possibility of such damage.
|
||||
*/
|
||||
#ifndef __G_BSEARCH_ARRAY_H__
|
||||
#define __G_BSEARCH_ARRAY_H__
|
||||
|
||||
#include <glib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
G_BEGIN_DECLS /* c++ guards */
|
||||
|
||||
/* this implementation is intended to be usable in third-party code
|
||||
* simply by pasting the contents of this file. as such, the
|
||||
* implementation needs to be self-contained within this file.
|
||||
*/
|
||||
|
||||
/* convenience macro to avoid signed overflow for value comparisions */
|
||||
#define G_BSEARCH_ARRAY_CMP(v1,v2) ((v1) > (v2) ? +1 : (v1) == (v2) ? 0 : -1)
|
||||
|
||||
|
||||
/* --- typedefs --- */
|
||||
typedef gint (*GBSearchCompareFunc) (gconstpointer bsearch_node1, /* key */
|
||||
gconstpointer bsearch_node2);
|
||||
typedef enum
|
||||
{
|
||||
G_BSEARCH_ARRAY_ALIGN_POWER2 = 1 << 0, /* align memory to power2 sizes */
|
||||
G_BSEARCH_ARRAY_AUTO_SHRINK = 1 << 1 /* shrink array upon removal */
|
||||
} GBSearchArrayFlags;
|
||||
|
||||
|
||||
/* --- structures --- */
|
||||
typedef struct
|
||||
{
|
||||
guint sizeof_node;
|
||||
GBSearchCompareFunc cmp_nodes;
|
||||
guint flags;
|
||||
} GBSearchConfig;
|
||||
typedef union
|
||||
{
|
||||
guint n_nodes;
|
||||
/*< private >*/
|
||||
gpointer alignment_dummy1;
|
||||
glong alignment_dummy2;
|
||||
gdouble alignment_dummy3;
|
||||
} GBSearchArray;
|
||||
|
||||
|
||||
/* --- public API --- */
|
||||
static inline GBSearchArray* g_bsearch_array_create (const GBSearchConfig *bconfig);
|
||||
static inline gpointer g_bsearch_array_get_nth (GBSearchArray *barray,
|
||||
const GBSearchConfig *bconfig,
|
||||
guint nth);
|
||||
static inline guint g_bsearch_array_get_index (GBSearchArray *barray,
|
||||
const GBSearchConfig *bconfig,
|
||||
gconstpointer node_in_array);
|
||||
static inline GBSearchArray* g_bsearch_array_remove (GBSearchArray *barray,
|
||||
const GBSearchConfig *bconfig,
|
||||
guint index_);
|
||||
/* provide uninitialized space at index for node insertion */
|
||||
static inline GBSearchArray* g_bsearch_array_grow (GBSearchArray *barray,
|
||||
const GBSearchConfig *bconfig,
|
||||
guint index);
|
||||
/* insert key_node into array if it does not exist, otherwise do nothing */
|
||||
static inline GBSearchArray* g_bsearch_array_insert (GBSearchArray *barray,
|
||||
const GBSearchConfig *bconfig,
|
||||
gconstpointer key_node);
|
||||
/* insert key_node into array if it does not exist,
|
||||
* otherwise replace the existing node's contents with key_node
|
||||
*/
|
||||
static inline GBSearchArray* g_bsearch_array_replace (GBSearchArray *barray,
|
||||
const GBSearchConfig *bconfig,
|
||||
gconstpointer key_node);
|
||||
static inline void g_bsearch_array_free (GBSearchArray *barray,
|
||||
const GBSearchConfig *bconfig);
|
||||
#define g_bsearch_array_get_n_nodes(barray) (((GBSearchArray*) (barray))->n_nodes)
|
||||
|
||||
/* g_bsearch_array_lookup():
|
||||
* return NULL or exact match node
|
||||
*/
|
||||
#define g_bsearch_array_lookup(barray, bconfig, key_node) \
|
||||
g_bsearch_array_lookup_fuzzy ((barray), (bconfig), (key_node), 0)
|
||||
|
||||
/* g_bsearch_array_lookup_sibling():
|
||||
* return NULL for barray->n_nodes==0, otherwise return the
|
||||
* exact match node, or, if there's no such node, return the
|
||||
* node last visited, which is pretty close to an exact match
|
||||
* (will be one off into either direction).
|
||||
*/
|
||||
#define g_bsearch_array_lookup_sibling(barray, bconfig, key_node) \
|
||||
g_bsearch_array_lookup_fuzzy ((barray), (bconfig), (key_node), 1)
|
||||
|
||||
/* g_bsearch_array_lookup_insertion():
|
||||
* return NULL for barray->n_nodes==0 or exact match, otherwise
|
||||
* return the node where key_node should be inserted (may be one
|
||||
* after end, i.e. g_bsearch_array_get_index(result) <= barray->n_nodes).
|
||||
*/
|
||||
#define g_bsearch_array_lookup_insertion(barray, bconfig, key_node) \
|
||||
g_bsearch_array_lookup_fuzzy ((barray), (bconfig), (key_node), 2)
|
||||
|
||||
|
||||
/* --- implementation --- */
|
||||
/* helper macro to cut down realloc()s */
|
||||
#ifdef DISABLE_MEM_POOLS
|
||||
#define G_BSEARCH_UPPER_POWER2(n) (n)
|
||||
#else /* !DISABLE_MEM_POOLS */
|
||||
#define G_BSEARCH_UPPER_POWER2(n) ((n) ? 1 << g_bit_storage ((n) - 1) : 0)
|
||||
#endif /* !DISABLE_MEM_POOLS */
|
||||
#define G_BSEARCH_ARRAY_NODES(barray) (((guint8*) (barray)) + sizeof (GBSearchArray))
|
||||
static inline GBSearchArray*
|
||||
g_bsearch_array_create (const GBSearchConfig *bconfig)
|
||||
{
|
||||
GBSearchArray *barray;
|
||||
guint size;
|
||||
|
||||
g_return_val_if_fail (bconfig != NULL, NULL);
|
||||
|
||||
size = sizeof (GBSearchArray) + bconfig->sizeof_node;
|
||||
if (bconfig->flags & G_BSEARCH_ARRAY_ALIGN_POWER2)
|
||||
size = G_BSEARCH_UPPER_POWER2 (size);
|
||||
barray = (GBSearchArray *) g_realloc (NULL, size);
|
||||
memset (barray, 0, sizeof (GBSearchArray));
|
||||
|
||||
return barray;
|
||||
}
|
||||
static inline gpointer
|
||||
g_bsearch_array_lookup_fuzzy (GBSearchArray *barray,
|
||||
const GBSearchConfig *bconfig,
|
||||
gconstpointer key_node,
|
||||
const guint sibling_or_after);
|
||||
static inline gpointer
|
||||
g_bsearch_array_lookup_fuzzy (GBSearchArray *barray,
|
||||
const GBSearchConfig *bconfig,
|
||||
gconstpointer key_node,
|
||||
const guint sibling_or_after)
|
||||
{
|
||||
GBSearchCompareFunc cmp_nodes = bconfig->cmp_nodes;
|
||||
guint8 *check = NULL, *nodes = G_BSEARCH_ARRAY_NODES (barray);
|
||||
guint n_nodes = barray->n_nodes, offs = 0;
|
||||
guint sizeof_node = bconfig->sizeof_node;
|
||||
gint cmp = 0;
|
||||
|
||||
while (offs < n_nodes)
|
||||
{
|
||||
guint i = (offs + n_nodes) >> 1;
|
||||
|
||||
check = nodes + i * sizeof_node;
|
||||
cmp = cmp_nodes (key_node, check);
|
||||
if (cmp == 0)
|
||||
return sibling_or_after > 1 ? NULL : check;
|
||||
else if (cmp < 0)
|
||||
n_nodes = i;
|
||||
else /* (cmp > 0) */
|
||||
offs = i + 1;
|
||||
}
|
||||
|
||||
/* check is last mismatch, cmp > 0 indicates greater key */
|
||||
return G_LIKELY (!sibling_or_after) ? NULL : (sibling_or_after > 1 && cmp > 0) ? check + sizeof_node : check;
|
||||
}
|
||||
static inline gpointer
|
||||
g_bsearch_array_get_nth (GBSearchArray *barray,
|
||||
const GBSearchConfig *bconfig,
|
||||
guint nth)
|
||||
{
|
||||
return (G_LIKELY (nth < barray->n_nodes) ?
|
||||
G_BSEARCH_ARRAY_NODES (barray) + nth * bconfig->sizeof_node :
|
||||
NULL);
|
||||
}
|
||||
static inline guint
|
||||
g_bsearch_array_get_index (GBSearchArray *barray,
|
||||
const GBSearchConfig *bconfig,
|
||||
gconstpointer node_in_array)
|
||||
{
|
||||
guint distance = ((guint8*) node_in_array) - G_BSEARCH_ARRAY_NODES (barray);
|
||||
|
||||
g_return_val_if_fail (node_in_array != NULL, barray->n_nodes);
|
||||
|
||||
distance /= bconfig->sizeof_node;
|
||||
|
||||
return MIN (distance, barray->n_nodes + 1); /* may return one after end */
|
||||
}
|
||||
static inline GBSearchArray*
|
||||
g_bsearch_array_grow (GBSearchArray *barray,
|
||||
const GBSearchConfig *bconfig,
|
||||
guint index_)
|
||||
{
|
||||
guint old_size = barray->n_nodes * bconfig->sizeof_node;
|
||||
guint new_size = old_size + bconfig->sizeof_node;
|
||||
guint8 *node;
|
||||
|
||||
g_return_val_if_fail (index_ <= barray->n_nodes, NULL);
|
||||
|
||||
if (G_UNLIKELY (bconfig->flags & G_BSEARCH_ARRAY_ALIGN_POWER2))
|
||||
{
|
||||
new_size = G_BSEARCH_UPPER_POWER2 (sizeof (GBSearchArray) + new_size);
|
||||
old_size = G_BSEARCH_UPPER_POWER2 (sizeof (GBSearchArray) + old_size);
|
||||
if (old_size != new_size)
|
||||
barray = (GBSearchArray *) g_realloc (barray, new_size);
|
||||
}
|
||||
else
|
||||
barray = (GBSearchArray *) g_realloc (barray, sizeof (GBSearchArray) + new_size);
|
||||
node = G_BSEARCH_ARRAY_NODES (barray) + index_ * bconfig->sizeof_node;
|
||||
g_memmove (node + bconfig->sizeof_node, node, (barray->n_nodes - index_) * bconfig->sizeof_node);
|
||||
barray->n_nodes += 1;
|
||||
return barray;
|
||||
}
|
||||
static inline GBSearchArray*
|
||||
g_bsearch_array_insert (GBSearchArray *barray,
|
||||
const GBSearchConfig *bconfig,
|
||||
gconstpointer key_node)
|
||||
{
|
||||
guint8 *node;
|
||||
|
||||
if (G_UNLIKELY (!barray->n_nodes))
|
||||
{
|
||||
barray = g_bsearch_array_grow (barray, bconfig, 0);
|
||||
node = G_BSEARCH_ARRAY_NODES (barray);
|
||||
}
|
||||
else
|
||||
{
|
||||
node = (guint8 *) g_bsearch_array_lookup_insertion (barray, bconfig, key_node);
|
||||
if (G_LIKELY (node))
|
||||
{
|
||||
guint index_ = g_bsearch_array_get_index (barray, bconfig, node);
|
||||
|
||||
/* grow and insert */
|
||||
barray = g_bsearch_array_grow (barray, bconfig, index_);
|
||||
node = G_BSEARCH_ARRAY_NODES (barray) + index_ * bconfig->sizeof_node;
|
||||
}
|
||||
else /* no insertion needed, node already there */
|
||||
return barray;
|
||||
}
|
||||
memcpy (node, key_node, bconfig->sizeof_node);
|
||||
return barray;
|
||||
}
|
||||
static inline GBSearchArray*
|
||||
g_bsearch_array_replace (GBSearchArray *barray,
|
||||
const GBSearchConfig *bconfig,
|
||||
gconstpointer key_node)
|
||||
{
|
||||
guint8 *node = (guint8 *) g_bsearch_array_lookup (barray, bconfig, key_node);
|
||||
if (G_LIKELY (node)) /* expected path */
|
||||
memcpy (node, key_node, bconfig->sizeof_node);
|
||||
else /* revert to insertion */
|
||||
barray = g_bsearch_array_insert (barray, bconfig, key_node);
|
||||
return barray;
|
||||
}
|
||||
static inline GBSearchArray*
|
||||
g_bsearch_array_remove (GBSearchArray *barray,
|
||||
const GBSearchConfig *bconfig,
|
||||
guint index_)
|
||||
{
|
||||
guint8 *node;
|
||||
|
||||
g_return_val_if_fail (index_ < barray->n_nodes, NULL);
|
||||
|
||||
barray->n_nodes -= 1;
|
||||
node = G_BSEARCH_ARRAY_NODES (barray) + index_ * bconfig->sizeof_node;
|
||||
g_memmove (node, node + bconfig->sizeof_node, (barray->n_nodes - index_) * bconfig->sizeof_node);
|
||||
if (G_UNLIKELY (bconfig->flags & G_BSEARCH_ARRAY_AUTO_SHRINK))
|
||||
{
|
||||
guint new_size = barray->n_nodes * bconfig->sizeof_node;
|
||||
guint old_size = new_size + bconfig->sizeof_node;
|
||||
|
||||
if (G_UNLIKELY (bconfig->flags & G_BSEARCH_ARRAY_ALIGN_POWER2))
|
||||
{
|
||||
new_size = G_BSEARCH_UPPER_POWER2 (sizeof (GBSearchArray) + new_size);
|
||||
old_size = G_BSEARCH_UPPER_POWER2 (sizeof (GBSearchArray) + old_size);
|
||||
if (old_size != new_size)
|
||||
barray = (GBSearchArray *) g_realloc (barray, new_size);
|
||||
}
|
||||
else
|
||||
barray = (GBSearchArray *) g_realloc (barray, sizeof (GBSearchArray) + new_size);
|
||||
}
|
||||
return barray;
|
||||
}
|
||||
static inline void
|
||||
g_bsearch_array_free (GBSearchArray *barray,
|
||||
const GBSearchConfig *bconfig)
|
||||
{
|
||||
g_return_if_fail (barray != NULL);
|
||||
|
||||
g_free (barray);
|
||||
}
|
||||
|
||||
G_END_DECLS /* c++ guards */
|
||||
|
||||
#endif /* !__G_BSEARCH_ARRAY_H__ */
|
|
@ -1,69 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_CACHE_H__
|
||||
#define __G_CACHE_H__
|
||||
|
||||
#include <glib/glist.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GCache GCache;
|
||||
|
||||
typedef gpointer (*GCacheNewFunc) (gpointer key);
|
||||
typedef gpointer (*GCacheDupFunc) (gpointer value);
|
||||
typedef void (*GCacheDestroyFunc) (gpointer value);
|
||||
|
||||
/* Caches
|
||||
*/
|
||||
GCache* g_cache_new (GCacheNewFunc value_new_func,
|
||||
GCacheDestroyFunc value_destroy_func,
|
||||
GCacheDupFunc key_dup_func,
|
||||
GCacheDestroyFunc key_destroy_func,
|
||||
GHashFunc hash_key_func,
|
||||
GHashFunc hash_value_func,
|
||||
GEqualFunc key_equal_func);
|
||||
void g_cache_destroy (GCache *cache);
|
||||
gpointer g_cache_insert (GCache *cache,
|
||||
gpointer key);
|
||||
void g_cache_remove (GCache *cache,
|
||||
gconstpointer value);
|
||||
void g_cache_key_foreach (GCache *cache,
|
||||
GHFunc func,
|
||||
gpointer user_data);
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
void g_cache_value_foreach (GCache *cache,
|
||||
GHFunc func,
|
||||
gpointer user_data);
|
||||
#endif
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_CACHE_H__ */
|
|
@ -1,86 +0,0 @@
|
|||
/* gchecksum.h - data hashing functions
|
||||
*
|
||||
* Copyright (C) 2007 Emmanuele Bassi <ebassi@gnome.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_CHECKSUM_H__
|
||||
#define __G_CHECKSUM_H__
|
||||
|
||||
#include <glib/gtypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* GChecksumType:
|
||||
* @G_CHECKSUM_MD5: Use the MD5 hashing algorithm
|
||||
* @G_CHECKSUM_SHA1: Use the SHA-1 hashing algorithm
|
||||
* @G_CHECKSUM_SHA256: Use the SHA-256 hashing algorithm
|
||||
*
|
||||
* The hashing algorithm to be used by #GChecksum when performing the
|
||||
* digest of some data.
|
||||
*
|
||||
* Note that the #GChecksumType enumeration may be extended at a later
|
||||
* date to include new hashing algorithm types.
|
||||
*
|
||||
* Since: 2.16
|
||||
*/
|
||||
typedef enum {
|
||||
G_CHECKSUM_MD5,
|
||||
G_CHECKSUM_SHA1,
|
||||
G_CHECKSUM_SHA256
|
||||
} GChecksumType;
|
||||
|
||||
/**
|
||||
* GChecksum:
|
||||
*
|
||||
* An opaque structure representing a checksumming operation.
|
||||
* To create a new GChecksum, use g_checksum_new(). To free
|
||||
* a GChecksum, use g_checksum_free().
|
||||
*
|
||||
* Since: 2.16
|
||||
*/
|
||||
typedef struct _GChecksum GChecksum;
|
||||
|
||||
gssize g_checksum_type_get_length (GChecksumType checksum_type);
|
||||
|
||||
GChecksum * g_checksum_new (GChecksumType checksum_type);
|
||||
void g_checksum_reset (GChecksum *checksum);
|
||||
GChecksum * g_checksum_copy (const GChecksum *checksum);
|
||||
void g_checksum_free (GChecksum *checksum);
|
||||
void g_checksum_update (GChecksum *checksum,
|
||||
const guchar *data,
|
||||
gssize length);
|
||||
G_CONST_RETURN gchar *g_checksum_get_string (GChecksum *checksum);
|
||||
void g_checksum_get_digest (GChecksum *checksum,
|
||||
guint8 *buffer,
|
||||
gsize *digest_len);
|
||||
|
||||
gchar *g_compute_checksum_for_data (GChecksumType checksum_type,
|
||||
const guchar *data,
|
||||
gsize length);
|
||||
gchar *g_compute_checksum_for_string (GChecksumType checksum_type,
|
||||
const gchar *str,
|
||||
gssize length);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_CHECKSUM_H__ */
|
|
@ -1,77 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_COMPLETION_H__
|
||||
#define __G_COMPLETION_H__
|
||||
|
||||
#include <glib/glist.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GCompletion GCompletion;
|
||||
|
||||
typedef gchar* (*GCompletionFunc) (gpointer);
|
||||
|
||||
/* GCompletion
|
||||
*/
|
||||
|
||||
typedef gint (*GCompletionStrncmpFunc) (const gchar *s1,
|
||||
const gchar *s2,
|
||||
gsize n);
|
||||
|
||||
struct _GCompletion
|
||||
{
|
||||
GList* items;
|
||||
GCompletionFunc func;
|
||||
|
||||
gchar* prefix;
|
||||
GList* cache;
|
||||
GCompletionStrncmpFunc strncmp_func;
|
||||
};
|
||||
|
||||
GCompletion* g_completion_new (GCompletionFunc func);
|
||||
void g_completion_add_items (GCompletion* cmp,
|
||||
GList* items);
|
||||
void g_completion_remove_items (GCompletion* cmp,
|
||||
GList* items);
|
||||
void g_completion_clear_items (GCompletion* cmp);
|
||||
GList* g_completion_complete (GCompletion* cmp,
|
||||
const gchar* prefix,
|
||||
gchar** new_prefix);
|
||||
GList* g_completion_complete_utf8 (GCompletion *cmp,
|
||||
const gchar* prefix,
|
||||
gchar** new_prefix);
|
||||
void g_completion_set_compare (GCompletion *cmp,
|
||||
GCompletionStrncmpFunc strncmp_func);
|
||||
void g_completion_free (GCompletion* cmp);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_COMPLETION_H__ */
|
|
@ -1,138 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_CONVERT_H__
|
||||
#define __G_CONVERT_H__
|
||||
|
||||
#include <glib/gerror.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_CONVERT_ERROR_NO_CONVERSION,
|
||||
G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
|
||||
G_CONVERT_ERROR_FAILED,
|
||||
G_CONVERT_ERROR_PARTIAL_INPUT,
|
||||
G_CONVERT_ERROR_BAD_URI,
|
||||
G_CONVERT_ERROR_NOT_ABSOLUTE_PATH
|
||||
} GConvertError;
|
||||
|
||||
#define G_CONVERT_ERROR g_convert_error_quark()
|
||||
GQuark g_convert_error_quark (void);
|
||||
|
||||
/* Thin wrappers around iconv
|
||||
*/
|
||||
typedef struct _GIConv *GIConv;
|
||||
|
||||
GIConv g_iconv_open (const gchar *to_codeset,
|
||||
const gchar *from_codeset);
|
||||
gsize g_iconv (GIConv converter,
|
||||
gchar **inbuf,
|
||||
gsize *inbytes_left,
|
||||
gchar **outbuf,
|
||||
gsize *outbytes_left);
|
||||
gint g_iconv_close (GIConv converter);
|
||||
|
||||
|
||||
gchar* g_convert (const gchar *str,
|
||||
gssize len,
|
||||
const gchar *to_codeset,
|
||||
const gchar *from_codeset,
|
||||
gsize *bytes_read,
|
||||
gsize *bytes_written,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
gchar* g_convert_with_iconv (const gchar *str,
|
||||
gssize len,
|
||||
GIConv converter,
|
||||
gsize *bytes_read,
|
||||
gsize *bytes_written,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
gchar* g_convert_with_fallback (const gchar *str,
|
||||
gssize len,
|
||||
const gchar *to_codeset,
|
||||
const gchar *from_codeset,
|
||||
gchar *fallback,
|
||||
gsize *bytes_read,
|
||||
gsize *bytes_written,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
|
||||
|
||||
/* Convert between libc's idea of strings and UTF-8.
|
||||
*/
|
||||
gchar* g_locale_to_utf8 (const gchar *opsysstring,
|
||||
gssize len,
|
||||
gsize *bytes_read,
|
||||
gsize *bytes_written,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
gchar* g_locale_from_utf8 (const gchar *utf8string,
|
||||
gssize len,
|
||||
gsize *bytes_read,
|
||||
gsize *bytes_written,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
|
||||
/* Convert between the operating system (or C runtime)
|
||||
* representation of file names and UTF-8.
|
||||
*/
|
||||
#ifdef G_OS_WIN32
|
||||
#define g_filename_to_utf8 g_filename_to_utf8_utf8
|
||||
#define g_filename_from_utf8 g_filename_from_utf8_utf8
|
||||
#define g_filename_from_uri g_filename_from_uri_utf8
|
||||
#define g_filename_to_uri g_filename_to_uri_utf8
|
||||
#endif
|
||||
|
||||
gchar* g_filename_to_utf8 (const gchar *opsysstring,
|
||||
gssize len,
|
||||
gsize *bytes_read,
|
||||
gsize *bytes_written,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
gchar* g_filename_from_utf8 (const gchar *utf8string,
|
||||
gssize len,
|
||||
gsize *bytes_read,
|
||||
gsize *bytes_written,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
|
||||
gchar *g_filename_from_uri (const gchar *uri,
|
||||
gchar **hostname,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
|
||||
gchar *g_filename_to_uri (const gchar *filename,
|
||||
const gchar *hostname,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
gchar *g_filename_display_name (const gchar *filename) G_GNUC_MALLOC;
|
||||
gboolean g_get_filename_charsets (G_CONST_RETURN gchar ***charsets);
|
||||
|
||||
gchar *g_filename_display_basename (const gchar *filename) G_GNUC_MALLOC;
|
||||
|
||||
gchar **g_uri_list_extract_uris (const gchar *uri_list) G_GNUC_MALLOC;
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_CONVERT_H__ */
|
|
@ -1,122 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_DATASET_H__
|
||||
#define __G_DATASET_H__
|
||||
|
||||
#include <glib/gquark.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GData GData;
|
||||
|
||||
typedef void (*GDataForeachFunc) (GQuark key_id,
|
||||
gpointer data,
|
||||
gpointer user_data);
|
||||
|
||||
/* Keyed Data List
|
||||
*/
|
||||
void g_datalist_init (GData **datalist);
|
||||
void g_datalist_clear (GData **datalist);
|
||||
gpointer g_datalist_id_get_data (GData **datalist,
|
||||
GQuark key_id);
|
||||
void g_datalist_id_set_data_full (GData **datalist,
|
||||
GQuark key_id,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy_func);
|
||||
gpointer g_datalist_id_remove_no_notify (GData **datalist,
|
||||
GQuark key_id);
|
||||
void g_datalist_foreach (GData **datalist,
|
||||
GDataForeachFunc func,
|
||||
gpointer user_data);
|
||||
|
||||
/**
|
||||
* G_DATALIST_FLAGS_MASK:
|
||||
*
|
||||
* A bitmask that restricts the possible flags passed to
|
||||
* g_datalist_set_flags(). Passing a flags value where
|
||||
* flags & ~G_DATALIST_FLAGS_MASK != 0 is an error.
|
||||
*/
|
||||
#define G_DATALIST_FLAGS_MASK 0x3
|
||||
|
||||
void g_datalist_set_flags (GData **datalist,
|
||||
guint flags);
|
||||
void g_datalist_unset_flags (GData **datalist,
|
||||
guint flags);
|
||||
guint g_datalist_get_flags (GData **datalist);
|
||||
|
||||
#define g_datalist_id_set_data(dl, q, d) \
|
||||
g_datalist_id_set_data_full ((dl), (q), (d), NULL)
|
||||
#define g_datalist_id_remove_data(dl, q) \
|
||||
g_datalist_id_set_data ((dl), (q), NULL)
|
||||
#define g_datalist_get_data(dl, k) \
|
||||
(g_datalist_id_get_data ((dl), g_quark_try_string (k)))
|
||||
#define g_datalist_set_data_full(dl, k, d, f) \
|
||||
g_datalist_id_set_data_full ((dl), g_quark_from_string (k), (d), (f))
|
||||
#define g_datalist_remove_no_notify(dl, k) \
|
||||
g_datalist_id_remove_no_notify ((dl), g_quark_try_string (k))
|
||||
#define g_datalist_set_data(dl, k, d) \
|
||||
g_datalist_set_data_full ((dl), (k), (d), NULL)
|
||||
#define g_datalist_remove_data(dl, k) \
|
||||
g_datalist_id_set_data ((dl), g_quark_try_string (k), NULL)
|
||||
|
||||
|
||||
/* Location Associated Keyed Data
|
||||
*/
|
||||
void g_dataset_destroy (gconstpointer dataset_location);
|
||||
gpointer g_dataset_id_get_data (gconstpointer dataset_location,
|
||||
GQuark key_id);
|
||||
void g_dataset_id_set_data_full (gconstpointer dataset_location,
|
||||
GQuark key_id,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy_func);
|
||||
gpointer g_dataset_id_remove_no_notify (gconstpointer dataset_location,
|
||||
GQuark key_id);
|
||||
void g_dataset_foreach (gconstpointer dataset_location,
|
||||
GDataForeachFunc func,
|
||||
gpointer user_data);
|
||||
#define g_dataset_id_set_data(l, k, d) \
|
||||
g_dataset_id_set_data_full ((l), (k), (d), NULL)
|
||||
#define g_dataset_id_remove_data(l, k) \
|
||||
g_dataset_id_set_data ((l), (k), NULL)
|
||||
#define g_dataset_get_data(l, k) \
|
||||
(g_dataset_id_get_data ((l), g_quark_try_string (k)))
|
||||
#define g_dataset_set_data_full(l, k, d, f) \
|
||||
g_dataset_id_set_data_full ((l), g_quark_from_string (k), (d), (f))
|
||||
#define g_dataset_remove_no_notify(l, k) \
|
||||
g_dataset_id_remove_no_notify ((l), g_quark_try_string (k))
|
||||
#define g_dataset_set_data(l, k, d) \
|
||||
g_dataset_set_data_full ((l), (k), (d), NULL)
|
||||
#define g_dataset_remove_data(l, k) \
|
||||
g_dataset_id_set_data ((l), g_quark_try_string (k), NULL)
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DATASET_H__ */
|
|
@ -1,44 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* gdataset-private.h: Internal macros for accessing dataset values
|
||||
* Copyright (C) 2005 Red Hat
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#ifndef __G_DATASETPRIVATE_H__
|
||||
#define __G_DATASETPRIVATE_H__
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* GET_FLAGS is implemented via atomic pointer access, to allow memory
|
||||
* barriers to take effect without acquiring the global dataset mutex.
|
||||
*/
|
||||
#define G_DATALIST_GET_FLAGS(datalist) \
|
||||
((gsize) g_atomic_pointer_get (datalist) & G_DATALIST_FLAGS_MASK)
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DATASETPRIVATE_H__ */
|
|
@ -1,263 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_DATE_H__
|
||||
#define __G_DATE_H__
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include <glib/gtypes.h>
|
||||
#include <glib/gquark.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* GDate
|
||||
*
|
||||
* Date calculations (not time for now, to be resolved). These are a
|
||||
* mutant combination of Steffen Beyer's DateCalc routines
|
||||
* (http://www.perl.com/CPAN/authors/id/STBEY/) and Jon Trowbridge's
|
||||
* date routines (written for in-house software). Written by Havoc
|
||||
* Pennington <hp@pobox.com>
|
||||
*/
|
||||
|
||||
typedef gint32 GTime;
|
||||
typedef guint16 GDateYear;
|
||||
typedef guint8 GDateDay; /* day of the month */
|
||||
typedef struct _GDate GDate;
|
||||
|
||||
/* enum used to specify order of appearance in parsed date strings */
|
||||
typedef enum
|
||||
{
|
||||
G_DATE_DAY = 0,
|
||||
G_DATE_MONTH = 1,
|
||||
G_DATE_YEAR = 2
|
||||
} GDateDMY;
|
||||
|
||||
/* actual week and month values */
|
||||
typedef enum
|
||||
{
|
||||
G_DATE_BAD_WEEKDAY = 0,
|
||||
G_DATE_MONDAY = 1,
|
||||
G_DATE_TUESDAY = 2,
|
||||
G_DATE_WEDNESDAY = 3,
|
||||
G_DATE_THURSDAY = 4,
|
||||
G_DATE_FRIDAY = 5,
|
||||
G_DATE_SATURDAY = 6,
|
||||
G_DATE_SUNDAY = 7
|
||||
} GDateWeekday;
|
||||
typedef enum
|
||||
{
|
||||
G_DATE_BAD_MONTH = 0,
|
||||
G_DATE_JANUARY = 1,
|
||||
G_DATE_FEBRUARY = 2,
|
||||
G_DATE_MARCH = 3,
|
||||
G_DATE_APRIL = 4,
|
||||
G_DATE_MAY = 5,
|
||||
G_DATE_JUNE = 6,
|
||||
G_DATE_JULY = 7,
|
||||
G_DATE_AUGUST = 8,
|
||||
G_DATE_SEPTEMBER = 9,
|
||||
G_DATE_OCTOBER = 10,
|
||||
G_DATE_NOVEMBER = 11,
|
||||
G_DATE_DECEMBER = 12
|
||||
} GDateMonth;
|
||||
|
||||
#define G_DATE_BAD_JULIAN 0U
|
||||
#define G_DATE_BAD_DAY 0U
|
||||
#define G_DATE_BAD_YEAR 0U
|
||||
|
||||
/* Note: directly manipulating structs is generally a bad idea, but
|
||||
* in this case it's an *incredibly* bad idea, because all or part
|
||||
* of this struct can be invalid at any given time. Use the functions,
|
||||
* or you will get hosed, I promise.
|
||||
*/
|
||||
struct _GDate
|
||||
{
|
||||
guint julian_days : 32; /* julian days representation - we use a
|
||||
* bitfield hoping that 64 bit platforms
|
||||
* will pack this whole struct in one big
|
||||
* int
|
||||
*/
|
||||
|
||||
guint julian : 1; /* julian is valid */
|
||||
guint dmy : 1; /* dmy is valid */
|
||||
|
||||
/* DMY representation */
|
||||
guint day : 6;
|
||||
guint month : 4;
|
||||
guint year : 16;
|
||||
};
|
||||
|
||||
/* g_date_new() returns an invalid date, you then have to _set() stuff
|
||||
* to get a usable object. You can also allocate a GDate statically,
|
||||
* then call g_date_clear() to initialize.
|
||||
*/
|
||||
GDate* g_date_new (void);
|
||||
GDate* g_date_new_dmy (GDateDay day,
|
||||
GDateMonth month,
|
||||
GDateYear year);
|
||||
GDate* g_date_new_julian (guint32 julian_day);
|
||||
void g_date_free (GDate *date);
|
||||
|
||||
/* check g_date_valid() after doing an operation that might fail, like
|
||||
* _parse. Almost all g_date operations are undefined on invalid
|
||||
* dates (the exceptions are the mutators, since you need those to
|
||||
* return to validity).
|
||||
*/
|
||||
gboolean g_date_valid (const GDate *date);
|
||||
gboolean g_date_valid_day (GDateDay day) G_GNUC_CONST;
|
||||
gboolean g_date_valid_month (GDateMonth month) G_GNUC_CONST;
|
||||
gboolean g_date_valid_year (GDateYear year) G_GNUC_CONST;
|
||||
gboolean g_date_valid_weekday (GDateWeekday weekday) G_GNUC_CONST;
|
||||
gboolean g_date_valid_julian (guint32 julian_date) G_GNUC_CONST;
|
||||
gboolean g_date_valid_dmy (GDateDay day,
|
||||
GDateMonth month,
|
||||
GDateYear year) G_GNUC_CONST;
|
||||
|
||||
GDateWeekday g_date_get_weekday (const GDate *date);
|
||||
GDateMonth g_date_get_month (const GDate *date);
|
||||
GDateYear g_date_get_year (const GDate *date);
|
||||
GDateDay g_date_get_day (const GDate *date);
|
||||
guint32 g_date_get_julian (const GDate *date);
|
||||
guint g_date_get_day_of_year (const GDate *date);
|
||||
/* First monday/sunday is the start of week 1; if we haven't reached
|
||||
* that day, return 0. These are not ISO weeks of the year; that
|
||||
* routine needs to be added.
|
||||
* these functions return the number of weeks, starting on the
|
||||
* corrsponding day
|
||||
*/
|
||||
guint g_date_get_monday_week_of_year (const GDate *date);
|
||||
guint g_date_get_sunday_week_of_year (const GDate *date);
|
||||
guint g_date_get_iso8601_week_of_year (const GDate *date);
|
||||
|
||||
/* If you create a static date struct you need to clear it to get it
|
||||
* in a sane state before use. You can clear a whole array at
|
||||
* once with the ndates argument.
|
||||
*/
|
||||
void g_date_clear (GDate *date,
|
||||
guint n_dates);
|
||||
|
||||
/* The parse routine is meant for dates typed in by a user, so it
|
||||
* permits many formats but tries to catch common typos. If your data
|
||||
* needs to be strictly validated, it is not an appropriate function.
|
||||
*/
|
||||
void g_date_set_parse (GDate *date,
|
||||
const gchar *str);
|
||||
void g_date_set_time_t (GDate *date,
|
||||
time_t timet);
|
||||
void g_date_set_time_val (GDate *date,
|
||||
GTimeVal *timeval);
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
void g_date_set_time (GDate *date,
|
||||
GTime time_);
|
||||
#endif
|
||||
void g_date_set_month (GDate *date,
|
||||
GDateMonth month);
|
||||
void g_date_set_day (GDate *date,
|
||||
GDateDay day);
|
||||
void g_date_set_year (GDate *date,
|
||||
GDateYear year);
|
||||
void g_date_set_dmy (GDate *date,
|
||||
GDateDay day,
|
||||
GDateMonth month,
|
||||
GDateYear y);
|
||||
void g_date_set_julian (GDate *date,
|
||||
guint32 julian_date);
|
||||
gboolean g_date_is_first_of_month (const GDate *date);
|
||||
gboolean g_date_is_last_of_month (const GDate *date);
|
||||
|
||||
/* To go forward by some number of weeks just go forward weeks*7 days */
|
||||
void g_date_add_days (GDate *date,
|
||||
guint n_days);
|
||||
void g_date_subtract_days (GDate *date,
|
||||
guint n_days);
|
||||
|
||||
/* If you add/sub months while day > 28, the day might change */
|
||||
void g_date_add_months (GDate *date,
|
||||
guint n_months);
|
||||
void g_date_subtract_months (GDate *date,
|
||||
guint n_months);
|
||||
|
||||
/* If it's feb 29, changing years can move you to the 28th */
|
||||
void g_date_add_years (GDate *date,
|
||||
guint n_years);
|
||||
void g_date_subtract_years (GDate *date,
|
||||
guint n_years);
|
||||
gboolean g_date_is_leap_year (GDateYear year) G_GNUC_CONST;
|
||||
guint8 g_date_get_days_in_month (GDateMonth month,
|
||||
GDateYear year) G_GNUC_CONST;
|
||||
guint8 g_date_get_monday_weeks_in_year (GDateYear year) G_GNUC_CONST;
|
||||
guint8 g_date_get_sunday_weeks_in_year (GDateYear year) G_GNUC_CONST;
|
||||
|
||||
/* Returns the number of days between the two dates. If date2 comes
|
||||
before date1, a negative value is return. */
|
||||
gint g_date_days_between (const GDate *date1,
|
||||
const GDate *date2);
|
||||
|
||||
/* qsort-friendly (with a cast...) */
|
||||
gint g_date_compare (const GDate *lhs,
|
||||
const GDate *rhs);
|
||||
void g_date_to_struct_tm (const GDate *date,
|
||||
struct tm *tm);
|
||||
|
||||
void g_date_clamp (GDate *date,
|
||||
const GDate *min_date,
|
||||
const GDate *max_date);
|
||||
|
||||
/* Swap date1 and date2's values if date1 > date2. */
|
||||
void g_date_order (GDate *date1, GDate *date2);
|
||||
|
||||
/* Just like strftime() except you can only use date-related formats.
|
||||
* Using a time format is undefined.
|
||||
*/
|
||||
gsize g_date_strftime (gchar *s,
|
||||
gsize slen,
|
||||
const gchar *format,
|
||||
const GDate *date);
|
||||
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
|
||||
#define g_date_weekday g_date_get_weekday
|
||||
#define g_date_month g_date_get_month
|
||||
#define g_date_year g_date_get_year
|
||||
#define g_date_day g_date_get_day
|
||||
#define g_date_julian g_date_get_julian
|
||||
#define g_date_day_of_year g_date_get_day_of_year
|
||||
#define g_date_monday_week_of_year g_date_get_monday_week_of_year
|
||||
#define g_date_sunday_week_of_year g_date_get_sunday_week_of_year
|
||||
#define g_date_days_in_month g_date_get_days_in_month
|
||||
#define g_date_monday_weeks_in_year g_date_get_monday_weeks_in_year
|
||||
#define g_date_sunday_weeks_in_year g_date_get_sunday_weeks_in_year
|
||||
|
||||
#endif /* G_DISABLE_DEPRECATED */
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DATE_H__ */
|
|
@ -1,59 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GLib Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#ifndef __G_DEBUG_H__
|
||||
#define __G_DEBUG_H__
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef enum {
|
||||
G_DEBUG_FATAL_WARNINGS = 1 << 0,
|
||||
G_DEBUG_FATAL_CRITICALS = 1 << 1
|
||||
} GDebugFlag;
|
||||
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
|
||||
#define G_NOTE(type, action) G_STMT_START { \
|
||||
if (!_g_debug_initialized) \
|
||||
{ _g_debug_init (); } \
|
||||
if (_g_debug_flags & G_DEBUG_##type) \
|
||||
{ action; }; } G_STMT_END
|
||||
|
||||
#else /* !G_ENABLE_DEBUG */
|
||||
|
||||
#define G_NOTE(type, action)
|
||||
|
||||
#endif /* G_ENABLE_DEBUG */
|
||||
|
||||
GLIB_VAR gboolean _g_debug_initialized;
|
||||
GLIB_VAR guint _g_debug_flags;
|
||||
|
||||
G_GNUC_INTERNAL void _g_debug_init (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DEBUG_H__ */
|
|
@ -1,52 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* gdir.c: Simplified wrapper around the DIRENT functions.
|
||||
*
|
||||
* Copyright 2001 Hans Breuer
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_DIR_H__
|
||||
#define __G_DIR_H__
|
||||
|
||||
#include <glib/gerror.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GDir GDir;
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
/* For DLL ABI stability, keep old names for old (non-UTF-8) functionality. */
|
||||
#define g_dir_open g_dir_open_utf8
|
||||
#define g_dir_read_name g_dir_read_name_utf8
|
||||
#endif
|
||||
|
||||
GDir * g_dir_open (const gchar *path,
|
||||
guint flags,
|
||||
GError **error);
|
||||
G_CONST_RETURN gchar *g_dir_read_name (GDir *dir);
|
||||
void g_dir_rewind (GDir *dir);
|
||||
void g_dir_close (GDir *dir);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DIR_H__ */
|
|
@ -1,92 +0,0 @@
|
|||
/* gerror.h - Error reporting system
|
||||
*
|
||||
* Copyright 2000 Red Hat, Inc.
|
||||
*
|
||||
* The Gnome Library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* The Gnome 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with the Gnome Library; see the file COPYING.LIB. If not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_ERROR_H__
|
||||
#define __G_ERROR_H__
|
||||
|
||||
#include <glib/gquark.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GError GError;
|
||||
|
||||
struct _GError
|
||||
{
|
||||
GQuark domain;
|
||||
gint code;
|
||||
gchar *message;
|
||||
};
|
||||
|
||||
GError* g_error_new (GQuark domain,
|
||||
gint code,
|
||||
const gchar *format,
|
||||
...) G_GNUC_PRINTF (3, 4);
|
||||
|
||||
GError* g_error_new_literal (GQuark domain,
|
||||
gint code,
|
||||
const gchar *message);
|
||||
|
||||
void g_error_free (GError *error);
|
||||
GError* g_error_copy (const GError *error);
|
||||
|
||||
gboolean g_error_matches (const GError *error,
|
||||
GQuark domain,
|
||||
gint code);
|
||||
|
||||
/* if (err) *err = g_error_new(domain, code, format, ...), also has
|
||||
* some sanity checks.
|
||||
*/
|
||||
void g_set_error (GError **err,
|
||||
GQuark domain,
|
||||
gint code,
|
||||
const gchar *format,
|
||||
...) G_GNUC_PRINTF (4, 5);
|
||||
|
||||
void g_set_error_literal (GError **err,
|
||||
GQuark domain,
|
||||
gint code,
|
||||
const gchar *message);
|
||||
|
||||
/* if (dest) *dest = src; also has some sanity checks.
|
||||
*/
|
||||
void g_propagate_error (GError **dest,
|
||||
GError *src);
|
||||
|
||||
/* if (err && *err) { g_error_free(*err); *err = NULL; } */
|
||||
void g_clear_error (GError **err);
|
||||
|
||||
/* if (err) prefix the formatted string to the ->message */
|
||||
void g_prefix_error (GError **err,
|
||||
const gchar *format,
|
||||
...) G_GNUC_PRINTF (2, 3);
|
||||
|
||||
/* g_propagate_error then g_error_prefix on dest */
|
||||
void g_propagate_prefixed_error (GError **dest,
|
||||
GError *src,
|
||||
const gchar *format,
|
||||
...) G_GNUC_PRINTF (3, 4);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_ERROR_H__ */
|
|
@ -1,125 +0,0 @@
|
|||
/* gfileutils.h - File utility functions
|
||||
*
|
||||
* Copyright 2000 Red Hat, Inc.
|
||||
*
|
||||
* GLib is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* GLib 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with GLib; see the file COPYING.LIB. If not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_FILEUTILS_H__
|
||||
#define __G_FILEUTILS_H__
|
||||
|
||||
#include <glib/gerror.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_FILE_ERROR g_file_error_quark ()
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_FILE_ERROR_EXIST,
|
||||
G_FILE_ERROR_ISDIR,
|
||||
G_FILE_ERROR_ACCES,
|
||||
G_FILE_ERROR_NAMETOOLONG,
|
||||
G_FILE_ERROR_NOENT,
|
||||
G_FILE_ERROR_NOTDIR,
|
||||
G_FILE_ERROR_NXIO,
|
||||
G_FILE_ERROR_NODEV,
|
||||
G_FILE_ERROR_ROFS,
|
||||
G_FILE_ERROR_TXTBSY,
|
||||
G_FILE_ERROR_FAULT,
|
||||
G_FILE_ERROR_LOOP,
|
||||
G_FILE_ERROR_NOSPC,
|
||||
G_FILE_ERROR_NOMEM,
|
||||
G_FILE_ERROR_MFILE,
|
||||
G_FILE_ERROR_NFILE,
|
||||
G_FILE_ERROR_BADF,
|
||||
G_FILE_ERROR_INVAL,
|
||||
G_FILE_ERROR_PIPE,
|
||||
G_FILE_ERROR_AGAIN,
|
||||
G_FILE_ERROR_INTR,
|
||||
G_FILE_ERROR_IO,
|
||||
G_FILE_ERROR_PERM,
|
||||
G_FILE_ERROR_NOSYS,
|
||||
G_FILE_ERROR_FAILED
|
||||
} GFileError;
|
||||
|
||||
/* For backward-compat reasons, these are synced to an old
|
||||
* anonymous enum in libgnome. But don't use that enum
|
||||
* in new code.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
G_FILE_TEST_IS_REGULAR = 1 << 0,
|
||||
G_FILE_TEST_IS_SYMLINK = 1 << 1,
|
||||
G_FILE_TEST_IS_DIR = 1 << 2,
|
||||
G_FILE_TEST_IS_EXECUTABLE = 1 << 3,
|
||||
G_FILE_TEST_EXISTS = 1 << 4
|
||||
} GFileTest;
|
||||
|
||||
GQuark g_file_error_quark (void);
|
||||
/* So other code can generate a GFileError */
|
||||
GFileError g_file_error_from_errno (gint err_no);
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#define g_file_test g_file_test_utf8
|
||||
#define g_file_get_contents g_file_get_contents_utf8
|
||||
#define g_mkstemp g_mkstemp_utf8
|
||||
#define g_file_open_tmp g_file_open_tmp_utf8
|
||||
#endif
|
||||
|
||||
gboolean g_file_test (const gchar *filename,
|
||||
GFileTest test);
|
||||
gboolean g_file_get_contents (const gchar *filename,
|
||||
gchar **contents,
|
||||
gsize *length,
|
||||
GError **error);
|
||||
gboolean g_file_set_contents (const gchar *filename,
|
||||
const gchar *contents,
|
||||
gssize length,
|
||||
GError **error);
|
||||
gchar *g_file_read_link (const gchar *filename,
|
||||
GError **error);
|
||||
|
||||
/* Wrapper / workalike for mkstemp() */
|
||||
gint g_mkstemp (gchar *tmpl);
|
||||
|
||||
/* Wrapper for g_mkstemp */
|
||||
gint g_file_open_tmp (const gchar *tmpl,
|
||||
gchar **name_used,
|
||||
GError **error);
|
||||
|
||||
char *g_format_size_for_display (goffset size);
|
||||
|
||||
gchar *g_build_path (const gchar *separator,
|
||||
const gchar *first_element,
|
||||
...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED;
|
||||
gchar *g_build_pathv (const gchar *separator,
|
||||
gchar **args) G_GNUC_MALLOC;
|
||||
|
||||
gchar *g_build_filename (const gchar *first_element,
|
||||
...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED;
|
||||
gchar *g_build_filenamev (gchar **args) G_GNUC_MALLOC;
|
||||
|
||||
int g_mkdir_with_parents (const gchar *pathname,
|
||||
int mode);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_FILEUTILS_H__ */
|
|
@ -1,145 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_HASH_H__
|
||||
#define __G_HASH_H__
|
||||
|
||||
#include <glib/gtypes.h>
|
||||
#include <glib/glist.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GHashTable GHashTable;
|
||||
|
||||
typedef gboolean (*GHRFunc) (gpointer key,
|
||||
gpointer value,
|
||||
gpointer user_data);
|
||||
|
||||
typedef struct _GHashTableIter GHashTableIter;
|
||||
|
||||
struct _GHashTableIter
|
||||
{
|
||||
/*< private >*/
|
||||
gpointer dummy1;
|
||||
gpointer dummy2;
|
||||
gpointer dummy3;
|
||||
int dummy4;
|
||||
gboolean dummy5;
|
||||
gpointer dummy6;
|
||||
};
|
||||
|
||||
/* Hash tables
|
||||
*/
|
||||
GHashTable* g_hash_table_new (GHashFunc hash_func,
|
||||
GEqualFunc key_equal_func);
|
||||
GHashTable* g_hash_table_new_full (GHashFunc hash_func,
|
||||
GEqualFunc key_equal_func,
|
||||
GDestroyNotify key_destroy_func,
|
||||
GDestroyNotify value_destroy_func);
|
||||
void g_hash_table_destroy (GHashTable *hash_table);
|
||||
void g_hash_table_insert (GHashTable *hash_table,
|
||||
gpointer key,
|
||||
gpointer value);
|
||||
void g_hash_table_replace (GHashTable *hash_table,
|
||||
gpointer key,
|
||||
gpointer value);
|
||||
gboolean g_hash_table_remove (GHashTable *hash_table,
|
||||
gconstpointer key);
|
||||
void g_hash_table_remove_all (GHashTable *hash_table);
|
||||
gboolean g_hash_table_steal (GHashTable *hash_table,
|
||||
gconstpointer key);
|
||||
void g_hash_table_steal_all (GHashTable *hash_table);
|
||||
gpointer g_hash_table_lookup (GHashTable *hash_table,
|
||||
gconstpointer key);
|
||||
gboolean g_hash_table_lookup_extended (GHashTable *hash_table,
|
||||
gconstpointer lookup_key,
|
||||
gpointer *orig_key,
|
||||
gpointer *value);
|
||||
void g_hash_table_foreach (GHashTable *hash_table,
|
||||
GHFunc func,
|
||||
gpointer user_data);
|
||||
gpointer g_hash_table_find (GHashTable *hash_table,
|
||||
GHRFunc predicate,
|
||||
gpointer user_data);
|
||||
guint g_hash_table_foreach_remove (GHashTable *hash_table,
|
||||
GHRFunc func,
|
||||
gpointer user_data);
|
||||
guint g_hash_table_foreach_steal (GHashTable *hash_table,
|
||||
GHRFunc func,
|
||||
gpointer user_data);
|
||||
guint g_hash_table_size (GHashTable *hash_table);
|
||||
GList * g_hash_table_get_keys (GHashTable *hash_table);
|
||||
GList * g_hash_table_get_values (GHashTable *hash_table);
|
||||
|
||||
void g_hash_table_iter_init (GHashTableIter *iter,
|
||||
GHashTable *hash_table);
|
||||
gboolean g_hash_table_iter_next (GHashTableIter *iter,
|
||||
gpointer *key,
|
||||
gpointer *value);
|
||||
GHashTable* g_hash_table_iter_get_hash_table (GHashTableIter *iter);
|
||||
void g_hash_table_iter_remove (GHashTableIter *iter);
|
||||
void g_hash_table_iter_steal (GHashTableIter *iter);
|
||||
|
||||
/* keeping hash tables alive */
|
||||
GHashTable* g_hash_table_ref (GHashTable *hash_table);
|
||||
void g_hash_table_unref (GHashTable *hash_table);
|
||||
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
|
||||
/* The following two functions are deprecated and will be removed in
|
||||
* the next major release. They do no good. */
|
||||
#define g_hash_table_freeze(hash_table) ((void)0)
|
||||
#define g_hash_table_thaw(hash_table) ((void)0)
|
||||
|
||||
#endif /* G_DISABLE_DEPRECATED */
|
||||
|
||||
/* Hash Functions
|
||||
*/
|
||||
gboolean g_str_equal (gconstpointer v1,
|
||||
gconstpointer v2);
|
||||
guint g_str_hash (gconstpointer v);
|
||||
|
||||
gboolean g_int_equal (gconstpointer v1,
|
||||
gconstpointer v2);
|
||||
guint g_int_hash (gconstpointer v);
|
||||
|
||||
/* This "hash" function will just return the key's address as an
|
||||
* unsigned integer. Useful for hashing on plain addresses or
|
||||
* simple integer values.
|
||||
* Passing NULL into g_hash_table_new() as GHashFunc has the
|
||||
* same effect as passing g_direct_hash().
|
||||
*/
|
||||
guint g_direct_hash (gconstpointer v) G_GNUC_CONST;
|
||||
gboolean g_direct_equal (gconstpointer v1,
|
||||
gconstpointer v2) G_GNUC_CONST;
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_HASH_H__ */
|
|
@ -1,181 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_HOOK_H__
|
||||
#define __G_HOOK_H__
|
||||
|
||||
#include <glib/gmem.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
/* --- typedefs --- */
|
||||
typedef struct _GHook GHook;
|
||||
typedef struct _GHookList GHookList;
|
||||
|
||||
typedef gint (*GHookCompareFunc) (GHook *new_hook,
|
||||
GHook *sibling);
|
||||
typedef gboolean (*GHookFindFunc) (GHook *hook,
|
||||
gpointer data);
|
||||
typedef void (*GHookMarshaller) (GHook *hook,
|
||||
gpointer marshal_data);
|
||||
typedef gboolean (*GHookCheckMarshaller) (GHook *hook,
|
||||
gpointer marshal_data);
|
||||
typedef void (*GHookFunc) (gpointer data);
|
||||
typedef gboolean (*GHookCheckFunc) (gpointer data);
|
||||
typedef void (*GHookFinalizeFunc) (GHookList *hook_list,
|
||||
GHook *hook);
|
||||
typedef enum
|
||||
{
|
||||
G_HOOK_FLAG_ACTIVE = 1 << 0,
|
||||
G_HOOK_FLAG_IN_CALL = 1 << 1,
|
||||
G_HOOK_FLAG_MASK = 0x0f
|
||||
} GHookFlagMask;
|
||||
#define G_HOOK_FLAG_USER_SHIFT (4)
|
||||
|
||||
|
||||
/* --- structures --- */
|
||||
struct _GHookList
|
||||
{
|
||||
gulong seq_id;
|
||||
guint hook_size : 16;
|
||||
guint is_setup : 1;
|
||||
GHook *hooks;
|
||||
gpointer dummy3;
|
||||
GHookFinalizeFunc finalize_hook;
|
||||
gpointer dummy[2];
|
||||
};
|
||||
struct _GHook
|
||||
{
|
||||
gpointer data;
|
||||
GHook *next;
|
||||
GHook *prev;
|
||||
guint ref_count;
|
||||
gulong hook_id;
|
||||
guint flags;
|
||||
gpointer func;
|
||||
GDestroyNotify destroy;
|
||||
};
|
||||
|
||||
|
||||
/* --- macros --- */
|
||||
#define G_HOOK(hook) ((GHook*) (hook))
|
||||
#define G_HOOK_FLAGS(hook) (G_HOOK (hook)->flags)
|
||||
#define G_HOOK_ACTIVE(hook) ((G_HOOK_FLAGS (hook) & \
|
||||
G_HOOK_FLAG_ACTIVE) != 0)
|
||||
#define G_HOOK_IN_CALL(hook) ((G_HOOK_FLAGS (hook) & \
|
||||
G_HOOK_FLAG_IN_CALL) != 0)
|
||||
#define G_HOOK_IS_VALID(hook) (G_HOOK (hook)->hook_id != 0 && \
|
||||
(G_HOOK_FLAGS (hook) & \
|
||||
G_HOOK_FLAG_ACTIVE))
|
||||
#define G_HOOK_IS_UNLINKED(hook) (G_HOOK (hook)->next == NULL && \
|
||||
G_HOOK (hook)->prev == NULL && \
|
||||
G_HOOK (hook)->hook_id == 0 && \
|
||||
G_HOOK (hook)->ref_count == 0)
|
||||
|
||||
|
||||
/* --- prototypes --- */
|
||||
/* callback maintenance functions */
|
||||
void g_hook_list_init (GHookList *hook_list,
|
||||
guint hook_size);
|
||||
void g_hook_list_clear (GHookList *hook_list);
|
||||
GHook* g_hook_alloc (GHookList *hook_list);
|
||||
void g_hook_free (GHookList *hook_list,
|
||||
GHook *hook);
|
||||
GHook * g_hook_ref (GHookList *hook_list,
|
||||
GHook *hook);
|
||||
void g_hook_unref (GHookList *hook_list,
|
||||
GHook *hook);
|
||||
gboolean g_hook_destroy (GHookList *hook_list,
|
||||
gulong hook_id);
|
||||
void g_hook_destroy_link (GHookList *hook_list,
|
||||
GHook *hook);
|
||||
void g_hook_prepend (GHookList *hook_list,
|
||||
GHook *hook);
|
||||
void g_hook_insert_before (GHookList *hook_list,
|
||||
GHook *sibling,
|
||||
GHook *hook);
|
||||
void g_hook_insert_sorted (GHookList *hook_list,
|
||||
GHook *hook,
|
||||
GHookCompareFunc func);
|
||||
GHook* g_hook_get (GHookList *hook_list,
|
||||
gulong hook_id);
|
||||
GHook* g_hook_find (GHookList *hook_list,
|
||||
gboolean need_valids,
|
||||
GHookFindFunc func,
|
||||
gpointer data);
|
||||
GHook* g_hook_find_data (GHookList *hook_list,
|
||||
gboolean need_valids,
|
||||
gpointer data);
|
||||
GHook* g_hook_find_func (GHookList *hook_list,
|
||||
gboolean need_valids,
|
||||
gpointer func);
|
||||
GHook* g_hook_find_func_data (GHookList *hook_list,
|
||||
gboolean need_valids,
|
||||
gpointer func,
|
||||
gpointer data);
|
||||
/* return the first valid hook, and increment its reference count */
|
||||
GHook* g_hook_first_valid (GHookList *hook_list,
|
||||
gboolean may_be_in_call);
|
||||
/* return the next valid hook with incremented reference count, and
|
||||
* decrement the reference count of the original hook
|
||||
*/
|
||||
GHook* g_hook_next_valid (GHookList *hook_list,
|
||||
GHook *hook,
|
||||
gboolean may_be_in_call);
|
||||
/* GHookCompareFunc implementation to insert hooks sorted by their id */
|
||||
gint g_hook_compare_ids (GHook *new_hook,
|
||||
GHook *sibling);
|
||||
/* convenience macros */
|
||||
#define g_hook_append( hook_list, hook ) \
|
||||
g_hook_insert_before ((hook_list), NULL, (hook))
|
||||
/* invoke all valid hooks with the (*GHookFunc) signature.
|
||||
*/
|
||||
void g_hook_list_invoke (GHookList *hook_list,
|
||||
gboolean may_recurse);
|
||||
/* invoke all valid hooks with the (*GHookCheckFunc) signature,
|
||||
* and destroy the hook if FALSE is returned.
|
||||
*/
|
||||
void g_hook_list_invoke_check (GHookList *hook_list,
|
||||
gboolean may_recurse);
|
||||
/* invoke a marshaller on all valid hooks.
|
||||
*/
|
||||
void g_hook_list_marshal (GHookList *hook_list,
|
||||
gboolean may_recurse,
|
||||
GHookMarshaller marshaller,
|
||||
gpointer marshal_data);
|
||||
void g_hook_list_marshal_check (GHookList *hook_list,
|
||||
gboolean may_recurse,
|
||||
GHookCheckMarshaller marshaller,
|
||||
gpointer marshal_data);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_HOOK_H__ */
|
|
@ -1,38 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997, 2002 Peter Mattis, Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __G_I18N_LIB_H__
|
||||
#define __G_I18N_LIB_H__
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include <libintl.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef GETTEXT_PACKAGE
|
||||
#error You must define GETTEXT_PACKAGE before including gi18n-lib.h. Did you forget to include config.h?
|
||||
#endif
|
||||
|
||||
#define _(String) ((char *) g_dgettext (GETTEXT_PACKAGE, String))
|
||||
#define Q_(String) g_dpgettext (GETTEXT_PACKAGE, String, 0)
|
||||
#define N_(String) (String)
|
||||
#define C_(Context,String) g_dpgettext (GETTEXT_PACKAGE, Context "\004" String, strlen (Context) + 1)
|
||||
#define NC_(Context, String) (String)
|
||||
|
||||
#endif /* __G_I18N_LIB_H__ */
|
|
@ -1,34 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997, 2002 Peter Mattis, Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __G_I18N_H__
|
||||
#define __G_I18N_H__
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include <libintl.h>
|
||||
#include <string.h>
|
||||
|
||||
#define _(String) gettext (String)
|
||||
#define Q_(String) g_dpgettext (NULL, String, 0)
|
||||
#define N_(String) (String)
|
||||
#define C_(Context,String) g_dpgettext (NULL, Context "\004" String, strlen (Context) + 1)
|
||||
#define NC_(Context, String) (String)
|
||||
|
||||
#endif /* __G_I18N_H__ */
|
|
@ -1,366 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_IOCHANNEL_H__
|
||||
#define __G_IOCHANNEL_H__
|
||||
|
||||
#include <glib/gconvert.h>
|
||||
#include <glib/gmain.h>
|
||||
#include <glib/gstring.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* GIOChannel
|
||||
*/
|
||||
|
||||
typedef struct _GIOChannel GIOChannel;
|
||||
typedef struct _GIOFuncs GIOFuncs;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_IO_ERROR_NONE,
|
||||
G_IO_ERROR_AGAIN,
|
||||
G_IO_ERROR_INVAL,
|
||||
G_IO_ERROR_UNKNOWN
|
||||
} GIOError;
|
||||
|
||||
#define G_IO_CHANNEL_ERROR g_io_channel_error_quark()
|
||||
|
||||
typedef enum
|
||||
{
|
||||
/* Derived from errno */
|
||||
G_IO_CHANNEL_ERROR_FBIG,
|
||||
G_IO_CHANNEL_ERROR_INVAL,
|
||||
G_IO_CHANNEL_ERROR_IO,
|
||||
G_IO_CHANNEL_ERROR_ISDIR,
|
||||
G_IO_CHANNEL_ERROR_NOSPC,
|
||||
G_IO_CHANNEL_ERROR_NXIO,
|
||||
G_IO_CHANNEL_ERROR_OVERFLOW,
|
||||
G_IO_CHANNEL_ERROR_PIPE,
|
||||
/* Other */
|
||||
G_IO_CHANNEL_ERROR_FAILED
|
||||
} GIOChannelError;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_IO_STATUS_ERROR,
|
||||
G_IO_STATUS_NORMAL,
|
||||
G_IO_STATUS_EOF,
|
||||
G_IO_STATUS_AGAIN
|
||||
} GIOStatus;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_SEEK_CUR,
|
||||
G_SEEK_SET,
|
||||
G_SEEK_END
|
||||
} GSeekType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_IO_IN GLIB_SYSDEF_POLLIN,
|
||||
G_IO_OUT GLIB_SYSDEF_POLLOUT,
|
||||
G_IO_PRI GLIB_SYSDEF_POLLPRI,
|
||||
G_IO_ERR GLIB_SYSDEF_POLLERR,
|
||||
G_IO_HUP GLIB_SYSDEF_POLLHUP,
|
||||
G_IO_NVAL GLIB_SYSDEF_POLLNVAL
|
||||
} GIOCondition;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_IO_FLAG_APPEND = 1 << 0,
|
||||
G_IO_FLAG_NONBLOCK = 1 << 1,
|
||||
G_IO_FLAG_IS_READABLE = 1 << 2, /* Read only flag */
|
||||
G_IO_FLAG_IS_WRITEABLE = 1 << 3, /* Read only flag */
|
||||
G_IO_FLAG_IS_SEEKABLE = 1 << 4, /* Read only flag */
|
||||
G_IO_FLAG_MASK = (1 << 5) - 1,
|
||||
G_IO_FLAG_GET_MASK = G_IO_FLAG_MASK,
|
||||
G_IO_FLAG_SET_MASK = G_IO_FLAG_APPEND | G_IO_FLAG_NONBLOCK
|
||||
} GIOFlags;
|
||||
|
||||
struct _GIOChannel
|
||||
{
|
||||
/*< private >*/
|
||||
gint ref_count;
|
||||
GIOFuncs *funcs;
|
||||
|
||||
gchar *encoding;
|
||||
GIConv read_cd;
|
||||
GIConv write_cd;
|
||||
gchar *line_term; /* String which indicates the end of a line of text */
|
||||
guint line_term_len; /* So we can have null in the line term */
|
||||
|
||||
gsize buf_size;
|
||||
GString *read_buf; /* Raw data from the channel */
|
||||
GString *encoded_read_buf; /* Channel data converted to UTF-8 */
|
||||
GString *write_buf; /* Data ready to be written to the file */
|
||||
gchar partial_write_buf[6]; /* UTF-8 partial characters, null terminated */
|
||||
|
||||
/* Group the flags together, immediately after partial_write_buf, to save memory */
|
||||
|
||||
guint use_buffer : 1; /* The encoding uses the buffers */
|
||||
guint do_encode : 1; /* The encoding uses the GIConv coverters */
|
||||
guint close_on_unref : 1; /* Close the channel on final unref */
|
||||
guint is_readable : 1; /* Cached GIOFlag */
|
||||
guint is_writeable : 1; /* ditto */
|
||||
guint is_seekable : 1; /* ditto */
|
||||
|
||||
gpointer reserved1;
|
||||
gpointer reserved2;
|
||||
};
|
||||
|
||||
typedef gboolean (*GIOFunc) (GIOChannel *source,
|
||||
GIOCondition condition,
|
||||
gpointer data);
|
||||
struct _GIOFuncs
|
||||
{
|
||||
GIOStatus (*io_read) (GIOChannel *channel,
|
||||
gchar *buf,
|
||||
gsize count,
|
||||
gsize *bytes_read,
|
||||
GError **err);
|
||||
GIOStatus (*io_write) (GIOChannel *channel,
|
||||
const gchar *buf,
|
||||
gsize count,
|
||||
gsize *bytes_written,
|
||||
GError **err);
|
||||
GIOStatus (*io_seek) (GIOChannel *channel,
|
||||
gint64 offset,
|
||||
GSeekType type,
|
||||
GError **err);
|
||||
GIOStatus (*io_close) (GIOChannel *channel,
|
||||
GError **err);
|
||||
GSource* (*io_create_watch) (GIOChannel *channel,
|
||||
GIOCondition condition);
|
||||
void (*io_free) (GIOChannel *channel);
|
||||
GIOStatus (*io_set_flags) (GIOChannel *channel,
|
||||
GIOFlags flags,
|
||||
GError **err);
|
||||
GIOFlags (*io_get_flags) (GIOChannel *channel);
|
||||
};
|
||||
|
||||
void g_io_channel_init (GIOChannel *channel);
|
||||
GIOChannel *g_io_channel_ref (GIOChannel *channel);
|
||||
void g_io_channel_unref (GIOChannel *channel);
|
||||
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
GIOError g_io_channel_read (GIOChannel *channel,
|
||||
gchar *buf,
|
||||
gsize count,
|
||||
gsize *bytes_read);
|
||||
GIOError g_io_channel_write (GIOChannel *channel,
|
||||
const gchar *buf,
|
||||
gsize count,
|
||||
gsize *bytes_written);
|
||||
GIOError g_io_channel_seek (GIOChannel *channel,
|
||||
gint64 offset,
|
||||
GSeekType type);
|
||||
void g_io_channel_close (GIOChannel *channel);
|
||||
#endif /* G_DISABLE_DEPRECATED */
|
||||
|
||||
GIOStatus g_io_channel_shutdown (GIOChannel *channel,
|
||||
gboolean flush,
|
||||
GError **err);
|
||||
guint g_io_add_watch_full (GIOChannel *channel,
|
||||
gint priority,
|
||||
GIOCondition condition,
|
||||
GIOFunc func,
|
||||
gpointer user_data,
|
||||
GDestroyNotify notify);
|
||||
GSource * g_io_create_watch (GIOChannel *channel,
|
||||
GIOCondition condition);
|
||||
guint g_io_add_watch (GIOChannel *channel,
|
||||
GIOCondition condition,
|
||||
GIOFunc func,
|
||||
gpointer user_data);
|
||||
|
||||
/* character encoding conversion involved functions.
|
||||
*/
|
||||
|
||||
void g_io_channel_set_buffer_size (GIOChannel *channel,
|
||||
gsize size);
|
||||
gsize g_io_channel_get_buffer_size (GIOChannel *channel);
|
||||
GIOCondition g_io_channel_get_buffer_condition (GIOChannel *channel);
|
||||
GIOStatus g_io_channel_set_flags (GIOChannel *channel,
|
||||
GIOFlags flags,
|
||||
GError **error);
|
||||
GIOFlags g_io_channel_get_flags (GIOChannel *channel);
|
||||
void g_io_channel_set_line_term (GIOChannel *channel,
|
||||
const gchar *line_term,
|
||||
gint length);
|
||||
G_CONST_RETURN gchar* g_io_channel_get_line_term (GIOChannel *channel,
|
||||
gint *length);
|
||||
void g_io_channel_set_buffered (GIOChannel *channel,
|
||||
gboolean buffered);
|
||||
gboolean g_io_channel_get_buffered (GIOChannel *channel);
|
||||
GIOStatus g_io_channel_set_encoding (GIOChannel *channel,
|
||||
const gchar *encoding,
|
||||
GError **error);
|
||||
G_CONST_RETURN gchar* g_io_channel_get_encoding (GIOChannel *channel);
|
||||
void g_io_channel_set_close_on_unref (GIOChannel *channel,
|
||||
gboolean do_close);
|
||||
gboolean g_io_channel_get_close_on_unref (GIOChannel *channel);
|
||||
|
||||
|
||||
GIOStatus g_io_channel_flush (GIOChannel *channel,
|
||||
GError **error);
|
||||
GIOStatus g_io_channel_read_line (GIOChannel *channel,
|
||||
gchar **str_return,
|
||||
gsize *length,
|
||||
gsize *terminator_pos,
|
||||
GError **error);
|
||||
GIOStatus g_io_channel_read_line_string (GIOChannel *channel,
|
||||
GString *buffer,
|
||||
gsize *terminator_pos,
|
||||
GError **error);
|
||||
GIOStatus g_io_channel_read_to_end (GIOChannel *channel,
|
||||
gchar **str_return,
|
||||
gsize *length,
|
||||
GError **error);
|
||||
GIOStatus g_io_channel_read_chars (GIOChannel *channel,
|
||||
gchar *buf,
|
||||
gsize count,
|
||||
gsize *bytes_read,
|
||||
GError **error);
|
||||
GIOStatus g_io_channel_read_unichar (GIOChannel *channel,
|
||||
gunichar *thechar,
|
||||
GError **error);
|
||||
GIOStatus g_io_channel_write_chars (GIOChannel *channel,
|
||||
const gchar *buf,
|
||||
gssize count,
|
||||
gsize *bytes_written,
|
||||
GError **error);
|
||||
GIOStatus g_io_channel_write_unichar (GIOChannel *channel,
|
||||
gunichar thechar,
|
||||
GError **error);
|
||||
GIOStatus g_io_channel_seek_position (GIOChannel *channel,
|
||||
gint64 offset,
|
||||
GSeekType type,
|
||||
GError **error);
|
||||
#ifdef G_OS_WIN32
|
||||
#define g_io_channel_new_file g_io_channel_new_file_utf8
|
||||
#endif
|
||||
|
||||
GIOChannel* g_io_channel_new_file (const gchar *filename,
|
||||
const gchar *mode,
|
||||
GError **error);
|
||||
|
||||
/* Error handling */
|
||||
|
||||
GQuark g_io_channel_error_quark (void);
|
||||
GIOChannelError g_io_channel_error_from_errno (gint en);
|
||||
|
||||
/* On Unix, IO channels created with this function for any file
|
||||
* descriptor or socket.
|
||||
*
|
||||
* On Win32, this can be used either for files opened with the MSVCRT
|
||||
* (the Microsoft run-time C library) _open() or _pipe, including file
|
||||
* descriptors 0, 1 and 2 (corresponding to stdin, stdout and stderr),
|
||||
* or for Winsock SOCKETs. If the parameter is a legal file
|
||||
* descriptor, it is assumed to be such, otherwise it should be a
|
||||
* SOCKET. This relies on SOCKETs and file descriptors not
|
||||
* overlapping. If you want to be certain, call either
|
||||
* g_io_channel_win32_new_fd() or g_io_channel_win32_new_socket()
|
||||
* instead as appropriate.
|
||||
*
|
||||
* The term file descriptor as used in the context of Win32 refers to
|
||||
* the emulated Unix-like file descriptors MSVCRT provides. The native
|
||||
* corresponding concept is file HANDLE. There isn't as of yet a way to
|
||||
* get GIOChannels for Win32 file HANDLEs.
|
||||
*/
|
||||
GIOChannel* g_io_channel_unix_new (int fd);
|
||||
gint g_io_channel_unix_get_fd (GIOChannel *channel);
|
||||
|
||||
|
||||
/* Hook for GClosure / GSource integration. Don't touch */
|
||||
GLIB_VAR GSourceFuncs g_io_watch_funcs;
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
|
||||
/* You can use this "pseudo file descriptor" in a GPollFD to add
|
||||
* polling for Windows messages. GTK applications should not do that.
|
||||
*/
|
||||
|
||||
#define G_WIN32_MSG_HANDLE 19981206
|
||||
|
||||
/* Use this to get a GPollFD from a GIOChannel, so that you can call
|
||||
* g_io_channel_win32_poll(). After calling this you should only use
|
||||
* g_io_channel_read() to read from the GIOChannel, i.e. never read()
|
||||
* from the underlying file descriptor. For SOCKETs, it is possible to call
|
||||
* recv().
|
||||
*/
|
||||
void g_io_channel_win32_make_pollfd (GIOChannel *channel,
|
||||
GIOCondition condition,
|
||||
GPollFD *fd);
|
||||
|
||||
/* This can be used to wait a until at least one of the channels is readable.
|
||||
* On Unix you would do a select() on the file descriptors of the channels.
|
||||
*/
|
||||
gint g_io_channel_win32_poll (GPollFD *fds,
|
||||
gint n_fds,
|
||||
gint timeout_);
|
||||
|
||||
/* Create an IO channel for Windows messages for window handle hwnd. */
|
||||
#if GLIB_SIZEOF_VOID_P == 8
|
||||
/* We use gsize here so that it is still an integer type and not a
|
||||
* pointer, like the guint in the traditional prototype. We can't use
|
||||
* intptr_t as that is not portable enough.
|
||||
*/
|
||||
GIOChannel *g_io_channel_win32_new_messages (gsize hwnd);
|
||||
#else
|
||||
GIOChannel *g_io_channel_win32_new_messages (guint hwnd);
|
||||
#endif
|
||||
|
||||
/* Create an IO channel for C runtime (emulated Unix-like) file
|
||||
* descriptors. After calling g_io_add_watch() on a IO channel
|
||||
* returned by this function, you shouldn't call read() on the file
|
||||
* descriptor. This is because adding polling for a file descriptor is
|
||||
* implemented on Win32 by starting a thread that sits blocked in a
|
||||
* read() from the file descriptor most of the time. All reads from
|
||||
* the file descriptor should be done by this internal GLib
|
||||
* thread. Your code should call only g_io_channel_read_chars().
|
||||
*/
|
||||
GIOChannel* g_io_channel_win32_new_fd (gint fd);
|
||||
|
||||
/* Get the C runtime file descriptor of a channel. */
|
||||
gint g_io_channel_win32_get_fd (GIOChannel *channel);
|
||||
|
||||
/* Create an IO channel for a winsock socket. The parameter should be
|
||||
* a SOCKET. Contrary to IO channels for file descriptors (on *Win32),
|
||||
* you can use normal recv() or recvfrom() on sockets even if GLib
|
||||
* is polling them.
|
||||
*/
|
||||
GIOChannel *g_io_channel_win32_new_socket (gint socket);
|
||||
|
||||
#endif
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_IOCHANNEL_H__ */
|
|
@ -1,250 +0,0 @@
|
|||
/* gkeyfile.h - desktop entry file parser
|
||||
*
|
||||
* Copyright 2004 Red Hat, Inc.
|
||||
*
|
||||
* Ray Strode <halfline@hawaii.rr.com>
|
||||
*
|
||||
* GLib is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* GLib 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with GLib; see the file COPYING.LIB. If not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_KEY_FILE_H__
|
||||
#define __G_KEY_FILE_H__
|
||||
|
||||
#include <glib/gerror.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_KEY_FILE_ERROR_UNKNOWN_ENCODING,
|
||||
G_KEY_FILE_ERROR_PARSE,
|
||||
G_KEY_FILE_ERROR_NOT_FOUND,
|
||||
G_KEY_FILE_ERROR_KEY_NOT_FOUND,
|
||||
G_KEY_FILE_ERROR_GROUP_NOT_FOUND,
|
||||
G_KEY_FILE_ERROR_INVALID_VALUE
|
||||
} GKeyFileError;
|
||||
|
||||
#define G_KEY_FILE_ERROR g_key_file_error_quark()
|
||||
|
||||
GQuark g_key_file_error_quark (void);
|
||||
|
||||
typedef struct _GKeyFile GKeyFile;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_KEY_FILE_NONE = 0,
|
||||
G_KEY_FILE_KEEP_COMMENTS = 1 << 0,
|
||||
G_KEY_FILE_KEEP_TRANSLATIONS = 1 << 1
|
||||
} GKeyFileFlags;
|
||||
|
||||
GKeyFile *g_key_file_new (void);
|
||||
void g_key_file_free (GKeyFile *key_file);
|
||||
void g_key_file_set_list_separator (GKeyFile *key_file,
|
||||
gchar separator);
|
||||
gboolean g_key_file_load_from_file (GKeyFile *key_file,
|
||||
const gchar *file,
|
||||
GKeyFileFlags flags,
|
||||
GError **error);
|
||||
gboolean g_key_file_load_from_data (GKeyFile *key_file,
|
||||
const gchar *data,
|
||||
gsize length,
|
||||
GKeyFileFlags flags,
|
||||
GError **error);
|
||||
gboolean g_key_file_load_from_dirs (GKeyFile *key_file,
|
||||
const gchar *file,
|
||||
const gchar **search_dirs,
|
||||
gchar **full_path,
|
||||
GKeyFileFlags flags,
|
||||
GError **error);
|
||||
gboolean g_key_file_load_from_data_dirs (GKeyFile *key_file,
|
||||
const gchar *file,
|
||||
gchar **full_path,
|
||||
GKeyFileFlags flags,
|
||||
GError **error);
|
||||
gchar *g_key_file_to_data (GKeyFile *key_file,
|
||||
gsize *length,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
gchar *g_key_file_get_start_group (GKeyFile *key_file) G_GNUC_MALLOC;
|
||||
gchar **g_key_file_get_groups (GKeyFile *key_file,
|
||||
gsize *length) G_GNUC_MALLOC;
|
||||
gchar **g_key_file_get_keys (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
gsize *length,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
gboolean g_key_file_has_group (GKeyFile *key_file,
|
||||
const gchar *group_name);
|
||||
gboolean g_key_file_has_key (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
GError **error);
|
||||
gchar *g_key_file_get_value (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
void g_key_file_set_value (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
const gchar *value);
|
||||
gchar *g_key_file_get_string (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
void g_key_file_set_string (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
const gchar *string);
|
||||
gchar *g_key_file_get_locale_string (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
const gchar *locale,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
void g_key_file_set_locale_string (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
const gchar *locale,
|
||||
const gchar *string);
|
||||
gboolean g_key_file_get_boolean (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
GError **error);
|
||||
void g_key_file_set_boolean (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
gboolean value);
|
||||
gint g_key_file_get_integer (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
GError **error);
|
||||
void g_key_file_set_integer (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
gint value);
|
||||
gdouble g_key_file_get_double (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
GError **error);
|
||||
void g_key_file_set_double (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
gdouble value);
|
||||
gchar **g_key_file_get_string_list (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
gsize *length,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
void g_key_file_set_string_list (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
const gchar * const list[],
|
||||
gsize length);
|
||||
gchar **g_key_file_get_locale_string_list (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
const gchar *locale,
|
||||
gsize *length,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
void g_key_file_set_locale_string_list (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
const gchar *locale,
|
||||
const gchar * const list[],
|
||||
gsize length);
|
||||
gboolean *g_key_file_get_boolean_list (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
gsize *length,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
void g_key_file_set_boolean_list (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
gboolean list[],
|
||||
gsize length);
|
||||
gint *g_key_file_get_integer_list (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
gsize *length,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
void g_key_file_set_double_list (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
gdouble list[],
|
||||
gsize length);
|
||||
gdouble *g_key_file_get_double_list (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
gsize *length,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
void g_key_file_set_integer_list (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
gint list[],
|
||||
gsize length);
|
||||
gboolean g_key_file_set_comment (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
const gchar *comment,
|
||||
GError **error);
|
||||
gchar *g_key_file_get_comment (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
|
||||
gboolean g_key_file_remove_comment (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
GError **error);
|
||||
gboolean g_key_file_remove_key (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
const gchar *key,
|
||||
GError **error);
|
||||
gboolean g_key_file_remove_group (GKeyFile *key_file,
|
||||
const gchar *group_name,
|
||||
GError **error);
|
||||
|
||||
/* Defines for handling freedesktop.org Desktop files */
|
||||
#define G_KEY_FILE_DESKTOP_GROUP "Desktop Entry"
|
||||
|
||||
#define G_KEY_FILE_DESKTOP_KEY_TYPE "Type"
|
||||
#define G_KEY_FILE_DESKTOP_KEY_VERSION "Version"
|
||||
#define G_KEY_FILE_DESKTOP_KEY_NAME "Name"
|
||||
#define G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME "GenericName"
|
||||
#define G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY "NoDisplay"
|
||||
#define G_KEY_FILE_DESKTOP_KEY_COMMENT "Comment"
|
||||
#define G_KEY_FILE_DESKTOP_KEY_ICON "Icon"
|
||||
#define G_KEY_FILE_DESKTOP_KEY_HIDDEN "Hidden"
|
||||
#define G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN "OnlyShowIn"
|
||||
#define G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN "NotShowIn"
|
||||
#define G_KEY_FILE_DESKTOP_KEY_TRY_EXEC "TryExec"
|
||||
#define G_KEY_FILE_DESKTOP_KEY_EXEC "Exec"
|
||||
#define G_KEY_FILE_DESKTOP_KEY_PATH "Path"
|
||||
#define G_KEY_FILE_DESKTOP_KEY_TERMINAL "Terminal"
|
||||
#define G_KEY_FILE_DESKTOP_KEY_MIME_TYPE "MimeType"
|
||||
#define G_KEY_FILE_DESKTOP_KEY_CATEGORIES "Categories"
|
||||
#define G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY "StartupNotify"
|
||||
#define G_KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS "StartupWMClass"
|
||||
#define G_KEY_FILE_DESKTOP_KEY_URL "URL"
|
||||
|
||||
#define G_KEY_FILE_DESKTOP_TYPE_APPLICATION "Application"
|
||||
#define G_KEY_FILE_DESKTOP_TYPE_LINK "Link"
|
||||
#define G_KEY_FILE_DESKTOP_TYPE_DIRECTORY "Directory"
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_KEY_FILE_H__ */
|
|
@ -1,41 +0,0 @@
|
|||
/* GObject - GLib Type, Object, Parameter and Signal Library
|
||||
* Copyright (C) 1998, 1999, 2000 Tim Janik and Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#ifndef __GLIB_GOBJECT_H__
|
||||
#define __GLIB_GOBJECT_H__
|
||||
|
||||
#define __GLIB_GOBJECT_H_INSIDE__
|
||||
|
||||
/* topmost include file for GObject header files */
|
||||
#include <gobject/gboxed.h>
|
||||
#include <gobject/genums.h>
|
||||
#include <gobject/gobject.h>
|
||||
#include <gobject/gparam.h>
|
||||
#include <gobject/gparamspecs.h>
|
||||
#include <gobject/gsignal.h>
|
||||
#include <gobject/gsourceclosure.h>
|
||||
#include <gobject/gtype.h>
|
||||
#include <gobject/gtypemodule.h>
|
||||
#include <gobject/gtypeplugin.h>
|
||||
#include <gobject/gvalue.h>
|
||||
#include <gobject/gvaluearray.h>
|
||||
#include <gobject/gvaluetypes.h>
|
||||
|
||||
#undef __GLIB_GOBJECT_H_INSIDE__
|
||||
|
||||
#endif /* __GLIB_GOBJECT_H__ */
|
|
@ -1,93 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#ifndef __G_LIB_H__
|
||||
#define __G_LIB_H__
|
||||
|
||||
#define __GLIB_H_INSIDE__
|
||||
|
||||
#include <glib/galloca.h>
|
||||
#include <glib/garray.h>
|
||||
#include <glib/gasyncqueue.h>
|
||||
#include <glib/gatomic.h>
|
||||
#include <glib/gbacktrace.h>
|
||||
#include <glib/gbase64.h>
|
||||
#include <glib/gbookmarkfile.h>
|
||||
#include <glib/gcache.h>
|
||||
#include <glib/gchecksum.h>
|
||||
#include <glib/gcompletion.h>
|
||||
#include <glib/gconvert.h>
|
||||
#include <glib/gdataset.h>
|
||||
#include <glib/gdate.h>
|
||||
#include <glib/gdir.h>
|
||||
#include <glib/gerror.h>
|
||||
#include <glib/gfileutils.h>
|
||||
#include <glib/ghash.h>
|
||||
#include <glib/ghook.h>
|
||||
#include <glib/giochannel.h>
|
||||
#include <glib/gkeyfile.h>
|
||||
#include <glib/glist.h>
|
||||
#include <glib/gmacros.h>
|
||||
#include <glib/gmain.h>
|
||||
#include <glib/gmappedfile.h>
|
||||
#include <glib/gmarkup.h>
|
||||
#include <glib/gmem.h>
|
||||
#include <glib/gmessages.h>
|
||||
#include <glib/gnode.h>
|
||||
#include <glib/goption.h>
|
||||
#include <glib/gpattern.h>
|
||||
#include <glib/gpoll.h>
|
||||
#include <glib/gprimes.h>
|
||||
#include <glib/gqsort.h>
|
||||
#include <glib/gquark.h>
|
||||
#include <glib/gqueue.h>
|
||||
#include <glib/grand.h>
|
||||
#include <glib/grel.h>
|
||||
#include <glib/gregex.h>
|
||||
#include <glib/gscanner.h>
|
||||
#include <glib/gsequence.h>
|
||||
#include <glib/gshell.h>
|
||||
#include <glib/gslice.h>
|
||||
#include <glib/gslist.h>
|
||||
#include <glib/gspawn.h>
|
||||
#include <glib/gstrfuncs.h>
|
||||
#include <glib/gstring.h>
|
||||
#include <glib/gtestutils.h>
|
||||
#include <glib/gthread.h>
|
||||
#include <glib/gthreadpool.h>
|
||||
#include <glib/gtimer.h>
|
||||
#include <glib/gtree.h>
|
||||
#include <glib/gtypes.h>
|
||||
#include <glib/gunicode.h>
|
||||
#include <glib/gurifuncs.h>
|
||||
#include <glib/gutils.h>
|
||||
#ifdef G_PLATFORM_WIN32
|
||||
#include <glib/gwin32.h>
|
||||
#endif
|
||||
|
||||
#undef __GLIB_H_INSIDE__
|
||||
|
||||
#endif /* __G_LIB_H__ */
|
|
@ -1,38 +0,0 @@
|
|||
#ifndef __GLIBINTL_H__
|
||||
#define __GLIBINTL_H__
|
||||
|
||||
#ifndef SIZEOF_CHAR
|
||||
#error "config.h must be included prior to glibintl.h"
|
||||
#endif
|
||||
|
||||
G_CONST_RETURN gchar *glib_gettext (const gchar *str) G_GNUC_FORMAT(1);
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
|
||||
#include <libintl.h>
|
||||
#define _(String) glib_gettext(String)
|
||||
/* Split out this in the code, but keep it in the same domain for now */
|
||||
#define P_(String) glib_gettext(String)
|
||||
|
||||
#ifdef gettext_noop
|
||||
#define N_(String) gettext_noop(String)
|
||||
#else
|
||||
#define N_(String) (String)
|
||||
#endif
|
||||
#else /* NLS is disabled */
|
||||
#define _(String) (String)
|
||||
#define N_(String) (String)
|
||||
#define P_(String) (String)
|
||||
#define textdomain(String) ((String) ? (String) : "messages")
|
||||
#define gettext(String) (String)
|
||||
#define dgettext(Domain,String) (String)
|
||||
#define dcgettext(Domain,String,Type) (String)
|
||||
#define dngettext(Domain,String1,String2,N) ((N) == 1 ? (String1) : (String2))
|
||||
#define bindtextdomain(Domain,Directory) (Domain)
|
||||
#define bind_textdomain_codeset(Domain,Codeset)
|
||||
#endif
|
||||
|
||||
/* not really I18N-related, but also a string marker macro */
|
||||
#define I_(string) g_intern_static_string (string)
|
||||
|
||||
#endif /* __GLIBINTL_H__ */
|
|
@ -1,120 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_LIST_H__
|
||||
#define __G_LIST_H__
|
||||
|
||||
#include <glib/gmem.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GList GList;
|
||||
|
||||
struct _GList
|
||||
{
|
||||
gpointer data;
|
||||
GList *next;
|
||||
GList *prev;
|
||||
};
|
||||
|
||||
/* Doubly linked lists
|
||||
*/
|
||||
GList* g_list_alloc (void) G_GNUC_WARN_UNUSED_RESULT;
|
||||
void g_list_free (GList *list);
|
||||
void g_list_free_1 (GList *list);
|
||||
#define g_list_free1 g_list_free_1
|
||||
GList* g_list_append (GList *list,
|
||||
gpointer data) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GList* g_list_prepend (GList *list,
|
||||
gpointer data) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GList* g_list_insert (GList *list,
|
||||
gpointer data,
|
||||
gint position) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GList* g_list_insert_sorted (GList *list,
|
||||
gpointer data,
|
||||
GCompareFunc func) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GList* g_list_insert_sorted_with_data (GList *list,
|
||||
gpointer data,
|
||||
GCompareDataFunc func,
|
||||
gpointer user_data) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GList* g_list_insert_before (GList *list,
|
||||
GList *sibling,
|
||||
gpointer data) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GList* g_list_concat (GList *list1,
|
||||
GList *list2) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GList* g_list_remove (GList *list,
|
||||
gconstpointer data) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GList* g_list_remove_all (GList *list,
|
||||
gconstpointer data) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GList* g_list_remove_link (GList *list,
|
||||
GList *llink) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GList* g_list_delete_link (GList *list,
|
||||
GList *link_) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GList* g_list_reverse (GList *list) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GList* g_list_copy (GList *list) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GList* g_list_nth (GList *list,
|
||||
guint n);
|
||||
GList* g_list_nth_prev (GList *list,
|
||||
guint n);
|
||||
GList* g_list_find (GList *list,
|
||||
gconstpointer data);
|
||||
GList* g_list_find_custom (GList *list,
|
||||
gconstpointer data,
|
||||
GCompareFunc func);
|
||||
gint g_list_position (GList *list,
|
||||
GList *llink);
|
||||
gint g_list_index (GList *list,
|
||||
gconstpointer data);
|
||||
GList* g_list_last (GList *list);
|
||||
GList* g_list_first (GList *list);
|
||||
guint g_list_length (GList *list);
|
||||
void g_list_foreach (GList *list,
|
||||
GFunc func,
|
||||
gpointer user_data);
|
||||
GList* g_list_sort (GList *list,
|
||||
GCompareFunc compare_func) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GList* g_list_sort_with_data (GList *list,
|
||||
GCompareDataFunc compare_func,
|
||||
gpointer user_data) G_GNUC_WARN_UNUSED_RESULT;
|
||||
gpointer g_list_nth_data (GList *list,
|
||||
guint n);
|
||||
|
||||
|
||||
#define g_list_previous(list) ((list) ? (((GList *)(list))->prev) : NULL)
|
||||
#define g_list_next(list) ((list) ? (((GList *)(list))->next) : NULL)
|
||||
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
void g_list_push_allocator (gpointer allocator);
|
||||
void g_list_pop_allocator (void);
|
||||
#endif
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_LIST_H__ */
|
|
@ -1,277 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
/* This file must not include any other glib header file and must thus
|
||||
* not refer to variables from glibconfig.h
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_MACROS_H__
|
||||
#define __G_MACROS_H__
|
||||
|
||||
/* We include stddef.h to get the system's definition of NULL
|
||||
*/
|
||||
#include <stddef.h>
|
||||
|
||||
/* Here we provide G_GNUC_EXTENSION as an alias for __extension__,
|
||||
* where this is valid. This allows for warningless compilation of
|
||||
* "long long" types even in the presence of '-ansi -pedantic'.
|
||||
*/
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)
|
||||
# define G_GNUC_EXTENSION __extension__
|
||||
#else
|
||||
# define G_GNUC_EXTENSION
|
||||
#endif
|
||||
|
||||
/* Provide macros to feature the GCC function attribute.
|
||||
*/
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
|
||||
#define G_GNUC_PURE \
|
||||
__attribute__((__pure__))
|
||||
#define G_GNUC_MALLOC \
|
||||
__attribute__((__malloc__))
|
||||
#else
|
||||
#define G_GNUC_PURE
|
||||
#define G_GNUC_MALLOC
|
||||
#endif
|
||||
|
||||
#if __GNUC__ >= 4
|
||||
#define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__))
|
||||
#else
|
||||
#define G_GNUC_NULL_TERMINATED
|
||||
#endif
|
||||
|
||||
#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
||||
#define G_GNUC_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
|
||||
#define G_GNUC_ALLOC_SIZE2(x,y) __attribute__((__alloc_size__(x,y)))
|
||||
#else
|
||||
#define G_GNUC_ALLOC_SIZE(x)
|
||||
#define G_GNUC_ALLOC_SIZE2(x,y)
|
||||
#endif
|
||||
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
|
||||
#define G_GNUC_PRINTF( format_idx, arg_idx ) \
|
||||
__attribute__((__format__ (__printf__, format_idx, arg_idx)))
|
||||
#define G_GNUC_SCANF( format_idx, arg_idx ) \
|
||||
__attribute__((__format__ (__scanf__, format_idx, arg_idx)))
|
||||
#define G_GNUC_FORMAT( arg_idx ) \
|
||||
__attribute__((__format_arg__ (arg_idx)))
|
||||
#define G_GNUC_NORETURN \
|
||||
__attribute__((__noreturn__))
|
||||
#define G_GNUC_CONST \
|
||||
__attribute__((__const__))
|
||||
#define G_GNUC_UNUSED \
|
||||
__attribute__((__unused__))
|
||||
#define G_GNUC_NO_INSTRUMENT \
|
||||
__attribute__((__no_instrument_function__))
|
||||
#else /* !__GNUC__ */
|
||||
#define G_GNUC_PRINTF( format_idx, arg_idx )
|
||||
#define G_GNUC_SCANF( format_idx, arg_idx )
|
||||
#define G_GNUC_FORMAT( arg_idx )
|
||||
#define G_GNUC_NORETURN
|
||||
#define G_GNUC_CONST
|
||||
#define G_GNUC_UNUSED
|
||||
#define G_GNUC_NO_INSTRUMENT
|
||||
#endif /* !__GNUC__ */
|
||||
|
||||
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
|
||||
#define G_GNUC_DEPRECATED \
|
||||
__attribute__((__deprecated__))
|
||||
#else
|
||||
#define G_GNUC_DEPRECATED
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
|
||||
# define G_GNUC_MAY_ALIAS __attribute__((may_alias))
|
||||
#else
|
||||
# define G_GNUC_MAY_ALIAS
|
||||
#endif
|
||||
|
||||
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
|
||||
#define G_GNUC_WARN_UNUSED_RESULT \
|
||||
__attribute__((warn_unused_result))
|
||||
#else
|
||||
#define G_GNUC_WARN_UNUSED_RESULT
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
/* Wrap the gcc __PRETTY_FUNCTION__ and __FUNCTION__ variables with
|
||||
* macros, so we can refer to them as strings unconditionally.
|
||||
* usage not-recommended since gcc-3.0
|
||||
*/
|
||||
#if defined (__GNUC__) && (__GNUC__ < 3)
|
||||
#define G_GNUC_FUNCTION __FUNCTION__
|
||||
#define G_GNUC_PRETTY_FUNCTION __PRETTY_FUNCTION__
|
||||
#else /* !__GNUC__ */
|
||||
#define G_GNUC_FUNCTION ""
|
||||
#define G_GNUC_PRETTY_FUNCTION ""
|
||||
#endif /* !__GNUC__ */
|
||||
#endif /* !G_DISABLE_DEPRECATED */
|
||||
|
||||
#define G_STRINGIFY(macro_or_string) G_STRINGIFY_ARG (macro_or_string)
|
||||
#define G_STRINGIFY_ARG(contents) #contents
|
||||
|
||||
#define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
|
||||
#define G_PASTE(identifier1,identifier2) G_PASTE_ARGS (identifier1, identifier2)
|
||||
#define G_STATIC_ASSERT(expr) typedef struct { char Compile_Time_Assertion[(expr) ? 1 : -1]; } G_PASTE (_GStaticAssert_, __LINE__)
|
||||
|
||||
/* Provide a string identifying the current code position */
|
||||
#if defined(__GNUC__) && (__GNUC__ < 3) && !defined(__cplusplus)
|
||||
# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) ":" __PRETTY_FUNCTION__ "()"
|
||||
#else
|
||||
# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__)
|
||||
#endif
|
||||
|
||||
/* Provide a string identifying the current function, non-concatenatable */
|
||||
#if defined (__GNUC__)
|
||||
# define G_STRFUNC ((const char*) (__PRETTY_FUNCTION__))
|
||||
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 19901L
|
||||
# define G_STRFUNC ((const char*) (__func__))
|
||||
#else
|
||||
# define G_STRFUNC ((const char*) ("???"))
|
||||
#endif
|
||||
|
||||
/* Guard C code in headers, while including them from C++ */
|
||||
#ifdef __cplusplus
|
||||
# define G_BEGIN_DECLS extern "C" {
|
||||
# define G_END_DECLS }
|
||||
#else
|
||||
# define G_BEGIN_DECLS
|
||||
# define G_END_DECLS
|
||||
#endif
|
||||
|
||||
/* Provide definitions for some commonly used macros.
|
||||
* Some of them are only provided if they haven't already
|
||||
* been defined. It is assumed that if they are already
|
||||
* defined then the current definition is correct.
|
||||
*/
|
||||
#ifndef NULL
|
||||
# ifdef __cplusplus
|
||||
# define NULL (0L)
|
||||
# else /* !__cplusplus */
|
||||
# define NULL ((void*) 0)
|
||||
# endif /* !__cplusplus */
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE (0)
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE (!FALSE)
|
||||
#endif
|
||||
|
||||
#undef MAX
|
||||
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
#undef MIN
|
||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||
|
||||
#undef ABS
|
||||
#define ABS(a) (((a) < 0) ? -(a) : (a))
|
||||
|
||||
#undef CLAMP
|
||||
#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
|
||||
|
||||
/* Count the number of elements in an array. The array must be defined
|
||||
* as such; using this with a dynamically allocated array will give
|
||||
* incorrect results.
|
||||
*/
|
||||
#define G_N_ELEMENTS(arr) (sizeof (arr) / sizeof ((arr)[0]))
|
||||
|
||||
/* Macros by analogy to GINT_TO_POINTER, GPOINTER_TO_INT
|
||||
*/
|
||||
#define GPOINTER_TO_SIZE(p) ((gsize) (p))
|
||||
#define GSIZE_TO_POINTER(s) ((gpointer) (gsize) (s))
|
||||
|
||||
/* Provide convenience macros for handling structure
|
||||
* fields through their offsets.
|
||||
*/
|
||||
|
||||
#if defined(__GNUC__) && __GNUC__ >= 4
|
||||
# define G_STRUCT_OFFSET(struct_type, member) \
|
||||
((glong) offsetof (struct_type, member))
|
||||
#else
|
||||
# define G_STRUCT_OFFSET(struct_type, member) \
|
||||
((glong) ((guint8*) &((struct_type*) 0)->member))
|
||||
#endif
|
||||
|
||||
#define G_STRUCT_MEMBER_P(struct_p, struct_offset) \
|
||||
((gpointer) ((guint8*) (struct_p) + (glong) (struct_offset)))
|
||||
#define G_STRUCT_MEMBER(member_type, struct_p, struct_offset) \
|
||||
(*(member_type*) G_STRUCT_MEMBER_P ((struct_p), (struct_offset)))
|
||||
|
||||
/* Provide simple macro statement wrappers:
|
||||
* G_STMT_START { statements; } G_STMT_END;
|
||||
* This can be used as a single statement, like:
|
||||
* if (x) G_STMT_START { ... } G_STMT_END; else ...
|
||||
* This intentionally does not use compiler extensions like GCC's '({...})' to
|
||||
* avoid portability issue or side effects when compiled with different compilers.
|
||||
*/
|
||||
#if !(defined (G_STMT_START) && defined (G_STMT_END))
|
||||
# define G_STMT_START do
|
||||
# define G_STMT_END while (0)
|
||||
#endif
|
||||
|
||||
/* Allow the app programmer to select whether or not return values
|
||||
* (usually char*) are const or not. Don't try using this feature for
|
||||
* functions with C++ linkage.
|
||||
*/
|
||||
#ifdef G_DISABLE_CONST_RETURNS
|
||||
#define G_CONST_RETURN
|
||||
#else
|
||||
#define G_CONST_RETURN const
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The G_LIKELY and G_UNLIKELY macros let the programmer give hints to
|
||||
* the compiler about the expected result of an expression. Some compilers
|
||||
* can use this information for optimizations.
|
||||
*
|
||||
* The _G_BOOLEAN_EXPR macro is intended to trigger a gcc warning when
|
||||
* putting assignments in g_return_if_fail ().
|
||||
*/
|
||||
#if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__)
|
||||
#define _G_BOOLEAN_EXPR(expr) \
|
||||
__extension__ ({ \
|
||||
int _g_boolean_var_; \
|
||||
if (expr) \
|
||||
_g_boolean_var_ = 1; \
|
||||
else \
|
||||
_g_boolean_var_ = 0; \
|
||||
_g_boolean_var_; \
|
||||
})
|
||||
#define G_LIKELY(expr) (__builtin_expect (_G_BOOLEAN_EXPR(expr), 1))
|
||||
#define G_UNLIKELY(expr) (__builtin_expect (_G_BOOLEAN_EXPR(expr), 0))
|
||||
#else
|
||||
#define G_LIKELY(expr) (expr)
|
||||
#define G_UNLIKELY(expr) (expr)
|
||||
#endif
|
||||
|
||||
#endif /* __G_MACROS_H__ */
|
|
@ -1,299 +0,0 @@
|
|||
/* gmain.h - the GLib Main loop
|
||||
* Copyright (C) 1998-2000 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_MAIN_H__
|
||||
#define __G_MAIN_H__
|
||||
|
||||
#include <glib/gpoll.h>
|
||||
#include <glib/gslist.h>
|
||||
#include <glib/gthread.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GMainContext GMainContext; /* Opaque */
|
||||
typedef struct _GMainLoop GMainLoop; /* Opaque */
|
||||
typedef struct _GSource GSource;
|
||||
typedef struct _GSourceCallbackFuncs GSourceCallbackFuncs;
|
||||
typedef struct _GSourceFuncs GSourceFuncs;
|
||||
|
||||
typedef gboolean (*GSourceFunc) (gpointer data);
|
||||
typedef void (*GChildWatchFunc) (GPid pid,
|
||||
gint status,
|
||||
gpointer data);
|
||||
struct _GSource
|
||||
{
|
||||
/*< private >*/
|
||||
gpointer callback_data;
|
||||
GSourceCallbackFuncs *callback_funcs;
|
||||
|
||||
GSourceFuncs *source_funcs;
|
||||
guint ref_count;
|
||||
|
||||
GMainContext *context;
|
||||
|
||||
gint priority;
|
||||
guint flags;
|
||||
guint source_id;
|
||||
|
||||
GSList *poll_fds;
|
||||
|
||||
GSource *prev;
|
||||
GSource *next;
|
||||
|
||||
gpointer reserved1;
|
||||
gpointer reserved2;
|
||||
};
|
||||
|
||||
struct _GSourceCallbackFuncs
|
||||
{
|
||||
void (*ref) (gpointer cb_data);
|
||||
void (*unref) (gpointer cb_data);
|
||||
void (*get) (gpointer cb_data,
|
||||
GSource *source,
|
||||
GSourceFunc *func,
|
||||
gpointer *data);
|
||||
};
|
||||
|
||||
typedef void (*GSourceDummyMarshal) (void);
|
||||
|
||||
struct _GSourceFuncs
|
||||
{
|
||||
gboolean (*prepare) (GSource *source,
|
||||
gint *timeout_);
|
||||
gboolean (*check) (GSource *source);
|
||||
gboolean (*dispatch) (GSource *source,
|
||||
GSourceFunc callback,
|
||||
gpointer user_data);
|
||||
void (*finalize) (GSource *source); /* Can be NULL */
|
||||
|
||||
/* For use by g_source_set_closure */
|
||||
GSourceFunc closure_callback;
|
||||
GSourceDummyMarshal closure_marshal; /* Really is of type GClosureMarshal */
|
||||
};
|
||||
|
||||
/* Standard priorities */
|
||||
|
||||
#define G_PRIORITY_HIGH -100
|
||||
#define G_PRIORITY_DEFAULT 0
|
||||
#define G_PRIORITY_HIGH_IDLE 100
|
||||
#define G_PRIORITY_DEFAULT_IDLE 200
|
||||
#define G_PRIORITY_LOW 300
|
||||
|
||||
/* GMainContext: */
|
||||
|
||||
GMainContext *g_main_context_new (void);
|
||||
GMainContext *g_main_context_ref (GMainContext *context);
|
||||
void g_main_context_unref (GMainContext *context);
|
||||
GMainContext *g_main_context_default (void);
|
||||
|
||||
gboolean g_main_context_iteration (GMainContext *context,
|
||||
gboolean may_block);
|
||||
gboolean g_main_context_pending (GMainContext *context);
|
||||
|
||||
/* For implementation of legacy interfaces
|
||||
*/
|
||||
GSource *g_main_context_find_source_by_id (GMainContext *context,
|
||||
guint source_id);
|
||||
GSource *g_main_context_find_source_by_user_data (GMainContext *context,
|
||||
gpointer user_data);
|
||||
GSource *g_main_context_find_source_by_funcs_user_data (GMainContext *context,
|
||||
GSourceFuncs *funcs,
|
||||
gpointer user_data);
|
||||
|
||||
/* Low level functions for implementing custom main loops.
|
||||
*/
|
||||
void g_main_context_wakeup (GMainContext *context);
|
||||
gboolean g_main_context_acquire (GMainContext *context);
|
||||
void g_main_context_release (GMainContext *context);
|
||||
gboolean g_main_context_is_owner (GMainContext *context);
|
||||
gboolean g_main_context_wait (GMainContext *context,
|
||||
GCond *cond,
|
||||
GMutex *mutex);
|
||||
|
||||
gboolean g_main_context_prepare (GMainContext *context,
|
||||
gint *priority);
|
||||
gint g_main_context_query (GMainContext *context,
|
||||
gint max_priority,
|
||||
gint *timeout_,
|
||||
GPollFD *fds,
|
||||
gint n_fds);
|
||||
gint g_main_context_check (GMainContext *context,
|
||||
gint max_priority,
|
||||
GPollFD *fds,
|
||||
gint n_fds);
|
||||
void g_main_context_dispatch (GMainContext *context);
|
||||
|
||||
void g_main_context_set_poll_func (GMainContext *context,
|
||||
GPollFunc func);
|
||||
GPollFunc g_main_context_get_poll_func (GMainContext *context);
|
||||
|
||||
/* Low level functions for use by source implementations
|
||||
*/
|
||||
void g_main_context_add_poll (GMainContext *context,
|
||||
GPollFD *fd,
|
||||
gint priority);
|
||||
void g_main_context_remove_poll (GMainContext *context,
|
||||
GPollFD *fd);
|
||||
|
||||
gint g_main_depth (void);
|
||||
GSource *g_main_current_source (void);
|
||||
|
||||
|
||||
/* GMainLoop: */
|
||||
|
||||
GMainLoop *g_main_loop_new (GMainContext *context,
|
||||
gboolean is_running);
|
||||
void g_main_loop_run (GMainLoop *loop);
|
||||
void g_main_loop_quit (GMainLoop *loop);
|
||||
GMainLoop *g_main_loop_ref (GMainLoop *loop);
|
||||
void g_main_loop_unref (GMainLoop *loop);
|
||||
gboolean g_main_loop_is_running (GMainLoop *loop);
|
||||
GMainContext *g_main_loop_get_context (GMainLoop *loop);
|
||||
|
||||
/* GSource: */
|
||||
|
||||
GSource *g_source_new (GSourceFuncs *source_funcs,
|
||||
guint struct_size);
|
||||
GSource *g_source_ref (GSource *source);
|
||||
void g_source_unref (GSource *source);
|
||||
|
||||
guint g_source_attach (GSource *source,
|
||||
GMainContext *context);
|
||||
void g_source_destroy (GSource *source);
|
||||
|
||||
void g_source_set_priority (GSource *source,
|
||||
gint priority);
|
||||
gint g_source_get_priority (GSource *source);
|
||||
void g_source_set_can_recurse (GSource *source,
|
||||
gboolean can_recurse);
|
||||
gboolean g_source_get_can_recurse (GSource *source);
|
||||
guint g_source_get_id (GSource *source);
|
||||
|
||||
GMainContext *g_source_get_context (GSource *source);
|
||||
|
||||
void g_source_set_callback (GSource *source,
|
||||
GSourceFunc func,
|
||||
gpointer data,
|
||||
GDestroyNotify notify);
|
||||
|
||||
void g_source_set_funcs (GSource *source,
|
||||
GSourceFuncs *funcs);
|
||||
gboolean g_source_is_destroyed (GSource *source);
|
||||
|
||||
/* Used to implement g_source_connect_closure and internally*/
|
||||
void g_source_set_callback_indirect (GSource *source,
|
||||
gpointer callback_data,
|
||||
GSourceCallbackFuncs *callback_funcs);
|
||||
|
||||
void g_source_add_poll (GSource *source,
|
||||
GPollFD *fd);
|
||||
void g_source_remove_poll (GSource *source,
|
||||
GPollFD *fd);
|
||||
|
||||
void g_source_get_current_time (GSource *source,
|
||||
GTimeVal *timeval);
|
||||
|
||||
/* void g_source_connect_closure (GSource *source,
|
||||
GClosure *closure);
|
||||
*/
|
||||
|
||||
/* Specific source types
|
||||
*/
|
||||
GSource *g_idle_source_new (void);
|
||||
GSource *g_child_watch_source_new (GPid pid);
|
||||
GSource *g_timeout_source_new (guint interval);
|
||||
GSource *g_timeout_source_new_seconds (guint interval);
|
||||
|
||||
/* Miscellaneous functions
|
||||
*/
|
||||
void g_get_current_time (GTimeVal *result);
|
||||
|
||||
/* ============== Compat main loop stuff ================== */
|
||||
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
|
||||
/* Legacy names for GMainLoop functions
|
||||
*/
|
||||
#define g_main_new(is_running) g_main_loop_new (NULL, is_running);
|
||||
#define g_main_run(loop) g_main_loop_run(loop)
|
||||
#define g_main_quit(loop) g_main_loop_quit(loop)
|
||||
#define g_main_destroy(loop) g_main_loop_unref(loop)
|
||||
#define g_main_is_running(loop) g_main_loop_is_running(loop)
|
||||
|
||||
/* Functions to manipulate the default main loop
|
||||
*/
|
||||
|
||||
#define g_main_iteration(may_block) g_main_context_iteration (NULL, may_block)
|
||||
#define g_main_pending() g_main_context_pending (NULL)
|
||||
|
||||
#define g_main_set_poll_func(func) g_main_context_set_poll_func (NULL, func)
|
||||
|
||||
#endif /* G_DISABLE_DEPRECATED */
|
||||
|
||||
/* Source manipulation by ID */
|
||||
gboolean g_source_remove (guint tag);
|
||||
gboolean g_source_remove_by_user_data (gpointer user_data);
|
||||
gboolean g_source_remove_by_funcs_user_data (GSourceFuncs *funcs,
|
||||
gpointer user_data);
|
||||
|
||||
/* Idles, child watchers and timeouts */
|
||||
guint g_timeout_add_full (gint priority,
|
||||
guint interval,
|
||||
GSourceFunc function,
|
||||
gpointer data,
|
||||
GDestroyNotify notify);
|
||||
guint g_timeout_add (guint interval,
|
||||
GSourceFunc function,
|
||||
gpointer data);
|
||||
guint g_timeout_add_seconds_full (gint priority,
|
||||
guint interval,
|
||||
GSourceFunc function,
|
||||
gpointer data,
|
||||
GDestroyNotify notify);
|
||||
guint g_timeout_add_seconds (guint interval,
|
||||
GSourceFunc function,
|
||||
gpointer data);
|
||||
guint g_child_watch_add_full (gint priority,
|
||||
GPid pid,
|
||||
GChildWatchFunc function,
|
||||
gpointer data,
|
||||
GDestroyNotify notify);
|
||||
guint g_child_watch_add (GPid pid,
|
||||
GChildWatchFunc function,
|
||||
gpointer data);
|
||||
guint g_idle_add (GSourceFunc function,
|
||||
gpointer data);
|
||||
guint g_idle_add_full (gint priority,
|
||||
GSourceFunc function,
|
||||
gpointer data,
|
||||
GDestroyNotify notify);
|
||||
gboolean g_idle_remove_by_data (gpointer data);
|
||||
|
||||
/* Hook for GClosure / GSource integration. Don't touch */
|
||||
GLIB_VAR GSourceFuncs g_timeout_funcs;
|
||||
GLIB_VAR GSourceFuncs g_child_watch_funcs;
|
||||
GLIB_VAR GSourceFuncs g_idle_funcs;
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_MAIN_H__ */
|
|
@ -1,44 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* gmappedfile.h: Simplified wrapper around the mmap function
|
||||
*
|
||||
* Copyright 2005 Matthias Clasen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_MAPPED_FILE_H__
|
||||
#define __G_MAPPED_FILE_H__
|
||||
|
||||
#include <glib/gerror.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GMappedFile GMappedFile;
|
||||
|
||||
GMappedFile *g_mapped_file_new (const gchar *filename,
|
||||
gboolean writable,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
gsize g_mapped_file_get_length (GMappedFile *file);
|
||||
gchar *g_mapped_file_get_contents (GMappedFile *file);
|
||||
void g_mapped_file_free (GMappedFile *file);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_MAPPED_FILE_H__ */
|
|
@ -1,163 +0,0 @@
|
|||
/* gmarkup.h - Simple XML-like string parser/writer
|
||||
*
|
||||
* Copyright 2000 Red Hat, Inc.
|
||||
*
|
||||
* GLib is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* GLib 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with GLib; see the file COPYING.LIB. If not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_MARKUP_H__
|
||||
#define __G_MARKUP_H__
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <glib/gerror.h>
|
||||
#include <glib/gslist.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_MARKUP_ERROR_BAD_UTF8,
|
||||
G_MARKUP_ERROR_EMPTY,
|
||||
G_MARKUP_ERROR_PARSE,
|
||||
/* The following are primarily intended for specific GMarkupParser
|
||||
* implementations to set.
|
||||
*/
|
||||
G_MARKUP_ERROR_UNKNOWN_ELEMENT,
|
||||
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
|
||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||
G_MARKUP_ERROR_MISSING_ATTRIBUTE
|
||||
} GMarkupError;
|
||||
|
||||
#define G_MARKUP_ERROR g_markup_error_quark ()
|
||||
|
||||
GQuark g_markup_error_quark (void);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG = 1 << 0,
|
||||
G_MARKUP_TREAT_CDATA_AS_TEXT = 1 << 1,
|
||||
G_MARKUP_PREFIX_ERROR_POSITION = 1 << 2
|
||||
} GMarkupParseFlags;
|
||||
|
||||
typedef struct _GMarkupParseContext GMarkupParseContext;
|
||||
typedef struct _GMarkupParser GMarkupParser;
|
||||
|
||||
struct _GMarkupParser
|
||||
{
|
||||
/* Called for open tags <foo bar="baz"> */
|
||||
void (*start_element) (GMarkupParseContext *context,
|
||||
const gchar *element_name,
|
||||
const gchar **attribute_names,
|
||||
const gchar **attribute_values,
|
||||
gpointer user_data,
|
||||
GError **error);
|
||||
|
||||
/* Called for close tags </foo> */
|
||||
void (*end_element) (GMarkupParseContext *context,
|
||||
const gchar *element_name,
|
||||
gpointer user_data,
|
||||
GError **error);
|
||||
|
||||
/* Called for character data */
|
||||
/* text is not nul-terminated */
|
||||
void (*text) (GMarkupParseContext *context,
|
||||
const gchar *text,
|
||||
gsize text_len,
|
||||
gpointer user_data,
|
||||
GError **error);
|
||||
|
||||
/* Called for strings that should be re-saved verbatim in this same
|
||||
* position, but are not otherwise interpretable. At the moment
|
||||
* this includes comments and processing instructions.
|
||||
*/
|
||||
/* text is not nul-terminated. */
|
||||
void (*passthrough) (GMarkupParseContext *context,
|
||||
const gchar *passthrough_text,
|
||||
gsize text_len,
|
||||
gpointer user_data,
|
||||
GError **error);
|
||||
|
||||
/* Called on error, including one set by other
|
||||
* methods in the vtable. The GError should not be freed.
|
||||
*/
|
||||
void (*error) (GMarkupParseContext *context,
|
||||
GError *error,
|
||||
gpointer user_data);
|
||||
};
|
||||
|
||||
GMarkupParseContext *g_markup_parse_context_new (const GMarkupParser *parser,
|
||||
GMarkupParseFlags flags,
|
||||
gpointer user_data,
|
||||
GDestroyNotify user_data_dnotify);
|
||||
void g_markup_parse_context_free (GMarkupParseContext *context);
|
||||
gboolean g_markup_parse_context_parse (GMarkupParseContext *context,
|
||||
const gchar *text,
|
||||
gssize text_len,
|
||||
GError **error);
|
||||
void g_markup_parse_context_push (GMarkupParseContext *context,
|
||||
GMarkupParser *parser,
|
||||
gpointer user_data);
|
||||
gpointer g_markup_parse_context_pop (GMarkupParseContext *context);
|
||||
|
||||
gboolean g_markup_parse_context_end_parse (GMarkupParseContext *context,
|
||||
GError **error);
|
||||
G_CONST_RETURN gchar *g_markup_parse_context_get_element (GMarkupParseContext *context);
|
||||
G_CONST_RETURN GSList *g_markup_parse_context_get_element_stack (GMarkupParseContext *context);
|
||||
|
||||
/* For user-constructed error messages, has no precise semantics */
|
||||
void g_markup_parse_context_get_position (GMarkupParseContext *context,
|
||||
gint *line_number,
|
||||
gint *char_number);
|
||||
gpointer g_markup_parse_context_get_user_data (GMarkupParseContext *context);
|
||||
|
||||
/* useful when saving */
|
||||
gchar* g_markup_escape_text (const gchar *text,
|
||||
gssize length);
|
||||
|
||||
gchar *g_markup_printf_escaped (const char *format,
|
||||
...) G_GNUC_PRINTF (1, 2);
|
||||
gchar *g_markup_vprintf_escaped (const char *format,
|
||||
va_list args);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_MARKUP_COLLECT_INVALID,
|
||||
G_MARKUP_COLLECT_STRING,
|
||||
G_MARKUP_COLLECT_STRDUP,
|
||||
G_MARKUP_COLLECT_BOOLEAN,
|
||||
G_MARKUP_COLLECT_TRISTATE,
|
||||
|
||||
G_MARKUP_COLLECT_OPTIONAL = (1 << 16)
|
||||
} GMarkupCollectType;
|
||||
|
||||
|
||||
/* useful from start_element */
|
||||
gboolean g_markup_collect_attributes (const gchar *element_name,
|
||||
const gchar **attribute_names,
|
||||
const gchar **attribute_values,
|
||||
GError **error,
|
||||
GMarkupCollectType first_type,
|
||||
const gchar *first_attr,
|
||||
...);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_MARKUP_H__ */
|
|
@ -1,152 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_MEM_H__
|
||||
#define __G_MEM_H__
|
||||
|
||||
#include <glib/gslice.h>
|
||||
#include <glib/gtypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GMemVTable GMemVTable;
|
||||
|
||||
|
||||
#if GLIB_SIZEOF_VOID_P > GLIB_SIZEOF_LONG
|
||||
# define G_MEM_ALIGN GLIB_SIZEOF_VOID_P
|
||||
#else /* GLIB_SIZEOF_VOID_P <= GLIB_SIZEOF_LONG */
|
||||
# define G_MEM_ALIGN GLIB_SIZEOF_LONG
|
||||
#endif /* GLIB_SIZEOF_VOID_P <= GLIB_SIZEOF_LONG */
|
||||
|
||||
|
||||
/* Memory allocation functions
|
||||
*/
|
||||
gpointer g_malloc (gsize n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1);
|
||||
gpointer g_malloc0 (gsize n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1);
|
||||
gpointer g_realloc (gpointer mem,
|
||||
gsize n_bytes) G_GNUC_WARN_UNUSED_RESULT;
|
||||
void g_free (gpointer mem);
|
||||
gpointer g_try_malloc (gsize n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1);
|
||||
gpointer g_try_malloc0 (gsize n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1);
|
||||
gpointer g_try_realloc (gpointer mem,
|
||||
gsize n_bytes) G_GNUC_WARN_UNUSED_RESULT;
|
||||
|
||||
|
||||
/* Convenience memory allocators
|
||||
*/
|
||||
#define g_new(struct_type, n_structs) \
|
||||
((struct_type *) g_malloc (((gsize) sizeof (struct_type)) * ((gsize) (n_structs))))
|
||||
#define g_new0(struct_type, n_structs) \
|
||||
((struct_type *) g_malloc0 (((gsize) sizeof (struct_type)) * ((gsize) (n_structs))))
|
||||
#define g_renew(struct_type, mem, n_structs) \
|
||||
((struct_type *) g_realloc ((mem), ((gsize) sizeof (struct_type)) * ((gsize) (n_structs))))
|
||||
|
||||
#define g_try_new(struct_type, n_structs) \
|
||||
((struct_type *) g_try_malloc (((gsize) sizeof (struct_type)) * ((gsize) (n_structs))))
|
||||
#define g_try_new0(struct_type, n_structs) \
|
||||
((struct_type *) g_try_malloc0 (((gsize) sizeof (struct_type)) * ((gsize) (n_structs))))
|
||||
#define g_try_renew(struct_type, mem, n_structs) \
|
||||
((struct_type *) g_try_realloc ((mem), ((gsize) sizeof (struct_type)) * ((gsize) (n_structs))))
|
||||
|
||||
|
||||
/* Memory allocation virtualization for debugging purposes
|
||||
* g_mem_set_vtable() has to be the very first GLib function called
|
||||
* if being used
|
||||
*/
|
||||
struct _GMemVTable
|
||||
{
|
||||
gpointer (*malloc) (gsize n_bytes);
|
||||
gpointer (*realloc) (gpointer mem,
|
||||
gsize n_bytes);
|
||||
void (*free) (gpointer mem);
|
||||
/* optional; set to NULL if not used ! */
|
||||
gpointer (*calloc) (gsize n_blocks,
|
||||
gsize n_block_bytes);
|
||||
gpointer (*try_malloc) (gsize n_bytes);
|
||||
gpointer (*try_realloc) (gpointer mem,
|
||||
gsize n_bytes);
|
||||
};
|
||||
void g_mem_set_vtable (GMemVTable *vtable);
|
||||
gboolean g_mem_is_system_malloc (void);
|
||||
|
||||
GLIB_VAR gboolean g_mem_gc_friendly;
|
||||
|
||||
/* Memory profiler and checker, has to be enabled via g_mem_set_vtable()
|
||||
*/
|
||||
GLIB_VAR GMemVTable *glib_mem_profiler_table;
|
||||
void g_mem_profile (void);
|
||||
|
||||
|
||||
/* deprecated memchunks and allocators */
|
||||
#if !defined (G_DISABLE_DEPRECATED) || defined (GTK_COMPILATION) || defined (GDK_COMPILATION)
|
||||
typedef struct _GAllocator GAllocator;
|
||||
typedef struct _GMemChunk GMemChunk;
|
||||
#define g_mem_chunk_create(type, pre_alloc, alloc_type) ( \
|
||||
g_mem_chunk_new (#type " mem chunks (" #pre_alloc ")", \
|
||||
sizeof (type), \
|
||||
sizeof (type) * (pre_alloc), \
|
||||
(alloc_type)) \
|
||||
)
|
||||
#define g_chunk_new(type, chunk) ( \
|
||||
(type *) g_mem_chunk_alloc (chunk) \
|
||||
)
|
||||
#define g_chunk_new0(type, chunk) ( \
|
||||
(type *) g_mem_chunk_alloc0 (chunk) \
|
||||
)
|
||||
#define g_chunk_free(mem, mem_chunk) G_STMT_START { \
|
||||
g_mem_chunk_free ((mem_chunk), (mem)); \
|
||||
} G_STMT_END
|
||||
#define G_ALLOC_ONLY 1
|
||||
#define G_ALLOC_AND_FREE 2
|
||||
GMemChunk* g_mem_chunk_new (const gchar *name,
|
||||
gint atom_size,
|
||||
gsize area_size,
|
||||
gint type);
|
||||
void g_mem_chunk_destroy (GMemChunk *mem_chunk);
|
||||
gpointer g_mem_chunk_alloc (GMemChunk *mem_chunk);
|
||||
gpointer g_mem_chunk_alloc0 (GMemChunk *mem_chunk);
|
||||
void g_mem_chunk_free (GMemChunk *mem_chunk,
|
||||
gpointer mem);
|
||||
void g_mem_chunk_clean (GMemChunk *mem_chunk);
|
||||
void g_mem_chunk_reset (GMemChunk *mem_chunk);
|
||||
void g_mem_chunk_print (GMemChunk *mem_chunk);
|
||||
void g_mem_chunk_info (void);
|
||||
void g_blow_chunks (void);
|
||||
GAllocator*g_allocator_new (const gchar *name,
|
||||
guint n_preallocs);
|
||||
void g_allocator_free (GAllocator *allocator);
|
||||
#define G_ALLOCATOR_LIST (1)
|
||||
#define G_ALLOCATOR_SLIST (2)
|
||||
#define G_ALLOCATOR_NODE (3)
|
||||
#endif /* G_DISABLE_DEPRECATED */
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_MEM_H__ */
|
|
@ -1,341 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_MESSAGES_H__
|
||||
#define __G_MESSAGES_H__
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <glib/gtypes.h>
|
||||
#include <glib/gmacros.h>
|
||||
|
||||
/* Suppress warnings when GCC is in -pedantic mode and not -std=c99
|
||||
*/
|
||||
#if (__GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* calculate a string size, guaranteed to fit format + args.
|
||||
*/
|
||||
gsize g_printf_string_upper_bound (const gchar* format,
|
||||
va_list args);
|
||||
|
||||
/* Log level shift offset for user defined
|
||||
* log levels (0-7 are used by GLib).
|
||||
*/
|
||||
#define G_LOG_LEVEL_USER_SHIFT (8)
|
||||
|
||||
/* Glib log levels and flags.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
/* log flags */
|
||||
G_LOG_FLAG_RECURSION = 1 << 0,
|
||||
G_LOG_FLAG_FATAL = 1 << 1,
|
||||
|
||||
/* GLib log levels */
|
||||
G_LOG_LEVEL_ERROR = 1 << 2, /* always fatal */
|
||||
G_LOG_LEVEL_CRITICAL = 1 << 3,
|
||||
G_LOG_LEVEL_WARNING = 1 << 4,
|
||||
G_LOG_LEVEL_MESSAGE = 1 << 5,
|
||||
G_LOG_LEVEL_INFO = 1 << 6,
|
||||
G_LOG_LEVEL_DEBUG = 1 << 7,
|
||||
|
||||
G_LOG_LEVEL_MASK = ~(G_LOG_FLAG_RECURSION | G_LOG_FLAG_FATAL)
|
||||
} GLogLevelFlags;
|
||||
|
||||
/* GLib log levels that are considered fatal by default */
|
||||
#define G_LOG_FATAL_MASK (G_LOG_FLAG_RECURSION | G_LOG_LEVEL_ERROR)
|
||||
|
||||
typedef void (*GLogFunc) (const gchar *log_domain,
|
||||
GLogLevelFlags log_level,
|
||||
const gchar *message,
|
||||
gpointer user_data);
|
||||
|
||||
/* Logging mechanism
|
||||
*/
|
||||
guint g_log_set_handler (const gchar *log_domain,
|
||||
GLogLevelFlags log_levels,
|
||||
GLogFunc log_func,
|
||||
gpointer user_data);
|
||||
void g_log_remove_handler (const gchar *log_domain,
|
||||
guint handler_id);
|
||||
void g_log_default_handler (const gchar *log_domain,
|
||||
GLogLevelFlags log_level,
|
||||
const gchar *message,
|
||||
gpointer unused_data);
|
||||
GLogFunc g_log_set_default_handler (GLogFunc log_func,
|
||||
gpointer user_data);
|
||||
void g_log (const gchar *log_domain,
|
||||
GLogLevelFlags log_level,
|
||||
const gchar *format,
|
||||
...) G_GNUC_PRINTF (3, 4);
|
||||
void g_logv (const gchar *log_domain,
|
||||
GLogLevelFlags log_level,
|
||||
const gchar *format,
|
||||
va_list args);
|
||||
GLogLevelFlags g_log_set_fatal_mask (const gchar *log_domain,
|
||||
GLogLevelFlags fatal_mask);
|
||||
GLogLevelFlags g_log_set_always_fatal (GLogLevelFlags fatal_mask);
|
||||
|
||||
/* internal */
|
||||
G_GNUC_INTERNAL void _g_log_fallback_handler (const gchar *log_domain,
|
||||
GLogLevelFlags log_level,
|
||||
const gchar *message,
|
||||
gpointer unused_data);
|
||||
|
||||
/* Internal functions, used to implement the following macros */
|
||||
void g_return_if_fail_warning (const char *log_domain,
|
||||
const char *pretty_function,
|
||||
const char *expression);
|
||||
void g_warn_message (const char *domain,
|
||||
const char *file,
|
||||
int line,
|
||||
const char *func,
|
||||
const char *warnexpr);
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
void g_assert_warning (const char *log_domain,
|
||||
const char *file,
|
||||
const int line,
|
||||
const char *pretty_function,
|
||||
const char *expression) G_GNUC_NORETURN;
|
||||
#endif /* !G_DISABLE_DEPRECATED */
|
||||
|
||||
|
||||
#ifndef G_LOG_DOMAIN
|
||||
#define G_LOG_DOMAIN ((gchar*) 0)
|
||||
#endif /* G_LOG_DOMAIN */
|
||||
#ifdef G_HAVE_ISO_VARARGS
|
||||
/* for(;;); so that GCC knows that control doesn't go past g_error() */
|
||||
#define g_error(...) G_STMT_START { \
|
||||
g_log (G_LOG_DOMAIN, \
|
||||
G_LOG_LEVEL_ERROR, \
|
||||
__VA_ARGS__); \
|
||||
for (;;); \
|
||||
} G_STMT_END
|
||||
|
||||
#define g_message(...) g_log (G_LOG_DOMAIN, \
|
||||
G_LOG_LEVEL_MESSAGE, \
|
||||
__VA_ARGS__)
|
||||
#define g_critical(...) g_log (G_LOG_DOMAIN, \
|
||||
G_LOG_LEVEL_CRITICAL, \
|
||||
__VA_ARGS__)
|
||||
#define g_warning(...) g_log (G_LOG_DOMAIN, \
|
||||
G_LOG_LEVEL_WARNING, \
|
||||
__VA_ARGS__)
|
||||
#define g_debug(...) g_log (G_LOG_DOMAIN, \
|
||||
G_LOG_LEVEL_DEBUG, \
|
||||
__VA_ARGS__)
|
||||
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||
#define g_error(format...) G_STMT_START { \
|
||||
g_log (G_LOG_DOMAIN, \
|
||||
G_LOG_LEVEL_ERROR, \
|
||||
format); \
|
||||
for (;;); \
|
||||
} G_STMT_END
|
||||
|
||||
#define g_message(format...) g_log (G_LOG_DOMAIN, \
|
||||
G_LOG_LEVEL_MESSAGE, \
|
||||
format)
|
||||
#define g_critical(format...) g_log (G_LOG_DOMAIN, \
|
||||
G_LOG_LEVEL_CRITICAL, \
|
||||
format)
|
||||
#define g_warning(format...) g_log (G_LOG_DOMAIN, \
|
||||
G_LOG_LEVEL_WARNING, \
|
||||
format)
|
||||
#define g_debug(format...) g_log (G_LOG_DOMAIN, \
|
||||
G_LOG_LEVEL_DEBUG, \
|
||||
format)
|
||||
#else /* no varargs macros */
|
||||
static void
|
||||
g_error (const gchar *format,
|
||||
...)
|
||||
{
|
||||
va_list args;
|
||||
va_start (args, format);
|
||||
g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, format, args);
|
||||
va_end (args);
|
||||
|
||||
for(;;);
|
||||
}
|
||||
static void
|
||||
g_message (const gchar *format,
|
||||
...)
|
||||
{
|
||||
va_list args;
|
||||
va_start (args, format);
|
||||
g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, format, args);
|
||||
va_end (args);
|
||||
}
|
||||
static void
|
||||
g_critical (const gchar *format,
|
||||
...)
|
||||
{
|
||||
va_list args;
|
||||
va_start (args, format);
|
||||
g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, format, args);
|
||||
va_end (args);
|
||||
}
|
||||
static void
|
||||
g_warning (const gchar *format,
|
||||
...)
|
||||
{
|
||||
va_list args;
|
||||
va_start (args, format);
|
||||
g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, format, args);
|
||||
va_end (args);
|
||||
}
|
||||
static void
|
||||
g_debug (const gchar *format,
|
||||
...)
|
||||
{
|
||||
va_list args;
|
||||
va_start (args, format);
|
||||
g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format, args);
|
||||
va_end (args);
|
||||
}
|
||||
#endif /* !__GNUC__ */
|
||||
|
||||
typedef void (*GPrintFunc) (const gchar *string);
|
||||
void g_print (const gchar *format,
|
||||
...) G_GNUC_PRINTF (1, 2);
|
||||
GPrintFunc g_set_print_handler (GPrintFunc func);
|
||||
void g_printerr (const gchar *format,
|
||||
...) G_GNUC_PRINTF (1, 2);
|
||||
GPrintFunc g_set_printerr_handler (GPrintFunc func);
|
||||
|
||||
|
||||
/* Provide macros for graceful error handling.
|
||||
* The "return" macros will return from the current function.
|
||||
* Two different definitions are given for the macros in
|
||||
* order to support gcc's __PRETTY_FUNCTION__ capability.
|
||||
*/
|
||||
|
||||
#define g_warn_if_reached() do { g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, NULL); } while (0)
|
||||
#define g_warn_if_fail(expr) do { if G_LIKELY (expr) ; else \
|
||||
g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, #expr); } while (0)
|
||||
|
||||
#ifdef G_DISABLE_CHECKS
|
||||
|
||||
#define g_return_if_fail(expr) G_STMT_START{ (void)0; }G_STMT_END
|
||||
#define g_return_val_if_fail(expr,val) G_STMT_START{ (void)0; }G_STMT_END
|
||||
#define g_return_if_reached() G_STMT_START{ return; }G_STMT_END
|
||||
#define g_return_val_if_reached(val) G_STMT_START{ return (val); }G_STMT_END
|
||||
|
||||
#else /* !G_DISABLE_CHECKS */
|
||||
|
||||
#ifdef __GNUC__
|
||||
|
||||
#define g_return_if_fail(expr) G_STMT_START{ \
|
||||
if G_LIKELY(expr) { } else \
|
||||
{ \
|
||||
g_return_if_fail_warning (G_LOG_DOMAIN, \
|
||||
__PRETTY_FUNCTION__, \
|
||||
#expr); \
|
||||
return; \
|
||||
}; }G_STMT_END
|
||||
|
||||
#define g_return_val_if_fail(expr,val) G_STMT_START{ \
|
||||
if G_LIKELY(expr) { } else \
|
||||
{ \
|
||||
g_return_if_fail_warning (G_LOG_DOMAIN, \
|
||||
__PRETTY_FUNCTION__, \
|
||||
#expr); \
|
||||
return (val); \
|
||||
}; }G_STMT_END
|
||||
|
||||
#define g_return_if_reached() G_STMT_START{ \
|
||||
g_log (G_LOG_DOMAIN, \
|
||||
G_LOG_LEVEL_CRITICAL, \
|
||||
"file %s: line %d (%s): should not be reached", \
|
||||
__FILE__, \
|
||||
__LINE__, \
|
||||
__PRETTY_FUNCTION__); \
|
||||
return; }G_STMT_END
|
||||
|
||||
#define g_return_val_if_reached(val) G_STMT_START{ \
|
||||
g_log (G_LOG_DOMAIN, \
|
||||
G_LOG_LEVEL_CRITICAL, \
|
||||
"file %s: line %d (%s): should not be reached", \
|
||||
__FILE__, \
|
||||
__LINE__, \
|
||||
__PRETTY_FUNCTION__); \
|
||||
return (val); }G_STMT_END
|
||||
|
||||
#else /* !__GNUC__ */
|
||||
|
||||
#define g_return_if_fail(expr) G_STMT_START{ \
|
||||
if (expr) { } else \
|
||||
{ \
|
||||
g_log (G_LOG_DOMAIN, \
|
||||
G_LOG_LEVEL_CRITICAL, \
|
||||
"file %s: line %d: assertion `%s' failed", \
|
||||
__FILE__, \
|
||||
__LINE__, \
|
||||
#expr); \
|
||||
return; \
|
||||
}; }G_STMT_END
|
||||
|
||||
#define g_return_val_if_fail(expr, val) G_STMT_START{ \
|
||||
if (expr) { } else \
|
||||
{ \
|
||||
g_log (G_LOG_DOMAIN, \
|
||||
G_LOG_LEVEL_CRITICAL, \
|
||||
"file %s: line %d: assertion `%s' failed", \
|
||||
__FILE__, \
|
||||
__LINE__, \
|
||||
#expr); \
|
||||
return (val); \
|
||||
}; }G_STMT_END
|
||||
|
||||
#define g_return_if_reached() G_STMT_START{ \
|
||||
g_log (G_LOG_DOMAIN, \
|
||||
G_LOG_LEVEL_CRITICAL, \
|
||||
"file %s: line %d: should not be reached", \
|
||||
__FILE__, \
|
||||
__LINE__); \
|
||||
return; }G_STMT_END
|
||||
|
||||
#define g_return_val_if_reached(val) G_STMT_START{ \
|
||||
g_log (G_LOG_DOMAIN, \
|
||||
G_LOG_LEVEL_CRITICAL, \
|
||||
"file %s: line %d: should not be reached", \
|
||||
__FILE__, \
|
||||
__LINE__); \
|
||||
return (val); }G_STMT_END
|
||||
|
||||
#endif /* !__GNUC__ */
|
||||
|
||||
#endif /* !G_DISABLE_CHECKS */
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_MESSAGES_H__ */
|
|
@ -1,901 +0,0 @@
|
|||
/* gmirroringtable.h
|
||||
* generated by gen-mirroring-tab
|
||||
* from the file BidiMirroring.txt of */
|
||||
|
||||
#define PACKTAB_UINT8 guint8
|
||||
#define PACKTAB_UINT16 guint16
|
||||
#define PACKTAB_UINT32 guint32
|
||||
|
||||
/*
|
||||
generated by packtab.c version 3
|
||||
|
||||
use GLIB_GET_MIRRORING_DELTA(key) to access your table
|
||||
|
||||
assumed sizeof(gint16): 2
|
||||
required memory: 1008
|
||||
lookups: 4
|
||||
partition shape: Mir[256][16][4][4]
|
||||
different table entries: 1 14 56 38
|
||||
*/
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
|
||||
static const gint16 MirLev3[4*38] = {
|
||||
#define MirLev3_0000 0x0
|
||||
0,0,0,0,
|
||||
#define MirLev3_0028 0x4
|
||||
1,-1,0,0,
|
||||
#define MirLev3_003C 0x8
|
||||
2,0,-2,0,
|
||||
#define MirLev3_0058 0xC
|
||||
0,0,0,2,
|
||||
#define MirLev3_005C 0x10
|
||||
0,-2,0,0,
|
||||
#define MirLev3_00A8 0x14
|
||||
0,0,0,16,
|
||||
#define MirLev3_00B8 0x18
|
||||
0,0,0,-16,
|
||||
#define MirLev3_0F38 0x1C
|
||||
0,0,1,-1,
|
||||
#define MirLev3_1698 0x20
|
||||
0,0,0,1,
|
||||
#define MirLev3_169C 0x24
|
||||
-1,0,0,0,
|
||||
#define MirLev3_2038 0x28
|
||||
0,1,-1,0,
|
||||
#define MirLev3_2208 0x2C
|
||||
3,3,3,-3,
|
||||
#define MirLev3_220C 0x30
|
||||
-3,-3,0,0,
|
||||
#define MirLev3_2214 0x34
|
||||
0,2016,0,0,
|
||||
#define MirLev3_2240 0x38
|
||||
0,0,0,138,
|
||||
#define MirLev3_2264 0x3C
|
||||
1,-1,1,-1,
|
||||
#define MirLev3_2290 0x40
|
||||
-1,1,-1,0,
|
||||
#define MirLev3_2298 0x44
|
||||
1824,0,0,0,
|
||||
#define MirLev3_22A4 0x48
|
||||
0,0,2104,0,
|
||||
#define MirLev3_22A8 0x4C
|
||||
2108,2106,0,2106,
|
||||
#define MirLev3_22C8 0x50
|
||||
0,1,-1,1,
|
||||
#define MirLev3_22CC 0x54
|
||||
-1,-138,0,0,
|
||||
#define MirLev3_22F0 0x58
|
||||
1,-1,8,8,
|
||||
#define MirLev3_22F4 0x5C
|
||||
8,0,7,7,
|
||||
#define MirLev3_22F8 0x60
|
||||
0,0,-8,-8,
|
||||
#define MirLev3_22FC 0x64
|
||||
-8,-7,-7,0,
|
||||
#define MirLev3_2984 0x68
|
||||
-1,1,-1,1,
|
||||
#define MirLev3_298C 0x6C
|
||||
-1,3,1,-1,
|
||||
#define MirLev3_2990 0x70
|
||||
-3,1,-1,1,
|
||||
#define MirLev3_29B8 0x74
|
||||
-1824,0,0,0,
|
||||
#define MirLev3_29F4 0x78
|
||||
0,-2016,0,0,
|
||||
#define MirLev3_2AAC 0x7C
|
||||
1,-1,0,1,
|
||||
#define MirLev3_2AB0 0x80
|
||||
-1,0,0,1,
|
||||
#define MirLev3_2ADC 0x84
|
||||
0,0,-2104,0,
|
||||
#define MirLev3_2AE0 0x88
|
||||
0,0,0,-2106,
|
||||
#define MirLev3_2AE4 0x8C
|
||||
-2108,-2106,0,0,
|
||||
#define MirLev3_FF5C 0x90
|
||||
0,-2,0,1,
|
||||
#define MirLev3_FF60 0x94
|
||||
-1,0,1,-1,
|
||||
};
|
||||
|
||||
static const PACKTAB_UINT8 MirLev2[4*56] = {
|
||||
#define MirLev2_0000 0x0
|
||||
MirLev3_0000, /* 0000..0003 */
|
||||
MirLev3_0000, /* 0004..0007 */
|
||||
MirLev3_0000, /* 0008..000B */
|
||||
MirLev3_0000, /* 000C..000F */
|
||||
#define MirLev2_0020 0x4
|
||||
MirLev3_0000, /* 0020..0023 */
|
||||
MirLev3_0000, /* 0024..0027 */
|
||||
MirLev3_0028, /* 0028..002B */
|
||||
MirLev3_0000, /* 002C..002F */
|
||||
#define MirLev2_0030 0x8
|
||||
MirLev3_0000, /* 0030..0033 */
|
||||
MirLev3_0000, /* 0034..0037 */
|
||||
MirLev3_0000, /* 0038..003B */
|
||||
MirLev3_003C, /* 003C..003F */
|
||||
#define MirLev2_0050 0xC
|
||||
MirLev3_0000, /* 0050..0053 */
|
||||
MirLev3_0000, /* 0054..0057 */
|
||||
MirLev3_0058, /* 0058..005B */
|
||||
MirLev3_005C, /* 005C..005F */
|
||||
#define MirLev2_00A0 0x10
|
||||
MirLev3_0000, /* 00A0..00A3 */
|
||||
MirLev3_0000, /* 00A4..00A7 */
|
||||
MirLev3_00A8, /* 00A8..00AB */
|
||||
MirLev3_0000, /* 00AC..00AF */
|
||||
#define MirLev2_00B0 0x14
|
||||
MirLev3_0000, /* 00B0..00B3 */
|
||||
MirLev3_0000, /* 00B4..00B7 */
|
||||
MirLev3_00B8, /* 00B8..00BB */
|
||||
MirLev3_0000, /* 00BC..00BF */
|
||||
#define MirLev2_0F30 0x18
|
||||
MirLev3_0000, /* 0F30..0F33 */
|
||||
MirLev3_0000, /* 0F34..0F37 */
|
||||
MirLev3_0F38, /* 0F38..0F3B */
|
||||
MirLev3_0028, /* 0F3C..0F3F */
|
||||
#define MirLev2_1690 0x1C
|
||||
MirLev3_0000, /* 1690..1693 */
|
||||
MirLev3_0000, /* 1694..1697 */
|
||||
MirLev3_1698, /* 1698..169B */
|
||||
MirLev3_169C, /* 169C..169F */
|
||||
#define MirLev2_2030 0x20
|
||||
MirLev3_0000, /* 2030..2033 */
|
||||
MirLev3_0000, /* 2034..2037 */
|
||||
MirLev3_2038, /* 2038..203B */
|
||||
MirLev3_0000, /* 203C..203F */
|
||||
#define MirLev2_2040 0x24
|
||||
MirLev3_0000, /* 2040..2043 */
|
||||
MirLev3_2038, /* 2044..2047 */
|
||||
MirLev3_0000, /* 2048..204B */
|
||||
MirLev3_0000, /* 204C..204F */
|
||||
#define MirLev2_2070 0x28
|
||||
MirLev3_0000, /* 2070..2073 */
|
||||
MirLev3_0000, /* 2074..2077 */
|
||||
MirLev3_0000, /* 2078..207B */
|
||||
MirLev3_2038, /* 207C..207F */
|
||||
#define MirLev2_2200 0x2C
|
||||
MirLev3_0000, /* 2200..2203 */
|
||||
MirLev3_0000, /* 2204..2207 */
|
||||
MirLev3_2208, /* 2208..220B */
|
||||
MirLev3_220C, /* 220C..220F */
|
||||
#define MirLev2_2210 0x30
|
||||
MirLev3_0000, /* 2210..2213 */
|
||||
MirLev3_2214, /* 2214..2217 */
|
||||
MirLev3_0000, /* 2218..221B */
|
||||
MirLev3_0000, /* 221C..221F */
|
||||
#define MirLev2_2230 0x34
|
||||
MirLev3_0000, /* 2230..2233 */
|
||||
MirLev3_0000, /* 2234..2237 */
|
||||
MirLev3_0000, /* 2238..223B */
|
||||
MirLev3_0028, /* 223C..223F */
|
||||
#define MirLev2_2240 0x38
|
||||
MirLev3_2240, /* 2240..2243 */
|
||||
MirLev3_0000, /* 2244..2247 */
|
||||
MirLev3_0000, /* 2248..224B */
|
||||
MirLev3_0000, /* 224C..224F */
|
||||
#define MirLev2_2250 0x3C
|
||||
MirLev3_0F38, /* 2250..2253 */
|
||||
MirLev3_0028, /* 2254..2257 */
|
||||
MirLev3_0000, /* 2258..225B */
|
||||
MirLev3_0000, /* 225C..225F */
|
||||
#define MirLev2_2260 0x40
|
||||
MirLev3_0000, /* 2260..2263 */
|
||||
MirLev3_2264, /* 2264..2267 */
|
||||
MirLev3_2264, /* 2268..226B */
|
||||
MirLev3_0F38, /* 226C..226F */
|
||||
#define MirLev2_2270 0x44
|
||||
MirLev3_2264, /* 2270..2273 */
|
||||
MirLev3_2264, /* 2274..2277 */
|
||||
MirLev3_2264, /* 2278..227B */
|
||||
MirLev3_2264, /* 227C..227F */
|
||||
#define MirLev2_2280 0x48
|
||||
MirLev3_2264, /* 2280..2283 */
|
||||
MirLev3_2264, /* 2284..2287 */
|
||||
MirLev3_2264, /* 2288..228B */
|
||||
MirLev3_1698, /* 228C..228F */
|
||||
#define MirLev2_2290 0x4C
|
||||
MirLev3_2290, /* 2290..2293 */
|
||||
MirLev3_0000, /* 2294..2297 */
|
||||
MirLev3_2298, /* 2298..229B */
|
||||
MirLev3_0000, /* 229C..229F */
|
||||
#define MirLev2_22A0 0x50
|
||||
MirLev3_0F38, /* 22A0..22A3 */
|
||||
MirLev3_22A4, /* 22A4..22A7 */
|
||||
MirLev3_22A8, /* 22A8..22AB */
|
||||
MirLev3_0000, /* 22AC..22AF */
|
||||
#define MirLev2_22B0 0x54
|
||||
MirLev3_2264, /* 22B0..22B3 */
|
||||
MirLev3_2264, /* 22B4..22B7 */
|
||||
MirLev3_0000, /* 22B8..22BB */
|
||||
MirLev3_0000, /* 22BC..22BF */
|
||||
#define MirLev2_22C0 0x58
|
||||
MirLev3_0000, /* 22C0..22C3 */
|
||||
MirLev3_0000, /* 22C4..22C7 */
|
||||
MirLev3_22C8, /* 22C8..22CB */
|
||||
MirLev3_22CC, /* 22CC..22CF */
|
||||
#define MirLev2_22D0 0x5C
|
||||
MirLev3_0028, /* 22D0..22D3 */
|
||||
MirLev3_0F38, /* 22D4..22D7 */
|
||||
MirLev3_2264, /* 22D8..22DB */
|
||||
MirLev3_2264, /* 22DC..22DF */
|
||||
#define MirLev2_22E0 0x60
|
||||
MirLev3_2264, /* 22E0..22E3 */
|
||||
MirLev3_2264, /* 22E4..22E7 */
|
||||
MirLev3_2264, /* 22E8..22EB */
|
||||
MirLev3_0028, /* 22EC..22EF */
|
||||
#define MirLev2_22F0 0x64
|
||||
MirLev3_22F0, /* 22F0..22F3 */
|
||||
MirLev3_22F4, /* 22F4..22F7 */
|
||||
MirLev3_22F8, /* 22F8..22FB */
|
||||
MirLev3_22FC, /* 22FC..22FF */
|
||||
#define MirLev2_2300 0x68
|
||||
MirLev3_0000, /* 2300..2303 */
|
||||
MirLev3_0000, /* 2304..2307 */
|
||||
MirLev3_2264, /* 2308..230B */
|
||||
MirLev3_0000, /* 230C..230F */
|
||||
#define MirLev2_2760 0x6C
|
||||
MirLev3_0000, /* 2760..2763 */
|
||||
MirLev3_0000, /* 2764..2767 */
|
||||
MirLev3_2264, /* 2768..276B */
|
||||
MirLev3_2264, /* 276C..276F */
|
||||
#define MirLev2_2770 0x70
|
||||
MirLev3_2264, /* 2770..2773 */
|
||||
MirLev3_0028, /* 2774..2777 */
|
||||
MirLev3_0000, /* 2778..277B */
|
||||
MirLev3_0000, /* 277C..277F */
|
||||
#define MirLev2_27C0 0x74
|
||||
MirLev3_1698, /* 27C0..27C3 */
|
||||
MirLev3_2290, /* 27C4..27C7 */
|
||||
MirLev3_0028, /* 27C8..27CB */
|
||||
MirLev3_0000, /* 27CC..27CF */
|
||||
#define MirLev2_27D0 0x78
|
||||
MirLev3_0000, /* 27D0..27D3 */
|
||||
MirLev3_2038, /* 27D4..27D7 */
|
||||
MirLev3_0000, /* 27D8..27DB */
|
||||
MirLev3_2038, /* 27DC..27DF */
|
||||
#define MirLev2_27E0 0x7C
|
||||
MirLev3_0F38, /* 27E0..27E3 */
|
||||
MirLev3_2264, /* 27E4..27E7 */
|
||||
MirLev3_2264, /* 27E8..27EB */
|
||||
MirLev3_2264, /* 27EC..27EF */
|
||||
#define MirLev2_2980 0x80
|
||||
MirLev3_1698, /* 2980..2983 */
|
||||
MirLev3_2984, /* 2984..2987 */
|
||||
MirLev3_2984, /* 2988..298B */
|
||||
MirLev3_298C, /* 298C..298F */
|
||||
#define MirLev2_2990 0x84
|
||||
MirLev3_2990, /* 2990..2993 */
|
||||
MirLev3_2984, /* 2994..2997 */
|
||||
MirLev3_169C, /* 2998..299B */
|
||||
MirLev3_0000, /* 299C..299F */
|
||||
#define MirLev2_29B0 0x88
|
||||
MirLev3_0000, /* 29B0..29B3 */
|
||||
MirLev3_0000, /* 29B4..29B7 */
|
||||
MirLev3_29B8, /* 29B8..29BB */
|
||||
MirLev3_0000, /* 29BC..29BF */
|
||||
#define MirLev2_29C0 0x8C
|
||||
MirLev3_0028, /* 29C0..29C3 */
|
||||
MirLev3_0028, /* 29C4..29C7 */
|
||||
MirLev3_0000, /* 29C8..29CB */
|
||||
MirLev3_1698, /* 29CC..29CF */
|
||||
#define MirLev2_29D0 0x90
|
||||
MirLev3_2290, /* 29D0..29D3 */
|
||||
MirLev3_0028, /* 29D4..29D7 */
|
||||
MirLev3_2264, /* 29D8..29DB */
|
||||
MirLev3_0000, /* 29DC..29DF */
|
||||
#define MirLev2_29F0 0x94
|
||||
MirLev3_0000, /* 29F0..29F3 */
|
||||
MirLev3_29F4, /* 29F4..29F7 */
|
||||
MirLev3_0028, /* 29F8..29FB */
|
||||
MirLev3_0028, /* 29FC..29FF */
|
||||
#define MirLev2_2A20 0x98
|
||||
MirLev3_0000, /* 2A20..2A23 */
|
||||
MirLev3_0000, /* 2A24..2A27 */
|
||||
MirLev3_1698, /* 2A28..2A2B */
|
||||
MirLev3_2290, /* 2A2C..2A2F */
|
||||
#define MirLev2_2A30 0x9C
|
||||
MirLev3_0000, /* 2A30..2A33 */
|
||||
MirLev3_0028, /* 2A34..2A37 */
|
||||
MirLev3_0000, /* 2A38..2A3B */
|
||||
MirLev3_0028, /* 2A3C..2A3F */
|
||||
#define MirLev2_2A60 0xA0
|
||||
MirLev3_0000, /* 2A60..2A63 */
|
||||
MirLev3_0028, /* 2A64..2A67 */
|
||||
MirLev3_0000, /* 2A68..2A6B */
|
||||
MirLev3_0000, /* 2A6C..2A6F */
|
||||
#define MirLev2_2A70 0xA4
|
||||
MirLev3_0000, /* 2A70..2A73 */
|
||||
MirLev3_0000, /* 2A74..2A77 */
|
||||
MirLev3_2038, /* 2A78..2A7B */
|
||||
MirLev3_22C8, /* 2A7C..2A7F */
|
||||
#define MirLev2_2A80 0xA8
|
||||
MirLev3_2984, /* 2A80..2A83 */
|
||||
MirLev3_169C, /* 2A84..2A87 */
|
||||
MirLev3_1698, /* 2A88..2A8B */
|
||||
MirLev3_169C, /* 2A8C..2A8F */
|
||||
#define MirLev2_2A90 0xAC
|
||||
MirLev3_22C8, /* 2A90..2A93 */
|
||||
MirLev3_2984, /* 2A94..2A97 */
|
||||
MirLev3_2984, /* 2A98..2A9B */
|
||||
MirLev3_169C, /* 2A9C..2A9F */
|
||||
#define MirLev2_2AA0 0xB0
|
||||
MirLev3_2038, /* 2AA0..2AA3 */
|
||||
MirLev3_0F38, /* 2AA4..2AA7 */
|
||||
MirLev3_2264, /* 2AA8..2AAB */
|
||||
MirLev3_2AAC, /* 2AAC..2AAF */
|
||||
#define MirLev2_2AB0 0xB4
|
||||
MirLev3_2AB0, /* 2AB0..2AB3 */
|
||||
MirLev3_169C, /* 2AB4..2AB7 */
|
||||
MirLev3_1698, /* 2AB8..2ABB */
|
||||
MirLev3_2984, /* 2ABC..2ABF */
|
||||
#define MirLev2_2AC0 0xB8
|
||||
MirLev3_2984, /* 2AC0..2AC3 */
|
||||
MirLev3_2290, /* 2AC4..2AC7 */
|
||||
MirLev3_0000, /* 2AC8..2ACB */
|
||||
MirLev3_22C8, /* 2ACC..2ACF */
|
||||
#define MirLev2_2AD0 0xBC
|
||||
MirLev3_2984, /* 2AD0..2AD3 */
|
||||
MirLev3_2290, /* 2AD4..2AD7 */
|
||||
MirLev3_0000, /* 2AD8..2ADB */
|
||||
MirLev3_2ADC, /* 2ADC..2ADF */
|
||||
#define MirLev2_2AE0 0xC0
|
||||
MirLev3_2AE0, /* 2AE0..2AE3 */
|
||||
MirLev3_2AE4, /* 2AE4..2AE7 */
|
||||
MirLev3_0000, /* 2AE8..2AEB */
|
||||
MirLev3_0028, /* 2AEC..2AEF */
|
||||
#define MirLev2_2AF0 0xC4
|
||||
MirLev3_0000, /* 2AF0..2AF3 */
|
||||
MirLev3_1698, /* 2AF4..2AF7 */
|
||||
MirLev3_2290, /* 2AF8..2AFB */
|
||||
MirLev3_0000, /* 2AFC..2AFF */
|
||||
#define MirLev2_2E00 0xC8
|
||||
MirLev3_0F38, /* 2E00..2E03 */
|
||||
MirLev3_0028, /* 2E04..2E07 */
|
||||
MirLev3_2038, /* 2E08..2E0B */
|
||||
MirLev3_0028, /* 2E0C..2E0F */
|
||||
#define MirLev2_2E20 0xCC
|
||||
MirLev3_2264, /* 2E20..2E23 */
|
||||
MirLev3_2264, /* 2E24..2E27 */
|
||||
MirLev3_0028, /* 2E28..2E2B */
|
||||
MirLev3_0000, /* 2E2C..2E2F */
|
||||
#define MirLev2_3010 0xD0
|
||||
MirLev3_0028, /* 3010..3013 */
|
||||
MirLev3_2264, /* 3014..3017 */
|
||||
MirLev3_2264, /* 3018..301B */
|
||||
MirLev3_0000, /* 301C..301F */
|
||||
#define MirLev2_FE50 0xD4
|
||||
MirLev3_0000, /* FE50..FE53 */
|
||||
MirLev3_0000, /* FE54..FE57 */
|
||||
MirLev3_22C8, /* FE58..FE5B */
|
||||
MirLev3_2290, /* FE5C..FE5F */
|
||||
#define MirLev2_FF50 0xD8
|
||||
MirLev3_0000, /* FF50..FF53 */
|
||||
MirLev3_0000, /* FF54..FF57 */
|
||||
MirLev3_0058, /* FF58..FF5B */
|
||||
MirLev3_FF5C, /* FF5C..FF5F */
|
||||
#define MirLev2_FF60 0xDC
|
||||
MirLev3_FF60, /* FF60..FF63 */
|
||||
MirLev3_0000, /* FF64..FF67 */
|
||||
MirLev3_0000, /* FF68..FF6B */
|
||||
MirLev3_0000, /* FF6C..FF6F */
|
||||
};
|
||||
|
||||
static const PACKTAB_UINT8 MirLev1[16*14] = {
|
||||
#define MirLev1_0000 0x0
|
||||
MirLev2_0000, /* 0000..000F */
|
||||
MirLev2_0000, /* 0010..001F */
|
||||
MirLev2_0020, /* 0020..002F */
|
||||
MirLev2_0030, /* 0030..003F */
|
||||
MirLev2_0000, /* 0040..004F */
|
||||
MirLev2_0050, /* 0050..005F */
|
||||
MirLev2_0000, /* 0060..006F */
|
||||
MirLev2_0050, /* 0070..007F */
|
||||
MirLev2_0000, /* 0080..008F */
|
||||
MirLev2_0000, /* 0090..009F */
|
||||
MirLev2_00A0, /* 00A0..00AF */
|
||||
MirLev2_00B0, /* 00B0..00BF */
|
||||
MirLev2_0000, /* 00C0..00CF */
|
||||
MirLev2_0000, /* 00D0..00DF */
|
||||
MirLev2_0000, /* 00E0..00EF */
|
||||
MirLev2_0000, /* 00F0..00FF */
|
||||
#define MirLev1_0100 0x10
|
||||
MirLev2_0000, /* 0100..010F */
|
||||
MirLev2_0000, /* 0110..011F */
|
||||
MirLev2_0000, /* 0120..012F */
|
||||
MirLev2_0000, /* 0130..013F */
|
||||
MirLev2_0000, /* 0140..014F */
|
||||
MirLev2_0000, /* 0150..015F */
|
||||
MirLev2_0000, /* 0160..016F */
|
||||
MirLev2_0000, /* 0170..017F */
|
||||
MirLev2_0000, /* 0180..018F */
|
||||
MirLev2_0000, /* 0190..019F */
|
||||
MirLev2_0000, /* 01A0..01AF */
|
||||
MirLev2_0000, /* 01B0..01BF */
|
||||
MirLev2_0000, /* 01C0..01CF */
|
||||
MirLev2_0000, /* 01D0..01DF */
|
||||
MirLev2_0000, /* 01E0..01EF */
|
||||
MirLev2_0000, /* 01F0..01FF */
|
||||
#define MirLev1_0F00 0x20
|
||||
MirLev2_0000, /* 0F00..0F0F */
|
||||
MirLev2_0000, /* 0F10..0F1F */
|
||||
MirLev2_0000, /* 0F20..0F2F */
|
||||
MirLev2_0F30, /* 0F30..0F3F */
|
||||
MirLev2_0000, /* 0F40..0F4F */
|
||||
MirLev2_0000, /* 0F50..0F5F */
|
||||
MirLev2_0000, /* 0F60..0F6F */
|
||||
MirLev2_0000, /* 0F70..0F7F */
|
||||
MirLev2_0000, /* 0F80..0F8F */
|
||||
MirLev2_0000, /* 0F90..0F9F */
|
||||
MirLev2_0000, /* 0FA0..0FAF */
|
||||
MirLev2_0000, /* 0FB0..0FBF */
|
||||
MirLev2_0000, /* 0FC0..0FCF */
|
||||
MirLev2_0000, /* 0FD0..0FDF */
|
||||
MirLev2_0000, /* 0FE0..0FEF */
|
||||
MirLev2_0000, /* 0FF0..0FFF */
|
||||
#define MirLev1_1600 0x30
|
||||
MirLev2_0000, /* 1600..160F */
|
||||
MirLev2_0000, /* 1610..161F */
|
||||
MirLev2_0000, /* 1620..162F */
|
||||
MirLev2_0000, /* 1630..163F */
|
||||
MirLev2_0000, /* 1640..164F */
|
||||
MirLev2_0000, /* 1650..165F */
|
||||
MirLev2_0000, /* 1660..166F */
|
||||
MirLev2_0000, /* 1670..167F */
|
||||
MirLev2_0000, /* 1680..168F */
|
||||
MirLev2_1690, /* 1690..169F */
|
||||
MirLev2_0000, /* 16A0..16AF */
|
||||
MirLev2_0000, /* 16B0..16BF */
|
||||
MirLev2_0000, /* 16C0..16CF */
|
||||
MirLev2_0000, /* 16D0..16DF */
|
||||
MirLev2_0000, /* 16E0..16EF */
|
||||
MirLev2_0000, /* 16F0..16FF */
|
||||
#define MirLev1_2000 0x40
|
||||
MirLev2_0000, /* 2000..200F */
|
||||
MirLev2_0000, /* 2010..201F */
|
||||
MirLev2_0000, /* 2020..202F */
|
||||
MirLev2_2030, /* 2030..203F */
|
||||
MirLev2_2040, /* 2040..204F */
|
||||
MirLev2_0000, /* 2050..205F */
|
||||
MirLev2_0000, /* 2060..206F */
|
||||
MirLev2_2070, /* 2070..207F */
|
||||
MirLev2_2070, /* 2080..208F */
|
||||
MirLev2_0000, /* 2090..209F */
|
||||
MirLev2_0000, /* 20A0..20AF */
|
||||
MirLev2_0000, /* 20B0..20BF */
|
||||
MirLev2_0000, /* 20C0..20CF */
|
||||
MirLev2_0000, /* 20D0..20DF */
|
||||
MirLev2_0000, /* 20E0..20EF */
|
||||
MirLev2_0000, /* 20F0..20FF */
|
||||
#define MirLev1_2200 0x50
|
||||
MirLev2_2200, /* 2200..220F */
|
||||
MirLev2_2210, /* 2210..221F */
|
||||
MirLev2_0000, /* 2220..222F */
|
||||
MirLev2_2230, /* 2230..223F */
|
||||
MirLev2_2240, /* 2240..224F */
|
||||
MirLev2_2250, /* 2250..225F */
|
||||
MirLev2_2260, /* 2260..226F */
|
||||
MirLev2_2270, /* 2270..227F */
|
||||
MirLev2_2280, /* 2280..228F */
|
||||
MirLev2_2290, /* 2290..229F */
|
||||
MirLev2_22A0, /* 22A0..22AF */
|
||||
MirLev2_22B0, /* 22B0..22BF */
|
||||
MirLev2_22C0, /* 22C0..22CF */
|
||||
MirLev2_22D0, /* 22D0..22DF */
|
||||
MirLev2_22E0, /* 22E0..22EF */
|
||||
MirLev2_22F0, /* 22F0..22FF */
|
||||
#define MirLev1_2300 0x60
|
||||
MirLev2_2300, /* 2300..230F */
|
||||
MirLev2_0000, /* 2310..231F */
|
||||
MirLev2_2030, /* 2320..232F */
|
||||
MirLev2_0000, /* 2330..233F */
|
||||
MirLev2_0000, /* 2340..234F */
|
||||
MirLev2_0000, /* 2350..235F */
|
||||
MirLev2_0000, /* 2360..236F */
|
||||
MirLev2_0000, /* 2370..237F */
|
||||
MirLev2_0000, /* 2380..238F */
|
||||
MirLev2_0000, /* 2390..239F */
|
||||
MirLev2_0000, /* 23A0..23AF */
|
||||
MirLev2_0000, /* 23B0..23BF */
|
||||
MirLev2_0000, /* 23C0..23CF */
|
||||
MirLev2_0000, /* 23D0..23DF */
|
||||
MirLev2_0000, /* 23E0..23EF */
|
||||
MirLev2_0000, /* 23F0..23FF */
|
||||
#define MirLev1_2700 0x70
|
||||
MirLev2_0000, /* 2700..270F */
|
||||
MirLev2_0000, /* 2710..271F */
|
||||
MirLev2_0000, /* 2720..272F */
|
||||
MirLev2_0000, /* 2730..273F */
|
||||
MirLev2_0000, /* 2740..274F */
|
||||
MirLev2_0000, /* 2750..275F */
|
||||
MirLev2_2760, /* 2760..276F */
|
||||
MirLev2_2770, /* 2770..277F */
|
||||
MirLev2_0000, /* 2780..278F */
|
||||
MirLev2_0000, /* 2790..279F */
|
||||
MirLev2_0000, /* 27A0..27AF */
|
||||
MirLev2_0000, /* 27B0..27BF */
|
||||
MirLev2_27C0, /* 27C0..27CF */
|
||||
MirLev2_27D0, /* 27D0..27DF */
|
||||
MirLev2_27E0, /* 27E0..27EF */
|
||||
MirLev2_0000, /* 27F0..27FF */
|
||||
#define MirLev1_2900 0x80
|
||||
MirLev2_0000, /* 2900..290F */
|
||||
MirLev2_0000, /* 2910..291F */
|
||||
MirLev2_0000, /* 2920..292F */
|
||||
MirLev2_0000, /* 2930..293F */
|
||||
MirLev2_0000, /* 2940..294F */
|
||||
MirLev2_0000, /* 2950..295F */
|
||||
MirLev2_0000, /* 2960..296F */
|
||||
MirLev2_0000, /* 2970..297F */
|
||||
MirLev2_2980, /* 2980..298F */
|
||||
MirLev2_2990, /* 2990..299F */
|
||||
MirLev2_0000, /* 29A0..29AF */
|
||||
MirLev2_29B0, /* 29B0..29BF */
|
||||
MirLev2_29C0, /* 29C0..29CF */
|
||||
MirLev2_29D0, /* 29D0..29DF */
|
||||
MirLev2_0000, /* 29E0..29EF */
|
||||
MirLev2_29F0, /* 29F0..29FF */
|
||||
#define MirLev1_2A00 0x90
|
||||
MirLev2_0000, /* 2A00..2A0F */
|
||||
MirLev2_0000, /* 2A10..2A1F */
|
||||
MirLev2_2A20, /* 2A20..2A2F */
|
||||
MirLev2_2A30, /* 2A30..2A3F */
|
||||
MirLev2_0000, /* 2A40..2A4F */
|
||||
MirLev2_0000, /* 2A50..2A5F */
|
||||
MirLev2_2A60, /* 2A60..2A6F */
|
||||
MirLev2_2A70, /* 2A70..2A7F */
|
||||
MirLev2_2A80, /* 2A80..2A8F */
|
||||
MirLev2_2A90, /* 2A90..2A9F */
|
||||
MirLev2_2AA0, /* 2AA0..2AAF */
|
||||
MirLev2_2AB0, /* 2AB0..2ABF */
|
||||
MirLev2_2AC0, /* 2AC0..2ACF */
|
||||
MirLev2_2AD0, /* 2AD0..2ADF */
|
||||
MirLev2_2AE0, /* 2AE0..2AEF */
|
||||
MirLev2_2AF0, /* 2AF0..2AFF */
|
||||
#define MirLev1_2E00 0xA0
|
||||
MirLev2_2E00, /* 2E00..2E0F */
|
||||
MirLev2_2230, /* 2E10..2E1F */
|
||||
MirLev2_2E20, /* 2E20..2E2F */
|
||||
MirLev2_0000, /* 2E30..2E3F */
|
||||
MirLev2_0000, /* 2E40..2E4F */
|
||||
MirLev2_0000, /* 2E50..2E5F */
|
||||
MirLev2_0000, /* 2E60..2E6F */
|
||||
MirLev2_0000, /* 2E70..2E7F */
|
||||
MirLev2_0000, /* 2E80..2E8F */
|
||||
MirLev2_0000, /* 2E90..2E9F */
|
||||
MirLev2_0000, /* 2EA0..2EAF */
|
||||
MirLev2_0000, /* 2EB0..2EBF */
|
||||
MirLev2_0000, /* 2EC0..2ECF */
|
||||
MirLev2_0000, /* 2ED0..2EDF */
|
||||
MirLev2_0000, /* 2EE0..2EEF */
|
||||
MirLev2_0000, /* 2EF0..2EFF */
|
||||
#define MirLev1_3000 0xB0
|
||||
MirLev2_2760, /* 3000..300F */
|
||||
MirLev2_3010, /* 3010..301F */
|
||||
MirLev2_0000, /* 3020..302F */
|
||||
MirLev2_0000, /* 3030..303F */
|
||||
MirLev2_0000, /* 3040..304F */
|
||||
MirLev2_0000, /* 3050..305F */
|
||||
MirLev2_0000, /* 3060..306F */
|
||||
MirLev2_0000, /* 3070..307F */
|
||||
MirLev2_0000, /* 3080..308F */
|
||||
MirLev2_0000, /* 3090..309F */
|
||||
MirLev2_0000, /* 30A0..30AF */
|
||||
MirLev2_0000, /* 30B0..30BF */
|
||||
MirLev2_0000, /* 30C0..30CF */
|
||||
MirLev2_0000, /* 30D0..30DF */
|
||||
MirLev2_0000, /* 30E0..30EF */
|
||||
MirLev2_0000, /* 30F0..30FF */
|
||||
#define MirLev1_FE00 0xC0
|
||||
MirLev2_0000, /* FE00..FE0F */
|
||||
MirLev2_0000, /* FE10..FE1F */
|
||||
MirLev2_0000, /* FE20..FE2F */
|
||||
MirLev2_0000, /* FE30..FE3F */
|
||||
MirLev2_0000, /* FE40..FE4F */
|
||||
MirLev2_FE50, /* FE50..FE5F */
|
||||
MirLev2_2A60, /* FE60..FE6F */
|
||||
MirLev2_0000, /* FE70..FE7F */
|
||||
MirLev2_0000, /* FE80..FE8F */
|
||||
MirLev2_0000, /* FE90..FE9F */
|
||||
MirLev2_0000, /* FEA0..FEAF */
|
||||
MirLev2_0000, /* FEB0..FEBF */
|
||||
MirLev2_0000, /* FEC0..FECF */
|
||||
MirLev2_0000, /* FED0..FEDF */
|
||||
MirLev2_0000, /* FEE0..FEEF */
|
||||
MirLev2_0000, /* FEF0..FEFF */
|
||||
#define MirLev1_FF00 0xD0
|
||||
MirLev2_0020, /* FF00..FF0F */
|
||||
MirLev2_0030, /* FF10..FF1F */
|
||||
MirLev2_0000, /* FF20..FF2F */
|
||||
MirLev2_0050, /* FF30..FF3F */
|
||||
MirLev2_0000, /* FF40..FF4F */
|
||||
MirLev2_FF50, /* FF50..FF5F */
|
||||
MirLev2_FF60, /* FF60..FF6F */
|
||||
MirLev2_0000, /* FF70..FF7F */
|
||||
MirLev2_0000, /* FF80..FF8F */
|
||||
MirLev2_0000, /* FF90..FF9F */
|
||||
MirLev2_0000, /* FFA0..FFAF */
|
||||
MirLev2_0000, /* FFB0..FFBF */
|
||||
MirLev2_0000, /* FFC0..FFCF */
|
||||
MirLev2_0000, /* FFD0..FFDF */
|
||||
MirLev2_0000, /* FFE0..FFEF */
|
||||
MirLev2_0000, /* FFF0..FFFF */
|
||||
};
|
||||
|
||||
static const PACKTAB_UINT8 MirLev0[256*1] = {
|
||||
#define MirLev0_0000 0x0
|
||||
MirLev1_0000, /* 0000..00FF */
|
||||
MirLev1_0100, /* 0100..01FF */
|
||||
MirLev1_0100, /* 0200..02FF */
|
||||
MirLev1_0100, /* 0300..03FF */
|
||||
MirLev1_0100, /* 0400..04FF */
|
||||
MirLev1_0100, /* 0500..05FF */
|
||||
MirLev1_0100, /* 0600..06FF */
|
||||
MirLev1_0100, /* 0700..07FF */
|
||||
MirLev1_0100, /* 0800..08FF */
|
||||
MirLev1_0100, /* 0900..09FF */
|
||||
MirLev1_0100, /* 0A00..0AFF */
|
||||
MirLev1_0100, /* 0B00..0BFF */
|
||||
MirLev1_0100, /* 0C00..0CFF */
|
||||
MirLev1_0100, /* 0D00..0DFF */
|
||||
MirLev1_0100, /* 0E00..0EFF */
|
||||
MirLev1_0F00, /* 0F00..0FFF */
|
||||
MirLev1_0100, /* 1000..10FF */
|
||||
MirLev1_0100, /* 1100..11FF */
|
||||
MirLev1_0100, /* 1200..12FF */
|
||||
MirLev1_0100, /* 1300..13FF */
|
||||
MirLev1_0100, /* 1400..14FF */
|
||||
MirLev1_0100, /* 1500..15FF */
|
||||
MirLev1_1600, /* 1600..16FF */
|
||||
MirLev1_0100, /* 1700..17FF */
|
||||
MirLev1_0100, /* 1800..18FF */
|
||||
MirLev1_0100, /* 1900..19FF */
|
||||
MirLev1_0100, /* 1A00..1AFF */
|
||||
MirLev1_0100, /* 1B00..1BFF */
|
||||
MirLev1_0100, /* 1C00..1CFF */
|
||||
MirLev1_0100, /* 1D00..1DFF */
|
||||
MirLev1_0100, /* 1E00..1EFF */
|
||||
MirLev1_0100, /* 1F00..1FFF */
|
||||
MirLev1_2000, /* 2000..20FF */
|
||||
MirLev1_0100, /* 2100..21FF */
|
||||
MirLev1_2200, /* 2200..22FF */
|
||||
MirLev1_2300, /* 2300..23FF */
|
||||
MirLev1_0100, /* 2400..24FF */
|
||||
MirLev1_0100, /* 2500..25FF */
|
||||
MirLev1_0100, /* 2600..26FF */
|
||||
MirLev1_2700, /* 2700..27FF */
|
||||
MirLev1_0100, /* 2800..28FF */
|
||||
MirLev1_2900, /* 2900..29FF */
|
||||
MirLev1_2A00, /* 2A00..2AFF */
|
||||
MirLev1_0100, /* 2B00..2BFF */
|
||||
MirLev1_0100, /* 2C00..2CFF */
|
||||
MirLev1_0100, /* 2D00..2DFF */
|
||||
MirLev1_2E00, /* 2E00..2EFF */
|
||||
MirLev1_0100, /* 2F00..2FFF */
|
||||
MirLev1_3000, /* 3000..30FF */
|
||||
MirLev1_0100, /* 3100..31FF */
|
||||
MirLev1_0100, /* 3200..32FF */
|
||||
MirLev1_0100, /* 3300..33FF */
|
||||
MirLev1_0100, /* 3400..34FF */
|
||||
MirLev1_0100, /* 3500..35FF */
|
||||
MirLev1_0100, /* 3600..36FF */
|
||||
MirLev1_0100, /* 3700..37FF */
|
||||
MirLev1_0100, /* 3800..38FF */
|
||||
MirLev1_0100, /* 3900..39FF */
|
||||
MirLev1_0100, /* 3A00..3AFF */
|
||||
MirLev1_0100, /* 3B00..3BFF */
|
||||
MirLev1_0100, /* 3C00..3CFF */
|
||||
MirLev1_0100, /* 3D00..3DFF */
|
||||
MirLev1_0100, /* 3E00..3EFF */
|
||||
MirLev1_0100, /* 3F00..3FFF */
|
||||
MirLev1_0100, /* 4000..40FF */
|
||||
MirLev1_0100, /* 4100..41FF */
|
||||
MirLev1_0100, /* 4200..42FF */
|
||||
MirLev1_0100, /* 4300..43FF */
|
||||
MirLev1_0100, /* 4400..44FF */
|
||||
MirLev1_0100, /* 4500..45FF */
|
||||
MirLev1_0100, /* 4600..46FF */
|
||||
MirLev1_0100, /* 4700..47FF */
|
||||
MirLev1_0100, /* 4800..48FF */
|
||||
MirLev1_0100, /* 4900..49FF */
|
||||
MirLev1_0100, /* 4A00..4AFF */
|
||||
MirLev1_0100, /* 4B00..4BFF */
|
||||
MirLev1_0100, /* 4C00..4CFF */
|
||||
MirLev1_0100, /* 4D00..4DFF */
|
||||
MirLev1_0100, /* 4E00..4EFF */
|
||||
MirLev1_0100, /* 4F00..4FFF */
|
||||
MirLev1_0100, /* 5000..50FF */
|
||||
MirLev1_0100, /* 5100..51FF */
|
||||
MirLev1_0100, /* 5200..52FF */
|
||||
MirLev1_0100, /* 5300..53FF */
|
||||
MirLev1_0100, /* 5400..54FF */
|
||||
MirLev1_0100, /* 5500..55FF */
|
||||
MirLev1_0100, /* 5600..56FF */
|
||||
MirLev1_0100, /* 5700..57FF */
|
||||
MirLev1_0100, /* 5800..58FF */
|
||||
MirLev1_0100, /* 5900..59FF */
|
||||
MirLev1_0100, /* 5A00..5AFF */
|
||||
MirLev1_0100, /* 5B00..5BFF */
|
||||
MirLev1_0100, /* 5C00..5CFF */
|
||||
MirLev1_0100, /* 5D00..5DFF */
|
||||
MirLev1_0100, /* 5E00..5EFF */
|
||||
MirLev1_0100, /* 5F00..5FFF */
|
||||
MirLev1_0100, /* 6000..60FF */
|
||||
MirLev1_0100, /* 6100..61FF */
|
||||
MirLev1_0100, /* 6200..62FF */
|
||||
MirLev1_0100, /* 6300..63FF */
|
||||
MirLev1_0100, /* 6400..64FF */
|
||||
MirLev1_0100, /* 6500..65FF */
|
||||
MirLev1_0100, /* 6600..66FF */
|
||||
MirLev1_0100, /* 6700..67FF */
|
||||
MirLev1_0100, /* 6800..68FF */
|
||||
MirLev1_0100, /* 6900..69FF */
|
||||
MirLev1_0100, /* 6A00..6AFF */
|
||||
MirLev1_0100, /* 6B00..6BFF */
|
||||
MirLev1_0100, /* 6C00..6CFF */
|
||||
MirLev1_0100, /* 6D00..6DFF */
|
||||
MirLev1_0100, /* 6E00..6EFF */
|
||||
MirLev1_0100, /* 6F00..6FFF */
|
||||
MirLev1_0100, /* 7000..70FF */
|
||||
MirLev1_0100, /* 7100..71FF */
|
||||
MirLev1_0100, /* 7200..72FF */
|
||||
MirLev1_0100, /* 7300..73FF */
|
||||
MirLev1_0100, /* 7400..74FF */
|
||||
MirLev1_0100, /* 7500..75FF */
|
||||
MirLev1_0100, /* 7600..76FF */
|
||||
MirLev1_0100, /* 7700..77FF */
|
||||
MirLev1_0100, /* 7800..78FF */
|
||||
MirLev1_0100, /* 7900..79FF */
|
||||
MirLev1_0100, /* 7A00..7AFF */
|
||||
MirLev1_0100, /* 7B00..7BFF */
|
||||
MirLev1_0100, /* 7C00..7CFF */
|
||||
MirLev1_0100, /* 7D00..7DFF */
|
||||
MirLev1_0100, /* 7E00..7EFF */
|
||||
MirLev1_0100, /* 7F00..7FFF */
|
||||
MirLev1_0100, /* 8000..80FF */
|
||||
MirLev1_0100, /* 8100..81FF */
|
||||
MirLev1_0100, /* 8200..82FF */
|
||||
MirLev1_0100, /* 8300..83FF */
|
||||
MirLev1_0100, /* 8400..84FF */
|
||||
MirLev1_0100, /* 8500..85FF */
|
||||
MirLev1_0100, /* 8600..86FF */
|
||||
MirLev1_0100, /* 8700..87FF */
|
||||
MirLev1_0100, /* 8800..88FF */
|
||||
MirLev1_0100, /* 8900..89FF */
|
||||
MirLev1_0100, /* 8A00..8AFF */
|
||||
MirLev1_0100, /* 8B00..8BFF */
|
||||
MirLev1_0100, /* 8C00..8CFF */
|
||||
MirLev1_0100, /* 8D00..8DFF */
|
||||
MirLev1_0100, /* 8E00..8EFF */
|
||||
MirLev1_0100, /* 8F00..8FFF */
|
||||
MirLev1_0100, /* 9000..90FF */
|
||||
MirLev1_0100, /* 9100..91FF */
|
||||
MirLev1_0100, /* 9200..92FF */
|
||||
MirLev1_0100, /* 9300..93FF */
|
||||
MirLev1_0100, /* 9400..94FF */
|
||||
MirLev1_0100, /* 9500..95FF */
|
||||
MirLev1_0100, /* 9600..96FF */
|
||||
MirLev1_0100, /* 9700..97FF */
|
||||
MirLev1_0100, /* 9800..98FF */
|
||||
MirLev1_0100, /* 9900..99FF */
|
||||
MirLev1_0100, /* 9A00..9AFF */
|
||||
MirLev1_0100, /* 9B00..9BFF */
|
||||
MirLev1_0100, /* 9C00..9CFF */
|
||||
MirLev1_0100, /* 9D00..9DFF */
|
||||
MirLev1_0100, /* 9E00..9EFF */
|
||||
MirLev1_0100, /* 9F00..9FFF */
|
||||
MirLev1_0100, /* A000..A0FF */
|
||||
MirLev1_0100, /* A100..A1FF */
|
||||
MirLev1_0100, /* A200..A2FF */
|
||||
MirLev1_0100, /* A300..A3FF */
|
||||
MirLev1_0100, /* A400..A4FF */
|
||||
MirLev1_0100, /* A500..A5FF */
|
||||
MirLev1_0100, /* A600..A6FF */
|
||||
MirLev1_0100, /* A700..A7FF */
|
||||
MirLev1_0100, /* A800..A8FF */
|
||||
MirLev1_0100, /* A900..A9FF */
|
||||
MirLev1_0100, /* AA00..AAFF */
|
||||
MirLev1_0100, /* AB00..ABFF */
|
||||
MirLev1_0100, /* AC00..ACFF */
|
||||
MirLev1_0100, /* AD00..ADFF */
|
||||
MirLev1_0100, /* AE00..AEFF */
|
||||
MirLev1_0100, /* AF00..AFFF */
|
||||
MirLev1_0100, /* B000..B0FF */
|
||||
MirLev1_0100, /* B100..B1FF */
|
||||
MirLev1_0100, /* B200..B2FF */
|
||||
MirLev1_0100, /* B300..B3FF */
|
||||
MirLev1_0100, /* B400..B4FF */
|
||||
MirLev1_0100, /* B500..B5FF */
|
||||
MirLev1_0100, /* B600..B6FF */
|
||||
MirLev1_0100, /* B700..B7FF */
|
||||
MirLev1_0100, /* B800..B8FF */
|
||||
MirLev1_0100, /* B900..B9FF */
|
||||
MirLev1_0100, /* BA00..BAFF */
|
||||
MirLev1_0100, /* BB00..BBFF */
|
||||
MirLev1_0100, /* BC00..BCFF */
|
||||
MirLev1_0100, /* BD00..BDFF */
|
||||
MirLev1_0100, /* BE00..BEFF */
|
||||
MirLev1_0100, /* BF00..BFFF */
|
||||
MirLev1_0100, /* C000..C0FF */
|
||||
MirLev1_0100, /* C100..C1FF */
|
||||
MirLev1_0100, /* C200..C2FF */
|
||||
MirLev1_0100, /* C300..C3FF */
|
||||
MirLev1_0100, /* C400..C4FF */
|
||||
MirLev1_0100, /* C500..C5FF */
|
||||
MirLev1_0100, /* C600..C6FF */
|
||||
MirLev1_0100, /* C700..C7FF */
|
||||
MirLev1_0100, /* C800..C8FF */
|
||||
MirLev1_0100, /* C900..C9FF */
|
||||
MirLev1_0100, /* CA00..CAFF */
|
||||
MirLev1_0100, /* CB00..CBFF */
|
||||
MirLev1_0100, /* CC00..CCFF */
|
||||
MirLev1_0100, /* CD00..CDFF */
|
||||
MirLev1_0100, /* CE00..CEFF */
|
||||
MirLev1_0100, /* CF00..CFFF */
|
||||
MirLev1_0100, /* D000..D0FF */
|
||||
MirLev1_0100, /* D100..D1FF */
|
||||
MirLev1_0100, /* D200..D2FF */
|
||||
MirLev1_0100, /* D300..D3FF */
|
||||
MirLev1_0100, /* D400..D4FF */
|
||||
MirLev1_0100, /* D500..D5FF */
|
||||
MirLev1_0100, /* D600..D6FF */
|
||||
MirLev1_0100, /* D700..D7FF */
|
||||
MirLev1_0100, /* D800..D8FF */
|
||||
MirLev1_0100, /* D900..D9FF */
|
||||
MirLev1_0100, /* DA00..DAFF */
|
||||
MirLev1_0100, /* DB00..DBFF */
|
||||
MirLev1_0100, /* DC00..DCFF */
|
||||
MirLev1_0100, /* DD00..DDFF */
|
||||
MirLev1_0100, /* DE00..DEFF */
|
||||
MirLev1_0100, /* DF00..DFFF */
|
||||
MirLev1_0100, /* E000..E0FF */
|
||||
MirLev1_0100, /* E100..E1FF */
|
||||
MirLev1_0100, /* E200..E2FF */
|
||||
MirLev1_0100, /* E300..E3FF */
|
||||
MirLev1_0100, /* E400..E4FF */
|
||||
MirLev1_0100, /* E500..E5FF */
|
||||
MirLev1_0100, /* E600..E6FF */
|
||||
MirLev1_0100, /* E700..E7FF */
|
||||
MirLev1_0100, /* E800..E8FF */
|
||||
MirLev1_0100, /* E900..E9FF */
|
||||
MirLev1_0100, /* EA00..EAFF */
|
||||
MirLev1_0100, /* EB00..EBFF */
|
||||
MirLev1_0100, /* EC00..ECFF */
|
||||
MirLev1_0100, /* ED00..EDFF */
|
||||
MirLev1_0100, /* EE00..EEFF */
|
||||
MirLev1_0100, /* EF00..EFFF */
|
||||
MirLev1_0100, /* F000..F0FF */
|
||||
MirLev1_0100, /* F100..F1FF */
|
||||
MirLev1_0100, /* F200..F2FF */
|
||||
MirLev1_0100, /* F300..F3FF */
|
||||
MirLev1_0100, /* F400..F4FF */
|
||||
MirLev1_0100, /* F500..F5FF */
|
||||
MirLev1_0100, /* F600..F6FF */
|
||||
MirLev1_0100, /* F700..F7FF */
|
||||
MirLev1_0100, /* F800..F8FF */
|
||||
MirLev1_0100, /* F900..F9FF */
|
||||
MirLev1_0100, /* FA00..FAFF */
|
||||
MirLev1_0100, /* FB00..FBFF */
|
||||
MirLev1_0100, /* FC00..FCFF */
|
||||
MirLev1_0100, /* FD00..FDFF */
|
||||
MirLev1_FE00, /* FE00..FEFF */
|
||||
MirLev1_FF00, /* FF00..FFFF */
|
||||
};
|
||||
|
||||
/* *INDENT-ON* */
|
||||
|
||||
#define GLIB_GET_MIRRORING_DELTA(x) \
|
||||
((x) >= 0x10000 ? 0 : \
|
||||
MirLev3[((x) & 0x03) + \
|
||||
MirLev2[((x) >> 2 & 0x03) + \
|
||||
MirLev1[((x) >> 4 & 0x0f) + \
|
||||
MirLev0[((x) >> 8)]]]])
|
||||
|
||||
#undef PACKTAB_UINT8
|
||||
#undef PACKTAB_UINT16
|
||||
#undef PACKTAB_UINT32
|
||||
|
||||
#define GLIB_GET_MIRRORING(x) ((x) + GLIB_GET_MIRRORING_DELTA(x))
|
||||
|
||||
/* End of generated gmirroringtable.h */
|
|
@ -1,288 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_NODE_H__
|
||||
#define __G_NODE_H__
|
||||
|
||||
#include <glib/gmem.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GNode GNode;
|
||||
|
||||
/* Tree traverse flags */
|
||||
typedef enum
|
||||
{
|
||||
G_TRAVERSE_LEAVES = 1 << 0,
|
||||
G_TRAVERSE_NON_LEAVES = 1 << 1,
|
||||
G_TRAVERSE_ALL = G_TRAVERSE_LEAVES | G_TRAVERSE_NON_LEAVES,
|
||||
G_TRAVERSE_MASK = 0x03,
|
||||
G_TRAVERSE_LEAFS = G_TRAVERSE_LEAVES,
|
||||
G_TRAVERSE_NON_LEAFS = G_TRAVERSE_NON_LEAVES
|
||||
} GTraverseFlags;
|
||||
|
||||
/* Tree traverse orders */
|
||||
typedef enum
|
||||
{
|
||||
G_IN_ORDER,
|
||||
G_PRE_ORDER,
|
||||
G_POST_ORDER,
|
||||
G_LEVEL_ORDER
|
||||
} GTraverseType;
|
||||
|
||||
typedef gboolean (*GNodeTraverseFunc) (GNode *node,
|
||||
gpointer data);
|
||||
typedef void (*GNodeForeachFunc) (GNode *node,
|
||||
gpointer data);
|
||||
|
||||
/**
|
||||
* GCopyFunc:
|
||||
* @src: A pointer to the data which should be copied
|
||||
* @data: Additional data
|
||||
*
|
||||
* A function of this signature is used to copy the node data
|
||||
* when doing a deep-copy of a tree.
|
||||
*
|
||||
* Returns: A pointer to the copy
|
||||
*
|
||||
* Since: 2.4
|
||||
*/
|
||||
typedef gpointer (*GCopyFunc) (gconstpointer src,
|
||||
gpointer data);
|
||||
|
||||
/* N-way tree implementation
|
||||
*/
|
||||
struct _GNode
|
||||
{
|
||||
gpointer data;
|
||||
GNode *next;
|
||||
GNode *prev;
|
||||
GNode *parent;
|
||||
GNode *children;
|
||||
};
|
||||
|
||||
/**
|
||||
* G_NODE_IS_ROOT:
|
||||
* @node: a #GNode
|
||||
*
|
||||
* Returns %TRUE if a #GNode is the root of a tree.
|
||||
*
|
||||
* Returns: %TRUE if the #GNode is the root of a tree
|
||||
* (i.e. it has no parent or siblings)
|
||||
*/
|
||||
#define G_NODE_IS_ROOT(node) (((GNode*) (node))->parent == NULL && \
|
||||
((GNode*) (node))->prev == NULL && \
|
||||
((GNode*) (node))->next == NULL)
|
||||
|
||||
/**
|
||||
* G_NODE_IS_LEAF:
|
||||
* @node: a #GNode
|
||||
*
|
||||
* Returns %TRUE if a #GNode is a leaf node.
|
||||
*
|
||||
* Returns: %TRUE if the #GNode is a leaf node
|
||||
* (i.e. it has no children)
|
||||
*/
|
||||
#define G_NODE_IS_LEAF(node) (((GNode*) (node))->children == NULL)
|
||||
|
||||
GNode* g_node_new (gpointer data);
|
||||
void g_node_destroy (GNode *root);
|
||||
void g_node_unlink (GNode *node);
|
||||
GNode* g_node_copy_deep (GNode *node,
|
||||
GCopyFunc copy_func,
|
||||
gpointer data);
|
||||
GNode* g_node_copy (GNode *node);
|
||||
GNode* g_node_insert (GNode *parent,
|
||||
gint position,
|
||||
GNode *node);
|
||||
GNode* g_node_insert_before (GNode *parent,
|
||||
GNode *sibling,
|
||||
GNode *node);
|
||||
GNode* g_node_insert_after (GNode *parent,
|
||||
GNode *sibling,
|
||||
GNode *node);
|
||||
GNode* g_node_prepend (GNode *parent,
|
||||
GNode *node);
|
||||
guint g_node_n_nodes (GNode *root,
|
||||
GTraverseFlags flags);
|
||||
GNode* g_node_get_root (GNode *node);
|
||||
gboolean g_node_is_ancestor (GNode *node,
|
||||
GNode *descendant);
|
||||
guint g_node_depth (GNode *node);
|
||||
GNode* g_node_find (GNode *root,
|
||||
GTraverseType order,
|
||||
GTraverseFlags flags,
|
||||
gpointer data);
|
||||
|
||||
/* convenience macros */
|
||||
/**
|
||||
* g_node_append:
|
||||
* @parent: the #GNode to place the new #GNode under
|
||||
* @node: the #GNode to insert
|
||||
*
|
||||
* Inserts a #GNode as the last child of the given parent.
|
||||
*
|
||||
* Returns: the inserted #GNode
|
||||
*/
|
||||
#define g_node_append(parent, node) \
|
||||
g_node_insert_before ((parent), NULL, (node))
|
||||
|
||||
/**
|
||||
* g_node_insert_data:
|
||||
* @parent: the #GNode to place the new #GNode under
|
||||
* @position: the position to place the new #GNode at. If position is -1,
|
||||
* the new #GNode is inserted as the last child of @parent
|
||||
* @data: the data for the new #GNode
|
||||
*
|
||||
* Inserts a new #GNode at the given position.
|
||||
*
|
||||
* Returns: the new #GNode
|
||||
*/
|
||||
#define g_node_insert_data(parent, position, data) \
|
||||
g_node_insert ((parent), (position), g_node_new (data))
|
||||
|
||||
/**
|
||||
* g_node_insert_data_before:
|
||||
* @parent: the #GNode to place the new #GNode under
|
||||
* @sibling: the sibling #GNode to place the new #GNode before
|
||||
* @data: the data for the new #GNode
|
||||
*
|
||||
* Inserts a new #GNode before the given sibling.
|
||||
*
|
||||
* Returns: the new #GNode
|
||||
*/
|
||||
#define g_node_insert_data_before(parent, sibling, data) \
|
||||
g_node_insert_before ((parent), (sibling), g_node_new (data))
|
||||
|
||||
/**
|
||||
* g_node_prepend_data:
|
||||
* @parent: the #GNode to place the new #GNode under
|
||||
* @data: the data for the new #GNode
|
||||
*
|
||||
* Inserts a new #GNode as the first child of the given parent.
|
||||
*
|
||||
* Returns: the new #GNode
|
||||
*/
|
||||
#define g_node_prepend_data(parent, data) \
|
||||
g_node_prepend ((parent), g_node_new (data))
|
||||
|
||||
/**
|
||||
* g_node_append_data:
|
||||
* @parent: the #GNode to place the new #GNode under
|
||||
* @data: the data for the new #GNode
|
||||
*
|
||||
* Inserts a new #GNode as the last child of the given parent.
|
||||
*
|
||||
* Returns: the new #GNode
|
||||
*/
|
||||
#define g_node_append_data(parent, data) \
|
||||
g_node_insert_before ((parent), NULL, g_node_new (data))
|
||||
|
||||
/* traversal function, assumes that `node' is root
|
||||
* (only traverses `node' and its subtree).
|
||||
* this function is just a high level interface to
|
||||
* low level traversal functions, optimized for speed.
|
||||
*/
|
||||
void g_node_traverse (GNode *root,
|
||||
GTraverseType order,
|
||||
GTraverseFlags flags,
|
||||
gint max_depth,
|
||||
GNodeTraverseFunc func,
|
||||
gpointer data);
|
||||
|
||||
/* return the maximum tree height starting with `node', this is an expensive
|
||||
* operation, since we need to visit all nodes. this could be shortened by
|
||||
* adding `guint height' to struct _GNode, but then again, this is not very
|
||||
* often needed, and would make g_node_insert() more time consuming.
|
||||
*/
|
||||
guint g_node_max_height (GNode *root);
|
||||
|
||||
void g_node_children_foreach (GNode *node,
|
||||
GTraverseFlags flags,
|
||||
GNodeForeachFunc func,
|
||||
gpointer data);
|
||||
void g_node_reverse_children (GNode *node);
|
||||
guint g_node_n_children (GNode *node);
|
||||
GNode* g_node_nth_child (GNode *node,
|
||||
guint n);
|
||||
GNode* g_node_last_child (GNode *node);
|
||||
GNode* g_node_find_child (GNode *node,
|
||||
GTraverseFlags flags,
|
||||
gpointer data);
|
||||
gint g_node_child_position (GNode *node,
|
||||
GNode *child);
|
||||
gint g_node_child_index (GNode *node,
|
||||
gpointer data);
|
||||
|
||||
GNode* g_node_first_sibling (GNode *node);
|
||||
GNode* g_node_last_sibling (GNode *node);
|
||||
|
||||
/**
|
||||
* g_node_prev_sibling:
|
||||
* @node: a #GNode
|
||||
*
|
||||
* Gets the previous sibling of a #GNode.
|
||||
*
|
||||
* Returns: the previous sibling of @node, or %NULL if @node is %NULL
|
||||
*/
|
||||
#define g_node_prev_sibling(node) ((node) ? \
|
||||
((GNode*) (node))->prev : NULL)
|
||||
|
||||
/**
|
||||
* g_node_next_sibling:
|
||||
* @node: a #GNode
|
||||
*
|
||||
* Gets the next sibling of a #GNode.
|
||||
*
|
||||
* Returns: the next sibling of @node, or %NULL if @node is %NULL
|
||||
*/
|
||||
#define g_node_next_sibling(node) ((node) ? \
|
||||
((GNode*) (node))->next : NULL)
|
||||
|
||||
/**
|
||||
* g_node_first_child:
|
||||
* @node: a #GNode
|
||||
*
|
||||
* Gets the first child of a #GNode.
|
||||
*
|
||||
* Returns: the first child of @node, or %NULL if @node is %NULL
|
||||
* or has no children
|
||||
*/
|
||||
#define g_node_first_child(node) ((node) ? \
|
||||
((GNode*) (node))->children : NULL)
|
||||
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
void g_node_push_allocator (gpointer dummy);
|
||||
void g_node_pop_allocator (void);
|
||||
#endif
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_NODE_H__ */
|
|
@ -1,44 +0,0 @@
|
|||
The files
|
||||
|
||||
asnprintf.c
|
||||
printf-args.c
|
||||
printf-args.h
|
||||
printf-parse.c
|
||||
printf-parse.h
|
||||
vasnprintf.c
|
||||
vasnprintf.h
|
||||
|
||||
are taken from the vasnprintf module of the GNUlib package, which can
|
||||
be found at:
|
||||
|
||||
http://www.gnu.org/software/gnulib/
|
||||
|
||||
All files have been modified to include g-gnulib.h.
|
||||
|
||||
vasnprintf.c has also been modified to include support for long long
|
||||
printing if the system printf doesn't. This code is protected by
|
||||
#ifndef HAVE_LONG_LONG_FORMAT.
|
||||
|
||||
Code has been added to printf-args.[ch], printf-parse.c and vasnprintf.c
|
||||
to support printing of __int64 values with the I64 format modifier. This
|
||||
is protected by #ifdef HAVE_INT64_AND_I64.
|
||||
|
||||
The files
|
||||
|
||||
printf.h
|
||||
printf.c
|
||||
g-gnulib.h
|
||||
|
||||
have been written by me. printf.[hc] contain implementations of the
|
||||
remaining functions in the printf family based on vasnprintf.
|
||||
g-gnulib.h is included by all source files in order to move all
|
||||
exported functions to the _g_gnulib namespace, replace malloc by
|
||||
g_malloc and make sure that snprintf is only used if it implements
|
||||
C99 return value semantics.
|
||||
|
||||
Matthias Clasen
|
||||
November 1, 2003
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 2003 Matthias Clasen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#ifndef __G_GNULIB_H__
|
||||
|
||||
#include "config.h"
|
||||
#include <stdlib.h>
|
||||
#include "glib/glib.h"
|
||||
#include "glib/galias.h"
|
||||
|
||||
/* Private namespace for gnulib functions */
|
||||
#define asnprintf _g_gnulib_asnprintf
|
||||
#define vasnprintf _g_gnulib_vasnprintf
|
||||
#define printf_parse _g_gnulib_printf_parse
|
||||
#define printf_fetchargs _g_gnulib_printf_fetchargs
|
||||
|
||||
/* Use GLib memory allocation */
|
||||
#undef malloc
|
||||
#undef realloc
|
||||
#undef free
|
||||
#define malloc g_malloc
|
||||
#define realloc g_realloc
|
||||
#define free g_free
|
||||
|
||||
/* Ensure only C99 snprintf gets used */
|
||||
#undef HAVE_SNPRINTF
|
||||
#ifdef HAVE_C99_SNPRINTF
|
||||
#define HAVE_SNPRINTF 1
|
||||
#else
|
||||
#define HAVE_SNPRINTF 0
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* __G_GNULIB_H__ */
|
||||
|
|
@ -1,142 +0,0 @@
|
|||
/* Decomposed printf argument list.
|
||||
Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
by the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
#ifndef _PRINTF_ARGS_H
|
||||
#define _PRINTF_ARGS_H
|
||||
|
||||
/* Get wchar_t. */
|
||||
#ifdef HAVE_WCHAR_T
|
||||
# include <stddef.h>
|
||||
#endif
|
||||
|
||||
/* Get wint_t. */
|
||||
#ifdef HAVE_WINT_T
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
|
||||
/* Get va_list. */
|
||||
#include <stdarg.h>
|
||||
|
||||
|
||||
/* Argument types */
|
||||
typedef enum
|
||||
{
|
||||
TYPE_NONE,
|
||||
TYPE_SCHAR,
|
||||
TYPE_UCHAR,
|
||||
TYPE_SHORT,
|
||||
TYPE_USHORT,
|
||||
TYPE_INT,
|
||||
TYPE_UINT,
|
||||
TYPE_LONGINT,
|
||||
TYPE_ULONGINT,
|
||||
#ifdef HAVE_LONG_LONG
|
||||
TYPE_LONGLONGINT,
|
||||
TYPE_ULONGLONGINT,
|
||||
#endif
|
||||
#ifdef HAVE_INT64_AND_I64
|
||||
TYPE_INT64,
|
||||
TYPE_UINT64,
|
||||
#endif
|
||||
TYPE_DOUBLE,
|
||||
#ifdef HAVE_LONG_DOUBLE
|
||||
TYPE_LONGDOUBLE,
|
||||
#endif
|
||||
TYPE_CHAR,
|
||||
#ifdef HAVE_WINT_T
|
||||
TYPE_WIDE_CHAR,
|
||||
#endif
|
||||
TYPE_STRING,
|
||||
#ifdef HAVE_WCHAR_T
|
||||
TYPE_WIDE_STRING,
|
||||
#endif
|
||||
TYPE_POINTER,
|
||||
TYPE_COUNT_SCHAR_POINTER,
|
||||
TYPE_COUNT_SHORT_POINTER,
|
||||
TYPE_COUNT_INT_POINTER,
|
||||
TYPE_COUNT_LONGINT_POINTER
|
||||
#ifdef HAVE_LONG_LONG
|
||||
, TYPE_COUNT_LONGLONGINT_POINTER
|
||||
#endif
|
||||
} arg_type;
|
||||
|
||||
/* Polymorphic argument */
|
||||
typedef struct
|
||||
{
|
||||
arg_type type;
|
||||
union
|
||||
{
|
||||
signed char a_schar;
|
||||
unsigned char a_uchar;
|
||||
short a_short;
|
||||
unsigned short a_ushort;
|
||||
int a_int;
|
||||
unsigned int a_uint;
|
||||
long int a_longint;
|
||||
unsigned long int a_ulongint;
|
||||
#ifdef HAVE_LONG_LONG
|
||||
long long int a_longlongint;
|
||||
unsigned long long int a_ulonglongint;
|
||||
#endif
|
||||
#ifdef HAVE_INT64_AND_I64
|
||||
__int64 a_int64;
|
||||
unsigned __int64 a_uint64;
|
||||
#endif
|
||||
float a_float;
|
||||
double a_double;
|
||||
#ifdef HAVE_LONG_DOUBLE
|
||||
long double a_longdouble;
|
||||
#endif
|
||||
int a_char;
|
||||
#ifdef HAVE_WINT_T
|
||||
wint_t a_wide_char;
|
||||
#endif
|
||||
const char* a_string;
|
||||
#ifdef HAVE_WCHAR_T
|
||||
const wchar_t* a_wide_string;
|
||||
#endif
|
||||
void* a_pointer;
|
||||
signed char * a_count_schar_pointer;
|
||||
short * a_count_short_pointer;
|
||||
int * a_count_int_pointer;
|
||||
long int * a_count_longint_pointer;
|
||||
#ifdef HAVE_LONG_LONG
|
||||
long long int * a_count_longlongint_pointer;
|
||||
#endif
|
||||
}
|
||||
a;
|
||||
}
|
||||
argument;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int count;
|
||||
argument *arg;
|
||||
}
|
||||
arguments;
|
||||
|
||||
|
||||
/* Fetch the arguments, putting them into a. */
|
||||
#ifdef STATIC
|
||||
STATIC
|
||||
#else
|
||||
extern
|
||||
#endif
|
||||
int printf_fetchargs (va_list args, arguments *a);
|
||||
|
||||
#endif /* _PRINTF_ARGS_H */
|
|
@ -1,74 +0,0 @@
|
|||
/* Parse printf format string.
|
||||
Copyright (C) 1999, 2002 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
by the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
#ifndef _PRINTF_PARSE_H
|
||||
#define _PRINTF_PARSE_H
|
||||
|
||||
#include "printf-args.h"
|
||||
|
||||
/* Private namespace for gnulib functions */
|
||||
#define printf_parse _g_gnulib_printf_parse
|
||||
|
||||
/* Flags */
|
||||
#define FLAG_GROUP 1 /* ' flag */
|
||||
#define FLAG_LEFT 2 /* - flag */
|
||||
#define FLAG_SHOWSIGN 4 /* + flag */
|
||||
#define FLAG_SPACE 8 /* space flag */
|
||||
#define FLAG_ALT 16 /* # flag */
|
||||
#define FLAG_ZERO 32
|
||||
|
||||
/* A parsed directive. */
|
||||
typedef struct
|
||||
{
|
||||
const char* dir_start;
|
||||
const char* dir_end;
|
||||
int flags;
|
||||
const char* width_start;
|
||||
const char* width_end;
|
||||
int width_arg_index;
|
||||
const char* precision_start;
|
||||
const char* precision_end;
|
||||
int precision_arg_index;
|
||||
char conversion; /* d i o u x X f e E g G c s p n U % but not C S */
|
||||
int arg_index;
|
||||
}
|
||||
char_directive;
|
||||
|
||||
/* A parsed format string. */
|
||||
typedef struct
|
||||
{
|
||||
unsigned int count;
|
||||
char_directive *dir;
|
||||
unsigned int max_width_length;
|
||||
unsigned int max_precision_length;
|
||||
}
|
||||
char_directives;
|
||||
|
||||
|
||||
/* Parses the format string. Fills in the number N of directives, and fills
|
||||
in directives[0], ..., directives[N-1], and sets directives[N].dir_start
|
||||
to the end of the format string. Also fills in the arg_type fields of the
|
||||
arguments and the needed count of arguments. */
|
||||
#ifdef STATIC
|
||||
STATIC
|
||||
#else
|
||||
extern
|
||||
#endif
|
||||
int printf_parse (const char *format, char_directives *d, arguments *a);
|
||||
|
||||
#endif /* _PRINTF_PARSE_H */
|
|
@ -1,57 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 2003 Matthias Clasen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#ifndef __GNULIB_PRINTF_H__
|
||||
#define __GNULIB_PRINTF_H__
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int _g_gnulib_printf (char const *format,
|
||||
...);
|
||||
int _g_gnulib_fprintf (FILE *file,
|
||||
char const *format,
|
||||
...);
|
||||
int _g_gnulib_sprintf (char *string,
|
||||
char const *format,
|
||||
...);
|
||||
int _g_gnulib_snprintf (char *string,
|
||||
size_t n,
|
||||
char const *format,
|
||||
...);
|
||||
int _g_gnulib_vprintf (char const *format,
|
||||
va_list args);
|
||||
int _g_gnulib_vfprintf (FILE *file,
|
||||
char const *format,
|
||||
va_list args);
|
||||
int _g_gnulib_vsprintf (char *string,
|
||||
char const *format,
|
||||
va_list args);
|
||||
int _g_gnulib_vsnprintf (char *string,
|
||||
size_t n,
|
||||
char const *format,
|
||||
va_list args);
|
||||
int _g_gnulib_vasprintf (char **result,
|
||||
char const *format,
|
||||
va_list args);
|
||||
|
||||
|
||||
#endif /* __GNULIB_PRINTF_H__ */
|
||||
|
||||
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
/* vsprintf with automatic memory allocation.
|
||||
Copyright (C) 2002-2003 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
by the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
#ifndef _VASNPRINTF_H
|
||||
#define _VASNPRINTF_H
|
||||
|
||||
/* Get va_list. */
|
||||
#include <stdarg.h>
|
||||
|
||||
/* Get size_t. */
|
||||
#include <stddef.h>
|
||||
|
||||
#ifndef __attribute__
|
||||
/* This feature is available in gcc versions 2.5 and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
|
||||
# define __attribute__(Spec) /* empty */
|
||||
# endif
|
||||
/* The __-protected variants of `format' and `printf' attributes
|
||||
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
|
||||
# define __format__ format
|
||||
# define __printf__ printf
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Write formatted output to a string dynamically allocated with malloc().
|
||||
You can pass a preallocated buffer for the result in RESULTBUF and its
|
||||
size in *LENGTHP; otherwise you pass RESULTBUF = NULL.
|
||||
If successful, return the address of the string (this may be = RESULTBUF
|
||||
if no dynamic memory allocation was necessary) and set *LENGTHP to the
|
||||
number of resulting bytes, excluding the trailing NUL. Upon error, set
|
||||
errno and return NULL. */
|
||||
extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
|
||||
__attribute__ ((__format__ (__printf__, 3, 4)));
|
||||
extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args)
|
||||
__attribute__ ((__format__ (__printf__, 3, 0)));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _VASNPRINTF_H */
|
|
@ -1,163 +0,0 @@
|
|||
/* goption.h - Option parser
|
||||
*
|
||||
* Copyright (C) 2004 Anders Carlsson <andersca@gnome.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_OPTION_H__
|
||||
#define __G_OPTION_H__
|
||||
|
||||
#include <glib/gerror.h>
|
||||
#include <glib/gquark.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GOptionContext GOptionContext;
|
||||
typedef struct _GOptionGroup GOptionGroup;
|
||||
typedef struct _GOptionEntry GOptionEntry;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_OPTION_FLAG_HIDDEN = 1 << 0,
|
||||
G_OPTION_FLAG_IN_MAIN = 1 << 1,
|
||||
G_OPTION_FLAG_REVERSE = 1 << 2,
|
||||
G_OPTION_FLAG_NO_ARG = 1 << 3,
|
||||
G_OPTION_FLAG_FILENAME = 1 << 4,
|
||||
G_OPTION_FLAG_OPTIONAL_ARG = 1 << 5,
|
||||
G_OPTION_FLAG_NOALIAS = 1 << 6
|
||||
} GOptionFlags;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_OPTION_ARG_NONE,
|
||||
G_OPTION_ARG_STRING,
|
||||
G_OPTION_ARG_INT,
|
||||
G_OPTION_ARG_CALLBACK,
|
||||
G_OPTION_ARG_FILENAME,
|
||||
G_OPTION_ARG_STRING_ARRAY,
|
||||
G_OPTION_ARG_FILENAME_ARRAY,
|
||||
G_OPTION_ARG_DOUBLE,
|
||||
G_OPTION_ARG_INT64
|
||||
} GOptionArg;
|
||||
|
||||
typedef gboolean (*GOptionArgFunc) (const gchar *option_name,
|
||||
const gchar *value,
|
||||
gpointer data,
|
||||
GError **error);
|
||||
|
||||
typedef gboolean (*GOptionParseFunc) (GOptionContext *context,
|
||||
GOptionGroup *group,
|
||||
gpointer data,
|
||||
GError **error);
|
||||
|
||||
typedef void (*GOptionErrorFunc) (GOptionContext *context,
|
||||
GOptionGroup *group,
|
||||
gpointer data,
|
||||
GError **error);
|
||||
|
||||
#define G_OPTION_ERROR (g_option_error_quark ())
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_OPTION_ERROR_UNKNOWN_OPTION,
|
||||
G_OPTION_ERROR_BAD_VALUE,
|
||||
G_OPTION_ERROR_FAILED
|
||||
} GOptionError;
|
||||
|
||||
GQuark g_option_error_quark (void);
|
||||
|
||||
|
||||
struct _GOptionEntry
|
||||
{
|
||||
const gchar *long_name;
|
||||
gchar short_name;
|
||||
gint flags;
|
||||
|
||||
GOptionArg arg;
|
||||
gpointer arg_data;
|
||||
|
||||
const gchar *description;
|
||||
const gchar *arg_description;
|
||||
};
|
||||
|
||||
#define G_OPTION_REMAINING ""
|
||||
|
||||
GOptionContext *g_option_context_new (const gchar *parameter_string);
|
||||
void g_option_context_set_summary (GOptionContext *context,
|
||||
const gchar *summary);
|
||||
G_CONST_RETURN gchar *g_option_context_get_summary (GOptionContext *context);
|
||||
void g_option_context_set_description (GOptionContext *context,
|
||||
const gchar *description);
|
||||
G_CONST_RETURN gchar *g_option_context_get_description (GOptionContext *context);
|
||||
void g_option_context_free (GOptionContext *context);
|
||||
void g_option_context_set_help_enabled (GOptionContext *context,
|
||||
gboolean help_enabled);
|
||||
gboolean g_option_context_get_help_enabled (GOptionContext *context);
|
||||
void g_option_context_set_ignore_unknown_options (GOptionContext *context,
|
||||
gboolean ignore_unknown);
|
||||
gboolean g_option_context_get_ignore_unknown_options (GOptionContext *context);
|
||||
|
||||
void g_option_context_add_main_entries (GOptionContext *context,
|
||||
const GOptionEntry *entries,
|
||||
const gchar *translation_domain);
|
||||
gboolean g_option_context_parse (GOptionContext *context,
|
||||
gint *argc,
|
||||
gchar ***argv,
|
||||
GError **error);
|
||||
void g_option_context_set_translate_func (GOptionContext *context,
|
||||
GTranslateFunc func,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy_notify);
|
||||
void g_option_context_set_translation_domain (GOptionContext *context,
|
||||
const gchar *domain);
|
||||
|
||||
void g_option_context_add_group (GOptionContext *context,
|
||||
GOptionGroup *group);
|
||||
void g_option_context_set_main_group (GOptionContext *context,
|
||||
GOptionGroup *group);
|
||||
GOptionGroup *g_option_context_get_main_group (GOptionContext *context);
|
||||
gchar *g_option_context_get_help (GOptionContext *context,
|
||||
gboolean main_help,
|
||||
GOptionGroup *group);
|
||||
|
||||
GOptionGroup *g_option_group_new (const gchar *name,
|
||||
const gchar *description,
|
||||
const gchar *help_description,
|
||||
gpointer user_data,
|
||||
GDestroyNotify destroy);
|
||||
void g_option_group_set_parse_hooks (GOptionGroup *group,
|
||||
GOptionParseFunc pre_parse_func,
|
||||
GOptionParseFunc post_parse_func);
|
||||
void g_option_group_set_error_hook (GOptionGroup *group,
|
||||
GOptionErrorFunc error_func);
|
||||
void g_option_group_free (GOptionGroup *group);
|
||||
void g_option_group_add_entries (GOptionGroup *group,
|
||||
const GOptionEntry *entries);
|
||||
void g_option_group_set_translate_func (GOptionGroup *group,
|
||||
GTranslateFunc func,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy_notify);
|
||||
void g_option_group_set_translation_domain (GOptionGroup *group,
|
||||
const gchar *domain);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_OPTION_H__ */
|
|
@ -1,49 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997, 1999 Peter Mattis, Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_PATTERN_H__
|
||||
#define __G_PATTERN_H__
|
||||
|
||||
#include <glib/gtypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
typedef struct _GPatternSpec GPatternSpec;
|
||||
|
||||
GPatternSpec* g_pattern_spec_new (const gchar *pattern);
|
||||
void g_pattern_spec_free (GPatternSpec *pspec);
|
||||
gboolean g_pattern_spec_equal (GPatternSpec *pspec1,
|
||||
GPatternSpec *pspec2);
|
||||
gboolean g_pattern_match (GPatternSpec *pspec,
|
||||
guint string_length,
|
||||
const gchar *string,
|
||||
const gchar *string_reversed);
|
||||
gboolean g_pattern_match_string (GPatternSpec *pspec,
|
||||
const gchar *string);
|
||||
gboolean g_pattern_match_simple (const gchar *pattern,
|
||||
const gchar *string);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_PATTERN_H__ */
|
|
@ -1,93 +0,0 @@
|
|||
/* gpoll.h - poll(2) support
|
||||
* Copyright (C) 2008 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if !defined (__GLIB_H_INSIDE__) && !defined (__G_MAIN_H__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_POLL_H__
|
||||
#define __G_POLL_H__
|
||||
|
||||
#include <glib/gtypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* Any definitions using GPollFD or GPollFunc are primarily
|
||||
* for Unix and not guaranteed to be the compatible on all
|
||||
* operating systems on which GLib runs. Right now, the
|
||||
* GLib does use these functions on Win32 as well, but interprets
|
||||
* them in a fairly different way than on Unix. If you use
|
||||
* these definitions, you are should be prepared to recode
|
||||
* for different operating systems.
|
||||
*
|
||||
* Note that on systems with a working poll(2), that function is used
|
||||
* in place of g_poll(). Thus g_poll() must have the same signature as
|
||||
* poll(), meaning GPollFD must have the same layout as struct pollfd.
|
||||
*
|
||||
*
|
||||
* On Win32, the fd in a GPollFD should be Win32 HANDLE (*not* a file
|
||||
* descriptor as provided by the C runtime) that can be used by
|
||||
* MsgWaitForMultipleObjects. This does *not* include file handles
|
||||
* from CreateFile, SOCKETs, nor pipe handles. (But you can use
|
||||
* WSAEventSelect to signal events when a SOCKET is readable).
|
||||
*
|
||||
* On Win32, fd can also be the special value G_WIN32_MSG_HANDLE to
|
||||
* indicate polling for messages.
|
||||
*
|
||||
* But note that G_WIN32_MSG_HANDLE GPollFDs should not be used by GDK
|
||||
* (GTK) programs, as GDK itself wants to read messages and convert them
|
||||
* to GDK events.
|
||||
*
|
||||
* So, unless you really know what you are doing, it's best not to try
|
||||
* to use the main loop polling stuff for your own needs on
|
||||
* Windows.
|
||||
*/
|
||||
typedef struct _GPollFD GPollFD;
|
||||
typedef gint (*GPollFunc) (GPollFD *ufds,
|
||||
guint nfsd,
|
||||
gint timeout_);
|
||||
|
||||
struct _GPollFD
|
||||
{
|
||||
#if defined (G_OS_WIN32) && GLIB_SIZEOF_VOID_P == 8
|
||||
gint64 fd;
|
||||
#else
|
||||
gint fd;
|
||||
#endif
|
||||
gushort events;
|
||||
gushort revents;
|
||||
};
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#if GLIB_SIZEOF_VOID_P == 8
|
||||
#define G_POLLFD_FORMAT "%#I64x"
|
||||
#else
|
||||
#define G_POLLFD_FORMAT "%#x"
|
||||
#endif
|
||||
#else
|
||||
#define G_POLLFD_FORMAT "%d"
|
||||
#endif
|
||||
|
||||
gint g_poll (GPollFD *fds,
|
||||
guint nfds,
|
||||
gint timeout);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_POLL_H__ */
|
|
@ -1,51 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_PRIMES_H__
|
||||
#define __G_PRIMES_H__
|
||||
|
||||
#include <glib/gtypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* Prime numbers.
|
||||
*/
|
||||
|
||||
/* This function returns prime numbers spaced by approximately 1.5-2.0
|
||||
* and is for use in resizing data structures which prefer
|
||||
* prime-valued sizes. The closest spaced prime function returns the
|
||||
* next largest prime, or the highest it knows about which is about
|
||||
* MAXINT/4.
|
||||
*/
|
||||
guint g_spaced_primes_closest (guint num) G_GNUC_CONST;
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_PRIMES_H__ */
|
|
@ -1,52 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997, 2002 Peter Mattis, Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __G_PRINTF_H__
|
||||
#define __G_PRINTF_H__
|
||||
|
||||
#include <glib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
gint g_printf (gchar const *format,
|
||||
...) G_GNUC_PRINTF (1, 2);
|
||||
gint g_fprintf (FILE *file,
|
||||
gchar const *format,
|
||||
...) G_GNUC_PRINTF (2, 3);
|
||||
gint g_sprintf (gchar *string,
|
||||
gchar const *format,
|
||||
...) G_GNUC_PRINTF (2, 3);
|
||||
|
||||
gint g_vprintf (gchar const *format,
|
||||
va_list args);
|
||||
gint g_vfprintf (FILE *file,
|
||||
gchar const *format,
|
||||
va_list args);
|
||||
gint g_vsprintf (gchar *string,
|
||||
gchar const *format,
|
||||
va_list args);
|
||||
gint g_vasprintf (gchar **string,
|
||||
gchar const *format,
|
||||
va_list args);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_PRINTF_H__ */
|
|
@ -1,59 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 2002. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#ifndef __G_PRINTFINT_H__
|
||||
#define __G_PRINTFINT_H__
|
||||
|
||||
#ifdef HAVE_GOOD_PRINTF
|
||||
|
||||
#define _g_printf printf
|
||||
#define _g_fprintf fprintf
|
||||
#define _g_sprintf sprintf
|
||||
#define _g_snprintf snprintf
|
||||
|
||||
#define _g_vprintf vprintf
|
||||
#define _g_vfprintf vfprintf
|
||||
#define _g_vsprintf vsprintf
|
||||
#define _g_vsnprintf vsnprintf
|
||||
|
||||
#else
|
||||
|
||||
#include "gnulib/printf.h"
|
||||
|
||||
#define _g_printf _g_gnulib_printf
|
||||
#define _g_fprintf _g_gnulib_fprintf
|
||||
#define _g_sprintf _g_gnulib_sprintf
|
||||
#define _g_snprintf _g_gnulib_snprintf
|
||||
|
||||
#define _g_vprintf _g_gnulib_vprintf
|
||||
#define _g_vfprintf _g_gnulib_vfprintf
|
||||
#define _g_vsprintf _g_gnulib_vsprintf
|
||||
#define _g_vsnprintf _g_gnulib_vsnprintf
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __G_PRINTF_H__ */
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_QSORT_H__
|
||||
#define __G_QSORT_H__
|
||||
|
||||
#include <glib/gtypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
void g_qsort_with_data (gconstpointer pbase,
|
||||
gint total_elems,
|
||||
gsize size,
|
||||
GCompareDataFunc compare_func,
|
||||
gpointer user_data);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_QSORT_H__ */
|
|
@ -1,52 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_QUARK_H__
|
||||
#define __G_QUARK_H__
|
||||
|
||||
#include <glib/gtypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef guint32 GQuark;
|
||||
|
||||
/* Quarks (string<->id association)
|
||||
*/
|
||||
GQuark g_quark_try_string (const gchar *string);
|
||||
GQuark g_quark_from_static_string (const gchar *string);
|
||||
GQuark g_quark_from_string (const gchar *string);
|
||||
G_CONST_RETURN gchar* g_quark_to_string (GQuark quark) G_GNUC_CONST;
|
||||
|
||||
G_CONST_RETURN gchar* g_intern_string (const gchar *string);
|
||||
G_CONST_RETURN gchar* g_intern_static_string (const gchar *string);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_QUARK_H__ */
|
|
@ -1,127 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_QUEUE_H__
|
||||
#define __G_QUEUE_H__
|
||||
|
||||
#include <glib/glist.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GQueue GQueue;
|
||||
|
||||
struct _GQueue
|
||||
{
|
||||
GList *head;
|
||||
GList *tail;
|
||||
guint length;
|
||||
};
|
||||
|
||||
#define G_QUEUE_INIT { NULL, NULL, 0 }
|
||||
|
||||
/* Queues
|
||||
*/
|
||||
GQueue* g_queue_new (void);
|
||||
void g_queue_free (GQueue *queue);
|
||||
void g_queue_init (GQueue *queue);
|
||||
void g_queue_clear (GQueue *queue);
|
||||
gboolean g_queue_is_empty (GQueue *queue);
|
||||
guint g_queue_get_length (GQueue *queue);
|
||||
void g_queue_reverse (GQueue *queue);
|
||||
GQueue * g_queue_copy (GQueue *queue);
|
||||
void g_queue_foreach (GQueue *queue,
|
||||
GFunc func,
|
||||
gpointer user_data);
|
||||
GList * g_queue_find (GQueue *queue,
|
||||
gconstpointer data);
|
||||
GList * g_queue_find_custom (GQueue *queue,
|
||||
gconstpointer data,
|
||||
GCompareFunc func);
|
||||
void g_queue_sort (GQueue *queue,
|
||||
GCompareDataFunc compare_func,
|
||||
gpointer user_data);
|
||||
|
||||
void g_queue_push_head (GQueue *queue,
|
||||
gpointer data);
|
||||
void g_queue_push_tail (GQueue *queue,
|
||||
gpointer data);
|
||||
void g_queue_push_nth (GQueue *queue,
|
||||
gpointer data,
|
||||
gint n);
|
||||
gpointer g_queue_pop_head (GQueue *queue);
|
||||
gpointer g_queue_pop_tail (GQueue *queue);
|
||||
gpointer g_queue_pop_nth (GQueue *queue,
|
||||
guint n);
|
||||
gpointer g_queue_peek_head (GQueue *queue);
|
||||
gpointer g_queue_peek_tail (GQueue *queue);
|
||||
gpointer g_queue_peek_nth (GQueue *queue,
|
||||
guint n);
|
||||
gint g_queue_index (GQueue *queue,
|
||||
gconstpointer data);
|
||||
void g_queue_remove (GQueue *queue,
|
||||
gconstpointer data);
|
||||
void g_queue_remove_all (GQueue *queue,
|
||||
gconstpointer data);
|
||||
void g_queue_insert_before (GQueue *queue,
|
||||
GList *sibling,
|
||||
gpointer data);
|
||||
void g_queue_insert_after (GQueue *queue,
|
||||
GList *sibling,
|
||||
gpointer data);
|
||||
void g_queue_insert_sorted (GQueue *queue,
|
||||
gpointer data,
|
||||
GCompareDataFunc func,
|
||||
gpointer user_data);
|
||||
|
||||
void g_queue_push_head_link (GQueue *queue,
|
||||
GList *link_);
|
||||
void g_queue_push_tail_link (GQueue *queue,
|
||||
GList *link_);
|
||||
void g_queue_push_nth_link (GQueue *queue,
|
||||
gint n,
|
||||
GList *link_);
|
||||
GList* g_queue_pop_head_link (GQueue *queue);
|
||||
GList* g_queue_pop_tail_link (GQueue *queue);
|
||||
GList* g_queue_pop_nth_link (GQueue *queue,
|
||||
guint n);
|
||||
GList* g_queue_peek_head_link (GQueue *queue);
|
||||
GList* g_queue_peek_tail_link (GQueue *queue);
|
||||
GList* g_queue_peek_nth_link (GQueue *queue,
|
||||
guint n);
|
||||
gint g_queue_link_index (GQueue *queue,
|
||||
GList *link_);
|
||||
void g_queue_unlink (GQueue *queue,
|
||||
GList *link_);
|
||||
void g_queue_delete_link (GQueue *queue,
|
||||
GList *link_);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_QUEUE_H__ */
|
|
@ -1,85 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_RAND_H__
|
||||
#define __G_RAND_H__
|
||||
|
||||
#include <glib/gtypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GRand GRand;
|
||||
|
||||
/* GRand - a good and fast random number generator: Mersenne Twister
|
||||
* see http://www.math.keio.ac.jp/~matumoto/emt.html for more info.
|
||||
* The range functions return a value in the intervall [begin, end).
|
||||
* int -> [0..2^32-1]
|
||||
* int_range -> [begin..end-1]
|
||||
* double -> [0..1)
|
||||
* double_range -> [begin..end)
|
||||
*/
|
||||
|
||||
GRand* g_rand_new_with_seed (guint32 seed);
|
||||
GRand* g_rand_new_with_seed_array (const guint32 *seed,
|
||||
guint seed_length);
|
||||
GRand* g_rand_new (void);
|
||||
void g_rand_free (GRand *rand_);
|
||||
GRand* g_rand_copy (GRand *rand_);
|
||||
void g_rand_set_seed (GRand *rand_,
|
||||
guint32 seed);
|
||||
void g_rand_set_seed_array (GRand *rand_,
|
||||
const guint32 *seed,
|
||||
guint seed_length);
|
||||
|
||||
#define g_rand_boolean(rand_) ((g_rand_int (rand_) & (1 << 15)) != 0)
|
||||
|
||||
guint32 g_rand_int (GRand *rand_);
|
||||
gint32 g_rand_int_range (GRand *rand_,
|
||||
gint32 begin,
|
||||
gint32 end);
|
||||
gdouble g_rand_double (GRand *rand_);
|
||||
gdouble g_rand_double_range (GRand *rand_,
|
||||
gdouble begin,
|
||||
gdouble end);
|
||||
void g_random_set_seed (guint32 seed);
|
||||
|
||||
#define g_random_boolean() ((g_random_int () & (1 << 15)) != 0)
|
||||
|
||||
guint32 g_random_int (void);
|
||||
gint32 g_random_int_range (gint32 begin,
|
||||
gint32 end);
|
||||
gdouble g_random_double (void);
|
||||
gdouble g_random_double_range (gdouble begin,
|
||||
gdouble end);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_RAND_H__ */
|
|
@ -1,243 +0,0 @@
|
|||
/* GRegex -- regular expression API wrapper around PCRE.
|
||||
*
|
||||
* Copyright (C) 1999, 2000 Scott Wimer
|
||||
* Copyright (C) 2004, Matthias Clasen <mclasen@redhat.com>
|
||||
* Copyright (C) 2005 - 2007, Marco Barisione <marco@barisione.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_REGEX_H__
|
||||
#define __G_REGEX_H__
|
||||
|
||||
#include <glib/gerror.h>
|
||||
#include <glib/gstring.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_REGEX_ERROR_COMPILE,
|
||||
G_REGEX_ERROR_OPTIMIZE,
|
||||
G_REGEX_ERROR_REPLACE,
|
||||
G_REGEX_ERROR_MATCH,
|
||||
G_REGEX_ERROR_INTERNAL,
|
||||
|
||||
/* These are the error codes from PCRE + 100 */
|
||||
G_REGEX_ERROR_STRAY_BACKSLASH = 101,
|
||||
G_REGEX_ERROR_MISSING_CONTROL_CHAR = 102,
|
||||
G_REGEX_ERROR_UNRECOGNIZED_ESCAPE = 103,
|
||||
G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER = 104,
|
||||
G_REGEX_ERROR_QUANTIFIER_TOO_BIG = 105,
|
||||
G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS = 106,
|
||||
G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS = 107,
|
||||
G_REGEX_ERROR_RANGE_OUT_OF_ORDER = 108,
|
||||
G_REGEX_ERROR_NOTHING_TO_REPEAT = 109,
|
||||
G_REGEX_ERROR_UNRECOGNIZED_CHARACTER = 112,
|
||||
G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS = 113,
|
||||
G_REGEX_ERROR_UNMATCHED_PARENTHESIS = 114,
|
||||
G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE = 115,
|
||||
G_REGEX_ERROR_UNTERMINATED_COMMENT = 118,
|
||||
G_REGEX_ERROR_EXPRESSION_TOO_LARGE = 120,
|
||||
G_REGEX_ERROR_MEMORY_ERROR = 121,
|
||||
G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND = 125,
|
||||
G_REGEX_ERROR_MALFORMED_CONDITION = 126,
|
||||
G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES = 127,
|
||||
G_REGEX_ERROR_ASSERTION_EXPECTED = 128,
|
||||
G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME = 130,
|
||||
G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED = 131,
|
||||
G_REGEX_ERROR_HEX_CODE_TOO_LARGE = 134,
|
||||
G_REGEX_ERROR_INVALID_CONDITION = 135,
|
||||
G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND = 136,
|
||||
G_REGEX_ERROR_INFINITE_LOOP = 140,
|
||||
G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR = 142,
|
||||
G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME = 143,
|
||||
G_REGEX_ERROR_MALFORMED_PROPERTY = 146,
|
||||
G_REGEX_ERROR_UNKNOWN_PROPERTY = 147,
|
||||
G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG = 148,
|
||||
G_REGEX_ERROR_TOO_MANY_SUBPATTERNS = 149,
|
||||
G_REGEX_ERROR_INVALID_OCTAL_VALUE = 151,
|
||||
G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE = 154,
|
||||
G_REGEX_ERROR_DEFINE_REPETION = 155,
|
||||
G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS = 156,
|
||||
G_REGEX_ERROR_MISSING_BACK_REFERENCE = 157
|
||||
} GRegexError;
|
||||
|
||||
#define G_REGEX_ERROR g_regex_error_quark ()
|
||||
|
||||
GQuark g_regex_error_quark (void);
|
||||
|
||||
/* Remember to update G_REGEX_COMPILE_MASK in gregex.c after
|
||||
* adding a new flag. */
|
||||
typedef enum
|
||||
{
|
||||
G_REGEX_CASELESS = 1 << 0,
|
||||
G_REGEX_MULTILINE = 1 << 1,
|
||||
G_REGEX_DOTALL = 1 << 2,
|
||||
G_REGEX_EXTENDED = 1 << 3,
|
||||
G_REGEX_ANCHORED = 1 << 4,
|
||||
G_REGEX_DOLLAR_ENDONLY = 1 << 5,
|
||||
G_REGEX_UNGREEDY = 1 << 9,
|
||||
G_REGEX_RAW = 1 << 11,
|
||||
G_REGEX_NO_AUTO_CAPTURE = 1 << 12,
|
||||
G_REGEX_OPTIMIZE = 1 << 13,
|
||||
G_REGEX_DUPNAMES = 1 << 19,
|
||||
G_REGEX_NEWLINE_CR = 1 << 20,
|
||||
G_REGEX_NEWLINE_LF = 1 << 21,
|
||||
G_REGEX_NEWLINE_CRLF = G_REGEX_NEWLINE_CR | G_REGEX_NEWLINE_LF
|
||||
} GRegexCompileFlags;
|
||||
|
||||
/* Remember to update G_REGEX_MATCH_MASK in gregex.c after
|
||||
* adding a new flag. */
|
||||
typedef enum
|
||||
{
|
||||
G_REGEX_MATCH_ANCHORED = 1 << 4,
|
||||
G_REGEX_MATCH_NOTBOL = 1 << 7,
|
||||
G_REGEX_MATCH_NOTEOL = 1 << 8,
|
||||
G_REGEX_MATCH_NOTEMPTY = 1 << 10,
|
||||
G_REGEX_MATCH_PARTIAL = 1 << 15,
|
||||
G_REGEX_MATCH_NEWLINE_CR = 1 << 20,
|
||||
G_REGEX_MATCH_NEWLINE_LF = 1 << 21,
|
||||
G_REGEX_MATCH_NEWLINE_CRLF = G_REGEX_MATCH_NEWLINE_CR | G_REGEX_MATCH_NEWLINE_LF,
|
||||
G_REGEX_MATCH_NEWLINE_ANY = 1 << 22
|
||||
} GRegexMatchFlags;
|
||||
|
||||
typedef struct _GRegex GRegex;
|
||||
typedef struct _GMatchInfo GMatchInfo;
|
||||
|
||||
typedef gboolean (*GRegexEvalCallback) (const GMatchInfo *match_info,
|
||||
GString *result,
|
||||
gpointer user_data);
|
||||
|
||||
|
||||
GRegex *g_regex_new (const gchar *pattern,
|
||||
GRegexCompileFlags compile_options,
|
||||
GRegexMatchFlags match_options,
|
||||
GError **error);
|
||||
GRegex *g_regex_ref (GRegex *regex);
|
||||
void g_regex_unref (GRegex *regex);
|
||||
const gchar *g_regex_get_pattern (const GRegex *regex);
|
||||
gint g_regex_get_max_backref (const GRegex *regex);
|
||||
gint g_regex_get_capture_count (const GRegex *regex);
|
||||
gint g_regex_get_string_number (const GRegex *regex,
|
||||
const gchar *name);
|
||||
gchar *g_regex_escape_string (const gchar *string,
|
||||
gint length);
|
||||
|
||||
/* Matching. */
|
||||
gboolean g_regex_match_simple (const gchar *pattern,
|
||||
const gchar *string,
|
||||
GRegexCompileFlags compile_options,
|
||||
GRegexMatchFlags match_options);
|
||||
gboolean g_regex_match (const GRegex *regex,
|
||||
const gchar *string,
|
||||
GRegexMatchFlags match_options,
|
||||
GMatchInfo **match_info);
|
||||
gboolean g_regex_match_full (const GRegex *regex,
|
||||
const gchar *string,
|
||||
gssize string_len,
|
||||
gint start_position,
|
||||
GRegexMatchFlags match_options,
|
||||
GMatchInfo **match_info,
|
||||
GError **error);
|
||||
gboolean g_regex_match_all (const GRegex *regex,
|
||||
const gchar *string,
|
||||
GRegexMatchFlags match_options,
|
||||
GMatchInfo **match_info);
|
||||
gboolean g_regex_match_all_full (const GRegex *regex,
|
||||
const gchar *string,
|
||||
gssize string_len,
|
||||
gint start_position,
|
||||
GRegexMatchFlags match_options,
|
||||
GMatchInfo **match_info,
|
||||
GError **error);
|
||||
|
||||
/* String splitting. */
|
||||
gchar **g_regex_split_simple (const gchar *pattern,
|
||||
const gchar *string,
|
||||
GRegexCompileFlags compile_options,
|
||||
GRegexMatchFlags match_options);
|
||||
gchar **g_regex_split (const GRegex *regex,
|
||||
const gchar *string,
|
||||
GRegexMatchFlags match_options);
|
||||
gchar **g_regex_split_full (const GRegex *regex,
|
||||
const gchar *string,
|
||||
gssize string_len,
|
||||
gint start_position,
|
||||
GRegexMatchFlags match_options,
|
||||
gint max_tokens,
|
||||
GError **error);
|
||||
|
||||
/* String replacement. */
|
||||
gchar *g_regex_replace (const GRegex *regex,
|
||||
const gchar *string,
|
||||
gssize string_len,
|
||||
gint start_position,
|
||||
const gchar *replacement,
|
||||
GRegexMatchFlags match_options,
|
||||
GError **error);
|
||||
gchar *g_regex_replace_literal (const GRegex *regex,
|
||||
const gchar *string,
|
||||
gssize string_len,
|
||||
gint start_position,
|
||||
const gchar *replacement,
|
||||
GRegexMatchFlags match_options,
|
||||
GError **error);
|
||||
gchar *g_regex_replace_eval (const GRegex *regex,
|
||||
const gchar *string,
|
||||
gssize string_len,
|
||||
gint start_position,
|
||||
GRegexMatchFlags match_options,
|
||||
GRegexEvalCallback eval,
|
||||
gpointer user_data,
|
||||
GError **error);
|
||||
gboolean g_regex_check_replacement (const gchar *replacement,
|
||||
gboolean *has_references,
|
||||
GError **error);
|
||||
|
||||
/* Match info */
|
||||
GRegex *g_match_info_get_regex (const GMatchInfo *match_info);
|
||||
const gchar *g_match_info_get_string (const GMatchInfo *match_info);
|
||||
|
||||
void g_match_info_free (GMatchInfo *match_info);
|
||||
gboolean g_match_info_next (GMatchInfo *match_info,
|
||||
GError **error);
|
||||
gboolean g_match_info_matches (const GMatchInfo *match_info);
|
||||
gint g_match_info_get_match_count (const GMatchInfo *match_info);
|
||||
gboolean g_match_info_is_partial_match (const GMatchInfo *match_info);
|
||||
gchar *g_match_info_expand_references(const GMatchInfo *match_info,
|
||||
const gchar *string_to_expand,
|
||||
GError **error);
|
||||
gchar *g_match_info_fetch (const GMatchInfo *match_info,
|
||||
gint match_num);
|
||||
gboolean g_match_info_fetch_pos (const GMatchInfo *match_info,
|
||||
gint match_num,
|
||||
gint *start_pos,
|
||||
gint *end_pos);
|
||||
gchar *g_match_info_fetch_named (const GMatchInfo *match_info,
|
||||
const gchar *name);
|
||||
gboolean g_match_info_fetch_named_pos (const GMatchInfo *match_info,
|
||||
const gchar *name,
|
||||
gint *start_pos,
|
||||
gint *end_pos);
|
||||
gchar **g_match_info_fetch_all (const GMatchInfo *match_info);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_REGEX_H__ */
|
|
@ -1,97 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_REL_H__
|
||||
#define __G_REL_H__
|
||||
|
||||
#include <glib/gtypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GRelation GRelation;
|
||||
typedef struct _GTuples GTuples;
|
||||
|
||||
struct _GTuples
|
||||
{
|
||||
guint len;
|
||||
};
|
||||
|
||||
/* GRelation
|
||||
*
|
||||
* Indexed Relations. Imagine a really simple table in a
|
||||
* database. Relations are not ordered. This data type is meant for
|
||||
* maintaining a N-way mapping.
|
||||
*
|
||||
* g_relation_new() creates a relation with FIELDS fields
|
||||
*
|
||||
* g_relation_destroy() frees all resources
|
||||
* g_tuples_destroy() frees the result of g_relation_select()
|
||||
*
|
||||
* g_relation_index() indexes relation FIELD with the provided
|
||||
* equality and hash functions. this must be done before any
|
||||
* calls to insert are made.
|
||||
*
|
||||
* g_relation_insert() inserts a new tuple. you are expected to
|
||||
* provide the right number of fields.
|
||||
*
|
||||
* g_relation_delete() deletes all relations with KEY in FIELD
|
||||
* g_relation_select() returns ...
|
||||
* g_relation_count() counts ...
|
||||
*/
|
||||
|
||||
GRelation* g_relation_new (gint fields);
|
||||
void g_relation_destroy (GRelation *relation);
|
||||
void g_relation_index (GRelation *relation,
|
||||
gint field,
|
||||
GHashFunc hash_func,
|
||||
GEqualFunc key_equal_func);
|
||||
void g_relation_insert (GRelation *relation,
|
||||
...);
|
||||
gint g_relation_delete (GRelation *relation,
|
||||
gconstpointer key,
|
||||
gint field);
|
||||
GTuples* g_relation_select (GRelation *relation,
|
||||
gconstpointer key,
|
||||
gint field);
|
||||
gint g_relation_count (GRelation *relation,
|
||||
gconstpointer key,
|
||||
gint field);
|
||||
gboolean g_relation_exists (GRelation *relation,
|
||||
...);
|
||||
void g_relation_print (GRelation *relation);
|
||||
|
||||
void g_tuples_destroy (GTuples *tuples);
|
||||
gpointer g_tuples_index (GTuples *tuples,
|
||||
gint index_,
|
||||
gint field);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_REL_H__ */
|
|
@ -1,278 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_SCANNER_H__
|
||||
#define __G_SCANNER_H__
|
||||
|
||||
#include <glib/gdataset.h>
|
||||
#include <glib/ghash.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GScanner GScanner;
|
||||
typedef struct _GScannerConfig GScannerConfig;
|
||||
typedef union _GTokenValue GTokenValue;
|
||||
|
||||
typedef void (*GScannerMsgFunc) (GScanner *scanner,
|
||||
gchar *message,
|
||||
gboolean error);
|
||||
|
||||
/* GScanner: Flexible lexical scanner for general purpose.
|
||||
*/
|
||||
|
||||
/* Character sets */
|
||||
#define G_CSET_A_2_Z "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
#define G_CSET_a_2_z "abcdefghijklmnopqrstuvwxyz"
|
||||
#define G_CSET_DIGITS "0123456789"
|
||||
#define G_CSET_LATINC "\300\301\302\303\304\305\306"\
|
||||
"\307\310\311\312\313\314\315\316\317\320"\
|
||||
"\321\322\323\324\325\326"\
|
||||
"\330\331\332\333\334\335\336"
|
||||
#define G_CSET_LATINS "\337\340\341\342\343\344\345\346"\
|
||||
"\347\350\351\352\353\354\355\356\357\360"\
|
||||
"\361\362\363\364\365\366"\
|
||||
"\370\371\372\373\374\375\376\377"
|
||||
|
||||
/* Error types */
|
||||
typedef enum
|
||||
{
|
||||
G_ERR_UNKNOWN,
|
||||
G_ERR_UNEXP_EOF,
|
||||
G_ERR_UNEXP_EOF_IN_STRING,
|
||||
G_ERR_UNEXP_EOF_IN_COMMENT,
|
||||
G_ERR_NON_DIGIT_IN_CONST,
|
||||
G_ERR_DIGIT_RADIX,
|
||||
G_ERR_FLOAT_RADIX,
|
||||
G_ERR_FLOAT_MALFORMED
|
||||
} GErrorType;
|
||||
|
||||
/* Token types */
|
||||
typedef enum
|
||||
{
|
||||
G_TOKEN_EOF = 0,
|
||||
|
||||
G_TOKEN_LEFT_PAREN = '(',
|
||||
G_TOKEN_RIGHT_PAREN = ')',
|
||||
G_TOKEN_LEFT_CURLY = '{',
|
||||
G_TOKEN_RIGHT_CURLY = '}',
|
||||
G_TOKEN_LEFT_BRACE = '[',
|
||||
G_TOKEN_RIGHT_BRACE = ']',
|
||||
G_TOKEN_EQUAL_SIGN = '=',
|
||||
G_TOKEN_COMMA = ',',
|
||||
|
||||
G_TOKEN_NONE = 256,
|
||||
|
||||
G_TOKEN_ERROR,
|
||||
|
||||
G_TOKEN_CHAR,
|
||||
G_TOKEN_BINARY,
|
||||
G_TOKEN_OCTAL,
|
||||
G_TOKEN_INT,
|
||||
G_TOKEN_HEX,
|
||||
G_TOKEN_FLOAT,
|
||||
G_TOKEN_STRING,
|
||||
|
||||
G_TOKEN_SYMBOL,
|
||||
G_TOKEN_IDENTIFIER,
|
||||
G_TOKEN_IDENTIFIER_NULL,
|
||||
|
||||
G_TOKEN_COMMENT_SINGLE,
|
||||
G_TOKEN_COMMENT_MULTI,
|
||||
G_TOKEN_LAST
|
||||
} GTokenType;
|
||||
|
||||
union _GTokenValue
|
||||
{
|
||||
gpointer v_symbol;
|
||||
gchar *v_identifier;
|
||||
gulong v_binary;
|
||||
gulong v_octal;
|
||||
gulong v_int;
|
||||
guint64 v_int64;
|
||||
gdouble v_float;
|
||||
gulong v_hex;
|
||||
gchar *v_string;
|
||||
gchar *v_comment;
|
||||
guchar v_char;
|
||||
guint v_error;
|
||||
};
|
||||
|
||||
struct _GScannerConfig
|
||||
{
|
||||
/* Character sets
|
||||
*/
|
||||
gchar *cset_skip_characters; /* default: " \t\n" */
|
||||
gchar *cset_identifier_first;
|
||||
gchar *cset_identifier_nth;
|
||||
gchar *cpair_comment_single; /* default: "#\n" */
|
||||
|
||||
/* Should symbol lookup work case sensitive?
|
||||
*/
|
||||
guint case_sensitive : 1;
|
||||
|
||||
/* Boolean values to be adjusted "on the fly"
|
||||
* to configure scanning behaviour.
|
||||
*/
|
||||
guint skip_comment_multi : 1; /* C like comment */
|
||||
guint skip_comment_single : 1; /* single line comment */
|
||||
guint scan_comment_multi : 1; /* scan multi line comments? */
|
||||
guint scan_identifier : 1;
|
||||
guint scan_identifier_1char : 1;
|
||||
guint scan_identifier_NULL : 1;
|
||||
guint scan_symbols : 1;
|
||||
guint scan_binary : 1;
|
||||
guint scan_octal : 1;
|
||||
guint scan_float : 1;
|
||||
guint scan_hex : 1; /* `0x0ff0' */
|
||||
guint scan_hex_dollar : 1; /* `$0ff0' */
|
||||
guint scan_string_sq : 1; /* string: 'anything' */
|
||||
guint scan_string_dq : 1; /* string: "\\-escapes!\n" */
|
||||
guint numbers_2_int : 1; /* bin, octal, hex => int */
|
||||
guint int_2_float : 1; /* int => G_TOKEN_FLOAT? */
|
||||
guint identifier_2_string : 1;
|
||||
guint char_2_token : 1; /* return G_TOKEN_CHAR? */
|
||||
guint symbol_2_token : 1;
|
||||
guint scope_0_fallback : 1; /* try scope 0 on lookups? */
|
||||
guint store_int64 : 1; /* use value.v_int64 rather than v_int */
|
||||
guint padding_dummy;
|
||||
};
|
||||
|
||||
struct _GScanner
|
||||
{
|
||||
/* unused fields */
|
||||
gpointer user_data;
|
||||
guint max_parse_errors;
|
||||
|
||||
/* g_scanner_error() increments this field */
|
||||
guint parse_errors;
|
||||
|
||||
/* name of input stream, featured by the default message handler */
|
||||
const gchar *input_name;
|
||||
|
||||
/* quarked data */
|
||||
GData *qdata;
|
||||
|
||||
/* link into the scanner configuration */
|
||||
GScannerConfig *config;
|
||||
|
||||
/* fields filled in after g_scanner_get_next_token() */
|
||||
GTokenType token;
|
||||
GTokenValue value;
|
||||
guint line;
|
||||
guint position;
|
||||
|
||||
/* fields filled in after g_scanner_peek_next_token() */
|
||||
GTokenType next_token;
|
||||
GTokenValue next_value;
|
||||
guint next_line;
|
||||
guint next_position;
|
||||
|
||||
/* to be considered private */
|
||||
GHashTable *symbol_table;
|
||||
gint input_fd;
|
||||
const gchar *text;
|
||||
const gchar *text_end;
|
||||
gchar *buffer;
|
||||
guint scope_id;
|
||||
|
||||
/* handler function for _warn and _error */
|
||||
GScannerMsgFunc msg_handler;
|
||||
};
|
||||
|
||||
GScanner* g_scanner_new (const GScannerConfig *config_templ);
|
||||
void g_scanner_destroy (GScanner *scanner);
|
||||
void g_scanner_input_file (GScanner *scanner,
|
||||
gint input_fd);
|
||||
void g_scanner_sync_file_offset (GScanner *scanner);
|
||||
void g_scanner_input_text (GScanner *scanner,
|
||||
const gchar *text,
|
||||
guint text_len);
|
||||
GTokenType g_scanner_get_next_token (GScanner *scanner);
|
||||
GTokenType g_scanner_peek_next_token (GScanner *scanner);
|
||||
GTokenType g_scanner_cur_token (GScanner *scanner);
|
||||
GTokenValue g_scanner_cur_value (GScanner *scanner);
|
||||
guint g_scanner_cur_line (GScanner *scanner);
|
||||
guint g_scanner_cur_position (GScanner *scanner);
|
||||
gboolean g_scanner_eof (GScanner *scanner);
|
||||
guint g_scanner_set_scope (GScanner *scanner,
|
||||
guint scope_id);
|
||||
void g_scanner_scope_add_symbol (GScanner *scanner,
|
||||
guint scope_id,
|
||||
const gchar *symbol,
|
||||
gpointer value);
|
||||
void g_scanner_scope_remove_symbol (GScanner *scanner,
|
||||
guint scope_id,
|
||||
const gchar *symbol);
|
||||
gpointer g_scanner_scope_lookup_symbol (GScanner *scanner,
|
||||
guint scope_id,
|
||||
const gchar *symbol);
|
||||
void g_scanner_scope_foreach_symbol (GScanner *scanner,
|
||||
guint scope_id,
|
||||
GHFunc func,
|
||||
gpointer user_data);
|
||||
gpointer g_scanner_lookup_symbol (GScanner *scanner,
|
||||
const gchar *symbol);
|
||||
void g_scanner_unexp_token (GScanner *scanner,
|
||||
GTokenType expected_token,
|
||||
const gchar *identifier_spec,
|
||||
const gchar *symbol_spec,
|
||||
const gchar *symbol_name,
|
||||
const gchar *message,
|
||||
gint is_error);
|
||||
void g_scanner_error (GScanner *scanner,
|
||||
const gchar *format,
|
||||
...) G_GNUC_PRINTF (2,3);
|
||||
void g_scanner_warn (GScanner *scanner,
|
||||
const gchar *format,
|
||||
...) G_GNUC_PRINTF (2,3);
|
||||
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
|
||||
/* keep downward source compatibility */
|
||||
#define g_scanner_add_symbol( scanner, symbol, value ) G_STMT_START { \
|
||||
g_scanner_scope_add_symbol ((scanner), 0, (symbol), (value)); \
|
||||
} G_STMT_END
|
||||
#define g_scanner_remove_symbol( scanner, symbol ) G_STMT_START { \
|
||||
g_scanner_scope_remove_symbol ((scanner), 0, (symbol)); \
|
||||
} G_STMT_END
|
||||
#define g_scanner_foreach_symbol( scanner, func, data ) G_STMT_START { \
|
||||
g_scanner_scope_foreach_symbol ((scanner), 0, (func), (data)); \
|
||||
} G_STMT_END
|
||||
|
||||
/* The following two functions are deprecated and will be removed in
|
||||
* the next major release. They do no good. */
|
||||
#define g_scanner_freeze_symbol_table(scanner) ((void)0)
|
||||
#define g_scanner_thaw_symbol_table(scanner) ((void)0)
|
||||
|
||||
#endif /* G_DISABLE_DEPRECATED */
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_SCANNER_H__ */
|
File diff suppressed because it is too large
Load Diff
|
@ -1,128 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
|
||||
* Soeren Sandmann (sandmann@daimi.au.dk)
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_SEQUENCE_H__
|
||||
#define __G_SEQUENCE_H__
|
||||
|
||||
#include <glib/gtypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GSequence GSequence;
|
||||
typedef struct _GSequenceNode GSequenceIter;
|
||||
|
||||
typedef gint (* GSequenceIterCompareFunc) (GSequenceIter *a,
|
||||
GSequenceIter *b,
|
||||
gpointer data);
|
||||
|
||||
|
||||
/* GSequence */
|
||||
GSequence * g_sequence_new (GDestroyNotify data_destroy);
|
||||
void g_sequence_free (GSequence *seq);
|
||||
gint g_sequence_get_length (GSequence *seq);
|
||||
void g_sequence_foreach (GSequence *seq,
|
||||
GFunc func,
|
||||
gpointer user_data);
|
||||
void g_sequence_foreach_range (GSequenceIter *begin,
|
||||
GSequenceIter *end,
|
||||
GFunc func,
|
||||
gpointer user_data);
|
||||
void g_sequence_sort (GSequence *seq,
|
||||
GCompareDataFunc cmp_func,
|
||||
gpointer cmp_data);
|
||||
void g_sequence_sort_iter (GSequence *seq,
|
||||
GSequenceIterCompareFunc cmp_func,
|
||||
gpointer cmp_data);
|
||||
|
||||
|
||||
/* Getting iters */
|
||||
GSequenceIter *g_sequence_get_begin_iter (GSequence *seq);
|
||||
GSequenceIter *g_sequence_get_end_iter (GSequence *seq);
|
||||
GSequenceIter *g_sequence_get_iter_at_pos (GSequence *seq,
|
||||
gint pos);
|
||||
GSequenceIter *g_sequence_append (GSequence *seq,
|
||||
gpointer data);
|
||||
GSequenceIter *g_sequence_prepend (GSequence *seq,
|
||||
gpointer data);
|
||||
GSequenceIter *g_sequence_insert_before (GSequenceIter *iter,
|
||||
gpointer data);
|
||||
void g_sequence_move (GSequenceIter *src,
|
||||
GSequenceIter *dest);
|
||||
void g_sequence_swap (GSequenceIter *a,
|
||||
GSequenceIter *b);
|
||||
GSequenceIter *g_sequence_insert_sorted (GSequence *seq,
|
||||
gpointer data,
|
||||
GCompareDataFunc cmp_func,
|
||||
gpointer cmp_data);
|
||||
GSequenceIter *g_sequence_insert_sorted_iter (GSequence *seq,
|
||||
gpointer data,
|
||||
GSequenceIterCompareFunc iter_cmp,
|
||||
gpointer cmp_data);
|
||||
void g_sequence_sort_changed (GSequenceIter *iter,
|
||||
GCompareDataFunc cmp_func,
|
||||
gpointer cmp_data);
|
||||
void g_sequence_sort_changed_iter (GSequenceIter *iter,
|
||||
GSequenceIterCompareFunc iter_cmp,
|
||||
gpointer cmp_data);
|
||||
void g_sequence_remove (GSequenceIter *iter);
|
||||
void g_sequence_remove_range (GSequenceIter *begin,
|
||||
GSequenceIter *end);
|
||||
void g_sequence_move_range (GSequenceIter *dest,
|
||||
GSequenceIter *begin,
|
||||
GSequenceIter *end);
|
||||
GSequenceIter *g_sequence_search (GSequence *seq,
|
||||
gpointer data,
|
||||
GCompareDataFunc cmp_func,
|
||||
gpointer cmp_data);
|
||||
GSequenceIter *g_sequence_search_iter (GSequence *seq,
|
||||
gpointer data,
|
||||
GSequenceIterCompareFunc iter_cmp,
|
||||
gpointer cmp_data);
|
||||
|
||||
|
||||
/* Dereferencing */
|
||||
gpointer g_sequence_get (GSequenceIter *iter);
|
||||
void g_sequence_set (GSequenceIter *iter,
|
||||
gpointer data);
|
||||
|
||||
/* Operations on GSequenceIter * */
|
||||
gboolean g_sequence_iter_is_begin (GSequenceIter *iter);
|
||||
gboolean g_sequence_iter_is_end (GSequenceIter *iter);
|
||||
GSequenceIter *g_sequence_iter_next (GSequenceIter *iter);
|
||||
GSequenceIter *g_sequence_iter_prev (GSequenceIter *iter);
|
||||
gint g_sequence_iter_get_position (GSequenceIter *iter);
|
||||
GSequenceIter *g_sequence_iter_move (GSequenceIter *iter,
|
||||
gint delta);
|
||||
GSequence * g_sequence_iter_get_sequence (GSequenceIter *iter);
|
||||
|
||||
|
||||
/* Search */
|
||||
gint g_sequence_iter_compare (GSequenceIter *a,
|
||||
GSequenceIter *b);
|
||||
GSequenceIter *g_sequence_range_get_midpoint (GSequenceIter *begin,
|
||||
GSequenceIter *end);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_SEQUENCE_H__ */
|
|
@ -1,55 +0,0 @@
|
|||
/* gshell.h - Shell-related utilities
|
||||
*
|
||||
* Copyright 2000 Red Hat, Inc.
|
||||
*
|
||||
* GLib is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* GLib 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with GLib; see the file COPYING.LIB. If not, write
|
||||
* to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_SHELL_H__
|
||||
#define __G_SHELL_H__
|
||||
|
||||
#include <glib/gerror.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_SHELL_ERROR g_shell_error_quark ()
|
||||
|
||||
typedef enum
|
||||
{
|
||||
/* mismatched or otherwise mangled quoting */
|
||||
G_SHELL_ERROR_BAD_QUOTING,
|
||||
/* string to be parsed was empty */
|
||||
G_SHELL_ERROR_EMPTY_STRING,
|
||||
G_SHELL_ERROR_FAILED
|
||||
} GShellError;
|
||||
|
||||
GQuark g_shell_error_quark (void);
|
||||
|
||||
gchar* g_shell_quote (const gchar *unquoted_string);
|
||||
gchar* g_shell_unquote (const gchar *quoted_string,
|
||||
GError **error);
|
||||
gboolean g_shell_parse_argv (const gchar *command_line,
|
||||
gint *argcp,
|
||||
gchar ***argvp,
|
||||
GError **error);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_SHELL_H__ */
|
|
@ -1,90 +0,0 @@
|
|||
/* GLIB sliced memory - fast threaded memory chunk allocator
|
||||
* Copyright (C) 2005 Tim Janik
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_SLICE_H__
|
||||
#define __G_SLICE_H__
|
||||
|
||||
#ifndef __G_MEM_H__
|
||||
#error Include <glib.h> instead of <gslice.h>
|
||||
#endif
|
||||
|
||||
#include <glib/gtypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* slices - fast allocation/release of small memory blocks
|
||||
*/
|
||||
gpointer g_slice_alloc (gsize block_size) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1);
|
||||
gpointer g_slice_alloc0 (gsize block_size) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1);
|
||||
gpointer g_slice_copy (gsize block_size,
|
||||
gconstpointer mem_block) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1);
|
||||
void g_slice_free1 (gsize block_size,
|
||||
gpointer mem_block);
|
||||
void g_slice_free_chain_with_offset (gsize block_size,
|
||||
gpointer mem_chain,
|
||||
gsize next_offset);
|
||||
#define g_slice_new(type) ((type*) g_slice_alloc (sizeof (type)))
|
||||
#define g_slice_new0(type) ((type*) g_slice_alloc0 (sizeof (type)))
|
||||
/* MemoryBlockType *
|
||||
* g_slice_dup (MemoryBlockType,
|
||||
* MemoryBlockType *mem_block);
|
||||
* g_slice_free (MemoryBlockType,
|
||||
* MemoryBlockType *mem_block);
|
||||
* g_slice_free_chain (MemoryBlockType,
|
||||
* MemoryBlockType *first_chain_block,
|
||||
* memory_block_next_field);
|
||||
* pseudo prototypes for the macro
|
||||
* definitions following below.
|
||||
*/
|
||||
|
||||
/* we go through extra hoops to ensure type safety */
|
||||
#define g_slice_dup(type, mem) \
|
||||
(1 ? (type*) g_slice_copy (sizeof (type), (mem)) \
|
||||
: ((void) ((type*) 0 == (mem)), (type*) 0))
|
||||
#define g_slice_free(type, mem) do { \
|
||||
if (1) g_slice_free1 (sizeof (type), (mem)); \
|
||||
else (void) ((type*) 0 == (mem)); \
|
||||
} while (0)
|
||||
#define g_slice_free_chain(type, mem_chain, next) do { \
|
||||
if (1) g_slice_free_chain_with_offset (sizeof (type), \
|
||||
(mem_chain), G_STRUCT_OFFSET (type, next)); \
|
||||
else (void) ((type*) 0 == (mem_chain)); \
|
||||
} while (0)
|
||||
|
||||
|
||||
/* --- internal debugging API --- */
|
||||
typedef enum {
|
||||
G_SLICE_CONFIG_ALWAYS_MALLOC = 1,
|
||||
G_SLICE_CONFIG_BYPASS_MAGAZINES,
|
||||
G_SLICE_CONFIG_WORKING_SET_MSECS,
|
||||
G_SLICE_CONFIG_COLOR_INCREMENT,
|
||||
G_SLICE_CONFIG_CHUNK_SIZES,
|
||||
G_SLICE_CONFIG_CONTENTION_COUNTER
|
||||
} GSliceConfig;
|
||||
void g_slice_set_config (GSliceConfig ckey, gint64 value);
|
||||
gint64 g_slice_get_config (GSliceConfig ckey);
|
||||
gint64* g_slice_get_config_state (GSliceConfig ckey, gint64 address, guint *n_values);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_SLICE_H__ */
|
|
@ -1,114 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_SLIST_H__
|
||||
#define __G_SLIST_H__
|
||||
|
||||
#include <glib/gmem.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GSList GSList;
|
||||
|
||||
struct _GSList
|
||||
{
|
||||
gpointer data;
|
||||
GSList *next;
|
||||
};
|
||||
|
||||
/* Singly linked lists
|
||||
*/
|
||||
GSList* g_slist_alloc (void) G_GNUC_WARN_UNUSED_RESULT;
|
||||
void g_slist_free (GSList *list);
|
||||
void g_slist_free_1 (GSList *list);
|
||||
#define g_slist_free1 g_slist_free_1
|
||||
GSList* g_slist_append (GSList *list,
|
||||
gpointer data) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GSList* g_slist_prepend (GSList *list,
|
||||
gpointer data) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GSList* g_slist_insert (GSList *list,
|
||||
gpointer data,
|
||||
gint position) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GSList* g_slist_insert_sorted (GSList *list,
|
||||
gpointer data,
|
||||
GCompareFunc func) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GSList* g_slist_insert_sorted_with_data (GSList *list,
|
||||
gpointer data,
|
||||
GCompareDataFunc func,
|
||||
gpointer user_data) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GSList* g_slist_insert_before (GSList *slist,
|
||||
GSList *sibling,
|
||||
gpointer data) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GSList* g_slist_concat (GSList *list1,
|
||||
GSList *list2) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GSList* g_slist_remove (GSList *list,
|
||||
gconstpointer data) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GSList* g_slist_remove_all (GSList *list,
|
||||
gconstpointer data) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GSList* g_slist_remove_link (GSList *list,
|
||||
GSList *link_) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GSList* g_slist_delete_link (GSList *list,
|
||||
GSList *link_) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GSList* g_slist_reverse (GSList *list) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GSList* g_slist_copy (GSList *list) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GSList* g_slist_nth (GSList *list,
|
||||
guint n);
|
||||
GSList* g_slist_find (GSList *list,
|
||||
gconstpointer data);
|
||||
GSList* g_slist_find_custom (GSList *list,
|
||||
gconstpointer data,
|
||||
GCompareFunc func);
|
||||
gint g_slist_position (GSList *list,
|
||||
GSList *llink);
|
||||
gint g_slist_index (GSList *list,
|
||||
gconstpointer data);
|
||||
GSList* g_slist_last (GSList *list);
|
||||
guint g_slist_length (GSList *list);
|
||||
void g_slist_foreach (GSList *list,
|
||||
GFunc func,
|
||||
gpointer user_data);
|
||||
GSList* g_slist_sort (GSList *list,
|
||||
GCompareFunc compare_func) G_GNUC_WARN_UNUSED_RESULT;
|
||||
GSList* g_slist_sort_with_data (GSList *list,
|
||||
GCompareDataFunc compare_func,
|
||||
gpointer user_data) G_GNUC_WARN_UNUSED_RESULT;
|
||||
gpointer g_slist_nth_data (GSList *list,
|
||||
guint n);
|
||||
|
||||
#define g_slist_next(slist) ((slist) ? (((GSList *)(slist))->next) : NULL)
|
||||
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
void g_slist_push_allocator (gpointer dummy);
|
||||
void g_slist_pop_allocator (void);
|
||||
#endif
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_SLIST_H__ */
|
|
@ -1,139 +0,0 @@
|
|||
/* gspawn.h - Process launching
|
||||
*
|
||||
* Copyright 2000 Red Hat, Inc.
|
||||
*
|
||||
* GLib is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* GLib 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with GLib; see the file COPYING.LIB. If not, write
|
||||
* to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_SPAWN_H__
|
||||
#define __G_SPAWN_H__
|
||||
|
||||
#include <glib/gerror.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* I'm not sure I remember our proposed naming convention here. */
|
||||
#define G_SPAWN_ERROR g_spawn_error_quark ()
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_SPAWN_ERROR_FORK, /* fork failed due to lack of memory */
|
||||
G_SPAWN_ERROR_READ, /* read or select on pipes failed */
|
||||
G_SPAWN_ERROR_CHDIR, /* changing to working dir failed */
|
||||
G_SPAWN_ERROR_ACCES, /* execv() returned EACCES */
|
||||
G_SPAWN_ERROR_PERM, /* execv() returned EPERM */
|
||||
G_SPAWN_ERROR_2BIG, /* execv() returned E2BIG */
|
||||
G_SPAWN_ERROR_NOEXEC, /* execv() returned ENOEXEC */
|
||||
G_SPAWN_ERROR_NAMETOOLONG, /* "" "" ENAMETOOLONG */
|
||||
G_SPAWN_ERROR_NOENT, /* "" "" ENOENT */
|
||||
G_SPAWN_ERROR_NOMEM, /* "" "" ENOMEM */
|
||||
G_SPAWN_ERROR_NOTDIR, /* "" "" ENOTDIR */
|
||||
G_SPAWN_ERROR_LOOP, /* "" "" ELOOP */
|
||||
G_SPAWN_ERROR_TXTBUSY, /* "" "" ETXTBUSY */
|
||||
G_SPAWN_ERROR_IO, /* "" "" EIO */
|
||||
G_SPAWN_ERROR_NFILE, /* "" "" ENFILE */
|
||||
G_SPAWN_ERROR_MFILE, /* "" "" EMFLE */
|
||||
G_SPAWN_ERROR_INVAL, /* "" "" EINVAL */
|
||||
G_SPAWN_ERROR_ISDIR, /* "" "" EISDIR */
|
||||
G_SPAWN_ERROR_LIBBAD, /* "" "" ELIBBAD */
|
||||
G_SPAWN_ERROR_FAILED /* other fatal failure, error->message
|
||||
* should explain
|
||||
*/
|
||||
} GSpawnError;
|
||||
|
||||
typedef void (* GSpawnChildSetupFunc) (gpointer user_data);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_SPAWN_LEAVE_DESCRIPTORS_OPEN = 1 << 0,
|
||||
G_SPAWN_DO_NOT_REAP_CHILD = 1 << 1,
|
||||
/* look for argv[0] in the path i.e. use execvp() */
|
||||
G_SPAWN_SEARCH_PATH = 1 << 2,
|
||||
/* Dump output to /dev/null */
|
||||
G_SPAWN_STDOUT_TO_DEV_NULL = 1 << 3,
|
||||
G_SPAWN_STDERR_TO_DEV_NULL = 1 << 4,
|
||||
G_SPAWN_CHILD_INHERITS_STDIN = 1 << 5,
|
||||
G_SPAWN_FILE_AND_ARGV_ZERO = 1 << 6
|
||||
} GSpawnFlags;
|
||||
|
||||
GQuark g_spawn_error_quark (void);
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#define g_spawn_async g_spawn_async_utf8
|
||||
#define g_spawn_async_with_pipes g_spawn_async_with_pipes_utf8
|
||||
#define g_spawn_sync g_spawn_sync_utf8
|
||||
#define g_spawn_command_line_sync g_spawn_command_line_sync_utf8
|
||||
#define g_spawn_command_line_async g_spawn_command_line_async_utf8
|
||||
#endif
|
||||
|
||||
gboolean g_spawn_async (const gchar *working_directory,
|
||||
gchar **argv,
|
||||
gchar **envp,
|
||||
GSpawnFlags flags,
|
||||
GSpawnChildSetupFunc child_setup,
|
||||
gpointer user_data,
|
||||
GPid *child_pid,
|
||||
GError **error);
|
||||
|
||||
|
||||
/* Opens pipes for non-NULL standard_output, standard_input, standard_error,
|
||||
* and returns the parent's end of the pipes.
|
||||
*/
|
||||
gboolean g_spawn_async_with_pipes (const gchar *working_directory,
|
||||
gchar **argv,
|
||||
gchar **envp,
|
||||
GSpawnFlags flags,
|
||||
GSpawnChildSetupFunc child_setup,
|
||||
gpointer user_data,
|
||||
GPid *child_pid,
|
||||
gint *standard_input,
|
||||
gint *standard_output,
|
||||
gint *standard_error,
|
||||
GError **error);
|
||||
|
||||
|
||||
/* If standard_output or standard_error are non-NULL, the full
|
||||
* standard output or error of the command will be placed there.
|
||||
*/
|
||||
|
||||
gboolean g_spawn_sync (const gchar *working_directory,
|
||||
gchar **argv,
|
||||
gchar **envp,
|
||||
GSpawnFlags flags,
|
||||
GSpawnChildSetupFunc child_setup,
|
||||
gpointer user_data,
|
||||
gchar **standard_output,
|
||||
gchar **standard_error,
|
||||
gint *exit_status,
|
||||
GError **error);
|
||||
|
||||
gboolean g_spawn_command_line_sync (const gchar *command_line,
|
||||
gchar **standard_output,
|
||||
gchar **standard_error,
|
||||
gint *exit_status,
|
||||
GError **error);
|
||||
gboolean g_spawn_command_line_async (const gchar *command_line,
|
||||
GError **error);
|
||||
|
||||
void g_spawn_close_pid (GPid pid);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_SPAWN_H__ */
|
|
@ -1,122 +0,0 @@
|
|||
/* gstdio.h - GFilename wrappers for C library functions
|
||||
*
|
||||
* Copyright 2004 Tor Lillqvist
|
||||
*
|
||||
* GLib is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* GLib 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with GLib; see the file COPYING.LIB. If not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __G_STDIO_H__
|
||||
#define __G_STDIO_H__
|
||||
|
||||
#include <glib/gprintf.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#if defined(G_OS_UNIX) && !defined(G_STDIO_NO_WRAP_ON_UNIX)
|
||||
|
||||
/* Just pass on to the system functions, so there's no potential for data
|
||||
* format mismatches, especially with large file interfaces.
|
||||
* A few functions can't be handled in this way, since they are not defined
|
||||
* in a portable system header that we could include here.
|
||||
*/
|
||||
|
||||
#define g_chmod chmod
|
||||
#define g_open open
|
||||
#define g_creat creat
|
||||
#define g_rename rename
|
||||
#define g_mkdir mkdir
|
||||
#define g_stat stat
|
||||
#define g_lstat lstat
|
||||
#define g_remove remove
|
||||
#define g_fopen fopen
|
||||
#define g_freopen freopen
|
||||
#define g_utime utime
|
||||
|
||||
int g_access (const gchar *filename,
|
||||
int mode);
|
||||
|
||||
int g_chdir (const gchar *path);
|
||||
|
||||
int g_unlink (const gchar *filename);
|
||||
|
||||
int g_rmdir (const gchar *filename);
|
||||
|
||||
#else /* ! G_OS_UNIX */
|
||||
|
||||
/* Wrappers for C library functions that take pathname arguments. On
|
||||
* Unix, the pathname is a file name as it literally is in the file
|
||||
* system. On well-maintained systems with consistent users who know
|
||||
* what they are doing and no exchange of files with others this would
|
||||
* be a well-defined encoding, preferrably UTF-8. On Windows, the
|
||||
* pathname is always in UTF-8, even if that is not the on-disk
|
||||
* encoding, and not the encoding accepted by the C library or Win32
|
||||
* API.
|
||||
*/
|
||||
|
||||
int g_access (const gchar *filename,
|
||||
int mode);
|
||||
|
||||
int g_chmod (const gchar *filename,
|
||||
int mode);
|
||||
|
||||
int g_open (const gchar *filename,
|
||||
int flags,
|
||||
int mode);
|
||||
|
||||
int g_creat (const gchar *filename,
|
||||
int mode);
|
||||
|
||||
int g_rename (const gchar *oldfilename,
|
||||
const gchar *newfilename);
|
||||
|
||||
int g_mkdir (const gchar *filename,
|
||||
int mode);
|
||||
|
||||
int g_chdir (const gchar *path);
|
||||
|
||||
int g_stat (const gchar *filename,
|
||||
struct stat *buf);
|
||||
|
||||
int g_lstat (const gchar *filename,
|
||||
struct stat *buf);
|
||||
|
||||
int g_unlink (const gchar *filename);
|
||||
|
||||
int g_remove (const gchar *filename);
|
||||
|
||||
int g_rmdir (const gchar *filename);
|
||||
|
||||
FILE *g_fopen (const gchar *filename,
|
||||
const gchar *mode);
|
||||
|
||||
FILE *g_freopen (const gchar *filename,
|
||||
const gchar *mode,
|
||||
FILE *stream);
|
||||
|
||||
struct utimbuf; /* Don't need the real definition of struct utimbuf when just
|
||||
* including this header.
|
||||
*/
|
||||
|
||||
int g_utime (const gchar *filename,
|
||||
struct utimbuf *utb);
|
||||
|
||||
#endif /* G_OS_UNIX */
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_STDIO_H__ */
|
|
@ -1,266 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_STRFUNCS_H__
|
||||
#define __G_STRFUNCS_H__
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <glib/gtypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* Functions like the ones in <ctype.h> that are not affected by locale. */
|
||||
typedef enum {
|
||||
G_ASCII_ALNUM = 1 << 0,
|
||||
G_ASCII_ALPHA = 1 << 1,
|
||||
G_ASCII_CNTRL = 1 << 2,
|
||||
G_ASCII_DIGIT = 1 << 3,
|
||||
G_ASCII_GRAPH = 1 << 4,
|
||||
G_ASCII_LOWER = 1 << 5,
|
||||
G_ASCII_PRINT = 1 << 6,
|
||||
G_ASCII_PUNCT = 1 << 7,
|
||||
G_ASCII_SPACE = 1 << 8,
|
||||
G_ASCII_UPPER = 1 << 9,
|
||||
G_ASCII_XDIGIT = 1 << 10
|
||||
} GAsciiType;
|
||||
|
||||
GLIB_VAR const guint16 * const g_ascii_table;
|
||||
|
||||
#define g_ascii_isalnum(c) \
|
||||
((g_ascii_table[(guchar) (c)] & G_ASCII_ALNUM) != 0)
|
||||
|
||||
#define g_ascii_isalpha(c) \
|
||||
((g_ascii_table[(guchar) (c)] & G_ASCII_ALPHA) != 0)
|
||||
|
||||
#define g_ascii_iscntrl(c) \
|
||||
((g_ascii_table[(guchar) (c)] & G_ASCII_CNTRL) != 0)
|
||||
|
||||
#define g_ascii_isdigit(c) \
|
||||
((g_ascii_table[(guchar) (c)] & G_ASCII_DIGIT) != 0)
|
||||
|
||||
#define g_ascii_isgraph(c) \
|
||||
((g_ascii_table[(guchar) (c)] & G_ASCII_GRAPH) != 0)
|
||||
|
||||
#define g_ascii_islower(c) \
|
||||
((g_ascii_table[(guchar) (c)] & G_ASCII_LOWER) != 0)
|
||||
|
||||
#define g_ascii_isprint(c) \
|
||||
((g_ascii_table[(guchar) (c)] & G_ASCII_PRINT) != 0)
|
||||
|
||||
#define g_ascii_ispunct(c) \
|
||||
((g_ascii_table[(guchar) (c)] & G_ASCII_PUNCT) != 0)
|
||||
|
||||
#define g_ascii_isspace(c) \
|
||||
((g_ascii_table[(guchar) (c)] & G_ASCII_SPACE) != 0)
|
||||
|
||||
#define g_ascii_isupper(c) \
|
||||
((g_ascii_table[(guchar) (c)] & G_ASCII_UPPER) != 0)
|
||||
|
||||
#define g_ascii_isxdigit(c) \
|
||||
((g_ascii_table[(guchar) (c)] & G_ASCII_XDIGIT) != 0)
|
||||
|
||||
gchar g_ascii_tolower (gchar c) G_GNUC_CONST;
|
||||
gchar g_ascii_toupper (gchar c) G_GNUC_CONST;
|
||||
|
||||
gint g_ascii_digit_value (gchar c) G_GNUC_CONST;
|
||||
gint g_ascii_xdigit_value (gchar c) G_GNUC_CONST;
|
||||
|
||||
/* String utility functions that modify a string argument or
|
||||
* return a constant string that must not be freed.
|
||||
*/
|
||||
#define G_STR_DELIMITERS "_-|> <."
|
||||
gchar* g_strdelimit (gchar *string,
|
||||
const gchar *delimiters,
|
||||
gchar new_delimiter);
|
||||
gchar* g_strcanon (gchar *string,
|
||||
const gchar *valid_chars,
|
||||
gchar substitutor);
|
||||
G_CONST_RETURN gchar* g_strerror (gint errnum) G_GNUC_CONST;
|
||||
G_CONST_RETURN gchar* g_strsignal (gint signum) G_GNUC_CONST;
|
||||
gchar* g_strreverse (gchar *string);
|
||||
gsize g_strlcpy (gchar *dest,
|
||||
const gchar *src,
|
||||
gsize dest_size);
|
||||
gsize g_strlcat (gchar *dest,
|
||||
const gchar *src,
|
||||
gsize dest_size);
|
||||
gchar * g_strstr_len (const gchar *haystack,
|
||||
gssize haystack_len,
|
||||
const gchar *needle);
|
||||
gchar * g_strrstr (const gchar *haystack,
|
||||
const gchar *needle);
|
||||
gchar * g_strrstr_len (const gchar *haystack,
|
||||
gssize haystack_len,
|
||||
const gchar *needle);
|
||||
|
||||
gboolean g_str_has_suffix (const gchar *str,
|
||||
const gchar *suffix);
|
||||
gboolean g_str_has_prefix (const gchar *str,
|
||||
const gchar *prefix);
|
||||
|
||||
/* String to/from double conversion functions */
|
||||
|
||||
gdouble g_strtod (const gchar *nptr,
|
||||
gchar **endptr);
|
||||
gdouble g_ascii_strtod (const gchar *nptr,
|
||||
gchar **endptr);
|
||||
guint64 g_ascii_strtoull (const gchar *nptr,
|
||||
gchar **endptr,
|
||||
guint base);
|
||||
gint64 g_ascii_strtoll (const gchar *nptr,
|
||||
gchar **endptr,
|
||||
guint base);
|
||||
/* 29 bytes should enough for all possible values that
|
||||
* g_ascii_dtostr can produce.
|
||||
* Then add 10 for good measure */
|
||||
#define G_ASCII_DTOSTR_BUF_SIZE (29 + 10)
|
||||
gchar * g_ascii_dtostr (gchar *buffer,
|
||||
gint buf_len,
|
||||
gdouble d);
|
||||
gchar * g_ascii_formatd (gchar *buffer,
|
||||
gint buf_len,
|
||||
const gchar *format,
|
||||
gdouble d);
|
||||
|
||||
/* removes leading spaces */
|
||||
gchar* g_strchug (gchar *string);
|
||||
/* removes trailing spaces */
|
||||
gchar* g_strchomp (gchar *string);
|
||||
/* removes leading & trailing spaces */
|
||||
#define g_strstrip( string ) g_strchomp (g_strchug (string))
|
||||
|
||||
gint g_ascii_strcasecmp (const gchar *s1,
|
||||
const gchar *s2);
|
||||
gint g_ascii_strncasecmp (const gchar *s1,
|
||||
const gchar *s2,
|
||||
gsize n);
|
||||
gchar* g_ascii_strdown (const gchar *str,
|
||||
gssize len) G_GNUC_MALLOC;
|
||||
gchar* g_ascii_strup (const gchar *str,
|
||||
gssize len) G_GNUC_MALLOC;
|
||||
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
|
||||
/* The following four functions are deprecated and will be removed in
|
||||
* the next major release. They use the locale-specific tolower and
|
||||
* toupper, which is almost never the right thing.
|
||||
*/
|
||||
|
||||
gint g_strcasecmp (const gchar *s1,
|
||||
const gchar *s2);
|
||||
gint g_strncasecmp (const gchar *s1,
|
||||
const gchar *s2,
|
||||
guint n);
|
||||
gchar* g_strdown (gchar *string);
|
||||
gchar* g_strup (gchar *string);
|
||||
|
||||
#endif /* G_DISABLE_DEPRECATED */
|
||||
|
||||
/* String utility functions that return a newly allocated string which
|
||||
* ought to be freed with g_free from the caller at some point.
|
||||
*/
|
||||
gchar* g_strdup (const gchar *str) G_GNUC_MALLOC;
|
||||
gchar* g_strdup_printf (const gchar *format,
|
||||
...) G_GNUC_PRINTF (1, 2) G_GNUC_MALLOC;
|
||||
gchar* g_strdup_vprintf (const gchar *format,
|
||||
va_list args) G_GNUC_MALLOC;
|
||||
gchar* g_strndup (const gchar *str,
|
||||
gsize n) G_GNUC_MALLOC;
|
||||
gchar* g_strnfill (gsize length,
|
||||
gchar fill_char) G_GNUC_MALLOC;
|
||||
gchar* g_strconcat (const gchar *string1,
|
||||
...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED;
|
||||
gchar* g_strjoin (const gchar *separator,
|
||||
...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED;
|
||||
|
||||
/* Make a copy of a string interpreting C string -style escape
|
||||
* sequences. Inverse of g_strescape. The recognized sequences are \b
|
||||
* \f \n \r \t \\ \" and the octal format.
|
||||
*/
|
||||
gchar* g_strcompress (const gchar *source) G_GNUC_MALLOC;
|
||||
|
||||
/* Copy a string escaping nonprintable characters like in C strings.
|
||||
* Inverse of g_strcompress. The exceptions parameter, if non-NULL, points
|
||||
* to a string containing characters that are not to be escaped.
|
||||
*
|
||||
* Deprecated API: gchar* g_strescape (const gchar *source);
|
||||
* Luckily this function wasn't used much, using NULL as second parameter
|
||||
* provides mostly identical semantics.
|
||||
*/
|
||||
gchar* g_strescape (const gchar *source,
|
||||
const gchar *exceptions) G_GNUC_MALLOC;
|
||||
|
||||
gpointer g_memdup (gconstpointer mem,
|
||||
guint byte_size) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(2);
|
||||
|
||||
/* NULL terminated string arrays.
|
||||
* g_strsplit(), g_strsplit_set() split up string into max_tokens tokens
|
||||
* at delim and return a newly allocated string array.
|
||||
* g_strjoinv() concatenates all of str_array's strings, sliding in an
|
||||
* optional separator, the returned string is newly allocated.
|
||||
* g_strfreev() frees the array itself and all of its strings.
|
||||
* g_strdupv() copies a NULL-terminated array of strings
|
||||
* g_strv_length() returns the length of a NULL-terminated array of strings
|
||||
*/
|
||||
gchar** g_strsplit (const gchar *string,
|
||||
const gchar *delimiter,
|
||||
gint max_tokens) G_GNUC_MALLOC;
|
||||
gchar ** g_strsplit_set (const gchar *string,
|
||||
const gchar *delimiters,
|
||||
gint max_tokens) G_GNUC_MALLOC;
|
||||
gchar* g_strjoinv (const gchar *separator,
|
||||
gchar **str_array) G_GNUC_MALLOC;
|
||||
void g_strfreev (gchar **str_array);
|
||||
gchar** g_strdupv (gchar **str_array) G_GNUC_MALLOC;
|
||||
guint g_strv_length (gchar **str_array);
|
||||
|
||||
gchar* g_stpcpy (gchar *dest,
|
||||
const char *src);
|
||||
|
||||
G_CONST_RETURN gchar *g_strip_context (const gchar *msgid,
|
||||
const gchar *msgval) G_GNUC_FORMAT(1);
|
||||
|
||||
G_CONST_RETURN gchar *g_dgettext (const gchar *domain,
|
||||
const gchar *msgid) G_GNUC_FORMAT(2);
|
||||
|
||||
G_CONST_RETURN gchar *g_dngettext (const gchar *domain,
|
||||
const gchar *msgid,
|
||||
const gchar *msgid_plural,
|
||||
gulong n) G_GNUC_FORMAT(3);
|
||||
G_CONST_RETURN gchar *g_dpgettext (const gchar *domain,
|
||||
const gchar *msgctxtid,
|
||||
gsize msgidoffset) G_GNUC_FORMAT(2);
|
||||
G_CONST_RETURN gchar *g_dpgettext2 (const gchar *domain,
|
||||
const gchar *context,
|
||||
const gchar *msgid) G_GNUC_FORMAT(3);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_STRFUNCS_H__ */
|
|
@ -1,178 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_STRING_H__
|
||||
#define __G_STRING_H__
|
||||
|
||||
#include <glib/gtypes.h>
|
||||
#include <glib/gunicode.h>
|
||||
#include <glib/gutils.h> /* for G_CAN_INLINE */
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GString GString;
|
||||
typedef struct _GStringChunk GStringChunk;
|
||||
|
||||
struct _GString
|
||||
{
|
||||
gchar *str;
|
||||
gsize len;
|
||||
gsize allocated_len;
|
||||
};
|
||||
|
||||
/* String Chunks
|
||||
*/
|
||||
GStringChunk* g_string_chunk_new (gsize size);
|
||||
void g_string_chunk_free (GStringChunk *chunk);
|
||||
void g_string_chunk_clear (GStringChunk *chunk);
|
||||
gchar* g_string_chunk_insert (GStringChunk *chunk,
|
||||
const gchar *string);
|
||||
gchar* g_string_chunk_insert_len (GStringChunk *chunk,
|
||||
const gchar *string,
|
||||
gssize len);
|
||||
gchar* g_string_chunk_insert_const (GStringChunk *chunk,
|
||||
const gchar *string);
|
||||
|
||||
|
||||
/* Strings
|
||||
*/
|
||||
GString* g_string_new (const gchar *init);
|
||||
GString* g_string_new_len (const gchar *init,
|
||||
gssize len);
|
||||
GString* g_string_sized_new (gsize dfl_size);
|
||||
gchar* g_string_free (GString *string,
|
||||
gboolean free_segment);
|
||||
gboolean g_string_equal (const GString *v,
|
||||
const GString *v2);
|
||||
guint g_string_hash (const GString *str);
|
||||
GString* g_string_assign (GString *string,
|
||||
const gchar *rval);
|
||||
GString* g_string_truncate (GString *string,
|
||||
gsize len);
|
||||
GString* g_string_set_size (GString *string,
|
||||
gsize len);
|
||||
GString* g_string_insert_len (GString *string,
|
||||
gssize pos,
|
||||
const gchar *val,
|
||||
gssize len);
|
||||
GString* g_string_append (GString *string,
|
||||
const gchar *val);
|
||||
GString* g_string_append_len (GString *string,
|
||||
const gchar *val,
|
||||
gssize len);
|
||||
GString* g_string_append_c (GString *string,
|
||||
gchar c);
|
||||
GString* g_string_append_unichar (GString *string,
|
||||
gunichar wc);
|
||||
GString* g_string_prepend (GString *string,
|
||||
const gchar *val);
|
||||
GString* g_string_prepend_c (GString *string,
|
||||
gchar c);
|
||||
GString* g_string_prepend_unichar (GString *string,
|
||||
gunichar wc);
|
||||
GString* g_string_prepend_len (GString *string,
|
||||
const gchar *val,
|
||||
gssize len);
|
||||
GString* g_string_insert (GString *string,
|
||||
gssize pos,
|
||||
const gchar *val);
|
||||
GString* g_string_insert_c (GString *string,
|
||||
gssize pos,
|
||||
gchar c);
|
||||
GString* g_string_insert_unichar (GString *string,
|
||||
gssize pos,
|
||||
gunichar wc);
|
||||
GString* g_string_overwrite (GString *string,
|
||||
gsize pos,
|
||||
const gchar *val);
|
||||
GString* g_string_overwrite_len (GString *string,
|
||||
gsize pos,
|
||||
const gchar *val,
|
||||
gssize len);
|
||||
GString* g_string_erase (GString *string,
|
||||
gssize pos,
|
||||
gssize len);
|
||||
GString* g_string_ascii_down (GString *string);
|
||||
GString* g_string_ascii_up (GString *string);
|
||||
void g_string_vprintf (GString *string,
|
||||
const gchar *format,
|
||||
va_list args);
|
||||
void g_string_printf (GString *string,
|
||||
const gchar *format,
|
||||
...) G_GNUC_PRINTF (2, 3);
|
||||
void g_string_append_vprintf (GString *string,
|
||||
const gchar *format,
|
||||
va_list args);
|
||||
void g_string_append_printf (GString *string,
|
||||
const gchar *format,
|
||||
...) G_GNUC_PRINTF (2, 3);
|
||||
GString * g_string_append_uri_escaped(GString *string,
|
||||
const char *unescaped,
|
||||
const char *reserved_chars_allowed,
|
||||
gboolean allow_utf8);
|
||||
|
||||
/* -- optimize g_strig_append_c --- */
|
||||
#ifdef G_CAN_INLINE
|
||||
static inline GString*
|
||||
g_string_append_c_inline (GString *gstring,
|
||||
gchar c)
|
||||
{
|
||||
if (gstring->len + 1 < gstring->allocated_len)
|
||||
{
|
||||
gstring->str[gstring->len++] = c;
|
||||
gstring->str[gstring->len] = 0;
|
||||
}
|
||||
else
|
||||
g_string_insert_c (gstring, -1, c);
|
||||
return gstring;
|
||||
}
|
||||
#define g_string_append_c(gstr,c) g_string_append_c_inline (gstr, c)
|
||||
#endif /* G_CAN_INLINE */
|
||||
|
||||
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
|
||||
/* The following two functions are deprecated and will be removed in
|
||||
* the next major release. They use the locale-specific tolower and
|
||||
* toupper, which is almost never the right thing.
|
||||
*/
|
||||
|
||||
GString* g_string_down (GString *string);
|
||||
GString* g_string_up (GString *string);
|
||||
|
||||
/* These aliases are included for compatibility. */
|
||||
#define g_string_sprintf g_string_printf
|
||||
#define g_string_sprintfa g_string_append_printf
|
||||
|
||||
#endif /* G_DISABLE_DEPRECATED */
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_STRING_H__ */
|
|
@ -1,267 +0,0 @@
|
|||
/* GLib testing utilities
|
||||
* Copyright (C) 2007 Imendio AB
|
||||
* Authors: Tim Janik
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_TEST_UTILS_H__
|
||||
#define __G_TEST_UTILS_H__
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct GTestCase GTestCase;
|
||||
typedef struct GTestSuite GTestSuite;
|
||||
|
||||
/* assertion API */
|
||||
#define g_assert_cmpstr(s1, cmp, s2) do { const char *__s1 = (s1), *__s2 = (s2); \
|
||||
if (g_strcmp0 (__s1, __s2) cmp 0) ; else \
|
||||
g_assertion_message_cmpstr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
||||
#s1 " " #cmp " " #s2, __s1, #cmp, __s2); } while (0)
|
||||
#define g_assert_cmpint(n1, cmp, n2) do { gint64 __n1 = (n1), __n2 = (n2); \
|
||||
if (__n1 cmp __n2) ; else \
|
||||
g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
||||
#n1 " " #cmp " " #n2, __n1, #cmp, __n2, 'i'); } while (0)
|
||||
#define g_assert_cmpuint(n1, cmp, n2) do { guint64 __n1 = (n1), __n2 = (n2); \
|
||||
if (__n1 cmp __n2) ; else \
|
||||
g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
||||
#n1 " " #cmp " " #n2, __n1, #cmp, __n2, 'i'); } while (0)
|
||||
#define g_assert_cmphex(n1, cmp, n2) do { guint64 __n1 = (n1), __n2 = (n2); \
|
||||
if (__n1 cmp __n2) ; else \
|
||||
g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
||||
#n1 " " #cmp " " #n2, __n1, #cmp, __n2, 'x'); } while (0)
|
||||
#define g_assert_cmpfloat(n1,cmp,n2) do { long double __n1 = (n1), __n2 = (n2); \
|
||||
if (__n1 cmp __n2) ; else \
|
||||
g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
||||
#n1 " " #cmp " " #n2, __n1, #cmp, __n2, 'f'); } while (0)
|
||||
#define g_assert_no_error(err) do { if (err) \
|
||||
g_assertion_message_error (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
||||
#err, err, 0, 0); } while (0)
|
||||
#define g_assert_error(err, dom, c) do { if (!err || (err)->domain != dom || (err)->code != c) \
|
||||
g_assertion_message_error (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
||||
#err, err, dom, c); } while (0)
|
||||
#ifdef G_DISABLE_ASSERT
|
||||
#define g_assert_not_reached() do { (void) 0; } while (0)
|
||||
#define g_assert(expr) do { (void) 0; } while (0)
|
||||
#else /* !G_DISABLE_ASSERT */
|
||||
#define g_assert_not_reached() do { g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, NULL); } while (0)
|
||||
#define g_assert(expr) do { if G_LIKELY (expr) ; else \
|
||||
g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
||||
#expr); } while (0)
|
||||
#endif /* !G_DISABLE_ASSERT */
|
||||
|
||||
int g_strcmp0 (const char *str1,
|
||||
const char *str2);
|
||||
|
||||
/* report performance results */
|
||||
void g_test_minimized_result (double minimized_quantity,
|
||||
const char *format,
|
||||
...) G_GNUC_PRINTF (2, 3);
|
||||
void g_test_maximized_result (double maximized_quantity,
|
||||
const char *format,
|
||||
...) G_GNUC_PRINTF (2, 3);
|
||||
|
||||
/* initialize testing framework */
|
||||
void g_test_init (int *argc,
|
||||
char ***argv,
|
||||
...);
|
||||
/* query testing framework config */
|
||||
#define g_test_quick() (g_test_config_vars->test_quick)
|
||||
#define g_test_slow() (!g_test_config_vars->test_quick)
|
||||
#define g_test_thorough() (!g_test_config_vars->test_quick)
|
||||
#define g_test_perf() (g_test_config_vars->test_perf)
|
||||
#define g_test_verbose() (g_test_config_vars->test_verbose)
|
||||
#define g_test_quiet() (g_test_config_vars->test_quiet)
|
||||
/* run all tests under toplevel suite (path: /) */
|
||||
int g_test_run (void);
|
||||
/* hook up a test functions under test path */
|
||||
void g_test_add_func (const char *testpath,
|
||||
void (*test_func) (void));
|
||||
void g_test_add_data_func (const char *testpath,
|
||||
gconstpointer test_data,
|
||||
void (*test_func) (gconstpointer));
|
||||
/* hook up a test with fixture under test path */
|
||||
#define g_test_add(testpath, Fixture, tdata, fsetup, ftest, fteardown) \
|
||||
G_STMT_START { \
|
||||
void (*add_vtable) (const char*, \
|
||||
gsize, \
|
||||
gconstpointer, \
|
||||
void (*) (Fixture*, gconstpointer), \
|
||||
void (*) (Fixture*, gconstpointer), \
|
||||
void (*) (Fixture*, gconstpointer)) = (void (*) (const gchar *, gsize, gconstpointer, void (*) (Fixture*, gconstpointer), void (*) (Fixture*, gconstpointer), void (*) (Fixture*, gconstpointer))) g_test_add_vtable; \
|
||||
add_vtable \
|
||||
(testpath, sizeof (Fixture), tdata, fsetup, ftest, fteardown); \
|
||||
} G_STMT_END
|
||||
|
||||
/* add test messages to the test report */
|
||||
void g_test_message (const char *format,
|
||||
...) G_GNUC_PRINTF (1, 2);
|
||||
void g_test_bug_base (const char *uri_pattern);
|
||||
void g_test_bug (const char *bug_uri_snippet);
|
||||
/* measure test timings */
|
||||
void g_test_timer_start (void);
|
||||
double g_test_timer_elapsed (void); /* elapsed seconds */
|
||||
double g_test_timer_last (void); /* repeat last elapsed() result */
|
||||
|
||||
/* automatically g_free or g_object_unref upon teardown */
|
||||
void g_test_queue_free (gpointer gfree_pointer);
|
||||
void g_test_queue_destroy (GDestroyNotify destroy_func,
|
||||
gpointer destroy_data);
|
||||
#define g_test_queue_unref(gobject) g_test_queue_destroy (g_object_unref, gobject)
|
||||
|
||||
/* test traps are guards used around forked tests */
|
||||
typedef enum {
|
||||
G_TEST_TRAP_SILENCE_STDOUT = 1 << 7,
|
||||
G_TEST_TRAP_SILENCE_STDERR = 1 << 8,
|
||||
G_TEST_TRAP_INHERIT_STDIN = 1 << 9
|
||||
} GTestTrapFlags;
|
||||
gboolean g_test_trap_fork (guint64 usec_timeout,
|
||||
GTestTrapFlags test_trap_flags);
|
||||
gboolean g_test_trap_has_passed (void);
|
||||
gboolean g_test_trap_reached_timeout (void);
|
||||
#define g_test_trap_assert_passed() g_test_trap_assertions (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, 0, 0)
|
||||
#define g_test_trap_assert_failed() g_test_trap_assertions (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, 1, 0)
|
||||
#define g_test_trap_assert_stdout(soutpattern) g_test_trap_assertions (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, 2, soutpattern)
|
||||
#define g_test_trap_assert_stdout_unmatched(soutpattern) g_test_trap_assertions (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, 3, soutpattern)
|
||||
#define g_test_trap_assert_stderr(serrpattern) g_test_trap_assertions (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, 4, serrpattern)
|
||||
#define g_test_trap_assert_stderr_unmatched(serrpattern) g_test_trap_assertions (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, 5, serrpattern)
|
||||
|
||||
/* provide seed-able random numbers for tests */
|
||||
#define g_test_rand_bit() (0 != (g_test_rand_int() & (1 << 15)))
|
||||
gint32 g_test_rand_int (void);
|
||||
gint32 g_test_rand_int_range (gint32 begin,
|
||||
gint32 end);
|
||||
double g_test_rand_double (void);
|
||||
double g_test_rand_double_range (double range_start,
|
||||
double range_end);
|
||||
|
||||
/* semi-internal API */
|
||||
GTestCase* g_test_create_case (const char *test_name,
|
||||
gsize data_size,
|
||||
gconstpointer test_data,
|
||||
void (*data_setup) (void),
|
||||
void (*data_test) (void),
|
||||
void (*data_teardown) (void));
|
||||
GTestSuite* g_test_create_suite (const char *suite_name);
|
||||
GTestSuite* g_test_get_root (void);
|
||||
void g_test_suite_add (GTestSuite *suite,
|
||||
GTestCase *test_case);
|
||||
void g_test_suite_add_suite (GTestSuite *suite,
|
||||
GTestSuite *nestedsuite);
|
||||
int g_test_run_suite (GTestSuite *suite);
|
||||
|
||||
/* internal ABI */
|
||||
void g_test_trap_assertions (const char *domain,
|
||||
const char *file,
|
||||
int line,
|
||||
const char *func,
|
||||
guint64 assertion_flags, /* 0-pass, 1-fail, 2-outpattern, 4-errpattern */
|
||||
const char *pattern);
|
||||
void g_assertion_message (const char *domain,
|
||||
const char *file,
|
||||
int line,
|
||||
const char *func,
|
||||
const char *message) G_GNUC_NORETURN;
|
||||
void g_assertion_message_expr (const char *domain,
|
||||
const char *file,
|
||||
int line,
|
||||
const char *func,
|
||||
const char *expr) G_GNUC_NORETURN;
|
||||
void g_assertion_message_cmpstr (const char *domain,
|
||||
const char *file,
|
||||
int line,
|
||||
const char *func,
|
||||
const char *expr,
|
||||
const char *arg1,
|
||||
const char *cmp,
|
||||
const char *arg2) G_GNUC_NORETURN;
|
||||
void g_assertion_message_cmpnum (const char *domain,
|
||||
const char *file,
|
||||
int line,
|
||||
const char *func,
|
||||
const char *expr,
|
||||
long double arg1,
|
||||
const char *cmp,
|
||||
long double arg2,
|
||||
char numtype) G_GNUC_NORETURN;
|
||||
void g_assertion_message_error (const char *domain,
|
||||
const char *file,
|
||||
int line,
|
||||
const char *func,
|
||||
const char *expr,
|
||||
GError *error,
|
||||
GQuark error_domain,
|
||||
int error_code) G_GNUC_NORETURN;
|
||||
void g_test_add_vtable (const char *testpath,
|
||||
gsize data_size,
|
||||
gconstpointer test_data,
|
||||
void (*data_setup) (void),
|
||||
void (*data_test) (void),
|
||||
void (*data_teardown) (void));
|
||||
typedef struct {
|
||||
gboolean test_initialized;
|
||||
gboolean test_quick; /* disable thorough tests */
|
||||
gboolean test_perf; /* run performance tests */
|
||||
gboolean test_verbose; /* extra info */
|
||||
gboolean test_quiet; /* reduce output */
|
||||
} GTestConfig;
|
||||
GLIB_VAR const GTestConfig * const g_test_config_vars;
|
||||
|
||||
/* internal logging API */
|
||||
typedef enum {
|
||||
G_TEST_LOG_NONE,
|
||||
G_TEST_LOG_ERROR, /* s:msg */
|
||||
G_TEST_LOG_START_BINARY, /* s:binaryname s:seed */
|
||||
G_TEST_LOG_LIST_CASE, /* s:testpath */
|
||||
G_TEST_LOG_SKIP_CASE, /* s:testpath */
|
||||
G_TEST_LOG_START_CASE, /* s:testpath */
|
||||
G_TEST_LOG_STOP_CASE, /* d:status d:nforks d:elapsed */
|
||||
G_TEST_LOG_MIN_RESULT, /* s:blurb d:result */
|
||||
G_TEST_LOG_MAX_RESULT, /* s:blurb d:result */
|
||||
G_TEST_LOG_MESSAGE /* s:blurb */
|
||||
} GTestLogType;
|
||||
|
||||
typedef struct {
|
||||
GTestLogType log_type;
|
||||
guint n_strings;
|
||||
gchar **strings; /* NULL terminated */
|
||||
guint n_nums;
|
||||
long double *nums;
|
||||
} GTestLogMsg;
|
||||
typedef struct {
|
||||
/*< private >*/
|
||||
GString *data;
|
||||
GSList *msgs;
|
||||
} GTestLogBuffer;
|
||||
|
||||
const char* g_test_log_type_name (GTestLogType log_type);
|
||||
GTestLogBuffer* g_test_log_buffer_new (void);
|
||||
void g_test_log_buffer_free (GTestLogBuffer *tbuffer);
|
||||
void g_test_log_buffer_push (GTestLogBuffer *tbuffer,
|
||||
guint n_bytes,
|
||||
const guint8 *bytes);
|
||||
GTestLogMsg* g_test_log_buffer_pop (GTestLogBuffer *tbuffer);
|
||||
void g_test_log_msg_free (GTestLogMsg *tmsg);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_TEST_UTILS_H__ */
|
|
@ -1,404 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_THREAD_H__
|
||||
#define __G_THREAD_H__
|
||||
|
||||
#include <glib/gerror.h>
|
||||
#include <glib/gtypes.h>
|
||||
#include <glib/gutils.h> /* for G_INLINE_FUNC */
|
||||
#include <glib/gatomic.h> /* for g_atomic_pointer_get */
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* GLib Thread support
|
||||
*/
|
||||
|
||||
extern GQuark g_thread_error_quark (void);
|
||||
#define G_THREAD_ERROR g_thread_error_quark ()
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_THREAD_ERROR_AGAIN /* Resource temporarily unavailable */
|
||||
} GThreadError;
|
||||
|
||||
typedef gpointer (*GThreadFunc) (gpointer data);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_THREAD_PRIORITY_LOW,
|
||||
G_THREAD_PRIORITY_NORMAL,
|
||||
G_THREAD_PRIORITY_HIGH,
|
||||
G_THREAD_PRIORITY_URGENT
|
||||
} GThreadPriority;
|
||||
|
||||
typedef struct _GThread GThread;
|
||||
struct _GThread
|
||||
{
|
||||
/*< private >*/
|
||||
GThreadFunc func;
|
||||
gpointer data;
|
||||
gboolean joinable;
|
||||
GThreadPriority priority;
|
||||
};
|
||||
|
||||
typedef struct _GMutex GMutex;
|
||||
typedef struct _GCond GCond;
|
||||
typedef struct _GPrivate GPrivate;
|
||||
typedef struct _GStaticPrivate GStaticPrivate;
|
||||
|
||||
typedef struct _GThreadFunctions GThreadFunctions;
|
||||
struct _GThreadFunctions
|
||||
{
|
||||
GMutex* (*mutex_new) (void);
|
||||
void (*mutex_lock) (GMutex *mutex);
|
||||
gboolean (*mutex_trylock) (GMutex *mutex);
|
||||
void (*mutex_unlock) (GMutex *mutex);
|
||||
void (*mutex_free) (GMutex *mutex);
|
||||
GCond* (*cond_new) (void);
|
||||
void (*cond_signal) (GCond *cond);
|
||||
void (*cond_broadcast) (GCond *cond);
|
||||
void (*cond_wait) (GCond *cond,
|
||||
GMutex *mutex);
|
||||
gboolean (*cond_timed_wait) (GCond *cond,
|
||||
GMutex *mutex,
|
||||
GTimeVal *end_time);
|
||||
void (*cond_free) (GCond *cond);
|
||||
GPrivate* (*private_new) (GDestroyNotify destructor);
|
||||
gpointer (*private_get) (GPrivate *private_key);
|
||||
void (*private_set) (GPrivate *private_key,
|
||||
gpointer data);
|
||||
void (*thread_create) (GThreadFunc func,
|
||||
gpointer data,
|
||||
gulong stack_size,
|
||||
gboolean joinable,
|
||||
gboolean bound,
|
||||
GThreadPriority priority,
|
||||
gpointer thread,
|
||||
GError **error);
|
||||
void (*thread_yield) (void);
|
||||
void (*thread_join) (gpointer thread);
|
||||
void (*thread_exit) (void);
|
||||
void (*thread_set_priority)(gpointer thread,
|
||||
GThreadPriority priority);
|
||||
void (*thread_self) (gpointer thread);
|
||||
gboolean (*thread_equal) (gpointer thread1,
|
||||
gpointer thread2);
|
||||
};
|
||||
|
||||
GLIB_VAR GThreadFunctions g_thread_functions_for_glib_use;
|
||||
GLIB_VAR gboolean g_thread_use_default_impl;
|
||||
GLIB_VAR gboolean g_threads_got_initialized;
|
||||
|
||||
GLIB_VAR guint64 (*g_thread_gettime) (void);
|
||||
|
||||
/* initializes the mutex/cond/private implementation for glib, might
|
||||
* only be called once, and must not be called directly or indirectly
|
||||
* from another glib-function, e.g. as a callback.
|
||||
*/
|
||||
void g_thread_init (GThreadFunctions *vtable);
|
||||
|
||||
/* Errorcheck mutexes. If you define G_ERRORCHECK_MUTEXES, then all
|
||||
* mutexes will check for re-locking and re-unlocking */
|
||||
|
||||
/* Initialize thread system with errorcheck mutexes. vtable must be
|
||||
* NULL. Do not call directly. Use #define G_ERRORCHECK_MUTEXES
|
||||
* instead.
|
||||
*/
|
||||
void g_thread_init_with_errorcheck_mutexes (GThreadFunctions* vtable);
|
||||
|
||||
/* Checks if thread support is initialized. Identical to the
|
||||
* g_thread_supported macro but provided for language bindings.
|
||||
*/
|
||||
gboolean g_thread_get_initialized (void);
|
||||
|
||||
/* A random number to recognize debug calls to g_mutex_... */
|
||||
#define G_MUTEX_DEBUG_MAGIC 0xf8e18ad7
|
||||
|
||||
#ifdef G_ERRORCHECK_MUTEXES
|
||||
#define g_thread_init(vtable) g_thread_init_with_errorcheck_mutexes (vtable)
|
||||
#endif
|
||||
|
||||
/* internal function for fallback static mutex implementation */
|
||||
GMutex* g_static_mutex_get_mutex_impl (GMutex **mutex);
|
||||
|
||||
#define g_static_mutex_get_mutex_impl_shortcut(mutex) \
|
||||
(g_atomic_pointer_get (mutex) ? *(mutex) : \
|
||||
g_static_mutex_get_mutex_impl (mutex))
|
||||
|
||||
/* shorthands for conditional and unconditional function calls */
|
||||
|
||||
#define G_THREAD_UF(op, arglist) \
|
||||
(*g_thread_functions_for_glib_use . op) arglist
|
||||
#define G_THREAD_CF(op, fail, arg) \
|
||||
(g_thread_supported () ? G_THREAD_UF (op, arg) : (fail))
|
||||
#define G_THREAD_ECF(op, fail, mutex, type) \
|
||||
(g_thread_supported () ? \
|
||||
((type(*)(GMutex*, const gulong, gchar const*)) \
|
||||
(*g_thread_functions_for_glib_use . op)) \
|
||||
(mutex, G_MUTEX_DEBUG_MAGIC, G_STRLOC) : (fail))
|
||||
|
||||
#ifndef G_ERRORCHECK_MUTEXES
|
||||
# define g_mutex_lock(mutex) \
|
||||
G_THREAD_CF (mutex_lock, (void)0, (mutex))
|
||||
# define g_mutex_trylock(mutex) \
|
||||
G_THREAD_CF (mutex_trylock, TRUE, (mutex))
|
||||
# define g_mutex_unlock(mutex) \
|
||||
G_THREAD_CF (mutex_unlock, (void)0, (mutex))
|
||||
# define g_mutex_free(mutex) \
|
||||
G_THREAD_CF (mutex_free, (void)0, (mutex))
|
||||
# define g_cond_wait(cond, mutex) \
|
||||
G_THREAD_CF (cond_wait, (void)0, (cond, mutex))
|
||||
# define g_cond_timed_wait(cond, mutex, abs_time) \
|
||||
G_THREAD_CF (cond_timed_wait, TRUE, (cond, mutex, abs_time))
|
||||
#else /* G_ERRORCHECK_MUTEXES */
|
||||
# define g_mutex_lock(mutex) \
|
||||
G_THREAD_ECF (mutex_lock, (void)0, (mutex), void)
|
||||
# define g_mutex_trylock(mutex) \
|
||||
G_THREAD_ECF (mutex_trylock, TRUE, (mutex), gboolean)
|
||||
# define g_mutex_unlock(mutex) \
|
||||
G_THREAD_ECF (mutex_unlock, (void)0, (mutex), void)
|
||||
# define g_mutex_free(mutex) \
|
||||
G_THREAD_ECF (mutex_free, (void)0, (mutex), void)
|
||||
# define g_cond_wait(cond, mutex) \
|
||||
(g_thread_supported () ? ((void(*)(GCond*, GMutex*, gulong, gchar*))\
|
||||
g_thread_functions_for_glib_use.cond_wait) \
|
||||
(cond, mutex, G_MUTEX_DEBUG_MAGIC, G_STRLOC) : (void) 0)
|
||||
# define g_cond_timed_wait(cond, mutex, abs_time) \
|
||||
(g_thread_supported () ? \
|
||||
((gboolean(*)(GCond*, GMutex*, GTimeVal*, gulong, gchar*)) \
|
||||
g_thread_functions_for_glib_use.cond_timed_wait) \
|
||||
(cond, mutex, abs_time, G_MUTEX_DEBUG_MAGIC, G_STRLOC) : TRUE)
|
||||
#endif /* G_ERRORCHECK_MUTEXES */
|
||||
|
||||
#define g_thread_supported() (g_threads_got_initialized)
|
||||
#define g_mutex_new() G_THREAD_UF (mutex_new, ())
|
||||
#define g_cond_new() G_THREAD_UF (cond_new, ())
|
||||
#define g_cond_signal(cond) G_THREAD_CF (cond_signal, (void)0, (cond))
|
||||
#define g_cond_broadcast(cond) G_THREAD_CF (cond_broadcast, (void)0, (cond))
|
||||
#define g_cond_free(cond) G_THREAD_CF (cond_free, (void)0, (cond))
|
||||
#define g_private_new(destructor) G_THREAD_UF (private_new, (destructor))
|
||||
#define g_private_get(private_key) G_THREAD_CF (private_get, \
|
||||
((gpointer)private_key), \
|
||||
(private_key))
|
||||
#define g_private_set(private_key, value) G_THREAD_CF (private_set, \
|
||||
(void) (private_key = \
|
||||
(GPrivate*) (value)), \
|
||||
(private_key, value))
|
||||
#define g_thread_yield() G_THREAD_CF (thread_yield, (void)0, ())
|
||||
|
||||
#define g_thread_create(func, data, joinable, error) \
|
||||
(g_thread_create_full (func, data, 0, joinable, FALSE, \
|
||||
G_THREAD_PRIORITY_NORMAL, error))
|
||||
|
||||
GThread* g_thread_create_full (GThreadFunc func,
|
||||
gpointer data,
|
||||
gulong stack_size,
|
||||
gboolean joinable,
|
||||
gboolean bound,
|
||||
GThreadPriority priority,
|
||||
GError **error);
|
||||
GThread* g_thread_self (void);
|
||||
void g_thread_exit (gpointer retval);
|
||||
gpointer g_thread_join (GThread *thread);
|
||||
|
||||
void g_thread_set_priority (GThread *thread,
|
||||
GThreadPriority priority);
|
||||
|
||||
/* GStaticMutexes can be statically initialized with the value
|
||||
* G_STATIC_MUTEX_INIT, and then they can directly be used, that is
|
||||
* much easier, than having to explicitly allocate the mutex before
|
||||
* use
|
||||
*/
|
||||
#define g_static_mutex_lock(mutex) \
|
||||
g_mutex_lock (g_static_mutex_get_mutex (mutex))
|
||||
#define g_static_mutex_trylock(mutex) \
|
||||
g_mutex_trylock (g_static_mutex_get_mutex (mutex))
|
||||
#define g_static_mutex_unlock(mutex) \
|
||||
g_mutex_unlock (g_static_mutex_get_mutex (mutex))
|
||||
void g_static_mutex_init (GStaticMutex *mutex);
|
||||
void g_static_mutex_free (GStaticMutex *mutex);
|
||||
|
||||
struct _GStaticPrivate
|
||||
{
|
||||
/*< private >*/
|
||||
guint index;
|
||||
};
|
||||
#define G_STATIC_PRIVATE_INIT { 0 }
|
||||
void g_static_private_init (GStaticPrivate *private_key);
|
||||
gpointer g_static_private_get (GStaticPrivate *private_key);
|
||||
void g_static_private_set (GStaticPrivate *private_key,
|
||||
gpointer data,
|
||||
GDestroyNotify notify);
|
||||
void g_static_private_free (GStaticPrivate *private_key);
|
||||
|
||||
typedef struct _GStaticRecMutex GStaticRecMutex;
|
||||
struct _GStaticRecMutex
|
||||
{
|
||||
/*< private >*/
|
||||
GStaticMutex mutex;
|
||||
guint depth;
|
||||
GSystemThread owner;
|
||||
};
|
||||
|
||||
#define G_STATIC_REC_MUTEX_INIT { G_STATIC_MUTEX_INIT }
|
||||
void g_static_rec_mutex_init (GStaticRecMutex *mutex);
|
||||
void g_static_rec_mutex_lock (GStaticRecMutex *mutex);
|
||||
gboolean g_static_rec_mutex_trylock (GStaticRecMutex *mutex);
|
||||
void g_static_rec_mutex_unlock (GStaticRecMutex *mutex);
|
||||
void g_static_rec_mutex_lock_full (GStaticRecMutex *mutex,
|
||||
guint depth);
|
||||
guint g_static_rec_mutex_unlock_full (GStaticRecMutex *mutex);
|
||||
void g_static_rec_mutex_free (GStaticRecMutex *mutex);
|
||||
|
||||
typedef struct _GStaticRWLock GStaticRWLock;
|
||||
struct _GStaticRWLock
|
||||
{
|
||||
/*< private >*/
|
||||
GStaticMutex mutex;
|
||||
GCond *read_cond;
|
||||
GCond *write_cond;
|
||||
guint read_counter;
|
||||
gboolean have_writer;
|
||||
guint want_to_read;
|
||||
guint want_to_write;
|
||||
};
|
||||
|
||||
#define G_STATIC_RW_LOCK_INIT { G_STATIC_MUTEX_INIT, NULL, NULL, 0, FALSE, 0, 0 }
|
||||
|
||||
void g_static_rw_lock_init (GStaticRWLock* lock);
|
||||
void g_static_rw_lock_reader_lock (GStaticRWLock* lock);
|
||||
gboolean g_static_rw_lock_reader_trylock (GStaticRWLock* lock);
|
||||
void g_static_rw_lock_reader_unlock (GStaticRWLock* lock);
|
||||
void g_static_rw_lock_writer_lock (GStaticRWLock* lock);
|
||||
gboolean g_static_rw_lock_writer_trylock (GStaticRWLock* lock);
|
||||
void g_static_rw_lock_writer_unlock (GStaticRWLock* lock);
|
||||
void g_static_rw_lock_free (GStaticRWLock* lock);
|
||||
|
||||
void g_thread_foreach (GFunc thread_func,
|
||||
gpointer user_data);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_ONCE_STATUS_NOTCALLED,
|
||||
G_ONCE_STATUS_PROGRESS,
|
||||
G_ONCE_STATUS_READY
|
||||
} GOnceStatus;
|
||||
|
||||
typedef struct _GOnce GOnce;
|
||||
struct _GOnce
|
||||
{
|
||||
volatile GOnceStatus status;
|
||||
volatile gpointer retval;
|
||||
};
|
||||
|
||||
#define G_ONCE_INIT { G_ONCE_STATUS_NOTCALLED, NULL }
|
||||
|
||||
gpointer g_once_impl (GOnce *once, GThreadFunc func, gpointer arg);
|
||||
|
||||
#ifdef G_ATOMIC_OP_MEMORY_BARRIER_NEEDED
|
||||
# define g_once(once, func, arg) g_once_impl ((once), (func), (arg))
|
||||
#else /* !G_ATOMIC_OP_MEMORY_BARRIER_NEEDED*/
|
||||
# define g_once(once, func, arg) \
|
||||
(((once)->status == G_ONCE_STATUS_READY) ? \
|
||||
(once)->retval : \
|
||||
g_once_impl ((once), (func), (arg)))
|
||||
#endif /* G_ATOMIC_OP_MEMORY_BARRIER_NEEDED */
|
||||
|
||||
/* initialize-once guards, keyed by value_location */
|
||||
G_INLINE_FUNC gboolean g_once_init_enter (volatile gsize *value_location);
|
||||
gboolean g_once_init_enter_impl (volatile gsize *value_location);
|
||||
void g_once_init_leave (volatile gsize *value_location,
|
||||
gsize initialization_value);
|
||||
#if defined (G_CAN_INLINE) || defined (__G_THREAD_C__)
|
||||
G_INLINE_FUNC gboolean
|
||||
g_once_init_enter (volatile gsize *value_location)
|
||||
{
|
||||
if G_LIKELY ((gpointer) g_atomic_pointer_get (value_location) != NULL)
|
||||
return FALSE;
|
||||
else
|
||||
return g_once_init_enter_impl (value_location);
|
||||
}
|
||||
#endif /* G_CAN_INLINE || __G_THREAD_C__ */
|
||||
|
||||
/* these are some convenience macros that expand to nothing if GLib
|
||||
* was configured with --disable-threads. for using StaticMutexes,
|
||||
* you define them with G_LOCK_DEFINE_STATIC (name) or G_LOCK_DEFINE (name)
|
||||
* if you need to export the mutex. With G_LOCK_EXTERN (name) you can
|
||||
* declare such an globally defined lock. name is a unique identifier
|
||||
* for the protected varibale or code portion. locking, testing and
|
||||
* unlocking of such mutexes can be done with G_LOCK(), G_UNLOCK() and
|
||||
* G_TRYLOCK() respectively.
|
||||
*/
|
||||
extern void glib_dummy_decl (void);
|
||||
#define G_LOCK_NAME(name) g__ ## name ## _lock
|
||||
#ifdef G_THREADS_ENABLED
|
||||
# define G_LOCK_DEFINE_STATIC(name) static G_LOCK_DEFINE (name)
|
||||
# define G_LOCK_DEFINE(name) \
|
||||
GStaticMutex G_LOCK_NAME (name) = G_STATIC_MUTEX_INIT
|
||||
# define G_LOCK_EXTERN(name) extern GStaticMutex G_LOCK_NAME (name)
|
||||
|
||||
# ifdef G_DEBUG_LOCKS
|
||||
# define G_LOCK(name) G_STMT_START{ \
|
||||
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
|
||||
"file %s: line %d (%s): locking: %s ", \
|
||||
__FILE__, __LINE__, G_STRFUNC, \
|
||||
#name); \
|
||||
g_static_mutex_lock (&G_LOCK_NAME (name)); \
|
||||
}G_STMT_END
|
||||
# define G_UNLOCK(name) G_STMT_START{ \
|
||||
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
|
||||
"file %s: line %d (%s): unlocking: %s ", \
|
||||
__FILE__, __LINE__, G_STRFUNC, \
|
||||
#name); \
|
||||
g_static_mutex_unlock (&G_LOCK_NAME (name)); \
|
||||
}G_STMT_END
|
||||
# define G_TRYLOCK(name) \
|
||||
(g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
|
||||
"file %s: line %d (%s): try locking: %s ", \
|
||||
__FILE__, __LINE__, G_STRFUNC, \
|
||||
#name), g_static_mutex_trylock (&G_LOCK_NAME (name)))
|
||||
# else /* !G_DEBUG_LOCKS */
|
||||
# define G_LOCK(name) g_static_mutex_lock (&G_LOCK_NAME (name))
|
||||
# define G_UNLOCK(name) g_static_mutex_unlock (&G_LOCK_NAME (name))
|
||||
# define G_TRYLOCK(name) g_static_mutex_trylock (&G_LOCK_NAME (name))
|
||||
# endif /* !G_DEBUG_LOCKS */
|
||||
#else /* !G_THREADS_ENABLED */
|
||||
# define G_LOCK_DEFINE_STATIC(name) extern void glib_dummy_decl (void)
|
||||
# define G_LOCK_DEFINE(name) extern void glib_dummy_decl (void)
|
||||
# define G_LOCK_EXTERN(name) extern void glib_dummy_decl (void)
|
||||
# define G_LOCK(name)
|
||||
# define G_UNLOCK(name)
|
||||
# define G_TRYLOCK(name) (TRUE)
|
||||
#endif /* !G_THREADS_ENABLED */
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_THREAD_H__ */
|
|
@ -1,114 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_THREADPOOL_H__
|
||||
#define __G_THREADPOOL_H__
|
||||
|
||||
#include <glib/gthread.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GThreadPool GThreadPool;
|
||||
|
||||
/* Thread Pools
|
||||
*/
|
||||
|
||||
/* The real GThreadPool is bigger, so you may only create a thread
|
||||
* pool with the constructor function */
|
||||
struct _GThreadPool
|
||||
{
|
||||
GFunc func;
|
||||
gpointer user_data;
|
||||
gboolean exclusive;
|
||||
};
|
||||
|
||||
/* Get a thread pool with the function func, at most max_threads may
|
||||
* run at a time (max_threads == -1 means no limit), exclusive == TRUE
|
||||
* means, that the threads shouldn't be shared and that they will be
|
||||
* prestarted (otherwise they are started as needed) user_data is the
|
||||
* 2nd argument to the func */
|
||||
GThreadPool* g_thread_pool_new (GFunc func,
|
||||
gpointer user_data,
|
||||
gint max_threads,
|
||||
gboolean exclusive,
|
||||
GError **error);
|
||||
|
||||
/* Push new data into the thread pool. This task is assigned to a thread later
|
||||
* (when the maximal number of threads is reached for that pool) or now
|
||||
* (otherwise). If necessary a new thread will be started. The function
|
||||
* returns immediatly */
|
||||
void g_thread_pool_push (GThreadPool *pool,
|
||||
gpointer data,
|
||||
GError **error);
|
||||
|
||||
/* Set the number of threads, which can run concurrently for that pool, -1
|
||||
* means no limit. 0 means has the effect, that the pool won't process
|
||||
* requests until the limit is set higher again */
|
||||
void g_thread_pool_set_max_threads (GThreadPool *pool,
|
||||
gint max_threads,
|
||||
GError **error);
|
||||
gint g_thread_pool_get_max_threads (GThreadPool *pool);
|
||||
|
||||
/* Get the number of threads assigned to that pool. This number doesn't
|
||||
* necessarily represent the number of working threads in that pool */
|
||||
guint g_thread_pool_get_num_threads (GThreadPool *pool);
|
||||
|
||||
/* Get the number of unprocessed items in the pool */
|
||||
guint g_thread_pool_unprocessed (GThreadPool *pool);
|
||||
|
||||
/* Free the pool, immediate means, that all unprocessed items in the queue
|
||||
* wont be processed, wait means, that the function doesn't return immediatly,
|
||||
* but after all threads in the pool are ready processing items. immediate
|
||||
* does however not mean, that threads are killed. */
|
||||
void g_thread_pool_free (GThreadPool *pool,
|
||||
gboolean immediate,
|
||||
gboolean wait_);
|
||||
|
||||
/* Set the maximal number of unused threads before threads will be stopped by
|
||||
* GLib, -1 means no limit */
|
||||
void g_thread_pool_set_max_unused_threads (gint max_threads);
|
||||
gint g_thread_pool_get_max_unused_threads (void);
|
||||
guint g_thread_pool_get_num_unused_threads (void);
|
||||
|
||||
/* Stop all currently unused threads, but leave the limit untouched */
|
||||
void g_thread_pool_stop_unused_threads (void);
|
||||
|
||||
/* Set sort function for priority threading */
|
||||
void g_thread_pool_set_sort_function (GThreadPool *pool,
|
||||
GCompareDataFunc func,
|
||||
gpointer user_data);
|
||||
|
||||
/* Set maximum time a thread can be idle in the pool before it is stopped */
|
||||
void g_thread_pool_set_max_idle_time (guint interval);
|
||||
guint g_thread_pool_get_max_idle_time (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_THREADPOOL_H__ */
|
|
@ -1,68 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
*
|
||||
* gthreadprivate.h - GLib internal thread system related declarations.
|
||||
*
|
||||
* Copyright (C) 2003 Sebastian Wilhelmi
|
||||
*
|
||||
* The Gnome Library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* The Gnome 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with the Gnome Library; see the file COPYING.LIB. If not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __G_THREADPRIVATE_H__
|
||||
#define __G_THREADPRIVATE_H__
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* System thread identifier comparision and assignment */
|
||||
#if GLIB_SIZEOF_SYSTEM_THREAD == SIZEOF_VOID_P
|
||||
# define g_system_thread_equal_simple(thread1, thread2) \
|
||||
((thread1).dummy_pointer == (thread2).dummy_pointer)
|
||||
# define g_system_thread_assign(dest, src) \
|
||||
((dest).dummy_pointer = (src).dummy_pointer)
|
||||
#else /* GLIB_SIZEOF_SYSTEM_THREAD != SIZEOF_VOID_P */
|
||||
# define g_system_thread_equal_simple(thread1, thread2) \
|
||||
(memcmp (&(thread1), &(thread2), GLIB_SIZEOF_SYSTEM_THREAD) == 0)
|
||||
# define g_system_thread_assign(dest, src) \
|
||||
(memcpy (&(dest), &(src), GLIB_SIZEOF_SYSTEM_THREAD))
|
||||
#endif /* GLIB_SIZEOF_SYSTEM_THREAD == SIZEOF_VOID_P */
|
||||
|
||||
#define g_system_thread_equal(thread1, thread2) \
|
||||
(g_thread_functions_for_glib_use.thread_equal ? \
|
||||
g_thread_functions_for_glib_use.thread_equal (&(thread1), &(thread2)) :\
|
||||
g_system_thread_equal_simple((thread1), (thread2)))
|
||||
|
||||
/* Is called from gthread/gthread-impl.c */
|
||||
void g_thread_init_glib (void);
|
||||
|
||||
/* base initializers, may only use g_mutex_new(), g_cond_new() */
|
||||
G_GNUC_INTERNAL void _g_mem_thread_init_noprivate_nomessage (void);
|
||||
/* initializers that may also use g_private_new() */
|
||||
G_GNUC_INTERNAL void _g_slice_thread_init_nomessage (void);
|
||||
G_GNUC_INTERNAL void _g_messages_thread_init_nomessage (void);
|
||||
|
||||
/* full fledged initializers */
|
||||
G_GNUC_INTERNAL void _g_convert_thread_init (void);
|
||||
G_GNUC_INTERNAL void _g_rand_thread_init (void);
|
||||
G_GNUC_INTERNAL void _g_main_thread_init (void);
|
||||
G_GNUC_INTERNAL void _g_atomic_thread_init (void);
|
||||
G_GNUC_INTERNAL void _g_utils_thread_init (void);
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
G_GNUC_INTERNAL void _g_win32_thread_init (void);
|
||||
#endif /* G_OS_WIN32 */
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_THREADPRIVATE_H__ */
|
|
@ -1,65 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_TIMER_H__
|
||||
#define __G_TIMER_H__
|
||||
|
||||
#include <glib/gtypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* Timer
|
||||
*/
|
||||
|
||||
/* microseconds per second */
|
||||
typedef struct _GTimer GTimer;
|
||||
|
||||
#define G_USEC_PER_SEC 1000000
|
||||
|
||||
GTimer* g_timer_new (void);
|
||||
void g_timer_destroy (GTimer *timer);
|
||||
void g_timer_start (GTimer *timer);
|
||||
void g_timer_stop (GTimer *timer);
|
||||
void g_timer_reset (GTimer *timer);
|
||||
void g_timer_continue (GTimer *timer);
|
||||
gdouble g_timer_elapsed (GTimer *timer,
|
||||
gulong *microseconds);
|
||||
|
||||
void g_usleep (gulong microseconds);
|
||||
|
||||
void g_time_val_add (GTimeVal *time_,
|
||||
glong microseconds);
|
||||
gboolean g_time_val_from_iso8601 (const gchar *iso_date,
|
||||
GTimeVal *time_);
|
||||
gchar* g_time_val_to_iso8601 (GTimeVal *time_) G_GNUC_MALLOC;
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_TIMER_H__ */
|
|
@ -1,89 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_TREE_H__
|
||||
#define __G_TREE_H__
|
||||
|
||||
#include <glib/gnode.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GTree GTree;
|
||||
|
||||
typedef gboolean (*GTraverseFunc) (gpointer key,
|
||||
gpointer value,
|
||||
gpointer data);
|
||||
|
||||
/* Balanced binary trees
|
||||
*/
|
||||
GTree* g_tree_new (GCompareFunc key_compare_func);
|
||||
GTree* g_tree_new_with_data (GCompareDataFunc key_compare_func,
|
||||
gpointer key_compare_data);
|
||||
GTree* g_tree_new_full (GCompareDataFunc key_compare_func,
|
||||
gpointer key_compare_data,
|
||||
GDestroyNotify key_destroy_func,
|
||||
GDestroyNotify value_destroy_func);
|
||||
void g_tree_destroy (GTree *tree);
|
||||
void g_tree_insert (GTree *tree,
|
||||
gpointer key,
|
||||
gpointer value);
|
||||
void g_tree_replace (GTree *tree,
|
||||
gpointer key,
|
||||
gpointer value);
|
||||
gboolean g_tree_remove (GTree *tree,
|
||||
gconstpointer key);
|
||||
gboolean g_tree_steal (GTree *tree,
|
||||
gconstpointer key);
|
||||
gpointer g_tree_lookup (GTree *tree,
|
||||
gconstpointer key);
|
||||
gboolean g_tree_lookup_extended (GTree *tree,
|
||||
gconstpointer lookup_key,
|
||||
gpointer *orig_key,
|
||||
gpointer *value);
|
||||
void g_tree_foreach (GTree *tree,
|
||||
GTraverseFunc func,
|
||||
gpointer user_data);
|
||||
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
void g_tree_traverse (GTree *tree,
|
||||
GTraverseFunc traverse_func,
|
||||
GTraverseType traverse_type,
|
||||
gpointer user_data);
|
||||
#endif /* G_DISABLE_DEPRECATED */
|
||||
|
||||
gpointer g_tree_search (GTree *tree,
|
||||
GCompareFunc search_func,
|
||||
gconstpointer user_data);
|
||||
gint g_tree_height (GTree *tree);
|
||||
gint g_tree_nnodes (GTree *tree);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_TREE_H__ */
|
|
@ -1,433 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_TYPES_H__
|
||||
#define __G_TYPES_H__
|
||||
|
||||
#include <glibconfig.h>
|
||||
#include <glib/gmacros.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* Provide type definitions for commonly used types.
|
||||
* These are useful because a "gint8" can be adjusted
|
||||
* to be 1 byte (8 bits) on all platforms. Similarly and
|
||||
* more importantly, "gint32" can be adjusted to be
|
||||
* 4 bytes (32 bits) on all platforms.
|
||||
*/
|
||||
|
||||
typedef char gchar;
|
||||
typedef short gshort;
|
||||
typedef long glong;
|
||||
typedef int gint;
|
||||
typedef gint gboolean;
|
||||
|
||||
typedef unsigned char guchar;
|
||||
typedef unsigned short gushort;
|
||||
typedef unsigned long gulong;
|
||||
typedef unsigned int guint;
|
||||
|
||||
typedef float gfloat;
|
||||
typedef double gdouble;
|
||||
|
||||
/* Define min and max constants for the fixed size numerical types */
|
||||
#define G_MININT8 ((gint8) 0x80)
|
||||
#define G_MAXINT8 ((gint8) 0x7f)
|
||||
#define G_MAXUINT8 ((guint8) 0xff)
|
||||
|
||||
#define G_MININT16 ((gint16) 0x8000)
|
||||
#define G_MAXINT16 ((gint16) 0x7fff)
|
||||
#define G_MAXUINT16 ((guint16) 0xffff)
|
||||
|
||||
#define G_MININT32 ((gint32) 0x80000000)
|
||||
#define G_MAXINT32 ((gint32) 0x7fffffff)
|
||||
#define G_MAXUINT32 ((guint32) 0xffffffff)
|
||||
|
||||
#define G_MININT64 ((gint64) G_GINT64_CONSTANT(0x8000000000000000))
|
||||
#define G_MAXINT64 G_GINT64_CONSTANT(0x7fffffffffffffff)
|
||||
#define G_MAXUINT64 G_GINT64_CONSTANT(0xffffffffffffffffU)
|
||||
|
||||
typedef void* gpointer;
|
||||
typedef const void *gconstpointer;
|
||||
|
||||
typedef gint (*GCompareFunc) (gconstpointer a,
|
||||
gconstpointer b);
|
||||
typedef gint (*GCompareDataFunc) (gconstpointer a,
|
||||
gconstpointer b,
|
||||
gpointer user_data);
|
||||
typedef gboolean (*GEqualFunc) (gconstpointer a,
|
||||
gconstpointer b);
|
||||
typedef void (*GDestroyNotify) (gpointer data);
|
||||
typedef void (*GFunc) (gpointer data,
|
||||
gpointer user_data);
|
||||
typedef guint (*GHashFunc) (gconstpointer key);
|
||||
typedef void (*GHFunc) (gpointer key,
|
||||
gpointer value,
|
||||
gpointer user_data);
|
||||
typedef void (*GFreeFunc) (gpointer data);
|
||||
typedef const gchar * (*GTranslateFunc) (const gchar *str,
|
||||
gpointer data);
|
||||
|
||||
|
||||
/* Define some mathematical constants that aren't available
|
||||
* symbolically in some strict ISO C implementations.
|
||||
*
|
||||
* Note that the large number of digits used in these definitions
|
||||
* doesn't imply that GLib or current computers in general would be
|
||||
* able to handle floating point numbers with an accuracy like this.
|
||||
* It's mostly an exercise in futility and future proofing. For
|
||||
* extended precision floating point support, look somewhere else
|
||||
* than GLib.
|
||||
*/
|
||||
#define G_E 2.7182818284590452353602874713526624977572470937000
|
||||
#define G_LN2 0.69314718055994530941723212145817656807550013436026
|
||||
#define G_LN10 2.3025850929940456840179914546843642076011014886288
|
||||
#define G_PI 3.1415926535897932384626433832795028841971693993751
|
||||
#define G_PI_2 1.5707963267948966192313216916397514420985846996876
|
||||
#define G_PI_4 0.78539816339744830961566084581987572104929234984378
|
||||
#define G_SQRT2 1.4142135623730950488016887242096980785696718753769
|
||||
|
||||
/* Portable endian checks and conversions
|
||||
*
|
||||
* glibconfig.h defines G_BYTE_ORDER which expands to one of
|
||||
* the below macros.
|
||||
*/
|
||||
#define G_LITTLE_ENDIAN 1234
|
||||
#define G_BIG_ENDIAN 4321
|
||||
#define G_PDP_ENDIAN 3412 /* unused, need specific PDP check */
|
||||
|
||||
|
||||
/* Basic bit swapping functions
|
||||
*/
|
||||
#define GUINT16_SWAP_LE_BE_CONSTANT(val) ((guint16) ( \
|
||||
(guint16) ((guint16) (val) >> 8) | \
|
||||
(guint16) ((guint16) (val) << 8)))
|
||||
|
||||
#define GUINT32_SWAP_LE_BE_CONSTANT(val) ((guint32) ( \
|
||||
(((guint32) (val) & (guint32) 0x000000ffU) << 24) | \
|
||||
(((guint32) (val) & (guint32) 0x0000ff00U) << 8) | \
|
||||
(((guint32) (val) & (guint32) 0x00ff0000U) >> 8) | \
|
||||
(((guint32) (val) & (guint32) 0xff000000U) >> 24)))
|
||||
|
||||
#define GUINT64_SWAP_LE_BE_CONSTANT(val) ((guint64) ( \
|
||||
(((guint64) (val) & \
|
||||
(guint64) G_GINT64_CONSTANT (0x00000000000000ffU)) << 56) | \
|
||||
(((guint64) (val) & \
|
||||
(guint64) G_GINT64_CONSTANT (0x000000000000ff00U)) << 40) | \
|
||||
(((guint64) (val) & \
|
||||
(guint64) G_GINT64_CONSTANT (0x0000000000ff0000U)) << 24) | \
|
||||
(((guint64) (val) & \
|
||||
(guint64) G_GINT64_CONSTANT (0x00000000ff000000U)) << 8) | \
|
||||
(((guint64) (val) & \
|
||||
(guint64) G_GINT64_CONSTANT (0x000000ff00000000U)) >> 8) | \
|
||||
(((guint64) (val) & \
|
||||
(guint64) G_GINT64_CONSTANT (0x0000ff0000000000U)) >> 24) | \
|
||||
(((guint64) (val) & \
|
||||
(guint64) G_GINT64_CONSTANT (0x00ff000000000000U)) >> 40) | \
|
||||
(((guint64) (val) & \
|
||||
(guint64) G_GINT64_CONSTANT (0xff00000000000000U)) >> 56)))
|
||||
|
||||
/* Arch specific stuff for speed
|
||||
*/
|
||||
#if defined (__GNUC__) && (__GNUC__ >= 2) && defined (__OPTIMIZE__)
|
||||
# if defined (__i386__)
|
||||
# define GUINT16_SWAP_LE_BE_IA32(val) \
|
||||
(__extension__ \
|
||||
({ register guint16 __v, __x = ((guint16) (val)); \
|
||||
if (__builtin_constant_p (__x)) \
|
||||
__v = GUINT16_SWAP_LE_BE_CONSTANT (__x); \
|
||||
else \
|
||||
__asm__ ("rorw $8, %w0" \
|
||||
: "=r" (__v) \
|
||||
: "0" (__x) \
|
||||
: "cc"); \
|
||||
__v; }))
|
||||
# if !defined (__i486__) && !defined (__i586__) \
|
||||
&& !defined (__pentium__) && !defined (__i686__) \
|
||||
&& !defined (__pentiumpro__) && !defined (__pentium4__)
|
||||
# define GUINT32_SWAP_LE_BE_IA32(val) \
|
||||
(__extension__ \
|
||||
({ register guint32 __v, __x = ((guint32) (val)); \
|
||||
if (__builtin_constant_p (__x)) \
|
||||
__v = GUINT32_SWAP_LE_BE_CONSTANT (__x); \
|
||||
else \
|
||||
__asm__ ("rorw $8, %w0\n\t" \
|
||||
"rorl $16, %0\n\t" \
|
||||
"rorw $8, %w0" \
|
||||
: "=r" (__v) \
|
||||
: "0" (__x) \
|
||||
: "cc"); \
|
||||
__v; }))
|
||||
# else /* 486 and higher has bswap */
|
||||
# define GUINT32_SWAP_LE_BE_IA32(val) \
|
||||
(__extension__ \
|
||||
({ register guint32 __v, __x = ((guint32) (val)); \
|
||||
if (__builtin_constant_p (__x)) \
|
||||
__v = GUINT32_SWAP_LE_BE_CONSTANT (__x); \
|
||||
else \
|
||||
__asm__ ("bswap %0" \
|
||||
: "=r" (__v) \
|
||||
: "0" (__x)); \
|
||||
__v; }))
|
||||
# endif /* processor specific 32-bit stuff */
|
||||
# define GUINT64_SWAP_LE_BE_IA32(val) \
|
||||
(__extension__ \
|
||||
({ union { guint64 __ll; \
|
||||
guint32 __l[2]; } __w, __r; \
|
||||
__w.__ll = ((guint64) (val)); \
|
||||
if (__builtin_constant_p (__w.__ll)) \
|
||||
__r.__ll = GUINT64_SWAP_LE_BE_CONSTANT (__w.__ll); \
|
||||
else \
|
||||
{ \
|
||||
__r.__l[0] = GUINT32_SWAP_LE_BE (__w.__l[1]); \
|
||||
__r.__l[1] = GUINT32_SWAP_LE_BE (__w.__l[0]); \
|
||||
} \
|
||||
__r.__ll; }))
|
||||
/* Possibly just use the constant version and let gcc figure it out? */
|
||||
# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_IA32 (val))
|
||||
# define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_IA32 (val))
|
||||
# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_IA32 (val))
|
||||
# elif defined (__ia64__)
|
||||
# define GUINT16_SWAP_LE_BE_IA64(val) \
|
||||
(__extension__ \
|
||||
({ register guint16 __v, __x = ((guint16) (val)); \
|
||||
if (__builtin_constant_p (__x)) \
|
||||
__v = GUINT16_SWAP_LE_BE_CONSTANT (__x); \
|
||||
else \
|
||||
__asm__ __volatile__ ("shl %0 = %1, 48 ;;" \
|
||||
"mux1 %0 = %0, @rev ;;" \
|
||||
: "=r" (__v) \
|
||||
: "r" (__x)); \
|
||||
__v; }))
|
||||
# define GUINT32_SWAP_LE_BE_IA64(val) \
|
||||
(__extension__ \
|
||||
({ register guint32 __v, __x = ((guint32) (val)); \
|
||||
if (__builtin_constant_p (__x)) \
|
||||
__v = GUINT32_SWAP_LE_BE_CONSTANT (__x); \
|
||||
else \
|
||||
__asm__ __volatile__ ("shl %0 = %1, 32 ;;" \
|
||||
"mux1 %0 = %0, @rev ;;" \
|
||||
: "=r" (__v) \
|
||||
: "r" (__x)); \
|
||||
__v; }))
|
||||
# define GUINT64_SWAP_LE_BE_IA64(val) \
|
||||
(__extension__ \
|
||||
({ register guint64 __v, __x = ((guint64) (val)); \
|
||||
if (__builtin_constant_p (__x)) \
|
||||
__v = GUINT64_SWAP_LE_BE_CONSTANT (__x); \
|
||||
else \
|
||||
__asm__ __volatile__ ("mux1 %0 = %1, @rev ;;" \
|
||||
: "=r" (__v) \
|
||||
: "r" (__x)); \
|
||||
__v; }))
|
||||
# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_IA64 (val))
|
||||
# define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_IA64 (val))
|
||||
# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_IA64 (val))
|
||||
# elif defined (__x86_64__)
|
||||
# define GUINT32_SWAP_LE_BE_X86_64(val) \
|
||||
(__extension__ \
|
||||
({ register guint32 __v, __x = ((guint32) (val)); \
|
||||
if (__builtin_constant_p (__x)) \
|
||||
__v = GUINT32_SWAP_LE_BE_CONSTANT (__x); \
|
||||
else \
|
||||
__asm__ ("bswapl %0" \
|
||||
: "=r" (__v) \
|
||||
: "0" (__x)); \
|
||||
__v; }))
|
||||
# define GUINT64_SWAP_LE_BE_X86_64(val) \
|
||||
(__extension__ \
|
||||
({ register guint64 __v, __x = ((guint64) (val)); \
|
||||
if (__builtin_constant_p (__x)) \
|
||||
__v = GUINT64_SWAP_LE_BE_CONSTANT (__x); \
|
||||
else \
|
||||
__asm__ ("bswapq %0" \
|
||||
: "=r" (__v) \
|
||||
: "0" (__x)); \
|
||||
__v; }))
|
||||
/* gcc seems to figure out optimal code for this on its own */
|
||||
# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_CONSTANT (val))
|
||||
# define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_X86_64 (val))
|
||||
# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_X86_64 (val))
|
||||
# else /* generic gcc */
|
||||
# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_CONSTANT (val))
|
||||
# define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_CONSTANT (val))
|
||||
# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_CONSTANT (val))
|
||||
# endif
|
||||
#else /* generic */
|
||||
# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_CONSTANT (val))
|
||||
# define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_CONSTANT (val))
|
||||
# define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_CONSTANT (val))
|
||||
#endif /* generic */
|
||||
|
||||
#define GUINT16_SWAP_LE_PDP(val) ((guint16) (val))
|
||||
#define GUINT16_SWAP_BE_PDP(val) (GUINT16_SWAP_LE_BE (val))
|
||||
#define GUINT32_SWAP_LE_PDP(val) ((guint32) ( \
|
||||
(((guint32) (val) & (guint32) 0x0000ffffU) << 16) | \
|
||||
(((guint32) (val) & (guint32) 0xffff0000U) >> 16)))
|
||||
#define GUINT32_SWAP_BE_PDP(val) ((guint32) ( \
|
||||
(((guint32) (val) & (guint32) 0x00ff00ffU) << 8) | \
|
||||
(((guint32) (val) & (guint32) 0xff00ff00U) >> 8)))
|
||||
|
||||
/* The G*_TO_?E() macros are defined in glibconfig.h.
|
||||
* The transformation is symmetric, so the FROM just maps to the TO.
|
||||
*/
|
||||
#define GINT16_FROM_LE(val) (GINT16_TO_LE (val))
|
||||
#define GUINT16_FROM_LE(val) (GUINT16_TO_LE (val))
|
||||
#define GINT16_FROM_BE(val) (GINT16_TO_BE (val))
|
||||
#define GUINT16_FROM_BE(val) (GUINT16_TO_BE (val))
|
||||
#define GINT32_FROM_LE(val) (GINT32_TO_LE (val))
|
||||
#define GUINT32_FROM_LE(val) (GUINT32_TO_LE (val))
|
||||
#define GINT32_FROM_BE(val) (GINT32_TO_BE (val))
|
||||
#define GUINT32_FROM_BE(val) (GUINT32_TO_BE (val))
|
||||
|
||||
#define GINT64_FROM_LE(val) (GINT64_TO_LE (val))
|
||||
#define GUINT64_FROM_LE(val) (GUINT64_TO_LE (val))
|
||||
#define GINT64_FROM_BE(val) (GINT64_TO_BE (val))
|
||||
#define GUINT64_FROM_BE(val) (GUINT64_TO_BE (val))
|
||||
|
||||
#define GLONG_FROM_LE(val) (GLONG_TO_LE (val))
|
||||
#define GULONG_FROM_LE(val) (GULONG_TO_LE (val))
|
||||
#define GLONG_FROM_BE(val) (GLONG_TO_BE (val))
|
||||
#define GULONG_FROM_BE(val) (GULONG_TO_BE (val))
|
||||
|
||||
#define GINT_FROM_LE(val) (GINT_TO_LE (val))
|
||||
#define GUINT_FROM_LE(val) (GUINT_TO_LE (val))
|
||||
#define GINT_FROM_BE(val) (GINT_TO_BE (val))
|
||||
#define GUINT_FROM_BE(val) (GUINT_TO_BE (val))
|
||||
|
||||
|
||||
/* Portable versions of host-network order stuff
|
||||
*/
|
||||
#define g_ntohl(val) (GUINT32_FROM_BE (val))
|
||||
#define g_ntohs(val) (GUINT16_FROM_BE (val))
|
||||
#define g_htonl(val) (GUINT32_TO_BE (val))
|
||||
#define g_htons(val) (GUINT16_TO_BE (val))
|
||||
|
||||
/* IEEE Standard 754 Single Precision Storage Format (gfloat):
|
||||
*
|
||||
* 31 30 23 22 0
|
||||
* +--------+---------------+---------------+
|
||||
* | s 1bit | e[30:23] 8bit | f[22:0] 23bit |
|
||||
* +--------+---------------+---------------+
|
||||
* B0------------------->B1------->B2-->B3-->
|
||||
*
|
||||
* IEEE Standard 754 Double Precision Storage Format (gdouble):
|
||||
*
|
||||
* 63 62 52 51 32 31 0
|
||||
* +--------+----------------+----------------+ +---------------+
|
||||
* | s 1bit | e[62:52] 11bit | f[51:32] 20bit | | f[31:0] 32bit |
|
||||
* +--------+----------------+----------------+ +---------------+
|
||||
* B0--------------->B1---------->B2--->B3----> B4->B5->B6->B7->
|
||||
*/
|
||||
/* subtract from biased_exponent to form base2 exponent (normal numbers) */
|
||||
typedef union _GDoubleIEEE754 GDoubleIEEE754;
|
||||
typedef union _GFloatIEEE754 GFloatIEEE754;
|
||||
#define G_IEEE754_FLOAT_BIAS (127)
|
||||
#define G_IEEE754_DOUBLE_BIAS (1023)
|
||||
/* multiply with base2 exponent to get base10 exponent (normal numbers) */
|
||||
#define G_LOG_2_BASE_10 (0.30102999566398119521)
|
||||
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
||||
union _GFloatIEEE754
|
||||
{
|
||||
gfloat v_float;
|
||||
struct {
|
||||
guint mantissa : 23;
|
||||
guint biased_exponent : 8;
|
||||
guint sign : 1;
|
||||
} mpn;
|
||||
};
|
||||
union _GDoubleIEEE754
|
||||
{
|
||||
gdouble v_double;
|
||||
struct {
|
||||
guint mantissa_low : 32;
|
||||
guint mantissa_high : 20;
|
||||
guint biased_exponent : 11;
|
||||
guint sign : 1;
|
||||
} mpn;
|
||||
};
|
||||
#elif G_BYTE_ORDER == G_BIG_ENDIAN
|
||||
union _GFloatIEEE754
|
||||
{
|
||||
gfloat v_float;
|
||||
struct {
|
||||
guint sign : 1;
|
||||
guint biased_exponent : 8;
|
||||
guint mantissa : 23;
|
||||
} mpn;
|
||||
};
|
||||
union _GDoubleIEEE754
|
||||
{
|
||||
gdouble v_double;
|
||||
struct {
|
||||
guint sign : 1;
|
||||
guint biased_exponent : 11;
|
||||
guint mantissa_high : 20;
|
||||
guint mantissa_low : 32;
|
||||
} mpn;
|
||||
};
|
||||
#else /* !G_LITTLE_ENDIAN && !G_BIG_ENDIAN */
|
||||
#error unknown ENDIAN type
|
||||
#endif /* !G_LITTLE_ENDIAN && !G_BIG_ENDIAN */
|
||||
|
||||
typedef struct _GTimeVal GTimeVal;
|
||||
|
||||
struct _GTimeVal
|
||||
{
|
||||
glong tv_sec;
|
||||
glong tv_usec;
|
||||
};
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
/* We prefix variable declarations so they can
|
||||
* properly get exported in Windows DLLs.
|
||||
*/
|
||||
#ifndef GLIB_VAR
|
||||
# ifdef G_PLATFORM_WIN32
|
||||
# ifdef GLIB_STATIC_COMPILATION
|
||||
# define GLIB_VAR extern
|
||||
# else /* !GLIB_STATIC_COMPILATION */
|
||||
# ifdef GLIB_COMPILATION
|
||||
# ifdef DLL_EXPORT
|
||||
# define GLIB_VAR __declspec(dllexport)
|
||||
# else /* !DLL_EXPORT */
|
||||
# define GLIB_VAR extern
|
||||
# endif /* !DLL_EXPORT */
|
||||
# else /* !GLIB_COMPILATION */
|
||||
# define GLIB_VAR extern __declspec(dllimport)
|
||||
# endif /* !GLIB_COMPILATION */
|
||||
# endif /* !GLIB_STATIC_COMPILATION */
|
||||
# else /* !G_PLATFORM_WIN32 */
|
||||
# define GLIB_VAR extern
|
||||
# endif /* !G_PLATFORM_WIN32 */
|
||||
#endif /* GLIB_VAR */
|
||||
|
||||
#endif /* __G_TYPES_H__ */
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,404 +0,0 @@
|
|||
/* gunicode.h - Unicode manipulation functions
|
||||
*
|
||||
* Copyright (C) 1999, 2000 Tom Tromey
|
||||
* Copyright 2000, 2005 Red Hat, Inc.
|
||||
*
|
||||
* The Gnome Library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* The Gnome 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with the Gnome Library; see the file COPYING.LIB. If not,
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_UNICODE_H__
|
||||
#define __G_UNICODE_H__
|
||||
|
||||
#include <glib/gerror.h>
|
||||
#include <glib/gtypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef guint32 gunichar;
|
||||
typedef guint16 gunichar2;
|
||||
|
||||
/* These are the possible character classifications.
|
||||
* See http://www.unicode.org/Public/UNIDATA/UCD.html#General_Category_Values
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
G_UNICODE_CONTROL,
|
||||
G_UNICODE_FORMAT,
|
||||
G_UNICODE_UNASSIGNED,
|
||||
G_UNICODE_PRIVATE_USE,
|
||||
G_UNICODE_SURROGATE,
|
||||
G_UNICODE_LOWERCASE_LETTER,
|
||||
G_UNICODE_MODIFIER_LETTER,
|
||||
G_UNICODE_OTHER_LETTER,
|
||||
G_UNICODE_TITLECASE_LETTER,
|
||||
G_UNICODE_UPPERCASE_LETTER,
|
||||
G_UNICODE_COMBINING_MARK,
|
||||
G_UNICODE_ENCLOSING_MARK,
|
||||
G_UNICODE_NON_SPACING_MARK,
|
||||
G_UNICODE_DECIMAL_NUMBER,
|
||||
G_UNICODE_LETTER_NUMBER,
|
||||
G_UNICODE_OTHER_NUMBER,
|
||||
G_UNICODE_CONNECT_PUNCTUATION,
|
||||
G_UNICODE_DASH_PUNCTUATION,
|
||||
G_UNICODE_CLOSE_PUNCTUATION,
|
||||
G_UNICODE_FINAL_PUNCTUATION,
|
||||
G_UNICODE_INITIAL_PUNCTUATION,
|
||||
G_UNICODE_OTHER_PUNCTUATION,
|
||||
G_UNICODE_OPEN_PUNCTUATION,
|
||||
G_UNICODE_CURRENCY_SYMBOL,
|
||||
G_UNICODE_MODIFIER_SYMBOL,
|
||||
G_UNICODE_MATH_SYMBOL,
|
||||
G_UNICODE_OTHER_SYMBOL,
|
||||
G_UNICODE_LINE_SEPARATOR,
|
||||
G_UNICODE_PARAGRAPH_SEPARATOR,
|
||||
G_UNICODE_SPACE_SEPARATOR
|
||||
} GUnicodeType;
|
||||
|
||||
/* These are the possible line break classifications.
|
||||
* Note that new types may be added in the future.
|
||||
* Implementations may regard unknown values like G_UNICODE_BREAK_UNKNOWN
|
||||
* See http://www.unicode.org/unicode/reports/tr14/
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
G_UNICODE_BREAK_MANDATORY,
|
||||
G_UNICODE_BREAK_CARRIAGE_RETURN,
|
||||
G_UNICODE_BREAK_LINE_FEED,
|
||||
G_UNICODE_BREAK_COMBINING_MARK,
|
||||
G_UNICODE_BREAK_SURROGATE,
|
||||
G_UNICODE_BREAK_ZERO_WIDTH_SPACE,
|
||||
G_UNICODE_BREAK_INSEPARABLE,
|
||||
G_UNICODE_BREAK_NON_BREAKING_GLUE,
|
||||
G_UNICODE_BREAK_CONTINGENT,
|
||||
G_UNICODE_BREAK_SPACE,
|
||||
G_UNICODE_BREAK_AFTER,
|
||||
G_UNICODE_BREAK_BEFORE,
|
||||
G_UNICODE_BREAK_BEFORE_AND_AFTER,
|
||||
G_UNICODE_BREAK_HYPHEN,
|
||||
G_UNICODE_BREAK_NON_STARTER,
|
||||
G_UNICODE_BREAK_OPEN_PUNCTUATION,
|
||||
G_UNICODE_BREAK_CLOSE_PUNCTUATION,
|
||||
G_UNICODE_BREAK_QUOTATION,
|
||||
G_UNICODE_BREAK_EXCLAMATION,
|
||||
G_UNICODE_BREAK_IDEOGRAPHIC,
|
||||
G_UNICODE_BREAK_NUMERIC,
|
||||
G_UNICODE_BREAK_INFIX_SEPARATOR,
|
||||
G_UNICODE_BREAK_SYMBOL,
|
||||
G_UNICODE_BREAK_ALPHABETIC,
|
||||
G_UNICODE_BREAK_PREFIX,
|
||||
G_UNICODE_BREAK_POSTFIX,
|
||||
G_UNICODE_BREAK_COMPLEX_CONTEXT,
|
||||
G_UNICODE_BREAK_AMBIGUOUS,
|
||||
G_UNICODE_BREAK_UNKNOWN,
|
||||
G_UNICODE_BREAK_NEXT_LINE,
|
||||
G_UNICODE_BREAK_WORD_JOINER,
|
||||
G_UNICODE_BREAK_HANGUL_L_JAMO,
|
||||
G_UNICODE_BREAK_HANGUL_V_JAMO,
|
||||
G_UNICODE_BREAK_HANGUL_T_JAMO,
|
||||
G_UNICODE_BREAK_HANGUL_LV_SYLLABLE,
|
||||
G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE
|
||||
} GUnicodeBreakType;
|
||||
|
||||
typedef enum
|
||||
{ /* ISO 15924 code */
|
||||
G_UNICODE_SCRIPT_INVALID_CODE = -1,
|
||||
G_UNICODE_SCRIPT_COMMON = 0, /* Zyyy */
|
||||
G_UNICODE_SCRIPT_INHERITED, /* Qaai */
|
||||
G_UNICODE_SCRIPT_ARABIC, /* Arab */
|
||||
G_UNICODE_SCRIPT_ARMENIAN, /* Armn */
|
||||
G_UNICODE_SCRIPT_BENGALI, /* Beng */
|
||||
G_UNICODE_SCRIPT_BOPOMOFO, /* Bopo */
|
||||
G_UNICODE_SCRIPT_CHEROKEE, /* Cher */
|
||||
G_UNICODE_SCRIPT_COPTIC, /* Qaac */
|
||||
G_UNICODE_SCRIPT_CYRILLIC, /* Cyrl (Cyrs) */
|
||||
G_UNICODE_SCRIPT_DESERET, /* Dsrt */
|
||||
G_UNICODE_SCRIPT_DEVANAGARI, /* Deva */
|
||||
G_UNICODE_SCRIPT_ETHIOPIC, /* Ethi */
|
||||
G_UNICODE_SCRIPT_GEORGIAN, /* Geor (Geon, Geoa) */
|
||||
G_UNICODE_SCRIPT_GOTHIC, /* Goth */
|
||||
G_UNICODE_SCRIPT_GREEK, /* Grek */
|
||||
G_UNICODE_SCRIPT_GUJARATI, /* Gujr */
|
||||
G_UNICODE_SCRIPT_GURMUKHI, /* Guru */
|
||||
G_UNICODE_SCRIPT_HAN, /* Hani */
|
||||
G_UNICODE_SCRIPT_HANGUL, /* Hang */
|
||||
G_UNICODE_SCRIPT_HEBREW, /* Hebr */
|
||||
G_UNICODE_SCRIPT_HIRAGANA, /* Hira */
|
||||
G_UNICODE_SCRIPT_KANNADA, /* Knda */
|
||||
G_UNICODE_SCRIPT_KATAKANA, /* Kana */
|
||||
G_UNICODE_SCRIPT_KHMER, /* Khmr */
|
||||
G_UNICODE_SCRIPT_LAO, /* Laoo */
|
||||
G_UNICODE_SCRIPT_LATIN, /* Latn (Latf, Latg) */
|
||||
G_UNICODE_SCRIPT_MALAYALAM, /* Mlym */
|
||||
G_UNICODE_SCRIPT_MONGOLIAN, /* Mong */
|
||||
G_UNICODE_SCRIPT_MYANMAR, /* Mymr */
|
||||
G_UNICODE_SCRIPT_OGHAM, /* Ogam */
|
||||
G_UNICODE_SCRIPT_OLD_ITALIC, /* Ital */
|
||||
G_UNICODE_SCRIPT_ORIYA, /* Orya */
|
||||
G_UNICODE_SCRIPT_RUNIC, /* Runr */
|
||||
G_UNICODE_SCRIPT_SINHALA, /* Sinh */
|
||||
G_UNICODE_SCRIPT_SYRIAC, /* Syrc (Syrj, Syrn, Syre) */
|
||||
G_UNICODE_SCRIPT_TAMIL, /* Taml */
|
||||
G_UNICODE_SCRIPT_TELUGU, /* Telu */
|
||||
G_UNICODE_SCRIPT_THAANA, /* Thaa */
|
||||
G_UNICODE_SCRIPT_THAI, /* Thai */
|
||||
G_UNICODE_SCRIPT_TIBETAN, /* Tibt */
|
||||
G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL, /* Cans */
|
||||
G_UNICODE_SCRIPT_YI, /* Yiii */
|
||||
G_UNICODE_SCRIPT_TAGALOG, /* Tglg */
|
||||
G_UNICODE_SCRIPT_HANUNOO, /* Hano */
|
||||
G_UNICODE_SCRIPT_BUHID, /* Buhd */
|
||||
G_UNICODE_SCRIPT_TAGBANWA, /* Tagb */
|
||||
|
||||
/* Unicode-4.0 additions */
|
||||
G_UNICODE_SCRIPT_BRAILLE, /* Brai */
|
||||
G_UNICODE_SCRIPT_CYPRIOT, /* Cprt */
|
||||
G_UNICODE_SCRIPT_LIMBU, /* Limb */
|
||||
G_UNICODE_SCRIPT_OSMANYA, /* Osma */
|
||||
G_UNICODE_SCRIPT_SHAVIAN, /* Shaw */
|
||||
G_UNICODE_SCRIPT_LINEAR_B, /* Linb */
|
||||
G_UNICODE_SCRIPT_TAI_LE, /* Tale */
|
||||
G_UNICODE_SCRIPT_UGARITIC, /* Ugar */
|
||||
|
||||
/* Unicode-4.1 additions */
|
||||
G_UNICODE_SCRIPT_NEW_TAI_LUE, /* Talu */
|
||||
G_UNICODE_SCRIPT_BUGINESE, /* Bugi */
|
||||
G_UNICODE_SCRIPT_GLAGOLITIC, /* Glag */
|
||||
G_UNICODE_SCRIPT_TIFINAGH, /* Tfng */
|
||||
G_UNICODE_SCRIPT_SYLOTI_NAGRI, /* Sylo */
|
||||
G_UNICODE_SCRIPT_OLD_PERSIAN, /* Xpeo */
|
||||
G_UNICODE_SCRIPT_KHAROSHTHI, /* Khar */
|
||||
|
||||
/* Unicode-5.0 additions */
|
||||
G_UNICODE_SCRIPT_UNKNOWN, /* Zzzz */
|
||||
G_UNICODE_SCRIPT_BALINESE, /* Bali */
|
||||
G_UNICODE_SCRIPT_CUNEIFORM, /* Xsux */
|
||||
G_UNICODE_SCRIPT_PHOENICIAN, /* Phnx */
|
||||
G_UNICODE_SCRIPT_PHAGS_PA, /* Phag */
|
||||
G_UNICODE_SCRIPT_NKO, /* Nkoo */
|
||||
|
||||
/* Unicode-5.1 additions */
|
||||
G_UNICODE_SCRIPT_KAYAH_LI, /* Kali */
|
||||
G_UNICODE_SCRIPT_LEPCHA, /* Lepc */
|
||||
G_UNICODE_SCRIPT_REJANG, /* Rjng */
|
||||
G_UNICODE_SCRIPT_SUNDANESE, /* Sund */
|
||||
G_UNICODE_SCRIPT_SAURASHTRA, /* Saur */
|
||||
G_UNICODE_SCRIPT_CHAM, /* Cham */
|
||||
G_UNICODE_SCRIPT_OL_CHIKI, /* Olck */
|
||||
G_UNICODE_SCRIPT_VAI, /* Vaii */
|
||||
G_UNICODE_SCRIPT_CARIAN, /* Cari */
|
||||
G_UNICODE_SCRIPT_LYCIAN, /* Lyci */
|
||||
G_UNICODE_SCRIPT_LYDIAN /* Lydi */
|
||||
} GUnicodeScript;
|
||||
|
||||
/* Returns TRUE if current locale uses UTF-8 charset. If CHARSET is
|
||||
* not null, sets *CHARSET to the name of the current locale's
|
||||
* charset. This value is statically allocated, and should be copied
|
||||
* in case the locale's charset will be changed later using setlocale()
|
||||
* or in some other way.
|
||||
*/
|
||||
gboolean g_get_charset (G_CONST_RETURN char **charset);
|
||||
|
||||
/* These are all analogs of the <ctype.h> functions.
|
||||
*/
|
||||
gboolean g_unichar_isalnum (gunichar c) G_GNUC_CONST;
|
||||
gboolean g_unichar_isalpha (gunichar c) G_GNUC_CONST;
|
||||
gboolean g_unichar_iscntrl (gunichar c) G_GNUC_CONST;
|
||||
gboolean g_unichar_isdigit (gunichar c) G_GNUC_CONST;
|
||||
gboolean g_unichar_isgraph (gunichar c) G_GNUC_CONST;
|
||||
gboolean g_unichar_islower (gunichar c) G_GNUC_CONST;
|
||||
gboolean g_unichar_isprint (gunichar c) G_GNUC_CONST;
|
||||
gboolean g_unichar_ispunct (gunichar c) G_GNUC_CONST;
|
||||
gboolean g_unichar_isspace (gunichar c) G_GNUC_CONST;
|
||||
gboolean g_unichar_isupper (gunichar c) G_GNUC_CONST;
|
||||
gboolean g_unichar_isxdigit (gunichar c) G_GNUC_CONST;
|
||||
gboolean g_unichar_istitle (gunichar c) G_GNUC_CONST;
|
||||
gboolean g_unichar_isdefined (gunichar c) G_GNUC_CONST;
|
||||
gboolean g_unichar_iswide (gunichar c) G_GNUC_CONST;
|
||||
gboolean g_unichar_iswide_cjk(gunichar c) G_GNUC_CONST;
|
||||
gboolean g_unichar_iszerowidth(gunichar c) G_GNUC_CONST;
|
||||
gboolean g_unichar_ismark (gunichar c) G_GNUC_CONST;
|
||||
|
||||
/* More <ctype.h> functions. These convert between the three cases.
|
||||
* See the Unicode book to understand title case. */
|
||||
gunichar g_unichar_toupper (gunichar c) G_GNUC_CONST;
|
||||
gunichar g_unichar_tolower (gunichar c) G_GNUC_CONST;
|
||||
gunichar g_unichar_totitle (gunichar c) G_GNUC_CONST;
|
||||
|
||||
/* If C is a digit (according to `g_unichar_isdigit'), then return its
|
||||
numeric value. Otherwise return -1. */
|
||||
gint g_unichar_digit_value (gunichar c) G_GNUC_CONST;
|
||||
|
||||
gint g_unichar_xdigit_value (gunichar c) G_GNUC_CONST;
|
||||
|
||||
/* Return the Unicode character type of a given character. */
|
||||
GUnicodeType g_unichar_type (gunichar c) G_GNUC_CONST;
|
||||
|
||||
/* Return the line break property for a given character */
|
||||
GUnicodeBreakType g_unichar_break_type (gunichar c) G_GNUC_CONST;
|
||||
|
||||
/* Returns the combining class for a given character */
|
||||
gint g_unichar_combining_class (gunichar uc) G_GNUC_CONST;
|
||||
|
||||
|
||||
/* Compute canonical ordering of a string in-place. This rearranges
|
||||
decomposed characters in the string according to their combining
|
||||
classes. See the Unicode manual for more information. */
|
||||
void g_unicode_canonical_ordering (gunichar *string,
|
||||
gsize len);
|
||||
|
||||
/* Compute canonical decomposition of a character. Returns g_malloc()d
|
||||
string of Unicode characters. RESULT_LEN is set to the resulting
|
||||
length of the string. */
|
||||
gunichar *g_unicode_canonical_decomposition (gunichar ch,
|
||||
gsize *result_len) G_GNUC_MALLOC;
|
||||
|
||||
/* Array of skip-bytes-per-initial character.
|
||||
*/
|
||||
GLIB_VAR const gchar * const g_utf8_skip;
|
||||
|
||||
#define g_utf8_next_char(p) (char *)((p) + g_utf8_skip[*(const guchar *)(p)])
|
||||
|
||||
gunichar g_utf8_get_char (const gchar *p) G_GNUC_PURE;
|
||||
gunichar g_utf8_get_char_validated (const gchar *p,
|
||||
gssize max_len) G_GNUC_PURE;
|
||||
|
||||
gchar* g_utf8_offset_to_pointer (const gchar *str,
|
||||
glong offset) G_GNUC_PURE;
|
||||
glong g_utf8_pointer_to_offset (const gchar *str,
|
||||
const gchar *pos) G_GNUC_PURE;
|
||||
gchar* g_utf8_prev_char (const gchar *p) G_GNUC_PURE;
|
||||
gchar* g_utf8_find_next_char (const gchar *p,
|
||||
const gchar *end) G_GNUC_PURE;
|
||||
gchar* g_utf8_find_prev_char (const gchar *str,
|
||||
const gchar *p) G_GNUC_PURE;
|
||||
|
||||
glong g_utf8_strlen (const gchar *p,
|
||||
gssize max) G_GNUC_PURE;
|
||||
|
||||
/* Copies n characters from src to dest */
|
||||
gchar* g_utf8_strncpy (gchar *dest,
|
||||
const gchar *src,
|
||||
gsize n);
|
||||
|
||||
/* Find the UTF-8 character corresponding to ch, in string p. These
|
||||
functions are equivalants to strchr and strrchr */
|
||||
gchar* g_utf8_strchr (const gchar *p,
|
||||
gssize len,
|
||||
gunichar c);
|
||||
gchar* g_utf8_strrchr (const gchar *p,
|
||||
gssize len,
|
||||
gunichar c);
|
||||
gchar* g_utf8_strreverse (const gchar *str,
|
||||
gssize len);
|
||||
|
||||
gunichar2 *g_utf8_to_utf16 (const gchar *str,
|
||||
glong len,
|
||||
glong *items_read,
|
||||
glong *items_written,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
gunichar * g_utf8_to_ucs4 (const gchar *str,
|
||||
glong len,
|
||||
glong *items_read,
|
||||
glong *items_written,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
gunichar * g_utf8_to_ucs4_fast (const gchar *str,
|
||||
glong len,
|
||||
glong *items_written) G_GNUC_MALLOC;
|
||||
gunichar * g_utf16_to_ucs4 (const gunichar2 *str,
|
||||
glong len,
|
||||
glong *items_read,
|
||||
glong *items_written,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
gchar* g_utf16_to_utf8 (const gunichar2 *str,
|
||||
glong len,
|
||||
glong *items_read,
|
||||
glong *items_written,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
gunichar2 *g_ucs4_to_utf16 (const gunichar *str,
|
||||
glong len,
|
||||
glong *items_read,
|
||||
glong *items_written,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
gchar* g_ucs4_to_utf8 (const gunichar *str,
|
||||
glong len,
|
||||
glong *items_read,
|
||||
glong *items_written,
|
||||
GError **error) G_GNUC_MALLOC;
|
||||
|
||||
/* Convert a single character into UTF-8. outbuf must have at
|
||||
* least 6 bytes of space. Returns the number of bytes in the
|
||||
* result.
|
||||
*/
|
||||
gint g_unichar_to_utf8 (gunichar c,
|
||||
gchar *outbuf);
|
||||
|
||||
/* Validate a UTF8 string, return TRUE if valid, put pointer to
|
||||
* first invalid char in **end
|
||||
*/
|
||||
|
||||
gboolean g_utf8_validate (const gchar *str,
|
||||
gssize max_len,
|
||||
const gchar **end);
|
||||
|
||||
/* Validate a Unicode character */
|
||||
gboolean g_unichar_validate (gunichar ch) G_GNUC_CONST;
|
||||
|
||||
gchar *g_utf8_strup (const gchar *str,
|
||||
gssize len) G_GNUC_MALLOC;
|
||||
gchar *g_utf8_strdown (const gchar *str,
|
||||
gssize len) G_GNUC_MALLOC;
|
||||
gchar *g_utf8_casefold (const gchar *str,
|
||||
gssize len) G_GNUC_MALLOC;
|
||||
|
||||
typedef enum {
|
||||
G_NORMALIZE_DEFAULT,
|
||||
G_NORMALIZE_NFD = G_NORMALIZE_DEFAULT,
|
||||
G_NORMALIZE_DEFAULT_COMPOSE,
|
||||
G_NORMALIZE_NFC = G_NORMALIZE_DEFAULT_COMPOSE,
|
||||
G_NORMALIZE_ALL,
|
||||
G_NORMALIZE_NFKD = G_NORMALIZE_ALL,
|
||||
G_NORMALIZE_ALL_COMPOSE,
|
||||
G_NORMALIZE_NFKC = G_NORMALIZE_ALL_COMPOSE
|
||||
} GNormalizeMode;
|
||||
|
||||
gchar *g_utf8_normalize (const gchar *str,
|
||||
gssize len,
|
||||
GNormalizeMode mode) G_GNUC_MALLOC;
|
||||
|
||||
gint g_utf8_collate (const gchar *str1,
|
||||
const gchar *str2) G_GNUC_PURE;
|
||||
gchar *g_utf8_collate_key (const gchar *str,
|
||||
gssize len) G_GNUC_MALLOC;
|
||||
gchar *g_utf8_collate_key_for_filename (const gchar *str,
|
||||
gssize len) G_GNUC_MALLOC;
|
||||
|
||||
gboolean g_unichar_get_mirror_char (gunichar ch,
|
||||
gunichar *mirrored_ch);
|
||||
|
||||
GUnicodeScript g_unichar_get_script (gunichar ch) G_GNUC_CONST;
|
||||
|
||||
|
||||
/* private */
|
||||
|
||||
gchar *_g_utf8_make_valid (const gchar *name);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_UNICODE_H__ */
|
|
@ -1,35 +0,0 @@
|
|||
/* gunicodeprivate.h
|
||||
*
|
||||
* Copyright (C) 2003 Noah Levitt
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __G_UNICODE_PRIVATE_H__
|
||||
#define __G_UNICODE_PRIVATE_H__
|
||||
|
||||
#include "glib.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
G_GNUC_INTERNAL gunichar *_g_utf8_normalize_wc
|
||||
(const gchar *str,
|
||||
gssize max_len,
|
||||
GNormalizeMode mode);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_UNICODE_PRIVATE_H__ */
|
|
@ -1,682 +0,0 @@
|
|||
#define COMPOSE_FIRST_START 1
|
||||
#define COMPOSE_FIRST_SINGLE_START 147
|
||||
#define COMPOSE_SECOND_START 368
|
||||
#define COMPOSE_SECOND_SINGLE_START 399
|
||||
|
||||
#define COMPOSE_TABLE_LAST 48
|
||||
|
||||
static const guint16 compose_data[][256] = {
|
||||
{ /* page 0, index 0 */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, 148, 149, 0, 0, 1, 2, 3, 4, 5,
|
||||
150, 6, 7, 8, 151, 9, 10, 11, 12, 13, 14, 0, 15, 16, 17, 18, 19, 20, 21,
|
||||
22, 23, 0, 0, 0, 0, 0, 0, 24, 25, 26, 27, 28, 152, 29, 30, 31, 32, 33,
|
||||
34, 35, 36, 37, 38, 0, 39, 40, 41, 42, 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, 153, 154,
|
||||
50, 155, 0, 0, 51, 0, 0, 0, 0, 156, 0, 0, 0, 0, 52, 53, 157, 0, 158, 0,
|
||||
0, 0, 54, 0, 0, 0, 0, 0, 55, 0, 159, 160, 56, 161, 0, 0, 57, 0, 0, 0, 0,
|
||||
162, 0, 0, 0, 0, 58, 59, 163, 0, 164, 0, 0, 0, 60, 0, 0, 0
|
||||
},
|
||||
{ /* page 1, index 1 */
|
||||
0, 0, 61, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 64, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 65, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 165, 166, 0,
|
||||
0, 0, 0, 167, 168, 0, 0, 0, 0, 0, 0, 169, 170, 171, 172, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,
|
||||
68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 70, 0, 0, 0, 0, 0, 0, 174,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 175, 176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0
|
||||
},
|
||||
{ /* page 2, index 2 */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 177, 178, 179, 180, 0, 0, 0, 0,
|
||||
181, 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 183, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
},
|
||||
{ /* page 3, index 3 */
|
||||
368, 369, 370, 371, 372, 0, 373, 374, 375, 376, 377, 378, 379, 0, 0, 380,
|
||||
0, 381, 0, 382, 383, 0, 0, 0, 0, 0, 0, 384, 0, 0, 0, 0, 0, 0, 0, 385,
|
||||
386, 387, 388, 389, 390, 0, 0, 0, 0, 391, 392, 0, 393, 394, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 395, 0, 0, 396, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 0, 0, 0,
|
||||
72, 0, 73, 0, 74, 0, 0, 0, 0, 0, 75, 0, 184, 0, 0, 0, 76, 0, 0, 0, 77, 0,
|
||||
0, 185, 0, 186, 0, 0, 78, 0, 0, 0, 79, 0, 80, 0, 81, 0, 0, 0, 0, 0, 82,
|
||||
0, 83, 0, 0, 0, 84, 0, 0, 0, 85, 86, 87, 0, 0, 187, 0, 0, 0, 88, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
},
|
||||
{ /* page 4, index 4 */
|
||||
0, 0, 0, 0, 0, 0, 188, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, 189, 0, 90,
|
||||
91, 190, 92, 0, 191, 0, 0, 0, 192, 0, 0, 0, 0, 93, 0, 0, 0, 193, 0, 0, 0,
|
||||
194, 0, 195, 0, 0, 94, 0, 0, 196, 0, 95, 96, 197, 97, 0, 198, 0, 0, 0,
|
||||
199, 0, 0, 0, 0, 98, 0, 0, 0, 200, 0, 0, 0, 201, 0, 202, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 204, 205, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 206, 207, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 208, 209, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0
|
||||
},
|
||||
{ /* page 6, index 5 */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
210, 0, 211, 0, 0, 0, 0, 0, 0, 0, 0, 399, 400, 401, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 212, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 213, 0,
|
||||
0, 214, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
},
|
||||
{ /* page 9, index 6 */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 215, 0, 0, 0, 0, 0, 0, 0,
|
||||
216, 0, 0, 217, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 402,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
403, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
},
|
||||
{ /* page 11, index 7 */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 404, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 405, 406, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 407, 0, 0, 0, 0, 0, 0, 0, 102, 219, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 408, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
},
|
||||
{ /* page 12, index 8 */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221,
|
||||
0, 0, 409, 0, 0, 0, 103, 0, 0, 0, 222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 410,
|
||||
411, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
},
|
||||
{ /* page 13, index 9 */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 412, 0, 0, 0, 0, 0, 0, 0, 104,
|
||||
223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 413, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 414, 0, 0, 0, 0, 415, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 105, 0, 0, 224, 0, 0, 416, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
},
|
||||
{ /* page 16, index 10 */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
},
|
||||
{ /* page 27, index 11 */
|
||||
0, 0, 0, 0, 0, 226, 0, 227, 0, 228, 0, 229, 0, 230, 0, 0, 0, 231, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 0, 233, 0, 234, 235, 0, 0,
|
||||
236, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
},
|
||||
{ /* page 30, index 12 */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 237, 238, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 239, 240, 0, 0,
|
||||
0, 0, 0, 0, 241, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 107, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 243, 244, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 245, 246, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
},
|
||||
{ /* page 31, index 13 */
|
||||
108, 109, 247, 248, 249, 250, 251, 252, 110, 111, 253, 254, 255, 256,
|
||||
257, 258, 112, 113, 0, 0, 0, 0, 0, 0, 114, 115, 0, 0, 0, 0, 0, 0, 116,
|
||||
117, 259, 260, 261, 262, 263, 264, 118, 119, 265, 266, 267, 268, 269,
|
||||
270, 120, 121, 0, 0, 0, 0, 0, 0, 122, 123, 0, 0, 0, 0, 0, 0, 124, 125, 0,
|
||||
0, 0, 0, 0, 0, 126, 127, 0, 0, 0, 0, 0, 0, 128, 129, 0, 0, 0, 0, 0, 0, 0,
|
||||
130, 0, 0, 0, 0, 0, 0, 131, 132, 271, 272, 273, 274, 275, 276, 133, 134,
|
||||
277, 278, 279, 280, 281, 282, 283, 0, 0, 0, 284, 0, 0, 0, 0, 0, 0, 0,
|
||||
285, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 286, 0, 0, 0, 0, 0, 0, 0, 0, 135, 0, 0, 0,
|
||||
0, 0, 0, 287, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 288, 0, 0, 0, 0, 0, 0, 0, 136, 0
|
||||
},
|
||||
{ /* page 33, index 14 */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
289, 0, 290, 0, 291, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 292, 0, 293, 0,
|
||||
294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
},
|
||||
{ /* page 34, index 15 */
|
||||
0, 0, 0, 295, 0, 0, 0, 0, 296, 0, 0, 297, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 298, 0, 299, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 300, 0, 0, 0, 0, 0, 0, 301,
|
||||
0, 302, 0, 0, 303, 0, 0, 0, 0, 304, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 305, 0, 0, 306, 307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 308, 309, 0, 0, 310, 311, 0, 0, 312, 313, 314, 315, 0, 0, 0, 0,
|
||||
316, 317, 0, 0, 318, 319, 0, 0, 0, 0, 0, 0, 0, 0, 0, 320, 321, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 322, 0, 0, 0, 0, 0, 323, 324, 0, 325,
|
||||
0, 0, 0, 0, 0, 0, 326, 327, 328, 329, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
},
|
||||
{ /* page 48, index 16 */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 330, 0,
|
||||
0, 0, 0, 331, 0, 332, 0, 333, 0, 334, 0, 335, 0, 336, 0, 337, 0, 338, 0,
|
||||
339, 0, 340, 0, 341, 0, 342, 0, 0, 343, 0, 344, 0, 345, 0, 0, 0, 0, 0, 0,
|
||||
137, 0, 0, 138, 0, 0, 139, 0, 0, 140, 0, 0, 141, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 397, 398,
|
||||
0, 0, 346, 0, 0, 0, 0, 0, 0, 0, 0, 347, 0, 0, 0, 0, 348, 0, 349, 0, 350,
|
||||
0, 351, 0, 352, 0, 353, 0, 354, 0, 355, 0, 356, 0, 357, 0, 358, 0, 359,
|
||||
0, 0, 360, 0, 361, 0, 362, 0, 0, 0, 0, 0, 0, 142, 0, 0, 143, 0, 0, 144,
|
||||
0, 0, 145, 0, 0, 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 363, 364, 365, 366, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 0, 0
|
||||
}
|
||||
};
|
||||
|
||||
static const gint16 compose_table[COMPOSE_TABLE_LAST + 1] = {
|
||||
0 /* page 0 */,
|
||||
1 /* page 1 */,
|
||||
2 /* page 2 */,
|
||||
3 /* page 3 */,
|
||||
4 /* page 4 */,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
5 /* page 6 */,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
6 /* page 9 */,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
7 /* page 11 */,
|
||||
8 /* page 12 */,
|
||||
9 /* page 13 */,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
10 /* page 16 */,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
11 /* page 27 */,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
12 /* page 30 */,
|
||||
13 /* page 31 */,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
14 /* page 33 */,
|
||||
15 /* page 34 */,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
0 + G_UNICODE_MAX_TABLE_INDEX,
|
||||
16 /* page 48 */
|
||||
};
|
||||
|
||||
static const guint16 compose_first_single[][2] = {
|
||||
{ 0x0338, 0x226e },
|
||||
{ 0x0338, 0x2260 },
|
||||
{ 0x0338, 0x226f },
|
||||
{ 0x0307, 0x1e1e },
|
||||
{ 0x0302, 0x0134 },
|
||||
{ 0x0307, 0x1e1f },
|
||||
{ 0x0304, 0x01de },
|
||||
{ 0x0301, 0x01fa },
|
||||
{ 0x0301, 0x1e08 },
|
||||
{ 0x0301, 0x1e2e },
|
||||
{ 0x0304, 0x022a },
|
||||
{ 0x0301, 0x01fe },
|
||||
{ 0x0304, 0x01df },
|
||||
{ 0x0301, 0x01fb },
|
||||
{ 0x0301, 0x1e09 },
|
||||
{ 0x0301, 0x1e2f },
|
||||
{ 0x0304, 0x022b },
|
||||
{ 0x0301, 0x01ff },
|
||||
{ 0x0307, 0x1e64 },
|
||||
{ 0x0307, 0x1e65 },
|
||||
{ 0x0307, 0x1e66 },
|
||||
{ 0x0307, 0x1e67 },
|
||||
{ 0x0301, 0x1e78 },
|
||||
{ 0x0301, 0x1e79 },
|
||||
{ 0x0308, 0x1e7a },
|
||||
{ 0x0308, 0x1e7b },
|
||||
{ 0x0307, 0x1e9b },
|
||||
{ 0x030c, 0x01ee },
|
||||
{ 0x0304, 0x01ec },
|
||||
{ 0x0304, 0x01ed },
|
||||
{ 0x0304, 0x01e0 },
|
||||
{ 0x0304, 0x01e1 },
|
||||
{ 0x0306, 0x1e1c },
|
||||
{ 0x0306, 0x1e1d },
|
||||
{ 0x0304, 0x0230 },
|
||||
{ 0x0304, 0x0231 },
|
||||
{ 0x030c, 0x01ef },
|
||||
{ 0x0314, 0x1fec },
|
||||
{ 0x0345, 0x1fb4 },
|
||||
{ 0x0345, 0x1fc4 },
|
||||
{ 0x0345, 0x1ff4 },
|
||||
{ 0x0308, 0x0407 },
|
||||
{ 0x0301, 0x0403 },
|
||||
{ 0x0308, 0x04de },
|
||||
{ 0x0301, 0x040c },
|
||||
{ 0x0308, 0x04e6 },
|
||||
{ 0x0308, 0x04f4 },
|
||||
{ 0x0308, 0x04f8 },
|
||||
{ 0x0308, 0x04ec },
|
||||
{ 0x0301, 0x0453 },
|
||||
{ 0x0308, 0x04df },
|
||||
{ 0x0301, 0x045c },
|
||||
{ 0x0308, 0x04e7 },
|
||||
{ 0x0308, 0x04f5 },
|
||||
{ 0x0308, 0x04f9 },
|
||||
{ 0x0308, 0x04ed },
|
||||
{ 0x0308, 0x0457 },
|
||||
{ 0x030f, 0x0476 },
|
||||
{ 0x030f, 0x0477 },
|
||||
{ 0x0308, 0x04da },
|
||||
{ 0x0308, 0x04db },
|
||||
{ 0x0308, 0x04ea },
|
||||
{ 0x0308, 0x04eb },
|
||||
{ 0x0654, 0x0624 },
|
||||
{ 0x0654, 0x0626 },
|
||||
{ 0x0654, 0x06c2 },
|
||||
{ 0x0654, 0x06d3 },
|
||||
{ 0x0654, 0x06c0 },
|
||||
{ 0x093c, 0x0929 },
|
||||
{ 0x093c, 0x0931 },
|
||||
{ 0x093c, 0x0934 },
|
||||
{ 0x0bd7, 0x0b94 },
|
||||
{ 0x0bbe, 0x0bcb },
|
||||
{ 0x0c56, 0x0c48 },
|
||||
{ 0x0cd5, 0x0cc0 },
|
||||
{ 0x0cd5, 0x0ccb },
|
||||
{ 0x0d3e, 0x0d4b },
|
||||
{ 0x0dca, 0x0ddd },
|
||||
{ 0x102e, 0x1026 },
|
||||
{ 0x1b35, 0x1b06 },
|
||||
{ 0x1b35, 0x1b08 },
|
||||
{ 0x1b35, 0x1b0a },
|
||||
{ 0x1b35, 0x1b0c },
|
||||
{ 0x1b35, 0x1b0e },
|
||||
{ 0x1b35, 0x1b12 },
|
||||
{ 0x1b35, 0x1b3b },
|
||||
{ 0x1b35, 0x1b3d },
|
||||
{ 0x1b35, 0x1b40 },
|
||||
{ 0x1b35, 0x1b41 },
|
||||
{ 0x1b35, 0x1b43 },
|
||||
{ 0x0304, 0x1e38 },
|
||||
{ 0x0304, 0x1e39 },
|
||||
{ 0x0304, 0x1e5c },
|
||||
{ 0x0304, 0x1e5d },
|
||||
{ 0x0307, 0x1e68 },
|
||||
{ 0x0307, 0x1e69 },
|
||||
{ 0x0302, 0x1ec6 },
|
||||
{ 0x0302, 0x1ec7 },
|
||||
{ 0x0302, 0x1ed8 },
|
||||
{ 0x0302, 0x1ed9 },
|
||||
{ 0x0345, 0x1f82 },
|
||||
{ 0x0345, 0x1f83 },
|
||||
{ 0x0345, 0x1f84 },
|
||||
{ 0x0345, 0x1f85 },
|
||||
{ 0x0345, 0x1f86 },
|
||||
{ 0x0345, 0x1f87 },
|
||||
{ 0x0345, 0x1f8a },
|
||||
{ 0x0345, 0x1f8b },
|
||||
{ 0x0345, 0x1f8c },
|
||||
{ 0x0345, 0x1f8d },
|
||||
{ 0x0345, 0x1f8e },
|
||||
{ 0x0345, 0x1f8f },
|
||||
{ 0x0345, 0x1f92 },
|
||||
{ 0x0345, 0x1f93 },
|
||||
{ 0x0345, 0x1f94 },
|
||||
{ 0x0345, 0x1f95 },
|
||||
{ 0x0345, 0x1f96 },
|
||||
{ 0x0345, 0x1f97 },
|
||||
{ 0x0345, 0x1f9a },
|
||||
{ 0x0345, 0x1f9b },
|
||||
{ 0x0345, 0x1f9c },
|
||||
{ 0x0345, 0x1f9d },
|
||||
{ 0x0345, 0x1f9e },
|
||||
{ 0x0345, 0x1f9f },
|
||||
{ 0x0345, 0x1fa2 },
|
||||
{ 0x0345, 0x1fa3 },
|
||||
{ 0x0345, 0x1fa4 },
|
||||
{ 0x0345, 0x1fa5 },
|
||||
{ 0x0345, 0x1fa6 },
|
||||
{ 0x0345, 0x1fa7 },
|
||||
{ 0x0345, 0x1faa },
|
||||
{ 0x0345, 0x1fab },
|
||||
{ 0x0345, 0x1fac },
|
||||
{ 0x0345, 0x1fad },
|
||||
{ 0x0345, 0x1fae },
|
||||
{ 0x0345, 0x1faf },
|
||||
{ 0x0345, 0x1fb2 },
|
||||
{ 0x0345, 0x1fc2 },
|
||||
{ 0x0345, 0x1ff2 },
|
||||
{ 0x0345, 0x1fb7 },
|
||||
{ 0x0345, 0x1fc7 },
|
||||
{ 0x0345, 0x1ff7 },
|
||||
{ 0x0338, 0x219a },
|
||||
{ 0x0338, 0x219b },
|
||||
{ 0x0338, 0x21ae },
|
||||
{ 0x0338, 0x21cd },
|
||||
{ 0x0338, 0x21cf },
|
||||
{ 0x0338, 0x21ce },
|
||||
{ 0x0338, 0x2204 },
|
||||
{ 0x0338, 0x2209 },
|
||||
{ 0x0338, 0x220c },
|
||||
{ 0x0338, 0x2224 },
|
||||
{ 0x0338, 0x2226 },
|
||||
{ 0x0338, 0x2241 },
|
||||
{ 0x0338, 0x2244 },
|
||||
{ 0x0338, 0x2247 },
|
||||
{ 0x0338, 0x2249 },
|
||||
{ 0x0338, 0x226d },
|
||||
{ 0x0338, 0x2262 },
|
||||
{ 0x0338, 0x2270 },
|
||||
{ 0x0338, 0x2271 },
|
||||
{ 0x0338, 0x2274 },
|
||||
{ 0x0338, 0x2275 },
|
||||
{ 0x0338, 0x2278 },
|
||||
{ 0x0338, 0x2279 },
|
||||
{ 0x0338, 0x2280 },
|
||||
{ 0x0338, 0x2281 },
|
||||
{ 0x0338, 0x22e0 },
|
||||
{ 0x0338, 0x22e1 },
|
||||
{ 0x0338, 0x2284 },
|
||||
{ 0x0338, 0x2285 },
|
||||
{ 0x0338, 0x2288 },
|
||||
{ 0x0338, 0x2289 },
|
||||
{ 0x0338, 0x22e2 },
|
||||
{ 0x0338, 0x22e3 },
|
||||
{ 0x0338, 0x22ac },
|
||||
{ 0x0338, 0x22ad },
|
||||
{ 0x0338, 0x22ae },
|
||||
{ 0x0338, 0x22af },
|
||||
{ 0x0338, 0x22ea },
|
||||
{ 0x0338, 0x22eb },
|
||||
{ 0x0338, 0x22ec },
|
||||
{ 0x0338, 0x22ed },
|
||||
{ 0x3099, 0x3094 },
|
||||
{ 0x3099, 0x304c },
|
||||
{ 0x3099, 0x304e },
|
||||
{ 0x3099, 0x3050 },
|
||||
{ 0x3099, 0x3052 },
|
||||
{ 0x3099, 0x3054 },
|
||||
{ 0x3099, 0x3056 },
|
||||
{ 0x3099, 0x3058 },
|
||||
{ 0x3099, 0x305a },
|
||||
{ 0x3099, 0x305c },
|
||||
{ 0x3099, 0x305e },
|
||||
{ 0x3099, 0x3060 },
|
||||
{ 0x3099, 0x3062 },
|
||||
{ 0x3099, 0x3065 },
|
||||
{ 0x3099, 0x3067 },
|
||||
{ 0x3099, 0x3069 },
|
||||
{ 0x3099, 0x309e },
|
||||
{ 0x3099, 0x30f4 },
|
||||
{ 0x3099, 0x30ac },
|
||||
{ 0x3099, 0x30ae },
|
||||
{ 0x3099, 0x30b0 },
|
||||
{ 0x3099, 0x30b2 },
|
||||
{ 0x3099, 0x30b4 },
|
||||
{ 0x3099, 0x30b6 },
|
||||
{ 0x3099, 0x30b8 },
|
||||
{ 0x3099, 0x30ba },
|
||||
{ 0x3099, 0x30bc },
|
||||
{ 0x3099, 0x30be },
|
||||
{ 0x3099, 0x30c0 },
|
||||
{ 0x3099, 0x30c2 },
|
||||
{ 0x3099, 0x30c5 },
|
||||
{ 0x3099, 0x30c7 },
|
||||
{ 0x3099, 0x30c9 },
|
||||
{ 0x3099, 0x30f7 },
|
||||
{ 0x3099, 0x30f8 },
|
||||
{ 0x3099, 0x30f9 },
|
||||
{ 0x3099, 0x30fa },
|
||||
{ 0x3099, 0x30fe }
|
||||
};
|
||||
static const guint16 compose_second_single[][2] = {
|
||||
{ 0x0627, 0x0622 },
|
||||
{ 0x0627, 0x0623 },
|
||||
{ 0x0627, 0x0625 },
|
||||
{ 0x09c7, 0x09cb },
|
||||
{ 0x09c7, 0x09cc },
|
||||
{ 0x0b47, 0x0b4b },
|
||||
{ 0x0b47, 0x0b48 },
|
||||
{ 0x0b47, 0x0b4c },
|
||||
{ 0x0bc6, 0x0bca },
|
||||
{ 0x0bc6, 0x0bcc },
|
||||
{ 0x0cc6, 0x0cca },
|
||||
{ 0x0cc6, 0x0cc7 },
|
||||
{ 0x0cc6, 0x0cc8 },
|
||||
{ 0x0d46, 0x0d4a },
|
||||
{ 0x0d46, 0x0d4c },
|
||||
{ 0x0dd9, 0x0dda },
|
||||
{ 0x0dd9, 0x0ddc },
|
||||
{ 0x0dd9, 0x0dde }
|
||||
};
|
||||
static const guint16 compose_array[146][31] = {
|
||||
{ 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x0100, 0x0102, 0x0226, 0x00c4, 0x1ea2, 0x00c5, 0, 0x01cd, 0x0200, 0x0202, 0, 0, 0, 0x1ea0, 0, 0x1e00, 0, 0, 0x0104, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0x1e02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e04, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e06, 0, 0, 0, 0 },
|
||||
{ 0, 0x0106, 0x0108, 0, 0, 0, 0x010a, 0, 0, 0, 0, 0x010c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00c7, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0x1e0a, 0, 0, 0, 0, 0x010e, 0, 0, 0, 0, 0, 0x1e0c, 0, 0, 0, 0x1e10, 0, 0x1e12, 0, 0, 0x1e0e, 0, 0, 0, 0 },
|
||||
{ 0x00c8, 0x00c9, 0x00ca, 0x1ebc, 0x0112, 0x0114, 0x0116, 0x00cb, 0x1eba, 0, 0, 0x011a, 0x0204, 0x0206, 0, 0, 0, 0x1eb8, 0, 0, 0, 0x0228, 0x0118, 0x1e18, 0, 0x1e1a, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0x01f4, 0x011c, 0, 0x1e20, 0x011e, 0x0120, 0, 0, 0, 0, 0x01e6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x0122, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0x0124, 0, 0, 0, 0x1e22, 0x1e26, 0, 0, 0, 0x021e, 0, 0, 0, 0, 0, 0x1e24, 0, 0, 0, 0x1e28, 0, 0, 0x1e2a, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x00cc, 0x00cd, 0x00ce, 0x0128, 0x012a, 0x012c, 0x0130, 0x00cf, 0x1ec8, 0, 0, 0x01cf, 0x0208, 0x020a, 0, 0, 0, 0x1eca, 0, 0, 0, 0, 0x012e, 0, 0, 0x1e2c, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0x1e30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x01e8, 0, 0, 0, 0, 0, 0x1e32, 0, 0, 0, 0x0136, 0, 0, 0, 0, 0x1e34, 0, 0, 0, 0 },
|
||||
{ 0, 0x0139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x013d, 0, 0, 0, 0, 0, 0x1e36, 0, 0, 0, 0x013b, 0, 0x1e3c, 0, 0, 0x1e3a, 0, 0, 0, 0 },
|
||||
{ 0, 0x1e3e, 0, 0, 0, 0, 0x1e40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x01f8, 0x0143, 0, 0x00d1, 0, 0, 0x1e44, 0, 0, 0, 0, 0x0147, 0, 0, 0, 0, 0, 0x1e46, 0, 0, 0, 0x0145, 0, 0x1e4a, 0, 0, 0x1e48, 0, 0, 0, 0 },
|
||||
{ 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x014c, 0x014e, 0x022e, 0x00d6, 0x1ece, 0, 0x0150, 0x01d1, 0x020c, 0x020e, 0, 0, 0x01a0, 0x1ecc, 0, 0, 0, 0, 0x01ea, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0x1e54, 0, 0, 0, 0, 0x1e56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0x0154, 0, 0, 0, 0, 0x1e58, 0, 0, 0, 0, 0x0158, 0x0210, 0x0212, 0, 0, 0, 0x1e5a, 0, 0, 0, 0x0156, 0, 0, 0, 0, 0x1e5e, 0, 0, 0, 0 },
|
||||
{ 0, 0x015a, 0x015c, 0, 0, 0, 0x1e60, 0, 0, 0, 0, 0x0160, 0, 0, 0, 0, 0, 0x1e62, 0, 0, 0x0218, 0x015e, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0x1e6a, 0, 0, 0, 0, 0x0164, 0, 0, 0, 0, 0, 0x1e6c, 0, 0, 0x021a, 0x0162, 0, 0x1e70, 0, 0, 0x1e6e, 0, 0, 0, 0 },
|
||||
{ 0x00d9, 0x00da, 0x00db, 0x0168, 0x016a, 0x016c, 0, 0x00dc, 0x1ee6, 0x016e, 0x0170, 0x01d3, 0x0214, 0x0216, 0, 0, 0x01af, 0x1ee4, 0x1e72, 0, 0, 0, 0x0172, 0x1e76, 0, 0x1e74, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0x1e7c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e7e, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1e80, 0x1e82, 0x0174, 0, 0, 0, 0x1e86, 0x1e84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0x1e8a, 0x1e8c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1ef2, 0x00dd, 0x0176, 0x1ef8, 0x0232, 0, 0x1e8e, 0x0178, 0x1ef6, 0, 0, 0, 0, 0, 0, 0, 0, 0x1ef4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0x0179, 0x1e90, 0, 0, 0, 0x017b, 0, 0, 0, 0, 0x017d, 0, 0, 0, 0, 0, 0x1e92, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e94, 0, 0, 0, 0 },
|
||||
{ 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x0101, 0x0103, 0x0227, 0x00e4, 0x1ea3, 0x00e5, 0, 0x01ce, 0x0201, 0x0203, 0, 0, 0, 0x1ea1, 0, 0x1e01, 0, 0, 0x0105, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0x1e03, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e05, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e07, 0, 0, 0, 0 },
|
||||
{ 0, 0x0107, 0x0109, 0, 0, 0, 0x010b, 0, 0, 0, 0, 0x010d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00e7, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0x1e0b, 0, 0, 0, 0, 0x010f, 0, 0, 0, 0, 0, 0x1e0d, 0, 0, 0, 0x1e11, 0, 0x1e13, 0, 0, 0x1e0f, 0, 0, 0, 0 },
|
||||
{ 0x00e8, 0x00e9, 0x00ea, 0x1ebd, 0x0113, 0x0115, 0x0117, 0x00eb, 0x1ebb, 0, 0, 0x011b, 0x0205, 0x0207, 0, 0, 0, 0x1eb9, 0, 0, 0, 0x0229, 0x0119, 0x1e19, 0, 0x1e1b, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0x01f5, 0x011d, 0, 0x1e21, 0x011f, 0x0121, 0, 0, 0, 0, 0x01e7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x0123, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0x0125, 0, 0, 0, 0x1e23, 0x1e27, 0, 0, 0, 0x021f, 0, 0, 0, 0, 0, 0x1e25, 0, 0, 0, 0x1e29, 0, 0, 0x1e2b, 0, 0x1e96, 0, 0, 0, 0 },
|
||||
{ 0x00ec, 0x00ed, 0x00ee, 0x0129, 0x012b, 0x012d, 0, 0x00ef, 0x1ec9, 0, 0, 0x01d0, 0x0209, 0x020b, 0, 0, 0, 0x1ecb, 0, 0, 0, 0, 0x012f, 0, 0, 0x1e2d, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0x0135, 0, 0, 0, 0, 0, 0, 0, 0, 0x01f0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0x1e31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x01e9, 0, 0, 0, 0, 0, 0x1e33, 0, 0, 0, 0x0137, 0, 0, 0, 0, 0x1e35, 0, 0, 0, 0 },
|
||||
{ 0, 0x013a, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x013e, 0, 0, 0, 0, 0, 0x1e37, 0, 0, 0, 0x013c, 0, 0x1e3d, 0, 0, 0x1e3b, 0, 0, 0, 0 },
|
||||
{ 0, 0x1e3f, 0, 0, 0, 0, 0x1e41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x01f9, 0x0144, 0, 0x00f1, 0, 0, 0x1e45, 0, 0, 0, 0, 0x0148, 0, 0, 0, 0, 0, 0x1e47, 0, 0, 0, 0x0146, 0, 0x1e4b, 0, 0, 0x1e49, 0, 0, 0, 0 },
|
||||
{ 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x014d, 0x014f, 0x022f, 0x00f6, 0x1ecf, 0, 0x0151, 0x01d2, 0x020d, 0x020f, 0, 0, 0x01a1, 0x1ecd, 0, 0, 0, 0, 0x01eb, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0x1e55, 0, 0, 0, 0, 0x1e57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0x0155, 0, 0, 0, 0, 0x1e59, 0, 0, 0, 0, 0x0159, 0x0211, 0x0213, 0, 0, 0, 0x1e5b, 0, 0, 0, 0x0157, 0, 0, 0, 0, 0x1e5f, 0, 0, 0, 0 },
|
||||
{ 0, 0x015b, 0x015d, 0, 0, 0, 0x1e61, 0, 0, 0, 0, 0x0161, 0, 0, 0, 0, 0, 0x1e63, 0, 0, 0x0219, 0x015f, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0x1e6b, 0x1e97, 0, 0, 0, 0x0165, 0, 0, 0, 0, 0, 0x1e6d, 0, 0, 0x021b, 0x0163, 0, 0x1e71, 0, 0, 0x1e6f, 0, 0, 0, 0 },
|
||||
{ 0x00f9, 0x00fa, 0x00fb, 0x0169, 0x016b, 0x016d, 0, 0x00fc, 0x1ee7, 0x016f, 0x0171, 0x01d4, 0x0215, 0x0217, 0, 0, 0x01b0, 0x1ee5, 0x1e73, 0, 0, 0, 0x0173, 0x1e77, 0, 0x1e75, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0x1e7d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e7f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1e81, 0x1e83, 0x0175, 0, 0, 0, 0x1e87, 0x1e85, 0, 0x1e98, 0, 0, 0, 0, 0, 0, 0, 0x1e89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0x1e8b, 0x1e8d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1ef3, 0x00fd, 0x0177, 0x1ef9, 0x0233, 0, 0x1e8f, 0x00ff, 0x1ef7, 0x1e99, 0, 0, 0, 0, 0, 0, 0, 0x1ef5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0x017a, 0x1e91, 0, 0, 0, 0x017c, 0, 0, 0, 0, 0x017e, 0, 0, 0, 0, 0, 0x1e93, 0, 0, 0, 0, 0, 0, 0, 0, 0x1e95, 0, 0, 0, 0 },
|
||||
{ 0x1fed, 0x0385, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fc1, 0, 0, 0 },
|
||||
{ 0x1ea6, 0x1ea4, 0, 0x1eaa, 0, 0, 0, 0, 0x1ea8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0x01fc, 0, 0, 0x01e2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1ec0, 0x1ebe, 0, 0x1ec4, 0, 0, 0, 0, 0x1ec2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1ed2, 0x1ed0, 0, 0x1ed6, 0, 0, 0, 0, 0x1ed4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0x1e4c, 0, 0, 0x022c, 0, 0, 0x1e4e, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x01db, 0x01d7, 0, 0, 0x01d5, 0, 0, 0, 0, 0, 0, 0x01d9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1ea7, 0x1ea5, 0, 0x1eab, 0, 0, 0, 0, 0x1ea9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0x01fd, 0, 0, 0x01e3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1ec1, 0x1ebf, 0, 0x1ec5, 0, 0, 0, 0, 0x1ec3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1ed3, 0x1ed1, 0, 0x1ed7, 0, 0, 0, 0, 0x1ed5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0x1e4d, 0, 0, 0x022d, 0, 0, 0x1e4f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x01dc, 0x01d8, 0, 0, 0x01d6, 0, 0, 0, 0, 0, 0, 0x01da, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1eb0, 0x1eae, 0, 0x1eb4, 0, 0, 0, 0, 0x1eb2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1eb1, 0x1eaf, 0, 0x1eb5, 0, 0, 0, 0, 0x1eb3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1e14, 0x1e16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1e15, 0x1e17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1e50, 0x1e52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1e51, 0x1e53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1edc, 0x1eda, 0, 0x1ee0, 0, 0, 0, 0, 0x1ede, 0, 0, 0, 0, 0, 0, 0, 0, 0x1ee2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1edd, 0x1edb, 0, 0x1ee1, 0, 0, 0, 0, 0x1edf, 0, 0, 0, 0, 0, 0, 0, 0, 0x1ee3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1eea, 0x1ee8, 0, 0x1eee, 0, 0, 0, 0, 0x1eec, 0, 0, 0, 0, 0, 0, 0, 0, 0x1ef0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1eeb, 0x1ee9, 0, 0x1eef, 0, 0, 0, 0, 0x1eed, 0, 0, 0, 0, 0, 0, 0, 0, 0x1ef1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1fba, 0x0386, 0, 0, 0x1fb9, 0x1fb8, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f08, 0x1f09, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fbc, 0, 0 },
|
||||
{ 0x1fc8, 0x0388, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f18, 0x1f19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1fca, 0x0389, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f28, 0x1f29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fcc, 0, 0 },
|
||||
{ 0x1fda, 0x038a, 0, 0, 0x1fd9, 0x1fd8, 0, 0x03aa, 0, 0, 0, 0, 0, 0, 0x1f38, 0x1f39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1ff8, 0x038c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f48, 0x1f49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1fea, 0x038e, 0, 0, 0x1fe9, 0x1fe8, 0, 0x03ab, 0, 0, 0, 0, 0, 0, 0, 0x1f59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1ffa, 0x038f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f68, 0x1f69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1ffc, 0, 0 },
|
||||
{ 0x1f70, 0x03ac, 0, 0, 0x1fb1, 0x1fb0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f00, 0x1f01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fb6, 0x1fb3, 0, 0 },
|
||||
{ 0x1f72, 0x03ad, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f10, 0x1f11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1f74, 0x03ae, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f20, 0x1f21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fc6, 0x1fc3, 0, 0 },
|
||||
{ 0x1f76, 0x03af, 0, 0, 0x1fd1, 0x1fd0, 0, 0x03ca, 0, 0, 0, 0, 0, 0, 0x1f30, 0x1f31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fd6, 0, 0, 0 },
|
||||
{ 0x1f78, 0x03cc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f40, 0x1f41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fe4, 0x1fe5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1f7a, 0x03cd, 0, 0, 0x1fe1, 0x1fe0, 0, 0x03cb, 0, 0, 0, 0, 0, 0, 0x1f50, 0x1f51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fe6, 0, 0, 0 },
|
||||
{ 0x1f7c, 0x03ce, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f60, 0x1f61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1ff6, 0x1ff3, 0, 0 },
|
||||
{ 0x1fd2, 0x0390, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fd7, 0, 0, 0 },
|
||||
{ 0x1fe2, 0x03b0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fe7, 0, 0, 0 },
|
||||
{ 0, 0x03d3, 0, 0, 0, 0, 0, 0x03d4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0x04d0, 0, 0x04d2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x0400, 0, 0, 0, 0, 0x04d6, 0, 0x0401, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0x04c1, 0, 0x04dc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x040d, 0, 0, 0, 0x04e2, 0x0419, 0, 0x04e4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0x04ee, 0x040e, 0, 0x04f0, 0, 0, 0x04f2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0x04d1, 0, 0x04d3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x0450, 0, 0, 0, 0, 0x04d7, 0, 0x0451, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0x04c2, 0, 0x04dd, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x045d, 0, 0, 0, 0x04e3, 0x0439, 0, 0x04e5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0x04ef, 0x045e, 0, 0x04f1, 0, 0, 0x04f3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0x1eac, 0, 0, 0x1eb6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0x1ead, 0, 0, 0x1eb7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1f02, 0x1f04, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f06, 0x1f80, 0, 0 },
|
||||
{ 0x1f03, 0x1f05, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f07, 0x1f81, 0, 0 },
|
||||
{ 0x1f0a, 0x1f0c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f0e, 0x1f88, 0, 0 },
|
||||
{ 0x1f0b, 0x1f0d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f0f, 0x1f89, 0, 0 },
|
||||
{ 0x1f12, 0x1f14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1f13, 0x1f15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1f1a, 0x1f1c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1f1b, 0x1f1d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1f22, 0x1f24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f26, 0x1f90, 0, 0 },
|
||||
{ 0x1f23, 0x1f25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f27, 0x1f91, 0, 0 },
|
||||
{ 0x1f2a, 0x1f2c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f2e, 0x1f98, 0, 0 },
|
||||
{ 0x1f2b, 0x1f2d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f2f, 0x1f99, 0, 0 },
|
||||
{ 0x1f32, 0x1f34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f36, 0, 0, 0 },
|
||||
{ 0x1f33, 0x1f35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f37, 0, 0, 0 },
|
||||
{ 0x1f3a, 0x1f3c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f3e, 0, 0, 0 },
|
||||
{ 0x1f3b, 0x1f3d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f3f, 0, 0, 0 },
|
||||
{ 0x1f42, 0x1f44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1f43, 0x1f45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1f4a, 0x1f4c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1f4b, 0x1f4d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x1f52, 0x1f54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f56, 0, 0, 0 },
|
||||
{ 0x1f53, 0x1f55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f57, 0, 0, 0 },
|
||||
{ 0x1f5b, 0x1f5d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f5f, 0, 0, 0 },
|
||||
{ 0x1f62, 0x1f64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f66, 0x1fa0, 0, 0 },
|
||||
{ 0x1f63, 0x1f65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f67, 0x1fa1, 0, 0 },
|
||||
{ 0x1f6a, 0x1f6c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f6e, 0x1fa8, 0, 0 },
|
||||
{ 0x1f6b, 0x1f6d, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1f6f, 0x1fa9, 0, 0 },
|
||||
{ 0x1fcd, 0x1fce, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fcf, 0, 0, 0 },
|
||||
{ 0x1fdd, 0x1fde, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x1fdf, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x3070, 0x3071 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x3073, 0x3074 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x3076, 0x3077 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x3079, 0x307a },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x307c, 0x307d },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x30d0, 0x30d1 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x30d3, 0x30d4 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x30d6, 0x30d7 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x30d9, 0x30da },
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x30dc, 0x30dd }
|
||||
};
|
File diff suppressed because it is too large
Load Diff
|
@ -1,81 +0,0 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_URI_FUNCS_H__
|
||||
#define __G_URI_FUNCS_H__
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* G_URI_RESERVED_CHARS_GENERIC_DELIMITERS:
|
||||
*
|
||||
* Generic delimiters characters as defined in RFC 3986. Includes ":/?#[]@".
|
||||
**/
|
||||
#define G_URI_RESERVED_CHARS_GENERIC_DELIMITERS ":/?#[]@"
|
||||
|
||||
/**
|
||||
* G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS
|
||||
*
|
||||
* Subcomponent delimiter characters as defined in RFC 3986. Includes "!$&'()*+,;=".
|
||||
**/
|
||||
#define G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS "!$&'()*+,;="
|
||||
|
||||
/**
|
||||
* G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT:
|
||||
*
|
||||
* Allowed characters in path elements. Includes "!$&'()*+,;=:@".
|
||||
**/
|
||||
#define G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS ":@"
|
||||
|
||||
/**
|
||||
* G_URI_RESERVED_CHARS_ALLOWED_IN_PATH:
|
||||
*
|
||||
* Allowed characters in a path. Includes "!$&'()*+,;=:@/".
|
||||
**/
|
||||
#define G_URI_RESERVED_CHARS_ALLOWED_IN_PATH G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT "/"
|
||||
|
||||
/**
|
||||
* G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO:
|
||||
*
|
||||
* Allowed characters in userinfo as defined in RFC 3986. Includes "!$&'()*+,;=:".
|
||||
**/
|
||||
#define G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS ":"
|
||||
|
||||
char * g_uri_unescape_string (const char *escaped_string,
|
||||
const char *illegal_characters);
|
||||
char * g_uri_unescape_segment (const char *escaped_string,
|
||||
const char *escaped_string_end,
|
||||
const char *illegal_characters);
|
||||
char * g_uri_parse_scheme (const char *uri);
|
||||
char * g_uri_escape_string (const char *unescaped,
|
||||
const char *reserved_chars_allowed,
|
||||
gboolean allow_utf8);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_URI_FUNCS_H__ */
|
|
@ -1,488 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_UTILS_H__
|
||||
#define __G_UTILS_H__
|
||||
|
||||
#include <glib/gtypes.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
|
||||
/* On Win32, the canonical directory separator is the backslash, and
|
||||
* the search path separator is the semicolon. Note that also the
|
||||
* (forward) slash works as directory separator.
|
||||
*/
|
||||
#define G_DIR_SEPARATOR '\\'
|
||||
#define G_DIR_SEPARATOR_S "\\"
|
||||
#define G_IS_DIR_SEPARATOR(c) ((c) == G_DIR_SEPARATOR || (c) == '/')
|
||||
#define G_SEARCHPATH_SEPARATOR ';'
|
||||
#define G_SEARCHPATH_SEPARATOR_S ";"
|
||||
|
||||
#else /* !G_OS_WIN32 */
|
||||
|
||||
/* Unix */
|
||||
|
||||
#define G_DIR_SEPARATOR '/'
|
||||
#define G_DIR_SEPARATOR_S "/"
|
||||
#define G_IS_DIR_SEPARATOR(c) ((c) == G_DIR_SEPARATOR)
|
||||
#define G_SEARCHPATH_SEPARATOR ':'
|
||||
#define G_SEARCHPATH_SEPARATOR_S ":"
|
||||
|
||||
#endif /* !G_OS_WIN32 */
|
||||
|
||||
/* Define G_VA_COPY() to do the right thing for copying va_list variables.
|
||||
* glibconfig.h may have already defined G_VA_COPY as va_copy or __va_copy.
|
||||
*/
|
||||
#if !defined (G_VA_COPY)
|
||||
# if defined (__GNUC__) && defined (__PPC__) && (defined (_CALL_SYSV) || defined (_WIN32))
|
||||
# define G_VA_COPY(ap1, ap2) (*(ap1) = *(ap2))
|
||||
# elif defined (G_VA_COPY_AS_ARRAY)
|
||||
# define G_VA_COPY(ap1, ap2) g_memmove ((ap1), (ap2), sizeof (va_list))
|
||||
# else /* va_list is a pointer */
|
||||
# define G_VA_COPY(ap1, ap2) ((ap1) = (ap2))
|
||||
# endif /* va_list is a pointer */
|
||||
#endif /* !G_VA_COPY */
|
||||
|
||||
/* inlining hassle. for compilers that don't allow the `inline' keyword,
|
||||
* mostly because of strict ANSI C compliance or dumbness, we try to fall
|
||||
* back to either `__inline__' or `__inline'.
|
||||
* G_CAN_INLINE is defined in glibconfig.h if the compiler seems to be
|
||||
* actually *capable* to do function inlining, in which case inline
|
||||
* function bodies do make sense. we also define G_INLINE_FUNC to properly
|
||||
* export the function prototypes if no inlining can be performed.
|
||||
* inline function bodies have to be special cased with G_CAN_INLINE and a
|
||||
* .c file specific macro to allow one compiled instance with extern linkage
|
||||
* of the functions by defining G_IMPLEMENT_INLINES and the .c file macro.
|
||||
*/
|
||||
#if defined (G_HAVE_INLINE) && defined (__GNUC__) && defined (__STRICT_ANSI__)
|
||||
# undef inline
|
||||
# define inline __inline__
|
||||
#elif !defined (G_HAVE_INLINE)
|
||||
# undef inline
|
||||
# if defined (G_HAVE___INLINE__)
|
||||
# define inline __inline__
|
||||
# elif defined (G_HAVE___INLINE)
|
||||
# define inline __inline
|
||||
# else /* !inline && !__inline__ && !__inline */
|
||||
# define inline /* don't inline, then */
|
||||
# endif
|
||||
#endif
|
||||
#ifdef G_IMPLEMENT_INLINES
|
||||
# define G_INLINE_FUNC
|
||||
# undef G_CAN_INLINE
|
||||
#elif defined (__GNUC__)
|
||||
# define G_INLINE_FUNC static __inline __attribute__ ((unused))
|
||||
#elif defined (G_CAN_INLINE)
|
||||
# define G_INLINE_FUNC static inline
|
||||
#else /* can't inline */
|
||||
# define G_INLINE_FUNC
|
||||
#endif /* !G_INLINE_FUNC */
|
||||
|
||||
/* Retrive static string info
|
||||
*/
|
||||
#ifdef G_OS_WIN32
|
||||
#define g_get_user_name g_get_user_name_utf8
|
||||
#define g_get_real_name g_get_real_name_utf8
|
||||
#define g_get_home_dir g_get_home_dir_utf8
|
||||
#define g_get_tmp_dir g_get_tmp_dir_utf8
|
||||
#endif
|
||||
|
||||
G_CONST_RETURN gchar* g_get_user_name (void);
|
||||
G_CONST_RETURN gchar* g_get_real_name (void);
|
||||
G_CONST_RETURN gchar* g_get_home_dir (void);
|
||||
G_CONST_RETURN gchar* g_get_tmp_dir (void);
|
||||
G_CONST_RETURN gchar* g_get_host_name (void);
|
||||
gchar* g_get_prgname (void);
|
||||
void g_set_prgname (const gchar *prgname);
|
||||
G_CONST_RETURN gchar* g_get_application_name (void);
|
||||
void g_set_application_name (const gchar *application_name);
|
||||
|
||||
G_CONST_RETURN gchar* g_get_user_data_dir (void);
|
||||
G_CONST_RETURN gchar* g_get_user_config_dir (void);
|
||||
G_CONST_RETURN gchar* g_get_user_cache_dir (void);
|
||||
G_CONST_RETURN gchar* G_CONST_RETURN * g_get_system_data_dirs (void);
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
/* This functions is not part of the public GLib API */
|
||||
G_CONST_RETURN gchar* G_CONST_RETURN * g_win32_get_system_data_dirs_for_module (void (*address_of_function)());
|
||||
#endif
|
||||
|
||||
#if defined (G_OS_WIN32) && defined (G_CAN_INLINE) && !defined (__cplusplus)
|
||||
/* This function is not part of the public GLib API either. Just call
|
||||
* g_get_system_data_dirs() in your code, never mind that that is
|
||||
* actually a macro and you will in fact call this inline function.
|
||||
*/
|
||||
static inline G_CONST_RETURN gchar * G_CONST_RETURN *
|
||||
_g_win32_get_system_data_dirs (void)
|
||||
{
|
||||
return g_win32_get_system_data_dirs_for_module ((void (*)()) &_g_win32_get_system_data_dirs);
|
||||
}
|
||||
#define g_get_system_data_dirs _g_win32_get_system_data_dirs
|
||||
#endif
|
||||
|
||||
G_CONST_RETURN gchar* G_CONST_RETURN * g_get_system_config_dirs (void);
|
||||
|
||||
G_CONST_RETURN gchar* G_CONST_RETURN * g_get_language_names (void);
|
||||
|
||||
/**
|
||||
* GUserDirectory:
|
||||
* @G_USER_DIRECTORY_DESKTOP: the user's Desktop directory
|
||||
* @G_USER_DIRECTORY_DOCUMENTS: the user's Documents directory
|
||||
* @G_USER_DIRECTORY_DOWNLOAD: the user's Downloads directory
|
||||
* @G_USER_DIRECTORY_MUSIC: the user's Music directory
|
||||
* @G_USER_DIRECTORY_PICTURES: the user's Pictures directory
|
||||
* @G_USER_DIRECTORY_PUBLIC_SHARE: the user's shared directory
|
||||
* @G_USER_DIRECTORY_TEMPLATES: the user's Templates directory
|
||||
* @G_USER_DIRECTORY_VIDEOS: the user's Movies directory
|
||||
* @G_USER_N_DIRECTORIES: the number of enum values
|
||||
*
|
||||
* These are logical ids for special directories which are defined
|
||||
* depending on the platform used. You should use g_get_user_special_dir()
|
||||
* to retrieve the full path associated to the logical id.
|
||||
*
|
||||
* The #GUserDirectory enumeration can be extended at later date. Not
|
||||
* every platform has a directory for every logical id in this
|
||||
* enumeration.
|
||||
*
|
||||
* Since: 2.14
|
||||
*/
|
||||
typedef enum {
|
||||
G_USER_DIRECTORY_DESKTOP,
|
||||
G_USER_DIRECTORY_DOCUMENTS,
|
||||
G_USER_DIRECTORY_DOWNLOAD,
|
||||
G_USER_DIRECTORY_MUSIC,
|
||||
G_USER_DIRECTORY_PICTURES,
|
||||
G_USER_DIRECTORY_PUBLIC_SHARE,
|
||||
G_USER_DIRECTORY_TEMPLATES,
|
||||
G_USER_DIRECTORY_VIDEOS,
|
||||
|
||||
G_USER_N_DIRECTORIES
|
||||
} GUserDirectory;
|
||||
|
||||
G_CONST_RETURN gchar* g_get_user_special_dir (GUserDirectory directory);
|
||||
|
||||
typedef struct _GDebugKey GDebugKey;
|
||||
struct _GDebugKey
|
||||
{
|
||||
const gchar *key;
|
||||
guint value;
|
||||
};
|
||||
|
||||
/* Miscellaneous utility functions
|
||||
*/
|
||||
guint g_parse_debug_string (const gchar *string,
|
||||
const GDebugKey *keys,
|
||||
guint nkeys);
|
||||
|
||||
gint g_snprintf (gchar *string,
|
||||
gulong n,
|
||||
gchar const *format,
|
||||
...) G_GNUC_PRINTF (3, 4);
|
||||
gint g_vsnprintf (gchar *string,
|
||||
gulong n,
|
||||
gchar const *format,
|
||||
va_list args);
|
||||
|
||||
/* Check if a file name is an absolute path */
|
||||
gboolean g_path_is_absolute (const gchar *file_name);
|
||||
|
||||
/* In case of absolute paths, skip the root part */
|
||||
G_CONST_RETURN gchar* g_path_skip_root (const gchar *file_name);
|
||||
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
|
||||
/* These two functions are deprecated and will be removed in the next
|
||||
* major release of GLib. Use g_path_get_dirname/g_path_get_basename
|
||||
* instead. Whatch out! The string returned by g_path_get_basename
|
||||
* must be g_freed, while the string returned by g_basename must not.*/
|
||||
G_CONST_RETURN gchar* g_basename (const gchar *file_name);
|
||||
#define g_dirname g_path_get_dirname
|
||||
|
||||
#endif /* G_DISABLE_DEPRECATED */
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#define g_get_current_dir g_get_current_dir_utf8
|
||||
#endif
|
||||
|
||||
/* The returned strings are newly allocated with g_malloc() */
|
||||
gchar* g_get_current_dir (void);
|
||||
gchar* g_path_get_basename (const gchar *file_name) G_GNUC_MALLOC;
|
||||
gchar* g_path_get_dirname (const gchar *file_name) G_GNUC_MALLOC;
|
||||
|
||||
/* Set the pointer at the specified location to NULL */
|
||||
void g_nullify_pointer (gpointer *nullify_location);
|
||||
|
||||
/* return the environment string for the variable. The returned memory
|
||||
* must not be freed. */
|
||||
#ifdef G_OS_WIN32
|
||||
#define g_getenv g_getenv_utf8
|
||||
#define g_setenv g_setenv_utf8
|
||||
#define g_unsetenv g_unsetenv_utf8
|
||||
#define g_find_program_in_path g_find_program_in_path_utf8
|
||||
#endif
|
||||
|
||||
G_CONST_RETURN gchar* g_getenv (const gchar *variable);
|
||||
gboolean g_setenv (const gchar *variable,
|
||||
const gchar *value,
|
||||
gboolean overwrite);
|
||||
void g_unsetenv (const gchar *variable);
|
||||
gchar** g_listenv (void);
|
||||
|
||||
/* private */
|
||||
const gchar* _g_getenv_nomalloc (const gchar *variable,
|
||||
gchar buffer[1024]);
|
||||
|
||||
/* we try to provide a useful equivalent for ATEXIT if it is
|
||||
* not defined, but use is actually abandoned. people should
|
||||
* use g_atexit() instead.
|
||||
*/
|
||||
typedef void (*GVoidFunc) (void);
|
||||
#ifndef ATEXIT
|
||||
# define ATEXIT(proc) g_ATEXIT(proc)
|
||||
#else
|
||||
# define G_NATIVE_ATEXIT
|
||||
#endif /* ATEXIT */
|
||||
/* we use a GLib function as a replacement for ATEXIT, so
|
||||
* the programmer is not required to check the return value
|
||||
* (if there is any in the implementation) and doesn't encounter
|
||||
* missing include files.
|
||||
*/
|
||||
void g_atexit (GVoidFunc func);
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
/* It's a bad idea to wrap atexit() on Windows. If the GLib DLL calls
|
||||
* atexit(), the function will be called when the GLib DLL is detached
|
||||
* from the program, which is not what the caller wants. The caller
|
||||
* wants the function to be called when it *itself* exits (or is
|
||||
* detached, in case the caller, too, is a DLL).
|
||||
*/
|
||||
//desmume: zero 28-may-2009 - wtf we dont need this
|
||||
//int atexit (void (*)(void));
|
||||
#define g_atexit(func) atexit(func)
|
||||
#endif
|
||||
|
||||
/* Look for an executable in PATH, following execvp() rules */
|
||||
gchar* g_find_program_in_path (const gchar *program);
|
||||
|
||||
/* Bit tests
|
||||
*/
|
||||
G_INLINE_FUNC gint g_bit_nth_lsf (gulong mask,
|
||||
gint nth_bit) G_GNUC_CONST;
|
||||
G_INLINE_FUNC gint g_bit_nth_msf (gulong mask,
|
||||
gint nth_bit) G_GNUC_CONST;
|
||||
G_INLINE_FUNC guint g_bit_storage (gulong number) G_GNUC_CONST;
|
||||
|
||||
/* Trash Stacks
|
||||
* elements need to be >= sizeof (gpointer)
|
||||
*/
|
||||
typedef struct _GTrashStack GTrashStack;
|
||||
struct _GTrashStack
|
||||
{
|
||||
GTrashStack *next;
|
||||
};
|
||||
|
||||
G_INLINE_FUNC void g_trash_stack_push (GTrashStack **stack_p,
|
||||
gpointer data_p);
|
||||
G_INLINE_FUNC gpointer g_trash_stack_pop (GTrashStack **stack_p);
|
||||
G_INLINE_FUNC gpointer g_trash_stack_peek (GTrashStack **stack_p);
|
||||
G_INLINE_FUNC guint g_trash_stack_height (GTrashStack **stack_p);
|
||||
|
||||
/* inline function implementations
|
||||
*/
|
||||
#if defined (G_CAN_INLINE) || defined (__G_UTILS_C__)
|
||||
G_INLINE_FUNC gint
|
||||
g_bit_nth_lsf (gulong mask,
|
||||
gint nth_bit)
|
||||
{
|
||||
if (G_UNLIKELY (nth_bit < -1))
|
||||
nth_bit = -1;
|
||||
while (nth_bit < ((GLIB_SIZEOF_LONG * 8) - 1))
|
||||
{
|
||||
nth_bit++;
|
||||
if (mask & (1UL << nth_bit))
|
||||
return nth_bit;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
G_INLINE_FUNC gint
|
||||
g_bit_nth_msf (gulong mask,
|
||||
gint nth_bit)
|
||||
{
|
||||
if (nth_bit < 0 || G_UNLIKELY (nth_bit > GLIB_SIZEOF_LONG * 8))
|
||||
nth_bit = GLIB_SIZEOF_LONG * 8;
|
||||
while (nth_bit > 0)
|
||||
{
|
||||
nth_bit--;
|
||||
if (mask & (1UL << nth_bit))
|
||||
return nth_bit;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
G_INLINE_FUNC guint
|
||||
g_bit_storage (gulong number)
|
||||
{
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__OPTIMIZE__)
|
||||
return G_LIKELY (number) ?
|
||||
((GLIB_SIZEOF_LONG * 8 - 1) ^ __builtin_clzl(number)) + 1 : 1;
|
||||
#else
|
||||
register guint n_bits = 0;
|
||||
|
||||
do
|
||||
{
|
||||
n_bits++;
|
||||
number >>= 1;
|
||||
}
|
||||
while (number);
|
||||
return n_bits;
|
||||
#endif
|
||||
}
|
||||
G_INLINE_FUNC void
|
||||
g_trash_stack_push (GTrashStack **stack_p,
|
||||
gpointer data_p)
|
||||
{
|
||||
GTrashStack *data = (GTrashStack *) data_p;
|
||||
|
||||
data->next = *stack_p;
|
||||
*stack_p = data;
|
||||
}
|
||||
G_INLINE_FUNC gpointer
|
||||
g_trash_stack_pop (GTrashStack **stack_p)
|
||||
{
|
||||
GTrashStack *data;
|
||||
|
||||
data = *stack_p;
|
||||
if (data)
|
||||
{
|
||||
*stack_p = data->next;
|
||||
/* NULLify private pointer here, most platforms store NULL as
|
||||
* subsequent 0 bytes
|
||||
*/
|
||||
data->next = NULL;
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
G_INLINE_FUNC gpointer
|
||||
g_trash_stack_peek (GTrashStack **stack_p)
|
||||
{
|
||||
GTrashStack *data;
|
||||
|
||||
data = *stack_p;
|
||||
|
||||
return data;
|
||||
}
|
||||
G_INLINE_FUNC guint
|
||||
g_trash_stack_height (GTrashStack **stack_p)
|
||||
{
|
||||
GTrashStack *data;
|
||||
guint i = 0;
|
||||
|
||||
for (data = *stack_p; data; data = data->next)
|
||||
i++;
|
||||
|
||||
return i;
|
||||
}
|
||||
#endif /* G_CAN_INLINE || __G_UTILS_C__ */
|
||||
|
||||
/* Glib version.
|
||||
* we prefix variable declarations so they can
|
||||
* properly get exported in windows dlls.
|
||||
*/
|
||||
GLIB_VAR const guint glib_major_version;
|
||||
GLIB_VAR const guint glib_minor_version;
|
||||
GLIB_VAR const guint glib_micro_version;
|
||||
GLIB_VAR const guint glib_interface_age;
|
||||
GLIB_VAR const guint glib_binary_age;
|
||||
|
||||
const gchar * glib_check_version (guint required_major,
|
||||
guint required_minor,
|
||||
guint required_micro);
|
||||
|
||||
#define GLIB_CHECK_VERSION(major,minor,micro) \
|
||||
(GLIB_MAJOR_VERSION > (major) || \
|
||||
(GLIB_MAJOR_VERSION == (major) && GLIB_MINOR_VERSION > (minor)) || \
|
||||
(GLIB_MAJOR_VERSION == (major) && GLIB_MINOR_VERSION == (minor) && \
|
||||
GLIB_MICRO_VERSION >= (micro)))
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
|
||||
/*
|
||||
* This macro is deprecated. This DllMain() is too complex. It is
|
||||
* recommended to write an explicit minimal DLlMain() that just saves
|
||||
* the handle to the DLL and then use that handle instead, for
|
||||
* instance passing it to
|
||||
* g_win32_get_package_installation_directory_of_module().
|
||||
*
|
||||
* On Windows, this macro defines a DllMain function that stores the
|
||||
* actual DLL name that the code being compiled will be included in.
|
||||
* STATIC should be empty or 'static'. DLL_NAME is the name of the
|
||||
* (pointer to the) char array where the DLL name will be stored. If
|
||||
* this is used, you must also include <windows.h>. If you need a more complex
|
||||
* DLL entry point function, you cannot use this.
|
||||
*
|
||||
* On non-Windows platforms, expands to nothing.
|
||||
*/
|
||||
|
||||
#ifndef G_PLATFORM_WIN32
|
||||
# define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name)
|
||||
#else
|
||||
# define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name) \
|
||||
static char *dll_name; \
|
||||
\
|
||||
BOOL WINAPI \
|
||||
DllMain (HINSTANCE hinstDLL, \
|
||||
DWORD fdwReason, \
|
||||
LPVOID lpvReserved) \
|
||||
{ \
|
||||
wchar_t wcbfr[1000]; \
|
||||
char *tem; \
|
||||
switch (fdwReason) \
|
||||
{ \
|
||||
case DLL_PROCESS_ATTACH: \
|
||||
GetModuleFileNameW ((HMODULE) hinstDLL, wcbfr, G_N_ELEMENTS (wcbfr)); \
|
||||
tem = g_utf16_to_utf8 (wcbfr, -1, NULL, NULL, NULL); \
|
||||
dll_name = g_path_get_basename (tem); \
|
||||
g_free (tem); \
|
||||
break; \
|
||||
} \
|
||||
\
|
||||
return TRUE; \
|
||||
}
|
||||
|
||||
#endif /* !G_DISABLE_DEPRECATED */
|
||||
|
||||
#endif /* G_PLATFORM_WIN32 */
|
||||
|
||||
#endif /* __G_UTILS_H__ */
|
|
@ -1,114 +0,0 @@
|
|||
/* GLIB - Library of useful routines for C programming
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_WIN32_H__
|
||||
#define __G_WIN32_H__
|
||||
|
||||
#include <glib/gtypes.h>
|
||||
|
||||
#ifdef G_PLATFORM_WIN32
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 1024
|
||||
#endif
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
|
||||
/*
|
||||
* To get prototypes for the following POSIXish functions, you have to
|
||||
* include the indicated non-POSIX headers. The functions are defined
|
||||
* in OLDNAMES.LIB (MSVC) or -lmoldname-msvc (mingw32). But note that
|
||||
* for POSIX functions that take or return file names in the system
|
||||
* codepage, in many cases you would want to use the GLib wrappers in
|
||||
* gstdio.h and UTF-8 instead.
|
||||
*
|
||||
* getcwd: <direct.h> (MSVC), <io.h> (mingw32)
|
||||
* getpid: <process.h>
|
||||
* access: <io.h>
|
||||
* unlink: <stdio.h> or <io.h>
|
||||
* open, read, write, lseek, close: <io.h>
|
||||
* rmdir: <io.h>
|
||||
* pipe: <io.h> (actually, _pipe())
|
||||
*/
|
||||
|
||||
/* For some POSIX functions that are not provided by the MS runtime,
|
||||
* we provide emulation functions in glib, which are prefixed with
|
||||
* g_win32_. Or that was the idea at some time, but there is just one
|
||||
* of those:
|
||||
*/
|
||||
gint g_win32_ftruncate (gint f,
|
||||
guint size);
|
||||
#endif /* G_OS_WIN32 */
|
||||
|
||||
/* The MS setlocale uses locale names of the form "English_United
|
||||
* States.1252" etc. We want the Unixish standard form "en", "zh_TW"
|
||||
* etc. This function gets the current thread locale from Windows 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().
|
||||
*/
|
||||
gchar* g_win32_getlocale (void);
|
||||
|
||||
/* Translate a Win32 error code (as returned by GetLastError()) into
|
||||
* the corresponding message. The returned string should be deallocated
|
||||
* with g_free().
|
||||
*/
|
||||
gchar* g_win32_error_message (gint error);
|
||||
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
|
||||
#define g_win32_get_package_installation_directory g_win32_get_package_installation_directory_utf8
|
||||
#define g_win32_get_package_installation_subdirectory g_win32_get_package_installation_subdirectory_utf8
|
||||
|
||||
gchar* g_win32_get_package_installation_directory (const gchar *package,
|
||||
const gchar *dll_name);
|
||||
|
||||
gchar* g_win32_get_package_installation_subdirectory (const gchar *package,
|
||||
const gchar *dll_name,
|
||||
const gchar *subdir);
|
||||
|
||||
#endif
|
||||
|
||||
gchar* g_win32_get_package_installation_directory_of_module (gpointer hmodule);
|
||||
|
||||
guint g_win32_get_windows_version (void);
|
||||
|
||||
gchar* g_win32_locale_filename_from_utf8 (const gchar *utf8filename);
|
||||
|
||||
/* As of GLib 2.14 we only support NT-based Windows */
|
||||
#define G_WIN32_IS_NT_BASED() TRUE
|
||||
#define G_WIN32_HAVE_WIDECHAR_API() TRUE
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* G_PLATFORM_WIN32 */
|
||||
|
||||
#endif /* __G_WIN32_H__ */
|
|
@ -1,46 +0,0 @@
|
|||
The sources are derived from Bruno Haible's libcharset library included
|
||||
with libiconv:
|
||||
|
||||
http//www.gnu.org/software/libiconv
|
||||
|
||||
The 'update.sh' script in this directory, when pointed at
|
||||
the original sources updates the files in this directory
|
||||
(and elsewhere in the GLib distribution) to the new version
|
||||
|
||||
The 'make-patch.sh' script in this directory regenerates
|
||||
the patch files included in this directory from a copy
|
||||
of the pristine sources and the files in this directory.
|
||||
|
||||
The license on the portions from libiconv portions is reproduced
|
||||
below.
|
||||
|
||||
Owen Taylor
|
||||
26 September 2001
|
||||
|
||||
Updated to libiconv-1.12.
|
||||
|
||||
Behdad Esfahbod
|
||||
20 May 2008
|
||||
|
||||
====
|
||||
|
||||
/* Determine a canonical name for the current locale's character encoding.
|
||||
|
||||
Copyright (C) 2000-2001 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
by the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
/* Written by Bruno Haible <haible@clisp.cons.org>. */
|
|
@ -1,46 +0,0 @@
|
|||
/* Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
This file is part of the GNU CHARSET Library.
|
||||
|
||||
The GNU CHARSET Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU CHARSET 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with the GNU CHARSET Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 51 Franklin Street,
|
||||
Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifndef _LIBCHARSET_H
|
||||
#define _LIBCHARSET_H
|
||||
|
||||
#include "localcharset.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Support for relocatable packages. */
|
||||
|
||||
/* Sets the original and the current installation prefix of the package.
|
||||
Relocation simply replaces a pathname starting with the original prefix
|
||||
by the corresponding pathname with the current prefix instead. Both
|
||||
prefixes should be directory names without trailing slash (i.e. use ""
|
||||
instead of "/"). */
|
||||
extern void libcharset_set_relocation_prefix (const char *orig_prefix,
|
||||
const char *curr_prefix);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _LIBCHARSET_H */
|
|
@ -1,43 +0,0 @@
|
|||
/* Determine a canonical name for the current locale's character encoding.
|
||||
Copyright (C) 2000-2003 Free Software Foundation, Inc.
|
||||
This file is part of the GNU CHARSET Library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
by the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
#ifndef _LOCALCHARSET_H
|
||||
#define _LOCALCHARSET_H
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Determine the current locale's character encoding, and canonicalize it
|
||||
into one of the canonical names listed in config.charset.
|
||||
The result must not be freed; it is statically allocated.
|
||||
If the canonical name cannot be determined, the result is a non-canonical
|
||||
name. */
|
||||
extern const char * _g_locale_charset_raw (void);
|
||||
extern const char * _g_locale_charset_unalias (const char *codeset);
|
||||
extern const char * _g_locale_get_charset_aliases (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _LOCALCHARSET_H */
|
|
@ -1,70 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2008 Tor Lillqvist
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; see the file COPYING.LIB.txt. If
|
||||
* not, write to the Free Software Foundation, Inc., 51 Franklin
|
||||
* Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef _LIBINTL_H
|
||||
#define _LIBINTL_H 1
|
||||
|
||||
#include <locale.h>
|
||||
|
||||
#ifndef LC_MESSAGES
|
||||
# define LC_MESSAGES 1729 /* Use same value as in GNU gettext */
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern char *gettext (const char *msgid);
|
||||
|
||||
extern char *dgettext (const char *domainname,
|
||||
const char *msgid);
|
||||
|
||||
extern char *dcgettext (const char *domainname,
|
||||
const char *msgid,
|
||||
int category);
|
||||
|
||||
extern char *ngettext (const char *msgid1,
|
||||
const char *msgid2,
|
||||
unsigned long int n);
|
||||
|
||||
extern char *dngettext (const char *domainname,
|
||||
const char *msgid1,
|
||||
const char *msgid2,
|
||||
unsigned long int n);
|
||||
|
||||
extern char *dcngettext (const char *domainname,
|
||||
const char *msgid1,
|
||||
const char *msgid2,
|
||||
unsigned long int n,
|
||||
int category);
|
||||
|
||||
extern char *textdomain (const char *domainname);
|
||||
|
||||
extern char *bindtextdomain (const char *domainname,
|
||||
const char *dirname);
|
||||
|
||||
extern char *bind_textdomain_codeset (const char *domainname,
|
||||
const char *codeset);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _LIBINTL_H */
|
|
@ -1,31 +0,0 @@
|
|||
#ifndef _MSC_VER
|
||||
#pragma error "This header is for Microsoft VC only."
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Make MSVC more pedantic, this is a recommended pragma list
|
||||
* from _Win32_Programming_ by Rector and Newcomer.
|
||||
*/
|
||||
#pragma warning(error:4002) /* too many actual parameters for macro */
|
||||
#pragma warning(error:4003) /* not enough actual parameters for macro */
|
||||
#pragma warning(1:4010) /* single-line comment contains line-continuation character */
|
||||
#pragma warning(error:4013) /* 'function' undefined; assuming extern returning int */
|
||||
#pragma warning(1:4016) /* no function return type; using int as default */
|
||||
#pragma warning(error:4020) /* too many actual parameters */
|
||||
#pragma warning(error:4021) /* too few actual parameters */
|
||||
#pragma warning(error:4027) /* function declared without formal parameter list */
|
||||
#pragma warning(error:4029) /* declared formal parameter list different from definition */
|
||||
#pragma warning(error:4033) /* 'function' must return a value */
|
||||
#pragma warning(error:4035) /* 'function' : no return value */
|
||||
#pragma warning(error:4045) /* array bounds overflow */
|
||||
#pragma warning(error:4047) /* different levels of indirection */
|
||||
#pragma warning(error:4049) /* terminating line number emission */
|
||||
#pragma warning(error:4053) /* An expression of type void was used as an operand */
|
||||
#pragma warning(error:4071) /* no function prototype given */
|
||||
#pragma warning(disable:4101) /* unreferenced local variable */
|
||||
#pragma warning(error:4150)
|
||||
|
||||
#pragma warning(disable:4244) /* No possible loss of data warnings */
|
||||
#pragma warning(disable:4305) /* No truncation from int to char warnings */
|
||||
|
||||
/* work around Microsoft's premature attempt to deprecate the C-Library */
|
||||
#pragma warning(disable:4996) /* This function or variable may be unsafe. */
|
|
@ -1,5 +0,0 @@
|
|||
PCRE LICENCE
|
||||
|
||||
Please see the file LICENCE in the PCRE distribution for licensing details.
|
||||
|
||||
End
|
|
@ -1,293 +0,0 @@
|
|||
/*************************************************
|
||||
* Perl-Compatible Regular Expressions *
|
||||
*************************************************/
|
||||
|
||||
/* This is the public header file for the PCRE library, to be #included by
|
||||
applications that call the PCRE functions.
|
||||
|
||||
Copyright (c) 1997-2008 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the University of Cambridge nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef _PCRE_H
|
||||
#define _PCRE_H
|
||||
|
||||
/* The current PCRE version information. */
|
||||
|
||||
#define PCRE_MAJOR 7
|
||||
#define PCRE_MINOR 8
|
||||
#define PCRE_PRERELEASE
|
||||
#define PCRE_DATE 2008-09-05
|
||||
|
||||
/* When an application links to a PCRE DLL in Windows, the symbols that are
|
||||
imported have to be identified as such. When building PCRE, the appropriate
|
||||
export setting is defined in pcre_internal.h, which includes this file. So we
|
||||
don't change existing definitions of PCRE_EXP_DECL and PCRECPP_EXP_DECL. */
|
||||
|
||||
#if defined(_WIN32) && !defined(PCRE_STATIC)
|
||||
# ifndef PCRE_EXP_DECL
|
||||
# define PCRE_EXP_DECL extern __declspec(dllimport)
|
||||
# endif
|
||||
# ifdef __cplusplus
|
||||
# ifndef PCRECPP_EXP_DECL
|
||||
# define PCRECPP_EXP_DECL extern __declspec(dllimport)
|
||||
# endif
|
||||
# ifndef PCRECPP_EXP_DEFN
|
||||
# define PCRECPP_EXP_DEFN __declspec(dllimport)
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* By default, we use the standard "extern" declarations. */
|
||||
|
||||
#ifndef PCRE_EXP_DECL
|
||||
# ifdef __cplusplus
|
||||
# define PCRE_EXP_DECL extern "C"
|
||||
# else
|
||||
# define PCRE_EXP_DECL extern
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
# ifndef PCRECPP_EXP_DECL
|
||||
# define PCRECPP_EXP_DECL extern
|
||||
# endif
|
||||
# ifndef PCRECPP_EXP_DEFN
|
||||
# define PCRECPP_EXP_DEFN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Have to include stdlib.h in order to ensure that size_t is defined;
|
||||
it is needed here for malloc. */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Allow for C++ users */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Options */
|
||||
|
||||
#define PCRE_CASELESS 0x00000001
|
||||
#define PCRE_MULTILINE 0x00000002
|
||||
#define PCRE_DOTALL 0x00000004
|
||||
#define PCRE_EXTENDED 0x00000008
|
||||
#define PCRE_ANCHORED 0x00000010
|
||||
#define PCRE_DOLLAR_ENDONLY 0x00000020
|
||||
#define PCRE_EXTRA 0x00000040
|
||||
#define PCRE_NOTBOL 0x00000080
|
||||
#define PCRE_NOTEOL 0x00000100
|
||||
#define PCRE_UNGREEDY 0x00000200
|
||||
#define PCRE_NOTEMPTY 0x00000400
|
||||
#define PCRE_UTF8 0x00000800
|
||||
#define PCRE_NO_AUTO_CAPTURE 0x00001000
|
||||
#define PCRE_NO_UTF8_CHECK 0x00002000
|
||||
#define PCRE_AUTO_CALLOUT 0x00004000
|
||||
#define PCRE_PARTIAL 0x00008000
|
||||
#define PCRE_DFA_SHORTEST 0x00010000
|
||||
#define PCRE_DFA_RESTART 0x00020000
|
||||
#define PCRE_FIRSTLINE 0x00040000
|
||||
#define PCRE_DUPNAMES 0x00080000
|
||||
#define PCRE_NEWLINE_CR 0x00100000
|
||||
#define PCRE_NEWLINE_LF 0x00200000
|
||||
#define PCRE_NEWLINE_CRLF 0x00300000
|
||||
#define PCRE_NEWLINE_ANY 0x00400000
|
||||
#define PCRE_NEWLINE_ANYCRLF 0x00500000
|
||||
#define PCRE_BSR_ANYCRLF 0x00800000
|
||||
#define PCRE_BSR_UNICODE 0x01000000
|
||||
#define PCRE_JAVASCRIPT_COMPAT 0x02000000
|
||||
|
||||
/* Exec-time and get/set-time error codes */
|
||||
|
||||
#define PCRE_ERROR_NOMATCH (-1)
|
||||
#define PCRE_ERROR_NULL (-2)
|
||||
#define PCRE_ERROR_BADOPTION (-3)
|
||||
#define PCRE_ERROR_BADMAGIC (-4)
|
||||
#define PCRE_ERROR_UNKNOWN_OPCODE (-5)
|
||||
#define PCRE_ERROR_UNKNOWN_NODE (-5) /* For backward compatibility */
|
||||
#define PCRE_ERROR_NOMEMORY (-6)
|
||||
#define PCRE_ERROR_NOSUBSTRING (-7)
|
||||
#define PCRE_ERROR_MATCHLIMIT (-8)
|
||||
#define PCRE_ERROR_CALLOUT (-9) /* Never used by PCRE itself */
|
||||
#define PCRE_ERROR_BADUTF8 (-10)
|
||||
#define PCRE_ERROR_BADUTF8_OFFSET (-11)
|
||||
#define PCRE_ERROR_PARTIAL (-12)
|
||||
#define PCRE_ERROR_BADPARTIAL (-13)
|
||||
#define PCRE_ERROR_INTERNAL (-14)
|
||||
#define PCRE_ERROR_BADCOUNT (-15)
|
||||
#define PCRE_ERROR_DFA_UITEM (-16)
|
||||
#define PCRE_ERROR_DFA_UCOND (-17)
|
||||
#define PCRE_ERROR_DFA_UMLIMIT (-18)
|
||||
#define PCRE_ERROR_DFA_WSSIZE (-19)
|
||||
#define PCRE_ERROR_DFA_RECURSE (-20)
|
||||
#define PCRE_ERROR_RECURSIONLIMIT (-21)
|
||||
#define PCRE_ERROR_NULLWSLIMIT (-22) /* No longer actually used */
|
||||
#define PCRE_ERROR_BADNEWLINE (-23)
|
||||
|
||||
/* Request types for pcre_fullinfo() */
|
||||
|
||||
#define PCRE_INFO_OPTIONS 0
|
||||
#define PCRE_INFO_SIZE 1
|
||||
#define PCRE_INFO_CAPTURECOUNT 2
|
||||
#define PCRE_INFO_BACKREFMAX 3
|
||||
#define PCRE_INFO_FIRSTBYTE 4
|
||||
#define PCRE_INFO_FIRSTCHAR 4 /* For backwards compatibility */
|
||||
#define PCRE_INFO_FIRSTTABLE 5
|
||||
#define PCRE_INFO_LASTLITERAL 6
|
||||
#define PCRE_INFO_NAMEENTRYSIZE 7
|
||||
#define PCRE_INFO_NAMECOUNT 8
|
||||
#define PCRE_INFO_NAMETABLE 9
|
||||
#define PCRE_INFO_STUDYSIZE 10
|
||||
#define PCRE_INFO_DEFAULT_TABLES 11
|
||||
#define PCRE_INFO_OKPARTIAL 12
|
||||
#define PCRE_INFO_JCHANGED 13
|
||||
#define PCRE_INFO_HASCRORLF 14
|
||||
|
||||
/* Request types for pcre_config(). Do not re-arrange, in order to remain
|
||||
compatible. */
|
||||
|
||||
#define PCRE_CONFIG_UTF8 0
|
||||
#define PCRE_CONFIG_NEWLINE 1
|
||||
#define PCRE_CONFIG_LINK_SIZE 2
|
||||
#define PCRE_CONFIG_POSIX_MALLOC_THRESHOLD 3
|
||||
#define PCRE_CONFIG_MATCH_LIMIT 4
|
||||
#define PCRE_CONFIG_STACKRECURSE 5
|
||||
#define PCRE_CONFIG_UNICODE_PROPERTIES 6
|
||||
#define PCRE_CONFIG_MATCH_LIMIT_RECURSION 7
|
||||
#define PCRE_CONFIG_BSR 8
|
||||
|
||||
/* Bit flags for the pcre_extra structure. Do not re-arrange or redefine
|
||||
these bits, just add new ones on the end, in order to remain compatible. */
|
||||
|
||||
#define PCRE_EXTRA_STUDY_DATA 0x0001
|
||||
#define PCRE_EXTRA_MATCH_LIMIT 0x0002
|
||||
#define PCRE_EXTRA_CALLOUT_DATA 0x0004
|
||||
#define PCRE_EXTRA_TABLES 0x0008
|
||||
#define PCRE_EXTRA_MATCH_LIMIT_RECURSION 0x0010
|
||||
|
||||
/* Types */
|
||||
|
||||
struct real_pcre; /* declaration; the definition is private */
|
||||
typedef struct real_pcre pcre;
|
||||
|
||||
/* When PCRE is compiled as a C++ library, the subject pointer type can be
|
||||
replaced with a custom type. For conventional use, the public interface is a
|
||||
const char *. */
|
||||
|
||||
#ifndef PCRE_SPTR
|
||||
#define PCRE_SPTR const char *
|
||||
#endif
|
||||
|
||||
/* The structure for passing additional data to pcre_exec(). This is defined in
|
||||
such as way as to be extensible. Always add new fields at the end, in order to
|
||||
remain compatible. */
|
||||
|
||||
typedef struct pcre_extra {
|
||||
unsigned long int flags; /* Bits for which fields are set */
|
||||
void *study_data; /* Opaque data from pcre_study() */
|
||||
unsigned long int match_limit; /* Maximum number of calls to match() */
|
||||
void *callout_data; /* Data passed back in callouts */
|
||||
const unsigned char *tables; /* Pointer to character tables */
|
||||
unsigned long int match_limit_recursion; /* Max recursive calls to match() */
|
||||
} pcre_extra;
|
||||
|
||||
/* The structure for passing out data via the pcre_callout_function. We use a
|
||||
structure so that new fields can be added on the end in future versions,
|
||||
without changing the API of the function, thereby allowing old clients to work
|
||||
without modification. */
|
||||
|
||||
typedef struct pcre_callout_block {
|
||||
int version; /* Identifies version of block */
|
||||
/* ------------------------ Version 0 ------------------------------- */
|
||||
int callout_number; /* Number compiled into pattern */
|
||||
int *offset_vector; /* The offset vector */
|
||||
PCRE_SPTR subject; /* The subject being matched */
|
||||
int subject_length; /* The length of the subject */
|
||||
int start_match; /* Offset to start of this match attempt */
|
||||
int current_position; /* Where we currently are in the subject */
|
||||
int capture_top; /* Max current capture */
|
||||
int capture_last; /* Most recently closed capture */
|
||||
void *callout_data; /* Data passed in with the call */
|
||||
/* ------------------- Added for Version 1 -------------------------- */
|
||||
int pattern_position; /* Offset to next item in the pattern */
|
||||
int next_item_length; /* Length of next item in the pattern */
|
||||
/* ------------------------------------------------------------------ */
|
||||
} pcre_callout_block;
|
||||
|
||||
#include "glib.h"
|
||||
#include "galias.h"
|
||||
|
||||
#define pcre_malloc g_try_malloc
|
||||
#define pcre_free g_free
|
||||
#define pcre_stack_malloc g_try_malloc
|
||||
|
||||
PCRE_EXP_DECL int (*pcre_callout)(pcre_callout_block *);
|
||||
|
||||
/* Exported PCRE functions */
|
||||
|
||||
PCRE_EXP_DECL pcre *pcre_compile(const char *, int, const char **, int *,
|
||||
const unsigned char *);
|
||||
PCRE_EXP_DECL pcre *pcre_compile2(const char *, int, int *, const char **,
|
||||
int *, const unsigned char *);
|
||||
PCRE_EXP_DECL int pcre_config(int, void *);
|
||||
PCRE_EXP_DECL int pcre_copy_named_substring(const pcre *, const char *,
|
||||
int *, int, const char *, char *, int);
|
||||
PCRE_EXP_DECL int pcre_copy_substring(const char *, int *, int, int, char *,
|
||||
int);
|
||||
PCRE_EXP_DECL int pcre_dfa_exec(const pcre *, const pcre_extra *,
|
||||
const char *, int, int, int, int *, int , int *, int);
|
||||
PCRE_EXP_DECL int pcre_exec(const pcre *, const pcre_extra *, PCRE_SPTR,
|
||||
int, int, int, int *, int);
|
||||
PCRE_EXP_DECL void pcre_free_substring(const char *);
|
||||
PCRE_EXP_DECL void pcre_free_substring_list(const char **);
|
||||
PCRE_EXP_DECL int pcre_fullinfo(const pcre *, const pcre_extra *, int,
|
||||
void *);
|
||||
PCRE_EXP_DECL int pcre_get_named_substring(const pcre *, const char *,
|
||||
int *, int, const char *, const char **);
|
||||
PCRE_EXP_DECL int pcre_get_stringnumber(const pcre *, const char *);
|
||||
PCRE_EXP_DECL int pcre_get_stringtable_entries(const pcre *, const char *,
|
||||
char **, char **);
|
||||
PCRE_EXP_DECL int pcre_get_substring(const char *, int *, int, int,
|
||||
const char **);
|
||||
PCRE_EXP_DECL int pcre_get_substring_list(const char *, int *, int,
|
||||
const char ***);
|
||||
PCRE_EXP_DECL int pcre_info(const pcre *, int *, int *);
|
||||
PCRE_EXP_DECL const unsigned char *pcre_maketables(void);
|
||||
PCRE_EXP_DECL int pcre_refcount(pcre *, int);
|
||||
PCRE_EXP_DECL pcre_extra *pcre_study(const pcre *, int, const char **);
|
||||
PCRE_EXP_DECL const char *pcre_version(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* End of pcre.h */
|
File diff suppressed because it is too large
Load Diff
|
@ -1,144 +0,0 @@
|
|||
/*************************************************
|
||||
* Unicode Property Table handler *
|
||||
*************************************************/
|
||||
|
||||
#ifndef _UCP_H
|
||||
#define _UCP_H
|
||||
|
||||
/* This file contains definitions of the property values that are returned by
|
||||
the function _pcre_ucp_findprop(). New values that are added for new releases
|
||||
of Unicode should always be at the end of each enum, for backwards
|
||||
compatibility. */
|
||||
|
||||
/* These are the general character categories. */
|
||||
|
||||
enum {
|
||||
ucp_C, /* Other */
|
||||
ucp_L, /* Letter */
|
||||
ucp_M, /* Mark */
|
||||
ucp_N, /* Number */
|
||||
ucp_P, /* Punctuation */
|
||||
ucp_S, /* Symbol */
|
||||
ucp_Z /* Separator */
|
||||
};
|
||||
|
||||
/* These are the particular character types. */
|
||||
|
||||
enum {
|
||||
ucp_Cc, /* Control */
|
||||
ucp_Cf, /* Format */
|
||||
ucp_Cn, /* Unassigned */
|
||||
ucp_Co, /* Private use */
|
||||
ucp_Cs, /* Surrogate */
|
||||
ucp_Ll, /* Lower case letter */
|
||||
ucp_Lm, /* Modifier letter */
|
||||
ucp_Lo, /* Other letter */
|
||||
ucp_Lt, /* Title case letter */
|
||||
ucp_Lu, /* Upper case letter */
|
||||
ucp_Mc, /* Spacing mark */
|
||||
ucp_Me, /* Enclosing mark */
|
||||
ucp_Mn, /* Non-spacing mark */
|
||||
ucp_Nd, /* Decimal number */
|
||||
ucp_Nl, /* Letter number */
|
||||
ucp_No, /* Other number */
|
||||
ucp_Pc, /* Connector punctuation */
|
||||
ucp_Pd, /* Dash punctuation */
|
||||
ucp_Pe, /* Close punctuation */
|
||||
ucp_Pf, /* Final punctuation */
|
||||
ucp_Pi, /* Initial punctuation */
|
||||
ucp_Po, /* Other punctuation */
|
||||
ucp_Ps, /* Open punctuation */
|
||||
ucp_Sc, /* Currency symbol */
|
||||
ucp_Sk, /* Modifier symbol */
|
||||
ucp_Sm, /* Mathematical symbol */
|
||||
ucp_So, /* Other symbol */
|
||||
ucp_Zl, /* Line separator */
|
||||
ucp_Zp, /* Paragraph separator */
|
||||
ucp_Zs /* Space separator */
|
||||
};
|
||||
|
||||
/* These are the script identifications. */
|
||||
|
||||
enum {
|
||||
ucp_Arabic = G_UNICODE_SCRIPT_ARABIC,
|
||||
ucp_Armenian = G_UNICODE_SCRIPT_ARMENIAN,
|
||||
ucp_Bengali = G_UNICODE_SCRIPT_BENGALI,
|
||||
ucp_Bopomofo = G_UNICODE_SCRIPT_BOPOMOFO,
|
||||
ucp_Braille = G_UNICODE_SCRIPT_BRAILLE,
|
||||
ucp_Buginese = G_UNICODE_SCRIPT_BUGINESE,
|
||||
ucp_Buhid = G_UNICODE_SCRIPT_BUHID,
|
||||
ucp_Canadian_Aboriginal = G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL,
|
||||
ucp_Cherokee = G_UNICODE_SCRIPT_CHEROKEE,
|
||||
ucp_Common = G_UNICODE_SCRIPT_COMMON,
|
||||
ucp_Coptic = G_UNICODE_SCRIPT_COPTIC,
|
||||
ucp_Cypriot = G_UNICODE_SCRIPT_CYPRIOT,
|
||||
ucp_Cyrillic = G_UNICODE_SCRIPT_CYRILLIC,
|
||||
ucp_Deseret = G_UNICODE_SCRIPT_DESERET,
|
||||
ucp_Devanagari = G_UNICODE_SCRIPT_DEVANAGARI,
|
||||
ucp_Ethiopic = G_UNICODE_SCRIPT_ETHIOPIC,
|
||||
ucp_Georgian = G_UNICODE_SCRIPT_GEORGIAN,
|
||||
ucp_Glagolitic = G_UNICODE_SCRIPT_GLAGOLITIC,
|
||||
ucp_Gothic = G_UNICODE_SCRIPT_GOTHIC,
|
||||
ucp_Greek = G_UNICODE_SCRIPT_GREEK,
|
||||
ucp_Gujarati = G_UNICODE_SCRIPT_GUJARATI,
|
||||
ucp_Gurmukhi = G_UNICODE_SCRIPT_GURMUKHI,
|
||||
ucp_Han = G_UNICODE_SCRIPT_HAN,
|
||||
ucp_Hangul = G_UNICODE_SCRIPT_HANGUL,
|
||||
ucp_Hanunoo = G_UNICODE_SCRIPT_HANUNOO,
|
||||
ucp_Hebrew = G_UNICODE_SCRIPT_HEBREW,
|
||||
ucp_Hiragana = G_UNICODE_SCRIPT_HIRAGANA,
|
||||
ucp_Inherited = G_UNICODE_SCRIPT_INHERITED,
|
||||
ucp_Kannada = G_UNICODE_SCRIPT_KANNADA,
|
||||
ucp_Katakana = G_UNICODE_SCRIPT_KATAKANA,
|
||||
ucp_Kharoshthi = G_UNICODE_SCRIPT_KHAROSHTHI,
|
||||
ucp_Khmer = G_UNICODE_SCRIPT_KHMER,
|
||||
ucp_Lao = G_UNICODE_SCRIPT_LAO,
|
||||
ucp_Latin = G_UNICODE_SCRIPT_LATIN,
|
||||
ucp_Limbu = G_UNICODE_SCRIPT_LIMBU,
|
||||
ucp_Linear_B = G_UNICODE_SCRIPT_LINEAR_B,
|
||||
ucp_Malayalam = G_UNICODE_SCRIPT_MALAYALAM,
|
||||
ucp_Mongolian = G_UNICODE_SCRIPT_MONGOLIAN,
|
||||
ucp_Myanmar = G_UNICODE_SCRIPT_MYANMAR,
|
||||
ucp_New_Tai_Lue = G_UNICODE_SCRIPT_NEW_TAI_LUE,
|
||||
ucp_Ogham = G_UNICODE_SCRIPT_OGHAM,
|
||||
ucp_Old_Italic = G_UNICODE_SCRIPT_OLD_ITALIC,
|
||||
ucp_Old_Persian = G_UNICODE_SCRIPT_OLD_PERSIAN,
|
||||
ucp_Oriya = G_UNICODE_SCRIPT_ORIYA,
|
||||
ucp_Osmanya = G_UNICODE_SCRIPT_OSMANYA,
|
||||
ucp_Runic = G_UNICODE_SCRIPT_RUNIC,
|
||||
ucp_Shavian = G_UNICODE_SCRIPT_SHAVIAN,
|
||||
ucp_Sinhala = G_UNICODE_SCRIPT_SINHALA,
|
||||
ucp_Syloti_Nagri = G_UNICODE_SCRIPT_SYLOTI_NAGRI,
|
||||
ucp_Syriac = G_UNICODE_SCRIPT_SYRIAC,
|
||||
ucp_Tagalog = G_UNICODE_SCRIPT_TAGALOG,
|
||||
ucp_Tagbanwa = G_UNICODE_SCRIPT_TAGBANWA,
|
||||
ucp_Tai_Le = G_UNICODE_SCRIPT_TAI_LE,
|
||||
ucp_Tamil = G_UNICODE_SCRIPT_TAMIL,
|
||||
ucp_Telugu = G_UNICODE_SCRIPT_TELUGU,
|
||||
ucp_Thaana = G_UNICODE_SCRIPT_THAANA,
|
||||
ucp_Thai = G_UNICODE_SCRIPT_THAI,
|
||||
ucp_Tibetan = G_UNICODE_SCRIPT_TIBETAN,
|
||||
ucp_Tifinagh = G_UNICODE_SCRIPT_TIFINAGH,
|
||||
ucp_Ugaritic = G_UNICODE_SCRIPT_UGARITIC,
|
||||
ucp_Yi = G_UNICODE_SCRIPT_YI,
|
||||
ucp_Balinese = G_UNICODE_SCRIPT_BALINESE, /* New for Unicode 5.0.0 */
|
||||
ucp_Cuneiform = G_UNICODE_SCRIPT_CUNEIFORM, /* New for Unicode 5.0.0 */
|
||||
ucp_Nko = G_UNICODE_SCRIPT_NKO, /* New for Unicode 5.0.0 */
|
||||
ucp_Phags_Pa = G_UNICODE_SCRIPT_PHAGS_PA, /* New for Unicode 5.0.0 */
|
||||
ucp_Phoenician = G_UNICODE_SCRIPT_PHOENICIAN, /* New for Unicode 5.0.0 */
|
||||
ucp_Carian = G_UNICODE_SCRIPT_CARIAN, /* New for Unicode 5.1 */
|
||||
ucp_Cham = G_UNICODE_SCRIPT_CHAM, /* New for Unicode 5.1 */
|
||||
ucp_Kayah_Li = G_UNICODE_SCRIPT_KAYAH_LI, /* New for Unicode 5.1 */
|
||||
ucp_Lepcha = G_UNICODE_SCRIPT_LEPCHA, /* New for Unicode 5.1 */
|
||||
ucp_Lycian = G_UNICODE_SCRIPT_LYCIAN, /* New for Unicode 5.1 */
|
||||
ucp_Lydian = G_UNICODE_SCRIPT_LYDIAN, /* New for Unicode 5.1 */
|
||||
ucp_Ol_Chiki = G_UNICODE_SCRIPT_OL_CHIKI, /* New for Unicode 5.1 */
|
||||
ucp_Rejang = G_UNICODE_SCRIPT_REJANG, /* New for Unicode 5.1 */
|
||||
ucp_Saurashtra = G_UNICODE_SCRIPT_SAURASHTRA, /* New for Unicode 5.1 */
|
||||
ucp_Sundanese = G_UNICODE_SCRIPT_SUNDANESE, /* New for Unicode 5.1 */
|
||||
ucp_Vai = G_UNICODE_SCRIPT_VAI /* New for Unicode 5.1 */
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/* End of ucp.h */
|
|
@ -1,92 +0,0 @@
|
|||
/*************************************************
|
||||
* Unicode Property Table handler *
|
||||
*************************************************/
|
||||
|
||||
#ifndef _UCPINTERNAL_H
|
||||
#define _UCPINTERNAL_H
|
||||
|
||||
/* Internal header file defining the layout of the bits in each pair of 32-bit
|
||||
words that form a data item in the table. */
|
||||
|
||||
typedef struct cnode {
|
||||
pcre_uint32 f0;
|
||||
pcre_uint32 f1;
|
||||
} cnode;
|
||||
|
||||
/* Things for the f0 field */
|
||||
|
||||
#define f0_scriptmask 0xff000000 /* Mask for script field */
|
||||
#define f0_scriptshift 24 /* Shift for script value */
|
||||
#define f0_rangeflag 0x00800000 /* Flag for a range item */
|
||||
#define f0_charmask 0x001fffff /* Mask for code point value */
|
||||
|
||||
/* Things for the f1 field */
|
||||
|
||||
#define f1_typemask 0xfc000000 /* Mask for char type field */
|
||||
#define f1_typeshift 26 /* Shift for the type field */
|
||||
#define f1_rangemask 0x0000ffff /* Mask for a range offset */
|
||||
#define f1_casemask 0x0000ffff /* Mask for a case offset */
|
||||
#define f1_caseneg 0xffff8000 /* Bits for negation */
|
||||
|
||||
/* The data consists of a vector of structures of type cnode. The two unsigned
|
||||
32-bit integers are used as follows:
|
||||
|
||||
(f0) (1) The most significant byte holds the script number. The numbers are
|
||||
defined by the enum in ucp.h.
|
||||
|
||||
(2) The 0x00800000 bit is set if this entry defines a range of characters.
|
||||
It is not set if this entry defines a single character
|
||||
|
||||
(3) The 0x00600000 bits are spare.
|
||||
|
||||
(4) The 0x001fffff bits contain the code point. No Unicode code point will
|
||||
ever be greater than 0x0010ffff, so this should be OK for ever.
|
||||
|
||||
(f1) (1) The 0xfc000000 bits contain the character type number. The numbers are
|
||||
defined by an enum in ucp.h.
|
||||
|
||||
(2) The 0x03ff0000 bits are spare.
|
||||
|
||||
(3) The 0x0000ffff bits contain EITHER the unsigned offset to the top of
|
||||
range if this entry defines a range, OR the *signed* offset to the
|
||||
character's "other case" partner if this entry defines a single
|
||||
character. There is no partner if the value is zero.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
| script (8) |.|.|.| codepoint (21) || type (6) |.|.| spare (8) | offset (16) |
|
||||
-------------------------------------------------------------------------------
|
||||
| | | | |
|
||||
| | |-> spare | |-> spare
|
||||
| | |
|
||||
| |-> spare |-> spare
|
||||
|
|
||||
|-> range flag
|
||||
|
||||
The upper/lower casing information is set only for characters that come in
|
||||
pairs. The non-one-to-one mappings in the Unicode data are ignored.
|
||||
|
||||
When searching the data, proceed as follows:
|
||||
|
||||
(1) Set up for a binary chop search.
|
||||
|
||||
(2) If the top is not greater than the bottom, the character is not in the
|
||||
table. Its type must therefore be "Cn" ("Undefined").
|
||||
|
||||
(3) Find the middle vector element.
|
||||
|
||||
(4) Extract the code point and compare. If equal, we are done.
|
||||
|
||||
(5) If the test character is smaller, set the top to the current point, and
|
||||
goto (2).
|
||||
|
||||
(6) If the current entry defines a range, compute the last character by adding
|
||||
the offset, and see if the test character is within the range. If it is,
|
||||
we are done.
|
||||
|
||||
(7) Otherwise, set the bottom to one element past the current point and goto
|
||||
(2).
|
||||
*/
|
||||
|
||||
#endif /* _UCPINTERNAL_H */
|
||||
|
||||
/* End of ucpinternal.h */
|
|
@ -1,255 +0,0 @@
|
|||
/* glibconfig.h.win32.in Merged from two versions generated by configure for gcc and MSVC. */
|
||||
/* glibconfig.h
|
||||
*
|
||||
* This is a generated file. Please modify 'configure.in'
|
||||
*/
|
||||
|
||||
#ifndef __G_LIBCONFIG_H__
|
||||
#define __G_LIBCONFIG_H__
|
||||
|
||||
#include <glib/gmacros.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <float.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_MINFLOAT FLT_MIN
|
||||
#define G_MAXFLOAT FLT_MAX
|
||||
#define G_MINDOUBLE DBL_MIN
|
||||
#define G_MAXDOUBLE DBL_MAX
|
||||
#define G_MINSHORT SHRT_MIN
|
||||
#define G_MAXSHORT SHRT_MAX
|
||||
#define G_MAXUSHORT USHRT_MAX
|
||||
#define G_MININT INT_MIN
|
||||
#define G_MAXINT INT_MAX
|
||||
#define G_MAXUINT UINT_MAX
|
||||
#define G_MINLONG LONG_MIN
|
||||
#define G_MAXLONG LONG_MAX
|
||||
#define G_MAXULONG ULONG_MAX
|
||||
|
||||
typedef signed char gint8;
|
||||
typedef unsigned char guint8;
|
||||
typedef signed short gint16;
|
||||
typedef unsigned short guint16;
|
||||
#define G_GINT16_MODIFIER "h"
|
||||
#define G_GINT16_FORMAT "hi"
|
||||
#define G_GUINT16_FORMAT "hu"
|
||||
typedef signed int gint32;
|
||||
typedef unsigned int guint32;
|
||||
#define G_GINT32_MODIFIER ""
|
||||
#define G_GINT32_FORMAT "i"
|
||||
#define G_GUINT32_FORMAT "u"
|
||||
#define G_HAVE_GINT64 1 /* deprecated, always true */
|
||||
|
||||
#ifndef _MSC_VER
|
||||
G_GNUC_EXTENSION typedef signed long long gint64;
|
||||
G_GNUC_EXTENSION typedef unsigned long long guint64;
|
||||
#else /* _MSC_VER */
|
||||
typedef signed __int64 gint64;
|
||||
typedef unsigned __int64 guint64;
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#define G_GINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##LL))
|
||||
#else /* _MSC_VER */
|
||||
#define G_GINT64_CONSTANT(val) (val##i64)
|
||||
#endif /* _MSC_VER */
|
||||
#ifndef _MSC_VER
|
||||
#define G_GUINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##ULL))
|
||||
#else /* _MSC_VER */
|
||||
#define G_GUINT64_CONSTANT(val) (val##Ui64)
|
||||
#endif /* _MSC_VER */
|
||||
#define G_GINT64_MODIFIER "I64"
|
||||
#define G_GINT64_FORMAT "I64i"
|
||||
#define G_GUINT64_FORMAT "I64u"
|
||||
|
||||
#if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64)
|
||||
|
||||
#define GLIB_SIZEOF_VOID_P 8
|
||||
#define GLIB_SIZEOF_LONG 4
|
||||
#define GLIB_SIZEOF_SIZE_T 8
|
||||
|
||||
typedef signed long long gssize;
|
||||
typedef unsigned long long gsize;
|
||||
#define G_GSIZE_MODIFIER "I64"
|
||||
#define G_GSSIZE_FORMAT "I64d"
|
||||
#define G_GSIZE_FORMAT "I64u"
|
||||
|
||||
#define G_MAXSIZE G_MAXUINT64
|
||||
#define G_MINSSIZE G_MININT64
|
||||
#define G_MAXSSIZE G_MAXINT64
|
||||
|
||||
#else
|
||||
|
||||
#define GLIB_SIZEOF_VOID_P 4
|
||||
#define GLIB_SIZEOF_LONG 4
|
||||
#define GLIB_SIZEOF_SIZE_T 4
|
||||
|
||||
typedef signed int gssize;
|
||||
typedef unsigned int gsize;
|
||||
#define G_GSIZE_MODIFIER ""
|
||||
#define G_GSSIZE_FORMAT "i"
|
||||
#define G_GSIZE_FORMAT "u"
|
||||
|
||||
#define G_MAXSIZE G_MAXUINT
|
||||
#define G_MINSSIZE G_MININT
|
||||
#define G_MAXSSIZE G_MAXINT
|
||||
|
||||
#endif
|
||||
|
||||
typedef gint64 goffset;
|
||||
#define G_MINOFFSET G_MININT64
|
||||
#define G_MAXOFFSET G_MAXINT64
|
||||
|
||||
#ifndef _WIN64
|
||||
|
||||
#define GPOINTER_TO_INT(p) ((gint) (p))
|
||||
#define GPOINTER_TO_UINT(p) ((guint) (p))
|
||||
|
||||
#define GINT_TO_POINTER(i) ((gpointer) (i))
|
||||
#define GUINT_TO_POINTER(u) ((gpointer) (u))
|
||||
|
||||
typedef signed int gintptr;
|
||||
typedef unsigned int guintptr;
|
||||
|
||||
#else
|
||||
|
||||
#define GPOINTER_TO_INT(p) ((gint) (gint64) (p))
|
||||
#define GPOINTER_TO_UINT(p) ((guint) (guint64) (p))
|
||||
|
||||
#define GINT_TO_POINTER(i) ((gpointer) (gint64) (i))
|
||||
#define GUINT_TO_POINTER(u) ((gpointer) (guint64) (u))
|
||||
|
||||
#ifndef _MSC_VER
|
||||
typedef signed long long gintptr;
|
||||
typedef unsigned long long guintptr;
|
||||
#else
|
||||
typedef signed __int64 gintptr;
|
||||
typedef unsigned __int64 guintptr;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef NeXT /* @#%@! NeXTStep */
|
||||
# define g_ATEXIT(proc) (!atexit (proc))
|
||||
#else
|
||||
# define g_ATEXIT(proc) (atexit (proc))
|
||||
#endif
|
||||
|
||||
#define g_memmove(dest,src,len) G_STMT_START { memmove ((dest), (src), (len)); } G_STMT_END
|
||||
|
||||
#define GLIB_MAJOR_VERSION 2
|
||||
#define GLIB_MINOR_VERSION 20
|
||||
#define GLIB_MICRO_VERSION 1
|
||||
|
||||
#define G_OS_WIN32
|
||||
#define G_PLATFORM_WIN32
|
||||
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#define G_VA_COPY va_copy
|
||||
#endif /* not _MSC_VER */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define G_HAVE_INLINE 1
|
||||
#else /* !__cplusplus */
|
||||
#ifndef _MSC_VER
|
||||
#define G_HAVE_INLINE 1
|
||||
#endif /* _MSC_VER */
|
||||
#define G_HAVE___INLINE 1
|
||||
#if !defined(_MSC_VER) && !defined(__DMC__)
|
||||
#define G_HAVE___INLINE__ 1
|
||||
#endif /* !_MSC_VER and !__DMC__ */
|
||||
#endif /* !__cplusplus */
|
||||
|
||||
#define G_CAN_INLINE 1
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#define G_HAVE_ISO_VARARGS 1
|
||||
|
||||
/* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi
|
||||
* is passed ISO vararg support is turned off, and there is no work
|
||||
* around to turn it on, so we unconditionally turn it off.
|
||||
*/
|
||||
#if __GNUC__ == 2 && __GNUC_MINOR__ == 95
|
||||
# undef G_HAVE_ISO_VARARGS
|
||||
#endif
|
||||
|
||||
#define G_HAVE_GNUC_VARARGS 1
|
||||
#else /* _MSC_VER */
|
||||
/* varargs macros available since msvc8 (vs2005) */
|
||||
# if _MSC_VER >= 1400
|
||||
# define G_HAVE_ISO_VARARGS 1
|
||||
# endif
|
||||
#endif /* not _MSC_VER */
|
||||
#define G_HAVE_GROWING_STACK 0
|
||||
|
||||
#define G_GNUC_INTERNAL
|
||||
|
||||
#define G_THREADS_ENABLED
|
||||
#define G_THREADS_IMPL_WIN32
|
||||
typedef struct _GMutex* GStaticMutex;
|
||||
#define G_STATIC_MUTEX_INIT NULL
|
||||
#define g_static_mutex_get_mutex(mutex) \
|
||||
(g_static_mutex_get_mutex_impl_shortcut (mutex))
|
||||
/* This represents a system thread as used by the implementation. An
|
||||
* alien implementaion, as loaded by g_thread_init can only count on
|
||||
* "sizeof (gpointer)" bytes to store their info. We however need more
|
||||
* for some of our native implementations. */
|
||||
typedef union _GSystemThread GSystemThread;
|
||||
union _GSystemThread
|
||||
{
|
||||
#ifndef _WIN64
|
||||
char data[4];
|
||||
#else
|
||||
char data[8];
|
||||
#endif
|
||||
double dummy_double;
|
||||
void *dummy_pointer;
|
||||
long dummy_long;
|
||||
};
|
||||
|
||||
#define GINT16_TO_LE(val) ((gint16) (val))
|
||||
#define GUINT16_TO_LE(val) ((guint16) (val))
|
||||
#define GINT16_TO_BE(val) ((gint16) GUINT16_SWAP_LE_BE (val))
|
||||
#define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val))
|
||||
#define GINT32_TO_LE(val) ((gint32) (val))
|
||||
#define GUINT32_TO_LE(val) ((guint32) (val))
|
||||
#define GINT32_TO_BE(val) ((gint32) GUINT32_SWAP_LE_BE (val))
|
||||
#define GUINT32_TO_BE(val) (GUINT32_SWAP_LE_BE (val))
|
||||
#define GINT64_TO_LE(val) ((gint64) (val))
|
||||
#define GUINT64_TO_LE(val) ((guint64) (val))
|
||||
#define GINT64_TO_BE(val) ((gint64) GUINT64_SWAP_LE_BE (val))
|
||||
#define GUINT64_TO_BE(val) (GUINT64_SWAP_LE_BE (val))
|
||||
#define GLONG_TO_LE(val) ((glong) GINT32_TO_LE (val))
|
||||
#define GULONG_TO_LE(val) ((gulong) GUINT32_TO_LE (val))
|
||||
#define GLONG_TO_BE(val) ((glong) GINT32_TO_BE (val))
|
||||
#define GULONG_TO_BE(val) ((gulong) GUINT32_TO_BE (val))
|
||||
#define GINT_TO_LE(val) ((gint) GINT32_TO_LE (val))
|
||||
#define GUINT_TO_LE(val) ((guint) GUINT32_TO_LE (val))
|
||||
#define GINT_TO_BE(val) ((gint) GINT32_TO_BE (val))
|
||||
#define GUINT_TO_BE(val) ((guint) GUINT32_TO_BE (val))
|
||||
#define G_BYTE_ORDER G_LITTLE_ENDIAN
|
||||
|
||||
#define GLIB_SYSDEF_POLLIN =1
|
||||
#define GLIB_SYSDEF_POLLOUT =4
|
||||
#define GLIB_SYSDEF_POLLPRI =2
|
||||
#define GLIB_SYSDEF_POLLHUP =16
|
||||
#define GLIB_SYSDEF_POLLERR =8
|
||||
#define GLIB_SYSDEF_POLLNVAL =32
|
||||
|
||||
#define G_MODULE_SUFFIX "dll"
|
||||
|
||||
/* A GPid is an abstraction for a process "handle". It is *not* an
|
||||
* abstraction for a process identifier in general. GPid is used in
|
||||
* GLib only for descendant processes spawned with the g_spawn*
|
||||
* functions. On POSIX there is no "process handle" concept as such,
|
||||
* but on Windows a GPid is a handle to a process, a kind of pointer,
|
||||
* not a process identifier.
|
||||
*/
|
||||
typedef void * GPid;
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* GLIBCONFIG_H */
|
Binary file not shown.
Loading…
Reference in New Issue