comparison src/option.c @ 835:8bebcabccc2c v7.0e01

updated for version 7.0e01
author vimboss
date Mon, 17 Apr 2006 22:14:47 +0000
parents 01583c79d5f4
children 5a7843c57316
comparison
equal deleted inserted replaced
834:5117153003bd 835:8bebcabccc2c
2907 void 2907 void
2908 set_init_1() 2908 set_init_1()
2909 { 2909 {
2910 char_u *p; 2910 char_u *p;
2911 int opt_idx; 2911 int opt_idx;
2912 long n; 2912 long_u n;
2913 2913
2914 #ifdef FEAT_LANGMAP 2914 #ifdef FEAT_LANGMAP
2915 langmap_init(); 2915 langmap_init();
2916 #endif 2916 #endif
2917 2917
2968 # endif 2968 # endif
2969 p = vim_getenv((char_u *)names[n], &mustfree); 2969 p = vim_getenv((char_u *)names[n], &mustfree);
2970 if (p != NULL && *p != NUL) 2970 if (p != NULL && *p != NUL)
2971 { 2971 {
2972 /* First time count the NUL, otherwise count the ','. */ 2972 /* First time count the NUL, otherwise count the ','. */
2973 len = STRLEN(p) + 3; 2973 len = (int)STRLEN(p) + 3;
2974 if (ga_grow(&ga, len) == OK) 2974 if (ga_grow(&ga, len) == OK)
2975 { 2975 {
2976 if (ga.ga_len > 0) 2976 if (ga.ga_len > 0)
2977 STRCAT(ga.ga_data, ","); 2977 STRCAT(ga.ga_data, ",");
2978 STRCAT(ga.ga_data, p); 2978 STRCAT(ga.ga_data, p);
4629 } 4629 }
4630 4630
4631 if (errmsg != NULL) 4631 if (errmsg != NULL)
4632 { 4632 {
4633 vim_strncpy(IObuff, (char_u *)_(errmsg), IOSIZE - 1); 4633 vim_strncpy(IObuff, (char_u *)_(errmsg), IOSIZE - 1);
4634 i = STRLEN(IObuff) + 2; 4634 i = (int)STRLEN(IObuff) + 2;
4635 if (i + (arg - startarg) < IOSIZE) 4635 if (i + (arg - startarg) < IOSIZE)
4636 { 4636 {
4637 /* append the argument with the error */ 4637 /* append the argument with the error */
4638 STRCAT(IObuff, ": "); 4638 STRCAT(IObuff, ": ");
4639 mch_memmove(IObuff + i, startarg, (arg - startarg)); 4639 mch_memmove(IObuff + i, startarg, (arg - startarg));
5334 { 5334 {
5335 char_u *errmsg = NULL; 5335 char_u *errmsg = NULL;
5336 char_u *s, *p; 5336 char_u *s, *p;
5337 int did_chartab = FALSE; 5337 int did_chartab = FALSE;
5338 char_u **gvarp; 5338 char_u **gvarp;
5339 int free_oldval = (options[opt_idx].flags & P_ALLOCED); 5339 long_u free_oldval = (options[opt_idx].flags & P_ALLOCED);
5340 5340
5341 /* Get the global option to compare with, otherwise we would have to check 5341 /* Get the global option to compare with, otherwise we would have to check
5342 * two values for all local options. */ 5342 * two values for all local options. */
5343 gvarp = (char_u **)get_varp_scope(&(options[opt_idx]), OPT_GLOBAL); 5343 gvarp = (char_u **)get_varp_scope(&(options[opt_idx]), OPT_GLOBAL);
5344 5344
6189 win_T *wp; 6189 win_T *wp;
6190 int l; 6190 int l;
6191 6191
6192 if (varp == &(curbuf->b_p_spf)) 6192 if (varp == &(curbuf->b_p_spf))
6193 { 6193 {
6194 l = STRLEN(curbuf->b_p_spf); 6194 l = (int)STRLEN(curbuf->b_p_spf);
6195 if (l > 0 && (l < 4 || STRCMP(curbuf->b_p_spf + l - 4, 6195 if (l > 0 && (l < 4 || STRCMP(curbuf->b_p_spf + l - 4,
6196 ".add") != 0)) 6196 ".add") != 0))
6197 errmsg = e_invarg; 6197 errmsg = e_invarg;
6198 } 6198 }
6199 6199
8120 char_u *string; 8120 char_u *string;
8121 int opt_flags; /* OPT_LOCAL or 0 (both) */ 8121 int opt_flags; /* OPT_LOCAL or 0 (both) */
8122 { 8122 {
8123 int opt_idx; 8123 int opt_idx;
8124 char_u *varp; 8124 char_u *varp;
8125 int flags; 8125 long_u flags;
8126 8126
8127 opt_idx = findoption(name); 8127 opt_idx = findoption(name);
8128 if (opt_idx == -1) 8128 if (opt_idx == -1)
8129 EMSG2(_("E355: Unknown option: %s"), name); 8129 EMSG2(_("E355: Unknown option: %s"), name);
8130 else 8130 else