diff options
author | Bram Moolenaar <Bram@vim.org> | 2004-06-20 12:51:53 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2004-06-20 12:51:53 +0000 |
commit | 69a7cb473ceae109b61fae9aa04ee0c29afba5d9 (patch) | |
tree | 04bd3292cc6c2317842d7a46ae3ab11e9956ed99 /src/ex_cmds.c | |
parent | ed20346f0b81d1d89c22c9616abe8e47b4c17f08 (diff) |
updated for version 7.0002v7.0002
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index e6036ca342..ad612cd706 100644 --- 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; |