initial commit
This commit is contained in:
commit
760f90d9ba
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
build/
|
||||
87
CMakeLists.txt
Normal file
87
CMakeLists.txt
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
project(t3hs_frame_exporter)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
set(THIRD_PARTY_BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party")
|
||||
|
||||
set(OpenCV_DIR "${THIRD_PARTY_BASE_DIR}/opencv/lib/cmake/opencv4")
|
||||
find_package(OpenCV REQUIRED)
|
||||
|
||||
set(ZBAR_ROOT_DIR "${THIRD_PARTY_BASE_DIR}/zbar/usr")
|
||||
set(ZBAR_INCLUDE_DIRS "${ZBAR_ROOT_DIR}/include")
|
||||
set(ZBAR_LIBRARIES "${ZBAR_ROOT_DIR}/lib/libzbar.so")
|
||||
|
||||
set(V4L2_ROOT_DIR "${THIRD_PARTY_BASE_DIR}/v4l2/usr")
|
||||
set(V4L2_INCLUDE_DIRS "${V4L2_ROOT_DIR}/include")
|
||||
set(V4L2_LIBRARIES
|
||||
"${V4L2_ROOT_DIR}/lib/libv4l2.so"
|
||||
"${V4L2_ROOT_DIR}/lib/libv4lconvert.so"
|
||||
)
|
||||
|
||||
set(JPEG_ROOT_DIR "${THIRD_PARTY_BASE_DIR}/jpeg/usr")
|
||||
set(JPEG_INCLUDE_DIRS "${JPEG_ROOT_DIR}/include")
|
||||
set(JPEG_LIBRARIES "${JPEG_ROOT_DIR}/lib/libjpeg.so")
|
||||
|
||||
set(INTL_ROOT_DIR "${THIRD_PARTY_BASE_DIR}/intl/usr")
|
||||
set(INTL_INCLUDE_DIRS "${INTL_ROOT_DIR}/include")
|
||||
set(INTL_LIBRARIES "${INTL_ROOT_DIR}/lib/libintl.so")
|
||||
|
||||
set(ICONV_ROOT_DIR "${THIRD_PARTY_BASE_DIR}/iconv/usr")
|
||||
set(ICONV_INCLUDE_DIRS "${ICONV_ROOT_DIR}/include")
|
||||
set(ICONV_LIBRARIES "${ICONV_ROOT_DIR}/lib/libiconv.so")
|
||||
|
||||
set(MOSQUITTO_ROOT_DIR "${THIRD_PARTY_BASE_DIR}/mosquitto")
|
||||
set(MOSQUITTO_INCLUDE_DIRS "${MOSQUITTO_ROOT_DIR}/include")
|
||||
set(MOSQUITTO_LIBRARIES
|
||||
"${MOSQUITTO_ROOT_DIR}/lib/libmosquitto.so"
|
||||
"${MOSQUITTO_ROOT_DIR}/lib/libmosquittopp.so"
|
||||
)
|
||||
|
||||
set(SSL_ROOT_DIR "${THIRD_PARTY_BASE_DIR}/openssl/usr")
|
||||
set(SSL_INCLUDE_DIRS "${SSL_ROOT_DIR}/include")
|
||||
set(SSL_LIBRARIES
|
||||
"${SSL_ROOT_DIR}/lib/libssl.so"
|
||||
"${SSL_ROOT_DIR}/lib/libcrypto.so"
|
||||
)
|
||||
|
||||
set(LIBCONFIG_ROOT_DIR "${THIRD_PARTY_BASE_DIR}/libconfig/usr")
|
||||
set(LIBCONFIG_INCLUDE_DIRS "${LIBCONFIG_ROOT_DIR}/include")
|
||||
set(LIBCONFIG_LIBRARIES
|
||||
"${LIBCONFIG_ROOT_DIR}/lib/libconfig.so"
|
||||
"${LIBCONFIG_ROOT_DIR}/lib/libconfig++.so"
|
||||
)
|
||||
|
||||
set(NLOHMANN_ROOT_DIR "${THIRD_PARTY_BASE_DIR}/nlohmann/usr")
|
||||
set(NLOHMANN_INCLUDE_DIRS "${NLOHMANN_ROOT_DIR}/include")
|
||||
|
||||
set(SOURCES
|
||||
src/main.cpp
|
||||
src/utils.cpp
|
||||
src/settings.cpp
|
||||
src/mqtt_client.cpp
|
||||
src/t3hs_proto.cpp
|
||||
)
|
||||
|
||||
add_executable(t3hs_frame_exporter ${SOURCES})
|
||||
|
||||
include_directories(${OpenCV_INCLUDE_DIRS})
|
||||
include_directories(${ZBAR_INCLUDE_DIRS})
|
||||
include_directories(${V4L2_INCLUDE_DIRS})
|
||||
include_directories(${JPEG_INCLUDE_DIRS})
|
||||
include_directories(${INTL_INCLUDE_DIRS})
|
||||
include_directories(${ICONV_INCLUDE_DIRS})
|
||||
include_directories(${MOSQUITTO_INCLUDE_DIRS})
|
||||
include_directories(${SSL_INCLUDE_DIRS})
|
||||
include_directories(${LIBCONFIG_INCLUDE_DIRS})
|
||||
include_directories(${NLOHMANN_INCLUDE_DIRS})
|
||||
|
||||
target_link_libraries(t3hs_frame_exporter ${OpenCV_LIBS})
|
||||
target_link_libraries(t3hs_frame_exporter ${ZBAR_LIBRARIES})
|
||||
target_link_libraries(t3hs_frame_exporter ${V4L2_LIBRARIES})
|
||||
target_link_libraries(t3hs_frame_exporter ${JPEG_LIBRARIES})
|
||||
target_link_libraries(t3hs_frame_exporter ${INTL_LIBRARIES})
|
||||
target_link_libraries(t3hs_frame_exporter ${ICONV_LIBRARIES})
|
||||
target_link_libraries(t3hs_frame_exporter ${MOSQUITTO_LIBRARIES})
|
||||
target_link_libraries(t3hs_frame_exporter ${SSL_LIBRARIES})
|
||||
target_link_libraries(t3hs_frame_exporter ${LIBCONFIG_LIBRARIES})
|
||||
28
README.md
Normal file
28
README.md
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
## Usage
|
||||
t3hs\_frame\_exporter will always start on system boot. If you need to stop application do
|
||||
```bash
|
||||
t3hs_frame_exporter_ctl stop
|
||||
```
|
||||
|
||||
If you need to endlessly restart application and reload after every crash do
|
||||
```bash
|
||||
t3hs_frame_exporter_ctl enable && t3hs_frame_exporter_ctl start
|
||||
```
|
||||
|
||||
You can check status with `t3hs_frame_exporter_ctl status`
|
||||
|
||||
## Manuall build
|
||||
```bash
|
||||
mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain/toolchain.cmake .. && make
|
||||
```
|
||||
|
||||
## Manuall installation
|
||||
1. install built app as `/usr/bin/t3hs/t3hs_frame_exporter` (don't forget to check execute permissions)
|
||||
2. install control script as `/usr/bin/t3hs/t3hs_frame_exporter_ctl`
|
||||
3. copy config to `/etc/t3hs/frame_exporter/config.cfg`
|
||||
4. create symlimk `/etc/init.d/S99t3hs_frame_exporter` -> `/usr/bin/t3hs/t3hs_frame_exporter_ctl`
|
||||
5. add `/usr/bin/t3hs` to PATH:
|
||||
```bash
|
||||
echo 'export PATH="$PATH:/usr/bin/t3hs"' >> /etc/profile.d/t3hs_frame_exporter.sh
|
||||
```
|
||||
6. `/oem/usr/bin/RkLunch.sh` - remove starting rkipc
|
||||
34
assets/defconfig.cfg
Normal file
34
assets/defconfig.cfg
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
frame = {
|
||||
width = 640;
|
||||
height = 480;
|
||||
fps = 1.0;
|
||||
};
|
||||
|
||||
mjpeg = {
|
||||
fps = 1.0;
|
||||
port = 80;
|
||||
mode = "disable";
|
||||
};
|
||||
|
||||
mqtt_client = {
|
||||
host = "127.0.0.1";
|
||||
port = 1883;
|
||||
user = "username";
|
||||
password = "secret123";
|
||||
sign_secret = "mykey";
|
||||
id = "AAAAAAAA";
|
||||
};
|
||||
|
||||
qr_scanner = {
|
||||
enabled = false;
|
||||
rescan_timeout = 2000;
|
||||
send_topic = "TEST/UPLINK";
|
||||
dstid = "FFFFFFFF";
|
||||
};
|
||||
|
||||
mqtt_frame_exporter = {
|
||||
listen_topic = "TEST/DOWNLINK";
|
||||
send_topic = "TEST/UPLINK";
|
||||
dstid = "FFFFFFFF";
|
||||
max_block_size = 4096;
|
||||
};
|
||||
99
assets/t3hs_frame_exporter_ctl
Executable file
99
assets/t3hs_frame_exporter_ctl
Executable file
|
|
@ -0,0 +1,99 @@
|
|||
#!/bin/sh
|
||||
|
||||
APP_NAME="frame_exporter"
|
||||
APP_PATH="/usr/bin/t3hs/t3hs_frame_exporter"
|
||||
APP_ARGS=""
|
||||
PID_FILE="/var/run/t3hs/${APP_NAME}.pid"
|
||||
ENABLED_FILE="/etc/t3hs/${APP_NAME}/enabled"
|
||||
|
||||
RUN_AS="root"
|
||||
RESPAWN_DELAY=1
|
||||
|
||||
is_enabled() {
|
||||
[ -f "$ENABLED_FILE" ] && return 0 || return 1
|
||||
}
|
||||
|
||||
start() {
|
||||
if [ -f "$PID_FILE" ]; then
|
||||
pid=$(cat "$PID_FILE")
|
||||
if kill -0 "$pid" 2>/dev/null; then
|
||||
echo "$APP_NAME is already running (pid $pid)"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Starting $APP_NAME..."
|
||||
|
||||
if is_enabled; then
|
||||
while is_enabled; do
|
||||
start-stop-daemon -S -b -m -p "$PID_FILE" -c "$RUN_AS" -x "$APP_PATH" -- $APP_ARGS >> /dev/null 2>&1
|
||||
sleep "$RESPAWN_DELAY"
|
||||
done &
|
||||
else
|
||||
start-stop-daemon -S -b -m -p "$PID_FILE" -c "$RUN_AS" -x "$APP_PATH" -- $APP_ARGS >> /dev/null 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo "Stopping $APP_NAME..."
|
||||
start-stop-daemon -K -p "$PID_FILE"
|
||||
rm -f "$PID_FILE"
|
||||
}
|
||||
|
||||
status() {
|
||||
if [ -f "$PID_FILE" ]; then
|
||||
pid=$(cat "$PID_FILE")
|
||||
if kill -0 "$pid" 2>/dev/null; then
|
||||
echo "$APP_NAME is running (pid $pid)"
|
||||
return 0
|
||||
else
|
||||
echo "$APP_NAME pid file exists but process is not running"
|
||||
return 1
|
||||
fi
|
||||
else
|
||||
echo "$APP_NAME is not running"
|
||||
return 3
|
||||
fi
|
||||
}
|
||||
|
||||
enable() {
|
||||
touch "$ENABLED_FILE"
|
||||
echo "Enabled $APP_NAME to start at boot"
|
||||
}
|
||||
|
||||
disable() {
|
||||
rm -f "$ENABLED_FILE"
|
||||
echo "Disabled $APP_NAME from starting at boot"
|
||||
}
|
||||
|
||||
mkdir -p $(dirname "$PID_FILE")
|
||||
mkdir -p $(dirname "$ENABLED_FILE")
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart)
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
;;
|
||||
status)
|
||||
status
|
||||
;;
|
||||
enable)
|
||||
enable
|
||||
;;
|
||||
disable)
|
||||
disable
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|status|enable|disable}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
BIN
prebuilt/t3hs_frame_exporter
Executable file
BIN
prebuilt/t3hs_frame_exporter
Executable file
Binary file not shown.
346
src/main.cpp
Normal file
346
src/main.cpp
Normal file
|
|
@ -0,0 +1,346 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
#include <unordered_map>
|
||||
#include <chrono>
|
||||
#include <algorithm>
|
||||
|
||||
#include <opencv2/core/core.hpp>
|
||||
#include <opencv2/imgproc/imgproc.hpp>
|
||||
#include <opencv2/highgui/highgui.hpp>
|
||||
#include <mosquitto.h>
|
||||
#include <zbar.h>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include "settings.hpp"
|
||||
#include "mqtt_client.hpp"
|
||||
#include "t3hs_proto.hpp"
|
||||
#include "utils.hpp"
|
||||
#include "static_settings.hpp"
|
||||
|
||||
// on SMP systems this should be under mutex locks
|
||||
cv::Mat bgr, gray;
|
||||
std::unique_ptr<Settings> params;
|
||||
std::unique_ptr<MqttClient> mqtt;
|
||||
int px_in_frame;
|
||||
|
||||
std::string usage(const std::string&);
|
||||
std::string parse_cli(int, char**);
|
||||
void mjpeg_stream(float, int, FrameMode);
|
||||
void on_mqtt_message(mosquitto*, void*, const mosquitto_message*);
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
// read config file path from cli args
|
||||
std::string cfg_path;
|
||||
try {
|
||||
cfg_path = parse_cli(argc, argv);
|
||||
} catch (const std::runtime_error& e) {
|
||||
std::cerr << "ERROR: Cannot parse CLI args: " << e.what() << std::endl;
|
||||
std::cerr << usage(argv[0]) << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// get settings from config file
|
||||
try {
|
||||
params = std::make_unique<Settings>(cfg_path);
|
||||
} catch (const std::exception& e) {
|
||||
std::cerr << "ERROR: Cannot parse settings from file: " << e.what() << "\n";
|
||||
return 1;
|
||||
}
|
||||
std::cout << "CONFIG:" << std::endl << params->to_string() << std::endl;
|
||||
|
||||
// initialize mqtt client
|
||||
try {
|
||||
mqtt = std::make_unique<MqttClient>(
|
||||
params->mqtt_client.host,
|
||||
params->mqtt_client.port,
|
||||
params->mqtt_client.user,
|
||||
params->mqtt_client.password,
|
||||
params->mqtt_client.sign_secret
|
||||
);
|
||||
} catch (const std::exception& e) {
|
||||
std::cerr << "ERROR: Cannot create mqtt client: " << e.what() << "\n";
|
||||
return 1;
|
||||
}
|
||||
mqtt->set_message_callback(on_mqtt_message);
|
||||
if (!mqtt->subscribe(params->mqtt_frame_exporter.listen_topic)) {
|
||||
std::cerr << "ERROR: Cannot subscribe on topic '" << params->mqtt_frame_exporter.listen_topic << "', exiting" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Camera init
|
||||
cv::VideoCapture cap;
|
||||
cap.set(cv::CAP_PROP_FRAME_WIDTH, params->frame.width);
|
||||
cap.set(cv::CAP_PROP_FRAME_HEIGHT, params->frame.height);
|
||||
cap.open(V4L2_DEVICE_NUM);
|
||||
|
||||
// "Warmup" camera
|
||||
while (bgr.total() * bgr.elemSize() == 0) {
|
||||
cap >> bgr;
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
}
|
||||
|
||||
// QR scanner init
|
||||
zbar::ImageScanner scanner;
|
||||
std::unordered_map<std::string, long long> qr_appears;
|
||||
if (params->qr_scanner.enabled) {
|
||||
scanner.set_config(zbar::ZBAR_NONE, zbar::ZBAR_CFG_ENABLE, 1);
|
||||
scanner.set_config(zbar::ZBAR_QRCODE, zbar::ZBAR_CFG_ENABLE, 1);
|
||||
}
|
||||
|
||||
// MJPEG stream init
|
||||
std::thread mjpeg_thread;
|
||||
if (params->mjpeg.mode != FrameMode::DISABLE) {
|
||||
mjpeg_thread = std::thread(mjpeg_stream, params->mjpeg.fps, params->mjpeg.port, params->mjpeg.mode);
|
||||
}
|
||||
|
||||
long long last_frame = millis_timestamp();
|
||||
float frame_time = 1000.0 / params->frame.fps;
|
||||
px_in_frame = params->frame.width * params->frame.height;
|
||||
while (true) {
|
||||
// capture a frame
|
||||
cap >> bgr;
|
||||
if (bgr.empty()) {
|
||||
std::cerr << "ERROR: Captured frame is empty" << std::endl;
|
||||
break;
|
||||
}
|
||||
|
||||
// convert to grayscale
|
||||
if (params->qr_scanner.enabled || params->mjpeg.mode == FrameMode::GRAYSCALE) {
|
||||
cv::cvtColor(bgr, gray, cv::COLOR_BGR2GRAY);
|
||||
}
|
||||
|
||||
long long now = millis_timestamp();
|
||||
if (params->qr_scanner.enabled) {
|
||||
zbar::Image zbar_image(
|
||||
params->frame.width,
|
||||
params->frame.height,
|
||||
"Y800",
|
||||
gray.data,
|
||||
px_in_frame
|
||||
);
|
||||
int n = scanner.scan(zbar_image);
|
||||
if (n > 0) {
|
||||
std::cout << "INFO: Found " << n << " QRs:" << std::endl;
|
||||
std::vector<std::string> qrs_to_send;
|
||||
for (
|
||||
zbar::Image::SymbolIterator symbol = zbar_image.symbol_begin();
|
||||
symbol != zbar_image.symbol_end();
|
||||
++symbol
|
||||
) {
|
||||
std::string data = symbol->get_data();
|
||||
auto appear = qr_appears.find(data);
|
||||
if (appear == qr_appears.end()) {
|
||||
qr_appears.insert({data, now});
|
||||
std::cout << " [x] " << data << std::endl;
|
||||
qrs_to_send.emplace_back(data);
|
||||
} else {
|
||||
std::cout << " [ ] " << data << std::endl;
|
||||
}
|
||||
}
|
||||
if (!qrs_to_send.empty()) {
|
||||
t3hs::QrMessage msg = {
|
||||
.srcid = params->mqtt_client.id,
|
||||
.dstid = params->qr_scanner.dstid,
|
||||
.msgid = t3hs::gen_id(),
|
||||
.timestamp = micros_timestamp(),
|
||||
.qrs = std::move(qrs_to_send)
|
||||
};
|
||||
nlohmann::json qr_json = std::move(msg);
|
||||
if (!mqtt->send_message(params->qr_scanner.send_topic, qr_json)) {
|
||||
std::cerr << "ERROR: Cannot send MQTT message" << std::endl;
|
||||
exit(1);
|
||||
} else {
|
||||
std::cout << "INFO: Sent QR data" << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
auto it = qr_appears.begin();
|
||||
while (it != qr_appears.end()) {
|
||||
if (it->second + params->qr_scanner.rescan_timeout <= now) {
|
||||
it = qr_appears.erase(it);
|
||||
} else {
|
||||
++it;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
long long frame_duration = now - last_frame;
|
||||
long long remaining_frame_time = static_cast<long long>(std::min(frame_time - frame_duration, 0.0f));
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(remaining_frame_time));
|
||||
last_frame = now;
|
||||
}
|
||||
|
||||
cap.release();
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string usage(const std::string& basename) {
|
||||
std::ostringstream oss;
|
||||
oss << "Usage: " << basename << " [<config_file_path>]";
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
std::string parse_cli(int argc, char* argv[]) {
|
||||
std::string cfg_path;
|
||||
if (argc == 1) {
|
||||
std::cout << "INFO: Using default config file: " << DEFAULT_CONFIG_PATH << std::endl;
|
||||
cfg_path = DEFAULT_CONFIG_PATH;
|
||||
} else if (argc == 2) {
|
||||
cfg_path = argv[1];
|
||||
if (file_exists(cfg_path)) {
|
||||
std::cout << "INFO: Using config file '" << cfg_path << "'" << std::endl;
|
||||
} else {
|
||||
std::cerr << "ERROR: Config file '" << cfg_path << "' does not exist or is not accessible. Using default config in " << DEFAULT_CONFIG_PATH << std::endl;
|
||||
cfg_path = DEFAULT_CONFIG_PATH;
|
||||
}
|
||||
} else {
|
||||
throw std::runtime_error("Invalid CLI args");
|
||||
}
|
||||
return cfg_path;
|
||||
}
|
||||
|
||||
void mjpeg_stream(float fps, int port, FrameMode mode) {
|
||||
cv::VideoWriter http;
|
||||
http.open("httpjpg", port);
|
||||
std::cout << "INFO: MJPEG thread started" << std::endl;
|
||||
|
||||
long long last_frame = millis_timestamp();
|
||||
float frame_time = 1000.0f;
|
||||
while (true) {
|
||||
if (!http.isOpened()) {
|
||||
std::cerr << "ERROR: MJPEG writer failed" << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
if (mode == FrameMode::COLOR) {
|
||||
http << bgr;
|
||||
} else {
|
||||
http << gray;
|
||||
}
|
||||
|
||||
long long now = millis_timestamp();
|
||||
long long frame_duration = now - last_frame;
|
||||
long long remaining_frame_time = static_cast<long long>(std::min(frame_time - frame_duration, 0.0f));
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(remaining_frame_time));
|
||||
last_frame = now;
|
||||
}
|
||||
}
|
||||
|
||||
void on_mqtt_message(mosquitto *, void *, const mosquitto_message *msg) {
|
||||
// validating incomming message
|
||||
if (!msg->payload || msg->payloadlen == 0) {
|
||||
std::cerr << "WARNING: Received MQTT empty message" << std::endl;;
|
||||
return;
|
||||
}
|
||||
nlohmann::json msg_json;
|
||||
try {
|
||||
const char* char_data = static_cast<const char*>(msg->payload);
|
||||
std::string_view json_str(char_data, msg->payloadlen);
|
||||
msg_json = nlohmann::json::parse(json_str);
|
||||
} catch (const nlohmann::json::parse_error& e) {
|
||||
std::cerr << "WARNING: JSON parse error: " << e.what() << std::endl;
|
||||
return;
|
||||
} catch (const nlohmann::json::type_error& e) {
|
||||
std::cerr << "WARNING: JSON type error: " << e.what() << std::endl;
|
||||
return;
|
||||
} catch (const nlohmann::json::out_of_range& e) {
|
||||
std::cerr << "WARNING: JSON out of range: " << e.what() << std::endl;
|
||||
return;
|
||||
} catch (const std::exception& e) {
|
||||
std::cerr << "WARNING: JSON error: " << e.what() << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
t3hs::Request req;
|
||||
try {
|
||||
req = std::move(msg_json);
|
||||
} catch (const std::invalid_argument& e) {
|
||||
std::cerr << "WARNING: JSON format is incorrect: " << e.what() << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
// skip message if not for this device
|
||||
if (req.dstid != params->mqtt_client.id) {
|
||||
return;
|
||||
}
|
||||
|
||||
const nlohmann::json& req_vars = req.variables;
|
||||
if (req_vars.find("quality") == req_vars.end() || !req_vars["quality"].is_number_integer()) {
|
||||
std::cerr << "WARNING: JSON format is incorrect: Field 'quality' in 'variables' is missing or not an integer" << std::endl;
|
||||
return;
|
||||
} else if (req_vars["quality"] < 1 || req_vars["quality"] > 100) {
|
||||
std::cerr << "WARNING: Field 'quality' in 'variables' is expected to be between 1 and 100%" << std::endl;
|
||||
return;
|
||||
}
|
||||
if (req_vars.find("mode") == req_vars.end() || !req_vars["mode"].is_string()) {
|
||||
std::cerr << "WARNING: JSON format is incorrect: Field 'mode' in 'variables' is missing or not a string" << std::endl;
|
||||
return;
|
||||
} else if (req_vars["mode"] != "color" && req_vars["mode"] != "grayscale") {
|
||||
std::cerr << "WARNING: Field 'mode' in 'variables' is expected to be equal 'color' or 'grayscale'" << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned int quality = req_vars["quality"].get<unsigned int>();
|
||||
FrameMode mode = FrameModeUtils::from_string(req_vars["mode"].get<std::string>());
|
||||
|
||||
// obtain fresh grayscale frame if needed
|
||||
if (mode == FrameMode::GRAYSCALE && !(params->qr_scanner.enabled || params->mjpeg.mode == FrameMode::GRAYSCALE)) {
|
||||
cv::cvtColor(bgr, gray, cv::COLOR_BGR2GRAY);
|
||||
}
|
||||
|
||||
// preapre jpeg data
|
||||
std::vector<unsigned char> jpeg;
|
||||
if (mode == FrameMode::COLOR) {
|
||||
jpeg = frame_to_jpeg(bgr, quality);
|
||||
} else {
|
||||
jpeg = frame_to_jpeg(gray, quality);
|
||||
}
|
||||
|
||||
// split frame into chunks and send answers
|
||||
std::vector<t3hs::FileBlock> blocks = t3hs::FileBlock::from_raw(jpeg, t3hs::FileBlockOpertype::WRITE, DEFAULT_MQTT_FRAME_EXPORTER_MAX_BLOCK_SIZE, "frame");
|
||||
long long now = micros_timestamp();
|
||||
for (const auto& block : blocks) {
|
||||
nlohmann::json block_json = std::move(block);
|
||||
nlohmann::json resp_vars = {
|
||||
{"quality", quality},
|
||||
{"mode", FrameModeUtils::to_string(mode)},
|
||||
{"file_block", std::move(block_json)}
|
||||
};
|
||||
if (req_vars.find("exposure") != req_vars.end()) {
|
||||
std::string pname = "exposure";
|
||||
auto [min, max, value] = get_camera_param(pname);
|
||||
resp_vars["exposure"] = {
|
||||
{"min", min},
|
||||
{"max", max},
|
||||
{"value", value},
|
||||
};
|
||||
}
|
||||
if (req_vars.find("analogue_gain") != req_vars.end()) {
|
||||
std::string pname = "analogue_gain";
|
||||
auto [min, max, value] = get_camera_param(pname);
|
||||
resp_vars["analogue_gain"] = {
|
||||
{"min", min},
|
||||
{"max", max},
|
||||
{"value", value},
|
||||
};
|
||||
}
|
||||
|
||||
t3hs::Response resp = {
|
||||
.srcid = params->mqtt_client.id,
|
||||
.dstid = params->mqtt_frame_exporter.dstid,
|
||||
.msgid = t3hs::gen_id(),
|
||||
.timestamp = now,
|
||||
.variables = std::move(resp_vars)
|
||||
};
|
||||
nlohmann::json resp_json = std::move(resp);
|
||||
if (!mqtt->send_message(params->mqtt_frame_exporter.send_topic, resp_json)) {
|
||||
std::cerr << "ERROR: Cannot send MQTT message" << std::endl;
|
||||
exit(1);
|
||||
} else {
|
||||
std::cout << "INFO: Sent frame part" << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
117
src/mqtt_client.cpp
Normal file
117
src/mqtt_client.cpp
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <openssl/hmac.h>
|
||||
#include <openssl/sha.h>
|
||||
#include <mosquitto.h>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include "mqtt_client.hpp"
|
||||
#include "static_settings.hpp"
|
||||
|
||||
std::string MqttClient::bytes_to_hex(const std::vector<unsigned char>& data) {
|
||||
static const char hex_chars[] = "0123456789ABCDEF";
|
||||
std::string result;
|
||||
result.reserve(data.size() * 2);
|
||||
for (unsigned char byte : data) {
|
||||
result.push_back(hex_chars[byte >> 4]);
|
||||
result.push_back(hex_chars[byte & 0x0F]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
std::vector<unsigned char> MqttClient::sha256_hmac(const std::string& key, const std::string& data) {
|
||||
std::vector<unsigned char> result(SHA256_DIGEST_LENGTH);
|
||||
HMAC(
|
||||
EVP_sha256(),
|
||||
key.data(), key.size(),
|
||||
reinterpret_cast<const unsigned char*>(data.data()), data.size(),
|
||||
result.data(),
|
||||
nullptr
|
||||
);
|
||||
return result;
|
||||
}
|
||||
|
||||
MqttClient::MqttClient(
|
||||
std::string host,
|
||||
int port,
|
||||
std::string user,
|
||||
std::string password,
|
||||
std::string sign_secret
|
||||
) : m_host(host),
|
||||
m_port(port),
|
||||
m_user(user),
|
||||
m_password(password),
|
||||
m_sign_secret(sign_secret)
|
||||
{
|
||||
mosquitto_lib_init();
|
||||
std::string client_name = "libmosquitto-wrapper-" + user + "-client";
|
||||
m_mosq = mosquitto_new("test", true, nullptr);
|
||||
if (!m_mosq) {
|
||||
throw std::runtime_error("Cannot instantiate mqtt client");
|
||||
}
|
||||
int auth_result = mosquitto_username_pw_set(m_mosq, m_user.c_str(), m_password.c_str());
|
||||
if (auth_result != MOSQ_ERR_SUCCESS) {
|
||||
throw std::runtime_error("Auth error: " + std::string(mosquitto_strerror(auth_result)));
|
||||
}
|
||||
int connect_result = mosquitto_connect(m_mosq, m_host.c_str(), m_port, MQTT_KEEPALIVE_VALUE);
|
||||
if (connect_result != MOSQ_ERR_SUCCESS) {
|
||||
throw std::runtime_error("Cannot connect to mqtt broker");
|
||||
}
|
||||
mosquitto_loop_start(m_mosq);
|
||||
}
|
||||
|
||||
MqttClient::~MqttClient()
|
||||
{
|
||||
mosquitto_disconnect(m_mosq);
|
||||
mosquitto_loop_stop(m_mosq, true);
|
||||
mosquitto_destroy(m_mosq);
|
||||
mosquitto_lib_cleanup();
|
||||
}
|
||||
|
||||
bool MqttClient::send_message(const std::string& topic, const nlohmann::json& message) {
|
||||
std::string str_msg = message.dump();
|
||||
std::vector<unsigned char> sign = sha256_hmac(m_sign_secret, str_msg);
|
||||
std::string sign_str = bytes_to_hex(sign);
|
||||
nlohmann::json signed_msg = nlohmann::json {
|
||||
{"data", message},
|
||||
{"signature", sign_str}
|
||||
};
|
||||
std::string final_msg = signed_msg.dump();
|
||||
return m_send_raw(topic, final_msg);
|
||||
}
|
||||
|
||||
bool MqttClient::send_message(const std::string& topic, nlohmann::json&& message) {
|
||||
std::string str_msg = message.dump();
|
||||
std::vector<unsigned char> sign = sha256_hmac(m_sign_secret, str_msg);
|
||||
std::string sign_str = bytes_to_hex(sign);
|
||||
nlohmann::json signed_msg = nlohmann::json {
|
||||
{"data", std::move(message)},
|
||||
{"signature", sign_str}
|
||||
};
|
||||
std::string final_msg = signed_msg.dump();
|
||||
return m_send_raw(topic, final_msg);
|
||||
}
|
||||
|
||||
bool MqttClient::m_send_raw(const std::string& topic, const std::string& message) {
|
||||
int ret = mosquitto_publish(
|
||||
m_mosq, // Client
|
||||
nullptr, // message id
|
||||
topic.c_str(), // topic
|
||||
message.size(), // message length
|
||||
message.c_str(), // Данные
|
||||
MqttQos::AT_LEAST_ONCE, // QoS
|
||||
false // retain
|
||||
);
|
||||
return ret == MOSQ_ERR_SUCCESS;
|
||||
}
|
||||
|
||||
bool MqttClient::subscribe(const std::string& topic) {
|
||||
int qos = 1;
|
||||
int ret = mosquitto_subscribe(m_mosq, nullptr, topic.c_str(), qos);
|
||||
return ret == MOSQ_ERR_SUCCESS;
|
||||
}
|
||||
|
||||
void MqttClient::set_message_callback(void (*callback)(mosquitto *, void *, const mosquitto_message*)) {
|
||||
mosquitto_message_callback_set(m_mosq, callback);
|
||||
}
|
||||
38
src/mqtt_client.hpp
Normal file
38
src/mqtt_client.hpp
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <mosquitto.h>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
enum MqttQos {
|
||||
AT_MOST_ONCE = 0,
|
||||
AT_LEAST_ONCE = 1,
|
||||
EXACTLY_ONCE = 2,
|
||||
};
|
||||
|
||||
// should be singltoned if more than one client required
|
||||
class MqttClient {
|
||||
public:
|
||||
static std::string bytes_to_hex(const std::vector<unsigned char>&);
|
||||
static std::vector<unsigned char> sha256_hmac(const std::string&, const std::string&);
|
||||
|
||||
MqttClient(std::string, int, std::string, std::string, std::string);
|
||||
~MqttClient();
|
||||
|
||||
bool send_message(const std::string&, const nlohmann::json&);
|
||||
bool send_message(const std::string&, nlohmann::json&&);
|
||||
bool subscribe(const std::string&);
|
||||
void set_message_callback(void (*callback)(mosquitto*, void*, const mosquitto_message*));
|
||||
|
||||
private:
|
||||
std::string m_host;
|
||||
int m_port;
|
||||
std::string m_user;
|
||||
std::string m_password;
|
||||
std::string m_sign_secret;
|
||||
mosquitto* m_mosq = nullptr;
|
||||
|
||||
bool m_send_raw(const std::string&, const std::string&);
|
||||
};
|
||||
174
src/settings.cpp
Normal file
174
src/settings.cpp
Normal file
|
|
@ -0,0 +1,174 @@
|
|||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
#include <libconfig.h++>
|
||||
|
||||
#include "settings.hpp"
|
||||
#include "static_settings.hpp"
|
||||
|
||||
std::string FrameModeUtils::to_string(const FrameMode& mode) {
|
||||
switch (mode) {
|
||||
case FrameMode::DISABLE: return "disable";
|
||||
case FrameMode::COLOR: return "color";
|
||||
case FrameMode::GRAYSCALE: return "grayscale";
|
||||
default: throw std::runtime_error("Invalid frame mode. Allowed: disable, color, grayscale");
|
||||
}
|
||||
}
|
||||
|
||||
FrameMode FrameModeUtils::from_string(const std::string& str) {
|
||||
if (str == "disable") return FrameMode::DISABLE;
|
||||
if (str == "color") return FrameMode::COLOR;
|
||||
if (str == "grayscale") return FrameMode::GRAYSCALE;
|
||||
throw std::runtime_error("Invalid frame mode string: " + str);
|
||||
}
|
||||
|
||||
Settings::Settings(const std::string& file) {
|
||||
libconfig::Config cfg;
|
||||
|
||||
try {
|
||||
cfg.readFile(file.c_str());
|
||||
} catch (const libconfig::FileIOException& e) {
|
||||
throw std::runtime_error("Cannot read config file " + file);;
|
||||
} catch (const libconfig::ParseException& e) {
|
||||
throw std::runtime_error(
|
||||
"Parse error at " + std::string(e.getFile()) + ":" + std::to_string(e.getLine())
|
||||
+ " - " + e.getError()
|
||||
);
|
||||
}
|
||||
|
||||
if (cfg.exists("frame")) {
|
||||
const libconfig::Setting& frame_section = cfg.lookup("frame");
|
||||
frame_section.lookupValue("width", frame.width);
|
||||
frame_section.lookupValue("height", frame.height);
|
||||
frame_section.lookupValue("fps", frame.fps);
|
||||
if (frame.width < 1 || frame.width > MAX_FRAME_WIDTH) {
|
||||
std::cerr << "WARNING: Invalid frame width " << frame.width << ". Using default (" << MAX_FRAME_WIDTH << ")" << std::endl;
|
||||
frame.width = DEFAULT_FRAME_WIDTH;
|
||||
}
|
||||
if (frame.height < 1 || frame.height > MAX_FRAME_HEIGHT) {
|
||||
std::cerr << "WARNING: Invalid frame height " << frame.height << ". Using default (" << MAX_FRAME_HEIGHT << ")" << std::endl;
|
||||
frame.height = DEFAULT_FRAME_HEIGHT;
|
||||
}
|
||||
if (frame.fps <= 0) {
|
||||
frame.fps = DEFAULT_FRAME_FPS;
|
||||
std::cerr << "WARNING: Frame fps must be positive value. Using default (" << DEFAULT_FRAME_FPS << ")" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
if (cfg.exists("mjpeg")) {
|
||||
const libconfig::Setting& mjpeg_section = cfg.lookup("mjpeg");
|
||||
mjpeg_section.lookupValue("fps", mjpeg.fps);
|
||||
mjpeg_section.lookupValue("port", mjpeg.port);
|
||||
if (mjpeg.fps <= 0) {
|
||||
mjpeg.fps = DEFAULT_MJPEG_FPS;
|
||||
std::cerr << "WARNING: mjpeg fps must be positive value. Using default (" << DEFAULT_MJPEG_FPS << ")" << std::endl;
|
||||
}
|
||||
if (mjpeg.port <= 0 || mjpeg.port > 65535) {
|
||||
std::cerr << "WARNING: Invalid mjpeg port " << mjpeg.port << ". Using default (" << DEFAULT_MJPEG_PORT << ")" << std::endl;
|
||||
mjpeg.port = DEFAULT_MJPEG_PORT;
|
||||
}
|
||||
std::string mjpeg_mode_str;
|
||||
if (mjpeg_section.lookupValue("mode", mjpeg_mode_str)) {
|
||||
if (mjpeg_mode_str.empty()) {
|
||||
std::cerr << "WARNING: Empty mjpeg mode. Using default (" << FrameModeUtils::to_string(DEFAULT_MJPEG_MODE) << ")" << std::endl;
|
||||
mjpeg.mode = DEFAULT_MJPEG_MODE;
|
||||
} else if (
|
||||
mjpeg_mode_str != FrameModeUtils::to_string(FrameMode::DISABLE)
|
||||
&& mjpeg_mode_str != FrameModeUtils::to_string(FrameMode::COLOR)
|
||||
&& mjpeg_mode_str != FrameModeUtils::to_string(FrameMode::GRAYSCALE)
|
||||
) {
|
||||
std::cerr << "WARNING: Invalid frame mode " << mjpeg_mode_str << " (allowed: disable, color, grayscale). Using default (" << FrameModeUtils::to_string(DEFAULT_MJPEG_MODE) << ")" << std::endl;
|
||||
mjpeg.mode = DEFAULT_MJPEG_MODE;
|
||||
} else {
|
||||
mjpeg.mode = FrameModeUtils::from_string(mjpeg_mode_str);
|
||||
}
|
||||
} else {
|
||||
std::cerr << "WARNING: mjpeg mode is not set. Using default (" << FrameModeUtils::to_string(DEFAULT_MJPEG_MODE) << ")" << std::endl;
|
||||
mjpeg.mode = DEFAULT_MJPEG_MODE;
|
||||
}
|
||||
}
|
||||
|
||||
if (cfg.exists("mqtt_client")) {
|
||||
const libconfig::Setting& mqtt_client_section = cfg.lookup("mqtt_client");
|
||||
mqtt_client_section.lookupValue("host", mqtt_client.host);
|
||||
mqtt_client_section.lookupValue("port", mqtt_client.port);
|
||||
mqtt_client_section.lookupValue("id", mqtt_client.id);
|
||||
if (mqtt_client.host.empty()) {
|
||||
std::cerr << "WARNING: Empty mqtt_client host. Using default (" << DEFAULT_MQTT_HOST << ")" << std::endl;
|
||||
mqtt_client.host = DEFAULT_MQTT_HOST;
|
||||
}
|
||||
if (mqtt_client.port <= 0 || mqtt_client.port > 65535) {
|
||||
std::cerr << "WARNING: Invalid mqtt_client port " << mqtt_client.port << ". Using default (" << DEFAULT_MQTT_PORT << ")" << std::endl;
|
||||
mqtt_client.port = DEFAULT_MQTT_PORT;
|
||||
}
|
||||
if (!mqtt_client_section.lookupValue("user", mqtt_client.user)
|
||||
|| !mqtt_client_section.lookupValue("password", mqtt_client.password)
|
||||
|| !mqtt_client_section.lookupValue("sign_secret", mqtt_client.sign_secret)
|
||||
) {
|
||||
throw std::runtime_error("'mqtt_client' section must be set and at least with fields 'user', 'password' and 'sign_secret'");
|
||||
}
|
||||
} else {
|
||||
throw std::runtime_error("'mqtt_client' section must be set and at least with fields 'user', 'password' and 'sign_secret'");
|
||||
}
|
||||
|
||||
if (cfg.exists("qr_scanner")) {
|
||||
const libconfig::Setting& qr_scanner_section = cfg.lookup("qr_scanner");
|
||||
qr_scanner_section.lookupValue("enabled", qr_scanner.enabled);
|
||||
qr_scanner_section.lookupValue("rescan_timeout", qr_scanner.rescan_timeout);
|
||||
if (!qr_scanner_section.lookupValue("send_topic", qr_scanner.send_topic)) { // because of lazy && processing
|
||||
if (qr_scanner.enabled) {
|
||||
throw std::runtime_error("qr_scanner send_topic not set");
|
||||
}
|
||||
}
|
||||
if (qr_scanner.dstid.empty()) {
|
||||
std::cerr << "WARNING: Empty qr_scanner dstid. Using default (" << DEFAULT_DSTID << ")" << std::endl;
|
||||
qr_scanner.dstid = DEFAULT_DSTID;
|
||||
}
|
||||
}
|
||||
|
||||
if (cfg.exists("mqtt_frame_exporter")) {
|
||||
const libconfig::Setting& mqtt_frame_exporter_section = cfg.lookup("mqtt_frame_exporter");
|
||||
if (!mqtt_frame_exporter_section.lookupValue("listen_topic", mqtt_frame_exporter.listen_topic)
|
||||
|| !mqtt_frame_exporter_section.lookupValue("send_topic", mqtt_frame_exporter.send_topic)
|
||||
) {
|
||||
throw std::runtime_error("'mqtt_frame_exporter' section must be set and at least with fields 'listen_topic' and 'send_topic'");
|
||||
}
|
||||
if (mqtt_frame_exporter.dstid.empty()) {
|
||||
std::cerr << "WARNING: Empty mqtt_frame_exporter dstid. Using default (" << DEFAULT_DSTID << ")" << std::endl;
|
||||
mqtt_frame_exporter.dstid = DEFAULT_DSTID;
|
||||
}
|
||||
} else {
|
||||
throw std::runtime_error("'mqtt_frame_exporter' section must be set and at least with fields 'listen_topic' and 'send_topic'");
|
||||
}
|
||||
}
|
||||
|
||||
std::string Settings::to_string() {
|
||||
std::ostringstream oss;
|
||||
oss << std::showpoint << std::boolalpha;
|
||||
oss << "Frame:" << std::endl
|
||||
<< " width: " << frame.width << std::endl
|
||||
<< " height: " << frame.height << std::endl
|
||||
<< " fps: " << frame.fps << std::endl
|
||||
<< "MJPEG:" << std::endl
|
||||
<< " fps: " << std::showpoint << mjpeg.fps << std::endl
|
||||
<< " port: " << mjpeg.port << std::endl
|
||||
<< " mode: " << FrameModeUtils::to_string(mjpeg.mode) << std::endl
|
||||
<< "MQTT client:" << std::endl
|
||||
<< " host: " << mqtt_client.host << std::endl
|
||||
<< " port: " << mqtt_client.port << std::endl
|
||||
<< " user: " << mqtt_client.user << std::endl
|
||||
<< " password: " << std::string(mqtt_client.password.length(), '*') << std::endl
|
||||
<< " sign_secret: " << std::string(mqtt_client.sign_secret.length(), '*') << std::endl
|
||||
<< " id: " << mqtt_client.id << std::endl
|
||||
<< "QR scanner:" << std::endl
|
||||
<< " enabled: " << qr_scanner.enabled << std::endl
|
||||
<< " rescan_timeout: " << qr_scanner.rescan_timeout << std::endl
|
||||
<< " send_topic: " << qr_scanner.send_topic << std::endl
|
||||
<< " dstid: " << qr_scanner.dstid << std::endl
|
||||
<< "MQTT frame exporter:" << std::endl
|
||||
<< " listen_topic: " << mqtt_frame_exporter.listen_topic << std::endl
|
||||
<< " send_topic: " << mqtt_frame_exporter.send_topic << std::endl
|
||||
<< " dstid: " << mqtt_frame_exporter.dstid << std::endl
|
||||
<< " max_block_size: " << mqtt_frame_exporter.max_block_size << std::endl;
|
||||
return oss.str();
|
||||
}
|
||||
58
src/settings.hpp
Normal file
58
src/settings.hpp
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "t3hs_proto.hpp"
|
||||
#include "static_settings.hpp"
|
||||
|
||||
enum class FrameMode {
|
||||
DISABLE,
|
||||
COLOR,
|
||||
GRAYSCALE,
|
||||
};
|
||||
|
||||
class FrameModeUtils {
|
||||
public:
|
||||
static std::string to_string(const FrameMode& mode);
|
||||
static FrameMode from_string(const std::string& str);
|
||||
};
|
||||
|
||||
struct Settings {
|
||||
struct {
|
||||
int width = DEFAULT_FRAME_WIDTH;
|
||||
int height = DEFAULT_FRAME_HEIGHT;
|
||||
float fps = DEFAULT_FRAME_FPS;
|
||||
} frame;
|
||||
|
||||
struct {
|
||||
float fps = DEFAULT_MJPEG_FPS;
|
||||
int port = DEFAULT_MJPEG_PORT;
|
||||
FrameMode mode = DEFAULT_MJPEG_MODE;
|
||||
} mjpeg;
|
||||
|
||||
struct {
|
||||
std::string host = DEFAULT_MQTT_HOST;
|
||||
int port = DEFAULT_MQTT_PORT;
|
||||
std::string user;
|
||||
std::string password;
|
||||
std::string sign_secret;
|
||||
std::string id = t3hs::get_mac_addr_formatted(IFACE);
|
||||
} mqtt_client;
|
||||
|
||||
struct {
|
||||
bool enabled = DEFAULT_QR_ENABLED;
|
||||
int rescan_timeout = DEFAULT_QR_RESCAN_TIMEOUT;
|
||||
std::string send_topic;
|
||||
std::string dstid = DEFAULT_DSTID;
|
||||
} qr_scanner;
|
||||
|
||||
struct {
|
||||
std::string listen_topic;
|
||||
std::string send_topic;
|
||||
std::string dstid = DEFAULT_DSTID;
|
||||
unsigned int max_block_size = DEFAULT_MQTT_FRAME_EXPORTER_MAX_BLOCK_SIZE;
|
||||
} mqtt_frame_exporter;
|
||||
|
||||
Settings(const std::string&);
|
||||
std::string to_string();
|
||||
};
|
||||
29
src/static_settings.hpp
Normal file
29
src/static_settings.hpp
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#pragma once
|
||||
|
||||
#define DEFAULT_CONFIG_PATH "/etc/t3hs/frame_exporter/config.cfg"
|
||||
|
||||
#define V4L2_DEVICE_NUM 11
|
||||
#define V4L2_SUBDEV_NUM 2
|
||||
#define IFACE "eth0"
|
||||
|
||||
#define MQTT_KEEPALIVE_VALUE 5
|
||||
#define DEFAULT_DSTID "FFFFFFFF"
|
||||
|
||||
#define MAX_FRAME_WIDTH 2304
|
||||
#define MAX_FRAME_HEIGHT 1296
|
||||
|
||||
#define DEFAULT_FRAME_WIDTH 640
|
||||
#define DEFAULT_FRAME_HEIGHT 480
|
||||
#define DEFAULT_FRAME_FPS 1.0
|
||||
|
||||
#define DEFAULT_MJPEG_FPS 1.0
|
||||
#define DEFAULT_MJPEG_PORT 80
|
||||
#define DEFAULT_MJPEG_MODE FrameMode::DISABLE
|
||||
|
||||
#define DEFAULT_MQTT_HOST "127.0.0.1"
|
||||
#define DEFAULT_MQTT_PORT 1883
|
||||
|
||||
#define DEFAULT_QR_ENABLED false
|
||||
#define DEFAULT_QR_RESCAN_TIMEOUT 2000
|
||||
|
||||
#define DEFAULT_MQTT_FRAME_EXPORTER_MAX_BLOCK_SIZE 4096
|
||||
323
src/t3hs_proto.cpp
Normal file
323
src/t3hs_proto.cpp
Normal file
|
|
@ -0,0 +1,323 @@
|
|||
#include <random>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <array>
|
||||
#include <sys/ioctl.h>
|
||||
#include <net/if.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/evp.h>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include "t3hs_proto.hpp"
|
||||
|
||||
using namespace t3hs;
|
||||
|
||||
uint32_t t3hs::gen_id() {
|
||||
static std::random_device rd;
|
||||
static std::mt19937 gen(rd());
|
||||
static std::uniform_int_distribution<uint32_t> dis(0, UINT32_MAX);
|
||||
|
||||
return dis(gen);
|
||||
}
|
||||
|
||||
std::string t3hs::micros2iso8601(int64_t micros) {
|
||||
time_t seconds = micros / 1000000;
|
||||
int microseconds_remainder = micros % 1000000;
|
||||
struct tm tm_struct;
|
||||
gmtime_r(&seconds, &tm_struct);
|
||||
std::ostringstream oss;
|
||||
oss << std::put_time(&tm_struct, "%Y-%m-%dT%H:%M:%S")
|
||||
<< "." << std::setfill('0') << std::setw(6) << microseconds_remainder << "Z";
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
std::array<unsigned char, 6> t3hs::get_mac_addr(const std::string& iface) {
|
||||
int sock = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
if (sock < 0) throw std::runtime_error("Cannot open socket");
|
||||
|
||||
struct ifreq ifr;
|
||||
std::memset(&ifr, 0, sizeof(ifr));
|
||||
std::strncpy(ifr.ifr_name, iface.c_str(), IFNAMSIZ - 1);
|
||||
|
||||
if (ioctl(sock, SIOCGIFHWADDR, &ifr) < 0) {
|
||||
close(sock);
|
||||
throw std::runtime_error("Cannot get MAC for interface " + iface);
|
||||
}
|
||||
close(sock);
|
||||
|
||||
unsigned char* mac = reinterpret_cast<unsigned char*>(ifr.ifr_hwaddr.sa_data);
|
||||
std::array<unsigned char, 6> addr_bytes = { mac[0], mac[1], mac[2], mac[3], mac[4], mac[5] };
|
||||
return addr_bytes;
|
||||
}
|
||||
|
||||
std::string t3hs::get_mac_addr_formatted(const std::string& iface_name) {
|
||||
std::array<unsigned char, 6> mac = get_mac_addr("eth0");
|
||||
char part[9];
|
||||
std::sprintf(part, "%02X%02X%02X%02X", mac[5], mac[4], mac[3], mac[2]);
|
||||
return std::string(part);
|
||||
}
|
||||
|
||||
namespace {
|
||||
struct BIOFreeAll { void operator()(BIO* p) { BIO_free_all(p); } };
|
||||
}
|
||||
|
||||
std::string t3hs::base64_encode(const unsigned char* data, size_t len) {
|
||||
std::unique_ptr<BIO, BIOFreeAll> b64(BIO_new(BIO_f_base64()));
|
||||
BIO_set_flags(b64.get(), BIO_FLAGS_BASE64_NO_NL);
|
||||
BIO* sink = BIO_new(BIO_s_mem());
|
||||
BIO_push(b64.get(), sink);
|
||||
BIO_write(b64.get(), data, len);
|
||||
BIO_flush(b64.get());
|
||||
char* encoded;
|
||||
long size = BIO_get_mem_data(sink, &encoded);
|
||||
return std::string(encoded, size);
|
||||
}
|
||||
|
||||
std::string t3hs::base64_encode(const std::vector<unsigned char>& data) {
|
||||
return t3hs::base64_encode(data.data(), data.size());
|
||||
}
|
||||
|
||||
std::vector<FileBlock> FileBlock::from_raw(
|
||||
const std::vector<unsigned char>& data,
|
||||
FileBlockOpertype opertype,
|
||||
unsigned int max_block_size,
|
||||
const std::string& basename
|
||||
) {
|
||||
uint32_t transid = gen_id();
|
||||
unsigned int parts = (data.size() + max_block_size - 1) / max_block_size; // ceil without using floats
|
||||
std::vector<FileBlock> blocks;
|
||||
blocks.reserve(parts);
|
||||
|
||||
auto begin = data.begin();
|
||||
auto end = data.end();
|
||||
unsigned int part_count = 0;
|
||||
while (begin != end) {
|
||||
auto next = std::distance(begin, end) >= max_block_size
|
||||
? begin + max_block_size
|
||||
: end;
|
||||
size_t part_len = std::distance(begin, next);
|
||||
std::string part_encoded = base64_encode(begin.base(), part_len);
|
||||
FileBlock block = {
|
||||
.transid = transid,
|
||||
.opertype = opertype,
|
||||
.part = part_count,
|
||||
.parts = parts,
|
||||
.mem_object = basename + std::to_string(transid) + ".jpg",
|
||||
.size = part_len,
|
||||
.dat = part_encoded
|
||||
};
|
||||
blocks.push_back(block);
|
||||
|
||||
begin = next;
|
||||
part_count++;
|
||||
}
|
||||
|
||||
return blocks;
|
||||
}
|
||||
|
||||
void t3hs::to_json(nlohmann::json& json, const t3hs::FileBlock& block) {
|
||||
json = nlohmann::json {
|
||||
{"transid", block.transid},
|
||||
{"opertype", block.opertype},
|
||||
{"part", block.part},
|
||||
{"parts", block.parts},
|
||||
{"mem_object", block.mem_object},
|
||||
{"size", block.size},
|
||||
{"dat", block.dat}
|
||||
};
|
||||
}
|
||||
|
||||
void t3hs::to_json(nlohmann::json& json, t3hs::FileBlock&& block) {
|
||||
json = nlohmann::json {
|
||||
{"transid", block.transid},
|
||||
{"opertype", block.opertype},
|
||||
{"part", block.part},
|
||||
{"parts", block.parts},
|
||||
{"mem_object", std::move(block.mem_object)},
|
||||
{"size", block.size},
|
||||
{"dat", std::move(block.dat)}
|
||||
};
|
||||
}
|
||||
|
||||
void t3hs::to_json(nlohmann::json& json, const Response& resp) {
|
||||
json = nlohmann::json {
|
||||
{"srcid", resp.srcid},
|
||||
{"dstid", resp.dstid},
|
||||
{"msgid", resp.msgid},
|
||||
{"msgtype", 1},
|
||||
{"timestamp", t3hs::micros2iso8601(resp.timestamp)},
|
||||
{"payloadtype", 1},
|
||||
{"payloadname", "notset"},
|
||||
{"payload", {
|
||||
{"applytype", 0},
|
||||
{"variables", resp.variables}
|
||||
}}
|
||||
};
|
||||
}
|
||||
|
||||
void t3hs::to_json(nlohmann::json& json, Response&& resp) {
|
||||
json = nlohmann::json {
|
||||
{"srcid", std::move(resp.srcid)},
|
||||
{"dstid", std::move(resp.dstid)},
|
||||
{"msgid", resp.msgid},
|
||||
{"msgtype", 1},
|
||||
{"timestamp", std::move(t3hs::micros2iso8601(resp.timestamp))},
|
||||
{"payloadtype", 1},
|
||||
{"payloadname", "notset"},
|
||||
{"payload", {
|
||||
{"applytype", 0},
|
||||
{"variables", std::move(resp.variables)}
|
||||
}}
|
||||
};
|
||||
}
|
||||
|
||||
void t3hs::from_json(const nlohmann::json& json, Request& req) {
|
||||
if (!json.is_object()) {
|
||||
throw std::invalid_argument("given JSON is not an object");
|
||||
}
|
||||
|
||||
if (json.find("data") == json.end() || !json["data"].is_object()) {
|
||||
throw std::invalid_argument("Field 'data' is missing or not an object");
|
||||
}
|
||||
if (json.find("signature") == json.end() || !json["signature"].is_string()) {
|
||||
throw std::invalid_argument("Field 'signature' is missing or not a string");
|
||||
}
|
||||
|
||||
const nlohmann::json& data = json["data"];
|
||||
if (data.find("srcid") == data.end() || !data["srcid"].is_string()) {
|
||||
throw std::invalid_argument("Field 'srcid' in 'data' is missing or not a string");
|
||||
}
|
||||
if (data.find("dstid") == data.end() || !data["dstid"].is_string()) {
|
||||
throw std::invalid_argument("Field 'dstid' in 'data' is missing or not a string");
|
||||
}
|
||||
if (data.find("msgid") == data.end() || !data["msgid"].is_number_integer()) {
|
||||
throw std::invalid_argument("Field 'msgid' in 'data' is missing or not an integer");
|
||||
}
|
||||
if (data.find("msgtype") == data.end() || !data["msgtype"].is_number_integer()) {
|
||||
throw std::invalid_argument("Field 'msgtype' in 'data' is missing or not an integer");
|
||||
} else if (data["msgtype"] != 2) {
|
||||
throw std::invalid_argument("Field 'msgtype' in 'data' is expected to be equal 2");
|
||||
}
|
||||
if (data.find("time") == data.end() || !data["time"].is_string()) {
|
||||
throw std::invalid_argument("Field 'time' in 'data' is missing or not a string");
|
||||
}
|
||||
if (data.find("payloadtype") == data.end() || !data["payloadtype"].is_number_integer()) {
|
||||
throw std::invalid_argument("Field 'payloadtype' in 'data' is missing or not an integer");
|
||||
} else if (data["payloadtype"] != 1) {
|
||||
throw std::invalid_argument("Field 'payloadtype' in 'data' is expected to be equal 1");
|
||||
}
|
||||
if (data.find("payload") == data.end() || !data["payload"].is_object()) {
|
||||
throw std::invalid_argument("Field 'payload' in 'data' is missing or not a object");
|
||||
}
|
||||
|
||||
const nlohmann::json& payload = data["payload"];
|
||||
if (payload.find("applytype") == payload.end() || !payload["applytype"].is_number_integer()) {
|
||||
throw std::invalid_argument("Field 'applytype' in 'payload' is missing or not an integer");
|
||||
} else if (payload["applytype"] != 0) {
|
||||
throw std::invalid_argument("Field 'applytype' in 'payload' is expected to be equal 0");
|
||||
}
|
||||
if (payload.find("variables") == payload.end() || !payload["variables"].is_object()) {
|
||||
throw std::invalid_argument("Field 'variables' in 'payload' is missing or not an object");
|
||||
}
|
||||
|
||||
req.srcid = data["srcid"].get<std::string>();
|
||||
req.dstid = data["dstid"].get<std::string>();
|
||||
req.msgid = data["msgid"].get<uint32_t>();
|
||||
req.timestamp = data["time"].get<std::string>();
|
||||
req.variables = payload["variables"].get<nlohmann::json>();
|
||||
}
|
||||
|
||||
void t3hs::from_json(nlohmann::json&& json, Request& req) {
|
||||
if (!json.is_object()) {
|
||||
throw std::invalid_argument("given JSON is not an object");
|
||||
}
|
||||
|
||||
if (json.find("data") == json.end() || !json["data"].is_object()) {
|
||||
throw std::invalid_argument("Field 'data' is missing or not an object");
|
||||
}
|
||||
if (json.find("signature") == json.end() || !json["signature"].is_string()) {
|
||||
throw std::invalid_argument("Field 'signature' is missing or not a string");
|
||||
}
|
||||
|
||||
const nlohmann::json& data = json["data"];
|
||||
if (data.find("srcid") == data.end() || !data["srcid"].is_string()) {
|
||||
throw std::invalid_argument("Field 'src' in 'data' is missing or not a string");
|
||||
}
|
||||
if (data.find("dstid") == data.end() || !data["dstid"].is_string()) {
|
||||
throw std::invalid_argument("Field 'dstid' in 'data' is missing or not a string");
|
||||
}
|
||||
if (data.find("msgid") == data.end() || !data["msgid"].is_number_integer()) {
|
||||
throw std::invalid_argument("Field 'msgid' in 'data' is missing or not an integer");
|
||||
}
|
||||
if (data.find("msgtype") == data.end() || !data["msgtype"].is_number_integer()) {
|
||||
throw std::invalid_argument("Field 'msgtype' in 'data' is missing or not an integer");
|
||||
} else if (data["msgtype"] != 2) {
|
||||
throw std::invalid_argument("Field 'msgtype' in 'data' is expected to be equal 2");
|
||||
}
|
||||
if (data.find("time") == data.end() || !data["time"].is_string()) {
|
||||
throw std::invalid_argument("Field 'time' in 'data' is missing or not a string");
|
||||
}
|
||||
if (data.find("payloadtype") == data.end() || !data["payloadtype"].is_number_integer()) {
|
||||
throw std::invalid_argument("Field 'payloadtype' in 'data' is missing or not an integer");
|
||||
} else if (data["payloadtype"] != 1) {
|
||||
throw std::invalid_argument("Field 'payloadtype' in 'data' is expected to be equal 1");
|
||||
}
|
||||
if (data.find("payload") == data.end() || !data["payload"].is_object()) {
|
||||
throw std::invalid_argument("Field 'payload' in 'data' is missing or not a object");
|
||||
}
|
||||
|
||||
const nlohmann::json& payload = data["payload"];
|
||||
if (payload.find("applytype") == payload.end() || !payload["applytype"].is_number_integer()) {
|
||||
throw std::invalid_argument("Field 'applytype' in 'payload' is missing or not an integer");
|
||||
} else if (payload["applytype"] != 0) {
|
||||
throw std::invalid_argument("Field 'applytype' in 'payload' is expected to be equal 0");
|
||||
}
|
||||
if (payload.find("variables") == payload.end() || !payload["variables"].is_object()) {
|
||||
throw std::invalid_argument("Field 'variables' in 'payload' is missing or not an object");
|
||||
}
|
||||
|
||||
req.srcid = std::move(data["srcid"]).get<std::string>();
|
||||
req.dstid = std::move(data["dstid"]).get<std::string>();
|
||||
req.msgid = std::move(data["msgid"]).get<uint32_t>();
|
||||
req.timestamp = std::move(data["time"]).get<std::string>();
|
||||
req.variables = std::move(payload).get<nlohmann::json>();
|
||||
}
|
||||
|
||||
void t3hs::to_json(nlohmann::json& json, const QrMessage& qr_msg) {
|
||||
json = {
|
||||
{"srcid", qr_msg.srcid},
|
||||
{"dstid", qr_msg.dstid},
|
||||
{"msgid", qr_msg.msgid},
|
||||
{"timestamp", t3hs::micros2iso8601(qr_msg.timestamp)},
|
||||
{"msgtype", 1},
|
||||
{"payloadtype", 1},
|
||||
{"payloadname", "qrdata"},
|
||||
{"payload", {
|
||||
{"applytype", 0},
|
||||
{"variables", {
|
||||
{"qrdata", qr_msg.qrs},
|
||||
}}
|
||||
}}
|
||||
};
|
||||
}
|
||||
|
||||
void t3hs::to_json(nlohmann::json& json, QrMessage&& qr_msg) {
|
||||
json = nlohmann::json {
|
||||
{"srcid", std::move(qr_msg.srcid)},
|
||||
{"dstid", std::move(qr_msg.dstid)},
|
||||
{"msgid", std::move(qr_msg.msgid)},
|
||||
{"timestamp", std::move(t3hs::micros2iso8601(qr_msg.timestamp))},
|
||||
{"msgtype", 1},
|
||||
{"payloadtype", 1},
|
||||
{"payloadname", "qrdata"},
|
||||
{"payload", {
|
||||
{"applytype", 0},
|
||||
{"variables", {
|
||||
{"qrdata", std::move(qr_msg.qrs)}
|
||||
}}
|
||||
}}
|
||||
};
|
||||
}
|
||||
79
src/t3hs_proto.hpp
Normal file
79
src/t3hs_proto.hpp
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <array>
|
||||
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/evp.h>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
namespace t3hs {
|
||||
uint32_t gen_id();
|
||||
std::string micros2iso8601(int64_t);
|
||||
std::string base64_encode(const unsigned char*, size_t);
|
||||
std::string base64_encode(const std::vector<unsigned char>&);
|
||||
std::array<unsigned char, 6> get_mac_addr(const std::string&);
|
||||
std::string get_mac_addr_formatted(const std::string&);
|
||||
|
||||
enum FileBlockOpertype {
|
||||
READ = 1,
|
||||
DELETE = 2,
|
||||
WRITE = 3,
|
||||
};
|
||||
|
||||
struct FileBlock {
|
||||
uint32_t transid;
|
||||
FileBlockOpertype opertype;
|
||||
unsigned int part;
|
||||
unsigned int parts;
|
||||
std::string mem_object;
|
||||
unsigned int size;
|
||||
std::string dat;
|
||||
|
||||
static std::vector<FileBlock> from_raw(
|
||||
const std::vector<unsigned char>&,
|
||||
FileBlockOpertype,
|
||||
unsigned int,
|
||||
const std::string&
|
||||
);
|
||||
};
|
||||
|
||||
struct Request {
|
||||
std::string srcid;
|
||||
std::string dstid;
|
||||
uint32_t msgid;
|
||||
std::string timestamp;
|
||||
nlohmann::json variables;
|
||||
};
|
||||
|
||||
struct Response {
|
||||
std::string srcid;
|
||||
std::string dstid;
|
||||
uint32_t msgid;
|
||||
long long timestamp;
|
||||
nlohmann::json variables;
|
||||
|
||||
std::string to_string();
|
||||
};
|
||||
|
||||
struct QrMessage {
|
||||
std::string srcid;
|
||||
std::string dstid;
|
||||
uint32_t msgid;
|
||||
long long timestamp;
|
||||
std::vector<std::string> qrs;
|
||||
};
|
||||
|
||||
void to_json(nlohmann::json&, const FileBlock&);
|
||||
void to_json(nlohmann::json&, FileBlock&&);
|
||||
|
||||
void to_json(nlohmann::json&, const Response&);
|
||||
void to_json(nlohmann::json&, Response&&);
|
||||
|
||||
void from_json(const nlohmann::json&, Request&);
|
||||
void from_json(nlohmann::json&&, Request&);
|
||||
|
||||
void to_json(nlohmann::json&, const QrMessage&);
|
||||
void to_json(nlohmann::json&, QrMessage&&);
|
||||
}
|
||||
83
src/utils.cpp
Normal file
83
src/utils.cpp
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
#include <chrono>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <sys/ioctl.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <cerrno>
|
||||
|
||||
#include <opencv2/core/core.hpp>
|
||||
#include <opencv2/highgui/highgui.hpp>
|
||||
#include <linux/v4l2-subdev.h>
|
||||
#include <linux/v4l2-controls.h>
|
||||
|
||||
#include "static_settings.hpp"
|
||||
|
||||
int64_t millis_timestamp() {
|
||||
auto now = std::chrono::system_clock::now();
|
||||
auto timestamp = std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch()).count();
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
int64_t micros_timestamp() {
|
||||
auto now = std::chrono::system_clock::now();
|
||||
auto timestamp = std::chrono::duration_cast<std::chrono::microseconds>(now.time_since_epoch()).count();
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
bool file_exists(const std::string& path) {
|
||||
std::ifstream file(path);
|
||||
return file.good();
|
||||
}
|
||||
|
||||
std::vector<unsigned char> frame_to_jpeg(const cv::Mat& frame, int quality = 80) {
|
||||
std::vector<unsigned char> jpeg;
|
||||
std::vector<int> params = {cv::IMWRITE_JPEG_QUALITY, quality};
|
||||
cv::imencode(".jpg", frame, jpeg, params);
|
||||
return jpeg;
|
||||
}
|
||||
|
||||
std::tuple<int, int, int> get_camera_param(std::string& param) {
|
||||
static const std::unordered_map<std::string, unsigned int> available_params = {
|
||||
{"exposure", 0x980911},
|
||||
{"analogue_gain", 0x9e0903},
|
||||
};
|
||||
unsigned int ctrl_id;
|
||||
try {
|
||||
ctrl_id = available_params.at(param);
|
||||
} catch (const std::out_of_range& e) {
|
||||
throw std::runtime_error("Unexpected camera param: " + param);
|
||||
}
|
||||
|
||||
static const std::string subdev_path = "/dev/v4l-subdev" + std::to_string(V4L2_SUBDEV_NUM);
|
||||
int fd = open(subdev_path.c_str(), O_RDWR);
|
||||
if (fd == -1) {
|
||||
throw std::runtime_error("Failed to open " + subdev_path + ": " + strerror(errno));
|
||||
}
|
||||
|
||||
struct v4l2_queryctrl queryctrl = {
|
||||
.id = ctrl_id
|
||||
};
|
||||
if (ioctl(fd, VIDIOC_QUERYCTRL, &queryctrl) == -1) {
|
||||
std::ostringstream oss;
|
||||
oss << "Control 0x" << std::hex << ctrl_id << " is not supported: "
|
||||
<< strerror(errno) << std::dec << std::endl;
|
||||
close(fd);
|
||||
throw std::runtime_error(oss.str());
|
||||
}
|
||||
|
||||
struct v4l2_control control = {
|
||||
.id = ctrl_id
|
||||
};
|
||||
if (ioctl(fd, VIDIOC_G_CTRL, &control) == -1) {
|
||||
std::ostringstream oss;
|
||||
oss << "Failed to get value for control 0x" << std::hex << ctrl_id
|
||||
<< ": " << strerror(errno) << std::dec << std::endl;
|
||||
close(fd);
|
||||
throw std::runtime_error(oss.str());
|
||||
}
|
||||
|
||||
close(fd);
|
||||
return {queryctrl.minimum, queryctrl.maximum, control.value};
|
||||
}
|
||||
13
src/utils.hpp
Normal file
13
src/utils.hpp
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <opencv2/core/core.hpp>
|
||||
#include <opencv2/highgui/highgui.hpp>
|
||||
|
||||
int64_t millis_timestamp();
|
||||
int64_t micros_timestamp();
|
||||
bool file_exists(const std::string&);
|
||||
std::vector<unsigned char> frame_to_jpeg(const cv::Mat&, int = 80);
|
||||
std::tuple<int, int, int> get_camera_param(std::string&);
|
||||
BIN
third_party/iconv/usr/bin/iconv
vendored
Executable file
BIN
third_party/iconv/usr/bin/iconv
vendored
Executable file
Binary file not shown.
241
third_party/iconv/usr/include/iconv.h
vendored
Normal file
241
third_party/iconv/usr/include/iconv.h
vendored
Normal file
|
|
@ -0,0 +1,241 @@
|
|||
/* Copyright (C) 1999-2003, 2005-2006, 2008-2011 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 Library General Public
|
||||
License as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
The GNU 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU LIBICONV Library; see the file COPYING.LIB.
|
||||
If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* When installed, this file is called "iconv.h". */
|
||||
|
||||
#ifndef _LIBICONV_H
|
||||
#define _LIBICONV_H
|
||||
|
||||
#define _LIBICONV_VERSION 0x010F /* version number: (major<<8) + minor */
|
||||
extern int _libiconv_version; /* Likewise */
|
||||
|
||||
/* We would like to #include any system header file which could define
|
||||
iconv_t, 1. 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, 2. when compiling
|
||||
for LIBICONV_PLUG, we need the proper iconv_t type in order to produce
|
||||
binary compatible code.
|
||||
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.
|
||||
Ad 1. The risk that a system header file does
|
||||
#include "iconv.h" or #include_next "iconv.h"
|
||||
is small. They all do #include <iconv.h>.
|
||||
Ad 2. The iconv_t type is a pointer type in all cases I have seen. (It
|
||||
has to be a scalar type because (iconv_t)(-1) is a possible return value
|
||||
from iconv_open().) */
|
||||
|
||||
/* 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’. */
|
||||
#ifndef LIBICONV_PLUG
|
||||
#define iconv_open libiconv_open
|
||||
#endif
|
||||
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. */
|
||||
#ifndef LIBICONV_PLUG
|
||||
#define iconv libiconv
|
||||
#endif
|
||||
extern size_t iconv (iconv_t cd, char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
|
||||
|
||||
/* Frees resources allocated for conversion descriptor ‘cd’. */
|
||||
#ifndef LIBICONV_PLUG
|
||||
#define iconv_close libiconv_close
|
||||
#endif
|
||||
extern int iconv_close (iconv_t cd);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef LIBICONV_PLUG
|
||||
|
||||
/* 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);
|
||||
#if 1
|
||||
/* 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);
|
||||
#else
|
||||
/* If the wchar_t type does not exist, these two fallback functions are never
|
||||
invoked. Their argument list therefore does not matter. */
|
||||
typedef void (*iconv_wchar_mb_to_wc_fallback) ();
|
||||
typedef void (*iconv_wchar_wc_to_mb_fallback) ();
|
||||
#endif
|
||||
/* 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;
|
||||
};
|
||||
|
||||
/* 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 */
|
||||
|
||||
/* 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
|
||||
|
||||
|
||||
#endif /* _LIBICONV_H */
|
||||
45
third_party/iconv/usr/include/libcharset.h
vendored
Normal file
45
third_party/iconv/usr/include/libcharset.h
vendored
Normal file
|
|
@ -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 Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU CHARSET Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with the GNU CHARSET Library; see the file COPYING.LIB. If not,
|
||||
see <http://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 */
|
||||
40
third_party/iconv/usr/include/localcharset.h
vendored
Normal file
40
third_party/iconv/usr/include/localcharset.h
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
/* Determine a canonical name for the current locale's character encoding.
|
||||
Copyright (C) 2000-2003 Free Software Foundation, Inc.
|
||||
This file is part of the GNU CHARSET Library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Library General Public License as published
|
||||
by the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with this program; if not, see <http://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 in config.charset.
|
||||
The result must not be freed; it is statically allocated.
|
||||
If the canonical name cannot be determined, the result is a non-canonical
|
||||
name. */
|
||||
extern const char * locale_charset (void);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _LOCALCHARSET_H */
|
||||
5
third_party/iconv/usr/lib/charset.alias
vendored
Normal file
5
third_party/iconv/usr/lib/charset.alias
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# This file contains a table of character encoding aliases,
|
||||
# suitable for operating system 'linux-uclibcgnueabihf'.
|
||||
# It was automatically generated from config.charset.
|
||||
# Packages using this file: @PACKAGE@
|
||||
ISO_646.IRV:1983 ASCII
|
||||
41
third_party/iconv/usr/lib/libcharset.la
vendored
Executable file
41
third_party/iconv/usr/lib/libcharset.la
vendored
Executable file
|
|
@ -0,0 +1,41 @@
|
|||
# libcharset.la - a libtool library file
|
||||
# Generated by libtool (GNU libtool) 2.4.6
|
||||
#
|
||||
# Please DO NOT delete this file!
|
||||
# It is necessary for linking the library.
|
||||
|
||||
# The name that we can dlopen(3).
|
||||
dlname='libcharset.so.1'
|
||||
|
||||
# Names of this library.
|
||||
library_names='libcharset.so.1.0.0 libcharset.so.1 libcharset.so'
|
||||
|
||||
# The name of the static archive.
|
||||
old_library=''
|
||||
|
||||
# Linker flags that cannot go in dependency_libs.
|
||||
inherited_linker_flags=''
|
||||
|
||||
# Libraries that this one depends upon.
|
||||
dependency_libs=''
|
||||
|
||||
# Names of additional weak libraries provided by this library
|
||||
weak_library_names=''
|
||||
|
||||
# Version information for libcharset.
|
||||
current=1
|
||||
age=0
|
||||
revision=0
|
||||
|
||||
# Is this an already installed library?
|
||||
installed=yes
|
||||
|
||||
# Should we warn about portability when linking against -modules?
|
||||
shouldnotlink=no
|
||||
|
||||
# Files to dlopen/dlpreopen
|
||||
dlopen=''
|
||||
dlpreopen=''
|
||||
|
||||
# Directory that this library needs to be installed in:
|
||||
libdir='/usr/lib'
|
||||
BIN
third_party/iconv/usr/lib/libcharset.so
vendored
Executable file
BIN
third_party/iconv/usr/lib/libcharset.so
vendored
Executable file
Binary file not shown.
BIN
third_party/iconv/usr/lib/libcharset.so.1
vendored
Executable file
BIN
third_party/iconv/usr/lib/libcharset.so.1
vendored
Executable file
Binary file not shown.
BIN
third_party/iconv/usr/lib/libcharset.so.1.0.0
vendored
Executable file
BIN
third_party/iconv/usr/lib/libcharset.so.1.0.0
vendored
Executable file
Binary file not shown.
41
third_party/iconv/usr/lib/libiconv.la
vendored
Executable file
41
third_party/iconv/usr/lib/libiconv.la
vendored
Executable file
|
|
@ -0,0 +1,41 @@
|
|||
# libiconv.la - a libtool library file
|
||||
# Generated by libtool (GNU libtool) 2.4.6
|
||||
#
|
||||
# Please DO NOT delete this file!
|
||||
# It is necessary for linking the library.
|
||||
|
||||
# The name that we can dlopen(3).
|
||||
dlname='libiconv.so.2'
|
||||
|
||||
# Names of this library.
|
||||
library_names='libiconv.so.2.6.0 libiconv.so.2 libiconv.so'
|
||||
|
||||
# The name of the static archive.
|
||||
old_library=''
|
||||
|
||||
# Linker flags that cannot go in dependency_libs.
|
||||
inherited_linker_flags=''
|
||||
|
||||
# Libraries that this one depends upon.
|
||||
dependency_libs=''
|
||||
|
||||
# Names of additional weak libraries provided by this library
|
||||
weak_library_names=''
|
||||
|
||||
# Version information for libiconv.
|
||||
current=8
|
||||
age=6
|
||||
revision=0
|
||||
|
||||
# Is this an already installed library?
|
||||
installed=yes
|
||||
|
||||
# Should we warn about portability when linking against -modules?
|
||||
shouldnotlink=no
|
||||
|
||||
# Files to dlopen/dlpreopen
|
||||
dlopen=''
|
||||
dlpreopen=''
|
||||
|
||||
# Directory that this library needs to be installed in:
|
||||
libdir='/usr/lib'
|
||||
BIN
third_party/iconv/usr/lib/libiconv.so
vendored
Executable file
BIN
third_party/iconv/usr/lib/libiconv.so
vendored
Executable file
Binary file not shown.
BIN
third_party/iconv/usr/lib/libiconv.so.2
vendored
Executable file
BIN
third_party/iconv/usr/lib/libiconv.so.2
vendored
Executable file
Binary file not shown.
BIN
third_party/iconv/usr/lib/libiconv.so.2.6.0
vendored
Executable file
BIN
third_party/iconv/usr/lib/libiconv.so.2.6.0
vendored
Executable file
Binary file not shown.
205
third_party/iconv/usr/share/doc/iconv.1.html
vendored
Normal file
205
third_party/iconv/usr/share/doc/iconv.1.html
vendored
Normal file
|
|
@ -0,0 +1,205 @@
|
|||
<!-- 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>ICONV</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 align="center">ICONV</h1>
|
||||
|
||||
<a href="#NAME">NAME</a><br>
|
||||
<a href="#SYNOPSIS">SYNOPSIS</a><br>
|
||||
<a href="#DESCRIPTION">DESCRIPTION</a><br>
|
||||
<a href="#EXAMPLES">EXAMPLES</a><br>
|
||||
<a href="#CONFORMING TO">CONFORMING TO</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">iconv −
|
||||
character set conversion</p>
|
||||
|
||||
<h2>SYNOPSIS
|
||||
<a name="SYNOPSIS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">iconv
|
||||
[<i>OPTION</i>...] [<b>−f</b> <i>encoding</i>]
|
||||
[<b>−t</b> <i>encoding</i>] [<i>inputfile</i> ...]
|
||||
<br>
|
||||
iconv <b>−l</b></p>
|
||||
|
||||
<h2>DESCRIPTION
|
||||
<a name="DESCRIPTION"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The
|
||||
<b>iconv</b> program converts text from one encoding to
|
||||
another encoding. More precisely, it converts <b>from</b>
|
||||
the encoding given for the <b>−f</b> option <b>to</b>
|
||||
the encoding given for the <b>−t</b> option. Either of
|
||||
these encodings defaults to the encoding of the current
|
||||
locale. All the <i>inputfile</i>s are read and converted in
|
||||
turn; if no <i>inputfile</i> is given, the standard input is
|
||||
used. The converted text is printed to standard output.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The encodings
|
||||
permitted are system dependent. For the libiconv
|
||||
implementation, they are listed in the iconv_open(3) manual
|
||||
page.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">Options
|
||||
controlling the input and output format: <b><br>
|
||||
−f</b> <i>encoding</i>,
|
||||
<b>−−from−code=</b><i>encoding</i></p>
|
||||
|
||||
<p style="margin-left:22%;">Specifies the encoding of the
|
||||
input.</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>−t</b>
|
||||
<i>encoding</i>,
|
||||
<b>−−to−code=</b><i>encoding</i></p>
|
||||
|
||||
<p style="margin-left:22%;">Specifies the encoding of the
|
||||
output.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">Options
|
||||
controlling conversion problems:</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="3%">
|
||||
|
||||
|
||||
<p><b>−c</b></p></td>
|
||||
<td width="8%"></td>
|
||||
<td width="78%">
|
||||
|
||||
|
||||
<p>When this option is given, characters that cannot be
|
||||
converted are silently discarded, instead of leading to a
|
||||
conversion error.</p></td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
<p style="margin-left:11%;"><b>−−unicode−subst=</b><i>formatstring</i></p>
|
||||
|
||||
<p style="margin-left:22%;">When this option is given,
|
||||
Unicode characters that cannot be represented in the target
|
||||
encoding are replaced with a placeholder string that is
|
||||
constructed from the given <i>formatstring</i>, applied to
|
||||
the Unicode code point. The <i>formatstring</i> must be a
|
||||
format string in the same format as for the <i>printf</i>
|
||||
command or the <i>printf()</i> function, taking either no
|
||||
argument or exactly one unsigned integer argument.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%;"><b>−−byte−subst=</b><i>formatstring</i></p>
|
||||
|
||||
<p style="margin-left:22%;">When this option is given,
|
||||
bytes in the input that are not valid in the source encoding
|
||||
are replaced with a placeholder string that is constructed
|
||||
from the given <i>formatstring</i>, applied to the
|
||||
byte’s value. The <i>formatstring</i> must be a format
|
||||
string in the same format as for the <i>printf</i> command
|
||||
or the <i>printf()</i> function, taking either no argument
|
||||
or exactly one unsigned integer argument.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%;"><b>−−widechar−subst=</b><i>formatstring</i></p>
|
||||
|
||||
<p style="margin-left:22%;">When this option is given, wide
|
||||
characters in the input that are not valid in the source
|
||||
encoding are replaced with a placeholder string that is
|
||||
constructed from the given <i>formatstring</i>, applied to
|
||||
the byte’s value. The <i>formatstring</i> must be a
|
||||
format string in the same format as for the <i>printf</i>
|
||||
command or the <i>printf()</i> function, taking either no
|
||||
argument or exactly one unsigned integer argument.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">Options
|
||||
controlling error output: <b><br>
|
||||
−s</b>, <b>−−silent</b></p>
|
||||
|
||||
<p style="margin-left:22%;">When this option is given,
|
||||
error messages about invalid or unconvertible characters are
|
||||
omitted, but the actual converted text is unaffected.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The <b>iconv
|
||||
−l</b> or <b>iconv −−list</b> command
|
||||
lists the names of the supported encodings, in a system
|
||||
dependent format. For the libiconv implementation, the names
|
||||
are printed in upper case, separated by whitespace, and
|
||||
alias names of an encoding are listed on the same line as
|
||||
the encoding itself.</p>
|
||||
|
||||
<h2>EXAMPLES
|
||||
<a name="EXAMPLES"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>iconv
|
||||
−f ISO−8859−1 −t UTF−8</b></p>
|
||||
|
||||
<p style="margin-left:22%;">converts input from the old
|
||||
West-European encoding ISO−8859−1 to
|
||||
Unicode.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>iconv
|
||||
−f KOI8−R
|
||||
−−byte−subst="<0x%x>" <br>
|
||||
|
||||
−−unicode−subst="<U+%04X>"</b></p>
|
||||
|
||||
<p style="margin-left:22%;">converts input from the old
|
||||
Russian encoding KOI8−R to the locale encoding,
|
||||
substituting an angle bracket notation with hexadecimal
|
||||
numbers for invalid bytes and for valid but unconvertible
|
||||
characters.</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>iconv
|
||||
−−list</b></p>
|
||||
|
||||
<p style="margin-left:22%;">lists the supported
|
||||
encodings.</p>
|
||||
|
||||
<h2>CONFORMING TO
|
||||
<a name="CONFORMING TO"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">POSIX:2001</p>
|
||||
|
||||
<h2>SEE ALSO
|
||||
<a name="SEE ALSO"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>iconv_open</b>(3),
|
||||
<b>locale</b>(7)</p>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
206
third_party/iconv/usr/share/doc/iconv.3.html
vendored
Normal file
206
third_party/iconv/usr/share/doc/iconv.3.html
vendored
Normal file
|
|
@ -0,0 +1,206 @@
|
|||
<!-- 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>ICONV</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 align="center">ICONV</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="#CONFORMING TO">CONFORMING TO</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">iconv −
|
||||
perform character set conversion</p>
|
||||
|
||||
<h2>SYNOPSIS
|
||||
<a name="SYNOPSIS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>#include
|
||||
<iconv.h></b></p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>size_t iconv
|
||||
(iconv_t</b> <i>cd</i><b>, <br>
|
||||
const char* *</b> <i>inbuf</i><b>, size_t *</b>
|
||||
<i>inbytesleft</i><b>, <br>
|
||||
char* *</b> <i>outbuf</i><b>, size_t *</b>
|
||||
<i>outbytesleft</i><b>);</b></p>
|
||||
|
||||
<h2>DESCRIPTION
|
||||
<a name="DESCRIPTION"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The argument
|
||||
<i>cd</i> must be a conversion descriptor created using the
|
||||
function <b>iconv_open</b>.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The main case
|
||||
is when <i>inbuf</i> is not NULL and <i>*inbuf</i> is not
|
||||
NULL. In this case, the <b>iconv</b> function converts the
|
||||
multibyte sequence starting at <i>*inbuf</i> to a multibyte
|
||||
sequence starting at <i>*outbuf</i>. At most
|
||||
<i>*inbytesleft</i> bytes, starting at <i>*inbuf</i>, will
|
||||
be read. At most <i>*outbytesleft</i> bytes, starting at
|
||||
<i>*outbuf</i>, will be written.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The
|
||||
<b>iconv</b> function converts one multibyte character at a
|
||||
time, and for each character conversion it increments
|
||||
<i>*inbuf</i> and decrements <i>*inbytesleft</i> by the
|
||||
number of converted input bytes, it increments
|
||||
<i>*outbuf</i> and decrements <i>*outbytesleft</i> by the
|
||||
number of converted output bytes, and it updates the
|
||||
conversion state contained in <i>cd</i>. If the character
|
||||
encoding of the input is stateful, the <b>iconv</b> function
|
||||
can also convert a sequence of input bytes to an update of
|
||||
the conversion state without producing any output bytes;
|
||||
such input is called a <i>shift sequence</i>. The conversion
|
||||
can stop for four reasons:</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">1. An invalid
|
||||
multibyte sequence is encountered in the input. In this case
|
||||
it sets <b>errno</b> to <b>EILSEQ</b> and returns
|
||||
(size_t)(−1). <i>*inbuf</i> is left pointing to the
|
||||
beginning of the invalid multibyte sequence.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">2. The input
|
||||
byte sequence has been entirely converted, i.e.
|
||||
<i>*inbytesleft</i> has gone down to 0. In this case
|
||||
<b>iconv</b> returns the number of non-reversible
|
||||
conversions performed during this call.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">3. An
|
||||
incomplete multibyte sequence is encountered in the input,
|
||||
and the input byte sequence terminates after it. In this
|
||||
case it sets <b>errno</b> to <b>EINVAL</b> and returns
|
||||
(size_t)(−1). <i>*inbuf</i> is left pointing to the
|
||||
beginning of the incomplete multibyte sequence.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">4. The output
|
||||
buffer has no more room for the next converted character. In
|
||||
this case it sets <b>errno</b> to <b>E2BIG</b> and returns
|
||||
(size_t)(−1).</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">A different
|
||||
case is when <i>inbuf</i> is NULL or <i>*inbuf</i> is NULL,
|
||||
but <i>outbuf</i> is not NULL and <i>*outbuf</i> is not
|
||||
NULL. In this case, the <b>iconv</b> function attempts to
|
||||
set <i>cd</i>’s conversion state to the initial state
|
||||
and store a corresponding shift sequence at <i>*outbuf</i>.
|
||||
At most <i>*outbytesleft</i> bytes, starting at
|
||||
<i>*outbuf</i>, will be written. If the output buffer has no
|
||||
more room for this reset sequence, it sets <b>errno</b> to
|
||||
<b>E2BIG</b> and returns (size_t)(−1). Otherwise it
|
||||
increments <i>*outbuf</i> and decrements
|
||||
<i>*outbytesleft</i> by the number of bytes written.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">A third case is
|
||||
when <i>inbuf</i> is NULL or <i>*inbuf</i> is NULL, and
|
||||
<i>outbuf</i> is NULL or <i>*outbuf</i> is NULL. In this
|
||||
case, the <b>iconv</b> function sets <i>cd</i>’s
|
||||
conversion state to the initial state.</p>
|
||||
|
||||
<h2>RETURN VALUE
|
||||
<a name="RETURN VALUE"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The
|
||||
<b>iconv</b> function returns the number of characters
|
||||
converted in a non-reversible way during this call;
|
||||
reversible conversions are not counted. In case of error, it
|
||||
sets <b>errno</b> and returns (size_t)(−1).</p>
|
||||
|
||||
<h2>ERRORS
|
||||
<a name="ERRORS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The following
|
||||
errors 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>E2BIG</b></p></td>
|
||||
<td width="2%"></td>
|
||||
<td width="78%">
|
||||
|
||||
|
||||
<p>There is not sufficient room at <i>*outbuf</i>.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="11%"></td>
|
||||
<td width="9%">
|
||||
|
||||
|
||||
<p><b>EILSEQ</b></p></td>
|
||||
<td width="2%"></td>
|
||||
<td width="78%">
|
||||
|
||||
|
||||
<p>An invalid multibyte sequence has been encountered in
|
||||
the input.</p></td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="11%"></td>
|
||||
<td width="9%">
|
||||
|
||||
|
||||
<p><b>EINVAL</b></p></td>
|
||||
<td width="2%"></td>
|
||||
<td width="78%">
|
||||
|
||||
|
||||
<p>An incomplete multibyte sequence has been encountered in
|
||||
the input.</p></td></tr>
|
||||
</table>
|
||||
|
||||
<h2>CONFORMING TO
|
||||
<a name="CONFORMING TO"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">POSIX:2001</p>
|
||||
|
||||
<h2>SEE ALSO
|
||||
<a name="SEE ALSO"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>iconv_open</b>(3),
|
||||
<b>iconvctl</b>(3) <b>iconv_close</b>(3)</p>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
89
third_party/iconv/usr/share/doc/iconv_close.3.html
vendored
Normal file
89
third_party/iconv/usr/share/doc/iconv_close.3.html
vendored
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
<!-- 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>ICONV_CLOSE</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 align="center">ICONV_CLOSE</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="#CONFORMING TO">CONFORMING TO</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">iconv_close
|
||||
− deallocate descriptor for character set
|
||||
conversion</p>
|
||||
|
||||
<h2>SYNOPSIS
|
||||
<a name="SYNOPSIS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>#include
|
||||
<iconv.h></b></p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>int
|
||||
iconv_close (iconv_t</b> <i>cd</i><b>);</b></p>
|
||||
|
||||
<h2>DESCRIPTION
|
||||
<a name="DESCRIPTION"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The
|
||||
<b>iconv_close</b> function deallocates a conversion
|
||||
descriptor <i>cd</i> previously allocated using
|
||||
<b>iconv_open</b>.</p>
|
||||
|
||||
<h2>RETURN VALUE
|
||||
<a name="RETURN VALUE"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">When
|
||||
successful, the <b>iconv_close</b> function returns 0. In
|
||||
case of error, it sets <b>errno</b> and returns
|
||||
−1.</p>
|
||||
|
||||
<h2>CONFORMING TO
|
||||
<a name="CONFORMING TO"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">POSIX:2001</p>
|
||||
|
||||
<h2>SEE ALSO
|
||||
<a name="SEE ALSO"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>iconv_open</b>(3)
|
||||
<b>iconv</b>(3)</p>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
318
third_party/iconv/usr/share/doc/iconv_open.3.html
vendored
Normal file
318
third_party/iconv/usr/share/doc/iconv_open.3.html
vendored
Normal file
|
|
@ -0,0 +1,318 @@
|
|||
<!-- 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>ICONV_OPEN</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 align="center">ICONV_OPEN</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="#CONFORMING TO">CONFORMING TO</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">iconv_open
|
||||
− allocate descriptor for character set conversion</p>
|
||||
|
||||
<h2>SYNOPSIS
|
||||
<a name="SYNOPSIS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>#include
|
||||
<iconv.h></b></p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>iconv_t
|
||||
iconv_open (const char*</b> <i>tocode</i><b>, const
|
||||
char*</b> <i>fromcode</i><b>);</b></p>
|
||||
|
||||
<h2>DESCRIPTION
|
||||
<a name="DESCRIPTION"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The
|
||||
<b>iconv_open</b> function allocates a conversion descriptor
|
||||
suitable for converting byte sequences from character
|
||||
encoding <i>fromcode</i> to character encoding
|
||||
<i>tocode</i>.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The values
|
||||
permitted for <i>fromcode</i> and <i>tocode</i> and the
|
||||
supported combinations are system dependent. For the
|
||||
libiconv library, the following encodings are supported, in
|
||||
all combinations. <br>
|
||||
European languages</p>
|
||||
|
||||
<p style="margin-left:22%;">ASCII,
|
||||
ISO−8859−{1,2,3,4,5,7,9,10,13,14,15,16},
|
||||
KOI8−R, KOI8−U, KOI8−RU,
|
||||
CP{1250,1251,1252,1253,1254,1257}, CP{850,866,1131},
|
||||
Mac{Roman,CentralEurope,Iceland,Croatian,Romania},
|
||||
Mac{Cyrillic,Ukraine,Greek,Turkish}, Macintosh</p>
|
||||
|
||||
<p style="margin-left:11%;">Semitic languages</p>
|
||||
|
||||
<p style="margin-left:22%;">ISO−8859−{6,8},
|
||||
CP{1255,1256}, CP862, Mac{Hebrew,Arabic}</p>
|
||||
|
||||
<p style="margin-left:11%;">Japanese</p>
|
||||
|
||||
<p style="margin-left:22%;">EUC−JP, SHIFT_JIS, CP932,
|
||||
ISO−2022−JP, ISO−2022−JP−2,
|
||||
ISO−2022−JP−1,
|
||||
ISO-2022−JP−MS</p>
|
||||
|
||||
<p style="margin-left:11%;">Chinese</p>
|
||||
|
||||
<p style="margin-left:22%;">EUC−CN, HZ, GBK, CP936,
|
||||
GB18030, EUC−TW, BIG5, CP950, BIG5−HKSCS,
|
||||
BIG5−HKSCS:2004, BIG5−HKSCS:2001,
|
||||
BIG5−HKSCS:1999, ISO−2022−CN,
|
||||
ISO−2022−CN−EXT</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>Korean</p></td>
|
||||
<td width="2%"></td>
|
||||
<td width="50%">
|
||||
|
||||
|
||||
<p>EUC−KR, CP949, ISO−2022−KR, JOHAB</p></td>
|
||||
<td width="28%">
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<p style="margin-left:11%;">Armenian</p>
|
||||
|
||||
<p style="margin-left:22%;">ARMSCII−8</p>
|
||||
|
||||
<p style="margin-left:11%;">Georgian</p>
|
||||
|
||||
<p style="margin-left:22%;">Georgian−Academy,
|
||||
Georgian−PS</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>Tajik</p></td>
|
||||
<td width="2%"></td>
|
||||
<td width="35%">
|
||||
|
||||
|
||||
<p>KOI8−T</p></td>
|
||||
<td width="43%">
|
||||
</td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="11%"></td>
|
||||
<td width="9%">
|
||||
|
||||
|
||||
<p>Kazakh</p></td>
|
||||
<td width="2%"></td>
|
||||
<td width="35%">
|
||||
|
||||
|
||||
<p>PT154, RK1048</p></td>
|
||||
<td width="43%">
|
||||
</td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="11%"></td>
|
||||
<td width="9%">
|
||||
|
||||
|
||||
<p>Thai</p></td>
|
||||
<td width="2%"></td>
|
||||
<td width="35%">
|
||||
|
||||
|
||||
<p>TIS−620, CP874, MacThai</p></td>
|
||||
<td width="43%">
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<p style="margin-left:11%;">Laotian</p>
|
||||
|
||||
<p style="margin-left:22%;">MuleLao−1, CP1133</p>
|
||||
|
||||
<p style="margin-left:11%;">Vietnamese</p>
|
||||
|
||||
<p style="margin-left:22%;">VISCII, TCVN, CP1258</p>
|
||||
|
||||
<p style="margin-left:11%;">Platform specifics</p>
|
||||
|
||||
<p style="margin-left:22%;">HP−ROMAN8, NEXTSTEP</p>
|
||||
|
||||
<p style="margin-left:11%;">Full Unicode</p>
|
||||
|
||||
<p style="margin-left:22%;">UTF−8 <br>
|
||||
UCS−2, UCS−2BE, UCS−2LE <br>
|
||||
UCS−4, UCS−4BE, UCS−4LE <br>
|
||||
UTF−16, UTF−16BE, UTF−16LE <br>
|
||||
UTF−32, UTF−32BE, UTF−32LE <br>
|
||||
UTF−7 <br>
|
||||
C99, JAVA</p>
|
||||
|
||||
<p style="margin-left:11%;">Full Unicode, in terms of
|
||||
<b>uint16_t</b> or <b>uint32_t</b></p>
|
||||
|
||||
<p style="margin-left:22%;">(with machine dependent
|
||||
endianness and alignment) <br>
|
||||
UCS−2−INTERNAL, UCS−4−INTERNAL</p>
|
||||
|
||||
<p style="margin-left:11%;">Locale dependent, in terms of
|
||||
<b>char</b> or <b>wchar_t</b></p>
|
||||
|
||||
<p style="margin-left:22%;">(with machine dependent
|
||||
endianness and alignment, and with semantics depending on
|
||||
the OS and the current LC_CTYPE locale facet) <br>
|
||||
char, wchar_t</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">When configured
|
||||
with the option
|
||||
<b>−−enable−extra−encodings</b>, it
|
||||
also provides support for a few extra encodings: <br>
|
||||
European languages</p>
|
||||
|
||||
|
||||
<p style="margin-left:22%;">CP{437,737,775,852,853,855,857,858,860,861,863,865,869,1125}</p>
|
||||
|
||||
<p style="margin-left:11%;">Semitic languages</p>
|
||||
|
||||
<p style="margin-left:22%;">CP864</p>
|
||||
|
||||
<p style="margin-left:11%;">Japanese</p>
|
||||
|
||||
<p style="margin-left:22%;">EUC−JISX0213,
|
||||
Shift_JISX0213, ISO−2022−JP−3</p>
|
||||
|
||||
<p style="margin-left:11%;">Chinese</p>
|
||||
|
||||
<p style="margin-left:22%;">BIG5−2003
|
||||
(experimental)</p>
|
||||
|
||||
<p style="margin-left:11%;">Turkmen</p>
|
||||
|
||||
<p style="margin-left:22%;">TDS565</p>
|
||||
|
||||
<p style="margin-left:11%;">Platform specifics</p>
|
||||
|
||||
<p style="margin-left:22%;">ATARIST,
|
||||
RISCOS−LATIN1</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The empty
|
||||
encoding name "" is equivalent to
|
||||
"char": it denotes the locale dependent character
|
||||
encoding.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">When the string
|
||||
"//TRANSLIT" is appended to <i>tocode</i>,
|
||||
transliteration is activated. This means that when a
|
||||
character cannot be represented in the target character set,
|
||||
it can be approximated through one or several characters
|
||||
that look similar to the original character.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">When the string
|
||||
"//IGNORE" is appended to <i>tocode</i>,
|
||||
characters that cannot be represented in the target
|
||||
character set will be silently discarded.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The resulting
|
||||
conversion descriptor can be used with <b>iconv</b> any
|
||||
number of times. It remains valid until deallocated using
|
||||
<b>iconv_close</b>.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">A conversion
|
||||
descriptor contains a conversion state. After creation using
|
||||
<b>iconv_open</b>, the state is in the initial state. Using
|
||||
<b>iconv</b> modifies the descriptor’s conversion
|
||||
state. (This implies that a conversion descriptor can not be
|
||||
used in multiple threads simultaneously.) To bring the state
|
||||
back to the initial state, use <b>iconv</b> with NULL as
|
||||
<i>inbuf</i> argument.</p>
|
||||
|
||||
<h2>RETURN VALUE
|
||||
<a name="RETURN VALUE"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The
|
||||
<b>iconv_open</b> function returns a freshly allocated
|
||||
conversion descriptor. In case of error, it sets
|
||||
<b>errno</b> and returns (iconv_t)(−1).</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>EINVAL</b></p></td>
|
||||
<td width="2%"></td>
|
||||
<td width="78%">
|
||||
|
||||
|
||||
<p>The conversion from <i>fromcode</i> to <i>tocode</i> is
|
||||
not supported by the implementation.</p></td></tr>
|
||||
</table>
|
||||
|
||||
<h2>CONFORMING TO
|
||||
<a name="CONFORMING TO"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">POSIX:2001</p>
|
||||
|
||||
<h2>SEE ALSO
|
||||
<a name="SEE ALSO"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>iconv</b>(3)
|
||||
<b>iconvctl</b>(3) <b>iconv_close</b>(3)</p>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
132
third_party/iconv/usr/share/doc/iconv_open_into.3.html
vendored
Normal file
132
third_party/iconv/usr/share/doc/iconv_open_into.3.html
vendored
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
<!-- 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>ICONV_OPEN_INTO</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 align="center">ICONV_OPEN_INTO</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="#CONFORMING TO">CONFORMING TO</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">iconv_open_into
|
||||
− initialize descriptor for character set
|
||||
conversion</p>
|
||||
|
||||
<h2>SYNOPSIS
|
||||
<a name="SYNOPSIS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>#include
|
||||
<iconv.h></b></p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>int
|
||||
iconv_open_into (const char*</b> <i>tocode</i><b>, const
|
||||
char*</b> <i>fromcode</i><b>, <br>
|
||||
iconv_allocation_t*</b> <i>resultp</i><b>);</b></p>
|
||||
|
||||
<h2>DESCRIPTION
|
||||
<a name="DESCRIPTION"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The
|
||||
<b>iconv_open_into</b> function initializes a conversion
|
||||
descriptor suitable for converting byte sequences from
|
||||
character encoding <i>fromcode</i> to character encoding
|
||||
<i>tocode</i>. The conversion descriptor is stored in the
|
||||
memory pointed to by <i>resultp</i>.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The values
|
||||
permitted for <i>fromcode</i> and <i>tocode</i> are the same
|
||||
as for the function <b>iconv_open</b>.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">After a
|
||||
successful return from this function, <i>resultp</i> can be
|
||||
be used as an <b>iconv_t</b> object with the <b>iconv</b>
|
||||
function.</p>
|
||||
|
||||
<h2>RETURN VALUE
|
||||
<a name="RETURN VALUE"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The
|
||||
<b>iconv_open_into</b> function fills <b>*</b><i>resultp</i>
|
||||
and returns 0 if it succeeds. In case of error, it sets
|
||||
<b>errno</b> and returns −1.</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>EINVAL</b></p></td>
|
||||
<td width="2%"></td>
|
||||
<td width="78%">
|
||||
|
||||
|
||||
<p>The conversion from <i>fromcode</i> to <i>tocode</i> is
|
||||
not supported by the implementation.</p></td></tr>
|
||||
</table>
|
||||
|
||||
<h2>CONFORMING TO
|
||||
<a name="CONFORMING TO"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">This function
|
||||
is implemented only in GNU libiconv and not in other
|
||||
<b>iconv</b> implementations. It is not backed by a
|
||||
standard. You can test for its presence through
|
||||
<b>(_LIBICONV_VERSION >= 0x010D)</b>.</p>
|
||||
|
||||
<h2>SEE ALSO
|
||||
<a name="SEE ALSO"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>iconv_open</b>(3)
|
||||
<b>iconv</b>(3)</p>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
170
third_party/iconv/usr/share/doc/iconvctl.3.html
vendored
Normal file
170
third_party/iconv/usr/share/doc/iconvctl.3.html
vendored
Normal file
|
|
@ -0,0 +1,170 @@
|
|||
<!-- 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>ICONVCTL</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 align="center">ICONVCTL</h1>
|
||||
|
||||
<a href="#NAME">NAME</a><br>
|
||||
<a href="#SYNOPSIS">SYNOPSIS</a><br>
|
||||
<a href="#DESCRIPTION">DESCRIPTION</a><br>
|
||||
<a href="#REQUEST VALUES">REQUEST VALUES</a><br>
|
||||
<a href="#RETURN VALUE">RETURN VALUE</a><br>
|
||||
<a href="#ERRORS">ERRORS</a><br>
|
||||
<a href="#CONFORMING TO">CONFORMING TO</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">iconvctl
|
||||
− control iconv behavior</p>
|
||||
|
||||
<h2>SYNOPSIS
|
||||
<a name="SYNOPSIS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>#include
|
||||
<iconv.h></b></p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>int iconvctl
|
||||
(iconv_t</b> <i>cd</i> <b>, int</b> <i>request</i><b>, void
|
||||
*</b> <i>argument</i><b>);</b></p>
|
||||
|
||||
<h2>DESCRIPTION
|
||||
<a name="DESCRIPTION"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The argument
|
||||
<i>cd</i> must be a conversion descriptor created using the
|
||||
function <b>iconv_open</b>.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>iconvctl</b>
|
||||
queries or adjusts the behavior of the <b>iconv</b>
|
||||
function, when invoked with the specified conversion
|
||||
descriptor, depending on the request value.</p>
|
||||
|
||||
<h2>REQUEST VALUES
|
||||
<a name="REQUEST VALUES"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The following
|
||||
are permissible values for the <i>request</i> parameter.
|
||||
<b><br>
|
||||
ICONV_TRIVIALP</b></p>
|
||||
|
||||
<p style="margin-left:22%;"><i>argument</i> should be an
|
||||
<b>int *</b> which will receive 1 if the conversion is
|
||||
trivial, or 0 otherwise.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%;"><b>ICONV_GET_TRANSLITERATE</b></p>
|
||||
|
||||
<p style="margin-left:22%;"><i>argument</i> should be an
|
||||
<b>int *</b> which will receive 1 if transliteration is
|
||||
enabled in the conversion, or 0 otherwise.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%;"><b>ICONV_SET_TRANSLITERATE</b></p>
|
||||
|
||||
<p style="margin-left:22%;"><i>argument</i> should be a
|
||||
<b>const int *</b>, pointing to an <b>int</b> value. A
|
||||
non-zero value is used to enable transliteration in the
|
||||
conversion. A zero value disables it.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%;"><b>ICONV_GET_DISCARD_ILSEQ</b></p>
|
||||
|
||||
<p style="margin-left:22%;"><i>argument</i> should be an
|
||||
<b>int *</b> which will receive 1 if "illegal sequence
|
||||
discard and continue" is enabled in the conversion, or
|
||||
0 otherwise.</p>
|
||||
|
||||
|
||||
<p style="margin-left:11%;"><b>ICONV_SET_DISCARD_ILSEQ</b></p>
|
||||
|
||||
<p style="margin-left:22%;"><i>argument</i> should be a
|
||||
<b>const int *</b>, pointing to an <b>int</b> value. A
|
||||
non-zero value is used to enable "illegal sequence
|
||||
discard and continue" in the conversion. A zero value
|
||||
disables it.</p>
|
||||
|
||||
<h2>RETURN VALUE
|
||||
<a name="RETURN VALUE"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The
|
||||
<b>iconvctl</b> function returns 0 if it succeeds. In case
|
||||
of error, it sets <b>errno</b> and returns −1.</p>
|
||||
|
||||
<h2>ERRORS
|
||||
<a name="ERRORS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The following
|
||||
errors 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>EINVAL</b></p></td>
|
||||
<td width="2%"></td>
|
||||
<td width="35%">
|
||||
|
||||
|
||||
<p>The request is invalid.</p></td>
|
||||
<td width="43%">
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<h2>CONFORMING TO
|
||||
<a name="CONFORMING TO"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">This function
|
||||
is implemented only in GNU libiconv and not in other
|
||||
<b>iconv</b> implementations. It is not backed by a
|
||||
standard. You can test for its presence through
|
||||
<b>(_LIBICONV_VERSION >= 0x0108)</b>.</p>
|
||||
|
||||
<h2>SEE ALSO
|
||||
<a name="SEE ALSO"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>iconv_open</b>(3)
|
||||
<b>iconv</b>(3)</p>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
108
third_party/iconv/usr/share/man/man1/iconv.1
vendored
Normal file
108
third_party/iconv/usr/share/man/man1/iconv.1
vendored
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
.\" Copyright (c) Free Software Foundation, Inc.
|
||||
.\"
|
||||
.\" This is free documentation; 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.
|
||||
.\"
|
||||
.\" References consulted:
|
||||
.\" OpenGroup's Single Unix specification http://www.UNIX-systems.org/online.html
|
||||
.\" POSIX 2001 draft6
|
||||
.\"
|
||||
.TH ICONV 1 "March 31, 2007" "GNU" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
iconv \- character set conversion
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
iconv [\fIOPTION\fP...] [\fB\-f\fP \fIencoding\fP] [\fB\-t\fP \fIencoding\fP] [\fIinputfile\fP ...]
|
||||
iconv \fB\-l\fP
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
The \fBiconv\fP program converts text from one encoding to another encoding.
|
||||
More precisely, it converts \fBfrom\fP the encoding given for the \fB\-f\fP
|
||||
option \fBto\fP the encoding given for the \fB\-t\fP option. Either of these
|
||||
encodings defaults to the encoding of the current locale. All the
|
||||
\fIinputfile\fPs are read and converted in turn; if no \fIinputfile\fP is
|
||||
given, the standard input is used. The converted text is printed to standard
|
||||
output.
|
||||
.PP
|
||||
The encodings permitted are system dependent. For the libiconv implementation,
|
||||
they are listed in the iconv_open(3) manual page.
|
||||
.PP
|
||||
Options controlling the input and output format:
|
||||
.TP
|
||||
\fB\-f\fP \fIencoding\fP, \fB\-\-from\-code=\fP\fIencoding\fP
|
||||
Specifies the encoding of the input.
|
||||
.TP
|
||||
\fB\-t\fP \fIencoding\fP, \fB\-\-to\-code=\fP\fIencoding\fP
|
||||
Specifies the encoding of the output.
|
||||
.PP
|
||||
Options controlling conversion problems:
|
||||
.TP
|
||||
\fB\-c\fP
|
||||
When this option is given, characters that cannot be converted are silently
|
||||
discarded, instead of leading to a conversion error.
|
||||
.TP
|
||||
\fB\-\-unicode\-subst=\fP\fIformatstring\fP
|
||||
When this option is given, Unicode characters that cannot be represented in
|
||||
the target encoding are replaced with a placeholder string that is constructed
|
||||
from the given \fIformatstring\fP, applied to the Unicode code point. The
|
||||
\fIformatstring\fP must be a format string in the same format as for the
|
||||
.I printf
|
||||
command or the
|
||||
.I printf()
|
||||
function, taking either no argument or exactly one unsigned integer argument.
|
||||
.TP
|
||||
\fB\-\-byte\-subst=\fP\fIformatstring\fP
|
||||
When this option is given, bytes in the input that are not valid in the source
|
||||
encoding are replaced with a placeholder string that is constructed from the
|
||||
given \fIformatstring\fP, applied to the byte's value. The \fIformatstring\fP
|
||||
must be a format string in the same format as for the
|
||||
.I printf
|
||||
command or the
|
||||
.I printf()
|
||||
function, taking either no argument or exactly one unsigned integer argument.
|
||||
.TP
|
||||
\fB\-\-widechar\-subst=\fP\fIformatstring\fP
|
||||
When this option is given, wide characters in the input that are not valid in
|
||||
the source encoding are replaced with a placeholder string that is constructed
|
||||
from the given \fIformatstring\fP, applied to the byte's value. The
|
||||
\fIformatstring\fP must be a format string in the same format as for the
|
||||
.I printf
|
||||
command or the
|
||||
.I printf()
|
||||
function, taking either no argument or exactly one unsigned integer argument.
|
||||
.PP
|
||||
Options controlling error output:
|
||||
.TP
|
||||
\fB\-s\fP, \fB\-\-silent\fP
|
||||
When this option is given, error messages about invalid or unconvertible
|
||||
characters are omitted, but the actual converted text is unaffected.
|
||||
.PP
|
||||
The \fBiconv \-l\fP or \fBiconv \-\-list\fP command lists the names of the
|
||||
supported encodings, in a system dependent format. For the libiconv
|
||||
implementation, the names are printed in upper case, separated by whitespace,
|
||||
and alias names of an encoding are listed on the same line as the encoding
|
||||
itself.
|
||||
.SH EXAMPLES
|
||||
.TP
|
||||
\fBiconv \-f ISO\-8859\-1 \-t UTF\-8\fP
|
||||
converts input from the old West-European encoding ISO\-8859\-1 to Unicode.
|
||||
.PP
|
||||
.nf
|
||||
\fBiconv \-f KOI8\-R \-\-byte\-subst="<0x%x>"\fP
|
||||
\fB \-\-unicode\-subst="<U+%04X>"\fP
|
||||
.fi
|
||||
.RS
|
||||
converts input from the old Russian encoding KOI8\-R to the locale encoding,
|
||||
substituting an angle bracket notation with hexadecimal numbers for invalid
|
||||
bytes and for valid but unconvertible characters.
|
||||
.RE
|
||||
.TP
|
||||
\fBiconv \-\-list\fP
|
||||
lists the supported encodings.
|
||||
.SH "CONFORMING TO"
|
||||
POSIX:2001
|
||||
.SH "SEE ALSO"
|
||||
.BR iconv_open (3),
|
||||
.BR locale (7)
|
||||
92
third_party/iconv/usr/share/man/man3/iconv.3
vendored
Normal file
92
third_party/iconv/usr/share/man/man3/iconv.3
vendored
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
.\" Copyright (c) Free Software Foundation, Inc.
|
||||
.\"
|
||||
.\" This is free documentation; 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.
|
||||
.\"
|
||||
.\" References consulted:
|
||||
.\" GNU glibc-2 source code and manual
|
||||
.\" OpenGroup's Single Unix specification http://www.UNIX-systems.org/online.html
|
||||
.\"
|
||||
.TH ICONV 3 "September 7, 2008" "GNU" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
iconv \- perform character set conversion
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <iconv.h>
|
||||
.sp
|
||||
.BI "size_t iconv (iconv_t " cd ,
|
||||
.BI " const char* * " inbuf ", size_t * "inbytesleft ,
|
||||
.BI " char* * " outbuf ", size_t * "outbytesleft );
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
The argument \fIcd\fP must be a conversion descriptor created using the
|
||||
function \fBiconv_open\fP.
|
||||
.PP
|
||||
The main case is when \fIinbuf\fP is not NULL and \fI*inbuf\fP is not NULL.
|
||||
In this case, the \fBiconv\fP function converts the multibyte sequence
|
||||
starting at \fI*inbuf\fP to a multibyte sequence starting at \fI*outbuf\fP.
|
||||
At most \fI*inbytesleft\fP bytes, starting at \fI*inbuf\fP, will be read.
|
||||
At most \fI*outbytesleft\fP bytes, starting at \fI*outbuf\fP, will be written.
|
||||
.PP
|
||||
The \fBiconv\fP function converts one multibyte character at a time, and for
|
||||
each character conversion it increments \fI*inbuf\fP and decrements
|
||||
\fI*inbytesleft\fP by the number of converted input bytes, it increments
|
||||
\fI*outbuf\fP and decrements \fI*outbytesleft\fP by the number of converted
|
||||
output bytes, and it updates the conversion state contained in \fIcd\fP.
|
||||
If the character encoding of the input is stateful, the \fBiconv\fP function
|
||||
can also convert a sequence of input bytes to an update of the conversion state
|
||||
without producing any output bytes; such input is called a \fIshift sequence\fP.
|
||||
The conversion can stop for four reasons:
|
||||
.PP
|
||||
1. An invalid multibyte sequence is encountered in the input. In this case
|
||||
it sets \fBerrno\fP to \fBEILSEQ\fP and returns (size_t)(\-1). \fI*inbuf\fP
|
||||
is left pointing to the beginning of the invalid multibyte sequence.
|
||||
.PP
|
||||
2. The input byte sequence has been entirely converted, i.e. \fI*inbytesleft\fP
|
||||
has gone down to 0. In this case \fBiconv\fP returns the number of
|
||||
non-reversible conversions performed during this call.
|
||||
.PP
|
||||
3. An incomplete multibyte sequence is encountered in the input, and the
|
||||
input byte sequence terminates after it. In this case it sets \fBerrno\fP to
|
||||
\fBEINVAL\fP and returns (size_t)(\-1). \fI*inbuf\fP is left pointing to the
|
||||
beginning of the incomplete multibyte sequence.
|
||||
.PP
|
||||
4. The output buffer has no more room for the next converted character. In
|
||||
this case it sets \fBerrno\fP to \fBE2BIG\fP and returns (size_t)(\-1).
|
||||
.PP
|
||||
A different case is when \fIinbuf\fP is NULL or \fI*inbuf\fP is NULL, but
|
||||
\fIoutbuf\fP is not NULL and \fI*outbuf\fP is not NULL. In this case, the
|
||||
\fBiconv\fP function attempts to set \fIcd\fP's conversion state to the
|
||||
initial state and store a corresponding shift sequence at \fI*outbuf\fP.
|
||||
At most \fI*outbytesleft\fP bytes, starting at \fI*outbuf\fP, will be written.
|
||||
If the output buffer has no more room for this reset sequence, it sets
|
||||
\fBerrno\fP to \fBE2BIG\fP and returns (size_t)(\-1). Otherwise it increments
|
||||
\fI*outbuf\fP and decrements \fI*outbytesleft\fP by the number of bytes
|
||||
written.
|
||||
.PP
|
||||
A third case is when \fIinbuf\fP is NULL or \fI*inbuf\fP is NULL, and
|
||||
\fIoutbuf\fP is NULL or \fI*outbuf\fP is NULL. In this case, the \fBiconv\fP
|
||||
function sets \fIcd\fP's conversion state to the initial state.
|
||||
.SH "RETURN VALUE"
|
||||
The \fBiconv\fP function returns the number of characters converted in a
|
||||
non-reversible way during this call; reversible conversions are not counted.
|
||||
In case of error, it sets \fBerrno\fP and returns (size_t)(\-1).
|
||||
.SH ERRORS
|
||||
The following errors can occur, among others:
|
||||
.TP
|
||||
.B E2BIG
|
||||
There is not sufficient room at \fI*outbuf\fP.
|
||||
.TP
|
||||
.B EILSEQ
|
||||
An invalid multibyte sequence has been encountered in the input.
|
||||
.TP
|
||||
.B EINVAL
|
||||
An incomplete multibyte sequence has been encountered in the input.
|
||||
.SH "CONFORMING TO"
|
||||
POSIX:2001
|
||||
.SH "SEE ALSO"
|
||||
.BR iconv_open (3),
|
||||
.BR iconvctl (3)
|
||||
.BR iconv_close (3)
|
||||
31
third_party/iconv/usr/share/man/man3/iconv_close.3
vendored
Normal file
31
third_party/iconv/usr/share/man/man3/iconv_close.3
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
.\" Copyright (c) Free Software Foundation, Inc.
|
||||
.\"
|
||||
.\" This is free documentation; 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.
|
||||
.\"
|
||||
.\" References consulted:
|
||||
.\" GNU glibc-2 source code and manual
|
||||
.\" OpenGroup's Single Unix specification http://www.UNIX-systems.org/online.html
|
||||
.\"
|
||||
.TH ICONV_CLOSE 3 "March 31, 2007" "GNU" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
iconv_close \- deallocate descriptor for character set conversion
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <iconv.h>
|
||||
.sp
|
||||
.BI "int iconv_close (iconv_t " cd );
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
The \fBiconv_close\fP function deallocates a conversion descriptor \fIcd\fP
|
||||
previously allocated using \fBiconv_open\fP.
|
||||
.SH "RETURN VALUE"
|
||||
When successful, the \fBiconv_close\fP function returns 0. In case of error,
|
||||
it sets \fBerrno\fP and returns \-1.
|
||||
.SH "CONFORMING TO"
|
||||
POSIX:2001
|
||||
.SH "SEE ALSO"
|
||||
.BR iconv_open (3)
|
||||
.BR iconv (3)
|
||||
206
third_party/iconv/usr/share/man/man3/iconv_open.3
vendored
Normal file
206
third_party/iconv/usr/share/man/man3/iconv_open.3
vendored
Normal file
|
|
@ -0,0 +1,206 @@
|
|||
.\" Copyright (c) Free Software Foundation, Inc.
|
||||
.\"
|
||||
.\" This is free documentation; 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.
|
||||
.\"
|
||||
.\" References consulted:
|
||||
.\" GNU glibc-2 source code and manual
|
||||
.\" OpenGroup's Single Unix specification http://www.UNIX-systems.org/online.html
|
||||
.\"
|
||||
.TH ICONV_OPEN 3 "October 23, 2011" "GNU" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
iconv_open \- allocate descriptor for character set conversion
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <iconv.h>
|
||||
.sp
|
||||
.BI "iconv_t iconv_open (const char* " tocode ", const char* " fromcode );
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
The \fBiconv_open\fP function allocates a conversion descriptor suitable
|
||||
for converting byte sequences from character encoding \fIfromcode\fP to
|
||||
character encoding \fItocode\fP.
|
||||
.PP
|
||||
The values permitted for \fIfromcode\fP and \fItocode\fP and the supported
|
||||
combinations are system dependent. For the libiconv library, the following
|
||||
encodings are supported, in all combinations.
|
||||
.TP
|
||||
European languages
|
||||
.nf
|
||||
.fi
|
||||
ASCII, ISO\-8859\-{1,2,3,4,5,7,9,10,13,14,15,16},
|
||||
KOI8\-R, KOI8\-U, KOI8\-RU,
|
||||
CP{1250,1251,1252,1253,1254,1257}, CP{850,866,1131},
|
||||
Mac{Roman,CentralEurope,Iceland,Croatian,Romania},
|
||||
Mac{Cyrillic,Ukraine,Greek,Turkish},
|
||||
Macintosh
|
||||
.TP
|
||||
Semitic languages
|
||||
.nf
|
||||
.fi
|
||||
ISO\-8859\-{6,8}, CP{1255,1256}, CP862, Mac{Hebrew,Arabic}
|
||||
.TP
|
||||
Japanese
|
||||
.nf
|
||||
.fi
|
||||
EUC\-JP, SHIFT_JIS, CP932, ISO\-2022\-JP, ISO\-2022\-JP\-2, ISO\-2022\-JP\-1,
|
||||
ISO-2022\-JP\-MS
|
||||
.TP
|
||||
Chinese
|
||||
.nf
|
||||
.fi
|
||||
EUC\-CN, HZ, GBK, CP936, GB18030, EUC\-TW, BIG5, CP950, BIG5\-HKSCS,
|
||||
BIG5\-HKSCS:2004, BIG5\-HKSCS:2001, BIG5\-HKSCS:1999, ISO\-2022\-CN,
|
||||
ISO\-2022\-CN\-EXT
|
||||
.TP
|
||||
Korean
|
||||
.nf
|
||||
.fi
|
||||
EUC\-KR, CP949, ISO\-2022\-KR, JOHAB
|
||||
.TP
|
||||
Armenian
|
||||
.nf
|
||||
.fi
|
||||
ARMSCII\-8
|
||||
.TP
|
||||
Georgian
|
||||
.nf
|
||||
.fi
|
||||
Georgian\-Academy, Georgian\-PS
|
||||
.TP
|
||||
Tajik
|
||||
.nf
|
||||
.fi
|
||||
KOI8\-T
|
||||
.TP
|
||||
Kazakh
|
||||
.nf
|
||||
.fi
|
||||
PT154, RK1048
|
||||
.TP
|
||||
Thai
|
||||
.nf
|
||||
.fi
|
||||
TIS\-620, CP874, MacThai
|
||||
.TP
|
||||
Laotian
|
||||
.nf
|
||||
.fi
|
||||
MuleLao\-1, CP1133
|
||||
.TP
|
||||
Vietnamese
|
||||
.nf
|
||||
.fi
|
||||
VISCII, TCVN, CP1258
|
||||
.TP
|
||||
Platform specifics
|
||||
.nf
|
||||
.fi
|
||||
HP\-ROMAN8, NEXTSTEP
|
||||
.TP
|
||||
Full Unicode
|
||||
.nf
|
||||
.fi
|
||||
UTF\-8
|
||||
.nf
|
||||
.fi
|
||||
UCS\-2, UCS\-2BE, UCS\-2LE
|
||||
.nf
|
||||
.fi
|
||||
UCS\-4, UCS\-4BE, UCS\-4LE
|
||||
.nf
|
||||
.fi
|
||||
UTF\-16, UTF\-16BE, UTF\-16LE
|
||||
.nf
|
||||
.fi
|
||||
UTF\-32, UTF\-32BE, UTF\-32LE
|
||||
.nf
|
||||
.fi
|
||||
UTF\-7
|
||||
.nf
|
||||
.fi
|
||||
C99, JAVA
|
||||
.TP
|
||||
Full Unicode, in terms of \fBuint16_t\fP or \fBuint32_t\fP
|
||||
(with machine dependent endianness and alignment)
|
||||
.nf
|
||||
.fi
|
||||
UCS\-2\-INTERNAL, UCS\-4\-INTERNAL
|
||||
.TP
|
||||
Locale dependent, in terms of \fBchar\fP or \fBwchar_t\fP
|
||||
(with machine dependent endianness and alignment, and with semantics
|
||||
depending on the OS and the current LC_CTYPE locale facet)
|
||||
.nf
|
||||
.fi
|
||||
char, wchar_t
|
||||
.PP
|
||||
When configured with the option \fB\-\-enable\-extra\-encodings\fP, it also
|
||||
provides support for a few extra encodings:
|
||||
.TP
|
||||
European languages
|
||||
.nf
|
||||
CP{437,737,775,852,853,855,857,858,860,861,863,865,869,1125}
|
||||
.fi
|
||||
.TP
|
||||
Semitic languages
|
||||
.nf
|
||||
.fi
|
||||
CP864
|
||||
.TP
|
||||
Japanese
|
||||
.nf
|
||||
.fi
|
||||
EUC\-JISX0213, Shift_JISX0213, ISO\-2022\-JP\-3
|
||||
.TP
|
||||
Chinese
|
||||
.nf
|
||||
.fi
|
||||
BIG5\-2003 (experimental)
|
||||
.TP
|
||||
Turkmen
|
||||
.nf
|
||||
.fi
|
||||
TDS565
|
||||
.TP
|
||||
Platform specifics
|
||||
.nf
|
||||
.fi
|
||||
ATARIST, RISCOS\-LATIN1
|
||||
.PP
|
||||
The empty encoding name "" is equivalent to "char": it denotes the
|
||||
locale dependent character encoding.
|
||||
.PP
|
||||
When the string "//TRANSLIT" is appended to \fItocode\fP, transliteration
|
||||
is activated. This means that when a character cannot be represented in the
|
||||
target character set, it can be approximated through one or several characters
|
||||
that look similar to the original character.
|
||||
.PP
|
||||
When the string "//IGNORE" is appended to \fItocode\fP, characters that
|
||||
cannot be represented in the target character set will be silently discarded.
|
||||
.PP
|
||||
The resulting conversion descriptor can be used with \fBiconv\fP any number
|
||||
of times. It remains valid until deallocated using \fBiconv_close\fP.
|
||||
.PP
|
||||
A conversion descriptor contains a conversion state. After creation using
|
||||
\fBiconv_open\fP, the state is in the initial state. Using \fBiconv\fP
|
||||
modifies the descriptor's conversion state. (This implies that a conversion
|
||||
descriptor can not be used in multiple threads simultaneously.) To bring the
|
||||
state back to the initial state, use \fBiconv\fP with NULL as \fIinbuf\fP
|
||||
argument.
|
||||
.SH "RETURN VALUE"
|
||||
The \fBiconv_open\fP function returns a freshly allocated conversion
|
||||
descriptor. In case of error, it sets \fBerrno\fP and returns (iconv_t)(\-1).
|
||||
.SH ERRORS
|
||||
The following error can occur, among others:
|
||||
.TP
|
||||
.B EINVAL
|
||||
The conversion from \fIfromcode\fP to \fItocode\fP is not supported by the
|
||||
implementation.
|
||||
.SH "CONFORMING TO"
|
||||
POSIX:2001
|
||||
.SH "SEE ALSO"
|
||||
.BR iconv (3)
|
||||
.BR iconvctl (3)
|
||||
.BR iconv_close (3)
|
||||
47
third_party/iconv/usr/share/man/man3/iconv_open_into.3
vendored
Normal file
47
third_party/iconv/usr/share/man/man3/iconv_open_into.3
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
.\" Copyright (c) Free Software Foundation, Inc.
|
||||
.\"
|
||||
.\" This is free documentation; 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.
|
||||
.\"
|
||||
.\" References consulted:
|
||||
.\" iconv.h
|
||||
.\"
|
||||
.TH ICONV_OPEN_INTO 3 "September 21, 2008" "GNU" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
iconv_open_into \- initialize descriptor for character set conversion
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <iconv.h>
|
||||
.sp
|
||||
.BI "int iconv_open_into (const char* " tocode ", const char* " fromcode ","
|
||||
.BI " iconv_allocation_t* " resultp );
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
The \fBiconv_open_into\fP function initializes a conversion descriptor suitable
|
||||
for converting byte sequences from character encoding \fIfromcode\fP to
|
||||
character encoding \fItocode\fP. The conversion descriptor is stored in the
|
||||
memory pointed to by \fIresultp\fP.
|
||||
.PP
|
||||
The values permitted for \fIfromcode\fP and \fItocode\fP are the same as for
|
||||
the function \fBiconv_open\fP.
|
||||
.PP
|
||||
After a successful return from this function, \fIresultp\fP can be be used
|
||||
as an \fBiconv_t\fP object with the \fBiconv\fP function.
|
||||
.SH "RETURN VALUE"
|
||||
The \fBiconv_open_into\fP function fills \fB*\fP\fIresultp\fP and returns 0 if
|
||||
it succeeds. In case of error, it sets \fBerrno\fP and returns \-1.
|
||||
.SH ERRORS
|
||||
The following error can occur, among others:
|
||||
.TP
|
||||
.B EINVAL
|
||||
The conversion from \fIfromcode\fP to \fItocode\fP is not supported by the
|
||||
implementation.
|
||||
.SH "CONFORMING TO"
|
||||
This function is implemented only in GNU libiconv and not in other \fBiconv\fP
|
||||
implementations. It is not backed by a standard. You can test for its presence
|
||||
through \fB(_LIBICONV_VERSION >= 0x010D)\fP.
|
||||
.SH "SEE ALSO"
|
||||
.BR iconv_open (3)
|
||||
.BR iconv (3)
|
||||
67
third_party/iconv/usr/share/man/man3/iconvctl.3
vendored
Normal file
67
third_party/iconv/usr/share/man/man3/iconvctl.3
vendored
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
.\" Copyright (c) Perry Rapp
|
||||
.\" Copyright (c) Free Software Foundation, Inc.
|
||||
.\"
|
||||
.\" This is free documentation; 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.
|
||||
.\"
|
||||
.\" References consulted:
|
||||
.\" iconv.h
|
||||
.\"
|
||||
.TH ICONVCTL 3 "March 31, 2007" "GNU" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
iconvctl \- control iconv behavior
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <iconv.h>
|
||||
.sp
|
||||
.BI "int iconvctl (iconv_t " cd " , int " request ", void * " argument );
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
The argument \fIcd\fP must be a conversion descriptor created using the
|
||||
function \fBiconv_open\fP.
|
||||
.PP
|
||||
\fBiconvctl\fP queries or adjusts the behavior of the \fBiconv\fP function,
|
||||
when invoked with the specified conversion descriptor, depending on the
|
||||
request value.
|
||||
.SH "REQUEST VALUES"
|
||||
The following are permissible values for the \fIrequest\fP parameter.
|
||||
.TP
|
||||
.B ICONV_TRIVIALP
|
||||
\fIargument\fP should be an \fBint *\fP which will receive 1 if the
|
||||
conversion is trivial, or 0 otherwise.
|
||||
.TP
|
||||
.B ICONV_GET_TRANSLITERATE
|
||||
\fIargument\fP should be an \fBint *\fP which will receive 1 if
|
||||
transliteration is enabled in the conversion, or 0 otherwise.
|
||||
.TP
|
||||
.B ICONV_SET_TRANSLITERATE
|
||||
\fIargument\fP should be a \fBconst int *\fP, pointing to an \fBint\fP value.
|
||||
A non-zero value is used to enable transliteration in the conversion. A zero
|
||||
value disables it.
|
||||
.TP
|
||||
.B ICONV_GET_DISCARD_ILSEQ
|
||||
\fIargument\fP should be an \fBint *\fP which will receive 1 if
|
||||
"illegal sequence discard and continue" is enabled in the conversion,
|
||||
or 0 otherwise.
|
||||
.TP
|
||||
.B ICONV_SET_DISCARD_ILSEQ
|
||||
\fIargument\fP should be a \fBconst int *\fP, pointing to an \fBint\fP value.
|
||||
A non-zero value is used to enable "illegal sequence discard and continue"
|
||||
in the conversion. A zero value disables it.
|
||||
.SH "RETURN VALUE"
|
||||
The \fBiconvctl\fP function returns 0 if it succeeds. In case of error, it sets
|
||||
\fBerrno\fP and returns \-1.
|
||||
.SH ERRORS
|
||||
The following errors can occur, among others:
|
||||
.TP
|
||||
.B EINVAL
|
||||
The request is invalid.
|
||||
.SH "CONFORMING TO"
|
||||
This function is implemented only in GNU libiconv and not in other \fBiconv\fP
|
||||
implementations. It is not backed by a standard. You can test for its presence
|
||||
through \fB(_LIBICONV_VERSION >= 0x0108)\fP.
|
||||
.SH "SEE ALSO"
|
||||
.BR iconv_open (3)
|
||||
.BR iconv (3)
|
||||
BIN
third_party/intl/usr/bin/envsubst
vendored
Executable file
BIN
third_party/intl/usr/bin/envsubst
vendored
Executable file
Binary file not shown.
BIN
third_party/intl/usr/bin/gettext
vendored
Executable file
BIN
third_party/intl/usr/bin/gettext
vendored
Executable file
Binary file not shown.
135
third_party/intl/usr/bin/gettext.sh
vendored
Executable file
135
third_party/intl/usr/bin/gettext.sh
vendored
Executable file
|
|
@ -0,0 +1,135 @@
|
|||
#! /bin/sh
|
||||
#
|
||||
# Copyright (C) 2003, 2005-2007, 2011, 2018-2019 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 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/>.
|
||||
#
|
||||
|
||||
# Find a way to echo strings without interpreting backslash.
|
||||
if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
|
||||
echo='echo'
|
||||
else
|
||||
if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
|
||||
echo='printf %s\n'
|
||||
else
|
||||
echo_func () {
|
||||
cat <<EOT
|
||||
$*
|
||||
EOT
|
||||
}
|
||||
echo='echo_func'
|
||||
fi
|
||||
fi
|
||||
|
||||
# This script is primarily a shell function library. In order for
|
||||
# ". gettext.sh" to find it, we install it in $PREFIX/bin (that is usually
|
||||
# contained in $PATH), rather than in some other location such as
|
||||
# $PREFIX/share/sh-scripts or $PREFIX/share/gettext. In order to not violate
|
||||
# the Filesystem Hierarchy Standard when doing so, this script is executable.
|
||||
# Therefore it needs to support the standard --help and --version.
|
||||
if test -z "${ZSH_VERSION+set}"; then
|
||||
# zsh is not POSIX compliant: By default, while ". gettext.sh" is executed,
|
||||
# it sets $0 to "gettext.sh", defeating the purpose of this test. But
|
||||
# fortunately we know that when running under zsh, this script is always
|
||||
# being sourced, not executed, because hardly anyone is crazy enough to
|
||||
# install zsh as /bin/sh.
|
||||
case "$0" in
|
||||
gettext.sh | */gettext.sh | *\\gettext.sh)
|
||||
progname=$0
|
||||
package=gettext-runtime
|
||||
version=0.20.1
|
||||
# func_usage
|
||||
# outputs to stdout the --help usage message.
|
||||
func_usage ()
|
||||
{
|
||||
echo "GNU gettext shell script function library version $version"
|
||||
echo "Usage: . gettext.sh"
|
||||
}
|
||||
# func_version
|
||||
# outputs to stdout the --version message.
|
||||
func_version ()
|
||||
{
|
||||
echo "$progname (GNU $package) $version"
|
||||
echo "Copyright (C) 2003-2019 Free Software Foundation, Inc.
|
||||
License GPLv2+: GNU GPL version 2 or later <https://gnu.org/licenses/gpl.html>
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law."
|
||||
echo "Written by" "Bruno Haible"
|
||||
}
|
||||
if test $# = 1; then
|
||||
case "$1" in
|
||||
--help | --hel | --he | --h )
|
||||
func_usage; exit 0 ;;
|
||||
--version | --versio | --versi | --vers | --ver | --ve | --v )
|
||||
func_version; exit 0 ;;
|
||||
esac
|
||||
fi
|
||||
func_usage 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# eval_gettext MSGID
|
||||
# looks up the translation of MSGID and substitutes shell variables in the
|
||||
# result.
|
||||
eval_gettext () {
|
||||
gettext "$1" | (export PATH `envsubst --variables "$1"`; envsubst "$1")
|
||||
}
|
||||
|
||||
# eval_ngettext MSGID MSGID-PLURAL COUNT
|
||||
# looks up the translation of MSGID / MSGID-PLURAL for COUNT and substitutes
|
||||
# shell variables in the result.
|
||||
eval_ngettext () {
|
||||
ngettext "$1" "$2" "$3" | (export PATH `envsubst --variables "$1 $2"`; envsubst "$1 $2")
|
||||
}
|
||||
|
||||
# eval_pgettext MSGCTXT MSGID
|
||||
# looks up the translation of MSGID in the context MSGCTXT and substitutes
|
||||
# shell variables in the result.
|
||||
eval_pgettext () {
|
||||
gettext --context="$1" "$2" | (export PATH `envsubst --variables "$2"`; envsubst "$2")
|
||||
}
|
||||
|
||||
# eval_npgettext MSGCTXT MSGID MSGID-PLURAL COUNT
|
||||
# looks up the translation of MSGID / MSGID-PLURAL for COUNT in the context
|
||||
# MSGCTXT and substitutes shell variables in the result.
|
||||
eval_npgettext () {
|
||||
ngettext --context="$1" "$2" "$3" "$4" | (export PATH `envsubst --variables "$2 $3"`; envsubst "$2 $3")
|
||||
}
|
||||
|
||||
# Note: This use of envsubst is much safer than using the shell built-in 'eval'
|
||||
# would be.
|
||||
# 1) The security problem with Chinese translations that happen to use a
|
||||
# character such as \xe0\x60 is avoided.
|
||||
# 2) The security problem with malevolent translators who put in command lists
|
||||
# like "$(...)" or "`...`" is avoided.
|
||||
# 3) The translations can only refer to shell variables that are already
|
||||
# mentioned in MSGID or MSGID-PLURAL.
|
||||
#
|
||||
# Note: "export PATH" above is a dummy; this is for the case when
|
||||
# `envsubst --variables ...` returns nothing.
|
||||
#
|
||||
# Note: In eval_ngettext above, "$1 $2" means a string whose variables set is
|
||||
# the union of the variables set of "$1" and "$2".
|
||||
#
|
||||
# Note: The minimal use of backquote above ensures that trailing newlines are
|
||||
# not dropped, not from the gettext invocation and not from the value of any
|
||||
# shell variable.
|
||||
#
|
||||
# Note: Field splitting on the `envsubst --variables ...` result is desired,
|
||||
# since envsubst outputs the variables, separated by newlines. Pathname
|
||||
# wildcard expansion or tilde expansion has no effect here, since the words
|
||||
# output by "envsubst --variables ..." consist solely of alphanumeric
|
||||
# characters and underscore.
|
||||
BIN
third_party/intl/usr/bin/ngettext
vendored
Executable file
BIN
third_party/intl/usr/bin/ngettext
vendored
Executable file
Binary file not shown.
502
third_party/intl/usr/include/libintl.h
vendored
Normal file
502
third_party/intl/usr/include/libintl.h
vendored
Normal file
|
|
@ -0,0 +1,502 @@
|
|||
/* Message catalogs for internationalization.
|
||||
Copyright (C) 1995-1997, 2000-2016, 2018-2019 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _LIBINTL_H
|
||||
#define _LIBINTL_H 1
|
||||
|
||||
#include <locale.h>
|
||||
#if (defined __APPLE__ && defined __MACH__) && 0
|
||||
# include <xlocale.h>
|
||||
#endif
|
||||
|
||||
/* The LC_MESSAGES locale category is the category used by the functions
|
||||
gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
|
||||
On systems that don't define it, use an arbitrary value instead.
|
||||
On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
|
||||
then includes <libintl.h> (i.e. this file!) and then only defines
|
||||
LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES
|
||||
in this case. */
|
||||
#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
|
||||
# define LC_MESSAGES 1729
|
||||
#endif
|
||||
|
||||
/* We define an additional symbol to signal that we use the GNU
|
||||
implementation of gettext. */
|
||||
#define __USE_GNU_GETTEXT 1
|
||||
|
||||
/* Provide information about the supported file formats. Returns the
|
||||
maximum minor revision number supported for a given major revision. */
|
||||
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
|
||||
((major) == 0 || (major) == 1 ? 1 : -1)
|
||||
|
||||
/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
|
||||
precedence over _conio_gettext. */
|
||||
#ifdef __DJGPP__
|
||||
# undef gettext
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Version number: (major<<16) + (minor<<8) + subminor */
|
||||
#define LIBINTL_VERSION 0x001400
|
||||
extern int libintl_version;
|
||||
|
||||
|
||||
/* We redirect the functions to those prefixed with "libintl_". This is
|
||||
necessary, because some systems define gettext/textdomain/... in the C
|
||||
library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
|
||||
If we used the unprefixed names, there would be cases where the
|
||||
definition in the C library would override the one in the libintl.so
|
||||
shared library. Recall that on ELF systems, the symbols are looked
|
||||
up in the following order:
|
||||
1. in the executable,
|
||||
2. in the shared libraries specified on the link command line, in order,
|
||||
3. in the dependencies of the shared libraries specified on the link
|
||||
command line,
|
||||
4. in the dlopen()ed shared libraries, in the order in which they were
|
||||
dlopen()ed.
|
||||
The definition in the C library would override the one in libintl.so if
|
||||
either
|
||||
* -lc is given on the link command line and -lintl isn't, or
|
||||
* -lc is given on the link command line before -lintl, or
|
||||
* libintl.so is a dependency of a dlopen()ed shared library but not
|
||||
linked to the executable at link time.
|
||||
Since Solaris gettext() behaves differently than GNU gettext(), this
|
||||
would be unacceptable.
|
||||
|
||||
The redirection happens by default through macros in C, so that &gettext
|
||||
is independent of the compilation unit, but through inline functions in
|
||||
C++, in order not to interfere with the name mangling of class fields or
|
||||
class methods called 'gettext'. */
|
||||
|
||||
/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
|
||||
If he doesn't, we choose the method. A third possible method is
|
||||
_INTL_REDIRECT_ASM, supported only by GCC. */
|
||||
#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
|
||||
# if defined __GNUC__ && __GNUC__ >= 2 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
|
||||
# define _INTL_REDIRECT_ASM
|
||||
# else
|
||||
# ifdef __cplusplus
|
||||
# define _INTL_REDIRECT_INLINE
|
||||
# else
|
||||
# define _INTL_REDIRECT_MACROS
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
/* Auxiliary macros. */
|
||||
#ifdef _INTL_REDIRECT_ASM
|
||||
# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))
|
||||
# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring
|
||||
# define _INTL_STRINGIFY(prefix) #prefix
|
||||
#else
|
||||
# define _INTL_ASM(cname)
|
||||
#endif
|
||||
|
||||
/* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return
|
||||
its n-th argument literally. This enables GCC to warn for example about
|
||||
printf (gettext ("foo %y")). */
|
||||
#if defined __GNUC__ && __GNUC__ >= 3 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && !(defined __clang__ && __clang__ && __clang_major__ >= 3) && defined __cplusplus)
|
||||
# define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n)))
|
||||
#else
|
||||
# define _INTL_MAY_RETURN_STRING_ARG(n)
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the current default message catalog for the current
|
||||
LC_MESSAGES locale. If not found, returns MSGID itself (the default
|
||||
text). */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_gettext (const char *__msgid)
|
||||
_INTL_MAY_RETURN_STRING_ARG (1);
|
||||
static inline
|
||||
_INTL_MAY_RETURN_STRING_ARG (1)
|
||||
char *gettext (const char *__msgid)
|
||||
{
|
||||
return libintl_gettext (__msgid);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define gettext libintl_gettext
|
||||
#endif
|
||||
extern char *gettext (const char *__msgid)
|
||||
_INTL_ASM (libintl_gettext)
|
||||
_INTL_MAY_RETURN_STRING_ARG (1);
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog for the current
|
||||
LC_MESSAGES locale. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_dgettext (const char *__domainname, const char *__msgid)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2);
|
||||
static inline
|
||||
_INTL_MAY_RETURN_STRING_ARG (2)
|
||||
char *dgettext (const char *__domainname, const char *__msgid)
|
||||
{
|
||||
return libintl_dgettext (__domainname, __msgid);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define dgettext libintl_dgettext
|
||||
#endif
|
||||
extern char *dgettext (const char *__domainname, const char *__msgid)
|
||||
_INTL_ASM (libintl_dgettext)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2);
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
|
||||
locale. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
|
||||
int __category)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2);
|
||||
static inline
|
||||
_INTL_MAY_RETURN_STRING_ARG (2)
|
||||
char *dcgettext (const char *__domainname, const char *__msgid, int __category)
|
||||
{
|
||||
return libintl_dcgettext (__domainname, __msgid, __category);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define dcgettext libintl_dcgettext
|
||||
#endif
|
||||
extern char *dcgettext (const char *__domainname, const char *__msgid,
|
||||
int __category)
|
||||
_INTL_ASM (libintl_dcgettext)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2);
|
||||
#endif
|
||||
|
||||
|
||||
/* Similar to 'gettext' but select the plural form corresponding to the
|
||||
number N. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n)
|
||||
_INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);
|
||||
static inline
|
||||
_INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2)
|
||||
char *ngettext (const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n)
|
||||
{
|
||||
return libintl_ngettext (__msgid1, __msgid2, __n);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define ngettext libintl_ngettext
|
||||
#endif
|
||||
extern char *ngettext (const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n)
|
||||
_INTL_ASM (libintl_ngettext)
|
||||
_INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);
|
||||
#endif
|
||||
|
||||
/* Similar to 'dgettext' but select the plural form corresponding to the
|
||||
number N. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
|
||||
const char *__msgid2, unsigned long int __n)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
|
||||
static inline
|
||||
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3)
|
||||
char *dngettext (const char *__domainname, const char *__msgid1,
|
||||
const char *__msgid2, unsigned long int __n)
|
||||
{
|
||||
return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define dngettext libintl_dngettext
|
||||
#endif
|
||||
extern char *dngettext (const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n)
|
||||
_INTL_ASM (libintl_dngettext)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
|
||||
#endif
|
||||
|
||||
/* Similar to 'dcgettext' but select the plural form corresponding to the
|
||||
number N. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_dcngettext (const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n, int __category)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
|
||||
static inline
|
||||
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3)
|
||||
char *dcngettext (const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n, int __category)
|
||||
{
|
||||
return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define dcngettext libintl_dcngettext
|
||||
#endif
|
||||
extern char *dcngettext (const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n, int __category)
|
||||
_INTL_ASM (libintl_dcngettext)
|
||||
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Set the current default message catalog to DOMAINNAME.
|
||||
If DOMAINNAME is null, return the current default.
|
||||
If DOMAINNAME is "", reset to the default of "messages". */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_textdomain (const char *__domainname);
|
||||
static inline char *textdomain (const char *__domainname)
|
||||
{
|
||||
return libintl_textdomain (__domainname);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define textdomain libintl_textdomain
|
||||
#endif
|
||||
extern char *textdomain (const char *__domainname)
|
||||
_INTL_ASM (libintl_textdomain);
|
||||
#endif
|
||||
|
||||
/* Specify that the DOMAINNAME message catalog will be found
|
||||
in DIRNAME rather than in the system locale data base. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_bindtextdomain (const char *__domainname,
|
||||
const char *__dirname);
|
||||
static inline char *bindtextdomain (const char *__domainname,
|
||||
const char *__dirname)
|
||||
{
|
||||
return libintl_bindtextdomain (__domainname, __dirname);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define bindtextdomain libintl_bindtextdomain
|
||||
#endif
|
||||
extern char *bindtextdomain (const char *__domainname, const char *__dirname)
|
||||
_INTL_ASM (libintl_bindtextdomain);
|
||||
#endif
|
||||
|
||||
/* Specify the character encoding in which the messages from the
|
||||
DOMAINNAME message catalog will be returned. */
|
||||
#ifdef _INTL_REDIRECT_INLINE
|
||||
extern char *libintl_bind_textdomain_codeset (const char *__domainname,
|
||||
const char *__codeset);
|
||||
static inline char *bind_textdomain_codeset (const char *__domainname,
|
||||
const char *__codeset)
|
||||
{
|
||||
return libintl_bind_textdomain_codeset (__domainname, __codeset);
|
||||
}
|
||||
#else
|
||||
#ifdef _INTL_REDIRECT_MACROS
|
||||
# define bind_textdomain_codeset libintl_bind_textdomain_codeset
|
||||
#endif
|
||||
extern char *bind_textdomain_codeset (const char *__domainname,
|
||||
const char *__codeset)
|
||||
_INTL_ASM (libintl_bind_textdomain_codeset);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Support for format strings with positions in *printf(), following the
|
||||
POSIX/XSI specification.
|
||||
Note: These replacements for the *printf() functions are visible only
|
||||
in source files that #include <libintl.h> or #include "gettext.h".
|
||||
Packages that use *printf() in source files that don't refer to _()
|
||||
or gettext() but for which the format string could be the return value
|
||||
of _() or gettext() need to add this #include. Oh well. */
|
||||
|
||||
#if !1
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
|
||||
/* Get va_list. */
|
||||
#if (defined __STDC__ && __STDC__) || defined __cplusplus || defined _MSC_VER
|
||||
# include <stdarg.h>
|
||||
#else
|
||||
# include <varargs.h>
|
||||
#endif
|
||||
|
||||
#if !(defined fprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef fprintf
|
||||
#define fprintf libintl_fprintf
|
||||
extern int fprintf (FILE *, const char *, ...);
|
||||
#endif
|
||||
#if !(defined vfprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef vfprintf
|
||||
#define vfprintf libintl_vfprintf
|
||||
extern int vfprintf (FILE *, const char *, va_list);
|
||||
#endif
|
||||
|
||||
#if !(defined printf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef printf
|
||||
#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__
|
||||
/* Don't break __attribute__((format(printf,M,N))).
|
||||
This redefinition is only possible because the libc in NetBSD, Cygwin,
|
||||
mingw does not have a function __printf__.
|
||||
Alternatively, we could have done this redirection only when compiling with
|
||||
__GNUC__, together with a symbol redirection:
|
||||
extern int printf (const char *, ...)
|
||||
__asm__ (#__USER_LABEL_PREFIX__ "libintl_printf");
|
||||
But doing it now would introduce a binary incompatibility with already
|
||||
distributed versions of libintl on these systems. */
|
||||
# define libintl_printf __printf__
|
||||
#endif
|
||||
#define printf libintl_printf
|
||||
extern int printf (const char *, ...);
|
||||
#endif
|
||||
#if !(defined vprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef vprintf
|
||||
#define vprintf libintl_vprintf
|
||||
extern int vprintf (const char *, va_list);
|
||||
#endif
|
||||
|
||||
#if !(defined sprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef sprintf
|
||||
#define sprintf libintl_sprintf
|
||||
extern int sprintf (char *, const char *, ...);
|
||||
#endif
|
||||
#if !(defined vsprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef vsprintf
|
||||
#define vsprintf libintl_vsprintf
|
||||
extern int vsprintf (char *, const char *, va_list);
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
|
||||
#if !(defined snprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef snprintf
|
||||
#define snprintf libintl_snprintf
|
||||
extern int snprintf (char *, size_t, const char *, ...);
|
||||
#endif
|
||||
#if !(defined vsnprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef vsnprintf
|
||||
#define vsnprintf libintl_vsnprintf
|
||||
extern int vsnprintf (char *, size_t, const char *, va_list);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
|
||||
#if !(defined asprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef asprintf
|
||||
#define asprintf libintl_asprintf
|
||||
extern int asprintf (char **, const char *, ...);
|
||||
#endif
|
||||
#if !(defined vasprintf && defined _GL_STDIO_H) /* don't override gnulib */
|
||||
#undef vasprintf
|
||||
#define vasprintf libintl_vasprintf
|
||||
extern int vasprintf (char **, const char *, va_list);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
|
||||
#undef fwprintf
|
||||
#define fwprintf libintl_fwprintf
|
||||
extern int fwprintf (FILE *, const wchar_t *, ...);
|
||||
#undef vfwprintf
|
||||
#define vfwprintf libintl_vfwprintf
|
||||
extern int vfwprintf (FILE *, const wchar_t *, va_list);
|
||||
|
||||
#undef wprintf
|
||||
#define wprintf libintl_wprintf
|
||||
extern int wprintf (const wchar_t *, ...);
|
||||
#undef vwprintf
|
||||
#define vwprintf libintl_vwprintf
|
||||
extern int vwprintf (const wchar_t *, va_list);
|
||||
|
||||
#undef swprintf
|
||||
#define swprintf libintl_swprintf
|
||||
extern int swprintf (wchar_t *, size_t, const wchar_t *, ...);
|
||||
#undef vswprintf
|
||||
#define vswprintf libintl_vswprintf
|
||||
extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Support for retrieving the name of a locale_t object. */
|
||||
#if 0
|
||||
|
||||
#ifndef GNULIB_defined_newlocale /* don't override gnulib */
|
||||
#undef newlocale
|
||||
#define newlocale libintl_newlocale
|
||||
extern locale_t newlocale (int, const char *, locale_t);
|
||||
#endif
|
||||
|
||||
#ifndef GNULIB_defined_duplocale /* don't override gnulib */
|
||||
#undef duplocale
|
||||
#define duplocale libintl_duplocale
|
||||
extern locale_t duplocale (locale_t);
|
||||
#endif
|
||||
|
||||
#ifndef GNULIB_defined_freelocale /* don't override gnulib */
|
||||
#undef freelocale
|
||||
#define freelocale libintl_freelocale
|
||||
extern void freelocale (locale_t);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Support for the locale chosen by the user. */
|
||||
#if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __CYGWIN__
|
||||
|
||||
#ifndef GNULIB_defined_setlocale /* don't override gnulib */
|
||||
#undef setlocale
|
||||
#define setlocale libintl_setlocale
|
||||
extern char *setlocale (int, const char *);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
|
||||
#undef newlocale
|
||||
#define newlocale libintl_newlocale
|
||||
/* Declare newlocale() only if the system headers define the 'locale_t' type. */
|
||||
#if !(defined __CYGWIN__ && !defined LC_ALL_MASK)
|
||||
extern locale_t newlocale (int, const char *, locale_t);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Support for relocatable packages. */
|
||||
|
||||
/* Sets the original and the current installation prefix of the package.
|
||||
Relocation simply replaces a pathname starting with the original prefix
|
||||
by the corresponding pathname with the current prefix instead. Both
|
||||
prefixes should be directory names without trailing slash (i.e. use ""
|
||||
instead of "/"). */
|
||||
#define libintl_set_relocation_prefix libintl_set_relocation_prefix
|
||||
extern void
|
||||
libintl_set_relocation_prefix (const char *orig_prefix,
|
||||
const char *curr_prefix);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* libintl.h */
|
||||
41
third_party/intl/usr/lib/libintl.la
vendored
Normal file
41
third_party/intl/usr/lib/libintl.la
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
# libintl.la - a libtool library file
|
||||
# Generated by libtool (GNU libtool) 2.4.6
|
||||
#
|
||||
# Please DO NOT delete this file!
|
||||
# It is necessary for linking the library.
|
||||
|
||||
# The name that we can dlopen(3).
|
||||
dlname='libintl.so.8'
|
||||
|
||||
# Names of this library.
|
||||
library_names='libintl.so.8.1.6 libintl.so.8 libintl.so'
|
||||
|
||||
# The name of the static archive.
|
||||
old_library=''
|
||||
|
||||
# Linker flags that cannot go in dependency_libs.
|
||||
inherited_linker_flags=''
|
||||
|
||||
# Libraries that this one depends upon.
|
||||
dependency_libs=' -liconv'
|
||||
|
||||
# Names of additional weak libraries provided by this library
|
||||
weak_library_names=''
|
||||
|
||||
# Version information for libintl.
|
||||
current=9
|
||||
age=1
|
||||
revision=6
|
||||
|
||||
# Is this an already installed library?
|
||||
installed=yes
|
||||
|
||||
# Should we warn about portability when linking against -modules?
|
||||
shouldnotlink=no
|
||||
|
||||
# Files to dlopen/dlpreopen
|
||||
dlopen=''
|
||||
dlpreopen=''
|
||||
|
||||
# Directory that this library needs to be installed in:
|
||||
libdir='/usr/lib'
|
||||
BIN
third_party/intl/usr/lib/libintl.so
vendored
Normal file
BIN
third_party/intl/usr/lib/libintl.so
vendored
Normal file
Binary file not shown.
BIN
third_party/intl/usr/lib/libintl.so.8
vendored
Normal file
BIN
third_party/intl/usr/lib/libintl.so.8
vendored
Normal file
Binary file not shown.
BIN
third_party/intl/usr/lib/libintl.so.8.1.6
vendored
Normal file
BIN
third_party/intl/usr/lib/libintl.so.8.1.6
vendored
Normal file
Binary file not shown.
158
third_party/intl/usr/share/doc/gettext/bind_textdomain_codeset.3.html
vendored
Normal file
158
third_party/intl/usr/share/doc/gettext/bind_textdomain_codeset.3.html
vendored
Normal file
|
|
@ -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>
|
||||
154
third_party/intl/usr/share/doc/gettext/bindtextdomain.3.html
vendored
Normal file
154
third_party/intl/usr/share/doc/gettext/bindtextdomain.3.html
vendored
Normal file
|
|
@ -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>
|
||||
8
third_party/intl/usr/share/doc/gettext/csharpdoc/GNU_Gettext.html
vendored
Normal file
8
third_party/intl/usr/share/doc/gettext/csharpdoc/GNU_Gettext.html
vendored
Normal file
|
|
@ -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>
|
||||
305
third_party/intl/usr/share/doc/gettext/csharpdoc/GNU_Gettext_GettextResourceManager.html
vendored
Normal file
305
third_party/intl/usr/share/doc/gettext/csharpdoc/GNU_Gettext_GettextResourceManager.html
vendored
Normal file
|
|
@ -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>
|
||||
356
third_party/intl/usr/share/doc/gettext/csharpdoc/GNU_Gettext_GettextResourceSet.html
vendored
Normal file
356
third_party/intl/usr/share/doc/gettext/csharpdoc/GNU_Gettext_GettextResourceSet.html
vendored
Normal file
|
|
@ -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>
|
||||
11
third_party/intl/usr/share/doc/gettext/csharpdoc/begin.html
vendored
Normal file
11
third_party/intl/usr/share/doc/gettext/csharpdoc/begin.html
vendored
Normal file
|
|
@ -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>
|
||||
10
third_party/intl/usr/share/doc/gettext/csharpdoc/index.html
vendored
Normal file
10
third_party/intl/usr/share/doc/gettext/csharpdoc/index.html
vendored
Normal file
|
|
@ -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>
|
||||
6
third_party/intl/usr/share/doc/gettext/csharpdoc/namespaces.html
vendored
Normal file
6
third_party/intl/usr/share/doc/gettext/csharpdoc/namespaces.html
vendored
Normal file
|
|
@ -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>
|
||||
142
third_party/intl/usr/share/doc/gettext/envsubst.1.html
vendored
Normal file
142
third_party/intl/usr/share/doc/gettext/envsubst.1.html
vendored
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
<!-- 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>ENVSUBST</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 align="center">ENVSUBST</h1>
|
||||
|
||||
<a href="#NAME">NAME</a><br>
|
||||
<a href="#SYNOPSIS">SYNOPSIS</a><br>
|
||||
<a href="#DESCRIPTION">DESCRIPTION</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">envsubst
|
||||
- substitutes environment variables in shell format
|
||||
strings</p>
|
||||
|
||||
<h2>SYNOPSIS
|
||||
<a name="SYNOPSIS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>envsubst</b>
|
||||
[<i>OPTION</i>] [<i>SHELL-FORMAT</i>]</p>
|
||||
|
||||
<h2>DESCRIPTION
|
||||
<a name="DESCRIPTION"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">Substitutes the
|
||||
values of environment variables.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>Operation
|
||||
mode: <br>
|
||||
-v</b>, <b>--variables</b></p>
|
||||
|
||||
<p style="margin-left:22%;">output the variables occurring
|
||||
in SHELL-FORMAT</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>Informative
|
||||
output: <br>
|
||||
-h</b>, <b>--help</b></p>
|
||||
|
||||
<p style="margin-left:22%;">display this help and exit</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>-V</b>,
|
||||
<b>--version</b></p>
|
||||
|
||||
<p style="margin-left:22%;">output version information and
|
||||
exit</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">In normal
|
||||
operation mode, standard input is copied to standard output,
|
||||
with references to environment variables of the form
|
||||
$VARIABLE or ${VARIABLE} being replaced with the
|
||||
corresponding values. If a SHELL-FORMAT is given, only
|
||||
those environment variables that are referenced in
|
||||
SHELL-FORMAT are substituted; otherwise all
|
||||
environment variables references occurring in standard input
|
||||
are substituted.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">When
|
||||
<b>--variables</b> is used, standard input is
|
||||
ignored, and the output consists of the environment
|
||||
variables that are referenced in SHELL-FORMAT, one per
|
||||
line.</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
|
||||
© 2003-2019 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>envsubst</b> is maintained as a Texinfo
|
||||
manual. If the <b>info</b> and <b>envsubst</b> programs are
|
||||
properly installed at your site, the command</p>
|
||||
|
||||
<p style="margin-left:22%; margin-top: 1em"><b>info
|
||||
envsubst</b></p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">should give you
|
||||
access to the complete manual.</p>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
192
third_party/intl/usr/share/doc/gettext/gettext.1.html
vendored
Normal file
192
third_party/intl/usr/share/doc/gettext/gettext.1.html
vendored
Normal file
|
|
@ -0,0 +1,192 @@
|
|||
<!-- 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>GETTEXT</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 align="center">GETTEXT</h1>
|
||||
|
||||
<a href="#NAME">NAME</a><br>
|
||||
<a href="#SYNOPSIS">SYNOPSIS</a><br>
|
||||
<a href="#DESCRIPTION">DESCRIPTION</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">gettext -
|
||||
translate message</p>
|
||||
|
||||
<h2>SYNOPSIS
|
||||
<a name="SYNOPSIS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>gettext</b>
|
||||
[<i>OPTION</i>] [[<i>TEXTDOMAIN</i>] <i>MSGID</i>] <b><br>
|
||||
gettext</b> [<i>OPTION</i>] <i>-s</i> [<i>MSGID</i>]...</p>
|
||||
|
||||
<h2>DESCRIPTION
|
||||
<a name="DESCRIPTION"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The
|
||||
<b>gettext</b> program translates a natural language message
|
||||
into the user’s language, by looking up the
|
||||
translation in a message catalog.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">Display native
|
||||
language translation of a textual message. <b><br>
|
||||
-d</b>,
|
||||
<b>--domain</b>=<i>TEXTDOMAIN</i></p>
|
||||
|
||||
<p style="margin-left:22%;">retrieve translated messages
|
||||
from TEXTDOMAIN</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>-c</b>,
|
||||
<b>--context</b>=<i>CONTEXT</i></p>
|
||||
|
||||
<p style="margin-left:22%;">specify context for MSGID</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="3%">
|
||||
|
||||
|
||||
<p><b>-e</b></p></td>
|
||||
<td width="8%"></td>
|
||||
<td width="63%">
|
||||
|
||||
|
||||
<p>enable expansion of some escape sequences</p></td>
|
||||
<td width="15%">
|
||||
</td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="11%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p><b>-n</b></p></td>
|
||||
<td width="8%"></td>
|
||||
<td width="63%">
|
||||
|
||||
|
||||
<p>suppress trailing newline</p></td>
|
||||
<td width="15%">
|
||||
</td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="11%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p><b>-E</b></p></td>
|
||||
<td width="8%"></td>
|
||||
<td width="63%">
|
||||
|
||||
|
||||
<p>(ignored for compatibility)</p></td>
|
||||
<td width="15%">
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<p style="margin-left:11%;">[TEXTDOMAIN] MSGID</p>
|
||||
|
||||
<p style="margin-left:22%;">retrieve translated message
|
||||
corresponding to MSGID from TEXTDOMAIN</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>Informative
|
||||
output: <br>
|
||||
-h</b>, <b>--help</b></p>
|
||||
|
||||
<p style="margin-left:22%;">display this help and exit</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>-V</b>,
|
||||
<b>--version</b></p>
|
||||
|
||||
<p style="margin-left:22%;">display version information and
|
||||
exit</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">If the
|
||||
TEXTDOMAIN parameter is not given, the domain is determined
|
||||
from the environment variable TEXTDOMAIN. If the message
|
||||
catalog is not found in the regular directory, another
|
||||
location can be specified with the environment variable
|
||||
TEXTDOMAINDIR. When used with the <b>-s</b> option the
|
||||
program behaves like the ’echo’ command. But it
|
||||
does not simply copy its arguments to stdout. Instead those
|
||||
messages found in the selected catalog are translated.
|
||||
Standard search directory: /usr/share/locale</p>
|
||||
|
||||
<h2>AUTHOR
|
||||
<a name="AUTHOR"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">Written by
|
||||
Ulrich Drepper.</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
|
||||
© 1995-2019 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>gettext</b> is maintained as a Texinfo
|
||||
manual. If the <b>info</b> and <b>gettext</b> programs are
|
||||
properly installed at your site, the command</p>
|
||||
|
||||
<p style="margin-left:22%; margin-top: 1em"><b>info
|
||||
gettext</b></p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">should give you
|
||||
access to the complete manual.</p>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
182
third_party/intl/usr/share/doc/gettext/gettext.3.html
vendored
Normal file
182
third_party/intl/usr/share/doc/gettext/gettext.3.html
vendored
Normal file
|
|
@ -0,0 +1,182 @@
|
|||
<!-- 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>GETTEXT</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 align="center">GETTEXT</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">gettext,
|
||||
dgettext, dcgettext - translate message</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 *
|
||||
gettext (const char *</b> <i>msgid</i><b>); <br>
|
||||
char * dgettext (const char *</b> <i>domainname</i><b>,
|
||||
const char *</b> <i>msgid</i><b>); <br>
|
||||
char * dcgettext (const char *</b> <i>domainname</i><b>,
|
||||
const char *</b> <i>msgid</i><b>, <br>
|
||||
int</b> <i>category</i><b>);</b></p>
|
||||
|
||||
<h2>DESCRIPTION
|
||||
<a name="DESCRIPTION"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The
|
||||
<b>gettext</b>, <b>dgettext</b> and <b>dcgettext</b>
|
||||
functions attempt to translate a text string into the
|
||||
user’s native language, by looking up the translation
|
||||
in a message catalog.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The
|
||||
<i>msgid</i> argument identifies the message to be
|
||||
translated. By convention, it is the English version of the
|
||||
message, with non-ASCII characters replaced by ASCII
|
||||
approximations. This choice allows the translators to work
|
||||
with message catalogs, called PO files, that contain both
|
||||
the English and the translated versions of each message, and
|
||||
can be installed using the <b>msgfmt</b> utility.</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 domain name is used to determine the message catalog
|
||||
where the translation is looked up; it must be a non-empty
|
||||
string. For the <b>gettext</b> function, it is specified
|
||||
through a preceding <b>textdomain</b> call. For the
|
||||
<b>dgettext</b> and <b>dcgettext</b> functions, it is passed
|
||||
as the <i>domainname</i> argument; if this argument is NULL,
|
||||
the domain name specified through a preceding
|
||||
<b>textdomain</b> call is used instead.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">Translation
|
||||
lookup operates in the context of the current locale. For
|
||||
the <b>gettext</b> and <b>dgettext</b> functions, the
|
||||
<b>LC_MESSAGES</b> locale facet is used. It is determined by
|
||||
a preceding call to the <b>setlocale</b> function.
|
||||
<b>setlocale(LC_ALL,"")</b> initializes the
|
||||
<b>LC_MESSAGES</b> locale based on the first nonempty value
|
||||
of the three environment variables <b>LC_ALL</b>,
|
||||
<b>LC_MESSAGES</b>, <b>LANG</b>; see <b>setlocale</b>(3).
|
||||
For the <b>dcgettext</b> function, the locale facet is
|
||||
determined by the <i>category</i> argument, which should be
|
||||
one of the <b>LC_xxx</b> constants defined in the
|
||||
<locale.h> header, excluding <b>LC_ALL</b>. In both
|
||||
cases, the functions also use the <b>LC_CTYPE</b> locale
|
||||
facet in order to convert the translated message from the
|
||||
translator’s codeset to the current locale’s
|
||||
codeset, unless overridden by a prior call to the
|
||||
<b>bind_textdomain_codeset</b> function.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The message
|
||||
catalog used by the functions is at the pathname
|
||||
<i>dirname</i>/<i>locale</i>/<i>category</i>/<i>domainname</i>.mo.
|
||||
Here <i>dirname</i> is the directory specified through
|
||||
<b>bindtextdomain</b>. Its default is system and
|
||||
configuration dependent; typically it is
|
||||
<i>prefix</i>/share/locale, where <i>prefix</i> is the
|
||||
installation prefix of the package. <i>locale</i> is the
|
||||
name of the current locale facet; the GNU implementation
|
||||
also tries generalizations, such as the language name
|
||||
without the territory name. <i>category</i> is
|
||||
<b>LC_MESSAGES</b> for the <b>gettext</b> and
|
||||
<b>dgettext</b> functions, or the argument passed to the
|
||||
<b>dcgettext</b> function.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">If the
|
||||
<b>LANGUAGE</b> environment variable is set to a nonempty
|
||||
value, and the locale is not the "C" locale, the
|
||||
value of <b>LANGUAGE</b> is assumed to contain a colon
|
||||
separated list of locale names. The functions will attempt
|
||||
to look up a translation of <i>msgid</i> in each of the
|
||||
locales in turn. This is a GNU extension.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">In the
|
||||
"C" locale, or if none of the used catalogs
|
||||
contain a translation for <i>msgid</i>, the <b>gettext</b>,
|
||||
<b>dgettext</b> and <b>dcgettext</b> functions return
|
||||
<i>msgid</i>.</p>
|
||||
|
||||
<h2>RETURN VALUE
|
||||
<a name="RETURN VALUE"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">If a
|
||||
translation was found in one of the specified catalogs, it
|
||||
is converted to the locale’s codeset and returned. The
|
||||
resulting string is statically allocated and must not be
|
||||
modified or freed. Otherwise <i>msgid</i> is returned.</p>
|
||||
|
||||
<h2>ERRORS
|
||||
<a name="ERRORS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>errno</b> is
|
||||
not modified.</p>
|
||||
|
||||
<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>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">When an empty
|
||||
string is used for <i>msgid</i>, the functions may return a
|
||||
nonempty string.</p>
|
||||
|
||||
<h2>SEE ALSO
|
||||
<a name="SEE ALSO"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>ngettext</b>(3),
|
||||
<b>dngettext</b>(3), <b>dcngettext</b>(3),
|
||||
<b>setlocale</b>(3), <b>textdomain</b>(3),
|
||||
<b>bindtextdomain</b>(3), <b>bind_textdomain_codeset</b>(3),
|
||||
<b>msgfmt</b>(1)</p>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
25
third_party/intl/usr/share/doc/gettext/javadoc2/allclasses-frame.html
vendored
Normal file
25
third_party/intl/usr/share/doc/gettext/javadoc2/allclasses-frame.html
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<!-- Generated by javadoc on Sat Nov 03 18:12:05 CET 2001 -->
|
||||
<TITLE>
|
||||
All Classes
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="white">
|
||||
<FONT size="+1" CLASS="FrameHeadingFont">
|
||||
<B>All Classes</B></FONT>
|
||||
<BR>
|
||||
|
||||
<TABLE BORDER="0" WIDTH="100%">
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="gnu/gettext/GettextResource.html" TARGET="classFrame">GettextResource</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
87
third_party/intl/usr/share/doc/gettext/javadoc2/deprecated-list.html
vendored
Normal file
87
third_party/intl/usr/share/doc/gettext/javadoc2/deprecated-list.html
vendored
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<!-- Generated by javadoc on Sat Nov 03 18:12:05 CET 2001 -->
|
||||
<TITLE>
|
||||
: Deprecated List
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="white">
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Deprecated</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="deprecated-list.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<CENTER>
|
||||
<H2>
|
||||
<B>Deprecated API</B></H2>
|
||||
</CENTER>
|
||||
<HR>
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Deprecated</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="deprecated-list.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
321
third_party/intl/usr/share/doc/gettext/javadoc2/gnu/gettext/GettextResource.html
vendored
Normal file
321
third_party/intl/usr/share/doc/gettext/javadoc2/gnu/gettext/GettextResource.html
vendored
Normal file
|
|
@ -0,0 +1,321 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<!-- Generated by javadoc on Sat Nov 03 18:12:05 CET 2001 -->
|
||||
<TITLE>
|
||||
: Class GettextResource
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="white">
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV CLASS
|
||||
NEXT CLASS</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="GettextResource.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<H2>
|
||||
<FONT SIZE="-1">
|
||||
gnu.gettext</FONT>
|
||||
<BR>
|
||||
Class GettextResource</H2>
|
||||
<PRE>
|
||||
java.lang.Object
|
||||
|
|
||||
+--java.util.ResourceBundle
|
||||
|
|
||||
+--<B>gnu.gettext.GettextResource</B>
|
||||
</PRE>
|
||||
<HR>
|
||||
<DL>
|
||||
<DT>public abstract class <B>GettextResource</B><DT>extends java.util.ResourceBundle</DL>
|
||||
|
||||
<P>
|
||||
This class implements the main GNU libintl functions in Java.
|
||||
<P>
|
||||
Using the GNU gettext approach, compiled message catalogs are normal
|
||||
Java ResourceBundle classes and are thus interoperable with standard
|
||||
ResourceBundle based code.
|
||||
<P>
|
||||
The main differences between the Sun ResourceBundle approach and the
|
||||
GNU gettext approach are:
|
||||
<UL>
|
||||
<LI>In the Sun approach, the keys are abstract textual shortcuts.
|
||||
In the GNU gettext approach, the keys are the English/ASCII version
|
||||
of the messages.
|
||||
<LI>In the Sun approach, the translation files are called
|
||||
"<VAR>Resource</VAR>_<VAR>locale</VAR>.properties" and have non-ASCII
|
||||
characters encoded in the Java
|
||||
<CODE>\</CODE><CODE>u<VAR>nnnn</VAR></CODE> syntax. Very few editors
|
||||
can natively display international characters in this format. In the
|
||||
GNU gettext approach, the translation files are called
|
||||
"<VAR>Resource</VAR>.<VAR>locale</VAR>.po"
|
||||
and are in the encoding the translator has chosen. Many editors
|
||||
can be used. There are at least three GUI translating tools
|
||||
(Emacs PO mode, KDE KBabel, GNOME gtranslator).
|
||||
<LI>In the Sun approach, the function
|
||||
<CODE>ResourceBundle.getString</CODE> throws a
|
||||
<CODE>MissingResourceException</CODE> when no translation is found.
|
||||
In the GNU gettext approach, the <CODE>gettext</CODE> function
|
||||
returns the (English) message key in that case.
|
||||
<LI>In the Sun approach, there is no support for plural handling.
|
||||
Even the most elaborate MessageFormat strings cannot provide decent
|
||||
plural handling. In the GNU gettext approach, we have the
|
||||
<CODE>ngettext</CODE> function.
|
||||
</UL>
|
||||
<P>
|
||||
To compile GNU gettext message catalogs into Java ResourceBundle classes,
|
||||
the <CODE>msgfmt</CODE> program can be used.
|
||||
<P>
|
||||
<HR>
|
||||
|
||||
<P>
|
||||
<!-- ======== INNER CLASS SUMMARY ======== -->
|
||||
|
||||
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
|
||||
<A NAME="field_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Field Summary</B></FONT></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE>static boolean</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../gnu/gettext/GettextResource.html#verbose">verbose</A></B></CODE>
|
||||
|
||||
<BR>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="fields_inherited_from_class_java.util.ResourceBundle"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TD><B>Fields inherited from class java.util.ResourceBundle</B></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE>parent</CODE></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
<A NAME="constructor_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Constructor Summary</B></FONT></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE><B><A HREF="../../gnu/gettext/GettextResource.html#GettextResource()">GettextResource</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
|
||||
<A NAME="method_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Method Summary</B></FONT></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE>static java.lang.String</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../gnu/gettext/GettextResource.html#gettext(java.util.ResourceBundle, java.lang.String)">gettext</A></B>(java.util.ResourceBundle catalog,
|
||||
java.lang.String msgid)</CODE>
|
||||
|
||||
<BR>
|
||||
Returns the translation of <VAR>msgid</VAR>.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE>static java.lang.String</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../gnu/gettext/GettextResource.html#ngettext(java.util.ResourceBundle, java.lang.String, java.lang.String, long)">ngettext</A></B>(java.util.ResourceBundle catalog,
|
||||
java.lang.String msgid,
|
||||
java.lang.String msgid_plural,
|
||||
long n)</CODE>
|
||||
|
||||
<BR>
|
||||
Returns the plural form for <VAR>n</VAR> of the translation of
|
||||
<VAR>msgid</VAR>.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="methods_inherited_from_class_java.util.ResourceBundle"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TD><B>Methods inherited from class java.util.ResourceBundle</B></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE>getBundle, getBundle, getBundle, getKeys, getLocale, getObject, getString, getStringArray, handleGetObject, setParent</CODE></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TD><B>Methods inherited from class java.lang.Object</B></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
|
||||
<!-- ============ FIELD DETAIL =========== -->
|
||||
|
||||
<A NAME="field_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1><FONT SIZE="+2">
|
||||
<B>Field Detail</B></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="verbose"><!-- --></A><H3>
|
||||
verbose</H3>
|
||||
<PRE>
|
||||
public static boolean <B>verbose</B></PRE>
|
||||
<DL>
|
||||
</DL>
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
|
||||
<A NAME="constructor_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1><FONT SIZE="+2">
|
||||
<B>Constructor Detail</B></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="GettextResource()"><!-- --></A><H3>
|
||||
GettextResource</H3>
|
||||
<PRE>
|
||||
public <B>GettextResource</B>()</PRE>
|
||||
<DL>
|
||||
</DL>
|
||||
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
|
||||
<A NAME="method_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1><FONT SIZE="+2">
|
||||
<B>Method Detail</B></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="gettext(java.util.ResourceBundle, java.lang.String)"><!-- --></A><H3>
|
||||
gettext</H3>
|
||||
<PRE>
|
||||
public static java.lang.String <B>gettext</B>(java.util.ResourceBundle catalog,
|
||||
java.lang.String msgid)</PRE>
|
||||
<DL>
|
||||
<DD>Returns the translation of <VAR>msgid</VAR>.<DD><DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>catalog</CODE> - a ResourceBundle<DD><CODE>msgid</CODE> - the key string to be translated, an ASCII string<DT><B>Returns:</B><DD>the translation of <VAR>msgid</VAR>, or <VAR>msgid</VAR> if
|
||||
none is found</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="ngettext(java.util.ResourceBundle, java.lang.String, java.lang.String, long)"><!-- --></A><H3>
|
||||
ngettext</H3>
|
||||
<PRE>
|
||||
public static java.lang.String <B>ngettext</B>(java.util.ResourceBundle catalog,
|
||||
java.lang.String msgid,
|
||||
java.lang.String msgid_plural,
|
||||
long n)</PRE>
|
||||
<DL>
|
||||
<DD>Returns the plural form for <VAR>n</VAR> of the translation of
|
||||
<VAR>msgid</VAR>.<DD><DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>catalog</CODE> - a ResourceBundle<DD><CODE>msgid</CODE> - the key string to be translated, an ASCII string<DD><CODE>msgid_plural</CODE> - its English plural form<DT><B>Returns:</B><DD>the translation of <VAR>msgid</VAR> depending on <VAR>n</VAR>,
|
||||
or <VAR>msgid</VAR> or <VAR>msgid_plural</VAR> if none is found</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<HR>
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV CLASS
|
||||
NEXT CLASS</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="GettextResource.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
26
third_party/intl/usr/share/doc/gettext/javadoc2/gnu/gettext/package-frame.html
vendored
Normal file
26
third_party/intl/usr/share/doc/gettext/javadoc2/gnu/gettext/package-frame.html
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<!-- Generated by javadoc on Sat Nov 03 16:13:58 CET 2001 -->
|
||||
<TITLE>
|
||||
: Package gnu.gettext
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="white">
|
||||
<FONT size="+1" CLASS="FrameTitleFont">
|
||||
<A HREF="../../gnu/gettext/package-summary.html" TARGET="classFrame">gnu.gettext</A></FONT>
|
||||
<TABLE BORDER="0" WIDTH="100%">
|
||||
<TR>
|
||||
<TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
|
||||
Classes</FONT>
|
||||
<FONT CLASS="FrameItemFont">
|
||||
<BR>
|
||||
<A HREF="GettextResource.html" TARGET="classFrame">GettextResource</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
103
third_party/intl/usr/share/doc/gettext/javadoc2/gnu/gettext/package-summary.html
vendored
Normal file
103
third_party/intl/usr/share/doc/gettext/javadoc2/gnu/gettext/package-summary.html
vendored
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<!-- Generated by javadoc on Sat Nov 03 16:13:58 CET 2001 -->
|
||||
<TITLE>
|
||||
: Package gnu.gettext
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="white">
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV PACKAGE
|
||||
NEXT PACKAGE</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="package-summary.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<H2>
|
||||
Package gnu.gettext
|
||||
</H2>
|
||||
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Class Summary</B></FONT></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD WIDTH="15%"><B><A HREF="GettextResource.html">GettextResource</A></B></TD>
|
||||
<TD>This class implements the main GNU libintl functions in Java.
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
<P>
|
||||
<HR>
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV PACKAGE
|
||||
NEXT PACKAGE</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="package-summary.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
99
third_party/intl/usr/share/doc/gettext/javadoc2/gnu/gettext/package-tree.html
vendored
Normal file
99
third_party/intl/usr/share/doc/gettext/javadoc2/gnu/gettext/package-tree.html
vendored
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<!-- Generated by javadoc on Sat Nov 03 16:13:58 CET 2001 -->
|
||||
<TITLE>
|
||||
: gnu.gettext Class Hierarchy
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="white">
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="package-tree.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<CENTER>
|
||||
<H2>
|
||||
Hierarchy For Package gnu.gettext
|
||||
</H2>
|
||||
</CENTER>
|
||||
<H2>
|
||||
Class Hierarchy
|
||||
</H2>
|
||||
<UL>
|
||||
<LI TYPE="circle">class java.lang.Object<UL>
|
||||
<LI TYPE="circle">class java.util.ResourceBundle<UL>
|
||||
<LI TYPE="circle">class gnu.gettext.<A HREF="../../gnu/gettext/GettextResource.html"><B>GettextResource</B></A></UL>
|
||||
</UL>
|
||||
</UL>
|
||||
<HR>
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="package-tree.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
136
third_party/intl/usr/share/doc/gettext/javadoc2/help-doc.html
vendored
Normal file
136
third_party/intl/usr/share/doc/gettext/javadoc2/help-doc.html
vendored
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<!-- Generated by javadoc on Sat Nov 03 18:12:05 CET 2001 -->
|
||||
<TITLE>
|
||||
: API Help
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="white">
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Help</B></FONT> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="help-doc.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<CENTER>
|
||||
<H1>
|
||||
How This API Document Is Organized</H1>
|
||||
</CENTER>
|
||||
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.<H3>
|
||||
Package</H3>
|
||||
<BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:<UL>
|
||||
<LI>Interfaces (italic)<LI>Classes<LI>Exceptions<LI>Errors</UL>
|
||||
</BLOCKQUOTE>
|
||||
<H3>
|
||||
Class/Interface</H3>
|
||||
<BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
Each class, interface, inner class and inner interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:<UL>
|
||||
<LI>Class inheritance diagram<LI>Direct Subclasses<LI>All Known Subinterfaces<LI>All Known Implementing Classes<LI>Class/interface declaration<LI>Class/interface description
|
||||
<P>
|
||||
<LI>Inner Class Summary<LI>Field Summary<LI>Constructor Summary<LI>Method Summary
|
||||
<P>
|
||||
<LI>Field Detail<LI>Constructor Detail<LI>Method Detail</UL>
|
||||
Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.</BLOCKQUOTE>
|
||||
<H3>
|
||||
Tree (Class Hierarchy)</H3>
|
||||
<BLOCKQUOTE>
|
||||
There is a <A HREF="overview-tree.html">Class Hierarchy</A> page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with <code>java.lang.Object</code>. The interfaces do not inherit from <code>java.lang.Object</code>.<UL>
|
||||
<LI>When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.<LI>When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.</UL>
|
||||
</BLOCKQUOTE>
|
||||
<H3>
|
||||
Deprecated API</H3>
|
||||
<BLOCKQUOTE>
|
||||
The <A HREF="deprecated-list.html">Deprecated API</A> page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.</BLOCKQUOTE>
|
||||
<H3>
|
||||
Index</H3>
|
||||
<BLOCKQUOTE>
|
||||
The <A HREF="index-all.html">Index</A> contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.</BLOCKQUOTE>
|
||||
<H3>
|
||||
Prev/Next</H3>
|
||||
These links take you to the next or previous class, interface, package, or related page.<H3>
|
||||
Frames/No Frames</H3>
|
||||
These links show and hide the HTML frames. All pages are available with or without frames.
|
||||
<P>
|
||||
<H3>
|
||||
Serialized Form</H3>
|
||||
Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
|
||||
<P>
|
||||
<FONT SIZE="-1">
|
||||
<EM>
|
||||
This help file applies to API documentation generated using the standard doclet. </EM>
|
||||
</FONT>
|
||||
<BR>
|
||||
<HR>
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Help</B></FONT> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="help-doc.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
111
third_party/intl/usr/share/doc/gettext/javadoc2/index-all.html
vendored
Normal file
111
third_party/intl/usr/share/doc/gettext/javadoc2/index-all.html
vendored
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<!-- Generated by javadoc on Sat Nov 03 18:12:05 CET 2001 -->
|
||||
<TITLE>
|
||||
: Index
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="white">
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="index-all.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<A HREF="#_G_">G</A> <A HREF="#_N_">N</A> <A HREF="#_V_">V</A> <HR>
|
||||
<A NAME="_G_"><!-- --></A><H2>
|
||||
<B>G</B></H2>
|
||||
<DL>
|
||||
<DT><A HREF="gnu/gettext/GettextResource.html#gettext(java.util.ResourceBundle, java.lang.String)"><B>gettext(ResourceBundle, String)</B></A> -
|
||||
Static method in class gnu.gettext.<A HREF="gnu/gettext/GettextResource.html">GettextResource</A>
|
||||
<DD>Returns the translation of <VAR>msgid</VAR>.
|
||||
<DT><A HREF="gnu/gettext/GettextResource.html"><B>GettextResource</B></A> - class gnu.gettext.<A HREF="gnu/gettext/GettextResource.html">GettextResource</A>.<DD>This class implements the main GNU libintl functions in Java.
|
||||
<DT><A HREF="gnu/gettext/GettextResource.html#GettextResource()"><B>GettextResource()</B></A> -
|
||||
Constructor for class gnu.gettext.<A HREF="gnu/gettext/GettextResource.html">GettextResource</A>
|
||||
<DD>
|
||||
</DL>
|
||||
<HR>
|
||||
<A NAME="_N_"><!-- --></A><H2>
|
||||
<B>N</B></H2>
|
||||
<DL>
|
||||
<DT><A HREF="gnu/gettext/GettextResource.html#ngettext(java.util.ResourceBundle, java.lang.String, java.lang.String, long)"><B>ngettext(ResourceBundle, String, String, long)</B></A> -
|
||||
Static method in class gnu.gettext.<A HREF="gnu/gettext/GettextResource.html">GettextResource</A>
|
||||
<DD>Returns the plural form for <VAR>n</VAR> of the translation of
|
||||
<VAR>msgid</VAR>.
|
||||
</DL>
|
||||
<HR>
|
||||
<A NAME="_V_"><!-- --></A><H2>
|
||||
<B>V</B></H2>
|
||||
<DL>
|
||||
<DT><A HREF="gnu/gettext/GettextResource.html#verbose"><B>verbose</B></A> -
|
||||
Static variable in class gnu.gettext.<A HREF="gnu/gettext/GettextResource.html">GettextResource</A>
|
||||
<DD>
|
||||
</DL>
|
||||
<HR>
|
||||
<A HREF="#_G_">G</A> <A HREF="#_N_">N</A> <A HREF="#_V_">V</A>
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="index-all.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
22
third_party/intl/usr/share/doc/gettext/javadoc2/index.html
vendored
Normal file
22
third_party/intl/usr/share/doc/gettext/javadoc2/index.html
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd>
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<!-- Generated by javadoc on Sat Nov 03 18:12:05 CET 2001-->
|
||||
<TITLE>
|
||||
Generated Documentation (Untitled)
|
||||
</TITLE>
|
||||
</HEAD>
|
||||
<FRAMESET cols="20%,80%">
|
||||
<FRAME src="allclasses-frame.html" name="packageFrame">
|
||||
<FRAME src="gnu/gettext/GettextResource.html" name="classFrame">
|
||||
</FRAMESET>
|
||||
<NOFRAMES>
|
||||
<H2>
|
||||
Frame Alert</H2>
|
||||
|
||||
<P>
|
||||
This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
|
||||
<BR>
|
||||
Link to <A HREF="gnu/gettext/GettextResource.html">Non-frame version.</A></NOFRAMES>
|
||||
</HTML>
|
||||
96
third_party/intl/usr/share/doc/gettext/javadoc2/overview-tree.html
vendored
Normal file
96
third_party/intl/usr/share/doc/gettext/javadoc2/overview-tree.html
vendored
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<!-- Generated by javadoc on Sat Nov 03 18:12:05 CET 2001 -->
|
||||
<TITLE>
|
||||
: Class Hierarchy
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="white">
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="overview-tree.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<CENTER>
|
||||
<H2>
|
||||
Hierarchy For All Packages</H2>
|
||||
</CENTER>
|
||||
<H2>
|
||||
Class Hierarchy
|
||||
</H2>
|
||||
<UL>
|
||||
<LI TYPE="circle">class java.lang.Object<UL>
|
||||
<LI TYPE="circle">class java.util.ResourceBundle<UL>
|
||||
<LI TYPE="circle">class gnu.gettext.<A HREF="gnu/gettext/GettextResource.html"><B>GettextResource</B></A></UL>
|
||||
</UL>
|
||||
</UL>
|
||||
<HR>
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="overview-tree.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
1
third_party/intl/usr/share/doc/gettext/javadoc2/package-list
vendored
Normal file
1
third_party/intl/usr/share/doc/gettext/javadoc2/package-list
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
gnu.gettext
|
||||
26
third_party/intl/usr/share/doc/gettext/javadoc2/packages.html
vendored
Normal file
26
third_party/intl/usr/share/doc/gettext/javadoc2/packages.html
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<!-- Generated by javadoc on Sat Nov 03 18:12:05 CET 2001 -->
|
||||
<TITLE>
|
||||
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="white">
|
||||
|
||||
<BR>
|
||||
|
||||
<BR>
|
||||
|
||||
<BR>
|
||||
<CENTER>
|
||||
The front page has been relocated.Please see:
|
||||
<BR>
|
||||
<A HREF="index.html">Frame version</A>
|
||||
<BR>
|
||||
<A HREF="gnu/gettext/GettextResource.html">Non-frame version.</A></CENTER>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
87
third_party/intl/usr/share/doc/gettext/javadoc2/serialized-form.html
vendored
Normal file
87
third_party/intl/usr/share/doc/gettext/javadoc2/serialized-form.html
vendored
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<!-- Generated by javadoc on Sat Nov 03 18:12:05 CET 2001 -->
|
||||
<TITLE>
|
||||
Serialized Form
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="white">
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="serialized-form.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<CENTER>
|
||||
<H1>
|
||||
Serialized Form</H1>
|
||||
</CENTER>
|
||||
<HR>
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="serialized-form.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
29
third_party/intl/usr/share/doc/gettext/javadoc2/stylesheet.css
vendored
Normal file
29
third_party/intl/usr/share/doc/gettext/javadoc2/stylesheet.css
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/* Javadoc style sheet */
|
||||
|
||||
/* Define colors, fonts and other style attributes here to override the defaults */
|
||||
|
||||
/* Page background color */
|
||||
body { background-color: #FFFFFF }
|
||||
|
||||
/* Table colors */
|
||||
.TableHeadingColor { background: #CCCCFF } /* Dark mauve */
|
||||
.TableSubHeadingColor { background: #EEEEFF } /* Light mauve */
|
||||
.TableRowColor { background: #FFFFFF } /* White */
|
||||
|
||||
/* Font used in left-hand frame lists */
|
||||
.FrameTitleFont { font-size: normal; font-family: normal }
|
||||
.FrameHeadingFont { font-size: normal; font-family: normal }
|
||||
.FrameItemFont { font-size: normal; font-family: normal }
|
||||
|
||||
/* Example of smaller, sans-serif font in frames */
|
||||
/* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */
|
||||
|
||||
/* Navigation bar fonts and colors */
|
||||
.NavBarCell1 { background-color:#EEEEFF;}/* Light mauve */
|
||||
.NavBarCell1Rev { background-color:#00008B;}/* Dark Blue */
|
||||
.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;}
|
||||
.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
|
||||
|
||||
.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
|
||||
.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
|
||||
|
||||
202
third_party/intl/usr/share/doc/gettext/ngettext.1.html
vendored
Normal file
202
third_party/intl/usr/share/doc/gettext/ngettext.1.html
vendored
Normal file
|
|
@ -0,0 +1,202 @@
|
|||
<!-- 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>NGETTEXT</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 align="center">NGETTEXT</h1>
|
||||
|
||||
<a href="#NAME">NAME</a><br>
|
||||
<a href="#SYNOPSIS">SYNOPSIS</a><br>
|
||||
<a href="#DESCRIPTION">DESCRIPTION</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">ngettext
|
||||
- translate message and choose plural form</p>
|
||||
|
||||
<h2>SYNOPSIS
|
||||
<a name="SYNOPSIS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>ngettext</b>
|
||||
[<i>OPTION</i>] [<i>TEXTDOMAIN</i>] <i>MSGID MSGID-PLURAL
|
||||
COUNT</i></p>
|
||||
|
||||
<h2>DESCRIPTION
|
||||
<a name="DESCRIPTION"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The
|
||||
<b>ngettext</b> program translates a natural language
|
||||
message into the user’s language, by looking up the
|
||||
translation in a message catalog, and chooses the
|
||||
appropriate plural form, which depends on the number
|
||||
<i>COUNT</i> and the language of the message catalog where
|
||||
the translation was found.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">Display native
|
||||
language translation of a textual message whose grammatical
|
||||
form depends on a number. <b><br>
|
||||
-d</b>,
|
||||
<b>--domain</b>=<i>TEXTDOMAIN</i></p>
|
||||
|
||||
<p style="margin-left:22%;">retrieve translated message
|
||||
from TEXTDOMAIN</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>-c</b>,
|
||||
<b>--context</b>=<i>CONTEXT</i></p>
|
||||
|
||||
<p style="margin-left:22%;">specify context for MSGID</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="3%">
|
||||
|
||||
|
||||
<p><b>-e</b></p></td>
|
||||
<td width="8%"></td>
|
||||
<td width="63%">
|
||||
|
||||
|
||||
<p>enable expansion of some escape sequences</p></td>
|
||||
<td width="15%">
|
||||
</td></tr>
|
||||
<tr valign="top" align="left">
|
||||
<td width="11%"></td>
|
||||
<td width="3%">
|
||||
|
||||
|
||||
<p><b>-E</b></p></td>
|
||||
<td width="8%"></td>
|
||||
<td width="63%">
|
||||
|
||||
|
||||
<p>(ignored for compatibility)</p></td>
|
||||
<td width="15%">
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<p style="margin-left:11%;">[TEXTDOMAIN]</p>
|
||||
|
||||
<p style="margin-left:22%;">retrieve translated message
|
||||
from TEXTDOMAIN</p>
|
||||
|
||||
<p style="margin-left:11%;">MSGID MSGID-PLURAL</p>
|
||||
|
||||
<p style="margin-left:22%;">translate MSGID (singular) /
|
||||
MSGID-PLURAL (plural)</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="7%">
|
||||
|
||||
|
||||
<p>COUNT</p></td>
|
||||
<td width="4%"></td>
|
||||
<td width="72%">
|
||||
|
||||
|
||||
<p>choose singular/plural form based on this value</p></td>
|
||||
<td width="6%">
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>Informative
|
||||
output: <br>
|
||||
-h</b>, <b>--help</b></p>
|
||||
|
||||
<p style="margin-left:22%;">display this help and exit</p>
|
||||
|
||||
<p style="margin-left:11%;"><b>-V</b>,
|
||||
<b>--version</b></p>
|
||||
|
||||
<p style="margin-left:22%;">display version information and
|
||||
exit</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">If the
|
||||
TEXTDOMAIN parameter is not given, the domain is determined
|
||||
from the environment variable TEXTDOMAIN. If the message
|
||||
catalog is not found in the regular directory, another
|
||||
location can be specified with the environment variable
|
||||
TEXTDOMAINDIR. Standard search directory: /usr/share/locale</p>
|
||||
|
||||
<h2>AUTHOR
|
||||
<a name="AUTHOR"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">Written by
|
||||
Ulrich Drepper.</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
|
||||
© 1995-1997, 2000-2019 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>ngettext</b> is maintained as a Texinfo
|
||||
manual. If the <b>info</b> and <b>ngettext</b> programs are
|
||||
properly installed at your site, the command</p>
|
||||
|
||||
<p style="margin-left:22%; margin-top: 1em"><b>info
|
||||
ngettext</b></p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">should give you
|
||||
access to the complete manual.</p>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
138
third_party/intl/usr/share/doc/gettext/ngettext.3.html
vendored
Normal file
138
third_party/intl/usr/share/doc/gettext/ngettext.3.html
vendored
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
<!-- 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>NGETTEXT</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 align="center">NGETTEXT</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">ngettext,
|
||||
dngettext, dcngettext - translate message and choose
|
||||
plural form</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 *
|
||||
ngettext (const char *</b> <i>msgid</i><b>, const char *</b>
|
||||
<i>msgid_plural</i><b>, <br>
|
||||
unsigned long int</b> <i>n</i><b>); <br>
|
||||
char * dngettext (const char *</b> <i>domainname</i><b>,
|
||||
<br>
|
||||
const char *</b> <i>msgid</i><b>, const char *</b>
|
||||
<i>msgid_plural</i><b>, <br>
|
||||
unsigned long int</b> <i>n</i><b>); <br>
|
||||
char * dcngettext (const char *</b> <i>domainname</i><b>,
|
||||
<br>
|
||||
const char *</b> <i>msgid</i><b>, const char *</b>
|
||||
<i>msgid_plural</i><b>, <br>
|
||||
unsigned long int</b> <i>n</i><b>, int</b>
|
||||
<i>category</i><b>);</b></p>
|
||||
|
||||
<h2>DESCRIPTION
|
||||
<a name="DESCRIPTION"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The
|
||||
<b>ngettext</b>, <b>dngettext</b> and <b>dcngettext</b>
|
||||
functions attempt to translate a text string into the
|
||||
user’s native language, by looking up the appropriate
|
||||
plural form of the translation in a message catalog.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">Plural forms
|
||||
are grammatical variants depending on the a number. Some
|
||||
languages have two forms, called singular and plural. Other
|
||||
languages have three forms, called singular, dual and
|
||||
plural. There are also languages with four forms.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The
|
||||
<b>ngettext</b>, <b>dngettext</b> and <b>dcngettext</b>
|
||||
functions work like the <b>gettext</b>, <b>dgettext</b> and
|
||||
<b>dcgettext</b> functions, respectively. Additionally, they
|
||||
choose the appropriate plural form, which depends on the
|
||||
number <i>n</i> and the language of the message catalog
|
||||
where the translation was found.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">In the
|
||||
"C" locale, or if none of the used catalogs
|
||||
contain a translation for <i>msgid</i>, the <b>ngettext</b>,
|
||||
<b>dngettext</b> and <b>dcngettext</b> functions return
|
||||
<i>msgid</i> if <i>n</i> == 1, or <i>msgid_plural</i> if
|
||||
<i>n</i> != 1.</p>
|
||||
|
||||
<h2>RETURN VALUE
|
||||
<a name="RETURN VALUE"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">If a
|
||||
translation was found in one of the specified catalogs, the
|
||||
appropriate plural form is converted to the locale’s
|
||||
codeset and returned. The resulting string is statically
|
||||
allocated and must not be modified or freed. Otherwise
|
||||
<i>msgid</i> or <i>msgid_plural</i> is returned, as
|
||||
described above.</p>
|
||||
|
||||
<h2>ERRORS
|
||||
<a name="ERRORS"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em"><b>errno</b> is
|
||||
not modified.</p>
|
||||
|
||||
<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)</p>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
140
third_party/intl/usr/share/doc/gettext/textdomain.3.html
vendored
Normal file
140
third_party/intl/usr/share/doc/gettext/textdomain.3.html
vendored
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
<!-- 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>TEXTDOMAIN</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 align="center">TEXTDOMAIN</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">textdomain
|
||||
- set domain for future gettext() calls</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 *
|
||||
textdomain (const char *</b> <i>domainname</i><b>);</b></p>
|
||||
|
||||
<h2>DESCRIPTION
|
||||
<a name="DESCRIPTION"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The
|
||||
<b>textdomain</b> function sets or retrieves the current
|
||||
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 domain name is used to determine the message catalog
|
||||
where a translation is looked up; it must be a non-empty
|
||||
string.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">The current
|
||||
message domain is used by the <b>gettext</b>,
|
||||
<b>ngettext</b> functions, and by the <b>dgettext</b>,
|
||||
<b>dcgettext</b>, <b>dngettext</b> and <b>dcngettext</b>
|
||||
functions when called with a NULL domainname argument.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">If
|
||||
<i>domainname</i> is not NULL, the current message domain is
|
||||
set to <i>domainname</i>. The string the function stores
|
||||
internally is a copy of the <i>domainname</i> argument.</p>
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">If
|
||||
<i>domainname</i> is NULL, the function returns the current
|
||||
message domain.</p>
|
||||
|
||||
<h2>RETURN VALUE
|
||||
<a name="RETURN VALUE"></a>
|
||||
</h2>
|
||||
|
||||
|
||||
<p style="margin-left:11%; margin-top: 1em">If successful,
|
||||
the <b>textdomain</b> function returns the current message
|
||||
domain, after possibly changing it. The resulting string is
|
||||
valid until the next <b>textdomain</b> call 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>ngettext</b>(3), <b>bindtextdomain</b>(3),
|
||||
<b>bind_textdomain_codeset</b>(3)</p>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
1
third_party/intl/usr/share/gettext/ABOUT-NLS
vendored
Normal file
1
third_party/intl/usr/share/gettext/ABOUT-NLS
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
<https://www.gnu.org/software/gettext/manual/html_node/Users.html>
|
||||
BIN
third_party/intl/usr/share/locale/ast/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
BIN
third_party/intl/usr/share/locale/ast/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
Binary file not shown.
BIN
third_party/intl/usr/share/locale/be/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
BIN
third_party/intl/usr/share/locale/be/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
Binary file not shown.
BIN
third_party/intl/usr/share/locale/bg/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
BIN
third_party/intl/usr/share/locale/bg/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
Binary file not shown.
BIN
third_party/intl/usr/share/locale/ca/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
BIN
third_party/intl/usr/share/locale/ca/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
Binary file not shown.
BIN
third_party/intl/usr/share/locale/cs/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
BIN
third_party/intl/usr/share/locale/cs/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
Binary file not shown.
BIN
third_party/intl/usr/share/locale/da/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
BIN
third_party/intl/usr/share/locale/da/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
Binary file not shown.
BIN
third_party/intl/usr/share/locale/de/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
BIN
third_party/intl/usr/share/locale/de/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
Binary file not shown.
BIN
third_party/intl/usr/share/locale/el/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
BIN
third_party/intl/usr/share/locale/el/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
Binary file not shown.
BIN
third_party/intl/usr/share/locale/en@boldquot/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
BIN
third_party/intl/usr/share/locale/en@boldquot/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
Binary file not shown.
BIN
third_party/intl/usr/share/locale/en@quot/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
BIN
third_party/intl/usr/share/locale/en@quot/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
Binary file not shown.
BIN
third_party/intl/usr/share/locale/eo/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
BIN
third_party/intl/usr/share/locale/eo/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
Binary file not shown.
BIN
third_party/intl/usr/share/locale/es/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
BIN
third_party/intl/usr/share/locale/es/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
Binary file not shown.
BIN
third_party/intl/usr/share/locale/et/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
BIN
third_party/intl/usr/share/locale/et/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
Binary file not shown.
BIN
third_party/intl/usr/share/locale/fi/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
BIN
third_party/intl/usr/share/locale/fi/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
Binary file not shown.
BIN
third_party/intl/usr/share/locale/fr/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
BIN
third_party/intl/usr/share/locale/fr/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
Binary file not shown.
BIN
third_party/intl/usr/share/locale/ga/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
BIN
third_party/intl/usr/share/locale/ga/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
Binary file not shown.
BIN
third_party/intl/usr/share/locale/gl/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
BIN
third_party/intl/usr/share/locale/gl/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
Binary file not shown.
BIN
third_party/intl/usr/share/locale/hr/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
BIN
third_party/intl/usr/share/locale/hr/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
Binary file not shown.
BIN
third_party/intl/usr/share/locale/hu/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
BIN
third_party/intl/usr/share/locale/hu/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
Binary file not shown.
BIN
third_party/intl/usr/share/locale/id/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
BIN
third_party/intl/usr/share/locale/id/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
Binary file not shown.
BIN
third_party/intl/usr/share/locale/it/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
BIN
third_party/intl/usr/share/locale/it/LC_MESSAGES/gettext-runtime.mo
vendored
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user