File geshi/geshi/cpp-qt.php
Last commit: Fri Nov 23 00:12:00 2007 +0100 dankert Farbige Darstellung von Code-Bl?cken mit Hilfe der Bibliothek GESHI.
1 <?php 2 /************************************************************************************* 3 * cpp.php 4 * ------- 5 * Author: Iulian M 6 * Copyright: (c) 2006 Iulian M 7 * Release Version: 1.0.7.20 8 * Date Started: 2004/09/27 9 * 10 * C++ language file for GeSHi, with QT extensions. 11 * 12 * CHANGES 13 * ------- 14 * 15 * TODO 16 * ---- 17 * 18 ************************************************************************************* 19 * 20 * This file is part of GeSHi. 21 * 22 * GeSHi is free software; you can redistribute it and/or modify 23 * it under the terms of the GNU General Public License as published by 24 * the Free Software Foundation; either version 2 of the License, or 25 * (at your option) any later version. 26 * 27 * GeSHi is distributed in the hope that it will be useful, 28 * but WITHOUT ANY WARRANTY; without even the implied warranty of 29 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 30 * GNU General Public License for more details. 31 * 32 * You should have received a copy of the GNU General Public License 33 * along with GeSHi; if not, write to the Free Software 34 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 35 * 36 ************************************************************************************/ 37 38 $language_data = array ( 39 'LANG_NAME' => 'C++ (QT)', 40 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), 41 'COMMENT_MULTI' => array('/*' => '*/'), 42 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 43 'QUOTEMARKS' => array("'", '"'), 44 'ESCAPE_CHAR' => '\\', 45 'KEYWORDS' => array( 46 1 => array( 47 'case', 'continue', 'default', 'do', 'else', 'for', 'goto', 'if', 'return', 48 'switch', 'while' 49 ), 50 2 => array( 51 'NULL', 'false', 'break', 'true', 'enum', 'errno', 'EDOM', 52 'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG', 53 'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG', 54 'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP', 55 'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP', 56 'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN', 57 'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN', 58 'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT', 59 'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR', 60 'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam', 'NULL', 61 'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr', 62 'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC', 63 'virtual', 'public', 'private', 'protected', 'template', 'using', 'namespace', 64 'try', 'catch', 'inline', 'dynamic_cast', 'const_cast', 'reinterpret_cast', 65 'static_cast', 'explicit', 'friend', 'wchar_t', 'typename', 'typeid', 'class' , 66 'foreach','connect', 'Q_OBJECT' , 'slots' , 'signals' 67 ), 68 3 => array( 69 'cin', 'cerr', 'clog', 'cout', 'delete', 'new', 'this', 70 'printf', 'fprintf', 'snprintf', 'sprintf', 'assert', 71 'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint', 72 'ispunct', 'isspace', 'ispunct', 'isupper', 'isxdigit', 'tolower', 'toupper', 73 'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp', 74 'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2', 75 'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp', 'asin', 'acos', 'atan', 'atan2', 76 'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen', 77 'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf', 78 'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf', 79 'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc', 80 'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind', 81 'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs', 82 'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc', 83 'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv', 84 'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat', 85 'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn', 86 'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy', 87 'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime', 88 'asctime', 'ctime', 'gmtime', 'localtime', 'strftime' 89 ), 90 4 => array( 91 'auto', 'bool', 'char', 'const', 'double', 'float', 'int', 'long', 'longint', 92 'register', 'short', 'shortint', 'signed', 'static', 'struct', 93 'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf', 94 'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t', 95 'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm', 96 ), 97 5 => array( 98 'QAbstractButton','QDir','QIntValidator','QRegExpValidator','QTabWidget','QAbstractEventDispatcher', 99 'QDirectPainter','QIODevice','QRegion','QTcpServer','QAbstractExtensionFactory','QDirModel', 100 'QItemDelegate','QResizeEvent','QTcpSocket','QAbstractExtensionManager','QDockWidget', 101 'QItemEditorCreatorBase','QResource','QTemporaryFile','QAbstractFileEngine','QDomAttr', 102 'QItemEditorFactory','QRubberBand','QTestEventList','QAbstractFileEngineHandler','QDomCDATASection', 103 'QItemSelection','QScreen','QTextBlock','QAbstractFormBuilder','QDomCharacterData','QItemSelectionModel', 104 'QScreenCursor','QTextBlockFormat','QAbstractGraphicsShapeItem','QDomComment','QItemSelectionRange', 105 'QScreenDriverFactory','QTextBlockGroup','QAbstractItemDelegate','QDomDocument','QKbdDriverFactory', 106 'QScreenDriverPlugin','QTextBlockUserData','QAbstractItemModel','QDomDocumentFragment','QKbdDriverPlugin', 107 'QScrollArea','QTextBrowser','QAbstractItemView','QDomDocumentType','QKeyEvent','QScrollBar', 108 'QTextCharFormat','QAbstractListModel','QDomElement','QKeySequence','QSemaphore','QTextCodec', 109 'QAbstractPrintDialog','QDomEntity','QLabel','QSessionManager','QTextCodecPlugin','QAbstractProxyModel', 110 'QDomEntityReference','QLatin1Char','QSet','QTextCursor','QAbstractScrollArea','QDomImplementation', 111 'QLatin1String','QSetIterator','QTextDecoder','QAbstractSlider','QDomNamedNodeMap','QLayout','QSettings', 112 'QTextDocument','QAbstractSocket','QDomNode','QLayoutItem','QSharedData','QTextDocumentFragment', 113 'QAbstractSpinBox','QDomNodeList','QLCDNumber','QSharedDataPointer','QTextEdit','QAbstractTableModel', 114 'QDomNotation','QLibrary','QShortcut','QTextEncoder','QAbstractTextDocumentLayout', 115 'QDomProcessingInstruction','QLibraryInfo','QShortcutEvent','QTextFormat','QAccessible','QDomText', 116 'QLine','QShowEvent','QTextFragment','QAccessibleBridge','QDoubleSpinBox','QLinearGradient', 117 'QSignalMapper','QTextFrame','QAccessibleBridgePlugin','QDoubleValidator','QLineEdit','QSignalSpy', 118 'QTextFrameFormat','QAccessibleEvent','QDrag','QLineF','QSize','QTextImageFormat','QAccessibleInterface', 119 'QDragEnterEvent','QLinkedList','QSizeF','QTextInlineObject','QAccessibleObject','QDragLeaveEvent', 120 'QLinkedListIterator','QSizeGrip','QTextLayout','QAccessiblePlugin','QDragMoveEvent','QLinuxFbScreen', 121 'QSizePolicy','QTextLength','QAccessibleWidget','QDropEvent','QList','QSlider','QTextLine','QAction', 122 'QDynamicPropertyChangeEvent','QListIterator','QSocketNotifier','QTextList','QActionEvent','QErrorMessage', 123 'QListView','QSortFilterProxyModel','QTextListFormat','QActionGroup','QEvent','QListWidget','QSound', 124 'QTextObject','QApplication','QEventLoop','QListWidgetItem','QSpacerItem','QTextOption','QAssistantClient', 125 'QExtensionFactory','QLocale','QSpinBox','QTextStream','QAxAggregated','QExtensionManager', 126 'QMacPasteboardMime','QSplashScreen','QTextTable','QAxBase','QFile','QMacStyle','QSplitter', 127 'QTextTableCell','QAxBindable','QFileDialog','QMainWindow','QSplitterHandle','QTextTableFormat', 128 'QAxFactory','QFileIconProvider','QMap','QSqlDatabase','QThread','QAxObject','QFileInfo','QMapIterator', 129 'QSqlDriver','QThreadStorage','QAxScript','QFileOpenEvent','QMatrix','QSqlDriverCreator','QTime', 130 'QAxScriptEngine','QFileSystemWatcher','QMenu','QSqlDriverCreatorBase','QTimeEdit','QAxScriptManager', 131 'QFlag','QMenuBar','QSqlDriverPlugin','QTimeLine','QAxWidget','QFlags','QMessageBox','QSqlError','QTimer', 132 'QBasicTimer','QFocusEvent','QMetaClassInfo','QSqlField','QTimerEvent','QBitArray','QFocusFrame', 133 'QMetaEnum','QSqlIndex','QToolBar','QBitmap','QFont','QMetaMethod','QSqlQuery','QToolBox','QBoxLayout', 134 'QFontComboBox','QMetaObject','QSqlQueryModel','QToolButton','QBrush','QFontDatabase','QMetaProperty', 135 'QSqlRecord','QToolTip','QBuffer','QFontDialog','QMetaType','QSqlRelation','QTransformedScreen', 136 'QButtonGroup','QFontInfo','QMimeData','QSqlRelationalDelegate','QTranslator','QByteArray','QFontMetrics', 137 'QMimeSource','QSqlRelationalTableModel','QTreeView','QByteArrayMatcher','QFontMetricsF','QModelIndex', 138 'QSqlResult','QTreeWidget','QCache','QFormBuilder','QMotifStyle','QSqlTableModel','QTreeWidgetItem', 139 'QCalendarWidget','QFrame','QMouseDriverFactory','QStack','QTreeWidgetItemIterator','QCDEStyle', 140 'QFSFileEngine','QMouseDriverPlugin','QStackedLayout','QUdpSocket','QChar','QFtp','QMouseEvent', 141 'QStackedWidget','QUiLoader','QCheckBox','QGenericArgument','QMoveEvent','QStandardItem','QUndoCommand', 142 'QChildEvent','QGenericReturnArgument','QMovie','QStandardItemEditorCreator','QUndoGroup', 143 'QCleanlooksStyle','QGLColormap','QMultiHash','QStandardItemModel','QUndoStack','QClipboard', 144 'QGLContext','QMultiMap','QStatusBar','QUndoView','QCloseEvent','QGLFormat','QMutableHashIterator', 145 'QStatusTipEvent','QUrl','QColor','QGLFramebufferObject','QMutableLinkedListIterator','QString', 146 'QUrlInfo','QColorDialog','QGLPixelBuffer','QMutableListIterator','QStringList','QUuid','QColormap', 147 'QGLWidget','QMutableMapIterator','QStringListModel','QValidator','QComboBox','QGradient', 148 'QMutableSetIterator','QStringMatcher','QVariant','QCommonStyle','QGraphicsEllipseItem', 149 'QMutableVectorIterator','QStyle','QVarLengthArray','QCompleter','QGraphicsItem','QMutex', 150 'QStyleFactory','QVBoxLayout','QConicalGradient','QGraphicsItemAnimation','QMutexLocker', 151 'QStyleHintReturn','QVector','QContextMenuEvent','QGraphicsItemGroup','QNetworkAddressEntry', 152 'QStyleHintReturnMask','QVectorIterator','QCopChannel','QGraphicsLineItem','QNetworkInterface', 153 'QStyleOption','QVFbScreen','QCoreApplication','QGraphicsPathItem','QNetworkProxy','QStyleOptionButton', 154 'QVNCScreen','QCursor','QGraphicsPixmapItem','QObject','QStyleOptionComboBox','QWaitCondition', 155 'QCustomRasterPaintDevice','QGraphicsPolygonItem','QObjectCleanupHandler','QStyleOptionComplex', 156 'QWhatsThis','QDataStream','QGraphicsRectItem','QPageSetupDialog','QStyleOptionDockWidget', 157 'QWhatsThisClickedEvent','QDataWidgetMapper','QGraphicsScene','QPaintDevice','QStyleOptionFocusRect', 158 'QWheelEvent','QDate','QGraphicsSceneContextMenuEvent','QPaintEngine','QStyleOptionFrame','QWidget', 159 'QDateEdit','QGraphicsSceneEvent','QPaintEngineState','QStyleOptionFrameV2','QWidgetAction','QDateTime', 160 'QGraphicsSceneHoverEvent','QPainter','QStyleOptionGraphicsItem','QWidgetItem','QDateTimeEdit', 161 'QGraphicsSceneMouseEvent','QPainterPath','QStyleOptionGroupBox','QWindowsMime','QDBusAbstractAdaptor', 162 'QGraphicsSceneWheelEvent','QPainterPathStroker','QStyleOptionHeader','QWindowsStyle', 163 'QDBusAbstractInterface','QGraphicsSimpleTextItem','QPaintEvent','QStyleOptionMenuItem', 164 'QWindowStateChangeEvent','QDBusArgument','QGraphicsSvgItem','QPair','QStyleOptionProgressBar', 165 'QWindowsXPStyle','QDBusConnection','QGraphicsTextItem','QPalette','QStyleOptionProgressBarV2', 166 'QWorkspace','QDBusConnectionInterface','QGraphicsView','QPen','QStyleOptionQ3DockWindow','QWriteLocker', 167 'QDBusError','QGridLayout','QPersistentModelIndex','QStyleOptionQ3ListView','QWSCalibratedMouseHandler', 168 'QDBusInterface','QGroupBox','QPicture','QStyleOptionQ3ListViewItem','QWSClient','QDBusMessage','QHash', 169 'QPictureFormatPlugin','QStyleOptionRubberBand','QWSEmbedWidget','QDBusObjectPath','QHashIterator', 170 'QPictureIO','QStyleOptionSizeGrip','QWSEvent','QDBusReply','QHBoxLayout','QPixmap','QStyleOptionSlider', 171 'QWSInputMethod','QDBusServer','QHeaderView','QPixmapCache','QStyleOptionSpinBox','QWSKeyboardHandler', 172 'QDBusSignature','QHelpEvent','QPlastiqueStyle','QStyleOptionTab','QWSMouseHandler','QDBusVariant', 173 'QHideEvent','QPluginLoader','QStyleOptionTabBarBase','QWSPointerCalibrationData','QDecoration', 174 'QHostAddress','QPoint','QStyleOptionTabV2','QWSScreenSaver','QDecorationFactory','QHostInfo','QPointer', 175 'QStyleOptionTabWidgetFrame','QWSServer','QDecorationPlugin','QHoverEvent','QPointF','QStyleOptionTitleBar', 176 'QWSTslibMouseHandler','QDesignerActionEditorInterface','QHttp','QPolygon','QStyleOptionToolBar','QWSWindow', 177 'QDesignerContainerExtension','QHttpHeader','QPolygonF','QStyleOptionToolBox','QWSWindowSurface', 178 'QDesignerCustomWidgetCollectionInterface','QHttpRequestHeader','QPrintDialog','QStyleOptionToolButton', 179 'QX11EmbedContainer','QDesignerCustomWidgetInterface','QHttpResponseHeader','QPrintEngine', 180 'QStyleOptionViewItem','QX11EmbedWidget','QDesignerFormEditorInterface','QIcon','QPrinter', 181 'QStyleOptionViewItemV2','QX11Info','QDesignerFormWindowCursorInterface','QIconDragEvent','QProcess', 182 'QStylePainter','QXmlAttributes','QDesignerFormWindowInterface','QIconEngine','QProgressBar', 183 'QStylePlugin','QXmlContentHandler','QDesignerFormWindowManagerInterface','QIconEnginePlugin', 184 'QProgressDialog','QSvgRenderer','QXmlDeclHandler','QDesignerMemberSheetExtension','QImage', 185 'QProxyModel','QSvgWidget','QXmlDefaultHandler','QDesignerObjectInspectorInterface','QImageIOHandler', 186 'QPushButton','QSyntaxHighlighter','QXmlDTDHandler','QDesignerPropertyEditorInterface','QImageIOPlugin', 187 'QQueue','QSysInfo','QXmlEntityResolver','QDesignerPropertySheetExtension','QImageReader','QRadialGradient', 188 'QSystemLocale','QXmlErrorHandler','QDesignerTaskMenuExtension','QImageWriter','QRadioButton', 189 'QSystemTrayIcon','QXmlInputSource','QDesignerWidgetBoxInterface','QInputContext','QRasterPaintEngine', 190 'QTabBar','QXmlLexicalHandler','QDesktopServices','QInputContextFactory','QReadLocker','QTabletEvent', 191 'QXmlLocator','QDesktopWidget','QInputContextPlugin','QReadWriteLock','QTableView','QXmlNamespaceSupport', 192 'QDial','QInputDialog','QRect','QTableWidget','QXmlParseException','QDialog','QInputEvent','QRectF', 193 'QTableWidgetItem','QXmlReader','QDialogButtonBox','QInputMethodEvent','QRegExp', 194 'QTableWidgetSelectionRange','QXmlSimpleReader' 195 ) 196 ), 197 'SYMBOLS' => array( 198 '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':' 199 ), 200 'CASE_SENSITIVE' => array( 201 GESHI_COMMENTS => true, 202 1 => false, 203 2 => false, 204 3 => false, 205 4 => false, 206 5 => true, 207 ), 208 'STYLES' => array( 209 'KEYWORDS' => array( 210 1 => 'color: #0000ff;', 211 2 => 'color: #0000ff;', 212 3 => 'color: #0000dd;', 213 4 => 'color: #0000ff;', 214 5 => 'color: #0000ee;' 215 ), 216 'COMMENTS' => array( 217 1 => 'color: #ff0000;', 218 2 => 'color: #339900;', 219 'MULTI' => 'color: #ff0000; font-style: italic;' 220 ), 221 'ESCAPE_CHAR' => array( 222 0 => 'color: #666666; font-weight: bold;' 223 ), 224 'BRACKETS' => array( 225 0 => 'color: #000000;' 226 ), 227 'STRINGS' => array( 228 0 => 'color: #666666;' 229 ), 230 'NUMBERS' => array( 231 0 => 'color: #0000dd;' 232 ), 233 'METHODS' => array( 234 1 => 'color: #00eeff;', 235 2 => 'color: #00eeff;' 236 ), 237 'SYMBOLS' => array( 238 0 => 'color: #000000;' 239 ), 240 'REGEXPS' => array( 241 ), 242 'SCRIPT' => array( 243 ) 244 ), 245 'URLS' => array( 246 1 => '', 247 2 => '', 248 3 => '', 249 4 => '', 250 5 => 'http://doc.trolltech.com/4.2/{FNAME}.html' 251 ), 252 'OOLANG' => true, 253 'OBJECT_SPLITTERS' => array( 254 1 => '.', 255 2 => '::' 256 ), 257 'REGEXPS' => array( 258 ), 259 'STRICT_MODE_APPLIES' => GESHI_NEVER, 260 'SCRIPT_DELIMITERS' => array( 261 ), 262 'HIGHLIGHT_STRICT_BLOCK' => array( 263 ), 264 'TAB_WIDTH' => 4 265 ); 266 267 ?>
Downloadgeshi/geshi/cpp-qt.php
History Fri, 23 Nov 2007 00:12:00 +0100 dankert Farbige Darstellung von Code-Bl?cken mit Hilfe der Bibliothek GESHI.