source: documentation/trunk/packages/dokuwiki-2011-05-25a/inc/geshi/c_mac.php@ 25027

Last change on this file since 25027 was 25027, checked in by jmt12, 12 years ago

Adding the packages directory, and within it a configured version of dokuwiki all ready to run

File size: 9.9 KB
Line 
1<?php
2/*************************************************************************************
3 * c_mac.php
4 * ---------
5 * Author: M. Uli Kusterer ([email protected])
6 * Copyright: (c) 2004 M. Uli Kusterer, Nigel McNie (http://qbnz.com/highlighter/)
7 * Release Version: 1.0.8.8
8 * Date Started: 2004/06/04
9 *
10 * C for Macs language file for GeSHi.
11 *
12 * CHANGES
13 * -------
14 * 2008/05/23 (1.0.7.22)
15 * - Added description of extra language features (SF#1970248)
16 * 2004/11/27
17 * - First Release
18 *
19 * TODO (updated 2004/11/27)
20 * -------------------------
21 *
22 *************************************************************************************
23 *
24 * This file is part of GeSHi.
25 *
26 * GeSHi is free software; you can redistribute it and/or modify
27 * it under the terms of the GNU General Public License as published by
28 * the Free Software Foundation; either version 2 of the License, or
29 * (at your option) any later version.
30 *
31 * GeSHi is distributed in the hope that it will be useful,
32 * but WITHOUT ANY WARRANTY; without even the implied warranty of
33 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 * GNU General Public License for more details.
35 *
36 * You should have received a copy of the GNU General Public License
37 * along with GeSHi; if not, write to the Free Software
38 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
39 *
40 ************************************************************************************/
41
42$language_data = array (
43 'LANG_NAME' => 'C (Mac)',
44 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
45 'COMMENT_MULTI' => array('/*' => '*/'),
46 'COMMENT_REGEXP' => array(
47 //Multiline-continued single-line comments
48 1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m',
49 //Multiline-continued preprocessor define
50 2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m'
51 ),
52 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
53 'QUOTEMARKS' => array("'", '"'),
54 'ESCAPE_CHAR' => '',
55 'ESCAPE_REGEXP' => array(
56 //Simple Single Char Escapes
57 1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i",
58 //Hexadecimal Char Specs
59 2 => "#\\\\x[\da-fA-F]{2}#",
60 //Hexadecimal Char Specs
61 3 => "#\\\\u[\da-fA-F]{4}#",
62 //Hexadecimal Char Specs
63 4 => "#\\\\U[\da-fA-F]{8}#",
64 //Octal Char Specs
65 5 => "#\\\\[0-7]{1,3}#"
66 ),
67 'NUMBERS' =>
68 GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B |
69 GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI |
70 GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
71 'KEYWORDS' => array(
72 1 => array(
73 'if', 'return', 'while', 'case', 'continue', 'default',
74 'do', 'else', 'for', 'switch', 'goto'
75 ),
76 2 => array(
77 'NULL', 'false', 'break', 'true', 'enum', 'errno', 'EDOM',
78 'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG',
79 'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG',
80 'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP',
81 'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP',
82 'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN',
83 'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN',
84 'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT',
85 'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR',
86 'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam',
87 'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr',
88 'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC',
89 // Mac-specific constants:
90 'kCFAllocatorDefault'
91 ),
92 3 => array(
93 'printf', 'fprintf', 'snprintf', 'sprintf', 'assert',
94 'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint',
95 'ispunct', 'isspace', 'isupper', 'isxdigit', 'tolower', 'toupper',
96 'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp',
97 'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2',
98 'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp',
99 'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen',
100 'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf',
101 'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf',
102 'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc',
103 'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind',
104 'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs',
105 'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc',
106 'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv',
107 'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat',
108 'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn',
109 'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy',
110 'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime',
111 'asctime', 'ctime', 'gmtime', 'localtime', 'strftime'
112 ),
113 4 => array(
114 'auto', 'char', 'const', 'double', 'float', 'int', 'long',
115 'register', 'short', 'signed', 'static', 'struct',
116 'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf',
117 'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t',
118 'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm', 'wchar_t',
119
120 'int8', 'int16', 'int32', 'int64',
121 'uint8', 'uint16', 'uint32', 'uint64',
122
123 'int_fast8_t', 'int_fast16_t', 'int_fast32_t', 'int_fast64_t',
124 'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t', 'uint_fast64_t',
125
126 'int_least8_t', 'int_least16_t', 'int_least32_t', 'int_least64_t',
127 'uint_least8_t', 'uint_least16_t', 'uint_least32_t', 'uint_least64_t',
128
129 'int8_t', 'int16_t', 'int32_t', 'int64_t',
130 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t',
131
132 'intmax_t', 'uintmax_t', 'intptr_t', 'uintptr_t',
133
134 // Mac-specific types:
135 'CFArrayRef', 'CFDictionaryRef', 'CFMutableDictionaryRef', 'CFBundleRef', 'CFSetRef', 'CFStringRef',
136 'CFURLRef', 'CFLocaleRef', 'CFDateFormatterRef', 'CFNumberFormatterRef', 'CFPropertyListRef',
137 'CFTreeRef', 'CFWriteStreamRef', 'CFCharacterSetRef', 'CFMutableStringRef', 'CFNotificationRef',
138 'CFReadStreamRef', 'CFNull', 'CFAllocatorRef', 'CFBagRef', 'CFBinaryHeapRef',
139 'CFBitVectorRef', 'CFBooleanRef', 'CFDataRef', 'CFDateRef', 'CFMachPortRef', 'CFMessagePortRef',
140 'CFMutableArrayRef', 'CFMutableBagRef', 'CFMutableBitVectorRef', 'CFMutableCharacterSetRef',
141 'CFMutableDataRef', 'CFMutableSetRef', 'CFNumberRef', 'CFPlugInRef', 'CFPlugInInstanceRef',
142 'CFRunLoopRef', 'CFRunLoopObserverRef', 'CFRunLoopSourceRef', 'CFRunLoopTimerRef', 'CFSocketRef',
143 'CFTimeZoneRef', 'CFTypeRef', 'CFUserNotificationRef', 'CFUUIDRef', 'CFXMLNodeRef', 'CFXMLParserRef',
144 'CFXMLTreeRef'
145 ),
146 ),
147 'SYMBOLS' => array(
148 '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':'
149 ),
150 'CASE_SENSITIVE' => array(
151 GESHI_COMMENTS => false,
152 1 => true,
153 2 => true,
154 3 => true,
155 4 => true,
156 ),
157 'STYLES' => array(
158 'KEYWORDS' => array(
159 1 => 'color: #0000ff;',
160 2 => 'color: #0000ff;',
161 3 => 'color: #0000dd;',
162 4 => 'color: #0000ff;'
163 ),
164 'COMMENTS' => array(
165 1 => 'color: #ff0000;',
166 2 => 'color: #339900;',
167 'MULTI' => 'color: #ff0000; font-style: italic;'
168 ),
169 'ESCAPE_CHAR' => array(
170 0 => 'color: #000099; font-weight: bold;',
171 1 => 'color: #000099; font-weight: bold;',
172 2 => 'color: #660099; font-weight: bold;',
173 3 => 'color: #660099; font-weight: bold;',
174 4 => 'color: #660099; font-weight: bold;',
175 5 => 'color: #006699; font-weight: bold;',
176 'HARD' => '',
177 ),
178 'BRACKETS' => array(
179 0 => 'color: #000000;'
180 ),
181 'STRINGS' => array(
182 0 => 'color: #666666;'
183 ),
184 'NUMBERS' => array(
185 0 => 'color: #0000dd;',
186 GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;',
187 GESHI_NUMBER_OCT_PREFIX => 'color: #208080;',
188 GESHI_NUMBER_HEX_PREFIX => 'color: #208080;',
189 GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;',
190 GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;',
191 GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;',
192 GESHI_NUMBER_FLT_NONSCI => 'color:#800080;'
193 ),
194 'METHODS' => array(
195 1 => 'color: #00eeff;',
196 2 => 'color: #00eeff;'
197 ),
198 'SYMBOLS' => array(
199 0 => 'color: #000000;'
200 ),
201 'REGEXPS' => array(
202 ),
203 'SCRIPT' => array(
204 )
205 ),
206 'URLS' => array(
207 1 => '',
208 2 => '',
209 3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAMEL}.html',
210 4 => ''
211 ),
212 'OOLANG' => true,
213 'OBJECT_SPLITTERS' => array(
214 1 => '.',
215 2 => '::'
216 ),
217 'REGEXPS' => array(
218 ),
219 'STRICT_MODE_APPLIES' => GESHI_NEVER,
220 'SCRIPT_DELIMITERS' => array(
221 ),
222 'HIGHLIGHT_STRICT_BLOCK' => array(
223 ),
224 'TAB_WIDTH' => 4
225);
226
227?>
Note: See TracBrowser for help on using the repository browser.