plugins/geshi/geshi/c.php
changeset 0 441963e5b07a
child 2 9e3258dfae15
equal deleted inserted replaced
-1:000000000000 0:441963e5b07a
       
     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.20
       
    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 
       
    52 $language_data = array (
       
    53 	'LANG_NAME' => 'C',
       
    54 	'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
       
    55 	'COMMENT_MULTI' => array('/*' => '*/'),
       
    56 	'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
       
    57 	'QUOTEMARKS' => array("'", '"'),
       
    58 	'ESCAPE_CHAR' => '\\',
       
    59 	'KEYWORDS' => array(
       
    60 		1 => array(
       
    61 			'if', 'return', 'while', 'case', 'continue', 'default',
       
    62 			'do', 'else', 'for', 'switch', 'goto'
       
    63 			),
       
    64 		2 => array(
       
    65 			'null', 'false', 'break', 'true', 'function', 'enum', 'extern', 'inline'
       
    66 			),
       
    67 		3 => array(
       
    68 			'printf', 'cout'
       
    69 			),
       
    70 		4 => array(
       
    71 			'auto', 'char', 'const', 'double',  'float', 'int', 'long',
       
    72 			'register', 'short', 'signed', 'sizeof', 'static', 'string', 'struct',
       
    73 			'typedef', 'union', 'unsigned', 'void', 'volatile', 'wchar_t'
       
    74 			),
       
    75 		),
       
    76 	'SYMBOLS' => array(
       
    77 		'(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':'
       
    78 		),
       
    79 	'CASE_SENSITIVE' => array(
       
    80 		GESHI_COMMENTS => true,
       
    81 		1 => false,
       
    82 		2 => false,
       
    83 		3 => false,
       
    84 		4 => false,
       
    85 		),
       
    86 	'STYLES' => array(
       
    87 		'KEYWORDS' => array(
       
    88 			1 => 'color: #b1b100;',
       
    89 			2 => 'color: #000000; font-weight: bold;',
       
    90 			3 => 'color: #000066;',
       
    91 			4 => 'color: #993333;'
       
    92 			),
       
    93 		'COMMENTS' => array(
       
    94 			1 => 'color: #808080; font-style: italic;',
       
    95 			2 => 'color: #339933;',
       
    96 			'MULTI' => 'color: #808080; font-style: italic;'
       
    97 			),
       
    98 		'ESCAPE_CHAR' => array(
       
    99 			0 => 'color: #000099; font-weight: bold;'
       
   100 			),
       
   101 		'BRACKETS' => array(
       
   102 			0 => 'color: #66cc66;'
       
   103 			),
       
   104 		'STRINGS' => array(
       
   105 			0 => 'color: #ff0000;'
       
   106 			),
       
   107 		'NUMBERS' => array(
       
   108 			0 => 'color: #cc66cc;'
       
   109 			),
       
   110 		'METHODS' => array(
       
   111 			1 => 'color: #202020;',
       
   112 			2 => 'color: #202020;'
       
   113 			),
       
   114 		'SYMBOLS' => array(
       
   115 			0 => 'color: #66cc66;'
       
   116 			),
       
   117 		'REGEXPS' => array(
       
   118 			),
       
   119 		'SCRIPT' => array(
       
   120 			)
       
   121 		),
       
   122 	'URLS' => array(
       
   123 		1 => '',
       
   124 		2 => '',
       
   125 		3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAME}.html',
       
   126 		4 => ''
       
   127 		),
       
   128 	'OOLANG' => true,
       
   129 	'OBJECT_SPLITTERS' => array(
       
   130 		1 => '.',
       
   131 		2 => '::'
       
   132 		),
       
   133 	'REGEXPS' => array(
       
   134 		),
       
   135 	'STRICT_MODE_APPLIES' => GESHI_NEVER,
       
   136 	'SCRIPT_DELIMITERS' => array(
       
   137 		),
       
   138 	'HIGHLIGHT_STRICT_BLOCK' => array(
       
   139         ),
       
   140     'TAB_WIDTH' => 4
       
   141 );
       
   142 
       
   143 ?>