QNX Community Resources
PxTerminalBuildCharsets()
Create character set tables based on translation tables
Synopsis:
#include <photon/PxTerminal.h> PtTerminalCharsets_t *PxTerminalBuildCharsets( PxTerminalCsNames_t const *names );
Description:
This function is an alternative to creating charset tables by hand. It creates a PtTerminalCharsets_t structure (see the Photon Widget Reference) based on Photon character translation files (see PxTranslateSet()).
The PxTerminalCsNames_t structure is defined as follows:
typedef struct {
char const *AnsiCharsetName;
char const *InternalCharsetName;
char const *FontCharsetName;
...
}
PxTerminalCsNames_t;
The AnsiCharsetName and InternalCharsetName members can be either NULL or the name of a supported character set. A NULL maps directly to a NULL in the resulting PtTerminalCharsets_t structure.
The FontCharsetName can be one of:
- NULL - no font translation
- The name of an 8-bit character encoding
- The special value Px_TERMINAL_UNICODE_FONT.
This function puts the resulting structure and all the tables in a single allocated block of memory. After it's no longer needed, you can simply free() it.
Returns:
A pointer to the resulting PtTerminalCharsets_t structure.
Classification:
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
See also:
PxTerminalLoadCharsets(), PxTerminalSaveCharsets()
PtTerminal, PtTerminalCharsets_t in the Photon Widget Reference

