To: vim_dev@googlegroups.com Subject: Patch 8.0.1791 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1791 Problem: Using uint8_t does not work everywhere. Solution: Use char_u instead. Files: src/term.c, src/proto/term.pro, src/os_win32.c *** ../vim-8.0.1790/src/term.c 2018-05-01 17:30:37.332260582 +0200 --- src/term.c 2018-05-05 14:25:05.779213950 +0200 *************** *** 6981,6987 **** # define VTERM_ANSI_INDEX_NONE 0 # endif ! static uint8_t ansi_table[16][4] = { // R G B idx { 0, 0, 0, 1}, // black {224, 0, 0, 2}, // dark red --- 6981,6987 ---- # define VTERM_ANSI_INDEX_NONE 0 # endif ! static char_u ansi_table[16][4] = { // R G B idx { 0, 0, 0, 1}, // black {224, 0, 0, 2}, // dark red *************** *** 7003,7009 **** }; void ! cterm_color2rgb(int nr, uint8_t *r, uint8_t *g, uint8_t *b, uint8_t *ansi_idx) { int idx; --- 7003,7009 ---- }; void ! cterm_color2rgb(int nr, char_u *r, char_u *g, char_u *b, char_u *ansi_idx) { int idx; *** ../vim-8.0.1790/src/proto/term.pro 2018-05-01 15:47:30.300975408 +0200 --- src/proto/term.pro 2018-05-05 14:26:37.870640561 +0200 *************** *** 76,80 **** void swap_tcap(void); guicolor_T gui_get_color_cmn(char_u *name); guicolor_T gui_get_rgb_color_cmn(int r, int g, int b); ! void cterm_color2rgb(int nr, uint8_t *r, uint8_t *g, uint8_t *b, uint8_t *ansi_idx); /* vim: set ft=c : */ --- 76,80 ---- void swap_tcap(void); guicolor_T gui_get_color_cmn(char_u *name); guicolor_T gui_get_rgb_color_cmn(int r, int g, int b); ! void cterm_color2rgb(int nr, char_u *r, char_u *g, char_u *b, char_u *ansi_idx); /* vim: set ft=c : */ *** ../vim-8.0.1790/src/os_win32.c 2018-05-01 17:30:37.332260582 +0200 --- src/os_win32.c 2018-05-05 14:26:05.238843882 +0200 *************** *** 7661,7667 **** ctermtoxterm( int cterm) { ! uint8_t r, g, b, idx; cterm_color2rgb(cterm, &r, &g, &b, &idx); return (((int)r << 16) | ((int)g << 8) | (int)b); --- 7661,7667 ---- ctermtoxterm( int cterm) { ! char_u r, g, b, idx; cterm_color2rgb(cterm, &r, &g, &b, &idx); return (((int)r << 16) | ((int)g << 8) | (int)b); *** ../vim-8.0.1790/src/version.c 2018-05-04 20:15:34.266677525 +0200 --- src/version.c 2018-05-05 14:28:17.438019311 +0200 *************** *** 763,764 **** --- 763,766 ---- { /* Add new patch number below this line */ + /**/ + 1791, /**/ -- WOMAN: King of the who? ARTHUR: The Britons. WOMAN: Who are the Britons? ARTHUR: Well, we all are. we're all Britons and I am your king. The Quest for the Holy Grail (Monty Python) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///