annotate runtime/spell/ms/main.aap @ 19053:cec4da73951a v8.2.0087

patch 8.2.0087: crash in command line expansion when out of memory Commit: https://github.com/vim/vim/commit/61d7c0d52ca40ab8488c36e619d1e46503affd0b Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 5 14:38:40 2020 +0100 patch 8.2.0087: crash in command line expansion when out of memory Problem: Crash in command line expansion when out of memory. Solution: Check for NULL pointer. Also make ExpandGeneric() static. (Dominique Pelle, closes #5437)
author Bram Moolenaar <Bram@vim.org>
date Sun, 05 Jan 2020 14:45:04 +0100
parents b9e314fe473f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
502
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
1 # Aap recipe for Malay Vim spell files.
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
2
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
3 # Use a freshly compiled Vim if it exists.
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
4 @if os.path.exists('../../../src/vim'):
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
5 VIM = ../../../src/vim
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
6 @else:
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
7 :progsearch VIM vim
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
8
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
9 SPELLDIR = ..
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
10 FILES = ms_MY.aff ms_MY.dic
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
11
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
12 # I do not have a Malay locale, use the Dutch one instead.
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
13 all: $SPELLDIR/ms.latin1.spl $SPELLDIR/ms.utf-8.spl ../README_ms.txt
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
14
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
15 $SPELLDIR/ms.latin1.spl : $FILES
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
16 :sys env LANG=nl_NL.ISO8859-1
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
17 $VIM -u NONE -e -c "mkspell! $SPELLDIR/ms ms_MY" -c q
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
18
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
19 $SPELLDIR/ms.utf-8.spl : $FILES
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
20 :sys env LANG=nl_NL.UTF-8
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
21 $VIM -u NONE -e -c "mkspell! $SPELLDIR/ms ms_MY" -c q
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
22
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
23 ../README_ms.txt : README_ms_MY.txt
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
24 :copy $source $target
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
25
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
26 #
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
27 # Fetching the files from OpenOffice.org.
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
28 #
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
29 OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
30 :attr {fetch = $OODIR/%file%} ms_MY.zip
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
31
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
32 # The files don't depend on the .zip file so that we can delete it.
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
33 # Only download the zip file if the targets don't exist.
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
34 ms_MY.aff ms_MY.dic: {buildcheck=}
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
35 :assertpkg unzip patch
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
36 :fetch ms_MY.zip
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
37 :sys $UNZIP ms_MY.zip
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
38 :delete ms_MY.zip
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 502
diff changeset
39 :sys $VIM ms_MY.aff -u NONE -e -c "set ff=unix" -c update -c q
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 502
diff changeset
40 :sys $VIM ms_MY.dic -u NONE -e -c "set ff=unix" -c update -c q
502
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
41 @if not os.path.exists('ms_MY.orig.aff'):
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
42 :copy ms_MY.aff ms_MY.orig.aff
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
43 @if not os.path.exists('ms_MY.orig.dic'):
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
44 :copy ms_MY.dic ms_MY.orig.dic
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
45 @if os.path.exists('ms_MY.diff'):
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
46 :sys patch <ms_MY.diff
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
47
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
48
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
49 # Generate diff files, so that others can get the OpenOffice files and apply
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
50 # the diffs to get the Vim versions.
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
51
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
52 diff:
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
53 :assertpkg diff
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
54 :sys {force} diff -a -C 1 ms_MY.orig.aff ms_MY.aff >ms_MY.diff
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
55 :sys {force} diff -a -C 1 ms_MY.orig.dic ms_MY.dic >>ms_MY.diff
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
56
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
57
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
58 # Check for updated OpenOffice spell files. When there are changes the
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
59 # ".new.aff" and ".new.dic" files are left behind for manual inspection.
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
60
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
61 check:
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
62 :assertpkg unzip diff
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
63 :fetch ms_MY.zip
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
64 :mkdir tmp
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
65 :cd tmp
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
66 @try:
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
67 @import stat
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
68 :sys $UNZIP ../ms_MY.zip
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
69 :sys {force} diff ../ms_MY.orig.aff ms_MY.aff >d
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
70 @if os.stat('d')[stat.ST_SIZE] > 0:
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
71 :copy ms_MY.aff ../ms_MY.new.aff
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
72 :sys {force} diff ../ms_MY.orig.dic ms_MY.dic >d
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
73 @if os.stat('d')[stat.ST_SIZE] > 0:
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
74 :copy ms_MY.dic ../ms_MY.new.dic
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
75 @finally:
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
76 :cd ..
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
77 :delete {r}{f}{q} tmp
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
78 :delete ms_MY.zip
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
79
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
80
52e76e2b5b65 updated for version 7.0140
vimboss
parents:
diff changeset
81 # vim: set sts=4 sw=4 :