To: vim-dev@vim.org Subject: Patch 5.6a.009 Fcc: outbox From: Bram Moolenaar ------------ Patch 5.6a.009 Problem: When compiling with +extra_search but without +syntax, there is a compilation error in screen.c. (Axel Kielhorn) Solution: Adjust the #ifdef for declaring and initializing "line" in win_line(). Also solve compilation problem when +statusline is used without +eval. Another one when +cmdline_compl is used without +eval. Files: src/screen.c, src/misc2.c *** ../vim-5.6a.8/src/screen.c Mon Dec 20 09:59:07 1999 --- src/screen.c Thu Dec 23 10:49:03 1999 *************** *** 1068,1074 **** int row; /* row in the window, excl w_winpos */ int screen_row; /* row on the screen, incl w_winpos */ char_u *ptr; ! #ifdef SYNTAX_HL char_u *line; #endif char_u extra[16]; /* "%ld" must fit in here */ --- 1068,1074 ---- int row; /* row in the window, excl w_winpos */ int screen_row; /* row on the screen, incl w_winpos */ char_u *ptr; ! #if defined(SYNTAX_HL) || defined(EXTRA_SEARCH) char_u *line; #endif char_u extra[16]; /* "%ld" must fit in here */ *************** *** 1251,1258 **** #ifdef EXTRA_SEARCH matchp = ptr; #endif ! #ifdef SYNTAX_HL line = ptr; rcol = 0; #endif #ifdef MULTI_BYTE --- 1251,1260 ---- #ifdef EXTRA_SEARCH matchp = ptr; #endif ! #if defined(SYNTAX_HL) || defined(EXTRA_SEARCH) line = ptr; + #endif + #ifdef SYNTAX_HL rcol = 0; #endif #ifdef MULTI_BYTE *************** *** 2570,2577 **** --- 2572,2581 ---- char_u *s; char_u *t; char_u *linecont; + #ifdef WANT_EVAL WIN *o_curwin; BUF *o_curbuf; + #endif int empty_line; colnr_t virtcol; long l; *************** *** 2795,2808 **** break; case STL_VIM_EXPR: /* '{' */ - sprintf((char *) tmp, "%d", curbuf->b_fnum); - set_internal_string_var((char_u *)"actual_curbuf", tmp); - - o_curbuf = curbuf; - o_curwin = curwin; - curwin = wp; - curbuf = wp->w_buffer; - itemisflag = TRUE; t = p; while (*s != '}') --- 2799,2804 ---- *************** *** 2810,2817 **** --- 2806,2824 ---- s++; *p = 0; p = t; + + #ifdef WANT_EVAL if (RedrawingDisabled) break; /* Might be executing a function */ + + sprintf((char *)tmp, "%d", curbuf->b_fnum); + set_internal_string_var((char_u *)"actual_curbuf", tmp); + + o_curbuf = curbuf; + o_curwin = curwin; + curwin = wp; + curbuf = wp->w_buffer; + str = eval_to_string(p, &t); if (str != NULL && *str != 0) { *************** *** 2832,2837 **** --- 2839,2845 ---- curbuf = o_curbuf; STRCPY(tmp, "g:actual_curbuf"); do_unlet(tmp, TRUE); + #endif break; case STL_LINE: *** ../vim-5.6a.8/src/misc2.c Mon Dec 20 09:59:10 1999 --- src/misc2.c Thu Dec 23 10:50:18 1999 *************** *** 1167,1173 **** return OK; } ! #if defined(WANT_EVAL) || defined(PROTO) /* * Concatenate a string to a growarray which contains characters. * Note: Does NOT copy the NUL at the end! --- 1167,1173 ---- return OK; } ! #if defined(WANT_EVAL) || defined(CMDLINE_COMPL) || defined(PROTO) /* * Concatenate a string to a growarray which contains characters. * Note: Does NOT copy the NUL at the end! *** ../vim-5.6a.8/src/version.c Thu Dec 23 10:31:26 1999 --- src/version.c Thu Dec 23 10:30:55 1999 *************** *** 420,421 **** --- 420,423 ---- { /* Add new patch number below this line */ + /**/ + 9, /**/ -- We apologise again for the fault in the subtitles. Those responsible for sacking the people who have just been sacked have been sacked. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\-- \ \ www.vim.org/iccf www.moolenaar.net www.vim.org / /