Ticket #1950: color.c.diff

File color.c.diff, 2.9 KB (added by pavlinux, 6 years ago)

FOR LATEST MASTER

  • lib/tty/color.c

    diff --git a/lib/tty/color.c b/lib/tty/color.c
    index 87fce30..1e610ae 100644
    a b tty_color_free_all (gboolean is_temp_color) 
    104104static gboolean 
    105105tty_color_get_next_cpn_cb (gpointer key, gpointer value, gpointer user_data) 
    106106{ 
    107     int cp; 
     107    ssize_t cp; 
    108108    tty_color_pair_t *mc_color_pair; 
    109109    (void) key; 
    110110 
    111     cp = (int) user_data; 
     111    cp = (ssize_t) user_data; 
    112112    mc_color_pair = (tty_color_pair_t *) value; 
    113113 
    114     if (cp == mc_color_pair->pair_index) 
     114    if (cp == (ssize_t)mc_color_pair->pair_index) 
    115115        return TRUE; 
    116116 
    117117    return FALSE; 
    tty_color_get_next_cpn_cb (gpointer key, gpointer value, gpointer user_data) 
    122122static int 
    123123tty_color_get_next__color_pair_number () 
    124124{ 
    125     int cp_count = g_hash_table_size (mc_tty_color__hashtable); 
    126     int cp = 0; 
     125    ssize_t cp_count = g_hash_table_size (mc_tty_color__hashtable); 
     126    ssize_t cp = 0; 
    127127 
    128128    for (cp = 0; cp < cp_count; cp++) { 
    129129        if (g_hash_table_find (mc_tty_color__hashtable, tty_color_get_next_cpn_cb, (gpointer) cp) == 
  • lib/tty/color.c

    diff --git a/lib/tty/color.c b/lib/tty/color.c
    index 87fce30..2bb935a 100644
    a b tty_color_free_condition_cb (gpointer key, gpointer value, gpointer user_data) 
    8585    tty_color_pair_t *mc_color_pair; 
    8686    (void) key; 
    8787 
    88     is_temp_color = (gboolean) user_data; 
     88    is_temp_color = (gssize) user_data; 
    8989    mc_color_pair = (tty_color_pair_t *) value; 
    9090    return (mc_color_pair->is_temp == is_temp_color); 
    9191} 
    tty_color_free_condition_cb (gpointer key, gpointer value, gpointer user_data) 
    9393/* --------------------------------------------------------------------------------------------- */ 
    9494 
    9595static void 
    96 tty_color_free_all (gboolean is_temp_color) 
     96tty_color_free_all (gssize is_temp_color) 
    9797{ 
    9898    g_hash_table_foreach_remove (mc_tty_color__hashtable, tty_color_free_condition_cb, 
    9999                                 (gpointer) is_temp_color); 
    tty_color_free_all (gboolean is_temp_color) 
    104104static gboolean 
    105105tty_color_get_next_cpn_cb (gpointer key, gpointer value, gpointer user_data) 
    106106{ 
    107     int cp; 
     107    ssize_t cp; 
    108108    tty_color_pair_t *mc_color_pair; 
    109109    (void) key; 
    110110 
    111     cp = (int) user_data; 
     111    cp = (ssize_t) user_data; 
    112112    mc_color_pair = (tty_color_pair_t *) value; 
    113113 
    114     if (cp == mc_color_pair->pair_index) 
     114    if (cp == (ssize_t)mc_color_pair->pair_index) 
    115115        return TRUE; 
    116116 
    117117    return FALSE; 
    tty_color_get_next_cpn_cb (gpointer key, gpointer value, gpointer user_data) 
    122122static int 
    123123tty_color_get_next__color_pair_number () 
    124124{ 
    125     int cp_count = g_hash_table_size (mc_tty_color__hashtable); 
    126     int cp = 0; 
     125    ssize_t cp_count = g_hash_table_size (mc_tty_color__hashtable); 
     126    ssize_t cp = 0; 
    127127 
    128128    for (cp = 0; cp < cp_count; cp++) { 
    129129        if (g_hash_table_find (mc_tty_color__hashtable, tty_color_get_next_cpn_cb, (gpointer) cp) ==