A tumblelog CMS built on AJAX, PHP and MySQL.

c.php 3.8KB

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