comparison src/regexp.c @ 359:6c62b9b939bd v7.0093

updated for version 7.0093
author vimboss
date Sat, 25 Jun 2005 23:04:51 +0000
parents 74e9d19831c2
children c60ba877860b
comparison
equal deleted inserted replaced
358:e111db373ca4 359:6c62b9b939bd
371 * When regcode is set to this value, code is not emitted and size is computed 371 * When regcode is set to this value, code is not emitted and size is computed
372 * instead. 372 * instead.
373 */ 373 */
374 #define JUST_CALC_SIZE ((char_u *) -1) 374 #define JUST_CALC_SIZE ((char_u *) -1)
375 375
376 static char_u *reg_prev_sub; 376 static char_u *reg_prev_sub = NULL;
377
378 #if defined(EXITFREE) || defined(PROTO)
379 void
380 free_regexp_stuff()
381 {
382 vim_free(reg_prev_sub);
383 }
384 #endif
377 385
378 /* 386 /*
379 * REGEXP_INRANGE contains all characters which are always special in a [] 387 * REGEXP_INRANGE contains all characters which are always special in a []
380 * range after '\'. 388 * range after '\'.
381 * REGEXP_ABBR contains all characters which act as abbreviations after '\'. 389 * REGEXP_ABBR contains all characters which act as abbreviations after '\'.
1698 ? "" : "\\", c); 1706 ? "" : "\\", c);
1699 EMSG_RET_NULL(IObuff); 1707 EMSG_RET_NULL(IObuff);
1700 /* NOTREACHED */ 1708 /* NOTREACHED */
1701 1709
1702 case Magic('~'): /* previous substitute pattern */ 1710 case Magic('~'): /* previous substitute pattern */
1703 if (reg_prev_sub) 1711 if (reg_prev_sub != NULL)
1704 { 1712 {
1705 char_u *lp; 1713 char_u *lp;
1706 1714
1707 ret = regnode(EXACTLY); 1715 ret = regnode(EXACTLY);
1708 lp = reg_prev_sub; 1716 lp = reg_prev_sub;