Defines | |
#define | M17NLIB_MAJOR_VERSION |
#define | M17NLIB_MINOR_VERSION |
#define | M17NLIB_VERSION_NAME |
#define | M17N_INIT() |
Initialize the m17n library. | |
#define | M17N_FINI() |
Finalize the m17n library. |
The API of the m17n library is divided into these four.
It provides basic modules to handle M-texts. They don't require the m17n database. To use this API, an application program must include <m17n-core.h> and be linked by -lm17n-core.
It provides modules that utilize the m17n database. They load various kinds of data from the database on demand. To use this API, an application program must include <m17n.h> and be linked by -lm17n-core -lm17n. With that, CORE API is also available.
It provides GUI modules such as drawing and inputting M-texts on a window system. The API itself is independent on a window system, but the m17n library must be configured to use a specific window system. Currently, we support only the X Window System. To use this API, an application program must include <m17n-gui.h> and <m17n-X.h>, and be linked by -lm17n-core -lm17n -lm17n-X. With that, CORE and SHELL APIs are also available.
It provides miscellaneous functions to support error handling and debugging. This API can't be used by itself, but with one or more APIs listed above. To use the API, an application program must include <m17n-misc.h> in addition to one of <m17n-core.h>, <m17n.h>, and <m17n-gui.h>.
See also the section m17n-config(1).
ENVIRONMENT VARIABLE
The m17n library pays attention to these environment variables.
M17NDIR
Name of a directory that contains data of the m17n database. See Database for the detail.
MDEBUG_XXXX
Environment variables whose name start by "MDEBUG_" controls printing of debug information. See Debugging for the detail.
API NAMING CONVENTION
The library exports functions, variables, macros, and types. All of them start by the letter 'm' or 'M' followed by an object name (e.g. "symbol" and "plist", but "mtext" object is given the name "text" to avoid double 'm' at the head) or a module name (e.g. draw, input).
They start with 'm' followed by lower case object name. For example, msymbol(), mtext_ref_char(), mdraw_text().
The naming convention is the same as functions (e.g. mface_large).
Variables of type MSymbol start with 'M' followed by their names (e.g. Mlanguage (name is "langauge"), Miso_2022 (name is "iso-2022").
They start by 'M' followed by upper case object names.
They start by 'M' followed by capitalized object names (e.g. MConverter, MInputDriver).
|
The M17NLIB_MAJOR_VERSION macro gives the major version number of the m17n library. |
|
The M17NLIB_MINOR_VERSION macro gives the minor version number of the m17n library. |
|
The M17NLIB_VERSION_NAME macro gives the version name of the m17n library as a string. |
|
The macro M17N_INIT() initializes the m17n library. This function must be called before any m17n functions are used.
If the initialization was successful, the external variable |
|
The macro M17N_FINI() finalizes the m17n library. It frees all the memory area used by the m17n library. Once this function is called, no m17n functions should be used until the macro M17N_INIT() is called again. |