/* Implementation of the internal dcigettext function.
Copyright (C) 1995-1999, 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. */
/* Tell glibc's <string.h> to provide a prototype for mempcpy().
This must come before <config.h> because <config.h> may include
<features.h>, and once <features.h> has been included, it's too late. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#ifdef __GNUC__
# define alloca __builtin_alloca
# define HAVE_ALLOCA 1
#else
# if defined HAVE_ALLOCA_H || defined _LIBC
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca
char *alloca ();
# endif
# endif
# endif
#endif
#include <errno.h>
#ifndef errno
extern int errno;
#endif
#ifndef __set_errno
# define __set_errno(val) errno = (val)
#endif
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#if !HAVE_STRCHR && !defined _LIBC
# ifndef strchr
# define strchr index
# endif
#endif
#if defined HAVE_UNISTD_H || defined _LIBC
# include <unistd.h>
#endif
#include <locale.h>
#if defined HAVE_SYS_PARAM_H || defined _LIBC
# include <sys/param.h>
#endif
#include "gettextP.h"
#ifdef _LIBC
# include <libintl.h>
#else
# include "libgnuintl.h"
#endif
#include "hash-string.h"
/* Thread safetyness. */
#ifdef _LIBC
# include <bits/libc-lock.h>
#else
/* Provide dummy implementation if this is outside glibc. */
# define __libc_lock_define_initialized(CLASS, NAME)
# define __libc_lock_lock(NAME)
# define __libc_lock_unlock(NAME)
# define __libc_rwlock_define_initialized(CLASS, NAME)
# define __libc_rwlock_rdlock(NAME)
# define __libc_rwlock_unlock(NAME)
#endif
/* Alignment of types. */
#if defined __GNUC__ && __GNUC__ >= 2
# define alignof(TYPE) __alignof__ (TYPE)
#else
# define alignof(TYPE) \
((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2)
#endif
/* The internal variables in the standalone libintl.a must have different
names than the internal variables in GNU libc, otherwise programs
using libintl.a cannot be linked statically. */
#if !defined _LIBC
# define _nl_default_default_domain _nl_default_default_domain__
# define _nl_current_default_domain _nl_current_default_domain__
# define _nl_default_dirname _nl_default_dirname__
# define _nl_domain_bindings _nl_domain_bindings__
#endif
/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
#ifndef offsetof
# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
#endif
/* @@ end of prolog @@ */
#ifdef _LIBC
/* Rename the non ANSI C functions. This is required by the standard
because some ANSI C functions will require linking with this object
file and the name space must not be polluted. */
# define getcwd __getcwd
# ifndef stpcpy
# define stpcpy __stpcpy
# endif
# define tfind __tfind
#else
# if !defined HAVE_GETCWD
char *getwd ();
# define getcwd(buf, max) getwd (buf)
# else
char *getcwd ();
# endif
# ifndef HAVE_STPCPY
static char *stpcpy PARAMS ((char *dest, const char *src));
# endif
# ifndef HAVE_MEMPCPY
static void *mempcpy PARAMS ((void *dest, const void *src, size_t n));
# endif
#endif
/* Amount to increase buffer size by in each try. */
#define PATH_INCR 32
/* The following is from pathmax.h. */
/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
PATH_MAX but might cause redefinition warnings when sys/param.h is
later included (as on MORE/BSD 4.3). */
#if defined _POSIX_VERSION || (defined HAVE_LIMITS_H && !defined __GNUC__)
# include <limits.h>
#endif
#ifndef _POSIX_PATH_MAX
# define _POSIX_PATH_MAX 255
#endif
#if !defined PATH_MAX && defined _PC_PATH_MAX
# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
#endif
/* Don't include sys/param.h if it already has been. */
#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
# include <sys/param.h>
#endif
#if !defined PATH_MAX && defined MAXPATHLEN
# define PATH_MAX MAXPATHLEN
#endif
#ifndef PATH_MAX
# define PATH_MAX _POSIX_PATH_MAX
#endif
/* Pathname support.
ISSLASH(C) tests whether C is a directory separator character.
IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not,
it may be concatenated to a directory pathname.
IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
*/
#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
/* Win32, OS/2, DOS */
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
# define HAS_DEVICE(P) \
((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
&& (P)[1] == ':')
# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
# define IS_PATH_WITH_DIR(P) \
(strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
#else
/* Unix */
# define ISSLASH(C) ((C) == '/')
# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
#endif
/* XPG3 defines the result of `setlocale (category, NULL)' as:
``Directs `setlocale()' to query `category' and return the current
setting of `local'.''
However it does not specify the exact format. Neither do SUSV2 and
ISO C 99. So we can use this feature only on selected systems (e.g.
those using GNU C Library). */
#if defined _LIBC || (defined __GNU_LIBRARY__ && __GNU_LIBRARY__ >= 2)
# define HAVE_LOCALE_NULL
#endif
/* This is the type used for the search tree where known translations
are stored. */
struct known_translation_t
{
/* Domain in which to search. */
char *domainname;
/* The category. */
int category;
/* State of the catalog counter at the point the string was found. */
int counter;
/* Catalog where the string was found. */
struct loaded_l10nfile *domain;
/* And finally the translation. */
const char *translation;
size_t translation_length;
/* Pointer to the string in question. */
char msgid[ZERO];
};
/* Root of the search tree with known translations. We can use this
only if the system provides the `tsearch' function family. */
#if defined HAVE_TSEARCH || defined _LIBC
# include <search.h>
static void *root;
# ifdef _LIBC
# define tsearch __tsearch
# endif
/* Function to compare two entries in the table of known translations. */
static int transcmp PARAMS ((const void *p1, const void *p2));
static int
transcmp (p1, p2)
const void *p1;
const void *p2;
{
const struct known_translation_t *s1;
const struct known_translation_t *s2;
int result;
s1 = (const struct known_translation_t *) p1;
s2 = (const struct known_translation_t *) p2;
result = strcmp (s1->msgid, s2->msgid);
if (result == 0)
{
result = strcmp (s1->domainname, s2->domainname);
if (result == 0)
/* We compare the category last (though this is the cheapest
operation) since it is hopefully always the same (namely
LC_MESSAGES). */
result = s1->category - s2->category;
}
return result;
}
#endif
/* Name of the default domain used for gettext(3) prior any call to
textdomain(3). The default value for this is "messages". */
const char _nl_default_default_domain[] = "messages";
/* Value used as the default domain for gettext(3).
没有合适的资源?快使用搜索试试~ 我知道了~
vorbis-tools-1.0.1.zip_VORB_vorbis_vorbis tools 1.0_vorbis tools
共183个文件
c:53个
h:34个
in:16个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 53 浏览量
2022-09-23
22:31:33
上传
评论
收藏 815KB ZIP 举报
温馨提示
vorbis压缩工具集源码
资源推荐
资源详情
资源评论
收起资源包目录
vorbis-tools-1.0.1.zip_VORB_vorbis_vorbis tools 1.0_vorbis tools (183个子文件)
oggenc.1 7KB
ogg123.1 7KB
oggdec.1 3KB
vorbiscomment.1 2KB
ogginfo.1 1KB
vcut.1 595B
locale.alias 3KB
Makefile.am 1KB
Makefile.am 752B
Makefile.am 691B
Makefile.am 625B
Makefile.am 610B
Makefile.am 546B
Makefile.am 408B
Makefile.am 400B
Makefile.am 290B
Makefile.am 225B
Makefile.am 146B
Makefile.am 123B
AUTHORS 368B
dcigettext.c 33KB
plural.c 32KB
getopt.c 29KB
oggenc.c 28KB
ogginfo2.c 25KB
buffer.c 19KB
audio.c 18KB
ogg123.c 16KB
speex_format.c 15KB
vcut.c 15KB
loadmsgcat.c 15KB
flac_format.c 14KB
encode.c 13KB
vcomment.c 13KB
easyflac.c 12KB
easyflac.c 12KB
charset.c 11KB
vcedit.c 11KB
status.c 11KB
l10nflist.c 10KB
cfgfile_options.c 10KB
callbacks.c 10KB
bindtextdom.c 10KB
localealias.c 9KB
oggdec.c 9KB
cmdline_options.c 9KB
charset_test.c 9KB
http_transport.c 9KB
oggvorbis_format.c 8KB
resample.c 8KB
flac.c 8KB
utf8.c 7KB
playlist.c 7KB
localcharset.c 7KB
iconvert.c 6KB
finddomain.c 6KB
intl-compat.c 5KB
explodename.c 5KB
getopt1.c 4KB
textdomain.c 4KB
file_transport.c 4KB
platform.c 4KB
vorbis_comments.c 4KB
audio.c 3KB
format.c 2KB
ngettext.c 2KB
transport.c 2KB
dngettext.c 2KB
makemap.c 2KB
dcngettext.c 2KB
gettext.c 2KB
dcgettext.c 2KB
dgettext.c 2KB
changelog 3KB
ChangeLog 0B
config.charset 13KB
configure 421KB
control 600B
COPYING 18KB
copyright 731B
vorbis-tools.README.Debian 192B
depcomp 12KB
oggenc_dynamic.dsp 5KB
oggenc.dsp 5KB
vorbiscomment.dsp 5KB
ogginfo.dsp 4KB
vcut.dsp 4KB
tools.dsp 2KB
tools.dsw 2KB
be.gmo 40KB
es.gmo 33KB
fr.gmo 33KB
cs.gmo 32KB
ru.gmo 32KB
ro.gmo 32KB
nl.gmo 31KB
hu.gmo 20KB
sv.gmo 14KB
da.gmo 14KB
hr.gmo 3KB
共 183 条
- 1
- 2
资源评论
APei
- 粉丝: 63
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功