jablonka.czprosek.czf

websvn

Subversion Repositories:
[/] [lib/] [geshi/] [c.php] - Blame information for rev 2

 

Line No. Rev Author Line
11simandl<?php
2/*************************************************************************************
3 * c.php
4 * -----
5 * Author: Nigel McNie (nigel@geshi.org)
6 * Contributors:
7 * - Jack Lloyd (lloyd@randombit.net)
8 * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
9 * Release Version: 1.0.8.1
10 * Date Started: 2004/06/04
11 *
12 * C language file for GeSHi.
13 *
14 * CHANGES
15 * -------
16 * 2008/05/23 (1.0.7.22)
17 * - Added description of extra language features (SF#1970248)
18 * 2004/XX/XX (1.0.4)
19 * - Added a couple of new keywords (Jack Lloyd)
20 * 2004/11/27 (1.0.3)
21 * - Added support for multiple object splitters
22 * 2004/10/27 (1.0.2)
23 * - Added support for URLs
24 * 2004/08/05 (1.0.1)
25 * - Added support for symbols
26 * 2004/07/14 (1.0.0)
27 * - First Release
28 *
29 * TODO (updated 2004/11/27)
30 * -------------------------
31 * - Get a list of inbuilt functions to add (and explore C more
32 * to complete this rather bare language file
33 *
34 *************************************************************************************
35 *
36 * This file is part of GeSHi.
37 *
38 * GeSHi is free software; you can redistribute it and/or modify
39 * it under the terms of the GNU General Public License as published by
40 * the Free Software Foundation; either version 2 of the License, or
41 * (at your option) any later version.
42 *
43 * GeSHi is distributed in the hope that it will be useful,
44 * but WITHOUT ANY WARRANTY; without even the implied warranty of
45 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46 * GNU General Public License for more details.
47 *
48 * You should have received a copy of the GNU General Public License
49 * along with GeSHi; if not, write to the Free Software
50 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
51 *
52 ************************************************************************************/
53 
54$language_data = array (
55 'LANG_NAME' => 'C',
56 'COMMENT_SINGLE' => array(2 => '#'),
57 'COMMENT_MULTI' => array('/*' => '*/'),
58 //Multiline-continued single-line comments
59 'COMMENT_REGEXP' => array(1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m'),
60 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
61 'QUOTEMARKS' => array("'", '"'),
62 'ESCAPE_CHAR' => '\\',
63 'NUMBERS' =>
64 GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B |
65 GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI |
66 GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
67 'KEYWORDS' => array(
68 1 => array(
69 'if', 'return', 'while', 'case', 'continue', 'default',
70 'do', 'else', 'for', 'switch', 'goto'
71 ),
72 2 => array(
73 'null', 'false', 'break', 'true', 'function', 'enum', 'extern', 'inline'
74 ),
75 3 => array(
76 'printf', 'cout'
77 ),
78 4 => array(
79 'auto', 'char', 'const', 'double', 'float', 'int', 'long',
80 'register', 'short', 'signed', 'sizeof', 'static', 'string', 'struct',
81 'typedef', 'union', 'unsigned', 'void', 'volatile', 'wchar_t'
82 ),
83 ),
84 'SYMBOLS' => array(
85 '(', ')', '{', '}', '[', ']',
86 '+', '-', '*', '/', '%',
87 '=', '<', '>',
88 '!', '^', '&', '|',
89 '?', ':',
90 ';', ','
91 ),
92 'CASE_SENSITIVE' => array(
93 GESHI_COMMENTS => false,
94 1 => false,
95 2 => false,
96 3 => false,
97 4 => false,
98 ),
99 'STYLES' => array(
100 'KEYWORDS' => array(
101 1 => 'color: #b1b100;',
102 2 => 'color: #000000; font-weight: bold;',
103 3 => 'color: #000066;',
104 4 => 'color: #993333;'
105 ),
106 'COMMENTS' => array(
107 1 => 'color: #666666; font-style: italic;',
108 2 => 'color: #339933;',
109 'MULTI' => 'color: #808080; font-style: italic;'
110 ),
111 'ESCAPE_CHAR' => array(
112 
113 ),
114 'BRACKETS' => array(
115 
116 ),
117 'STRINGS' => array(
118 
119 ),
120 'NUMBERS' => array(
121 
122 GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;',
123 GESHI_NUMBER_OCT_PREFIX => 'color: #208080;',
124 GESHI_NUMBER_HEX_PREFIX => 'color: #208080;',
125 GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;',
126 GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;',
127 GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;',
128 GESHI_NUMBER_FLT_NONSCI => 'color:#800080;'
129 ),
130 'METHODS' => array(
131 1 => 'color: #202020;',
132 2 => 'color: #202020;'
133 ),
134 'SYMBOLS' => array(
135 
136 ),
137 'REGEXPS' => array(
138 ),
139 'SCRIPT' => array(
140 )
141 ),
142 'URLS' => array(
143 1 => '',
144 2 => '',
145 3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAMEL}.html',
146 4 => ''
147 ),
148 'OOLANG' => true,
149 'OBJECT_SPLITTERS' => array(
150 1 => '.',
151 2 => '::'
152 ),
153 'REGEXPS' => array(
154 ),
155 'STRICT_MODE_APPLIES' => GESHI_NEVER,
156 'SCRIPT_DELIMITERS' => array(
157 ),
158 'HIGHLIGHT_STRICT_BLOCK' => array(
159 ),
160 'TAB_WIDTH' => 4
161);
162 
163?>

Powered by WebSVN 2.2.1