1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Spell doesn't work on VMS.
12 Solution: Use different file names. (Zoltan Bartos, Zoltan Arpadffy)
16 *** ../vim-7.3.079/src/spell.c 2010-12-08 13:11:15.000000000 +0100
17 --- src/spell.c 2010-12-08 17:01:13.000000000 +0100
25 + # define SPL_FNAME_TMPL "%s_%s.spl"
26 + # define SPL_FNAME_ADD "_add."
27 + # define SPL_FNAME_ASCII "_ascii."
29 + # define SPL_FNAME_TMPL "%s.%s.spl"
30 + # define SPL_FNAME_ADD ".add."
31 + # define SPL_FNAME_ASCII ".ascii."
34 /* Flags used for a word. Only the lowest byte can be used, the region byte
36 #define WF_REGION 0x01 /* region byte follows */
39 * Find the first spell file for "lang" in 'runtimepath' and load it.
41 vim_snprintf((char *)fname_enc, sizeof(fname_enc) - 5,
42 ! "spell/%s.%s.spl", lang, spell_enc());
43 r = do_in_runtimepath(fname_enc, FALSE, spell_load_cb, &sl);
45 if (r == FAIL && *sl.sl_lang != NUL)
47 /* Try loading the ASCII version. */
48 vim_snprintf((char *)fname_enc, sizeof(fname_enc) - 5,
49 ! "spell/%s.ascii.spl", lang);
50 r = do_in_runtimepath(fname_enc, FALSE, spell_load_cb, &sl);
54 * Find the first spell file for "lang" in 'runtimepath' and load it.
56 vim_snprintf((char *)fname_enc, sizeof(fname_enc) - 5,
63 r = do_in_runtimepath(fname_enc, FALSE, spell_load_cb, &sl);
65 if (r == FAIL && *sl.sl_lang != NUL)
67 /* Try loading the ASCII version. */
68 vim_snprintf((char *)fname_enc, sizeof(fname_enc) - 5,
70 ! "spell/%s_ascii.spl",
72 ! "spell/%s.ascii.spl",
75 r = do_in_runtimepath(fname_enc, FALSE, spell_load_cb, &sl);
83 ! smsg((char_u *)_("Warning: Cannot find word list \"%s.%s.spl\" or \"%s.ascii.spl\""),
84 lang, spell_enc(), lang);
86 else if (sl.sl_slang != NULL)
93 ! _("Warning: Cannot find word list \"%s_%s.spl\" or \"%s_ascii.spl\""),
95 ! _("Warning: Cannot find word list \"%s.%s.spl\" or \"%s.ascii.spl\""),
97 lang, spell_enc(), lang);
99 else if (sl.sl_slang != NULL)
102 int_wordlist_spl(fname)
105 ! vim_snprintf((char *)fname, MAXPATHL, "%s.%s.spl",
106 int_wordlist, spell_enc());
110 int_wordlist_spl(fname)
113 ! vim_snprintf((char *)fname, MAXPATHL, SPL_FNAME_TMPL,
114 int_wordlist, spell_enc());
119 if (lp->sl_fname == NULL)
122 ! /* Check for .add.spl. */
123 ! lp->sl_add = strstr((char *)gettail(fname), ".add.") != NULL;
128 if (lp->sl_fname == NULL)
131 ! /* Check for .add.spl (_add.spl for VMS). */
132 ! lp->sl_add = strstr((char *)gettail(fname), SPL_FNAME_ADD) != NULL;
138 /* For ":mkspell path/vim" output file is "path/vim.latin1.spl". */
139 innames = &fnames[0];
141 ! vim_snprintf((char *)wfname, sizeof(wfname), "%s.%s.spl", fnames[0],
142 ! spin.si_ascii ? (char_u *)"ascii" : spell_enc());
144 else if (len > 4 && STRCMP(fnames[0] + len - 4, ".spl") == 0)
147 /* For ":mkspell path/vim" output file is "path/vim.latin1.spl". */
148 innames = &fnames[0];
150 ! vim_snprintf((char *)wfname, sizeof(wfname), SPL_FNAME_TMPL,
151 ! fnames[0], spin.si_ascii ? (char_u *)"ascii" : spell_enc());
153 else if (len > 4 && STRCMP(fnames[0] + len - 4, ".spl") == 0)
159 /* Name should be language, make the file name from it. */
160 ! vim_snprintf((char *)wfname, sizeof(wfname), "%s.%s.spl", fnames[0],
161 ! spin.si_ascii ? (char_u *)"ascii" : spell_enc());
163 /* Check for .ascii.spl. */
164 ! if (strstr((char *)gettail(wfname), ".ascii.") != NULL)
165 spin.si_ascii = TRUE;
167 /* Check for .add.spl. */
168 ! if (strstr((char *)gettail(wfname), ".add.") != NULL)
175 /* Name should be language, make the file name from it. */
176 ! vim_snprintf((char *)wfname, sizeof(wfname), SPL_FNAME_TMPL,
177 ! fnames[0], spin.si_ascii ? (char_u *)"ascii" : spell_enc());
179 /* Check for .ascii.spl. */
180 ! if (strstr((char *)gettail(wfname), SPL_FNAME_ASCII) != NULL)
181 spin.si_ascii = TRUE;
183 /* Check for .add.spl. */
184 ! if (strstr((char *)gettail(wfname), SPL_FNAME_ADD) != NULL)
188 *** ../vim-7.3.079/src/version.c 2010-12-08 14:54:58.000000000 +0100
189 --- src/version.c 2010-12-08 16:58:03.000000000 +0100
193 { /* Add new patch number below this line */
199 hundred-and-one symptoms of being an internet addict:
200 5. You find yourself brainstorming for new subjects to search.
202 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
203 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
204 \\\ an exciting new programming language -- http://www.Zimbu.org ///
205 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///