mirror of
https://github.com/qvacua/vimr.git
synced 2024-08-17 04:30:30 +03:00
Add libintl.a into repository for reproducibility
This commit is contained in:
parent
bf1b668822
commit
03a20fb54a
1
.gitignore
vendored
1
.gitignore
vendored
@ -185,4 +185,3 @@ tags.*
|
||||
/Workspace/.swiftpm
|
||||
.swiftpm
|
||||
/NvimServer/.build
|
||||
bin/neovim/third-party/
|
||||
|
@ -41,14 +41,13 @@ main() {
|
||||
popd >/dev/null
|
||||
|
||||
mkdir universal
|
||||
#cp -r "${arm64_bottle}/gettext/${version}/include" ./universal/
|
||||
cp -r "${arm64_bottle}/gettext/${version}/include" ./universal/
|
||||
mkdir universal/lib
|
||||
lipo "${arm64_bottle}/gettext/${version}/lib/libintl.a" "${x86_64_bottle}/gettext/${version}/lib/libintl.a" -create -output ./universal/lib/libintl.a
|
||||
|
||||
pushd ./universal >/dev/null
|
||||
ln -s /opt/homebrew/opt/gettext/bin .
|
||||
ln -s /opt/homebrew/opt/gettext/share .
|
||||
ln -s /opt/homebrew/opt/gettext/include .
|
||||
popd >/dev/null
|
||||
popd >/dev/null
|
||||
|
||||
|
1
bin/neovim/third-party/gettext/bin
vendored
Symbolic link
1
bin/neovim/third-party/gettext/bin
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
/opt/homebrew/opt/gettext/bin
|
68
bin/neovim/third-party/gettext/include/autosprintf.h
vendored
Normal file
68
bin/neovim/third-party/gettext/include/autosprintf.h
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
/* Class autosprintf - formatted output to an ostream.
|
||||
Copyright (C) 2002, 2012-2016 Free Software Foundation, Inc.
|
||||
|
||||
This program 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 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 Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _AUTOSPRINTF_H
|
||||
#define _AUTOSPRINTF_H
|
||||
|
||||
/* This feature is available in gcc versions 2.5 and later. */
|
||||
#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
|
||||
# define _AUTOSPRINTF_ATTRIBUTE_FORMAT() /* empty */
|
||||
#else
|
||||
/* 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 _AUTOSPRINTF_ATTRIBUTE_FORMAT() \
|
||||
__attribute__ ((__format__ (__printf__, 2, 3)))
|
||||
# else
|
||||
# define _AUTOSPRINTF_ATTRIBUTE_FORMAT() \
|
||||
__attribute__ ((format (printf, 2, 3)))
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
namespace gnu
|
||||
{
|
||||
/* A temporary object, usually allocated on the stack, representing
|
||||
the result of an asprintf() call. */
|
||||
class autosprintf
|
||||
{
|
||||
public:
|
||||
/* Constructor: takes a format string and the printf arguments. */
|
||||
autosprintf (const char *format, ...)
|
||||
_AUTOSPRINTF_ATTRIBUTE_FORMAT();
|
||||
/* Copy constructor. */
|
||||
autosprintf (const autosprintf& src);
|
||||
/* Assignment operator. */
|
||||
autosprintf& operator = (autosprintf temporary);
|
||||
/* Destructor: frees the temporarily allocated string. */
|
||||
~autosprintf ();
|
||||
/* Conversion to string. */
|
||||
operator char * () const;
|
||||
operator std::string () const;
|
||||
/* Output to an ostream. */
|
||||
friend inline std::ostream& operator<< (std::ostream& stream, const autosprintf& tmp)
|
||||
{
|
||||
stream << (tmp.str ? tmp.str : "(error in autosprintf)");
|
||||
return stream;
|
||||
}
|
||||
private:
|
||||
char *str;
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* _AUTOSPRINTF_H */
|
357
bin/neovim/third-party/gettext/include/gettext-po.h
vendored
Normal file
357
bin/neovim/third-party/gettext/include/gettext-po.h
vendored
Normal file
@ -0,0 +1,357 @@
|
||||
/* Public API for GNU gettext PO files - contained in libgettextpo.
|
||||
Copyright (C) 2003-2008, 2010, 2012-2016, 2019-2023 Free Software Foundation, Inc.
|
||||
Written by Bruno Haible <bruno@clisp.org>, 2003.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _GETTEXT_PO_H
|
||||
#define _GETTEXT_PO_H 1
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* =========================== Meta Information ============================ */
|
||||
|
||||
/* Version number: (major<<16) + (minor<<8) + subminor */
|
||||
#define LIBGETTEXTPO_VERSION 0x001604
|
||||
extern int libgettextpo_version;
|
||||
|
||||
/* ================================= Types ================================= */
|
||||
|
||||
/* A po_file_t represents the contents of a PO file. */
|
||||
typedef struct po_file *po_file_t;
|
||||
|
||||
/* A po_message_iterator_t represents an iterator through a domain of a
|
||||
PO file. */
|
||||
typedef struct po_message_iterator *po_message_iterator_t;
|
||||
|
||||
/* A po_message_t represents a message in a PO file. */
|
||||
typedef struct po_message *po_message_t;
|
||||
|
||||
/* A po_filepos_t represents a string's position within a source file. */
|
||||
typedef struct po_filepos *po_filepos_t;
|
||||
|
||||
/* A po_error_handler handles error situations. */
|
||||
struct po_error_handler
|
||||
{
|
||||
/* Signal an error. The error message is built from FORMAT and the following
|
||||
arguments. ERRNUM, if nonzero, is an errno value.
|
||||
Must increment the error_message_count variable declared in error.h.
|
||||
Must not return if STATUS is nonzero. */
|
||||
void (*error) (int status, int errnum,
|
||||
const char *format, ...)
|
||||
#if ((__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3) && !__STRICT_ANSI__
|
||||
__attribute__ ((__format__ (__printf__, 3, 4)))
|
||||
#endif
|
||||
;
|
||||
|
||||
/* Signal an error. The error message is built from FORMAT and the following
|
||||
arguments. The error location is at FILENAME line LINENO. ERRNUM, if
|
||||
nonzero, is an errno value.
|
||||
Must increment the error_message_count variable declared in error.h.
|
||||
Must not return if STATUS is nonzero. */
|
||||
void (*error_at_line) (int status, int errnum,
|
||||
const char *filename, unsigned int lineno,
|
||||
const char *format, ...)
|
||||
#if ((__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3) && !__STRICT_ANSI__
|
||||
__attribute__ ((__format__ (__printf__, 5, 6)))
|
||||
#endif
|
||||
;
|
||||
|
||||
/* Signal a multiline warning. The PREFIX applies to all lines of the
|
||||
MESSAGE. Free the PREFIX and MESSAGE when done. */
|
||||
void (*multiline_warning) (char *prefix, char *message);
|
||||
|
||||
/* Signal a multiline error. The PREFIX applies to all lines of the
|
||||
MESSAGE. Free the PREFIX and MESSAGE when done.
|
||||
Must increment the error_message_count variable declared in error.h if
|
||||
PREFIX is non-NULL. */
|
||||
void (*multiline_error) (char *prefix, char *message);
|
||||
};
|
||||
typedef const struct po_error_handler *po_error_handler_t;
|
||||
|
||||
/* A po_xerror_handler handles warnings, error and fatal error situations. */
|
||||
#define PO_SEVERITY_WARNING 0 /* just a warning, tell the user */
|
||||
#define PO_SEVERITY_ERROR 1 /* an error, the operation cannot complete */
|
||||
#define PO_SEVERITY_FATAL_ERROR 2 /* an error, the operation must be aborted */
|
||||
struct po_xerror_handler
|
||||
{
|
||||
/* Signal a problem of the given severity.
|
||||
MESSAGE and/or FILENAME + LINENO indicate where the problem occurred.
|
||||
If FILENAME is NULL, FILENAME and LINENO and COLUMN should be ignored.
|
||||
If LINENO is (size_t)(-1), LINENO and COLUMN should be ignored.
|
||||
If COLUMN is (size_t)(-1), it should be ignored.
|
||||
MESSAGE_TEXT is the problem description (if MULTILINE_P is true,
|
||||
multiple lines of text, each terminated with a newline, otherwise
|
||||
usually a single line).
|
||||
Must not return if SEVERITY is PO_SEVERITY_FATAL_ERROR. */
|
||||
void (*xerror) (int severity,
|
||||
po_message_t message,
|
||||
const char *filename, size_t lineno, size_t column,
|
||||
int multiline_p, const char *message_text);
|
||||
/* Signal a problem that refers to two messages.
|
||||
Similar to two calls to xerror.
|
||||
If possible, a "..." can be appended to MESSAGE_TEXT1 and prepended to
|
||||
MESSAGE_TEXT2. */
|
||||
void (*xerror2) (int severity,
|
||||
po_message_t message1,
|
||||
const char *filename1, size_t lineno1, size_t column1,
|
||||
int multiline_p1, const char *message_text1,
|
||||
po_message_t message2,
|
||||
const char *filename2, size_t lineno2, size_t column2,
|
||||
int multiline_p2, const char *message_text2);
|
||||
};
|
||||
typedef const struct po_xerror_handler *po_xerror_handler_t;
|
||||
|
||||
/* Memory allocation:
|
||||
The memory allocations performed by these functions use xmalloc(),
|
||||
therefore will cause a program exit if memory is exhausted.
|
||||
The memory allocated by po_file_read, and implicitly returned through
|
||||
the po_message_* functions, lasts until freed with po_file_free. */
|
||||
|
||||
|
||||
/* ============================= po_file_t API ============================= */
|
||||
|
||||
/* Create an empty PO file representation in memory. */
|
||||
extern po_file_t po_file_create (void);
|
||||
|
||||
/* Read a PO file into memory.
|
||||
Return its contents. Upon failure, call function from handler. */
|
||||
#define po_file_read po_file_read_v3
|
||||
extern po_file_t po_file_read (const char *filename,
|
||||
po_xerror_handler_t handler);
|
||||
|
||||
/* Write an in-memory PO file to a file.
|
||||
Upon failure, call function from handler. */
|
||||
#define po_file_write po_file_write_v2
|
||||
extern po_file_t po_file_write (po_file_t file, const char *filename,
|
||||
po_xerror_handler_t handler);
|
||||
|
||||
/* Free a PO file from memory. */
|
||||
extern void po_file_free (po_file_t file);
|
||||
|
||||
/* Return the names of the domains covered by a PO file in memory. */
|
||||
extern const char * const * po_file_domains (po_file_t file);
|
||||
|
||||
|
||||
/* =========================== Header entry API ============================ */
|
||||
|
||||
/* Return the header entry of a domain of a PO file in memory.
|
||||
The domain NULL denotes the default domain.
|
||||
Return NULL if there is no header entry. */
|
||||
extern const char * po_file_domain_header (po_file_t file, const char *domain);
|
||||
|
||||
/* Return the value of a field in a header entry.
|
||||
The return value is either a freshly allocated string, to be freed by the
|
||||
caller, or NULL. */
|
||||
extern char * po_header_field (const char *header, const char *field);
|
||||
|
||||
/* Return the header entry with a given field set to a given value. The field
|
||||
is added if necessary.
|
||||
The return value is a freshly allocated string. */
|
||||
extern char * po_header_set_field (const char *header, const char *field, const char *value);
|
||||
|
||||
|
||||
/* ======================= po_message_iterator_t API ======================= */
|
||||
|
||||
/* Create an iterator for traversing a domain of a PO file in memory.
|
||||
The domain NULL denotes the default domain. */
|
||||
extern po_message_iterator_t po_message_iterator (po_file_t file, const char *domain);
|
||||
|
||||
/* Free an iterator. */
|
||||
extern void po_message_iterator_free (po_message_iterator_t iterator);
|
||||
|
||||
/* Return the next message, and advance the iterator.
|
||||
Return NULL at the end of the message list. */
|
||||
extern po_message_t po_next_message (po_message_iterator_t iterator);
|
||||
|
||||
/* Insert a message in a PO file in memory, in the domain and at the position
|
||||
indicated by the iterator. The iterator thereby advances past the freshly
|
||||
inserted message. */
|
||||
extern void po_message_insert (po_message_iterator_t iterator, po_message_t message);
|
||||
|
||||
|
||||
/* =========================== po_message_t API ============================ */
|
||||
|
||||
/* Return a freshly constructed message.
|
||||
To finish initializing the message, you must set the msgid and msgstr. */
|
||||
extern po_message_t po_message_create (void);
|
||||
|
||||
/* Return the context of a message, or NULL for a message not restricted to a
|
||||
context. */
|
||||
extern const char * po_message_msgctxt (po_message_t message);
|
||||
|
||||
/* Change the context of a message. NULL means a message not restricted to a
|
||||
context. */
|
||||
extern void po_message_set_msgctxt (po_message_t message, const char *msgctxt);
|
||||
|
||||
/* Return the msgid (untranslated English string) of a message. */
|
||||
extern const char * po_message_msgid (po_message_t message);
|
||||
|
||||
/* Change the msgid (untranslated English string) of a message. */
|
||||
extern void po_message_set_msgid (po_message_t message, const char *msgid);
|
||||
|
||||
/* Return the msgid_plural (untranslated English plural string) of a message,
|
||||
or NULL for a message without plural. */
|
||||
extern const char * po_message_msgid_plural (po_message_t message);
|
||||
|
||||
/* Change the msgid_plural (untranslated English plural string) of a message.
|
||||
NULL means a message without plural. */
|
||||
extern void po_message_set_msgid_plural (po_message_t message, const char *msgid_plural);
|
||||
|
||||
/* Return the msgstr (translation) of a message.
|
||||
Return the empty string for an untranslated message. */
|
||||
extern const char * po_message_msgstr (po_message_t message);
|
||||
|
||||
/* Change the msgstr (translation) of a message.
|
||||
Use an empty string to denote an untranslated message. */
|
||||
extern void po_message_set_msgstr (po_message_t message, const char *msgstr);
|
||||
|
||||
/* Return the msgstr[index] for a message with plural handling, or
|
||||
NULL when the index is out of range or for a message without plural. */
|
||||
extern const char * po_message_msgstr_plural (po_message_t message, int index);
|
||||
|
||||
/* Change the msgstr[index] for a message with plural handling.
|
||||
Use a NULL value at the end to reduce the number of plural forms. */
|
||||
extern void po_message_set_msgstr_plural (po_message_t message, int index, const char *msgstr);
|
||||
|
||||
/* Return the comments for a message. */
|
||||
extern const char * po_message_comments (po_message_t message);
|
||||
|
||||
/* Change the comments for a message.
|
||||
comments should be a multiline string, ending in a newline, or empty. */
|
||||
extern void po_message_set_comments (po_message_t message, const char *comments);
|
||||
|
||||
/* Return the extracted comments for a message. */
|
||||
extern const char * po_message_extracted_comments (po_message_t message);
|
||||
|
||||
/* Change the extracted comments for a message.
|
||||
comments should be a multiline string, ending in a newline, or empty. */
|
||||
extern void po_message_set_extracted_comments (po_message_t message, const char *comments);
|
||||
|
||||
/* Return the i-th file position for a message, or NULL if i is out of
|
||||
range. */
|
||||
extern po_filepos_t po_message_filepos (po_message_t message, int i);
|
||||
|
||||
/* Remove the i-th file position from a message.
|
||||
The indices of all following file positions for the message are decremented
|
||||
by one. */
|
||||
extern void po_message_remove_filepos (po_message_t message, int i);
|
||||
|
||||
/* Add a file position to a message, if it is not already present for the
|
||||
message.
|
||||
file is the file name.
|
||||
start_line is the line number where the string starts, or (size_t)(-1) if no
|
||||
line number is available. */
|
||||
extern void po_message_add_filepos (po_message_t message, const char *file, size_t start_line);
|
||||
|
||||
/* Return the previous context of a message, or NULL for none. */
|
||||
extern const char * po_message_prev_msgctxt (po_message_t message);
|
||||
|
||||
/* Change the previous context of a message. NULL is allowed. */
|
||||
extern void po_message_set_prev_msgctxt (po_message_t message, const char *prev_msgctxt);
|
||||
|
||||
/* Return the previous msgid (untranslated English string) of a message, or
|
||||
NULL for none. */
|
||||
extern const char * po_message_prev_msgid (po_message_t message);
|
||||
|
||||
/* Change the previous msgid (untranslated English string) of a message.
|
||||
NULL is allowed. */
|
||||
extern void po_message_set_prev_msgid (po_message_t message, const char *prev_msgid);
|
||||
|
||||
/* Return the previous msgid_plural (untranslated English plural string) of a
|
||||
message, or NULL for none. */
|
||||
extern const char * po_message_prev_msgid_plural (po_message_t message);
|
||||
|
||||
/* Change the previous msgid_plural (untranslated English plural string) of a
|
||||
message. NULL is allowed. */
|
||||
extern void po_message_set_prev_msgid_plural (po_message_t message, const char *prev_msgid_plural);
|
||||
|
||||
/* Return true if the message is marked obsolete. */
|
||||
extern int po_message_is_obsolete (po_message_t message);
|
||||
|
||||
/* Change the obsolete mark of a message. */
|
||||
extern void po_message_set_obsolete (po_message_t message, int obsolete);
|
||||
|
||||
/* Return true if the message is marked fuzzy. */
|
||||
extern int po_message_is_fuzzy (po_message_t message);
|
||||
|
||||
/* Change the fuzzy mark of a message. */
|
||||
extern void po_message_set_fuzzy (po_message_t message, int fuzzy);
|
||||
|
||||
/* Return true if the message is marked as being a format string of the given
|
||||
type (e.g. "c-format"). */
|
||||
extern int po_message_is_format (po_message_t message, const char *format_type);
|
||||
|
||||
/* Change the format string mark for a given type of a message. */
|
||||
extern void po_message_set_format (po_message_t message, const char *format_type, /*bool*/int value);
|
||||
|
||||
/* If a numeric range of a message is set, return true and store the minimum
|
||||
and maximum value in *MINP and *MAXP. */
|
||||
extern int po_message_is_range (po_message_t message, int *minp, int *maxp);
|
||||
|
||||
/* Change the numeric range of a message. MIN and MAX must be non-negative,
|
||||
with MIN < MAX. Use MIN = MAX = -1 to remove the numeric range of a
|
||||
message. */
|
||||
extern void po_message_set_range (po_message_t message, int min, int max);
|
||||
|
||||
|
||||
/* =========================== po_filepos_t API ============================ */
|
||||
|
||||
/* Return the file name. */
|
||||
extern const char * po_filepos_file (po_filepos_t filepos);
|
||||
|
||||
/* Return the line number where the string starts, or (size_t)(-1) if no line
|
||||
number is available. */
|
||||
extern size_t po_filepos_start_line (po_filepos_t filepos);
|
||||
|
||||
|
||||
/* ============================ Format type API ============================= */
|
||||
|
||||
/* Return a NULL terminated array of the supported format types. */
|
||||
extern const char * const * po_format_list (void);
|
||||
|
||||
/* Return the pretty name associated with a format type.
|
||||
For example, for "csharp-format", return "C#".
|
||||
Return NULL if the argument is not a supported format type. */
|
||||
extern const char * po_format_pretty_name (const char *format_type);
|
||||
|
||||
|
||||
/* ============================= Checking API ============================== */
|
||||
|
||||
/* Test whether an entire file PO file is valid, like msgfmt does it.
|
||||
If it is invalid, pass the reasons to the handler. */
|
||||
extern void po_file_check_all (po_file_t file, po_xerror_handler_t handler);
|
||||
|
||||
/* Test a single message, to be inserted in a PO file in memory, like msgfmt
|
||||
does it. If it is invalid, pass the reasons to the handler. The iterator
|
||||
is not modified by this call; it only specifies the file and the domain. */
|
||||
extern void po_message_check_all (po_message_t message, po_message_iterator_t iterator, po_xerror_handler_t handler);
|
||||
|
||||
/* Test whether the message translation is a valid format string if the message
|
||||
is marked as being a format string. If it is invalid, pass the reasons to
|
||||
the handler. */
|
||||
#define po_message_check_format po_message_check_format_v2
|
||||
extern void po_message_check_format (po_message_t message, po_xerror_handler_t handler);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GETTEXT_PO_H */
|
597
bin/neovim/third-party/gettext/include/libintl.h
vendored
Normal file
597
bin/neovim/third-party/gettext/include/libintl.h
vendored
Normal file
@ -0,0 +1,597 @@
|
||||
/* Message catalogs for internationalization.
|
||||
Copyright (C) 1995-1997, 2000-2016, 2018-2023 Free Software Foundation, Inc.
|
||||
|
||||
This program 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 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 Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _LIBINTL_H
|
||||
#define _LIBINTL_H 1
|
||||
|
||||
#include <locale.h>
|
||||
#if (defined __APPLE__ && defined __MACH__) && 1
|
||||
# include <xlocale.h>
|
||||
#endif
|
||||
|
||||
/* The LC_MESSAGES locale category is the category used by the functions
|
||||
gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
|
||||
On systems that don't define it, use an arbitrary value instead.
|
||||
On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
|
||||
then includes <libintl.h> (i.e. this file!) and then only defines
|
||||
LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES
|
||||
in this case. */
|
||||
#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
|
||||
# define LC_MESSAGES 1729
|
||||
#endif
|
||||
|
||||
/* We define an additional symbol to signal that we use the GNU
|
||||
implementation of gettext. */
|
||||
#define __USE_GNU_GETTEXT 1
|
||||
|
||||
/* Provide information about the supported file formats. Returns the
|
||||
maximum minor revision number supported for a given major revision. */
|
||||
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
|
||||
((major) == 0 || (major) == 1 ? 1 : -1)
|
||||
|
||||
/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
|
||||
precedence over _conio_gettext. */
|
||||
#ifdef __DJGPP__
|
||||
# undef gettext
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Version number: (major<<16) + (minor<<8) + subminor */
|
||||
#define LIBINTL_VERSION 0x001604
|
||||
extern int libintl_version;
|
||||
|
||||
|
||||
/* We redirect the functions to those prefixed with "libintl_". This is
|
||||
necessary, because some systems define gettext/textdomain/... in the C
|
||||
library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
|
||||
If we used the unprefixed names, there would be cases where the
|
||||
definition in the C library would override the one in the libintl.so
|
||||
shared library. Recall that on ELF systems, the symbols are looked
|
||||
up in the following order:
|
||||
1. in the executable,
|
||||
2. in the shared libraries specified on the link command line, in order,
|
||||
3. in the dependencies of the shared libraries specified on the link
|
||||
command line,
|
||||
4. in the dlopen()ed shared libraries, in the order in which they were
|
||||
dlopen()ed.
|
||||
The definition in the C library would override the one in libintl.so if
|
||||
either
|
||||
* -lc is given on the link command line and -lintl isn't, or
|
||||
* -lc is given on the link command line before -lintl, or
|
||||
* libintl.so is a dependency of a dlopen()ed shared library but not
|
||||
linked to the executable at link time.
|
||||
Since Solaris gettext() behaves differently than GNU gettext(), this
|
||||
would be unacceptable.
|
||||
|
||||
The redirection happens by default through macros in C, so that &gettext
|
||||
is independent of the compilation unit, but through inline functions in
|
||||
C++, in order not to interfere with the name mangling of class fields or
|
||||
class methods called 'gettext'. */
|
||||
|
||||
/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
|
||||
If he doesn't, we choose the method. A third possible method is
|
||||
_INTL_REDIRECT_ASM, supported only by GCC. */
|
||||
#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
|
||||
# if defined __GNUC__ && __GNUC__ >= 2 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
|
||||
# define _INTL_REDIRECT_ASM
|
||||
# else
|
||||
# ifdef __cplusplus
|
||||
# define _INTL_REDIRECT_INLINE
|
||||
# else
|
||||
# define _INTL_REDIRECT_MACROS
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
/* Auxiliary macros. */
|
||||
#ifdef _INTL_REDIRECT_ASM
|
||||
# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))
|
||||
# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring
|
||||
# define _INTL_STRINGIFY(prefix) #prefix
|
||||
#else
|
||||
# define _INTL_ASM(cname)
|
||||
#endif
|
||||
|
||||
/* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return
|
||||
its n-th argument literally. This enables GCC to warn for example about
|
||||
printf (gettext ("foo %y")). */
|
||||
#if defined __GNUC__ && __GNUC__ >= 3 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && !(defined __clang__ && __clang__ && __clang_major__ >= 3) && defined __cplusplus)
|
||||
# define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n)))
|
||||
#else
|
||||
# define _INTL_MAY_RETURN_STRING_ARG(n)
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the current default message catalog for the current
|
||||
LC_MESSAGES locale. If not found, returns MSGID itself (the default
|
||||
text). */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_gettext (const char *__msgid)
|
||||
_INTL_MAY_RETURN_STRING_ARG (1);
|
||||
static inline
|
||||
_INTL_MAY_RETURN_STRING_ARG (1)
|
||||
char *gettext (const char *__msgid)
|
||||
{
|
||||
return libintl_gettext (__msgid);
|
||||
}
|
||||
#else
|
||||
# ifdef _INTL_REDIRECT_MACROS
|
||||
# define gettext libintl_gettext
|
||||
# endif
|
||||
extern char *gettext (const char *__msgid)
|
||||
_INTL_ASM (libintl_gettext)
|
||||
_INTL_MAY_RETURN_STRING_ARG (1);
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog for the current
|
||||
LC_MESSAGES locale. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_dgettext (const char *__domainname, const char *__msgid)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2);
|
||||
static inline
|
||||
_INTL_MAY_RETURN_STRING_ARG (2)
|
||||
char *dgettext (const char *__domainname, const char *__msgid)
|
||||
{
|
||||
return libintl_dgettext (__domainname, __msgid);
|
||||
}
|
||||
#else
|
||||
# ifdef _INTL_REDIRECT_MACROS
|
||||
# define dgettext libintl_dgettext
|
||||
# endif
|
||||
extern char *dgettext (const char *__domainname, const char *__msgid)
|
||||
_INTL_ASM (libintl_dgettext)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2);
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
|
||||
locale. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
|
||||
int __category)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2);
|
||||
static inline
|
||||
_INTL_MAY_RETURN_STRING_ARG (2)
|
||||
char *dcgettext (const char *__domainname, const char *__msgid, int __category)
|
||||
{
|
||||
return libintl_dcgettext (__domainname, __msgid, __category);
|
||||
}
|
||||
#else
|
||||
# ifdef _INTL_REDIRECT_MACROS
|
||||
# define dcgettext libintl_dcgettext
|
||||
# endif
|
||||
extern char *dcgettext (const char *__domainname, const char *__msgid,
|
||||
int __category)
|
||||
_INTL_ASM (libintl_dcgettext)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2);
|
||||
#endif
|
||||
|
||||
|
||||
/* Similar to 'gettext' but select the plural form corresponding to the
|
||||
number N. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n)
|
||||
_INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);
|
||||
static inline
|
||||
_INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2)
|
||||
char *ngettext (const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n)
|
||||
{
|
||||
return libintl_ngettext (__msgid1, __msgid2, __n);
|
||||
}
|
||||
#else
|
||||
# ifdef _INTL_REDIRECT_MACROS
|
||||
# define ngettext libintl_ngettext
|
||||
# endif
|
||||
extern char *ngettext (const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n)
|
||||
_INTL_ASM (libintl_ngettext)
|
||||
_INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);
|
||||
#endif
|
||||
|
||||
/* Similar to 'dgettext' but select the plural form corresponding to the
|
||||
number N. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
|
||||
const char *__msgid2, unsigned long int __n)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
|
||||
static inline
|
||||
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3)
|
||||
char *dngettext (const char *__domainname, const char *__msgid1,
|
||||
const char *__msgid2, unsigned long int __n)
|
||||
{
|
||||
return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
|
||||
}
|
||||
#else
|
||||
# ifdef _INTL_REDIRECT_MACROS
|
||||
# define dngettext libintl_dngettext
|
||||
# endif
|
||||
extern char *dngettext (const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n)
|
||||
_INTL_ASM (libintl_dngettext)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
|
||||
#endif
|
||||
|
||||
/* Similar to 'dcgettext' but select the plural form corresponding to the
|
||||
number N. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_dcngettext (const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n, int __category)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
|
||||
static inline
|
||||
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3)
|
||||
char *dcngettext (const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n, int __category)
|
||||
{
|
||||
return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
|
||||
}
|
||||
#else
|
||||
# ifdef _INTL_REDIRECT_MACROS
|
||||
# define dcngettext libintl_dcngettext
|
||||
# endif
|
||||
extern char *dcngettext (const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n, int __category)
|
||||
_INTL_ASM (libintl_dcngettext)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Set the current default message catalog to DOMAINNAME.
|
||||
If DOMAINNAME is null, return the current default.
|
||||
If DOMAINNAME is "", reset to the default of "messages". */
|
||||
# ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_textdomain (const char *__domainname);
|
||||
static inline char *textdomain (const char *__domainname)
|
||||
{
|
||||
return libintl_textdomain (__domainname);
|
||||
}
|
||||
# else
|
||||
# ifdef _INTL_REDIRECT_MACROS
|
||||
# define textdomain libintl_textdomain
|
||||
# endif
|
||||
extern char *textdomain (const char *__domainname)
|
||||
_INTL_ASM (libintl_textdomain);
|
||||
# endif
|
||||
|
||||
/* Specify that the DOMAINNAME message catalog will be found
|
||||
in DIRNAME rather than in the system locale data base. */
|
||||
# ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_bindtextdomain (const char *__domainname,
|
||||
const char *__dirname);
|
||||
static inline char *bindtextdomain (const char *__domainname,
|
||||
const char *__dirname)
|
||||
{
|
||||
return libintl_bindtextdomain (__domainname, __dirname);
|
||||
}
|
||||
# else
|
||||
# ifdef _INTL_REDIRECT_MACROS
|
||||
# define bindtextdomain libintl_bindtextdomain
|
||||
# endif
|
||||
extern char *bindtextdomain (const char *__domainname, const char *__dirname)
|
||||
_INTL_ASM (libintl_bindtextdomain);
|
||||
# endif
|
||||
|
||||
# if defined _WIN32 && !defined __CYGWIN__
|
||||
/* Specify that the DOMAINNAME message catalog will be found
|
||||
in WDIRNAME rather than in the system locale data base. */
|
||||
# ifdef _INTL_REDIRECT_INLINE
|
||||
extern wchar_t *libintl_wbindtextdomain (const char *__domainname,
|
||||
const wchar_t *__wdirname);
|
||||
static inline wchar_t *wbindtextdomain (const char *__domainname,
|
||||
const wchar_t *__wdirname)
|
||||
{
|
||||
return libintl_wbindtextdomain (__domainname, __wdirname);
|
||||
}
|
||||
# else
|
||||
# ifdef _INTL_REDIRECT_MACROS
|
||||
# define wbindtextdomain libintl_wbindtextdomain
|
||||
# endif
|
||||
extern wchar_t *wbindtextdomain (const char *__domainname,
|
||||
const wchar_t *__wdirname)
|
||||
_INTL_ASM (libintl_wbindtextdomain);
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* Specify the character encoding in which the messages from the
|
||||
DOMAINNAME message catalog will be returned. */
|
||||
# ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_bind_textdomain_codeset (const char *__domainname,
|
||||
const char *__codeset);
|
||||
static inline char *bind_textdomain_codeset (const char *__domainname,
|
||||
const char *__codeset)
|
||||
{
|
||||
return libintl_bind_textdomain_codeset (__domainname, __codeset);
|
||||
}
|
||||
# else
|
||||
# ifdef _INTL_REDIRECT_MACROS
|
||||
# define bind_textdomain_codeset libintl_bind_textdomain_codeset
|
||||
# endif
|
||||
extern char *bind_textdomain_codeset (const char *__domainname,
|
||||
const char *__codeset)
|
||||
_INTL_ASM (libintl_bind_textdomain_codeset);
|
||||
# endif
|
||||
|
||||
|
||||
|
||||
/* Support for format strings with positions in *printf(), following the
|
||||
POSIX/XSI specification.
|
||||
Note: These replacements for the *printf() functions are visible only
|
||||
in source files that #include <libintl.h> or #include "gettext.h".
|
||||
Packages that use *printf() in source files that don't refer to _()
|
||||
or gettext() but for which the format string could be the return value
|
||||
of _() or gettext() need to add this #include. Oh well. */
|
||||
|
||||
/* Note: In C++ mode, it is not sufficient to redefine a symbol at the
|
||||
preprocessor macro level, such as
|
||||
#define sprintf libintl_sprintf
|
||||
Some programs may reference std::sprintf after including <libintl.h>.
|
||||
Therefore we must make sure that std::libintl_sprintf is defined and
|
||||
identical to ::libintl_sprintf.
|
||||
The user can define _INTL_CXX_NO_CLOBBER_STD_NAMESPACE to avoid this.
|
||||
In such cases, they will not benefit from the overrides when using
|
||||
the 'std' namespace, and they will need to do the references to the
|
||||
'std' namespace *before* including <libintl.h> or "gettext.h". */
|
||||
|
||||
#if !1
|
||||
|
||||
# include <stdio.h>
|
||||
# include <stddef.h>
|
||||
|
||||
/* Get va_list. */
|
||||
# if (defined __STDC__ && __STDC__) || defined __cplusplus || defined _MSC_VER
|
||||
# include <stdarg.h>
|
||||
# else
|
||||
# include <varargs.h>
|
||||
# endif
|
||||
|
||||
# if !((defined fprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_fprintf) /* don't override gnulib */
|
||||
# undef fprintf
|
||||
# define fprintf libintl_fprintf
|
||||
extern int fprintf (FILE *, const char *, ...);
|
||||
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
|
||||
namespace std { using ::libintl_fprintf; }
|
||||
# endif
|
||||
# endif
|
||||
# if !((defined vfprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vfprintf) /* don't override gnulib */
|
||||
# undef vfprintf
|
||||
# define vfprintf libintl_vfprintf
|
||||
extern int vfprintf (FILE *, const char *, va_list);
|
||||
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
|
||||
namespace std { using ::libintl_vfprintf; }
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# if !((defined printf && defined _GL_STDIO_H) || defined GNULIB_overrides_printf) /* don't override gnulib */
|
||||
# undef printf
|
||||
# if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__
|
||||
/* Don't break __attribute__((format(printf,M,N))).
|
||||
This redefinition is only possible because the libc in NetBSD, Cygwin,
|
||||
mingw does not have a function __printf__.
|
||||
Alternatively, we could have done this redirection only when compiling with
|
||||
__GNUC__, together with a symbol redirection:
|
||||
extern int printf (const char *, ...)
|
||||
__asm__ (#__USER_LABEL_PREFIX__ "libintl_printf");
|
||||
But doing it now would introduce a binary incompatibility with already
|
||||
distributed versions of libintl on these systems. */
|
||||
# define libintl_printf __printf__
|
||||
# endif
|
||||
# define printf libintl_printf
|
||||
extern int printf (const char *, ...);
|
||||
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
|
||||
namespace std { using ::libintl_printf; }
|
||||
# endif
|
||||
# endif
|
||||
# if !((defined vprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vprintf) /* don't override gnulib */
|
||||
# undef vprintf
|
||||
# define vprintf libintl_vprintf
|
||||
extern int vprintf (const char *, va_list);
|
||||
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
|
||||
namespace std { using ::libintl_vprintf; }
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# if !((defined sprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_sprintf) /* don't override gnulib */
|
||||
# undef sprintf
|
||||
# define sprintf libintl_sprintf
|
||||
extern int sprintf (char *, const char *, ...);
|
||||
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
|
||||
namespace std { using ::libintl_sprintf; }
|
||||
# endif
|
||||
# endif
|
||||
# if !((defined vsprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vsprintf) /* don't override gnulib */
|
||||
# undef vsprintf
|
||||
# define vsprintf libintl_vsprintf
|
||||
extern int vsprintf (char *, const char *, va_list);
|
||||
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
|
||||
namespace std { using ::libintl_vsprintf; }
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# if 1
|
||||
|
||||
# if !((defined snprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_snprintf) /* don't override gnulib */
|
||||
# undef snprintf
|
||||
# define snprintf libintl_snprintf
|
||||
extern int snprintf (char *, size_t, const char *, ...);
|
||||
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
|
||||
namespace std { using ::libintl_snprintf; }
|
||||
# endif
|
||||
# endif
|
||||
# if !((defined vsnprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vsnprintf) /* don't override gnulib */
|
||||
# undef vsnprintf
|
||||
# define vsnprintf libintl_vsnprintf
|
||||
extern int vsnprintf (char *, size_t, const char *, va_list);
|
||||
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
|
||||
namespace std { using ::libintl_vsnprintf; }
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
# if 1
|
||||
|
||||
# if !((defined asprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_asprintf) /* don't override gnulib */
|
||||
# undef asprintf
|
||||
# define asprintf libintl_asprintf
|
||||
extern int asprintf (char **, const char *, ...);
|
||||
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
|
||||
namespace std { using ::libintl_asprintf; }
|
||||
# endif
|
||||
# endif
|
||||
# if !((defined vasprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vasprintf) /* don't override gnulib */
|
||||
# undef vasprintf
|
||||
# define vasprintf libintl_vasprintf
|
||||
extern int vasprintf (char **, const char *, va_list);
|
||||
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
|
||||
namespace std { using ::libintl_vasprintf; }
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
# if 1
|
||||
|
||||
# undef fwprintf
|
||||
# define fwprintf libintl_fwprintf
|
||||
extern int fwprintf (FILE *, const wchar_t *, ...);
|
||||
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
|
||||
namespace std { using ::libintl_fwprintf; }
|
||||
# endif
|
||||
# undef vfwprintf
|
||||
# define vfwprintf libintl_vfwprintf
|
||||
extern int vfwprintf (FILE *, const wchar_t *, va_list);
|
||||
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
|
||||
namespace std { using ::libintl_vfwprintf; }
|
||||
# endif
|
||||
|
||||
# undef wprintf
|
||||
# define wprintf libintl_wprintf
|
||||
extern int wprintf (const wchar_t *, ...);
|
||||
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
|
||||
namespace std { using ::libintl_wprintf; }
|
||||
# endif
|
||||
# undef vwprintf
|
||||
# define vwprintf libintl_vwprintf
|
||||
extern int vwprintf (const wchar_t *, va_list);
|
||||
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
|
||||
namespace std { using ::libintl_vwprintf; }
|
||||
# endif
|
||||
|
||||
# undef swprintf
|
||||
# define swprintf libintl_swprintf
|
||||
extern int swprintf (wchar_t *, size_t, const wchar_t *, ...);
|
||||
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
|
||||
namespace std { using ::libintl_swprintf; }
|
||||
# endif
|
||||
# undef vswprintf
|
||||
# define vswprintf libintl_vswprintf
|
||||
extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list);
|
||||
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
|
||||
namespace std { using ::libintl_vswprintf; }
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Support for retrieving the name of a locale_t object. */
|
||||
#if 0
|
||||
|
||||
# ifndef GNULIB_defined_newlocale /* don't override gnulib */
|
||||
# undef newlocale
|
||||
# define newlocale libintl_newlocale
|
||||
extern locale_t newlocale (int, const char *, locale_t);
|
||||
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
|
||||
namespace std { using ::libintl_newlocale; }
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef GNULIB_defined_duplocale /* don't override gnulib */
|
||||
# undef duplocale
|
||||
# define duplocale libintl_duplocale
|
||||
extern locale_t duplocale (locale_t);
|
||||
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
|
||||
namespace std { using ::libintl_duplocale; }
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef GNULIB_defined_freelocale /* don't override gnulib */
|
||||
# undef freelocale
|
||||
# define freelocale libintl_freelocale
|
||||
extern void freelocale (locale_t);
|
||||
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
|
||||
namespace std { using ::libintl_freelocale; }
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Support for the locale chosen by the user. */
|
||||
#if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __CYGWIN__
|
||||
|
||||
# ifndef GNULIB_defined_setlocale /* don't override gnulib */
|
||||
# undef setlocale
|
||||
# define setlocale libintl_setlocale
|
||||
extern char *setlocale (int, const char *);
|
||||
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
|
||||
namespace std { using ::libintl_setlocale; }
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# if 1
|
||||
|
||||
# undef newlocale
|
||||
# define newlocale libintl_newlocale
|
||||
/* Declare newlocale() only if the system headers define the 'locale_t' type. */
|
||||
# if !(defined __CYGWIN__ && !defined LC_ALL_MASK)
|
||||
extern locale_t newlocale (int, const char *, locale_t);
|
||||
# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
|
||||
namespace std { using ::libintl_newlocale; }
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
#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 "/"). */
|
||||
#define libintl_set_relocation_prefix libintl_set_relocation_prefix
|
||||
extern void
|
||||
libintl_set_relocation_prefix (const char *orig_prefix,
|
||||
const char *curr_prefix);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* libintl.h */
|
707
bin/neovim/third-party/gettext/include/textstyle.h
vendored
Normal file
707
bin/neovim/third-party/gettext/include/textstyle.h
vendored
Normal file
@ -0,0 +1,707 @@
|
||||
/* Public API of the libtextstyle library.
|
||||
Copyright (C) 2006-2007, 2019-2021 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Bruno Haible <bruno@clisp.org>, 2006, 2019. */
|
||||
|
||||
#ifndef _TEXTSTYLE_H
|
||||
#define _TEXTSTYLE_H
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <textstyle/stdbool.h>
|
||||
#include <textstyle/woe32dll.h>
|
||||
|
||||
/* Meta information. */
|
||||
#include <textstyle/version.h>
|
||||
|
||||
/* ----------------------------- From ostream.h ----------------------------- */
|
||||
|
||||
/* Describes the scope of a flush operation. */
|
||||
typedef enum
|
||||
{
|
||||
/* Flushes buffers in this ostream_t.
|
||||
Use this value if you want to write to the underlying ostream_t. */
|
||||
FLUSH_THIS_STREAM = 0,
|
||||
/* Flushes all buffers in the current process.
|
||||
Use this value if you want to write to the same target through a
|
||||
different file descriptor or a FILE stream. */
|
||||
FLUSH_THIS_PROCESS = 1,
|
||||
/* Flushes buffers in the current process and attempts to flush the buffers
|
||||
in the kernel.
|
||||
Use this value so that some other process (or the kernel itself)
|
||||
may write to the same target. */
|
||||
FLUSH_ALL = 2
|
||||
} ostream_flush_scope_t;
|
||||
|
||||
|
||||
/* An output stream is an object to which one can feed a sequence of bytes. */
|
||||
|
||||
struct any_ostream_representation;
|
||||
typedef struct any_ostream_representation * ostream_t;
|
||||
|
||||
/* Functions that invoke the methods. */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern void ostream_write_mem (ostream_t first_arg, const void *data, size_t len);
|
||||
extern void ostream_flush (ostream_t first_arg, ostream_flush_scope_t scope);
|
||||
extern void ostream_free (ostream_t first_arg);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Write a string's contents to a stream. */
|
||||
extern void ostream_write_str (ostream_t stream, const char *string);
|
||||
|
||||
/* Writes formatted output to a stream.
|
||||
Returns the size of formatted output, or a negative value in case of an
|
||||
error. */
|
||||
extern ptrdiff_t ostream_printf (ostream_t stream, const char *format, ...)
|
||||
#if (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3
|
||||
__attribute__ ((__format__ (__printf__, 2, 3)))
|
||||
#endif
|
||||
;
|
||||
extern ptrdiff_t ostream_vprintf (ostream_t stream,
|
||||
const char *format, va_list args)
|
||||
#if (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3
|
||||
__attribute__ ((__format__ (__printf__, 2, 0)))
|
||||
#endif
|
||||
;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ------------------------- From styled-ostream.h ------------------------- */
|
||||
|
||||
/* A styled output stream is an object to which one can feed a sequence of
|
||||
bytes, marking some runs of text as belonging to specific CSS classes,
|
||||
where the rendering of the CSS classes is defined through a CSS (cascading
|
||||
style sheet). */
|
||||
|
||||
/* styled_ostream_t is a subtype of ostream_t. */
|
||||
typedef ostream_t styled_ostream_t;
|
||||
|
||||
/* Functions that invoke the methods. */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern void styled_ostream_write_mem (styled_ostream_t first_arg, const void *data, size_t len);
|
||||
extern void styled_ostream_flush (styled_ostream_t first_arg, ostream_flush_scope_t scope);
|
||||
extern void styled_ostream_free (styled_ostream_t first_arg);
|
||||
extern void styled_ostream_begin_use_class (styled_ostream_t first_arg, const char *classname);
|
||||
extern void styled_ostream_end_use_class (styled_ostream_t first_arg, const char *classname);
|
||||
extern const char *styled_ostream_get_hyperlink_ref (styled_ostream_t first_arg);
|
||||
extern const char *styled_ostream_get_hyperlink_id (styled_ostream_t first_arg);
|
||||
extern void styled_ostream_set_hyperlink (styled_ostream_t first_arg, const char *ref, const char *id);
|
||||
/* Like styled_ostream_flush (first_arg, FLUSH_THIS_STREAM), except that it
|
||||
leaves the destination with the current text style enabled, instead
|
||||
of with the default text style.
|
||||
After calling this function, you can output strings without newlines(!)
|
||||
to the underlying stream, and they will be rendered like strings passed
|
||||
to 'ostream_write_mem', 'ostream_write_str', or 'ostream_write_printf'. */
|
||||
extern void styled_ostream_flush_to_current_style (styled_ostream_t stream);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Test whether a given output stream is a styled_ostream. */
|
||||
extern bool is_instance_of_styled_ostream (ostream_t stream);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* -------------------------- From file-ostream.h -------------------------- */
|
||||
|
||||
/* file_ostream_t is a subtype of ostream_t. */
|
||||
typedef ostream_t file_ostream_t;
|
||||
|
||||
/* Functions that invoke the methods. */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern void file_ostream_write_mem (file_ostream_t first_arg, const void *data, size_t len);
|
||||
extern void file_ostream_flush (file_ostream_t first_arg, ostream_flush_scope_t scope);
|
||||
extern void file_ostream_free (file_ostream_t first_arg);
|
||||
/* Accessors. */
|
||||
extern FILE *file_ostream_get_stdio_stream (file_ostream_t stream);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Create an output stream referring to FP.
|
||||
Note that the resulting stream must be closed before FP can be closed. */
|
||||
extern file_ostream_t file_ostream_create (FILE *fp);
|
||||
|
||||
|
||||
/* Test whether a given output stream is a file_ostream. */
|
||||
extern bool is_instance_of_file_ostream (ostream_t stream);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* --------------------------- From fd-ostream.h --------------------------- */
|
||||
|
||||
/* fd_ostream_t is a subtype of ostream_t. */
|
||||
typedef ostream_t fd_ostream_t;
|
||||
|
||||
/* Functions that invoke the methods. */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern void fd_ostream_write_mem (fd_ostream_t first_arg, const void *data, size_t len);
|
||||
extern void fd_ostream_flush (fd_ostream_t first_arg, ostream_flush_scope_t scope);
|
||||
extern void fd_ostream_free (fd_ostream_t first_arg);
|
||||
/* Accessors. */
|
||||
extern int fd_ostream_get_descriptor (fd_ostream_t stream);
|
||||
extern const char *fd_ostream_get_filename (fd_ostream_t stream);
|
||||
extern bool fd_ostream_is_buffered (fd_ostream_t stream);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Create an output stream referring to the file descriptor FD.
|
||||
FILENAME is used only for error messages.
|
||||
Note that the resulting stream must be closed before FD can be closed. */
|
||||
extern fd_ostream_t fd_ostream_create (int fd, const char *filename,
|
||||
bool buffered);
|
||||
|
||||
|
||||
/* Test whether a given output stream is a fd_ostream. */
|
||||
extern bool is_instance_of_fd_ostream (ostream_t stream);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* -------------------------- From term-ostream.h -------------------------- */
|
||||
|
||||
/* Querying and setting of text attributes.
|
||||
The stream has a notion of the current text attributes; they apply
|
||||
implicitly to all following output. The attributes are automatically
|
||||
reset when the stream is closed.
|
||||
Note: Not all terminal types can actually render all attributes adequately.
|
||||
For example, xterm cannot render POSTURE_ITALIC nor the combination of
|
||||
WEIGHT_BOLD and UNDERLINE_ON. */
|
||||
|
||||
/* Colors are represented by indices >= 0 in a stream dependent format. */
|
||||
typedef int term_color_t;
|
||||
/* The value -1 denotes the default (foreground or background) color. */
|
||||
enum
|
||||
{
|
||||
COLOR_DEFAULT = -1 /* unknown */
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
WEIGHT_NORMAL = 0,
|
||||
WEIGHT_BOLD,
|
||||
WEIGHT_DEFAULT = WEIGHT_NORMAL
|
||||
} term_weight_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
POSTURE_NORMAL = 0,
|
||||
POSTURE_ITALIC, /* same as oblique */
|
||||
POSTURE_DEFAULT = POSTURE_NORMAL
|
||||
} term_posture_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UNDERLINE_OFF = 0,
|
||||
UNDERLINE_ON,
|
||||
UNDERLINE_DEFAULT = UNDERLINE_OFF
|
||||
} term_underline_t;
|
||||
|
||||
/* The amount of control to take over the underlying tty in order to avoid
|
||||
garbled output on the screen, due to interleaved output of escape sequences
|
||||
and output from the kernel (such as when the kernel echoes user's input
|
||||
or when the kernel prints '^C' after the user pressed Ctrl-C). */
|
||||
typedef enum
|
||||
{
|
||||
TTYCTL_AUTO = 0, /* Automatic best-possible choice. */
|
||||
TTYCTL_NONE, /* No control.
|
||||
Result: Garbled output can occur, and the terminal can
|
||||
be left in any state when the program is interrupted. */
|
||||
TTYCTL_PARTIAL, /* Signal handling.
|
||||
Result: Garbled output can occur, but the terminal will
|
||||
be left in the default state when the program is
|
||||
interrupted. */
|
||||
TTYCTL_FULL /* Signal handling and disabling echo and flush-upon-signal.
|
||||
Result: No garbled output, and the the terminal will
|
||||
be left in the default state when the program is
|
||||
interrupted. */
|
||||
} ttyctl_t;
|
||||
|
||||
/* term_ostream_t is a subtype of ostream_t. */
|
||||
typedef ostream_t term_ostream_t;
|
||||
|
||||
/* Functions that invoke the methods. */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern void term_ostream_write_mem (term_ostream_t first_arg, const void *data, size_t len);
|
||||
extern void term_ostream_flush (term_ostream_t first_arg, ostream_flush_scope_t scope);
|
||||
extern void term_ostream_free (term_ostream_t first_arg);
|
||||
extern term_color_t term_ostream_rgb_to_color (term_ostream_t first_arg, int red, int green, int blue);
|
||||
extern term_color_t term_ostream_get_color (term_ostream_t first_arg);
|
||||
extern void term_ostream_set_color (term_ostream_t first_arg, term_color_t color);
|
||||
extern term_color_t term_ostream_get_bgcolor (term_ostream_t first_arg);
|
||||
extern void term_ostream_set_bgcolor (term_ostream_t first_arg, term_color_t color);
|
||||
extern term_weight_t term_ostream_get_weight (term_ostream_t first_arg);
|
||||
extern void term_ostream_set_weight (term_ostream_t first_arg, term_weight_t weight);
|
||||
extern term_posture_t term_ostream_get_posture (term_ostream_t first_arg);
|
||||
extern void term_ostream_set_posture (term_ostream_t first_arg, term_posture_t posture);
|
||||
extern term_underline_t term_ostream_get_underline (term_ostream_t first_arg);
|
||||
extern void term_ostream_set_underline (term_ostream_t first_arg, term_underline_t underline);
|
||||
extern const char *term_ostream_get_hyperlink_ref (term_ostream_t first_arg);
|
||||
extern const char *term_ostream_get_hyperlink_id (term_ostream_t first_arg);
|
||||
extern void term_ostream_set_hyperlink (term_ostream_t first_arg, const char *ref, const char *id);
|
||||
/* Like term_ostream_flush (first_arg, FLUSH_THIS_STREAM), except that it
|
||||
leaves the terminal with the current text attributes enabled, instead of
|
||||
with the default text attributes.
|
||||
After calling this function, you can output strings without newlines(!)
|
||||
to the underlying file descriptor, and they will be rendered like strings
|
||||
passed to 'ostream_write_mem', 'ostream_write_str', or
|
||||
'ostream_write_printf'. */
|
||||
extern void term_ostream_flush_to_current_style (term_ostream_t first_arg);
|
||||
/* Accessors. */
|
||||
extern int term_ostream_get_descriptor (term_ostream_t stream);
|
||||
extern const char *term_ostream_get_filename (term_ostream_t stream);
|
||||
extern ttyctl_t term_ostream_get_tty_control (term_ostream_t stream);
|
||||
extern ttyctl_t term_ostream_get_effective_tty_control (term_ostream_t stream);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Create an output stream referring to the file descriptor FD.
|
||||
FILENAME is used only for error messages.
|
||||
TTY_CONTROL specifies the amount of control to take over the underlying tty.
|
||||
The resulting stream will be line-buffered.
|
||||
Note that the resulting stream must be closed before FD can be closed. */
|
||||
extern term_ostream_t
|
||||
term_ostream_create (int fd, const char *filename, ttyctl_t tty_control);
|
||||
|
||||
|
||||
/* Test whether a given output stream is a term_ostream. */
|
||||
extern bool is_instance_of_term_ostream (ostream_t stream);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ------------------------- From memory-ostream.h ------------------------- */
|
||||
|
||||
/* memory_ostream_t is a subtype of ostream_t. */
|
||||
typedef ostream_t memory_ostream_t;
|
||||
|
||||
/* Functions that invoke the methods. */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern void memory_ostream_write_mem (memory_ostream_t first_arg, const void *data, size_t len);
|
||||
extern void memory_ostream_flush (memory_ostream_t first_arg, ostream_flush_scope_t scope);
|
||||
extern void memory_ostream_free (memory_ostream_t first_arg);
|
||||
extern void memory_ostream_contents (memory_ostream_t first_arg, const void **bufp, size_t *buflenp);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Create an output stream that accumulates the output in a memory buffer. */
|
||||
extern memory_ostream_t memory_ostream_create (void);
|
||||
|
||||
|
||||
/* Test whether a given output stream is a memory_ostream. */
|
||||
extern bool is_instance_of_memory_ostream (ostream_t stream);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* -------------------------- From iconv-ostream.h -------------------------- */
|
||||
|
||||
#if LIBTEXTSTYLE_USES_ICONV
|
||||
|
||||
/* iconv_ostream_t is a subtype of ostream_t. */
|
||||
typedef ostream_t iconv_ostream_t;
|
||||
|
||||
/* Functions that invoke the methods. */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern void iconv_ostream_write_mem (iconv_ostream_t first_arg, const void *data, size_t len);
|
||||
extern void iconv_ostream_flush (iconv_ostream_t first_arg, ostream_flush_scope_t scope);
|
||||
extern void iconv_ostream_free (iconv_ostream_t first_arg);
|
||||
/* Accessors. */
|
||||
extern const char *iconv_ostream_get_from_encoding (iconv_ostream_t stream);
|
||||
extern const char *iconv_ostream_get_to_encoding (iconv_ostream_t stream);
|
||||
extern ostream_t iconv_ostream_get_destination (iconv_ostream_t stream);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Create an output stream that converts from FROM_ENCODING to TO_ENCODING,
|
||||
writing the result to DESTINATION. */
|
||||
extern iconv_ostream_t iconv_ostream_create (const char *from_encoding,
|
||||
const char *to_encoding,
|
||||
ostream_t destination);
|
||||
|
||||
|
||||
/* Test whether a given output stream is an iconv_ostream. */
|
||||
extern bool is_instance_of_iconv_ostream (ostream_t stream);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBTEXTSTYLE_USES_ICONV */
|
||||
|
||||
/* -------------------------- From html-ostream.h -------------------------- */
|
||||
|
||||
/* html_ostream_t is a subtype of ostream_t. */
|
||||
typedef ostream_t html_ostream_t;
|
||||
|
||||
/* Functions that invoke the methods. */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern void html_ostream_write_mem (html_ostream_t first_arg, const void *data, size_t len);
|
||||
extern void html_ostream_flush (html_ostream_t first_arg, ostream_flush_scope_t scope);
|
||||
extern void html_ostream_free (html_ostream_t first_arg);
|
||||
extern void html_ostream_begin_span (html_ostream_t first_arg, const char *classname);
|
||||
extern void html_ostream_end_span (html_ostream_t first_arg, const char *classname);
|
||||
extern const char *html_ostream_get_hyperlink_ref (html_ostream_t first_arg);
|
||||
extern void html_ostream_set_hyperlink_ref (html_ostream_t first_arg, const char *ref);
|
||||
/* Like html_ostream_flush (first_arg, FLUSH_THIS_STREAM), except that it
|
||||
leaves the destination with the current text style enabled, instead
|
||||
of with the default text style.
|
||||
After calling this function, you can output strings without newlines(!)
|
||||
to the underlying stream, and they will be rendered like strings passed
|
||||
to 'ostream_write_mem', 'ostream_write_str', or 'ostream_write_printf'. */
|
||||
extern void html_ostream_flush_to_current_style (html_ostream_t stream);
|
||||
/* Accessors. */
|
||||
extern ostream_t html_ostream_get_destination (html_ostream_t stream);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Create an output stream that takes input in the UTF-8 encoding and
|
||||
writes it in HTML form on DESTINATION.
|
||||
This stream produces a sequence of lines. The caller is responsible
|
||||
for opening the <body><html> elements before and for closing them after
|
||||
the use of this stream.
|
||||
Note that the resulting stream must be closed before DESTINATION can be
|
||||
closed. */
|
||||
extern html_ostream_t html_ostream_create (ostream_t destination);
|
||||
|
||||
|
||||
/* Test whether a given output stream is a html_ostream. */
|
||||
extern bool is_instance_of_html_ostream (ostream_t stream);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ----------------------- From term-styled-ostream.h ----------------------- */
|
||||
|
||||
/* term_styled_ostream_t is a subtype of styled_ostream_t. */
|
||||
typedef styled_ostream_t term_styled_ostream_t;
|
||||
|
||||
/* Functions that invoke the methods. */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern void term_styled_ostream_write_mem (term_styled_ostream_t first_arg, const void *data, size_t len);
|
||||
extern void term_styled_ostream_flush (term_styled_ostream_t first_arg, ostream_flush_scope_t scope);
|
||||
extern void term_styled_ostream_free (term_styled_ostream_t first_arg);
|
||||
extern void term_styled_ostream_begin_use_class (term_styled_ostream_t first_arg, const char *classname);
|
||||
extern void term_styled_ostream_end_use_class (term_styled_ostream_t first_arg, const char *classname);
|
||||
extern const char *term_styled_ostream_get_hyperlink_ref (term_styled_ostream_t first_arg);
|
||||
extern const char *term_styled_ostream_get_hyperlink_id (term_styled_ostream_t first_arg);
|
||||
extern void term_styled_ostream_set_hyperlink (term_styled_ostream_t first_arg, const char *ref, const char *id);
|
||||
extern void term_styled_ostream_flush_to_current_style (term_styled_ostream_t first_arg);
|
||||
/* Accessors. */
|
||||
extern term_ostream_t term_styled_ostream_get_destination (term_styled_ostream_t stream);
|
||||
extern const char *term_styled_ostream_get_css_filename (term_styled_ostream_t stream);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Create an output stream referring to the file descriptor FD, styled with
|
||||
the file CSS_FILENAME.
|
||||
FILENAME is used only for error messages.
|
||||
TTY_CONTROL specifies the amount of control to take over the underlying tty.
|
||||
Note that the resulting stream must be closed before FD can be closed.
|
||||
Return NULL upon failure. */
|
||||
extern term_styled_ostream_t
|
||||
term_styled_ostream_create (int fd, const char *filename,
|
||||
ttyctl_t tty_control,
|
||||
const char *css_filename);
|
||||
|
||||
|
||||
/* Test whether a given output stream is a term_styled_ostream. */
|
||||
extern bool is_instance_of_term_styled_ostream (ostream_t stream);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ----------------------- From html-styled-ostream.h ----------------------- */
|
||||
|
||||
/* html_styled_ostream_t is a subtype of styled_ostream_t. */
|
||||
typedef styled_ostream_t html_styled_ostream_t;
|
||||
|
||||
/* Functions that invoke the methods. */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern void html_styled_ostream_write_mem (html_styled_ostream_t first_arg, const void *data, size_t len);
|
||||
extern void html_styled_ostream_flush (html_styled_ostream_t first_arg, ostream_flush_scope_t scope);
|
||||
extern void html_styled_ostream_free (html_styled_ostream_t first_arg);
|
||||
extern void html_styled_ostream_begin_use_class (html_styled_ostream_t first_arg, const char *classname);
|
||||
extern void html_styled_ostream_end_use_class (html_styled_ostream_t first_arg, const char *classname);
|
||||
extern const char *html_styled_ostream_get_hyperlink_ref (html_styled_ostream_t first_arg);
|
||||
extern const char *html_styled_ostream_get_hyperlink_id (html_styled_ostream_t first_arg);
|
||||
extern void html_styled_ostream_set_hyperlink (html_styled_ostream_t first_arg, const char *ref, const char *id);
|
||||
extern void html_styled_ostream_flush_to_current_style (html_styled_ostream_t first_arg);
|
||||
/* Accessors. */
|
||||
extern ostream_t html_styled_ostream_get_destination (html_styled_ostream_t stream);
|
||||
extern html_ostream_t html_styled_ostream_get_html_destination (html_styled_ostream_t stream);
|
||||
extern const char *html_styled_ostream_get_css_filename (html_styled_ostream_t stream);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Create an output stream that takes input in the UTF-8 encoding and
|
||||
writes it in HTML form on DESTINATION, styled with the file CSS_FILENAME.
|
||||
Note that the resulting stream must be closed before DESTINATION can be
|
||||
closed. */
|
||||
extern html_styled_ostream_t
|
||||
html_styled_ostream_create (ostream_t destination,
|
||||
const char *css_filename);
|
||||
|
||||
|
||||
/* Test whether a given output stream is a html_styled_ostream. */
|
||||
extern bool is_instance_of_html_styled_ostream (ostream_t stream);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ----------------------- From noop-styled-ostream.h ----------------------- */
|
||||
|
||||
/* noop_styled_ostream_t is a subtype of styled_ostream_t. */
|
||||
typedef styled_ostream_t noop_styled_ostream_t;
|
||||
|
||||
/* Functions that invoke the methods. */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern void noop_styled_ostream_write_mem (noop_styled_ostream_t first_arg, const void *data, size_t len);
|
||||
extern void noop_styled_ostream_flush (noop_styled_ostream_t first_arg, ostream_flush_scope_t scope);
|
||||
extern void noop_styled_ostream_free (noop_styled_ostream_t first_arg);
|
||||
extern void noop_styled_ostream_begin_use_class (noop_styled_ostream_t first_arg, const char *classname);
|
||||
extern void noop_styled_ostream_end_use_class (noop_styled_ostream_t first_arg, const char *classname);
|
||||
extern const char *noop_styled_ostream_get_hyperlink_ref (noop_styled_ostream_t first_arg);
|
||||
extern const char *noop_styled_ostream_get_hyperlink_id (noop_styled_ostream_t first_arg);
|
||||
extern void noop_styled_ostream_set_hyperlink (noop_styled_ostream_t first_arg, const char *ref, const char *id);
|
||||
extern void noop_styled_ostream_flush_to_current_style (noop_styled_ostream_t first_arg);
|
||||
/* Accessors. */
|
||||
extern ostream_t noop_styled_ostream_get_destination (noop_styled_ostream_t stream);
|
||||
extern bool noop_styled_ostream_is_owning_destination (noop_styled_ostream_t stream);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Create an output stream that delegates to DESTINATION and that supports
|
||||
the styling operations as no-ops.
|
||||
If PASS_OWNERSHIP is true, closing the resulting stream will automatically
|
||||
close the DESTINATION.
|
||||
Note that if PASS_OWNERSHIP is false, the resulting stream must be closed
|
||||
before DESTINATION can be closed. */
|
||||
extern noop_styled_ostream_t
|
||||
noop_styled_ostream_create (ostream_t destination, bool pass_ownership);
|
||||
|
||||
|
||||
/* Test whether a given output stream is a noop_styled_ostream. */
|
||||
extern bool is_instance_of_noop_styled_ostream (ostream_t stream);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ------------------------------ From color.h ------------------------------ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Whether to output a test page. */
|
||||
extern LIBTEXTSTYLE_DLL_VARIABLE bool color_test_mode;
|
||||
|
||||
/* Color option. */
|
||||
enum color_option { color_no, color_tty, color_yes, color_html };
|
||||
extern LIBTEXTSTYLE_DLL_VARIABLE enum color_option color_mode;
|
||||
|
||||
/* Style to use when coloring. */
|
||||
extern LIBTEXTSTYLE_DLL_VARIABLE const char *style_file_name;
|
||||
|
||||
/* --color argument handling. Return an error indicator. */
|
||||
extern bool handle_color_option (const char *option);
|
||||
|
||||
/* --style argument handling. */
|
||||
extern void handle_style_option (const char *option);
|
||||
|
||||
/* Print a color test page. */
|
||||
extern void print_color_test (void);
|
||||
|
||||
/* Assign a default value to style_file_name if necessary.
|
||||
STYLE_FILE_ENVVAR is an environment variable that, when set to a non-empty
|
||||
value, specifies the style file to use. This environment variable is meant
|
||||
to be set by the user.
|
||||
STYLESDIR_ENVVAR is an environment variable that, when set to a non-empty
|
||||
value, specifies the directory with the style files, or NULL. This is
|
||||
necessary for running the testsuite before "make install".
|
||||
STYLESDIR_AFTER_INSTALL is the directory with the style files after
|
||||
"make install".
|
||||
DEFAULT_STYLE_FILE is the file name of the default style file, relative to
|
||||
STYLESDIR. */
|
||||
extern void style_file_prepare (const char *style_file_envvar,
|
||||
const char *stylesdir_envvar,
|
||||
const char *stylesdir_after_install,
|
||||
const char *default_style_file);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ------------------------------ From misc.h ------------------------------ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Create an output stream referring to the file descriptor FD, styled with
|
||||
the file CSS_FILENAME if possible.
|
||||
FILENAME is used only for error messages.
|
||||
TTY_CONTROL specifies the amount of control to take over the underlying tty.
|
||||
Note that the resulting stream must be closed before FD can be closed. */
|
||||
extern styled_ostream_t
|
||||
styled_ostream_create (int fd, const char *filename,
|
||||
ttyctl_t tty_control,
|
||||
const char *css_filename);
|
||||
|
||||
/* Set the exit value upon failure within libtextstyle. */
|
||||
extern void libtextstyle_set_failure_exit_code (int exit_code);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ----------------------- Exported gnulib overrides ----------------------- */
|
||||
|
||||
#if defined _WIN32 && ! defined __CYGWIN__
|
||||
|
||||
# include <io.h>
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
# if !((defined isatty && defined _GL_UNISTD_H) || defined GNULIB_overrides_isatty) /* don't override gnulib */
|
||||
extern int libtextstyle_isatty (int fd);
|
||||
# undef isatty
|
||||
# define isatty libtextstyle_isatty
|
||||
# endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#endif /* _TEXTSTYLE_H */
|
117
bin/neovim/third-party/gettext/include/textstyle/stdbool.h
vendored
Normal file
117
bin/neovim/third-party/gettext/include/textstyle/stdbool.h
vendored
Normal file
@ -0,0 +1,117 @@
|
||||
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
|
||||
#if !defined _GL_STDBOOL_H
|
||||
#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
|
||||
#include <stdbool.h>
|
||||
#else
|
||||
/* Copyright (C) 2001-2003, 2006-2017, 2019 Free Software Foundation, Inc.
|
||||
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
|
||||
|
||||
This program 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, 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 Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _TEXTSTYLE_STDBOOL_H
|
||||
#define _TEXTSTYLE_STDBOOL_H
|
||||
|
||||
/* ISO C 99 <stdbool.h> for platforms that lack it. */
|
||||
|
||||
/* Usage suggestions:
|
||||
|
||||
Programs that use <stdbool.h> should be aware of some limitations
|
||||
and standards compliance issues.
|
||||
|
||||
Standards compliance:
|
||||
|
||||
- <stdbool.h> must be #included before 'bool', 'false', 'true'
|
||||
can be used.
|
||||
|
||||
- You cannot assume that sizeof (bool) == 1.
|
||||
|
||||
- Programs should not undefine the macros bool, true, and false,
|
||||
as C99 lists that as an "obsolescent feature".
|
||||
|
||||
Limitations of this substitute, when used in a C89 environment:
|
||||
|
||||
- <stdbool.h> must be #included before the '_Bool' type can be used.
|
||||
|
||||
- You cannot assume that _Bool is a typedef; it might be a macro.
|
||||
|
||||
- Bit-fields of type 'bool' are not supported. Portable code
|
||||
should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'.
|
||||
|
||||
- In C99, casts and automatic conversions to '_Bool' or 'bool' are
|
||||
performed in such a way that every nonzero value gets converted
|
||||
to 'true', and zero gets converted to 'false'. This doesn't work
|
||||
with this substitute. With this substitute, only the values 0 and 1
|
||||
give the expected result when converted to _Bool' or 'bool'.
|
||||
|
||||
- C99 allows the use of (_Bool)0.0 in constant expressions, but
|
||||
this substitute cannot always provide this property.
|
||||
|
||||
Also, it is suggested that programs use 'bool' rather than '_Bool';
|
||||
this isn't required, but 'bool' is more common. */
|
||||
|
||||
|
||||
/* 7.16. Boolean type and values */
|
||||
|
||||
#ifdef __cplusplus
|
||||
/* Assume the compiler has 'bool' and '_Bool'. */
|
||||
#else
|
||||
/* <stdbool.h> is known to exist and work with the following compilers:
|
||||
- GNU C 3.0 or newer, on any platform,
|
||||
- Intel C,
|
||||
- MSVC 12 (Visual Studio 2013) or newer,
|
||||
- Sun C, on Solaris, if _STDC_C99 is defined,
|
||||
- AIX xlc, if _ANSI_C_SOURCE is defined,
|
||||
- HP C, on HP-UX 11.31 or newer.
|
||||
It is know not to work with:
|
||||
- Sun C, on Solaris, if __C99FEATURES__ is defined but _STDC_C99 is not,
|
||||
- MIPSpro C 7.30, on IRIX. */
|
||||
# if (__GNUC__ >= 3) \
|
||||
|| defined __INTEL_COMPILER \
|
||||
|| (_MSC_VER >= 1800) \
|
||||
|| (defined __SUNPRO_C && defined _STDC_C99) \
|
||||
|| (defined _AIX && !defined __GNUC__ && defined _ANSI_C_SOURCE) \
|
||||
|| defined __HP_cc
|
||||
/* Assume the compiler has <stdbool.h>. */
|
||||
# include <stdbool.h>
|
||||
# else
|
||||
/* Need to define _Bool ourselves. As 'signed char' or as an enum type?
|
||||
Use of a typedef, with SunPRO C, leads to a stupid
|
||||
"warning: _Bool is a keyword in ISO C99".
|
||||
Use of an enum type, with IRIX cc, leads to a stupid
|
||||
"warning(1185): enumerated type mixed with another type".
|
||||
Even the existence of an enum type, without a typedef,
|
||||
"Invalid enumerator. (badenum)" with HP-UX cc on Tru64.
|
||||
The only benefit of the enum, debuggability, is not important
|
||||
with these compilers. So use 'signed char' and no enum. */
|
||||
# define _Bool signed char
|
||||
# define bool _Bool
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* The other macros must be usable in preprocessor directives. */
|
||||
#ifdef __cplusplus
|
||||
# define false false
|
||||
# define true true
|
||||
#else
|
||||
# undef false
|
||||
# define false 0
|
||||
# undef true
|
||||
# define true 1
|
||||
#endif
|
||||
|
||||
#define __bool_true_false_are_defined 1
|
||||
|
||||
#endif /* _TEXTSTYLE_STDBOOL_H */
|
||||
#endif
|
||||
#endif
|
44
bin/neovim/third-party/gettext/include/textstyle/version.h
vendored
Normal file
44
bin/neovim/third-party/gettext/include/textstyle/version.h
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
/* Meta information about GNU libtextstyle.
|
||||
Copyright (C) 2009-2010, 2019 Free Software Foundation, Inc.
|
||||
Written by Bruno Haible <bruno@clisp.org>, 2009.
|
||||
|
||||
This program 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 3 of the License, 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _TEXTSTYLE_VERSION_H
|
||||
#define _TEXTSTYLE_VERSION_H
|
||||
|
||||
/* Get LIBTEXTSTYLE_DLL_VARIABLE. */
|
||||
#include <textstyle/woe32dll.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Version number: (major<<16) + (minor<<8) + subminor. */
|
||||
#define _LIBTEXTSTYLE_VERSION 0x001604
|
||||
extern LIBTEXTSTYLE_DLL_VARIABLE const int _libtextstyle_version; /* Likewise */
|
||||
|
||||
|
||||
/* 1 if libtextstyle was built with iconv support, 0 if not. */
|
||||
#define LIBTEXTSTYLE_USES_ICONV 1
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _TEXTSTYLE_VERSION_H */
|
30
bin/neovim/third-party/gettext/include/textstyle/woe32dll.h
vendored
Normal file
30
bin/neovim/third-party/gettext/include/textstyle/woe32dll.h
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
/* Support for variables in shared libraries on Windows platforms.
|
||||
Copyright (C) 2009, 2019 Free Software Foundation, Inc.
|
||||
|
||||
This program 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 3 of the License, 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
|
||||
|
||||
#ifndef _TEXTSTYLE_WOE32DLL_H
|
||||
#define _TEXTSTYLE_WOE32DLL_H
|
||||
|
||||
#ifdef IN_LIBTEXTSTYLE
|
||||
/* All code is collected in a single library, */
|
||||
# define LIBTEXTSTYLE_DLL_VARIABLE
|
||||
#else
|
||||
/* References from outside of libtextstyle. */
|
||||
# define LIBTEXTSTYLE_DLL_VARIABLE
|
||||
#endif
|
||||
|
||||
#endif /* _TEXTSTYLE_WOE32DLL_H */
|
3
bin/neovim/third-party/gettext/lib/libintl.a
vendored
Normal file
3
bin/neovim/third-party/gettext/lib/libintl.a
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:afd6b06f335a03b274474aa0362071bb5e79742883beeaef4d4e1a8b7ab8287c
|
||||
size 305656
|
1
bin/neovim/third-party/gettext/share
vendored
Symbolic link
1
bin/neovim/third-party/gettext/share
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
/opt/homebrew/opt/gettext/share
|
Loading…
Reference in New Issue
Block a user