# Source for file cpp.php

Documentation is available at cpp.php

    1     <?php
    2     /***********************************************************************************
    3      * cpp.php
    4      * -------
    5      * Author: Dennis Bayer (Dennis.Bayer@mnifh-giessen.de)
    6      * Contributors:
    7      *  - M. Uli Kusterer (witness.of.teachtext@gmx.net)
    8      *  - Jack Lloyd (lloyd@randombit.net)
    9      * Copyright: (c) 2004 Dennis Bayer, Nigel McNie (http://qbnz.com/highlighter)
    10     * Release Version: 1.0.7.3
    11     * CVS Revision Version: $Revision: 1.1 $
    12     * Date Started: 2004/09/27
    13     * Last Modified: $Date: 2006/01/23 09:27:29 $
    14     *
    15     * C++ language file for GeSHi.
    16     *
    17     * CHANGES
    18     * -------
    19     * 2004/XX/XX (1.0.2)
    20     *  -  Added several new keywords (Jack Lloyd)
    21     * 2004/11/27 (1.0.1)
    22     *  -  Added StdCLib function and constant names, changed color scheme to
    23     *     a cleaner one. (M. Uli Kusterer)
    24     *  -  Added support for multiple object splitters
    25     * 2004/10/27 (1.0.0)
    26     *  -  First Release
    27     *
    28     * TODO (updated 2004/11/27)
    29     * -------------------------
    30     *
    31     ************************************************************************************
    32     *
    33     *     This file is part of GeSHi.
    34     *
    35     *   GeSHi is free software; you can redistribute it and/or modify
    36     *   it under the terms of the GNU General Public License as published by
    37     *   the Free Software Foundation; either version 2 of the License, or
    38     *   (at your option) any later version.
    39     *
    40     *   GeSHi is distributed in the hope that it will be useful,
    41     *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    42     *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    43     *   GNU General Public License for more details.
    44     *
    45     *   You should have received a copy of the GNU General Public License
    46     *   along with GeSHi; if not, write to the Free Software
    47     *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    48     *
    49     ************************************************************************************/
    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                'case', 'continue', 'default', 'do', 'else', 'for', 'goto', 'if', 'return',
    61                'switch', 'while'
    62                ),
    63            2 => array(
    64                'NULL', 'false', 'break', 'true', 'enum', 'errno', 'EDOM',
    65                'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG',
    66                'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG',
    67                'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP',
    68                'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP',
    69                'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN',
    70                'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN',
    71                'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT',
    72                'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR',
    73                'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam', 'NULL',
    74                'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr',
    75                'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC',
    76                'virtual', 'public', 'private', 'protected', 'template', 'using', 'namespace',
    77                'try', 'catch', 'inline', 'dynamic_cast', 'const_cast', 'reinterpret_cast',
    78                'static_cast', 'explicit', 'friend', 'wchar_t', 'typename', 'typeid'
    79                ),
    80            3 => array(
    81                'cin', 'cerr', 'clog', 'cout', 'delete', 'new', 'this',
    82                'printf', 'fprintf', 'snprintf', 'sprintf', 'assert',
    83                'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint',
    84                'ispunct', 'isspace', 'ispunct', 'isupper', 'isxdigit', 'tolower', 'toupper',
    85                'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp',
    86                'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2',
    87                'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp', 'asin', 'acos', 'atan', 'atan2',
    88                'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen',
    89                'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf',
    90                'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf',
    91                'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc',
    92                'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind',
    93                'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs',
    94                'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc',
    95                'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv',
    96                'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat',
    97                'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn',
    98                'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy',
    99                'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime',
    100               'asctime', 'ctime', 'gmtime', 'localtime', 'strftime'
    101               ),
    102           4 => array(
    103               'auto', 'bool', 'char', 'const', 'double', 'float', 'int', 'long', 'longint',
    104               'register', 'short', 'shortint', 'signed', 'static', 'struct',
    105               'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf',
    106               'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t',
    107               'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm',
    108               ),
    109           ),
    110       'SYMBOLS' => array(
    111           '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':'
    112           ),
    113       'CASE_SENSITIVE' => array(
    114           GESHI_COMMENTS => true,
    115           1 => false,
    116           2 => false,
    117           3 => false,
    118           4 => false,
    119           ),
    120       'STYLES' => array(
    121           'KEYWORDS' => array(
    122               1 => 'color: #0000ff;',
    123               2 => 'color: #0000ff;',
    124               3 => 'color: #0000dd;',
    125               4 => 'color: #0000ff;'
    126               ),
    127           'COMMENTS' => array(
    128               1 => 'color: #ff0000;',
    129               2 => 'color: #339900;',
    130               'MULTI' => 'color: #ff0000; font-style: italic;'
    131               ),
    132           'ESCAPE_CHAR' => array(
    133               0 => 'color: #666666; font-weight: bold;'
    134               ),
    135           'BRACKETS' => array(
    136               0 => 'color: #000000;'
    137               ),
    138           'STRINGS' => array(
    139               0 => 'color: #666666;'
    140               ),
    141           'NUMBERS' => array(
    142               0 => 'color: #0000dd;'
    143               ),
    144           'METHODS' => array(
    145               1 => 'color: #00eeff;',
    146               2 => 'color: #00eeff;'
    147               ),
    148           'SYMBOLS' => array(
    149               0 => 'color: #000000;'
    150               ),
    151           'REGEXPS' => array(
    152               ),
    153           'SCRIPT' => array(
    154               )
    155           ),
    156       'URLS' => array(
    157           ),
    158       'OOLANG' => true,
    159       'OBJECT_SPLITTERS' => array(
    160           1 => '.',
    161           2 => '::'
    162           ),
    163       'REGEXPS' => array(
    164           ),
    165       'STRICT_MODE_APPLIES' => GESHI_NEVER,
    166       'SCRIPT_DELIMITERS' => array(
    167           ),
    168       'HIGHLIGHT_STRICT_BLOCK' => array(
    169           )
    170   );
    171
    172   ?>

Documentation generated on Thu, 22 Sep 2005 13:47:50 +1200 by phpDocumentor 1.2.3