|
Packit |
fc043f |
/* init.h - Declarations for init.c
|
|
Packit |
fc043f |
Copyright (C) 2010 g10 Code GmbH
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
This file is part of libgpg-error.
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
libgpg-error is free software; you can redistribute it and/or
|
|
Packit |
fc043f |
modify it under the terms of the GNU Lesser General Public License
|
|
Packit |
fc043f |
as published by the Free Software Foundation; either version 2.1 of
|
|
Packit |
fc043f |
the License, or (at your option) any later version.
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
libgpg-error is distributed in the hope that it will be useful, but
|
|
Packit |
fc043f |
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
fc043f |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
fc043f |
Lesser General Public License for more details.
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
You should have received a copy of the GNU Lesser General Public
|
|
Packit |
fc043f |
License along with this program; if not, see <https://www.gnu.org/licenses/>.
|
|
Packit |
fc043f |
*/
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
#ifndef INIT_H
|
|
Packit |
fc043f |
#define INIT_H
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
#if HAVE_W32_SYSTEM
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
/* Forward declaration - defined in w32-gettext.c. */
|
|
Packit |
fc043f |
struct loaded_domain;
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
/* An item for a linked list of loaded domains. */
|
|
Packit |
fc043f |
struct domainlist_s
|
|
Packit |
fc043f |
{
|
|
Packit |
fc043f |
struct domainlist_s *next;
|
|
Packit |
fc043f |
char *dname; /* Directory name for the mo file. */
|
|
Packit |
fc043f |
char *fname; /* File name for the MO file. */
|
|
Packit |
fc043f |
int load_failed; /* True if loading the domain failed. */
|
|
Packit |
fc043f |
struct loaded_domain *domain; /* NULL if not loaded. Never changed
|
|
Packit |
fc043f |
once set to non-NULL. */
|
|
Packit |
fc043f |
char name[1]; /* Name of the domain. Never changed
|
|
Packit |
fc043f |
once set. */
|
|
Packit |
fc043f |
};
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
/* 119 bytes for an error message should be enough. With this size we
|
|
Packit |
fc043f |
can assume that the allocation does not take up more than 128 bytes
|
|
Packit |
fc043f |
per thread. Note that this is only used for W32CE. */
|
|
Packit |
fc043f |
#define STRBUFFER_SIZE 120
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
/* The TLS space definition. */
|
|
Packit |
fc043f |
struct tls_space_s
|
|
Packit |
fc043f |
{
|
|
Packit |
fc043f |
/* Flag used by w32-gettext. */
|
|
Packit |
fc043f |
int gt_use_utf8;
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
#ifdef HAVE_W32CE_SYSTEM
|
|
Packit |
fc043f |
char strerror_buffer[STRBUFFER_SIZE];
|
|
Packit |
fc043f |
#endif
|
|
Packit |
fc043f |
};
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
/* Return the TLS. */
|
|
Packit |
fc043f |
struct tls_space_s *get_tls (void);
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
/* Explicit constructor for w32-gettext.c */
|
|
Packit |
fc043f |
#ifndef DLL_EXPORT
|
|
Packit |
fc043f |
void _gpg_w32__init_gettext_module (void);
|
|
Packit |
fc043f |
#endif
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
#endif /*HAVE_W32_SYSTEM*/
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
#endif /*INIT_H*/
|