1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

minibidi.c: include putty.h and fix clashes.

The bidi_char structure was declared twice, with nothing to keep them
in sync; also, is_rtl had a mismatch of return types.
This commit is contained in:
Simon Tatham 2019-02-25 20:30:38 +00:00
parent ca90a36bcd
commit 8edfc767a3

View File

@ -23,6 +23,7 @@
#include <stdlib.h> /* definition of wchar_t*/
#include "putty.h"
#include "misc.h"
#define LMASK 0x3F /* Embedding Level mask */
@ -49,11 +50,6 @@ shapetypes[(xh)-SHAPE_FIRST].type : SU) /*))*/
#define leastGreaterOdd(x) ( ((x)+1) | 1 )
#define leastGreaterEven(x) ( ((x)+2) &~ 1 )
typedef struct bidi_char {
unsigned int origwc, wc;
unsigned short index;
} bidi_char;
/* function declarations */
static void flipThisRun(
bidi_char *from, unsigned char *level, int max, int count);
@ -1027,7 +1023,7 @@ static unsigned char getType(int ch)
* important because all such characters are right-to-left so it
* would have flagged them anyway.)
*/
int is_rtl(int c)
bool is_rtl(int c)
{
/*
* After careful reading of the Unicode bidi algorithm (URL as