[SCM] Vim packaging branch, deb/vim-tiny, updated. upstream/7.2.130-239-g4f565c8
James Vega
jamessan at debian.org
Wed Jan 13 06:27:35 UTC 2010
The following commit has been merged in the deb/vim-tiny branch:
commit 4f565c8e13c7b7518dee67e0c4ff4f7dc25aedb8
Merge: 463cd99c19e1daa217bef68c6f16626a99ac2549 32a1d64b0b9e446e53c0d82c862da2baabe26b5b
Author: James Vega <jamessan at debian.org>
Date: Wed Jan 13 00:58:00 2010 -0500
Merge branch 'upstream' into deb/vim-tiny
diff --combined src/main.c
index 912433c,4e027ab..1bac166
--- a/src/main.c
+++ b/src/main.c
@@@ -87,9 -87,6 +87,9 @@@ typedef struc
#ifdef FEAT_DIFF
int diff_mode; /* start with 'diff' set */
#endif
+#ifdef SYS_TINYRC_FILE
+ int vi_mode; /* started as "vi" */
+#endif
} mparm_T;
/* Values for edit_type. */
@@@ -207,9 -204,9 +207,9 @@@ mai
#ifdef STARTUPTIME
for (i = 1; i < argc; ++i)
{
- if (STRNICMP(argv[i], "--startuptime=", 14) == 0)
+ if (STRICMP(argv[i], "--startuptime") == 0 && i + 1 < argc)
{
- time_fd = mch_fopen(argv[i] + 14, "a");
+ time_fd = mch_fopen(argv[i + 1], "a");
TIME_MSG("--- VIM STARTING ---");
break;
}
@@@ -369,14 -366,21 +369,21 @@@
* Check if the GUI can be started. Reset gui.starting if not.
* Don't know about other systems, stay on the safe side and don't check.
*/
- if (gui.starting && gui_init_check() == FAIL)
+ if (gui.starting)
{
- gui.starting = FALSE;
+ if (gui_init_check() == FAIL)
+ {
+ gui.starting = FALSE;
- /* When running "evim" or "gvim -y" we need the menus, exit if we
- * don't have them. */
- if (params.evim_mode)
- mch_exit(1);
+ /* When running "evim" or "gvim -y" we need the menus, exit if we
+ * don't have them. */
+ if (params.evim_mode)
+ mch_exit(1);
+ }
+ # if defined(HAVE_LOCALE_H) || defined(X_LOCALE)
+ /* Re-initialize locale, it may have been altered by gui_init_check() */
+ init_locale();
+ # endif
}
# endif
#endif
@@@ -1503,10 -1507,6 +1510,10 @@@ parse_command_name(parmp
}
else if (STRNICMP(initstr, "vim", 3) == 0)
initstr += 3;
+#ifdef SYS_TINYRC_FILE
+ else if (STRNICMP(initstr, "vi", 2) == 0)
+ parmp->vi_mode = TRUE;
+#endif
/* Catch "[r][g]vimdiff" and "[r][g]viewdiff". */
if (STRICMP(initstr, "diff") == 0)
@@@ -1733,6 -1733,11 +1740,11 @@@ command_line_scan(parmp
want_argument = TRUE;
argv_idx += 3;
}
+ else if (STRNICMP(argv[0] + argv_idx, "startuptime", 11) == 0)
+ {
+ want_argument = TRUE;
+ argv_idx += 11;
+ }
#ifdef FEAT_CLIENTSERVER
else if (STRNICMP(argv[0] + argv_idx, "serverlist", 10) == 0)
; /* already processed -- no arg */
@@@ -1768,10 -1773,6 +1780,6 @@@
/* already processed, skip */
}
#endif
- else if (STRNICMP(argv[0] + argv_idx, "startuptime", 11) == 0)
- {
- /* already processed, skip */
- }
else
{
if (argv[0][argv_idx])
@@@ -2068,7 -2069,7 +2076,7 @@@
mainerr(ME_GARBAGE, (char_u *)argv[0]);
--argc;
- if (argc < 1 && c != 'S')
+ if (argc < 1 && c != 'S') /* -S has an optional argument */
mainerr_arg_missing((char_u *)argv[0]);
++argv;
argv_idx = -1;
@@@ -2109,11 -2110,16 +2117,16 @@@
(char_u *)argv[0];
break;
- case '-': /* "--cmd {command}" execute command */
- if (parmp->n_pre_commands >= MAX_ARG_CMDS)
- mainerr(ME_EXTRA_CMD, NULL);
- parmp->pre_commands[parmp->n_pre_commands++] =
+ case '-':
+ if (argv[-1][2] == 'c')
+ {
+ /* "--cmd {command}" execute command */
+ if (parmp->n_pre_commands >= MAX_ARG_CMDS)
+ mainerr(ME_EXTRA_CMD, NULL);
+ parmp->pre_commands[parmp->n_pre_commands++] =
(char_u *)argv[0];
+ }
+ /* "--startuptime <file>" already handled */
break;
/* case 'd': -d {device} is handled in mch_check_win() for the
@@@ -2800,12 -2806,7 +2813,12 @@@ source_startup_scripts(parmp
* Get system wide defaults, if the file name is defined.
*/
#ifdef SYS_VIMRC_FILE
- (void)do_source((char_u *)SYS_VIMRC_FILE, FALSE, DOSO_NONE);
+# if defined(SYS_TINYRC_FILE) && defined(TINY_VIMRC)
+ if (parmp->vi_mode)
+ (void)do_source((char_u *)SYS_TINYRC_FILE, FALSE, DOSO_NONE);
+ else
+# endif
+ (void)do_source((char_u *)SYS_VIMRC_FILE, FALSE, DOSO_NONE);
#endif
#ifdef MACOS_X
(void)do_source((char_u *)"$VIMRUNTIME/macmap.vim", FALSE, DOSO_NONE);
@@@ -3156,6 -3157,9 +3169,9 @@@ usage(
main_msg(_("--serverlist\t\tList available Vim server names and exit"));
main_msg(_("--servername <name>\tSend to/become the Vim server <name>"));
#endif
+ #ifdef STARTUPTIME
+ main_msg(_("--startuptime <file>\tWrite startup timing messages to <file>"));
+ #endif
#ifdef FEAT_VIMINFO
main_msg(_("-i <viminfo>\t\tUse <viminfo> instead of .viminfo"));
#endif
@@@ -3688,7 -3692,7 +3704,7 @@@ cmdsrv_main(argc, argv, serverName_arg
}
else if (STRICMP(argv[i], "--servername") == 0)
{
- /* Alredy processed. Take it out of the command line */
+ /* Already processed. Take it out of the command line */
i++;
continue;
}
--
Vim packaging
More information about the pkg-vim-maintainers
mailing list