summaryrefslogtreecommitdiff
path: root/source/ap/vim/patches/7.3.080
blob: 6cf9f6d7009058dfce11d32d4094c3283bbcc9cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
To: vim_dev@googlegroups.com
Subject: Patch 7.3.080
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.3.080
Problem:    Spell doesn't work on VMS.
Solution:   Use different file names. (Zoltan Bartos, Zoltan Arpadffy)
Files:	    src/spell.c


*** ../vim-7.3.079/src/spell.c	2010-12-08 13:11:15.000000000 +0100
--- src/spell.c	2010-12-08 17:01:13.000000000 +0100
***************
*** 327,332 ****
--- 327,342 ----
  typedef long idx_T;
  #endif
  
+ #ifdef VMS
+ # define SPL_FNAME_TMPL  "%s_%s.spl"
+ # define SPL_FNAME_ADD   "_add."
+ # define SPL_FNAME_ASCII "_ascii."
+ #else
+ # define SPL_FNAME_TMPL  "%s.%s.spl"
+ # define SPL_FNAME_ADD   ".add."
+ # define SPL_FNAME_ASCII ".ascii."
+ #endif
+ 
  /* Flags used for a word.  Only the lowest byte can be used, the region byte
   * comes above it. */
  #define WF_REGION   0x01	/* region byte follows */
***************
*** 2471,2484 ****
  	 * Find the first spell file for "lang" in 'runtimepath' and load it.
  	 */
  	vim_snprintf((char *)fname_enc, sizeof(fname_enc) - 5,
! 					"spell/%s.%s.spl", lang, spell_enc());
  	r = do_in_runtimepath(fname_enc, FALSE, spell_load_cb, &sl);
  
  	if (r == FAIL && *sl.sl_lang != NUL)
  	{
  	    /* Try loading the ASCII version. */
  	    vim_snprintf((char *)fname_enc, sizeof(fname_enc) - 5,
! 						  "spell/%s.ascii.spl", lang);
  	    r = do_in_runtimepath(fname_enc, FALSE, spell_load_cb, &sl);
  
  #ifdef FEAT_AUTOCMD
--- 2481,2504 ----
  	 * Find the first spell file for "lang" in 'runtimepath' and load it.
  	 */
  	vim_snprintf((char *)fname_enc, sizeof(fname_enc) - 5,
! #ifdef VMS
! 					"spell/%s_%s.spl",
! #else
! 					"spell/%s.%s.spl",
! #endif
! 							   lang, spell_enc());
  	r = do_in_runtimepath(fname_enc, FALSE, spell_load_cb, &sl);
  
  	if (r == FAIL && *sl.sl_lang != NUL)
  	{
  	    /* Try loading the ASCII version. */
  	    vim_snprintf((char *)fname_enc, sizeof(fname_enc) - 5,
! #ifdef VMS
! 						  "spell/%s_ascii.spl",
! #else
! 						  "spell/%s.ascii.spl",
! #endif
! 									lang);
  	    r = do_in_runtimepath(fname_enc, FALSE, spell_load_cb, &sl);
  
  #ifdef FEAT_AUTOCMD
***************
*** 2496,2502 ****
  
      if (r == FAIL)
      {
! 	smsg((char_u *)_("Warning: Cannot find word list \"%s.%s.spl\" or \"%s.ascii.spl\""),
  						     lang, spell_enc(), lang);
      }
      else if (sl.sl_slang != NULL)
--- 2516,2527 ----
  
      if (r == FAIL)
      {
! 	smsg((char_u *)
! #ifdef VMS
! 	_("Warning: Cannot find word list \"%s_%s.spl\" or \"%s_ascii.spl\""),
! #else
! 	_("Warning: Cannot find word list \"%s.%s.spl\" or \"%s.ascii.spl\""),
! #endif
  						     lang, spell_enc(), lang);
      }
      else if (sl.sl_slang != NULL)
***************
*** 2530,2536 ****
  int_wordlist_spl(fname)
      char_u	    *fname;
  {
!     vim_snprintf((char *)fname, MAXPATHL, "%s.%s.spl",
  						  int_wordlist, spell_enc());
  }
  
--- 2555,2561 ----
  int_wordlist_spl(fname)
      char_u	    *fname;
  {
!     vim_snprintf((char *)fname, MAXPATHL, SPL_FNAME_TMPL,
  						  int_wordlist, spell_enc());
  }
  
***************
*** 2785,2792 ****
  	if (lp->sl_fname == NULL)
  	    goto endFAIL;
  
! 	/* Check for .add.spl. */
! 	lp->sl_add = strstr((char *)gettail(fname), ".add.") != NULL;
      }
      else
  	lp = old_lp;
--- 2810,2817 ----
  	if (lp->sl_fname == NULL)
  	    goto endFAIL;
  
! 	/* Check for .add.spl (_add.spl for VMS). */
! 	lp->sl_add = strstr((char *)gettail(fname), SPL_FNAME_ADD) != NULL;
      }
      else
  	lp = old_lp;
***************
*** 9109,9116 ****
  	    /* For ":mkspell path/vim" output file is "path/vim.latin1.spl". */
  	    innames = &fnames[0];
  	    incount = 1;
! 	    vim_snprintf((char *)wfname, sizeof(wfname), "%s.%s.spl", fnames[0],
! 			     spin.si_ascii ? (char_u *)"ascii" : spell_enc());
  	}
  	else if (len > 4 && STRCMP(fnames[0] + len - 4, ".spl") == 0)
  	{
--- 9134,9141 ----
  	    /* For ":mkspell path/vim" output file is "path/vim.latin1.spl". */
  	    innames = &fnames[0];
  	    incount = 1;
! 	    vim_snprintf((char *)wfname, sizeof(wfname), SPL_FNAME_TMPL,
! 		  fnames[0], spin.si_ascii ? (char_u *)"ascii" : spell_enc());
  	}
  	else if (len > 4 && STRCMP(fnames[0] + len - 4, ".spl") == 0)
  	{
***************
*** 9119,9133 ****
  	}
  	else
  	    /* Name should be language, make the file name from it. */
! 	    vim_snprintf((char *)wfname, sizeof(wfname), "%s.%s.spl", fnames[0],
! 			     spin.si_ascii ? (char_u *)"ascii" : spell_enc());
  
  	/* Check for .ascii.spl. */
! 	if (strstr((char *)gettail(wfname), ".ascii.") != NULL)
  	    spin.si_ascii = TRUE;
  
  	/* Check for .add.spl. */
! 	if (strstr((char *)gettail(wfname), ".add.") != NULL)
  	    spin.si_add = TRUE;
      }
  
--- 9144,9158 ----
  	}
  	else
  	    /* Name should be language, make the file name from it. */
! 	    vim_snprintf((char *)wfname, sizeof(wfname), SPL_FNAME_TMPL,
! 		  fnames[0], spin.si_ascii ? (char_u *)"ascii" : spell_enc());
  
  	/* Check for .ascii.spl. */
! 	if (strstr((char *)gettail(wfname), SPL_FNAME_ASCII) != NULL)
  	    spin.si_ascii = TRUE;
  
  	/* Check for .add.spl. */
! 	if (strstr((char *)gettail(wfname), SPL_FNAME_ADD) != NULL)
  	    spin.si_add = TRUE;
      }
  
*** ../vim-7.3.079/src/version.c	2010-12-08 14:54:58.000000000 +0100
--- src/version.c	2010-12-08 16:58:03.000000000 +0100
***************
*** 716,717 ****
--- 716,719 ----
  {   /* Add new patch number below this line */
+ /**/
+     80,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
5. You find yourself brainstorming for new subjects to search.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///