annotate runtime/syntax/dcd.vim @ 17417:aa4532c1d001 v8.1.1707

patch 8.1.1707: Coverity warns for possibly using a NULL pointer commit https://github.com/vim/vim/commit/cfdbc5adde49cbab939e8164555ed0b8d9ce000b Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jul 17 21:27:52 2019 +0200 patch 8.1.1707: Coverity warns for possibly using a NULL pointer Problem: Coverity warns for possibly using a NULL pointer. Solution: Change the logic to make sure no NULL pointer is used.
author Bram Moolenaar <Bram@vim.org>
date Wed, 17 Jul 2019 21:30:04 +0200
parents 46763b01cd9a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: WildPackets EtherPeek Decoder (.dcd) file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Christopher Shinn <christopher@lucent.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 2003 Apr 25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
6 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
7 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " Keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 syn keyword dcdFunction DCod TRTS TNXT CRLF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 syn match dcdFunction display "\(STR\)\#"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 syn keyword dcdLabel LABL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syn region dcdLabel start="[A-Z]" end=";"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn keyword dcdConditional CEQU CNEQ CGTE CLTE CBIT CLSE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn keyword dcdConditional LSTS LSTE LSTZ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn keyword dcdConditional TYPE TTST TEQU TNEQ TGTE TLTE TBIT TLSE TSUB SKIP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword dcdConditional MARK WHOA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword dcdConditional SEQU SNEQ SGTE SLTE SBIT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn match dcdConditional display "\(CST\)\#" "\(TST\)\#"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn keyword dcdDisplay HBIT DBIT BBIT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword dcdDisplay HBYT DBYT BBYT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword dcdDisplay HWRD DWRD BWRD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword dcdDisplay HLNG DLNG BLNG
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword dcdDisplay D64B
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match dcdDisplay display "\(HEX\)\#" "\(CHR\)\#" "\(EBC\)\#"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn keyword dcdDisplay HGLB DGLB BGLB
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword dcdDisplay DUMP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword dcdStatement IPLG IPV6 ATLG AT03 AT01 ETHR TRNG PRTO PORT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn keyword dcdStatement TIME OSTP PSTR CSTR NBNM DMPE FTPL CKSM FCSC
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn keyword dcdStatement GBIT GBYT GWRD GLNG
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword dcdStatement MOVE ANDG ORRG NOTG ADDG SUBG MULG DIVG MODG INCR DECR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn keyword dcdSpecial PRV1 PRV2 PRV3 PRV4 PRV5 PRV6 PRV7 PRV8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn region dcdComment start="\*" end="\;"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
40 " Only when an item doesn't have highlighting yet
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
42 hi def link dcdFunction Identifier
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
43 hi def link dcdLabel Constant
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
44 hi def link dcdConditional Conditional
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
45 hi def link dcdDisplay Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
46 hi def link dcdStatement Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
47 hi def link dcdSpecial Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
48 hi def link dcdComment Comment
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 let b:current_syntax = "dcd"