diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mbyte.c | 15 | ||||
-rw-r--r-- | src/os_unix.c | 12 | ||||
-rw-r--r-- | src/proto/mbyte.pro | 1 | ||||
-rw-r--r-- | src/version.h | 4 |
4 files changed, 28 insertions, 4 deletions
diff --git a/src/mbyte.c b/src/mbyte.c index 2278de626..33c0fdf7a 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -2408,6 +2408,21 @@ utf_head_off(base, p) } /* + * Copy a character from "*fp" to "*tp" and advance the pointers. + */ + void +mb_copy_char(fp, tp) + char_u **fp; + char_u **tp; +{ + int l = (*mb_ptr2len_check)(*fp); + + mch_memmove(*tp, *fp, (size_t)l); + *tp += l; + *fp += l; +} + +/* * Return the offset from "p" to the first byte of a character. When "p" is * at the start of a character 0 is returned, otherwise the offset to the next * character. Can start anywhere in a stream of bytes. diff --git a/src/os_unix.c b/src/os_unix.c index 5e1b1546f..6186d9264 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -4724,7 +4724,7 @@ mch_expand_wildcards(num_pat, pat, num_file, file, flags) else buf = vim_strsave(*pat); expl_files = NULL; - has_wildcard = mch_has_exp_wildcard(buf); /* (still) wildcards in there? */ + has_wildcard = mch_has_exp_wildcard(buf); /* (still) wildcards? */ if (has_wildcard) /* yes, so expand them */ expl_files = (char_u **)_fnexplode(buf); @@ -5226,12 +5226,20 @@ save_patterns(num_pat, pat, num_file, file) char_u ***file; { int i; + char_u *s; *file = (char_u **)alloc(num_pat * sizeof(char_u *)); if (*file == NULL) return FAIL; for (i = 0; i < num_pat; i++) - (*file)[i] = vim_strsave(pat[i]); + { + s = vim_strsave(pat[i]); + if (s != NULL) + /* Be compatible with expand_filename(): halve the number of + * backslashes. */ + backslash_halve(s); + (*file)[i] = s; + } *num_file = num_pat; return OK; } diff --git a/src/proto/mbyte.pro b/src/proto/mbyte.pro index 88f14f4b8..11b64433f 100644 --- a/src/proto/mbyte.pro +++ b/src/proto/mbyte.pro @@ -45,6 +45,7 @@ int latin_head_off __ARGS((char_u *base, char_u *p)); int dbcs_head_off __ARGS((char_u *base, char_u *p)); int dbcs_screen_head_off __ARGS((char_u *base, char_u *p)); int utf_head_off __ARGS((char_u *base, char_u *p)); +void mb_copy_char __ARGS((char_u **fp, char_u **tp)); int mb_off_next __ARGS((char_u *base, char_u *p)); int mb_tail_off __ARGS((char_u *base, char_u *p)); int utf_valid_string __ARGS((char_u *s, char_u *end)); diff --git a/src/version.h b/src/version.h index 033ea70b8..c9a246dcf 100644 --- a/src/version.h +++ b/src/version.h @@ -36,5 +36,5 @@ #define VIM_VERSION_NODOT "vim70aa" #define VIM_VERSION_SHORT "7.0aa" #define VIM_VERSION_MEDIUM "7.0aa ALPHA" -#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2004 Jan 11)" -#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2004 Jan 11, compiled " +#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2004 Jan 14)" +#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2004 Jan 14, compiled " |