It's used only in readclause.c TODO: Rename so the meaning of the function is easier to understand.master
@@ -464,6 +464,21 @@ static void RemoveChar(char *p) | |||
memset(p, ' ', utf8_in(&c, p)); | |||
} | |||
static int lookupwchar2(const unsigned short *list, int c) | |||
{ | |||
// Replace character c by another character. | |||
// Returns 0 = not found, 1 = delete character | |||
int ix; | |||
for (ix = 0; list[ix] != 0; ix += 2) { | |||
if (list[ix] == c) | |||
return list[ix+1]; | |||
} | |||
return 0; | |||
} | |||
int ReadClause(Translator *tr, char *buf, short *charix, int *charix_top, int n_buf, int *tone_type, char *voice_change) | |||
{ | |||
/* Find the end of the current clause. |
@@ -232,20 +232,6 @@ int lookupwchar(const unsigned short *list, int c) | |||
return 0; | |||
} | |||
int lookupwchar2(const unsigned short *list, int c) | |||
{ | |||
// Replace character c by another character. | |||
// Returns 0 = not found, 1 = delete character | |||
int ix; | |||
for (ix = 0; list[ix] != 0; ix += 2) { | |||
if (list[ix] == c) | |||
return list[ix+1]; | |||
} | |||
return 0; | |||
} | |||
int IsBracket(int c) | |||
{ | |||
if ((c >= 0x2014) && (c <= 0x201f)) |
@@ -667,7 +667,6 @@ int utf8_out(unsigned int c, char *buf); | |||
int utf8_nbytes(const char *buf); | |||
int lookupwchar(const unsigned short *list, int c); | |||
int lookupwchar2(const unsigned short *list, int c); | |||
char *strchr_w(const char *s, int c); | |||
int IsBracket(int c); | |||
void InitNamedata(void); |