1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE language SYSTEM "language.dtd">
3
<language name="C" section="Sources"
4
version="1.46" kateversion="2.4"
6
extensions="*.c;*.C;*.h"
7
mimetype="text/x-csrc;text/x-c++src;text/x-chdr"
10
##########################################################################
11
## Fixes by Sebastian Pipping (webmaster@hartwork.org)
13
## NOTE: Keep in sync with C++ highlighter! (cpp.xml)
14
##########################################################################
17
<list name="keywords">
20
<item> continue </item>
21
<item> default </item>
34
<item> typedef </item>
46
<item> register </item>
47
<item> restrict </item>
51
<item> unsigned </item>
53
<item> volatile </item>
55
<item> int16_t </item>
56
<item> int32_t </item>
57
<item> int64_t </item>
58
<item> uint8_t </item>
59
<item> uint16_t </item>
60
<item> uint32_t </item>
61
<item> uint64_t </item>
62
<item> wchar_t </item>
63
<item> _Imaginary </item>
64
<item> _Complex </item>
68
<context attribute="Normal Text" lineEndContext="#stay" name="Normal">
70
<RegExpr attribute="Preprocessor" context="Outscoped" String="#\s*if\s+0\s*$" beginRegion="PP" firstNonSpace="true" />
71
<DetectChar context="AfterHash" char="#" firstNonSpace="true" lookAhead="true" />
72
<StringDetect attribute="Region Marker" context="Region Marker" String="//BEGIN" beginRegion="Region1" firstNonSpace="true" />
73
<StringDetect attribute="Region Marker" context="Region Marker" String="//END" endRegion="Region1" firstNonSpace="true" />
74
<keyword attribute="Keyword" context="#stay" String="keywords"/>
75
<keyword attribute="Data Type" context="#stay" String="types"/>
77
<DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="Brace1" />
78
<DetectChar attribute="Symbol" context="#stay" char="}" endRegion="Brace1" />
79
<Float attribute="Float" context="#stay">
80
<AnyChar String="fF" attribute="Float" context="#stay"/>
82
<HlCOct attribute="Octal" context="#stay"/>
83
<HlCHex attribute="Hex" context="#stay"/>
84
<RegExpr attribute="Binary" context="#stay" String="0b[01]+[ul]{0,3}" insensitive="true" />
85
<Int attribute="Decimal" context="#stay" >
86
<StringDetect attribute="Decimal" context="#stay" String="ULL" insensitive="TRUE"/>
87
<StringDetect attribute="Decimal" context="#stay" String="LUL" insensitive="TRUE"/>
88
<StringDetect attribute="Decimal" context="#stay" String="LLU" insensitive="TRUE"/>
89
<StringDetect attribute="Decimal" context="#stay" String="UL" insensitive="TRUE"/>
90
<StringDetect attribute="Decimal" context="#stay" String="LU" insensitive="TRUE"/>
91
<StringDetect attribute="Decimal" context="#stay" String="LL" insensitive="TRUE"/>
92
<StringDetect attribute="Decimal" context="#stay" String="U" insensitive="TRUE"/>
93
<StringDetect attribute="Decimal" context="#stay" String="L" insensitive="TRUE"/>
95
<HlCChar attribute="Char" context="#stay"/>
96
<DetectChar attribute="String" context="String" char="""/>
97
<IncludeRules context="##Doxygen" />
98
<Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/>
99
<Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="*" beginRegion="Comment"/>
100
<AnyChar attribute="Symbol" context="#stay" String=":!%&()+,-/.*<=>?[]|~^;"/>
103
<context attribute="String" lineEndContext="#pop" name="String">
104
<LineContinue attribute="String" context="#stay"/>
105
<HlCStringChar attribute="String Char" context="#stay"/>
106
<DetectChar attribute="String" context="#pop" char="""/>
109
<context attribute="Region Marker" lineEndContext="#pop" name="Region Marker">
112
<context attribute="Comment" lineEndContext="#pop" name="Commentar 1">
113
<LineContinue attribute="Comment" context="#stay"/>
114
<IncludeRules context="##Alerts" />
117
<context attribute="Comment" lineEndContext="#stay" name="Commentar 2">
118
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment"/>
119
<IncludeRules context="##Alerts" />
122
<context attribute="Error" lineEndContext="#pop" name="AfterHash">
123
<RegExpr attribute="Preprocessor" context="Include" String="#\s*(?:include|include_next)" insensitive="true" firstNonSpace="true" />
125
<!-- define, elif, else, endif, error, if, ifdef, ifndef, line, pragma, undef, warning -->
126
<RegExpr attribute="Preprocessor" context="Preprocessor" String="#\s*if(?:def|ndef)?(?=\s+\S)" insensitive="true" beginRegion="PP" firstNonSpace="true" />
127
<RegExpr attribute="Preprocessor" context="Preprocessor" String="#\s*endif" insensitive="true" endRegion="PP" firstNonSpace="true" />
128
<RegExpr attribute="Preprocessor" context="Define" String="#\s*define.*((?=\\))" insensitive="true" firstNonSpace="true" />
130
<!-- folding for apple style #pragma mark - label -->
131
<RegExpr attribute="Preprocessor" context="Preprocessor" String="#\s*pragma\s+mark\s+-\s*$" insensitive="true" firstNonSpace="true" endRegion="pragma_mark" />
132
<RegExpr attribute="Preprocessor" context="Preprocessor" String="#\s*pragma\s+mark" insensitive="true" firstNonSpace="true" endRegion="pragma_mark" beginRegion="pragma_mark" />
134
<RegExpr attribute="Preprocessor" context="Preprocessor" String="#\s*(?:el(?:se|if)|define|undef|line|error|warning|pragma)" insensitive="true" firstNonSpace="true" />
135
<RegExpr attribute="Preprocessor" context="Preprocessor" String="#\s+[0-9]+" insensitive="true" firstNonSpace="true" />
138
<context attribute="Preprocessor" lineEndContext="#pop" name="Include">
139
<LineContinue attribute="Preprocessor" context="#stay"/>
140
<RangeDetect attribute="Prep. Lib" context="#stay" char=""" char1="""/>
141
<RangeDetect attribute="Prep. Lib" context="#stay" char="<" char1=">"/>
142
<IncludeRules context="Preprocessor" />
145
<context attribute="Preprocessor" lineEndContext="#pop" name="Preprocessor">
146
<LineContinue attribute="Preprocessor" context="#stay"/>
147
<IncludeRules context="##Doxygen" />
148
<Detect2Chars attribute="Comment" context="Commentar/Preprocessor" char="/" char1="*" beginRegion="Comment2" />
149
<Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/" />
152
<context attribute="Preprocessor" lineEndContext="#pop" name="Define">
153
<LineContinue attribute="Preprocessor" context="#stay"/>
156
<context attribute="Comment" lineEndContext="#stay" name="Commentar/Preprocessor">
157
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment2" />
160
<context attribute="Comment" lineEndContext="#stay" name="Outscoped" >
162
<IncludeRules context="##Alerts" />
164
<DetectChar attribute="String" context="String" char="""/>
165
<IncludeRules context="##Doxygen" />
166
<Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/>
167
<Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="*" beginRegion="Comment"/>
168
<RegExpr attribute="Comment" context="Outscoped intern" String="#\s*if" beginRegion="PP" firstNonSpace="true" />
169
<RegExpr attribute="Preprocessor" context="#pop" String="#\s*el(?:se|if)" firstNonSpace="true" />
170
<RegExpr attribute="Preprocessor" context="#pop" String="#\s*endif" endRegion="PP" firstNonSpace="true" />
173
<context attribute="Comment" lineEndContext="#stay" name="Outscoped intern">
175
<IncludeRules context="##Alerts" />
177
<DetectChar attribute="String" context="String" char="""/>
178
<IncludeRules context="##Doxygen" />
179
<Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/>
180
<Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="*" beginRegion="Comment"/>
181
<RegExpr attribute="Comment" context="Outscoped intern" String="#\s*if" beginRegion="PP" firstNonSpace="true" />
182
<RegExpr attribute="Comment" context="#pop" String="#\s*endif" endRegion="PP" firstNonSpace="true" />
186
<itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/>
187
<itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/>
188
<itemData name="Data Type" defStyleNum="dsDataType" spellChecking="false"/>
189
<itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false"/>
190
<itemData name="Octal" defStyleNum="dsBaseN" spellChecking="false"/>
191
<itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false"/>
192
<itemData name="Binary" defStyleNum="dsBaseN" spellChecking="false"/>
193
<itemData name="Float" defStyleNum="dsFloat" spellChecking="false"/>
194
<itemData name="Char" defStyleNum="dsChar" spellChecking="false"/>
195
<itemData name="String" defStyleNum="dsString"/>
196
<itemData name="String Char" defStyleNum="dsChar"/>
197
<itemData name="Comment" defStyleNum="dsComment"/>
198
<itemData name="Symbol" defStyleNum="dsNormal" spellChecking="false"/>
199
<itemData name="Preprocessor" defStyleNum="dsOthers" spellChecking="false"/>
200
<itemData name="Prep. Lib" defStyleNum="dsOthers" spellChecking="false"/> <!--,Qt::darkYellow,Qt::yellow,false,false)); -->
201
<itemData name="Alert" defStyleNum="dsAlert" spellChecking="false"/>
202
<itemData name="Region Marker" defStyleNum="dsRegionMarker" spellChecking="false"/>
203
<itemData name="Error" defStyleNum="dsError" spellChecking="false"/>
208
<comment name="singleLine" start="//" />
209
<comment name="multiLine" start="/*" end="*/" />
211
<keywords casesensitive="1" additionalDeliminator="'"" />