Mercurial > vim
diff src/ex_cmds.c @ 9:4102fb4ea781 v7.0002
updated for version 7.0002
author | vimboss |
---|---|
date | Sun, 20 Jun 2004 12:51:53 +0000 |
parents | 3fc0f57ecb91 |
children | 24d5189d3956 |
line wrap: on
line diff
--- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -4573,7 +4573,7 @@ ex_help(eap) buf_T *buf; #ifdef FEAT_MULTI_LANG int len; - char_u *lang = NULL; + char_u *lang; #endif if (eap != NULL) @@ -4613,13 +4613,7 @@ ex_help(eap) #ifdef FEAT_MULTI_LANG /* Check for a specified language */ - len = STRLEN(arg); - if (len >= 3 && arg[len - 3] == '@' && ASCII_ISALPHA(arg[len - 2]) - && ASCII_ISALPHA(arg[len - 1])) - { - lang = arg + len - 2; - lang[-1] = NUL; /* remove the '@' */ - } + lang = check_help_lang(arg); #endif /* When no argument given go to the index. */ @@ -4748,6 +4742,28 @@ erret: } +#if defined(FEAT_MULTI_LANG) || defined(PROTO) +/* + * In an argument search for a language specifiers in the form "@xx". + * Changes the "@" to NUL if found, and returns a pointer to "xx". + * Returns NULL if not found. + */ + char_u * +check_help_lang(arg) + char_u *arg; +{ + int len = STRLEN(arg); + + if (len >= 3 && arg[len - 3] == '@' && ASCII_ISALPHA(arg[len - 2]) + && ASCII_ISALPHA(arg[len - 1])) + { + arg[len - 3] = NUL; /* remove the '@' */ + return arg + len - 2; + } + return NULL; +} +#endif + /* * Return a heuristic indicating how well the given string matches. The * smaller the number, the better the match. This is the order of priorities, @@ -5180,7 +5196,9 @@ ex_helptags(eap) garray_T ga; int i, j; int len; +#ifdef FEAT_MULTI_LANG char_u lang[2]; +#endif char_u ext[5]; char_u fname[8]; int filecount;