|
Karsten Hopp |
271384 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
271384 |
Subject: Patch 7.3.198
|
|
Karsten Hopp |
271384 |
Fcc: outbox
|
|
Karsten Hopp |
271384 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
271384 |
Mime-Version: 1.0
|
|
Karsten Hopp |
271384 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
271384 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
271384 |
------------
|
|
Karsten Hopp |
271384 |
|
|
Karsten Hopp |
271384 |
Patch 7.3.198
|
|
Karsten Hopp |
271384 |
Problem: No completion for ":lang".
|
|
Karsten Hopp |
271384 |
Solution: Get locales to complete from. (Dominique Pelle)
|
|
Karsten Hopp |
271384 |
Files: src/eval.c, src/ex_cmds2.c, src/ex_getln.c,
|
|
Karsten Hopp |
271384 |
src/proto/ex_cmds2.pro, src/proto/ex_getln.pro, src/vim.h
|
|
Karsten Hopp |
271384 |
|
|
Karsten Hopp |
271384 |
|
|
Karsten Hopp |
271384 |
*** ../mercurial/vim73/src/eval.c 2011-05-19 17:25:36.000000000 +0200
|
|
Karsten Hopp |
271384 |
--- src/eval.c 2011-05-19 17:52:02.000000000 +0200
|
|
Karsten Hopp |
271384 |
***************
|
|
Karsten Hopp |
271384 |
*** 911,916 ****
|
|
Karsten Hopp |
271384 |
--- 911,917 ----
|
|
Karsten Hopp |
271384 |
hash_clear(&compat_hashtab);
|
|
Karsten Hopp |
271384 |
|
|
Karsten Hopp |
271384 |
free_scriptnames();
|
|
Karsten Hopp |
271384 |
+ free_locales();
|
|
Karsten Hopp |
271384 |
|
|
Karsten Hopp |
271384 |
/* global variables */
|
|
Karsten Hopp |
271384 |
vars_clear(&globvarht);
|
|
Karsten Hopp |
271384 |
*** ../mercurial/vim73/src/ex_cmds2.c 2011-05-10 16:41:13.000000000 +0200
|
|
Karsten Hopp |
271384 |
--- src/ex_cmds2.c 2011-05-19 18:16:54.000000000 +0200
|
|
Karsten Hopp |
271384 |
***************
|
|
Karsten Hopp |
271384 |
*** 1476,1482 ****
|
|
Karsten Hopp |
271384 |
#endif
|
|
Karsten Hopp |
271384 |
|
|
Karsten Hopp |
271384 |
/*
|
|
Karsten Hopp |
271384 |
! * Ask the user what to do when abondoning a changed buffer.
|
|
Karsten Hopp |
271384 |
* Must check 'write' option first!
|
|
Karsten Hopp |
271384 |
*/
|
|
Karsten Hopp |
271384 |
void
|
|
Karsten Hopp |
271384 |
--- 1476,1482 ----
|
|
Karsten Hopp |
271384 |
#endif
|
|
Karsten Hopp |
271384 |
|
|
Karsten Hopp |
271384 |
/*
|
|
Karsten Hopp |
271384 |
! * Ask the user what to do when abandoning a changed buffer.
|
|
Karsten Hopp |
271384 |
* Must check 'write' option first!
|
|
Karsten Hopp |
271384 |
*/
|
|
Karsten Hopp |
271384 |
void
|
|
Karsten Hopp |
271384 |
***************
|
|
Karsten Hopp |
271384 |
*** 4153,4158 ****
|
|
Karsten Hopp |
271384 |
--- 4153,4234 ----
|
|
Karsten Hopp |
271384 |
}
|
|
Karsten Hopp |
271384 |
|
|
Karsten Hopp |
271384 |
# if defined(FEAT_CMDL_COMPL) || defined(PROTO)
|
|
Karsten Hopp |
271384 |
+
|
|
Karsten Hopp |
271384 |
+ static char_u **locales = NULL; /* Array of all available locales */
|
|
Karsten Hopp |
271384 |
+ static int did_init_locales = FALSE;
|
|
Karsten Hopp |
271384 |
+
|
|
Karsten Hopp |
271384 |
+ static void init_locales __ARGS((void));
|
|
Karsten Hopp |
271384 |
+ static char_u **find_locales __ARGS((void));
|
|
Karsten Hopp |
271384 |
+
|
|
Karsten Hopp |
271384 |
+ /*
|
|
Karsten Hopp |
271384 |
+ * Lazy initialization of all available locales.
|
|
Karsten Hopp |
271384 |
+ */
|
|
Karsten Hopp |
271384 |
+ static void
|
|
Karsten Hopp |
271384 |
+ init_locales()
|
|
Karsten Hopp |
271384 |
+ {
|
|
Karsten Hopp |
271384 |
+ if (!did_init_locales)
|
|
Karsten Hopp |
271384 |
+ {
|
|
Karsten Hopp |
271384 |
+ did_init_locales = TRUE;
|
|
Karsten Hopp |
271384 |
+ locales = find_locales();
|
|
Karsten Hopp |
271384 |
+ }
|
|
Karsten Hopp |
271384 |
+ }
|
|
Karsten Hopp |
271384 |
+
|
|
Karsten Hopp |
271384 |
+ /* Return an array of strings for all available locales + NULL for the
|
|
Karsten Hopp |
271384 |
+ * last element. Return NULL in case of error. */
|
|
Karsten Hopp |
271384 |
+ static char_u **
|
|
Karsten Hopp |
271384 |
+ find_locales()
|
|
Karsten Hopp |
271384 |
+ {
|
|
Karsten Hopp |
271384 |
+ garray_T locales_ga;
|
|
Karsten Hopp |
271384 |
+ char_u *loc;
|
|
Karsten Hopp |
271384 |
+
|
|
Karsten Hopp |
271384 |
+ /* Find all available locales by running command "locale -a". If this
|
|
Karsten Hopp |
271384 |
+ * doesn't work we won't have completion. */
|
|
Karsten Hopp |
271384 |
+ char_u *locale_a = get_cmd_output((char_u *)"locale -a",
|
|
Karsten Hopp |
271384 |
+ NULL, SHELL_SILENT);
|
|
Karsten Hopp |
271384 |
+ if (locale_a == NULL)
|
|
Karsten Hopp |
271384 |
+ return NULL;
|
|
Karsten Hopp |
271384 |
+ ga_init2(&locales_ga, sizeof(char_u *), 20);
|
|
Karsten Hopp |
271384 |
+
|
|
Karsten Hopp |
271384 |
+ /* Transform locale_a string where each locale is separated by "\n"
|
|
Karsten Hopp |
271384 |
+ * into an array of locale strings. */
|
|
Karsten Hopp |
271384 |
+ loc = (char_u *)strtok((char *)locale_a, "\n");
|
|
Karsten Hopp |
271384 |
+
|
|
Karsten Hopp |
271384 |
+ while (loc != NULL)
|
|
Karsten Hopp |
271384 |
+ {
|
|
Karsten Hopp |
271384 |
+ if (ga_grow(&locales_ga, 1) == FAIL)
|
|
Karsten Hopp |
271384 |
+ break;
|
|
Karsten Hopp |
271384 |
+ loc = vim_strsave(loc);
|
|
Karsten Hopp |
271384 |
+ if (loc == NULL)
|
|
Karsten Hopp |
271384 |
+ break;
|
|
Karsten Hopp |
271384 |
+
|
|
Karsten Hopp |
271384 |
+ ((char_u **)locales_ga.ga_data)[locales_ga.ga_len++] = loc;
|
|
Karsten Hopp |
271384 |
+ loc = (char_u *)strtok(NULL, "\n");
|
|
Karsten Hopp |
271384 |
+ }
|
|
Karsten Hopp |
271384 |
+ vim_free(locale_a);
|
|
Karsten Hopp |
271384 |
+ if (ga_grow(&locales_ga, 1) == FAIL)
|
|
Karsten Hopp |
271384 |
+ {
|
|
Karsten Hopp |
271384 |
+ ga_clear(&locales_ga);
|
|
Karsten Hopp |
271384 |
+ return NULL;
|
|
Karsten Hopp |
271384 |
+ }
|
|
Karsten Hopp |
271384 |
+ ((char_u **)locales_ga.ga_data)[locales_ga.ga_len] = NULL;
|
|
Karsten Hopp |
271384 |
+ return (char_u **)locales_ga.ga_data;
|
|
Karsten Hopp |
271384 |
+ }
|
|
Karsten Hopp |
271384 |
+
|
|
Karsten Hopp |
271384 |
+ # if defined(EXITFREE) || defined(PROTO)
|
|
Karsten Hopp |
271384 |
+ void
|
|
Karsten Hopp |
271384 |
+ free_locales()
|
|
Karsten Hopp |
271384 |
+ {
|
|
Karsten Hopp |
271384 |
+ int i;
|
|
Karsten Hopp |
271384 |
+ if (locales != NULL)
|
|
Karsten Hopp |
271384 |
+ {
|
|
Karsten Hopp |
271384 |
+ for (i = 0; locales[i] != NULL; i++)
|
|
Karsten Hopp |
271384 |
+ vim_free(locales[i]);
|
|
Karsten Hopp |
271384 |
+ vim_free(locales);
|
|
Karsten Hopp |
271384 |
+ locales = NULL;
|
|
Karsten Hopp |
271384 |
+ }
|
|
Karsten Hopp |
271384 |
+ }
|
|
Karsten Hopp |
271384 |
+ # endif
|
|
Karsten Hopp |
271384 |
+
|
|
Karsten Hopp |
271384 |
/*
|
|
Karsten Hopp |
271384 |
* Function given to ExpandGeneric() to obtain the possible arguments of the
|
|
Karsten Hopp |
271384 |
* ":language" command.
|
|
Karsten Hopp |
271384 |
***************
|
|
Karsten Hopp |
271384 |
*** 4168,4174 ****
|
|
Karsten Hopp |
271384 |
return (char_u *)"ctype";
|
|
Karsten Hopp |
271384 |
if (idx == 2)
|
|
Karsten Hopp |
271384 |
return (char_u *)"time";
|
|
Karsten Hopp |
271384 |
! return NULL;
|
|
Karsten Hopp |
271384 |
}
|
|
Karsten Hopp |
271384 |
# endif
|
|
Karsten Hopp |
271384 |
|
|
Karsten Hopp |
271384 |
--- 4244,4268 ----
|
|
Karsten Hopp |
271384 |
return (char_u *)"ctype";
|
|
Karsten Hopp |
271384 |
if (idx == 2)
|
|
Karsten Hopp |
271384 |
return (char_u *)"time";
|
|
Karsten Hopp |
271384 |
!
|
|
Karsten Hopp |
271384 |
! init_locales();
|
|
Karsten Hopp |
271384 |
! if (locales == NULL)
|
|
Karsten Hopp |
271384 |
! return NULL;
|
|
Karsten Hopp |
271384 |
! return locales[idx - 3];
|
|
Karsten Hopp |
271384 |
! }
|
|
Karsten Hopp |
271384 |
!
|
|
Karsten Hopp |
271384 |
! /*
|
|
Karsten Hopp |
271384 |
! * Function given to ExpandGeneric() to obtain the available locales.
|
|
Karsten Hopp |
271384 |
! */
|
|
Karsten Hopp |
271384 |
! char_u *
|
|
Karsten Hopp |
271384 |
! get_locales(xp, idx)
|
|
Karsten Hopp |
271384 |
! expand_T *xp UNUSED;
|
|
Karsten Hopp |
271384 |
! int idx;
|
|
Karsten Hopp |
271384 |
! {
|
|
Karsten Hopp |
271384 |
! init_locales();
|
|
Karsten Hopp |
271384 |
! if (locales == NULL)
|
|
Karsten Hopp |
271384 |
! return NULL;
|
|
Karsten Hopp |
271384 |
! return locales[idx];
|
|
Karsten Hopp |
271384 |
}
|
|
Karsten Hopp |
271384 |
# endif
|
|
Karsten Hopp |
271384 |
|
|
Karsten Hopp |
271384 |
*** ../mercurial/vim73/src/ex_getln.c 2011-05-19 14:50:49.000000000 +0200
|
|
Karsten Hopp |
271384 |
--- src/ex_getln.c 2011-05-19 18:18:49.000000000 +0200
|
|
Karsten Hopp |
271384 |
***************
|
|
Karsten Hopp |
271384 |
*** 4571,4618 ****
|
|
Karsten Hopp |
271384 |
int context;
|
|
Karsten Hopp |
271384 |
char_u *((*func)__ARGS((expand_T *, int)));
|
|
Karsten Hopp |
271384 |
int ic;
|
|
Karsten Hopp |
271384 |
} tab[] =
|
|
Karsten Hopp |
271384 |
{
|
|
Karsten Hopp |
271384 |
! {EXPAND_COMMANDS, get_command_name, FALSE},
|
|
Karsten Hopp |
271384 |
! {EXPAND_BEHAVE, get_behave_arg, TRUE},
|
|
Karsten Hopp |
271384 |
#ifdef FEAT_USR_CMDS
|
|
Karsten Hopp |
271384 |
! {EXPAND_USER_COMMANDS, get_user_commands, FALSE},
|
|
Karsten Hopp |
271384 |
! {EXPAND_USER_CMD_FLAGS, get_user_cmd_flags, FALSE},
|
|
Karsten Hopp |
271384 |
! {EXPAND_USER_NARGS, get_user_cmd_nargs, FALSE},
|
|
Karsten Hopp |
271384 |
! {EXPAND_USER_COMPLETE, get_user_cmd_complete, FALSE},
|
|
Karsten Hopp |
271384 |
#endif
|
|
Karsten Hopp |
271384 |
#ifdef FEAT_EVAL
|
|
Karsten Hopp |
271384 |
! {EXPAND_USER_VARS, get_user_var_name, FALSE},
|
|
Karsten Hopp |
271384 |
! {EXPAND_FUNCTIONS, get_function_name, FALSE},
|
|
Karsten Hopp |
271384 |
! {EXPAND_USER_FUNC, get_user_func_name, FALSE},
|
|
Karsten Hopp |
271384 |
! {EXPAND_EXPRESSION, get_expr_name, FALSE},
|
|
Karsten Hopp |
271384 |
#endif
|
|
Karsten Hopp |
271384 |
#ifdef FEAT_MENU
|
|
Karsten Hopp |
271384 |
! {EXPAND_MENUS, get_menu_name, FALSE},
|
|
Karsten Hopp |
271384 |
! {EXPAND_MENUNAMES, get_menu_names, FALSE},
|
|
Karsten Hopp |
271384 |
#endif
|
|
Karsten Hopp |
271384 |
#ifdef FEAT_SYN_HL
|
|
Karsten Hopp |
271384 |
! {EXPAND_SYNTAX, get_syntax_name, TRUE},
|
|
Karsten Hopp |
271384 |
#endif
|
|
Karsten Hopp |
271384 |
! {EXPAND_HIGHLIGHT, get_highlight_name, TRUE},
|
|
Karsten Hopp |
271384 |
#ifdef FEAT_AUTOCMD
|
|
Karsten Hopp |
271384 |
! {EXPAND_EVENTS, get_event_name, TRUE},
|
|
Karsten Hopp |
271384 |
! {EXPAND_AUGROUP, get_augroup_name, TRUE},
|
|
Karsten Hopp |
271384 |
#endif
|
|
Karsten Hopp |
271384 |
#ifdef FEAT_CSCOPE
|
|
Karsten Hopp |
271384 |
! {EXPAND_CSCOPE, get_cscope_name, TRUE},
|
|
Karsten Hopp |
271384 |
#endif
|
|
Karsten Hopp |
271384 |
#ifdef FEAT_SIGNS
|
|
Karsten Hopp |
271384 |
! {EXPAND_SIGN, get_sign_name, TRUE},
|
|
Karsten Hopp |
271384 |
#endif
|
|
Karsten Hopp |
271384 |
#ifdef FEAT_PROFILE
|
|
Karsten Hopp |
271384 |
! {EXPAND_PROFILE, get_profile_name, TRUE},
|
|
Karsten Hopp |
271384 |
#endif
|
|
Karsten Hopp |
271384 |
#if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
|
|
Karsten Hopp |
271384 |
&& (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE))
|
|
Karsten Hopp |
271384 |
! {EXPAND_LANGUAGE, get_lang_arg, TRUE},
|
|
Karsten Hopp |
271384 |
#endif
|
|
Karsten Hopp |
271384 |
! {EXPAND_ENV_VARS, get_env_name, TRUE},
|
|
Karsten Hopp |
271384 |
};
|
|
Karsten Hopp |
271384 |
int i;
|
|
Karsten Hopp |
271384 |
|
|
Karsten Hopp |
271384 |
--- 4571,4620 ----
|
|
Karsten Hopp |
271384 |
int context;
|
|
Karsten Hopp |
271384 |
char_u *((*func)__ARGS((expand_T *, int)));
|
|
Karsten Hopp |
271384 |
int ic;
|
|
Karsten Hopp |
271384 |
+ int escaped;
|
|
Karsten Hopp |
271384 |
} tab[] =
|
|
Karsten Hopp |
271384 |
{
|
|
Karsten Hopp |
271384 |
! {EXPAND_COMMANDS, get_command_name, FALSE, TRUE},
|
|
Karsten Hopp |
271384 |
! {EXPAND_BEHAVE, get_behave_arg, TRUE, TRUE},
|
|
Karsten Hopp |
271384 |
#ifdef FEAT_USR_CMDS
|
|
Karsten Hopp |
271384 |
! {EXPAND_USER_COMMANDS, get_user_commands, FALSE, TRUE},
|
|
Karsten Hopp |
271384 |
! {EXPAND_USER_CMD_FLAGS, get_user_cmd_flags, FALSE, TRUE},
|
|
Karsten Hopp |
271384 |
! {EXPAND_USER_NARGS, get_user_cmd_nargs, FALSE, TRUE},
|
|
Karsten Hopp |
271384 |
! {EXPAND_USER_COMPLETE, get_user_cmd_complete, FALSE, TRUE},
|
|
Karsten Hopp |
271384 |
#endif
|
|
Karsten Hopp |
271384 |
#ifdef FEAT_EVAL
|
|
Karsten Hopp |
271384 |
! {EXPAND_USER_VARS, get_user_var_name, FALSE, TRUE},
|
|
Karsten Hopp |
271384 |
! {EXPAND_FUNCTIONS, get_function_name, FALSE, TRUE},
|
|
Karsten Hopp |
271384 |
! {EXPAND_USER_FUNC, get_user_func_name, FALSE, TRUE},
|
|
Karsten Hopp |
271384 |
! {EXPAND_EXPRESSION, get_expr_name, FALSE, TRUE},
|
|
Karsten Hopp |
271384 |
#endif
|
|
Karsten Hopp |
271384 |
#ifdef FEAT_MENU
|
|
Karsten Hopp |
271384 |
! {EXPAND_MENUS, get_menu_name, FALSE, TRUE},
|
|
Karsten Hopp |
271384 |
! {EXPAND_MENUNAMES, get_menu_names, FALSE, TRUE},
|
|
Karsten Hopp |
271384 |
#endif
|
|
Karsten Hopp |
271384 |
#ifdef FEAT_SYN_HL
|
|
Karsten Hopp |
271384 |
! {EXPAND_SYNTAX, get_syntax_name, TRUE, TRUE},
|
|
Karsten Hopp |
271384 |
#endif
|
|
Karsten Hopp |
271384 |
! {EXPAND_HIGHLIGHT, get_highlight_name, TRUE, TRUE},
|
|
Karsten Hopp |
271384 |
#ifdef FEAT_AUTOCMD
|
|
Karsten Hopp |
271384 |
! {EXPAND_EVENTS, get_event_name, TRUE, TRUE},
|
|
Karsten Hopp |
271384 |
! {EXPAND_AUGROUP, get_augroup_name, TRUE, TRUE},
|
|
Karsten Hopp |
271384 |
#endif
|
|
Karsten Hopp |
271384 |
#ifdef FEAT_CSCOPE
|
|
Karsten Hopp |
271384 |
! {EXPAND_CSCOPE, get_cscope_name, TRUE, TRUE},
|
|
Karsten Hopp |
271384 |
#endif
|
|
Karsten Hopp |
271384 |
#ifdef FEAT_SIGNS
|
|
Karsten Hopp |
271384 |
! {EXPAND_SIGN, get_sign_name, TRUE, TRUE},
|
|
Karsten Hopp |
271384 |
#endif
|
|
Karsten Hopp |
271384 |
#ifdef FEAT_PROFILE
|
|
Karsten Hopp |
271384 |
! {EXPAND_PROFILE, get_profile_name, TRUE, TRUE},
|
|
Karsten Hopp |
271384 |
#endif
|
|
Karsten Hopp |
271384 |
#if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
|
|
Karsten Hopp |
271384 |
&& (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE))
|
|
Karsten Hopp |
271384 |
! {EXPAND_LANGUAGE, get_lang_arg, TRUE, FALSE},
|
|
Karsten Hopp |
271384 |
! {EXPAND_LOCALES, get_locales, TRUE, FALSE},
|
|
Karsten Hopp |
271384 |
#endif
|
|
Karsten Hopp |
271384 |
! {EXPAND_ENV_VARS, get_env_name, TRUE, TRUE},
|
|
Karsten Hopp |
271384 |
};
|
|
Karsten Hopp |
271384 |
int i;
|
|
Karsten Hopp |
271384 |
|
|
Karsten Hopp |
271384 |
***************
|
|
Karsten Hopp |
271384 |
*** 4626,4632 ****
|
|
Karsten Hopp |
271384 |
{
|
|
Karsten Hopp |
271384 |
if (tab[i].ic)
|
|
Karsten Hopp |
271384 |
regmatch.rm_ic = TRUE;
|
|
Karsten Hopp |
271384 |
! ret = ExpandGeneric(xp, ®match, num_file, file, tab[i].func);
|
|
Karsten Hopp |
271384 |
break;
|
|
Karsten Hopp |
271384 |
}
|
|
Karsten Hopp |
271384 |
}
|
|
Karsten Hopp |
271384 |
--- 4628,4635 ----
|
|
Karsten Hopp |
271384 |
{
|
|
Karsten Hopp |
271384 |
if (tab[i].ic)
|
|
Karsten Hopp |
271384 |
regmatch.rm_ic = TRUE;
|
|
Karsten Hopp |
271384 |
! ret = ExpandGeneric(xp, ®match, num_file, file,
|
|
Karsten Hopp |
271384 |
! tab[i].func, tab[i].escaped);
|
|
Karsten Hopp |
271384 |
break;
|
|
Karsten Hopp |
271384 |
}
|
|
Karsten Hopp |
271384 |
}
|
|
Karsten Hopp |
271384 |
***************
|
|
Karsten Hopp |
271384 |
*** 4648,4660 ****
|
|
Karsten Hopp |
271384 |
* Returns OK when no problems encountered, FAIL for error (out of memory).
|
|
Karsten Hopp |
271384 |
*/
|
|
Karsten Hopp |
271384 |
int
|
|
Karsten Hopp |
271384 |
! ExpandGeneric(xp, regmatch, num_file, file, func)
|
|
Karsten Hopp |
271384 |
expand_T *xp;
|
|
Karsten Hopp |
271384 |
regmatch_T *regmatch;
|
|
Karsten Hopp |
271384 |
int *num_file;
|
|
Karsten Hopp |
271384 |
char_u ***file;
|
|
Karsten Hopp |
271384 |
char_u *((*func)__ARGS((expand_T *, int)));
|
|
Karsten Hopp |
271384 |
/* returns a string from the list */
|
|
Karsten Hopp |
271384 |
{
|
|
Karsten Hopp |
271384 |
int i;
|
|
Karsten Hopp |
271384 |
int count = 0;
|
|
Karsten Hopp |
271384 |
--- 4651,4664 ----
|
|
Karsten Hopp |
271384 |
* Returns OK when no problems encountered, FAIL for error (out of memory).
|
|
Karsten Hopp |
271384 |
*/
|
|
Karsten Hopp |
271384 |
int
|
|
Karsten Hopp |
271384 |
! ExpandGeneric(xp, regmatch, num_file, file, func, escaped)
|
|
Karsten Hopp |
271384 |
expand_T *xp;
|
|
Karsten Hopp |
271384 |
regmatch_T *regmatch;
|
|
Karsten Hopp |
271384 |
int *num_file;
|
|
Karsten Hopp |
271384 |
char_u ***file;
|
|
Karsten Hopp |
271384 |
char_u *((*func)__ARGS((expand_T *, int)));
|
|
Karsten Hopp |
271384 |
/* returns a string from the list */
|
|
Karsten Hopp |
271384 |
+ int escaped;
|
|
Karsten Hopp |
271384 |
{
|
|
Karsten Hopp |
271384 |
int i;
|
|
Karsten Hopp |
271384 |
int count = 0;
|
|
Karsten Hopp |
271384 |
***************
|
|
Karsten Hopp |
271384 |
*** 4679,4685 ****
|
|
Karsten Hopp |
271384 |
{
|
|
Karsten Hopp |
271384 |
if (round)
|
|
Karsten Hopp |
271384 |
{
|
|
Karsten Hopp |
271384 |
! str = vim_strsave_escaped(str, (char_u *)" \t\\.");
|
|
Karsten Hopp |
271384 |
(*file)[count] = str;
|
|
Karsten Hopp |
271384 |
#ifdef FEAT_MENU
|
|
Karsten Hopp |
271384 |
if (func == get_menu_names && str != NULL)
|
|
Karsten Hopp |
271384 |
--- 4683,4692 ----
|
|
Karsten Hopp |
271384 |
{
|
|
Karsten Hopp |
271384 |
if (round)
|
|
Karsten Hopp |
271384 |
{
|
|
Karsten Hopp |
271384 |
! if (escaped)
|
|
Karsten Hopp |
271384 |
! str = vim_strsave_escaped(str, (char_u *)" \t\\.");
|
|
Karsten Hopp |
271384 |
! else
|
|
Karsten Hopp |
271384 |
! str = vim_strsave(str);
|
|
Karsten Hopp |
271384 |
(*file)[count] = str;
|
|
Karsten Hopp |
271384 |
#ifdef FEAT_MENU
|
|
Karsten Hopp |
271384 |
if (func == get_menu_names && str != NULL)
|
|
Karsten Hopp |
271384 |
*** ../mercurial/vim73/src/proto/ex_cmds2.pro 2010-05-15 21:22:11.000000000 +0200
|
|
Karsten Hopp |
271384 |
--- src/proto/ex_cmds2.pro 2011-05-19 17:53:52.000000000 +0200
|
|
Karsten Hopp |
271384 |
***************
|
|
Karsten Hopp |
271384 |
*** 83,87 ****
|
|
Karsten Hopp |
271384 |
--- 83,89 ----
|
|
Karsten Hopp |
271384 |
char_u *get_mess_lang __ARGS((void));
|
|
Karsten Hopp |
271384 |
void set_lang_var __ARGS((void));
|
|
Karsten Hopp |
271384 |
void ex_language __ARGS((exarg_T *eap));
|
|
Karsten Hopp |
271384 |
+ void free_locales __ARGS((void));
|
|
Karsten Hopp |
271384 |
char_u *get_lang_arg __ARGS((expand_T *xp, int idx));
|
|
Karsten Hopp |
271384 |
+ char_u *get_locales __ARGS((expand_T *xp, int idx));
|
|
Karsten Hopp |
271384 |
/* vim: set ft=c : */
|
|
Karsten Hopp |
271384 |
*** ../mercurial/vim73/src/proto/ex_getln.pro 2010-08-16 21:23:30.000000000 +0200
|
|
Karsten Hopp |
271384 |
--- src/proto/ex_getln.pro 2011-05-19 17:54:00.000000000 +0200
|
|
Karsten Hopp |
271384 |
***************
|
|
Karsten Hopp |
271384 |
*** 31,37 ****
|
|
Karsten Hopp |
271384 |
char_u *addstar __ARGS((char_u *fname, int len, int context));
|
|
Karsten Hopp |
271384 |
void set_cmd_context __ARGS((expand_T *xp, char_u *str, int len, int col));
|
|
Karsten Hopp |
271384 |
int expand_cmdline __ARGS((expand_T *xp, char_u *str, int col, int *matchcount, char_u ***matches));
|
|
Karsten Hopp |
271384 |
! int ExpandGeneric __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file, char_u *((*func)(expand_T *, int))));
|
|
Karsten Hopp |
271384 |
char_u *globpath __ARGS((char_u *path, char_u *file, int expand_options));
|
|
Karsten Hopp |
271384 |
void init_history __ARGS((void));
|
|
Karsten Hopp |
271384 |
int get_histtype __ARGS((char_u *name));
|
|
Karsten Hopp |
271384 |
--- 31,37 ----
|
|
Karsten Hopp |
271384 |
char_u *addstar __ARGS((char_u *fname, int len, int context));
|
|
Karsten Hopp |
271384 |
void set_cmd_context __ARGS((expand_T *xp, char_u *str, int len, int col));
|
|
Karsten Hopp |
271384 |
int expand_cmdline __ARGS((expand_T *xp, char_u *str, int col, int *matchcount, char_u ***matches));
|
|
Karsten Hopp |
271384 |
! int ExpandGeneric __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file, char_u *((*func)(expand_T *, int)), int escaped));
|
|
Karsten Hopp |
271384 |
char_u *globpath __ARGS((char_u *path, char_u *file, int expand_options));
|
|
Karsten Hopp |
271384 |
void init_history __ARGS((void));
|
|
Karsten Hopp |
271384 |
int get_histtype __ARGS((char_u *name));
|
|
Karsten Hopp |
271384 |
*** ../mercurial/vim73/src/vim.h 2011-05-19 17:25:36.000000000 +0200
|
|
Karsten Hopp |
271384 |
--- src/vim.h 2011-05-19 17:52:02.000000000 +0200
|
|
Karsten Hopp |
271384 |
***************
|
|
Karsten Hopp |
271384 |
*** 779,784 ****
|
|
Karsten Hopp |
271384 |
--- 779,785 ----
|
|
Karsten Hopp |
271384 |
#define EXPAND_FILETYPE 37
|
|
Karsten Hopp |
271384 |
#define EXPAND_FILES_IN_PATH 38
|
|
Karsten Hopp |
271384 |
#define EXPAND_OWNSYNTAX 39
|
|
Karsten Hopp |
271384 |
+ #define EXPAND_LOCALES 40
|
|
Karsten Hopp |
271384 |
|
|
Karsten Hopp |
271384 |
/* Values for exmode_active (0 is no exmode) */
|
|
Karsten Hopp |
271384 |
#define EXMODE_NORMAL 1
|
|
Karsten Hopp |
271384 |
*** ../vim-7.3.197/src/version.c 2011-05-19 17:42:54.000000000 +0200
|
|
Karsten Hopp |
271384 |
--- src/version.c 2011-05-19 18:24:58.000000000 +0200
|
|
Karsten Hopp |
271384 |
***************
|
|
Karsten Hopp |
271384 |
*** 711,712 ****
|
|
Karsten Hopp |
271384 |
--- 711,714 ----
|
|
Karsten Hopp |
271384 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
271384 |
+ /**/
|
|
Karsten Hopp |
271384 |
+ 198,
|
|
Karsten Hopp |
271384 |
/**/
|
|
Karsten Hopp |
271384 |
|
|
Karsten Hopp |
271384 |
--
|
|
Karsten Hopp |
271384 |
The primary purpose of the DATA statement is to give names to constants;
|
|
Karsten Hopp |
271384 |
instead of referring to pi as 3.141592653589793 at every appearance, the
|
|
Karsten Hopp |
271384 |
variable PI can be given that value with a DATA statement and used instead
|
|
Karsten Hopp |
271384 |
of the longer form of the constant. This also simplifies modifying the
|
|
Karsten Hopp |
271384 |
program, should the value of pi change.
|
|
Karsten Hopp |
271384 |
-- FORTRAN manual for Xerox Computers
|
|
Karsten Hopp |
271384 |
|
|
Karsten Hopp |
271384 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
271384 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
271384 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
271384 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|