gsm_nls.h
来自「开发手机AT指令的源码」· C头文件 代码 · 共 72 行
H
72 行
// *************************************************************************// * GSM TA/ME library// *// * File: gsm_nls.h// *// * Purpose: Groups macros, initialization and includes// * for National Language Support (NLS)// *// * Warning: Only include this header from gsmlib .cc-files// *// * Author: Peter Hofmann (software@pxh.de)// *// * Created: 3.11.1999// *************************************************************************#ifndef GSM_NLS_H#define GSM_NLS_H#ifdef HAVE_CONFIG_H#include <gsm_config.h>#endif#ifdef ENABLE_NLS#ifdef HAVE_LIBINTL_H#include <libintl.h>#else#include "../intl/libintl.h"#endif#ifdef HAVE_LOCALE_H#include <locale.h>#endif#define _(String) dgettext(PACKAGE, String)// this causes automatic NLS initialization if one file of the library// includes gsm_nls.hnamespace gsmlib{ const class InitNLS { static bool initialized; public: InitNLS() { if (! initialized) // do only once { setlocale(LC_ALL, "");#ifdef LOCAL_TRANSLATIONS bindtextdomain(PACKAGE, "../po");#else bindtextdomain(PACKAGE, LOCALEDIR);#endif textdomain(PACKAGE); initialized = true; } } } initNLS;};#else#define _(String) (String)#endif // ENABLE_NLS#define N_(String) (String)#endif // GSM_NLS_H
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?