1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

Reformat minibidi.[ch] in line with my coding conventions. It was

just getting to be too much hassle trying to work with the existing
indentation.

[originally from svn r4952]
This commit is contained in:
Simon Tatham 2004-12-07 18:18:28 +00:00
parent 52eb87aed2
commit 73231eeb54
2 changed files with 561 additions and 1297 deletions

1556
minibidi.c

File diff suppressed because it is too large Load Diff

View File

@ -38,12 +38,12 @@
#define OISR 0x40 /* Override is R */ #define OISR 0x40 /* Override is R */
/* Shaping Helpers */ /* Shaping Helpers */
#define STYPE(xh) (((xh >= SHAPE_FIRST) && (xh <= SHAPE_LAST)) ? \ #define STYPE(xh) ((((xh) >= SHAPE_FIRST) && ((xh) <= SHAPE_LAST)) ? \
shapetypes[xh-SHAPE_FIRST].type : SU) /*))*/ shapetypes[(xh)-SHAPE_FIRST].type : SU) /*))*/
#define SISOLATED(xh) (shapetypes[xh-SHAPE_FIRST].form_b) #define SISOLATED(xh) (shapetypes[(xh)-SHAPE_FIRST].form_b)
#define SFINAL(xh) xh+1 #define SFINAL(xh) ((xh)+1)
#define SINITIAL(xh) xh+2 #define SINITIAL(xh) ((xh)+2)
#define SMEDIAL(ch) ch+3 #define SMEDIAL(ch) ((ch)+3)
typedef struct bidi_char { typedef struct bidi_char {
wchar_t origwc, wc; wchar_t origwc, wc;
@ -64,8 +64,7 @@ int do_bidi(bidi_char *line, int count);
void doMirror(wchar_t* ch); void doMirror(wchar_t* ch);
/* character types */ /* character types */
enum enum {
{
L, L,
LRE, LRE,
LRO, LRO,
@ -88,8 +87,7 @@ enum
}; };
/* Shaping Types */ /* Shaping Types */
enum enum {
{
SL, /* Left-Joining, doesnt exist in U+0600 - U+06FF */ SL, /* Left-Joining, doesnt exist in U+0600 - U+06FF */
SR, /* Right-Joining, ie has Isolated, Final */ SR, /* Right-Joining, ie has Isolated, Final */
SD, /* Dual-Joining, ie has Isolated, Final, Initial, Medial */ SD, /* Dual-Joining, ie has Isolated, Final, Initial, Medial */
@ -155,8 +153,7 @@ const shape_node shapetypes[] = {
/* /*
* This describes the data byte and its frequency * This describes the data byte and its frequency
*/ */
typedef struct typedef struct {
{
unsigned char d; unsigned char d;
unsigned char f; unsigned char f;
} RLENode; } RLENode;
@ -165,8 +162,7 @@ typedef struct
/* This is an array of RLENodes, which is the /* This is an array of RLENodes, which is the
* Compressed unicode types table * Compressed unicode types table
*/ */
const RLENode RLE_table[] = const RLENode RLE_table[] = {
{
{ BN, 9}, { S, 1}, { B, 1}, { S, 1}, { WS, 1}, { BN, 9}, { S, 1}, { B, 1}, { S, 1}, { WS, 1},
{ B, 1}, { BN, 14}, { B, 3}, { S, 1}, { WS, 1}, { B, 1}, { BN, 14}, { B, 3}, { S, 1}, { WS, 1},
{ ON, 2}, { ET, 3}, { ON, 5}, { ET, 1}, { CS, 1}, { ON, 2}, { ET, 3}, { ON, 5}, { ET, 1}, { CS, 1},