From 537c47769887c46caf3abf8daa7d7328d2326165 Mon Sep 17 00:00:00 2001 From: Blake Date: Sun, 10 Nov 2013 13:03:09 +1300 Subject: [PATCH] PAWN GeSHi support SA:MP-flavoured PAWN support --- handlers/geshi/geshi/pawn.php | 553 ++++++++++++++++++++++++++++++++++ handlers/geshi/langs.ob | 2 +- 2 files changed, 554 insertions(+), 1 deletion(-) create mode 100644 handlers/geshi/geshi/pawn.php diff --git a/handlers/geshi/geshi/pawn.php b/handlers/geshi/geshi/pawn.php new file mode 100644 index 0000000..13697f1 --- /dev/null +++ b/handlers/geshi/geshi/pawn.php @@ -0,0 +1,553 @@ + 'Pawn', + 'COMMENT_SINGLE' => array(1 => '//', 2=> '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'break', 'case', 'continue', 'default', 'do', 'else', 'for', 'foreach', 'goto', 'if', + 'return', 'switch', 'throw', 'try', 'catch', 'while', 'public', 'private', 'protected', + 'static', 'Float', 'stock' + ), + 2 => array( + 'false', 'true', 'null' + ), + 3 => array( + 'AddMenuItem', + 'AddPlayerClass', + 'AddPlayerClassEx', + 'AddStaticPickup', + 'AddStaticVehicle', + 'AddStaticVehicleEx', + 'AddVehicleComponent', + 'AllowAdminTeleport', + 'AllowInteriorWeapons', + 'AllowPlayerTeleport', + 'ApplyAnimation', + 'Attach3DTextLabelToPlayer', + 'Attach3DTextLabelToVehicle', + 'AttachCameraToObject', + 'AttachCameraToPlayerObject', + 'AttachObjectToObject', + 'AttachObjectToPlayer', + 'AttachObjectToVehicle', + 'AttachPlayerObjectToPlayer', + 'AttachPlayerObjectToVehicle', + 'AttachTrailerToVehicle', + 'Ban', + 'BanEx', + 'CallLocalFunction', + 'CallRemoteFunction', + 'CancelEdit', + 'CancelSelectTextDraw', + 'ChangeVehicleColor', + 'ChangeVehiclePaintjob', + 'clamp', + 'ClearAnimations', + 'ConnectNPC', + 'Create3DTextLabel', + 'CreateExplosion', + 'CreateMenu', + 'CreateObject', + 'CreatePickup', + 'CreatePlayer3DTextLabel', + 'CreatePlayerObject', + 'CreatePlayerTextDraw', + 'CreateVehicle', + 'db_close', + 'db_field_name', + 'db_free_result', + 'db_get_field', + 'db_get_field_assoc', + 'db_next_row', + 'db_num_fields', + 'db_num_rows', + 'db_open', + 'db_query', + 'Delete3DTextLabel', + 'DeletePVar', + 'DeletePlayer3DTextLabel', + 'deleteproperty', + 'DestroyMenu', + 'DestroyObject', + 'DestroyPickup', + 'DestroyPlayerObject', + 'DestroyVehicle', + 'DetachTrailerFromVehicle', + 'DisableInteriorEnterExits', + 'DisableMenu', + 'DisableMenuRow', + 'DisableNameTagLOS', + 'DisablePlayerCheckpoint', + 'DisablePlayerRaceCheckpoint', + 'EditAttachedObject', + 'EditObject', + 'EditPlayerObject', + 'EnableStuntBonusForAll', + 'EnableStuntBonusForPlayer', + 'EnableZoneNames', + 'existproperty', + 'fblockread', + 'fblockwrite', + 'fclose', + 'fexist', + 'fgetchar', + 'flength', + 'float', + 'floatabs', + 'floatadd', + 'floatattan', + 'floatcmp', + 'floatcos', + 'floatdiv', + 'floatfract', + 'floatlog', + 'floatmul', + 'floatpower', + 'floatround', + 'floatsin', + 'floatsqroot', + 'floatstr', + 'floatsub', + 'floattan', + 'fmatch', + 'fopen', + 'ForceClassSelection', + 'format', + 'fputchar', + 'fread', + 'fremove', + 'fseek', + 'ftemp', + 'funcidx', + 'fwrite', + 'GameModeExit', + 'GameTextForAll', + 'GameTextForPlayer', + 'GangZoneCreate', + 'GangZoneDestroy', + 'GangZoneFlashForAll', + 'GangZoneFlashForPlayer', + 'GangZoneHideForAll', + 'GangZoneHideForPlayer', + 'GangZoneShowForAll', + 'GangZoneShowForPlayer', + 'GangZoneStopFlashForAll', + 'GangZoneStopFlashForPlayer', + 'GetAnimationName', + 'GetMaxPlayers', + 'GetNetworkStats', + 'GetObjectPos', + 'GetObjectRot', + 'GetPVarFloat', + 'GetPVarInt', + 'GetPVarNameAtIndex', + 'GetPVarString', + 'GetPVarType', + 'GetPVarsUpperIndex', + 'GetPlayerAmmo', + 'GetPlayerAnimationIndex', + 'GetPlayerArmour', + 'GetPlayerCameraFrontVector', + 'GetPlayerCameraMode', + 'GetPlayerCameraPos', + 'GetPlayerCameraUpVector', + 'GetPlayerColor', + 'GetPlayerDistanceFromPoint', + 'GetPlayerDrunkLevel', + 'GetPlayerFacingAngle', + 'GetPlayerFightingStyle', + 'GetPlayerHealth', + 'GetPlayerInterior', + 'GetPlayerIp', + 'GetPlayerKeys', + 'GetPlayerMenu', + 'GetPlayerMoney', + 'GetPlayerName', + 'GetPlayerNetworkStats', + 'GetPlayerObjectPos', + 'GetPlayerObjectRot', + 'GetPlayerPing', + 'GetPlayerPos', + 'GetPlayerScore', + 'GetPlayerSkin', + 'GetPlayerSpecialAction', + 'GetPlayerState', + 'GetPlayerSurfingObjectID', + 'GetPlayerSurfingVehicleID', + 'GetPlayerTargetPlayer', + 'GetPlayerTeam', + 'GetPlayerTime', + 'GetPlayerVehicleID', + 'GetPlayerVehicleSeat', + 'GetPlayerVelocity', + 'GetPlayerVersion', + 'GetPlayerVirtualWorld', + 'GetPlayerWantedLevel', + 'GetPlayerWeapon', + 'GetPlayerWeaponData', + 'GetPlayerWeaponState', + 'GetServerVarAsBool', + 'GetServerVarAsInt', + 'GetServerVarAsString', + 'GetTickCount', + 'GetVehicleComponentInSlot', + 'GetVehicleComponentType', + 'GetVehicleDamageStatus', + 'GetVehicleDistanceFromPoint', + 'GetVehicleHealth', + 'GetVehicleModel', + 'GetVehicleModelInfo', + 'GetVehiclePos', + 'GetVehicleRotationQuat', + 'GetVehicleTrailer', + 'GetVehicleVelocity', + 'GetVehicleVirtualWorld', + 'GetVehicleZAngle', + 'GetWeaponName', + 'getarg', + 'getdate', + 'getproperty', + 'gettime', + 'GivePlayerMoney', + 'GivePlayerWeapon', + 'HTTP', + 'heapspace', + 'HideMenuForPlayer', + 'InterpolateCameraLookAt', + 'InterpolateCameraPos', + 'IsObjectMoving', + 'IsPlayerAdmin', + 'IsPlayerAttachedObjectSlotUsed', + 'IsPlayerConnected', + 'IsPlayerHoldingObject', + 'IsPlayerInAnyVehicle', + 'IsPlayerInCheckpoint', + 'IsPlayerInRaceCheckpoint', + 'IsPlayerInRangeOfPoint', + 'IsPlayerInVehicle', + 'IsPlayerNPC', + 'IsPlayerObjectMoving', + 'IsPlayerStreamedIn', + 'IsTrailerAttachedToVehicle', + 'IsValidObject', + 'IsValidPlayerObject', + 'IsValidVehicle', + 'IsVehicleStreamedIn', + 'ispacked', + 'Kick', + 'KillTimer', + 'LimitGlobalChatRadius', + 'LimitPlayerMarkerRadius', + 'LinkVehicleToInterior', + 'ManualVehicleEngineAndLights', + 'memcpy', + 'MoveObject', + 'MovePlayerObject', + 'PlayAudioStreamForPlayer', + 'PlayCrimeReportForPlayer', + 'PlayerPlaySound', + 'PlayerSpectatePlayer', + 'PlayerSpectateVehicle', + 'PlayerTextDrawAlignment', + 'PlayerTextDrawBackgroundColor', + 'PlayerTextDrawBoxColor', + 'PlayerTextDrawColor', + 'PlayerTextDrawDestroy', + 'PlayerTextDrawFont', + 'PlayerTextDrawHide', + 'PlayerTextDrawLetterSize', + 'PlayerTextDrawSetOutline', + 'PlayerTextDrawSetProportional', + 'PlayerTextDrawSetSelectable', + 'PlayerTextDrawSetShadow', + 'PlayerTextDrawSetString', + 'PlayerTextDrawShow', + 'PlayerTextDrawTextSize', + 'PlayerTextDrawUseBox', + 'print', + 'printf', + 'PutPlayerInVehicle', + 'random', + 'RemoveBuildingForPlayer', + 'RemovePlayerAttachedObject', + 'RemovePlayerFromVehicle', + 'RemovePlayerMapIcon', + 'RemoveVehicleComponent', + 'RepairVehicle', + 'ResetPlayerMoney', + 'ResetPlayerWeapons', + 'SelectObject', + 'SelectTextDraw', + 'SendClientMessage', + 'SendClientMessageToAll', + 'SendDeathMessage', + 'SendPlayerMessageToAll', + 'SendPlayerMessageToPlayer', + 'SendRconCommand', + 'SetCameraBehindPlayer', + 'SetDeathDropAmount', + 'SetDisabledWeapons', + 'SetGameModeText', + 'SetGravity', + 'SetMenuColumnHeader', + 'SetNameTagDrawDistance', + 'SetObjectMaterial', + 'SetObjectMaterialText', + 'SetObjectPos', + 'SetObjectRot', + 'SetPVarFloat', + 'SetPVarInt', + 'SetPVarString', + 'SetPlayerAmmo', + 'SetPlayerArmedWeapon', + 'SetPlayerArmour', + 'SetPlayerAttachedObject', + 'SetPlayerCameraLookAt', + 'SetPlayerCameraPos', + 'SetPlayerChatBubble', + 'SetPlayerCheckpoint', + 'SetPlayerColor', + 'SetPlayerDrunkLevel', + 'SetPlayerFacingAngle', + 'SetPlayerFightingStyle', + 'SetPlayerHealth', + 'SetPlayerHoldingObject', + 'SetPlayerInterior', + 'SetPlayerMapIcon', + 'SetPlayerMarkerForPlayer', + 'SetPlayerName', + 'SetPlayerObjectMaterial', + 'SetPlayerObjectMaterialText', + 'SetPlayerObjectPos', + 'SetPlayerObjectRot', + 'SetPlayerPos', + 'SetPlayerPosFindZ', + 'SetPlayerRaceCheckpoint', + 'SetPlayerScore', + 'SetPlayerShopName', + 'SetPlayerSkillLevel', + 'SetPlayerSkin', + 'SetPlayerSpecialAction', + 'SetPlayerTeam', + 'SetPlayerTime', + 'SetPlayerVelocity', + 'SetPlayerVirtualWorld', + 'SetPlayerWantedLevel', + 'SetPlayerWeather', + 'SetPlayerWorldBounds', + 'SetSpawnInfo', + 'SetTeamCount', + 'SetTimer', + 'SetTimerEx', + 'SetVehicleAngularVelocity', + 'SetVehicleHealth', + 'SetVehicleNumberPlate', + 'SetVehicleParamsEx', + 'SetVehicleParamsForPlayer', + 'SetVehiclePos', + 'SetVehicleToRespawn', + 'SetVehicleVelocity', + 'SetVehicleVirtualWorld', + 'SetVehicleZAngle', + 'SetWeather', + 'SetWorldTime', + 'setproperty', + 'ShowMenuForPlayer', + 'ShowNameTags', + 'ShowPlayerDialog', + 'ShowPlayerMarkers', + 'ShowPlayerNameTagForPlayer', + 'SpawnPlayer', + 'StartRecordingPlayerData', + 'StopAudioStreamForPlayer', + 'StopObject', + 'StopPlayerHoldingObject', + 'StopPlayerObject', + 'StopRecordingPlayerData', + 'strcat', + 'strcmp', + 'strdel', + 'strfind', + 'strins', + 'strlen', + 'strmid', + 'strpack', + 'strunpack', + 'strval', + 'TextDrawAlignment', + 'TextDrawBackgroundColor', + 'TextDrawBoxColor', + 'TextDrawColor', + 'TextDrawCreate', + 'TextDrawDestroy', + 'TextDrawFont', + 'TextDrawHideForAll', + 'TextDrawHideForPlayer', + 'TextDrawLetterSize', + 'TextDrawSetOutline', + 'TextDrawSetProportional', + 'TextDrawSetSelectable', + 'TextDrawSetShadow', + 'TextDrawSetString', + 'TextDrawShowForAll', + 'TextDrawShowForPlayer', + 'TextDrawTextSize', + 'TextDrawUseBox' + ), + 4 => array( + 'enum', 'new', 'const' + ), + 5 => array( + 'OnDialogResponse', + 'OnEnterExitModShop', + 'OnFilterScriptExit', + 'OnFilterScriptInit', + 'OnGameModeExit', + 'OnGameModeInit', + 'OnObjectMoved', + 'OnPlayerClickMap', + 'OnPlayerClickPlayer', + 'OnPlayerClickPlayerTextDraw', + 'OnPlayerClickTextDraw', + 'OnPlayerCommandText', + 'OnPlayerConnect', + 'OnPlayerDeath', + 'OnPlayerDisconnect', + 'OnPlayerEditAttachedObject', + 'OnPlayerEditObject', + 'OnPlayerEnterCheckpoint', + 'OnPlayerEnterRaceCheckpoint', + 'OnPlayerEnterVehicle', + 'OnPlayerExitVehicle', + 'OnPlayerExitedMenu', + 'OnPlayerGiveDamage', + 'OnPlayerInteriorChange', + 'OnPlayerKeyStateChange', + 'OnPlayerLeaveCheckpoint', + 'OnPlayerLeaveRaceCheckpoint', + 'OnPlayerObjectMoved', + 'OnPlayerPickUpPickup', + 'OnPlayerPrivmsg', + 'OnPlayerRequestClass', + 'OnPlayerRequestSpawn', + 'OnPlayerSelectObject', + 'OnPlayerSelectedMenuRow', + 'OnPlayerSpawn', + 'OnPlayerStateChange', + 'OnPlayerStreamIn', + 'OnPlayerStreamOut', + 'OnPlayerTakeDamage', + 'OnPlayerTeamPrivmsg', + 'OnPlayerText', + 'OnPlayerUpdate', + 'OnRconCommand', + 'OnRconLoginAttempt', + 'OnUnoccupiedVehicleUpdate', + 'OnVehicleDamageStatusUpdate', + 'OnVehicleDeath', + 'OnVehicleMod', + 'OnVehiclePaintjob', + 'OnVehicleRespray', + 'OnVehicleSpawn', + 'OnVehicleStreamIn', + 'OnVehicleStreamOut' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', + '+', '-', '*', '/', '%', + '!', '&', '|', '^', + '<', '>', '=', + '?', ':', ';', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;', + 4 => 'color: #993333;', + 5 => 'color: #63648C;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #339933;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + '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( + 1 => 'color: #202020;', + 2 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://wiki.sa-mp.com/wiki/{FNAME}', + 4 => '', + 5 => 'http://wiki.sa-mp.com/wiki/{FNAME}' + ), + '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/handlers/geshi/langs.ob b/handlers/geshi/langs.ob index 765a691..794c101 100644 --- a/handlers/geshi/langs.ob +++ b/handlers/geshi/langs.ob @@ -1 +1 @@ -a:73:{i:0;s:8:"6502acme";i:1;s:8:"6502tasm";i:2;s:11:"6502kickass";i:3;s:11:"68000devpac";i:4;s:4:"abap";i:5;s:12:"actionscript";i:6;s:3:"ada";i:7;s:6:"apache";i:8;s:3:"asm";i:9;s:3:"asp";i:10;s:4:"bash";i:11;s:2:"bf";i:12;s:1:"c";i:13;s:5:"c_mac";i:14;s:6:"caddcl";i:15;s:7:"cadlisp";i:16;s:4:"cdfg";i:17;s:5:"cobol";i:18;s:3:"cpp";i:19;s:6:"csharp";i:20;s:3:"css";i:21;s:1:"d";i:22;s:6:"delphi";i:23;s:4:"diff";i:24;s:3:"dos";i:25;s:3:"gdb";i:26;s:7:"gettext";i:27;s:3:"gml";i:28;s:7:"gnuplot";i:29;s:6:"groovy";i:30;s:7:"haskell";i:31;s:4:"haxe";i:32;s:11:"html4strict";i:33;s:3:"ini";i:34;s:4:"java";i:35;s:10:"javascript";i:36;s:6:"klonec";i:37;s:8:"klonecpp";i:38;s:5:"latex";i:39;s:4:"lisp";i:40;s:3:"lua";i:41;s:6:"matlab";i:42;s:5:"mpasm";i:43;s:5:"mysql";i:44;s:4:"nsis";i:45;s:4:"objc";i:46;s:5:"oobas";i:47;s:7:"oracle8";i:48;s:8:"oracle10";i:49;s:6:"pascal";i:50;s:4:"perl";i:51;s:3:"php";i:52;s:6:"povray";i:53;s:8:"providex";i:54;s:6:"prolog";i:55;s:6:"python";i:56;s:6:"qbasic";i:57;s:3:"reg";i:58;s:4:"ruby";i:59;s:3:"sas";i:60;s:5:"scala";i:61;s:6:"scheme";i:62;s:6:"scilab";i:63;s:9:"smalltalk";i:64;s:6:"smarty";i:65;s:3:"tcl";i:66;s:4:"text";i:67;s:2:"vb";i:68;s:5:"vbnet";i:69;s:12:"visualfoxpro";i:70;s:10:"whitespace";i:71;s:3:"xml";i:72;s:3:"z80";} \ No newline at end of file +a:74:{i:0;s:8:"6502acme";i:1;s:8:"6502tasm";i:2;s:11:"6502kickass";i:3;s:11:"68000devpac";i:4;s:4:"abap";i:5;s:12:"actionscript";i:6;s:3:"ada";i:7;s:6:"apache";i:8;s:3:"asm";i:9;s:3:"asp";i:10;s:4:"bash";i:11;s:2:"bf";i:12;s:1:"c";i:13;s:5:"c_mac";i:14;s:6:"caddcl";i:15;s:7:"cadlisp";i:16;s:4:"cdfg";i:17;s:5:"cobol";i:18;s:3:"cpp";i:19;s:6:"csharp";i:20;s:3:"css";i:21;s:1:"d";i:22;s:6:"delphi";i:23;s:4:"diff";i:24;s:3:"dos";i:25;s:3:"gdb";i:26;s:7:"gettext";i:27;s:3:"gml";i:28;s:7:"gnuplot";i:29;s:6:"groovy";i:30;s:7:"haskell";i:31;s:4:"haxe";i:32;s:11:"html4strict";i:33;s:3:"ini";i:34;s:4:"java";i:35;s:10:"javascript";i:36;s:6:"klonec";i:37;s:8:"klonecpp";i:38;s:5:"latex";i:39;s:4:"lisp";i:40;s:3:"lua";i:41;s:6:"matlab";i:42;s:5:"mpasm";i:43;s:5:"mysql";i:44;s:4:"nsis";i:45;s:4:"objc";i:46;s:5:"oobas";i:47;s:7:"oracle8";i:48;s:8:"oracle10";i:49;s:6:"pascal";i:50;s:4:"perl";i:51;s:3:"php";i:52;s:6:"povray";i:53;s:8:"providex";i:54;s:6:"prolog";i:55;s:6:"python";i:56;s:6:"qbasic";i:57;s:3:"reg";i:58;s:4:"ruby";i:59;s:3:"sas";i:60;s:5:"scala";i:61;s:6:"scheme";i:62;s:6:"scilab";i:63;s:9:"smalltalk";i:64;s:6:"smarty";i:65;s:3:"tcl";i:66;s:4:"text";i:67;s:2:"vb";i:68;s:5:"vbnet";i:69;s:12:"visualfoxpro";i:70;s:10:"whitespace";i:71;s:3:"xml";i:72;s:3:"z80";i:73;s:4:"pawn";} \ No newline at end of file