KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

227 lines
9.9KB

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