mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-05-10 02:09:46 +08:00
feat(i18n): 添加多语言支持功能
- 新增国际化系统,支持中英文切换 - 添加语言选择对话框和语言切换按钮回调 - 扩展配置系统以支持语言设置存储 - 创建语言文件目录结构和占位文件 - 更新主窗口支持UI文本动态刷新
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
# 定义项目信息
|
||||||
cmake_minimum_required(VERSION 3.10)
|
cmake_minimum_required(VERSION 3.10)
|
||||||
project(PathEditor VERSION 3.0 LANGUAGES C)
|
project(PathEditor VERSION 3.0 LANGUAGES C)
|
||||||
|
|
||||||
@@ -16,6 +17,7 @@ set(SOURCES
|
|||||||
src/utils/os_env.c
|
src/utils/os_env.c
|
||||||
src/utils/safe_string.c
|
src/utils/safe_string.c
|
||||||
src/utils/logger.c
|
src/utils/logger.c
|
||||||
|
src/utils/i18n.c
|
||||||
src/ui/ui_utils.c
|
src/ui/ui_utils.c
|
||||||
src/ui/dialogs.c
|
src/ui/dialogs.c
|
||||||
src/ui/main_window.c
|
src/ui/main_window.c
|
||||||
@@ -56,12 +58,14 @@ target_include_directories(${PROJECT_NAME} PRIVATE
|
|||||||
${CMAKE_SOURCE_DIR}/include/utils
|
${CMAKE_SOURCE_DIR}/include/utils
|
||||||
${CMAKE_SOURCE_DIR}/libs/IUP/include
|
${CMAKE_SOURCE_DIR}/libs/IUP/include
|
||||||
${CMAKE_SOURCE_DIR}/libs/lua/include
|
${CMAKE_SOURCE_DIR}/libs/lua/include
|
||||||
|
${CMAKE_SOURCE_DIR}/libs/gettext/include
|
||||||
)
|
)
|
||||||
|
|
||||||
# 设置库文件搜索路径
|
# 设置库文件搜索路径
|
||||||
target_link_directories(${PROJECT_NAME} PRIVATE
|
target_link_directories(${PROJECT_NAME} PRIVATE
|
||||||
${CMAKE_SOURCE_DIR}/libs/IUP
|
${CMAKE_SOURCE_DIR}/libs/IUP
|
||||||
${CMAKE_SOURCE_DIR}/libs/lua
|
${CMAKE_SOURCE_DIR}/libs/lua
|
||||||
|
${CMAKE_SOURCE_DIR}/libs/gettext/lib
|
||||||
)
|
)
|
||||||
|
|
||||||
# 链接所需库
|
# 链接所需库
|
||||||
@@ -75,11 +79,15 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
|
|||||||
uuid
|
uuid
|
||||||
ole32
|
ole32
|
||||||
advapi32
|
advapi32
|
||||||
|
intl
|
||||||
|
iconv
|
||||||
)
|
)
|
||||||
|
|
||||||
# 编译完成后,复制程序实际需要的核心 DLL 文件到构建输出目录
|
# 编译完成后,复制程序实际需要的核心 DLL 文件到构建输出目录
|
||||||
set(IUP_REQUIRED_DLLS "${CMAKE_CURRENT_SOURCE_DIR}/libs/IUP/iup.dll")
|
set(IUP_REQUIRED_DLLS "${CMAKE_CURRENT_SOURCE_DIR}/libs/IUP/iup.dll")
|
||||||
set(LUA_REQUIRED_DLLS "${CMAKE_CURRENT_SOURCE_DIR}/libs/lua/lua55.dll")
|
set(LUA_REQUIRED_DLLS "${CMAKE_CURRENT_SOURCE_DIR}/libs/lua/lua55.dll")
|
||||||
|
set(GETTEXT_REQUIRED_DLLS "${CMAKE_CURRENT_SOURCE_DIR}/libs/gettext/bin/libintl-8.dll")
|
||||||
|
set(ICONV_REQUIRED_DLLS "${CMAKE_CURRENT_SOURCE_DIR}/libs/gettext/bin/libiconv-2.dll")
|
||||||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
${IUP_REQUIRED_DLLS}
|
${IUP_REQUIRED_DLLS}
|
||||||
@@ -92,3 +100,21 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
|||||||
"$<TARGET_FILE_DIR:${PROJECT_NAME}>"
|
"$<TARGET_FILE_DIR:${PROJECT_NAME}>"
|
||||||
COMMENT "Copying Lua DLL to build directory..."
|
COMMENT "Copying Lua DLL to build directory..."
|
||||||
)
|
)
|
||||||
|
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
|
${GETTEXT_REQUIRED_DLLS}
|
||||||
|
"$<TARGET_FILE_DIR:${PROJECT_NAME}>"
|
||||||
|
COMMENT "Copying gettext DLL to build directory..."
|
||||||
|
)
|
||||||
|
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
|
${ICONV_REQUIRED_DLLS}
|
||||||
|
"$<TARGET_FILE_DIR:${PROJECT_NAME}>"
|
||||||
|
COMMENT "Copying iconv DLL to build directory..."
|
||||||
|
)
|
||||||
|
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||||
|
${CMAKE_SOURCE_DIR}/locale
|
||||||
|
"$<TARGET_FILE_DIR:${PROJECT_NAME}>/locale"
|
||||||
|
COMMENT "Copying locale directory to build directory..."
|
||||||
|
)
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ int btn_export_cb(Ihandle *self);
|
|||||||
int btn_ok_cb(Ihandle *self);
|
int btn_ok_cb(Ihandle *self);
|
||||||
int btn_cancel_cb(Ihandle *self);
|
int btn_cancel_cb(Ihandle *self);
|
||||||
int btn_help_cb(Ihandle *self);
|
int btn_help_cb(Ihandle *self);
|
||||||
|
int btn_lang_cb(Ihandle *self);
|
||||||
|
|
||||||
// 搜索回调
|
// 搜索回调
|
||||||
int txt_search_cb(Ihandle *self);
|
int txt_search_cb(Ihandle *self);
|
||||||
|
|||||||
@@ -31,4 +31,11 @@ int lua_config_reload(void);
|
|||||||
// 返回值: 1 已加载, 0 未加载
|
// 返回值: 1 已加载, 0 未加载
|
||||||
int lua_config_is_loaded(void);
|
int lua_config_is_loaded(void);
|
||||||
|
|
||||||
|
// 设置字符串配置值
|
||||||
|
// section: 配置章节名
|
||||||
|
// key: 配置键名
|
||||||
|
// value: 配置值
|
||||||
|
// 返回值: 0 成功, -1 失败
|
||||||
|
int lua_config_set_string(const char *section, const char *key, const char *value);
|
||||||
|
|
||||||
#endif // LUA_CONFIG_H
|
#endif // LUA_CONFIG_H
|
||||||
@@ -5,4 +5,8 @@
|
|||||||
// 返回值:0-取消,1-确认
|
// 返回值:0-取消,1-确认
|
||||||
int custom_input_dialog(const char *title, const char *label_text, char *buffer, int buffer_size);
|
int custom_input_dialog(const char *title, const char *label_text, char *buffer, int buffer_size);
|
||||||
|
|
||||||
|
// 语言选择对话框
|
||||||
|
// 返回值:0-取消,1-确认
|
||||||
|
int language_select_dialog(void);
|
||||||
|
|
||||||
#endif // DIALOGS_H
|
#endif // DIALOGS_H
|
||||||
|
|||||||
@@ -6,4 +6,7 @@
|
|||||||
// 创建主窗口
|
// 创建主窗口
|
||||||
Ihandle* create_main_window(void);
|
Ihandle* create_main_window(void);
|
||||||
|
|
||||||
|
// 刷新 UI 文本(语言切换时调用)
|
||||||
|
void refresh_main_window_ui(Ihandle *main_dlg);
|
||||||
|
|
||||||
#endif // MAIN_WINDOW_H
|
#endif // MAIN_WINDOW_H
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
#ifndef I18N_H
|
||||||
|
#define I18N_H
|
||||||
|
|
||||||
|
#include <libintl.h>
|
||||||
|
#include <locale.h>
|
||||||
|
|
||||||
|
#ifndef _
|
||||||
|
#define _(s) gettext(s)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// 初始化国际化系统
|
||||||
|
void i18n_init(const char* default_lang);
|
||||||
|
|
||||||
|
// 检测系统语言并返回语言代码
|
||||||
|
const char* i18n_detect_system_language(void);
|
||||||
|
|
||||||
|
// 切换语言
|
||||||
|
void i18n_change_language(const char* lang);
|
||||||
|
|
||||||
|
// 获取当前语言
|
||||||
|
const char* i18n_get_current_language(void);
|
||||||
|
|
||||||
|
#endif // I18N_H
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,70 @@
|
|||||||
|
/* Class autosprintf - formatted output to an ostream.
|
||||||
|
Copyright (C) 2002, 2012-2026 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/>. */
|
||||||
|
|
||||||
|
/* Written by Bruno Haible. */
|
||||||
|
|
||||||
|
#ifndef _AUTOSPRINTF_H
|
||||||
|
#define _AUTOSPRINTF_H
|
||||||
|
|
||||||
|
/* This feature is available in gcc versions 2.5 and later and in clang. */
|
||||||
|
#if !((__GNUC__ >= 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || defined __clang__) && !__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 and in clang. */
|
||||||
|
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || defined __clang__
|
||||||
|
# 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 */
|
||||||
@@ -0,0 +1,420 @@
|
|||||||
|
/* Public API for GNU gettext PO files - contained in libgettextpo.
|
||||||
|
Copyright (C) 2003-2026 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. */
|
||||||
|
|
||||||
|
#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 0x010000
|
||||||
|
extern __declspec (dllimport) 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_flag_iterator_t represents an iterator through the workflow flags or
|
||||||
|
the sticky flags of a message. */
|
||||||
|
typedef struct po_flag_iterator *po_flag_iterator_t;
|
||||||
|
|
||||||
|
/* A po_error_handler handles error situations. No longer used. */
|
||||||
|
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) || defined __clang__) && !__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) || defined __clang__) && !__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 has a given workflow flag.
|
||||||
|
This function is a generalization of po_message_is_fuzzy. */
|
||||||
|
extern int po_message_has_workflow_flag (po_message_t message, const char *workflow_flag);
|
||||||
|
|
||||||
|
/* Set or unset a given workflow flag on a message.
|
||||||
|
This function is a generalization of po_message_set_fuzzy. */
|
||||||
|
extern void po_message_set_workflow_flag (po_message_t message, const char *workflow_flag, int value);
|
||||||
|
|
||||||
|
/* Create an iterator for traversing the list of workflow flags of a message.
|
||||||
|
This includes the "fuzzy" flag. */
|
||||||
|
extern po_flag_iterator_t po_message_workflow_flags_iterator (po_message_t message);
|
||||||
|
|
||||||
|
|
||||||
|
/* 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);
|
||||||
|
|
||||||
|
/* Return the format string mark for a given type (e.g. "c-format") of a
|
||||||
|
message.
|
||||||
|
Returns 1 if the the mark is set,
|
||||||
|
0 if the opposite mark ("no-*") is set,
|
||||||
|
-1 if neither the mark nor the opposite mark is set. */
|
||||||
|
extern int po_message_get_format (po_message_t message, const char *format_type);
|
||||||
|
|
||||||
|
/* Change the format string mark for a given type of a message.
|
||||||
|
Pass value = 1 to assert the format string mark (e.g. "c-format"),
|
||||||
|
value = 0 to assert the opposite (leading to e.g. "no-c-format"),
|
||||||
|
or value = -1 to remove the format string mark and its opposite. */
|
||||||
|
extern void po_message_set_format (po_message_t message, const char *format_type, int value);
|
||||||
|
|
||||||
|
/* Return true if the message has a given sticky flag.
|
||||||
|
This function is a generalization of po_message_is_format and
|
||||||
|
po_message_get_format. */
|
||||||
|
extern int po_message_has_sticky_flag (po_message_t message, const char *sticky_flag);
|
||||||
|
|
||||||
|
/* Set or unset a given sticky flag on a message.
|
||||||
|
This function is a generalization of po_message_set_format. */
|
||||||
|
extern void po_message_set_sticky_flag (po_message_t message, const char *sticky_flag, int value);
|
||||||
|
|
||||||
|
/* Create an iterator for traversing the list of sticky flags of a message.
|
||||||
|
This includes the "*-format" and "no-*-format" flags, as well as the
|
||||||
|
"no-wrap" flag.
|
||||||
|
It does *not* include the "range", because that is not a flag. */
|
||||||
|
extern po_flag_iterator_t po_message_sticky_flags_iterator (po_message_t message);
|
||||||
|
|
||||||
|
|
||||||
|
/* 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);
|
||||||
|
|
||||||
|
|
||||||
|
/* ========================= po_flag_iterator_t API ========================= */
|
||||||
|
|
||||||
|
/* Free an iterator. */
|
||||||
|
extern void po_flag_iterator_free (po_flag_iterator_t iterator);
|
||||||
|
|
||||||
|
/* Return the next flag, and advance the iterator.
|
||||||
|
Return NULL at the end of the list of flags. */
|
||||||
|
extern const char * po_flag_next (po_flag_iterator_t iterator);
|
||||||
|
|
||||||
|
|
||||||
|
/* ============================= 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 */
|
||||||
@@ -0,0 +1,243 @@
|
|||||||
|
/* Copyright (C) 1999-2026 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU LIBICONV Library.
|
||||||
|
|
||||||
|
The GNU LIBICONV Library is free software; you can redistribute it
|
||||||
|
and/or modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either version 2.1
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
The GNU LIBICONV Library is distributed in the hope that it will be
|
||||||
|
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with the GNU LIBICONV Library; see the file COPYING.LIB.
|
||||||
|
If not, see <https://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
/* When installed, this file is called "iconv.h". */
|
||||||
|
|
||||||
|
#ifndef _LIBICONV_H
|
||||||
|
#define _LIBICONV_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define _LIBICONV_VERSION 0x0113 /* version number: (major<<8) + minor */
|
||||||
|
extern __declspec (dllimport) int _libiconv_version; /* Likewise */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* We would like to #include any system header file which could define
|
||||||
|
iconv_t, in order to eliminate the risk that the user gets compilation
|
||||||
|
errors because some other system header file includes /usr/include/iconv.h
|
||||||
|
which defines iconv_t or declares iconv after this file.
|
||||||
|
But gcc's #include_next is not portable. Thus, once libiconv's iconv.h
|
||||||
|
has been installed in /usr/local/include, there is no way any more to
|
||||||
|
include the original /usr/include/iconv.h. We simply have to get away
|
||||||
|
without it.
|
||||||
|
The risk that a system header file does
|
||||||
|
#include "iconv.h" or #include_next "iconv.h"
|
||||||
|
is small. They all do #include <iconv.h>. */
|
||||||
|
|
||||||
|
/* Define iconv_t ourselves. */
|
||||||
|
#undef iconv_t
|
||||||
|
#define iconv_t libiconv_t
|
||||||
|
typedef void* iconv_t;
|
||||||
|
|
||||||
|
/* Get size_t declaration.
|
||||||
|
Get wchar_t declaration if it exists. */
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
|
/* Get errno declaration and values. */
|
||||||
|
#include <errno.h>
|
||||||
|
/* Some systems, like SunOS 4, don't have EILSEQ. Some systems, like BSD/OS,
|
||||||
|
have EILSEQ in a different header. On these systems, define EILSEQ
|
||||||
|
ourselves. */
|
||||||
|
#ifndef EILSEQ
|
||||||
|
#define EILSEQ
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* Allocates descriptor for code conversion from encoding ‘fromcode’ to
|
||||||
|
encoding ‘tocode’. */
|
||||||
|
#define iconv_open libiconv_open
|
||||||
|
extern iconv_t iconv_open (const char* tocode, const char* fromcode);
|
||||||
|
|
||||||
|
/* Converts, using conversion descriptor ‘cd’, at most ‘*inbytesleft’ bytes
|
||||||
|
starting at ‘*inbuf’, writing at most ‘*outbytesleft’ bytes starting at
|
||||||
|
‘*outbuf’.
|
||||||
|
Decrements ‘*inbytesleft’ and increments ‘*inbuf’ by the same amount.
|
||||||
|
Decrements ‘*outbytesleft’ and increments ‘*outbuf’ by the same amount. */
|
||||||
|
#define iconv libiconv
|
||||||
|
extern size_t iconv (iconv_t cd, char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
|
||||||
|
|
||||||
|
/* Frees resources allocated for conversion descriptor ‘cd’. */
|
||||||
|
#define iconv_close libiconv_close
|
||||||
|
extern int iconv_close (iconv_t cd);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* Nonstandard extensions. */
|
||||||
|
|
||||||
|
#if 1
|
||||||
|
#if 0
|
||||||
|
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
|
||||||
|
<wchar.h>.
|
||||||
|
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
|
||||||
|
included before <wchar.h>. */
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <time.h>
|
||||||
|
#endif
|
||||||
|
#include <wchar.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* A type that holds all memory needed by a conversion descriptor.
|
||||||
|
A pointer to such an object can be used as an iconv_t. */
|
||||||
|
typedef struct {
|
||||||
|
void* dummy1[28];
|
||||||
|
#if 1
|
||||||
|
mbstate_t dummy2;
|
||||||
|
#endif
|
||||||
|
} iconv_allocation_t;
|
||||||
|
|
||||||
|
/* Allocates descriptor for code conversion from encoding ‘fromcode’ to
|
||||||
|
encoding ‘tocode’ into preallocated memory. Returns an error indicator
|
||||||
|
(0 or -1 with errno set). */
|
||||||
|
#define iconv_open_into libiconv_open_into
|
||||||
|
extern int iconv_open_into (const char* tocode, const char* fromcode,
|
||||||
|
iconv_allocation_t* resultp);
|
||||||
|
|
||||||
|
/* Control of attributes. */
|
||||||
|
#define iconvctl libiconvctl
|
||||||
|
extern int iconvctl (iconv_t cd, int request, void* argument);
|
||||||
|
|
||||||
|
/* Hook performed after every successful conversion of a Unicode character. */
|
||||||
|
typedef void (*iconv_unicode_char_hook) (unsigned int uc, void* data);
|
||||||
|
/* Hook performed after every successful conversion of a wide character. */
|
||||||
|
typedef void (*iconv_wide_char_hook) (wchar_t wc, void* data);
|
||||||
|
/* Set of hooks. */
|
||||||
|
struct iconv_hooks {
|
||||||
|
iconv_unicode_char_hook uc_hook;
|
||||||
|
iconv_wide_char_hook wc_hook;
|
||||||
|
void* data;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Fallback function. Invoked when a small number of bytes could not be
|
||||||
|
converted to a Unicode character. This function should process all
|
||||||
|
bytes from inbuf and may produce replacement Unicode characters by calling
|
||||||
|
the write_replacement callback repeatedly. */
|
||||||
|
typedef void (*iconv_unicode_mb_to_uc_fallback)
|
||||||
|
(const char* inbuf, size_t inbufsize,
|
||||||
|
void (*write_replacement) (const unsigned int *buf, size_t buflen,
|
||||||
|
void* callback_arg),
|
||||||
|
void* callback_arg,
|
||||||
|
void* data);
|
||||||
|
/* Fallback function. Invoked when a Unicode character could not be converted
|
||||||
|
to the target encoding. This function should process the character and
|
||||||
|
may produce replacement bytes (in the target encoding) by calling the
|
||||||
|
write_replacement callback repeatedly. */
|
||||||
|
typedef void (*iconv_unicode_uc_to_mb_fallback)
|
||||||
|
(unsigned int code,
|
||||||
|
void (*write_replacement) (const char *buf, size_t buflen,
|
||||||
|
void* callback_arg),
|
||||||
|
void* callback_arg,
|
||||||
|
void* data);
|
||||||
|
/* Fallback function. Invoked when a number of bytes could not be converted to
|
||||||
|
a wide character. This function should process all bytes from inbuf and may
|
||||||
|
produce replacement wide characters by calling the write_replacement
|
||||||
|
callback repeatedly. */
|
||||||
|
typedef void (*iconv_wchar_mb_to_wc_fallback)
|
||||||
|
(const char* inbuf, size_t inbufsize,
|
||||||
|
void (*write_replacement) (const wchar_t *buf, size_t buflen,
|
||||||
|
void* callback_arg),
|
||||||
|
void* callback_arg,
|
||||||
|
void* data);
|
||||||
|
/* Fallback function. Invoked when a wide character could not be converted to
|
||||||
|
the target encoding. This function should process the character and may
|
||||||
|
produce replacement bytes (in the target encoding) by calling the
|
||||||
|
write_replacement callback repeatedly. */
|
||||||
|
typedef void (*iconv_wchar_wc_to_mb_fallback)
|
||||||
|
(wchar_t code,
|
||||||
|
void (*write_replacement) (const char *buf, size_t buflen,
|
||||||
|
void* callback_arg),
|
||||||
|
void* callback_arg,
|
||||||
|
void* data);
|
||||||
|
/* Set of fallbacks. */
|
||||||
|
struct iconv_fallbacks {
|
||||||
|
iconv_unicode_mb_to_uc_fallback mb_to_uc_fallback;
|
||||||
|
iconv_unicode_uc_to_mb_fallback uc_to_mb_fallback;
|
||||||
|
iconv_wchar_mb_to_wc_fallback mb_to_wc_fallback;
|
||||||
|
iconv_wchar_wc_to_mb_fallback wc_to_mb_fallback;
|
||||||
|
void* data;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Surfaces.
|
||||||
|
The concept of surfaces is described in the 'recode' manual. */
|
||||||
|
#define ICONV_SURFACE_NONE 0
|
||||||
|
/* In EBCDIC encodings, 0x15 (which encodes the "newline function", see the
|
||||||
|
Unicode standard, chapter 5) maps to U+000A instead of U+0085. This is
|
||||||
|
for interoperability with C programs and Unix environments on z/OS. */
|
||||||
|
#define ICONV_SURFACE_EBCDIC_ZOS_UNIX 1
|
||||||
|
|
||||||
|
/* Requests for iconvctl. */
|
||||||
|
#define ICONV_TRIVIALP 0 /* int *argument */
|
||||||
|
#define ICONV_GET_TRANSLITERATE 1 /* int *argument */
|
||||||
|
#define ICONV_SET_TRANSLITERATE 2 /* const int *argument */
|
||||||
|
#define ICONV_GET_DISCARD_ILSEQ 3 /* int *argument */
|
||||||
|
#define ICONV_SET_DISCARD_ILSEQ 4 /* const int *argument */
|
||||||
|
#define ICONV_SET_HOOKS 5 /* const struct iconv_hooks *argument */
|
||||||
|
#define ICONV_SET_FALLBACKS 6 /* const struct iconv_fallbacks *argument */
|
||||||
|
#define ICONV_GET_FROM_SURFACE 7 /* unsigned int *argument */
|
||||||
|
#define ICONV_SET_FROM_SURFACE 8 /* const unsigned int *argument */
|
||||||
|
#define ICONV_GET_TO_SURFACE 9 /* unsigned int *argument */
|
||||||
|
#define ICONV_SET_TO_SURFACE 10 /* const unsigned int *argument */
|
||||||
|
#define ICONV_GET_DISCARD_INVALID 11 /* int *argument */
|
||||||
|
#define ICONV_SET_DISCARD_INVALID 12 /* const int *argument */
|
||||||
|
#define ICONV_GET_DISCARD_NON_IDENTICAL 13 /* int *argument */
|
||||||
|
#define ICONV_SET_DISCARD_NON_IDENTICAL 14 /* const int *argument */
|
||||||
|
|
||||||
|
/* Listing of locale independent encodings. */
|
||||||
|
#define iconvlist libiconvlist
|
||||||
|
extern void iconvlist (int (*do_one) (unsigned int namescount,
|
||||||
|
const char * const * names,
|
||||||
|
void* data),
|
||||||
|
void* data);
|
||||||
|
|
||||||
|
/* Canonicalize an encoding name.
|
||||||
|
The result is either a canonical encoding name, or name itself. */
|
||||||
|
extern const char * iconv_canonicalize (const char * name);
|
||||||
|
|
||||||
|
/* Support for relocatable packages. */
|
||||||
|
|
||||||
|
/* Sets the original and the current installation prefix of the package.
|
||||||
|
Relocation simply replaces a pathname starting with the original prefix
|
||||||
|
by the corresponding pathname with the current prefix instead. Both
|
||||||
|
prefixes should be directory names without trailing slash (i.e. use ""
|
||||||
|
instead of "/"). */
|
||||||
|
extern void libiconv_set_relocation_prefix (const char *orig_prefix,
|
||||||
|
const char *curr_prefix);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* _LIBICONV_H */
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
/* Copyright (C) 2003 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU CHARSET Library.
|
||||||
|
|
||||||
|
The GNU CHARSET Library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public License as
|
||||||
|
published by the Free Software Foundation; either version 2 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
The GNU CHARSET Library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
|
along with the GNU CHARSET Library; see the file COPYING.LIB. If not,
|
||||||
|
see <https://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
#ifndef _LIBCHARSET_H
|
||||||
|
#define _LIBCHARSET_H
|
||||||
|
|
||||||
|
#include <localcharset.h>
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* Support for relocatable packages. */
|
||||||
|
|
||||||
|
/* Sets the original and the current installation prefix of the package.
|
||||||
|
Relocation simply replaces a pathname starting with the original prefix
|
||||||
|
by the corresponding pathname with the current prefix instead. Both
|
||||||
|
prefixes should be directory names without trailing slash (i.e. use ""
|
||||||
|
instead of "/"). */
|
||||||
|
extern void libcharset_set_relocation_prefix (const char *orig_prefix,
|
||||||
|
const char *curr_prefix);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* _LIBCHARSET_H */
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,137 @@
|
|||||||
|
/* Determine a canonical name for the current locale's character encoding.
|
||||||
|
Copyright (C) 2000-2003, 2009-2019 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU CHARSET Library.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU 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 _LOCALCHARSET_H
|
||||||
|
#define _LOCALCHARSET_H
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* Determine the current locale's character encoding, and canonicalize it
|
||||||
|
into one of the canonical names listed below.
|
||||||
|
The result must not be freed; it is statically allocated. The result
|
||||||
|
becomes invalid when setlocale() is used to change the global locale, or
|
||||||
|
when the value of one of the environment variables LC_ALL, LC_CTYPE, LANG
|
||||||
|
is changed; threads in multithreaded programs should not do this.
|
||||||
|
If the canonical name cannot be determined, the result is a non-canonical
|
||||||
|
name. */
|
||||||
|
extern const char * locale_charset (void);
|
||||||
|
|
||||||
|
/* About GNU canonical names for character encodings:
|
||||||
|
|
||||||
|
Every canonical name must be supported by GNU libiconv. Support by GNU libc
|
||||||
|
is also desirable.
|
||||||
|
|
||||||
|
The name is case insensitive. Usually an upper case MIME charset name is
|
||||||
|
preferred.
|
||||||
|
|
||||||
|
The current list of these GNU canonical names is:
|
||||||
|
|
||||||
|
name MIME? used by which systems
|
||||||
|
(darwin = Mac OS X, windows = native Windows)
|
||||||
|
|
||||||
|
ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin minix cygwin
|
||||||
|
ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
|
||||||
|
ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
|
||||||
|
ISO-8859-3 Y glibc solaris cygwin
|
||||||
|
ISO-8859-4 Y hpux osf solaris freebsd netbsd openbsd darwin
|
||||||
|
ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
|
||||||
|
ISO-8859-6 Y glibc aix hpux solaris cygwin
|
||||||
|
ISO-8859-7 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
|
||||||
|
ISO-8859-8 Y glibc aix hpux osf solaris cygwin zos
|
||||||
|
ISO-8859-9 Y glibc aix hpux irix osf solaris freebsd darwin cygwin zos
|
||||||
|
ISO-8859-13 glibc hpux solaris freebsd netbsd openbsd darwin cygwin
|
||||||
|
ISO-8859-14 glibc cygwin
|
||||||
|
ISO-8859-15 glibc aix irix osf solaris freebsd netbsd openbsd darwin cygwin
|
||||||
|
KOI8-R Y glibc hpux solaris freebsd netbsd openbsd darwin
|
||||||
|
KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin
|
||||||
|
KOI8-T glibc
|
||||||
|
CP437 dos
|
||||||
|
CP775 dos
|
||||||
|
CP850 aix osf dos
|
||||||
|
CP852 dos
|
||||||
|
CP855 dos
|
||||||
|
CP856 aix
|
||||||
|
CP857 dos
|
||||||
|
CP861 dos
|
||||||
|
CP862 dos
|
||||||
|
CP864 dos
|
||||||
|
CP865 dos
|
||||||
|
CP866 freebsd netbsd openbsd darwin dos
|
||||||
|
CP869 dos
|
||||||
|
CP874 windows dos
|
||||||
|
CP922 aix
|
||||||
|
CP932 aix cygwin windows dos
|
||||||
|
CP943 aix zos
|
||||||
|
CP949 osf darwin windows dos
|
||||||
|
CP950 windows dos
|
||||||
|
CP1046 aix
|
||||||
|
CP1124 aix
|
||||||
|
CP1125 dos
|
||||||
|
CP1129 aix
|
||||||
|
CP1131 freebsd darwin
|
||||||
|
CP1250 windows
|
||||||
|
CP1251 glibc hpux solaris freebsd netbsd openbsd darwin cygwin windows
|
||||||
|
CP1252 aix windows
|
||||||
|
CP1253 windows
|
||||||
|
CP1254 windows
|
||||||
|
CP1255 glibc windows
|
||||||
|
CP1256 windows
|
||||||
|
CP1257 windows
|
||||||
|
GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin cygwin zos
|
||||||
|
EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin
|
||||||
|
EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin zos
|
||||||
|
EUC-TW glibc aix hpux irix osf solaris netbsd
|
||||||
|
BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin zos
|
||||||
|
BIG5-HKSCS glibc hpux solaris netbsd darwin
|
||||||
|
GBK glibc aix osf solaris freebsd darwin cygwin windows dos
|
||||||
|
GB18030 glibc hpux solaris freebsd netbsd darwin
|
||||||
|
SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
|
||||||
|
JOHAB glibc solaris windows
|
||||||
|
TIS-620 glibc aix hpux osf solaris cygwin zos
|
||||||
|
VISCII Y glibc
|
||||||
|
TCVN5712-1 glibc
|
||||||
|
ARMSCII-8 glibc freebsd netbsd darwin
|
||||||
|
GEORGIAN-PS glibc cygwin
|
||||||
|
PT154 glibc netbsd cygwin
|
||||||
|
HP-ROMAN8 hpux
|
||||||
|
HP-ARABIC8 hpux
|
||||||
|
HP-GREEK8 hpux
|
||||||
|
HP-HEBREW8 hpux
|
||||||
|
HP-TURKISH8 hpux
|
||||||
|
HP-KANA8 hpux
|
||||||
|
DEC-KANJI osf
|
||||||
|
DEC-HANYU osf
|
||||||
|
UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin zos
|
||||||
|
|
||||||
|
Note: Names which are not marked as being a MIME name should not be used in
|
||||||
|
Internet protocols for information interchange (mail, news, etc.).
|
||||||
|
|
||||||
|
Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
|
||||||
|
must understand both names and treat them as equivalent.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* _LOCALCHARSET_H */
|
||||||
@@ -0,0 +1,707 @@
|
|||||||
|
/* Public API of the libtextstyle library.
|
||||||
|
Copyright (C) 2006-2007, 2019-2026 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. */
|
||||||
|
|
||||||
|
#ifndef _TEXTSTYLE_H
|
||||||
|
#define _TEXTSTYLE_H
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdio.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 */
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
/* Meta information about GNU libtextstyle.
|
||||||
|
Copyright (C) 2009-2026 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. */
|
||||||
|
|
||||||
|
#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 0x010000
|
||||||
|
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 */
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
/* Support for variables in shared libraries on Windows platforms.
|
||||||
|
Copyright (C) 2009-2026 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. */
|
||||||
|
|
||||||
|
#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 __declspec (dllimport)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _TEXTSTYLE_WOE32DLL_H */
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,30 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2013-2026 Michele Locati
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
|
This project includes the following third-party components:
|
||||||
|
|
||||||
|
- iconv ( https://www.gnu.org/software/libiconv/ )
|
||||||
|
See license in the file licenses/iconv.txt
|
||||||
|
- gettext ( https://www.gnu.org/software/gettext/ )
|
||||||
|
See license in the file licenses/gettext.txt
|
||||||
|
- The GCC ( https://gcc.gnu.org/ ) runtime libraries provided by mingw-w64
|
||||||
|
See license in the file licenses/gcc.txt
|
||||||
@@ -0,0 +1,340 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
License is intended to guarantee your freedom to share and change free
|
||||||
|
software--to make sure the software is free for all its users. This
|
||||||
|
General Public License applies to most of the Free Software
|
||||||
|
Foundation's software and to any other program whose authors commit to
|
||||||
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
|
the GNU Library General Public License instead.) You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
this service if you wish), that you receive source code or can get it
|
||||||
|
if you want it, that you can change the software or use pieces of it
|
||||||
|
in new free programs; and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
|
These restrictions translate to certain responsibilities for you if you
|
||||||
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
|
you have. You must make sure that they, too, receive or can get the
|
||||||
|
source code. And you must show them these terms so they know their
|
||||||
|
rights.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
|
distribute and/or modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
software. If the software is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original, so
|
||||||
|
that any problems introduced by others will not reflect on the original
|
||||||
|
authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software
|
||||||
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
|
program will individually obtain patent licenses, in effect making the
|
||||||
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License applies to any program or other work which contains
|
||||||
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
|
under the terms of this General Public License. The "Program", below,
|
||||||
|
refers to any such program or work, and a "work based on the Program"
|
||||||
|
means either the Program or any derivative work under copyright law:
|
||||||
|
that is to say, a work containing the Program or a portion of it,
|
||||||
|
either verbatim or with modifications and/or translated into another
|
||||||
|
language. (Hereinafter, translation is included without limitation in
|
||||||
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running the Program is not restricted, and the output from the Program
|
||||||
|
is covered only if its contents constitute a work based on the
|
||||||
|
Program (independent of having been made by running the Program).
|
||||||
|
Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Program's
|
||||||
|
source code as you receive it, in any medium, provided that you
|
||||||
|
conspicuously and appropriately publish on each copy an appropriate
|
||||||
|
copyright notice and disclaimer of warranty; keep intact all the
|
||||||
|
notices that refer to this License and to the absence of any warranty;
|
||||||
|
and give any other recipients of the Program a copy of this License
|
||||||
|
along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
|
of it, thus forming a work based on the Program, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) You must cause the modified files to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
b) You must cause any work that you distribute or publish, that in
|
||||||
|
whole or in part contains or is derived from the Program or any
|
||||||
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
|
parties under the terms of this License.
|
||||||
|
|
||||||
|
c) If the modified program normally reads commands interactively
|
||||||
|
when run, you must cause it, when started running for such
|
||||||
|
interactive use in the most ordinary way, to print or display an
|
||||||
|
announcement including an appropriate copyright notice and a
|
||||||
|
notice that there is no warranty (or else, saying that you provide
|
||||||
|
a warranty) and that users may redistribute the program under
|
||||||
|
these conditions, and telling the user how to view a copy of this
|
||||||
|
License. (Exception: if the Program itself is interactive but
|
||||||
|
does not normally print such an announcement, your work based on
|
||||||
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Program,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program
|
||||||
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
|
under Section 2) in object code or executable form under the terms of
|
||||||
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
|
source code, which must be distributed under the terms of Sections
|
||||||
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
b) Accompany it with a written offer, valid for at least three
|
||||||
|
years, to give any third party, for a charge no more than your
|
||||||
|
cost of physically performing source distribution, a complete
|
||||||
|
machine-readable copy of the corresponding source code, to be
|
||||||
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
|
c) Accompany it with the information you received as to the offer
|
||||||
|
to distribute corresponding source code. (This alternative is
|
||||||
|
allowed only for noncommercial distribution and only if you
|
||||||
|
received the program in object code or executable form with such
|
||||||
|
an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For an executable work, complete source
|
||||||
|
code means all the source code for all modules it contains, plus any
|
||||||
|
associated interface definition files, plus the scripts used to
|
||||||
|
control compilation and installation of the executable. However, as a
|
||||||
|
special exception, the source code distributed need not include
|
||||||
|
anything that is normally distributed (in either source or binary
|
||||||
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component
|
||||||
|
itself accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering
|
||||||
|
access to copy from a designated place, then offering equivalent
|
||||||
|
access to copy the source code from the same place counts as
|
||||||
|
distribution of the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
|
except as expressly provided under this License. Any attempt
|
||||||
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
|
void, and will automatically terminate your rights under this License.
|
||||||
|
However, parties who have received copies, or rights, from you under
|
||||||
|
this License will not have their licenses terminated so long as such
|
||||||
|
parties remain in full compliance.
|
||||||
|
|
||||||
|
5. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Program or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Program (or any work based on the
|
||||||
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
|
Program), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
|
these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties to
|
||||||
|
this License.
|
||||||
|
|
||||||
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Program at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Program by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under
|
||||||
|
any particular circumstance, the balance of the section is intended to
|
||||||
|
apply and the section as a whole is intended to apply in other
|
||||||
|
circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system, which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Program under this License
|
||||||
|
may add an explicit geographical distribution limitation excluding
|
||||||
|
those countries, so that distribution is permitted only in or among
|
||||||
|
countries not thus excluded. In such case, this License incorporates
|
||||||
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program
|
||||||
|
specifies a version number of this License which applies to it and "any
|
||||||
|
later version", you have the option of following the terms and conditions
|
||||||
|
either of that version or of any later version published by the Free
|
||||||
|
Software Foundation. If the Program does not specify a version number of
|
||||||
|
this License, you may choose any version ever published by the Free Software
|
||||||
|
Foundation.
|
||||||
|
|
||||||
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
|
programs whose distribution conditions are different, write to the author
|
||||||
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
|
of preserving the free status of all derivatives of our free software and
|
||||||
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||||
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||||
|
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||||
|
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||||
|
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||||
|
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||||
|
REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||||
|
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||||
|
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||||
|
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||||
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
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 2 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, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program is interactive, make it output a short notice like this
|
||||||
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, the commands you use may
|
||||||
|
be called something other than `show w' and `show c'; they could even be
|
||||||
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1989
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
This General Public License does not permit incorporating your program into
|
||||||
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
|
consider it more useful to permit linking proprietary applications with the
|
||||||
|
library. If this is what you want to do, use the GNU Library General
|
||||||
|
Public License instead of this License.
|
||||||
@@ -0,0 +1,674 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
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/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<https://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||||
@@ -0,0 +1,674 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
# nls.m4
|
||||||
|
# serial 7 (gettext-1.0)
|
||||||
|
dnl Copyright (C) 1995-2026 Free Software Foundation, Inc.
|
||||||
|
dnl This file is free software; the Free Software Foundation
|
||||||
|
dnl gives unlimited permission to copy and/or distribute it,
|
||||||
|
dnl with or without modifications, as long as this notice is preserved.
|
||||||
|
dnl This file is offered as-is, without any warranty.
|
||||||
|
dnl
|
||||||
|
dnl This file can be used in projects which are not available under
|
||||||
|
dnl the GNU General Public License or the GNU Lesser General Public
|
||||||
|
dnl License but which still want to provide support for the GNU gettext
|
||||||
|
dnl functionality.
|
||||||
|
dnl Please note that the actual code of the GNU gettext library is covered
|
||||||
|
dnl by the GNU Lesser General Public License, and the rest of the GNU
|
||||||
|
dnl gettext package is covered by the GNU General Public License.
|
||||||
|
dnl They are *not* in the public domain.
|
||||||
|
|
||||||
|
dnl From Ulrich Drepper, Bruno Haible.
|
||||||
|
|
||||||
|
AC_PREREQ([2.50])
|
||||||
|
|
||||||
|
AC_DEFUN([AM_NLS],
|
||||||
|
[
|
||||||
|
AC_MSG_CHECKING([whether NLS is requested])
|
||||||
|
dnl Default is enabled NLS
|
||||||
|
AC_ARG_ENABLE([nls],
|
||||||
|
[ --disable-nls do not use Native Language Support],
|
||||||
|
USE_NLS=$enableval, USE_NLS=yes)
|
||||||
|
AC_MSG_RESULT([$USE_NLS])
|
||||||
|
AC_SUBST([USE_NLS])
|
||||||
|
])
|
||||||
@@ -0,0 +1,148 @@
|
|||||||
|
<!-- Creator : groff version 1.22.3 -->
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||||
|
<meta name="Content-Style" content="text/css">
|
||||||
|
<style type="text/css">
|
||||||
|
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
||||||
|
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
||||||
|
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
||||||
|
h1 { text-align: center }
|
||||||
|
</style>
|
||||||
|
<title>AUTOPOINT</title>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1 align="center">AUTOPOINT</h1>
|
||||||
|
|
||||||
|
<a href="#NAME">NAME</a><br>
|
||||||
|
<a href="#SYNOPSIS">SYNOPSIS</a><br>
|
||||||
|
<a href="#DESCRIPTION">DESCRIPTION</a><br>
|
||||||
|
<a href="#OPTIONS">OPTIONS</a><br>
|
||||||
|
<a href="#AUTHOR">AUTHOR</a><br>
|
||||||
|
<a href="#REPORTING BUGS">REPORTING BUGS</a><br>
|
||||||
|
<a href="#COPYRIGHT">COPYRIGHT</a><br>
|
||||||
|
<a href="#SEE ALSO">SEE ALSO</a><br>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>NAME
|
||||||
|
<a name="NAME"></a>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">autopoint
|
||||||
|
- copies standard gettext infrastructure</p>
|
||||||
|
|
||||||
|
<h2>SYNOPSIS
|
||||||
|
<a name="SYNOPSIS"></a>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em"><b>autopoint</b>
|
||||||
|
[<i>OPTION</i>]...</p>
|
||||||
|
|
||||||
|
<h2>DESCRIPTION
|
||||||
|
<a name="DESCRIPTION"></a>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">Copies standard
|
||||||
|
gettext infrastructure files into a source package.</p>
|
||||||
|
|
||||||
|
<h2>OPTIONS
|
||||||
|
<a name="OPTIONS"></a>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<table width="100%" border="0" rules="none" frame="void"
|
||||||
|
cellspacing="0" cellpadding="0">
|
||||||
|
<tr valign="top" align="left">
|
||||||
|
<td width="11%"></td>
|
||||||
|
<td width="9%">
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-top: 1em"><b>--help</b></p></td>
|
||||||
|
<td width="2%"></td>
|
||||||
|
<td width="36%">
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-top: 1em">print this help and exit</p></td>
|
||||||
|
<td width="42%">
|
||||||
|
</td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%;"><b>--version</b></p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%;">print version information and
|
||||||
|
exit</p>
|
||||||
|
|
||||||
|
<p style="margin-left:11%;"><b>-f</b>,
|
||||||
|
<b>--force</b></p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%;">force overwriting of files that
|
||||||
|
already exist</p>
|
||||||
|
|
||||||
|
<p style="margin-left:11%;"><b>-n</b>,
|
||||||
|
<b>--dry-run</b></p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%;">print modifications but
|
||||||
|
don’t perform them</p>
|
||||||
|
|
||||||
|
<h2>AUTHOR
|
||||||
|
<a name="AUTHOR"></a>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">Written by
|
||||||
|
Bruno Haible.</p>
|
||||||
|
|
||||||
|
<h2>REPORTING BUGS
|
||||||
|
<a name="REPORTING BUGS"></a>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">Report bugs in
|
||||||
|
the bug tracker at
|
||||||
|
<https://savannah.gnu.org/projects/gettext> or by
|
||||||
|
email to <bug-gettext@gnu.org>.</p>
|
||||||
|
|
||||||
|
<h2>COPYRIGHT
|
||||||
|
<a name="COPYRIGHT"></a>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">Copyright
|
||||||
|
© 2002-2026 Free Software Foundation, Inc.
|
||||||
|
License GPLv3+: GNU GPL version 3 or later
|
||||||
|
<https://gnu.org/licenses/gpl.html> <br>
|
||||||
|
This is free software: you are free to change and
|
||||||
|
redistribute it. There is NO WARRANTY, to the extent
|
||||||
|
permitted by law.</p>
|
||||||
|
|
||||||
|
<h2>SEE ALSO
|
||||||
|
<a name="SEE ALSO"></a>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">The full
|
||||||
|
documentation for <b>autopoint</b> is maintained as a
|
||||||
|
Texinfo manual. If the <b>info</b> and <b>autopoint</b>
|
||||||
|
programs are properly installed at your site, the
|
||||||
|
command</p>
|
||||||
|
|
||||||
|
<p style="margin-left:22%; margin-top: 1em"><b>info
|
||||||
|
autopoint</b></p>
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">should give you
|
||||||
|
access to the complete manual.</p>
|
||||||
|
<hr>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,158 @@
|
|||||||
|
<!-- Creator : groff version 1.22.3 -->
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||||
|
<meta name="Content-Style" content="text/css">
|
||||||
|
<style type="text/css">
|
||||||
|
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
||||||
|
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
||||||
|
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
||||||
|
h1 { text-align: center }
|
||||||
|
</style>
|
||||||
|
<title>BIND_TEXTDOMAIN_CODESET</title>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1 align="center">BIND_TEXTDOMAIN_CODESET</h1>
|
||||||
|
|
||||||
|
<a href="#NAME">NAME</a><br>
|
||||||
|
<a href="#SYNOPSIS">SYNOPSIS</a><br>
|
||||||
|
<a href="#DESCRIPTION">DESCRIPTION</a><br>
|
||||||
|
<a href="#RETURN VALUE">RETURN VALUE</a><br>
|
||||||
|
<a href="#ERRORS">ERRORS</a><br>
|
||||||
|
<a href="#BUGS">BUGS</a><br>
|
||||||
|
<a href="#SEE ALSO">SEE ALSO</a><br>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>NAME
|
||||||
|
<a name="NAME"></a>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">bind_textdomain_codeset
|
||||||
|
- set encoding of message translations</p>
|
||||||
|
|
||||||
|
<h2>SYNOPSIS
|
||||||
|
<a name="SYNOPSIS"></a>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em"><b>#include
|
||||||
|
<libintl.h></b></p>
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em"><b>char *
|
||||||
|
bind_textdomain_codeset (const char *</b>
|
||||||
|
<i>domainname</i><b>, <br>
|
||||||
|
const char *</b> <i>codeset</i><b>);</b></p>
|
||||||
|
|
||||||
|
<h2>DESCRIPTION
|
||||||
|
<a name="DESCRIPTION"></a>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">The
|
||||||
|
<b>bind_textdomain_codeset</b> function sets the output
|
||||||
|
codeset for message catalogs for domain
|
||||||
|
<i>domainname</i>.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">A message
|
||||||
|
domain is a set of translatable <i>msgid</i> messages.
|
||||||
|
Usually, every software package has its own message
|
||||||
|
domain.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">By default, the
|
||||||
|
<b>gettext</b> family of functions returns translated
|
||||||
|
messages in the locale’s character encoding, which can
|
||||||
|
be retrieved as <b>nl_langinfo (CODESET)</b>. The need for
|
||||||
|
calling <b>bind_textdomain_codeset</b> arises for programs
|
||||||
|
which store strings in a locale independent way (e.g. UTF-8)
|
||||||
|
and want to avoid an extra character set conversion on the
|
||||||
|
returned translated messages.</p>
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em"><i>domainname</i>
|
||||||
|
must be a non-empty string.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">If
|
||||||
|
<i>codeset</i> is not NULL, it must be a valid encoding name
|
||||||
|
which can be used for the <b>iconv_open</b> function. The
|
||||||
|
<b>bind_textdomain_codeset</b> function sets the output
|
||||||
|
codeset for message catalogs belonging to domain
|
||||||
|
<i>domainname</i> to <i>codeset</i>. The function makes
|
||||||
|
copies of the argument strings as needed.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">If
|
||||||
|
<i>codeset</i> is NULL, the function returns the previously
|
||||||
|
set codeset for domain <i>domainname</i>. The default is
|
||||||
|
NULL, denoting the locale’s character encoding.</p>
|
||||||
|
|
||||||
|
<h2>RETURN VALUE
|
||||||
|
<a name="RETURN VALUE"></a>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">If successful,
|
||||||
|
the <b>bind_textdomain_codeset</b> function returns the
|
||||||
|
current codeset for domain <i>domainname</i>, after possibly
|
||||||
|
changing it. The resulting string is valid until the next
|
||||||
|
<b>bind_textdomain_codeset</b> call for the same
|
||||||
|
<i>domainname</i> and must not be modified or freed. If a
|
||||||
|
memory allocation failure occurs, it sets <b>errno</b> to
|
||||||
|
<b>ENOMEM</b> and returns NULL. If no codeset has been set
|
||||||
|
for domain <i>domainname</i>, it returns NULL.</p>
|
||||||
|
|
||||||
|
<h2>ERRORS
|
||||||
|
<a name="ERRORS"></a>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">The following
|
||||||
|
error can occur, among others:</p>
|
||||||
|
|
||||||
|
<table width="100%" border="0" rules="none" frame="void"
|
||||||
|
cellspacing="0" cellpadding="0">
|
||||||
|
<tr valign="top" align="left">
|
||||||
|
<td width="11%"></td>
|
||||||
|
<td width="9%">
|
||||||
|
|
||||||
|
|
||||||
|
<p><b>ENOMEM</b></p></td>
|
||||||
|
<td width="2%"></td>
|
||||||
|
<td width="43%">
|
||||||
|
|
||||||
|
|
||||||
|
<p>Not enough memory available.</p></td>
|
||||||
|
<td width="35%">
|
||||||
|
</td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h2>BUGS
|
||||||
|
<a name="BUGS"></a>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">The return type
|
||||||
|
ought to be <b>const char *</b>, but is <b>char *</b> to
|
||||||
|
avoid warnings in C code predating ANSI C.</p>
|
||||||
|
|
||||||
|
<h2>SEE ALSO
|
||||||
|
<a name="SEE ALSO"></a>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em"><b>gettext</b>(3),
|
||||||
|
<b>dgettext</b>(3), <b>dcgettext</b>(3), <b>ngettext</b>(3),
|
||||||
|
<b>dngettext</b>(3), <b>dcngettext</b>(3),
|
||||||
|
<b>textdomain</b>(3), <b>nl_langinfo</b>(3),
|
||||||
|
<b>iconv_open</b>(3)</p>
|
||||||
|
<hr>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,154 @@
|
|||||||
|
<!-- Creator : groff version 1.22.3 -->
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||||
|
<meta name="Content-Style" content="text/css">
|
||||||
|
<style type="text/css">
|
||||||
|
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
||||||
|
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
||||||
|
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
||||||
|
h1 { text-align: center }
|
||||||
|
</style>
|
||||||
|
<title>BINDTEXTDOMAIN</title>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1 align="center">BINDTEXTDOMAIN</h1>
|
||||||
|
|
||||||
|
<a href="#NAME">NAME</a><br>
|
||||||
|
<a href="#SYNOPSIS">SYNOPSIS</a><br>
|
||||||
|
<a href="#DESCRIPTION">DESCRIPTION</a><br>
|
||||||
|
<a href="#RETURN VALUE">RETURN VALUE</a><br>
|
||||||
|
<a href="#ERRORS">ERRORS</a><br>
|
||||||
|
<a href="#BUGS">BUGS</a><br>
|
||||||
|
<a href="#SEE ALSO">SEE ALSO</a><br>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>NAME
|
||||||
|
<a name="NAME"></a>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">bindtextdomain
|
||||||
|
- set directory containing message catalogs</p>
|
||||||
|
|
||||||
|
<h2>SYNOPSIS
|
||||||
|
<a name="SYNOPSIS"></a>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em"><b>#include
|
||||||
|
<libintl.h></b></p>
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em"><b>char *
|
||||||
|
bindtextdomain (const char *</b> <i>domainname</i><b>, const
|
||||||
|
char *</b> <i>dirname</i><b>);</b></p>
|
||||||
|
|
||||||
|
<h2>DESCRIPTION
|
||||||
|
<a name="DESCRIPTION"></a>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">The
|
||||||
|
<b>bindtextdomain</b> function sets the base directory of
|
||||||
|
the hierarchy containing message catalogs for a given
|
||||||
|
message domain.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">A message
|
||||||
|
domain is a set of translatable <i>msgid</i> messages.
|
||||||
|
Usually, every software package has its own message domain.
|
||||||
|
The need for calling <b>bindtextdomain</b> arises because
|
||||||
|
packages are not always installed with the same prefix as
|
||||||
|
the <libintl.h> header and the libc/libintl
|
||||||
|
libraries.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">Message
|
||||||
|
catalogs will be expected at the pathnames
|
||||||
|
<i>dirname</i>/<i>locale</i>/<i>category</i>/<i>domainname</i>.mo,
|
||||||
|
where <i>locale</i> is a locale name and <i>category</i> is
|
||||||
|
a locale facet such as <b>LC_MESSAGES</b>.</p>
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em"><i>domainname</i>
|
||||||
|
must be a non-empty string.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">If
|
||||||
|
<i>dirname</i> is not NULL, the base directory for message
|
||||||
|
catalogs belonging to domain <i>domainname</i> is set to
|
||||||
|
<i>dirname</i>. The function makes copies of the argument
|
||||||
|
strings as needed. If the program wishes to call the
|
||||||
|
<b>chdir</b> function, it is important that <i>dirname</i>
|
||||||
|
be an absolute pathname; otherwise it cannot be guaranteed
|
||||||
|
that the message catalogs will be found.</p>
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">If
|
||||||
|
<i>dirname</i> is NULL, the function returns the previously
|
||||||
|
set base directory for domain <i>domainname</i>.</p>
|
||||||
|
|
||||||
|
<h2>RETURN VALUE
|
||||||
|
<a name="RETURN VALUE"></a>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">If successful,
|
||||||
|
the <b>bindtextdomain</b> function returns the current base
|
||||||
|
directory for domain <i>domainname</i>, after possibly
|
||||||
|
changing it. The resulting string is valid until the next
|
||||||
|
<b>bindtextdomain</b> call for the same <i>domainname</i>
|
||||||
|
and must not be modified or freed. If a memory allocation
|
||||||
|
failure occurs, it sets <b>errno</b> to <b>ENOMEM</b> and
|
||||||
|
returns NULL.</p>
|
||||||
|
|
||||||
|
<h2>ERRORS
|
||||||
|
<a name="ERRORS"></a>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">The following
|
||||||
|
error can occur, among others:</p>
|
||||||
|
|
||||||
|
<table width="100%" border="0" rules="none" frame="void"
|
||||||
|
cellspacing="0" cellpadding="0">
|
||||||
|
<tr valign="top" align="left">
|
||||||
|
<td width="11%"></td>
|
||||||
|
<td width="9%">
|
||||||
|
|
||||||
|
|
||||||
|
<p><b>ENOMEM</b></p></td>
|
||||||
|
<td width="2%"></td>
|
||||||
|
<td width="43%">
|
||||||
|
|
||||||
|
|
||||||
|
<p>Not enough memory available.</p></td>
|
||||||
|
<td width="35%">
|
||||||
|
</td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h2>BUGS
|
||||||
|
<a name="BUGS"></a>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em">The return type
|
||||||
|
ought to be <b>const char *</b>, but is <b>char *</b> to
|
||||||
|
avoid warnings in C code predating ANSI C.</p>
|
||||||
|
|
||||||
|
<h2>SEE ALSO
|
||||||
|
<a name="SEE ALSO"></a>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<p style="margin-left:11%; margin-top: 1em"><b>gettext</b>(3),
|
||||||
|
<b>dgettext</b>(3), <b>dcgettext</b>(3), <b>ngettext</b>(3),
|
||||||
|
<b>dngettext</b>(3), <b>dcngettext</b>(3),
|
||||||
|
<b>textdomain</b>(3), <b>realpath</b>(3)</p>
|
||||||
|
<hr>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<HTML>
|
||||||
|
<BODY BGCOLOR="#FFFFFF">
|
||||||
|
<I>GNU.Gettext Namespace</I><P>
|
||||||
|
|
||||||
|
<A HREF="GNU_Gettext_GettextResourceManager.html" TARGET="contents">GettextResourceManager</A><BR>
|
||||||
|
<A HREF="GNU_Gettext_GettextResourceSet.html" TARGET="contents">GettextResourceSet</A><BR>
|
||||||
|
</BODY>
|
||||||
|
</HTML>
|
||||||
@@ -0,0 +1,305 @@
|
|||||||
|
<HTML>
|
||||||
|
<HEAD>
|
||||||
|
<TITLE>GNU.Gettext.GettextResourceManager Class</TITLE>
|
||||||
|
</HEAD>
|
||||||
|
<BODY BGCOLOR="#FFFFFF">
|
||||||
|
<H3>GNU.Gettext.GettextResourceManager Class</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<TABLE COLS="1" ROWS="1" WIDTH="100%">
|
||||||
|
<TR><TD BGCOLOR="#C0C0C0"><PRE>public class GettextResourceManager: System.Resources.ResourceManager</PRE></TD></TR>
|
||||||
|
</TABLE>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Base Types</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
System.Resources.ResourceManager<BR>
|
||||||
|
GettextResourceManager<P>
|
||||||
|
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Library</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
GNU.Gettext
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Summary</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
|
||||||
|
Each instance of this class can be used to lookup translations for a
|
||||||
|
given resource name. For each <CODE>CultureInfo</CODE>, it performs the lookup
|
||||||
|
in several assemblies, from most specific over territory-neutral to
|
||||||
|
language-neutral.
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>See Also</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<A HREF="GNU_Gettext.html" TARGET="members">GNU.Gettext Namespace</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Members</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<P>
|
||||||
|
|
||||||
|
GettextResourceManager Constructors<P>
|
||||||
|
|
||||||
|
<A HREF="#GettextResourceManager%28System.String%29%20Constructor" TARGET="contents">GettextResourceManager(System.String) Constructor</A><BR>
|
||||||
|
<A HREF="#GettextResourceManager%28System.String%2C%20System.Reflection.Assembly%29%20Constructor" TARGET="contents">GettextResourceManager(System.String, System.Reflection.Assembly) Constructor</A><BR>
|
||||||
|
<P>
|
||||||
|
|
||||||
|
GettextResourceManager Methods<P>
|
||||||
|
|
||||||
|
<A HREF="#GettextResourceManager.GetPluralString%28System.String%2C%20System.String%2C%20long%2C%20System.Globalization.CultureInfo%29%20Method" TARGET="contents">GettextResourceManager.GetPluralString(System.String, System.String, long, System.Globalization.CultureInfo) Method</A><BR>
|
||||||
|
<A HREF="#GettextResourceManager.GetPluralString%28System.String%2C%20System.String%2C%20long%29%20Method" TARGET="contents">GettextResourceManager.GetPluralString(System.String, System.String, long) Method</A><BR>
|
||||||
|
<A HREF="#GettextResourceManager.GetString%28System.String%2C%20System.Globalization.CultureInfo%29%20Method" TARGET="contents">GettextResourceManager.GetString(System.String, System.Globalization.CultureInfo) Method</A><BR>
|
||||||
|
<A HREF="#GettextResourceManager.GetString%28System.String%29%20Method" TARGET="contents">GettextResourceManager.GetString(System.String) Method</A><BR>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<HR>
|
||||||
|
|
||||||
|
<A NAME="GettextResourceManager%28System.String%29%20Constructor"><H3>GettextResourceManager(System.String) Constructor</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<TABLE COLS="1" ROWS="1" WIDTH="100%">
|
||||||
|
<TR><TD BGCOLOR="#C0C0C0"><PRE>public GettextResourceManager(System.String baseName);</PRE></TD></TR>
|
||||||
|
</TABLE>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Summary</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
|
||||||
|
Constructor.
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Parameters</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<DL>
|
||||||
|
<DT>baseName</DT>
|
||||||
|
<DD>the resource name, also the assembly base
|
||||||
|
name</DD>
|
||||||
|
</DL>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>See Also</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<A HREF="GNU_Gettext_GettextResourceManager.html" TARGET="contents">GNU.Gettext.GettextResourceManager Class</A>, <A HREF="GNU_Gettext.html" TARGET="members">GNU.Gettext Namespace</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<HR>
|
||||||
|
|
||||||
|
<A NAME="GettextResourceManager%28System.String%2C%20System.Reflection.Assembly%29%20Constructor"><H3>GettextResourceManager(System.String, System.Reflection.Assembly) Constructor</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<TABLE COLS="1" ROWS="1" WIDTH="100%">
|
||||||
|
<TR><TD BGCOLOR="#C0C0C0"><PRE>public GettextResourceManager(System.String baseName, System.Reflection.Assembly assembly);</PRE></TD></TR>
|
||||||
|
</TABLE>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Summary</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
|
||||||
|
Constructor.
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Parameters</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<DL>
|
||||||
|
<DT>baseName</DT>
|
||||||
|
<DD>the resource name, also the assembly base
|
||||||
|
name</DD>
|
||||||
|
</DL>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>See Also</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<A HREF="GNU_Gettext_GettextResourceManager.html" TARGET="contents">GNU.Gettext.GettextResourceManager Class</A>, <A HREF="GNU_Gettext.html" TARGET="members">GNU.Gettext Namespace</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<HR>
|
||||||
|
|
||||||
|
<A NAME="GettextResourceManager.GetPluralString%28System.String%2C%20System.String%2C%20long%2C%20System.Globalization.CultureInfo%29%20Method"><H3>GettextResourceManager.GetPluralString(System.String, System.String, long, System.Globalization.CultureInfo) Method</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<TABLE COLS="1" ROWS="1" WIDTH="100%">
|
||||||
|
<TR><TD BGCOLOR="#C0C0C0"><PRE>public virtual System.String GetPluralString(System.String msgid, System.String msgidPlural, long n, System.Globalization.CultureInfo culture);</PRE></TD></TR>
|
||||||
|
</TABLE>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Summary</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
|
||||||
|
Returns the translation of <I>msgid</I> and
|
||||||
|
<I>msgidPlural</I> in a given culture, choosing the right
|
||||||
|
plural form depending on the number <I>n</I>.
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Parameters</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<DL>
|
||||||
|
<DT>msgid</DT>
|
||||||
|
<DD>the key string to be translated, an ASCII
|
||||||
|
string</DD>
|
||||||
|
<DT>msgidPlural</DT>
|
||||||
|
<DD>the English plural of <I>msgid</I>,
|
||||||
|
an ASCII string</DD>
|
||||||
|
<DT>n</DT>
|
||||||
|
<DD>the number, should be >= 0</DD>
|
||||||
|
</DL>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Return Value</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
the translation, or <I>msgid</I> or
|
||||||
|
<I>msgidPlural</I> if none is found
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>See Also</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<A HREF="GNU_Gettext_GettextResourceManager.html" TARGET="contents">GNU.Gettext.GettextResourceManager Class</A>, <A HREF="GNU_Gettext.html" TARGET="members">GNU.Gettext Namespace</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<HR>
|
||||||
|
|
||||||
|
<A NAME="GettextResourceManager.GetPluralString%28System.String%2C%20System.String%2C%20long%29%20Method"><H3>GettextResourceManager.GetPluralString(System.String, System.String, long) Method</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<TABLE COLS="1" ROWS="1" WIDTH="100%">
|
||||||
|
<TR><TD BGCOLOR="#C0C0C0"><PRE>public virtual System.String GetPluralString(System.String msgid, System.String msgidPlural, long n);</PRE></TD></TR>
|
||||||
|
</TABLE>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Summary</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
|
||||||
|
Returns the translation of <I>msgid</I> and
|
||||||
|
<I>msgidPlural</I> in the current culture, choosing the
|
||||||
|
right plural form depending on the number <I>n</I>.
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Parameters</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<DL>
|
||||||
|
<DT>msgid</DT>
|
||||||
|
<DD>the key string to be translated, an ASCII
|
||||||
|
string</DD>
|
||||||
|
<DT>msgidPlural</DT>
|
||||||
|
<DD>the English plural of <I>msgid</I>,
|
||||||
|
an ASCII string</DD>
|
||||||
|
<DT>n</DT>
|
||||||
|
<DD>the number, should be >= 0</DD>
|
||||||
|
</DL>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Return Value</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
the translation, or <I>msgid</I> or
|
||||||
|
<I>msgidPlural</I> if none is found
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>See Also</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<A HREF="GNU_Gettext_GettextResourceManager.html" TARGET="contents">GNU.Gettext.GettextResourceManager Class</A>, <A HREF="GNU_Gettext.html" TARGET="members">GNU.Gettext Namespace</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<HR>
|
||||||
|
|
||||||
|
<A NAME="GettextResourceManager.GetString%28System.String%2C%20System.Globalization.CultureInfo%29%20Method"><H3>GettextResourceManager.GetString(System.String, System.Globalization.CultureInfo) Method</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<TABLE COLS="1" ROWS="1" WIDTH="100%">
|
||||||
|
<TR><TD BGCOLOR="#C0C0C0"><PRE>public override System.String GetString(System.String msgid, System.Globalization.CultureInfo culture);</PRE></TD></TR>
|
||||||
|
</TABLE>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Summary</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
|
||||||
|
Returns the translation of <I>msgid</I> in a given culture.
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Parameters</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<DL>
|
||||||
|
<DT>msgid</DT>
|
||||||
|
<DD>the key string to be translated, an ASCII
|
||||||
|
string</DD>
|
||||||
|
</DL>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Return Value</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
the translation of <I>msgid</I>, or
|
||||||
|
<I>msgid</I> if none is found
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>See Also</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<A HREF="GNU_Gettext_GettextResourceManager.html" TARGET="contents">GNU.Gettext.GettextResourceManager Class</A>, <A HREF="GNU_Gettext.html" TARGET="members">GNU.Gettext Namespace</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<HR>
|
||||||
|
|
||||||
|
<A NAME="GettextResourceManager.GetString%28System.String%29%20Method"><H3>GettextResourceManager.GetString(System.String) Method</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<TABLE COLS="1" ROWS="1" WIDTH="100%">
|
||||||
|
<TR><TD BGCOLOR="#C0C0C0"><PRE>public override System.String GetString(System.String msgid);</PRE></TD></TR>
|
||||||
|
</TABLE>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Summary</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
|
||||||
|
Returns the translation of <I>msgid</I> in the current
|
||||||
|
culture.
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Parameters</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<DL>
|
||||||
|
<DT>msgid</DT>
|
||||||
|
<DD>the key string to be translated, an ASCII
|
||||||
|
string</DD>
|
||||||
|
</DL>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Return Value</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
the translation of <I>msgid</I>, or
|
||||||
|
<I>msgid</I> if none is found
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>See Also</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<A HREF="GNU_Gettext_GettextResourceManager.html" TARGET="contents">GNU.Gettext.GettextResourceManager Class</A>, <A HREF="GNU_Gettext.html" TARGET="members">GNU.Gettext Namespace</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
</BODY>
|
||||||
|
</HTML>
|
||||||
@@ -0,0 +1,356 @@
|
|||||||
|
<HTML>
|
||||||
|
<HEAD>
|
||||||
|
<TITLE>GNU.Gettext.GettextResourceSet Class</TITLE>
|
||||||
|
</HEAD>
|
||||||
|
<BODY BGCOLOR="#FFFFFF">
|
||||||
|
<H3>GNU.Gettext.GettextResourceSet Class</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<TABLE COLS="1" ROWS="1" WIDTH="100%">
|
||||||
|
<TR><TD BGCOLOR="#C0C0C0"><PRE>public class GettextResourceSet: System.Resources.ResourceSet</PRE></TD></TR>
|
||||||
|
</TABLE>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Base Types</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
System.Resources.ResourceSet<BR>
|
||||||
|
GettextResourceSet<P>
|
||||||
|
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Library</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
GNU.Gettext
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Summary</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
|
||||||
|
Each instance of this class encapsulates a single PO file.
|
||||||
|
<P>
|
||||||
|
|
||||||
|
|
||||||
|
This API of this class is not meant to be used directly; use
|
||||||
|
<CODE>GettextResourceManager</CODE> instead.
|
||||||
|
<P>
|
||||||
|
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>See Also</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<A HREF="GNU_Gettext.html" TARGET="members">GNU.Gettext Namespace</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Members</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<P>
|
||||||
|
|
||||||
|
GettextResourceSet Constructors<P>
|
||||||
|
|
||||||
|
<A HREF="#GettextResourceSet%28%29%20Constructor" TARGET="contents">GettextResourceSet() Constructor</A><BR>
|
||||||
|
<A HREF="#GettextResourceSet%28System.Resources.IResourceReader%29%20Constructor" TARGET="contents">GettextResourceSet(System.Resources.IResourceReader) Constructor</A><BR>
|
||||||
|
<A HREF="#GettextResourceSet%28System.IO.Stream%29%20Constructor" TARGET="contents">GettextResourceSet(System.IO.Stream) Constructor</A><BR>
|
||||||
|
<A HREF="#GettextResourceSet%28System.String%29%20Constructor" TARGET="contents">GettextResourceSet(System.String) Constructor</A><BR>
|
||||||
|
<P>
|
||||||
|
|
||||||
|
GettextResourceSet Methods<P>
|
||||||
|
|
||||||
|
<A HREF="#GettextResourceSet.GetPluralString%20Method" TARGET="contents">GettextResourceSet.GetPluralString Method</A><BR>
|
||||||
|
<A HREF="#GettextResourceSet.GetString%28System.String%29%20Method" TARGET="contents">GettextResourceSet.GetString(System.String) Method</A><BR>
|
||||||
|
<A HREF="#GettextResourceSet.GetString%28System.String%2C%20bool%29%20Method" TARGET="contents">GettextResourceSet.GetString(System.String, bool) Method</A><BR>
|
||||||
|
<A HREF="#GettextResourceSet.PluralEval%20Method" TARGET="contents">GettextResourceSet.PluralEval Method</A><BR>
|
||||||
|
<P>
|
||||||
|
|
||||||
|
GettextResourceSet Properties<P>
|
||||||
|
|
||||||
|
<A HREF="#GettextResourceSet.Keys%20Property" TARGET="contents">GettextResourceSet.Keys Property</A><BR>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<HR>
|
||||||
|
|
||||||
|
<A NAME="GettextResourceSet%28%29%20Constructor"><H3>GettextResourceSet() Constructor</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<TABLE COLS="1" ROWS="1" WIDTH="100%">
|
||||||
|
<TR><TD BGCOLOR="#C0C0C0"><PRE>protected GettextResourceSet();</PRE></TD></TR>
|
||||||
|
</TABLE>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Summary</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
|
||||||
|
Creates a new message catalog. When using this constructor, you
|
||||||
|
must override the <CODE>ReadResources</CODE> method, in order to initialize
|
||||||
|
the <CODE>Table</CODE> property. The message catalog will support plural
|
||||||
|
forms only if the <CODE>ReadResources</CODE> method installs values of type
|
||||||
|
<CODE>String[]</CODE> and if the <CODE>PluralEval</CODE> method is overridden.
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>See Also</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<A HREF="GNU_Gettext_GettextResourceSet.html" TARGET="contents">GNU.Gettext.GettextResourceSet Class</A>, <A HREF="GNU_Gettext.html" TARGET="members">GNU.Gettext Namespace</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<HR>
|
||||||
|
|
||||||
|
<A NAME="GettextResourceSet%28System.Resources.IResourceReader%29%20Constructor"><H3>GettextResourceSet(System.Resources.IResourceReader) Constructor</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<TABLE COLS="1" ROWS="1" WIDTH="100%">
|
||||||
|
<TR><TD BGCOLOR="#C0C0C0"><PRE>public GettextResourceSet(System.Resources.IResourceReader reader);</PRE></TD></TR>
|
||||||
|
</TABLE>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Summary</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
|
||||||
|
Creates a new message catalog, by reading the string/value pairs from
|
||||||
|
the given <I>reader</I>. The message catalog will support
|
||||||
|
plural forms only if the reader can produce values of type
|
||||||
|
<CODE>String[]</CODE> and if the <CODE>PluralEval</CODE> method is overridden.
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>See Also</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<A HREF="GNU_Gettext_GettextResourceSet.html" TARGET="contents">GNU.Gettext.GettextResourceSet Class</A>, <A HREF="GNU_Gettext.html" TARGET="members">GNU.Gettext Namespace</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<HR>
|
||||||
|
|
||||||
|
<A NAME="GettextResourceSet%28System.IO.Stream%29%20Constructor"><H3>GettextResourceSet(System.IO.Stream) Constructor</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<TABLE COLS="1" ROWS="1" WIDTH="100%">
|
||||||
|
<TR><TD BGCOLOR="#C0C0C0"><PRE>public GettextResourceSet(System.IO.Stream stream);</PRE></TD></TR>
|
||||||
|
</TABLE>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Summary</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
|
||||||
|
Creates a new message catalog, by reading the string/value pairs from
|
||||||
|
the given <I>stream</I>, which should have the format of
|
||||||
|
a <CODE>.resources</CODE> file. The message catalog will not support plural
|
||||||
|
forms.
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>See Also</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<A HREF="GNU_Gettext_GettextResourceSet.html" TARGET="contents">GNU.Gettext.GettextResourceSet Class</A>, <A HREF="GNU_Gettext.html" TARGET="members">GNU.Gettext Namespace</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<HR>
|
||||||
|
|
||||||
|
<A NAME="GettextResourceSet%28System.String%29%20Constructor"><H3>GettextResourceSet(System.String) Constructor</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<TABLE COLS="1" ROWS="1" WIDTH="100%">
|
||||||
|
<TR><TD BGCOLOR="#C0C0C0"><PRE>public GettextResourceSet(System.String fileName);</PRE></TD></TR>
|
||||||
|
</TABLE>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Summary</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
|
||||||
|
Creates a new message catalog, by reading the string/value pairs from
|
||||||
|
the file with the given <I>fileName</I>. The file should
|
||||||
|
be in the format of a <CODE>.resources</CODE> file. The message catalog will
|
||||||
|
not support plural forms.
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>See Also</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<A HREF="GNU_Gettext_GettextResourceSet.html" TARGET="contents">GNU.Gettext.GettextResourceSet Class</A>, <A HREF="GNU_Gettext.html" TARGET="members">GNU.Gettext Namespace</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<HR>
|
||||||
|
|
||||||
|
<A NAME="GettextResourceSet.GetPluralString%20Method"><H3>GettextResourceSet.GetPluralString Method</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<TABLE COLS="1" ROWS="1" WIDTH="100%">
|
||||||
|
<TR><TD BGCOLOR="#C0C0C0"><PRE>public virtual System.String GetPluralString(System.String msgid, System.String msgidPlural, long n);</PRE></TD></TR>
|
||||||
|
</TABLE>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Summary</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
|
||||||
|
Returns the translation of <I>msgid</I> and
|
||||||
|
<I>msgidPlural</I>, choosing the right plural form
|
||||||
|
depending on the number <I>n</I>.
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Parameters</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<DL>
|
||||||
|
<DT>msgid</DT>
|
||||||
|
<DD>the key string to be translated, an ASCII
|
||||||
|
string</DD>
|
||||||
|
<DT>msgidPlural</DT>
|
||||||
|
<DD>the English plural of <I>msgid</I>,
|
||||||
|
an ASCII string</DD>
|
||||||
|
<DT>n</DT>
|
||||||
|
<DD>the number, should be >= 0</DD>
|
||||||
|
</DL>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Return Value</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
the translation, or <CODE>null</CODE> if none is found
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>See Also</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<A HREF="GNU_Gettext_GettextResourceSet.html" TARGET="contents">GNU.Gettext.GettextResourceSet Class</A>, <A HREF="GNU_Gettext.html" TARGET="members">GNU.Gettext Namespace</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<HR>
|
||||||
|
|
||||||
|
<A NAME="GettextResourceSet.GetString%28System.String%29%20Method"><H3>GettextResourceSet.GetString(System.String) Method</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<TABLE COLS="1" ROWS="1" WIDTH="100%">
|
||||||
|
<TR><TD BGCOLOR="#C0C0C0"><PRE>public override System.String GetString(System.String msgid);</PRE></TD></TR>
|
||||||
|
</TABLE>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Summary</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
|
||||||
|
Returns the translation of <I>msgid</I>.
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Parameters</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<DL>
|
||||||
|
<DT>msgid</DT>
|
||||||
|
<DD>the key string to be translated, an ASCII
|
||||||
|
string</DD>
|
||||||
|
</DL>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Return Value</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
the translation of <I>msgid</I>, or <CODE>null</CODE> if
|
||||||
|
none is found
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>See Also</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<A HREF="GNU_Gettext_GettextResourceSet.html" TARGET="contents">GNU.Gettext.GettextResourceSet Class</A>, <A HREF="GNU_Gettext.html" TARGET="members">GNU.Gettext Namespace</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<HR>
|
||||||
|
|
||||||
|
<A NAME="GettextResourceSet.GetString%28System.String%2C%20bool%29%20Method"><H3>GettextResourceSet.GetString(System.String, bool) Method</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<TABLE COLS="1" ROWS="1" WIDTH="100%">
|
||||||
|
<TR><TD BGCOLOR="#C0C0C0"><PRE>public override System.String GetString(System.String msgid, bool ignoreCase);</PRE></TD></TR>
|
||||||
|
</TABLE>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Summary</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
|
||||||
|
Returns the translation of <I>msgid</I>, with possibly
|
||||||
|
case-insensitive lookup.
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Parameters</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<DL>
|
||||||
|
<DT>msgid</DT>
|
||||||
|
<DD>the key string to be translated, an ASCII
|
||||||
|
string</DD>
|
||||||
|
</DL>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Return Value</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
the translation of <I>msgid</I>, or <CODE>null</CODE> if
|
||||||
|
none is found
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>See Also</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<A HREF="GNU_Gettext_GettextResourceSet.html" TARGET="contents">GNU.Gettext.GettextResourceSet Class</A>, <A HREF="GNU_Gettext.html" TARGET="members">GNU.Gettext Namespace</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<HR>
|
||||||
|
|
||||||
|
<A NAME="GettextResourceSet.PluralEval%20Method"><H3>GettextResourceSet.PluralEval Method</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<TABLE COLS="1" ROWS="1" WIDTH="100%">
|
||||||
|
<TR><TD BGCOLOR="#C0C0C0"><PRE>protected virtual long PluralEval(long n);</PRE></TD></TR>
|
||||||
|
</TABLE>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Summary</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
|
||||||
|
Returns the index of the plural form to be chosen for a given number.
|
||||||
|
The default implementation is the Germanic plural formula:
|
||||||
|
zero for <I>n</I> == 1, one for <I>n</I> != 1.
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>See Also</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<A HREF="GNU_Gettext_GettextResourceSet.html" TARGET="contents">GNU.Gettext.GettextResourceSet Class</A>, <A HREF="GNU_Gettext.html" TARGET="members">GNU.Gettext Namespace</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<HR>
|
||||||
|
|
||||||
|
<A NAME="GettextResourceSet.Keys%20Property"><H3>GettextResourceSet.Keys Property</H3>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<TABLE COLS="1" ROWS="1" WIDTH="100%">
|
||||||
|
<TR><TD BGCOLOR="#C0C0C0"><PRE>public virtual System.Collections.ICollection Keys { get; }</PRE></TD></TR>
|
||||||
|
</TABLE>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>Summary</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
|
||||||
|
Returns the keys of this resource set, i.e. the strings for which
|
||||||
|
<CODE>GetObject()</CODE> can return a non-null value.
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
<H4>See Also</H4>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<A HREF="GNU_Gettext_GettextResourceSet.html" TARGET="contents">GNU.Gettext.GettextResourceSet Class</A>, <A HREF="GNU_Gettext.html" TARGET="members">GNU.Gettext Namespace</A>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
</BODY>
|
||||||
|
</HTML>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<HTML>
|
||||||
|
<HEAD><TITLE>-</TITLE></HEAD>
|
||||||
|
<BODY BGCOLOR="#FFFFFF">
|
||||||
|
<H1>-</H1>
|
||||||
|
|
||||||
|
<BLOCKQUOTE>
|
||||||
|
<A HREF="GNU_Gettext.html" TARGET="members">GNU.Gettext Namespace</A><BR>
|
||||||
|
</BLOCKQUOTE>
|
||||||
|
|
||||||
|
</BODY>
|
||||||
|
</HTML>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<HTML>
|
||||||
|
<HEAD><TITLE>-</TITLE></HEAD>
|
||||||
|
<FRAMESET COLS="150,*">
|
||||||
|
<FRAMESET ROWS="50%,50%">
|
||||||
|
<FRAME SRC="namespaces.html" NAME="namespaces">
|
||||||
|
<FRAME SRC="GNU_Gettext.html" NAME="members">
|
||||||
|
</FRAMESET>
|
||||||
|
<FRAME SRC="begin.html" NAME="contents">
|
||||||
|
</FRAMESET>
|
||||||
|
</HTML>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<HTML>
|
||||||
|
<BODY BGCOLOR="#FFFFFF">
|
||||||
|
<I>Namespaces</I><P>
|
||||||
|
<A HREF="GNU_Gettext.html" TARGET="members">GNU.Gettext</A><BR>
|
||||||
|
</BODY>
|
||||||
|
</HTML>
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
This directory contains simple examples of the use of GNU gettext.
|
||||||
|
Each example is a simple "hello world" program with a very small message
|
||||||
|
catalog, written in a particular programming language for a particular
|
||||||
|
environment.
|
||||||
|
|
||||||
|
Example Language GUI Environment
|
||||||
|
|
||||||
|
hello-c C
|
||||||
|
hello-c-gnome2 C GNOME 2 (obsolete)
|
||||||
|
hello-c-gnome3 C GNOME 3.10 or later
|
||||||
|
hello-c-http C web browser
|
||||||
|
hello-c++ C++
|
||||||
|
hello-c++20 C++ 20
|
||||||
|
hello-c++-qt C++ Qt
|
||||||
|
hello-c++-kde C++ KDE
|
||||||
|
hello-c++-gnome2 C++ GNOME 2 (obsolete)
|
||||||
|
hello-c++-gnome3 C++ GNOME 3.10 or later
|
||||||
|
hello-c++-wxwidgets C++ wxWidgets
|
||||||
|
hello-objc ObjectiveC
|
||||||
|
hello-objc-gnustep ObjectiveC GNUstep
|
||||||
|
hello-objc-gnome2 ObjectiveC GNOME 2 (obsolete)
|
||||||
|
hello-python Python
|
||||||
|
hello-java Java
|
||||||
|
hello-java-awt Java AWT
|
||||||
|
hello-java-swing Java Swing
|
||||||
|
hello-java-qtjambi Java Qt
|
||||||
|
hello-csharp C#
|
||||||
|
hello-csharp-forms C# Forms
|
||||||
|
hello-guile Scheme
|
||||||
|
hello-clisp Lisp
|
||||||
|
hello-librep librep
|
||||||
|
hello-rust Rust
|
||||||
|
hello-go Go
|
||||||
|
hello-go-http Go web browser
|
||||||
|
hello-ruby Ruby
|
||||||
|
hello-sh Shell
|
||||||
|
hello-gawk awk
|
||||||
|
hello-pascal Pascal
|
||||||
|
hello-modula2 Modula-2
|
||||||
|
hello-d D
|
||||||
|
hello-ocaml OCaml
|
||||||
|
hello-smalltalk Smalltalk
|
||||||
|
hello-tcl Tcl
|
||||||
|
hello-tcl-tk Tcl Tk
|
||||||
|
hello-perl Perl
|
||||||
|
hello-php PHP
|
||||||
|
hello-ycp YCP libyui
|
||||||
|
|
||||||
|
Before building an example, you need to
|
||||||
|
1. Build and install the GNU gettext package, as described in the INSTALL
|
||||||
|
file.
|
||||||
|
2. cd to the example and do
|
||||||
|
./autogen.sh
|
||||||
|
3. Then you can build the example as usual:
|
||||||
|
./configure --prefix=/some/prefix
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
and see it work by executing
|
||||||
|
/some/prefix/bin/hello
|
||||||
|
|
||||||
|
The po/ directories of the examples use different binary catalog formats and
|
||||||
|
Makefile types:
|
||||||
|
|
||||||
|
Example Binary catalog format Makefile type
|
||||||
|
|
||||||
|
hello-c .gmo Makefile.in.in
|
||||||
|
hello-c-gnome2 .gmo Makefile.in.in
|
||||||
|
hello-c-gnome3 .gmo Makefile.in.in
|
||||||
|
hello-c-http .gmo Makefile.in.in
|
||||||
|
hello-c++ .gmo Makefile.in.in
|
||||||
|
hello-c++20 .gmo Makefile.in.in
|
||||||
|
hello-c++-kde .gmo Makefile.in.in
|
||||||
|
hello-c++-gnome2 .gmo Makefile.in.in
|
||||||
|
hello-c++-gnome3 .gmo Makefile.in.in
|
||||||
|
hello-objc .gmo Makefile.in.in
|
||||||
|
hello-objc-gnome2 .gmo Makefile.in.in
|
||||||
|
hello-c++-wxwidgets .gmo Makefile.am
|
||||||
|
hello-python .gmo Makefile.am
|
||||||
|
hello-guile .gmo Makefile.am
|
||||||
|
hello-clisp .gmo Makefile.am
|
||||||
|
hello-librep .gmo Makefile.am
|
||||||
|
hello-rust .gmo Makefile.am
|
||||||
|
hello-go .gmo Makefile.am
|
||||||
|
hello-go-http .gmo Makefile.am
|
||||||
|
hello-ruby .gmo Makefile.am
|
||||||
|
hello-sh .gmo Makefile.am
|
||||||
|
hello-gawk .gmo Makefile.am
|
||||||
|
hello-pascal .gmo Makefile.am
|
||||||
|
hello-modula2 .gmo Makefile.am
|
||||||
|
hello-d .gmo Makefile.am
|
||||||
|
hello-ocaml .gmo Makefile.am
|
||||||
|
hello-smalltalk .gmo Makefile.am
|
||||||
|
hello-perl .gmo Makefile.am
|
||||||
|
hello-php .gmo Makefile.am
|
||||||
|
hello-ycp .gmo Makefile.am
|
||||||
|
hello-java .properties Makefile.am
|
||||||
|
hello-java-awt .properties Makefile.am
|
||||||
|
hello-java-swing .properties Makefile.am
|
||||||
|
hello-java-qtjambi .properties Makefile.am
|
||||||
|
hello-csharp .resources.dll Makefile.am
|
||||||
|
hello-csharp-forms .resources.dll Makefile.am
|
||||||
|
hello-tcl .msg Makefile.am
|
||||||
|
hello-tcl-tk .msg Makefile.am
|
||||||
|
hello-c++-qt .qm Makefile.am
|
||||||
|
hello-objc-gnustep .strings GNUmakefile
|
||||||
|
|
||||||
|
The Makefiles in the po/ directories make use of the variable assignment
|
||||||
|
operator != standardized by POSIX:2024
|
||||||
|
<https://pubs.opengroup.org/onlinepubs/9799919799/utilities/make.html>.
|
||||||
|
They thus require a 'make' implementation that supports this operator !=.
|
||||||
|
As of 2024, these are: GNU make >= 4.0, FreeBSD make, NetBSD make,
|
||||||
|
OpenBSD make. This means that building on specific platforms requires
|
||||||
|
use of GNU make:
|
||||||
|
- On macOS, use /opt/homebrew/bin/gmake.
|
||||||
|
- On Solaris 11 OpenIndiana, use /usr/bin/gmake = /usr/gnu/bin/make.
|
||||||
|
- On Solaris 11.4, install GNU make yourself.
|
||||||
|
- On AIX, use /opt/freeware/bin/make.
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
# csharp.m4
|
||||||
|
# serial 5
|
||||||
|
dnl Copyright (C) 2004-2005, 2009-2026 Free Software Foundation, Inc.
|
||||||
|
dnl This file is free software; the Free Software Foundation
|
||||||
|
dnl gives unlimited permission to copy and/or distribute it,
|
||||||
|
dnl with or without modifications, as long as this notice is preserved.
|
||||||
|
dnl This file is offered as-is, without any warranty.
|
||||||
|
|
||||||
|
# Sets CSHARP_CHOICE to the preferred C# implementation:
|
||||||
|
# 'mono' or 'dotnet' or 'any' or 'no'.
|
||||||
|
# Here
|
||||||
|
# - 'mono' means <https://en.wikipedia.org/wiki/Mono_(software)>.
|
||||||
|
# - 'dotnet' means the (newer) .NET <https://en.wikipedia.org/wiki/.NET>,
|
||||||
|
# *not* the .NET framework <https://en.wikipedia.org/wiki/.NET_Framework>.
|
||||||
|
AC_DEFUN([gt_CSHARP_CHOICE],
|
||||||
|
[
|
||||||
|
AC_MSG_CHECKING([for preferred C[#] implementation])
|
||||||
|
AC_ARG_ENABLE([csharp],
|
||||||
|
[ --enable-csharp[[=IMPL]] choose preferred C[#] implementation (mono, dotnet)],
|
||||||
|
[CSHARP_CHOICE="$enableval"],
|
||||||
|
CSHARP_CHOICE=any)
|
||||||
|
AC_SUBST([CSHARP_CHOICE])
|
||||||
|
AC_MSG_RESULT([$CSHARP_CHOICE])
|
||||||
|
case "$CSHARP_CHOICE" in
|
||||||
|
mono)
|
||||||
|
AC_DEFINE([CSHARP_CHOICE_MONO], [1],
|
||||||
|
[Define if mono is the preferred C# implementation.])
|
||||||
|
;;
|
||||||
|
dotnet)
|
||||||
|
AC_DEFINE([CSHARP_CHOICE_DOTNET], [1],
|
||||||
|
[Define if dotnet is the preferred C# implementation.])
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
])
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
# csharpcomp.m4
|
||||||
|
# serial 11
|
||||||
|
dnl Copyright (C) 2003-2005, 2007, 2009-2026 Free Software Foundation, Inc.
|
||||||
|
dnl This file is free software; the Free Software Foundation
|
||||||
|
dnl gives unlimited permission to copy and/or distribute it,
|
||||||
|
dnl with or without modifications, as long as this notice is preserved.
|
||||||
|
dnl This file is offered as-is, without any warranty.
|
||||||
|
|
||||||
|
# Prerequisites of csharpcomp.sh.
|
||||||
|
# Checks for a C# compiler.
|
||||||
|
# Sets at most one of HAVE_MCS, HAVE_DOTNET_SDK, HAVE_DOTNET_CSC, HAVE_CSC.
|
||||||
|
# Sets HAVE_CSHARPCOMP to nonempty if csharpcomp.sh will work.
|
||||||
|
# Also sets CSHARPCOMPFLAGS.
|
||||||
|
AC_DEFUN([gt_CSHARPCOMP],
|
||||||
|
[
|
||||||
|
AC_REQUIRE([gt_CSHARP_CHOICE])
|
||||||
|
AC_MSG_CHECKING([for C[#] compiler])
|
||||||
|
HAVE_CSHARPCOMP=1
|
||||||
|
pushdef([AC_MSG_CHECKING],[:])dnl
|
||||||
|
pushdef([AC_CHECKING],[:])dnl
|
||||||
|
pushdef([AC_MSG_RESULT],[:])dnl
|
||||||
|
AC_CHECK_PROG([HAVE_MCS_IN_PATH], [mcs], [yes])
|
||||||
|
AC_CHECK_PROG([HAVE_DOTNET_IN_PATH], [dotnet], [yes])
|
||||||
|
AC_CHECK_PROG([HAVE_CSC_IN_PATH], [csc], [yes])
|
||||||
|
popdef([AC_MSG_RESULT])dnl
|
||||||
|
popdef([AC_CHECKING])dnl
|
||||||
|
popdef([AC_MSG_CHECKING])dnl
|
||||||
|
for impl in "$CSHARP_CHOICE" mono dotnet sscli no; do
|
||||||
|
case "$impl" in
|
||||||
|
mono)
|
||||||
|
if test -n "$HAVE_MCS_IN_PATH" \
|
||||||
|
&& mcs --version >/dev/null 2>/dev/null \
|
||||||
|
&& mcs --version 2>/dev/null | grep Mono >/dev/null; then
|
||||||
|
HAVE_MCS=1
|
||||||
|
ac_result="mcs"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
dotnet)
|
||||||
|
# The dotnet compiler is called "Roslyn".
|
||||||
|
# <https://en.wikipedia.org/wiki/Roslyn_(compiler)>
|
||||||
|
# There are two situations:
|
||||||
|
# - A dotnet SDK, that contains a 'dotnet' program and the Roslyn
|
||||||
|
# compiler as csc.dll.
|
||||||
|
# - An MSVC installation, that contains the Roslyn compiler as csc.exe
|
||||||
|
# (e.g. in C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\csc.exe).
|
||||||
|
# In the first case, the user only has to make sure that 'dotnet' is
|
||||||
|
# found in $PATH.
|
||||||
|
# In the second case, they need to make sure that both 'dotnet' and
|
||||||
|
# 'csc' are found in $PATH.
|
||||||
|
if test -n "$HAVE_DOTNET_IN_PATH" \
|
||||||
|
&& dotnet --list-runtimes >/dev/null 2>/dev/null \
|
||||||
|
&& test -n "`dotnet --list-sdks 2>/dev/null`"; then
|
||||||
|
HAVE_DOTNET_SDK=1
|
||||||
|
ac_result="dotnet"
|
||||||
|
break
|
||||||
|
else
|
||||||
|
if test -n "$HAVE_CSC_IN_PATH" \
|
||||||
|
&& csc -help 2>/dev/null | grep analyzer >/dev/null \
|
||||||
|
&& { if csc -help 2>/dev/null | grep -i chicken > /dev/null; then false; else true; fi; }; then
|
||||||
|
HAVE_DOTNET_CSC=1
|
||||||
|
ac_result="dotnet"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
sscli)
|
||||||
|
if test -n "$HAVE_CSC_IN_PATH" \
|
||||||
|
&& csc -help >/dev/null 2>/dev/null \
|
||||||
|
&& { if csc -help 2>/dev/null | grep -i chicken > /dev/null; then false; else true; fi; }; then
|
||||||
|
HAVE_CSC=1
|
||||||
|
ac_result="csc"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
no)
|
||||||
|
HAVE_CSHARPCOMP=
|
||||||
|
ac_result="no"
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
AC_MSG_RESULT([$ac_result])
|
||||||
|
AC_SUBST([HAVE_MCS])
|
||||||
|
AC_SUBST([HAVE_DOTNET_SDK])
|
||||||
|
AC_SUBST([HAVE_DOTNET_CSC])
|
||||||
|
AC_SUBST([HAVE_CSC])
|
||||||
|
dnl Provide a default for CSHARPCOMPFLAGS.
|
||||||
|
if test -z "${CSHARPCOMPFLAGS+set}"; then
|
||||||
|
CSHARPCOMPFLAGS="-O -g"
|
||||||
|
fi
|
||||||
|
AC_SUBST([CSHARPCOMPFLAGS])
|
||||||
|
])
|
||||||
@@ -0,0 +1,247 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Compile a C# program.
|
||||||
|
|
||||||
|
# Copyright (C) 2003-2026 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/>.
|
||||||
|
|
||||||
|
# This uses the same choices as csharpcomp.c, but instead of relying on the
|
||||||
|
# environment settings at run time, it uses the environment variables
|
||||||
|
# present at configuration time.
|
||||||
|
#
|
||||||
|
# This is a separate shell script, because the various C# compilers have
|
||||||
|
# different command line options.
|
||||||
|
#
|
||||||
|
# Usage: /bin/sh csharpcomp.sh [OPTION] SOURCE.cs ... RES.resource ...
|
||||||
|
# Options:
|
||||||
|
# -o PROGRAM.exe or -o LIBRARY.dll
|
||||||
|
# set the output assembly name
|
||||||
|
# -L DIRECTORY search for C# libraries also in DIRECTORY
|
||||||
|
# -l LIBRARY reference the C# library LIBRARY.dll
|
||||||
|
# -O optimize
|
||||||
|
# -g generate debugging information
|
||||||
|
|
||||||
|
# func_tmpdir
|
||||||
|
# creates a temporary directory.
|
||||||
|
# Sets variable
|
||||||
|
# - tmp pathname of freshly created temporary directory
|
||||||
|
func_tmpdir ()
|
||||||
|
{
|
||||||
|
# Use the environment variable TMPDIR, falling back to /tmp. This allows
|
||||||
|
# users to specify a different temporary directory, for example, if their
|
||||||
|
# /tmp is filled up or too small.
|
||||||
|
: "${TMPDIR=/tmp}"
|
||||||
|
{
|
||||||
|
# Use the mktemp program if available. If not available, hide the error
|
||||||
|
# message.
|
||||||
|
tmp=`(umask 077 && mktemp -d -q "$TMPDIR/gtXXXXXX") 2>/dev/null` &&
|
||||||
|
test -n "$tmp" && test -d "$tmp"
|
||||||
|
} ||
|
||||||
|
{
|
||||||
|
# Use a simple mkdir command. It is guaranteed to fail if the directory
|
||||||
|
# already exists. $RANDOM is bash specific and expands to empty in shells
|
||||||
|
# other than bash, ksh and zsh. Its use does not increase security;
|
||||||
|
# rather, it minimizes the probability of failure in a very cluttered /tmp
|
||||||
|
# directory.
|
||||||
|
tmp=$TMPDIR/gt$$-$RANDOM
|
||||||
|
(umask 077 && mkdir "$tmp")
|
||||||
|
} ||
|
||||||
|
{
|
||||||
|
echo "$0: cannot create a temporary directory in $TMPDIR" >&2
|
||||||
|
{ (exit 1); exit 1; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# In order to construct a command that invokes csc, we need 'eval', because
|
||||||
|
# some of the arguments may contain spaces.
|
||||||
|
command_for_print=
|
||||||
|
command_for_eval=
|
||||||
|
options_csc_for_print=
|
||||||
|
options_csc_for_eval=
|
||||||
|
sources_csc_for_print=
|
||||||
|
sources_csc_for_eval=
|
||||||
|
# Protecting special characters, hiding them from 'eval':
|
||||||
|
# Double each backslash.
|
||||||
|
sed_protect_1='s/\\/\\\\/g'
|
||||||
|
# Escape each dollar, backquote, double-quote.
|
||||||
|
sed_protect_2a='s/\$/\\$/g'
|
||||||
|
sed_protect_2b='s/`/\\`/g'
|
||||||
|
sed_protect_2c='s/"/\\"/g'
|
||||||
|
# Add double-quotes at the beginning and end of the word.
|
||||||
|
sed_protect_3a='1s/^/"/'
|
||||||
|
sed_protect_3b='$s/$/"/'
|
||||||
|
func_add_word_to_command ()
|
||||||
|
{
|
||||||
|
command_for_print="${command_for_print:+$command_for_print }$1"
|
||||||
|
word_protected=`echo "$1" | sed -e "$sed_protect_1" -e "$sed_protect_2a" -e "$sed_protect_2b" -e "$sed_protect_2c" -e "$sed_protect_3a" -e "$sed_protect_3b"`
|
||||||
|
command_for_eval="${command_for_eval:+$command_for_eval }$word_protected"
|
||||||
|
}
|
||||||
|
func_add_word_to_options_csc ()
|
||||||
|
{
|
||||||
|
options_csc_for_print="${options_csc_for_print:+$options_csc_for_print }$1"
|
||||||
|
word_protected=`echo "$1" | sed -e "$sed_protect_1" -e "$sed_protect_2a" -e "$sed_protect_2b" -e "$sed_protect_2c" -e "$sed_protect_3a" -e "$sed_protect_3b"`
|
||||||
|
options_csc_for_eval="${options_csc_for_eval:+$options_csc_for_eval }$word_protected"
|
||||||
|
}
|
||||||
|
func_add_word_to_sources_csc ()
|
||||||
|
{
|
||||||
|
sources_csc_for_print="${sources_csc_for_print:+$sources_csc_for_print }$1"
|
||||||
|
word_protected=`echo "$1" | sed -e "$sed_protect_1" -e "$sed_protect_2a" -e "$sed_protect_2b" -e "$sed_protect_2c" -e "$sed_protect_3a" -e "$sed_protect_3b"`
|
||||||
|
sources_csc_for_eval="${sources_csc_for_eval:+$sources_csc_for_eval }$word_protected"
|
||||||
|
}
|
||||||
|
|
||||||
|
sed_quote_subst='s/\([|&;<>()$`"'"'"'*?[#~=% \\]\)/\\\1/g'
|
||||||
|
|
||||||
|
options_mcs=
|
||||||
|
sources=
|
||||||
|
func_add_word_to_options_csc "-nologo"
|
||||||
|
while test $# != 0; do
|
||||||
|
case "$1" in
|
||||||
|
-o)
|
||||||
|
case "$2" in
|
||||||
|
*.dll)
|
||||||
|
options_mcs="$options_mcs -target:library"
|
||||||
|
func_add_word_to_options_csc "-target:library"
|
||||||
|
;;
|
||||||
|
*.exe)
|
||||||
|
func_add_word_to_options_csc "-target:exe"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
options_mcs="$options_mcs -out:"`echo "$2" | sed -e "$sed_quote_subst"`
|
||||||
|
# On Windows, assume that 'dotnet' and 'csc' are native Windows programs,
|
||||||
|
# not Cygwin programs.
|
||||||
|
arg="$2"
|
||||||
|
case "@build_os@" in
|
||||||
|
cygwin*)
|
||||||
|
arg=`cygpath -w "$arg"`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
func_add_word_to_options_csc "-out:$arg"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-L)
|
||||||
|
options_mcs="$options_mcs -lib:"`echo "$2" | sed -e "$sed_quote_subst"`
|
||||||
|
# On Windows, assume that 'dotnet' and 'csc' are native Windows programs,
|
||||||
|
# not Cygwin programs.
|
||||||
|
arg="$2"
|
||||||
|
case "@build_os@" in
|
||||||
|
cygwin*)
|
||||||
|
arg=`cygpath -w "$arg"`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
func_add_word_to_options_csc "-lib:$arg"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-l)
|
||||||
|
options_mcs="$options_mcs -reference:"`echo "$2" | sed -e "$sed_quote_subst"`
|
||||||
|
func_add_word_to_options_csc "-reference:$2.dll"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-O)
|
||||||
|
func_add_word_to_options_csc "-optimize+"
|
||||||
|
;;
|
||||||
|
-g)
|
||||||
|
options_mcs="$options_mcs -debug"
|
||||||
|
func_add_word_to_options_csc "-debug+"
|
||||||
|
;;
|
||||||
|
-*)
|
||||||
|
echo "csharpcomp: unknown option '$1'" 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
*.resources)
|
||||||
|
options_mcs="$options_mcs -resource:"`echo "$1" | sed -e "$sed_quote_subst"`
|
||||||
|
# On Windows, assume that 'dotnet' and 'csc' are native Windows programs,
|
||||||
|
# not Cygwin programs.
|
||||||
|
arg="$1"
|
||||||
|
case "@build_os@" in
|
||||||
|
cygwin*)
|
||||||
|
arg=`cygpath -w "$arg"`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
func_add_word_to_options_csc "-resource:$arg"
|
||||||
|
;;
|
||||||
|
*.cs)
|
||||||
|
sources="$sources "`echo "$1" | sed -e "$sed_quote_subst"`
|
||||||
|
# On Windows, assume that 'dotnet' and 'csc' are native Windows programs,
|
||||||
|
# not Cygwin programs.
|
||||||
|
arg="$1"
|
||||||
|
case "@build_os@" in
|
||||||
|
cygwin*)
|
||||||
|
arg=`cygpath -w "$arg"`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
func_add_word_to_sources_csc "$arg"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "csharpcomp: unknown type of argument '$1'" 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if test -n "@HAVE_MCS@"; then
|
||||||
|
# mcs prints it errors and warnings to stdout, not stderr. Furthermore it
|
||||||
|
# adds a useless line "Compilation succeeded..." at the end. Correct both.
|
||||||
|
sed_drop_success_line='${
|
||||||
|
/^Compilation succeeded/d
|
||||||
|
}'
|
||||||
|
func_tmpdir
|
||||||
|
trap 'rm -rf "$tmp"' HUP INT QUIT TERM
|
||||||
|
test -z "$CSHARP_VERBOSE" || echo mcs $options_mcs $sources 1>&2
|
||||||
|
mcs $options_mcs $sources > "$tmp"/mcs.err
|
||||||
|
result=$?
|
||||||
|
sed -e "$sed_drop_success_line" < "$tmp"/mcs.err >&2
|
||||||
|
rm -rf "$tmp"
|
||||||
|
exit $result
|
||||||
|
else
|
||||||
|
if test -n "@HAVE_DOTNET_SDK@"; then
|
||||||
|
dotnet_runtime_dir=`dotnet --list-runtimes | sed -n -e 's/Microsoft.NETCore.App \([^ ]*\) \[\(.*\)\].*/\2\/\1/p' | sed -e 1q`
|
||||||
|
dotnet_sdk_dir=`dotnet --list-sdks | sed -e 's/\([^ ]*\) \[\(.*\)\].*/\2\/\1/p' | sed -e 1q`
|
||||||
|
# Add -lib and -reference options, so that the compiler finds Object, Console, String, etc.
|
||||||
|
arg="$dotnet_runtime_dir"
|
||||||
|
case "@build_os@" in
|
||||||
|
cygwin*)
|
||||||
|
arg=`cygpath -w "$arg"`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
func_add_word_to_options_csc "-lib:$arg"
|
||||||
|
for file in `cd "$dotnet_runtime_dir" && echo [ABCDEFGHIJKLMNOPQRSTUVWXYZ]*.dll`; do
|
||||||
|
case "$file" in
|
||||||
|
*.Native.*) ;;
|
||||||
|
*) func_add_word_to_options_csc "-reference:$file" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
func_add_word_to_command dotnet
|
||||||
|
csc="$dotnet_sdk_dir/Roslyn/bincore/csc.dll"
|
||||||
|
case "@build_os@" in
|
||||||
|
cygwin*)
|
||||||
|
csc=`cygpath -w "$csc"`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
func_add_word_to_command "$csc"
|
||||||
|
test -z "$CSHARP_VERBOSE" || echo "$command_for_print $options_csc_for_print $sources_csc_for_print" 1>&2
|
||||||
|
eval "$command_for_eval $options_csc_for_eval $sources_csc_for_eval"
|
||||||
|
exit $?
|
||||||
|
else
|
||||||
|
if test -n "@HAVE_DOTNET_CSC@" || test -n "@HAVE_CSC@"; then
|
||||||
|
test -z "$CSHARP_VERBOSE" || echo "csc $options_csc_for_print $sources_csc_for_print" 1>&2
|
||||||
|
eval "csc $options_csc_for_eval $sources_csc_for_eval"
|
||||||
|
exit $?
|
||||||
|
else
|
||||||
|
echo 'C# compiler not found, try installing mono or dotnet, then reconfigure' 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
Binary file not shown.
@@ -0,0 +1,88 @@
|
|||||||
|
# csharpexec.m4
|
||||||
|
# serial 10
|
||||||
|
dnl Copyright (C) 2003-2005, 2009-2026 Free Software Foundation, Inc.
|
||||||
|
dnl This file is free software; the Free Software Foundation
|
||||||
|
dnl gives unlimited permission to copy and/or distribute it,
|
||||||
|
dnl with or without modifications, as long as this notice is preserved.
|
||||||
|
dnl This file is offered as-is, without any warranty.
|
||||||
|
|
||||||
|
# Prerequisites of csharpexec.sh.
|
||||||
|
# Checks for a C# execution engine.
|
||||||
|
# gt_CSHARPEXEC or gt_CSHARPEXEC(testexecutable, its-directory)
|
||||||
|
# Sets at most one of HAVE_MONO, HAVE_DOTNET, HAVE_CLIX.
|
||||||
|
# Sets HAVE_CSHARPEXEC to nonempty if csharpexec.sh will work.
|
||||||
|
AC_DEFUN([gt_CSHARPEXEC],
|
||||||
|
[
|
||||||
|
AC_REQUIRE([gt_CSHARP_CHOICE])
|
||||||
|
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
|
||||||
|
AC_MSG_CHECKING([for C[#] program execution engine])
|
||||||
|
AC_EGREP_CPP([yes], [
|
||||||
|
#if defined _WIN32 || defined __EMX__ || defined __DJGPP__
|
||||||
|
yes
|
||||||
|
#endif
|
||||||
|
], MONO_PATH_SEPARATOR=';', MONO_PATH_SEPARATOR=':')
|
||||||
|
HAVE_CSHARPEXEC=1
|
||||||
|
pushdef([AC_MSG_CHECKING],[:])dnl
|
||||||
|
pushdef([AC_CHECKING],[:])dnl
|
||||||
|
pushdef([AC_MSG_RESULT],[:])dnl
|
||||||
|
AC_CHECK_PROG([HAVE_MONO_IN_PATH], [mono], [yes])
|
||||||
|
AC_CHECK_PROG([HAVE_DOTNET_IN_PATH], [dotnet], [yes])
|
||||||
|
AC_CHECK_PROG([HAVE_CLIX_IN_PATH], [clix], [yes])
|
||||||
|
popdef([AC_MSG_RESULT])dnl
|
||||||
|
popdef([AC_CHECKING])dnl
|
||||||
|
popdef([AC_MSG_CHECKING])dnl
|
||||||
|
for impl in "$CSHARP_CHOICE" mono dotnet no; do
|
||||||
|
case "$impl" in
|
||||||
|
mono)
|
||||||
|
if test -n "$HAVE_MONO_IN_PATH" \
|
||||||
|
&& mono --version >/dev/null 2>/dev/null \
|
||||||
|
m4_if([$1], , , [&& mono $2/$1 >/dev/null 2>/dev/null]); then
|
||||||
|
HAVE_MONO=1
|
||||||
|
ac_result="mono"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
dotnet)
|
||||||
|
if test -n "$HAVE_DOTNET_IN_PATH" \
|
||||||
|
&& dotnet --list-runtimes >/dev/null 2>/dev/null; then
|
||||||
|
HAVE_DOTNET=1
|
||||||
|
ac_result="dotnet"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
sscli)
|
||||||
|
if test -n "$HAVE_CLIX_IN_PATH" \
|
||||||
|
m4_if([$1], , , [&& clix $2/$1 >/dev/null 2>/dev/null]); then
|
||||||
|
HAVE_CLIX=1
|
||||||
|
case $host_os in
|
||||||
|
cygwin* | mingw* | windows* | pw32*)
|
||||||
|
CLIX_PATH_VAR=PATH
|
||||||
|
;;
|
||||||
|
darwin* | rhapsody*)
|
||||||
|
CLIX_PATH_VAR=DYLD_LIBRARY_PATH
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
CLIX_PATH_VAR=LD_LIBRARY_PATH
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
eval CLIX_PATH=\"\$CLIX_PATH_VAR\"
|
||||||
|
ac_result="clix"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
no)
|
||||||
|
HAVE_CSHARPEXEC=
|
||||||
|
ac_result="no"
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
AC_MSG_RESULT([$ac_result])
|
||||||
|
AC_SUBST([MONO_PATH])
|
||||||
|
AC_SUBST([MONO_PATH_SEPARATOR])
|
||||||
|
AC_SUBST([CLIX_PATH_VAR])
|
||||||
|
AC_SUBST([CLIX_PATH])
|
||||||
|
AC_SUBST([HAVE_MONO])
|
||||||
|
AC_SUBST([HAVE_DOTNET])
|
||||||
|
AC_SUBST([HAVE_CLIX])
|
||||||
|
])
|
||||||
@@ -0,0 +1,213 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Execute a C# program.
|
||||||
|
|
||||||
|
# Copyright (C) 2003-2026 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/>.
|
||||||
|
|
||||||
|
# This uses the same choices as csharpexec.c, but instead of relying on the
|
||||||
|
# environment settings at run time, it uses the environment variables
|
||||||
|
# present at configuration time.
|
||||||
|
#
|
||||||
|
# This is a separate shell script, because the various C# interpreters have
|
||||||
|
# different command line options.
|
||||||
|
#
|
||||||
|
# Usage: /bin/sh csharpexec.sh [OPTION] program.exe [ARGUMENTS]
|
||||||
|
# Options:
|
||||||
|
# -L DIRECTORY search for C# libraries also in DIRECTORY
|
||||||
|
|
||||||
|
# func_tmpdir
|
||||||
|
# creates a temporary directory.
|
||||||
|
# Sets variable
|
||||||
|
# - tmp pathname of freshly created temporary directory
|
||||||
|
func_tmpdir ()
|
||||||
|
{
|
||||||
|
# Use the environment variable TMPDIR, falling back to /tmp. This allows
|
||||||
|
# users to specify a different temporary directory, for example, if their
|
||||||
|
# /tmp is filled up or too small.
|
||||||
|
: "${TMPDIR=/tmp}"
|
||||||
|
{
|
||||||
|
# Use the mktemp program if available. If not available, hide the error
|
||||||
|
# message.
|
||||||
|
tmp=`(umask 077 && mktemp -d -q "$TMPDIR/gtXXXXXX") 2>/dev/null` &&
|
||||||
|
test -n "$tmp" && test -d "$tmp"
|
||||||
|
} ||
|
||||||
|
{
|
||||||
|
# Use a simple mkdir command. It is guaranteed to fail if the directory
|
||||||
|
# already exists. $RANDOM is bash specific and expands to empty in shells
|
||||||
|
# other than bash, ksh and zsh. Its use does not increase security;
|
||||||
|
# rather, it minimizes the probability of failure in a very cluttered /tmp
|
||||||
|
# directory.
|
||||||
|
tmp=$TMPDIR/gt$$-$RANDOM
|
||||||
|
(umask 077 && mkdir "$tmp")
|
||||||
|
} ||
|
||||||
|
{
|
||||||
|
echo "$0: cannot create a temporary directory in $TMPDIR" >&2
|
||||||
|
{ (exit 1); exit 1; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
libdirs_mono=
|
||||||
|
libdirs_dotnet=
|
||||||
|
prog=
|
||||||
|
while test $# != 0; do
|
||||||
|
case "$1" in
|
||||||
|
-L)
|
||||||
|
libdirs_mono="${libdirs_mono:+$libdirs_mono@MONO_PATH_SEPARATOR@}$2"
|
||||||
|
libdirs_dotnet="${libdirs_dotnet:+$libdirs_dotnet|}$2"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-*)
|
||||||
|
echo "csharpexec: unknown option '$1'" 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
prog="$1"
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
if test -z "$prog"; then
|
||||||
|
echo "csharpexec: no program specified" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
case "$prog" in
|
||||||
|
*.exe) ;;
|
||||||
|
*)
|
||||||
|
echo "csharpexec: program is not a .exe" 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test -n "@HAVE_MONO@"; then
|
||||||
|
CONF_MONO_PATH='@MONO_PATH@'
|
||||||
|
if test -n "$libdirs_mono"; then
|
||||||
|
MONO_PATH="$libdirs_mono${CONF_MONO_PATH:+@MONO_PATH_SEPARATOR@$CONF_MONO_PATH}"
|
||||||
|
else
|
||||||
|
MONO_PATH="$CONF_MONO_PATH"
|
||||||
|
fi
|
||||||
|
export MONO_PATH
|
||||||
|
test -z "$CSHARP_VERBOSE" || echo mono "$@" 1>&2
|
||||||
|
exec mono "$@"
|
||||||
|
else
|
||||||
|
if test -n "@HAVE_DOTNET@"; then
|
||||||
|
# Invoke 'dotnet $prog ...'.
|
||||||
|
# Documentation:
|
||||||
|
# <https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet#options-for-running-an-application>
|
||||||
|
# This could be optimized on Windows platforms, because C# .exe files are
|
||||||
|
# directly executable there. But there's no point in optimizing specifically
|
||||||
|
# a non-free platform, especially since it would increase the test matrix.
|
||||||
|
shift
|
||||||
|
# On Windows, assume that 'dotnet' is a native Windows program, not a Cygwin program.
|
||||||
|
prog_arg="$prog"
|
||||||
|
case "@build_os@" in
|
||||||
|
cygwin*)
|
||||||
|
prog_arg=`cygpath -w "$prog"`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
# Handle the -L options.
|
||||||
|
# The way this works is that we have to copy (or symlink) the DLLs into the
|
||||||
|
# directory where FOO.exe resides.
|
||||||
|
# Maybe there is another way to do this, but I haven't found it, trying
|
||||||
|
# - the --additionalprobingpath command-line option,
|
||||||
|
# - the additionalProbingPaths property in runtimeconfig.json,
|
||||||
|
# - adding a --deps deps.json option,
|
||||||
|
# cf. <https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet#options-for-running-an-application>
|
||||||
|
# and <https://github.com/dotnet/runtime/blob/main/docs/design/features/host-probing.md>.
|
||||||
|
tmpfiles=
|
||||||
|
if test -n "$libdirs_dotnet"; then
|
||||||
|
# Make sure the added DLLs are removed when this script terminates.
|
||||||
|
func_cleanup_tmpfiles()
|
||||||
|
{
|
||||||
|
saved_IFS="$IFS"
|
||||||
|
IFS='|'
|
||||||
|
for file in $tmpfiles; do
|
||||||
|
IFS="$saved_IFS"
|
||||||
|
rm -f "$file"
|
||||||
|
done
|
||||||
|
IFS="$saved_IFS"
|
||||||
|
}
|
||||||
|
trap func_cleanup_tmpfiles HUP INT QUIT PIPE TERM
|
||||||
|
trap 'exit_status=$?; func_cleanup_tmpfiles; exit $exit_status' EXIT
|
||||||
|
# Copy the DLLs.
|
||||||
|
prog_dir=`dirname "$prog"`
|
||||||
|
saved_IFS="$IFS"
|
||||||
|
IFS='|'
|
||||||
|
for dir in $libdirs_dotnet; do
|
||||||
|
IFS="$saved_IFS"
|
||||||
|
for file in `cd "$dir" && echo *.dll`; do
|
||||||
|
if test -f "$prog_dir/$file"; then
|
||||||
|
# A DLL of this name is already at the expected location.
|
||||||
|
:
|
||||||
|
else
|
||||||
|
tmpfiles="${tmpfiles:+$tmpfiles|}$prog_dir/$file"
|
||||||
|
cp "$dir/$file" "$prog_dir/$file" || exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
IFS="$saved_IFS"
|
||||||
|
fi
|
||||||
|
if test -f "${prog%.exe}.runtimeconfig.json"; then
|
||||||
|
# There is already a FOO.runtimeconfig.json alongside FOO.exe.
|
||||||
|
dotnet exec "$prog_arg" "$@"
|
||||||
|
result=$?
|
||||||
|
else
|
||||||
|
# dotnet needs a FOO.runtimeconfig.json alongside FOO.exe in order to
|
||||||
|
# execute FOO.exe. Create a dummy one in a temporary directory
|
||||||
|
# (because the directory where FOO.exe sits is not necessarily writable).
|
||||||
|
# Documentation of this file format:
|
||||||
|
# <https://learn.microsoft.com/en-us/dotnet/core/runtime-config/>
|
||||||
|
func_tmpdir
|
||||||
|
runtimeconfig="$tmp"/runtimeconfig.json
|
||||||
|
dotnet --list-runtimes | sed -n -e 's/Microsoft.NETCore.App \([^ ]*\) .*/{ "runtimeOptions": { "framework": { "name": "Microsoft.NETCore.App", "version": "\1" } } }/p' > "$runtimeconfig"
|
||||||
|
runtimeconfig_arg="$runtimeconfig"
|
||||||
|
case "@build_os@" in
|
||||||
|
cygwin*)
|
||||||
|
runtimeconfig_arg=`cygpath -w "$runtimeconfig"`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
test -z "$CSHARP_VERBOSE" || echo dotnet exec --runtimeconfig "$runtimeconfig_arg" "$prog_arg" "$@" 1>&2
|
||||||
|
dotnet exec --runtimeconfig "$runtimeconfig_arg" "$prog_arg" "$@"
|
||||||
|
result=$?
|
||||||
|
rm -f "$runtimeconfig"
|
||||||
|
rmdir "$tmp"
|
||||||
|
fi
|
||||||
|
exit $result
|
||||||
|
else
|
||||||
|
if test -n "@HAVE_CLIX@"; then
|
||||||
|
CONF_CLIX_PATH='@CLIX_PATH@'
|
||||||
|
if test -n "$libdirs_mono"; then
|
||||||
|
@CLIX_PATH_VAR@="$libdirs_mono${CONF_CLIX_PATH:+@MONO_PATH_SEPARATOR@$CONF_CLIX_PATH}"
|
||||||
|
else
|
||||||
|
@CLIX_PATH_VAR@="$CONF_CLIX_PATH"
|
||||||
|
fi
|
||||||
|
export @CLIX_PATH_VAR@
|
||||||
|
shift
|
||||||
|
# On Windows, assume that 'clix' is a native Windows program,
|
||||||
|
# not a Cygwin program.
|
||||||
|
case "@build_os@" in
|
||||||
|
cygwin*)
|
||||||
|
prog=`cygpath -w "$prog"`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
test -z "$CSHARP_VERBOSE" || echo clix "$prog" "$@" 1>&2
|
||||||
|
exec clix "$prog" "$@"
|
||||||
|
else
|
||||||
|
echo 'C# virtual machine not found, try installing mono or dotnet, then reconfigure' 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
# dcomp.m4
|
||||||
|
# serial 3
|
||||||
|
dnl Copyright (C) 2025-2026 Free Software Foundation, Inc.
|
||||||
|
dnl This file is free software; the Free Software Foundation
|
||||||
|
dnl gives unlimited permission to copy and/or distribute it,
|
||||||
|
dnl with or without modifications, as long as this notice is preserved.
|
||||||
|
dnl This file is offered as-is, without any warranty.
|
||||||
|
|
||||||
|
# There are three D implementations, see
|
||||||
|
# <https://en.wikipedia.org/wiki/D_(programming_language)#Implementations>
|
||||||
|
# <https://wiki.dlang.org/Compilers>
|
||||||
|
# <https://dub.pm/dub-reference/build_settings/#buildoptions>
|
||||||
|
# Although each has different possible options, a few options are accepted by
|
||||||
|
# all of the implementations: -c, -I, -g, -O. Some essential options, however,
|
||||||
|
# are different:
|
||||||
|
# gdc ldc2 dmd
|
||||||
|
# ---------- ------------------- ------------
|
||||||
|
# -oFILE -of=FILE, --of=FILE -of=FILE
|
||||||
|
# -lLIBRARY -L -lLIBRARY -L=-lLIBRARY
|
||||||
|
# -LDIR -L -LDIR -L=-LDIR
|
||||||
|
# -Wl,OPTION -L OPTION -L=OPTION
|
||||||
|
|
||||||
|
# Checks for a D implementation.
|
||||||
|
# Sets DC and DFLAGS (options that can be used with "$DC").
|
||||||
|
AC_DEFUN([gt_DCOMP],
|
||||||
|
[
|
||||||
|
AC_MSG_CHECKING([for D compiler])
|
||||||
|
pushdef([AC_MSG_CHECKING],[:])dnl
|
||||||
|
pushdef([AC_CHECKING],[:])dnl
|
||||||
|
pushdef([AC_MSG_RESULT],[:])dnl
|
||||||
|
AC_ARG_VAR([DC], [D compiler command])
|
||||||
|
AC_ARG_VAR([DFLAGS], [D compiler options])
|
||||||
|
dnl On OpenBSD, gdc is called 'egdc' and works less well than dmd.
|
||||||
|
dnl Like AC_CHECK_TOOLS([DC], [gdc ldc2 dmd egdc]) but check whether the
|
||||||
|
dnl compiler can actually compile a trivial program. We may simplify this
|
||||||
|
dnl once <https://savannah.gnu.org/support/index.php?111256> is implemented.
|
||||||
|
if test -z "$DC"; then
|
||||||
|
echo > empty.d
|
||||||
|
if test -n "${host_alias}"; then
|
||||||
|
if test -z "$DC"; then
|
||||||
|
DC="${host_alias}-gdc"
|
||||||
|
echo "$as_me:${as_lineno-$LINENO}: trying ${DC}..." >&AS_MESSAGE_LOG_FD
|
||||||
|
if ${DC} -c empty.d 2>&AS_MESSAGE_LOG_FD; then :; else DC= ; fi
|
||||||
|
fi
|
||||||
|
if test -z "$DC"; then
|
||||||
|
DC="${host_alias}-ldc2"
|
||||||
|
echo "$as_me:${as_lineno-$LINENO}: trying ${DC}..." >&AS_MESSAGE_LOG_FD
|
||||||
|
if ${DC} -c empty.d 2>&AS_MESSAGE_LOG_FD; then :; else DC= ; fi
|
||||||
|
fi
|
||||||
|
if test -z "$DC"; then
|
||||||
|
DC="${host_alias}-dmd"
|
||||||
|
echo "$as_me:${as_lineno-$LINENO}: trying ${DC}..." >&AS_MESSAGE_LOG_FD
|
||||||
|
if ${DC} -c empty.d 2>&AS_MESSAGE_LOG_FD; then :; else DC= ; fi
|
||||||
|
fi
|
||||||
|
if test -z "$DC"; then
|
||||||
|
DC="${host_alias}-egdc"
|
||||||
|
echo "$as_me:${as_lineno-$LINENO}: trying ${DC}..." >&AS_MESSAGE_LOG_FD
|
||||||
|
if ${DC} -c empty.d 2>&AS_MESSAGE_LOG_FD; then :; else DC= ; fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test -z "$DC"; then
|
||||||
|
DC="gdc"
|
||||||
|
echo "$as_me:${as_lineno-$LINENO}: trying ${DC}..." >&AS_MESSAGE_LOG_FD
|
||||||
|
if ${DC} -c empty.d 2>&AS_MESSAGE_LOG_FD; then :; else DC= ; fi
|
||||||
|
fi
|
||||||
|
if test -z "$DC"; then
|
||||||
|
DC="ldc2"
|
||||||
|
echo "$as_me:${as_lineno-$LINENO}: trying ${DC}..." >&AS_MESSAGE_LOG_FD
|
||||||
|
if ${DC} -c empty.d 2>&AS_MESSAGE_LOG_FD; then :; else DC= ; fi
|
||||||
|
fi
|
||||||
|
if test -z "$DC"; then
|
||||||
|
DC="dmd"
|
||||||
|
echo "$as_me:${as_lineno-$LINENO}: trying ${DC}..." >&AS_MESSAGE_LOG_FD
|
||||||
|
if ${DC} -c empty.d 2>&AS_MESSAGE_LOG_FD; then :; else DC= ; fi
|
||||||
|
fi
|
||||||
|
if test -z "$DC"; then
|
||||||
|
DC="egdc"
|
||||||
|
echo "$as_me:${as_lineno-$LINENO}: trying ${DC}..." >&AS_MESSAGE_LOG_FD
|
||||||
|
if ${DC} -c empty.d 2>&AS_MESSAGE_LOG_FD; then :; else DC= ; fi
|
||||||
|
fi
|
||||||
|
rm -f empty.d empty.o empty.obj
|
||||||
|
fi
|
||||||
|
popdef([AC_MSG_RESULT])dnl
|
||||||
|
popdef([AC_CHECKING])dnl
|
||||||
|
popdef([AC_MSG_CHECKING])dnl
|
||||||
|
if test -n "$DC"; then
|
||||||
|
ac_result="$DC"
|
||||||
|
else
|
||||||
|
ac_result="no"
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT([$ac_result])
|
||||||
|
AC_SUBST([DC])
|
||||||
|
if test -z "$DFLAGS" && test -n "$DC"; then
|
||||||
|
case `$DC --version | sed -e 's/ .*//' -e 1q` in
|
||||||
|
gdc | *-gdc | egdc | *-egdc | LDC*) DFLAGS="-g -O2" ;;
|
||||||
|
*) DFLAGS="-g -O" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
AC_SUBST([DFLAGS])
|
||||||
|
])
|
||||||
@@ -0,0 +1,139 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Compile a D program, library, or compilation unit.
|
||||||
|
|
||||||
|
# Copyright (C) 2025-2026 Free Software Foundation, Inc.
|
||||||
|
# Written by Bruno Haible <bruno@clisp.org>, 2025.
|
||||||
|
#
|
||||||
|
# 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/>.
|
||||||
|
|
||||||
|
# Usage: /bin/sh dcomp.sh [OPTION] SOURCE.d ...
|
||||||
|
# where the supported OPTIONs are:
|
||||||
|
# -I DIR
|
||||||
|
# -c
|
||||||
|
# -g
|
||||||
|
# -O (mapped to -O or -O2, depending on implementation)
|
||||||
|
# -o FILE (for libtool compatibility)
|
||||||
|
# -lLIBRARY (for libtool compatibility)
|
||||||
|
# -LDIR (for libtool compatibility)
|
||||||
|
# -pthread (for libtool compatibility)
|
||||||
|
# -Wl,OPTION (for libtool compatibility)
|
||||||
|
|
||||||
|
# Find out which implementation we are using.
|
||||||
|
case `@DC@ --version | sed -e 's/ .*//' -e 1q` in
|
||||||
|
gdc | *-gdc | egdc | *-egdc) flavor=gdc ;;
|
||||||
|
LDC*) flavor=ldc ;;
|
||||||
|
DMD*) flavor=dmd ;;
|
||||||
|
*)
|
||||||
|
echo "Warning: implementation flavor of '"'@DC@'"' not recognized." 1>&2
|
||||||
|
flavor=dmd ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# In order to construct a command that invokes the D compiler, we need 'eval',
|
||||||
|
# because some of the arguments may contain spaces.
|
||||||
|
options_for_print=
|
||||||
|
options_for_eval=
|
||||||
|
# Protecting special characters, hiding them from 'eval':
|
||||||
|
# Double each backslash.
|
||||||
|
sed_protect_1='s/\\/\\\\/g'
|
||||||
|
# Escape each dollar, backquote, double-quote.
|
||||||
|
sed_protect_2a='s/\$/\\$/g'
|
||||||
|
sed_protect_2b='s/`/\\`/g'
|
||||||
|
sed_protect_2c='s/"/\\"/g'
|
||||||
|
# Add double-quotes at the beginning and end of the word.
|
||||||
|
sed_protect_3a='1s/^/"/'
|
||||||
|
sed_protect_3b='$s/$/"/'
|
||||||
|
func_add_word_to_options ()
|
||||||
|
{
|
||||||
|
options_for_print="${options_for_print:+$options_for_print }$1"
|
||||||
|
word_protected=`echo "$1" | sed -e "$sed_protect_1" -e "$sed_protect_2a" -e "$sed_protect_2b" -e "$sed_protect_2c" -e "$sed_protect_3a" -e "$sed_protect_3b"`
|
||||||
|
options_for_eval="${options_for_eval:+$options_for_eval }$word_protected"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Process the arguments.
|
||||||
|
next_is_arg_of=
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -z "$next_is_arg_of"; then
|
||||||
|
case "$arg" in
|
||||||
|
-I | -l | -L)
|
||||||
|
echo "dcomp: Unsupported option: $arg. Combine with next argument." 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
-I* | -c | -g)
|
||||||
|
func_add_word_to_options "$arg"
|
||||||
|
;;
|
||||||
|
-O)
|
||||||
|
case "$flavor" in
|
||||||
|
gdc | ldc) func_add_word_to_options "-O2" ;;
|
||||||
|
dmd) func_add_word_to_options "-O" ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
-o) next_is_arg_of='o' ;;
|
||||||
|
-l* | -L* | -pthread)
|
||||||
|
case "$arg" in
|
||||||
|
-pthread) arg='-lpthread' ;;
|
||||||
|
esac
|
||||||
|
case "$flavor" in
|
||||||
|
gdc) func_add_word_to_options "$arg" ;;
|
||||||
|
ldc) func_add_word_to_options '-L'; func_add_word_to_options "$arg" ;;
|
||||||
|
dmd) func_add_word_to_options "-L=$arg" ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
-Wl,*)
|
||||||
|
if test "$flavor" = gdc; then
|
||||||
|
func_add_word_to_options "$arg"
|
||||||
|
else
|
||||||
|
option=`echo "$arg" | sed -e 's/^-Wl,//'`
|
||||||
|
case "$flavor" in
|
||||||
|
ldc) func_add_word_to_options '-L'; func_add_word_to_options "$option" ;;
|
||||||
|
dmd) func_add_word_to_options "-L=$option" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
-*)
|
||||||
|
echo "dcomp: Unsupported option: $arg" 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# dmd rejects shared library file names such as libfoo.so.1.3:
|
||||||
|
# "Error: unrecognized file extension 3"
|
||||||
|
if test "$flavor" = dmd \
|
||||||
|
&& case `basename "$arg"` in lib*.so.*) true ;; *) false ;; esac; then
|
||||||
|
func_add_word_to_options "-L=$arg"
|
||||||
|
else
|
||||||
|
func_add_word_to_options "$arg"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
case "$next_is_arg_of" in
|
||||||
|
o)
|
||||||
|
case "$flavor" in
|
||||||
|
gdc) func_add_word_to_options '-o'; func_add_word_to_options "$arg" ;;
|
||||||
|
*) func_add_word_to_options "-of=$arg" ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
next_is_arg_of=
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if test -n "$next_is_arg_of"; then
|
||||||
|
echo "dcomp: missing argument to option -$next_is_arg_of" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Execute the command.
|
||||||
|
test -z "$D_VERBOSE" || echo "@DC@ @DFLAGS@ $options_for_print" 1>&2
|
||||||
|
eval "@DC@ @DFLAGS@ $options_for_eval"
|
||||||
|
exit $?
|
||||||
@@ -0,0 +1,127 @@
|
|||||||
|
# gocomp.m4
|
||||||
|
# serial 1
|
||||||
|
dnl Copyright (C) 2025-2026 Free Software Foundation, Inc.
|
||||||
|
dnl This file is free software; the Free Software Foundation
|
||||||
|
dnl gives unlimited permission to copy and/or distribute it,
|
||||||
|
dnl with or without modifications, as long as this notice is preserved.
|
||||||
|
dnl This file is offered as-is, without any warranty.
|
||||||
|
|
||||||
|
# There are two Go implementations, that differ essentially only regarding
|
||||||
|
# the compiler and the used runtime version:
|
||||||
|
# * The golang Go is the original implementation, typically a little more
|
||||||
|
# up-to-date. It supports only the major computing platforms.
|
||||||
|
# * The GCC Go implementation is part of the GNU Compiler Collection.
|
||||||
|
# It lags behind a bit. It supports all platforms supported by GCC.
|
||||||
|
# The golang Go implementation produces smaller executables, and the
|
||||||
|
# binary packages needed for development are smaller as well.
|
||||||
|
#
|
||||||
|
# Therefore the preferred implementation is
|
||||||
|
# * golang where available,
|
||||||
|
# * GCC on the platforms where golang is not available. This includes in
|
||||||
|
# particular:
|
||||||
|
# - Linux/alpha, Linux/hppa, Linux/m68k, Linux/sparc, Linux/powerpc (32-bit)
|
||||||
|
# - GNU/Hurd
|
||||||
|
# - Solaris/sparc
|
||||||
|
# - Haiku
|
||||||
|
|
||||||
|
# Sets GO_CHOICE to the preferred Go compiler implementation:
|
||||||
|
# 'golang' or 'gcc' or 'any' or 'no'.
|
||||||
|
# Here
|
||||||
|
# - 'golang' means the original Go compiler.
|
||||||
|
# - 'gcc' means GCC Go compiler.
|
||||||
|
# The runtime library of both is the same (possibly in different versions,
|
||||||
|
# though).
|
||||||
|
AC_DEFUN([gt_GO_CHOICE],
|
||||||
|
[
|
||||||
|
AC_MSG_CHECKING([for preferred Go compiler])
|
||||||
|
AC_ARG_ENABLE([go],
|
||||||
|
[ --enable-go[[=IMPL]] choose preferred Go compiler (golang, gcc)],
|
||||||
|
[GO_CHOICE="$enableval"],
|
||||||
|
[GO_CHOICE=any])
|
||||||
|
AC_SUBST([GO_CHOICE])
|
||||||
|
AC_MSG_RESULT([$GO_CHOICE])
|
||||||
|
])
|
||||||
|
|
||||||
|
# How to run Go programs?
|
||||||
|
# Assume you want to distribute a Go program. In which form? And what are
|
||||||
|
# the dependencies to do so?
|
||||||
|
#
|
||||||
|
# There are three ways to do so:
|
||||||
|
#
|
||||||
|
# * Run the program by compiling it on-the-fly in a temporary directory
|
||||||
|
# and running it from there:
|
||||||
|
# ${GO} run foo.go
|
||||||
|
# You would distribute foo.go (very small).
|
||||||
|
# But the dependencies are large: the Go development environment.
|
||||||
|
# On Ubuntu 24.04 this is:
|
||||||
|
# - with 'golang': the package 'golang-go'
|
||||||
|
# 11 MB for /usr/lib/go-1.22/bin/go,
|
||||||
|
# 85 MB for /usr/lib/go-1.22/pkg/tool/linux_amd64/*
|
||||||
|
# = 96 MB in total
|
||||||
|
# - with 'gccgo': the package 'gccgo-13'
|
||||||
|
# 60 MB for /usr/lib/x86_64-linux-gnu/libgo.so.22.0.0,
|
||||||
|
# > 40 MB for /usr/libexec/gcc/x86_64-linux-gnu/13/go1
|
||||||
|
# and /usr/bin/x86_64-linux-gnu-go-13,
|
||||||
|
# 116 MB for /usr/lib/gcc/x86_64-linux-gnu/13/libgo.a
|
||||||
|
# = 216 MB in total.
|
||||||
|
#
|
||||||
|
# * You distribute the binary, linked against the shared Go runtime library.
|
||||||
|
# Running the program is just invoking that binary.
|
||||||
|
# On Ubuntu the dependencies are:
|
||||||
|
# - with 'golang': unsupported.
|
||||||
|
# - with 'gccgo': the package 'libgo22'
|
||||||
|
# 60 MB for /usr/lib/x86_64-linux-gnu/libgo.so.22.0.0
|
||||||
|
# = 60 MB in total.
|
||||||
|
#
|
||||||
|
# * You distribute the binary, linked statically with the needed parts
|
||||||
|
# of the Go runtime library:
|
||||||
|
# ${GO} build ${GOCOMPFLAGS} foo.go
|
||||||
|
# Running the program is just invoking that binary.
|
||||||
|
# On Ubuntu the dependencies are:
|
||||||
|
# - with 'golang': No dependencies; the binary is statically linked.
|
||||||
|
# The stripped executable's size is >= 1 MB.
|
||||||
|
# - with 'gccgo': No dependencies; the binary is statically linked
|
||||||
|
# (when using GOCOMPFLAGS='-static') or statically linked except for
|
||||||
|
# the standard C library (when using GOCOMPFLAGS='-static-libgo').
|
||||||
|
# The stripped executable's size is 5 MB or 6 MB, respectively.
|
||||||
|
# Distros generally prefer avoiding dynamic linking with libc,
|
||||||
|
# so let's use that.
|
||||||
|
#
|
||||||
|
# It is clear that the third approach will be preferred for small programs.
|
||||||
|
|
||||||
|
# Prerequisites of gocomp.sh.
|
||||||
|
# Checks for a Go implementation.
|
||||||
|
# Sets HAVE_GOCOMP to nonempty if gocomp.sh will work.
|
||||||
|
# Also sets GO and GOCOMPFLAGS (options that can be used with "$GO build").
|
||||||
|
AC_DEFUN([gt_GOCOMP],
|
||||||
|
[
|
||||||
|
AC_REQUIRE([gt_GO_CHOICE])
|
||||||
|
AC_MSG_CHECKING([for Go compiler])
|
||||||
|
HAVE_GOCOMP=1
|
||||||
|
pushdef([AC_MSG_CHECKING],[:])dnl
|
||||||
|
pushdef([AC_CHECKING],[:])dnl
|
||||||
|
pushdef([AC_MSG_RESULT],[:])dnl
|
||||||
|
dnl Prefer golang over gcc by default, because it produces much smaller
|
||||||
|
dnl executables (see above).
|
||||||
|
if test "$GO_CHOICE" = gcc; then
|
||||||
|
AC_PATH_PROGS([GO], [go-30 go-29 go-28 go-27 go-26 go-25 go-24 go-23 go-22 go-21 go-20 go-19 go-18 go-17 go-16 go-15 go-14 go-13 go-12 go-11 go-10 go-9 go-8 go-7 go-6 go-5 go])
|
||||||
|
else
|
||||||
|
AC_PATH_PROGS([GO], [go go-30 go-29 go-28 go-27 go-26 go-25 go-24 go-23 go-22 go-21 go-20 go-19 go-18 go-17 go-16 go-15 go-14 go-13 go-12 go-11 go-10 go-9 go-8 go-7 go-6 go-5])
|
||||||
|
fi
|
||||||
|
popdef([AC_MSG_RESULT])dnl
|
||||||
|
popdef([AC_CHECKING])dnl
|
||||||
|
popdef([AC_MSG_CHECKING])dnl
|
||||||
|
if test -n "$GO"; then
|
||||||
|
case "$GO" in
|
||||||
|
go | */go ) GOCOMPFLAGS= ;;
|
||||||
|
*) GOCOMPFLAGS='-gccgoflags=-static-libgo' ;;
|
||||||
|
esac
|
||||||
|
ac_result="$GO"
|
||||||
|
else
|
||||||
|
HAVE_GOCOMP=
|
||||||
|
ac_result="no"
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT([$ac_result])
|
||||||
|
AC_SUBST([GO])
|
||||||
|
AC_SUBST([GOCOMPFLAGS])
|
||||||
|
])
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Compile a Go program.
|
||||||
|
|
||||||
|
# Copyright (C) 2025-2026 Free Software Foundation, Inc.
|
||||||
|
# Written by Bruno Haible <haible@clisp.cons.org>, 2025.
|
||||||
|
#
|
||||||
|
# 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/>.
|
||||||
|
|
||||||
|
# Usage: /bin/sh gocomp.sh [OPTION] SOURCE.go ...
|
||||||
|
#
|
||||||
|
# Limitation: Go programs that make use of the C to Go interface ('cgo') are
|
||||||
|
# unsupported.
|
||||||
|
|
||||||
|
# Avoid error "CC environment variable is relative; must be absolute path"
|
||||||
|
# on native Windows. Cf.
|
||||||
|
# <https://github.com/golang/go/commit/aa161e799df7e1eba99d2be10271e76b6f758142>
|
||||||
|
unset CC
|
||||||
|
unset CXX
|
||||||
|
|
||||||
|
test -z "$GO_VERBOSE" || echo "@GO@ build @GOCOMPFLAGS@ $@"
|
||||||
|
exec @GO@ build @GOCOMPFLAGS@ "$@"
|
||||||
@@ -0,0 +1,477 @@
|
|||||||
|
# javacomp.m4
|
||||||
|
# serial 27
|
||||||
|
dnl Copyright (C) 2001-2003, 2006-2007, 2009-2026 Free Software Foundation,
|
||||||
|
dnl Inc.
|
||||||
|
dnl This file is free software; the Free Software Foundation
|
||||||
|
dnl gives unlimited permission to copy and/or distribute it,
|
||||||
|
dnl with or without modifications, as long as this notice is preserved.
|
||||||
|
dnl This file is offered as-is, without any warranty.
|
||||||
|
|
||||||
|
# Prerequisites of javacomp.sh.
|
||||||
|
# gt_JAVACOMP([source-version], [target-version])
|
||||||
|
# Sets HAVE_JAVACOMP to nonempty if javacomp.sh will allow Java source code
|
||||||
|
# according to source-version to be compiled to Java bytecode classes in the
|
||||||
|
# target-version format.
|
||||||
|
#
|
||||||
|
# source-version can be: support for
|
||||||
|
# 1.8 lambdas
|
||||||
|
# 9 private interface methods
|
||||||
|
# 10 type inference for local variables
|
||||||
|
# 11 'var' in parameters of lambda expressions
|
||||||
|
# ...
|
||||||
|
# (For reference, see <https://en.wikipedia.org/wiki/Java_version_history>.)
|
||||||
|
# If source-version 1.3 or 1.4 or 1.5 or 1.6 or 1.7 is requested, it gets mapped
|
||||||
|
# to 1.8, for backward compatibility. (Currently the minimum Java and javac
|
||||||
|
# version we need to support is Java 1.8, since older versions are
|
||||||
|
# out-of-support, see
|
||||||
|
# <https://en.wikipedia.org/wiki/Java_version_history#Release_table>.)
|
||||||
|
#
|
||||||
|
# target-version can be: classfile version:
|
||||||
|
# 1.8 52.0
|
||||||
|
# 9 53.0
|
||||||
|
# 10 54.0
|
||||||
|
# 11 55.0
|
||||||
|
# ... ...
|
||||||
|
# The classfile version of a .class file can be determined through the "file"
|
||||||
|
# command. More portably, the classfile major version can be determined through
|
||||||
|
# "od -A n -t d1 -j 7 -N 1 classfile".
|
||||||
|
# If a target-version below 1.8 is requested, it gets mapped to 1.8, for
|
||||||
|
# backward compatibility. (Currently the minimum Java and javac version we need
|
||||||
|
# to support is Java 1.8, since older versions are out-of-support, see
|
||||||
|
# <https://en.wikipedia.org/wiki/Java_version_history#Release_table>.)
|
||||||
|
#
|
||||||
|
# target-version can also be omitted. In this case, the required target-version
|
||||||
|
# is determined from the found JVM (see macro gt_JAVAEXEC):
|
||||||
|
# target-version for JVM
|
||||||
|
# 1.8 JDK/JRE 8
|
||||||
|
# 9 JDK/JRE 9
|
||||||
|
# 10 JDK/JRE 10
|
||||||
|
# 11 JDK/JRE 11
|
||||||
|
# ... ...
|
||||||
|
#
|
||||||
|
# Specifying target-version is useful when building a library (.jar) that is
|
||||||
|
# useful outside the given package. Omitting target-version is useful when
|
||||||
|
# building an application.
|
||||||
|
#
|
||||||
|
# It is unreasonable to ask for a target-version < source-version, such as
|
||||||
|
# - target-version < 1.4 with source-version >= 1.4, or
|
||||||
|
# - target-version < 1.5 with source-version >= 1.5, or
|
||||||
|
# - target_version < 1.6 with source_version >= 1.6, or
|
||||||
|
# - target_version < 1.7 with source_version >= 1.7, or
|
||||||
|
# - target_version < 1.8 with source_version >= 1.8, or
|
||||||
|
# - target_version < 9 with source_version >= 9, or
|
||||||
|
# - target_version < 10 with source_version >= 10, or
|
||||||
|
# - target_version < 11 with source_version >= 11, or
|
||||||
|
# - ...
|
||||||
|
# because even Sun's/Oracle's javac doesn't support these combinations.
|
||||||
|
#
|
||||||
|
# It is redundant to ask for a target-version > source-version, since the
|
||||||
|
# smaller target-version = source-version will also always work and newer JVMs
|
||||||
|
# support the older target-versions too.
|
||||||
|
|
||||||
|
AC_DEFUN([gt_JAVACOMP],
|
||||||
|
[
|
||||||
|
m4_if([$2], [], [AC_REQUIRE([gt_JAVAEXEC])], [])
|
||||||
|
AC_EGREP_CPP([yes], [
|
||||||
|
#if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
|
||||||
|
yes
|
||||||
|
#endif
|
||||||
|
], CLASSPATH_SEPARATOR=';', CLASSPATH_SEPARATOR=':')
|
||||||
|
source_version=$1
|
||||||
|
test -n "$source_version" || {
|
||||||
|
AC_MSG_ERROR([missing source-version argument to gt_@&t@JAVACOMP])
|
||||||
|
}
|
||||||
|
case "$source_version" in
|
||||||
|
1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6 | 1.7) source_version='1.8' ;;
|
||||||
|
esac
|
||||||
|
m4_if([$2], [],
|
||||||
|
[if test -n "$HAVE_JAVAEXEC"; then
|
||||||
|
dnl Use $CONF_JAVA to determine the JVM's version.
|
||||||
|
changequote(,)dnl
|
||||||
|
cat > conftestver.java <<EOF
|
||||||
|
public class conftestver {
|
||||||
|
public static void main (String[] args) {
|
||||||
|
System.out.println(System.getProperty("java.specification.version"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
changequote([,])dnl
|
||||||
|
dnl A precompiled version of conftestver.java, compiled with
|
||||||
|
dnl "javac -target 1.1". This avoids having to compile conftestver.java
|
||||||
|
dnl during each test for a suitable Java compiler.
|
||||||
|
dnl For the conversion from binary to this ASCII encapsulation, avoiding
|
||||||
|
dnl to assume the presence of uudecode, use the command
|
||||||
|
dnl $ od -A n -t o1 < conftestver.class | tr ' ' '\012'| sort | uniq | sed -e '/^$/d' -e 's,^,\\,' | tr -d '\012'
|
||||||
|
dnl and the long tr command in opposite direction.
|
||||||
|
dnl Finally move the position corresponding to \055 to the last position,
|
||||||
|
dnl to work around a coreutils-5.x bug.
|
||||||
|
echo 'yzwx!$!I!D,!)!3+!4!5*!6,!4!7,!8!9)!:)!;"!(MeienN"!$FGW"!%Ojab"!2QeibRohZblVYZgb"!%hYei"!9FXQfYpYKgYidKUnleidLGW"!,Ujol_bPegb"!3_jicnbmnpblJfYpY/!*!+)!</!=!>"!=fYpYJmkb_ece_YnejiJpblmeji/!?!@)!A/!B!C"!._jicnbmnpbl"!3fYpYKgYidKSZfb_n"!3fYpYKgYidKUqmnbh"!$jon"!8QfYpYKejKTleinUnlbYhL"!.dbnTljkblnq"!EFQfYpYKgYidKUnleidLGQfYpYKgYidKUnleidL"!6fYpYKejKTleinUnlbYh"!)kleingi"!8FQfYpYKgYidKUnleidLGW!D!(!)!!!!!#!"!*!+!"!,!!!@!"!"!!!&Hu!"r!!!"!.!!!(!"!!!"!+!/!0!"!,!!!F!#!"!!!/s!#5$v!%t!&r!!!"!.!!!,!#!!!$!.!%!"!1!!!#!2' \
|
||||||
|
| tr -d '\012\015' \
|
||||||
|
| tr '!"#$%&()*+,./0123456789:;<=>?@ABCDEFGHJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzI' '\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\046\050\051\052\056\057\073\074\076\103\106\114\116\117\120\123\124\126\133\141\142\143\144\145\146\147\151\152\154\155\156\157\160\162\163\164\165\166\171\261\262\266\267\270\272\276\312\376\055' \
|
||||||
|
> conftestver.class
|
||||||
|
java_exec_version=`{
|
||||||
|
unset JAVA_HOME
|
||||||
|
echo "$as_me:__oline__: CLASSPATH=.${CLASSPATH:+$CLASSPATH_SEPARATOR$CLASSPATH} $CONF_JAVA conftestver" >&AS_MESSAGE_LOG_FD
|
||||||
|
CLASSPATH=.${CLASSPATH:+$CLASSPATH_SEPARATOR$CLASSPATH} $CONF_JAVA conftestver 2>&AS_MESSAGE_LOG_FD
|
||||||
|
}`
|
||||||
|
case "$java_exec_version" in
|
||||||
|
null)
|
||||||
|
dnl JDK 1.1.X returns null.
|
||||||
|
java_exec_version=1.1 ;;
|
||||||
|
esac
|
||||||
|
case "$java_exec_version" in
|
||||||
|
1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6 | 1.7)
|
||||||
|
AC_MSG_WARN([$CONF_JAVA is too old, cannot compile Java code for this old version any more])
|
||||||
|
target_version=1.8 ;;
|
||||||
|
changequote(,)dnl
|
||||||
|
1.8 | 9 | [1-9][0-9])
|
||||||
|
changequote([,])dnl
|
||||||
|
dnl Here we could choose any target_version between $source_version
|
||||||
|
dnl and the $java_exec_version. (If it is too small, it will be
|
||||||
|
dnl incremented below until it works.) Since we documented above that
|
||||||
|
dnl it is determined from the JVM, we do that:
|
||||||
|
target_version="$java_exec_version" ;;
|
||||||
|
*) AC_MSG_WARN([unknown target-version $target_version, please update gt_@&t@JAVACOMP macro])
|
||||||
|
target_version=1.8 ;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
target_version="1.8"
|
||||||
|
fi
|
||||||
|
],
|
||||||
|
[target_version=$2
|
||||||
|
case "$target_version" in
|
||||||
|
1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6 | 1.7) target_version='1.8' ;;
|
||||||
|
esac
|
||||||
|
])
|
||||||
|
case "$source_version" in
|
||||||
|
changequote(,)dnl
|
||||||
|
1.8 | 9 | [1-9][0-9]) ;;
|
||||||
|
changequote([,])dnl
|
||||||
|
*) AC_MSG_ERROR([invalid source-version argument to gt_@&t@JAVACOMP: $source_version]) ;;
|
||||||
|
esac
|
||||||
|
case "$target_version" in
|
||||||
|
changequote(,)dnl
|
||||||
|
1.8 | 9 | [1-9][0-9]) ;;
|
||||||
|
changequote([,])dnl
|
||||||
|
*) AC_MSG_ERROR([invalid target-version argument to gt_@&t@JAVACOMP: $target_version]) ;;
|
||||||
|
esac
|
||||||
|
# Function to output the classfile version of a file (8th byte) in decimal.
|
||||||
|
if od -A x < /dev/null >/dev/null 2>/dev/null; then
|
||||||
|
# Use POSIX od.
|
||||||
|
func_classfile_version ()
|
||||||
|
{
|
||||||
|
od -A n -t d1 -j 7 -N 1 "[$]1"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
# Use BSD hexdump.
|
||||||
|
func_classfile_version ()
|
||||||
|
{
|
||||||
|
dd if="[$]1" bs=1 count=1 skip=7 2>/dev/null | hexdump -e '1/1 "%3d "'
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
AC_MSG_CHECKING([for Java compiler])
|
||||||
|
dnl
|
||||||
|
dnl The support of Sun/Oracle javac for target-version and source-version:
|
||||||
|
dnl
|
||||||
|
dnl javac 1.8: -target 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 default: 1.8
|
||||||
|
dnl -source 1.3 1.4 1.5 1.6 1.7 1.8 default: 1.8
|
||||||
|
dnl -target 1.1/1.2/1.3 only possible with -source 1.3
|
||||||
|
dnl -target 1.4 only possible with -source 1.3/1.4
|
||||||
|
dnl -target 1.5 only possible with -source 1.3/1.4/1.5
|
||||||
|
dnl -target 1.6 only possible with -source 1.3/1.4/1.5/1.6
|
||||||
|
dnl -target 1.7 only possible with -source 1.3/1.4/1.5/1.6/1.7
|
||||||
|
dnl
|
||||||
|
dnl javac 9: -target 1.6 1.7 1.8 9 default: 9
|
||||||
|
dnl -source 1.6 1.7 1.8 9 default: 9
|
||||||
|
dnl -target 1.6 only possible with -source 1.6
|
||||||
|
dnl -target 1.7 only possible with -source 1.6/1.7
|
||||||
|
dnl -target 1.8 only possible with -source 1.6/1.7/1.8
|
||||||
|
dnl
|
||||||
|
dnl javac 10: -target 1.6 1.7 1.8 9 10 default: 10
|
||||||
|
dnl -source 1.6 1.7 1.8 9 10 default: 10
|
||||||
|
dnl -target 1.6 only possible with -source 1.6
|
||||||
|
dnl -target 1.7 only possible with -source 1.6/1.7
|
||||||
|
dnl -target 1.8 only possible with -source 1.6/1.7/1.8
|
||||||
|
dnl -target 9 only possible with -source 1.6/1.7/1.8/9
|
||||||
|
dnl
|
||||||
|
dnl and so on.
|
||||||
|
dnl This can be summarized in this table:
|
||||||
|
dnl
|
||||||
|
dnl javac classfile valid -source and obsolete -source
|
||||||
|
dnl version default version -target values and -target values
|
||||||
|
dnl ------- --------------- ----------------- ------------------
|
||||||
|
dnl 1.8 52.0 1.3 .. 1.8 1.3 .. 1.5
|
||||||
|
dnl 9 53.0 1.6 .. 9 1.6
|
||||||
|
dnl 10 54.0 1.6 .. 10 1.6
|
||||||
|
dnl 11 55.0 1.6 .. 11 1.6
|
||||||
|
dnl 12 56.0 1.7 .. 12 1.7
|
||||||
|
dnl 13 57.0 1.7 .. 13 1.7
|
||||||
|
dnl 14 58.0 1.7 .. 14 1.7
|
||||||
|
dnl 15 59.0 1.7 .. 15 1.7
|
||||||
|
dnl 16 60.0 1.7 .. 16 1.7
|
||||||
|
dnl 17 61.0 1.7 .. 17 1.7
|
||||||
|
dnl 18 62.0 1.7 .. 18 1.7
|
||||||
|
dnl 19 63.0 1.7 .. 19 1.7
|
||||||
|
dnl 20 64.0 1.8 .. 20 1.8
|
||||||
|
dnl
|
||||||
|
dnl The -source option value must be <= the -target option value.
|
||||||
|
dnl The minimal -source and -target option value produces an "is obsolete"
|
||||||
|
dnl warning (in javac 1.8 or newer). Additionally, if the -source option
|
||||||
|
dnl value is not the maximal possible one, i.e. not redundant, it produces a
|
||||||
|
dnl "bootstrap class path not set in conjunction with -source ..." warning
|
||||||
|
dnl (in javac 1.7 or newer).
|
||||||
|
dnl
|
||||||
|
dnl To get rid of these warnings, two options are available:
|
||||||
|
dnl * -nowarn. This option is supported since javac 1.6 at least. But
|
||||||
|
dnl it is overkill, because it would also silence warnings about the
|
||||||
|
dnl code being compiled.
|
||||||
|
dnl * -Xlint:-options. This option is supported since javac 1.6 at least.
|
||||||
|
dnl In javac 1.6 it is an undocumented no-op.
|
||||||
|
dnl We use -Xlint:-options and omit it only if we find that the compiler
|
||||||
|
dnl does not support it (which is unlikely).
|
||||||
|
dnl
|
||||||
|
dnl Canonicalize source_version and target_version, for easier arithmetic.
|
||||||
|
case "$source_version" in
|
||||||
|
1.*) source_version=`echo "$source_version" | sed -e 's/^1\.//'` ;;
|
||||||
|
esac
|
||||||
|
case "$target_version" in
|
||||||
|
1.*) target_version=`echo "$target_version" | sed -e 's/^1\.//'` ;;
|
||||||
|
esac
|
||||||
|
CONF_JAVAC=
|
||||||
|
HAVE_JAVAC_ENVVAR=
|
||||||
|
HAVE_JAVAC=
|
||||||
|
HAVE_JAVACOMP=
|
||||||
|
dnl Sanity check.
|
||||||
|
if expr $source_version '<=' $target_version >/dev/null; then
|
||||||
|
echo 'class conftest {}' > conftest.java
|
||||||
|
dnl If the user has set the JAVAC environment variable, use that, if it
|
||||||
|
dnl satisfies the constraints (possibly after adding -target and -source
|
||||||
|
dnl options).
|
||||||
|
if test -n "$JAVAC"; then
|
||||||
|
dnl Test whether $JAVAC is usable.
|
||||||
|
dnl At the same time, determine which option to use to inhibit warnings;
|
||||||
|
dnl see the discussion above.
|
||||||
|
nowarn_option=' -Xlint:-options'
|
||||||
|
if { rm -f conftest.class \
|
||||||
|
&& { echo "$as_me:__oline__: $JAVAC$nowarn_option -d . conftest.java" >&AS_MESSAGE_LOG_FD
|
||||||
|
$JAVAC$nowarn_option -d . conftest.java >&AS_MESSAGE_LOG_FD 2>&1
|
||||||
|
} \
|
||||||
|
&& test -f conftest.class
|
||||||
|
} || { \
|
||||||
|
nowarn_option=
|
||||||
|
rm -f conftest.class \
|
||||||
|
&& { echo "$as_me:__oline__: $JAVAC$nowarn_option -d . conftest.java" >&AS_MESSAGE_LOG_FD
|
||||||
|
$JAVAC$nowarn_option -d . conftest.java >&AS_MESSAGE_LOG_FD 2>&1
|
||||||
|
} \
|
||||||
|
&& test -f conftest.class
|
||||||
|
}; then
|
||||||
|
compiler_cfversion=`func_classfile_version conftest.class`
|
||||||
|
compiler_target_version=`expr $compiler_cfversion - 44`
|
||||||
|
dnl It is hard to determine the compiler_source_version. This would
|
||||||
|
dnl require a list of code snippets that can be compiled only with a
|
||||||
|
dnl specific '-source' option and up, and this list would need to grow
|
||||||
|
dnl every 6 months.
|
||||||
|
dnl Also, $JAVAC may already include a '-source' option.
|
||||||
|
dnl Therefore, pass a '-source' option always.
|
||||||
|
source_option=' -source '`case "$source_version" in 6|7|8) echo 1. ;; esac`"$source_version"
|
||||||
|
dnl And pass a '-target' option as well, if needed.
|
||||||
|
dnl (All supported javac versions support both, see the table above.)
|
||||||
|
if expr $target_version = $compiler_target_version >/dev/null; then
|
||||||
|
target_option=
|
||||||
|
else
|
||||||
|
target_option=' -target '`case "$target_version" in 6|7|8) echo 1. ;; esac`"$target_version"
|
||||||
|
fi
|
||||||
|
if { echo "$as_me:__oline__: $JAVAC$nowarn_option$source_option$target_option -d . conftest.java" >&AS_MESSAGE_LOG_FD
|
||||||
|
$JAVAC$nowarn_option$source_option$target_option -d . conftest.java >&AS_MESSAGE_LOG_FD 2>&1
|
||||||
|
} \
|
||||||
|
&& test -f conftest.class; then
|
||||||
|
dnl The compiler directly supports the desired source_version and
|
||||||
|
dnl target_version. Perfect.
|
||||||
|
CONF_JAVAC="$JAVAC$nowarn_option$source_option$target_option"
|
||||||
|
HAVE_JAVAC_ENVVAR=1
|
||||||
|
HAVE_JAVACOMP=1
|
||||||
|
else
|
||||||
|
dnl If the desired source_version or target_version were too large
|
||||||
|
dnl for the compiler, there's nothing else we can do.
|
||||||
|
compiler_version=`echo "$as_me:__oline__: $JAVAC -version | sed -e 1q" >&AS_MESSAGE_LOG_FD
|
||||||
|
$JAVAC -version | sed -e 1q`
|
||||||
|
changequote(,)dnl
|
||||||
|
compiler_version=`echo "$compiler_version" | sed -e 's/^[^0-9]*\([0-9][0-9.]*\).*/\1/'`
|
||||||
|
changequote([,])dnl
|
||||||
|
case "$compiler_version" in
|
||||||
|
1.*) dnl Map 1.8.0_151 to 8.
|
||||||
|
compiler_version=`echo "$compiler_version" | sed -e 's/^1\.//' -e 's/\..*//'`
|
||||||
|
;;
|
||||||
|
*) dnl Map 9.0.4 to 9, 10.0.2 to 10, etc.
|
||||||
|
compiler_version=`echo "$compiler_version" | sed -e 's/\..*//'`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
if expr $source_version '<=' "$compiler_version" >/dev/null \
|
||||||
|
&& expr $target_version '<=' "$compiler_version" >/dev/null; then
|
||||||
|
dnl Increase $source_version and $compiler_version until the
|
||||||
|
dnl compiler accepts these values. This is necessary to make
|
||||||
|
dnl e.g. $source_version = 6 work with Java 12 or newer, or
|
||||||
|
dnl $source_version = 7 work with Java 20 or newer.
|
||||||
|
try_source_version="$source_version"
|
||||||
|
try_target_version="$target_version"
|
||||||
|
while true; do
|
||||||
|
dnl Invariant: $try_source_version <= $try_target_version.
|
||||||
|
if expr $try_source_version = $try_target_version >/dev/null; then
|
||||||
|
try_target_version=`expr $try_target_version + 1`
|
||||||
|
fi
|
||||||
|
try_source_version=`expr $try_source_version + 1`
|
||||||
|
expr $try_source_version '<=' $compiler_version >/dev/null || break
|
||||||
|
source_option=' -source '`case "$try_source_version" in 8) echo 1. ;; esac`"$try_source_version"
|
||||||
|
if expr $try_target_version = $compiler_target_version >/dev/null; then
|
||||||
|
target_option=
|
||||||
|
else
|
||||||
|
target_option=' -target '`case "$try_target_version" in 8) echo 1. ;; esac`"$try_target_version"
|
||||||
|
fi
|
||||||
|
if { echo "$as_me:__oline__: $JAVAC$nowarn_option$source_option$target_option -d . conftest.java" >&AS_MESSAGE_LOG_FD
|
||||||
|
$JAVAC$nowarn_option$source_option$target_option -d . conftest.java >&AS_MESSAGE_LOG_FD 2>&1
|
||||||
|
} \
|
||||||
|
&& test -f conftest.class; then
|
||||||
|
dnl The compiler supports the try_source_version and
|
||||||
|
dnl try_target_version. It's better than nothing.
|
||||||
|
CONF_JAVAC="$JAVAC$nowarn_option$source_option$target_option"
|
||||||
|
HAVE_JAVAC_ENVVAR=1
|
||||||
|
HAVE_JAVACOMP=1
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test -z "$HAVE_JAVACOMP"; then
|
||||||
|
pushdef([AC_MSG_CHECKING],[:])dnl
|
||||||
|
pushdef([AC_CHECKING],[:])dnl
|
||||||
|
pushdef([AC_MSG_RESULT],[:])dnl
|
||||||
|
AC_CHECK_PROG([HAVE_JAVAC_IN_PATH], [javac], [yes])
|
||||||
|
popdef([AC_MSG_RESULT])dnl
|
||||||
|
popdef([AC_CHECKING])dnl
|
||||||
|
popdef([AC_MSG_CHECKING])dnl
|
||||||
|
if test -z "$HAVE_JAVACOMP" && test -n "$HAVE_JAVAC_IN_PATH"; then
|
||||||
|
dnl Test whether javac is usable.
|
||||||
|
dnl At the same time, determine which option to use to inhibit warnings;
|
||||||
|
dnl see the discussion above.
|
||||||
|
nowarn_option=' -Xlint:-options'
|
||||||
|
if { rm -f conftest.class \
|
||||||
|
&& { echo "$as_me:__oline__: javac$nowarn_option -d . conftest.java" >&AS_MESSAGE_LOG_FD
|
||||||
|
javac$nowarn_option -d . conftest.java >&AS_MESSAGE_LOG_FD 2>&1
|
||||||
|
} \
|
||||||
|
&& test -f conftest.class
|
||||||
|
} || { \
|
||||||
|
nowarn_option=
|
||||||
|
rm -f conftest.class \
|
||||||
|
&& { echo "$as_me:__oline__: javac$nowarn_option -d . conftest.java" >&AS_MESSAGE_LOG_FD
|
||||||
|
javac$nowarn_option -d . conftest.java >&AS_MESSAGE_LOG_FD 2>&1
|
||||||
|
} \
|
||||||
|
&& test -f conftest.class
|
||||||
|
}; then
|
||||||
|
compiler_cfversion=`func_classfile_version conftest.class`
|
||||||
|
compiler_target_version=`expr $compiler_cfversion - 44`
|
||||||
|
dnl It is hard to determine the compiler_source_version. This would
|
||||||
|
dnl require a list of code snippets that can be compiled only with a
|
||||||
|
dnl specific '-source' option and up, and this list would need to grow
|
||||||
|
dnl every 6 months.
|
||||||
|
dnl Also, javac may point to a shell script that already includes a
|
||||||
|
dnl '-source' option.
|
||||||
|
dnl Therefore, pass a '-source' option always.
|
||||||
|
source_option=' -source '`case "$source_version" in 8) echo 1. ;; esac`"$source_version"
|
||||||
|
dnl And pass a '-target' option as well, if needed.
|
||||||
|
dnl (All supported javac versions support both, see the table above.)
|
||||||
|
if expr $target_version = $compiler_target_version >/dev/null; then
|
||||||
|
target_option=
|
||||||
|
else
|
||||||
|
target_option=' -target '`case "$target_version" in 8) echo 1. ;; esac`"$target_version"
|
||||||
|
fi
|
||||||
|
if { echo "$as_me:__oline__: javac$nowarn_option$source_option$target_option -d . conftest.java" >&AS_MESSAGE_LOG_FD
|
||||||
|
javac$nowarn_option$source_option$target_option -d . conftest.java >&AS_MESSAGE_LOG_FD 2>&1
|
||||||
|
} \
|
||||||
|
&& test -f conftest.class; then
|
||||||
|
dnl The compiler directly supports the desired source_version and
|
||||||
|
dnl target_version. Perfect.
|
||||||
|
CONF_JAVAC="javac$nowarn_option$source_option$target_option"
|
||||||
|
HAVE_JAVAC=1
|
||||||
|
HAVE_JAVACOMP=1
|
||||||
|
else
|
||||||
|
dnl If the desired source_version or target_version were too large
|
||||||
|
dnl for the compiler, there's nothing else we can do.
|
||||||
|
compiler_version=`echo "$as_me:__oline__: javac -version | sed -e 1q" >&AS_MESSAGE_LOG_FD
|
||||||
|
javac -version | sed -e 1q`
|
||||||
|
changequote(,)dnl
|
||||||
|
compiler_version=`echo "$compiler_version" | sed -e 's/^[^0-9]*\([0-9][0-9.]*\).*/\1/'`
|
||||||
|
changequote([,])dnl
|
||||||
|
case "$compiler_version" in
|
||||||
|
1.*) dnl Map 1.8.0_151 to 8.
|
||||||
|
compiler_version=`echo "$compiler_version" | sed -e 's/^1\.//' -e 's/\..*//'`
|
||||||
|
;;
|
||||||
|
*) dnl Map 9.0.4 to 9, 10.0.2 to 10, etc.
|
||||||
|
compiler_version=`echo "$compiler_version" | sed -e 's/\..*//'`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
if expr $source_version '<=' "$compiler_version" >/dev/null \
|
||||||
|
&& expr $target_version '<=' "$compiler_version" >/dev/null; then
|
||||||
|
dnl Increase $source_version and $compiler_version until the
|
||||||
|
dnl compiler accepts these values. This is necessary to make
|
||||||
|
dnl e.g. $source_version = 6 work with Java 12 or newer, or
|
||||||
|
dnl $source_version = 7 work with Java 20 or newer.
|
||||||
|
try_source_version="$source_version"
|
||||||
|
try_target_version="$target_version"
|
||||||
|
while true; do
|
||||||
|
dnl Invariant: $try_source_version <= $try_target_version.
|
||||||
|
if expr $try_source_version = $try_target_version >/dev/null; then
|
||||||
|
try_target_version=`expr $try_target_version + 1`
|
||||||
|
fi
|
||||||
|
try_source_version=`expr $try_source_version + 1`
|
||||||
|
expr $try_source_version '<=' $compiler_version >/dev/null || break
|
||||||
|
source_option=' -source '`case "$try_source_version" in 8) echo 1. ;; esac`"$try_source_version"
|
||||||
|
if expr $try_target_version = $compiler_target_version >/dev/null; then
|
||||||
|
target_option=
|
||||||
|
else
|
||||||
|
target_option=' -target '`case "$try_target_version" in 8) echo 1. ;; esac`"$try_target_version"
|
||||||
|
fi
|
||||||
|
if { echo "$as_me:__oline__: javac$nowarn_option$source_option$target_option -d . conftest.java" >&AS_MESSAGE_LOG_FD
|
||||||
|
javac$nowarn_option$source_option$target_option -d . conftest.java >&AS_MESSAGE_LOG_FD 2>&1
|
||||||
|
} \
|
||||||
|
&& test -f conftest.class; then
|
||||||
|
dnl The compiler supports the try_source_version and
|
||||||
|
dnl try_target_version. It's better than nothing.
|
||||||
|
CONF_JAVAC="javac$nowarn_option$source_option$target_option"
|
||||||
|
HAVE_JAVAC=1
|
||||||
|
HAVE_JAVACOMP=1
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
rm -f conftest*.java conftest*.class
|
||||||
|
fi
|
||||||
|
if test -n "$HAVE_JAVACOMP"; then
|
||||||
|
ac_result="$CONF_JAVAC"
|
||||||
|
else
|
||||||
|
ac_result="no"
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT([$ac_result])
|
||||||
|
AC_SUBST([CONF_JAVAC])
|
||||||
|
AC_SUBST([CLASSPATH])
|
||||||
|
AC_SUBST([CLASSPATH_SEPARATOR])
|
||||||
|
AC_SUBST([HAVE_JAVAC_ENVVAR])
|
||||||
|
AC_SUBST([HAVE_JAVAC])
|
||||||
|
])
|
||||||
|
|
||||||
|
# Simulates gt_JAVACOMP when no Java support is desired.
|
||||||
|
AC_DEFUN([gt_JAVACOMP_DISABLED],
|
||||||
|
[
|
||||||
|
CONF_JAVAC=
|
||||||
|
HAVE_JAVAC_ENVVAR=
|
||||||
|
HAVE_JAVAC=
|
||||||
|
AC_SUBST([CONF_JAVAC])
|
||||||
|
AC_SUBST([HAVE_JAVAC_ENVVAR])
|
||||||
|
AC_SUBST([HAVE_JAVAC])
|
||||||
|
])
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Compile a Java program.
|
||||||
|
|
||||||
|
# Copyright (C) 2001-2026 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 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/>.
|
||||||
|
|
||||||
|
# This uses the same choices as javacomp.c, but instead of relying on the
|
||||||
|
# environment settings at run time, it uses the environment variables
|
||||||
|
# present at configuration time.
|
||||||
|
#
|
||||||
|
# This is a separate shell script, because it must be able to unset JAVA_HOME
|
||||||
|
# in some cases, which a simple shell command cannot do.
|
||||||
|
#
|
||||||
|
# The extra CLASSPATH must have been set prior to calling this script.
|
||||||
|
# Options that can be passed are -O, -g and "-d DIRECTORY".
|
||||||
|
|
||||||
|
CONF_JAVAC='@CONF_JAVAC@'
|
||||||
|
CONF_CLASSPATH='@CLASSPATH@'
|
||||||
|
if test -n "@HAVE_JAVAC_ENVVAR@"; then
|
||||||
|
# Combine given CLASSPATH and configured CLASSPATH.
|
||||||
|
if test -n "$CLASSPATH"; then
|
||||||
|
CLASSPATH="$CLASSPATH${CONF_CLASSPATH:+@CLASSPATH_SEPARATOR@$CONF_CLASSPATH}"
|
||||||
|
else
|
||||||
|
CLASSPATH="$CONF_CLASSPATH"
|
||||||
|
fi
|
||||||
|
export CLASSPATH
|
||||||
|
test -z "$JAVA_VERBOSE" || echo "$CONF_JAVAC $@" 1>&2
|
||||||
|
exec $CONF_JAVAC "$@"
|
||||||
|
else
|
||||||
|
unset JAVA_HOME
|
||||||
|
if test -n "@HAVE_JAVAC@"; then
|
||||||
|
# In this case, $CONF_JAVAC starts with "javac".
|
||||||
|
CLASSPATH="$CLASSPATH"
|
||||||
|
export CLASSPATH
|
||||||
|
test -z "$JAVA_VERBOSE" || echo "$CONF_JAVAC $@" 1>&2
|
||||||
|
exec $CONF_JAVAC "$@"
|
||||||
|
else
|
||||||
|
echo 'Java compiler not found, try setting $JAVAC, then reconfigure' 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
# javaexec.m4
|
||||||
|
# serial 11
|
||||||
|
dnl Copyright (C) 2001-2003, 2006, 2009-2026 Free Software Foundation, Inc.
|
||||||
|
dnl This file is free software; the Free Software Foundation
|
||||||
|
dnl gives unlimited permission to copy and/or distribute it,
|
||||||
|
dnl with or without modifications, as long as this notice is preserved.
|
||||||
|
dnl This file is offered as-is, without any warranty.
|
||||||
|
|
||||||
|
# Prerequisites of javaexec.sh.
|
||||||
|
# gt_JAVAEXEC or gt_JAVAEXEC(testclass, its-directory)
|
||||||
|
# Sets HAVE_JAVAEXEC to nonempty if javaexec.sh will work.
|
||||||
|
|
||||||
|
AC_DEFUN([gt_JAVAEXEC],
|
||||||
|
[
|
||||||
|
AC_MSG_CHECKING([for Java virtual machine])
|
||||||
|
AC_EGREP_CPP([yes], [
|
||||||
|
#if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
|
||||||
|
yes
|
||||||
|
#endif
|
||||||
|
], CLASSPATH_SEPARATOR=';', CLASSPATH_SEPARATOR=':')
|
||||||
|
CONF_JAVA=
|
||||||
|
HAVE_JAVA_ENVVAR=
|
||||||
|
HAVE_JAVA=
|
||||||
|
HAVE_JRE=
|
||||||
|
HAVE_JAVAEXEC=1
|
||||||
|
if test -n "$JAVA"; then
|
||||||
|
HAVE_JAVA_ENVVAR=1
|
||||||
|
CONF_JAVA="$JAVA"
|
||||||
|
else
|
||||||
|
pushdef([AC_MSG_CHECKING],[:])dnl
|
||||||
|
pushdef([AC_CHECKING],[:])dnl
|
||||||
|
pushdef([AC_MSG_RESULT],[:])dnl
|
||||||
|
AC_CHECK_PROG([HAVE_JAVA_IN_PATH], [java], [yes])
|
||||||
|
AC_CHECK_PROG([HAVE_JRE_IN_PATH], [jre], [yes])
|
||||||
|
popdef([AC_MSG_RESULT])dnl
|
||||||
|
popdef([AC_CHECKING])dnl
|
||||||
|
popdef([AC_MSG_CHECKING])dnl
|
||||||
|
m4_if([$1], , , [
|
||||||
|
gt_saved_CLASSPATH="$CLASSPATH"
|
||||||
|
CLASSPATH="$2"${CLASSPATH+"$CLASSPATH_SEPARATOR$CLASSPATH"}
|
||||||
|
])
|
||||||
|
export CLASSPATH
|
||||||
|
if test -n "$HAVE_JAVA_IN_PATH" \
|
||||||
|
&& java -version >/dev/null 2>/dev/null \
|
||||||
|
m4_if([$1], , , [&& {
|
||||||
|
echo "$as_me:__oline__: java $1" >&AS_MESSAGE_LOG_FD
|
||||||
|
java $1 >&AS_MESSAGE_LOG_FD 2>&1
|
||||||
|
}]); then
|
||||||
|
HAVE_JAVA=1
|
||||||
|
CONF_JAVA="java"
|
||||||
|
else
|
||||||
|
if test -n "$HAVE_JRE_IN_PATH" \
|
||||||
|
&& (jre >/dev/null 2>/dev/null || test $? = 1) \
|
||||||
|
m4_if([$1], , , [&& {
|
||||||
|
echo "$as_me:__oline__: jre $1" >&AS_MESSAGE_LOG_FD
|
||||||
|
jre $1 >&AS_MESSAGE_LOG_FD 2>&1
|
||||||
|
}]); then
|
||||||
|
HAVE_JRE=1
|
||||||
|
CONF_JAVA="jre"
|
||||||
|
else
|
||||||
|
HAVE_JAVAEXEC=
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
m4_if([$1], , , [
|
||||||
|
CLASSPATH="$gt_saved_CLASSPATH"
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
if test -n "$HAVE_JAVAEXEC"; then
|
||||||
|
ac_result="$CONF_JAVA"
|
||||||
|
else
|
||||||
|
ac_result="no"
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT([$ac_result])
|
||||||
|
AC_SUBST([CONF_JAVA])
|
||||||
|
AC_SUBST([CLASSPATH])
|
||||||
|
AC_SUBST([CLASSPATH_SEPARATOR])
|
||||||
|
AC_SUBST([HAVE_JAVA_ENVVAR])
|
||||||
|
AC_SUBST([HAVE_JAVA])
|
||||||
|
AC_SUBST([HAVE_JRE])
|
||||||
|
])
|
||||||
|
|
||||||
|
# Simulates gt_JAVAEXEC when no Java support is desired.
|
||||||
|
AC_DEFUN([gt_JAVAEXEC_DISABLED],
|
||||||
|
[
|
||||||
|
CONF_JAVA=
|
||||||
|
HAVE_JAVA_ENVVAR=
|
||||||
|
HAVE_JAVA=
|
||||||
|
HAVE_JRE=
|
||||||
|
AC_SUBST([CONF_JAVA])
|
||||||
|
AC_SUBST([HAVE_JAVA_ENVVAR])
|
||||||
|
AC_SUBST([HAVE_JAVA])
|
||||||
|
AC_SUBST([HAVE_JRE])
|
||||||
|
])
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Execute a Java program.
|
||||||
|
|
||||||
|
# Copyright (C) 2001-2026 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 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/>.
|
||||||
|
|
||||||
|
# This uses the same choices as javaexec.c, but instead of relying on the
|
||||||
|
# environment settings at run time, it uses the environment variables
|
||||||
|
# present at configuration time.
|
||||||
|
#
|
||||||
|
# This is a separate shell script, because it must be able to unset JAVA_HOME
|
||||||
|
# in some cases, which a simple shell command cannot do.
|
||||||
|
#
|
||||||
|
# The extra CLASSPATH must have been set prior to calling this script.
|
||||||
|
|
||||||
|
CONF_JAVA='@CONF_JAVA@'
|
||||||
|
CONF_CLASSPATH='@CLASSPATH@'
|
||||||
|
if test -n "@HAVE_JAVA_ENVVAR@"; then
|
||||||
|
# Combine given CLASSPATH and configured CLASSPATH.
|
||||||
|
if test -n "$CLASSPATH"; then
|
||||||
|
CLASSPATH="$CLASSPATH${CONF_CLASSPATH:+@CLASSPATH_SEPARATOR@$CONF_CLASSPATH}"
|
||||||
|
else
|
||||||
|
CLASSPATH="$CONF_CLASSPATH"
|
||||||
|
fi
|
||||||
|
export CLASSPATH
|
||||||
|
test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@" 1>&2
|
||||||
|
exec $CONF_JAVA "$@"
|
||||||
|
else
|
||||||
|
unset JAVA_HOME
|
||||||
|
export CLASSPATH
|
||||||
|
if test -n "@HAVE_JAVA@"; then
|
||||||
|
# In this case, $CONF_JAVA is "java".
|
||||||
|
test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@" 1>&2
|
||||||
|
exec $CONF_JAVA "$@"
|
||||||
|
else
|
||||||
|
if test -n "@HAVE_JRE@"; then
|
||||||
|
# In this case, $CONF_JAVA is "jre".
|
||||||
|
test -z "$JAVA_VERBOSE" || echo "$CONF_JAVA $@" 1>&2
|
||||||
|
exec $CONF_JAVA "$@"
|
||||||
|
else
|
||||||
|
echo 'Java virtual machine not found, try setting $JAVA, then reconfigure' 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
# modula2comp.m4
|
||||||
|
# serial 1
|
||||||
|
dnl Copyright (C) 2025-2026 Free Software Foundation, Inc.
|
||||||
|
dnl This file is free software; the Free Software Foundation
|
||||||
|
dnl gives unlimited permission to copy and/or distribute it,
|
||||||
|
dnl with or without modifications, as long as this notice is preserved.
|
||||||
|
dnl This file is offered as-is, without any warranty.
|
||||||
|
|
||||||
|
# Checks for a Modula-2 implementation.
|
||||||
|
# Sets M2C and M2FLAGS (options that can be used with "$M2C").
|
||||||
|
AC_DEFUN([gt_MODULA2COMP],
|
||||||
|
[
|
||||||
|
AC_MSG_CHECKING([for GNU Modula-2 compiler])
|
||||||
|
pushdef([AC_MSG_CHECKING],[:])dnl
|
||||||
|
pushdef([AC_CHECKING],[:])dnl
|
||||||
|
pushdef([AC_MSG_RESULT],[:])dnl
|
||||||
|
AC_ARG_VAR([M2C], [Modula-2 compiler command])
|
||||||
|
AC_ARG_VAR([M2FLAGS], [Modula-2 compiler options])
|
||||||
|
AC_CHECK_TOOLS([M2C], [gm2])
|
||||||
|
popdef([AC_MSG_RESULT])dnl
|
||||||
|
popdef([AC_CHECKING])dnl
|
||||||
|
popdef([AC_MSG_CHECKING])dnl
|
||||||
|
if test -n "$M2C"; then
|
||||||
|
ac_result="$M2C"
|
||||||
|
else
|
||||||
|
ac_result="no"
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT([$ac_result])
|
||||||
|
AC_SUBST([M2C])
|
||||||
|
if test -z "$M2FLAGS" && test -n "$M2C"; then
|
||||||
|
M2FLAGS="-g -O2"
|
||||||
|
fi
|
||||||
|
AC_SUBST([M2FLAGS])
|
||||||
|
])
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
This example relies on:
|
||||||
|
- the GNOME libraries (libgnomeui, libgnome, libgnomesupport, libart_lgpl)
|
||||||
|
and their dependencies: imlib (libgdk_imlib), audiofile (libaudiofile),
|
||||||
|
esound (libesd), zlib (libz).
|
||||||
|
- the GTK libraries (libgtk, libgdk)
|
||||||
|
- the glib libraries (libglib, libgmodule)
|
||||||
|
- the X11 libraries
|
||||||
|
- the GTK / C++ bindings (libgtkmm, libgdkmm)
|
||||||
|
- the C++ signal/slot library (libsigc++)
|
||||||
|
- the C++ runtime libraries (libstdc++)
|
||||||
|
|
||||||
|
Installation:
|
||||||
|
./autogen.sh
|
||||||
|
./configure --prefix=/some/prefix
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
Cleanup:
|
||||||
|
make distclean
|
||||||
|
./autoclean.sh
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
# Example for use of GNU gettext.
|
||||||
|
# This file is in the public domain.
|
||||||
|
#
|
||||||
|
# Makefile configuration - processed by automake.
|
||||||
|
|
||||||
|
# General automake options.
|
||||||
|
AUTOMAKE_OPTIONS = foreign no-dependencies
|
||||||
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
|
# The list of subdirectories containing Makefiles.
|
||||||
|
SUBDIRS = m4 po
|
||||||
|
|
||||||
|
# The list of programs that are built.
|
||||||
|
bin_PROGRAMS = hello
|
||||||
|
|
||||||
|
# The source files of the 'hello' program.
|
||||||
|
hello_SOURCES = hello.cc
|
||||||
|
|
||||||
|
# Define a C macro LOCALEDIR indicating where catalogs will be installed.
|
||||||
|
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
|
||||||
|
|
||||||
|
# Make sure the gnome.h include file is found.
|
||||||
|
AM_CPPFLAGS = $(GTKMM_CFLAGS) $(GNOME_INCLUDEDIR)
|
||||||
|
|
||||||
|
# Link time dependencies.
|
||||||
|
LDADD = $(GTKMM_LIBS) $(GNOME_LIBDIR) $(GNOMEUI_LIBS) @LIBINTL@
|
||||||
|
|
||||||
|
# Additional files to be distributed.
|
||||||
|
EXTRA_DIST = autogen.sh autoclean.sh
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Example for use of GNU gettext.
|
||||||
|
# This file is in the public domain.
|
||||||
|
#
|
||||||
|
# Script for cleaning all autogenerated files.
|
||||||
|
|
||||||
|
test ! -f Makefile || make distclean
|
||||||
|
rm -rf autom4te.cache
|
||||||
|
|
||||||
|
# Brought in by autopoint.
|
||||||
|
rm -f ABOUT-NLS
|
||||||
|
rm -f config.rpath
|
||||||
|
rm -f m4/gettext.m4
|
||||||
|
rm -f m4/build-to-host.m4
|
||||||
|
rm -f m4/host-cpu-c-abi.m4
|
||||||
|
rm -f m4/iconv.m4
|
||||||
|
rm -f m4/intlmacosx.m4
|
||||||
|
rm -f m4/lib-ld.m4
|
||||||
|
rm -f m4/lib-link.m4
|
||||||
|
rm -f m4/lib-prefix.m4
|
||||||
|
rm -f m4/nls.m4
|
||||||
|
rm -f m4/po.m4
|
||||||
|
rm -f m4/progtest.m4
|
||||||
|
rm -f po/Makefile.in.in
|
||||||
|
rm -f po/fetch-po
|
||||||
|
rm -f po/remove-potcdate.sed
|
||||||
|
|
||||||
|
# Generated by aclocal.
|
||||||
|
rm -f aclocal.m4
|
||||||
|
|
||||||
|
# Generated by autoconf.
|
||||||
|
rm -f configure
|
||||||
|
|
||||||
|
# Generated or brought in by automake.
|
||||||
|
rm -f Makefile.in
|
||||||
|
rm -f m4/Makefile.in
|
||||||
|
rm -f compile
|
||||||
|
rm -f install-sh
|
||||||
|
rm -f missing
|
||||||
|
rm -f config.guess
|
||||||
|
rm -f config.sub
|
||||||
|
rm -f po/*.pot
|
||||||
|
rm -f po/stamp-po
|
||||||
|
rm -f po/*.gmo
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Example for use of GNU gettext.
|
||||||
|
# This file is in the public domain.
|
||||||
|
#
|
||||||
|
# Script for regenerating all autogenerated files.
|
||||||
|
|
||||||
|
autopoint -f # was: gettextize -f -c
|
||||||
|
rm po/Makevars.template
|
||||||
|
rm po/Rules-quot
|
||||||
|
rm po/boldquot.sed
|
||||||
|
rm po/en@boldquot.header
|
||||||
|
rm po/en@quot.header
|
||||||
|
rm po/insert-header.sed
|
||||||
|
rm po/quot.sed
|
||||||
|
|
||||||
|
aclocal -I m4
|
||||||
|
|
||||||
|
autoconf
|
||||||
|
|
||||||
|
automake -a -c
|
||||||
|
|
||||||
|
cd po
|
||||||
|
for f in *.po; do
|
||||||
|
if test -r "$f"; then
|
||||||
|
lang=`echo $f | sed -e 's,\.po$,,'`
|
||||||
|
msgfmt -c -o $lang.gmo $lang.po
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
cd ..
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
dnl Example for use of GNU gettext.
|
||||||
|
dnl This file is in the public domain.
|
||||||
|
dnl
|
||||||
|
dnl Configuration file - processed by autoconf.
|
||||||
|
|
||||||
|
AC_INIT([hello-c++-gnome2], [0], , [hello-c++-gnome2])
|
||||||
|
AC_CONFIG_SRCDIR([hello.cc])
|
||||||
|
AM_INIT_AUTOMAKE([1.11])
|
||||||
|
|
||||||
|
AC_PROG_CXX
|
||||||
|
|
||||||
|
GNOME_INIT
|
||||||
|
GTKMM_CFLAGS=`gtkmm-config --cflags`
|
||||||
|
AC_SUBST([GTKMM_CFLAGS])
|
||||||
|
GTKMM_LIBS=`gtkmm-config --libs`
|
||||||
|
AC_SUBST([GTKMM_LIBS])
|
||||||
|
|
||||||
|
AM_GNU_GETTEXT([external])
|
||||||
|
AM_GNU_GETTEXT_VERSION([1.0])
|
||||||
|
|
||||||
|
AC_CONFIG_FILES([Makefile])
|
||||||
|
AC_CONFIG_FILES([m4/Makefile])
|
||||||
|
AC_CONFIG_FILES([po/Makefile.in])
|
||||||
|
AC_OUTPUT
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
/* Example for use of GNU gettext.
|
||||||
|
This file is in the public domain.
|
||||||
|
|
||||||
|
Source code of the C++ program. */
|
||||||
|
|
||||||
|
|
||||||
|
/* Get GNOME declarations. */
|
||||||
|
#include <gnome.h>
|
||||||
|
#include <gtk--.h>
|
||||||
|
|
||||||
|
/* Get getpid() declaration. */
|
||||||
|
#if defined _WIN32 && !defined __CYGWIN__
|
||||||
|
/* native Windows API */
|
||||||
|
# include <process.h>
|
||||||
|
# define getpid _getpid
|
||||||
|
#else
|
||||||
|
/* POSIX API */
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static Gtk::Main *application;
|
||||||
|
|
||||||
|
static gint
|
||||||
|
quit_callback (GdkEventAny*)
|
||||||
|
{
|
||||||
|
application->quit ();
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main (int argc, char *argv[])
|
||||||
|
{
|
||||||
|
Gtk::Window *window;
|
||||||
|
Gtk::VBox *panel;
|
||||||
|
Gtk::Label *label1;
|
||||||
|
Gtk::Alignment *label1aligned;
|
||||||
|
Gtk::Label *label2;
|
||||||
|
Gtk::Alignment *label2aligned;
|
||||||
|
Gtk::Button *button;
|
||||||
|
Gtk::HButtonBox *buttonbar;
|
||||||
|
|
||||||
|
/* Initializations. */
|
||||||
|
|
||||||
|
setlocale (LC_ALL, "");
|
||||||
|
application = new Gtk::Main (argc, argv);
|
||||||
|
textdomain ("hello-c++-gnome2");
|
||||||
|
bindtextdomain ("hello-c++-gnome2", LOCALEDIR);
|
||||||
|
|
||||||
|
/* Create the GUI elements. */
|
||||||
|
|
||||||
|
window = new Gtk::Window (GTK_WINDOW_TOPLEVEL);
|
||||||
|
window->set_title ("Hello example");
|
||||||
|
window->realize ();
|
||||||
|
window->delete_event.connect (SigC::slot (quit_callback));
|
||||||
|
|
||||||
|
label1 = new Gtk::Label (_("Hello, world!"));
|
||||||
|
|
||||||
|
label1aligned = new Gtk::Alignment (0.0, 0.5, 0, 0);
|
||||||
|
label1aligned->add (*label1);
|
||||||
|
|
||||||
|
label2 = new Gtk::Label (g_strdup_printf (_("This program is running as process number %d."), getpid ()));
|
||||||
|
|
||||||
|
label2aligned = new Gtk::Alignment (0.0, 0.5, 0, 0);
|
||||||
|
label2aligned->add (*label2);
|
||||||
|
|
||||||
|
button = new Gtk::Button ("OK");
|
||||||
|
button->clicked.connect (Gtk::Main::quit.slot()); //slot (quit_callback));
|
||||||
|
|
||||||
|
buttonbar = new Gtk::HButtonBox (GTK_BUTTONBOX_END);
|
||||||
|
buttonbar->pack_start (*button);
|
||||||
|
|
||||||
|
panel = new Gtk::VBox (false, GNOME_PAD_SMALL);
|
||||||
|
panel->pack_start (*label1aligned);
|
||||||
|
panel->pack_start (*label2aligned);
|
||||||
|
panel->pack_start (*buttonbar);
|
||||||
|
|
||||||
|
window->add (*panel);
|
||||||
|
|
||||||
|
/* Make the GUI elements visible. */
|
||||||
|
|
||||||
|
label1->show ();
|
||||||
|
label1aligned->show ();
|
||||||
|
label2->show ();
|
||||||
|
label2aligned->show ();
|
||||||
|
button->show ();
|
||||||
|
buttonbar->show ();
|
||||||
|
panel->show ();
|
||||||
|
window->show ();
|
||||||
|
|
||||||
|
/* Start the event loop. */
|
||||||
|
|
||||||
|
application->run ();
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
EXTRA_DIST = \
|
||||||
|
gettext.m4 build-to-host.m4 host-cpu-c-abi.m4 \
|
||||||
|
iconv.m4 intlmacosx.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 \
|
||||||
|
nls.m4 po.m4 progtest.m4 \
|
||||||
|
gnome.m4 gnome-gnorba-check.m4 gnome-orbit-check.m4 \
|
||||||
|
gtk.m4 gtk--.m4
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
dnl
|
||||||
|
dnl GNOME_GNORBA_HOOK (script-if-gnorba-found, failflag)
|
||||||
|
dnl
|
||||||
|
dnl if failflag is "failure" it aborts if gnorba is not found.
|
||||||
|
dnl
|
||||||
|
|
||||||
|
AC_DEFUN([GNOME_GNORBA_HOOK],[
|
||||||
|
GNOME_ORBIT_HOOK([],$2)
|
||||||
|
AC_CACHE_CHECK([for gnorba libraries],gnome_cv_gnorba_found,[
|
||||||
|
gnome_cv_gnorba_found=no
|
||||||
|
if test x$gnome_cv_orbit_found = xyes; then
|
||||||
|
GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
|
||||||
|
GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
|
||||||
|
if test -n "$GNORBA_LIBS"; then
|
||||||
|
gnome_cv_gnorba_found=yes
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
AM_CONDITIONAL(HAVE_GNORBA, test x$gnome_cv_gnorba_found = xyes)
|
||||||
|
if test x$gnome_cv_orbit_found = xyes; then
|
||||||
|
$1
|
||||||
|
GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
|
||||||
|
GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
|
||||||
|
AC_SUBST(GNORBA_CFLAGS)
|
||||||
|
AC_SUBST(GNORBA_LIBS)
|
||||||
|
else
|
||||||
|
if test x$2 = xfailure; then
|
||||||
|
AC_MSG_ERROR(gnorba library not installed or installation problem)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([GNOME_GNORBA_CHECK], [
|
||||||
|
GNOME_GNORBA_HOOK([],failure)
|
||||||
|
])
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
dnl
|
||||||
|
dnl GNOME_ORBIT_HOOK (script-if-orbit-found, failflag)
|
||||||
|
dnl
|
||||||
|
dnl if failflag is "failure" it aborts if orbit is not found.
|
||||||
|
dnl
|
||||||
|
|
||||||
|
AC_DEFUN([GNOME_ORBIT_HOOK],[
|
||||||
|
AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no)
|
||||||
|
AC_PATH_PROG(ORBIT_IDL,orbit-idl,no)
|
||||||
|
AC_CACHE_CHECK([for working ORBit environment],gnome_cv_orbit_found,[
|
||||||
|
if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then
|
||||||
|
gnome_cv_orbit_found=no
|
||||||
|
else
|
||||||
|
gnome_cv_orbit_found=yes
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
AM_CONDITIONAL(HAVE_ORBIT, test x$gnome_cv_orbit_found = xyes)
|
||||||
|
if test x$gnome_cv_orbit_found = xyes; then
|
||||||
|
$1
|
||||||
|
ORBIT_CFLAGS=`orbit-config --cflags client server`
|
||||||
|
ORBIT_LIBS=`orbit-config --use-service=name --libs client server`
|
||||||
|
AC_SUBST(ORBIT_CFLAGS)
|
||||||
|
AC_SUBST(ORBIT_LIBS)
|
||||||
|
else
|
||||||
|
if test x$2 = xfailure; then
|
||||||
|
AC_MSG_ERROR(ORBit not installed or installation problem)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([GNOME_ORBIT_CHECK], [
|
||||||
|
GNOME_ORBIT_HOOK([],failure)
|
||||||
|
])
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
dnl
|
||||||
|
dnl GNOME_INIT_HOOK (script-if-gnome-enabled, [failflag], [additional-inits])
|
||||||
|
dnl
|
||||||
|
dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh
|
||||||
|
dnl is not found.
|
||||||
|
dnl
|
||||||
|
|
||||||
|
AC_DEFUN([GNOME_INIT_HOOK],[
|
||||||
|
AC_SUBST(GNOME_LIBS)
|
||||||
|
AC_SUBST(GNOMEUI_LIBS)
|
||||||
|
AC_SUBST(GNOMEGNORBA_LIBS)
|
||||||
|
AC_SUBST(GTKXMHTML_LIBS)
|
||||||
|
AC_SUBST(ZVT_LIBS)
|
||||||
|
AC_SUBST(GNOME_LIBDIR)
|
||||||
|
AC_SUBST(GNOME_INCLUDEDIR)
|
||||||
|
|
||||||
|
AC_ARG_WITH(gnome-includes,
|
||||||
|
[ --with-gnome-includes Specify location of GNOME headers],[
|
||||||
|
CFLAGS="$CFLAGS -I$withval"
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_ARG_WITH(gnome-libs,
|
||||||
|
[ --with-gnome-libs Specify location of GNOME libs],[
|
||||||
|
LDFLAGS="$LDFLAGS -L$withval"
|
||||||
|
gnome_prefix=$withval
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_ARG_WITH(gnome,
|
||||||
|
[ --with-gnome Specify prefix for GNOME files],
|
||||||
|
if test x$withval = xyes; then
|
||||||
|
want_gnome=yes
|
||||||
|
dnl Note that an empty true branch is not
|
||||||
|
dnl valid sh syntax.
|
||||||
|
ifelse([$1], [], :, [$1])
|
||||||
|
else
|
||||||
|
if test "x$withval" = xno; then
|
||||||
|
want_gnome=no
|
||||||
|
else
|
||||||
|
want_gnome=yes
|
||||||
|
LDFLAGS="$LDFLAGS -L$withval/lib"
|
||||||
|
CFLAGS="$CFLAGS -I$withval/include"
|
||||||
|
gnome_prefix=$withval/lib
|
||||||
|
fi
|
||||||
|
fi,
|
||||||
|
want_gnome=yes)
|
||||||
|
|
||||||
|
if test "x$want_gnome" = xyes; then
|
||||||
|
|
||||||
|
AC_PATH_PROG(GNOME_CONFIG,gnome-config,no)
|
||||||
|
if test "$GNOME_CONFIG" = "no"; then
|
||||||
|
no_gnome_config="yes"
|
||||||
|
else
|
||||||
|
AC_MSG_CHECKING(if $GNOME_CONFIG works)
|
||||||
|
if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
GNOME_GNORBA_HOOK([],$2)
|
||||||
|
GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`"
|
||||||
|
GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`"
|
||||||
|
GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`"
|
||||||
|
GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`"
|
||||||
|
ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`"
|
||||||
|
GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`"
|
||||||
|
GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`"
|
||||||
|
$1
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
no_gnome_config="yes"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x$exec_prefix = xNONE; then
|
||||||
|
if test x$prefix = xNONE; then
|
||||||
|
gnome_prefix=$ac_default_prefix/lib
|
||||||
|
else
|
||||||
|
gnome_prefix=$prefix/lib
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
gnome_prefix=`eval echo \`echo $libdir\``
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$no_gnome_config" = "yes"; then
|
||||||
|
AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix)
|
||||||
|
if test -f $gnome_prefix/gnomeConf.sh; then
|
||||||
|
AC_MSG_RESULT(found)
|
||||||
|
echo "loading gnome configuration from" \
|
||||||
|
"$gnome_prefix/gnomeConf.sh"
|
||||||
|
. $gnome_prefix/gnomeConf.sh
|
||||||
|
$1
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(not found)
|
||||||
|
if test x$2 = xfail; then
|
||||||
|
AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -n "$3"; then
|
||||||
|
n="$3"
|
||||||
|
for i in $n; do
|
||||||
|
AC_MSG_CHECKING(extra library \"$i\")
|
||||||
|
case $i in
|
||||||
|
applets)
|
||||||
|
AC_SUBST(GNOME_APPLETS_LIBS)
|
||||||
|
GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets`
|
||||||
|
AC_MSG_RESULT($GNOME_APPLETS_LIBS);;
|
||||||
|
docklets)
|
||||||
|
AC_SUBST(GNOME_DOCKLETS_LIBS)
|
||||||
|
GNOME_DOCKLETS_LIBS=`$GNOME_CONFIG --libs-only-l docklets`
|
||||||
|
AC_MSG_RESULT($GNOME_DOCKLETS_LIBS);;
|
||||||
|
capplet)
|
||||||
|
AC_SUBST(GNOME_CAPPLET_LIBS)
|
||||||
|
GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet`
|
||||||
|
AC_MSG_RESULT($GNOME_CAPPLET_LIBS);;
|
||||||
|
*)
|
||||||
|
AC_MSG_RESULT(unknown library)
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl GNOME_INIT ([additional-inits])
|
||||||
|
dnl
|
||||||
|
|
||||||
|
AC_DEFUN([GNOME_INIT],[
|
||||||
|
GNOME_INIT_HOOK([],fail,$1)
|
||||||
|
])
|
||||||
@@ -0,0 +1,195 @@
|
|||||||
|
# Configure paths for GTK--
|
||||||
|
# Erik Andersen 30 May 1998
|
||||||
|
# Modified by Tero Pulkkinen (added the compiler checks... I hope they work..)
|
||||||
|
# Modified by Thomas Langen 16 Jan 2000 (corrected CXXFLAGS)
|
||||||
|
|
||||||
|
dnl Test for GTKMM, and define GTKMM_CFLAGS and GTKMM_LIBS
|
||||||
|
dnl to be used as follows:
|
||||||
|
dnl AM_PATH_GTKMM([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
dnl
|
||||||
|
AC_DEFUN([AM_PATH_GTKMM],
|
||||||
|
[dnl
|
||||||
|
dnl Get the cflags and libraries from the gtkmm-config script
|
||||||
|
dnl
|
||||||
|
AC_ARG_WITH(gtkmm-prefix,[ --with-gtkmm-prefix=PREFIX
|
||||||
|
Prefix where GTK-- is installed (optional)],
|
||||||
|
gtkmm_config_prefix="$withval", gtkmm_config_prefix="")
|
||||||
|
AC_ARG_WITH(gtkmm-exec-prefix,[ --with-gtkmm-exec-prefix=PREFIX
|
||||||
|
Exec prefix where GTK-- is installed (optional)],
|
||||||
|
gtkmm_config_exec_prefix="$withval", gtkmm_config_exec_prefix="")
|
||||||
|
AC_ARG_ENABLE(gtkmmtest, [ --disable-gtkmmtest Do not try to compile and run a test GTK-- program],
|
||||||
|
, enable_gtkmmtest=yes)
|
||||||
|
|
||||||
|
if test x$gtkmm_config_exec_prefix != x ; then
|
||||||
|
gtkmm_config_args="$gtkmm_config_args --exec-prefix=$gtkmm_config_exec_prefix"
|
||||||
|
if test x${GTKMM_CONFIG+set} != xset ; then
|
||||||
|
GTKMM_CONFIG=$gtkmm_config_exec_prefix/bin/gtkmm-config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test x$gtkmm_config_prefix != x ; then
|
||||||
|
gtkmm_config_args="$gtkmm_config_args --prefix=$gtkmm_config_prefix"
|
||||||
|
if test x${GTKMM_CONFIG+set} != xset ; then
|
||||||
|
GTKMM_CONFIG=$gtkmm_config_prefix/bin/gtkmm-config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_PATH_PROG(GTKMM_CONFIG, gtkmm-config, no)
|
||||||
|
min_gtkmm_version=ifelse([$1], ,0.10.0,$1)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for GTK-- - version >= $min_gtkmm_version)
|
||||||
|
AC_LANG_SAVE
|
||||||
|
no_gtkmm=""
|
||||||
|
if test "$GTKMM_CONFIG" = "no" ; then
|
||||||
|
no_gtkmm=yes
|
||||||
|
else
|
||||||
|
AC_LANG_CPLUSPLUS
|
||||||
|
|
||||||
|
GTKMM_CFLAGS=`$GTKMM_CONFIG $gtkmm_config_args --cflags`
|
||||||
|
GTKMM_LIBS=`$GTKMM_CONFIG $gtkmm_config_args --libs`
|
||||||
|
gtkmm_config_major_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||||
|
gtkmm_config_minor_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||||
|
gtkmm_config_micro_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||||
|
if test "x$enable_gtkmmtest" = "xyes" ; then
|
||||||
|
ac_save_CXXFLAGS="$CXXFLAGS"
|
||||||
|
ac_save_LIBS="$LIBS"
|
||||||
|
CXXFLAGS="$CXXFLAGS $GTKMM_CFLAGS"
|
||||||
|
LIBS="$LIBS $GTKMM_LIBS"
|
||||||
|
dnl
|
||||||
|
dnl Now check if the installed GTK-- is sufficiently new. (Also sanity
|
||||||
|
dnl checks the results of gtkmm-config to some extent
|
||||||
|
dnl
|
||||||
|
rm -f conf.gtkmmtest
|
||||||
|
AC_TRY_RUN([
|
||||||
|
#include <gtk--.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
int major, minor, micro;
|
||||||
|
char *tmp_version;
|
||||||
|
|
||||||
|
system ("touch conf.gtkmmtest");
|
||||||
|
|
||||||
|
/* HP/UX 0 (%@#!) writes to sscanf strings */
|
||||||
|
tmp_version = g_strdup("$min_gtkmm_version");
|
||||||
|
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||||
|
printf("%s, bad version string\n", "$min_gtkmm_version");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((gtkmm_major_version != $gtkmm_config_major_version) ||
|
||||||
|
(gtkmm_minor_version != $gtkmm_config_minor_version) ||
|
||||||
|
(gtkmm_micro_version != $gtkmm_config_micro_version))
|
||||||
|
{
|
||||||
|
printf("\n*** 'gtkmm-config --version' returned %d.%d.%d, but GTK-- (%d.%d.%d)\n",
|
||||||
|
$gtkmm_config_major_version, $gtkmm_config_minor_version, $gtkmm_config_micro_version,
|
||||||
|
gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
|
||||||
|
printf ("*** was found! If gtkmm-config was correct, then it is best\n");
|
||||||
|
printf ("*** to remove the old version of GTK--. You may also be able to fix the error\n");
|
||||||
|
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
|
||||||
|
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
|
||||||
|
printf("*** required on your system.\n");
|
||||||
|
printf("*** If gtkmm-config was wrong, set the environment variable GTKMM_CONFIG\n");
|
||||||
|
printf("*** to point to the correct copy of gtkmm-config, and remove the file config.cache\n");
|
||||||
|
printf("*** before re-running configure\n");
|
||||||
|
}
|
||||||
|
/* GTK-- does not have the GTKMM_*_VERSION constants */
|
||||||
|
/*
|
||||||
|
else if ((gtkmm_major_version != GTKMM_MAJOR_VERSION) ||
|
||||||
|
(gtkmm_minor_version != GTKMM_MINOR_VERSION) ||
|
||||||
|
(gtkmm_micro_version != GTKMM_MICRO_VERSION))
|
||||||
|
{
|
||||||
|
printf("*** GTK-- header files (version %d.%d.%d) do not match\n",
|
||||||
|
GTKMM_MAJOR_VERSION, GTKMM_MINOR_VERSION, GTKMM_MICRO_VERSION);
|
||||||
|
printf("*** library (version %d.%d.%d)\n",
|
||||||
|
gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ((gtkmm_major_version > major) ||
|
||||||
|
((gtkmm_major_version == major) && (gtkmm_minor_version > minor)) ||
|
||||||
|
((gtkmm_major_version == major) && (gtkmm_minor_version == minor) && (gtkmm_micro_version >= micro)))
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf("\n*** An old version of GTK-- (%d.%d.%d) was found.\n",
|
||||||
|
gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version);
|
||||||
|
printf("*** You need a version of GTK-- newer than %d.%d.%d. The latest version of\n",
|
||||||
|
major, minor, micro);
|
||||||
|
printf("*** GTK-- is always available from ftp://ftp.gtk.org.\n");
|
||||||
|
printf("***\n");
|
||||||
|
printf("*** If you have already installed a sufficiently new version, this error\n");
|
||||||
|
printf("*** probably means that the wrong copy of the gtkmm-config shell script is\n");
|
||||||
|
printf("*** being found. The easiest way to fix this is to remove the old version\n");
|
||||||
|
printf("*** of GTK--, but you can also set the GTKMM_CONFIG environment to point to the\n");
|
||||||
|
printf("*** correct copy of gtkmm-config. (In this case, you will have to\n");
|
||||||
|
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
|
||||||
|
printf("*** so that the correct libraries are found at run-time))\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
],, no_gtkmm=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||||
|
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "x$no_gtkmm" = x ; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
if test "$GTKMM_CONFIG" = "no" ; then
|
||||||
|
echo "*** The gtkmm-config script installed by GTK-- could not be found"
|
||||||
|
echo "*** If GTK-- was installed in PREFIX, make sure PREFIX/bin is in"
|
||||||
|
echo "*** your path, or set the GTKMM_CONFIG environment variable to the"
|
||||||
|
echo "*** full path to gtkmm-config."
|
||||||
|
echo "*** The gtkmm-config script was not available in GTK-- versions"
|
||||||
|
echo "*** prior to 0.9.12. Perhaps you need to update your installed"
|
||||||
|
echo "*** version to 0.9.12 or later"
|
||||||
|
else
|
||||||
|
if test -f conf.gtkmmtest ; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo "*** Could not run GTK-- test program, checking why..."
|
||||||
|
CXXFLAGS="$CXXFLAGS $GTKMM_CFLAGS"
|
||||||
|
LIBS="$LIBS $GTKMM_LIBS"
|
||||||
|
AC_TRY_LINK([
|
||||||
|
#include <gtk--.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
], [ return ((gtkmm_major_version) || (gtkmm_minor_version) || (gtkmm_micro_version)); ],
|
||||||
|
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||||
|
echo "*** that the run-time linker is not finding GTK-- or finding the wrong"
|
||||||
|
echo "*** version of GTK--. If it is not finding GTK--, you'll need to set your"
|
||||||
|
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
||||||
|
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
||||||
|
echo "*** is required on your system"
|
||||||
|
echo "***"
|
||||||
|
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||||
|
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
|
||||||
|
[ echo "*** The test program failed to compile or link. See the file config.log for the"
|
||||||
|
echo "*** exact error that occured. This usually means GTK-- was incorrectly installed"
|
||||||
|
echo "*** or that you have moved GTK-- since it was installed. In the latter case, you"
|
||||||
|
echo "*** may want to edit the gtkmm-config script: $GTKMM_CONFIG" ])
|
||||||
|
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
GTKMM_CFLAGS=""
|
||||||
|
GTKMM_LIBS=""
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
fi
|
||||||
|
AC_LANG_RESTORE
|
||||||
|
AC_SUBST(GTKMM_CFLAGS)
|
||||||
|
AC_SUBST(GTKMM_LIBS)
|
||||||
|
rm -f conf.gtkmmtest
|
||||||
|
])
|
||||||
|
|
||||||
@@ -0,0 +1,194 @@
|
|||||||
|
# Configure paths for GTK+
|
||||||
|
# Owen Taylor 97-11-3
|
||||||
|
|
||||||
|
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
|
||||||
|
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
|
||||||
|
dnl
|
||||||
|
AC_DEFUN([AM_PATH_GTK],
|
||||||
|
[dnl
|
||||||
|
dnl Get the cflags and libraries from the gtk-config script
|
||||||
|
dnl
|
||||||
|
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
|
||||||
|
gtk_config_prefix="$withval", gtk_config_prefix="")
|
||||||
|
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
|
||||||
|
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
|
||||||
|
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
|
||||||
|
, enable_gtktest=yes)
|
||||||
|
|
||||||
|
for module in . $4
|
||||||
|
do
|
||||||
|
case "$module" in
|
||||||
|
gthread)
|
||||||
|
gtk_config_args="$gtk_config_args gthread"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if test x$gtk_config_exec_prefix != x ; then
|
||||||
|
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
|
||||||
|
if test x${GTK_CONFIG+set} != xset ; then
|
||||||
|
GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test x$gtk_config_prefix != x ; then
|
||||||
|
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
|
||||||
|
if test x${GTK_CONFIG+set} != xset ; then
|
||||||
|
GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
|
||||||
|
min_gtk_version=ifelse([$1], ,0.99.7,$1)
|
||||||
|
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
|
||||||
|
no_gtk=""
|
||||||
|
if test "$GTK_CONFIG" = "no" ; then
|
||||||
|
no_gtk=yes
|
||||||
|
else
|
||||||
|
GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
|
||||||
|
GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
|
||||||
|
gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||||
|
gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||||
|
gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||||
|
if test "x$enable_gtktest" = "xyes" ; then
|
||||||
|
ac_save_CFLAGS="$CFLAGS"
|
||||||
|
ac_save_LIBS="$LIBS"
|
||||||
|
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
||||||
|
LIBS="$GTK_LIBS $LIBS"
|
||||||
|
dnl
|
||||||
|
dnl Now check if the installed GTK is sufficiently new. (Also sanity
|
||||||
|
dnl checks the results of gtk-config to some extent
|
||||||
|
dnl
|
||||||
|
rm -f conf.gtktest
|
||||||
|
AC_TRY_RUN([
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
int major, minor, micro;
|
||||||
|
char *tmp_version;
|
||||||
|
|
||||||
|
system ("touch conf.gtktest");
|
||||||
|
|
||||||
|
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||||
|
tmp_version = g_strdup("$min_gtk_version");
|
||||||
|
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||||
|
printf("%s, bad version string\n", "$min_gtk_version");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((gtk_major_version != $gtk_config_major_version) ||
|
||||||
|
(gtk_minor_version != $gtk_config_minor_version) ||
|
||||||
|
(gtk_micro_version != $gtk_config_micro_version))
|
||||||
|
{
|
||||||
|
printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
|
||||||
|
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
|
||||||
|
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||||
|
printf ("*** was found! If gtk-config was correct, then it is best\n");
|
||||||
|
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
|
||||||
|
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
|
||||||
|
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
|
||||||
|
printf("*** required on your system.\n");
|
||||||
|
printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
|
||||||
|
printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
|
||||||
|
printf("*** before re-running configure\n");
|
||||||
|
}
|
||||||
|
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
|
||||||
|
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
|
||||||
|
(gtk_minor_version != GTK_MINOR_VERSION) ||
|
||||||
|
(gtk_micro_version != GTK_MICRO_VERSION))
|
||||||
|
{
|
||||||
|
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
|
||||||
|
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
|
||||||
|
printf("*** library (version %d.%d.%d)\n",
|
||||||
|
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||||
|
}
|
||||||
|
#endif /* defined (GTK_MAJOR_VERSION) ... */
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ((gtk_major_version > major) ||
|
||||||
|
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
|
||||||
|
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
|
||||||
|
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||||
|
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
|
||||||
|
major, minor, micro);
|
||||||
|
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
|
||||||
|
printf("***\n");
|
||||||
|
printf("*** If you have already installed a sufficiently new version, this error\n");
|
||||||
|
printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
|
||||||
|
printf("*** being found. The easiest way to fix this is to remove the old version\n");
|
||||||
|
printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
|
||||||
|
printf("*** correct copy of gtk-config. (In this case, you will have to\n");
|
||||||
|
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
|
||||||
|
printf("*** so that the correct libraries are found at run-time))\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "x$no_gtk" = x ; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
if test "$GTK_CONFIG" = "no" ; then
|
||||||
|
echo "*** The gtk-config script installed by GTK could not be found"
|
||||||
|
echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
|
||||||
|
echo "*** your path, or set the GTK_CONFIG environment variable to the"
|
||||||
|
echo "*** full path to gtk-config."
|
||||||
|
else
|
||||||
|
if test -f conf.gtktest ; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo "*** Could not run GTK test program, checking why..."
|
||||||
|
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
||||||
|
LIBS="$LIBS $GTK_LIBS"
|
||||||
|
AC_TRY_LINK([
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
|
||||||
|
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||||
|
echo "*** that the run-time linker is not finding GTK or finding the wrong"
|
||||||
|
echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
|
||||||
|
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
||||||
|
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
||||||
|
echo "*** is required on your system"
|
||||||
|
echo "***"
|
||||||
|
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||||
|
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
|
||||||
|
echo "***"
|
||||||
|
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
|
||||||
|
echo "*** came with the system with the command"
|
||||||
|
echo "***"
|
||||||
|
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
|
||||||
|
[ echo "*** The test program failed to compile or link. See the file config.log for the"
|
||||||
|
echo "*** exact error that occured. This usually means GTK was incorrectly installed"
|
||||||
|
echo "*** or that you have moved GTK since it was installed. In the latter case, you"
|
||||||
|
echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
GTK_CFLAGS=""
|
||||||
|
GTK_LIBS=""
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
fi
|
||||||
|
AC_SUBST(GTK_CFLAGS)
|
||||||
|
AC_SUBST(GTK_LIBS)
|
||||||
|
rm -f conf.gtktest
|
||||||
|
])
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# Example for use of GNU gettext.
|
||||||
|
# This file is in the public domain.
|
||||||
|
#
|
||||||
|
# Set of available languages.
|
||||||
|
af ast bg ca cs da de el eo es fi fr ga gl hr hu id it ja ka ky lv ms mt nb nl nn pl pt pt_BR ro ru sk sl sq sr sv ta tr uk vi zh_CN zh_HK zh_TW
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
# Makefile variables for PO directory in any package using GNU gettext.
|
||||||
|
#
|
||||||
|
# Copyright (C) 2003-2025 Free Software Foundation, Inc.
|
||||||
|
# This file is free software; the Free Software Foundation gives
|
||||||
|
# unlimited permission to use, copy, distribute, and modify it.
|
||||||
|
|
||||||
|
# Usually the message domain is the same as the package name.
|
||||||
|
DOMAIN = $(PACKAGE)
|
||||||
|
|
||||||
|
# These two variables depend on the location of this directory.
|
||||||
|
subdir = po
|
||||||
|
top_builddir = ..
|
||||||
|
|
||||||
|
# These options get passed to xgettext.
|
||||||
|
XGETTEXT_OPTIONS = \
|
||||||
|
--keyword=_ --flag=_:1:pass-c-format \
|
||||||
|
--keyword=N_ --flag=N_:1:pass-c-format \
|
||||||
|
--flag=g_log:3:c-format --flag=g_logv:3:c-format \
|
||||||
|
--flag=g_error:1:c-format --flag=g_message:1:c-format \
|
||||||
|
--flag=g_critical:1:c-format --flag=g_warning:1:c-format \
|
||||||
|
--flag=g_print:1:c-format \
|
||||||
|
--flag=g_printerr:1:c-format \
|
||||||
|
--flag=g_strdup_printf:1:c-format --flag=g_strdup_vprintf:1:c-format \
|
||||||
|
--flag=g_printf_string_upper_bound:1:c-format \
|
||||||
|
--flag=g_snprintf:3:c-format --flag=g_vsnprintf:3:c-format \
|
||||||
|
--flag=g_string_sprintf:2:c-format \
|
||||||
|
--flag=g_string_sprintfa:2:c-format \
|
||||||
|
--flag=g_scanner_error:2:c-format \
|
||||||
|
--flag=g_scanner_warn:2:c-format
|
||||||
|
|
||||||
|
# This is the copyright holder that gets inserted into the header of the
|
||||||
|
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
|
||||||
|
# package. (Note that the msgid strings, extracted from the package's
|
||||||
|
# sources, belong to the copyright holder of the package.) Translators are
|
||||||
|
# expected to transfer the copyright for their translations to this person
|
||||||
|
# or entity, or to disclaim their copyright. The empty string stands for
|
||||||
|
# the public domain; in this case the translators are expected to disclaim
|
||||||
|
# their copyright.
|
||||||
|
COPYRIGHT_HOLDER = Yoyodyne, Inc.
|
||||||
|
|
||||||
|
# This tells whether or not to prepend "GNU " prefix to the package
|
||||||
|
# name that gets inserted into the header of the $(DOMAIN).pot file.
|
||||||
|
# Possible values are "yes", "no", or empty. If it is empty, try to
|
||||||
|
# detect it automatically by scanning the files in $(top_srcdir) for
|
||||||
|
# "GNU packagename" string.
|
||||||
|
PACKAGE_GNU = no
|
||||||
|
|
||||||
|
# This is the email address or URL to which the translators shall report
|
||||||
|
# bugs in the untranslated strings:
|
||||||
|
# - Strings which are not entire sentences, see the maintainer guidelines
|
||||||
|
# in the GNU gettext documentation, section 'Preparing Strings'.
|
||||||
|
# - Strings which use unclear terms or require additional context to be
|
||||||
|
# understood.
|
||||||
|
# - Strings which make invalid assumptions about notation of date, time or
|
||||||
|
# money.
|
||||||
|
# - Pluralisation problems.
|
||||||
|
# - Incorrect English spelling.
|
||||||
|
# - Incorrect formatting.
|
||||||
|
# It can be your email address, or a mailing list address where translators
|
||||||
|
# can write to without being subscribed, or the URL of a web page through
|
||||||
|
# which the translators can contact you.
|
||||||
|
MSGID_BUGS_ADDRESS = bug-gettext@gnu.org
|
||||||
|
|
||||||
|
# This is the list of locale categories, beyond LC_MESSAGES, for which the
|
||||||
|
# message catalogs shall be used. It is usually empty.
|
||||||
|
EXTRA_LOCALE_CATEGORIES =
|
||||||
|
|
||||||
|
# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
|
||||||
|
# context. Possible values are "yes" and "no". Set this to yes if the
|
||||||
|
# package uses functions taking also a message context, like pgettext(), or
|
||||||
|
# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
|
||||||
|
USE_MSGCTXT = no
|
||||||
|
|
||||||
|
# These options get passed to msgmerge.
|
||||||
|
# Useful options are in particular:
|
||||||
|
# --previous to keep previous msgids of translated messages
|
||||||
|
MSGMERGE_OPTIONS =
|
||||||
|
|
||||||
|
# These options get passed to msginit.
|
||||||
|
# If you want to disable line wrapping when writing PO files, add
|
||||||
|
# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
|
||||||
|
# MSGINIT_OPTIONS.
|
||||||
|
MSGINIT_OPTIONS =
|
||||||
|
|
||||||
|
# This tells whether or not to forcibly update $(DOMAIN).pot and
|
||||||
|
# regenerate PO files on "make dist". Possible values are "yes" and
|
||||||
|
# "no". Set this to no if the POT file and PO files are maintained
|
||||||
|
# externally.
|
||||||
|
DIST_DEPENDS_ON_UPDATE_PO = yes
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# Example for use of GNU gettext.
|
||||||
|
# This file is in the public domain.
|
||||||
|
#
|
||||||
|
# List of files which contain translatable strings.
|
||||||
|
hello.cc
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# Afrikaans translation for Silky
|
||||||
|
# Copyright (C) 2004 Free Software Foundation, Inc.
|
||||||
|
# This file is distributed under the same license as the silky package.
|
||||||
|
# Hanlie Pretorius <hpretorius@pnp.co.za>, 2004.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: hello-c++-gnome2-0.13.1\n"
|
||||||
|
"Report-Msgid-Bugs-To: bug-gettext@gnu.org\n"
|
||||||
|
"PO-Revision-Date: 2003-12-31 10:30+2\n"
|
||||||
|
"Last-Translator: Ysbeer <ysbeer@af.org.za>\n"
|
||||||
|
"Language-Team: Afrikaans <i18n@af.org.za>\n"
|
||||||
|
"Language: af\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||||
|
|
||||||
|
#: hello.cc:55
|
||||||
|
msgid "Hello, world!"
|
||||||
|
msgstr "Hallo wêreld!"
|
||||||
|
|
||||||
|
#: hello.cc:60
|
||||||
|
#, c-format
|
||||||
|
msgid "This program is running as process number %d."
|
||||||
|
msgstr "Hierdie program loop as prosesnommer %d."
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
# Asturian translation for hello-c++-gnome2
|
||||||
|
# Copyright (C) 2018 Yoyodyne, Inc. (msgids)
|
||||||
|
# This file is distributed under the same license as the gettext package.
|
||||||
|
#
|
||||||
|
# Marquinos <maacub@gmail.com>, 2009.
|
||||||
|
# enolp <enolp@softastur.org>, 2018.
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: hello-c++-gnome2 0.19.4.73\n"
|
||||||
|
"Report-Msgid-Bugs-To: bug-gettext@gnu.org\n"
|
||||||
|
"PO-Revision-Date: 2018-07-16 00:28+0100\n"
|
||||||
|
"Last-Translator: enolp <enolp@softastur.org>\n"
|
||||||
|
"Language-Team: Asturian <ubuntu-l10n-ast@lists.ubuntu.com>\n"
|
||||||
|
"Language: ast\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
|
"X-Generator: Lokalize 2.0\n"
|
||||||
|
|
||||||
|
#: hello.cc:55
|
||||||
|
msgid "Hello, world!"
|
||||||
|
msgstr "¡Hola, mundu!"
|
||||||
|
|
||||||
|
#: hello.cc:60
|
||||||
|
#, c-format
|
||||||
|
msgid "This program is running as process number %d."
|
||||||
|
msgstr "Esti programa ta executándose como procesu númberu %d."
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# Bulgarian translations for hello-c++-gnome2 package.
|
||||||
|
# Copyright (C) 2010 Yoyodyne, Inc. (msgids)
|
||||||
|
# This file is distributed under the same license as the gettext package.
|
||||||
|
# Roumen Petrov <transl@roumenpetrov.info>, 2010,2014,2015,2019,2023,2024,2025.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: GNU hello-c++-gnome2 0.26-pre1\n"
|
||||||
|
"Report-Msgid-Bugs-To: bug-gettext@gnu.org\n"
|
||||||
|
"PO-Revision-Date: 2025-07-04 20:09+0200\n"
|
||||||
|
"Last-Translator: Roumen Petrov <transl@roumenpetrov.info>\n"
|
||||||
|
"Language-Team: Bulgarian <dict@ludost.net>\n"
|
||||||
|
"Language: bg\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||||
|
|
||||||
|
#: hello.cc:55
|
||||||
|
msgid "Hello, world!"
|
||||||
|
msgstr "Здравейте всички!"
|
||||||
|
|
||||||
|
#: hello.cc:60
|
||||||
|
#, c-format
|
||||||
|
msgid "This program is running as process number %d."
|
||||||
|
msgstr "Програмата е пусната под процес номер %d."
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
# Catalan messages for GNU hello-c++-gnome2.
|
||||||
|
# Copyright (C) 2003, 2014, 2015 Yoyodyne, Inc. (msgids)
|
||||||
|
# This file is distributed under the same license as the gettext package.
|
||||||
|
# Ivan Vilata i Balaguer <ivan@selidor.net>, 2003, 2014, 2015, 2023.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: hello-c++-gnome2 0.22\n"
|
||||||
|
"Report-Msgid-Bugs-To: bug-gettext@gnu.org\n"
|
||||||
|
"PO-Revision-Date: 2023-07-07 08:36+0200\n"
|
||||||
|
"Last-Translator: Ivan Vilata i Balaguer <ivan@selidor.net>\n"
|
||||||
|
"Language-Team: Catalan <ca@dodds.net>\n"
|
||||||
|
"Language: ca\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#: hello.cc:55
|
||||||
|
msgid "Hello, world!"
|
||||||
|
msgstr "Hola, món!"
|
||||||
|
|
||||||
|
#: hello.cc:60
|
||||||
|
#, c-format
|
||||||
|
msgid "This program is running as process number %d."
|
||||||
|
msgstr "Aquest programa està corrent amb el número de procés %d."
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
# The Czech translation for the gettext package.
|
||||||
|
# Copyright (C) 2011 Yoyodyne, Inc. (msgids)
|
||||||
|
# This file is distributed under the same license as the gettext package.
|
||||||
|
#
|
||||||
|
# Marek Černocký <marek@manet.cz>, 2011.
|
||||||
|
# Petr Písař <petr.pisar@atlas.cz>, 2025.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: hello-c++-gnome2 0.26-pre1\n"
|
||||||
|
"Report-Msgid-Bugs-To: bug-gettext@gnu.org\n"
|
||||||
|
"PO-Revision-Date: 2025-07-04 19:55+02:00\n"
|
||||||
|
"Last-Translator: Petr Pisar <petr.pisar@atlas.cz>\n"
|
||||||
|
"Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n"
|
||||||
|
"Language: cs\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||||
|
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
|
||||||
|
|
||||||
|
#: hello.cc:55
|
||||||
|
msgid "Hello, world!"
|
||||||
|
msgstr "Ahoj světe!"
|
||||||
|
|
||||||
|
#: hello.cc:60
|
||||||
|
#, c-format
|
||||||
|
msgid "This program is running as process number %d."
|
||||||
|
msgstr "Tento program běží jako proces číslo %d."
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# Danish messages for hello-c++-gnome2.
|
||||||
|
# Copyright (C) 2015 Yoyodyne, Inc. (msgids)
|
||||||
|
# This file is distributed under the same license as the gettext package.
|
||||||
|
# Jan Djærv <jan.h.d@swipnet.se>, 2003, 2006.
|
||||||
|
# Keld Simonsen <keld@keldix.com>, 2011.
|
||||||
|
# Joe Hansen <joedalton2@yahoo.dk>, 2015.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: hello-c++-gnome2 0.19.4.73\n"
|
||||||
|
"Report-Msgid-Bugs-To: bug-gettext@gnu.org\n"
|
||||||
|
"PO-Revision-Date: 2015-06-27 12:39+0100\n"
|
||||||
|
"Last-Translator: Joe Hansen <joedalton2@yahoo.dk>\n"
|
||||||
|
"Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
|
||||||
|
"Language: da\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||||
|
|
||||||
|
#: hello.cc:55
|
||||||
|
msgid "Hello, world!"
|
||||||
|
msgstr "Hej verden!"
|
||||||
|
|
||||||
|
#: hello.cc:60
|
||||||
|
#, c-format
|
||||||
|
msgid "This program is running as process number %d."
|
||||||
|
msgstr "Dette program kører som proces nummer %d."
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
# German messages for hello-c++-gnome2.
|
||||||
|
# Copyright © 2003, 2013 Yoyodyne, Inc. (msgids)
|
||||||
|
# This file is distributed under the same license as the gettext package.
|
||||||
|
#
|
||||||
|
# Bruno Haible <bruno@clisp.org>, 2003.
|
||||||
|
# Karl Eichwalder <ke@gnu.franken.de>, 2003.
|
||||||
|
# Jakob Kramer <jakob.kramer@gmx.de>, 2013.
|
||||||
|
# Mario Blättermann <mario.blaettermann@gmail.com>, 2014, 2023, 2025 .
|
||||||
|
# Philipp Thomas <pth@suse.de>, 2015.
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: hello-c++-gnome2 0.26-pre1\n"
|
||||||
|
"Report-Msgid-Bugs-To: bug-gettext@gnu.org\n"
|
||||||
|
"PO-Revision-Date: 2025-07-06 15:25+0200\n"
|
||||||
|
"Last-Translator: Mario Blättermann <mario.blaettermann@gmail.com>\n"
|
||||||
|
"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
|
||||||
|
"Language: de\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
"X-Generator: Lokalize 25.04.2\n"
|
||||||
|
|
||||||
|
#: hello.cc:55
|
||||||
|
msgid "Hello, world!"
|
||||||
|
msgstr "Hallo Welt!"
|
||||||
|
|
||||||
|
#: hello.cc:60
|
||||||
|
#, c-format
|
||||||
|
msgid "This program is running as process number %d."
|
||||||
|
msgstr "Dieses Programm läuft mit der Prozess-Nummer %d."
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# Greek translation of hello-c++-gnome2
|
||||||
|
# Copyright (C) 2005 Free Software Foundation, Inc.
|
||||||
|
# Simos Xenitellis <simos74@gmx.net>, 2005.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: hello-c++-gnome2 0.14.1\n"
|
||||||
|
"Report-Msgid-Bugs-To: bug-gettext@gnu.org\n"
|
||||||
|
"PO-Revision-Date: 2005-01-06 18:50+0000\n"
|
||||||
|
"Last-Translator: Simos Xenitellis <simos74@gmx.net>\n"
|
||||||
|
"Language-Team: Greek <nls@tux.hellug.gr>\n"
|
||||||
|
"Language: el\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||||
|
"X-Generator: KBabel 1.3.1\n"
|
||||||
|
|
||||||
|
#: hello.cc:55
|
||||||
|
msgid "Hello, world!"
|
||||||
|
msgstr "Γεια σου, κόσμε!"
|
||||||
|
|
||||||
|
#: hello.cc:60
|
||||||
|
#, c-format
|
||||||
|
msgid "This program is running as process number %d."
|
||||||
|
msgstr "Αυτό το πρόγραμμα εκτελείται με αριθμό διεργασίας %d."
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# La teksto por la mesaĝoj de la programo "gettext".
|
||||||
|
# Copyright (C) 2006, 2016 Yoyodyne, Inc. (msgids)
|
||||||
|
# This file is distributed under the same license as the gettext package.
|
||||||
|
# Edmund GRIMLEY EVANS <edmundo@rano.org>, 2006.
|
||||||
|
# Felipe CASTRO <fefcas@gmail.com>, 2016, 2023.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: hello-c++-gnome2 0.22\n"
|
||||||
|
"Report-Msgid-Bugs-To: bug-gettext@gnu.org\n"
|
||||||
|
"PO-Revision-Date: 2023-06-23 19:00-0300\n"
|
||||||
|
"Last-Translator: Felipe Castro <fefcas@gmail.com>\n"
|
||||||
|
"Language-Team: Esperanto <translation-team-eo@lists.sourceforge.net>\n"
|
||||||
|
"Language: eo\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||||
|
"X-Generator: Poedit 2.4.2\n"
|
||||||
|
|
||||||
|
#: hello.cc:55
|
||||||
|
msgid "Hello, world!"
|
||||||
|
msgstr "Saluton, mondo!"
|
||||||
|
|
||||||
|
#: hello.cc:60
|
||||||
|
#, c-format
|
||||||
|
msgid "This program is running as process number %d."
|
||||||
|
msgstr "Ĉi tiu programo rulas kiel procez-numero %d."
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
# Mensajes en español para GNU gettext.
|
||||||
|
# Copyright (C) 2014 Yoyodyne, Inc. (msgids)
|
||||||
|
#
|
||||||
|
# This file is distributed under the same license as the gettext package.
|
||||||
|
#
|
||||||
|
# Max de Mendizábal <max@upn.mx>, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004.
|
||||||
|
# Antonio Ceballos <aceballos@gmail.com>, 2014, 2015, 2023, 2025
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: hello-c++-gnome2-0.26-pre1\n"
|
||||||
|
"Report-Msgid-Bugs-To: bug-gettext@gnu.org\n"
|
||||||
|
"PO-Revision-Date: 2025-07-04 18:07+0200\n"
|
||||||
|
"Last-Translator: Antonio Ceballos <aceballos@gmail.com>\n"
|
||||||
|
"Language-Team: Spanish <es@tp.org.es>\n"
|
||||||
|
"Language: es\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#: hello.cc:55
|
||||||
|
msgid "Hello, world!"
|
||||||
|
msgstr "¡Hola, mundo!"
|
||||||
|
|
||||||
|
#: hello.cc:60
|
||||||
|
#, c-format
|
||||||
|
msgid "This program is running as process number %d."
|
||||||
|
msgstr "Este programa está corriendo como el proceso número %d."
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
# Finnish messages for GNU Gettext examples.
|
||||||
|
# This file is distributed under the same license as the gettext package.
|
||||||
|
# Copyright © 2007, 2014, 2015 Yoyodyne, Inc. (msgids)
|
||||||
|
# Lauri Nurmi <lanurmi@iki.fi>, 2007.
|
||||||
|
# Jorma Karvonen <karvonen.jorma@gmail.com>, 2014-2015.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: hello-c++-gnome2 0.19.4.73\n"
|
||||||
|
"Report-Msgid-Bugs-To: bug-gettext@gnu.org\n"
|
||||||
|
"PO-Revision-Date: 2015-09-01 16:59+0300\n"
|
||||||
|
"Last-Translator: Jorma Karvonen <karvonen.jorma@gmail.com>\n"
|
||||||
|
"Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n"
|
||||||
|
"Language: fi\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||||
|
"X-Generator: Poedit 1.5.4\n"
|
||||||
|
|
||||||
|
# Tämä nimenomainen käännös valittu GNU Hellon mukaisesti.
|
||||||
|
#: hello.cc:55
|
||||||
|
msgid "Hello, world!"
|
||||||
|
msgstr "Terve maailma!"
|
||||||
|
|
||||||
|
#: hello.cc:60
|
||||||
|
#, c-format
|
||||||
|
msgid "This program is running as process number %d."
|
||||||
|
msgstr "Tämän ohjelman prosessinumero on %d."
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
# Messages français pour GNU gettext.
|
||||||
|
# Copyright (C) 2006 Yoyodyne, Inc. (msgids)
|
||||||
|
# This file is distributed under the same license as the gettext package.
|
||||||
|
#
|
||||||
|
# Michel Robitaille <robitail@IRO.UMontreal.CA>, 2006.
|
||||||
|
# Christophe Combelles <ccomb@free.fr>, 2006
|
||||||
|
# Stéphane Aulery <lkppo@free.fr>, 2015
|
||||||
|
# Christian Wiatr <w9204-fs@yahoo.com>, 2023
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: hello-c++-gnome2 0.22\n"
|
||||||
|
"Report-Msgid-Bugs-To: bug-gettext@gnu.org\n"
|
||||||
|
"PO-Revision-Date: 2023-06-28 16:25+0200\n"
|
||||||
|
"Last-Translator: Christian Wiatr <w9204-fs@yahoo.com>\n"
|
||||||
|
"Language-Team: French <traduc@traduc.org>\n"
|
||||||
|
"Language: fr\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||||
|
"X-Generator: Poedit 2.4.2\n"
|
||||||
|
|
||||||
|
#: hello.cc:55
|
||||||
|
msgid "Hello, world!"
|
||||||
|
msgstr "Bonjour, le monde !"
|
||||||
|
|
||||||
|
#: hello.cc:60
|
||||||
|
#, c-format
|
||||||
|
msgid "This program is running as process number %d."
|
||||||
|
msgstr "Ce programme est exécuté en tant que processus numéro %d."
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# Irish translations for hello-c++-gnome2.
|
||||||
|
# Copyright (C) 2015 Yoyodyne, Inc. (msgids)
|
||||||
|
# This file is distributed under the same license as the gettext package.
|
||||||
|
# Kevin Patrick Scannell <kscanne@gmail.com>, 2004, 2017.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: hello-c++-gnome2 0.19.4.73\n"
|
||||||
|
"Report-Msgid-Bugs-To: bug-gettext@gnu.org\n"
|
||||||
|
"PO-Revision-Date: 2017-01-10 12:09-0500\n"
|
||||||
|
"Last-Translator: Kevin Patrick Scannell <kscanne@gmail.com>\n"
|
||||||
|
"Language-Team: Irish <gaeilge-gnulinux@lists.sourceforge.net>\n"
|
||||||
|
"Language: ga\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||||
|
|
||||||
|
#: hello.cc:55
|
||||||
|
msgid "Hello, world!"
|
||||||
|
msgstr "Dia duit, a dhomhain!"
|
||||||
|
|
||||||
|
#: hello.cc:60
|
||||||
|
#, c-format
|
||||||
|
msgid "This program is running as process number %d."
|
||||||
|
msgstr "Tá an clár seo ag rith mar phróiseas %d."
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
# Galician translation for hello-c++-gnome2 package.
|
||||||
|
# Copyright (C) 2010 Yoyodyne, Inc. (msgids)
|
||||||
|
# This file is distributed under the same license as the gettext package.
|
||||||
|
#
|
||||||
|
# Leandro Regueiro <leandro.regueiro@gmail.com>, 2010-2014.
|
||||||
|
#
|
||||||
|
# Proxecto Trasno - Adaptación do software libre á lingua galega: Se desexas
|
||||||
|
# colaborar connosco, podes atopar máis información en <http://trasno.net>
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: hello-c++-gnome2 0.19-rc1\n"
|
||||||
|
"Report-Msgid-Bugs-To: bug-gettext@gnu.org\n"
|
||||||
|
"PO-Revision-Date: 2014-05-10 16:34+0100\n"
|
||||||
|
"Last-Translator: Leandro Regueiro <leandro.regueiro@gmail.com>\n"
|
||||||
|
"Language-Team: Galician <proxecto@trasno.net>\n"
|
||||||
|
"Language: gl\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
|
||||||
|
|
||||||
|
#: hello.cc:55
|
||||||
|
msgid "Hello, world!"
|
||||||
|
msgstr "Ola, mundo!"
|
||||||
|
|
||||||
|
#: hello.cc:60
|
||||||
|
#, c-format
|
||||||
|
msgid "This program is running as process number %d."
|
||||||
|
msgstr "Este programa estase executando como o proceso número %d."
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
# Translation of hello-c++-gnome2 to Croatian.
|
||||||
|
# Copyright (C) 2003, 2004, 2014, 2015, 2019 Yoyodyne, Inc. (msgids)
|
||||||
|
# This file is distributed under the same license as the gettext package.
|
||||||
|
# Permission is granted to freely copy and distribute
|
||||||
|
# this file and modified versions, provided that this
|
||||||
|
# header is not removed and modified versions are marked
|
||||||
|
# as such.
|
||||||
|
#
|
||||||
|
# Tomislav Krznar <tomislav.krznar@gmail.com>, 2012.
|
||||||
|
# Božidar Putanec <bozidarp@yahoo.com>, 2018-2026.
|
||||||
|
#
|
||||||
|
#, fuzzy
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: GNU hello-c++-gnome2 1.0-pre2\n"
|
||||||
|
"Report-Msgid-Bugs-To: bug-gettext@gnu.org\n"
|
||||||
|
"PO-Revision-Date: 2026-01-15 20:25-0800\n"
|
||||||
|
"Last-Translator: Božidar Putanec <bozidarp@yahoo.com>\n"
|
||||||
|
"Language-Team: Croatian <lokalizacija@linux.hr>\n"
|
||||||
|
"Language: hr\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||||
|
|
||||||
|
#: hello.cc:55
|
||||||
|
msgid "Hello, world!"
|
||||||
|
msgstr "Pozdrav, svijete!"
|
||||||
|
|
||||||
|
#: hello.cc:60
|
||||||
|
#, c-format
|
||||||
|
msgid "This program is running as process number %d."
|
||||||
|
msgstr "Ovaj program izvršava se kao proces broj %d."
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
# Hungarian translation for hello-c++-gnome2.
|
||||||
|
# This file is distributed under the same license as the gettext package.
|
||||||
|
# Copyright (C) 2014 Yoyodyne, Inc. (msgids)
|
||||||
|
#
|
||||||
|
# Tamás Kiss <atomi@inf.elte.hu>, 2005.
|
||||||
|
# Balázs Úr <urbalazs@gmail.com>, 2014, 2015.
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: hello-c++-gnome2 0.19.4.73\n"
|
||||||
|
"Report-Msgid-Bugs-To: bug-gettext@gnu.org\n"
|
||||||
|
"PO-Revision-Date: 2015-06-23 20:31+0200\n"
|
||||||
|
"Last-Translator: Balázs Úr <urbalazs@gmail.com>\n"
|
||||||
|
"Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\n"
|
||||||
|
"Language: hu\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
"X-Generator: Lokalize 1.2\n"
|
||||||
|
|
||||||
|
#: hello.cc:55
|
||||||
|
msgid "Hello, world!"
|
||||||
|
msgstr "Hello, világ!"
|
||||||
|
|
||||||
|
#: hello.cc:60
|
||||||
|
#, c-format
|
||||||
|
msgid "This program is running as process number %d."
|
||||||
|
msgstr "Ez a program a(z) %d folyamatazonosítóval fut."
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
# translation of hello-c++-gnome2-0.15-pre5.po to Indonesian
|
||||||
|
# Copyright (C) 2006 Yoyodyne, Inc.
|
||||||
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
|
#
|
||||||
|
# Tedi Heriyanto <tedi_heriyanto@yahoo.com>, 2006.
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: hello-c++-gnome2-0.15-pre5\n"
|
||||||
|
"Report-Msgid-Bugs-To: bug-gettext@gnu.org\n"
|
||||||
|
"PO-Revision-Date: 2006-09-27 20:19+0700\n"
|
||||||
|
"Last-Translator: Tedi Heriyanto <tedi_heriyanto@yahoo.com>\n"
|
||||||
|
"Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n"
|
||||||
|
"Language: id\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||||
|
"X-Generator: KBabel 1.11.2\n"
|
||||||
|
|
||||||
|
#: hello.cc:55
|
||||||
|
msgid "Hello, world!"
|
||||||
|
msgstr "Hello, world!"
|
||||||
|
|
||||||
|
#: hello.cc:60
|
||||||
|
#, c-format
|
||||||
|
msgid "This program is running as process number %d."
|
||||||
|
msgstr "Program ini berjalan sebagai proses nomor %d"
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
# Italian messages for hello-c++-gnome2.
|
||||||
|
# Copyright (C) 2005, 2006 Yoyodyne, Inc. (msgids)
|
||||||
|
# Copyright (C) 2024 Free Software Foundation, Inc.
|
||||||
|
# This file is distributed under the same license as the gettext package.
|
||||||
|
# Marco Colombo <m.colombo@ed.ac.uk>, 2005, 2006, 2015.
|
||||||
|
# Michele Locati <michele@locati.it>, 2024, 2025.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: GNU hello-c++-gnome2 0.26-pre1\n"
|
||||||
|
"Report-Msgid-Bugs-To: bug-gettext@gnu.org\n"
|
||||||
|
"PO-Revision-Date: 2025-07-08 13:59+0200\n"
|
||||||
|
"Last-Translator: Michele Locati <michele@locati.it>\n"
|
||||||
|
"Language-Team: Italian <tp@lists.linux.it>\n"
|
||||||
|
"Language: it\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||||
|
|
||||||
|
#: hello.cc:55
|
||||||
|
msgid "Hello, world!"
|
||||||
|
msgstr "Ciao, mondo!"
|
||||||
|
|
||||||
|
#: hello.cc:60
|
||||||
|
#, c-format
|
||||||
|
msgid "This program is running as process number %d."
|
||||||
|
msgstr "Questo programma è in esecuzione con numero di processo %d."
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user