forked from oe5hpm/openBCM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
charset.cpp
49 lines (39 loc) · 1.28 KB
/
charset.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/***************************************************************
BayCom(R) Packet-Radio fuer IBM PC
OpenBCM-Mailbox
-------------------------
Charset conversion tables
-------------------------
***************************************************************/
#include "baycom.h"
#define CHARSET_NUM 1
charset **charsets;
/*---------------------------------------------------------------------------*/
void init_charsets () //should be read from file and alloc'd dynamically
//*************************************************************************
//
// Init Charsets
//
//*************************************************************************
{
//IBM-ANSI umlaut
charset *ibm_ansi = (charset *) t_malloc(sizeof(charset), "*chr");
static char ibm_ansi_name[] = "ibm-ansi";
static charset_entry ibm_ansi_chars[] =
{
{0x84, 0xe4}, //ae
{0x94, 0xf6}, //oe
{0x81, 0xfc}, //ue
{0x8e, 0xc4}, //Ae
{0x99, 0xd6}, //Oe
{0x9a, 0xdc}, //Ue
{0xe1, 0xdf}, //ss
{0,0}
};
ibm_ansi->id = 1;
ibm_ansi->name = ibm_ansi_name;
ibm_ansi->chars = ibm_ansi_chars;
charsets = (charset **) t_malloc(CHARSET_NUM * sizeof(charset *), "*chs");
charsets[0] = ibm_ansi;
};
/*---------------------------------------------------------------------------*/