File: m_c.fte

package info (click to toggle)
efte 1.1-6
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,904 kB
  • sloc: cpp: 43,587; ansic: 1,228; makefile: 271; objc: 92; sh: 40
file content (194 lines) | stat: -rw-r--r-- 3,122 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# C mode

colorize C {
    SyntaxParser = 'C';

    color {
	{ 'Normal',	   'Editor_Default' },
	{ 'Number',	   'Lang_DecimalNumber' },
	{ 'HexNumber',	   'Lang_HexNumber' },
	{ 'Punctuation',   'Lang_Punctuation' },
	{ 'String',	   'Lang_String' },
	{ 'Comment',	   'Lang_Comment' },
	{ 'CPreprocessor', 'Lang_Preprocessor' },
	{ 'Function',	   'Lang_Function' },
	{ 'Label',	   'Lang_Label' },
    };

    keyword 'Editor_Keywords' { # any missing ?
        # standard C keywords
	'asm',
	'break',
	'case',
	'const',
	'continue',
	'default',
	'do',
	'else',
	'enum',
	'extern',
	'for',
	'goto',
	'if',
	'inline',
	'return',
	'sizeof',
	'struct',
	'switch',
	'typedef',
	'union',
        'while',

	# C++ keywords
	'catch',
	'class',
	'const_cast',
	'delete',
	'dynamic_cast',
	'export',
	'except',
	'explicit',
	'friend',
	'finally',
	'namespace',
	'new',
	'operator',
	'private',
	'protected',
	'public',
	'reinterpret_cast',
	'static_cast',
	'template',
	'this',
	'throw',
	'try',
	'typeid',
	'type_info',
	'typename',
	'typeof',
	'using',
	'virtual',
	'and',
	'and_eq',
	'bad_cast',
	'bad_typeid',
	'bitand',
	'bitor',
	'compl',
	'not',
	'not_eq',
	'or',
	'or_eq',
	'xor',
	'xor_eq',

	# types
	'auto',
	'char',
	'double',
	'float',
	'int',
	'int16_t',
	'int32_t',
	'int64_t',
	'int8_t',
	'long',
	'off_t',
	'ptrdiff_t',
	'register',
	'short',
	'signed',
	'size_t',
	'ssize_t',
	'static',
	'time_t',
	'uint',
	'uint16_t',
	'uint32_t',
	'uint64_t',
	'uint8_t',
	'unsigned',
	'void',
	'volatile',

	# types C++
	'mutable',
	'bool',

	# wide char (from new C/C++ 1998/1999 standards):
	'wchar_t',

	'cdecl',
	'pascal',
	'_asm',
	'__asm',
	'_far16',
	'__far16',
	'_pascal',
	'_cdecl',
	'__cdecl',
	'_export',
	'__pascal',
	'_stdcall',
	'_syscall',
	'__stdcall',
	'__syscall',
	'_fastcall',
	'__fastcall',
	'__export',
	# some gcc extensions
	'__asm__',
	'__attribute__',
	'__format__',
	'__printf__',
    };
    # show these as numbers
    # True, TRUE, False, FALSE, NULL are commonly defined values
    # but they are not part of C lang
    keyword 'Lang_DecimalNumber' {
	'true',
	'True',
	'TRUE',
	'false',
	'False',
	'FALSE',
	'NULL',
    };

}

mode C: SOURCE {      # C/C++ Mode
    FileNameRx		= /\.\c{c|h|{cpp}|{cxx}|{hpp}|{cc}|{cu}|m|{mm}|{xs}}$/;
    HilitOn		= 1;
    Colorizer		= 'C';
    AutoIndent		= 1;
    IndentMode		= 'C';
    MatchCase		= 1;
    Trim		= 1;
    MultiLineHilit	= 1;
    AutoHilitParen	= 1;

#    RoutineRegexp	 = /^\w[\w_:*&~]+[\w\\s_:*&~]@\(.*\){\s*\{}?\s*$/;
    RoutineRegexp	= /^\w[\w_:*&~]+[\w\s_:*&~]@\([^;]*$/;
#	RoutineRx      ^\w[\w_:*&]+[\w\s_:*&]@\(
#	RoutineRx      ^{[a-zA-Z0-9_:*&]#\s*}+\(

    SaveFolds		= 2;	  # save fold info at end of line
    CommentStart	= ' /*';
    CommentEnd		= '*/';
%if(UI_KB)
    TabSize		= 8; # think twice before changing this, historically
			     # it's been known to cause a mess in sources ;-)
    SpaceTabs		= 0;
    IndentWithTabs	= 1;
    CursorThroughTabs	= 1;
    DeleteKillTab	= 0;
    DeleteKillBlock	= 0;
    BackSpKillTab	= 0;
    BackSpUnindents	= 0;
    Abbreviations	= 1;
    UndoMoves		= 0;
%endif
}

oinclude 'mym_c.fte';