[SCM] Vim packaging branch, deb/set-cp-after-init, updated. upstream/7.1.ds-287-gcbd3706
James Vega
jamessan at debian.org
Tue Mar 25 02:01:25 UTC 2008
The following commit has been merged in the deb/set-cp-after-init branch:
commit cbd3706b20e30b6bd449a88d6c83cf27e86f0fb8
Merge: dfdc28fdff59fbe72ebeaadf61e161c88e5cab89 d6d771252d9e53ab21b1af932d84b604a9285b9e
Author: James Vega <jamessan at debian.org>
Date: Mon Mar 24 21:58:51 2008 -0400
Merge branch 'upstream' into deb/set-cp-after-init
diff --combined src/main.c
index 1497bce,2a02615..a9b7c25
--- a/src/main.c
+++ b/src/main.c
@@@ -37,9 -37,6 +37,9 @@@
#define WIN_VER 2 /* "-O" vertically split windows */
#define WIN_TABS 3 /* "-p" windows on tab pages */
+#define SET_CP 1 /* "-C" set compatible */
+#define SET_NOCP 2 /* "-N" set nocompatible */
+
/* Struct for various parameters passed between main() and other functions. */
typedef struct
{
@@@ -92,7 -89,6 +92,7 @@@
#ifdef FEAT_DIFF
int diff_mode; /* start with 'diff' set */
#endif
+ int option_cp; /* 0, SET_CP, SET_NOCP */
} mparm_T;
/* Values for edit_type. */
@@@ -645,13 -641,6 +645,13 @@@ mai
}
#endif
+ /* -N/-C given on the command-line. Now that the startup files are done
+ * being sourced, we set the option. */
+ if (params.option_cp == SET_CP)
+ change_compatible(TRUE);
+ else if (params.option_cp == SET_NOCP)
+ change_compatible(FALSE);
+
#ifdef SPAWNO /* special MSDOS swapping library */
init_SPAWNO("", SWAP_ANY);
#endif
@@@ -1563,15 -1552,15 +1563,15 @@@ early_arg_scan(parmp
else if (STRICMP(argv[i], "--socketid") == 0)
# endif
{
- unsigned int id;
- int count;
+ long_u id;
+ int count;
if (i == argc - 1)
mainerr_arg_missing((char_u *)argv[i]);
if (STRNICMP(argv[i+1], "0x", 2) == 0)
- count = sscanf(&(argv[i + 1][2]), "%x", &id);
+ count = sscanf(&(argv[i + 1][2]), SCANF_HEX_LONG_U, &id);
else
- count = sscanf(argv[i+1], "%u", &id);
+ count = sscanf(argv[i + 1], SCANF_DECIMAL_LONG_U, &id);
if (count != 1)
mainerr(ME_INVALID_ARG, (char_u *)argv[i]);
else
@@@ -1762,7 -1751,7 +1762,7 @@@ command_line_scan(parmp
break;
case 'C': /* "-C" Compatible */
- change_compatible(TRUE);
+ parmp->option_cp = SET_CP;
break;
case 'e': /* "-e" Ex mode */
@@@ -1835,7 -1824,7 +1835,7 @@@
break;
case 'N': /* "-N" Nocompatible */
- change_compatible(FALSE);
+ parmp->option_cp = SET_NOCP;
break;
case 'n': /* "-n" no swap file */
--
Vim packaging
More information about the pkg-vim-maintainers
mailing list