Make char and string width grub_size_t rather than grub_ssize_t.

This commit is contained in:
Vladimir Serbinenko 2013-10-25 23:58:24 +02:00
parent 0a7e52b2ed
commit a28567364a
9 changed files with 22 additions and 18 deletions

View file

@ -104,9 +104,9 @@ grub_ucs4_count_lines (const grub_uint32_t * str,
const grub_uint32_t * last_position,
int margin_left, int margin_right,
struct grub_term_output *term);
grub_ssize_t grub_getstringwidth (grub_uint32_t * str,
const grub_uint32_t * last_position,
struct grub_term_output *term);
grub_size_t grub_getstringwidth (grub_uint32_t * str,
const grub_uint32_t * last_position,
struct grub_term_output *term);
void grub_print_message_indented (const char *msg, int margin_left,
int margin_right,
struct grub_term_output *term);

View file

@ -187,8 +187,8 @@ struct grub_term_output
/* Get the number of columns occupied by a given character C. C is
encoded in Unicode. */
grub_ssize_t (*getcharwidth) (struct grub_term_output *term,
const struct grub_unicode_glyph *c);
grub_size_t (*getcharwidth) (struct grub_term_output *term,
const struct grub_unicode_glyph *c);
/* Get the screen size. */
struct grub_term_coordinate (*getwh) (struct grub_term_output *term);
@ -400,7 +400,7 @@ grub_term_cls (struct grub_term_output *term)
#ifdef HAVE_UNIFONT_WIDTHSPEC
grub_ssize_t
grub_size_t
grub_unicode_estimate_width (const struct grub_unicode_glyph *c);
#else
@ -417,7 +417,7 @@ grub_unicode_estimate_width (const struct grub_unicode_glyph *c __attribute__ ((
#define GRUB_TERM_TAB_WIDTH 8
static inline grub_ssize_t
static inline grub_size_t
grub_term_getcharwidth (struct grub_term_output *term,
const struct grub_unicode_glyph *c)
{

View file

@ -253,7 +253,7 @@ grub_ssize_t
grub_bidi_logical_to_visual (const grub_uint32_t *logical,
grub_size_t logical_len,
struct grub_unicode_glyph **visual_out,
grub_ssize_t (*getcharwidth) (const struct grub_unicode_glyph *visual, void *getcharwidth_arg),
grub_size_t (*getcharwidth) (const struct grub_unicode_glyph *visual, void *getcharwidth_arg),
void *getcharwidth_arg,
grub_size_t max_width,
grub_size_t start_width, grub_uint32_t codechar,