use a bit more Eina_Unicode

This commit is contained in:
Boris Faure 2014-03-25 21:34:48 +01:00
parent 12617004ee
commit 8f3258f1b3
4 changed files with 9 additions and 8 deletions

View File

@ -980,7 +980,7 @@ _handle_block_codepoint_overwrite_heavy(Termpty *ty, int oldc, int newc)
/* Try to trick the compiler into inlining the first test */
static inline void
_handle_block_codepoint_overwrite(Termpty *ty, int oldc, int newc)
_handle_block_codepoint_overwrite(Termpty *ty, Eina_Unicode oldc, Eina_Unicode newc)
{
if (!((oldc | newc) & 0x80000000)) return;
_handle_block_codepoint_overwrite_heavy(ty, oldc, newc);
@ -1050,7 +1050,8 @@ termpty_cell_fill(Termpty *ty, Termcell *src, Termcell *dst, int n)
}
void
termpty_cell_codepoint_att_fill(Termpty *ty, int codepoint, Termatt att, Termcell *dst, int n)
termpty_cell_codepoint_att_fill(Termpty *ty, Eina_Unicode codepoint,
Termatt att, Termcell *dst, int n)
{
Termcell local = { codepoint, att };
int i;

View File

@ -153,8 +153,8 @@ struct _Termpty
struct _Termcell
{
int codepoint;
Termatt att;
Eina_Unicode codepoint;
Termatt att;
};
struct _Termsave
@ -228,7 +228,7 @@ Termblock *termpty_block_chid_get(Termpty *ty, const char *chid);
void termpty_cell_copy(Termpty *ty, Termcell *src, Termcell *dst, int n);
void termpty_cell_fill(Termpty *ty, Termcell *src, Termcell *dst, int n);
void termpty_cell_codepoint_att_fill(Termpty *ty, int codepoint, Termatt att, Termcell *dst, int n);
void termpty_cell_codepoint_att_fill(Termpty *ty, Eina_Unicode codepoint, Termatt att, Termcell *dst, int n);
void termpty_screen_swap(Termpty *ty);
ssize_t termpty_line_length(const Termcell *cells, ssize_t nb_cells);

View File

@ -1,7 +1,7 @@
#include "utf8.h"
int
codepoint_to_utf8(int g, char *txt)
codepoint_to_utf8(Eina_Unicode g, char *txt)
{
if (g < (1 << (7)))
{ // 0xxxxxxx

View File

@ -1,6 +1,6 @@
#ifndef _UTF8_H__
#define _UTF8_H__ 1
int codepoint_to_utf8(int g, char *txt);
#include <Eina.h>
int codepoint_to_utf8(Eina_Unicode g, char *txt);
#endif