Mercurial > vim
comparison src/misc2.c @ 29:ac33b7c03fac v7.0018
updated for version 7.0018
author | vimboss |
---|---|
date | Mon, 11 Oct 2004 10:16:09 +0000 |
parents | 4ac1dce8dd5e |
children | 410fa1a31baf |
comparison
equal
deleted
inserted
replaced
28:726bdc53fa49 | 29:ac33b7c03fac |
---|---|
3732 wc_part = vim_strchr(path, '*'); | 3732 wc_part = vim_strchr(path, '*'); |
3733 if (wc_part != NULL) | 3733 if (wc_part != NULL) |
3734 { | 3734 { |
3735 int llevel; | 3735 int llevel; |
3736 int len; | 3736 int len; |
3737 char_u *errpt; | 3737 char *errpt; |
3738 | 3738 |
3739 /* save the fix part of the path */ | 3739 /* save the fix part of the path */ |
3740 ff_search_ctx->ffsc_fix_path = vim_strnsave(path, | 3740 ff_search_ctx->ffsc_fix_path = vim_strnsave(path, |
3741 (int)(wc_part - path)); | 3741 (int)(wc_part - path)); |
3742 | 3742 |
3756 if (STRNCMP(wc_part, "**", 2) == 0) | 3756 if (STRNCMP(wc_part, "**", 2) == 0) |
3757 { | 3757 { |
3758 ff_expand_buffer[len++] = *wc_part++; | 3758 ff_expand_buffer[len++] = *wc_part++; |
3759 ff_expand_buffer[len++] = *wc_part++; | 3759 ff_expand_buffer[len++] = *wc_part++; |
3760 | 3760 |
3761 llevel = strtol((char *)wc_part, (char **)&errpt, 10); | 3761 llevel = strtol((char *)wc_part, &errpt, 10); |
3762 if (errpt != wc_part && llevel > 0 && llevel < 255) | 3762 if ((char_u *)errpt != wc_part && llevel > 0 && llevel < 255) |
3763 ff_expand_buffer[len++] = llevel; | 3763 ff_expand_buffer[len++] = llevel; |
3764 else if (errpt != wc_part && llevel == 0) | 3764 else if ((char_u *)errpt != wc_part && llevel == 0) |
3765 /* restrict is 0 -> remove already added '**' */ | 3765 /* restrict is 0 -> remove already added '**' */ |
3766 len -= 2; | 3766 len -= 2; |
3767 else | 3767 else |
3768 ff_expand_buffer[len++] = FF_MAX_STAR_STAR_EXPAND; | 3768 ff_expand_buffer[len++] = FF_MAX_STAR_STAR_EXPAND; |
3769 wc_part = errpt; | 3769 wc_part = (char_u *)errpt; |
3770 if (*wc_part != PATHSEP && *wc_part != NUL) | 3770 if (*wc_part != PATHSEP && *wc_part != NUL) |
3771 { | 3771 { |
3772 EMSG2(_("E343: Invalid path: '**[number]' must be at the end of the path or be followed by '%s'."), PATHSEPSTR); | 3772 EMSG2(_("E343: Invalid path: '**[number]' must be at the end of the path or be followed by '%s'."), PATHSEPSTR); |
3773 goto error_return; | 3773 goto error_return; |
3774 } | 3774 } |