To: vim-dev@vim.org Subject: Patch 6.2f.019 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2f.019 Problem: Mac OS X 10.2: COLOR_BLACK and COLOR_WHITE are defined in curses.h. Solution: Rename them to PRCOLOR_BLACK and PRCOLOR_WHITE. Files: src/ex_cmds2.c *** ../vim-6.2f.018/src/ex_cmds2.c Mon May 26 22:15:05 2003 --- src/ex_cmds2.c Thu May 29 11:26:29 2003 *************** *** 2809,2816 **** static int current_syn_id; #endif ! #define COLOR_BLACK (long_u)0 ! #define COLOR_WHITE (long_u)0xFFFFFFL static int curr_italic; static int curr_bold; --- 2809,2816 ---- static int current_syn_id; #endif ! #define PRCOLOR_BLACK (long_u)0 ! #define PRCOLOR_WHITE (long_u)0xFFFFFFL static int curr_italic; static int curr_bold; *************** *** 2888,2902 **** if (gui.in_use) { bg_color = highlight_gui_color_rgb(hl_id, FALSE); ! if (bg_color == COLOR_BLACK) ! bg_color = COLOR_WHITE; fg_color = highlight_gui_color_rgb(hl_id, TRUE); } else # endif { ! bg_color = COLOR_WHITE; color = (char *)highlight_color(hl_id, (char_u *)"fg", modec); if (color == NULL) --- 2888,2902 ---- if (gui.in_use) { bg_color = highlight_gui_color_rgb(hl_id, FALSE); ! if (bg_color == PRCOLOR_BLACK) ! bg_color = PRCOLOR_WHITE; fg_color = highlight_gui_color_rgb(hl_id, TRUE); } else # endif { ! bg_color = PRCOLOR_WHITE; color = (char *)highlight_color(hl_id, (char_u *)"fg", modec); if (color == NULL) *************** *** 2907,2917 **** if (colorindex >= 0 && colorindex < t_colors) fg_color = prt_get_term_color(colorindex); else ! fg_color = COLOR_BLACK; } ! if (fg_color == COLOR_WHITE) ! fg_color = COLOR_BLACK; else if (*p_bg == 'd') fg_color = darken_rgb(fg_color); --- 2907,2917 ---- if (colorindex >= 0 && colorindex < t_colors) fg_color = prt_get_term_color(colorindex); else ! fg_color = PRCOLOR_BLACK; } ! if (fg_color == PRCOLOR_WHITE) ! fg_color = PRCOLOR_BLACK; else if (*p_bg == 'd') fg_color = darken_rgb(fg_color); *************** *** 2990,2997 **** #endif { /* Set colors and font back to normal. */ ! prt_set_fg(COLOR_BLACK); ! prt_set_bg(COLOR_WHITE); prt_set_font(FALSE, FALSE, FALSE); } } --- 2990,2997 ---- #endif { /* Set colors and font back to normal. */ ! prt_set_fg(PRCOLOR_BLACK); ! prt_set_bg(PRCOLOR_WHITE); prt_set_font(FALSE, FALSE, FALSE); } } *************** *** 3104,3111 **** #endif sprintf((char *)tbuf, _("Page %d"), pagenum); ! prt_set_fg(COLOR_BLACK); ! prt_set_bg(COLOR_WHITE); prt_set_font(TRUE, FALSE, FALSE); /* Use a negative line number to indicate printing in the top margin. */ --- 3104,3111 ---- #endif sprintf((char *)tbuf, _("Page %d"), pagenum); ! prt_set_fg(PRCOLOR_BLACK); ! prt_set_bg(PRCOLOR_WHITE); prt_set_font(TRUE, FALSE, FALSE); /* Use a negative line number to indicate printing in the top margin. */ *************** *** 3143,3150 **** #endif { /* Set colors and font back to normal. */ ! prt_set_fg(COLOR_BLACK); ! prt_set_bg(COLOR_WHITE); prt_set_font(FALSE, FALSE, FALSE); } } --- 3143,3150 ---- #endif { /* Set colors and font back to normal. */ ! prt_set_fg(PRCOLOR_BLACK); ! prt_set_bg(PRCOLOR_WHITE); prt_set_font(FALSE, FALSE, FALSE); } } *************** *** 3232,3239 **** #endif /* Set up printing attributes for line numbers */ ! settings.number.fg_color = COLOR_BLACK; ! settings.number.bg_color = COLOR_WHITE; settings.number.bold = FALSE; settings.number.italic = TRUE; settings.number.underline = FALSE; --- 3232,3239 ---- #endif /* Set up printing attributes for line numbers */ ! settings.number.fg_color = PRCOLOR_BLACK; ! settings.number.bg_color = PRCOLOR_WHITE; settings.number.bold = FALSE; settings.number.italic = TRUE; settings.number.underline = FALSE; *************** *** 3269,3276 **** curr_bold = MAYBE; curr_underline = MAYBE; ! prt_set_fg(COLOR_BLACK); ! prt_set_bg(COLOR_WHITE); prt_set_font(FALSE, FALSE, FALSE); #ifdef FEAT_SYN_HL current_syn_id = -1; --- 3269,3276 ---- curr_bold = MAYBE; curr_underline = MAYBE; ! prt_set_fg(PRCOLOR_BLACK); ! prt_set_bg(PRCOLOR_WHITE); prt_set_font(FALSE, FALSE, FALSE); #ifdef FEAT_SYN_HL current_syn_id = -1; *************** *** 3934,3940 **** if (prt_ps_buffer.ga_len > 0) { /* Any background color must be drawn first */ ! if (prt_do_bgcol && (prt_new_bgcol != COLOR_WHITE)) { int r, g, b; --- 3934,3940 ---- if (prt_ps_buffer.ga_len > 0) { /* Any background color must be drawn first */ ! if (prt_do_bgcol && (prt_new_bgcol != PRCOLOR_WHITE)) { int r, g, b; *************** *** 5002,5009 **** prt_dsc_noarg("BeginPageSetup"); prt_write_string("sv\n0 g\nF0 sf\n"); ! prt_fgcol = COLOR_BLACK; ! prt_bgcol = COLOR_WHITE; prt_font = PRT_PS_FONT_ROMAN; /* Set up page transformation for landscape printing. */ --- 5002,5009 ---- prt_dsc_noarg("BeginPageSetup"); prt_write_string("sv\n0 g\nF0 sf\n"); ! prt_fgcol = PRCOLOR_BLACK; ! prt_bgcol = PRCOLOR_WHITE; prt_font = PRT_PS_FONT_ROMAN; /* Set up page transformation for landscape printing. */ *************** *** 5103,5109 **** prt_need_fgcol = FALSE; } ! if (prt_bgcol != COLOR_WHITE) { prt_new_bgcol = prt_bgcol; if (prt_need_bgcol) --- 5103,5109 ---- prt_need_fgcol = FALSE; } ! if (prt_bgcol != PRCOLOR_WHITE) { prt_new_bgcol = prt_bgcol; if (prt_need_bgcol) *** ../vim-6.2f.018/src/version.c Thu May 29 13:45:04 2003 --- src/version.c Thu May 29 13:47:36 2003 *************** *** 632,633 **** --- 632,635 ---- { /* Add new patch number below this line */ + /**/ + 19, /**/ -- Q: What is the difference betwee open-source and commercial software? A: If you have a problem with commercial software you can call a phone number and they will tell you it might be solved in a future version. For open-source sofware there isn't a phone number to call, but you get the solution within a day. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///