To: vim-dev@vim.org Subject: Patch 6.1.271 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.271 Problem: When compiling without the +syntax feature there are errors. Solution: Don't use some code for syntax highlighting. (Roger Cornelius) Make test 45 work without syntax highlighting. Also fix an error in a pattern matching: "\%(" was not supported. Files: src/ex_cmds2.c, src/regexp.c, src/testdir/test45.in *** ../vim61.270/src/ex_cmds2.c Sun Oct 27 14:38:00 2002 --- src/ex_cmds2.c Fri Jan 3 22:16:57 2003 *************** *** 2618,2625 **** --- 2618,2627 ---- long_u bytes_printed; /* bytes printed so far */ } prt_pos_T; + #ifdef FEAT_SYN_HL static long_u darken_rgb __ARGS((long_u rgb)); static long_u prt_get_term_color __ARGS((int colorindex)); + #endif static void prt_set_fg __ARGS((long_u fg)); static void prt_set_bg __ARGS((long_u bg)); static void prt_set_font __ARGS((int bold, int italic, int underline)); *************** *** 2628,2633 **** --- 2630,2636 ---- static void prt_message __ARGS((char_u *s)); static colnr_T hardcopy_line __ARGS((prt_settings_T *psettings, int page_line, prt_pos_T *ppos)); + #ifdef FEAT_SYN_HL /* * If using a dark background, the colors will probably be too bright to show * up well on white paper, so reduce their brightness. *************** *** 2650,2655 **** --- 2653,2659 ---- return cterm_color_16[colorindex % 16]; return cterm_color_8[colorindex % 8]; } + #endif static void prt_set_fg(fg) *************** *** 3116,3128 **** char_u *line; int need_break = FALSE; int outputlen; int colorindex; char *color; int id; - int tab_spaces; - long_u print_pos; long_u this_color; - #ifdef FEAT_SYN_HL char modec; #endif --- 3120,3132 ---- char_u *line; int need_break = FALSE; int outputlen; + int tab_spaces; + long_u print_pos; + #ifdef FEAT_SYN_HL int colorindex; char *color; int id; long_u this_color; char modec; #endif *************** *** 4300,4306 **** resource[0] = PRT_RESOURCE_ENCODING; prt_dsc_resources(NULL, "encoding", 1, resource); prt_dsc_requirements(prt_duplex, prt_tumble, prt_collate, ! psettings->do_syntax, prt_num_copies); prt_dsc_noarg("EndComments"); /* --- 4304,4315 ---- resource[0] = PRT_RESOURCE_ENCODING; prt_dsc_resources(NULL, "encoding", 1, resource); prt_dsc_requirements(prt_duplex, prt_tumble, prt_collate, ! #ifdef FEAT_SYN_HL ! psettings->do_syntax ! #else ! 0 ! #endif ! , prt_num_copies); prt_dsc_noarg("EndComments"); /* *** ../vim61.270/src/regexp.c Sun Oct 13 20:08:14 2002 --- src/regexp.c Fri Jan 3 22:44:23 2003 *************** *** 1593,1598 **** --- 1593,1599 ---- } } break; + #endif case Magic('%'): { *************** *** 1718,1724 **** } } break; - #endif case Magic('['): collection: --- 1719,1724 ---- *** ../vim61.270/src/testdir/test45.in Sat Sep 8 13:52:31 2001 --- src/testdir/test45.in Fri Jan 3 22:21:30 2003 *************** *** 2,7 **** --- 2,13 ---- STARTTEST :so small.vim + :" We also need the +syntax feature here. + :if !has("syntax") + e! test.ok + w! test.out + qa! + :endif :" basic test if a fold can be created, opened, moving to the end and closed /^1 zf2j:call append("$", "manual " . getline(foldclosed("."))) *** ../vim61.270/src/version.c Thu Jan 2 21:33:00 2003 --- src/version.c Fri Jan 3 22:16:28 2003 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 271, /**/ -- "Intelligence has much less practical application than you'd think." -- Scott Adams, Dilbert. /// 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 /// \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///