From bcbbf5f3cf79aede22352a3cedbad69e8bb2e609 Mon Sep 17 00:00:00 2001 From: Floorb <132411956+Neetpone@users.noreply.github.com> Date: Fri, 20 Aug 2021 16:53:59 -0400 Subject: [PATCH] Delete geshi --- includes/geshi.php | 4717 ------------------------------ includes/geshi/css.php | 944 ------ includes/geshi/green.php | 68 - includes/geshi/html5.php | 205 -- includes/geshi/java.php | 975 ------ includes/geshi/javascript.php | 170 -- includes/geshi/markdown.php | 107 - includes/geshi/mysql.php | 465 --- includes/geshi/pastedown.php | 107 - includes/geshi/pastedown_old.php | 128 - includes/geshi/php.php | 1115 ------- includes/geshi/prose.php | 82 - includes/geshi/python.php | 237 -- includes/geshi/text.php | 82 - paste.php | 21 - theme/bulma/css/paste.css | 6 +- theme/bulma/view.php | 85 +- 17 files changed, 49 insertions(+), 9465 deletions(-) delete mode 100644 includes/geshi.php delete mode 100644 includes/geshi/css.php delete mode 100644 includes/geshi/green.php delete mode 100644 includes/geshi/html5.php delete mode 100644 includes/geshi/java.php delete mode 100644 includes/geshi/javascript.php delete mode 100644 includes/geshi/markdown.php delete mode 100644 includes/geshi/mysql.php delete mode 100644 includes/geshi/pastedown.php delete mode 100644 includes/geshi/pastedown_old.php delete mode 100644 includes/geshi/php.php delete mode 100644 includes/geshi/prose.php delete mode 100644 includes/geshi/python.php delete mode 100644 includes/geshi/text.php diff --git a/includes/geshi.php b/includes/geshi.php deleted file mode 100644 index 7ce7c0c..0000000 --- a/includes/geshi.php +++ /dev/null @@ -1,4717 +0,0 @@ -, Benny Baumann - * @copyright (C) 2004 - 2007 Nigel McNie, (C) 2007 - 2014 Benny Baumann - * @license http://gnu.org/copyleft/gpl.html GNU GPL - */ - -// -// GeSHi Constants -// You should use these constant names in your programs instead of -// their values - you never know when a value may change in a future -// version -// - -/** The version of this GeSHi file */ -define('GESHI_VERSION', '1.0.8.12'); - -// Define the root directory for the GeSHi code tree -if (!defined('GESHI_ROOT')) { - /** The root directory for GeSHi */ - define('GESHI_ROOT', dirname(__FILE__) . DIRECTORY_SEPARATOR); -} -/** The language file directory for GeSHi - * @access private - */ -define('GESHI_LANG_ROOT', GESHI_ROOT . 'geshi' . DIRECTORY_SEPARATOR); - -// Define if GeSHi should be paranoid about security -if (!defined('GESHI_SECURITY_PARANOID')) { - /** Tells GeSHi to be paranoid about security settings */ - define('GESHI_SECURITY_PARANOID', false); -} - -// Line numbers - use with enable_line_numbers() -/** Use no line numbers when building the result */ -define('GESHI_NO_LINE_NUMBERS', 0); -/** Use normal line numbers when building the result */ -define('GESHI_NORMAL_LINE_NUMBERS', 1); -/** Use fancy line numbers when building the result */ -define('GESHI_FANCY_LINE_NUMBERS', 2); - -// Container HTML type -/** Use nothing to surround the source */ -define('GESHI_HEADER_NONE', 0); -/** Use a "div" to surround the source */ -define('GESHI_HEADER_DIV', 1); -/** Use a "pre" to surround the source */ -define('GESHI_HEADER_PRE', 2); -/** Use a pre to wrap lines when line numbers are enabled or to wrap the whole code. */ -define('GESHI_HEADER_PRE_VALID', 3); -/** - * Use a "table" to surround the source: - * - * - * - * - * - *
$header
$linenumbers
$code>
$footer
- * - * this is essentially only a workaround for Firefox, see sf#1651996 or take a look at - * https://bugzilla.mozilla.org/show_bug.cgi?id=365805 - * @note when linenumbers are disabled this is essentially the same as GESHI_HEADER_PRE - */ -define('GESHI_HEADER_PRE_TABLE', 4); - -// Capatalisation constants -/** Lowercase keywords found */ -define('GESHI_CAPS_NO_CHANGE', 0); -/** Uppercase keywords found */ -define('GESHI_CAPS_UPPER', 1); -/** Leave keywords found as the case that they are */ -define('GESHI_CAPS_LOWER', 2); - -// Link style constants -/** Links in the source in the :link state */ -define('GESHI_LINK', 0); -/** Links in the source in the :hover state */ -define('GESHI_HOVER', 1); -/** Links in the source in the :active state */ -define('GESHI_ACTIVE', 2); -/** Links in the source in the :visited state */ -define('GESHI_VISITED', 3); - -// Important string starter/finisher -// Note that if you change these, they should be as-is: i.e., don't -// write them as if they had been run through htmlentities() -/** The starter for important parts of the source */ -define('GESHI_START_IMPORTANT', ''); -/** The ender for important parts of the source */ -define('GESHI_END_IMPORTANT', ''); - -/**#@+ - * @access private - */ -// When strict mode applies for a language -/** Strict mode never applies (this is the most common) */ -define('GESHI_NEVER', 0); -/** Strict mode *might* apply, and can be enabled or - * disabled by {@link GeSHi->enable_strict_mode()} */ -define('GESHI_MAYBE', 1); -/** Strict mode always applies */ -define('GESHI_ALWAYS', 2); - -// Advanced regexp handling constants, used in language files -/** The key of the regex array defining what to search for */ -define('GESHI_SEARCH', 0); -/** The key of the regex array defining what bracket group in a - * matched search to use as a replacement */ -define('GESHI_REPLACE', 1); -/** The key of the regex array defining any modifiers to the regular expression */ -define('GESHI_MODIFIERS', 2); -/** The key of the regex array defining what bracket group in a - * matched search to put before the replacement */ -define('GESHI_BEFORE', 3); -/** The key of the regex array defining what bracket group in a - * matched search to put after the replacement */ -define('GESHI_AFTER', 4); -/** The key of the regex array defining a custom keyword to use - * for this regexp's html tag class */ -define('GESHI_CLASS', 5); - -/** Used in language files to mark comments */ -define('GESHI_COMMENTS', 0); - -/** some old PHP / PCRE subpatterns only support up to xxx subpatterns in - * regular expressions. Set this to false if your PCRE lib is up to date - * @see GeSHi->optimize_regexp_list() - **/ -define('GESHI_MAX_PCRE_SUBPATTERNS', 500); -/** it's also important not to generate too long regular expressions - * be generous here... but keep in mind, that when reaching this limit we - * still have to close open patterns. 12k should do just fine on a 16k limit. - * @see GeSHi->optimize_regexp_list() - **/ -define('GESHI_MAX_PCRE_LENGTH', 12288); - -//Number format specification -/** Basic number format for integers */ -define('GESHI_NUMBER_INT_BASIC', 1); //Default integers \d+ -/** Enhanced number format for integers like seen in C */ -define('GESHI_NUMBER_INT_CSTYLE', 2); //Default C-Style \d+[lL]? -/** Number format to highlight binary numbers with a suffix "b" */ -define('GESHI_NUMBER_BIN_SUFFIX', 16); //[01]+[bB] -/** Number format to highlight binary numbers with a prefix % */ -define('GESHI_NUMBER_BIN_PREFIX_PERCENT', 32); //%[01]+ -/** Number format to highlight binary numbers with a prefix 0b (C) */ -define('GESHI_NUMBER_BIN_PREFIX_0B', 64); //0b[01]+ -/** Number format to highlight octal numbers with a leading zero */ -define('GESHI_NUMBER_OCT_PREFIX', 256); //0[0-7]+ -/** Number format to highlight octal numbers with a prefix 0o (logtalk) */ -define('GESHI_NUMBER_OCT_PREFIX_0O', 512); //0[0-7]+ -/** Number format to highlight octal numbers with a leading @ (Used in HiSofts Devpac series). */ -define('GESHI_NUMBER_OCT_PREFIX_AT', 1024); //@[0-7]+ -/** Number format to highlight octal numbers with a suffix of o */ -define('GESHI_NUMBER_OCT_SUFFIX', 2048); //[0-7]+[oO] -/** Number format to highlight hex numbers with a prefix 0x */ -define('GESHI_NUMBER_HEX_PREFIX', 4096); //0x[0-9a-fA-F]+ -/** Number format to highlight hex numbers with a prefix $ */ -define('GESHI_NUMBER_HEX_PREFIX_DOLLAR', 8192); //$[0-9a-fA-F]+ -/** Number format to highlight hex numbers with a suffix of h */ -define('GESHI_NUMBER_HEX_SUFFIX', 16384); //[0-9][0-9a-fA-F]*h -/** Number format to highlight floating-point numbers without support for scientific notation */ -define('GESHI_NUMBER_FLT_NONSCI', 65536); //\d+\.\d+ -/** Number format to highlight floating-point numbers without support for scientific notation */ -define('GESHI_NUMBER_FLT_NONSCI_F', 131072); //\d+(\.\d+)?f -/** Number format to highlight floating-point numbers with support for scientific notation (E) and optional leading zero */ -define('GESHI_NUMBER_FLT_SCI_SHORT', 262144); //\.\d+e\d+ -/** Number format to highlight floating-point numbers with support for scientific notation (E) and required leading digit */ -define('GESHI_NUMBER_FLT_SCI_ZERO', 524288); //\d+(\.\d+)?e\d+ -//Custom formats are passed by RX array - -// Error detection - use these to analyse faults -/** No sourcecode to highlight was specified - * @deprecated - */ -define('GESHI_ERROR_NO_INPUT', 1); -/** The language specified does not exist */ -define('GESHI_ERROR_NO_SUCH_LANG', 2); -/** GeSHi could not open a file for reading (generally a language file) */ -define('GESHI_ERROR_FILE_NOT_READABLE', 3); -/** The header type passed to {@link GeSHi->set_header_type()} was invalid */ -define('GESHI_ERROR_INVALID_HEADER_TYPE', 4); -/** The line number type passed to {@link GeSHi->enable_line_numbers()} was invalid */ -define('GESHI_ERROR_INVALID_LINE_NUMBER_TYPE', 5); -/**#@-*/ - - -/** - * The GeSHi Class. - * - * Please refer to the documentation for GeSHi 1.0.X that is available - * at http://qbnz.com/highlighter/documentation.php for more information - * about how to use this class. - * - * @package geshi - * @author Nigel McNie - * @author Benny Baumann - * @copyright (C) 2004 - 2007 Nigel McNie, (C) 2007 - 2014 Benny Baumann - */ -class GeSHi { - - /** - * The source code to highlight - * @var string - */ - protected $source = ''; - - /** - * The language to use when highlighting - * @var string - */ - protected $language = ''; - - /** - * The data for the language used - * @var array - */ - protected $language_data = array(); - - /** - * The path to the language files - * @var string - */ - protected $language_path = GESHI_LANG_ROOT; - - /** - * The error message associated with an error - * @var string - * @todo check err reporting works - */ - protected $error = false; - - /** - * Possible error messages - * @var array - */ - protected $error_messages = array( - GESHI_ERROR_NO_SUCH_LANG => 'GeSHi could not find the language {LANGUAGE} (using path {PATH})', - GESHI_ERROR_FILE_NOT_READABLE => 'The file specified for load_from_file was not readable', - GESHI_ERROR_INVALID_HEADER_TYPE => 'The header type specified is invalid', - GESHI_ERROR_INVALID_LINE_NUMBER_TYPE => 'The line number type specified is invalid' - ); - - /** - * Whether highlighting is strict or not - * @var boolean - */ - protected $strict_mode = false; - - /** - * Whether to use CSS classes in output - * @var boolean - */ - protected $use_classes = false; - - /** - * The type of header to use. Can be one of the following - * values: - * - * - GESHI_HEADER_PRE: Source is outputted in a "pre" HTML element. - * - GESHI_HEADER_DIV: Source is outputted in a "div" HTML element. - * - GESHI_HEADER_NONE: No header is outputted. - * - * @var int - */ - protected $header_type = GESHI_HEADER_PRE; - - /** - * Array of permissions for which lexics should be highlighted - * @var array - */ - protected $lexic_permissions = array( - 'KEYWORDS' => array(), - 'COMMENTS' => array('MULTI' => true), - 'REGEXPS' => array(), - 'ESCAPE_CHAR' => true, - 'BRACKETS' => true, - 'SYMBOLS' => false, - 'STRINGS' => true, - 'NUMBERS' => true, - 'METHODS' => true, - 'SCRIPT' => true - ); - - /** - * The time it took to parse the code - * @var double - */ - protected $time = 0; - - /** - * The content of the header block - * @var string - */ - protected $header_content = ''; - - /** - * The content of the footer block - * @var string - */ - protected $footer_content = ''; - - /** - * The style of the header block - * @var string - */ - protected $header_content_style = ''; - - /** - * The style of the footer block - * @var string - */ - protected $footer_content_style = ''; - - /** - * Tells if a block around the highlighted source should be forced - * if not using line numbering - * @var boolean - */ - protected $force_code_block = false; - - /** - * The styles for hyperlinks in the code - * @var array - */ - protected $link_styles = array(); - - /** - * Whether important blocks should be recognised or not - * @var boolean - * @deprecated - * @todo REMOVE THIS FUNCTIONALITY! - */ - protected $enable_important_blocks = false; - - /** - * Styles for important parts of the code - * @var string - * @deprecated - * @todo As above - rethink the whole idea of important blocks as it is buggy and - * will be hard to implement in 1.2 - */ - protected $important_styles = 'font-weight: bold; color: red;'; // Styles for important parts of the code - - /** - * Whether CSS IDs should be added to the code - * @var boolean - */ - protected $add_ids = true; - - /** - * Lines that should be highlighted extra - * @var array - */ - protected $highlight_extra_lines = array(); - - /** - * Styles of lines that should be highlighted extra - * @var array - */ - protected $highlight_extra_lines_styles = array(); - - /** - * Styles of extra-highlighted lines - * @var string - */ - protected $highlight_extra_lines_style = 'background-color: #ffc;'; - - /** - * The line ending - * If null, nl2br() will be used on the result string. - * Otherwise, all instances of \n will be replaced with $line_ending - * @var string - */ - protected $line_ending = null; - - /** - * Number at which line numbers should start at - * @var int - */ - protected $line_numbers_start = 1; - - /** - * The overall style for this code block - * @var string - */ - protected $overall_style = 'font-family:Arial, Helvetica, sans-serif;'; - - /** - * The style for the actual code - * @var string - */ - protected $code_style = 'font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;'; - - /** - * The overall class for this code block - * @var string - */ - protected $overall_class = ''; - - /** - * The overall ID for this code block - * @var string - */ - protected $overall_id = ''; - - /** - * Line number styles - * @var string - */ - protected $line_style1 = 'font-weight: normal; vertical-align:top;'; - - /** - * Line number styles for fancy lines - * @var string - */ - protected $line_style2 = 'font-weight: bold; vertical-align:top;'; - - /** - * Style for line numbers when GESHI_HEADER_PRE_TABLE is chosen - * @var string - */ - protected $table_linenumber_style = 'width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;'; - - /** - * Flag for how line numbers are displayed - * @var boolean - */ - protected $line_numbers = GESHI_NO_LINE_NUMBERS; - - /** - * Flag to decide if multi line spans are allowed. Set it to false to make sure - * each tag is closed before and reopened after each linefeed. - * @var boolean - */ - protected $allow_multiline_span = true; - - /** - * The "nth" value for fancy line highlighting - * @var int - */ - protected $line_nth_row = 0; - - /** - * The size of tab stops - * @var int - */ - protected $tab_width = 8; - - /** - * Should we use language-defined tab stop widths? - * @var int - */ - protected $use_language_tab_width = false; - - /** - * Default target for keyword links - * @var string - */ - protected $link_target = ''; - - /** - * The encoding to use for entity encoding - * NOTE: Used with Escape Char Sequences to fix UTF-8 handling (cf. SF#2037598) - * @var string - */ - protected $encoding = 'utf-8'; - - /** - * Should keywords be linked? - * @var boolean - */ - protected $keyword_links = true; - - /** - * Currently loaded language file - * @var string - * @since 1.0.7.22 - */ - protected $loaded_language = ''; - - /** - * Wether the caches needed for parsing are built or not - * - * @var bool - * @since 1.0.8 - */ - protected $parse_cache_built = false; - - /** - * Work around for Suhosin Patch with disabled /e modifier - * - * Note from suhosins author in config file: - *
- * The /e modifier inside preg_replace() allows code execution. - * Often it is the cause for remote code execution exploits. It is wise to - * deactivate this feature and test where in the application it is used. - * The developer using the /e modifier should be made aware that he should - * use preg_replace_callback() instead - *
- * - * @var array - * @since 1.0.8 - */ - protected $_kw_replace_group = 0; - protected $_rx_key = 0; - - /** - * some "callback parameters" for handle_multiline_regexps - * - * @since 1.0.8 - * @access private - * @var string - */ - protected $_hmr_before = ''; - protected $_hmr_replace = ''; - protected $_hmr_after = ''; - protected $_hmr_key = 0; - - /** - * Creates a new GeSHi object, with source and language - * - * @param string $source The source code to highlight - * @param string $language The language to highlight the source with - * @param string $path The path to the language file directory. This - * is deprecated! I've backported the auto path - * detection from the 1.1.X dev branch, so now it - * should be automatically set correctly. If you have - * renamed the language directory however, you will - * still need to set the path using this parameter or - * {@link GeSHi->set_language_path()} - * @since 1.0.0 - */ - public function __construct($source = '', $language = '', $path = '') { - if (is_string($source) && ($source !== '')) { - $this->set_source($source); - } - if (is_string($language) && ($language !== '')) { - $this->set_language($language); - } - - $this->set_language_path($path); - } - - /** - * Returns the version of GeSHi - * - * @return string - * @since 1.0.8.11 - */ - public function get_version() { - return GESHI_VERSION; - } - - /** - * Returns an error message associated with the last GeSHi operation, - * or false if no error has occurred - * - * @return string|false An error message if there has been an error, else false - * @since 1.0.0 - */ - public function error() { - if ($this->error) { - //Put some template variables for debugging here ... - $debug_tpl_vars = array( - '{LANGUAGE}' => $this->language, - '{PATH}' => $this->language_path - ); - $msg = str_replace( - array_keys($debug_tpl_vars), - array_values($debug_tpl_vars), - $this->error_messages[$this->error]); - - return "
GeSHi Error: $msg (code {$this->error})
"; - } - return false; - } - - /** - * Gets a human-readable language name (thanks to Simon Patterson - * for the idea :)) - * - * @return string The name for the current language - * @since 1.0.2 - */ - public function get_language_name() { - if (GESHI_ERROR_NO_SUCH_LANG == $this->error) { - return $this->language_data['LANG_NAME'] . ' (Unknown Language)'; - } - return $this->language_data['LANG_NAME']; - } - - /** - * Sets the source code for this object - * - * @param string $source The source code to highlight - * @since 1.0.0 - */ - public function set_source($source) { - $this->source = $source; - $this->highlight_extra_lines = array(); - } - - /** - * Sets the language for this object - * - * @note since 1.0.8 this function won't reset language-settings by default anymore! - * if you need this set $force_reset = true - * - * @param string $language The name of the language to use - * @param bool $force_reset - * @since 1.0.0 - */ - public function set_language($language, $force_reset = false) { - $this->error = false; - $this->strict_mode = GESHI_NEVER; - - if ($force_reset) { - $this->loaded_language = false; - } - - //Clean up the language name to prevent malicious code injection - $language = preg_replace('#[^a-zA-Z0-9\-_]#', '', $language); - - $language = strtolower($language); - - //Retreive the full filename - $file_name = $this->language_path . $language . '.php'; - if ($file_name == $this->loaded_language) { - // this language is already loaded! - return; - } - - $this->language = $language; - - //Check if we can read the desired file - if (!is_readable($file_name)) { - $this->error = GESHI_ERROR_NO_SUCH_LANG; - return; - } - - // Load the language for parsing - $this->load_language($file_name); - } - - /** - * Sets the path to the directory containing the language files. Note - * that this path is relative to the directory of the script that included - * geshi.php, NOT geshi.php itself. - * - * @param string $path The path to the language directory - * @since 1.0.0 - * @deprecated The path to the language files should now be automatically - * detected, so this method should no longer be needed. The - * 1.1.X branch handles manual setting of the path differently - * so this method will disappear in 1.2.0. - */ - public function set_language_path($path) { - if (strpos($path, ':')) { - //Security Fix to prevent external directories using fopen wrappers. - if (DIRECTORY_SEPARATOR == "\\") { - if (!preg_match('#^[a-zA-Z]:#', $path) || false !== strpos($path, ':', 2)) { - return; - } - } else { - return; - } - } - if (preg_match('#[^/a-zA-Z0-9_\.\-\\\s:]#', $path)) { - //Security Fix to prevent external directories using fopen wrappers. - return; - } - if (GESHI_SECURITY_PARANOID && false !== strpos($path, '/.')) { - //Security Fix to prevent external directories using fopen wrappers. - return; - } - if (GESHI_SECURITY_PARANOID && false !== strpos($path, '..')) { - //Security Fix to prevent external directories using fopen wrappers. - return; - } - if ($path) { - $this->language_path = ('/' == $path[strlen($path) - 1]) ? $path : $path . '/'; - $this->set_language($this->language); // otherwise set_language_path has no effect - } - } - - /** - * Get supported langs or an associative array lang=>full_name. - * @param boolean $full_names - * @return array - */ - public function get_supported_languages($full_names = false) { - // return array - $back = array(); - - // we walk the lang root - $dir = dir($this->language_path); - - // foreach entry - while (false !== ($entry = $dir->read())) { - $full_path = $this->language_path . $entry; - - // Skip all dirs - if (is_dir($full_path)) { - continue; - } - - // we only want lang.php files - if (!preg_match('/^([^.]+)\.php$/', $entry, $matches)) { - continue; - } - - // Raw lang name is here - $langname = $matches[1]; - - // We want the fullname too? - if ($full_names === true) { - if (false !== ($fullname = $this->get_language_fullname($langname))) { - $back[$langname] = $fullname; // we go associative - } - } else { - // just store raw langname - $back[] = $langname; - } - } - - $dir->close(); - - return $back; - } - - /** - * Get full_name for a lang or false. - * @param string $language short langname (html4strict for example) - * @return mixed - */ - public function get_language_fullname($language) { - //Clean up the language name to prevent malicious code injection - $language = preg_replace('#[^a-zA-Z0-9\-_]#', '', $language); - - $language = strtolower($language); - - // get fullpath-filename for a langname - $fullpath = $this->language_path . $language . '.php'; - - // we need to get contents :S - if (false === ($data = file_get_contents($fullpath))) { - $this->error = sprintf('Geshi::get_lang_fullname() Unknown Language: %s', $language); - return false; - } - - // match the langname - if (!preg_match('/\'LANG_NAME\'\s*=>\s*\'((?:[^\']|\\\')+?)\'/', $data, $matches)) { - $this->error = sprintf('Geshi::get_lang_fullname(%s): Regex can not detect language', $language); - return false; - } - - // return fullname for langname - return stripcslashes($matches[1]); - } - - /** - * Sets the type of header to be used. - * - * If GESHI_HEADER_DIV is used, the code is surrounded in a "div".This - * means more source code but more control over tab width and line-wrapping. - * GESHI_HEADER_PRE means that a "pre" is used - less source, but less - * control. Default is GESHI_HEADER_PRE. - * - * From 1.0.7.2, you can use GESHI_HEADER_NONE to specify that no header code - * should be outputted. - * - * @param int $type The type of header to be used - * @since 1.0.0 - */ - public function set_header_type($type) { - //Check if we got a valid header type - if (!in_array($type, array(GESHI_HEADER_NONE, GESHI_HEADER_DIV, - GESHI_HEADER_PRE, GESHI_HEADER_PRE_VALID, GESHI_HEADER_PRE_TABLE))) { - $this->error = GESHI_ERROR_INVALID_HEADER_TYPE; - return; - } - - //Set that new header type - $this->header_type = $type; - } - - /** - * Sets the styles for the code that will be outputted - * when this object is parsed. The style should be a - * string of valid stylesheet declarations - * - * @param string $style The overall style for the outputted code block - * @param boolean $preserve_defaults Whether to merge the styles with the current styles or not - * @since 1.0.0 - */ - public function set_overall_style($style, $preserve_defaults = false) { - if (!$preserve_defaults) { - $this->overall_style = $style; - } else { - $this->overall_style .= $style; - } - } - - /** - * Sets the overall classname for this block of code. This - * class can then be used in a stylesheet to style this object's - * output - * - * @param string $class The class name to use for this block of code - * @since 1.0.0 - */ - public function set_overall_class($class) { - $this->overall_class = $class; - } - - /** - * Sets the overall id for this block of code. This id can then - * be used in a stylesheet to style this object's output - * - * @param string $id The ID to use for this block of code - * @since 1.0.0 - */ - public function set_overall_id($id) { - $this->overall_id = $id; - } - - /** - * Sets whether CSS classes should be used to highlight the source. Default - * is off, calling this method with no arguments will turn it on - * - * @param boolean $flag Whether to turn classes on or not - * @since 1.0.0 - */ - public function enable_classes($flag = true) { - $this->use_classes = (bool)$flag; - } - - /** - * Sets the style for the actual code. This should be a string - * containing valid stylesheet declarations. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * Note: Use this method to override any style changes you made to - * the line numbers if you are using line numbers, else the line of - * code will have the same style as the line number! Consult the - * GeSHi documentation for more information about this. - * - * @param string $style The style to use for actual code - * @param boolean $preserve_defaults Whether to merge the current styles with the new styles - * @since 1.0.2 - */ - public function set_code_style($style, $preserve_defaults = false) { - if (!$preserve_defaults) { - $this->code_style = $style; - } else { - $this->code_style .= $style; - } - } - - /** - * Sets the styles for the line numbers. - * - * @param string $style1 The style for the line numbers that are "normal" - * @param string|boolean $style2 If a string, this is the style of the line - * numbers that are "fancy", otherwise if boolean then this - * defines whether the normal styles should be merged with the - * new normal styles or not - * @param boolean $preserve_defaults If set, is the flag for whether to merge the "fancy" - * styles with the current styles or not - * @since 1.0.2 - */ - public function set_line_style($style1, $style2 = '', $preserve_defaults = false) { - //Check if we got 2 or three parameters - if (is_bool($style2)) { - $preserve_defaults = $style2; - $style2 = ''; - } - - //Actually set the new styles - if (!$preserve_defaults) { - $this->line_style1 = $style1; - $this->line_style2 = $style2; - } else { - $this->line_style1 .= $style1; - $this->line_style2 .= $style2; - } - } - - /** - * Sets whether line numbers should be displayed. - * - * Valid values for the first parameter are: - * - * - GESHI_NO_LINE_NUMBERS: Line numbers will not be displayed - * - GESHI_NORMAL_LINE_NUMBERS: Line numbers will be displayed - * - GESHI_FANCY_LINE_NUMBERS: Fancy line numbers will be displayed - * - * For fancy line numbers, the second parameter is used to signal which lines - * are to be fancy. For example, if the value of this parameter is 5 then every - * 5th line will be fancy. - * - * @param int $flag How line numbers should be displayed - * @param int $nth_row Defines which lines are fancy - * @since 1.0.0 - */ - public function enable_line_numbers($flag, $nth_row = 5) { - if (GESHI_NO_LINE_NUMBERS != $flag && GESHI_NORMAL_LINE_NUMBERS != $flag - && GESHI_FANCY_LINE_NUMBERS != $flag) { - $this->error = GESHI_ERROR_INVALID_LINE_NUMBER_TYPE; - } - $this->line_numbers = $flag; - $this->line_nth_row = $nth_row; - } - - /** - * Sets wether spans and other HTML markup generated by GeSHi can - * span over multiple lines or not. Defaults to true to reduce overhead. - * Set it to false if you want to manipulate the output or manually display - * the code in an ordered list. - * - * @param boolean $flag Wether multiline spans are allowed or not - * @since 1.0.7.22 - */ - public function enable_multiline_span($flag) { - $this->allow_multiline_span = (bool)$flag; - } - - /** - * Get current setting for multiline spans, see GeSHi->enable_multiline_span(). - * - * @return bool - * @see enable_multiline_span - */ - public function get_multiline_span() { - return $this->allow_multiline_span; - } - - /** - * Sets the style for a keyword group. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param int $key The key of the keyword group to change the styles of - * @param string $style The style to make the keywords - * @param boolean $preserve_defaults Whether to merge the new styles with the old or just - * to overwrite them - * @since 1.0.0 - */ - public function set_keyword_group_style($key, $style, $preserve_defaults = false) { - //Set the style for this keyword group - if ('*' == $key) { - foreach ($this->language_data['STYLES']['KEYWORDS'] as $_key => $_value) { - if (!$preserve_defaults) { - $this->language_data['STYLES']['KEYWORDS'][$_key] = $style; - } else { - $this->language_data['STYLES']['KEYWORDS'][$_key] .= $style; - } - } - } else { - if (!$preserve_defaults) { - $this->language_data['STYLES']['KEYWORDS'][$key] = $style; - } else { - $this->language_data['STYLES']['KEYWORDS'][$key] .= $style; - } - } - - //Update the lexic permissions - if (!isset($this->lexic_permissions['KEYWORDS'][$key])) { - $this->lexic_permissions['KEYWORDS'][$key] = true; - } - } - - /** - * Turns highlighting on/off for a keyword group - * - * @param int $key The key of the keyword group to turn on or off - * @param boolean $flag Whether to turn highlighting for that group on or off - * @since 1.0.0 - */ - public function set_keyword_group_highlighting($key, $flag = true) { - $this->lexic_permissions['KEYWORDS'][$key] = (bool)$flag; - } - - /** - * Sets the styles for comment groups. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param int $key The key of the comment group to change the styles of - * @param string $style The style to make the comments - * @param boolean $preserve_defaults Whether to merge the new styles with the old or just - * to overwrite them - * @since 1.0.0 - */ - public function set_comments_style($key, $style, $preserve_defaults = false) { - if ('*' == $key) { - foreach ($this->language_data['STYLES']['COMMENTS'] as $_key => $_value) { - if (!$preserve_defaults) { - $this->language_data['STYLES']['COMMENTS'][$_key] = $style; - } else { - $this->language_data['STYLES']['COMMENTS'][$_key] .= $style; - } - } - } else { - if (!$preserve_defaults) { - $this->language_data['STYLES']['COMMENTS'][$key] = $style; - } else { - $this->language_data['STYLES']['COMMENTS'][$key] .= $style; - } - } - } - - /** - * Turns highlighting on/off for comment groups - * - * @param int $key The key of the comment group to turn on or off - * @param boolean $flag Whether to turn highlighting for that group on or off - * @since 1.0.0 - */ - public function set_comments_highlighting($key, $flag = true) { - $this->lexic_permissions['COMMENTS'][$key] = (bool)$flag; - } - - /** - * Sets the styles for escaped characters. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param string $style The style to make the escape characters - * @param boolean $preserve_defaults Whether to merge the new styles with the old or just - * to overwrite them - * @param int $group Tells the group of symbols for which style should be set. - * @since 1.0.0 - */ - public function set_escape_characters_style($style, $preserve_defaults = false, $group = 0) { - if (!$preserve_defaults) { - $this->language_data['STYLES']['ESCAPE_CHAR'][$group] = $style; - } else { - $this->language_data['STYLES']['ESCAPE_CHAR'][$group] .= $style; - } - } - - /** - * Turns highlighting on/off for escaped characters - * - * @param boolean $flag Whether to turn highlighting for escape characters on or off - * @since 1.0.0 - */ - public function set_escape_characters_highlighting($flag = true) { - $this->lexic_permissions['ESCAPE_CHAR'] = (bool)$flag; - } - - /** - * Sets the styles for brackets. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * This method is DEPRECATED: use set_symbols_style instead. - * This method will be removed in 1.2.X - * - * @param string $style The style to make the brackets - * @param boolean $preserve_defaults Whether to merge the new styles with the old or just - * to overwrite them - * @since 1.0.0 - * @deprecated In favour of set_symbols_style - */ - public function set_brackets_style($style, $preserve_defaults = false) { - if (!$preserve_defaults) { - $this->language_data['STYLES']['BRACKETS'][0] = $style; - } else { - $this->language_data['STYLES']['BRACKETS'][0] .= $style; - } - } - - /** - * Turns highlighting on/off for brackets - * - * This method is DEPRECATED: use set_symbols_highlighting instead. - * This method will be remove in 1.2.X - * - * @param boolean $flag Whether to turn highlighting for brackets on or off - * @since 1.0.0 - * @deprecated In favour of set_symbols_highlighting - */ - public function set_brackets_highlighting($flag) { - $this->lexic_permissions['BRACKETS'] = (bool)$flag; - } - - /** - * Sets the styles for symbols. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param string $style The style to make the symbols - * @param boolean $preserve_defaults Whether to merge the new styles with the old or just - * to overwrite them - * @param int $group Tells the group of symbols for which style should be set. - * @since 1.0.1 - */ - public function set_symbols_style($style, $preserve_defaults = false, $group = 0) { - // Update the style of symbols - if (!$preserve_defaults) { - $this->language_data['STYLES']['SYMBOLS'][$group] = $style; - } else { - $this->language_data['STYLES']['SYMBOLS'][$group] .= $style; - } - - // For backward compatibility - if (0 == $group) { - $this->set_brackets_style($style, $preserve_defaults); - } - } - - /** - * Turns highlighting on/off for symbols - * - * @param boolean $flag Whether to turn highlighting for symbols on or off - * @since 1.0.0 - */ - public function set_symbols_highlighting($flag) { - // Update lexic permissions for this symbol group - $this->lexic_permissions['SYMBOLS'] = (bool)$flag; - - // For backward compatibility - $this->set_brackets_highlighting($flag); - } - - /** - * Sets the styles for strings. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param string $style The style to make the escape characters - * @param boolean $preserve_defaults Whether to merge the new styles with the old or just - * to overwrite them - * @param int $group Tells the group of strings for which style should be set. - * @since 1.0.0 - */ - public function set_strings_style($style, $preserve_defaults = false, $group = 0) { - if (!$preserve_defaults) { - $this->language_data['STYLES']['STRINGS'][$group] = $style; - } else { - $this->language_data['STYLES']['STRINGS'][$group] .= $style; - } - } - - /** - * Turns highlighting on/off for strings - * - * @param boolean $flag Whether to turn highlighting for strings on or off - * @since 1.0.0 - */ - public function set_strings_highlighting($flag) { - $this->lexic_permissions['STRINGS'] = (bool)$flag; - } - - /** - * Sets the styles for strict code blocks. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param string $style The style to make the script blocks - * @param boolean $preserve_defaults Whether to merge the new styles with the old or just - * to overwrite them - * @param int $group Tells the group of script blocks for which style should be set. - * @since 1.0.8.4 - */ - public function set_script_style($style, $preserve_defaults = false, $group = 0) { - // Update the style of symbols - if (!$preserve_defaults) { - $this->language_data['STYLES']['SCRIPT'][$group] = $style; - } else { - $this->language_data['STYLES']['SCRIPT'][$group] .= $style; - } - } - - /** - * Sets the styles for numbers. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param string $style The style to make the numbers - * @param boolean $preserve_defaults Whether to merge the new styles with the old or just - * to overwrite them - * @param int $group Tells the group of numbers for which style should be set. - * @since 1.0.0 - */ - public function set_numbers_style($style, $preserve_defaults = false, $group = 0) { - if (!$preserve_defaults) { - $this->language_data['STYLES']['NUMBERS'][$group] = $style; - } else { - $this->language_data['STYLES']['NUMBERS'][$group] .= $style; - } - } - - /** - * Turns highlighting on/off for numbers - * - * @param boolean $flag Whether to turn highlighting for numbers on or off - * @since 1.0.0 - */ - public function set_numbers_highlighting($flag) { - $this->lexic_permissions['NUMBERS'] = (bool)$flag; - } - - /** - * Sets the styles for methods. $key is a number that references the - * appropriate "object splitter" - see the language file for the language - * you are highlighting to get this number. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param int $key The key of the object splitter to change the styles of - * @param string $style The style to make the methods - * @param boolean $preserve_defaults Whether to merge the new styles with the old or just - * to overwrite them - * @since 1.0.0 - */ - public function set_methods_style($key, $style, $preserve_defaults = false) { - if (!$preserve_defaults) { - $this->language_data['STYLES']['METHODS'][$key] = $style; - } else { - $this->language_data['STYLES']['METHODS'][$key] .= $style; - } - } - - /** - * Turns highlighting on/off for methods - * - * @param boolean $flag Whether to turn highlighting for methods on or off - * @since 1.0.0 - */ - public function set_methods_highlighting($flag) { - $this->lexic_permissions['METHODS'] = (bool)$flag; - } - - /** - * Sets the styles for regexps. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param string $key The style to make the regular expression matches - * @param boolean $style Whether to merge the new styles with the old or just - * to overwrite them - * @param bool $preserve_defaults Whether to merge the new styles with the old or just - * to overwrite them - * @since 1.0.0 - */ - public function set_regexps_style($key, $style, $preserve_defaults = false) { - if (!$preserve_defaults) { - $this->language_data['STYLES']['REGEXPS'][$key] = $style; - } else { - $this->language_data['STYLES']['REGEXPS'][$key] .= $style; - } - } - - /** - * Turns highlighting on/off for regexps - * - * @param int $key The key of the regular expression group to turn on or off - * @param boolean $flag Whether to turn highlighting for the regular expression group on or off - * @since 1.0.0 - */ - public function set_regexps_highlighting($key, $flag) { - $this->lexic_permissions['REGEXPS'][$key] = (bool)$flag; - } - - /** - * Sets whether a set of keywords are checked for in a case sensitive manner - * - * @param int $key The key of the keyword group to change the case sensitivity of - * @param boolean $case Whether to check in a case sensitive manner or not - * @since 1.0.0 - */ - public function set_case_sensitivity($key, $case) { - $this->language_data['CASE_SENSITIVE'][$key] = (bool)$case; - } - - /** - * Sets the case that keywords should use when found. Use the constants: - * - * - GESHI_CAPS_NO_CHANGE: leave keywords as-is - * - GESHI_CAPS_UPPER: convert all keywords to uppercase where found - * - GESHI_CAPS_LOWER: convert all keywords to lowercase where found - * - * @param int $case A constant specifying what to do with matched keywords - * @since 1.0.1 - */ - public function set_case_keywords($case) { - if (in_array($case, array( - GESHI_CAPS_NO_CHANGE, GESHI_CAPS_UPPER, GESHI_CAPS_LOWER))) { - $this->language_data['CASE_KEYWORDS'] = $case; - } - } - - /** - * Sets how many spaces a tab is substituted for - * - * Widths below zero are ignored - * - * @param int $width The tab width - * @since 1.0.0 - */ - public function set_tab_width($width) { - $this->tab_width = intval($width); - - //Check if it fit's the constraints: - if ($this->tab_width < 1) { - //Return it to the default - $this->tab_width = 8; - } - } - - /** - * Sets whether or not to use tab-stop width specifed by language - * - * @param boolean $use Whether to use language-specific tab-stop widths - * @since 1.0.7.20 - */ - public function set_use_language_tab_width($use) { - $this->use_language_tab_width = (bool)$use; - } - - /** - * Returns the tab width to use, based on the current language and user - * preference - * - * @return int Tab width - * @since 1.0.7.20 - */ - public function get_real_tab_width() { - if (!$this->use_language_tab_width || - !isset($this->language_data['TAB_WIDTH'])) { - return $this->tab_width; - } else { - return $this->language_data['TAB_WIDTH']; - } - } - - /** - * Enables/disables strict highlighting. Default is off, calling this - * method without parameters will turn it on. See documentation - * for more details on strict mode and where to use it. - * - * @param boolean $mode Whether to enable strict mode or not - * @since 1.0.0 - */ - public function enable_strict_mode($mode = true) { - if (GESHI_MAYBE == $this->language_data['STRICT_MODE_APPLIES']) { - $this->strict_mode = ($mode) ? GESHI_ALWAYS : GESHI_NEVER; - } - } - - /** - * Disables all highlighting - * - * @since 1.0.0 - * @todo Rewrite with array traversal - * @deprecated In favour of enable_highlighting - */ - public function disable_highlighting() { - $this->enable_highlighting(false); - } - - /** - * Enables all highlighting - * - * The optional flag parameter was added in version 1.0.7.21 and can be used - * to enable (true) or disable (false) all highlighting. - * - * @param boolean $flag A flag specifying whether to enable or disable all highlighting - * @since 1.0.0 - * @todo Rewrite with array traversal - */ - public function enable_highlighting($flag = true) { - $flag = (bool)$flag; - foreach ($this->lexic_permissions as $key => $value) { - if (is_array($value)) { - foreach ($value as $k => $v) { - $this->lexic_permissions[$key][$k] = $flag; - } - } else { - $this->lexic_permissions[$key] = $flag; - } - } - - // Context blocks - $this->enable_important_blocks = $flag; - } - - /** - * Given a file extension, this method returns either a valid geshi language - * name, or the empty string if it couldn't be found - * - * @param string $extension The extension to get a language name for - * @param array $lookup A lookup array to use instead of the default one - * @return int|string - * @todo Re-think about how this method works (maybe make it private and/or make it - * a extension->lang lookup?) - * @since 1.0.5 - */ - public static function get_language_name_from_extension($extension, $lookup = array()) { - $extension = strtolower($extension); - - if (!is_array($lookup) || empty($lookup)) { - $lookup = array( - '6502acme' => array('a', 's', 'asm', 'inc'), - '6502tasm' => array('a', 's', 'asm', 'inc'), - '6502kickass' => array('a', 's', 'asm', 'inc'), - '68000devpac' => array('a', 's', 'asm', 'inc'), - 'abap' => array('abap'), - 'actionscript' => array('as'), - 'ada' => array('a', 'ada', 'adb', 'ads'), - 'apache' => array('conf'), - 'asm' => array('ash', 'asm', 'inc'), - 'asp' => array('asp'), - 'bash' => array('sh'), - 'bf' => array('bf'), - 'c' => array('c', 'h'), - 'c_mac' => array('c', 'h'), - 'caddcl' => array(), - 'cadlisp' => array(), - 'cdfg' => array('cdfg'), - 'cobol' => array('cbl'), - 'cpp' => array('cpp', 'hpp', 'C', 'H', 'CPP', 'HPP'), - 'csharp' => array('cs'), - 'css' => array('css'), - 'd' => array('d'), - 'delphi' => array('dpk', 'dpr', 'pp', 'pas'), - 'diff' => array('diff', 'patch'), - 'dos' => array('bat', 'cmd'), - 'gdb' => array('kcrash', 'crash', 'bt'), - 'gettext' => array('po', 'pot'), - 'gml' => array('gml'), - 'gnuplot' => array('plt'), - 'groovy' => array('groovy'), - 'haskell' => array('hs'), - 'haxe' => array('hx'), - 'html4strict' => array('html', 'htm'), - 'ini' => array('ini', 'desktop'), - 'java' => array('java'), - 'javascript' => array('js'), - 'klonec' => array('kl1'), - 'klonecpp' => array('klx'), - 'latex' => array('tex'), - 'lisp' => array('lisp'), - 'lua' => array('lua'), - 'matlab' => array('m'), - 'mpasm' => array(), - 'mysql' => array('sql'), - 'nsis' => array(), - 'objc' => array(), - 'oobas' => array(), - 'oracle8' => array(), - 'oracle10' => array(), - 'pascal' => array('pas'), - 'perl' => array('pl', 'pm'), - 'php' => array('php', 'php5', 'phtml', 'phps'), - 'povray' => array('pov'), - 'providex' => array('pvc', 'pvx'), - 'prolog' => array('pl'), - 'python' => array('py'), - 'qbasic' => array('bi'), - 'reg' => array('reg'), - 'ruby' => array('rb'), - 'sas' => array('sas'), - 'scala' => array('scala'), - 'scheme' => array('scm'), - 'scilab' => array('sci'), - 'smalltalk' => array('st'), - 'smarty' => array(), - 'tcl' => array('tcl'), - 'text' => array('txt'), - 'vb' => array('bas'), - 'vbnet' => array(), - 'visualfoxpro' => array(), - 'whitespace' => array('ws'), - 'xml' => array('xml', 'svg', 'xrc'), - 'z80' => array('z80', 'asm', 'inc') - ); - } - - foreach ($lookup as $lang => $extensions) { - if (in_array($extension, $extensions)) { - return $lang; - } - } - - return 'text'; - } - - /** - * Given a file name, this method loads its contents in, and attempts - * to set the language automatically. An optional lookup table can be - * passed for looking up the language name. If not specified a default - * table is used - * - * The language table is in the form - *
array(
-     *   'lang_name' => array('extension', 'extension', ...),
-     *   'lang_name' ...
-     * );
- * - * @param string $file_name The filename to load the source from - * @param array $lookup A lookup array to use instead of the default one - * @todo Complete rethink of this and above method - * @since 1.0.5 - */ - public function load_from_file($file_name, $lookup = array()) { - if (is_readable($file_name)) { - $this->set_source(file_get_contents($file_name)); - $this->set_language(self::get_language_name_from_extension(substr(strrchr($file_name, '.'), 1), $lookup)); - } else { - $this->error = GESHI_ERROR_FILE_NOT_READABLE; - } - } - - /** - * Adds a keyword to a keyword group for highlighting - * - * @param int $key The key of the keyword group to add the keyword to - * @param string $word The word to add to the keyword group - * @since 1.0.0 - */ - public function add_keyword($key, $word) { - if (!is_array($this->language_data['KEYWORDS'][$key])) { - $this->language_data['KEYWORDS'][$key] = array(); - } - if (!in_array($word, $this->language_data['KEYWORDS'][$key])) { - $this->language_data['KEYWORDS'][$key][] = $word; - - //NEW in 1.0.8 don't recompile the whole optimized regexp, simply append it - if ($this->parse_cache_built) { - $subkey = count($this->language_data['CACHED_KEYWORD_LISTS'][$key]) - 1; - $this->language_data['CACHED_KEYWORD_LISTS'][$key][$subkey] .= '|' . preg_quote($word, '/'); - } - } - } - - /** - * Removes a keyword from a keyword group - * - * @param int $key The key of the keyword group to remove the keyword from - * @param string $word The word to remove from the keyword group - * @param bool $recompile Wether to automatically recompile the optimized regexp list or not. - * Note: if you set this to false and @see GeSHi->parse_code() was already called once, - * for the current language, you have to manually call @see GeSHi->optimize_keyword_group() - * or the removed keyword will stay in cache and still be highlighted! On the other hand - * it might be too expensive to recompile the regexp list for every removal if you want to - * remove a lot of keywords. - * @since 1.0.0 - */ - public function remove_keyword($key, $word, $recompile = true) { - $key_to_remove = array_search($word, $this->language_data['KEYWORDS'][$key]); - if ($key_to_remove !== false) { - unset($this->language_data['KEYWORDS'][$key][$key_to_remove]); - - //NEW in 1.0.8, optionally recompile keyword group - if ($recompile && $this->parse_cache_built) { - $this->optimize_keyword_group($key); - } - } - } - - /** - * Creates a new keyword group - * - * @param int $key The key of the keyword group to create - * @param string $styles The styles for the keyword group - * @param boolean $case_sensitive Whether the keyword group is case sensitive ornot - * @param array $words The words to use for the keyword group - * @return bool - * @since 1.0.0 - */ - public function add_keyword_group($key, $styles, $case_sensitive = true, $words = array()) { - $words = (array)$words; - if (empty($words)) { - // empty word lists mess up highlighting - return false; - } - - //Add the new keyword group internally - $this->language_data['KEYWORDS'][$key] = $words; - $this->lexic_permissions['KEYWORDS'][$key] = true; - $this->language_data['CASE_SENSITIVE'][$key] = $case_sensitive; - $this->language_data['STYLES']['KEYWORDS'][$key] = $styles; - - //NEW in 1.0.8, cache keyword regexp - if ($this->parse_cache_built) { - $this->optimize_keyword_group($key); - } - return true; - } - - /** - * Removes a keyword group - * - * @param int $key The key of the keyword group to remove - * @since 1.0.0 - */ - public function remove_keyword_group($key) { - //Remove the keyword group internally - unset($this->language_data['KEYWORDS'][$key]); - unset($this->lexic_permissions['KEYWORDS'][$key]); - unset($this->language_data['CASE_SENSITIVE'][$key]); - unset($this->language_data['STYLES']['KEYWORDS'][$key]); - - //NEW in 1.0.8 - unset($this->language_data['CACHED_KEYWORD_LISTS'][$key]); - } - - /** - * compile optimized regexp list for keyword group - * - * @param int $key The key of the keyword group to compile & optimize - * @since 1.0.8 - */ - public function optimize_keyword_group($key) { - $this->language_data['CACHED_KEYWORD_LISTS'][$key] = - $this->optimize_regexp_list($this->language_data['KEYWORDS'][$key]); - $space_as_whitespace = false; - if (isset($this->language_data['PARSER_CONTROL'])) { - if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS'])) { - if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS']['SPACE_AS_WHITESPACE'])) { - $space_as_whitespace = $this->language_data['PARSER_CONTROL']['KEYWORDS']['SPACE_AS_WHITESPACE']; - } - if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS'][$key]['SPACE_AS_WHITESPACE'])) { - if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS'][$key]['SPACE_AS_WHITESPACE'])) { - $space_as_whitespace = $this->language_data['PARSER_CONTROL']['KEYWORDS'][$key]['SPACE_AS_WHITESPACE']; - } - } - } - } - if ($space_as_whitespace) { - foreach ($this->language_data['CACHED_KEYWORD_LISTS'][$key] as $rxk => $rxv) { - $this->language_data['CACHED_KEYWORD_LISTS'][$key][$rxk] = - str_replace(" ", "\\s+", $rxv); - } - } - } - - /** - * Sets the content of the header block - * - * @param string $content The content of the header block - * @since 1.0.2 - */ - public function set_header_content($content) { - $this->header_content = $content; - } - - /** - * Sets the content of the footer block - * - * @param string $content The content of the footer block - * @since 1.0.2 - */ - public function set_footer_content($content) { - $this->footer_content = $content; - } - - /** - * Sets the style for the header content - * - * @param string $style The style for the header content - * @since 1.0.2 - */ - public function set_header_content_style($style) { - $this->header_content_style = $style; - } - - /** - * Sets the style for the footer content - * - * @param string $style The style for the footer content - * @since 1.0.2 - */ - public function set_footer_content_style($style) { - $this->footer_content_style = $style; - } - - /** - * Sets whether to force a surrounding block around - * the highlighted code or not - * - * @param boolean $flag Tells whether to enable or disable this feature - * @since 1.0.7.20 - */ - public function enable_inner_code_block($flag) { - $this->force_code_block = (bool)$flag; - } - - /** - * Sets the base URL to be used for keywords - * - * @param int $group The key of the keyword group to set the URL for - * @param string $url The URL to set for the group. If {FNAME} is in - * the url somewhere, it is replaced by the keyword - * that the URL is being made for - * @since 1.0.2 - */ - public function set_url_for_keyword_group($group, $url) { - $this->language_data['URLS'][$group] = $url; - } - - /** - * Sets styles for links in code - * - * @param int $type A constant that specifies what state the style is being - * set for - e.g. :hover or :visited - * @param string $styles The styles to use for that state - * @since 1.0.2 - */ - public function set_link_styles($type, $styles) { - $this->link_styles[$type] = $styles; - } - - /** - * Sets the target for links in code - * - * @param string $target The target for links in the code, e.g. _blank - * @since 1.0.3 - */ - public function set_link_target($target) { - if (!$target) { - $this->link_target = ''; - } else { - $this->link_target = ' target="' . $target . '"'; - } - } - - /** - * Sets styles for important parts of the code - * - * @param string $styles The styles to use on important parts of the code - * @since 1.0.2 - */ - public function set_important_styles($styles) { - $this->important_styles = $styles; - } - - /** - * Sets whether context-important blocks are highlighted - * - * @param boolean $flag Tells whether to enable or disable highlighting of important blocks - * @todo REMOVE THIS SHIZ FROM GESHI! - * @deprecated - * @since 1.0.2 - */ - public function enable_important_blocks($flag) { - $this->enable_important_blocks = (bool)$flag; - } - - /** - * Whether CSS IDs should be added to each line - * - * @param boolean $flag If true, IDs will be added to each line. - * @since 1.0.2 - */ - public function enable_ids($flag = true) { - $this->add_ids = (bool)$flag; - } - - /** - * Specifies which lines to highlight extra - * - * The extra style parameter was added in 1.0.7.21. - * - * @param mixed $lines An array of line numbers to highlight, or just a line - * number on its own. - * @param string $style A string specifying the style to use for this line. - * If null is specified, the default style is used. - * If false is specified, the line will be removed from - * special highlighting - * @since 1.0.2 - * @todo Some data replication here that could be cut down on - */ - public function highlight_lines_extra($lines, $style = null) { - if (is_array($lines)) { - //Split up the job using single lines at a time - foreach ($lines as $line) { - $this->highlight_lines_extra($line, $style); - } - } else { - //Mark the line as being highlighted specially - $lines = intval($lines); - $this->highlight_extra_lines[$lines] = $lines; - - //Decide on which style to use - if ($style === null) { //Check if we should use default style - unset($this->highlight_extra_lines_styles[$lines]); - } elseif ($style === false) { //Check if to remove this line - unset($this->highlight_extra_lines[$lines]); - unset($this->highlight_extra_lines_styles[$lines]); - } else { - $this->highlight_extra_lines_styles[$lines] = $style; - } - } - } - - /** - * Sets the style for extra-highlighted lines - * - * @param string $styles The style for extra-highlighted lines - * @since 1.0.2 - */ - public function set_highlight_lines_extra_style($styles) { - $this->highlight_extra_lines_style = $styles; - } - - /** - * Sets the line-ending - * - * @param string $line_ending The new line-ending - * @since 1.0.2 - */ - public function set_line_ending($line_ending) { - $this->line_ending = (string)$line_ending; - } - - /** - * Sets what number line numbers should start at. Should - * be a positive integer, and will be converted to one. - * - * Warning: Using this method will add the "start" - * attribute to the <ol> that is used for line numbering. - * This is not valid XHTML strict, so if that's what you - * care about then don't use this method. Firefox is getting - * support for the CSS method of doing this in 1.1 and Opera - * has support for the CSS method, but (of course) IE doesn't - * so it's not worth doing it the CSS way yet. - * - * @param int $number The number to start line numbers at - * @since 1.0.2 - */ - public function start_line_numbers_at($number) { - $this->line_numbers_start = abs(intval($number)); - } - - /** - * Sets the encoding used for htmlspecialchars(), for international - * support. - * - * NOTE: This is not needed for now because htmlspecialchars() is not - * being used (it has a security hole in PHP4 that has not been patched). - * Maybe in a future version it may make a return for speed reasons, but - * I doubt it. - * - * @param string $encoding The encoding to use for the source - * @since 1.0.3 - */ - public function set_encoding($encoding) { - if ($encoding) { - $this->encoding = strtolower($encoding); - } - } - - /** - * Turns linking of keywords on or off. - * - * @param boolean $enable If true, links will be added to keywords - * @since 1.0.2 - */ - public function enable_keyword_links($enable = true) { - $this->keyword_links = (bool)$enable; - } - - /** - * Setup caches needed for styling. This is automatically called in - * parse_code() and get_stylesheet() when appropriate. This function helps - * stylesheet generators as they rely on some style information being - * preprocessed - * - * @since 1.0.8 - */ - protected function build_style_cache() { - //Build the style cache needed to highlight numbers appropriate - if ($this->lexic_permissions['NUMBERS']) { - //First check what way highlighting information for numbers are given - if (!isset($this->language_data['NUMBERS'])) { - $this->language_data['NUMBERS'] = 0; - } - - if (is_array($this->language_data['NUMBERS'])) { - $this->language_data['NUMBERS_CACHE'] = $this->language_data['NUMBERS']; - } else { - $this->language_data['NUMBERS_CACHE'] = array(); - if (!$this->language_data['NUMBERS']) { - $this->language_data['NUMBERS'] = - GESHI_NUMBER_INT_BASIC | - GESHI_NUMBER_FLT_NONSCI; - } - - for ($i = 0, $j = $this->language_data['NUMBERS']; $j > 0; ++$i, $j >>= 1) { - //Rearrange style indices if required ... - if (isset($this->language_data['STYLES']['NUMBERS'][1 << $i])) { - $this->language_data['STYLES']['NUMBERS'][$i] = - $this->language_data['STYLES']['NUMBERS'][1 << $i]; - unset($this->language_data['STYLES']['NUMBERS'][1 << $i]); - } - - //Check if this bit is set for highlighting - if ($j & 1) { - //So this bit is set ... - //Check if it belongs to group 0 or the actual stylegroup - if (isset($this->language_data['STYLES']['NUMBERS'][$i])) { - $this->language_data['NUMBERS_CACHE'][$i] = 1 << $i; - } else { - if (!isset($this->language_data['NUMBERS_CACHE'][0])) { - $this->language_data['NUMBERS_CACHE'][0] = 0; - } - $this->language_data['NUMBERS_CACHE'][0] |= 1 << $i; - } - } - } - } - } - } - - /** - * Setup caches needed for parsing. This is automatically called in parse_code() when appropriate. - * This function makes stylesheet generators much faster as they do not need these caches. - * - * @since 1.0.8 - */ - protected function build_parse_cache() { - // cache symbol regexp - //As this is a costy operation, we avoid doing it for multiple groups ... - //Instead we perform it for all symbols at once. - // - //For this to work, we need to reorganize the data arrays. - if ($this->lexic_permissions['SYMBOLS'] && !empty($this->language_data['SYMBOLS'])) { - $this->language_data['MULTIPLE_SYMBOL_GROUPS'] = count($this->language_data['STYLES']['SYMBOLS']) > 1; - - $this->language_data['SYMBOL_DATA'] = array(); - $symbol_preg_multi = array(); // multi char symbols - $symbol_preg_single = array(); // single char symbols - foreach ($this->language_data['SYMBOLS'] as $key => $symbols) { - if (is_array($symbols)) { - foreach ($symbols as $sym) { - $sym = $this->hsc($sym); - if (!isset($this->language_data['SYMBOL_DATA'][$sym])) { - $this->language_data['SYMBOL_DATA'][$sym] = $key; - if (isset($sym[1])) { // multiple chars - $symbol_preg_multi[] = preg_quote($sym, '/'); - } else { // single char - if ($sym == '-') { - // don't trigger range out of order error - $symbol_preg_single[] = '\-'; - } else { - $symbol_preg_single[] = preg_quote($sym, '/'); - } - } - } - } - } else { - $symbols = $this->hsc($symbols); - if (!isset($this->language_data['SYMBOL_DATA'][$symbols])) { - $this->language_data['SYMBOL_DATA'][$symbols] = 0; - if (isset($symbols[1])) { // multiple chars - $symbol_preg_multi[] = preg_quote($symbols, '/'); - } elseif ($symbols == '-') { - // don't trigger range out of order error - $symbol_preg_single[] = '\-'; - } else { // single char - $symbol_preg_single[] = preg_quote($symbols, '/'); - } - } - } - } - - //Now we have an array with each possible symbol as the key and the style as the actual data. - //This way we can set the correct style just the moment we highlight ... - // - //Now we need to rewrite our array to get a search string that - $symbol_preg = array(); - if (!empty($symbol_preg_multi)) { - rsort($symbol_preg_multi); - $symbol_preg[] = implode('|', $symbol_preg_multi); - } - if (!empty($symbol_preg_single)) { - rsort($symbol_preg_single); - $symbol_preg[] = '[' . implode('', $symbol_preg_single) . ']'; - } - $this->language_data['SYMBOL_SEARCH'] = implode("|", $symbol_preg); - } - - // cache optimized regexp for keyword matching - // remove old cache - $this->language_data['CACHED_KEYWORD_LISTS'] = array(); - foreach (array_keys($this->language_data['KEYWORDS']) as $key) { - if (!isset($this->lexic_permissions['KEYWORDS'][$key]) || - $this->lexic_permissions['KEYWORDS'][$key]) { - $this->optimize_keyword_group($key); - } - } - - // brackets - if ($this->lexic_permissions['BRACKETS']) { - $this->language_data['CACHE_BRACKET_MATCH'] = array('[', ']', '(', ')', '{', '}'); - if (!$this->use_classes && isset($this->language_data['STYLES']['BRACKETS'][0])) { - $this->language_data['CACHE_BRACKET_REPLACE'] = array( - '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">[|>', - '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">]|>', - '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">(|>', - '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">)|>', - '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">{|>', - '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">}|>', - ); - } else { - $this->language_data['CACHE_BRACKET_REPLACE'] = array( - '<| class="br0">[|>', - '<| class="br0">]|>', - '<| class="br0">(|>', - '<| class="br0">)|>', - '<| class="br0">{|>', - '<| class="br0">}|>', - ); - } - } - - //Build the parse cache needed to highlight numbers appropriate - if ($this->lexic_permissions['NUMBERS']) { - //Check if the style rearrangements have been processed ... - //This also does some preprocessing to check which style groups are useable ... - if (!isset($this->language_data['NUMBERS_CACHE'])) { - $this->build_style_cache(); - } - - //Number format specification - //All this formats are matched case-insensitively! - static $numbers_format = array( - GESHI_NUMBER_INT_BASIC => - '(?:(? - '(? - '(? - '(? - '(? - '(? - '(? - '(? - '(? - '(? - '(? - '(? - '(? - '(? - '(? - '(?language_data['NUMBERS_RXCACHE'] = array(); - foreach ($this->language_data['NUMBERS_CACHE'] as $key => $rxdata) { - if (is_string($rxdata)) { - $regexp = $rxdata; - } else { - //This is a bitfield of number flags to highlight: - //Build an array, implode them together and make this the actual RX - $rxuse = array(); - for ($i = 1; $i <= $rxdata; $i <<= 1) { - if ($rxdata & $i) { - $rxuse[] = $numbers_format[$i]; - } - } - $regexp = implode("|", $rxuse); - } - - $this->language_data['NUMBERS_RXCACHE'][$key] = - "/(?)($regexp)(?!(?:|(?>[^\<]))+>)(?![^<]*>)(?!\|>)(?!\/>)/i"; - } - - if (!isset($this->language_data['PARSER_CONTROL']['NUMBERS']['PRECHECK_RX'])) { - $this->language_data['PARSER_CONTROL']['NUMBERS']['PRECHECK_RX'] = '#\d#'; - } - } - - $this->parse_cache_built = true; - } - - /** - * Returns the code in $this->source, highlighted and surrounded by the - * nessecary HTML. - * - * This should only be called ONCE, cos it's SLOW! If you want to highlight - * the same source multiple times, you're better off doing a whole lot of - * str_replaces to replace the <span>s - * - * @since 1.0.0 - */ - public function parse_code() { - // Start the timer - $start_time = microtime(); - - // Replace all newlines to a common form. - $code = str_replace("\r\n", "\n", $this->source); - $code = str_replace("\r", "\n", $code); - - // Firstly, if there is an error, we won't highlight - if ($this->error) { - //Escape the source for output - $result = $this->hsc($this->source); - - //This fix is related to SF#1923020, but has to be applied regardless of - //actually highlighting symbols. - $result = str_replace(array('', ''), array(';', '|'), $result); - - // Timing is irrelevant - $this->set_time($start_time, $start_time); - $this->finalise($result); - return $result; - } - - // make sure the parse cache is up2date - if (!$this->parse_cache_built) { - $this->build_parse_cache(); - } - - // Initialise various stuff - $length = strlen($code); - $COMMENT_MATCHED = false; - $stuff_to_parse = ''; - $endresult = ''; - - // "Important" selections are handled like multiline comments - // @todo GET RID OF THIS SHIZ - if ($this->enable_important_blocks) { - $this->language_data['COMMENT_MULTI'][GESHI_START_IMPORTANT] = GESHI_END_IMPORTANT; - } - - if ($this->strict_mode) { - // Break the source into bits. Each bit will be a portion of the code - // within script delimiters - for example, HTML between < and > - $k = 0; - $parts = array(); - $matches = array(); - $next_match_pointer = null; - // we use a copy to unset delimiters on demand (when they are not found) - $delim_copy = $this->language_data['SCRIPT_DELIMITERS']; - $i = 0; - while ($i < $length) { - $next_match_pos = $length + 1; // never true - foreach ($delim_copy as $dk => $delimiters) { - if (is_array($delimiters)) { - foreach ($delimiters as $open => $close) { - // make sure the cache is setup properly - if (!isset($matches[$dk][$open])) { - $matches[$dk][$open] = array( - 'next_match' => -1, - 'dk' => $dk, - - 'open' => $open, // needed for grouping of adjacent code blocks (see below) - 'open_strlen' => strlen($open), - - 'close' => $close, - 'close_strlen' => strlen($close), - ); - } - // Get the next little bit for this opening string - if ($matches[$dk][$open]['next_match'] < $i) { - // only find the next pos if it was not already cached - $open_pos = strpos($code, $open, $i); - if ($open_pos === false) { - // no match for this delimiter ever - unset($delim_copy[$dk][$open]); - continue; - } - $matches[$dk][$open]['next_match'] = $open_pos; - } - if ($matches[$dk][$open]['next_match'] < $next_match_pos) { - //So we got a new match, update the close_pos - $matches[$dk][$open]['close_pos'] = - strpos($code, $close, $matches[$dk][$open]['next_match'] + 1); - - $next_match_pointer =& $matches[$dk][$open]; - $next_match_pos = $matches[$dk][$open]['next_match']; - } - } - } else { - //So we should match an RegExp as Strict Block ... - /** - * The value in $delimiters is expected to be an RegExp - * containing exactly 2 matching groups: - * - Group 1 is the opener - * - Group 2 is the closer - */ - if (preg_match($delimiters, $code, $matches_rx, PREG_OFFSET_CAPTURE, $i)) { - //We got a match ... - if (isset($matches_rx['start']) && isset($matches_rx['end'])) { - $matches[$dk] = array( - 'next_match' => $matches_rx['start'][1], - 'dk' => $dk, - - 'close_strlen' => strlen($matches_rx['end'][0]), - 'close_pos' => $matches_rx['end'][1], - ); - } else { - $matches[$dk] = array( - 'next_match' => $matches_rx[1][1], - 'dk' => $dk, - - 'close_strlen' => strlen($matches_rx[2][0]), - 'close_pos' => $matches_rx[2][1], - ); - } - } else { - // no match for this delimiter ever - unset($delim_copy[$dk]); - continue; - } - - if ($matches[$dk]['next_match'] <= $next_match_pos) { - $next_match_pointer =& $matches[$dk]; - $next_match_pos = $matches[$dk]['next_match']; - } - } - } - - // non-highlightable text - $parts[$k] = array( - 1 => substr($code, $i, $next_match_pos - $i) - ); - ++$k; - - if ($next_match_pos > $length) { - // out of bounds means no next match was found - break; - } - - // highlightable code - $parts[$k][0] = $next_match_pointer['dk']; - - //Only combine for non-rx script blocks - if (is_array($delim_copy[$next_match_pointer['dk']])) { - // group adjacent script blocks, e.g. should be one block, not three! - $i = $next_match_pos + $next_match_pointer['open_strlen']; - while (true) { - $close_pos = strpos($code, $next_match_pointer['close'], $i); - if ($close_pos == false) { - break; - } - $i = $close_pos + $next_match_pointer['close_strlen']; - if ($i == $length) { - break; - } - if ($code[$i] == $next_match_pointer['open'][0] && ($next_match_pointer['open_strlen'] == 1 || - substr($code, $i, $next_match_pointer['open_strlen']) == $next_match_pointer['open'])) { - // merge adjacent but make sure we don't merge things like - foreach ($matches as $submatches) { - foreach ($submatches as $match) { - if ($match['next_match'] == $i) { - // a different block already matches here! - break 3; - } - } - } - } else { - break; - } - } - } else { - $close_pos = $next_match_pointer['close_pos'] + $next_match_pointer['close_strlen']; - $i = $close_pos; - } - - if ($close_pos === false) { - // no closing delimiter found! - $parts[$k][1] = substr($code, $next_match_pos); - ++$k; - break; - } else { - $parts[$k][1] = substr($code, $next_match_pos, $i - $next_match_pos); - ++$k; - } - } - unset($delim_copy, $next_match_pointer, $next_match_pos, $matches); - $num_parts = $k; - - if ($num_parts == 1 && $this->strict_mode == GESHI_MAYBE) { - // when we have only one part, we don't have anything to highlight at all. - // if we have a "maybe" strict language, this should be handled as highlightable code - $parts = array( - 0 => array( - 0 => '', - 1 => '' - ), - 1 => array( - 0 => null, - 1 => $parts[0][1] - ) - ); - $num_parts = 2; - } - - } else { - // Not strict mode - simply dump the source into - // the array at index 1 (the first highlightable block) - $parts = array( - 0 => array( - 0 => '', - 1 => '' - ), - 1 => array( - 0 => null, - 1 => $code - ) - ); - $num_parts = 2; - } - - //Unset variables we won't need any longer - unset($code); - - //Preload some repeatedly used values regarding hardquotes ... - $hq = !empty($this->language_data['HARDQUOTE']) ? $this->language_data['HARDQUOTE'][0] : false; - $hq_strlen = strlen($hq); - - //Preload if line numbers are to be generated afterwards - //Added a check if line breaks should be forced even without line numbers, fixes SF#1727398 - $check_linenumbers = $this->line_numbers != GESHI_NO_LINE_NUMBERS || - !empty($this->highlight_extra_lines) || !$this->allow_multiline_span; - - //preload the escape char for faster checking ... - $escaped_escape_char = $this->hsc($this->language_data['ESCAPE_CHAR']); - - // this is used for single-line comments - $sc_disallowed_before = ""; - $sc_disallowed_after = ""; - - if (isset($this->language_data['PARSER_CONTROL'])) { - if (isset($this->language_data['PARSER_CONTROL']['COMMENTS'])) { - if (isset($this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_BEFORE'])) { - $sc_disallowed_before = $this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_BEFORE']; - } - if (isset($this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_AFTER'])) { - $sc_disallowed_after = $this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_AFTER']; - } - } - } - - //Fix for SF#1932083: Multichar Quotemarks unsupported - $is_string_starter = array(); - if ($this->lexic_permissions['STRINGS']) { - foreach ($this->language_data['QUOTEMARKS'] as $quotemark) { - if (!isset($is_string_starter[$quotemark[0]])) { - $is_string_starter[$quotemark[0]] = (string)$quotemark; - } elseif (is_string($is_string_starter[$quotemark[0]])) { - $is_string_starter[$quotemark[0]] = array( - $is_string_starter[$quotemark[0]], - $quotemark); - } else { - $is_string_starter[$quotemark[0]][] = $quotemark; - } - } - } - - // Now we go through each part. We know that even-indexed parts are - // code that shouldn't be highlighted, and odd-indexed parts should - // be highlighted - for ($key = 0; $key < $num_parts; ++$key) { - $STRICTATTRS = ''; - - // If this block should be highlighted... - if (!($key & 1)) { - // Else not a block to highlight - $endresult .= $this->hsc($parts[$key][1]); - unset($parts[$key]); - continue; - } - - $result = ''; - $part = $parts[$key][1]; - - $highlight_part = true; - if ($this->strict_mode && !is_null($parts[$key][0])) { - // get the class key for this block of code - $script_key = $parts[$key][0]; - $highlight_part = $this->language_data['HIGHLIGHT_STRICT_BLOCK'][$script_key]; - if ($this->language_data['STYLES']['SCRIPT'][$script_key] != '' && - $this->lexic_permissions['SCRIPT']) { - // Add a span element around the source to - // highlight the overall source block - if (!$this->use_classes && - $this->language_data['STYLES']['SCRIPT'][$script_key] != '') { - $attributes = ' style="' . $this->language_data['STYLES']['SCRIPT'][$script_key] . '"'; - } else { - $attributes = ' class="sc' . $script_key . '"'; - } - $result .= ""; - $STRICTATTRS = $attributes; - } - } - - if ($highlight_part) { - // Now, highlight the code in this block. This code - // is really the engine of GeSHi (along with the method - // parse_non_string_part). - - // cache comment regexps incrementally - $next_comment_regexp_key = ''; - $next_comment_regexp_pos = -1; - $next_comment_multi_pos = -1; - $next_comment_single_pos = -1; - $comment_regexp_cache_per_key = array(); - $comment_multi_cache_per_key = array(); - $comment_single_cache_per_key = array(); - $next_open_comment_multi = ''; - $next_comment_single_key = ''; - $escape_regexp_cache_per_key = array(); - $next_escape_regexp_key = ''; - $next_escape_regexp_pos = -1; - - $length = strlen($part); - for ($i = 0; $i < $length; ++$i) { - // Get the next char - $char = $part[$i]; - $char_len = 1; - - // update regexp comment cache if needed - if (isset($this->language_data['COMMENT_REGEXP']) && $next_comment_regexp_pos < $i) { - $next_comment_regexp_pos = $length; - foreach ($this->language_data['COMMENT_REGEXP'] as $comment_key => $regexp) { - $match_i = false; - if (isset($comment_regexp_cache_per_key[$comment_key]) && - ($comment_regexp_cache_per_key[$comment_key]['pos'] >= $i || - $comment_regexp_cache_per_key[$comment_key]['pos'] === false)) { - // we have already matched something - if ($comment_regexp_cache_per_key[$comment_key]['pos'] === false) { - // this comment is never matched - continue; - } - $match_i = $comment_regexp_cache_per_key[$comment_key]['pos']; - } elseif (preg_match($regexp, $part, $match, PREG_OFFSET_CAPTURE, $i)) { - $match_i = $match[0][1]; - - $comment_regexp_cache_per_key[$comment_key] = array( - 'key' => $comment_key, - 'length' => strlen($match[0][0]), - 'pos' => $match_i - ); - } else { - $comment_regexp_cache_per_key[$comment_key]['pos'] = false; - continue; - } - - if ($match_i !== false && $match_i < $next_comment_regexp_pos) { - $next_comment_regexp_pos = $match_i; - $next_comment_regexp_key = $comment_key; - if ($match_i === $i) { - break; - } - } - } - } - - $string_started = false; - - if (isset($is_string_starter[$char])) { - // Possibly the start of a new string ... - - //Check which starter it was ... - //Fix for SF#1932083: Multichar Quotemarks unsupported - if (is_array($is_string_starter[$char])) { - $char_new = ''; - foreach ($is_string_starter[$char] as $testchar) { - if ($testchar === substr($part, $i, strlen($testchar)) && - strlen($testchar) > strlen($char_new)) { - $char_new = $testchar; - $string_started = true; - } - } - if ($string_started) { - $char = $char_new; - } - } else { - $testchar = $is_string_starter[$char]; - if ($testchar === substr($part, $i, strlen($testchar))) { - $char = $testchar; - $string_started = true; - } - } - $char_len = strlen($char); - } - - if ($string_started && ($i != $next_comment_regexp_pos)) { - // Hand out the correct style information for this string - $string_key = array_search($char, $this->language_data['QUOTEMARKS']); - if (!isset($this->language_data['STYLES']['STRINGS'][$string_key]) || - !isset($this->language_data['STYLES']['ESCAPE_CHAR'][$string_key])) { - $string_key = 0; - } - - // parse the stuff before this - $result .= $this->parse_non_string_part($stuff_to_parse); - $stuff_to_parse = ''; - - if (!$this->use_classes) { - $string_attributes = ' style="' . $this->language_data['STYLES']['STRINGS'][$string_key] . '"'; - } else { - $string_attributes = ' class="st' . $string_key . '"'; - } - - // now handle the string - $string = "" . GeSHi::hsc($char); - $start = $i + $char_len; - $string_open = true; - - if (empty($this->language_data['ESCAPE_REGEXP'])) { - $next_escape_regexp_pos = $length; - } - - do { - //Get the regular ending pos ... - $close_pos = strpos($part, $char, $start); - if (false === $close_pos) { - $close_pos = $length; - } - - if ($this->lexic_permissions['ESCAPE_CHAR']) { - // update escape regexp cache if needed - if (isset($this->language_data['ESCAPE_REGEXP']) && $next_escape_regexp_pos < $start) { - $next_escape_regexp_pos = $length; - foreach ($this->language_data['ESCAPE_REGEXP'] as $escape_key => $regexp) { - $match_i = false; - if (isset($escape_regexp_cache_per_key[$escape_key]) && - ($escape_regexp_cache_per_key[$escape_key]['pos'] >= $start || - $escape_regexp_cache_per_key[$escape_key]['pos'] === false)) { - // we have already matched something - if ($escape_regexp_cache_per_key[$escape_key]['pos'] === false) { - // this comment is never matched - continue; - } - $match_i = $escape_regexp_cache_per_key[$escape_key]['pos']; - } elseif (preg_match($regexp, $part, $match, PREG_OFFSET_CAPTURE, $start)) { - $match_i = $match[0][1]; - - $escape_regexp_cache_per_key[$escape_key] = array( - 'key' => $escape_key, - 'length' => strlen($match[0][0]), - 'pos' => $match_i - ); - } else { - $escape_regexp_cache_per_key[$escape_key]['pos'] = false; - continue; - } - - if ($match_i !== false && $match_i < $next_escape_regexp_pos) { - $next_escape_regexp_pos = $match_i; - $next_escape_regexp_key = $escape_key; - if ($match_i === $start) { - break; - } - } - } - } - - //Find the next simple escape position - if ('' != $this->language_data['ESCAPE_CHAR']) { - $simple_escape = strpos($part, $this->language_data['ESCAPE_CHAR'], $start); - if (false === $simple_escape) { - $simple_escape = $length; - } - } else { - $simple_escape = $length; - } - } else { - $next_escape_regexp_pos = $length; - $simple_escape = $length; - } - - if ($simple_escape < $next_escape_regexp_pos && - $simple_escape < $length && - $simple_escape < $close_pos) { - //The nexxt escape sequence is a simple one ... - $es_pos = $simple_escape; - - //Add the stuff not in the string yet ... - $string .= $this->hsc(substr($part, $start, $es_pos - $start)); - - //Get the style for this escaped char ... - if (!$this->use_classes) { - $escape_char_attributes = ' style="' . $this->language_data['STYLES']['ESCAPE_CHAR'][0] . '"'; - } else { - $escape_char_attributes = ' class="es0"'; - } - - //Add the style for the escape char ... - $string .= "" . - GeSHi::hsc($this->language_data['ESCAPE_CHAR']); - - //Get the byte AFTER the ESCAPE_CHAR we just found - $es_char = $part[$es_pos + 1]; - if ($es_char == "\n") { - // don't put a newline around newlines - $string .= "\n"; - $start = $es_pos + 2; - } elseif (ord($es_char) >= 128) { - //This is an non-ASCII char (UTF8 or single byte) - //This code tries to work around SF#2037598 ... - if (function_exists('mb_substr')) { - $es_char_m = mb_substr(substr($part, $es_pos + 1, 16), 0, 1, $this->encoding); - $string .= $es_char_m . ''; - } elseif ('utf-8' == $this->encoding) { - if (preg_match("/[\xC2-\xDF][\x80-\xBF]" . - "|\xE0[\xA0-\xBF][\x80-\xBF]" . - "|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}" . - "|\xED[\x80-\x9F][\x80-\xBF]" . - "|\xF0[\x90-\xBF][\x80-\xBF]{2}" . - "|[\xF1-\xF3][\x80-\xBF]{3}" . - "|\xF4[\x80-\x8F][\x80-\xBF]{2}/s", - $part, $es_char_m, null, $es_pos + 1)) { - $es_char_m = $es_char_m[0]; - } else { - $es_char_m = $es_char; - } - $string .= $this->hsc($es_char_m) . ''; - } else { - $es_char_m = $this->hsc($es_char); - } - $start = $es_pos + strlen($es_char_m) + 1; - } else { - $string .= $this->hsc($es_char) . ''; - $start = $es_pos + 2; - } - } elseif ($next_escape_regexp_pos < $length && - $next_escape_regexp_pos < $close_pos) { - $es_pos = $next_escape_regexp_pos; - //Add the stuff not in the string yet ... - $string .= $this->hsc(substr($part, $start, $es_pos - $start)); - - //Get the key and length of this match ... - $escape = $escape_regexp_cache_per_key[$next_escape_regexp_key]; - $escape_str = substr($part, $es_pos, $escape['length']); - $escape_key = $escape['key']; - - //Get the style for this escaped char ... - if (!$this->use_classes) { - $escape_char_attributes = ' style="' . $this->language_data['STYLES']['ESCAPE_CHAR'][$escape_key] . '"'; - } else { - $escape_char_attributes = ' class="es' . $escape_key . '"'; - } - - //Add the style for the escape char ... - $string .= "" . - $this->hsc($escape_str) . ''; - - $start = $es_pos + $escape['length']; - } else { - //Copy the remainder of the string ... - $string .= $this->hsc(substr($part, $start, $close_pos - $start + $char_len)) . ''; - $start = $close_pos + $char_len; - $string_open = false; - } - } while ($string_open); - - if ($check_linenumbers) { - // Are line numbers used? If, we should end the string before - // the newline and begin it again (so when
  • s are put in the source - // remains XHTML compliant) - // note to self: This opens up possibility of config files specifying - // that languages can/cannot have multiline strings??? - $string = str_replace("\n", "\n", $string); - } - - $result .= $string; - $string = ''; - $i = $start - 1; - continue; - } elseif ($this->lexic_permissions['STRINGS'] && $hq && $hq[0] == $char && - substr($part, $i, $hq_strlen) == $hq && ($i != $next_comment_regexp_pos)) { - // The start of a hard quoted string - if (!$this->use_classes) { - $string_attributes = ' style="' . $this->language_data['STYLES']['STRINGS']['HARD'] . '"'; - $escape_char_attributes = ' style="' . $this->language_data['STYLES']['ESCAPE_CHAR']['HARD'] . '"'; - } else { - $string_attributes = ' class="st_h"'; - $escape_char_attributes = ' class="es_h"'; - } - // parse the stuff before this - $result .= $this->parse_non_string_part($stuff_to_parse); - $stuff_to_parse = ''; - - // now handle the string - $string = ''; - - // look for closing quote - $start = $i + $hq_strlen; - while ($close_pos = strpos($part, $this->language_data['HARDQUOTE'][1], $start)) { - $start = $close_pos + 1; - if ($this->lexic_permissions['ESCAPE_CHAR'] && $part[$close_pos - 1] == $this->language_data['HARDCHAR'] && - (($i + $hq_strlen) != ($close_pos))) { //Support empty string for HQ escapes if Starter = Escape - // make sure this quote is not escaped - foreach ($this->language_data['HARDESCAPE'] as $hardescape) { - if (substr($part, $close_pos - 1, strlen($hardescape)) == $hardescape) { - // check wether this quote is escaped or if it is something like '\\' - $escape_char_pos = $close_pos - 1; - while ($escape_char_pos > 0 - && $part[$escape_char_pos - 1] == $this->language_data['HARDCHAR']) { - --$escape_char_pos; - } - if (($close_pos - $escape_char_pos) & 1) { - // uneven number of escape chars => this quote is escaped - continue 2; - } - } - } - } - - // found closing quote - break; - } - - //Found the closing delimiter? - if (!$close_pos) { - // span till the end of this $part when no closing delimiter is found - $close_pos = $length; - } - - //Get the actual string - $string = substr($part, $i, $close_pos - $i + 1); - $i = $close_pos; - - // handle escape chars and encode html chars - // (special because when we have escape chars within our string they may not be escaped) - if ($this->lexic_permissions['ESCAPE_CHAR'] && $this->language_data['ESCAPE_CHAR']) { - $start = 0; - $new_string = ''; - while ($es_pos = strpos($string, $this->language_data['ESCAPE_CHAR'], $start)) { - // hmtl escape stuff before - $new_string .= $this->hsc(substr($string, $start, $es_pos - $start)); - // check if this is a hard escape - foreach ($this->language_data['HARDESCAPE'] as $hardescape) { - if (substr($string, $es_pos, strlen($hardescape)) == $hardescape) { - // indeed, this is a hardescape - $new_string .= "" . - $this->hsc($hardescape) . ''; - $start = $es_pos + strlen($hardescape); - continue 2; - } - } - // not a hard escape, but a normal escape - // they come in pairs of two - $c = 0; - while (isset($string[$es_pos + $c]) && isset($string[$es_pos + $c + 1]) - && $string[$es_pos + $c] == $this->language_data['ESCAPE_CHAR'] - && $string[$es_pos + $c + 1] == $this->language_data['ESCAPE_CHAR']) { - $c += 2; - } - if ($c) { - $new_string .= "" . - str_repeat($escaped_escape_char, $c) . - ''; - $start = $es_pos + $c; - } else { - // this is just a single lonely escape char... - $new_string .= $escaped_escape_char; - $start = $es_pos + 1; - } - } - $string = $new_string . $this->hsc(substr($string, $start)); - } else { - $string = $this->hsc($string); - } - - if ($check_linenumbers) { - // Are line numbers used? If, we should end the string before - // the newline and begin it again (so when
  • s are put in the source - // remains XHTML compliant) - // note to self: This opens up possibility of config files specifying - // that languages can/cannot have multiline strings??? - $string = str_replace("\n", "\n", $string); - } - - $result .= "" . $string . ''; - $string = ''; - continue; - } else { - //Have a look for regexp comments - if ($i == $next_comment_regexp_pos) { - $COMMENT_MATCHED = true; - $comment = $comment_regexp_cache_per_key[$next_comment_regexp_key]; - $test_str = $this->hsc(substr($part, $i, $comment['length'])); - - //@todo If remove important do remove here - if ($this->lexic_permissions['COMMENTS']['MULTI']) { - if (!$this->use_classes) { - $attributes = ' style="' . $this->language_data['STYLES']['COMMENTS'][$comment['key']] . '"'; - } else { - $attributes = ' class="co' . $comment['key'] . '"'; - } - - $test_str = "" . $test_str . ""; - - // Short-cut through all the multiline code - if ($check_linenumbers) { - // strreplace to put close span and open span around multiline newlines - $test_str = str_replace( - "\n", "\n", - str_replace("\n ", "\n ", $test_str) - ); - } - } - - $i += $comment['length'] - 1; - - // parse the rest - $result .= $this->parse_non_string_part($stuff_to_parse); - $stuff_to_parse = ''; - } - - // If we haven't matched a regexp comment, try multi-line comments - if (!$COMMENT_MATCHED) { - // Is this a multiline comment? - if (!empty($this->language_data['COMMENT_MULTI']) && $next_comment_multi_pos < $i) { - $next_comment_multi_pos = $length; - foreach ($this->language_data['COMMENT_MULTI'] as $open => $close) { - $match_i = false; - if (isset($comment_multi_cache_per_key[$open]) && - ($comment_multi_cache_per_key[$open] >= $i || - $comment_multi_cache_per_key[$open] === false)) { - // we have already matched something - if ($comment_multi_cache_per_key[$open] === false) { - // this comment is never matched - continue; - } - $match_i = $comment_multi_cache_per_key[$open]; - } elseif (($match_i = stripos($part, $open, $i)) !== false) { - $comment_multi_cache_per_key[$open] = $match_i; - } else { - $comment_multi_cache_per_key[$open] = false; - continue; - } - if ($match_i !== false && $match_i < $next_comment_multi_pos) { - $next_comment_multi_pos = $match_i; - $next_open_comment_multi = $open; - if ($match_i === $i) { - break; - } - } - } - } - if ($i == $next_comment_multi_pos) { - $open = $next_open_comment_multi; - $close = $this->language_data['COMMENT_MULTI'][$open]; - $open_strlen = strlen($open); - $close_strlen = strlen($close); - $COMMENT_MATCHED = true; - $test_str_match = $open; - //@todo If remove important do remove here - if ($this->lexic_permissions['COMMENTS']['MULTI'] || - $open == GESHI_START_IMPORTANT) { - if ($open != GESHI_START_IMPORTANT) { - if (!$this->use_classes) { - $attributes = ' style="' . $this->language_data['STYLES']['COMMENTS']['MULTI'] . '"'; - } else { - $attributes = ' class="coMULTI"'; - } - $test_str = "" . $this->hsc($open); - } else { - if (!$this->use_classes) { - $attributes = ' style="' . $this->important_styles . '"'; - } else { - $attributes = ' class="imp"'; - } - - // We don't include the start of the comment if it's an - // "important" part - $test_str = ""; - } - } else { - $test_str = $this->hsc($open); - } - - $close_pos = strpos($part, $close, $i + $open_strlen); - - if ($close_pos === false) { - $close_pos = $length; - } - - // Short-cut through all the multiline code - $rest_of_comment = $this->hsc(substr($part, $i + $open_strlen, $close_pos - $i - $open_strlen + $close_strlen)); - if (($this->lexic_permissions['COMMENTS']['MULTI'] || - $test_str_match == GESHI_START_IMPORTANT) && - $check_linenumbers) { - - // strreplace to put close span and open span around multiline newlines - $test_str .= str_replace( - "\n", "\n", - str_replace("\n ", "\n ", $rest_of_comment) - ); - } else { - $test_str .= $rest_of_comment; - } - - if ($this->lexic_permissions['COMMENTS']['MULTI'] || - $test_str_match == GESHI_START_IMPORTANT) { - $test_str .= ''; - } - - $i = $close_pos + $close_strlen - 1; - - // parse the rest - $result .= $this->parse_non_string_part($stuff_to_parse); - $stuff_to_parse = ''; - } - } - - // If we haven't matched a multiline comment, try single-line comments - if (!$COMMENT_MATCHED) { - // cache potential single line comment occurances - if (!empty($this->language_data['COMMENT_SINGLE']) && $next_comment_single_pos < $i) { - $next_comment_single_pos = $length; - foreach ($this->language_data['COMMENT_SINGLE'] as $comment_key => $comment_mark) { - $match_i = false; - $case_sensitive_comments = (bool)@$this->language_data['CASE_SENSITIVE'][GESHI_COMMENTS]; - if (isset($comment_single_cache_per_key[$comment_key]) && - ($comment_single_cache_per_key[$comment_key] >= $i || - $comment_single_cache_per_key[$comment_key] === false)) { - // we have already matched something - if ($comment_single_cache_per_key[$comment_key] === false) { - // this comment is never matched - continue; - } - $match_i = $comment_single_cache_per_key[$comment_key]; - } elseif ( - // case sensitive comments - ($case_sensitive_comments && - ($match_i = stripos($part, $comment_mark, $i)) !== false) || - // non case sensitive - (!$case_sensitive_comments && - (($match_i = strpos($part, $comment_mark, $i)) !== false))) { - $comment_single_cache_per_key[$comment_key] = $match_i; - } else { - $comment_single_cache_per_key[$comment_key] = false; - continue; - } - if ($match_i !== false && $match_i < $next_comment_single_pos) { - $next_comment_single_pos = $match_i; - $next_comment_single_key = $comment_key; - if ($match_i === $i) { - break; - } - } - } - } - if ($next_comment_single_pos == $i) { - $comment_key = $next_comment_single_key; - $comment_mark = $this->language_data['COMMENT_SINGLE'][$comment_key]; - $com_len = strlen($comment_mark); - - // This check will find special variables like $# in bash - // or compiler directives of Delphi beginning {$ - if ((empty($sc_disallowed_before) || ($i == 0) || - (false === strpos($sc_disallowed_before, $part[$i - 1]))) && - (empty($sc_disallowed_after) || ($length <= $i + $com_len) || - (false === strpos($sc_disallowed_after, $part[$i + $com_len])))) { - // this is a valid comment - $COMMENT_MATCHED = true; - if ($this->lexic_permissions['COMMENTS'][$comment_key]) { - if (!$this->use_classes) { - $attributes = ' style="' . $this->language_data['STYLES']['COMMENTS'][$comment_key] . '"'; - } else { - $attributes = ' class="co' . $comment_key . '"'; - } - $test_str = "" . $this->hsc($this->change_case($comment_mark)); - } else { - $test_str = $this->hsc($comment_mark); - } - - //Check if this comment is the last in the source - $close_pos = strpos($part, "\n", $i); - $oops = false; - if ($close_pos === false) { - $close_pos = $length; - $oops = true; - } - $test_str .= $this->hsc(substr($part, $i + $com_len, $close_pos - $i - $com_len)); - if ($this->lexic_permissions['COMMENTS'][$comment_key]) { - $test_str .= ""; - } - - // Take into account that the comment might be the last in the source - if (!$oops) { - $test_str .= "\n"; - } - - $i = $close_pos; - - // parse the rest - $result .= $this->parse_non_string_part($stuff_to_parse); - $stuff_to_parse = ''; - } - } - } - } - - // Where are we adding this char? - if (!$COMMENT_MATCHED) { - $stuff_to_parse .= $char; - } else { - $result .= $test_str; - unset($test_str); - $COMMENT_MATCHED = false; - } - } - // Parse the last bit - $result .= $this->parse_non_string_part($stuff_to_parse); - $stuff_to_parse = ''; - } else { - $result .= $this->hsc($part); - } - // Close the that surrounds the block - if ($STRICTATTRS != '') { - $result = str_replace("\n", "\n", $result); - $result .= ''; - } - - $endresult .= $result; - unset($part, $parts[$key], $result); - } - - //This fix is related to SF#1923020, but has to be applied regardless of - //actually highlighting symbols. - /** NOTE: memorypeak #3 */ - $endresult = str_replace(array('', ''), array(';', '|'), $endresult); - -// // Parse the last stuff (redundant?) -// $result .= $this->parse_non_string_part($stuff_to_parse); - - // Lop off the very first and last spaces -// $result = substr($result, 1, -1); - - // We're finished: stop timing - $this->set_time($start_time, microtime()); - - $this->finalise($endresult); - return $endresult; - } - - /** - * Swaps out spaces and tabs for HTML indentation. Not needed if - * the code is in a pre block... - * - * @param string $result The source to indent (reference!) - * @since 1.0.0 - */ - protected function indent(&$result) { - /// Replace tabs with the correct number of spaces - if (false !== strpos($result, "\t")) { - $lines = explode("\n", $result); - $result = null;//Save memory while we process the lines individually - $tab_width = $this->get_real_tab_width(); - $tab_string = ' ' . str_repeat(' ', $tab_width); - - for ($key = 0, $n = count($lines); $key < $n; $key++) { - $line = $lines[$key]; - if (false === strpos($line, "\t")) { - continue; - } - - $pos = 0; - $length = strlen($line); - $lines[$key] = ''; // reduce memory - - $IN_TAG = false; - for ($i = 0; $i < $length; ++$i) { - $char = $line[$i]; - // Simple engine to work out whether we're in a tag. - // If we are we modify $pos. This is so we ignore HTML - // in the line and only workout the tab replacement - // via the actual content of the string - // This test could be improved to include strings in the - // html so that < or > would be allowed in user's styles - // (e.g. quotes: '<' '>'; or similar) - if ($IN_TAG) { - if ('>' == $char) { - $IN_TAG = false; - } - $lines[$key] .= $char; - } elseif ('<' == $char) { - $IN_TAG = true; - $lines[$key] .= '<'; - } elseif ('&' == $char) { - $substr = substr($line, $i + 3, 5); - $posi = strpos($substr, ';'); - if (false === $posi) { - ++$pos; - } else { - $pos -= $posi + 2; - } - $lines[$key] .= $char; - } elseif ("\t" == $char) { - $str = ''; - // OPTIMISE - move $strs out. Make an array: - // $tabs = array( - // 1 => ' ', - // 2 => '  ', - // 3 => '   ' etc etc - // to use instead of building a string every time - $tab_end_width = $tab_width - ($pos % $tab_width); //Moved out of the look as it doesn't change within the loop - if (($pos & 1) || 1 == $tab_end_width) { - $str .= substr($tab_string, 6, $tab_end_width); - } else { - $str .= substr($tab_string, 0, $tab_end_width + 5); - } - $lines[$key] .= $str; - $pos += $tab_end_width; - - if (false === strpos($line, "\t", $i + 1)) { - $lines[$key] .= substr($line, $i + 1); - break; - } - } elseif (0 == $pos && ' ' == $char) { - $lines[$key] .= ' '; - ++$pos; - } else { - $lines[$key] .= $char; - ++$pos; - } - } - } - $result = implode("\n", $lines); - unset($lines);//We don't need the lines separated beyond this --- free them! - } - // Other whitespace - // BenBE: Fix to reduce the number of replacements to be done - $result = preg_replace('/^ /m', ' ', $result); - $result = str_replace(' ', '  ', $result); - - if ($this->line_numbers == GESHI_NO_LINE_NUMBERS && $this->header_type != GESHI_HEADER_PRE_TABLE) { - if ($this->line_ending === null) { - $result = nl2br($result); - } else { - $result = str_replace("\n", $this->line_ending, $result); - } - } - } - - /** - * Changes the case of a keyword for those languages where a change is asked for - * - * @param string $instr The keyword to change the case of - * @return string The keyword with its case changed - * @since 1.0.0 - */ - protected function change_case($instr) { - return match ($this->language_data['CASE_KEYWORDS']) { - GESHI_CAPS_UPPER => strtoupper($instr), - GESHI_CAPS_LOWER => strtolower($instr), - default => $instr, - }; - } - - /** - * Handles replacements of keywords to include markup and links if requested - * - * @param string $match The keyword to add the Markup to - * @return string The HTML for the match found - * @since 1.0.8 - * - * @todo Get rid of ender in keyword links - */ - protected function handle_keyword_replace($match) { - $k = $this->_kw_replace_group; - $keyword = $match[0]; - $keyword_match = $match[1]; - - $before = ''; - $after = ''; - - if ($this->keyword_links) { - // Keyword links have been ebabled - - if (isset($this->language_data['URLS'][$k]) && - $this->language_data['URLS'][$k] != '') { - // There is a base group for this keyword - - // Old system: strtolower - //$keyword = ( $this->language_data['CASE_SENSITIVE'][$group] ) ? $keyword : strtolower($keyword); - // New system: get keyword from language file to get correct case - if (!$this->language_data['CASE_SENSITIVE'][$k] && - strpos($this->language_data['URLS'][$k], '{FNAME}') !== false) { - foreach ($this->language_data['KEYWORDS'][$k] as $word) { - if (strcasecmp($word, $keyword_match) == 0) { - break; - } - } - } else { - $word = $keyword_match; - } - - $before = '<|UR1|"' . - str_replace( - array( - '{FNAME}', - '{FNAMEL}', - '{FNAMEU}', - '{FNAMEUF}', - '.'), - array( - str_replace('+', '%20', urlencode($this->hsc($word))), - str_replace('+', '%20', urlencode($this->hsc(strtolower($word)))), - str_replace('+', '%20', urlencode($this->hsc(strtoupper($word)))), - str_replace('+', '%20', urlencode($this->hsc(ucfirst($word)))), - ''), - $this->language_data['URLS'][$k] - ) . '">'; - $after = ''; - } - } - - return $before . '<|/' . $k . '/>' . $this->change_case($keyword) . '|>' . $after; - } - - /** - * handles regular expressions highlighting-definitions with callback functions - * - * @note this is a callback, don't use it directly - * - * @param array $matches the matches array - * @return string The highlighted string - * @since 1.0.8 - */ - protected function handle_regexps_callback($matches) { - // before: "' style=\"' . call_user_func(\"$func\", '\\1') . '\"\\1|>'", - return ' style="' . call_user_func($this->language_data['STYLES']['REGEXPS'][$this->_rx_key], $matches[1]) . '"' . $matches[1] . '|>'; - } - - /** - * handles newlines in REGEXPS matches. Set the _hmr_* vars before calling this - * - * @note this is a callback, don't use it directly - * - * @param array $matches the matches array - * @return string - * @since 1.0.8 - */ - protected function handle_multiline_regexps($matches) { - $before = $this->_hmr_before; - $after = $this->_hmr_after; - if ($this->_hmr_replace) { - $replace = $this->_hmr_replace; - $search = array(); - - foreach (array_keys($matches) as $k) { - $search[] = '\\' . $k; - } - - $before = str_replace($search, $matches, $before); - $after = str_replace($search, $matches, $after); - $replace = str_replace($search, $matches, $replace); - } else { - $replace = $matches[0]; - } - return $before - . '<|!REG3XP' . $this->_hmr_key . '!>' - . str_replace("\n", "|>\n<|!REG3XP" . $this->_hmr_key . '!>', $replace) - . '|>' - . $after; - } - - /** - * Takes a string that has no strings or comments in it, and highlights - * stuff like keywords, numbers and methods. - * - * @param string $stuff_to_parse The string to parse for keyword, numbers etc. - * @return string - * @todo BUGGY! Why? Why not build string and return? - * @since 1.0.0 - */ - protected function parse_non_string_part($stuff_to_parse) { - $stuff_to_parse = ' ' . $this->hsc($stuff_to_parse); - - // Highlight keywords - $disallowed_before = "(?lexic_permissions['STRINGS']) { - $quotemarks = preg_quote(implode($this->language_data['QUOTEMARKS']), '/'); - $disallowed_before .= $quotemarks; - $disallowed_after .= $quotemarks; - } - $disallowed_before .= "])"; - $disallowed_after .= "])"; - - $parser_control_pergroup = false; - if (isset($this->language_data['PARSER_CONTROL'])) { - if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS'])) { - $x = 0; // check wether per-keyword-group parser_control is enabled - if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE'])) { - $disallowed_before = $this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE']; - ++$x; - } - if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER'])) { - $disallowed_after = $this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER']; - ++$x; - } - $parser_control_pergroup = (count($this->language_data['PARSER_CONTROL']['KEYWORDS']) - $x) > 0; - } - } - - foreach (array_keys($this->language_data['KEYWORDS']) as $k) { - if (!isset($this->lexic_permissions['KEYWORDS'][$k]) || - $this->lexic_permissions['KEYWORDS'][$k]) { - - $case_sensitive = $this->language_data['CASE_SENSITIVE'][$k]; - $modifiers = $case_sensitive ? '' : 'i'; - - // NEW in 1.0.8 - per-keyword-group parser control - $disallowed_before_local = $disallowed_before; - $disallowed_after_local = $disallowed_after; - if ($parser_control_pergroup && isset($this->language_data['PARSER_CONTROL']['KEYWORDS'][$k])) { - if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS'][$k]['DISALLOWED_BEFORE'])) { - $disallowed_before_local = - $this->language_data['PARSER_CONTROL']['KEYWORDS'][$k]['DISALLOWED_BEFORE']; - } - - if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS'][$k]['DISALLOWED_AFTER'])) { - $disallowed_after_local = - $this->language_data['PARSER_CONTROL']['KEYWORDS'][$k]['DISALLOWED_AFTER']; - } - } - - $this->_kw_replace_group = $k; - - //NEW in 1.0.8, the cached regexp list - // since we don't want PHP / PCRE to crash due to too large patterns we split them into smaller chunks - for ($set = 0, $set_length = count($this->language_data['CACHED_KEYWORD_LISTS'][$k]); $set < $set_length; ++$set) { - $keywordset =& $this->language_data['CACHED_KEYWORD_LISTS'][$k][$set]; - // Might make a more unique string for putting the number in soon - // Basically, we don't put the styles in yet because then the styles themselves will - // get highlighted if the language has a CSS keyword in it (like CSS, for example ;)) - $stuff_to_parse = preg_replace_callback( - "/$disallowed_before_local({$keywordset})(?!\(?:htm|php|aspx?))$disallowed_after_local/$modifiers", - array($this, 'handle_keyword_replace'), - $stuff_to_parse - ); - } - } - } - - // Regular expressions - foreach ($this->language_data['REGEXPS'] as $key => $regexp) { - if ($this->lexic_permissions['REGEXPS'][$key]) { - if (is_array($regexp)) { - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { - // produce valid HTML when we match multiple lines - $this->_hmr_replace = $regexp[GESHI_REPLACE]; - $this->_hmr_before = $regexp[GESHI_BEFORE]; - $this->_hmr_key = $key; - $this->_hmr_after = $regexp[GESHI_AFTER]; - $stuff_to_parse = preg_replace_callback( - "/" . $regexp[GESHI_SEARCH] . "/{$regexp[GESHI_MODIFIERS]}", - array($this, 'handle_multiline_regexps'), - $stuff_to_parse); - $this->_hmr_replace = false; - $this->_hmr_before = ''; - $this->_hmr_after = ''; - } else { - $stuff_to_parse = preg_replace( - '/' . $regexp[GESHI_SEARCH] . '/' . $regexp[GESHI_MODIFIERS], - $regexp[GESHI_BEFORE] . '<|!REG3XP' . $key . '!>' . $regexp[GESHI_REPLACE] . '|>' . $regexp[GESHI_AFTER], - $stuff_to_parse); - } - } else { - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { - // produce valid HTML when we match multiple lines - $this->_hmr_key = $key; - $stuff_to_parse = preg_replace_callback("/(" . $regexp . ")/", - array($this, 'handle_multiline_regexps'), $stuff_to_parse); - $this->_hmr_key = ''; - } else { - $stuff_to_parse = preg_replace("/(" . $regexp . ")/", "<|!REG3XP$key!>\\1|>", $stuff_to_parse); - } - } - } - } - - // Highlight numbers. As of 1.0.8 we support different types of numbers - $numbers_found = false; - - if ($this->lexic_permissions['NUMBERS'] && preg_match($this->language_data['PARSER_CONTROL']['NUMBERS']['PRECHECK_RX'], $stuff_to_parse)) { - $numbers_found = true; - - //For each of the formats ... - foreach ($this->language_data['NUMBERS_RXCACHE'] as $id => $regexp) { - //Check if it should be highlighted ... - $stuff_to_parse = preg_replace($regexp, "<|/NUM!$id/>\\1|>", $stuff_to_parse); - } - } - - // - // Now that's all done, replace /[number]/ with the correct styles - // - foreach (array_keys($this->language_data['KEYWORDS']) as $k) { - if (!$this->use_classes) { - $attributes = ' style="' . - ($this->language_data['STYLES']['KEYWORDS'][$k] ?? "") . '"'; - } else { - $attributes = ' class="kw' . $k . '"'; - } - $stuff_to_parse = str_replace("<|/$k/>", "<|$attributes>", $stuff_to_parse); - } - - if ($numbers_found) { - // Put number styles in - foreach ($this->language_data['NUMBERS_RXCACHE'] as $id => $regexp) { - //Commented out for now, as this needs some review ... - // if ($numbers_permissions & $id) { - //Get the appropriate style ... - //Checking for unset styles is done by the style cache builder ... - if (!$this->use_classes) { - $attributes = ' style="' . $this->language_data['STYLES']['NUMBERS'][$id] . '"'; - } else { - $attributes = ' class="nu' . $id . '"'; - } - - //Set in the correct styles ... - $stuff_to_parse = str_replace("/NUM!$id/", $attributes, $stuff_to_parse); - // } - } - } - - // Highlight methods and fields in objects - if ($this->lexic_permissions['METHODS'] && $this->language_data['OOLANG']) { - $oolang_spaces = "[\s]*"; - $oolang_before = ""; - $oolang_after = "[a-zA-Z][a-zA-Z0-9_]*"; - if (isset($this->language_data['PARSER_CONTROL'])) { - if (isset($this->language_data['PARSER_CONTROL']['OOLANG'])) { - if (isset($this->language_data['PARSER_CONTROL']['OOLANG']['MATCH_BEFORE'])) { - $oolang_before = $this->language_data['PARSER_CONTROL']['OOLANG']['MATCH_BEFORE']; - } - if (isset($this->language_data['PARSER_CONTROL']['OOLANG']['MATCH_AFTER'])) { - $oolang_after = $this->language_data['PARSER_CONTROL']['OOLANG']['MATCH_AFTER']; - } - if (isset($this->language_data['PARSER_CONTROL']['OOLANG']['MATCH_SPACES'])) { - $oolang_spaces = $this->language_data['PARSER_CONTROL']['OOLANG']['MATCH_SPACES']; - } - } - } - - foreach ($this->language_data['OBJECT_SPLITTERS'] as $key => $splitter) { - if (false !== strpos($stuff_to_parse, $splitter)) { - if (!$this->use_classes) { - $attributes = ' style="' . $this->language_data['STYLES']['METHODS'][$key] . '"'; - } else { - $attributes = ' class="me' . $key . '"'; - } - $stuff_to_parse = preg_replace("/($oolang_before)(" . preg_quote($this->language_data['OBJECT_SPLITTERS'][$key], '/') . ")($oolang_spaces)($oolang_after)/", "\\1\\2\\3<|$attributes>\\4|>", $stuff_to_parse); - } - } - } - - // - // Highlight brackets. Yes, I've tried adding a semi-colon to this list. - // You try it, and see what happens ;) - // TODO: Fix lexic permissions not converting entities if shouldn't - // be highlighting regardless - // - if ($this->lexic_permissions['BRACKETS']) { - $stuff_to_parse = str_replace($this->language_data['CACHE_BRACKET_MATCH'], - $this->language_data['CACHE_BRACKET_REPLACE'], $stuff_to_parse); - } - - - //FIX for symbol highlighting ... - if ($this->lexic_permissions['SYMBOLS'] && !empty($this->language_data['SYMBOLS'])) { - //Get all matches and throw away those witin a block that is already highlighted... (i.e. matched by a regexp) - $n_symbols = preg_match_all("/<\|(?:|[^>])+>(?:(?!\|>).*?)\|>|<\/a>|(?:" . $this->language_data['SYMBOL_SEARCH'] . ")+(?![^<]+?>)/", $stuff_to_parse, $pot_symbols, PREG_OFFSET_CAPTURE | PREG_SET_ORDER); - $global_offset = 0; - for ($s_id = 0; $s_id < $n_symbols; ++$s_id) { - $symbol_match = $pot_symbols[$s_id][0][0]; - if (strpos($symbol_match, '<') !== false || strpos($symbol_match, '>') !== false) { - // already highlighted blocks _must_ include either < or > - // so if this conditional applies, we have to skip this match - // BenBE: UNLESS the block contains or - if (strpos($symbol_match, '') === false && - strpos($symbol_match, '') === false) { - continue; - } - } - - // if we reach this point, we have a valid match which needs to be highlighted - - $symbol_length = strlen($symbol_match); - $symbol_offset = $pot_symbols[$s_id][0][1]; - unset($pot_symbols[$s_id]); - $symbol_hl = ""; - - // if we have multiple styles, we have to handle them properly - if ($this->language_data['MULTIPLE_SYMBOL_GROUPS']) { - $old_sym = -1; - // Split the current stuff to replace into its atomic symbols ... - preg_match_all("/" . $this->language_data['SYMBOL_SEARCH'] . "/", $symbol_match, $sym_match_syms, PREG_PATTERN_ORDER); - foreach ($sym_match_syms[0] as $sym_ms) { - //Check if consequtive symbols belong to the same group to save output ... - if (isset($this->language_data['SYMBOL_DATA'][$sym_ms]) - && ($this->language_data['SYMBOL_DATA'][$sym_ms] != $old_sym)) { - if (-1 != $old_sym) { - $symbol_hl .= "|>"; - } - $old_sym = $this->language_data['SYMBOL_DATA'][$sym_ms]; - if (!$this->use_classes) { - $symbol_hl .= '<| style="' . $this->language_data['STYLES']['SYMBOLS'][$old_sym] . '">'; - } else { - $symbol_hl .= '<| class="sy' . $old_sym . '">'; - } - } - $symbol_hl .= $sym_ms; - } - unset($sym_match_syms); - - //Close remaining tags and insert the replacement at the right position ... - //Take caution if symbol_hl is empty to avoid doubled closing spans. - if (-1 != $old_sym) { - $symbol_hl .= "|>"; - } - } else { - if (!$this->use_classes) { - $symbol_hl = '<| style="' . $this->language_data['STYLES']['SYMBOLS'][0] . '">'; - } else { - $symbol_hl = '<| class="sy0">'; - } - $symbol_hl .= $symbol_match . '|>'; - } - - $stuff_to_parse = substr_replace($stuff_to_parse, $symbol_hl, $symbol_offset + $global_offset, $symbol_length); - - // since we replace old text with something of different size, - // we'll have to keep track of the differences - $global_offset += strlen($symbol_hl) - $symbol_length; - } - } - //FIX for symbol highlighting ... - - // Add class/style for regexps - foreach (array_keys($this->language_data['REGEXPS']) as $key) { - if ($this->lexic_permissions['REGEXPS'][$key]) { - if (is_callable($this->language_data['STYLES']['REGEXPS'][$key])) { - $this->_rx_key = $key; - $stuff_to_parse = preg_replace_callback("/!REG3XP$key!(.*)\|>/U", - array($this, 'handle_regexps_callback'), - $stuff_to_parse); - } else { - if (!$this->use_classes) { - $attributes = ' style="' . $this->language_data['STYLES']['REGEXPS'][$key] . '"'; - } else { - if (is_array($this->language_data['REGEXPS'][$key]) && - array_key_exists(GESHI_CLASS, $this->language_data['REGEXPS'][$key])) { - $attributes = ' class="' . - $this->language_data['REGEXPS'][$key][GESHI_CLASS] . '"'; - } else { - $attributes = ' class="re' . $key . '"'; - } - } - $stuff_to_parse = str_replace("!REG3XP$key!", "$attributes", $stuff_to_parse); - } - } - } - - // Replace with . for urls - $stuff_to_parse = str_replace('', '.', $stuff_to_parse); - // Replace <|UR1| with link_styles[GESHI_LINK])) { - if ($this->use_classes) { - $stuff_to_parse = str_replace('<|UR1|', 'link_target . ' href=', $stuff_to_parse); - } else { - $stuff_to_parse = str_replace('<|UR1|', 'link_target . ' style="' . $this->link_styles[GESHI_LINK] . '" href=', $stuff_to_parse); - } - } else { - $stuff_to_parse = str_replace('<|UR1|', 'link_target . ' href=', $stuff_to_parse); - } - - // - // NOW we add the span thingy ;) - // - - $stuff_to_parse = str_replace('<|', '', '', $stuff_to_parse); - return substr($stuff_to_parse, 1); - } - - /** - * Sets the time taken to parse the code - * - * @param string $start_time The time when parsing started as returned by @see microtime() - * @param string $end_time The time when parsing ended as returned by @see microtime() - * @since 1.0.2 - */ - protected function set_time($start_time, $end_time) { - $start = explode(' ', $start_time); - $end = explode(' ', $end_time); - $this->time = $end[0] + $end[1] - $start[0] - $start[1]; - } - - /** - * Gets the time taken to parse the code - * - * @return double The time taken to parse the code - * @since 1.0.2 - */ - public function get_time() { - return $this->time; - } - - /** - * Merges arrays recursively, overwriting values of the first array with values of later arrays - * - * @since 1.0.8 - */ - protected function merge_arrays() { - $arrays = func_get_args(); - $narrays = count($arrays); - - // check arguments - // comment out if more performance is necessary (in this case the foreach loop will trigger a warning if the argument is not an array) - for ($i = 0; $i < $narrays; $i++) { - if (!is_array($arrays[$i])) { - // also array_merge_recursive returns nothing in this case - trigger_error('Argument #' . ($i + 1) . ' is not an array - trying to merge array with scalar! Returning false!', E_USER_WARNING); - return false; - } - } - - // the first array is in the output set in every case - $ret = $arrays[0]; - - // merege $ret with the remaining arrays - for ($i = 1; $i < $narrays; $i++) { - foreach ($arrays[$i] as $key => $value) { - if (is_array($value) && isset($ret[$key])) { - // if $ret[$key] is not an array you try to merge an scalar value with an array - the result is not defined (incompatible arrays) - // in this case the call will trigger an E_USER_WARNING and the $ret[$key] will be false. - $ret[$key] = $this->merge_arrays($ret[$key], $value); - } else { - $ret[$key] = $value; - } - } - } - - return $ret; - } - - /** - * Gets language information and stores it for later use - * - * @param string $file_name The filename of the language file you want to load - * @since 1.0.0 - * @todo Needs to load keys for lexic permissions for keywords, regexps etc - */ - protected function load_language($file_name) { - if ($file_name == $this->loaded_language) { - // this file is already loaded! - return; - } - - //Prepare some stuff before actually loading the language file - $this->loaded_language = $file_name; - $this->parse_cache_built = false; - $this->enable_highlighting(); - $language_data = array(); - - //Load the language file - require $file_name; - - - // Perhaps some checking might be added here later to check that - // $language data is a valid thing but maybe not - $this->language_data = $language_data; - - // Set strict mode if should be set - $this->strict_mode = $this->language_data['STRICT_MODE_APPLIES']; - - // Set permissions for all lexics to true - // so they'll be highlighted by default - foreach (array_keys($this->language_data['KEYWORDS']) as $key) { - - if (!empty($this->language_data['KEYWORDS'][$key])) { - $this->lexic_permissions['KEYWORDS'][$key] = true; - } else { - $this->lexic_permissions['KEYWORDS'][$key] = false; - } - } - - foreach (array_keys($this->language_data['COMMENT_SINGLE']) as $key) { - $this->lexic_permissions['COMMENTS'][$key] = true; - } - foreach (array_keys($this->language_data['REGEXPS']) as $key) { - $this->lexic_permissions['REGEXPS'][$key] = true; - } - - // for BenBE and future code reviews: - // we can use empty here since we only check for existance and emptiness of an array - // if it is not an array at all but rather false or null this will work as intended as well - // even if $this->language_data['PARSER_CONTROL'] is undefined this won't trigger a notice - if (!empty($this->language_data['PARSER_CONTROL']['ENABLE_FLAGS'])) { - foreach ($this->language_data['PARSER_CONTROL']['ENABLE_FLAGS'] as $flag => $value) { - // it's either true or false and maybe is true as well - $perm = $value !== GESHI_NEVER; - if ($flag == 'ALL') { - $this->enable_highlighting($perm); - continue; - } - if (!isset($this->lexic_permissions[$flag])) { - // unknown lexic permission - continue; - } - if (is_array($this->lexic_permissions[$flag])) { - foreach ($this->lexic_permissions[$flag] as $key => $val) { - $this->lexic_permissions[$flag][$key] = $perm; - } - } else { - $this->lexic_permissions[$flag] = $perm; - } - } - unset($this->language_data['PARSER_CONTROL']['ENABLE_FLAGS']); - } - - //Fix: Problem where hardescapes weren't handled if no ESCAPE_CHAR was given - //You need to set one for HARDESCAPES only in this case. - if (!isset($this->language_data['HARDCHAR'])) { - $this->language_data['HARDCHAR'] = $this->language_data['ESCAPE_CHAR']; - } - - //NEW in 1.0.8: Allow styles to be loaded from a separate file to override defaults - $style_filename = substr($file_name, 0, -4) . '.style.php'; - if (is_readable($style_filename)) { - //Clear any style_data that could have been set before ... - if (isset($style_data)) { - unset($style_data); - } - - //Read the Style Information from the style file - include $style_filename; - - //Apply the new styles to our current language styles - if (isset($style_data) && is_array($style_data)) { - $this->language_data['STYLES'] = - $this->merge_arrays($this->language_data['STYLES'], $style_data); - } - } - } - - /** - * Takes the parsed code and various options, and creates the HTML - * surrounding it to make it look nice. - * - * @param string $parsed_code The code already parsed (reference!) - * @since 1.0.0 - */ - protected function finalise(&$parsed_code) { - // Remove end parts of important declarations - // This is BUGGY!! My fault for bad code: fix coming in 1.2 - // @todo Remove this crap - if ($this->enable_important_blocks && - (strpos($parsed_code, $this->hsc(GESHI_START_IMPORTANT)) === false)) { - $parsed_code = str_replace($this->hsc(GESHI_END_IMPORTANT), '', $parsed_code); - } - - // Add HTML whitespace stuff if we're using the
    header - if ($this->header_type != GESHI_HEADER_PRE && $this->header_type != GESHI_HEADER_PRE_VALID) { - $this->indent($parsed_code); - } - - // purge some unnecessary stuff - /** NOTE: memorypeak #1 */ - $parsed_code = preg_replace('#]+>(\s*)#', '\\1', $parsed_code); - - // If we are using IDs for line numbers, there needs to be an overall - // ID set to prevent collisions. - if ($this->add_ids && !$this->overall_id) { - $this->overall_id = ''; - } - - // Get code into lines - /** NOTE: memorypeak #2 */ - $code = explode("\n", $parsed_code); - $parsed_code = $this->header(); - - // If we're using line numbers, we insert
  • s and appropriate - // markup to style them (otherwise we don't need to do anything) - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS && $this->header_type != GESHI_HEADER_PRE_TABLE) { - // If we're using the
     header, we shouldn't add newlines because
    -            // the 
     will line-break them (and the 
  • s already do this for us) - $ls = ($this->header_type != GESHI_HEADER_PRE && $this->header_type != GESHI_HEADER_PRE_VALID) ? "\n" : ''; - - // Foreach line... - for ($i = 0, $n = count($code); $i < $n;) { - //Reset the attributes for a new line ... - $attrs = array(); - - // Make lines have at least one space in them if they're empty - // BenBE: Checking emptiness using trim instead of relying on blanks - if ('' == trim($code[$i])) { - $code[$i] = ' '; - } - - // If this is a "special line"... - if ($this->line_numbers == GESHI_FANCY_LINE_NUMBERS && - $i % $this->line_nth_row == ($this->line_nth_row - 1)) { - // Set the attributes to style the line - if ($this->use_classes) { - //$attr = ' class="li2"'; - $attrs['class'][] = 'li2'; - $def_attr = ' class="de2"'; - } else { - //$attr = ' style="' . $this->line_style2 . '"'; - $attrs['style'][] = $this->line_style2; - // This style "covers up" the special styles set for special lines - // so that styles applied to special lines don't apply to the actual - // code on that line - $def_attr = ' style="' . $this->code_style . '"'; - } - } else { - if ($this->use_classes) { - //$attr = ' class="li1"'; - $attrs['class'][] = 'li1'; - $def_attr = ' class="de1"'; - } else { - //$attr = ' style="' . $this->line_style1 . '"'; - $attrs['style'][] = $this->line_style1; - $def_attr = ' style="' . $this->code_style . '"'; - } - } - - //Check which type of tag to insert for this line - if ($this->header_type == GESHI_HEADER_PRE_VALID) { - $start = ""; - $end = '
  • '; - } else { - // Span or div? - $start = ""; - $end = ''; - } - - ++$i; - - // Are we supposed to use ids? If so, add them - if ($this->add_ids) { - $attrs['id'][] = "$this->overall_id$i"; - } - - //Is this some line with extra styles??? - if (in_array($i, $this->highlight_extra_lines)) { - if ($this->use_classes) { - if (isset($this->highlight_extra_lines_styles[$i])) { - $attrs['class'][] = "lx$i"; - } else { - $attrs['class'][] = "ln-xtra"; - } - } else { - array_push($attrs['style'], $this->get_line_style($i)); - } - } - - // Add in the line surrounded by appropriate list HTML - $attr_string = ''; - foreach ($attrs as $key => $attr) { - $attr_string .= ' ' . $key . '="' . implode(' ', $attr) . '"'; - } - - $parsed_code .= "$start{$code[$i-1]}$end
  • $ls"; - unset($code[$i - 1]); - } - } else { - $n = count($code); - if ($this->use_classes) { - $attributes = ' class="de1"'; - } else { - $attributes = ' style="' . $this->code_style . '"'; - } - if ($this->header_type == GESHI_HEADER_PRE_VALID) { - $parsed_code .= ''; - } elseif ($this->header_type == GESHI_HEADER_PRE_TABLE) { - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { - if ($this->use_classes) { - $attrs = ' class="ln"'; - } else { - $attrs = ' style="' . $this->table_linenumber_style . '"'; - } - $parsed_code .= ''; - // get linenumbers - // we don't merge it with the for below, since it should be better for - // memory consumption this way - // @todo: but... actually it would still be somewhat nice to merge the two loops - // the mem peaks are at different positions - for ($i = 0; $i < $n; ++$i) { - $close = 0; - // fancy lines - if ($this->line_numbers == GESHI_FANCY_LINE_NUMBERS && - $i % $this->line_nth_row == ($this->line_nth_row - 1)) { - // Set the attributes to style the line - if ($this->use_classes) { - $parsed_code .= ''; - } else { - // This style "covers up" the special styles set for special lines - // so that styles applied to special lines don't apply to the actual - // code on that line - $parsed_code .= '' - . ''; - } - $close += 2; - } - //Is this some line with extra styles??? - if (in_array($i + 1, $this->highlight_extra_lines)) { - if ($this->use_classes) { - if (isset($this->highlight_extra_lines_styles[$i])) { - $parsed_code .= ""; - } else { - $parsed_code .= ""; - } - } else { - $parsed_code .= "get_line_style($i) . "\">"; - } - ++$close; - } - $parsed_code .= $this->line_numbers_start + $i; - if ($close) { - $parsed_code .= str_repeat('', $close); - } elseif ($i != $n) { - $parsed_code .= "\n"; - } - } - $parsed_code .= ''; - } - $parsed_code .= ''; - } - // No line numbers, but still need to handle highlighting lines extra. - // Have to use divs so the full width of the code is highlighted - $close = 0; - for ($i = 0; $i < $n; ++$i) { - // Make lines have at least one space in them if they're empty - // BenBE: Checking emptiness using trim instead of relying on blanks - if ('' == trim($code[$i])) { - $code[$i] = ' '; - } - // fancy lines - if ($this->line_numbers == GESHI_FANCY_LINE_NUMBERS && - $i % $this->line_nth_row == ($this->line_nth_row - 1)) { - // Set the attributes to style the line - if ($this->use_classes) { - $parsed_code .= ''; - } else { - // This style "covers up" the special styles set for special lines - // so that styles applied to special lines don't apply to the actual - // code on that line - $parsed_code .= '' - . ''; - } - $close += 2; - } - //Is this some line with extra styles??? - if (in_array($i + 1, $this->highlight_extra_lines)) { - if ($this->use_classes) { - if (isset($this->highlight_extra_lines_styles[$i])) { - $parsed_code .= ""; - } else { - $parsed_code .= ""; - } - } else { - $parsed_code .= "get_line_style($i) . "\">"; - } - ++$close; - } - - $parsed_code .= $code[$i]; - - if ($close) { - $parsed_code .= str_repeat('', $close); - $close = 0; - } elseif ($i + 1 < $n) { - $parsed_code .= "\n"; - } - unset($code[$i]); - } - - if ($this->header_type == GESHI_HEADER_PRE_VALID || $this->header_type == GESHI_HEADER_PRE_TABLE) { - $parsed_code .= ''; - } - if ($this->header_type == GESHI_HEADER_PRE_TABLE && $this->line_numbers != GESHI_NO_LINE_NUMBERS) { - $parsed_code .= ''; - } - } - - $parsed_code .= $this->footer(); - } - - /** - * Creates the header for the code block (with correct attributes) - * - * @return string The header for the code block - * @since 1.0.0 - */ - protected function header() { - // Get attributes needed - /** - * @todo Document behaviour change - class is outputted regardless of whether - * we're using classes or not. Same with style - */ - $attributes = ' class="' . $this->_genCSSName($this->language); - if ($this->overall_class != '') { - $attributes .= " " . $this->_genCSSName($this->overall_class); - } - $attributes .= '"'; - - if ($this->overall_id != '') { - $attributes .= " id=\"{$this->overall_id}\""; - } - if ($this->overall_style != '' && !$this->use_classes) { - $attributes .= ' style="' . $this->overall_style . '"'; - } - - $ol_attributes = ''; - - if ($this->line_numbers_start != 1) { - $ol_attributes .= ' start="' . $this->line_numbers_start . '"'; - } - - // Get the header HTML - $header = $this->header_content; - if ($header) { - if ($this->header_type == GESHI_HEADER_PRE || $this->header_type == GESHI_HEADER_PRE_VALID) { - $header = str_replace("\n", '', $header); - } - $header = $this->replace_keywords($header); - - if ($this->use_classes) { - $attr = ' class="head"'; - } else { - $attr = " style=\"{$this->header_content_style}\""; - } - if ($this->header_type == GESHI_HEADER_PRE_TABLE && $this->line_numbers != GESHI_NO_LINE_NUMBERS) { - $header = "$header"; - } else { - $header = "$header"; - } - } - - if (GESHI_HEADER_NONE == $this->header_type) { - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { - return "$header"; - } - return $header . ($this->force_code_block ? '
    ' : ''); - } - - // Work out what to return and do it - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { - if ($this->header_type == GESHI_HEADER_PRE) { - return "$header"; - } elseif ($this->header_type == GESHI_HEADER_DIV || - $this->header_type == GESHI_HEADER_PRE_VALID) { - return "$header"; - } elseif ($this->header_type == GESHI_HEADER_PRE_TABLE) { - return "$header"; - } - } else { - if ($this->header_type == GESHI_HEADER_PRE) { - return "$header" . - ($this->force_code_block ? '
    ' : ''); - } else { - return "$header" . - ($this->force_code_block ? '
    ' : ''); - } - } - } - - /** - * Returns the footer for the code block. - * - * @return string The footer for the code block - * @since 1.0.0 - */ - protected function footer() { - $footer = $this->footer_content; - if ($footer) { - if ($this->header_type == GESHI_HEADER_PRE) { - $footer = str_replace("\n", '', $footer); - } - $footer = $this->replace_keywords($footer); - - if ($this->use_classes) { - $attr = ' class="foot"'; - } else { - $attr = " style=\"{$this->footer_content_style}\""; - } - if ($this->header_type == GESHI_HEADER_PRE_TABLE && $this->line_numbers != GESHI_NO_LINE_NUMBERS) { - $footer = "$footer"; - } else { - $footer = "$footer
    "; - } - } - - if (GESHI_HEADER_NONE == $this->header_type) { - return ($this->line_numbers != GESHI_NO_LINE_NUMBERS) ? '' . $footer : $footer; - } - - if ($this->header_type == GESHI_HEADER_DIV || $this->header_type == GESHI_HEADER_PRE_VALID) { - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { - return "$footer
    "; - } - return ($this->force_code_block ? '
    ' : '') . - "$footer"; - } elseif ($this->header_type == GESHI_HEADER_PRE_TABLE) { - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { - return "$footer"; - } - return ($this->force_code_block ? '' : '') . - "$footer"; - } else { - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { - return "$footer"; - } - return ($this->force_code_block ? '' : '') . - "$footer"; - } - } - - /** - * Replaces certain keywords in the header and footer with - * certain configuration values - * - * @param string $instr The header or footer content to do replacement on - * @return string The header or footer with replaced keywords - * @since 1.0.2 - */ - protected function replace_keywords($instr) { - $keywords = $replacements = array(); - - $keywords[] = '
      to have no effect at all if there are line numbers - // (
        s have margins that should be destroyed so all layout is - // controlled by the set_overall_style method, which works on the - //
         or 
        container). Additionally, set default styles for lines - if (!$economy_mode || $this->line_numbers != GESHI_NO_LINE_NUMBERS) { - //$stylesheet .= "$selector, {$selector}ol, {$selector}ol li {margin: 0;}\n"; - $stylesheet .= "$selector.de1, $selector.de2 {{$this->code_style}}\n"; - } - - // Add overall styles - // note: neglect economy_mode, empty styles are meaningless - if ($this->overall_style != '') { - $stylesheet .= "$selector {{$this->overall_style}}\n"; - } - - // Add styles for links - // note: economy mode does not make _any_ sense here - // either the style is empty and thus no selector is needed - // or the appropriate key is given. - foreach ($this->link_styles as $key => $style) { - if ($style != '') { - $stylesheet .= match ($key) { - GESHI_LINK => "{$selector}a:link {{$style}}\n", - GESHI_HOVER => "{$selector}a:hover {{$style}}\n", - GESHI_ACTIVE => "{$selector}a:active {{$style}}\n", - GESHI_VISITED => "{$selector}a:visited {{$style}}\n", - }; - } - } - - // Header and footer - // note: neglect economy_mode, empty styles are meaningless - if ($this->header_content_style != '') { - $stylesheet .= "$selector.head {{$this->header_content_style}}\n"; - } - if ($this->footer_content_style != '') { - $stylesheet .= "$selector.foot {{$this->footer_content_style}}\n"; - } - - // Styles for important stuff - // note: neglect economy_mode, empty styles are meaningless - if ($this->important_styles != '') { - $stylesheet .= "$selector.imp {{$this->important_styles}}\n"; - } - - // Simple line number styles - if ((!$economy_mode || $this->line_numbers != GESHI_NO_LINE_NUMBERS) && $this->line_style1 != '') { - $stylesheet .= "{$selector}li, {$selector}.li1 {{$this->line_style1}}\n"; - } - if ((!$economy_mode || $this->line_numbers != GESHI_NO_LINE_NUMBERS) && $this->table_linenumber_style != '') { - $stylesheet .= "{$selector}.ln {{$this->table_linenumber_style}}\n"; - } - // If there is a style set for fancy line numbers, echo it out - if ((!$economy_mode || $this->line_numbers == GESHI_FANCY_LINE_NUMBERS) && $this->line_style2 != '') { - $stylesheet .= "{$selector}.li2 {{$this->line_style2}}\n"; - } - - // note: empty styles are meaningless - foreach ($this->language_data['STYLES']['KEYWORDS'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || - (isset($this->lexic_permissions['KEYWORDS'][$group]) && - $this->lexic_permissions['KEYWORDS'][$group]))) { - $stylesheet .= "$selector.kw$group {{$styles}}\n"; - } - } - foreach ($this->language_data['STYLES']['COMMENTS'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || - (isset($this->lexic_permissions['COMMENTS'][$group]) && - $this->lexic_permissions['COMMENTS'][$group]) || - (!empty($this->language_data['COMMENT_REGEXP']) && - !empty($this->language_data['COMMENT_REGEXP'][$group])))) { - $stylesheet .= "$selector.co$group {{$styles}}\n"; - } - } - foreach ($this->language_data['STYLES']['ESCAPE_CHAR'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || $this->lexic_permissions['ESCAPE_CHAR'])) { - // NEW: since 1.0.8 we have to handle hardescapes - if ($group === 'HARD') { - $group = '_h'; - } - $stylesheet .= "$selector.es$group {{$styles}}\n"; - } - } - foreach ($this->language_data['STYLES']['BRACKETS'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || $this->lexic_permissions['BRACKETS'])) { - $stylesheet .= "$selector.br$group {{$styles}}\n"; - } - } - foreach ($this->language_data['STYLES']['SYMBOLS'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || $this->lexic_permissions['SYMBOLS'])) { - $stylesheet .= "$selector.sy$group {{$styles}}\n"; - } - } - foreach ($this->language_data['STYLES']['STRINGS'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || $this->lexic_permissions['STRINGS'])) { - // NEW: since 1.0.8 we have to handle hardquotes - if ($group === 'HARD') { - $group = '_h'; - } - $stylesheet .= "$selector.st$group {{$styles}}\n"; - } - } - if (isset($this->language_data['STYLES']['NUMBERS'])) { - foreach ($this->language_data['STYLES']['NUMBERS'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || $this->lexic_permissions['NUMBERS'])) { - $stylesheet .= "$selector.nu$group {{$styles}}\n"; - } - } - } - - foreach ($this->language_data['STYLES']['METHODS'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || $this->lexic_permissions['METHODS'])) { - $stylesheet .= "$selector.me$group {{$styles}}\n"; - } - } - // note: neglect economy_mode, empty styles are meaningless - foreach ($this->language_data['STYLES']['SCRIPT'] as $group => $styles) { - if ($styles != '') { - $stylesheet .= "$selector.sc$group {{$styles}}\n"; - } - } - foreach ($this->language_data['STYLES']['REGEXPS'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || - (isset($this->lexic_permissions['REGEXPS'][$group]) && - $this->lexic_permissions['REGEXPS'][$group]))) { - if (is_array($this->language_data['REGEXPS'][$group]) && - array_key_exists(GESHI_CLASS, $this->language_data['REGEXPS'][$group])) { - $stylesheet .= "$selector."; - $stylesheet .= $this->language_data['REGEXPS'][$group][GESHI_CLASS]; - $stylesheet .= " {{$styles}}\n"; - } else { - $stylesheet .= "$selector.re$group {{$styles}}\n"; - } - } - } - // Styles for lines being highlighted extra - if (!$economy_mode || (count($this->highlight_extra_lines) != count($this->highlight_extra_lines_styles))) { - $stylesheet .= "{$selector}.ln-xtra, {$selector}li.ln-xtra, {$selector}div.ln-xtra {{$this->highlight_extra_lines_style}}\n"; - } - $stylesheet .= "{$selector}span.xtra { display:block; }\n"; - foreach ($this->highlight_extra_lines_styles as $lineid => $linestyle) { - $stylesheet .= "{$selector}.lx$lineid, {$selector}li.lx$lineid, {$selector}div.lx$lineid {{$linestyle}}\n"; - } - - return $stylesheet; - } - - /** - * Get's the style that is used for the specified line - * - * @param int $line The line number information is requested for - * @since 1.0.7.21 - */ - protected function get_line_style($line) { - $style = null; - if (isset($this->highlight_extra_lines_styles[$line])) { - $style = $this->highlight_extra_lines_styles[$line]; - } else { // if no "extra" style assigned - $style = $this->highlight_extra_lines_style; - } - - return $style; - } - - /** - * this functions creates an optimized regular expression list - * of an array of strings. - * - * Example: - * $list = array('faa', 'foo', 'foobar'); - * => string 'f(aa|oo(bar)?)' - * - * @param array $list array of (unquoted) strings - * @param string $regexp_delimiter your regular expression delimiter, @see preg_quote() - * @return string for regular expression - * @author Milian Wolff - * @since 1.0.8 - */ - protected function optimize_regexp_list($list, $regexp_delimiter = '/') { - $regex_chars = array('.', '\\', '+', '-', '*', '?', '[', '^', ']', '$', - '(', ')', '{', '}', '=', '!', '<', '>', '|', ':', $regexp_delimiter); - sort($list); - $regexp_list = array(''); - $num_subpatterns = 0; - $list_key = 0; - - // the tokens which we will use to generate the regexp list - $tokens = array(); - $prev_keys = array(); - // go through all entries of the list and generate the token list - $cur_len = 0; - for ($i = 0, $i_max = count($list); $i < $i_max; ++$i) { - if ($cur_len > GESHI_MAX_PCRE_LENGTH) { - // seems like the length of this pcre is growing exorbitantly - $regexp_list[++$list_key] = $this->_optimize_regexp_list_tokens_to_string($tokens); - $num_subpatterns = substr_count($regexp_list[$list_key], '(?:'); - $tokens = array(); - $cur_len = 0; - } - $level = 0; - $entry = preg_quote((string)$list[$i], $regexp_delimiter); - $pointer = &$tokens; - // properly assign the new entry to the correct position in the token array - // possibly generate smaller common denominator keys - while (true) { - // get the common denominator - if (isset($prev_keys[$level])) { - if ($prev_keys[$level] == $entry) { - // this is a duplicate entry, skip it - continue 2; - } - $char = 0; - while (isset($entry[$char]) && isset($prev_keys[$level][$char]) - && $entry[$char] == $prev_keys[$level][$char]) { - ++$char; - } - if ($char > 0) { - // this entry has at least some chars in common with the current key - if ($char == strlen($prev_keys[$level])) { - // current key is totally matched, i.e. this entry has just some bits appended - $pointer = &$pointer[$prev_keys[$level]]; - } else { - // only part of the keys match - $new_key_part1 = substr($prev_keys[$level], 0, $char); - $new_key_part2 = substr($prev_keys[$level], $char); - - if (in_array($new_key_part1[0], $regex_chars) - || in_array($new_key_part2[0], $regex_chars)) { - // this is bad, a regex char as first character - $pointer[$entry] = array('' => true); - array_splice($prev_keys, $level, count($prev_keys), $entry); - $cur_len += strlen($entry); - continue; - } else { - // relocate previous tokens - $pointer[$new_key_part1] = array($new_key_part2 => $pointer[$prev_keys[$level]]); - unset($pointer[$prev_keys[$level]]); - $pointer = &$pointer[$new_key_part1]; - // recreate key index - array_splice($prev_keys, $level, count($prev_keys), array($new_key_part1, $new_key_part2)); - $cur_len += strlen($new_key_part2); - } - } - ++$level; - $entry = substr($entry, $char); - continue; - } - // else: fall trough, i.e. no common denominator was found - } - if ($level == 0 && !empty($tokens)) { - // we can dump current tokens into the string and throw them away afterwards - $new_entry = $this->_optimize_regexp_list_tokens_to_string($tokens); - $new_subpatterns = substr_count($new_entry, '(?:'); - if (GESHI_MAX_PCRE_SUBPATTERNS && $num_subpatterns + $new_subpatterns > GESHI_MAX_PCRE_SUBPATTERNS) { - $regexp_list[++$list_key] = $new_entry; - $num_subpatterns = $new_subpatterns; - } else { - if (!empty($regexp_list[$list_key])) { - $new_entry = '|' . $new_entry; - } - $regexp_list[$list_key] .= $new_entry; - $num_subpatterns += $new_subpatterns; - } - $tokens = array(); - $cur_len = 0; - } - // no further common denominator found - $pointer[$entry] = array('' => true); - array_splice($prev_keys, $level, count($prev_keys), $entry); - - $cur_len += strlen($entry); - break; - } - unset($list[$i]); - } - // make sure the last tokens get converted as well - $new_entry = $this->_optimize_regexp_list_tokens_to_string($tokens); - if (GESHI_MAX_PCRE_SUBPATTERNS && $num_subpatterns + substr_count($new_entry, '(?:') > GESHI_MAX_PCRE_SUBPATTERNS) { - if (!empty($regexp_list[$list_key])) { - ++$list_key; - } - $regexp_list[$list_key] = $new_entry; - } else { - if (!empty($regexp_list[$list_key])) { - $new_entry = '|' . $new_entry; - } - $regexp_list[$list_key] .= $new_entry; - } - return $regexp_list; - } - - /** - * this function creates the appropriate regexp string of an token array - * you should not call this function directly, @param array $tokens array of tokens - * @param bool $recursed to know wether we recursed or not - * @return string - * @see $this->optimize_regexp_list(). - * - * @author Milian Wolff - * @since 1.0.8 - */ - protected function _optimize_regexp_list_tokens_to_string(&$tokens, $recursed = false) { - $list = ''; - foreach ($tokens as $token => $sub_tokens) { - $list .= $token; - $close_entry = isset($sub_tokens['']); - unset($sub_tokens['']); - if (!empty($sub_tokens)) { - $list .= '(?:' . $this->_optimize_regexp_list_tokens_to_string($sub_tokens, true) . ')'; - if ($close_entry) { - // make sub_tokens optional - $list .= '?'; - } - } - $list .= '|'; - } - if (!$recursed) { - // do some optimizations - // common trailing strings - // BUGGY! - //$list = preg_replace_callback('#(?<=^|\:|\|)\w+?(\w+)(?:\|.+\1)+(?=\|)#', create_function( - // '$matches', 'return "(?:" . preg_replace("#" . preg_quote($matches[1], "#") . "(?=\||$)#", "", $matches[0]) . ")" . $matches[1];'), $list); - // (?:p)? => p? - $list = preg_replace('#\(\?\:(.)\)\?#', '\1?', $list); - // (?:a|b|c|d|...)? => [abcd...]? - // TODO: a|bb|c => [ac]|bb - $list = preg_replace_callback('#\(\?\:((?:.\|)+.)\)#', function ($matches) { - return "[" . str_replace("|", "", $matches[1]) . "]"; - }, $list); - } - // return $list without trailing pipe - return substr($list, 0, -1); - } -} // End Class GeSHi - - -if (!function_exists('geshi_highlight')) { - /** - * Easy way to highlight stuff. Behaves just like highlight_string - * - * @param string $string The code to highlight - * @param string $language The language to highlight the code in - * @param string $path The path to the language files. You can leave this blank if you need - * as from version 1.0.7 the path should be automatically detected - * @param boolean $return Whether to return the result or to echo - * @return string The code highlighted (if $return is true) - * @since 1.0.2 - */ - function geshi_highlight($string, $language, $path = null, $return = false) { - $geshi = new GeSHi($string, $language, $path); - $geshi->set_header_type(GESHI_HEADER_NONE); - - if ($return) { - return '' . $geshi->parse_code() . ''; - } - - echo '' . $geshi->parse_code() . ''; - - if ($geshi->error()) { - return false; - } - return true; - } -} diff --git a/includes/geshi/css.php b/includes/geshi/css.php deleted file mode 100644 index dbde058..0000000 --- a/includes/geshi/css.php +++ /dev/null @@ -1,944 +0,0 @@ - 'CSS', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array( - 2 => "/(?<=\\()\\s*(?:(?:[a-z0-9]+?:\\/\\/)?[a-z0-9_\\-\\.\\/:]+?)?[a-z]+?\\.[a-z]+?(\\?[^\)]+?)?\\s*?(?=\\))/i" - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"', "'"), - 'ESCAPE_CHAR' => '', - 'ESCAPE_REGEXP' => array( - //Simple Single Char Escapes - //1 => "#\\\\[nfrtv\$\"\n\\\\]#i", - //Hexadecimal Char Specs - 2 => "#\\\\[\da-fA-F]{1,6}\s?#i", - //Unicode Char Specs - //3 => "#\\\\u[\da-fA-F]{1,8}#i", - ), - 'KEYWORDS' => array( - // properties - 1 => array( - 'align-content', - 'align-items', - 'align-self', - 'all', - 'animation', - 'animation-delay', - 'animation-direction', - 'animation-duration', - 'animation-fill-mode', - 'animation-iteration-count', - 'animation-name', - 'animation-play-state', - 'animation-timing-function', - 'backface-visibility', - 'background', - 'background-attachment', - 'background-blend-mode', - 'background-clip', - 'background-color', - 'background-image', - 'background-origin', - 'background-position', - 'background-repeat', - 'background-size', - 'border', - 'border-bottom', - 'border-bottom-color', - 'border-bottom-left-radius', - 'border-bottom-right-radius', - 'border-bottom-style', - 'border-bottom-width', - 'border-collapse', - 'border-color', - 'border-image', - 'border-image-outset', - 'border-image-repeat', - 'border-image-slice', - 'border-image-source', - 'border-image-width', - 'border-left', - 'border-left-color', - 'border-left-style', - 'border-left-width', - 'border-radius', - 'border-right', - 'border-right-color', - 'border-right-style', - 'border-right-width', - 'border-spacing', - 'border-style', - 'border-top', - 'border-top-color', - 'border-top-left-radius', - 'border-top-right-radius', - 'border-top-style', - 'border-top-width', - 'border-width', - 'bottom', - 'box-decoration-break', - 'box-shadow', - 'box-sizing', - 'break-after', - 'break-before', - 'break-inside', - 'caption-side', - 'clear', - 'clip', - 'clip-path', - 'color', - 'columns', - 'column-count', - 'column-fill', - 'column-gap', - 'column-rule', - 'column-rule-color', - 'column-rule-style', - 'column-rule-width', - 'column-span', - 'column-width', - 'content', - 'counter-increment', - 'counter-reset', - 'cursor', - 'direction', - 'display', - 'empty-cells', - 'fill', - 'fill-rule', - 'fill-opacity', - 'filter', - 'flex', - 'flex-basis', - 'flex-direction', - 'flex-flow', - 'flex-grow', - 'flex-shrink', - 'flex-wrap', - 'float', - 'font', - 'font-family', - 'font-feature-settings', - 'font-kerning', - 'font-language-override', - 'font-size', - 'font-size-adjust', - 'font-stretch', - 'font-style', - 'font-synthesis', - 'font-variant', - 'font-variant-alternates', - 'font-variant-caps', - 'font-variant-east-asian', - 'font-variant-ligatures', - 'font-variant-numeric', - 'font-variant-position', - 'font-weight', - 'grid', - 'grid-area', - 'grid-auto-columns', - 'grid-auto-flow', - 'grid-auto-position', - 'grid-auto-rows', - 'grid-column', - 'grid-column-start', - 'grid-column-end', - 'grid-row', - 'grid-row-start', - 'grid-row-end', - 'grid-template', - 'grid-template-areas', - 'grid-template-rows', - 'grid-template-columns', - 'height', - 'hyphens', - 'icon', - 'image-rendering', - 'image-resolution', - 'image-orientation', - 'ime-mode', - 'justify-content', - 'left', - 'letter-spacing', - 'line-break', - 'line-height', - 'list-style', - 'list-style-image', - 'list-style-position', - 'list-style-type', - 'margin', - 'margin-bottom', - 'margin-left', - 'margin-right', - 'margin-top', - 'marks', - 'mask', - 'mask-type', - 'max-height', - 'max-width', - 'min-height', - 'min-width', - 'mix-blend-mode', - 'nav-down', - 'nav-index', - 'nav-left', - 'nav-right', - 'nav-up', - 'object-fit', - 'object-position', - 'opacity', - 'order', - 'orphans', - 'outline', - 'outline-color', - 'outline-offset', - 'outline-style', - 'outline-width', - 'overflow', - 'overflow-wrap', - 'overflow-x', - 'overflow-y', - 'overflow-clip-box', - 'padding', - 'padding-bottom', - 'padding-left', - 'padding-right', - 'padding-top', - 'page-break-after', - 'page-break-before', - 'page-break-inside', - 'perspective', - 'perspective-origin', - 'pointer-events', - 'position', - 'quotes', - 'resize', - 'right', - 'shape-image-threshold', - 'shape-margin', - 'shape-outside', - 'stroke', - 'stroke-width', - 'stroke-linecap', - 'stroke-linejoin', - 'stroke-miterlimit', - 'stroke-dasharray', - 'stroke-dashoffset', - 'table-layout', - 'tab-size', - 'text-align', - 'text-align-last', - 'text-combine-horizontal', - 'text-decoration', - 'text-decoration-color', - 'text-decoration-line', - 'text-decoration-style', - 'text-indent', - 'text-orientation', - 'text-overflow', - 'text-rendering', - 'text-shadow', - 'text-transform', - 'text-underline-position', - 'top', - 'touch-action', - 'transform', - 'transform-origin', - 'transform-style', - 'transition', - 'transition-delay', - 'transition-duration', - 'transition-property', - 'transition-timing-function', - 'unicode-bidi', - 'unicode-range', - 'vertical-align', - 'visibility', - 'white-space', - 'widows', - 'width', - 'will-change', - 'word-break', - 'word-spacing', - 'word-wrap', - 'writing-mode', - 'z-index' - ), - // value - 2 => array( - 'absolute', - 'activeborder', - 'activecaption', - 'after-white-space', - 'ahead', - 'alternate', - 'always', - 'appworkspace', - 'armenian', - 'auto', - 'avoid', - 'background', - 'backwards', - 'baseline', - 'below', - 'bevel', - 'bidi-override', - 'blink', - 'block', - 'block clear', - 'block width', - 'block-axis', - 'bold', - 'bolder', - 'border', - 'border-box', - 'both', - 'bottom', - 'break-word', - 'butt', - 'button', - 'button-bevel', - 'buttonface', - 'buttonhighlight', - 'buttonshadow', - 'buttontext', - 'capitalize', - 'caption', - 'captiontext', - 'caret', - 'center', - 'checkbox', - 'circle', - 'cjk-ideographic', - 'clip', - 'close-quote', - 'collapse', - 'compact', - 'condensed', - 'content', - 'content-box', - 'continuous', - 'crop', - 'cross', - 'crosshair', - 'currentColor', - 'cursive', - 'dashed', - 'decimal', - 'decimal-leading-zero', - 'default', - 'disc', - 'discard', - 'dot-dash', - 'dot-dot-dash', - 'dotted', - 'double', - 'down', - 'e-resize', - 'element', - 'ellipsis', - 'embed', - 'end', - 'evenodd', - 'expanded', - 'extra-condensed', - 'extra-expanded', - 'fantasy', - 'fast', - 'fixed', - 'forwards', - 'georgian', - 'graytext', - 'groove', - 'hand', - 'hebrew', - 'help', - 'hidden', - 'hide', - 'higher', - 'highlight', - 'highlighttext', - 'hiragana', - 'hiragana-iroha', - 'horizontal', - 'icon', - 'ignore', - 'inactiveborder', - 'inactivecaption', - 'inactivecaptiontext', - 'infinite', - 'infobackground', - 'infotext', - 'inherit', - 'initial', - 'inline', - 'inline-axis', - 'inline-block', - 'inline-table', - 'inset', - 'inside', - 'intrinsic', - 'invert', - 'italic', - 'justify', - 'katakana', - 'katakana-iroha', - 'landscape', - 'large', - 'larger', - 'left', - 'level', - 'lighter', - 'line-through', - 'list-item', - 'listbox', - 'listitem', - 'logical', - 'loud', - 'lower', - 'lower-alpha', - 'lower-greek', - 'lower-latin', - 'lower-roman', - 'lowercase', - 'ltr', - 'marker', - 'match', - 'medium', - 'menu', - 'menulist', - 'menulist-button', - 'menulist-text', - 'menulist-textfield', - 'menutext', - 'message-box', - 'middle', - 'min-intrinsic', - 'miter', - 'mix', - 'monospace', - 'move', - 'multiple', - 'n-resize', - 'narrower', - 'ne-resize', - 'no-close', - 'no-close-quote', - 'no-open-quote', - 'no-repeat', - 'none', - 'nonzero', - 'normal', - 'nowrap', - 'nw-resize', - 'oblique', - 'once', - 'open-quote', - 'outset', - 'outside', - 'overline', - 'padding', - 'pointer', - 'portrait', - 'pre', - 'pre-line', - 'pre-wrap', - 'push-button', - 'radio', - 'read-only', - 'read-write', - 'read-write-plaintext-only', - 'relative', - 'repeat', - 'repeat-x', - 'repeat-y', - 'reverse', - 'ridge', - 'right', - 'round', - 'rtl', - 'run-in', - 's-resize', - 'sans-serif', - 'scroll', - 'scrollbar', - 'scrollbarbutton-down', - 'scrollbarbutton-left', - 'scrollbarbutton-right', - 'scrollbarbutton-up', - 'scrollbargripper-horizontal', - 'scrollbargripper-vertical', - 'scrollbarthumb-horizontal', - 'scrollbarthumb-vertical', - 'scrollbartrack-horizontal', - 'scrollbartrack-vertical', - 'se-resize', - 'searchfield', - 'searchfield-close', - 'searchfield-results', - 'semi-condensed', - 'semi-expanded', - 'separate', - 'serif', - 'show', - 'single', - 'skip-white-space', - 'slide', - 'slider-horizontal', - 'slider-vertical', - 'sliderthumb-horizontal', - 'sliderthumb-vertical', - 'slow', - 'small', - 'small-caps', - 'small-caption', - 'smaller', - 'solid', - 'space', - 'square', - 'square-button', - 'start', - 'static', - 'status-bar', - 'stretch', - 'sub', - 'super', - 'sw-resize', - 'table', - 'table-caption', - 'table-cell', - 'table-column', - 'table-column-group', - 'table-footer-group', - 'table-header-group', - 'table-row', - 'table-row-group', - 'text', - 'text-bottom', - 'text-top', - 'textfield', - 'thick', - 'thin', - 'threeddarkshadow', - 'threedface', - 'threedhighlight', - 'threedlightshadow', - 'threedshadow', - 'top', - 'ultra-condensed', - 'ultra-expanded', - 'underline', - 'unfurl', - 'up', - 'upper-alpha', - 'upper-latin', - 'upper-roman', - 'uppercase', - 'vertical', - 'visible', - 'visual', - 'w-resize', - 'wait', - 'wave', - 'wider', - 'window', - 'windowframe', - 'windowtext', - 'x-large', - 'x-small', - 'xx-large', - 'xx-small' - ), - // function xxx() - 3 => array( - 'attr', - 'calc', - 'contrast', - 'cross-fade', - 'cubic-bezier', - 'cycle', - 'device-cmyk', - 'drop-shadow', - 'ellipse', - 'hsl', - 'hsla', - 'hwb', - 'image', - 'matrix', - 'matrix3d', - 'minmax', - 'grayscale', - 'perspective', - 'polygon', - 'radial-gradient', - 'translate', - 'translatex', - 'translatey', - 'translatez', - 'translate3d', - 'skew', - 'skewx', - 'skewy', - 'saturate', - 'sepia', - 'scale', - 'scalex', - 'scaley', - 'scalez', - 'scale3d', - 'steps', - 'rect', - 'repeating-linear-gradient', - 'repeating-radial-gradient', - 'rgb', - 'rgba', - 'rotate', - 'rotatex', - 'rotatey', - 'rotatez', - 'rotate3d', - 'url', - 'var' - ), - // colors - 4 => array( - 'aliceblue', - 'antiquewhite', - 'aqua', - 'aquamarine', - 'azure', - 'beige', - 'bisque', - 'black', - 'blanchedalmond', - 'blue', - 'blueviolet', - 'brown', - 'burlywood', - 'cadetblue', - 'chartreuse', - 'chocolate', - 'coral', - 'cornflowerblue', - 'cornsilk', - 'crimson', - 'cyan', - 'darkblue', - 'darkcyan', - 'darkgoldenrod', - 'darkgray', - 'darkgreen', - 'darkgrey', - 'darkkhaki', - 'darkmagenta', - 'darkolivegreen', - 'darkorange', - 'darkorchid', - 'darkred', - 'darksalmon', - 'darkseagreen', - 'darkslateblue', - 'darkslategray', - 'darkslategrey', - 'darkturquoise', - 'darkviolet', - 'deeppink', - 'deepskyblue', - 'dimgray', - 'dimgrey', - 'dodgerblue', - 'firebrick', - 'floralwhite', - 'forestgreen', - 'fuchsia', - 'gainsboro', - 'ghostwhite', - 'gold', - 'goldenrod', - 'gray', - 'green', - 'greenyellow', - 'grey', - 'honeydew', - 'hotpink', - 'indianred', - 'indigo', - 'ivory', - 'khaki', - 'lavender', - 'lavenderblush', - 'lawngreen', - 'lemonchiffon', - 'lightblue', - 'lightcoral', - 'lightcyan', - 'lightgoldenrodyellow', - 'lightgray', - 'lightgreen', - 'lightgrey', - 'lightpink', - 'lightsalmon', - 'lightseagreen', - 'lightskyblue', - 'lightslategray', - 'lightslategrey', - 'lightsteelblue', - 'lightyellow', - 'lime', - 'limegreen', - 'linen', - 'magenta', - 'maroon', - 'mediumaquamarine', - 'mediumblue', - 'mediumorchid', - 'mediumpurple', - 'mediumseagreen', - 'mediumslateblue', - 'mediumspringgreen', - 'mediumturquoise', - 'mediumvioletred', - 'midnightblue', - 'mintcream', - 'mistyrose', - 'moccasin', - 'navajowhite', - 'navy', - 'oldlace', - 'olive', - 'olivedrab', - 'orange', - 'orangered', - 'orchid', - 'palegoldenrod', - 'palegreen', - 'paleturquoise', - 'palevioletred', - 'papayawhip', - 'peachpuff', - 'peru', - 'pink', - 'plum', - 'powderblue', - 'purple', - 'rebeccapurple', - 'red', - 'rosybrown', - 'royalblue', - 'saddlebrown', - 'salmon', - 'sandybrown', - 'seagreen', - 'seashell', - 'sienna', - 'silver', - 'skyblue', - 'slateblue', - 'slategray', - 'slategrey', - 'snow', - 'springgreen', - 'steelblue', - 'tan', - 'teal', - 'thistle', - 'transparent', - 'tomato', - 'turquoise', - 'violet', - 'wheat', - 'white', - 'whitesmoke', - 'yellow', - 'yellowgreen' - ), - // pseudo class - 5 => array( - 'active', - 'after', - 'before', - 'checked', - 'choices', - 'dir', - 'disabled', - 'empty', - 'enabled', - 'first', - 'first-child', - 'first-letter', - 'first-line', - 'first-of-type', - 'focus', - 'fullscreen', - 'hover', - 'indeterminate', - 'in-range', - 'invalid', - 'lang', - 'last-child', - 'last-of-type', - 'link', - 'not', - 'nth-child', - 'nth-last-child', - 'nth-last-of-type', - 'nth-of-type', - 'only-child', - 'only-of-type', - 'optional', - 'out-of-range', - 'repeat-index', - 'repeat-item', - 'required', - 'root', - 'scope', - 'selection', - 'target', - 'valid', - 'value', - 'visited' - ) - ), - 'SYMBOLS' => array( - '(', ')', '{', '}', ':', ';', - '>', '+', '*', ',', '^', '=' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000000; font-weight: bold;', - 2 => 'color: #993333;', - 3 => 'color: #9932cc;', - 4 => 'color: #dc143c;', - 5 => 'color: #F5758F;', - ), - 'COMMENTS' => array( - 2 => 'color: #ff0000; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - //1 => 'color: #000099; font-weight: bold;', - 2 => 'color: #000099; font-weight: bold;' - //3 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #00AA00;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array(), - 'SYMBOLS' => array( - 0 => 'color: #00AA00;' - ), - 'SCRIPT' => array(), - 'REGEXPS' => array( - 0 => 'color: #cc00cc;', - 1 => 'color: #6666ff;', - 2 => 'color: #3F84D9; font-weight: bold;', - 3 => 'color: #933;', - 4 => 'color: #444;' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array( - //DOM Node ID - 0 => '\#[a-zA-Z0-9\-_]+(?:\\\\:[a-zA-Z0-9\-_]+)*', - //CSS classname - 1 => '\.(?!\d)[a-zA-Z0-9\-_]+(?:\\\\:[a-zA-Z0-9\-_]+)*\b(?=[\{\.#\s,:].|<\|)', - //CSS rules - 2 => '\@(?!\d)[a-zA-Z0-9\-_]+(?:\\\\:[a-zA-Z0-9\-_]+)*\b(?=[\{\.#\s,:].|<\|)', - //Measurements - 3 => '[+\-]?(\d+|(\d*\.\d+))(em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx|%)', - //var - 4 => '(--[a-zA-Z0-9\-]*)' - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array(), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 'DISALLOWED_AFTER' => '(?![\-a-zA-Z0-9_\|%\\-&\.])', - 'DISALLOWED_BEFORE' => '(? array( - 'DISALLOWED_AFTER' => '(?![\-a-zA-Z0-9_\|%\\-&\.])(?=\s*:)' - ) - ) - ) -); diff --git a/includes/geshi/green.php b/includes/geshi/green.php deleted file mode 100644 index e763974..0000000 --- a/includes/geshi/green.php +++ /dev/null @@ -1,68 +0,0 @@ - 'Example', - 'COMMENT_SINGLE' => array( - 1 => '>', - ), - 'COMMENT_MULTI' => array(), - 'COMMENT_REGEXP' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array(), - 'ESCAPE_CHAR' => '', - 'ESCAPE_REGEXP' => array(), - 'HARDQUOTE' => array(), - 'HARDESCAPE' => array(), - 'HARDCHAR' => '', - 'KEYWORDS' => array(), - 'CASE_SENSITIVE' => array( - 1 => false - ), - 'SYMBOLS' => array( - 0 => array( - '' - ) - ), - 'STYLES' => array( - 'KEYWORDS' => array(), - 'COMMENTS' => array( - 1 => 'font-style: normal; color: #789922; line-height: 1.2;', - ), - 'ESCAPE_CHAR' => array(), - 'BRACKETS' => array(), - 'STRINGS' => array(), - 'METHODS' => array(), - 'SYMBOLS' => array(), - 'REGEXPS' => array(), - 'SCRIPT' => array() - ), - 'URLS' => array(), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array(), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array(), -); \ No newline at end of file diff --git a/includes/geshi/html5.php b/includes/geshi/html5.php deleted file mode 100644 index f368149..0000000 --- a/includes/geshi/html5.php +++ /dev/null @@ -1,205 +0,0 @@ - 'HTML5', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 2 => array( - 'a', 'abbr', 'address', 'article', 'area', 'aside', 'audio', - - 'base', 'bdo', 'blockquote', 'body', 'br', 'button', 'b', - - 'caption', 'cite', 'code', 'colgroup', 'col', 'canvas', 'command', 'datalist', 'details', - - 'dd', 'del', 'dfn', 'div', 'dl', 'dt', - - 'em', 'embed', - - 'fieldset', 'form', 'figcaption', 'figure', 'footer', - - 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html', 'header', 'hgroup', - - 'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i', - - 'kbd', 'keygen', - - 'label', 'legend', 'link', 'li', - - 'map', 'meta', 'mark', 'meter', - - 'noscript', 'nav', - - 'object', 'ol', 'optgroup', 'option', 'output', - - 'param', 'pre', 'p', 'progress', - - 'q', - - 'rp', 'rt', 'ruby', - - 'samp', 'script', 'select', 'small', 'span', 'strong', 'style', 'sub', 'sup', 's', 'section', 'source', 'summary', - - 'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'time', - - 'ul', - - 'var', 'video', - - 'wbr', - ), - 3 => array( - 'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis', 'autocomplete', 'autofocus', - 'background', 'bgcolor', 'border', - 'cellpadding', 'cellspacing', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords', 'contenteditable', 'contextmenu', - 'data', 'datetime', 'declare', 'defer', 'dir', 'disabled', 'draggable', 'dropzone', - 'enctype', - 'face', 'for', 'frame', 'frameborder', 'form', 'formaction', 'formenctype', 'formmethod', 'formnovalidate', 'formtarget', - 'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv', 'hidden', - 'id', 'ismap', - 'label', 'lang', 'language', 'link', 'longdesc', - 'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple', 'min', 'max', - 'name', 'nohref', 'noresize', 'noshade', 'nowrap', 'novalidate', - 'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onselect', 'onsubmit', 'onunload', 'onafterprint', 'onbeforeprint', 'onbeforeonload', 'onerror', 'onhaschange', 'onmessage', 'onoffline', 'ononline', 'onpagehide', 'onpageshow', 'onpopstate', 'onredo', 'onresize', 'onstorage', 'onundo', 'oncontextmenu', 'onformchange', 'onforminput', 'oninput', 'oninvalid', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onmousewheel', 'onscroll', 'oncanplay', 'oncanplaythrough', 'ondurationchange', 'onemptied', 'onended', 'onloadeddata', 'onloadedmetadata', 'onloadstart', 'onpause', 'onplay', 'onplaying', 'onprogress', 'onratechange', 'onreadystatechange', 'onseeked', 'onseeking', 'onstalled', 'onsuspend', 'ontimeupdate', 'onvolumechange', 'onwaiting', - 'profile', 'prompt', 'pattern', 'placeholder', - 'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules', 'required', - 'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary', 'spellcheck', 'step', - 'tabindex', 'target', 'text', 'title', 'type', - 'usemap', - 'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace', - 'width' - ) - ), - 'SYMBOLS' => array( - '/', '=' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 2 => false, - 3 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #000066;' - ), - 'COMMENTS' => array(), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array(), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'SCRIPT' => array( - -2 => 'color: #404040;', // CDATA - -1 => 'color: #808080; font-style: italic;', // comments - 0 => 'color: #00bbdd;', - 1 => 'color: #ddbb00;', - 2 => 'color: #009900;' - ), - 'REGEXPS' => array() - ), - 'URLS' => array( - 2 => 'http://december.com/html/4/element/{FNAMEL}.html', - 3 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array(), - 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, - 'SCRIPT_DELIMITERS' => array( - -2 => array( - ' ']]>' - ), - -1 => array( - '' - ), - 0 => array( - ' '>' - ), - 1 => array( - '&' => ';' - ), - 2 => array( - '<' => '>' - ) - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - -2 => false, - -1 => false, - 0 => false, - 1 => false, - 2 => true - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 2 => array( - 'DISALLOWED_BEFORE' => '(?<=<|<\/)', - 'DISALLOWED_AFTER' => '(?=\s|\/|>)', - ) - ) - ) -); diff --git a/includes/geshi/java.php b/includes/geshi/java.php deleted file mode 100644 index 671199b..0000000 --- a/includes/geshi/java.php +++ /dev/null @@ -1,975 +0,0 @@ - 'Java', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array( - //Import and Package directives (Basic Support only) - 2 => '/(?:(?<=import[\\n\\s])|(?<=package[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*([a-zA-Z0-9_]+|\*)(?=[\n\s;])/i', - // javadoc comments - 3 => '#/\*\*(?![\*\/]).*\*/#sU' - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'for', 'foreach', 'if', 'else', 'while', 'do', - 'switch', 'case', 'return', 'public', - 'private', 'protected', 'extends', 'break', 'class', - 'new', 'try', 'catch', 'throws', 'finally', 'implements', - 'interface', 'throw', 'final', 'native', 'synchronized', 'this', - 'abstract', 'transient', 'instanceof', 'assert', 'continue', - 'default', 'enum', 'package', 'static', 'strictfp', 'super', - 'volatile', 'const', 'goto', 'import' - ), - 2 => array( - 'null', 'false', 'true' - ), - 3 => array( - 'AbstractAction', 'AbstractBorder', 'AbstractButton', - 'AbstractCellEditor', 'AbstractCollection', - 'AbstractColorChooserPanel', 'AbstractDocument', - 'AbstractDocument.AttributeContext', - 'AbstractDocument.Content', - 'AbstractDocument.ElementEdit', - 'AbstractLayoutCache', - 'AbstractLayoutCache.NodeDimensions', 'AbstractList', - 'AbstractListModel', 'AbstractMap', - 'AbstractMethodError', 'AbstractSequentialList', - 'AbstractSet', 'AbstractTableModel', - 'AbstractUndoableEdit', 'AbstractWriter', - 'AccessControlContext', 'AccessControlException', - 'AccessController', 'AccessException', 'Accessible', - 'AccessibleAction', 'AccessibleBundle', - 'AccessibleComponent', 'AccessibleContext', - 'AccessibleHyperlink', 'AccessibleHypertext', - 'AccessibleIcon', 'AccessibleObject', - 'AccessibleRelation', 'AccessibleRelationSet', - 'AccessibleResourceBundle', 'AccessibleRole', - 'AccessibleSelection', 'AccessibleState', - 'AccessibleStateSet', 'AccessibleTable', - 'AccessibleTableModelChange', 'AccessibleText', - 'AccessibleValue', 'Acl', 'AclEntry', - 'AclNotFoundException', 'Action', 'ActionEvent', - 'ActionListener', 'ActionMap', 'ActionMapUIResource', - 'Activatable', 'ActivateFailedException', - 'ActivationDesc', 'ActivationException', - 'ActivationGroup', 'ActivationGroupDesc', - 'ActivationGroupDesc.CommandEnvironment', - 'ActivationGroupID', 'ActivationID', - 'ActivationInstantiator', 'ActivationMonitor', - 'ActivationSystem', 'Activator', 'ActiveEvent', - 'Adjustable', 'AdjustmentEvent', - 'AdjustmentListener', 'Adler32', 'AffineTransform', - 'AffineTransformOp', 'AlgorithmParameterGenerator', - 'AlgorithmParameterGeneratorSpi', - 'AlgorithmParameters', 'AlgorithmParameterSpec', - 'AlgorithmParametersSpi', 'AllPermission', - 'AlphaComposite', 'AlreadyBound', - 'AlreadyBoundException', 'AlreadyBoundHelper', - 'AlreadyBoundHolder', 'AncestorEvent', - 'AncestorListener', 'Annotation', 'Any', 'AnyHolder', - 'AnySeqHelper', 'AnySeqHolder', 'Applet', - 'AppletContext', 'AppletInitializer', 'AppletStub', - 'ApplicationException', 'Arc2D', 'Arc2D.Double', - 'Arc2D.Float', 'Area', 'AreaAveragingScaleFilter', - 'ARG_IN', 'ARG_INOUT', 'ARG_OUT', - 'ArithmeticException', 'Array', - 'ArrayIndexOutOfBoundsException', 'ArrayList', - 'Arrays', 'ArrayStoreException', 'AsyncBoxView', - 'Attribute', 'AttributedCharacterIterator', - 'AttributedCharacterIterator.Attribute', - 'AttributedString', 'AttributeInUseException', - 'AttributeList', 'AttributeModificationException', - 'Attributes', 'Attributes.Name', 'AttributeSet', - 'AttributeSet.CharacterAttribute', - 'AttributeSet.ColorAttribute', - 'AttributeSet.FontAttribute', - 'AttributeSet.ParagraphAttribute', 'AudioClip', - 'AudioFileFormat', 'AudioFileFormat.Type', - 'AudioFileReader', 'AudioFileWriter', 'AudioFormat', - 'AudioFormat.Encoding', 'AudioInputStream', - 'AudioPermission', 'AudioSystem', - 'AuthenticationException', - 'AuthenticationNotSupportedException', - 'Authenticator', 'Autoscroll', 'AWTError', - 'AWTEvent', 'AWTEventListener', - 'AWTEventMulticaster', 'AWTException', - 'AWTPermission', 'BadKind', 'BadLocationException', - 'BAD_CONTEXT', 'BAD_INV_ORDER', 'BAD_OPERATION', - 'BAD_PARAM', 'BAD_POLICY', 'BAD_POLICY_TYPE', - 'BAD_POLICY_VALUE', 'BAD_TYPECODE', 'BandCombineOp', - 'BandedSampleModel', 'BasicArrowButton', - 'BasicAttribute', 'BasicAttributes', 'BasicBorders', - 'BasicBorders.ButtonBorder', - 'BasicBorders.FieldBorder', - 'BasicBorders.MarginBorder', - 'BasicBorders.MenuBarBorder', - 'BasicBorders.RadioButtonBorder', - 'BasicBorders.SplitPaneBorder', - 'BasicBorders.ToggleButtonBorder', - 'BasicButtonListener', 'BasicButtonUI', - 'BasicCheckBoxMenuItemUI', 'BasicCheckBoxUI', - 'BasicColorChooserUI', 'BasicComboBoxEditor', - 'BasicComboBoxEditor.UIResource', - 'BasicComboBoxRenderer', - 'BasicComboBoxRenderer.UIResource', - 'BasicComboBoxUI', 'BasicComboPopup', - 'BasicDesktopIconUI', 'BasicDesktopPaneUI', - 'BasicDirectoryModel', 'BasicEditorPaneUI', - 'BasicFileChooserUI', 'BasicGraphicsUtils', - 'BasicHTML', 'BasicIconFactory', - 'BasicInternalFrameTitlePane', - 'BasicInternalFrameUI', 'BasicLabelUI', - 'BasicListUI', 'BasicLookAndFeel', 'BasicMenuBarUI', - 'BasicMenuItemUI', 'BasicMenuUI', - 'BasicOptionPaneUI', - 'BasicOptionPaneUI.ButtonAreaLayout', 'BasicPanelUI', - 'BasicPasswordFieldUI', 'BasicPermission', - 'BasicPopupMenuSeparatorUI', 'BasicPopupMenuUI', - 'BasicProgressBarUI', 'BasicRadioButtonMenuItemUI', - 'BasicRadioButtonUI', 'BasicRootPaneUI', - 'BasicScrollBarUI', 'BasicScrollPaneUI', - 'BasicSeparatorUI', 'BasicSliderUI', - 'BasicSplitPaneDivider', 'BasicSplitPaneUI', - 'BasicStroke', 'BasicTabbedPaneUI', - 'BasicTableHeaderUI', 'BasicTableUI', - 'BasicTextAreaUI', 'BasicTextFieldUI', - 'BasicTextPaneUI', 'BasicTextUI', - 'BasicTextUI.BasicCaret', - 'BasicTextUI.BasicHighlighter', - 'BasicToggleButtonUI', 'BasicToolBarSeparatorUI', - 'BasicToolBarUI', 'BasicToolTipUI', 'BasicTreeUI', - 'BasicViewportUI', 'BatchUpdateException', - 'BeanContext', 'BeanContextChild', - 'BeanContextChildComponentProxy', - 'BeanContextChildSupport', - 'BeanContextContainerProxy', 'BeanContextEvent', - 'BeanContextMembershipEvent', - 'BeanContextMembershipListener', 'BeanContextProxy', - 'BeanContextServiceAvailableEvent', - 'BeanContextServiceProvider', - 'BeanContextServiceProviderBeanInfo', - 'BeanContextServiceRevokedEvent', - 'BeanContextServiceRevokedListener', - 'BeanContextServices', 'BeanContextServicesListener', - 'BeanContextServicesSupport', - 'BeanContextServicesSupport.BCSSServiceProvider', - 'BeanContextSupport', - 'BeanContextSupport.BCSIterator', 'BeanDescriptor', - 'BeanInfo', 'Beans', 'BevelBorder', 'BigDecimal', - 'BigInteger', 'BinaryRefAddr', 'BindException', - 'Binding', 'BindingHelper', 'BindingHolder', - 'BindingIterator', 'BindingIteratorHelper', - 'BindingIteratorHolder', 'BindingIteratorOperations', - 'BindingListHelper', 'BindingListHolder', - 'BindingType', 'BindingTypeHelper', - 'BindingTypeHolder', 'BitSet', 'Blob', 'BlockView', - 'Book', 'Boolean', 'BooleanControl', - 'BooleanControl.Type', 'BooleanHolder', - 'BooleanSeqHelper', 'BooleanSeqHolder', 'Border', - 'BorderFactory', 'BorderLayout', 'BorderUIResource', - 'BorderUIResource.BevelBorderUIResource', - 'BorderUIResource.CompoundBorderUIResource', - 'BorderUIResource.EmptyBorderUIResource', - 'BorderUIResource.EtchedBorderUIResource', - 'BorderUIResource.LineBorderUIResource', - 'BorderUIResource.MatteBorderUIResource', - 'BorderUIResource.TitledBorderUIResource', - 'BoundedRangeModel', 'Bounds', 'Box', 'Box.Filler', - 'BoxedValueHelper', 'BoxLayout', 'BoxView', - 'BreakIterator', 'BufferedImage', - 'BufferedImageFilter', 'BufferedImageOp', - 'BufferedInputStream', 'BufferedOutputStream', - 'BufferedReader', 'BufferedWriter', 'Button', - 'ButtonGroup', 'ButtonModel', 'ButtonUI', 'Byte', - 'ByteArrayInputStream', 'ByteArrayOutputStream', - 'ByteHolder', 'ByteLookupTable', 'Calendar', - 'CallableStatement', 'CannotProceed', - 'CannotProceedException', 'CannotProceedHelper', - 'CannotProceedHolder', 'CannotRedoException', - 'CannotUndoException', 'Canvas', 'CardLayout', - 'Caret', 'CaretEvent', 'CaretListener', 'CellEditor', - 'CellEditorListener', 'CellRendererPane', - 'Certificate', 'Certificate.CertificateRep', - 'CertificateEncodingException', - 'CertificateException', - 'CertificateExpiredException', 'CertificateFactory', - 'CertificateFactorySpi', - 'CertificateNotYetValidException', - 'CertificateParsingException', - 'ChangedCharSetException', 'ChangeEvent', - 'ChangeListener', 'Character', 'Character.Subset', - 'Character.UnicodeBlock', 'CharacterIterator', - 'CharArrayReader', 'CharArrayWriter', - 'CharConversionException', 'CharHolder', - 'CharSeqHelper', 'CharSeqHolder', 'Checkbox', - 'CheckboxGroup', 'CheckboxMenuItem', - 'CheckedInputStream', 'CheckedOutputStream', - 'Checksum', 'Choice', 'ChoiceFormat', 'Class', - 'ClassCastException', 'ClassCircularityError', - 'ClassDesc', 'ClassFormatError', 'ClassLoader', - 'ClassNotFoundException', 'Clip', 'Clipboard', - 'ClipboardOwner', 'Clob', 'Cloneable', - 'CloneNotSupportedException', 'CMMException', - 'CodeSource', 'CollationElementIterator', - 'CollationKey', 'Collator', 'Collection', - 'Collections', 'Color', - 'ColorChooserComponentFactory', 'ColorChooserUI', - 'ColorConvertOp', 'ColorModel', - 'ColorSelectionModel', 'ColorSpace', - 'ColorUIResource', 'ComboBoxEditor', 'ComboBoxModel', - 'ComboBoxUI', 'ComboPopup', 'CommunicationException', - 'COMM_FAILURE', 'Comparable', 'Comparator', - 'Compiler', 'CompletionStatus', - 'CompletionStatusHelper', 'Component', - 'ComponentAdapter', 'ComponentColorModel', - 'ComponentEvent', 'ComponentInputMap', - 'ComponentInputMapUIResource', 'ComponentListener', - 'ComponentOrientation', 'ComponentSampleModel', - 'ComponentUI', 'ComponentView', 'Composite', - 'CompositeContext', 'CompositeName', 'CompositeView', - 'CompoundBorder', 'CompoundControl', - 'CompoundControl.Type', 'CompoundEdit', - 'CompoundName', 'ConcurrentModificationException', - 'ConfigurationException', 'ConnectException', - 'ConnectIOException', 'Connection', 'Constructor', 'Container', - 'ContainerAdapter', 'ContainerEvent', - 'ContainerListener', 'ContentHandler', - 'ContentHandlerFactory', 'ContentModel', 'Context', - 'ContextList', 'ContextNotEmptyException', - 'ContextualRenderedImageFactory', 'Control', - 'Control.Type', 'ControlFactory', - 'ControllerEventListener', 'ConvolveOp', 'CRC32', - 'CRL', 'CRLException', 'CropImageFilter', 'CSS', - 'CSS.Attribute', 'CTX_RESTRICT_SCOPE', - 'CubicCurve2D', 'CubicCurve2D.Double', - 'CubicCurve2D.Float', 'Current', 'CurrentHelper', - 'CurrentHolder', 'CurrentOperations', 'Cursor', - 'Customizer', 'CustomMarshal', 'CustomValue', - 'DatabaseMetaData', 'DataBuffer', 'DataBufferByte', - 'DataBufferInt', 'DataBufferShort', - 'DataBufferUShort', 'DataFlavor', - 'DataFormatException', 'DatagramPacket', - 'DatagramSocket', 'DatagramSocketImpl', - 'DatagramSocketImplFactory', 'DataInput', - 'DataInputStream', 'DataLine', 'DataLine.Info', - 'DataOutput', 'DataOutputStream', - 'DataTruncation', 'DATA_CONVERSION', 'Date', - 'DateFormat', 'DateFormatSymbols', 'DebugGraphics', - 'DecimalFormat', 'DecimalFormatSymbols', - 'DefaultBoundedRangeModel', 'DefaultButtonModel', - 'DefaultCaret', 'DefaultCellEditor', - 'DefaultColorSelectionModel', 'DefaultComboBoxModel', - 'DefaultDesktopManager', 'DefaultEditorKit', - 'DefaultEditorKit.BeepAction', - 'DefaultEditorKit.CopyAction', - 'DefaultEditorKit.CutAction', - 'DefaultEditorKit.DefaultKeyTypedAction', - 'DefaultEditorKit.InsertBreakAction', - 'DefaultEditorKit.InsertContentAction', - 'DefaultEditorKit.InsertTabAction', - 'DefaultEditorKit.PasteAction,', - 'DefaultFocusManager', 'DefaultHighlighter', - 'DefaultHighlighter.DefaultHighlightPainter', - 'DefaultListCellRenderer', - 'DefaultListCellRenderer.UIResource', - 'DefaultListModel', 'DefaultListSelectionModel', - 'DefaultMenuLayout', 'DefaultMetalTheme', - 'DefaultMutableTreeNode', - 'DefaultSingleSelectionModel', - 'DefaultStyledDocument', - 'DefaultStyledDocument.AttributeUndoableEdit', - 'DefaultStyledDocument.ElementSpec', - 'DefaultTableCellRenderer', - 'DefaultTableCellRenderer.UIResource', - 'DefaultTableColumnModel', 'DefaultTableModel', - 'DefaultTextUI', 'DefaultTreeCellEditor', - 'DefaultTreeCellRenderer', 'DefaultTreeModel', - 'DefaultTreeSelectionModel', 'DefinitionKind', - 'DefinitionKindHelper', 'Deflater', - 'DeflaterOutputStream', 'Delegate', 'DesignMode', - 'DesktopIconUI', 'DesktopManager', 'DesktopPaneUI', - 'DGC', 'Dialog', 'Dictionary', 'DigestException', - 'DigestInputStream', 'DigestOutputStream', - 'Dimension', 'Dimension2D', 'DimensionUIResource', - 'DirContext', 'DirectColorModel', 'DirectoryManager', - 'DirObjectFactory', 'DirStateFactory', - 'DirStateFactory.Result', 'DnDConstants', 'Document', - 'DocumentEvent', 'DocumentEvent.ElementChange', - 'DocumentEvent.EventType', 'DocumentListener', - 'DocumentParser', 'DomainCombiner', 'DomainManager', - 'DomainManagerOperations', 'Double', 'DoubleHolder', - 'DoubleSeqHelper', 'DoubleSeqHolder', - 'DragGestureEvent', 'DragGestureListener', - 'DragGestureRecognizer', 'DragSource', - 'DragSourceContext', 'DragSourceDragEvent', - 'DragSourceDropEvent', 'DragSourceEvent', - 'DragSourceListener', 'Driver', 'DriverManager', - 'DriverPropertyInfo', 'DropTarget', - 'DropTarget.DropTargetAutoScroller', - 'DropTargetContext', 'DropTargetDragEvent', - 'DropTargetDropEvent', 'DropTargetEvent', - 'DropTargetListener', 'DSAKey', - 'DSAKeyPairGenerator', 'DSAParameterSpec', - 'DSAParams', 'DSAPrivateKey', 'DSAPrivateKeySpec', - 'DSAPublicKey', 'DSAPublicKeySpec', 'DTD', - 'DTDConstants', 'DynamicImplementation', 'DynAny', - 'DynArray', 'DynEnum', 'DynFixed', 'DynSequence', - 'DynStruct', 'DynUnion', 'DynValue', 'EditorKit', - 'Element', 'ElementIterator', 'Ellipse2D', - 'Ellipse2D.Double', 'Ellipse2D.Float', 'EmptyBorder', - 'EmptyStackException', 'EncodedKeySpec', 'Entity', - 'EnumControl', 'EnumControl.Type', 'Enumeration', - 'Environment', 'EOFException', 'Error', - 'EtchedBorder', 'Event', 'EventContext', - 'EventDirContext', 'EventListener', - 'EventListenerList', 'EventObject', 'EventQueue', - 'EventSetDescriptor', 'Exception', - 'ExceptionInInitializerError', 'ExceptionList', - 'ExpandVetoException', 'ExportException', - 'ExtendedRequest', 'ExtendedResponse', - 'Externalizable', 'FeatureDescriptor', 'Field', - 'FieldNameHelper', 'FieldPosition', 'FieldView', - 'File', 'FileChooserUI', 'FileDescriptor', - 'FileDialog', 'FileFilter', - 'FileInputStream', 'FilenameFilter', 'FileNameMap', - 'FileNotFoundException', 'FileOutputStream', - 'FilePermission', 'FileReader', 'FileSystemView', - 'FileView', 'FileWriter', 'FilteredImageSource', - 'FilterInputStream', 'FilterOutputStream', - 'FilterReader', 'FilterWriter', - 'FixedHeightLayoutCache', 'FixedHolder', - 'FlatteningPathIterator', 'FlavorMap', 'Float', - 'FloatControl', 'FloatControl.Type', 'FloatHolder', - 'FloatSeqHelper', 'FloatSeqHolder', 'FlowLayout', - 'FlowView', 'FlowView.FlowStrategy', 'FocusAdapter', - 'FocusEvent', 'FocusListener', 'FocusManager', - 'Font', 'FontFormatException', 'FontMetrics', - 'FontRenderContext', 'FontUIResource', 'Format', - 'FormatConversionProvider', 'FormView', 'Frame', - 'FREE_MEM', 'GapContent', 'GeneralPath', - 'GeneralSecurityException', 'GlyphJustificationInfo', - 'GlyphMetrics', 'GlyphVector', 'GlyphView', - 'GlyphView.GlyphPainter', 'GradientPaint', - 'GraphicAttribute', 'Graphics', 'Graphics2D', - 'GraphicsConfigTemplate', 'GraphicsConfiguration', - 'GraphicsDevice', 'GraphicsEnvironment', - 'GrayFilter', 'GregorianCalendar', - 'GridBagConstraints', 'GridBagLayout', 'GridLayout', - 'Group', 'Guard', 'GuardedObject', 'GZIPInputStream', - 'GZIPOutputStream', 'HasControls', 'HashMap', - 'HashSet', 'Hashtable', 'HierarchyBoundsAdapter', - 'HierarchyBoundsListener', 'HierarchyEvent', - 'HierarchyListener', 'Highlighter', - 'Highlighter.Highlight', - 'Highlighter.HighlightPainter', 'HTML', - 'HTML.Attribute', 'HTML.Tag', 'HTML.UnknownTag', - 'HTMLDocument', 'HTMLDocument.Iterator', - 'HTMLEditorKit', 'HTMLEditorKit.HTMLFactory', - 'HTMLEditorKit.HTMLTextAction', - 'HTMLEditorKit.InsertHTMLTextAction', - 'HTMLEditorKit.LinkController', - 'HTMLEditorKit.Parser', - 'HTMLEditorKit.ParserCallback', - 'HTMLFrameHyperlinkEvent', 'HTMLWriter', - 'HttpURLConnection', 'HyperlinkEvent', - 'HyperlinkEvent.EventType', 'HyperlinkListener', - 'ICC_ColorSpace', 'ICC_Profile', 'ICC_ProfileGray', - 'ICC_ProfileRGB', 'Icon', 'IconUIResource', - 'IconView', 'IdentifierHelper', 'Identity', - 'IdentityScope', 'IDLEntity', 'IDLType', - 'IDLTypeHelper', 'IDLTypeOperations', - 'IllegalAccessError', 'IllegalAccessException', - 'IllegalArgumentException', - 'IllegalComponentStateException', - 'IllegalMonitorStateException', - 'IllegalPathStateException', 'IllegalStateException', - 'IllegalThreadStateException', 'Image', - 'ImageConsumer', 'ImageFilter', - 'ImageGraphicAttribute', 'ImageIcon', - 'ImageObserver', 'ImageProducer', - 'ImagingOpException', 'IMP_LIMIT', - 'IncompatibleClassChangeError', - 'InconsistentTypeCode', 'IndexColorModel', - 'IndexedPropertyDescriptor', - 'IndexOutOfBoundsException', 'IndirectionException', - 'InetAddress', 'Inflater', 'InflaterInputStream', - 'InheritableThreadLocal', 'InitialContext', - 'InitialContextFactory', - 'InitialContextFactoryBuilder', 'InitialDirContext', - 'INITIALIZE', 'Initializer', 'InitialLdapContext', - 'InlineView', 'InputContext', 'InputEvent', - 'InputMap', 'InputMapUIResource', 'InputMethod', - 'InputMethodContext', 'InputMethodDescriptor', - 'InputMethodEvent', 'InputMethodHighlight', - 'InputMethodListener', 'InputMethodRequests', - 'InputStream', - 'InputStreamReader', 'InputSubset', 'InputVerifier', - 'Insets', 'InsetsUIResource', 'InstantiationError', - 'InstantiationException', 'Instrument', - 'InsufficientResourcesException', 'Integer', - 'INTERNAL', 'InternalError', 'InternalFrameAdapter', - 'InternalFrameEvent', 'InternalFrameListener', - 'InternalFrameUI', 'InterruptedException', - 'InterruptedIOException', - 'InterruptedNamingException', 'INTF_REPOS', - 'IntHolder', 'IntrospectionException', - 'Introspector', 'Invalid', - 'InvalidAlgorithmParameterException', - 'InvalidAttributeIdentifierException', - 'InvalidAttributesException', - 'InvalidAttributeValueException', - 'InvalidClassException', - 'InvalidDnDOperationException', - 'InvalidKeyException', 'InvalidKeySpecException', - 'InvalidMidiDataException', 'InvalidName', - 'InvalidNameException', - 'InvalidNameHelper', 'InvalidNameHolder', - 'InvalidObjectException', - 'InvalidParameterException', - 'InvalidParameterSpecException', - 'InvalidSearchControlsException', - 'InvalidSearchFilterException', 'InvalidSeq', - 'InvalidTransactionException', 'InvalidValue', - 'INVALID_TRANSACTION', 'InvocationEvent', - 'InvocationHandler', 'InvocationTargetException', - 'InvokeHandler', 'INV_FLAG', 'INV_IDENT', - 'INV_OBJREF', 'INV_POLICY', 'IOException', - 'IRObject', 'IRObjectOperations', 'IstringHelper', - 'ItemEvent', 'ItemListener', 'ItemSelectable', - 'Iterator', 'JApplet', 'JarEntry', 'JarException', - 'JarFile', 'JarInputStream', 'JarOutputStream', - 'JarURLConnection', 'JButton', 'JCheckBox', - 'JCheckBoxMenuItem', 'JColorChooser', 'JComboBox', - 'JComboBox.KeySelectionManager', 'JComponent', - 'JDesktopPane', 'JDialog', 'JEditorPane', - 'JFileChooser', 'JFrame', 'JInternalFrame', - 'JInternalFrame.JDesktopIcon', 'JLabel', - 'JLayeredPane', 'JList', 'JMenu', 'JMenuBar', - 'JMenuItem', 'JobAttributes', - 'JobAttributes.DefaultSelectionType', - 'JobAttributes.DestinationType', - 'JobAttributes.DialogType', - 'JobAttributes.MultipleDocumentHandlingType', - 'JobAttributes.SidesType', 'JOptionPane', 'JPanel', - 'JPasswordField', 'JPopupMenu', - 'JPopupMenu.Separator', 'JProgressBar', - 'JRadioButton', 'JRadioButtonMenuItem', 'JRootPane', - 'JScrollBar', 'JScrollPane', 'JSeparator', 'JSlider', - 'JSplitPane', 'JTabbedPane', 'JTable', - 'JTableHeader', 'JTextArea', 'JTextComponent', - 'JTextComponent.KeyBinding', 'JTextField', - 'JTextPane', 'JToggleButton', - 'JToggleButton.ToggleButtonModel', 'JToolBar', - 'JToolBar.Separator', 'JToolTip', 'JTree', - 'JTree.DynamicUtilTreeNode', - 'JTree.EmptySelectionModel', 'JViewport', 'JWindow', - 'Kernel', 'Key', 'KeyAdapter', 'KeyEvent', - 'KeyException', 'KeyFactory', 'KeyFactorySpi', - 'KeyListener', 'KeyManagementException', 'Keymap', - 'KeyPair', 'KeyPairGenerator', 'KeyPairGeneratorSpi', - 'KeySpec', 'KeyStore', 'KeyStoreException', - 'KeyStoreSpi', 'KeyStroke', 'Label', 'LabelUI', - 'LabelView', 'LastOwnerException', - 'LayeredHighlighter', - 'LayeredHighlighter.LayerPainter', 'LayoutManager', - 'LayoutManager2', 'LayoutQueue', 'LdapContext', - 'LdapReferralException', 'Lease', - 'LimitExceededException', 'Line', 'Line.Info', - 'Line2D', 'Line2D.Double', 'Line2D.Float', - 'LineBorder', 'LineBreakMeasurer', 'LineEvent', - 'LineEvent.Type', 'LineListener', 'LineMetrics', - 'LineNumberInputStream', 'LineNumberReader', - 'LineUnavailableException', 'LinkageError', - 'LinkedList', 'LinkException', 'LinkLoopException', - 'LinkRef', 'List', 'ListCellRenderer', - 'ListDataEvent', 'ListDataListener', 'ListIterator', - 'ListModel', 'ListResourceBundle', - 'ListSelectionEvent', 'ListSelectionListener', - 'ListSelectionModel', 'ListUI', 'ListView', - 'LoaderHandler', 'Locale', 'LocateRegistry', - 'LogStream', 'Long', 'LongHolder', - 'LongLongSeqHelper', 'LongLongSeqHolder', - 'LongSeqHelper', 'LongSeqHolder', 'LookAndFeel', - 'LookupOp', 'LookupTable', 'MalformedLinkException', - 'MalformedURLException', 'Manifest', 'Map', - 'Map.Entry', 'MARSHAL', 'MarshalException', - 'MarshalledObject', 'Math', 'MatteBorder', - 'MediaTracker', 'Member', 'MemoryImageSource', - 'Menu', 'MenuBar', 'MenuBarUI', 'MenuComponent', - 'MenuContainer', 'MenuDragMouseEvent', - 'MenuDragMouseListener', 'MenuElement', 'MenuEvent', - 'MenuItem', 'MenuItemUI', 'MenuKeyEvent', - 'MenuKeyListener', 'MenuListener', - 'MenuSelectionManager', 'MenuShortcut', - 'MessageDigest', 'MessageDigestSpi', 'MessageFormat', - 'MetaEventListener', 'MetalBorders', - 'MetalBorders.ButtonBorder', - 'MetalBorders.Flush3DBorder', - 'MetalBorders.InternalFrameBorder', - 'MetalBorders.MenuBarBorder', - 'MetalBorders.MenuItemBorder', - 'MetalBorders.OptionDialogBorder', - 'MetalBorders.PaletteBorder', - 'MetalBorders.PopupMenuBorder', - 'MetalBorders.RolloverButtonBorder', - 'MetalBorders.ScrollPaneBorder', - 'MetalBorders.TableHeaderBorder', - 'MetalBorders.TextFieldBorder', - 'MetalBorders.ToggleButtonBorder', - 'MetalBorders.ToolBarBorder', 'MetalButtonUI', - 'MetalCheckBoxIcon', 'MetalCheckBoxUI', - 'MetalComboBoxButton', 'MetalComboBoxEditor', - 'MetalComboBoxEditor.UIResource', - 'MetalComboBoxIcon', 'MetalComboBoxUI', - 'MetalDesktopIconUI', 'MetalFileChooserUI', - 'MetalIconFactory', 'MetalIconFactory.FileIcon16', - 'MetalIconFactory.FolderIcon16', - 'MetalIconFactory.PaletteCloseIcon', - 'MetalIconFactory.TreeControlIcon', - 'MetalIconFactory.TreeFolderIcon', - 'MetalIconFactory.TreeLeafIcon', - 'MetalInternalFrameTitlePane', - 'MetalInternalFrameUI', 'MetalLabelUI', - 'MetalLookAndFeel', 'MetalPopupMenuSeparatorUI', - 'MetalProgressBarUI', 'MetalRadioButtonUI', - 'MetalScrollBarUI', 'MetalScrollButton', - 'MetalScrollPaneUI', 'MetalSeparatorUI', - 'MetalSliderUI', 'MetalSplitPaneUI', - 'MetalTabbedPaneUI', 'MetalTextFieldUI', - 'MetalTheme', 'MetalToggleButtonUI', - 'MetalToolBarUI', 'MetalToolTipUI', 'MetalTreeUI', - 'MetaMessage', 'Method', 'MethodDescriptor', - 'MidiChannel', 'MidiDevice', 'MidiDevice.Info', - 'MidiDeviceProvider', 'MidiEvent', 'MidiFileFormat', - 'MidiFileReader', 'MidiFileWriter', 'MidiMessage', - 'MidiSystem', 'MidiUnavailableException', - 'MimeTypeParseException', 'MinimalHTMLWriter', - 'MissingResourceException', 'Mixer', 'Mixer.Info', - 'MixerProvider', 'ModificationItem', 'Modifier', - 'MouseAdapter', 'MouseDragGestureRecognizer', - 'MouseEvent', 'MouseInputAdapter', - 'MouseInputListener', 'MouseListener', - 'MouseMotionAdapter', 'MouseMotionListener', - 'MultiButtonUI', 'MulticastSocket', - 'MultiColorChooserUI', 'MultiComboBoxUI', - 'MultiDesktopIconUI', 'MultiDesktopPaneUI', - 'MultiFileChooserUI', 'MultiInternalFrameUI', - 'MultiLabelUI', 'MultiListUI', 'MultiLookAndFeel', - 'MultiMenuBarUI', 'MultiMenuItemUI', - 'MultiOptionPaneUI', 'MultiPanelUI', - 'MultiPixelPackedSampleModel', 'MultipleMaster', - 'MultiPopupMenuUI', 'MultiProgressBarUI', - 'MultiScrollBarUI', 'MultiScrollPaneUI', - 'MultiSeparatorUI', 'MultiSliderUI', - 'MultiSplitPaneUI', 'MultiTabbedPaneUI', - 'MultiTableHeaderUI', 'MultiTableUI', 'MultiTextUI', - 'MultiToolBarUI', 'MultiToolTipUI', 'MultiTreeUI', - 'MultiViewportUI', 'MutableAttributeSet', - 'MutableComboBoxModel', 'MutableTreeNode', 'Name', - 'NameAlreadyBoundException', 'NameClassPair', - 'NameComponent', 'NameComponentHelper', - 'NameComponentHolder', 'NamedValue', 'NameHelper', - 'NameHolder', 'NameNotFoundException', 'NameParser', - 'NamespaceChangeListener', 'NameValuePair', - 'NameValuePairHelper', 'Naming', 'NamingContext', - 'NamingContextHelper', 'NamingContextHolder', - 'NamingContextOperations', 'NamingEnumeration', - 'NamingEvent', 'NamingException', - 'NamingExceptionEvent', 'NamingListener', - 'NamingManager', 'NamingSecurityException', - 'NegativeArraySizeException', 'NetPermission', - 'NoClassDefFoundError', 'NoInitialContextException', - 'NoninvertibleTransformException', - 'NoPermissionException', 'NoRouteToHostException', - 'NoSuchAlgorithmException', - 'NoSuchAttributeException', 'NoSuchElementException', - 'NoSuchFieldError', 'NoSuchFieldException', - 'NoSuchMethodError', 'NoSuchMethodException', - 'NoSuchObjectException', 'NoSuchProviderException', - 'NotActiveException', 'NotBoundException', - 'NotContextException', 'NotEmpty', 'NotEmptyHelper', - 'NotEmptyHolder', 'NotFound', 'NotFoundHelper', - 'NotFoundHolder', 'NotFoundReason', - 'NotFoundReasonHelper', 'NotFoundReasonHolder', - 'NotOwnerException', 'NotSerializableException', - 'NO_IMPLEMENT', 'NO_MEMORY', 'NO_PERMISSION', - 'NO_RESOURCES', 'NO_RESPONSE', - 'NullPointerException', 'Number', 'NumberFormat', - 'NumberFormatException', 'NVList', 'Object', - 'ObjectChangeListener', 'ObjectFactory', - 'ObjectFactoryBuilder', 'ObjectHelper', - 'ObjectHolder', 'ObjectImpl', - 'ObjectInput', 'ObjectInputStream', - 'ObjectInputStream.GetField', - 'ObjectInputValidation', 'ObjectOutput', - 'ObjectOutputStream', 'ObjectOutputStream.PutField', - 'ObjectStreamClass', 'ObjectStreamConstants', - 'ObjectStreamException', 'ObjectStreamField', - 'ObjectView', 'OBJECT_NOT_EXIST', 'ObjID', - 'OBJ_ADAPTER', 'Observable', 'Observer', - 'OctetSeqHelper', 'OctetSeqHolder', 'OMGVMCID', - 'OpenType', 'Operation', - 'OperationNotSupportedException', 'Option', - 'OptionalDataException', 'OptionPaneUI', 'ORB', - 'OutOfMemoryError', 'OutputStream', - 'OutputStreamWriter', 'OverlayLayout', 'Owner', - 'Package', 'PackedColorModel', 'Pageable', - 'PageAttributes', 'PageAttributes.ColorType', - 'PageAttributes.MediaType', - 'PageAttributes.OrientationRequestedType', - 'PageAttributes.OriginType', - 'PageAttributes.PrintQualityType', 'PageFormat', - 'Paint', 'PaintContext', 'PaintEvent', 'Panel', - 'PanelUI', 'Paper', 'ParagraphView', - 'ParameterBlock', 'ParameterDescriptor', - 'ParseException', 'ParsePosition', 'Parser', - 'ParserDelegator', 'PartialResultException', - 'PasswordAuthentication', 'PasswordView', 'Patch', - 'PathIterator', 'Permission', - 'PermissionCollection', 'Permissions', - 'PERSIST_STORE', 'PhantomReference', - 'PipedInputStream', 'PipedOutputStream', - 'PipedReader', 'PipedWriter', 'PixelGrabber', - 'PixelInterleavedSampleModel', 'PKCS8EncodedKeySpec', - 'PlainDocument', 'PlainView', 'Point', 'Point2D', - 'Point2D.Double', 'Point2D.Float', 'Policy', - 'PolicyError', 'PolicyHelper', - 'PolicyHolder', 'PolicyListHelper', - 'PolicyListHolder', 'PolicyOperations', - 'PolicyTypeHelper', 'Polygon', 'PopupMenu', - 'PopupMenuEvent', 'PopupMenuListener', 'PopupMenuUI', - 'Port', 'Port.Info', 'PortableRemoteObject', - 'PortableRemoteObjectDelegate', 'Position', - 'Position.Bias', 'PreparedStatement', 'Principal', - 'PrincipalHolder', 'Printable', - 'PrinterAbortException', 'PrinterException', - 'PrinterGraphics', 'PrinterIOException', - 'PrinterJob', 'PrintGraphics', 'PrintJob', - 'PrintStream', 'PrintWriter', 'PrivateKey', - 'PRIVATE_MEMBER', 'PrivilegedAction', - 'PrivilegedActionException', - 'PrivilegedExceptionAction', 'Process', - 'ProfileDataException', 'ProgressBarUI', - 'ProgressMonitor', 'ProgressMonitorInputStream', - 'Properties', 'PropertyChangeEvent', - 'PropertyChangeListener', 'PropertyChangeSupport', - 'PropertyDescriptor', 'PropertyEditor', - 'PropertyEditorManager', 'PropertyEditorSupport', - 'PropertyPermission', 'PropertyResourceBundle', - 'PropertyVetoException', 'ProtectionDomain', - 'ProtocolException', 'Provider', 'ProviderException', - 'Proxy', 'PublicKey', 'PUBLIC_MEMBER', - 'PushbackInputStream', 'PushbackReader', - 'QuadCurve2D', 'QuadCurve2D.Double', - 'QuadCurve2D.Float', 'Random', 'RandomAccessFile', - 'Raster', 'RasterFormatException', 'RasterOp', - 'Reader', 'Receiver', 'Rectangle', 'Rectangle2D', - 'Rectangle2D.Double', 'Rectangle2D.Float', - 'RectangularShape', 'Ref', 'RefAddr', 'Reference', - 'Referenceable', 'ReferenceQueue', - 'ReferralException', 'ReflectPermission', 'Registry', - 'RegistryHandler', 'RemarshalException', 'Remote', - 'RemoteCall', 'RemoteException', 'RemoteObject', - 'RemoteRef', 'RemoteServer', 'RemoteStub', - 'RenderableImage', 'RenderableImageOp', - 'RenderableImageProducer', 'RenderContext', - 'RenderedImage', 'RenderedImageFactory', 'Renderer', - 'RenderingHints', 'RenderingHints.Key', - 'RepaintManager', 'ReplicateScaleFilter', - 'Repository', 'RepositoryIdHelper', 'Request', - 'RescaleOp', 'Resolver', 'ResolveResult', - 'ResourceBundle', 'ResponseHandler', 'ResultSet', - 'ResultSetMetaData', 'ReverbType', 'RGBImageFilter', - 'RMIClassLoader', 'RMIClientSocketFactory', - 'RMIFailureHandler', 'RMISecurityException', - 'RMISecurityManager', 'RMIServerSocketFactory', - 'RMISocketFactory', 'Robot', 'RootPaneContainer', - 'RootPaneUI', 'RoundRectangle2D', - 'RoundRectangle2D.Double', 'RoundRectangle2D.Float', - 'RowMapper', 'RSAKey', 'RSAKeyGenParameterSpec', - 'RSAPrivateCrtKey', 'RSAPrivateCrtKeySpec', - 'RSAPrivateKey', 'RSAPrivateKeySpec', 'RSAPublicKey', - 'RSAPublicKeySpec', 'RTFEditorKit', - 'RuleBasedCollator', 'Runnable', 'RunTime', - 'Runtime', 'RuntimeException', 'RunTimeOperations', - 'RuntimePermission', 'SampleModel', - 'SchemaViolationException', 'Scrollable', - 'Scrollbar', 'ScrollBarUI', 'ScrollPane', - 'ScrollPaneConstants', 'ScrollPaneLayout', - 'ScrollPaneLayout.UIResource', 'ScrollPaneUI', - 'SearchControls', 'SearchResult', - 'SecureClassLoader', 'SecureRandom', - 'SecureRandomSpi', 'Security', 'SecurityException', - 'SecurityManager', 'SecurityPermission', 'Segment', - 'SeparatorUI', 'Sequence', 'SequenceInputStream', - 'Sequencer', 'Sequencer.SyncMode', 'Serializable', - 'SerializablePermission', 'ServantObject', - 'ServerCloneException', 'ServerError', - 'ServerException', 'ServerNotActiveException', - 'ServerRef', 'ServerRequest', - 'ServerRuntimeException', 'ServerSocket', - 'ServiceDetail', 'ServiceDetailHelper', - 'ServiceInformation', 'ServiceInformationHelper', - 'ServiceInformationHolder', - 'ServiceUnavailableException', 'Set', - 'SetOverrideType', 'SetOverrideTypeHelper', 'Shape', - 'ShapeGraphicAttribute', 'Short', 'ShortHolder', - 'ShortLookupTable', 'ShortMessage', 'ShortSeqHelper', - 'ShortSeqHolder', 'Signature', 'SignatureException', - 'SignatureSpi', 'SignedObject', 'Signer', - 'SimpleAttributeSet', 'SimpleBeanInfo', - 'SimpleDateFormat', 'SimpleTimeZone', - 'SinglePixelPackedSampleModel', - 'SingleSelectionModel', 'SizeLimitExceededException', - 'SizeRequirements', 'SizeSequence', 'Skeleton', - 'SkeletonMismatchException', - 'SkeletonNotFoundException', 'SliderUI', 'Socket', - 'SocketException', 'SocketImpl', 'SocketImplFactory', - 'SocketOptions', 'SocketPermission', - 'SocketSecurityException', 'SoftBevelBorder', - 'SoftReference', 'SortedMap', 'SortedSet', - 'Soundbank', 'SoundbankReader', 'SoundbankResource', - 'SourceDataLine', 'SplitPaneUI', 'SQLData', - 'SQLException', 'SQLInput', 'SQLOutput', - 'SQLPermission', 'SQLWarning', 'Stack', - 'StackOverflowError', 'StateEdit', 'StateEditable', - 'StateFactory', 'Statement', 'Streamable', - 'StreamableValue', 'StreamCorruptedException', - 'StreamTokenizer', 'StrictMath', 'String', - 'StringBuffer', 'StringBufferInputStream', - 'StringCharacterIterator', 'StringContent', - 'StringHolder', 'StringIndexOutOfBoundsException', - 'StringReader', 'StringRefAddr', 'StringSelection', - 'StringTokenizer', 'StringValueHelper', - 'StringWriter', 'Stroke', 'Struct', 'StructMember', - 'StructMemberHelper', 'Stub', 'StubDelegate', - 'StubNotFoundException', 'Style', 'StyleConstants', - 'StyleConstants.CharacterConstants', - 'StyleConstants.ColorConstants', - 'StyleConstants.FontConstants', - 'StyleConstants.ParagraphConstants', 'StyleContext', - 'StyledDocument', 'StyledEditorKit', - 'StyledEditorKit.AlignmentAction', - 'StyledEditorKit.BoldAction', - 'StyledEditorKit.FontFamilyAction', - 'StyledEditorKit.FontSizeAction', - 'StyledEditorKit.ForegroundAction', - 'StyledEditorKit.ItalicAction', - 'StyledEditorKit.StyledTextAction', - 'StyledEditorKit.UnderlineAction', 'StyleSheet', - 'StyleSheet.BoxPainter', 'StyleSheet.ListPainter', - 'SwingConstants', 'SwingPropertyChangeSupport', - 'SwingUtilities', 'SyncFailedException', - 'Synthesizer', 'SysexMessage', 'System', - 'SystemColor', 'SystemException', 'SystemFlavorMap', - 'TabableView', 'TabbedPaneUI', 'TabExpander', - 'TableCellEditor', 'TableCellRenderer', - 'TableColumn', 'TableColumnModel', - 'TableColumnModelEvent', 'TableColumnModelListener', - 'TableHeaderUI', 'TableModel', 'TableModelEvent', - 'TableModelListener', 'TableUI', 'TableView', - 'TabSet', 'TabStop', 'TagElement', 'TargetDataLine', - 'TCKind', 'TextAction', 'TextArea', 'TextAttribute', - 'TextComponent', 'TextEvent', 'TextField', - 'TextHitInfo', 'TextLayout', - 'TextLayout.CaretPolicy', 'TextListener', - 'TextMeasurer', 'TextUI', 'TexturePaint', 'Thread', - 'ThreadDeath', 'ThreadGroup', 'ThreadLocal', - 'Throwable', 'Tie', 'TileObserver', 'Time', - 'TimeLimitExceededException', 'Timer', - 'TimerTask', 'Timestamp', 'TimeZone', 'TitledBorder', - 'ToolBarUI', 'Toolkit', 'ToolTipManager', - 'ToolTipUI', 'TooManyListenersException', 'Track', - 'TransactionRequiredException', - 'TransactionRolledbackException', - 'TRANSACTION_REQUIRED', 'TRANSACTION_ROLLEDBACK', - 'Transferable', 'TransformAttribute', 'TRANSIENT', - 'Transmitter', 'Transparency', 'TreeCellEditor', - 'TreeCellRenderer', 'TreeExpansionEvent', - 'TreeExpansionListener', 'TreeMap', 'TreeModel', - 'TreeModelEvent', 'TreeModelListener', 'TreeNode', - 'TreePath', 'TreeSelectionEvent', - 'TreeSelectionListener', 'TreeSelectionModel', - 'TreeSet', 'TreeUI', 'TreeWillExpandListener', - 'TypeCode', 'TypeCodeHolder', 'TypeMismatch', - 'Types', 'UID', 'UIDefaults', - 'UIDefaults.ActiveValue', 'UIDefaults.LazyInputMap', - 'UIDefaults.LazyValue', 'UIDefaults.ProxyLazyValue', - 'UIManager', 'UIManager.LookAndFeelInfo', - 'UIResource', 'ULongLongSeqHelper', - 'ULongLongSeqHolder', 'ULongSeqHelper', - 'ULongSeqHolder', 'UndeclaredThrowableException', - 'UndoableEdit', 'UndoableEditEvent', - 'UndoableEditListener', 'UndoableEditSupport', - 'UndoManager', 'UnexpectedException', - 'UnicastRemoteObject', 'UnionMember', - 'UnionMemberHelper', 'UNKNOWN', 'UnknownError', - 'UnknownException', 'UnknownGroupException', - 'UnknownHostException', - 'UnknownObjectException', 'UnknownServiceException', - 'UnknownUserException', 'UnmarshalException', - 'UnrecoverableKeyException', 'Unreferenced', - 'UnresolvedPermission', 'UnsatisfiedLinkError', - 'UnsolicitedNotification', - 'UnsolicitedNotificationEvent', - 'UnsolicitedNotificationListener', - 'UnsupportedAudioFileException', - 'UnsupportedClassVersionError', - 'UnsupportedEncodingException', - 'UnsupportedFlavorException', - 'UnsupportedLookAndFeelException', - 'UnsupportedOperationException', - 'UNSUPPORTED_POLICY', 'UNSUPPORTED_POLICY_VALUE', - 'URL', 'URLClassLoader', 'URLConnection', - 'URLDecoder', 'URLEncoder', 'URLStreamHandler', - 'URLStreamHandlerFactory', 'UserException', - 'UShortSeqHelper', 'UShortSeqHolder', - 'UTFDataFormatException', 'Util', 'UtilDelegate', - 'Utilities', 'ValueBase', 'ValueBaseHelper', - 'ValueBaseHolder', 'ValueFactory', 'ValueHandler', - 'ValueMember', 'ValueMemberHelper', - 'VariableHeightLayoutCache', 'Vector', 'VerifyError', - 'VersionSpecHelper', 'VetoableChangeListener', - 'VetoableChangeSupport', 'View', 'ViewFactory', - 'ViewportLayout', 'ViewportUI', - 'VirtualMachineError', 'Visibility', - 'VisibilityHelper', 'VMID', 'VM_ABSTRACT', - 'VM_CUSTOM', 'VM_NONE', 'VM_TRUNCATABLE', - 'VoiceStatus', 'Void', 'WCharSeqHelper', - 'WCharSeqHolder', 'WeakHashMap', 'WeakReference', - 'Window', 'WindowAdapter', 'WindowConstants', - 'WindowEvent', 'WindowListener', 'WrappedPlainView', - 'WritableRaster', 'WritableRenderedImage', - 'WriteAbortedException', 'Writer', - 'WrongTransaction', 'WStringValueHelper', - 'X509Certificate', 'X509CRL', 'X509CRLEntry', - 'X509EncodedKeySpec', 'X509Extension', 'ZipEntry', - 'ZipException', 'ZipFile', 'ZipInputStream', - 'ZipOutputStream', 'ZoneView', - '_BindingIteratorImplBase', '_BindingIteratorStub', - '_IDLTypeStub', '_NamingContextImplBase', - '_NamingContextStub', '_PolicyStub', '_Remote_Stub' - ), - 4 => array( - 'void', 'double', 'int', 'boolean', 'byte', 'short', 'long', 'char', 'float' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', - '+', '-', '*', '/', '%', - '!', '&', '|', '^', - '<', '>', '=', - '?', ':', ';', - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => true, - 4 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000000; font-weight: bold;', - 2 => 'color: #000066; font-weight: bold;', - 3 => 'color: #003399;', - 4 => 'color: #000066; font-weight: bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 2 => 'color: #006699;', - 3 => 'color: #008000; font-style: italic; font-weight: bold;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #0000ff;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #006633;', - 2 => 'color: #006633;' - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;' - ), - 'SCRIPT' => array(), - 'REGEXPS' => array() - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => 'http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+{FNAMEL}', - 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array(), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array() -); diff --git a/includes/geshi/javascript.php b/includes/geshi/javascript.php deleted file mode 100644 index 26de5d5..0000000 --- a/includes/geshi/javascript.php +++ /dev/null @@ -1,170 +0,0 @@ - 'Javascript', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array( - //Regular Expressions - 2 => "/(?<=[\\s^])(s|tr|y)\\/(?!\*)(?!\s)(?:\\\\.|(?!\n)[^\\/\\\\])+(? GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - //reserved/keywords; also some non-reserved keywords - 'break', 'case', 'catch', 'const', 'continue', - 'default', 'delete', 'do', - 'else', - 'finally', 'for', 'function', - 'get', 'goto', - 'if', 'in', 'instanceof', - 'new', - 'prototype', - 'return', - 'set', 'static', 'switch', - 'this', 'throw', 'try', 'typeof', - 'var', 'void' - ), - 2 => array( - //reserved/non-keywords; metaconstants - 'false', 'null', 'true', 'undefined', 'NaN', 'Infinity' - ), - 3 => array( - //magic properties/functions - '__proto__', '__defineGetter__', '__defineSetter__', 'hasOwnProperty', 'hasProperty' - ), - 4 => array( - //type constructors - 'Object', 'Function', 'Date', 'Math', 'String', 'Number', 'Boolean', 'Array' - ), - 5 => array( - //reserved, but invalid in language - 'abstract', 'boolean', 'byte', 'char', 'class', 'debugger', 'double', 'enum', 'export', 'extends', - 'final', 'float', 'implements', 'import', 'int', 'interface', 'long', 'native', - 'short', 'super', 'synchronized', 'throws', 'transient', 'volatile' - ), - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', - '+', '-', '*', '/', '%', - '!', '@', '&', '|', '^', - '<', '>', '=', - ',', ';', '?', ':' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000066; font-weight: bold;', - 2 => 'color: #003366; font-weight: bold;', - 3 => 'color: #000066;', - 5 => 'color: #FF0000;' - ), - 'COMMENTS' => array( - 1 => 'color: #006600; font-style: italic;', - 2 => 'color: #009966; font-style: italic;', - 'MULTI' => 'color: #006600; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #3366CC;' - ), - 'NUMBERS' => array( - 0 => 'color: #CC0000;' - ), - 'METHODS' => array( - 1 => 'color: #660066;' - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;' - ), - 'REGEXPS' => array(), - 'SCRIPT' => array( - 0 => '', - 1 => '', - 2 => '', - 3 => '' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array(), - 'STRICT_MODE_APPLIES' => GESHI_MAYBE, - 'SCRIPT_DELIMITERS' => array( - 0 => array( - '' - ), - 1 => array( - '' - ) - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => true, - 1 => true - ) -); diff --git a/includes/geshi/markdown.php b/includes/geshi/markdown.php deleted file mode 100644 index 35d4f46..0000000 --- a/includes/geshi/markdown.php +++ /dev/null @@ -1,107 +0,0 @@ -Markdown syntax with GeSHi code highlighting added. -Version: 0.2 -Author: Gerard van Helden -Author URI: http://melp.nl -*/ -define('MARKDOWN_PARSER_CLASS', 'MarkdownGeshi_Parser'); - -require_once 'markdown.php'; -require_once 'wp-syntax/geshi/geshi.php'; - -class MarkdownGeshi_Parser extends MarkdownExtra_Parser { - /** - * The 'processing instruction' pattern for the code blocks parser. - * Format is defined as : #!language@linenumber. The @linenumber - * part is optional. - * - * Optional parameters are allowed past a semicolon. - */ - public $shebang = '/^ - \s* - \#!(?P\w+) - (?:@(?P\d+))? - \s* - (?:;\s*(?P.*?)\s*)?\n - (?P.*) - /sx'; - - function hasShebang($code) { - if (preg_match($this->shebang, $code, $m)) { - return $m; - } - return false; - } - - function _doCodeBlocks_callback($matches) { - if ($m = $this->hasShebang($matches[1])) { - return $this->_doGeshi($m); - } else { - return parent::_doCodeBlocks_callback($matches); - } - } - - function _doFencedCodeBlocks_callback($matches) { - if ($m = $this->hasShebang($matches[2])) { - return $this->_doGeshi($m); - } else { - return parent::_doFencedCodeBlocks_callback($matches); - } - } - - function _doGeshi($shebangMatch) { - $language = $shebangMatch['lang']; - $line = (int)(($shebangMatch['linenumber'] > 1) ? $shebangMatch['linenumber'] : 0); - $codeblock = $shebangMatch['code']; - - $highlighter = new GeSHi($this->outdent(trim($codeblock)), $language); - $highlighted = $highlighter->parse_code(); - if ($line) { - preg_match('!^(\s*]+>)(.*)(
        )!s', $highlighted, $m); - - $ret = '$0', - $m[2] - ); - $ret .= '
      '; - - $ret = $m[1] . $ret . $m[3]; - } else { - $ret = $highlighted; - } - if ($shebangMatch['params']) { - $ret = $this->_processGeshiParams($ret, $shebangMatch['params']); - } - - return "\n\n" . $this->hashBlock($ret) . "\n\n"; - } - - - function _processGeshiParams($highlighted, $params) { - foreach (explode(',', $params) as $keyValuePair) { - @list($key, $value) = array_map('trim', explode('=', $keyValuePair)); - if ($key && $value) { - switch ($key) { - case 'gist': - $highlighted = - sprintf( - '(GIST: %1$d)', - $value - ) - . $highlighted; - break; - } - } - } - return $highlighted; - } -} \ No newline at end of file diff --git a/includes/geshi/mysql.php b/includes/geshi/mysql.php deleted file mode 100644 index ff1bf3a..0000000 --- a/includes/geshi/mysql.php +++ /dev/null @@ -1,465 +0,0 @@ - 'MySQL', - //'COMMENT_SINGLE' => array(1 =>'--', 2 => '#'), // '--' MUST be folowed by whitespace,not necessarily a space - 'COMMENT_SINGLE' => array( - 1 => '-- ', - 2 => '#' - ), - 'COMMENT_REGEXP' => array( - 1 => "/(?:--\s).*?$/", // double dash followed by any whitespace - ), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, // @@@ would be nice if this could be defined per group! - 'QUOTEMARKS' => array("'", '"', '`'), - 'ESCAPE_CHAR' => '\\', // by default only, can be specified - 'ESCAPE_REGEXP' => array( - 1 => "/[_%]/", // search wildcards - ), - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | - GESHI_NUMBER_OCT_PREFIX | - GESHI_NUMBER_HEX_PREFIX | - GESHI_NUMBER_FLT_NONSCI | - GESHI_NUMBER_FLT_SCI_SHORT | - GESHI_NUMBER_FLT_SCI_ZERO, - 'KEYWORDS' => array( - 1 => array( - // Mix: statement keywords and keywords that don't fit in any other - // category, or have multiple usage/meanings - 'ACTION', 'ADD', 'AFTER', 'ALGORITHM', 'ALL', 'ALTER', 'ANALYZE', 'ANY', - 'ASC', 'AS', 'BDB', 'BEGIN', 'BERKELEYDB', 'BINARY', 'BTREE', 'CALL', - 'CASCADED', 'CASCADE', 'CHAIN', 'CHANGE', 'CHECK', 'COLUMNS', 'COLUMN', - 'COMMENT', 'COMMIT', 'COMMITTED', 'CONSTRAINT', 'CONTAINS SQL', - 'CONSISTENT', 'CONVERT', 'CREATE', 'CROSS', 'DATA', 'DATABASES', - 'DECLARE', 'DEFINER', 'DELAYED', 'DELETE', 'DESCRIBE', 'DESC', - 'DETERMINISTIC', 'DISABLE', 'DISCARD', 'DISTINCTROW', 'DISTINCT', 'DO', - 'DROP', 'DUMPFILE', 'DUPLICATE KEY', 'ENABLE', 'ENCLOSED BY', 'ENGINE', - 'ERRORS', 'ESCAPED BY', 'EXISTS', 'EXPLAIN', 'EXTENDED', 'FIELDS', - 'FIRST', 'FOR EACH ROW', 'FORCE', 'FOREIGN KEY', 'FROM', 'FULL', - 'FUNCTION', 'GLOBAL', 'GRANT', 'GROUP BY', 'HANDLER', 'HASH', 'HAVING', - 'HELP', 'HIGH_PRIORITY', 'IF NOT EXISTS', 'IGNORE', 'IMPORT', 'INDEX', - 'INFILE', 'INNER', 'INNODB', 'INOUT', 'INTO', 'INVOKER', - 'ISOLATION LEVEL', 'JOIN', 'KEYS', 'KEY', 'KILL', 'LANGUAGE SQL', 'LAST', - 'LIMIT', 'LINES', 'LOAD', 'LOCAL', 'LOCK', 'LOW_PRIORITY', - 'MASTER_SERVER_ID', 'MATCH', 'MERGE', 'MIDDLEINT', 'MODIFIES SQL DATA', - 'MODIFY', 'MRG_MYISAM', 'NATURAL', 'NEXT', 'NO SQL', 'NO', 'ON', - 'OPTIMIZE', 'OPTIONALLY', 'OPTION', 'ORDER BY', 'OUTER', 'OUTFILE', 'OUT', - 'PARTIAL', 'PARTITION', 'PREV', 'PRIMARY KEY', 'PRIVILEGES', 'PROCEDURE', - 'PURGE', 'QUICK', 'READS SQL DATA', 'READ', 'REFERENCES', 'RELEASE', - 'RENAME', 'REORGANIZE', 'REPEATABLE', 'REQUIRE', 'RESTRICT', 'RETURNS', - 'REVOKE', 'ROLLBACK', 'ROUTINE', 'RTREE', 'SAVEPOINT', 'SELECT', - 'SERIALIZABLE', 'SESSION', 'SET', 'SHARE MODE', 'SHOW', 'SIMPLE', - 'SNAPSHOT', 'SOME', 'SONAME', 'SQL SECURITY', 'SQL_BIG_RESULT', - 'SQL_BUFFER_RESULT', 'SQL_CACHE', 'SQL_CALC_FOUND_ROWS', - 'SQL_NO_CACHE', 'SQL_SMALL_RESULT', 'SSL', 'START', 'STARTING BY', - 'STATUS', 'STRAIGHT_JOIN', 'STRIPED', 'TABLESPACE', 'TABLES', 'TABLE', - 'TEMPORARY', 'TEMPTABLE', 'TERMINATED BY', 'TO', 'TRANSACTIONS', - 'TRANSACTION', 'TRIGGER', 'TYPES', 'TYPE', 'UNCOMMITTED', 'UNDEFINED', - 'UNION', 'UNLOCK_TABLES', 'UPDATE', 'USAGE', 'USE', 'USER_RESOURCES', - 'USING', 'VALUES', 'VALUE', 'VIEW', 'WARNINGS', 'WHERE', 'WITH ROLLUP', - 'WITH', 'WORK', 'WRITE', - ), - 2 => array( //No ( must follow - // Mix: statement keywords distinguished from functions by the same name - "CURRENT_USER", "DATABASE", "IN", "INSERT", "DEFAULT", "REPLACE", "SCHEMA", "TRUNCATE" - ), - 3 => array( - // Values (Constants) - 'FALSE', 'NULL', 'TRUE', - ), - 4 => array( - // Column Data Types - 'BIGINT', 'BIT', 'BLOB', 'BOOLEAN', 'BOOL', 'CHARACTER VARYING', - 'CHAR VARYING', 'DATETIME', 'DECIMAL', 'DEC', 'DOUBLE PRECISION', - 'DOUBLE', 'ENUM', 'FIXED', 'FLOAT', 'GEOMETRYCOLLECTION', 'GEOMETRY', - 'INTEGER', 'INT', 'LINESTRING', 'LONGBLOB', 'LONGTEXT', 'MEDIUMBLOB', - 'MEDIUMINT', 'MEDIUMTEXT', 'MULTIPOINT', 'MULTILINESTRING', - 'MULTIPOLYGON', 'NATIONAL CHARACTER', 'NATIONAL CHARACTER VARYING', - 'NATIONAL CHAR VARYING', 'NATIONAL VARCHAR', 'NCHAR VARCHAR', 'NCHAR', - 'NUMERIC', 'POINT', 'POLYGON', 'REAL', 'SERIAL', - 'SMALLINT', 'TEXT', 'TIMESTAMP', 'TINYBLOB', 'TINYINT', - 'TINYTEXT', 'VARBINARY', 'VARCHARACTER', 'VARCHAR', - ), - 5 => array( //No ( must follow - // Column data types distinguished from functions by the same name - "CHAR", "DATE", "TIME" - ), - 6 => array( - // Table, Column & Index Attributes - 'AUTO_INCREMENT', 'AVG_ROW_LENGTH', 'BOTH', 'CHECKSUM', 'CONNECTION', - 'DATA DIRECTORY', 'DEFAULT NULL', 'DELAY_KEY_WRITE', 'FULLTEXT', - 'INDEX DIRECTORY', 'INSERT_METHOD', 'LEADING', 'MAX_ROWS', 'MIN_ROWS', - 'NOT NULL', 'PACK_KEYS', 'ROW_FORMAT', 'SERIAL DEFAULT VALUE', 'SIGNED', - 'SPATIAL', 'TRAILING', 'UNIQUE', 'UNSIGNED', 'ZEROFILL' - ), - 7 => array( //No ( must follow - // Column attribute distinguished from function by the same name - "CHARSET" - ), - 8 => array( - // Date and Time Unit Specifiers - 'DAY_HOUR', 'DAY_MICROSECOND', 'DAY_MINUTE', 'DAY_SECOND', - 'HOUR_MICROSECOND', 'HOUR_MINUTE', 'HOUR_SECOND', - 'MINUTE_MICROSECOND', 'MINUTE_SECOND', - 'SECOND_MICROSECOND', 'YEAR_MONTH' - ), - 9 => array( //No ( must follow - // Date-time unit specifiers distinguished from functions by the same name - "DAY", "HOUR", "MICROSECOND", "MINUTE", "MONTH", "QUARTER", "SECOND", "WEEK", "YEAR" - ), - 10 => array( - // Operators (see also Symbols) - 'AND', 'BETWEEN', 'CHARACTER SET', 'COLLATE', 'DIV', 'IS NOT NULL', - 'IS NOT', 'IS NULL', 'IS', 'LIKE', 'NOT', 'OFFSET', 'OR', 'REGEXP', 'RLIKE', - 'SOUNDS LIKE', 'XOR' - ), - 11 => array( //No ( must follow - // Operator distinghuished from function by the same name - "INTERVAL" - ), - 12 => array( - // Control Flow (functions) - 'CASE', 'ELSE', 'END', 'IFNULL', 'IF', 'NULLIF', 'THEN', 'WHEN', - ), - 13 => array( - // String Functions - 'ASCII', 'BIN', 'BIT_LENGTH', 'CHAR_LENGTH', 'CHARACTER_LENGTH', - 'CONCAT_WS', 'CONCAT', 'ELT', 'EXPORT_SET', 'FIELD', - 'FIND_IN_SET', 'FORMAT', 'HEX', 'INSTR', 'LCASE', 'LEFT', 'LENGTH', - 'LOAD_FILE', 'LOCATE', 'LOWER', 'LPAD', 'LTRIM', 'MAKE_SET', 'MID', - 'OCTET_LENGTH', 'ORD', 'POSITION', 'QUOTE', 'REPEAT', 'REVERSE', - 'RIGHT', 'RPAD', 'RTRIM', 'SOUNDEX', 'SPACE', 'STRCMP', 'SUBSTRING_INDEX', - 'SUBSTRING', 'TRIM', 'UCASE', 'UNHEX', 'UPPER', - ), - 14 => array( //A ( must follow - // String functions distinguished from other keywords by the same name - "INSERT", "REPLACE", "CHAR" - ), - 15 => array( - // Numeric Functions - 'ABS', 'ACOS', 'ASIN', 'ATAN2', 'ATAN', 'CEILING', 'CEIL', - 'CONV', 'COS', 'COT', 'CRC32', 'DEGREES', 'EXP', 'FLOOR', 'LN', 'LOG10', - 'LOG2', 'LOG', 'MOD', 'OCT', 'PI', 'POWER', 'POW', 'RADIANS', 'RAND', - 'ROUND', 'SIGN', 'SIN', 'SQRT', 'TAN', - ), - 16 => array( //A ( must follow - // Numeric function distinguished from other keyword by the same name - "TRUNCATE" - ), - 17 => array( - // Date and Time Functions - 'ADDDATE', 'ADDTIME', 'CONVERT_TZ', 'CURDATE', 'CURRENT_DATE', - 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURTIME', 'DATE_ADD', - 'DATE_FORMAT', 'DATE_SUB', 'DATEDIFF', 'DAYNAME', 'DAYOFMONTH', - 'DAYOFWEEK', 'DAYOFYEAR', 'EXTRACT', 'FROM_DAYS', 'FROM_UNIXTIME', - 'GET_FORMAT', 'LAST_DAY', 'LOCALTIME', 'LOCALTIMESTAMP', 'MAKEDATE', - 'MAKETIME', 'MONTHNAME', 'NOW', 'PERIOD_ADD', - 'PERIOD_DIFF', 'SEC_TO_TIME', 'STR_TO_DATE', 'SUBDATE', 'SUBTIME', - 'SYSDATE', 'TIME_FORMAT', 'TIME_TO_SEC', - 'TIMESTAMPADD', 'TIMESTAMPDIFF', 'TO_DAYS', - 'UNIX_TIMESTAMP', 'UTC_DATE', 'UTC_TIME', 'UTC_TIMESTAMP', 'WEEKDAY', - 'WEEKOFYEAR', 'YEARWEEK', - ), - 18 => array( //A ( must follow - // Date-time functions distinguished from other keywords by the same name - "DATE", "DAY", "HOUR", "MICROSECOND", "MINUTE", "MONTH", "QUARTER", - "SECOND", "TIME", "WEEK", "YEAR" - ), - 19 => array( - // Comparison Functions - 'COALESCE', 'GREATEST', 'ISNULL', 'LEAST', - ), - 20 => array( //A ( must follow - // Comparison functions distinguished from other keywords by the same name - "IN", "INTERVAL" - ), - 21 => array( - // Encryption and Compression Functions - 'AES_DECRYPT', 'AES_ENCRYPT', 'COMPRESS', 'DECODE', 'DES_DECRYPT', - 'DES_ENCRYPT', 'ENCODE', 'ENCRYPT', 'MD5', 'OLD_PASSWORD', 'PASSWORD', - 'SHA1', 'SHA', 'UNCOMPRESS', 'UNCOMPRESSED_LENGTH', - ), - 22 => array( - // GROUP BY (aggregate) Functions - 'AVG', 'BIT_AND', 'BIT_OR', 'BIT_XOR', 'COUNT', 'GROUP_CONCAT', - 'MAX', 'MIN', 'STDDEV_POP', 'STDDEV_SAMP', 'STDDEV', 'STD', 'SUM', - 'VAR_POP', 'VAR_SAMP', 'VARIANCE', - ), - 23 => array( - // Information Functions - 'BENCHMARK', 'COERCIBILITY', 'COLLATION', 'CONNECTION_ID', - 'FOUND_ROWS', 'LAST_INSERT_ID', 'ROW_COUNT', - 'SESSION_USER', 'SYSTEM_USER', 'USER', 'VERSION', - ), - 24 => array( //A ( must follow - // Information functions distinguished from other keywords by the same name - "CURRENT_USER", "DATABASE", "SCHEMA", "CHARSET" - ), - 25 => array( - // Miscellaneous Functions - 'ExtractValue', 'BIT_COUNT', 'GET_LOCK', 'INET_ATON', 'INET_NTOA', - 'IS_FREE_LOCK', 'IS_USED_LOCK', 'MASTER_POS_WAIT', 'NAME_CONST', - 'RELEASE_LOCK', 'SLEEP', 'UpdateXML', 'UUID', - ), - 26 => array( //A ( must follow - // Miscellaneous function distinguished from other keyword by the same name - "DEFAULT" - ), - 27 => array( - // Geometry Functions - 'Area', 'AsBinary', 'AsText', 'AsWKB', 'AsWKT', 'Boundary', 'Buffer', - 'Centroid', 'Contains', 'ConvexHull', 'Crosses', - 'Difference', 'Dimension', 'Disjoint', 'Distance', - 'EndPoint', 'Envelope', 'Equals', 'ExteriorRing', - 'GLength', 'GeomCollFromText', 'GeomCollFromWKB', 'GeomFromText', - 'GeomFromWKB', 'GeometryCollectionFromText', - 'GeometryCollectionFromWKB', 'GeometryFromText', 'GeometryFromWKB', - 'GeometryN', 'GeometryType', - 'InteriorRingN', 'Intersection', 'Intersects', 'IsClosed', 'IsEmpty', - 'IsRing', 'IsSimple', - 'LineFromText', 'LineFromWKB', 'LineStringFromText', - 'LineStringFromWKB', - 'MBRContains', 'MBRDisjoint', 'MBREqual', 'MBRIntersects', - 'MBROverlaps', 'MBRTouches', 'MBRWithin', 'MLineFromText', - 'MLineFromWKB', 'MPointFromText', 'MPointFromWKB', 'MPolyFromText', - 'MPolyFromWKB', 'MultiLineStringFromText', 'MultiLineStringFromWKB', - 'MultiPointFromText', 'MultiPointFromWKB', 'MultiPolygonFromText', - 'MultiPolygonFromWKB', - 'NumGeometries', 'NumInteriorRings', 'NumPoints', - 'Overlaps', - 'PointFromText', 'PointFromWKB', 'PointN', 'PointOnSurface', - 'PolyFromText', 'PolyFromWKB', 'PolygonFromText', 'PolygonFromWKB', - 'Related', 'SRID', 'StartPoint', 'SymDifference', - 'Touches', - 'Union', - 'Within', - 'X', - 'Y', - ), - ), - 'SYMBOLS' => array( - 1 => array( - /* Operators */ - '=', ':=', // assignment operators - '||', '&&', '!', // locical operators - '=', '<=>', '>=', '>', '<=', '<', '<>', '!=', // comparison operators - '|', '&', '^', '~', '<<', '>>', // bitwise operators - '-', '+', '*', '/', '%', // numerical operators - ), - 2 => array( - /* Other syntactical symbols */ - '(', ')', - ',', ';', - ), - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false, - 6 => false, - 7 => false, - 8 => false, - 9 => false, - 10 => false, - 11 => false, - 12 => false, - 13 => false, - 14 => false, - 15 => false, - 16 => false, - 17 => false, - 18 => false, - 19 => false, - 20 => false, - 21 => false, - 22 => false, - 23 => false, - 24 => false, - 25 => false, - 26 => false, - 27 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #990099; font-weight: bold;', // mix - 2 => 'color: #990099; font-weight: bold;', // mix - 3 => 'color: #9900FF; font-weight: bold;', // constants - 4 => 'color: #999900; font-weight: bold;', // column data types - 5 => 'color: #999900; font-weight: bold;', // column data types - 6 => 'color: #FF9900; font-weight: bold;', // attributes - 7 => 'color: #FF9900; font-weight: bold;', // attributes - 8 => 'color: #9900FF; font-weight: bold;', // date-time units - 9 => 'color: #9900FF; font-weight: bold;', // date-time units - - 10 => 'color: #CC0099; font-weight: bold;', // operators - 11 => 'color: #CC0099; font-weight: bold;', // operators - - 12 => 'color: #009900;', // control flow (functions) - 13 => 'color: #000099;', // string functions - 14 => 'color: #000099;', // string functions - 15 => 'color: #000099;', // numeric functions - 16 => 'color: #000099;', // numeric functions - 17 => 'color: #000099;', // date-time functions - 18 => 'color: #000099;', // date-time functions - 19 => 'color: #000099;', // comparison functions - 20 => 'color: #000099;', // comparison functions - 21 => 'color: #000099;', // encryption functions - 22 => 'color: #000099;', // aggregate functions - 23 => 'color: #000099;', // information functions - 24 => 'color: #000099;', // information functions - 25 => 'color: #000099;', // miscellaneous functions - 26 => 'color: #000099;', // miscellaneous functions - 27 => 'color: #00CC00;', // geometry functions - ), - 'COMMENTS' => array( - 'MULTI' => 'color: #808000; font-style: italic;', - 1 => 'color: #808080; font-style: italic;', - 2 => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #004000; font-weight: bold;', - 1 => 'color: #008080; font-weight: bold;' // search wildcards - ), - 'BRACKETS' => array( - 0 => 'color: #FF00FF;' - ), - 'STRINGS' => array( - 0 => 'color: #008000;' - ), - 'NUMBERS' => array( - 0 => 'color: #008080;' - ), - 'METHODS' => array(), - 'SYMBOLS' => array( - 1 => 'color: #CC0099;', // operators - 2 => 'color: #000033;', // syntax - ), - 'SCRIPT' => array(), - 'REGEXPS' => array() - ), - 'URLS' => array( - 1 => 'http://search.oracle.com/search/search?group=MySQL&q={FNAME}', - 2 => 'http://search.oracle.com/search/search?group=MySQL&q={FNAME}', - 3 => 'http://search.oracle.com/search/search?group=MySQL&q={FNAME}', - 4 => 'http://search.oracle.com/search/search?group=MySQL&q={FNAME}', - 5 => 'http://search.oracle.com/search/search?group=MySQL&q={FNAME}', - 6 => 'http://search.oracle.com/search/search?group=MySQL&q={FNAME}', - 7 => 'http://search.oracle.com/search/search?group=MySQL&q={FNAME}', - 8 => 'http://search.oracle.com/search/search?group=MySQL&q={FNAME}', - 9 => 'http://search.oracle.com/search/search?group=MySQL&q={FNAME}', - - 10 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/non-typed-operators.html', - 11 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/non-typed-operators.html', - - 12 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/control-flow-functions.html', - 13 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/string-functions.html', - 14 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/string-functions.html', - 15 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/numeric-functions.html', - 16 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/numeric-functions.html', - 17 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/date-and-time-functions.html', - 18 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/date-and-time-functions.html', - 19 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/comparison-operators.html', - 20 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/comparison-operators.html', - 21 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/encryption-functions.html', - 22 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/group-by-functions-and-modifiers.html', - 23 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/information-functions.html', - 24 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/information-functions.html', - 25 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/func-op-summary-ref.html', - 26 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/func-op-summary-ref.html', - 27 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/analysing-spatial-information.html', - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array(), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array(), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 2 => array( - 'DISALLOWED_AFTER' => '(?![\(\w])' - ), - 5 => array( - 'DISALLOWED_AFTER' => '(?![\(\w])' - ), - 7 => array( - 'DISALLOWED_AFTER' => '(?![\(\w])' - ), - 9 => array( - 'DISALLOWED_AFTER' => '(?![\(\w])' - ), - 11 => array( - 'DISALLOWED_AFTER' => '(?![\(\w])' - ), - - 14 => array( - 'DISALLOWED_AFTER' => '(?=\()' - ), - 16 => array( - 'DISALLOWED_AFTER' => '(?=\()' - ), - 18 => array( - 'DISALLOWED_AFTER' => '(?=\()' - ), - 20 => array( - 'DISALLOWED_AFTER' => '(?=\()' - ), - 24 => array( - 'DISALLOWED_AFTER' => '(?=\()' - ), - 26 => array( - 'DISALLOWED_AFTER' => '(?=\()' - ) - ) - ) -); diff --git a/includes/geshi/pastedown.php b/includes/geshi/pastedown.php deleted file mode 100644 index d218fa1..0000000 --- a/includes/geshi/pastedown.php +++ /dev/null @@ -1,107 +0,0 @@ -Markdown syntax with GeSHi code highlighting added. -Version: 0.2 -Author: Gerard van Helden -Author URI: http://melp.nl -*/ -define('MARKDOWN_PARSER_CLASS', 'MarkdownGeshi_Parser'); - -require_once 'pastedown.php'; -require_once 'wp-syntax/geshi/geshi.php'; - -class MarkdownGeshi_Parser extends MarkdownExtra_Parser { - /** - * The 'processing instruction' pattern for the code blocks parser. - * Format is defined as : #!language@linenumber. The @linenumber - * part is optional. - * - * Optional parameters are allowed past a semicolon. - */ - public $shebang = '/^ - \s* - \#!(?P\w+) - (?:@(?P\d+))? - \s* - (?:;\s*(?P.*?)\s*)?\n - (?P.*) - /sx'; - - function hasShebang($code) { - if (preg_match($this->shebang, $code, $m)) { - return $m; - } - return false; - } - - function _doCodeBlocks_callback($matches) { - if ($m = $this->hasShebang($matches[1])) { - return $this->_doGeshi($m); - } else { - return parent::_doCodeBlocks_callback($matches); - } - } - - function _doFencedCodeBlocks_callback($matches) { - if ($m = $this->hasShebang($matches[2])) { - return $this->_doGeshi($m); - } else { - return parent::_doFencedCodeBlocks_callback($matches); - } - } - - function _doGeshi($shebangMatch) { - $language = $shebangMatch['lang']; - $line = (int)(($shebangMatch['linenumber'] > 1) ? $shebangMatch['linenumber'] : 0); - $codeblock = $shebangMatch['code']; - - $highlighter = new GeSHi($this->outdent(trim($codeblock)), $language); - $highlighted = $highlighter->parse_code(); - if ($line) { - preg_match('!^(\s*]+>)(.*)()!s', $highlighted, $m); - - $ret = '$0', - $m[2] - ); - $ret .= '
    '; - - $ret = $m[1] . $ret . $m[3]; - } else { - $ret = $highlighted; - } - if ($shebangMatch['params']) { - $ret = $this->_processGeshiParams($ret, $shebangMatch['params']); - } - - return "\n\n" . $this->hashBlock($ret) . "\n\n"; - } - - - function _processGeshiParams($highlighted, $params) { - foreach (explode(',', $params) as $keyValuePair) { - @list($key, $value) = array_map('trim', explode('=', $keyValuePair)); - if ($key && $value) { - switch ($key) { - case 'gist': - $highlighted = - sprintf( - '(GIST: %1$d)', - $value - ) - . $highlighted; - break; - } - } - } - return $highlighted; - } -} \ No newline at end of file diff --git a/includes/geshi/pastedown_old.php b/includes/geshi/pastedown_old.php deleted file mode 100644 index f604d2f..0000000 --- a/includes/geshi/pastedown_old.php +++ /dev/null @@ -1,128 +0,0 @@ - 'Example', - 'COMMENT_SINGLE' => array( - 1 => '>', - 2 => '<', - 3 => '**', - 4 => '###', - 5 => '##', - 6 => '@', - 7 => '++', - - ), - 'COMMENT_MULTI' => array( - '_' => '_' - ), - 'COMMENT_REGEXP' => array( - 1 => '' - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array( - 1 => '', - 2 => '' - ), - 'ESCAPE_CHAR' => '', - 'ESCAPE_REGEXP' => array( - 1 => '', - 2 => '' - ), - 'HARDQUOTE' => array(), - 'HARDESCAPE' => array(), - 'HARDCHAR' => '', - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | - GESHI_NUMBER_FLT_SCI_ZERO, - 'KEYWORDS' => array( - 1 => array( - '' - ) - ), - 'CASE_SENSITIVE' => array( - 1 => false - ), - 'SYMBOLS' => array( - 0 => array( - '>' - ) - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => '' - ), - 'COMMENTS' => array( - 1 => 'font-style: normal; color: #789922;', - 2 => 'font-weight: normal; color: #991111;', - 3 => 'font-weight: bold; color: #000;', - 4 => 'font-size: 25px; font-weight: bold; color: #000;', - 5 => 'font-size: 35px; font-weight: bold; color: #000;', - 6 => 'color: #440088;', - 7 => 'border: 3px dotted #000;', - 'MULTI' => 'text-decoration: underline;color: #000;' - ), - 'ESCAPE_CHAR' => array( - 1 => '', - 2 => '' - ), - 'BRACKETS' => array(), - 'STRINGS' => array( - 1 => '', - 2 => '' - ), - 'NUMBERS' => array(), - 'METHODS' => array(), - 'SYMBOLS' => array( - 0 => 'font-style: italic; color: #789922;' - ), - 'REGEXPS' => array(), - 'SCRIPT' => array() - ), - 'URLS' => array( - 1 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array(), - 'STRICT_MODE_APPLIES' => GESHI_MAYBE, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array(), - 'TAB_WIDTH' => 4 -); \ No newline at end of file diff --git a/includes/geshi/php.php b/includes/geshi/php.php deleted file mode 100644 index 5f8d734..0000000 --- a/includes/geshi/php.php +++ /dev/null @@ -1,1115 +0,0 @@ - 'PHP', - 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array( - //Heredoc and Nowdoc syntax - 3 => '/<<<\s*?(\'?)([a-zA-Z0-9]+?)\1[^\n]*?\\n.*\\n\\2(?![a-zA-Z0-9])/siU', - // phpdoc comments - 4 => '#/\*\*(?![\*\/]).*\*/#sU', - // Advanced # handling - 2 => "/#.*?(?:(?=\?\>)|^)/smi" - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'ESCAPE_REGEXP' => array( - //Simple Single Char Escapes - 1 => "#\\\\[nfrtv\$\"\n\\\\]#i", - //Hexadecimal Char Specs - 2 => "#\\\\x[\da-fA-F]{1,2}#i", - //Octal Char Specs - 3 => "#\\\\[0-7]{1,3}#", - //String Parsing of Variable Names - 4 => "#\\$[a-z0-9_]+(?:\\[[a-z0-9_]+\\]|->[a-z0-9_]+)?|(?:\\{\\$|\\$\\{)[a-z0-9_]+(?:\\[('?)[a-z0-9_]*\\1\\]|->[a-z0-9_]+)*\\}#i", - //Experimental extension supporting cascaded {${$var}} syntax - 5 => "#\$[a-z0-9_]+(?:\[[a-z0-9_]+\]|->[a-z0-9_]+)?|(?:\{\$|\$\{)[a-z0-9_]+(?:\[('?)[a-z0-9_]*\\1\]|->[a-z0-9_]+)*\}|\{\$(?R)\}#i", - //Format String support in ""-Strings - 6 => "#%(?:%|(?:\d+\\\\\\\$)?\\+?(?:\x20|0|'.)?-?(?:\d+|\\*)?(?:\.\d+)?[bcdefFosuxX])#" - ), - 'HARDQUOTE' => array("'", "'"), - 'HARDESCAPE' => array("'", "\\"), - 'HARDCHAR' => "\\", - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | - GESHI_NUMBER_FLT_SCI_ZERO, - 'KEYWORDS' => array( - 1 => array( - 'as', 'break', 'case', 'continue', 'default', 'do', 'else', 'elseif', - 'endfor', 'endforeach', 'endif', 'endswitch', 'endwhile', 'for', - 'foreach', 'if', 'include', 'include_once', 'require', 'require_once', - 'return', 'switch', 'throw', 'while', 'yield', - - 'echo', 'print' - ), - 2 => array( - '&new', '</script>', '<?php', '<script language', - 'abstract', 'class', 'const', 'declare', 'extends', 'function', 'global', - 'implements', 'interface', 'namespace', 'new', 'private', 'protected', - 'public', 'self', 'trait', 'use', 'var' - ), - 3 => array( - 'abs', 'acos', 'acosh', 'addcslashes', 'addslashes', 'aggregate', - 'aggregate_methods', 'aggregate_methods_by_list', - 'aggregate_methods_by_regexp', 'aggregate_properties', - 'aggregate_properties_by_list', 'aggregate_properties_by_regexp', - 'aggregation_info', 'apache_child_terminate', 'apache_get_modules', - 'apache_get_version', 'apache_getenv', 'apache_lookup_uri', - 'apache_note', 'apache_request_headers', 'apache_response_headers', - 'apache_setenv', 'array', 'array_change_key_case', 'array_chunk', - 'array_combine', 'array_count_values', 'array_diff', - 'array_diff_assoc', 'array_diff_key', 'array_diff_uassoc', - 'array_diff_ukey', 'array_fill', 'array_fill_keys', 'array_filter', - 'array_flip', 'array_intersect', 'array_intersect_assoc', - 'array_intersect_key', 'array_intersect_uassoc', - 'array_intersect_ukey', 'array_key_exists', 'array_keys', 'array_map', - 'array_merge', 'array_merge_recursive', 'array_multisort', 'array_pad', - 'array_pop', 'array_product', 'array_push', 'array_rand', - 'array_reduce', 'array_reverse', 'array_search', 'array_shift', - 'array_slice', 'array_splice', 'array_sum', 'array_udiff', - 'array_udiff_assoc', 'array_udiff_uassoc', 'array_uintersect', - 'array_uintersect_assoc', 'array_uintersect_uassoc', 'array_unique', - 'array_unshift', 'array_values', 'array_walk', 'array_walk_recursive', - 'arsort', 'asin', 'asinh', 'asort', 'assert', 'assert_options', 'atan', - 'atan2', 'atanh', 'base_convert', 'base64_decode', 'base64_encode', - 'basename', 'bcadd', 'bccomp', 'bcdiv', 'bcmod', 'bcmul', - 'bcompiler_load', 'bcompiler_load_exe', 'bcompiler_parse_class', - 'bcompiler_read', 'bcompiler_write_class', 'bcompiler_write_constant', - 'bcompiler_write_exe_footer', 'bcompiler_write_file', - 'bcompiler_write_footer', 'bcompiler_write_function', - 'bcompiler_write_functions_from_file', 'bcompiler_write_header', - 'bcompiler_write_included_filename', 'bcpow', 'bcpowmod', 'bcscale', - 'bcsqrt', 'bcsub', 'bin2hex', 'bindec', 'bindtextdomain', - 'bind_textdomain_codeset', 'bitset_empty', 'bitset_equal', - 'bitset_excl', 'bitset_fill', 'bitset_from_array', 'bitset_from_hash', - 'bitset_from_string', 'bitset_in', 'bitset_incl', - 'bitset_intersection', 'bitset_invert', 'bitset_is_empty', - 'bitset_subset', 'bitset_to_array', 'bitset_to_hash', - 'bitset_to_string', 'bitset_union', 'blenc_encrypt', 'bzclose', - 'bzcompress', 'bzdecompress', 'bzerrno', 'bzerror', 'bzerrstr', - 'bzflush', 'bzopen', 'bzread', 'bzwrite', 'cal_days_in_month', - 'cal_from_jd', 'cal_info', 'cal_to_jd', 'call_user_func', - 'call_user_func_array', 'call_user_method', 'call_user_method_array', - 'ceil', 'chdir', 'checkdate', 'checkdnsrr', 'chgrp', 'chmod', 'chop', - 'chown', 'chr', 'chunk_split', 'class_exists', 'class_implements', - 'class_parents', 'classkit_aggregate_methods', - 'classkit_doc_comments', 'classkit_import', 'classkit_method_add', - 'classkit_method_copy', 'classkit_method_redefine', - 'classkit_method_remove', 'classkit_method_rename', 'clearstatcache', - 'closedir', 'closelog', 'com_create_guid', 'com_event_sink', - 'com_get_active_object', 'com_load_typelib', 'com_message_pump', - 'com_print_typeinfo', 'compact', 'confirm_phpdoc_compiled', - 'connection_aborted', 'connection_status', 'constant', - 'convert_cyr_string', 'convert_uudecode', 'convert_uuencode', 'copy', - 'cos', 'cosh', 'count', 'count_chars', 'cpdf_add_annotation', - 'cpdf_add_outline', 'cpdf_arc', 'cpdf_begin_text', 'cpdf_circle', - 'cpdf_clip', 'cpdf_close', 'cpdf_closepath', - 'cpdf_closepath_fill_stroke', 'cpdf_closepath_stroke', - 'cpdf_continue_text', 'cpdf_curveto', 'cpdf_end_text', 'cpdf_fill', - 'cpdf_fill_stroke', 'cpdf_finalize', 'cpdf_finalize_page', - 'cpdf_global_set_document_limits', 'cpdf_import_jpeg', 'cpdf_lineto', - 'cpdf_moveto', 'cpdf_newpath', 'cpdf_open', 'cpdf_output_buffer', - 'cpdf_page_init', 'cpdf_rect', 'cpdf_restore', 'cpdf_rlineto', - 'cpdf_rmoveto', 'cpdf_rotate', 'cpdf_rotate_text', 'cpdf_save', - 'cpdf_save_to_file', 'cpdf_scale', 'cpdf_set_action_url', - 'cpdf_set_char_spacing', 'cpdf_set_creator', 'cpdf_set_current_page', - 'cpdf_set_font', 'cpdf_set_font_directories', - 'cpdf_set_font_map_file', 'cpdf_set_horiz_scaling', - 'cpdf_set_keywords', 'cpdf_set_leading', 'cpdf_set_page_animation', - 'cpdf_set_subject', 'cpdf_set_text_matrix', 'cpdf_set_text_pos', - 'cpdf_set_text_rendering', 'cpdf_set_text_rise', 'cpdf_set_title', - 'cpdf_set_viewer_preferences', 'cpdf_set_word_spacing', - 'cpdf_setdash', 'cpdf_setflat', 'cpdf_setgray', 'cpdf_setgray_fill', - 'cpdf_setgray_stroke', 'cpdf_setlinecap', 'cpdf_setlinejoin', - 'cpdf_setlinewidth', 'cpdf_setmiterlimit', 'cpdf_setrgbcolor', - 'cpdf_setrgbcolor_fill', 'cpdf_setrgbcolor_stroke', 'cpdf_show', - 'cpdf_show_xy', 'cpdf_stringwidth', 'cpdf_stroke', 'cpdf_text', - 'cpdf_translate', 'crack_check', 'crack_closedict', - 'crack_getlastmessage', 'crack_opendict', 'crc32', 'create_function', - 'crypt', 'ctype_alnum', 'ctype_alpha', 'ctype_cntrl', 'ctype_digit', - 'ctype_graph', 'ctype_lower', 'ctype_print', 'ctype_punct', - 'ctype_space', 'ctype_upper', 'ctype_xdigit', 'curl_close', - 'curl_copy_handle', 'curl_errno', 'curl_error', 'curl_exec', - 'curl_getinfo', 'curl_init', 'curl_multi_add_handle', - 'curl_multi_close', 'curl_multi_exec', 'curl_multi_getcontent', - 'curl_multi_info_read', 'curl_multi_init', 'curl_multi_remove_handle', - 'curl_multi_select', 'curl_setopt', 'curl_setopt_array', - 'curl_version', 'current', 'cvsclient_connect', 'cvsclient_log', - 'cvsclient_login', 'cvsclient_retrieve', 'date', 'date_create', - 'date_date_set', 'date_default_timezone_get', - 'date_default_timezone_set', 'date_format', 'date_isodate_set', - 'date_modify', 'date_offset_get', 'date_parse', 'date_sun_info', - 'date_sunrise', 'date_sunset', 'date_time_set', 'date_timezone_get', - 'date_timezone_set', 'db_id_list', 'dba_close', 'dba_delete', - 'dba_exists', 'dba_fetch', 'dba_firstkey', 'dba_handlers', 'dba_insert', - 'dba_key_split', 'dba_list', 'dba_nextkey', 'dba_open', 'dba_optimize', - 'dba_popen', 'dba_replace', 'dba_sync', 'dbase_add_record', - 'dbase_close', 'dbase_create', 'dbase_delete_record', - 'dbase_get_header_info', 'dbase_get_record', - 'dbase_get_record_with_names', 'dbase_numfields', 'dbase_numrecords', - 'dbase_open', 'dbase_pack', 'dbase_replace_record', - 'dbg_get_all_contexts', 'dbg_get_all_module_names', - 'dbg_get_all_source_lines', 'dbg_get_context_name', - 'dbg_get_module_name', 'dbg_get_profiler_results', - 'dbg_get_source_context', 'dblist', 'dbmclose', 'dbmdelete', - 'dbmexists', 'dbmfetch', 'dbmfirstkey', 'dbminsert', 'dbmnextkey', - 'dbmopen', 'dbmreplace', 'dbx_close', 'dbx_compare', 'dbx_connect', - 'dbx_error', 'dbx_escape_string', 'dbx_fetch_row', 'dbx_query', - 'dbx_sort', 'dcgettext', 'dcngettext', 'deaggregate', 'debug_backtrace', - 'debug_zval_dump', 'debugbreak', 'decbin', 'dechex', 'decoct', 'define', - 'defined', 'define_syslog_variables', 'deg2rad', 'dgettext', 'die', - 'dio_close', 'dio_open', 'dio_read', 'dio_seek', 'dio_stat', 'dio_write', - 'dir', 'dirname', 'disk_free_space', 'disk_total_space', - 'diskfreespace', 'dl', 'dngettext', 'docblock_token_name', - 'docblock_tokenize', 'dom_import_simplexml', 'domxml_add_root', - 'domxml_attributes', 'domxml_children', 'domxml_doc_add_root', - 'domxml_doc_document_element', 'domxml_doc_get_element_by_id', - 'domxml_doc_get_elements_by_tagname', 'domxml_doc_get_root', - 'domxml_doc_set_root', 'domxml_doc_validate', 'domxml_doc_xinclude', - 'domxml_dump_mem', 'domxml_dump_mem_file', 'domxml_dump_node', - 'domxml_dumpmem', 'domxml_elem_get_attribute', - 'domxml_elem_set_attribute', 'domxml_get_attribute', 'domxml_getattr', - 'domxml_html_dump_mem', 'domxml_new_child', 'domxml_new_doc', - 'domxml_new_xmldoc', 'domxml_node', 'domxml_node_add_namespace', - 'domxml_node_attributes', 'domxml_node_children', - 'domxml_node_get_content', 'domxml_node_has_attributes', - 'domxml_node_new_child', 'domxml_node_set_content', - 'domxml_node_set_namespace', 'domxml_node_unlink_node', - 'domxml_open_file', 'domxml_open_mem', 'domxml_parser', - 'domxml_parser_add_chunk', 'domxml_parser_cdata_section', - 'domxml_parser_characters', 'domxml_parser_comment', - 'domxml_parser_end', 'domxml_parser_end_document', - 'domxml_parser_end_element', 'domxml_parser_entity_reference', - 'domxml_parser_get_document', 'domxml_parser_namespace_decl', - 'domxml_parser_processing_instruction', - 'domxml_parser_start_document', 'domxml_parser_start_element', - 'domxml_root', 'domxml_set_attribute', 'domxml_setattr', - 'domxml_substitute_entities_default', 'domxml_unlink_node', - 'domxml_version', 'domxml_xmltree', 'doubleval', 'each', 'easter_date', - 'easter_days', 'empty', 'end', 'ereg', 'ereg_replace', 'eregi', - 'eregi_replace', 'error_get_last', 'error_log', 'error_reporting', - 'escapeshellarg', 'escapeshellcmd', 'eval', 'event_deschedule', - 'event_dispatch', 'event_free', 'event_handle_signal', - 'event_have_events', 'event_init', 'event_new', 'event_pending', - 'event_priority_set', 'event_schedule', 'event_set', 'event_timeout', - 'exec', 'exif_imagetype', 'exif_read_data', 'exif_tagname', - 'exif_thumbnail', 'exit', 'exp', 'explode', 'expm1', 'extension_loaded', - 'extract', 'ezmlm_hash', 'fbird_add_user', 'fbird_affected_rows', - 'fbird_backup', 'fbird_blob_add', 'fbird_blob_cancel', - 'fbird_blob_close', 'fbird_blob_create', 'fbird_blob_echo', - 'fbird_blob_get', 'fbird_blob_import', 'fbird_blob_info', - 'fbird_blob_open', 'fbird_close', 'fbird_commit', 'fbird_commit_ret', - 'fbird_connect', 'fbird_db_info', 'fbird_delete_user', 'fbird_drop_db', - 'fbird_errcode', 'fbird_errmsg', 'fbird_execute', 'fbird_fetch_assoc', - 'fbird_fetch_object', 'fbird_fetch_row', 'fbird_field_info', - 'fbird_free_event_handler', 'fbird_free_query', 'fbird_free_result', - 'fbird_gen_id', 'fbird_maintain_db', 'fbird_modify_user', - 'fbird_name_result', 'fbird_num_fields', 'fbird_num_params', - 'fbird_param_info', 'fbird_pconnect', 'fbird_prepare', 'fbird_query', - 'fbird_restore', 'fbird_rollback', 'fbird_rollback_ret', - 'fbird_server_info', 'fbird_service_attach', 'fbird_service_detach', - 'fbird_set_event_handler', 'fbird_trans', 'fbird_wait_event', 'fclose', - 'fdf_add_doc_javascript', 'fdf_add_template', 'fdf_close', - 'fdf_create', 'fdf_enum_values', 'fdf_errno', 'fdf_error', 'fdf_get_ap', - 'fdf_get_attachment', 'fdf_get_encoding', 'fdf_get_file', - 'fdf_get_flags', 'fdf_get_opt', 'fdf_get_status', 'fdf_get_value', - 'fdf_get_version', 'fdf_header', 'fdf_next_field_name', 'fdf_open', - 'fdf_open_string', 'fdf_remove_item', 'fdf_save', 'fdf_save_string', - 'fdf_set_ap', 'fdf_set_encoding', 'fdf_set_file', 'fdf_set_flags', - 'fdf_set_javascript_action', 'fdf_set_on_import_javascript', - 'fdf_set_opt', 'fdf_set_status', 'fdf_set_submit_form_action', - 'fdf_set_target_frame', 'fdf_set_value', 'fdf_set_version', 'feof', - 'fflush', 'fgetc', 'fgetcsv', 'fgets', 'fgetss', 'file', 'file_exists', - 'file_get_contents', 'file_put_contents', 'fileatime', 'filectime', - 'filegroup', 'fileinode', 'filemtime', 'fileowner', 'fileperms', - 'filepro', 'filepro_fieldcount', 'filepro_fieldname', - 'filepro_fieldtype', 'filepro_fieldwidth', 'filepro_retrieve', - 'filepro_rowcount', 'filesize', 'filetype', 'filter_has_var', - 'filter_id', 'filter_input', 'filter_input_array', 'filter_list', - 'filter_var', 'filter_var_array', 'finfo_buffer', 'finfo_close', - 'finfo_file', 'finfo_open', 'finfo_set_flags', 'floatval', 'flock', - 'floor', 'flush', 'fmod', 'fnmatch', 'fopen', 'fpassthru', 'fprintf', - 'fputcsv', 'fputs', 'fread', 'frenchtojd', 'fribidi_charset_info', - 'fribidi_get_charsets', 'fribidi_log2vis', 'fscanf', 'fseek', - 'fsockopen', 'fstat', 'ftell', 'ftok', 'ftp_alloc', 'ftp_cdup', - 'ftp_chdir', 'ftp_chmod', 'ftp_close', 'ftp_connect', 'ftp_delete', - 'ftp_exec', 'ftp_fget', 'ftp_fput', 'ftp_get', 'ftp_get_option', - 'ftp_login', 'ftp_mdtm', 'ftp_mkdir', 'ftp_nb_continue', 'ftp_nb_fget', - 'ftp_nb_fput', 'ftp_nb_get', 'ftp_nb_put', 'ftp_nlist', 'ftp_pasv', - 'ftp_put', 'ftp_pwd', 'ftp_quit', 'ftp_raw', 'ftp_rawlist', 'ftp_rename', - 'ftp_rmdir', 'ftp_set_option', 'ftp_site', 'ftp_size', - 'ftp_ssl_connect', 'ftp_systype', 'ftruncate', 'function_exists', - 'func_get_arg', 'func_get_args', 'func_num_args', 'fwrite', 'gd_info', - 'getallheaders', 'getcwd', 'getdate', 'getenv', 'gethostbyaddr', - 'gethostbyname', 'gethostbynamel', 'getimagesize', 'getlastmod', - 'getmxrr', 'getmygid', 'getmyinode', 'getmypid', 'getmyuid', 'getopt', - 'getprotobyname', 'getprotobynumber', 'getrandmax', 'getrusage', - 'getservbyname', 'getservbyport', 'gettext', 'gettimeofday', 'gettype', - 'get_browser', 'get_cfg_var', 'get_class', 'get_class_methods', - 'get_class_vars', 'get_current_user', 'get_declared_classes', - 'get_defined_constants', 'get_defined_functions', 'get_defined_vars', - 'get_extension_funcs', 'get_headers', 'get_html_translation_table', - 'get_included_files', 'get_include_path', 'get_loaded_extensions', - 'get_magic_quotes_gpc', 'get_magic_quotes_runtime', 'get_meta_tags', - 'get_object_vars', 'get_parent_class', 'get_required_files', - 'get_resource_type', 'glob', 'gmdate', 'gmmktime', 'gmp_abs', 'gmp_add', - 'gmp_and', 'gmp_clrbit', 'gmp_cmp', 'gmp_com', 'gmp_div', 'gmp_div_q', - 'gmp_div_qr', 'gmp_div_r', 'gmp_divexact', 'gmp_fact', 'gmp_gcd', - 'gmp_gcdext', 'gmp_hamdist', 'gmp_init', 'gmp_intval', 'gmp_invert', - 'gmp_jacobi', 'gmp_legendre', 'gmp_mod', 'gmp_mul', 'gmp_neg', - 'gmp_nextprime', 'gmp_or', 'gmp_perfect_square', 'gmp_popcount', - 'gmp_pow', 'gmp_powm', 'gmp_prob_prime', 'gmp_random', 'gmp_scan0', - 'gmp_scan1', 'gmp_setbit', 'gmp_sign', 'gmp_sqrt', 'gmp_sqrtrem', - 'gmp_strval', 'gmp_sub', 'gmp_xor', 'gmstrftime', 'gopher_parsedir', - 'gregoriantojd', 'gzclose', 'gzcompress', 'gzdeflate', 'gzencode', - 'gzeof', 'gzfile', 'gzgetc', 'gzgets', 'gzgetss', 'gzinflate', 'gzopen', - 'gzpassthru', 'gzputs', 'gzread', 'gzrewind', 'gzseek', 'gztell', - 'gzuncompress', 'gzwrite', 'hash', 'hash_algos', 'hash_file', - 'hash_final', 'hash_hmac', 'hash_hmac_file', 'hash_init', 'hash_update', - 'hash_update_file', 'hash_update_stream', 'header', 'headers_list', - 'headers_sent', 'hebrev', 'hebrevc', 'hexdec', 'highlight_file', - 'highlight_string', 'html_doc', 'html_doc_file', 'html_entity_decode', - 'htmlentities', 'htmlspecialchars', 'htmlspecialchars_decode', - 'http_build_cookie', 'http_build_query', 'http_build_str', - 'http_build_url', 'http_cache_etag', 'http_cache_last_modified', - 'http_chunked_decode', 'http_date', 'http_deflate', 'http_get', - 'http_get_request_body', 'http_get_request_body_stream', - 'http_get_request_headers', 'http_head', 'http_inflate', - 'http_match_etag', 'http_match_modified', 'http_match_request_header', - 'http_negotiate_charset', 'http_negotiate_content_type', - 'http_negotiate_language', 'http_parse_cookie', 'http_parse_headers', - 'http_parse_message', 'http_parse_params', - 'http_persistent_handles_clean', 'http_persistent_handles_count', - 'http_persistent_handles_ident', 'http_post_data', 'http_post_fields', - 'http_put_data', 'http_put_file', 'http_put_stream', 'http_redirect', - 'http_request', 'http_request_body_encode', - 'http_request_method_exists', 'http_request_method_name', - 'http_request_method_register', 'http_request_method_unregister', - 'http_send_content_disposition', 'http_send_content_type', - 'http_send_data', 'http_send_file', 'http_send_last_modified', - 'http_send_status', 'http_send_stream', 'http_support', - 'http_throttle', 'hypot', 'i18n_convert', 'i18n_discover_encoding', - 'i18n_http_input', 'i18n_http_output', 'i18n_internal_encoding', - 'i18n_ja_jp_hantozen', 'i18n_mime_header_decode', - 'i18n_mime_header_encode', 'ibase_add_user', 'ibase_affected_rows', - 'ibase_backup', 'ibase_blob_add', 'ibase_blob_cancel', - 'ibase_blob_close', 'ibase_blob_create', 'ibase_blob_echo', - 'ibase_blob_get', 'ibase_blob_import', 'ibase_blob_info', - 'ibase_blob_open', 'ibase_close', 'ibase_commit', 'ibase_commit_ret', - 'ibase_connect', 'ibase_db_info', 'ibase_delete_user', 'ibase_drop_db', - 'ibase_errcode', 'ibase_errmsg', 'ibase_execute', 'ibase_fetch_assoc', - 'ibase_fetch_object', 'ibase_fetch_row', 'ibase_field_info', - 'ibase_free_event_handler', 'ibase_free_query', 'ibase_free_result', - 'ibase_gen_id', 'ibase_maintain_db', 'ibase_modify_user', - 'ibase_name_result', 'ibase_num_fields', 'ibase_num_params', - 'ibase_param_info', 'ibase_pconnect', 'ibase_prepare', 'ibase_query', - 'ibase_restore', 'ibase_rollback', 'ibase_rollback_ret', - 'ibase_server_info', 'ibase_service_attach', 'ibase_service_detach', - 'ibase_set_event_handler', 'ibase_trans', 'ibase_wait_event', 'iconv', - 'iconv_get_encoding', 'iconv_mime_decode', - 'iconv_mime_decode_headers', 'iconv_mime_encode', - 'iconv_set_encoding', 'iconv_strlen', 'iconv_strpos', 'iconv_strrpos', - 'iconv_substr', 'id3_get_frame_long_name', 'id3_get_frame_short_name', - 'id3_get_genre_id', 'id3_get_genre_list', 'id3_get_genre_name', - 'id3_get_tag', 'id3_get_version', 'id3_remove_tag', 'id3_set_tag', - 'idate', 'ignore_user_abort', 'image_type_to_extension', - 'image_type_to_mime_type', 'image2wbmp', 'imagealphablending', - 'imageantialias', 'imagearc', 'imagechar', 'imagecharup', - 'imagecolorallocate', 'imagecolorallocatealpha', 'imagecolorat', - 'imagecolorclosest', 'imagecolorclosestalpha', 'imagecolordeallocate', - 'imagecolorexact', 'imagecolorexactalpha', 'imagecolormatch', - 'imagecolorresolve', 'imagecolorresolvealpha', 'imagecolorset', - 'imagecolorsforindex', 'imagecolorstotal', 'imagecolortransparent', - 'imageconvolution', 'imagecopy', 'imagecopymerge', - 'imagecopymergegray', 'imagecopyresampled', 'imagecopyresized', - 'imagecreate', 'imagecreatefromgd', 'imagecreatefromgd2', - 'imagecreatefromgd2part', 'imagecreatefromgif', 'imagecreatefromjpeg', - 'imagecreatefrompng', 'imagecreatefromstring', 'imagecreatefromwbmp', - 'imagecreatefromxbm', 'imagecreatetruecolor', 'imagedashedline', - 'imagedestroy', 'imageellipse', 'imagefill', 'imagefilledarc', - 'imagefilledellipse', 'imagefilledpolygon', 'imagefilledrectangle', - 'imagefilltoborder', 'imagefilter', 'imagefontheight', - 'imagefontwidth', 'imageftbbox', 'imagefttext', 'imagegammacorrect', - 'imagegd', 'imagegd2', 'imagegif', 'imagegrabscreen', 'imagegrabwindow', - 'imageinterlace', 'imageistruecolor', 'imagejpeg', 'imagelayereffect', - 'imageline', 'imageloadfont', 'imagepalettecopy', 'imagepng', - 'imagepolygon', 'imagepsbbox', 'imagepsencodefont', - 'imagepsextendfont', 'imagepsfreefont', 'imagepsloadfont', - 'imagepsslantfont', 'imagepstext', 'imagerectangle', 'imagerotate', - 'imagesavealpha', 'imagesetbrush', 'imagesetpixel', 'imagesetstyle', - 'imagesetthickness', 'imagesettile', 'imagestring', 'imagestringup', - 'imagesx', 'imagesy', 'imagetruecolortopalette', 'imagettfbbox', - 'imagettftext', 'imagetypes', 'imagewbmp', 'imagexbm', 'imap_8bit', - 'imap_alerts', 'imap_append', 'imap_base64', 'imap_binary', 'imap_body', - 'imap_bodystruct', 'imap_check', 'imap_clearflag_full', 'imap_close', - 'imap_create', 'imap_createmailbox', 'imap_delete', - 'imap_deletemailbox', 'imap_errors', 'imap_expunge', - 'imap_fetch_overview', 'imap_fetchbody', 'imap_fetchheader', - 'imap_fetchstructure', 'imap_fetchtext', 'imap_get_quota', - 'imap_get_quotaroot', 'imap_getacl', 'imap_getmailboxes', - 'imap_getsubscribed', 'imap_header', 'imap_headerinfo', 'imap_headers', - 'imap_last_error', 'imap_list', 'imap_listmailbox', - 'imap_listsubscribed', 'imap_lsub', 'imap_mail', 'imap_mail_compose', - 'imap_mail_copy', 'imap_mail_move', 'imap_mailboxmsginfo', - 'imap_mime_header_decode', 'imap_msgno', 'imap_num_msg', - 'imap_num_recent', 'imap_open', 'imap_ping', 'imap_qprint', - 'imap_rename', 'imap_renamemailbox', 'imap_reopen', - 'imap_rfc822_parse_adrlist', 'imap_rfc822_parse_headers', - 'imap_rfc822_write_address', 'imap_savebody', 'imap_scan', - 'imap_scanmailbox', 'imap_search', 'imap_set_quota', 'imap_setacl', - 'imap_setflag_full', 'imap_sort', 'imap_status', 'imap_subscribe', - 'imap_thread', 'imap_timeout', 'imap_uid', 'imap_undelete', - 'imap_unsubscribe', 'imap_utf7_decode', 'imap_utf7_encode', - 'imap_utf8', 'implode', 'import_request_variables', 'in_array', - 'ini_alter', 'ini_get', 'ini_get_all', 'ini_restore', 'ini_set', - 'intval', 'ip2long', 'iptcembed', 'iptcparse', 'isset', 'is_a', - 'is_array', 'is_bool', 'is_callable', 'is_dir', 'is_double', - 'is_executable', 'is_file', 'is_finite', 'is_float', 'is_infinite', - 'is_int', 'is_integer', 'is_link', 'is_long', 'is_nan', 'is_null', - 'is_numeric', 'is_object', 'is_readable', 'is_real', 'is_resource', - 'is_scalar', 'is_soap_fault', 'is_string', 'is_subclass_of', - 'is_uploaded_file', 'is_writable', 'is_writeable', 'iterator_apply', - 'iterator_count', 'iterator_to_array', 'java_last_exception_clear', - 'java_last_exception_get', 'jddayofweek', 'jdmonthname', 'jdtofrench', - 'jdtogregorian', 'jdtojewish', 'jdtojulian', 'jdtounix', 'jewishtojd', - 'join', 'jpeg2wbmp', 'json_decode', 'json_encode', 'juliantojd', 'key', - 'key_exists', 'krsort', 'ksort', 'lcg_value', 'ldap_add', 'ldap_bind', - 'ldap_close', 'ldap_compare', 'ldap_connect', 'ldap_count_entries', - 'ldap_delete', 'ldap_dn2ufn', 'ldap_err2str', 'ldap_errno', - 'ldap_error', 'ldap_explode_dn', 'ldap_first_attribute', - 'ldap_first_entry', 'ldap_first_reference', 'ldap_free_result', - 'ldap_get_attributes', 'ldap_get_dn', 'ldap_get_entries', - 'ldap_get_option', 'ldap_get_values', 'ldap_get_values_len', - 'ldap_list', 'ldap_mod_add', 'ldap_mod_del', 'ldap_mod_replace', - 'ldap_modify', 'ldap_next_attribute', 'ldap_next_entry', - 'ldap_next_reference', 'ldap_parse_reference', 'ldap_parse_result', - 'ldap_read', 'ldap_rename', 'ldap_search', 'ldap_set_option', - 'ldap_sort', 'ldap_start_tls', 'ldap_unbind', 'levenshtein', - 'libxml_clear_errors', 'libxml_get_errors', 'libxml_get_last_error', - 'libxml_set_streams_context', 'libxml_use_internal_errors', 'link', - 'linkinfo', 'list', 'localeconv', 'localtime', 'log', 'log1p', 'log10', - 'long2ip', 'lstat', 'ltrim', 'lzf_compress', 'lzf_decompress', - 'lzf_optimized_for', 'magic_quotes_runtime', 'mail', 'max', 'mbereg', - 'mberegi', 'mberegi_replace', 'mbereg_match', 'mbereg_replace', - 'mbereg_search', 'mbereg_search_getpos', 'mbereg_search_getregs', - 'mbereg_search_init', 'mbereg_search_pos', 'mbereg_search_regs', - 'mbereg_search_setpos', 'mbregex_encoding', 'mbsplit', 'mbstrcut', - 'mbstrlen', 'mbstrpos', 'mbstrrpos', 'mbsubstr', 'mb_check_encoding', - 'mb_convert_case', 'mb_convert_encoding', 'mb_convert_kana', - 'mb_convert_variables', 'mb_decode_mimeheader', - 'mb_decode_numericentity', 'mb_detect_encoding', 'mb_detect_order', - 'mb_encode_mimeheader', 'mb_encode_numericentity', 'mb_ereg', - 'mb_eregi', 'mb_eregi_replace', 'mb_ereg_match', 'mb_ereg_replace', - 'mb_ereg_search', 'mb_ereg_search_getpos', 'mb_ereg_search_getregs', - 'mb_ereg_search_init', 'mb_ereg_search_pos', 'mb_ereg_search_regs', - 'mb_ereg_search_setpos', 'mb_get_info', 'mb_http_input', - 'mb_http_output', 'mb_internal_encoding', 'mb_language', - 'mb_list_encodings', 'mb_output_handler', 'mb_parse_str', - 'mb_preferred_mime_name', 'mb_regex_encoding', 'mb_regex_set_options', - 'mb_send_mail', 'mb_split', 'mb_strcut', 'mb_strimwidth', 'mb_stripos', - 'mb_stristr', 'mb_strlen', 'mb_strpos', 'mb_strrchr', 'mb_strrichr', - 'mb_strripos', 'mb_strrpos', 'mb_strstr', 'mb_strtolower', - 'mb_strtoupper', 'mb_strwidth', 'mb_substitute_character', 'mb_substr', - 'mb_substr_count', 'mcrypt_cbc', 'mcrypt_cfb', 'mcrypt_create_iv', - 'mcrypt_decrypt', 'mcrypt_ecb', 'mcrypt_enc_get_algorithms_name', - 'mcrypt_enc_get_block_size', 'mcrypt_enc_get_iv_size', - 'mcrypt_enc_get_key_size', 'mcrypt_enc_get_modes_name', - 'mcrypt_enc_get_supported_key_sizes', - 'mcrypt_enc_is_block_algorithm', - 'mcrypt_enc_is_block_algorithm_mode', 'mcrypt_enc_is_block_mode', - 'mcrypt_enc_self_test', 'mcrypt_encrypt', 'mcrypt_generic', - 'mcrypt_generic_deinit', 'mcrypt_generic_end', 'mcrypt_generic_init', - 'mcrypt_get_block_size', 'mcrypt_get_cipher_name', - 'mcrypt_get_iv_size', 'mcrypt_get_key_size', 'mcrypt_list_algorithms', - 'mcrypt_list_modes', 'mcrypt_module_close', - 'mcrypt_module_get_algo_block_size', - 'mcrypt_module_get_algo_key_size', - 'mcrypt_module_get_supported_key_sizes', - 'mcrypt_module_is_block_algorithm', - 'mcrypt_module_is_block_algorithm_mode', - 'mcrypt_module_is_block_mode', 'mcrypt_module_open', - 'mcrypt_module_self_test', 'mcrypt_ofb', 'md5', 'md5_file', - 'mdecrypt_generic', 'memcache_add', 'memcache_add_server', - 'memcache_close', 'memcache_connect', 'memcache_debug', - 'memcache_decrement', 'memcache_delete', 'memcache_flush', - 'memcache_get', 'memcache_get_extended_stats', - 'memcache_get_server_status', 'memcache_get_stats', - 'memcache_get_version', 'memcache_increment', 'memcache_pconnect', - 'memcache_replace', 'memcache_set', 'memcache_set_compress_threshold', - 'memcache_set_server_params', 'memory_get_peak_usage', - 'memory_get_usage', 'metaphone', 'mhash', 'mhash_count', - 'mhash_get_block_size', 'mhash_get_hash_name', 'mhash_keygen_s2k', - 'method_exists', 'microtime', 'mime_content_type', 'min', - 'ming_keypress', 'ming_setcubicthreshold', 'ming_setscale', - 'ming_useconstants', 'ming_useswfversion', 'mkdir', 'mktime', - 'money_format', 'move_uploaded_file', 'msql', 'msql_affected_rows', - 'msql_close', 'msql_connect', 'msql_create_db', 'msql_createdb', - 'msql_data_seek', 'msql_db_query', 'msql_dbname', 'msql_drop_db', - 'msql_dropdb', 'msql_error', 'msql_fetch_array', 'msql_fetch_field', - 'msql_fetch_object', 'msql_fetch_row', 'msql_field_flags', - 'msql_field_len', 'msql_field_name', 'msql_field_seek', - 'msql_field_table', 'msql_field_type', 'msql_fieldflags', - 'msql_fieldlen', 'msql_fieldname', 'msql_fieldtable', 'msql_fieldtype', - 'msql_free_result', 'msql_freeresult', 'msql_list_dbs', - 'msql_list_fields', 'msql_list_tables', 'msql_listdbs', - 'msql_listfields', 'msql_listtables', 'msql_num_fields', - 'msql_num_rows', 'msql_numfields', 'msql_numrows', 'msql_pconnect', - 'msql_query', 'msql_regcase', 'msql_result', 'msql_select_db', - 'msql_selectdb', 'msql_tablename', 'mssql_bind', 'mssql_close', - 'mssql_connect', 'mssql_data_seek', 'mssql_execute', - 'mssql_fetch_array', 'mssql_fetch_assoc', 'mssql_fetch_batch', - 'mssql_fetch_field', 'mssql_fetch_object', 'mssql_fetch_row', - 'mssql_field_length', 'mssql_field_name', 'mssql_field_seek', - 'mssql_field_type', 'mssql_free_result', 'mssql_free_statement', - 'mssql_get_last_message', 'mssql_guid_string', 'mssql_init', - 'mssql_min_error_severity', 'mssql_min_message_severity', - 'mssql_next_result', 'mssql_num_fields', 'mssql_num_rows', - 'mssql_pconnect', 'mssql_query', 'mssql_result', 'mssql_rows_affected', - 'mssql_select_db', 'mt_getrandmax', 'mt_rand', 'mt_srand', 'mysql', - 'mysql_affected_rows', 'mysql_client_encoding', 'mysql_close', - 'mysql_connect', 'mysql_createdb', 'mysql_create_db', - 'mysql_data_seek', 'mysql_dbname', 'mysql_db_name', 'mysql_db_query', - 'mysql_dropdb', 'mysql_drop_db', 'mysql_errno', 'mysql_error', - 'mysql_escape_string', 'mysql_fetch_array', 'mysql_fetch_assoc', - 'mysql_fetch_field', 'mysql_fetch_lengths', 'mysql_fetch_object', - 'mysql_fetch_row', 'mysql_fieldflags', 'mysql_fieldlen', - 'mysql_fieldname', 'mysql_fieldtable', 'mysql_fieldtype', - 'mysql_field_flags', 'mysql_field_len', 'mysql_field_name', - 'mysql_field_seek', 'mysql_field_table', 'mysql_field_type', - 'mysql_freeresult', 'mysql_free_result', 'mysql_get_client_info', - 'mysql_get_host_info', 'mysql_get_proto_info', - 'mysql_get_server_info', 'mysql_info', 'mysql_insert_id', - 'mysql_listdbs', 'mysql_listfields', 'mysql_listtables', - 'mysql_list_dbs', 'mysql_list_fields', 'mysql_list_processes', - 'mysql_list_tables', 'mysql_numfields', 'mysql_numrows', - 'mysql_num_fields', 'mysql_num_rows', 'mysql_pconnect', 'mysql_ping', - 'mysql_query', 'mysql_real_escape_string', 'mysql_result', - 'mysql_selectdb', 'mysql_select_db', 'mysql_set_charset', 'mysql_stat', - 'mysql_tablename', 'mysql_table_name', 'mysql_thread_id', - 'mysql_unbuffered_query', 'mysqli_affected_rows', 'mysqli_autocommit', - 'mysqli_bind_param', 'mysqli_bind_result', 'mysqli_change_user', - 'mysqli_character_set_name', 'mysqli_client_encoding', 'mysqli_close', - 'mysqli_commit', 'mysqli_connect', 'mysqli_connect_errno', - 'mysqli_connect_error', 'mysqli_data_seek', 'mysqli_debug', - 'mysqli_disable_reads_from_master', 'mysqli_disable_rpl_parse', - 'mysqli_dump_debug_info', 'mysqli_embedded_server_end', - 'mysqli_embedded_server_start', 'mysqli_enable_reads_from_master', - 'mysqli_enable_rpl_parse', 'mysqli_errno', 'mysqli_error', - 'mysqli_escape_string', 'mysqli_execute', 'mysqli_fetch', - 'mysqli_fetch_array', 'mysqli_fetch_assoc', 'mysqli_fetch_field', - 'mysqli_fetch_field_direct', 'mysqli_fetch_fields', - 'mysqli_fetch_lengths', 'mysqli_fetch_object', 'mysqli_fetch_row', - 'mysqli_field_count', 'mysqli_field_seek', 'mysqli_field_tell', - 'mysqli_free_result', 'mysqli_get_charset', 'mysqli_get_client_info', - 'mysqli_get_client_version', 'mysqli_get_host_info', - 'mysqli_get_metadata', 'mysqli_get_proto_info', - 'mysqli_get_server_info', 'mysqli_get_server_version', - 'mysqli_get_warnings', 'mysqli_info', 'mysqli_init', - 'mysqli_insert_id', 'mysqli_kill', 'mysqli_master_query', - 'mysqli_more_results', 'mysqli_multi_query', 'mysqli_next_result', - 'mysqli_num_fields', 'mysqli_num_rows', 'mysqli_options', - 'mysqli_param_count', 'mysqli_ping', 'mysqli_prepare', 'mysqli_query', - 'mysqli_real_connect', 'mysqli_real_escape_string', - 'mysqli_real_query', 'mysqli_report', 'mysqli_rollback', - 'mysqli_rpl_parse_enabled', 'mysqli_rpl_probe', - 'mysqli_rpl_query_type', 'mysqli_select_db', 'mysqli_send_long_data', - 'mysqli_send_query', 'mysqli_set_charset', - 'mysqli_set_local_infile_default', 'mysqli_set_local_infile_handler', - 'mysqli_set_opt', 'mysqli_slave_query', 'mysqli_sqlstate', - 'mysqli_ssl_set', 'mysqli_stat', 'mysqli_stmt_affected_rows', - 'mysqli_stmt_attr_get', 'mysqli_stmt_attr_set', - 'mysqli_stmt_bind_param', 'mysqli_stmt_bind_result', - 'mysqli_stmt_close', 'mysqli_stmt_data_seek', 'mysqli_stmt_errno', - 'mysqli_stmt_error', 'mysqli_stmt_execute', 'mysqli_stmt_fetch', - 'mysqli_stmt_field_count', 'mysqli_stmt_free_result', - 'mysqli_stmt_get_warnings', 'mysqli_stmt_init', - 'mysqli_stmt_insert_id', 'mysqli_stmt_num_rows', - 'mysqli_stmt_param_count', 'mysqli_stmt_prepare', 'mysqli_stmt_reset', - 'mysqli_stmt_result_metadata', 'mysqli_stmt_send_long_data', - 'mysqli_stmt_sqlstate', 'mysqli_stmt_store_result', - 'mysqli_store_result', 'mysqli_thread_id', 'mysqli_thread_safe', - 'mysqli_use_result', 'mysqli_warning_count', 'natcasesort', 'natsort', - 'new_xmldoc', 'next', 'ngettext', 'nl2br', 'nl_langinfo', - 'ntuser_getdomaincontroller', 'ntuser_getusergroups', - 'ntuser_getuserinfo', 'ntuser_getuserlist', 'number_format', - 'ob_clean', 'ob_deflatehandler', 'ob_end_clean', 'ob_end_flush', - 'ob_etaghandler', 'ob_flush', 'ob_get_clean', 'ob_get_contents', - 'ob_get_flush', 'ob_get_length', 'ob_get_level', 'ob_get_status', - 'ob_gzhandler', 'ob_iconv_handler', 'ob_implicit_flush', - 'ob_inflatehandler', 'ob_list_handlers', 'ob_start', 'ob_tidyhandler', - 'octdec', 'odbc_autocommit', 'odbc_binmode', 'odbc_close', - 'odbc_close_all', 'odbc_columnprivileges', 'odbc_columns', - 'odbc_commit', 'odbc_connect', 'odbc_cursor', 'odbc_data_source', - 'odbc_do', 'odbc_error', 'odbc_errormsg', 'odbc_exec', 'odbc_execute', - 'odbc_fetch_array', 'odbc_fetch_into', 'odbc_fetch_object', - 'odbc_fetch_row', 'odbc_field_len', 'odbc_field_name', - 'odbc_field_num', 'odbc_field_precision', 'odbc_field_scale', - 'odbc_field_type', 'odbc_foreignkeys', 'odbc_free_result', - 'odbc_gettypeinfo', 'odbc_longreadlen', 'odbc_next_result', - 'odbc_num_fields', 'odbc_num_rows', 'odbc_pconnect', 'odbc_prepare', - 'odbc_primarykeys', 'odbc_procedurecolumns', 'odbc_procedures', - 'odbc_result', 'odbc_result_all', 'odbc_rollback', 'odbc_setoption', - 'odbc_specialcolumns', 'odbc_statistics', 'odbc_tableprivileges', - 'odbc_tables', 'opendir', 'openlog', 'openssl_csr_export', - 'openssl_csr_export_to_file', 'openssl_csr_get_public_key', - 'openssl_csr_get_subject', 'openssl_csr_new', 'openssl_csr_sign', - 'openssl_error_string', 'openssl_free_key', 'openssl_get_privatekey', - 'openssl_get_publickey', 'openssl_open', 'openssl_pkcs12_export', - 'openssl_pkcs12_export_to_file', 'openssl_pkcs12_read', - 'openssl_pkcs7_decrypt', 'openssl_pkcs7_encrypt', - 'openssl_pkcs7_sign', 'openssl_pkcs7_verify', 'openssl_pkey_export', - 'openssl_pkey_export_to_file', 'openssl_pkey_free', - 'openssl_pkey_get_details', 'openssl_pkey_get_private', - 'openssl_pkey_get_public', 'openssl_pkey_new', - 'openssl_private_decrypt', 'openssl_private_encrypt', - 'openssl_public_decrypt', 'openssl_public_encrypt', 'openssl_seal', - 'openssl_sign', 'openssl_verify', 'openssl_x509_checkpurpose', - 'openssl_x509_check_private_key', 'openssl_x509_export', - 'openssl_x509_export_to_file', 'openssl_x509_free', - 'openssl_x509_parse', 'openssl_x509_read', 'ord', - 'output_add_rewrite_var', 'output_reset_rewrite_vars', 'overload', - 'outputdebugstring', 'pack', 'parse_ini_file', 'parse_str', 'parse_url', - 'parsekit_compile_file', 'parsekit_compile_string', - 'parsekit_func_arginfo', 'parsekit_opcode_flags', - 'parsekit_opcode_name', 'passthru', 'pathinfo', 'pclose', - 'pdf_add_bookmark', 'pdf_add_launchlink', 'pdf_add_locallink', - 'pdf_add_nameddest', 'pdf_add_note', 'pdf_add_pdflink', - 'pdf_add_thumbnail', 'pdf_add_weblink', 'pdf_arc', 'pdf_arcn', - 'pdf_attach_file', 'pdf_begin_font', 'pdf_begin_glyph', - 'pdf_begin_page', 'pdf_begin_pattern', 'pdf_begin_template', - 'pdf_circle', 'pdf_clip', 'pdf_close', 'pdf_close_image', - 'pdf_close_pdi', 'pdf_close_pdi_page', 'pdf_closepath', - 'pdf_closepath_fill_stroke', 'pdf_closepath_stroke', 'pdf_concat', - 'pdf_continue_text', 'pdf_create_gstate', 'pdf_create_pvf', - 'pdf_curveto', 'pdf_delete', 'pdf_delete_pvf', 'pdf_encoding_set_char', - 'pdf_end_font', 'pdf_end_glyph', 'pdf_end_page', 'pdf_end_pattern', - 'pdf_end_template', 'pdf_endpath', 'pdf_fill', 'pdf_fill_imageblock', - 'pdf_fill_pdfblock', 'pdf_fill_stroke', 'pdf_fill_textblock', - 'pdf_findfont', 'pdf_fit_image', 'pdf_fit_pdi_page', - 'pdf_fit_textline', 'pdf_get_apiname', 'pdf_get_buffer', - 'pdf_get_errmsg', 'pdf_get_errnum', 'pdf_get_parameter', - 'pdf_get_pdi_parameter', 'pdf_get_pdi_value', 'pdf_get_value', - 'pdf_initgraphics', 'pdf_lineto', 'pdf_load_font', - 'pdf_load_iccprofile', 'pdf_load_image', 'pdf_makespotcolor', - 'pdf_moveto', 'pdf_new', 'pdf_open_ccitt', 'pdf_open_file', - 'pdf_open_image', 'pdf_open_image_file', 'pdf_open_pdi', - 'pdf_open_pdi_page', 'pdf_place_image', 'pdf_place_pdi_page', - 'pdf_process_pdi', 'pdf_rect', 'pdf_restore', 'pdf_rotate', 'pdf_save', - 'pdf_scale', 'pdf_set_border_color', 'pdf_set_border_dash', - 'pdf_set_border_style', 'pdf_set_gstate', 'pdf_set_info', - 'pdf_set_parameter', 'pdf_set_text_pos', 'pdf_set_value', - 'pdf_setcolor', 'pdf_setdash', 'pdf_setdashpattern', 'pdf_setflat', - 'pdf_setfont', 'pdf_setlinecap', 'pdf_setlinejoin', 'pdf_setlinewidth', - 'pdf_setmatrix', 'pdf_setmiterlimit', 'pdf_setpolydash', 'pdf_shading', - 'pdf_shading_pattern', 'pdf_shfill', 'pdf_show', 'pdf_show_boxed', - 'pdf_show_xy', 'pdf_skew', 'pdf_stringwidth', 'pdf_stroke', - 'pdf_translate', 'pdo_drivers', 'pfsockopen', 'pg_affected_rows', - 'pg_cancel_query', 'pg_clientencoding', 'pg_client_encoding', - 'pg_close', 'pg_cmdtuples', 'pg_connect', 'pg_connection_busy', - 'pg_connection_reset', 'pg_connection_status', 'pg_convert', - 'pg_copy_from', 'pg_copy_to', 'pg_dbname', 'pg_delete', 'pg_end_copy', - 'pg_errormessage', 'pg_escape_bytea', 'pg_escape_string', 'pg_exec', - 'pg_execute', 'pg_fetch_all', 'pg_fetch_all_columns', 'pg_fetch_array', - 'pg_fetch_assoc', 'pg_fetch_object', 'pg_fetch_result', 'pg_fetch_row', - 'pg_fieldisnull', 'pg_fieldname', 'pg_fieldnum', 'pg_fieldprtlen', - 'pg_fieldsize', 'pg_fieldtype', 'pg_field_is_null', 'pg_field_name', - 'pg_field_num', 'pg_field_prtlen', 'pg_field_size', 'pg_field_table', - 'pg_field_type', 'pg_field_type_oid', 'pg_free_result', - 'pg_freeresult', 'pg_get_notify', 'pg_get_pid', 'pg_get_result', - 'pg_getlastoid', 'pg_host', 'pg_insert', 'pg_last_error', - 'pg_last_notice', 'pg_last_oid', 'pg_loclose', 'pg_locreate', - 'pg_loexport', 'pg_loimport', 'pg_loopen', 'pg_loread', 'pg_loreadall', - 'pg_lounlink', 'pg_lowrite', 'pg_lo_close', 'pg_lo_create', - 'pg_lo_export', 'pg_lo_import', 'pg_lo_open', 'pg_lo_read', - 'pg_lo_read_all', 'pg_lo_seek', 'pg_lo_tell', 'pg_lo_unlink', - 'pg_lo_write', 'pg_meta_data', 'pg_numfields', 'pg_numrows', - 'pg_num_fields', 'pg_num_rows', 'pg_options', 'pg_parameter_status', - 'pg_pconnect', 'pg_ping', 'pg_port', 'pg_prepare', 'pg_put_line', - 'pg_query', 'pg_query_params', 'pg_result', 'pg_result_error', - 'pg_result_error_field', 'pg_result_seek', 'pg_result_status', - 'pg_select', 'pg_send_execute', 'pg_send_prepare', 'pg_send_query', - 'pg_send_query_params', 'pg_set_client_encoding', - 'pg_set_error_verbosity', 'pg_setclientencoding', 'pg_trace', - 'pg_transaction_status', 'pg_tty', 'pg_unescape_bytea', 'pg_untrace', - 'pg_update', 'pg_version', 'php_egg_logo_guid', 'php_ini_loaded_file', - 'php_ini_scanned_files', 'php_logo_guid', 'php_real_logo_guid', - 'php_sapi_name', 'php_strip_whitespace', 'php_uname', 'phpcredits', - 'phpdoc_xml_from_string', 'phpinfo', 'phpversion', 'pi', 'png2wbmp', - 'pop3_close', 'pop3_delete_message', 'pop3_get_account_size', - 'pop3_get_message', 'pop3_get_message_count', - 'pop3_get_message_header', 'pop3_get_message_ids', - 'pop3_get_message_size', 'pop3_get_message_sizes', 'pop3_open', - 'pop3_undelete', 'popen', 'pos', 'posix_ctermid', 'posix_errno', - 'posix_getcwd', 'posix_getegid', 'posix_geteuid', 'posix_getgid', - 'posix_getgrgid', 'posix_getgrnam', 'posix_getgroups', - 'posix_getlogin', 'posix_getpgid', 'posix_getpgrp', 'posix_getpid', - 'posix_getppid', 'posix_getpwnam', 'posix_getpwuid', 'posix_getrlimit', - 'posix_getsid', 'posix_getuid', 'posix_get_last_error', 'posix_isatty', - 'posix_kill', 'posix_mkfifo', 'posix_setegid', 'posix_seteuid', - 'posix_setgid', 'posix_setpgid', 'posix_setsid', 'posix_setuid', - 'posix_strerror', 'posix_times', 'posix_ttyname', 'posix_uname', 'pow', - 'preg_grep', 'preg_last_error', 'preg_match', 'preg_match_all', - 'preg_quote', 'preg_replace', 'preg_replace_callback', 'preg_split', - 'prev', 'print_r', 'printf', 'proc_close', 'proc_get_status', - 'proc_open', 'proc_terminate', 'putenv', 'quoted_printable_decode', - 'quotemeta', 'rad2deg', 'radius_acct_open', 'radius_add_server', - 'radius_auth_open', 'radius_close', 'radius_config', - 'radius_create_request', 'radius_cvt_addr', 'radius_cvt_int', - 'radius_cvt_string', 'radius_demangle', 'radius_demangle_mppe_key', - 'radius_get_attr', 'radius_get_vendor_attr', 'radius_put_addr', - 'radius_put_attr', 'radius_put_int', 'radius_put_string', - 'radius_put_vendor_addr', 'radius_put_vendor_attr', - 'radius_put_vendor_int', 'radius_put_vendor_string', - 'radius_request_authenticator', 'radius_send_request', - 'radius_server_secret', 'radius_strerror', 'rand', 'range', - 'rawurldecode', 'rawurlencode', 'read_exif_data', 'readdir', 'readfile', - 'readgzfile', 'readlink', 'realpath', 'reg_close_key', 'reg_create_key', - 'reg_enum_key', 'reg_enum_value', 'reg_get_value', 'reg_open_key', - 'reg_set_value', 'register_shutdown_function', - 'register_tick_function', 'rename', 'res_close', 'res_get', 'res_list', - 'res_list_type', 'res_open', 'res_set', 'reset', - 'restore_error_handler', 'restore_include_path', 'rewind', 'rewinddir', - 'rmdir', 'round', 'rsort', 'rtrim', 'runkit_class_adopt', - 'runkit_class_emancipate', 'runkit_constant_add', - 'runkit_constant_redefine', 'runkit_constant_remove', - 'runkit_default_property_add', 'runkit_function_add', - 'runkit_function_copy', 'runkit_function_redefine', - 'runkit_function_remove', 'runkit_function_rename', 'runkit_import', - 'runkit_lint', 'runkit_lint_file', 'runkit_method_add', - 'runkit_method_copy', 'runkit_method_redefine', - 'runkit_method_remove', 'runkit_method_rename', 'runkit_object_id', - 'runkit_return_value_used', 'runkit_sandbox_output_handler', - 'runkit_superglobals', 'runkit_zval_inspect', 'scandir', 'sem_acquire', - 'sem_get', 'sem_release', 'sem_remove', 'serialize', - 'session_cache_expire', 'session_cache_limiter', 'session_commit', - 'session_decode', 'session_destroy', 'session_encode', - 'session_get_cookie_params', 'session_id', 'session_is_registered', - 'session_module_name', 'session_name', 'session_regenerate_id', - 'session_register', 'session_save_path', 'session_set_cookie_params', - 'session_set_save_handler', 'session_start', 'session_unregister', - 'session_unset', 'session_write_close', 'set_content', - 'set_error_handler', 'set_file_buffer', 'set_include_path', - 'set_magic_quotes_runtime', 'set_socket_blocking', 'set_time_limit', - 'setcookie', 'setlocale', 'setrawcookie', 'settype', 'sha1', 'sha1_file', - 'shell_exec', 'shmop_close', 'shmop_delete', 'shmop_open', 'shmop_read', - 'shmop_size', 'shmop_write', 'shm_attach', 'shm_detach', 'shm_get_var', - 'shm_put_var', 'shm_remove', 'shm_remove_var', 'show_source', 'shuffle', - 'similar_text', 'simplexml_import_dom', 'simplexml_load_file', - 'simplexml_load_string', 'sin', 'sinh', 'sizeof', 'sleep', 'smtp_close', - 'smtp_cmd_data', 'smtp_cmd_mail', 'smtp_cmd_rcpt', 'smtp_connect', - 'snmp_get_quick_print', 'snmp_get_valueretrieval', 'snmp_read_mib', - 'snmp_set_quick_print', 'snmp_set_valueretrieval', 'snmp2_get', - 'snmp2_getnext', 'snmp2_real_walk', 'snmp2_set', 'snmp2_walk', - 'snmp3_get', 'snmp3_getnext', 'snmp3_real_walk', 'snmp3_set', - 'snmp3_walk', 'snmpget', 'snmpgetnext', 'snmprealwalk', 'snmpset', - 'snmpwalk', 'snmpwalkoid', 'socket_accept', 'socket_bind', - 'socket_clear_error', 'socket_close', 'socket_connect', - 'socket_create', 'socket_create_listen', 'socket_create_pair', - 'socket_getopt', 'socket_getpeername', 'socket_getsockname', - 'socket_get_option', 'socket_get_status', 'socket_iovec_add', - 'socket_iovec_alloc', 'socket_iovec_delete', 'socket_iovec_fetch', - 'socket_iovec_free', 'socket_iovec_set', 'socket_last_error', - 'socket_listen', 'socket_read', 'socket_readv', 'socket_recv', - 'socket_recvfrom', 'socket_recvmsg', 'socket_select', 'socket_send', - 'socket_sendmsg', 'socket_sendto', 'socket_setopt', 'socket_set_block', - 'socket_set_blocking', 'socket_set_nonblock', 'socket_set_option', - 'socket_set_timeout', 'socket_shutdown', 'socket_strerror', - 'socket_write', 'socket_writev', 'sort', 'soundex', 'spl_autoload', - 'spl_autoload_call', 'spl_autoload_extensions', - 'spl_autoload_functions', 'spl_autoload_register', - 'spl_autoload_unregister', 'spl_classes', 'spl_object_hash', 'split', - 'spliti', 'sprintf', 'sql_regcase', 'sqlite_array_query', - 'sqlite_busy_timeout', 'sqlite_changes', 'sqlite_close', - 'sqlite_column', 'sqlite_create_aggregate', 'sqlite_create_function', - 'sqlite_current', 'sqlite_error_string', 'sqlite_escape_string', - 'sqlite_exec', 'sqlite_factory', 'sqlite_fetch_all', - 'sqlite_fetch_array', 'sqlite_fetch_column_types', - 'sqlite_fetch_object', 'sqlite_fetch_single', 'sqlite_fetch_string', - 'sqlite_field_name', 'sqlite_has_more', 'sqlite_has_prev', - 'sqlite_last_error', 'sqlite_last_insert_rowid', 'sqlite_libencoding', - 'sqlite_libversion', 'sqlite_next', 'sqlite_num_fields', - 'sqlite_num_rows', 'sqlite_open', 'sqlite_popen', 'sqlite_prev', - 'sqlite_query', 'sqlite_rewind', 'sqlite_seek', 'sqlite_single_query', - 'sqlite_udf_decode_binary', 'sqlite_udf_encode_binary', - 'sqlite_unbuffered_query', 'sqlite_valid', 'sqrt', 'srand', 'sscanf', - 'ssh2_auth_hostbased_file', 'ssh2_auth_none', 'ssh2_auth_password', - 'ssh2_auth_pubkey_file', 'ssh2_connect', 'ssh2_exec', - 'ssh2_fetch_stream', 'ssh2_fingerprint', 'ssh2_forward_accept', - 'ssh2_forward_listen', 'ssh2_methods_negotiated', 'ssh2_poll', - 'ssh2_publickey_add', 'ssh2_publickey_init', 'ssh2_publickey_list', - 'ssh2_publickey_remove', 'ssh2_scp_recv', 'ssh2_scp_send', 'ssh2_sftp', - 'ssh2_sftp_lstat', 'ssh2_sftp_mkdir', 'ssh2_sftp_readlink', - 'ssh2_sftp_realpath', 'ssh2_sftp_rename', 'ssh2_sftp_rmdir', - 'ssh2_sftp_stat', 'ssh2_sftp_symlink', 'ssh2_sftp_unlink', - 'ssh2_shell', 'ssh2_tunnel', 'stat', 'stats_absolute_deviation', - 'stats_cdf_beta', 'stats_cdf_binomial', 'stats_cdf_cauchy', - 'stats_cdf_chisquare', 'stats_cdf_exponential', 'stats_cdf_f', - 'stats_cdf_gamma', 'stats_cdf_laplace', 'stats_cdf_logistic', - 'stats_cdf_negative_binomial', 'stats_cdf_noncentral_chisquare', - 'stats_cdf_noncentral_f', 'stats_cdf_noncentral_t', - 'stats_cdf_normal', 'stats_cdf_poisson', 'stats_cdf_t', - 'stats_cdf_uniform', 'stats_cdf_weibull', 'stats_covariance', - 'stats_dens_beta', 'stats_dens_cauchy', 'stats_dens_chisquare', - 'stats_dens_exponential', 'stats_dens_f', 'stats_dens_gamma', - 'stats_dens_laplace', 'stats_dens_logistic', 'stats_dens_normal', - 'stats_dens_pmf_binomial', 'stats_dens_pmf_hypergeometric', - 'stats_dens_pmf_negative_binomial', 'stats_dens_pmf_poisson', - 'stats_dens_t', 'stats_dens_uniform', 'stats_dens_weibull', - 'stats_harmonic_mean', 'stats_kurtosis', 'stats_rand_gen_beta', - 'stats_rand_gen_chisquare', 'stats_rand_gen_exponential', - 'stats_rand_gen_f', 'stats_rand_gen_funiform', 'stats_rand_gen_gamma', - 'stats_rand_gen_ipoisson', 'stats_rand_gen_iuniform', - 'stats_rand_gen_noncenral_f', 'stats_rand_gen_noncentral_chisquare', - 'stats_rand_gen_noncentral_t', 'stats_rand_gen_normal', - 'stats_rand_gen_t', 'stats_rand_getsd', 'stats_rand_ibinomial', - 'stats_rand_ibinomial_negative', 'stats_rand_ignlgi', - 'stats_rand_phrase_to_seeds', 'stats_rand_ranf', 'stats_rand_setall', - 'stats_skew', 'stats_standard_deviation', 'stats_stat_binomial_coef', - 'stats_stat_correlation', 'stats_stat_factorial', - 'stats_stat_independent_t', 'stats_stat_innerproduct', - 'stats_stat_paired_t', 'stats_stat_percentile', 'stats_stat_powersum', - 'stats_variance', 'strcasecmp', 'strchr', 'strcmp', 'strcoll', 'strcspn', - 'stream_bucket_append', 'stream_bucket_make_writeable', - 'stream_bucket_new', 'stream_bucket_prepend', 'stream_context_create', - 'stream_context_get_default', 'stream_context_get_options', - 'stream_context_set_default', 'stream_context_set_option', - 'stream_context_set_params', 'stream_copy_to_stream', - 'stream_encoding', 'stream_filter_append', 'stream_filter_prepend', - 'stream_filter_register', 'stream_filter_remove', - 'stream_get_contents', 'stream_get_filters', 'stream_get_line', - 'stream_get_meta_data', 'stream_get_transports', - 'stream_get_wrappers', 'stream_is_local', - 'stream_notification_callback', 'stream_register_wrapper', - 'stream_resolve_include_path', 'stream_select', 'stream_set_blocking', - 'stream_set_timeout', 'stream_set_write_buffer', - 'stream_socket_accept', 'stream_socket_client', - 'stream_socket_enable_crypto', 'stream_socket_get_name', - 'stream_socket_pair', 'stream_socket_recvfrom', - 'stream_socket_sendto', 'stream_socket_server', - 'stream_socket_shutdown', 'stream_supports_lock', - 'stream_wrapper_register', 'stream_wrapper_restore', - 'stream_wrapper_unregister', 'strftime', 'stripcslashes', 'stripos', - 'stripslashes', 'strip_tags', 'stristr', 'strlen', 'strnatcasecmp', - 'strnatcmp', 'strpbrk', 'strncasecmp', 'strncmp', 'strpos', 'strrchr', - 'strrev', 'strripos', 'strrpos', 'strspn', 'strstr', 'strtok', - 'strtolower', 'strtotime', 'strtoupper', 'strtr', 'strval', - 'str_ireplace', 'str_pad', 'str_repeat', 'str_replace', 'str_rot13', - 'str_split', 'str_shuffle', 'str_word_count', 'substr', - 'substr_compare', 'substr_count', 'substr_replace', 'svn_add', - 'svn_auth_get_parameter', 'svn_auth_set_parameter', 'svn_cat', - 'svn_checkout', 'svn_cleanup', 'svn_client_version', 'svn_commit', - 'svn_diff', 'svn_export', 'svn_fs_abort_txn', 'svn_fs_apply_text', - 'svn_fs_begin_txn2', 'svn_fs_change_node_prop', 'svn_fs_check_path', - 'svn_fs_contents_changed', 'svn_fs_copy', 'svn_fs_delete', - 'svn_fs_dir_entries', 'svn_fs_file_contents', 'svn_fs_file_length', - 'svn_fs_is_dir', 'svn_fs_is_file', 'svn_fs_make_dir', - 'svn_fs_make_file', 'svn_fs_node_created_rev', 'svn_fs_node_prop', - 'svn_fs_props_changed', 'svn_fs_revision_prop', - 'svn_fs_revision_root', 'svn_fs_txn_root', 'svn_fs_youngest_rev', - 'svn_import', 'svn_info', 'svn_log', 'svn_ls', 'svn_repos_create', - 'svn_repos_fs', 'svn_repos_fs_begin_txn_for_commit', - 'svn_repos_fs_commit_txn', 'svn_repos_hotcopy', 'svn_repos_open', - 'svn_repos_recover', 'svn_status', 'svn_update', 'symlink', - 'sys_get_temp_dir', 'syslog', 'system', 'tan', 'tanh', 'tempnam', - 'textdomain', 'thread_get', 'thread_include', 'thread_lock', - 'thread_lock_try', 'thread_mutex_destroy', 'thread_mutex_init', - 'thread_set', 'thread_start', 'thread_unlock', 'tidy_access_count', - 'tidy_clean_repair', 'tidy_config_count', 'tidy_diagnose', - 'tidy_error_count', 'tidy_get_body', 'tidy_get_config', - 'tidy_get_error_buffer', 'tidy_get_head', 'tidy_get_html', - 'tidy_get_html_ver', 'tidy_get_output', 'tidy_get_release', - 'tidy_get_root', 'tidy_get_status', 'tidy_getopt', 'tidy_is_xhtml', - 'tidy_is_xml', 'tidy_parse_file', 'tidy_parse_string', - 'tidy_repair_file', 'tidy_repair_string', 'tidy_warning_count', 'time', - 'timezone_abbreviations_list', 'timezone_identifiers_list', - 'timezone_name_from_abbr', 'timezone_name_get', 'timezone_offset_get', - 'timezone_open', 'timezone_transitions_get', 'tmpfile', - 'token_get_all', 'token_name', 'touch', 'trigger_error', - 'transliterate', 'transliterate_filters_get', 'trim', 'uasort', - 'ucfirst', 'ucwords', 'uksort', 'umask', 'uniqid', 'unixtojd', 'unlink', - 'unpack', 'unregister_tick_function', 'unserialize', 'unset', - 'urldecode', 'urlencode', 'user_error', 'use_soap_error_handler', - 'usleep', 'usort', 'utf8_decode', 'utf8_encode', 'var_dump', - 'var_export', 'variant_abs', 'variant_add', 'variant_and', - 'variant_cast', 'variant_cat', 'variant_cmp', - 'variant_date_from_timestamp', 'variant_date_to_timestamp', - 'variant_div', 'variant_eqv', 'variant_fix', 'variant_get_type', - 'variant_idiv', 'variant_imp', 'variant_int', 'variant_mod', - 'variant_mul', 'variant_neg', 'variant_not', 'variant_or', - 'variant_pow', 'variant_round', 'variant_set', 'variant_set_type', - 'variant_sub', 'variant_xor', 'version_compare', 'virtual', 'vfprintf', - 'vprintf', 'vsprintf', 'wddx_add_vars', 'wddx_deserialize', - 'wddx_packet_end', 'wddx_packet_start', 'wddx_serialize_value', - 'wddx_serialize_vars', 'win_beep', 'win_browse_file', - 'win_browse_folder', 'win_create_link', 'win_message_box', - 'win_play_wav', 'win_shell_execute', 'win32_create_service', - 'win32_delete_service', 'win32_get_last_control_message', - 'win32_ps_list_procs', 'win32_ps_stat_mem', 'win32_ps_stat_proc', - 'win32_query_service_status', 'win32_scheduler_delete_task', - 'win32_scheduler_enum_tasks', 'win32_scheduler_get_task_info', - 'win32_scheduler_run', 'win32_scheduler_set_task_info', - 'win32_set_service_status', 'win32_start_service', - 'win32_start_service_ctrl_dispatcher', 'win32_stop_service', - 'wordwrap', 'xml_error_string', 'xml_get_current_byte_index', - 'xml_get_current_column_number', 'xml_get_current_line_number', - 'xml_get_error_code', 'xml_parse', 'xml_parser_create', - 'xml_parser_create_ns', 'xml_parser_free', 'xml_parser_get_option', - 'xml_parser_set_option', 'xml_parse_into_struct', - 'xml_set_character_data_handler', 'xml_set_default_handler', - 'xml_set_element_handler', 'xml_set_end_namespace_decl_handler', - 'xml_set_external_entity_ref_handler', - 'xml_set_notation_decl_handler', 'xml_set_object', - 'xml_set_processing_instruction_handler', - 'xml_set_start_namespace_decl_handler', - 'xml_set_unparsed_entity_decl_handler', 'xmldoc', 'xmldocfile', - 'xmlrpc_decode', 'xmlrpc_decode_request', 'xmlrpc_encode', - 'xmlrpc_encode_request', 'xmlrpc_get_type', 'xmlrpc_is_fault', - 'xmlrpc_parse_method_descriptions', - 'xmlrpc_server_add_introspection_data', 'xmlrpc_server_call_method', - 'xmlrpc_server_create', 'xmlrpc_server_destroy', - 'xmlrpc_server_register_introspection_callback', - 'xmlrpc_server_register_method', 'xmlrpc_set_type', 'xmltree', - 'xmlwriter_end_attribute', 'xmlwriter_end_cdata', - 'xmlwriter_end_comment', 'xmlwriter_end_document', - 'xmlwriter_end_dtd', 'xmlwriter_end_dtd_attlist', - 'xmlwriter_end_dtd_element', 'xmlwriter_end_dtd_entity', - 'xmlwriter_end_element', 'xmlwriter_end_pi', 'xmlwriter_flush', - 'xmlwriter_full_end_element', 'xmlwriter_open_memory', - 'xmlwriter_open_uri', 'xmlwriter_output_memory', - 'xmlwriter_set_indent', 'xmlwriter_set_indent_string', - 'xmlwriter_start_attribute', 'xmlwriter_start_attribute_ns', - 'xmlwriter_start_cdata', 'xmlwriter_start_comment', - 'xmlwriter_start_document', 'xmlwriter_start_dtd', - 'xmlwriter_start_dtd_attlist', 'xmlwriter_start_dtd_element', - 'xmlwriter_start_dtd_entity', 'xmlwriter_start_element', - 'xmlwriter_start_element_ns', 'xmlwriter_start_pi', 'xmlwriter_text', - 'xmlwriter_write_attribute', 'xmlwriter_write_attribute_ns', - 'xmlwriter_write_cdata', 'xmlwriter_write_comment', - 'xmlwriter_write_dtd', 'xmlwriter_write_dtd_attlist', - 'xmlwriter_write_dtd_element', 'xmlwriter_write_dtd_entity', - 'xmlwriter_write_element', 'xmlwriter_write_element_ns', - 'xmlwriter_write_pi', 'xmlwriter_write_raw', 'xpath_eval', - 'xpath_eval_expression', 'xpath_new_context', 'xpath_register_ns', - 'xpath_register_ns_auto', 'xptr_eval', 'xptr_new_context', 'yp_all', - 'yp_cat', 'yp_errno', 'yp_err_string', 'yp_first', - 'yp_get_default_domain', 'yp_master', 'yp_match', 'yp_next', 'yp_order', - 'zend_current_obfuscation_level', 'zend_get_cfg_var', 'zend_get_id', - 'zend_loader_current_file', 'zend_loader_enabled', - 'zend_loader_file_encoded', 'zend_loader_file_licensed', - 'zend_loader_install_license', 'zend_loader_version', - 'zend_logo_guid', 'zend_match_hostmasks', 'zend_obfuscate_class_name', - 'zend_obfuscate_function_name', 'zend_optimizer_version', - 'zend_runtime_obfuscate', 'zend_version', 'zip_close', - 'zip_entry_close', 'zip_entry_compressedsize', - 'zip_entry_compressionmethod', 'zip_entry_filesize', 'zip_entry_name', - 'zip_entry_open', 'zip_entry_read', 'zip_open', 'zip_read', - 'zlib_get_coding_type' - ), - 4 => array( - 'DEFAULT_INCLUDE_PATH', 'DIRECTORY_SEPARATOR', 'E_ALL', - 'E_COMPILE_ERROR', 'E_COMPILE_WARNING', 'E_CORE_ERROR', - 'E_CORE_WARNING', 'E_ERROR', 'E_NOTICE', 'E_PARSE', 'E_STRICT', - 'E_USER_ERROR', 'E_USER_NOTICE', 'E_USER_WARNING', 'E_WARNING', - 'ENT_COMPAT', 'ENT_QUOTES', 'ENT_NOQUOTES', - 'false', 'null', 'PEAR_EXTENSION_DIR', 'PEAR_INSTALL_DIR', - 'PHP_BINDIR', 'PHP_CONFIG_FILE_PATH', 'PHP_DATADIR', - 'PHP_EXTENSION_DIR', 'PHP_LIBDIR', - 'PHP_LOCALSTATEDIR', 'PHP_OS', - 'PHP_OUTPUT_HANDLER_CONT', 'PHP_OUTPUT_HANDLER_END', - 'PHP_OUTPUT_HANDLER_START', 'PHP_SYSCONFDIR', - 'PHP_VERSION', 'true', '__CLASS__', '__FILE__', '__FUNCTION__', - '__LINE__', '__METHOD__' - ) - ), - 'SYMBOLS' => array( - 1 => array( - '<' . '%', '<' . '%=', '%' . '>', '<' . '?', '<' . '?=', '?' . '>' - ), - 0 => array( - '(', ')', '[', ']', '{', '}', - '!', '@', '%', '&', '|', '/', - '<', '>', - '=', '-', '+', '*', - '.', ':', ',', ';' - ) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #990000;', - 4 => 'color: #009900; font-weight: bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 2 => 'color: #666666; font-style: italic;', - 3 => 'color: #0000cc; font-style: italic;', - 4 => 'color: #009933; font-style: italic;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - 1 => 'color: #000099; font-weight: bold;', - 2 => 'color: #660099; font-weight: bold;', - 3 => 'color: #660099; font-weight: bold;', - 4 => 'color: #006699; font-weight: bold;', - 5 => 'color: #006699; font-weight: bold; font-style: italic;', - 6 => 'color: #009933; font-weight: bold;', - 'HARD' => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #0000ff;', - 'HARD' => 'color: #0000ff;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;', - GESHI_NUMBER_OCT_PREFIX => 'color: #208080;', - GESHI_NUMBER_HEX_PREFIX => 'color: #208080;', - GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;', - ), - 'METHODS' => array( - 1 => 'color: #004000;', - 2 => 'color: #004000;' - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;', - 1 => 'color: #000000; font-weight: bold;' - ), - 'REGEXPS' => array( - 0 => 'color: #000088;' - ), - 'SCRIPT' => array( - 0 => '', - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => 'http://www.php.net/{FNAMEL}', - 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '->', - 2 => '::' - ), - 'REGEXPS' => array( - //Variables - 0 => "[\\$]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*" - ), - 'STRICT_MODE_APPLIES' => GESHI_MAYBE, - 'SCRIPT_DELIMITERS' => array( - 0 => array( - '<' . '?php' => '?' . '>' - ), - 1 => array( - '<' . '?' => '?' . '>' - ), - 2 => array( - '<' . '%' => '%' . '>' - ), - 3 => array( - '' - ), - 4 => "/(?P<\\?(?>php\b)?)(?:" . - "(?>[^\"'?\\/<]+)|" . - "\\?(?!>)|" . - "(?>'(?>[^'\\\\]|\\\\'|\\\\\\\|\\\\)*')|" . - "(?>\"(?>[^\"\\\\]|\\\\\"|\\\\\\\\|\\\\)*\")|" . - "(?>\\/\\*(?>[^\\*]|(?!\\*\\/)\\*)*\\*\\/)|" . - "\\/\\/(?>.*?(?:\\?>|$))|" . - "#(?>.*?(?:\\?>|$))|" . - "\\/(?=[^*\\/])|" . - "<(?!<<)|" . - "<<<(?P\w+)\s.*?\s\k" . - ")*?(?P\\?>|\Z)/sm", - 5 => "/(?P<%)(?:" . - "(?>[^\"'%\\/<]+)|" . - "%(?!>)|" . - "(?>'(?>[^'\\\\]|\\\\'|\\\\\\\|\\\\)*')|" . - "(?>\"(?>[^\\\"\\\\]|\\\\\"|\\\\\\\\|\\\\)*\")|" . - "(?>\\/\\*(?>[^\\*]|(?!\\*\\/)\\*)*\\*\\/)|" . - "\\/\\/(?>.*?(?:%>|$))|" . - "#(?>.*?(?:%>|$))|" . - "\\/(?=[^*\\/])|" . - "<(?!<<)|" . - "<<<(?P\w+)\s.*?\s\k" . - ")*?(?P%>|\Z)/sm", - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => true, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true - ), - 'TAB_WIDTH' => 4 -); diff --git a/includes/geshi/prose.php b/includes/geshi/prose.php deleted file mode 100644 index f98be25..0000000 --- a/includes/geshi/prose.php +++ /dev/null @@ -1,82 +0,0 @@ - 'Text', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array(), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array(), - 'SYMBOLS' => array(), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false - ), - 'STYLES' => array( - 'KEYWORDS' => array(), - 'COMMENTS' => array(), - 'ESCAPE_CHAR' => array(), - 'BRACKETS' => array(), - 'STRINGS' => array(), - 'NUMBERS' => array(), - 'METHODS' => array(), - 'SYMBOLS' => array(), - 'SCRIPT' => array(), - 'REGEXPS' => array() - ), - 'URLS' => array(), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array(), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array(), - 'PARSER_CONTROL' => array( - 'ENABLE_FLAGS' => array( - 'ALL' => GESHI_NEVER - ) - ) -); diff --git a/includes/geshi/python.php b/includes/geshi/python.php deleted file mode 100644 index 5ecf062..0000000 --- a/includes/geshi/python.php +++ /dev/null @@ -1,237 +0,0 @@ - 'Python', - 'COMMENT_SINGLE' => array(1 => '#'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - //Longest quotemarks ALWAYS first - 'QUOTEMARKS' => array('"""', "'''", '"', "'"), - 'ESCAPE_CHAR' => '\\', - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_BIN_PREFIX_0B | - GESHI_NUMBER_OCT_PREFIX_0O | GESHI_NUMBER_HEX_PREFIX | - GESHI_NUMBER_FLT_NONSCI | GESHI_NUMBER_FLT_NONSCI_F | - GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, - 'KEYWORDS' => array( - - /* - ** Set 1: reserved words - ** http://python.org/doc/current/ref/keywords.html - */ - 1 => array( - 'and', 'del', 'for', 'is', 'raise', 'assert', 'elif', 'from', 'lambda', 'return', 'break', - 'else', 'global', 'not', 'try', 'class', 'except', 'if', 'or', 'while', 'continue', 'exec', - 'import', 'pass', 'yield', 'def', 'finally', 'in', 'print', 'with', 'as', 'nonlocal' - ), - - /* - ** Set 2: builtins - ** http://python.org/doc/current/lib/built-in-funcs.html - */ - 2 => array( - '__import__', 'abs', 'basestring', 'bool', 'callable', 'chr', 'classmethod', 'cmp', - 'compile', 'complex', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'execfile', - 'file', 'filter', 'float', 'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help', - 'hex', 'id', 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', 'list', 'locals', - 'long', 'map', 'max', 'min', 'object', 'oct', 'open', 'ord', 'pow', 'property', 'range', - 'raw_input', 'reduce', 'reload', 'reversed', 'round', 'set', 'setattr', 'slice', - 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'unichr', 'unicode', - 'vars', 'xrange', 'zip', - // Built-in constants: http://python.org/doc/current/lib/node35.html - 'False', 'True', 'None', 'NotImplemented', 'Ellipsis', - // Built-in Exceptions: http://python.org/doc/current/lib/module-exceptions.html - 'Exception', 'StandardError', 'ArithmeticError', 'LookupError', 'EnvironmentError', - 'AssertionError', 'AttributeError', 'EOFError', 'FloatingPointError', 'IOError', - 'ImportError', 'IndexError', 'KeyError', 'KeyboardInterrupt', 'MemoryError', 'NameError', - 'NotImplementedError', 'OSError', 'OverflowError', 'ReferenceError', 'RuntimeError', - 'StopIteration', 'SyntaxError', 'SystemError', 'SystemExit', 'TypeError', - 'UnboundlocalError', 'UnicodeError', 'UnicodeEncodeError', 'UnicodeDecodeError', - 'UnicodeTranslateError', 'ValueError', 'WindowsError', 'ZeroDivisionError', 'Warning', - 'UserWarning', 'DeprecationWarning', 'PendingDeprecationWarning', 'SyntaxWarning', - 'RuntimeWarning', 'FutureWarning', - // self: this is a common python convention (but not a reserved word) - 'self', - // other - 'any', 'all' - ), - - /* - ** Set 3: standard library - ** http://python.org/doc/current/lib/modindex.html - */ - 3 => array( - '__builtin__', '__future__', '__main__', '_winreg', 'aifc', 'AL', 'al', 'anydbm', - 'array', 'asynchat', 'asyncore', 'atexit', 'audioop', 'base64', 'BaseHTTPServer', - 'Bastion', 'binascii', 'binhex', 'bisect', 'bsddb', 'bz2', 'calendar', 'cd', 'cgi', - 'CGIHTTPServer', 'cgitb', 'chunk', 'cmath', 'cmd', 'code', 'codecs', 'codeop', - 'collections', 'colorsys', 'commands', 'compileall', 'compiler', - 'ConfigParser', 'Cookie', 'cookielib', 'copy', 'copy_reg', 'cPickle', 'crypt', - 'cStringIO', 'csv', 'curses', 'datetime', 'dbhash', 'dbm', 'decimal', 'DEVICE', - 'difflib', 'dircache', 'dis', 'distutils', 'dl', 'doctest', 'DocXMLRPCServer', 'dumbdbm', - 'dummy_thread', 'dummy_threading', 'email', 'encodings', 'errno', 'exceptions', 'fcntl', - 'filecmp', 'fileinput', 'FL', 'fl', 'flp', 'fm', 'fnmatch', 'formatter', 'fpectl', - 'fpformat', 'ftplib', 'gc', 'gdbm', 'getopt', 'getpass', 'gettext', 'GL', 'gl', 'glob', - 'gopherlib', 'grp', 'gzip', 'heapq', 'hmac', 'hotshot', 'htmlentitydefs', 'htmllib', - 'HTMLParser', 'httplib', 'imageop', 'imaplib', 'imgfile', 'imghdr', 'imp', 'inspect', - 'itertools', 'jpeg', 'keyword', 'linecache', 'locale', 'logging', 'mailbox', 'mailcap', - 'marshal', 'math', 'md5', 'mhlib', 'mimetools', 'mimetypes', 'MimeWriter', 'mimify', - 'mmap', 'msvcrt', 'multifile', 'mutex', 'netrc', 'new', 'nis', 'nntplib', 'operator', - 'optparse', 'os', 'ossaudiodev', 'parser', 'pdb', 'pickle', 'pickletools', 'pipes', - 'pkgutil', 'platform', 'popen2', 'poplib', 'posix', 'posixfile', 'pprint', 'profile', - 'pstats', 'pty', 'pwd', 'py_compile', 'pyclbr', 'pydoc', 'Queue', 'quopri', 'random', - 're', 'readline', 'repr', 'resource', 'rexec', 'rfc822', 'rgbimg', 'rlcompleter', - 'robotparser', 'sched', 'ScrolledText', 'select', 'sets', 'sgmllib', 'sha', 'shelve', - 'shlex', 'shutil', 'signal', 'SimpleHTTPServer', 'SimpleXMLRPCServer', 'site', 'smtpd', - 'smtplib', 'sndhdr', 'socket', 'SocketServer', 'stat', 'statcache', 'statvfs', 'string', - 'StringIO', 'stringprep', 'struct', 'subprocess', 'sunau', 'SUNAUDIODEV', 'sunaudiodev', - 'symbol', 'sys', 'syslog', 'tabnanny', 'tarfile', 'telnetlib', 'tempfile', 'termios', - 'test', 'textwrap', 'thread', 'threading', 'time', 'timeit', 'Tix', 'Tkinter', 'token', - 'tokenize', 'traceback', 'tty', 'turtle', 'types', 'unicodedata', 'unittest', 'urllib2', - 'urllib', 'urlparse', 'user', 'UserDict', 'UserList', 'UserString', 'uu', 'warnings', - 'wave', 'weakref', 'webbrowser', 'whichdb', 'whrandom', 'winsound', 'xdrlib', 'xml', - 'xmllib', 'xmlrpclib', 'zipfile', 'zipimport', 'zlib', - // Python 3.0 - 'bytes', 'bytearray' - ), - - /* - ** Set 4: special methods - ** http://python.org/doc/current/ref/specialnames.html - */ - 4 => array( - /* - // Iterator types: http://python.org/doc/current/lib/typeiter.html - '__iter__', 'next', - // String types: http://python.org/doc/current/lib/string-methods.html - 'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs', - 'find', 'index', 'isalnum', 'isalpha', 'isdigit', 'islower', 'isspace', 'istitle', - 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'replace', 'rfind', 'rindex', 'rjust', - 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', - 'translate', 'upper', 'zfill', - */ - // Basic customization: http://python.org/doc/current/ref/customization.html - '__new__', '__init__', '__del__', '__repr__', '__str__', - '__lt__', '__le__', '__eq__', '__ne__', '__gt__', '__ge__', '__cmp__', '__rcmp__', - '__hash__', '__nonzero__', '__unicode__', '__dict__', - // Attribute access: http://python.org/doc/current/ref/attribute-access.html - '__setattr__', '__delattr__', '__getattr__', '__getattribute__', '__get__', '__set__', - '__delete__', '__slots__', - // Class creation, callable objects - '__metaclass__', '__call__', - // Container types: http://python.org/doc/current/ref/sequence-types.html - '__len__', '__getitem__', '__setitem__', '__delitem__', '__iter__', '__contains__', - '__getslice__', '__setslice__', '__delslice__', - // Numeric types: http://python.org/doc/current/ref/numeric-types.html - '__abs__', '__add__', '__and__', '__coerce__', '__div__', '__divmod__', '__float__', - '__hex__', '__iadd__', '__isub__', '__imod__', '__idiv__', '__ipow__', '__iand__', - '__ior__', '__ixor__', '__ilshift__', '__irshift__', '__invert__', '__int__', - '__long__', '__lshift__', - '__mod__', '__mul__', '__neg__', '__oct__', '__or__', '__pos__', '__pow__', - '__radd__', '__rdiv__', '__rdivmod__', '__rmod__', '__rpow__', '__rlshift__', '__rrshift__', - '__rshift__', '__rsub__', '__rmul__', '__rand__', '__rxor__', '__ror__', - '__sub__', '__xor__' - ) - ), - 'SYMBOLS' => array( - '<', '>', '=', '!', '<=', '>=', //·comparison·operators - '~', '@', //·unary·operators - ';', ',' //·statement·separator - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #ff7700;font-weight:bold;', // Reserved - 2 => 'color: #008000;', // Built-ins + self - 3 => 'color: #dc143c;', // Standard lib - 4 => 'color: #0000cd;' // Special methods - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: black;' - ), - 'STRINGS' => array( - 0 => 'color: #483d8b;' - ), - 'NUMBERS' => array( - 0 => 'color: #ff4500;' - ), - 'METHODS' => array( - 1 => 'color: black;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'REGEXPS' => array(), - 'SCRIPT' => array() - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array(), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array() -); diff --git a/includes/geshi/text.php b/includes/geshi/text.php deleted file mode 100644 index f98be25..0000000 --- a/includes/geshi/text.php +++ /dev/null @@ -1,82 +0,0 @@ - 'Text', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array(), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array(), - 'SYMBOLS' => array(), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false - ), - 'STYLES' => array( - 'KEYWORDS' => array(), - 'COMMENTS' => array(), - 'ESCAPE_CHAR' => array(), - 'BRACKETS' => array(), - 'STRINGS' => array(), - 'NUMBERS' => array(), - 'METHODS' => array(), - 'SYMBOLS' => array(), - 'SCRIPT' => array(), - 'REGEXPS' => array() - ), - 'URLS' => array(), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array(), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array(), - 'PARSER_CONTROL' => array( - 'ENABLE_FLAGS' => array( - 'ALL' => GESHI_NEVER - ) - ) -); diff --git a/paste.php b/paste.php index 022b4fd..879059a 100644 --- a/paste.php +++ b/paste.php @@ -168,27 +168,6 @@ if ($paste_code === "pastedown") { $hl = new Highlighter(); $highlighted = $hl->highlight($paste_code == 'text' ? 'plaintext' : $paste_code, $p_content)->value; $lines = HighlightUtilities\splitCodeIntoArray($highlighted); - //$highlight = new Highlighter(); - //$p_content = $highlight->highlight($paste_code, $p_content)->value; - - //$p_content = linkify($p_content); - - $geshi = new GeSHi($p_content, $paste_code, 'includes/geshi/'); - - $geshi->enable_classes(); - $geshi->set_header_type(GESHI_HEADER_DIV); - $geshi->set_line_style('color: #aaaaaa; width:auto;'); - $geshi->set_code_style('color: #757584;'); - if (count($highlight)) { - $geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS); - $geshi->highlight_lines_extra($highlight); - $geshi->set_highlight_lines_extra_style('color:#399bff;background:rgba(38,92,255,0.14);'); - } else { - $geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS, 2); - } - $p_content = $geshi->parse_code(); - $style = $geshi->get_stylesheet(); - $ges_style = ''; } // Embed view after highlighting is applied so that $p_code is syntax highlighted as it should be. diff --git a/theme/bulma/css/paste.css b/theme/bulma/css/paste.css index 6ad42ee..de9a08c 100644 --- a/theme/bulma/css/paste.css +++ b/theme/bulma/css/paste.css @@ -15,13 +15,13 @@ .theme-switch-wrapper { display: flex; align-items: center; +} em { margin-left: 10px; font-size: 1rem; } -} .theme-switch { display: inline-block; height: 34px; @@ -134,3 +134,7 @@ img [alt="www.000webhost.com"] { .td-center { text-align: center !important; } + +.green .hljs-comment { + color: #789922; +} \ No newline at end of file diff --git a/theme/bulma/view.php b/theme/bulma/view.php index d9259a4..82852fe 100644 --- a/theme/bulma/view.php +++ b/theme/bulma/view.php @@ -2,40 +2,48 @@ @@ -99,12 +104,12 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was transition: visibility 0s 1.25s, opacity 1.25s linear; } - .stop-scrolling { + #stop-scrolling { height: 100%; overflow: hidden; } -
    +
    @@ -251,14 +256,12 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was $line): $line = trim($line); ?>
  • -
    +
  • -
    -