patch 9.1.0972: filetype: TI linker map files are not recognized
Problem: filetype: TI linker map files are not recognized
Solution: detect TI linker map files as lnkmap filetype
(Wu, Zhenyu)
References:
https://downloads.ti.com/docs/esd/SPRUI03A/Content/SPRUI03A_HTML/linker_description.html
closes: #16324
Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index f449d0d..0f05d19 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -463,7 +463,6 @@
mallard: ['file.page'],
man: ['file.man'],
manconf: ['/etc/man.conf', 'man.config', 'any/etc/man.conf'],
- map: ['file.map'],
maple: ['file.mv', 'file.mpl', 'file.mws'],
markdown: ['file.markdown', 'file.mdown', 'file.mkd', 'file.mkdn', 'file.mdwn', 'file.md'],
masm: ['file.masm'],
@@ -2774,6 +2773,24 @@
filetype off
endfunc
+func Test_map_file()
+ filetype on
+
+ " TI linker map file
+ call writefile(['******************************************************************************', ' TMS320C6x Linker Unix v7.4.24 ', '******************************************************************************'], 'Xfile.map', 'D')
+ split Xfile.map
+ call assert_equal('lnkmap', &filetype)
+ bwipe!
+
+ " TI linker map file
+ call writefile(['MAP', 'NAME "local-demo"', 'END'], 'Xfile.map', 'D')
+ split Xfile.map
+ call assert_equal('map', &filetype)
+ bwipe!
+
+ filetype off
+endfunc
+
func Test_org_file()
filetype on
diff --git a/src/version.c b/src/version.c
index b1ce2cc..18a736c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 972,
+/**/
971,
/**/
970,