diff --git a/DCS_Folder_Sync.bat b/DCS_Folder_Sync.bat deleted file mode 100644 index 98d4fdc55..000000000 --- a/DCS_Folder_Sync.bat +++ /dev/null @@ -1,4 +0,0 @@ -rem This script will pull the latest changes from the remote repository, and update the submodules accordingly. - -C:\Program Files (x86)\Git\bin\git pull -C:\Program Files (x86)\Git\bin\git submodule update --init diff --git a/Moose Development/Documentation/DCS_ControlAPI.txt b/Moose Development/Documentation/DCS_ControlAPI.txt deleted file mode 100644 index a0650d801..000000000 --- a/Moose Development/Documentation/DCS_ControlAPI.txt +++ /dev/null @@ -1,565 +0,0 @@ -DCS Simulation Control User Scripts -==================================== - -The behaviour of the DCS can be altered using the *GameGUI.lua scripts. -You define the hooks to the DCS events, and then do what you want using the provided API. -=================================================================================================== - -When loading, DCS searches for Saved Games\DCS\Scripts\*GameGUI.lua files, -sorts them by name and then loads into the GUI Lua-state. -Each user script is loaded into an isolated environment, so the only -thing they share is the state of the simulator. - -Each script defines a set of callbacks to the DCS events and sets them with the call - DCS.setUserCallbacks(cb_table) -For each callback type the hooks of all user scripts will be called in order of loading. - -For callbacks which are supposed to returning a value, currently there are 3 of them: - onPlayerTryConnect - onPlayerTrySendChat - onPlayerTryChangeSlot -returning a value means breaking the hook call chain. -Returning nothing (or nil) means continuing the hook chain, which ends with the default allow-all handlers. - -The example user script 'testGameGUI.lua': ----------------------------------------------------------------------------------------------- -local test = {} - -function test.onPlayerTryConnect(ipaddr, name, ucid, playerID) - print('onPlayerTryConnect(%s, %s, %s, %d)', ipaddr, name, ucid, playerID) - -- if you want to gently intercept the call, allowing other user scripts to get it, - -- you better return nothing here - return true -- allow the player to connect -end - -function test.onSimulationStart() - print('Current mission is '..DCS.getMissionName()) -end - -DCS.setUserCallbacks(test) -- here we set our callbacks ----------------------------------------------------------------------------------------------- - - -The available API are documented below. -The full list of the callbacks is at the end of this document. - -In addition, all standard lua 5.1 libraries are available as well, namely: -base api, like print, etc, -math.* -table.* -string.* -io.* -os.* -debug.* - -=================================================================================================== - - - -Lua File System (lfs) API -------------------------------- -lfs.currentdir() -> string - Returns the path of the DCS install folder - -lfs.writedir() -> string - Returns the path of the current 'Saved Games\DCS' folder. - -lfs.tempdir() -> string - Returns the pat of the DCS Temp folder (AppData\Local\Temp\DCS). - -lfs.mkdir() -lfs.rmdir() -lfs.attributes() -lfs.dir() -lfs.normpath() -lfs.realpath() - - - -DCS Control API, table 'DCS.*' -------------------------------- - -DCS.setPause(bool) - Pauses/resumes the simulation. Server-side only. - -DCS.getPause() -> bool - true if simulation is paused - -DCS.stopMission() - stops current mission - -DCS.exitProcess() - Exits the DCS process. - -DCS.isMultiplayer() -> bool - True when running in the multiplayer mode. - -DCS.isServer() -> bool - True when running as a server or in the single-player mode. - -DCS.getModelTime() -> number - returns current DCS simulation time in seconds. - -DCS.getRealTime() -> number - returns current DCS real time in seconds relative to the DCS start time. - -DCS.getMissionOptions() -> table - Returns the value of 'mission.options' - -DCS.getMissionDescription() -> string - translated mission.descriptionText string - -DCS.getAvailableCoalitions() -> table { - [coalition_id] = { name = "coalition name", } - ... -} - Returns a list of coalitions which have available slots. - -DCS.getAvailableSlots(coalitionID) -> array of {unitId, type, role, callsign, groupName, country} - Returns the list of available slots. - NOTE: the returned unitID is actually a slotID, which for multi-seat units is 'unitID_seatID' - -DCS.getCurrentMission() -> table with the currently loaded mission - NOTE: to get valid mission.options use DCS.getMissionOptions() - -DCS.getMissionName() -> string - Returns the name of the current mission - -DCS.getMissionFilename() -> string - Returns the file name of the current mission (returns nil when acting as a multiplayer client). - -DCS.getMissionResult(string side) -> integer [0, 100] - Gets missin result for either 'red' or 'blue' - -DCS.getUnitProperty(missionId, propertyId) -> string - propertyId: - DCS.UNIT_RUNTIME_ID, // unique within runtime mission. int - DCS.UNIT_MISSION_ID, // unique within mission file. int>0 - DCS.UNIT_NAME, // unit name, as assigned by mission designer. - DCS.UNIT_TYPE, // unit type (Ural, ZU-23, etc) - DCS.UNIT_CATEGORY, - DCS.UNIT_GROUP_MISSION_ID, // group ID, unique within mission file. int>0 - DCS.UNIT_GROUPNAME, // group name, as assigned by mission designer. - DCS.UNIT_GROUPCATEGORY, - DCS.UNIT_CALLSIGN, - DCS.UNIT_HIDDEN,// ME hiding - DCS.UNIT_COALITION,// "blue", "red" or "unknown" - DCS.UNIT_COUNTRY_ID, - DCS.UNIT_TASK, //"unit.group.task" - DCS.UNIT_PLAYER_NAME, // valid for network "humanable" units - DCS.UNIT_ROLE,//"artillery_commander", "instructor", etc - DCS.UNIT_INVISIBLE_MAP_ICON,//ME invisible map icon - -DCS.getUnitType(missionId) -> typeId - a shortcut for DCS.getUnitProperty(missionId, DCS.UNIT_TYPE) - -DCS.getUnitTypeAttribute(typeId, attr) -> string - Returns a value from Database: Objects[typeId][attr], - for example DCS.getUnitTypeAttribute("Ural", "DisplayName") - -DCS.writeDebriefing(str) - Writes a custom string to the debriefing file - -DCS.setUserCallbacks(cb_table) - Hooks the callbacks using the handlers from the provided table. - See: "GameGUI scripts" section. - - - -Logging API 'log.*' ------------------------- -Logging works as follows: -a) each log message is accompanied with 2 attributes: a subsystem, and level. -b) after each messages gets into a logger it passes (asynchronously) through - a series of output filters which decide where the message will be written to. - -Writing to log is done by: - -log.write(SUBSYSTEM_NAME, LOG_LEVEL, message, ...) - if there are any arguments after 'message', - the actual string is formed as string.format(message, ...) - - SUBSYSTEM_NAME is a string - LOG_LEVEL is one of the values, listed below - see log.set_output() - -log.set_output(log_file_name_wo_ext, rule_subsystem_name, rule_level_mask, rule_output_mode) - - the args: - log_file_name_wo_ext: resulting log will be written to $WRITE_DIR/Logs/.log - - rule_subsytem_name: the name of the subsystem whose messages to write or empty string to match all subsystems - - rule_level_mask: a sum of log-level bit flags to match messages - valid flags are: - log.ALERT - log.ERROR - log.WARNING - log.INFO - log.DEBUG - log.ALL - includes all of the above - log.TRACE - a special level which is excluded from dcs.log file - - rule_output_mode: a sum of output flags: - log.MESSAGE - log.TIME - log.MODULE - this is a 'subsystem', not a dlc - log.LEVEL - log.FULL - all of the above - -So, in order to save net.trace(msg) messages to a file, you should issue a call: - log.set_output('lua-net', 'LuaNET', log.TRACE, log.MESSAGE + log.TIME) - - This will write to a Logs/lua-net.log file - -Or, to save everything lua-network-related: - log.set_output('lua-net', 'LuaNET', log.TRACE + log.ALL, log.MESSAGE + log.TIME + log.LEVEL) - -To close the log file, you must use - log.set_output('lua-net', '', 0, 0) - -log.* API is available in the 'Saved Games\DCS\Config\autoexec.cfg' file as well so you can control log output in you local machine. - - - -Network specific API, available through the table 'net.' ----------------------------------------------------------------- - -net.log(msg) -- equivalent to log.write('LuaNET', log.INFO, msg) -net.trace(msg) -- equivalent to log.write('LuaNET', log.TRACE, msg) - -What is the difference: log() always writes to dcs.log, but may lose messages if the output rate is too high. -trace() output never appears in the dcs.log file, it must be explicitly directed to a log file. -It never loses messages when there's an active output, but it may block if output rate is higher than writing to the log file. -To control logger output you can use $WRITE_DIR/Config/autoexec.cfg file, or call this from your network script -(log.* API, see above) - - -net.dostring_in(state, string) -> string - Executes a lua-string in a given internal lua-state and returns a string result - Valid state names are: - 'config': the state in which $INSTALL_DIR/Config/main.cfg is executed, as well as $WRITE_DIR/Config/autoexec.cfg - used for configuration settings - 'mission': holds current mission - 'export': runs $WRITE_DIR/Scripts/Export.lua and the relevant export API - -net.send_chat(string message, bool all) - Send chat message. If not all, then send to my coalition (side) only. - -net.send_chat_to(string message, playerID to) - Send direct chat message to a player - Server-side only: - net.send_chat_to(string message, playerID to[, playerID from]) - -net.recv_chat(message[, int from=0]) - Receive chat message locally[, pretending it was sent by another player]. - from = 0 means from the system - -net.load_mission(miz_filename) - Loads a specified mission, temporarily overriding the server mission list. - SERVER ONLY - -net.load_next_mission() -> bool - Load the next mission from the server mission list. Returns false if list end is reached - SERVER ONLY - -net.get_player_list() -> array of playerID - Returns the list of currently connected players - -net.get_my_player_id() -> playerID - Returns the playerID of the local player. Currently always 1 for the server. - -net.get_server_id() -> playerID - Returns playerID of the server. Currently, always 1. - -net.get_player_info(playerID) -> table - Returns a table of all player attributes or nil if playerID is invalid - -net.get_player_info(playerID, attrName) -> value - Returns a value of a given attribute for the playerID. - - Currently defined attributes are: - 'id': playerID - 'name': player name - 'side': 0 - spectators, 1 - red, 2 - blue - 'slot': slotID of the player or '' - 'ping': ping of the player in ms - 'ipaddr': IP address of the player, SERVER ONLY - 'ucid': Unique Client Identifier, SERVER ONLY - -net.kick(id, message) - Kick a player. - -net.get_stat(playerID, statID) -> integer - Get statistics for player. statIDs are: - net.PS_PING (0) - ping (in ms) - net.PS_CRASH (1) - number of crashes - net.PS_CAR (2) - number of destroyed vehicles - net.PS_PLANE (3) - ... planes/helicopters - net.PS_SHIP (4) - ... ships - net.PS_SCORE (5) - total score - net.PS_LAND (6) - number of landings - net.PS_EJECT (7) - of ejects - - -net.get_name(playerID) -> string - The same as net.get_player_info(playerID, 'name') - FIXME: implement in ServMan_compat.lua ? - -net.get_slot(playerID) -> sideID, slotID - The same as: - net.get_player_info(playerID, 'side'), net.get_player_info(playerID, 'slot') - FIXME: implement in ServMan_compat.lua ? - - - -net.set_slot(sideID, slotID) - Try to set the local player's slot. Empty slotID ('') puts the player into spectators. - -net.force_player_slot(playerID, sideID, slotID) -> boolean - Forces a player to occupy a set slot. Slot '' means no slot (moves player to spectators) - SideID: 0 - spectators, 1 - red, 2 - blue - -net.set_name(playerID, name) -- OBSOLETE, works only locally - - -net.lua2json(value) -> string - Convert a Lua value to JSON string - -net.json2lua(json_string) -> value - Convert JSON string to a Lua value - - -LuaExport API 'Export.Lo*' ----------------------------------------------------------------- -See Scripts/Export.lua for the documentation. Note that all export -API functions are available here in the Export. namespace, not the global one. -In multiplayer the availability of the API on clients depends on the server setting. - -The calls to check export capabilities: - Export.LoIsObjectExportAllowed() -- returns the value of server.advanced.allow_object_export - Export.LoIsSensorExportAllowed() -- returns the value of server.advanced.allow_sensor_export - Export.LoIsOwnshipExportAllowed() -- returns the value of server.advanced.allow_ownship_export - -These calls are only available on clients when LoIsObjectExportAllowed() is true: - Export.LoGetObjectById - Export.LoGetWorldObjects - -These calls are only available on clients when LoIsSensorExportAllowed() is true: - Export.LoGetTWSInfo - Export.LoGetTargetInformation - Export.LoGetLockedTargetInformation - Export.LoGetF15_TWS_Contacts - Export.LoGetSightingSystemInfo - Export.LoGetWingTargets - -These calls are only available on clients when LoIsOwnshipExportAllowed() is true: - Export.LoGetPlayerPlaneId - Export.LoGetIndicatedAirSpeed - Export.LoGetAngleOfAttack - Export.LoGetAngleOfSideSlip - Export.LoGetAccelerationUnits - Export.LoGetVerticalVelocity - Export.LoGetADIPitchBankYaw - Export.LoGetTrueAirSpeed - Export.LoGetAltitudeAboveSeaLevel - Export.LoGetAltitudeAboveGroundLevel - Export.LoGetMachNumber - Export.LoGetRadarAltimeter - Export.LoGetMagneticYaw - Export.LoGetGlideDeviation - Export.LoGetSideDeviation - Export.LoGetSlipBallPosition - Export.LoGetBasicAtmospherePressure - Export.LoGetControlPanel_HSI - Export.LoGetEngineInfo - Export.LoGetSelfData - Export.LoGetCameraPosition - Export.LoSetCameraPosition - Export.LoSetCommand - Export.LoGetMCPState - Export.LoGetRoute - Export.LoGetNavigationInfo - Export.LoGetPayloadInfo - Export.LoGetWingInfo - Export.LoGetMechInfo - Export.LoGetRadioBeaconsStatus - Export.LoGetVectorVelocity - Export.LoGetVectorWindVelocity - Export.LoGetSnares - Export.LoGetAngularVelocity - Export.LoGetHeightWithObjects - Export.LoGetFMData - -These functions are always available: - Export.LoGetPilotName - Export.LoGetAltitude - Export.LoGetNameByType - Export.LoGeoCoordinatesToLoCoordinates - Export.LoCoordinatesToGeoCoordinates - Export.LoGetVersionInfo - Export.LoGetWindAtPoint - Export.LoGetModelTime - Export.LoGetMissionStartTime - -These are not available in the *GameGUI state: --- Export.LoSetSharedTexture --- Export.LoRemoveSharedTexture --- Export.LoUpdateSharedTexture - - -------------------------------------------------------------------------------------------- ---- The Callbacks. -------------------------------------------------------------------------------------------- - -function onMissionLoadBegin() -end - -function onMissionLoadProgress(progress, message) -end - -function onMissionLoadEnd() -end - - -function onSimulationStart() -end - -function onSimulationStop() -end - -function onSimulationFrame() -end - -function onSimulationPause() -end - -function onSimulationResume() -end - - -function onGameEvent(eventName,arg1,arg2,arg3,arg4) ---"friendly_fire", playerID, weaponName, victimPlayerID ---"mission_end", winner, msg ---"kill", killerPlayerID, killerUnitType, killerSide, victimPlayerID, victimUnitType, victimSide, weaponName ---"self_kill", playerID ---"change_slot", playerID, slotID, prevSide ---"connect", playerID, name ---"disconnect", playerID, name, playerSide, reason_code ---"crash", playerID, unit_missionID ---"eject", playerID, unit_missionID ---"takeoff", playerID, unit_missionID, airdromeName ---"landing", playerID, unit_missionID, airdromeName ---"pilot_death", playerID, unit_missionID -end - -function onNetConnect(localPlayerID) -end - -function onNetMissionChanged(newMissionName) -end - -function onNetDisconnect(reason_msg, err_code) -end - --- disconnect reason codes: - net.ERR_INVALID_ADDRESS - net.ERR_CONNECT_FAILED - net.ERR_WRONG_VERSION - net.ERR_PROTOCOL_ERROR - net.ERR_TAINTED_CLIENT - net.ERR_INVALID_PASSWORD - net.ERR_BANNED - net.ERR_BAD_CALLSIGN - - net.ERR_TIMEOUT - net.ERR_KICKED - - -function onPlayerConnect(id) -end - -function onPlayerDisconnect(id, err_code) - -- this is never called for local playerID -end - -function onPlayerStart(id) - -- a player entered the simulation - -- this is never called for local playerID -end - -function onPlayerStop(id) - -- a player left the simulation (happens right before a disconnect, if player exited by desire) - -- this is never called for local playerID -end - -function onPlayerChangeSlot(id) - -- a player successfully changed the slot - -- this will also come as onGameEvent('change_slot', playerID, slotID), - -- if allowed by server.advanced.event_Connect setting -end - - ---- These 3 functions are different from the rest: ---- 1. they are called directly from the network code, so try to make them as fast as possible ---- 2. they return a result --- The code shows the default implementations. - -function onPlayerTryConnect(addr, name, ucid, playerID) --> true | false, "disconnect reason" - return true -end - -function onPlayerTrySendChat(playerID, msg, all) -- -> filteredMessage | "" - empty string drops the message - return msg -end - -function onPlayerTryChangeSlot(playerID, side, slotID) -- -> true | false - return true -end - - - --- GUI callbacks -function onChatMessage(message, from) - -- this one may be useful for chat archiving -end - -function onShowRadioMenu(a_h) -end - -function onShowPool() -end - -function onShowGameMenu() -end - -function onShowBriefing() -end - -function onShowChatAll() -end - -function onShowChatTeam() -end - -function onShowChatRead() -end - -function onShowMessage(a_text, a_duration) -end - -function onTriggerMessage(message, duration, clearView) -end - -function onRadioMessage(message, duration) -end - -function onRadioCommand(command_message) -end - -=================================================================================================== - -Happy hacking! - -Sincerely, -dsb at eagle dot ru diff --git a/Moose Development/Documentation/FAC_Detection logic.pdf b/Moose Development/Documentation/FAC_Detection logic.pdf deleted file mode 100644 index e2e1cac38..000000000 Binary files a/Moose Development/Documentation/FAC_Detection logic.pdf and /dev/null differ diff --git a/Moose Development/Documentation/Scoring/Scoring Sample.csv b/Moose Development/Documentation/Scoring/Scoring Sample.csv deleted file mode 100644 index 49c85640d..000000000 --- a/Moose Development/Documentation/Scoring/Scoring Sample.csv +++ /dev/null @@ -1,190 +0,0 @@ -Game;Date;Time;Source Player Name;Target Player Name;Event;Source Coalition;Source Category;Source Type;Source Unit;Target Coalition;Target Category;Target Type;Target Name;Nr;Score -TAW_CSARz_PALACE_3.6136;7/05/2017;12:19:37;PL8;;DESTROY_SCORE;Red;Plane;Su-25T;Pilot #058;Blue;Vehicle;Hawk cwar;Unit #114;1;5 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:39:25;PL12;;HIT_SCORE;Red;Plane;AJS37;Pilot #110;Blue;Vehicle;Soldier M249;Unit #453;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:14:30;PL1;PL2;DESTROY_PENALTY;Blue;Plane;F-15C;Pilot #069;Blue;Plane;F-15C;Pilot #071;1;-15 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:40:14;PL3;PL4;HIT_SCORE;Blue;Plane;F-15C;Pilot #018;Red;Plane;AJS37;Pilot #112;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:25:22;PL5;;HIT_PENALTY;Red;Helicopter;Ka-50;MEDEVAC RED #13;Red;Vehicle;Infantry AK;Wounded Pilot #1143;1;-10 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:18:34;PL6;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Vehicle;M-2 Bradley;Unit #007;1;3 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:21:35;PL7;PL2;HIT_SCORE;Red;Plane;M-2000C;Pilot #037;Blue;Plane;F-15C;Pilot #071;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:46:42;PL8;;HIT_SCORE;Red;Plane;Su-25T;Pilot #058;Blue;Vehicle;Strela-1 9P31;Unit #429;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:30:09;PL9;PL10;DESTROY_SCORE;Blue;Plane;F-15C;Pilot #017;Red;Plane;Su-27;Pilot #039;1;5 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:22:46;PL11;;HIT_SCORE;Red;;;;;Scenery;Infantry AK;Wounded Pilot #1129;1;0 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:11:46;PL6;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Vehicle;MLRS;Unit #011;1;2 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:53:10;PL11;;HIT_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;MLRS;Unit #510;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:10:54;PL12;;HIT_SCORE;Red;;;;;Scenery;UKRYTIE;280468;1;0 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:09:28;PL13;PL9;HIT_SCORE;Red;Plane;Su-27;Pilot #086;Blue;Plane;F-15C;Pilot #017;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:52:59;PL13;PL14;HIT_SCORE;Red;Plane;Su-27;Pilot #086;Blue;Plane;M-2000C;Pilot #030;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:39:27;PL12;;DESTROY_SCORE;Red;Plane;AJS37;Pilot #110;Blue;Vehicle;Soldier stinger;Unit #454;1;4 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:53:21;PL11;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;MLRS;Unit #510;1;2 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:51:37;PL15;PL9;HIT_SCORE;Red;Plane;Su-27;Pilot #041;Blue;Plane;F-15C;Pilot #017;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:22:05;PL16;PL2;DESTROY_SCORE;Red;Plane;Su-27;Pilot #044;Blue;Plane;F-15C;Pilot #071;1;3 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:22:28;PL6;PL3;HIT_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Plane;F-15C;Pilot #018;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:38:21;PL17;PL18;HIT_SCORE;Blue;Plane;M-2000C;Pilot #029;Red;Plane;Su-25T;Pilot #059;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:14:34;PL7;PL17;DESTROY_SCORE;Red;Plane;M-2000C;Pilot #037;Blue;Plane;M-2000C;Pilot #029;1;2,5 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:21:22;PL19;PL20;HIT_SCORE;Blue;Plane;F-15C;Pilot #024;Red;Plane;A-10C;Pilot #057;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:24:21;PL5;PL21;HIT_PENALTY;Red;Helicopter;Mi-8MT;MEDEVAC RED #10;Red;Helicopter;SA342Mistral;helicargo4;1;-10 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:21:36;PL6;PL19;HIT_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Plane;F-15C;Pilot #024;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:21:51;PL6;PL19;DESTROY_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Plane;F-15C;Pilot #024;1;6 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:21:14;PL19;PL20;HIT_SCORE;Blue;Plane;F-15C;Pilot #024;Red;Plane;A-10C;Pilot #057;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:13:59;PL2;;HIT_SCORE;Blue;;;;;Scenery;F-15C;Pilot #069;1;0 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:48:55;PL11;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;M-1 Abrams;Unit #514;1;3 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:22:48;PL6;PL3;DESTROY_SCORE;Red;;;;Blue;Plane;F-15C;Pilot #018;1;6 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:18:19;PL6;;HIT_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Vehicle;M-2 Bradley;Unit #007;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:25:19;PL5;;HIT_PENALTY;Red;Helicopter;Ka-50;MEDEVAC RED #13;Red;Vehicle;Infantry AK;Wounded Pilot #1143;1;-10 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:22:12;PL9;PL20;HIT_SCORE;Blue;Plane;F-15C;Pilot #017;Red;Plane;A-10C;Pilot #057;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:51:35;PL15;PL9;HIT_SCORE;Red;Plane;Su-27;Pilot #041;Blue;Plane;F-15C;Pilot #017;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:19:18;PL6;;HIT_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Vehicle;M-113;Unit #006;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:54:22;PL1;PL13;HIT_SCORE;Blue;Plane;F-15C;Pilot #069;Red;Plane;Su-27;Pilot #086;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:37:18;PL11;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;Osa 9A33 ln;Unit #218;1;5 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:21:14;PL16;PL1;DESTROY_SCORE;Red;Plane;Su-27;Pilot #044;Blue;Plane;F-15C;Pilot #069;1;5 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:55:00;PL11;;HIT_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;M1128 Stryker MGS;Unit #010;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:22:13;PL9;PL20;HIT_SCORE;Blue;Plane;F-15C;Pilot #017;Red;Plane;A-10C;Pilot #057;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:19:55;PL2;PL18;HIT_SCORE;Blue;Plane;F-15C;Pilot #071;Red;Plane;Su-25T;Pilot #059;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:14:34;PL16;PL17;DESTROY_SCORE;Red;Plane;Su-27;Pilot #044;Blue;Plane;M-2000C;Pilot #029;1;2,5 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:46:42;PL11;;HIT_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;Soldier M4;Unit #470;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:11:46;PL6;;HIT_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Vehicle;MLRS;Unit #011;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:21:20;PL19;PL20;HIT_SCORE;Blue;Plane;F-15C;Pilot #024;Red;Plane;A-10C;Pilot #057;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:10:01;PL6;PL3;HIT_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Plane;F-15C;Pilot #018;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:38:22;PL18;PL17;DESTROY_SCORE;Red;Plane;Su-25T;Pilot #059;Blue;Plane;M-2000C;Pilot #029;1;5 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:46:25;PL6;;HIT_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Vehicle;M-2 Bradley;Unit #007;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:19:53;PL24;PL18;HIT_SCORE;Blue;Plane;F-15C;Pilot #033;Red;Plane;Su-25T;Pilot #059;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:51:55;PL15;PL9;DESTROY_SCORE;Red;Plane;Su-27;Pilot #041;Blue;Plane;F-15C;Pilot #017;1;5 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:48:11;PL2;PL10;DESTROY_SCORE;Blue;Plane;F-15C;Pilot #071;Red;Plane;Su-27;Pilot #039;1;5 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:39:25;PL12;;DESTROY_SCORE;Red;Plane;AJS37;Pilot #110;Blue;Vehicle;Soldier M249;X33;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:13:13;PL6;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Vehicle;M-1 Abrams;Unit #009;1;3 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:17:07;PL6;;HIT_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Vehicle;M-2 Bradley;Unit #007;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:18:29;PL19;PL18;HIT_SCORE;Blue;Plane;F-15C;Pilot #024;Red;Plane;Su-25T;Pilot #059;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:22:05;PL16;PL2;HIT_SCORE;Red;Plane;Su-27;Pilot #044;Blue;Plane;F-15C;Pilot #071;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:22:26;PL19;PL20;DESTROY_SCORE;Blue;Plane;F-15C;Pilot #024;Red;Plane;A-10C;Pilot #057;1;2 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:55:13;PL6;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Vehicle;M1128 Stryker MGS;Unit #010;1;1,5 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:55:54;PL11;;HIT_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;AAV7;Unit #005;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:21:26;PL6;PL19;HIT_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Plane;F-15C;Pilot #024;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:09:27;PL3;PL13;HIT_SCORE;Blue;Plane;F-15C;Pilot #018;Red;Plane;Su-27;Pilot #086;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:57:05;PL15;PL1;DESTROY_SCORE;Red;Plane;Su-27;Pilot #041;Blue;Plane;F-15C;Pilot #069;1;5 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:53:23;PL11;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;MLRS;Unit #511;1;2 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:47:44;PL16;PL26;HIT_SCORE;Red;Plane;Su-27;Pilot #044;Blue;Plane;F-15C;Pilot #068;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:40:04;PL19;PL12;HIT_SCORE;Blue;Plane;F-15C;Pilot #024;Red;Plane;AJS37;Pilot #110;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:41:24;PL20;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #057;Blue;Vehicle;Soldier M4;X36;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:07:56;PL6;;HIT_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Vehicle;M-109;Unit #512;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:41:24;PL20;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #057;Blue;Vehicle;Soldier M249;Unit #310;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:39:25;PL12;;HIT_SCORE;Red;Plane;AJS37;Pilot #110;Blue;Vehicle;Soldier M4;Unit #450;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:46:45;PL11;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;Soldier M4;Unit #469;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:54:26;PL1;PL13;DESTROY_SCORE;Blue;Plane;F-15C;Pilot #069;Red;Plane;Su-27;Pilot #086;1;5 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:13:29;PL4;;DESTROY_SCORE;Red;Plane;AJS37;Pilot #112;Blue;Structure;Warehouse;AMMO SENAKI;1;50 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:56:32;PL11;;HIT_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;M-109;Unit #014;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:55:49;PL16;PL2;HIT_SCORE;Red;Plane;Su-27;Pilot #044;Blue;Plane;F-15C;Pilot #071;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:17:00;PL6;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Vehicle;Vulcan;Unit #004;1;4 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:47:55;PL10;PL19;HIT_SCORE;Red;Plane;Su-27;Pilot #039;Blue;Plane;F-15C;Pilot #024;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:29:20;PL9;PL10;HIT_SCORE;Blue;Plane;F-15C;Pilot #017;Red;Plane;Su-27;Pilot #039;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:46:45;PL11;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;Soldier M4;Unit #470;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:54:58;PL11;;HIT_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;AAV7;Unit #005;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:48:15;PL11;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;Vulcan;Unit #503;1;4 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:22:05;PL7;PL2;DESTROY_SCORE;Red;Plane;M-2000C;Pilot #037;Blue;Plane;F-15C;Pilot #071;1;3 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:19:55;PL24;PL18;HIT_SCORE;Blue;Plane;F-15C;Pilot #033;Red;Plane;Su-25T;Pilot #059;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:45:32;PL7;;DESTROY_SCORE;Red;Plane;M-2000C;Pilot #037;Blue;Structure;Windsock;logistic10;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:41:22;PL20;;HIT_SCORE;Red;Plane;A-10C;Pilot #057;Blue;Vehicle;Soldier M4;Unit #308;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:47:30;;;CAPTURE KOBULETI;Red;;;;NA;NA;NA;NA;1;50 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:55:13;PL11;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;M1128 Stryker MGS;Unit #010;1;1,5 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:20:05;PL17;PL18;DESTROY_SCORE;Blue;;;;Red;Plane;Su-25T;Pilot #059;1;1,67 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:22:42;PL23;PL22;HIT_SCORE;Red;Plane;M-2000C;Pilot #038;Blue;Plane;F-15C;Pilot #070;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:46:42;PL11;;HIT_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;Soldier M4;Unit #469;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:37:08;PL18;;DESTROY_SCORE;Red;Plane;Su-25T;Pilot #059;Blue;Vehicle;Hawk sr;Unit #118;1;5 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:40:12;PL19;PL12;DESTROY_SCORE;Blue;Plane;F-15C;Pilot #024;Red;Plane;AJS37;Pilot #110;1;4 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:50:48;PL20;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #057;Blue;Vehicle;Vulcan;Unit #095;1;4 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:45:31;PL7;;HIT_SCORE;Red;Plane;M-2000C;Pilot #037;Blue;Vehicle;outpost;outpost1;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:25:15;PL5;;HIT_PENALTY;Red;Helicopter;Ka-50;MEDEVAC RED #13;Red;Vehicle;Infantry AK;Wounded Pilot #1143;1;-10 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:13:29;PL4;;HIT_SCORE;Red;;;;;Scenery;Warehouse;AMMO SENAKI;1;0 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:20:05;PL2;PL18;DESTROY_SCORE;Blue;Plane;F-15C;Pilot #071;Red;Plane;Su-25T;Pilot #059;1;1,67 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:45:32;PL7;;HIT_SCORE;Red;;;;;Scenery;Windsock;logistic10;1;0 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:39:25;PL12;;HIT_SCORE;Red;Plane;AJS37;Pilot #110;Blue;Vehicle;Soldier M249;X33;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:52:37;PL11;;HIT_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;Vulcan;Unit #508;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:47:58;PL2;PL10;HIT_SCORE;Blue;Plane;F-15C;Pilot #071;Red;Plane;Su-27;Pilot #039;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:56:35;PL15;PL1;HIT_SCORE;Red;Plane;Su-27;Pilot #041;Blue;Plane;F-15C;Pilot #069;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:41:25;PL20;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #057;Blue;Vehicle;Soldier M4;Unit #308;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:32:57;PL9;PL25;DESTROY_SCORE;Blue;Plane;F-15C;Pilot #017;Red;Plane;Su-27;Pilot #043;1;5 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:18:23;PL6;;HIT_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Vehicle;M-2 Bradley;Unit #007;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:21:14;PL16;PL1;HIT_SCORE;Red;Plane;Su-27;Pilot #044;Blue;Plane;F-15C;Pilot #069;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:22:47;PL9;PL6;DESTROY_SCORE;Blue;Plane;F-15C;Pilot #017;Red;Plane;A-10C;Pilot #056;1;2 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:23:16;PL5;PL5;HIT_PENALTY;Red;Helicopter;Mi-8MT;MEDEVAC RED #10;Red;Helicopter;Mi-8MT;MEDEVAC RED #10;1;-10 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:21:03;PL19;PL6;HIT_SCORE;Blue;Plane;F-15C;Pilot #024;Red;Plane;A-10C;Pilot #056;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:46:24;PL6;;HIT_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Vehicle;M-2 Bradley;Unit #007;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:21:17;PL11;PL27;HIT_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Plane;F-15C;Pilot #025;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:18:22;PL6;;HIT_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Vehicle;M-2 Bradley;Unit #007;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:52:37;PL11;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;Vulcan;Unit #508;1;4 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:19:30;PL6;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Vehicle;M-113;Unit #006;1;2 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:41:22;PL20;;HIT_SCORE;Red;Plane;A-10C;Pilot #057;Blue;Vehicle;Soldier M249;Unit #310;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:22:46;PL9;PL11;DESTROY_SCORE;Blue;Plane;F-15C;Pilot #017;Red;Plane;A-10C;Pilot #054;1;4 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:36:57;PL18;;HIT_SCORE;Red;Plane;Su-25T;Pilot #059;Blue;Vehicle;Hawk sr;Unit #118;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:41:22;PL20;;HIT_SCORE;Red;Plane;A-10C;Pilot #057;Blue;Vehicle;Soldier M249;Unit #311;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:22:26;PL11;;HIT_SCORE;Red;;;;;Scenery;KAZARMA2;270090725;1;0 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:37:07;PL11;;HIT_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;Osa 9A33 ln;Unit #218;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:18:46;;;CAPTURE KUTAISI;Red;;;;NA;NA;NA;NA;1;50 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:33:20;PL9;PL15;HIT_SCORE;Blue;Plane;F-15C;Pilot #017;Red;Plane;Su-27;Pilot #041;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:10:10;PL6;PL3;DESTROY_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Plane;F-15C;Pilot #018;1;6 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:13:23;PL6;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Vehicle;M-2 Bradley;Unit #008;1;3 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:56:08;PL11;PL26;DESTROY_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Plane;F-15C;Pilot #025;1;6 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:14:23;PL7;PL17;HIT_SCORE;Red;Plane;M-2000C;Pilot #037;Blue;Plane;M-2000C;Pilot #029;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:22:47;PL19;PL6;DESTROY_SCORE;Blue;Plane;F-15C;Pilot #024;Red;Plane;A-10C;Pilot #056;1;2 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:50:37;PL20;;HIT_SCORE;Red;Plane;A-10C;Pilot #057;Blue;Vehicle;Vulcan;Unit #015;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:22:26;PL9;PL20;DESTROY_SCORE;Blue;Plane;F-15C;Pilot #017;Red;Plane;A-10C;Pilot #057;1;2 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:57:05;PL2;PL1;DESTROY_PENALTY;Blue;Plane;F-15C;Pilot #071;Blue;Plane;F-15C;Pilot #069;1;-15 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:56:44;PL11;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;M-109;Unit #014;1;2 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:22:36;PL9;PL6;HIT_SCORE;Blue;Plane;F-15C;Pilot #017;Red;Plane;A-10C;Pilot #056;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:53:12;PL11;;HIT_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;MLRS;Unit #511;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:47:56;PL20;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #057;Blue;Vehicle;M-109;Unit #013;1;2 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:22:37;PL9;PL6;HIT_SCORE;Blue;Plane;F-15C;Pilot #017;Red;Plane;A-10C;Pilot #056;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:48:04;PL11;;HIT_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;M-113;Unit #505;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:13:23;PL6;;HIT_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Vehicle;M-2 Bradley;Unit #008;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:46:42;PL11;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;Vulcan;Unit #515;1;4 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:38:22;PL18;;HIT_SCORE;Red;;;;;Scenery;M-2000C;Pilot #029;1;0 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:09:28;PL13;PL9;DESTROY_SCORE;Red;Plane;Su-27;Pilot #086;Blue;Plane;F-15C;Pilot #017;1;5 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:13:29;PL4;;DESTROY_SCORE;Red;Plane;AJS37;Pilot #112;Blue;Structure;Warehouse;AMMO SENAKI;1;50 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:48:49;PL28;;HIT_SCORE;;;;;;Scenery;Ural-4320T;Unit #150;1;0 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:40:22;PL3;PL4;DESTROY_SCORE;Blue;Plane;F-15C;Pilot #018;Red;Plane;AJS37;Pilot #112;1;4 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:39:25;PL12;;DESTROY_SCORE;Red;Plane;AJS37;Pilot #110;Blue;Vehicle;Soldier M4;Unit #450;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:14:24;PL16;PL17;HIT_SCORE;Red;Plane;Su-27;Pilot #044;Blue;Plane;M-2000C;Pilot #029;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:48:04;PL11;;HIT_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;Vulcan;Unit #503;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:00:00;;;CAPTURE GUDAUTA;Blue;;;;NA;NA;NA;NA;1;50 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:39:25;PL12;;HIT_SCORE;Red;Plane;AJS37;Pilot #110;Blue;Vehicle;Soldier stinger;Unit #454;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:13:13;PL6;;HIT_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Vehicle;M-1 Abrams;Unit #009;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:46:42;PL8;;DESTROY_SCORE;Red;Plane;Su-25T;Pilot #058;Blue;Vehicle;Strela-1 9P31;Unit #429;1;4 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:56:06;PL11;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;AAV7;Unit #005;1;2 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:48:55;PL11;;HIT_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;M-1 Abrams;Unit #514;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:53:06;PL20;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #057;Blue;Vehicle;MLRS;Unit #012;1;2 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:13:59;PL1;;HIT_SCORE;Blue;;;;;Scenery;F-15C;Pilot #071;1;0 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:25:17;PL5;;HIT_PENALTY;Red;Helicopter;Ka-50;MEDEVAC RED #13;Red;Vehicle;Infantry AK;Wounded Pilot #1143;1;-10 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:39:25;PL12;;HIT_SCORE;Red;Plane;AJS37;Pilot #110;Blue;Vehicle;Soldier M4;Unit #451;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:25:20;PL5;;HIT_PENALTY;Red;Helicopter;Ka-50;MEDEVAC RED #13;Red;Vehicle;Infantry AK;Wounded Pilot #1143;1;-10 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:53:14;PL13;PL14;DESTROY_SCORE;Red;Plane;Su-27;Pilot #086;Blue;Plane;M-2000C;Pilot #030;1;5 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:50:48;PL20;;HIT_SCORE;Red;Plane;A-10C;Pilot #057;Blue;Vehicle;Vulcan;Unit #095;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:45:31;PL7;;DESTROY_SCORE;Red;Plane;M-2000C;Pilot #037;Blue;Vehicle;outpost;outpost1;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:39:25;PL12;;HIT_SCORE;Red;Plane;AJS37;Pilot #110;Blue;Vehicle;outpost;outpost2;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:19:37;PL8;;HIT_SCORE;Red;Plane;Su-25T;Pilot #058;Blue;Vehicle;Hawk cwar;Unit #114;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:18:36;PL19;PL18;DESTROY_SCORE;Blue;Plane;F-15C;Pilot #024;Red;Plane;Su-25T;Pilot #059;1;4 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:07:56;PL6;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Vehicle;M-109;Unit #512;1;2 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:39:25;;;SEALS 4;Blue;;;;NA;NA;NA;NA;1;50 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:39:19;PL12;;HIT_SCORE;Red;;;;;Scenery;BLK_LIGHT_POLE;269633408;1;0 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:41:24;PL20;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #057;Blue;Vehicle;Soldier M249;Unit #311;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:20:05;PL24;PL18;DESTROY_SCORE;Blue;Plane;F-15C;Pilot #033;Red;Plane;Su-25T;Pilot #059;1;1,67 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:46:42;PL11;;HIT_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;Vulcan;Unit #515;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:09:37;PL3;PL13;DESTROY_SCORE;Blue;Plane;F-15C;Pilot #018;Red;Plane;Su-27;Pilot #086;1;5 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:48:04;PL11;;HIT_SCORE;Red;;;;;Scenery;BLK_LIGHT_POLE;269963637;1;0 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:41:24;;;SEALS 1;Blue;;;;NA;NA;NA;NA;1;50 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:11:14;PL4;;HIT_SCORE;Red;;;;;Scenery;UKRYTIE;280476;1;0 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:53:06;PL20;;HIT_SCORE;Red;Plane;A-10C;Pilot #057;Blue;Vehicle;MLRS;Unit #012;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:32:54;PL9;PL25;HIT_SCORE;Blue;Plane;F-15C;Pilot #017;Red;Plane;Su-27;Pilot #043;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:55:01;PL11;;HIT_SCORE;Red;Plane;A-10C;Pilot #054;Blue;Vehicle;M1128 Stryker MGS;Unit #010;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:39:25;PL12;;DESTROY_SCORE;Red;Plane;AJS37;Pilot #110;Blue;Vehicle;Soldier M4;Unit #451;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:47:56;PL20;;HIT_SCORE;Red;Plane;A-10C;Pilot #057;Blue;Vehicle;M-109;Unit #013;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:18:25;PL19;PL18;HIT_SCORE;Blue;Plane;F-15C;Pilot #024;Red;Plane;Su-25T;Pilot #059;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:41:22;PL20;;HIT_SCORE;Red;Plane;A-10C;Pilot #057;Blue;Vehicle;Soldier M4;X36;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:18:24;PL19;PL18;HIT_SCORE;Blue;Plane;F-15C;Pilot #024;Red;Plane;Su-25T;Pilot #059;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:21:17;PL19;PL20;HIT_SCORE;Blue;Plane;F-15C;Pilot #024;Red;Plane;A-10C;Pilot #057;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:23:03;PL23;PL22;DESTROY_SCORE;Red;Plane;M-2000C;Pilot #038;Blue;Plane;F-15C;Pilot #070;1;6 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:17:00;PL6;;HIT_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Vehicle;Vulcan;Unit #004;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:45:40;PL6;;HIT_SCORE;Red;Plane;A-10C;Pilot #056;Blue;Vehicle;M1128 Stryker MGS;Unit #010;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:09:18;PL13;;HIT_SCORE;Red;;;;;Scenery;KORPUS_B1;269962308;1;0 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:33:24;PL9;PL15;DESTROY_SCORE;Blue;Plane;F-15C;Pilot #017;Red;Plane;Su-27;Pilot #041;1;5 -TAW_CSARz_PALACE_3.6136;7/05/2017;1:39:27;PL12;;DESTROY_SCORE;Red;Plane;AJS37;Pilot #110;Blue;Vehicle;Soldier M249;Unit #453;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:21:53;PL9;PL11;HIT_SCORE;Blue;Plane;F-15C;Pilot #017;Red;Plane;A-10C;Pilot #054;1;1 -TAW_CSARz_PALACE_3.6136;7/05/2017;12:50:37;PL20;;DESTROY_SCORE;Red;Plane;A-10C;Pilot #057;Blue;Vehicle;Vulcan;Unit #015;1;4 diff --git a/Moose Development/Documentation/Scoring/Scoring Sample.xlsx b/Moose Development/Documentation/Scoring/Scoring Sample.xlsx deleted file mode 100644 index 4aca4870c..000000000 Binary files a/Moose Development/Documentation/Scoring/Scoring Sample.xlsx and /dev/null differ diff --git a/Moose Development/LDT External Tools/Moose DOCUMENTATION Generate.launch b/Moose Development/LDT External Tools/Moose DOCUMENTATION Generate.launch deleted file mode 100644 index f652d09d7..000000000 --- a/Moose Development/LDT External Tools/Moose DOCUMENTATION Generate.launch +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/Moose Development/LDT External Tools/Moose LOADER Generate Dynamic Moose.lua.launch b/Moose Development/LDT External Tools/Moose LOADER Generate Dynamic Moose.lua.launch deleted file mode 100644 index b638009bb..000000000 --- a/Moose Development/LDT External Tools/Moose LOADER Generate Dynamic Moose.lua.launch +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/Moose Development/LDT External Tools/Moose LOADER Generate Static Moose.lua.launch b/Moose Development/LDT External Tools/Moose LOADER Generate Static Moose.lua.launch deleted file mode 100644 index 4da52623c..000000000 --- a/Moose Development/LDT External Tools/Moose LOADER Generate Static Moose.lua.launch +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/Moose Development/LDT External Tools/Moose UPDATE ALL MOOSE Demonstration Missions.launch b/Moose Development/LDT External Tools/Moose UPDATE ALL MOOSE Demonstration Missions.launch deleted file mode 100644 index 570f68b6e..000000000 --- a/Moose Development/LDT External Tools/Moose UPDATE ALL MOOSE Demonstration Missions.launch +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/Moose Development/LDT External Tools/Moose UPDATE SELECTED Missions.launch b/Moose Development/LDT External Tools/Moose UPDATE SELECTED Missions.launch deleted file mode 100644 index 6c6acfad3..000000000 --- a/Moose Development/LDT External Tools/Moose UPDATE SELECTED Missions.launch +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/Moose Development/Maths/Aspect.ggb b/Moose Development/Maths/Aspect.ggb deleted file mode 100644 index be76e89b2..000000000 Binary files a/Moose Development/Maths/Aspect.ggb and /dev/null differ diff --git a/Moose Development/Maths/Bearing calculation.ggb b/Moose Development/Maths/Bearing calculation.ggb deleted file mode 100644 index affc37c06..000000000 Binary files a/Moose Development/Maths/Bearing calculation.ggb and /dev/null differ diff --git a/Moose Development/Maths/Distance.ggb b/Moose Development/Maths/Distance.ggb deleted file mode 100644 index dc32fd5af..000000000 Binary files a/Moose Development/Maths/Distance.ggb and /dev/null differ diff --git a/Moose Development/Maths/MOOSE - ESCORT - Velocity and Direction Vector Calculation.ggb b/Moose Development/Maths/MOOSE - ESCORT - Velocity and Direction Vector Calculation.ggb deleted file mode 100644 index 89cb1efed..000000000 Binary files a/Moose Development/Maths/MOOSE - ESCORT - Velocity and Direction Vector Calculation.ggb and /dev/null differ diff --git a/Moose Development/Maths/Probability factor models for Detection.xlsx b/Moose Development/Maths/Probability factor models for Detection.xlsx deleted file mode 100644 index 300f24e1e..000000000 Binary files a/Moose Development/Maths/Probability factor models for Detection.xlsx and /dev/null differ diff --git a/Moose Development/Maths/Scoring.xlsx b/Moose Development/Maths/Scoring.xlsx deleted file mode 100644 index aea394565..000000000 Binary files a/Moose Development/Maths/Scoring.xlsx and /dev/null differ diff --git a/Moose Development/Maths/Task Templates.xlsx b/Moose Development/Maths/Task Templates.xlsx deleted file mode 100644 index 0c2e0acb2..000000000 Binary files a/Moose Development/Maths/Task Templates.xlsx and /dev/null differ diff --git a/Moose Development/Old/DeployTask.lua b/Moose Development/Old/DeployTask.lua deleted file mode 100644 index 5a346b3f9..000000000 --- a/Moose Development/Old/DeployTask.lua +++ /dev/null @@ -1,158 +0,0 @@ ---- A DEPLOYTASK orchestrates the deployment of CARGO within a specific landing zone. --- @module DEPLOYTASK - - - ---- A DeployTask --- @type DEPLOYTASK -DEPLOYTASK = { - ClassName = "DEPLOYTASK", - TEXT = { "Deploy", "deployed", "unloaded" }, - GoalVerb = "Deployment" -} - - ---- Creates a new DEPLOYTASK object, which models the sequence of STAGEs to unload a cargo. --- @function [parent=#DEPLOYTASK] New --- @param #string CargoType Type of the Cargo. --- @return #DEPLOYTASK The created DeployTask -function DEPLOYTASK:New( CargoType ) - local self = BASE:Inherit( self, TASK:New() ) - self:F() - - local Valid = true - - if Valid then - self.Name = 'Deploy Cargo' - self.TaskBriefing = "Fly to one of the indicated landing zones and deploy " .. CargoType .. ". Your co-pilot will provide you with the directions (required flight angle in degrees) and the distance (in km) to the deployment zone." - self.CargoType = CargoType - self.GoalVerb = CargoType .. " " .. self.GoalVerb - self.Stages = { STAGE_CARGO_INIT:New(), STAGE_CARGO_LOAD:New(), STAGEBRIEF:New(), STAGESTART:New(), STAGEROUTE:New(), STAGELANDING:New(), STAGELANDED:New(), STAGEUNLOAD:New(), STAGEDONE:New() } - self.SetStage( self, 1 ) - end - - return self -end - -function DEPLOYTASK:ToZone( LandingZone ) - self:F() - - self.LandingZones.LandingZoneNames[LandingZone.CargoZoneName] = LandingZone.CargoZoneName - self.LandingZones.LandingZones[LandingZone.CargoZoneName] = LandingZone - - return self -end - - -function DEPLOYTASK:InitCargo( InitCargos ) - self:F( { InitCargos } ) - - if type( InitCargos ) == "table" then - self.Cargos.InitCargos = InitCargos - else - self.Cargos.InitCargos = { InitCargos } - end - - return self -end - - -function DEPLOYTASK:LoadCargo( LoadCargos ) - self:F( { LoadCargos } ) - - if type( LoadCargos ) == "table" then - self.Cargos.LoadCargos = LoadCargos - else - self.Cargos.LoadCargos = { LoadCargos } - end - - return self -end - - ---- When the cargo is unloaded, it will move to the target zone name. --- @param string TargetZoneName Name of the Zone to where the Cargo should move after unloading. -function DEPLOYTASK:SetCargoTargetZoneName( TargetZoneName ) - self:F() - - local Valid = true - - Valid = routines.ValidateString( TargetZoneName, "TargetZoneName", Valid ) - - if Valid then - self.TargetZoneName = TargetZoneName - end - - return Valid - -end - -function DEPLOYTASK:AddCargoMenus( Client, Cargos, TransportRadius ) - self:F() - - local ClientGroupID = Client:GetClientGroupID() - - self:T( ClientGroupID ) - - for CargoID, Cargo in pairs( Cargos ) do - - self:T( { Cargo.ClassName, Cargo.CargoName, Cargo.CargoType, Cargo.CargoWeight } ) - - if Cargo:IsStatusLoaded() and Client == Cargo:IsLoadedInClient() then - - if Client._Menus[Cargo.CargoType] == nil then - Client._Menus[Cargo.CargoType] = {} - end - - if not Client._Menus[Cargo.CargoType].DeployMenu then - Client._Menus[Cargo.CargoType].DeployMenu = missionCommands.addSubMenuForGroup( - ClientGroupID, - self.TEXT[1] .. " " .. Cargo.CargoType, - nil - ) - self:T( 'Added DeployMenu ' .. self.TEXT[1] ) - end - - if Client._Menus[Cargo.CargoType].DeploySubMenus == nil then - Client._Menus[Cargo.CargoType].DeploySubMenus = {} - end - - if Client._Menus[Cargo.CargoType].DeployMenu == nil then - self:T( 'deploymenu is nil' ) - end - - Client._Menus[Cargo.CargoType].DeploySubMenus[ #Client._Menus[Cargo.CargoType].DeploySubMenus + 1 ] = missionCommands.addCommandForGroup( - ClientGroupID, - Cargo.CargoName .. " ( " .. Cargo.CargoWeight .. "kg )", - Client._Menus[Cargo.CargoType].DeployMenu, - self.MenuAction, - { ReferenceTask = self, CargoTask = Cargo } - ) - self:T( 'Added DeploySubMenu ' .. Cargo.CargoType .. ":" .. Cargo.CargoName .. " ( " .. Cargo.CargoWeight .. "kg )" ) - end - end - -end - -function DEPLOYTASK:RemoveCargoMenus( Client ) - self:F() - - local ClientGroupID = Client:GetClientGroupID() - self:T( ClientGroupID ) - - for MenuID, MenuData in pairs( Client._Menus ) do - if MenuData.DeploySubMenus ~= nil then - for SubMenuID, SubMenuData in pairs( MenuData.DeploySubMenus ) do - missionCommands.removeItemForGroup( ClientGroupID, SubMenuData ) - self:T( "Removed DeploySubMenu " ) - SubMenuData = nil - end - end - if MenuData.DeployMenu then - missionCommands.removeItemForGroup( ClientGroupID, MenuData.DeployMenu ) - self:T( "Removed DeployMenu " ) - MenuData.DeployMenu = nil - end - end - -end diff --git a/Moose Development/Old/DestroyBaseTask.lua b/Moose Development/Old/DestroyBaseTask.lua deleted file mode 100644 index 1c1194d58..000000000 --- a/Moose Development/Old/DestroyBaseTask.lua +++ /dev/null @@ -1,81 +0,0 @@ ---- A DESTROYBASETASK will monitor the destruction of Groups and Units. This is a BASE class, other classes are derived from this class. --- @module DESTROYBASETASK --- @see DESTROYGROUPSTASK --- @see DESTROYUNITTYPESTASK --- @see DESTROY_RADARS_TASK - - - ---- The DESTROYBASETASK class --- @type DESTROYBASETASK -DESTROYBASETASK = { - ClassName = "DESTROYBASETASK", - Destroyed = 0, - GoalVerb = "Destroy", - DestroyPercentage = 100, -} - ---- Creates a new DESTROYBASETASK. --- @param #DESTROYBASETASK self --- @param #string DestroyGroupType Text describing the group to be destroyed. f.e. "Radar Installations", "Ships", "Vehicles", "Command Centers". --- @param #string DestroyUnitType Text describing the unit types to be destroyed. f.e. "SA-6", "Row Boats", "Tanks", "Tents". --- @param #list<#string> DestroyGroupPrefixes Table of Prefixes of the Groups to be destroyed before task is completed. --- @param #number DestroyPercentage defines the %-tage that needs to be destroyed to achieve mission success. eg. If in the Group there are 10 units, then a value of 75 would require 8 units to be destroyed from the Group to complete the @{TASK}. --- @return DESTROYBASETASK -function DESTROYBASETASK:New( DestroyGroupType, DestroyUnitType, DestroyGroupPrefixes, DestroyPercentage ) - local self = BASE:Inherit( self, TASK:New() ) - self:F() - - self.Name = 'Destroy' - self.Destroyed = 0 - self.DestroyGroupPrefixes = DestroyGroupPrefixes - self.DestroyGroupType = DestroyGroupType - self.DestroyUnitType = DestroyUnitType - if DestroyPercentage then - self.DestroyPercentage = DestroyPercentage - end - self.TaskBriefing = "Task: Destroy " .. DestroyGroupType .. "." - self.Stages = { STAGEBRIEF:New(), STAGESTART:New(), STAGEGROUPSDESTROYED:New(), STAGEDONE:New() } - self.SetStage( self, 1 ) - - return self -end - ---- Handle the S_EVENT_DEAD events to validate the destruction of units for the task monitoring. --- @param #DESTROYBASETASK self --- @param Core.Event#EVENTDATA Event structure of MOOSE. -function DESTROYBASETASK:EventDead( Event ) - self:F( { Event } ) - - if Event.IniDCSUnit then - local DestroyUnit = Event.IniDCSUnit - local DestroyUnitName = Event.IniDCSUnitName - local DestroyGroup = Event.IniDCSGroup - local DestroyGroupName = Event.IniDCSGroupName - - --TODO: I need to fix here if 2 groups in the mission have a similar name with GroupPrefix equal, then i should differentiate for which group the goal was reached! - --I may need to test if for the goalverb that group goal was reached or something. Need to think about it a bit more ... - local UnitsDestroyed = 0 - for DestroyGroupPrefixID, DestroyGroupPrefix in pairs( self.DestroyGroupPrefixes ) do - self:T( DestroyGroupPrefix ) - if string.find( DestroyGroupName, DestroyGroupPrefix, 1, true ) then - self:T( BASE:Inherited(self).ClassName ) - UnitsDestroyed = self:ReportGoalProgress( DestroyGroup, DestroyUnit ) - self:T( UnitsDestroyed ) - end - end - - self:T( { UnitsDestroyed } ) - self:IncreaseGoalCount( UnitsDestroyed, self.GoalVerb ) - end - -end - ---- Validate task completeness of DESTROYBASETASK. --- @param DestroyGroup Group structure describing the group to be evaluated. --- @param DestroyUnit Unit structure describing the Unit to be evaluated. -function DESTROYBASETASK:ReportGoalProgress( DestroyGroup, DestroyUnit ) - self:F() - - return 0 -end diff --git a/Moose Development/Old/DestroyGroupsTask.lua b/Moose Development/Old/DestroyGroupsTask.lua deleted file mode 100644 index 5f2dd6332..000000000 --- a/Moose Development/Old/DestroyGroupsTask.lua +++ /dev/null @@ -1,57 +0,0 @@ ---- DESTROYGROUPSTASK --- @module DESTROYGROUPSTASK - - - ---- The DESTROYGROUPSTASK class --- @type -DESTROYGROUPSTASK = { - ClassName = "DESTROYGROUPSTASK", - GoalVerb = "Destroy Groups", -} - ---- Creates a new DESTROYGROUPSTASK. --- @param #DESTROYGROUPSTASK self --- @param #string DestroyGroupType String describing the group to be destroyed. --- @param #string DestroyUnitType String describing the unit to be destroyed. --- @param #list<#string> DestroyGroupNames Table of string containing the name of the groups to be destroyed before task is completed. --- @param #number DestroyPercentage defines the %-tage that needs to be destroyed to achieve mission success. eg. If in the Group there are 10 units, then a value of 75 would require 8 units to be destroyed from the Group to complete the @{TASK}. ----@return DESTROYGROUPSTASK -function DESTROYGROUPSTASK:New( DestroyGroupType, DestroyUnitType, DestroyGroupNames, DestroyPercentage ) - local self = BASE:Inherit( self, DESTROYBASETASK:New( DestroyGroupType, DestroyUnitType, DestroyGroupNames, DestroyPercentage ) ) - self:F() - - self.Name = 'Destroy Groups' - self.GoalVerb = "Destroy " .. DestroyGroupType - - _EVENTDISPATCHER:OnDead( self.EventDead , self ) - _EVENTDISPATCHER:OnCrash( self.EventDead , self ) - - return self -end - ---- Report Goal Progress. --- @param #DESTROYGROUPSTASK self --- @param Dcs.DCSWrapper.Group#Group DestroyGroup Group structure describing the group to be evaluated. --- @param Dcs.DCSWrapper.Unit#Unit DestroyUnit Unit structure describing the Unit to be evaluated. --- @return #number The DestroyCount reflecting the amount of units destroyed within the group. -function DESTROYGROUPSTASK:ReportGoalProgress( DestroyGroup, DestroyUnit ) - self:F( { DestroyGroup, DestroyUnit, self.DestroyPercentage } ) - - local DestroyGroupSize = DestroyGroup:getSize() - 1 -- When a DEAD event occurs, the getSize is still one larger than the destroyed unit. - local DestroyGroupInitialSize = DestroyGroup:getInitialSize() - self:T( { DestroyGroupSize, DestroyGroupInitialSize - ( DestroyGroupInitialSize * self.DestroyPercentage / 100 ) } ) - - local DestroyCount = 0 - if DestroyGroup then - if DestroyGroupSize <= DestroyGroupInitialSize - ( DestroyGroupInitialSize * self.DestroyPercentage / 100 ) then - DestroyCount = 1 - end - else - DestroyCount = 1 - end - - self:T( DestroyCount ) - - return DestroyCount -end diff --git a/Moose Development/Old/DestroyRadarsTask.lua b/Moose Development/Old/DestroyRadarsTask.lua deleted file mode 100644 index 3b1ac5167..000000000 --- a/Moose Development/Old/DestroyRadarsTask.lua +++ /dev/null @@ -1,41 +0,0 @@ ---- Task class to destroy radar installations. --- @module DESTROYRADARSTASK - - - ---- The DESTROYRADARS class --- @type -DESTROYRADARSTASK = { - ClassName = "DESTROYRADARSTASK", - GoalVerb = "Destroy Radars" -} - ---- Creates a new DESTROYRADARSTASK. --- @param table{string,...} DestroyGroupNames Table of string containing the group names of which the radars are be destroyed. --- @return DESTROYRADARSTASK -function DESTROYRADARSTASK:New( DestroyGroupNames ) - local self = BASE:Inherit( self, DESTROYGROUPSTASK:New( 'radar installations', 'radars', DestroyGroupNames ) ) - self:F() - - self.Name = 'Destroy Radars' - - _EVENTDISPATCHER:OnDead( self.EventDead , self ) - - return self -end - ---- Report Goal Progress. --- @param Group DestroyGroup Group structure describing the group to be evaluated. --- @param Unit DestroyUnit Unit structure describing the Unit to be evaluated. -function DESTROYRADARSTASK:ReportGoalProgress( DestroyGroup, DestroyUnit ) - self:F( { DestroyGroup, DestroyUnit } ) - - local DestroyCount = 0 - if DestroyUnit and DestroyUnit:hasSensors( Unit.SensorType.RADAR, Unit.RadarType.AS ) then - if DestroyUnit and DestroyUnit:getLife() <= 1.0 then - self:T( 'Destroyed a radar' ) - DestroyCount = 1 - end - end - return DestroyCount -end diff --git a/Moose Development/Old/DestroyUnitTypesTask.lua b/Moose Development/Old/DestroyUnitTypesTask.lua deleted file mode 100644 index c8683fc6c..000000000 --- a/Moose Development/Old/DestroyUnitTypesTask.lua +++ /dev/null @@ -1,52 +0,0 @@ ---- Set TASK to destroy certain unit types. --- @module DESTROYUNITTYPESTASK - - - ---- The DESTROYUNITTYPESTASK class --- @type -DESTROYUNITTYPESTASK = { - ClassName = "DESTROYUNITTYPESTASK", - GoalVerb = "Destroy", -} - ---- Creates a new DESTROYUNITTYPESTASK. --- @param string DestroyGroupType String describing the group to be destroyed. f.e. "Radar Installations", "Fleet", "Batallion", "Command Centers". --- @param string DestroyUnitType String describing the unit to be destroyed. f.e. "radars", "ships", "tanks", "centers". --- @param table{string,...} DestroyGroupNames Table of string containing the group names of which the radars are be destroyed. --- @param string DestroyUnitTypes Table of string containing the type names of the units to achieve mission success. --- @return DESTROYUNITTYPESTASK -function DESTROYUNITTYPESTASK:New( DestroyGroupType, DestroyUnitType, DestroyGroupNames, DestroyUnitTypes ) - local self = BASE:Inherit( self, DESTROYBASETASK:New( DestroyGroupType, DestroyUnitType, DestroyGroupNames ) ) - self:F( { DestroyGroupType, DestroyUnitType, DestroyGroupNames, DestroyUnitTypes } ) - - if type(DestroyUnitTypes) == 'table' then - self.DestroyUnitTypes = DestroyUnitTypes - else - self.DestroyUnitTypes = { DestroyUnitTypes } - end - - self.Name = 'Destroy Unit Types' - self.GoalVerb = "Destroy " .. DestroyGroupType - - _EVENTDISPATCHER:OnDead( self.EventDead , self ) - - return self -end - ---- Report Goal Progress. --- @param Group DestroyGroup Group structure describing the group to be evaluated. --- @param Unit DestroyUnit Unit structure describing the Unit to be evaluated. -function DESTROYUNITTYPESTASK:ReportGoalProgress( DestroyGroup, DestroyUnit ) - self:F( { DestroyGroup, DestroyUnit } ) - - local DestroyCount = 0 - for UnitTypeID, UnitType in pairs( self.DestroyUnitTypes ) do - if DestroyUnit and DestroyUnit:getTypeName() == UnitType then - if DestroyUnit and DestroyUnit:getLife() <= 1.0 then - DestroyCount = DestroyCount + 1 - end - end - end - return DestroyCount -end diff --git a/Moose Development/Old/GoHomeTask.lua b/Moose Development/Old/GoHomeTask.lua deleted file mode 100644 index 35461ea34..000000000 --- a/Moose Development/Old/GoHomeTask.lua +++ /dev/null @@ -1,33 +0,0 @@ ---- A GOHOMETASK orchestrates the travel back to the home base, which is a specific zone defined within the ME. --- @module GOHOMETASK - ---- The GOHOMETASK class --- @type -GOHOMETASK = { - ClassName = "GOHOMETASK", -} - ---- Creates a new GOHOMETASK. --- @param table{string,...}|string LandingZones Table of Landing Zone names where Home(s) are located. --- @return GOHOMETASK -function GOHOMETASK:New( LandingZones ) - local self = BASE:Inherit( self, TASK:New() ) - self:F( { LandingZones } ) - local Valid = true - - Valid = routines.ValidateZone( LandingZones, "LandingZones", Valid ) - - if Valid then - self.Name = 'Fly Home' - self.TaskBriefing = "Task: Fly back to your home base. Your co-pilot will provide you with the directions (required flight angle in degrees) and the distance (in km) to your home base." - if type( LandingZones ) == "table" then - self.LandingZones = LandingZones - else - self.LandingZones = { LandingZones } - end - self.Stages = { STAGEBRIEF:New(), STAGESTART:New(), STAGEROUTE:New(), STAGEARRIVE:New(), STAGEDONE:New() } - self.SetStage( self, 1 ) - end - - return self -end diff --git a/Moose Development/Old/NoTask.lua b/Moose Development/Old/NoTask.lua deleted file mode 100644 index f3fa13554..000000000 --- a/Moose Development/Old/NoTask.lua +++ /dev/null @@ -1,25 +0,0 @@ ---- A NOTASK is a dummy activity... But it will show a Mission Briefing... --- @module NOTASK - ---- The NOTASK class --- @type -NOTASK = { - ClassName = "NOTASK", -} - ---- Creates a new NOTASK. -function NOTASK:New() - local self = BASE:Inherit( self, TASK:New() ) - self:F() - - local Valid = true - - if Valid then - self.Name = 'Nothing' - self.TaskBriefing = "Task: Execute your mission." - self.Stages = { STAGEBRIEF:New(), STAGESTART:New(), STAGEDONE:New() } - self.SetStage( self, 1 ) - end - - return self -end diff --git a/Moose Development/Old/PickupTask.lua b/Moose Development/Old/PickupTask.lua deleted file mode 100644 index 84593c751..000000000 --- a/Moose Development/Old/PickupTask.lua +++ /dev/null @@ -1,153 +0,0 @@ ---- A PICKUPTASK orchestrates the loading of CARGO at a specific landing zone. --- @module PICKUPTASK --- @parent TASK - ---- The PICKUPTASK class --- @type -PICKUPTASK = { - ClassName = "PICKUPTASK", - TEXT = { "Pick-Up", "picked-up", "loaded" }, - GoalVerb = "Pick-Up" -} - ---- Creates a new PICKUPTASK. --- @param table{string,...}|string LandingZones Table of Zone names where Cargo is to be loaded. --- @param CARGO_TYPE CargoType Type of the Cargo. The type must be of the following Enumeration:.. --- @param number OnBoardSide Reflects from which side the cargo Group will be on-boarded on the Carrier. -function PICKUPTASK:New( CargoType, OnBoardSide ) - local self = BASE:Inherit( self, TASK:New() ) - self:F() - - -- self holds the inherited instance of the PICKUPTASK Class to the BASE class. - - local Valid = true - - if Valid then - self.Name = 'Pickup Cargo' - self.TaskBriefing = "Task: Fly to the indicated landing zones and pickup " .. CargoType .. ". Your co-pilot will provide you with the directions (required flight angle in degrees) and the distance (in km) to the pickup zone." - self.CargoType = CargoType - self.GoalVerb = CargoType .. " " .. self.GoalVerb - self.OnBoardSide = OnBoardSide - self.IsLandingRequired = true -- required to decide whether the client needs to land or not - self.IsSlingLoad = false -- Indicates whether the cargo is a sling load cargo - self.Stages = { STAGE_CARGO_INIT:New(), STAGE_CARGO_LOAD:New(), STAGEBRIEF:New(), STAGESTART:New(), STAGEROUTE:New(), STAGELANDING:New(), STAGELANDED:New(), STAGELOAD:New(), STAGEDONE:New() } - self.SetStage( self, 1 ) - end - - return self -end - -function PICKUPTASK:FromZone( LandingZone ) - self:F() - - self.LandingZones.LandingZoneNames[LandingZone.CargoZoneName] = LandingZone.CargoZoneName - self.LandingZones.LandingZones[LandingZone.CargoZoneName] = LandingZone - - return self -end - -function PICKUPTASK:InitCargo( InitCargos ) - self:F( { InitCargos } ) - - if type( InitCargos ) == "table" then - self.Cargos.InitCargos = InitCargos - else - self.Cargos.InitCargos = { InitCargos } - end - - return self -end - -function PICKUPTASK:LoadCargo( LoadCargos ) - self:F( { LoadCargos } ) - - if type( LoadCargos ) == "table" then - self.Cargos.LoadCargos = LoadCargos - else - self.Cargos.LoadCargos = { LoadCargos } - end - - return self -end - -function PICKUPTASK:AddCargoMenus( Client, Cargos, TransportRadius ) - self:F() - - for CargoID, Cargo in pairs( Cargos ) do - - self:T( { Cargo.ClassName, Cargo.CargoName, Cargo.CargoType, Cargo:IsStatusNone(), Cargo:IsStatusLoaded(), Cargo:IsStatusLoading(), Cargo:IsStatusUnLoaded() } ) - - -- If the Cargo has no status, allow the menu option. - if Cargo:IsStatusNone() or ( Cargo:IsStatusLoading() and Client == Cargo:IsLoadingToClient() ) then - - local MenuAdd = false - if Cargo:IsNear( Client, self.CurrentCargoZone ) then - MenuAdd = true - end - - if MenuAdd then - if Client._Menus[Cargo.CargoType] == nil then - Client._Menus[Cargo.CargoType] = {} - end - - if not Client._Menus[Cargo.CargoType].PickupMenu then - Client._Menus[Cargo.CargoType].PickupMenu = missionCommands.addSubMenuForGroup( - Client:GetClientGroupID(), - self.TEXT[1] .. " " .. Cargo.CargoType, - nil - ) - self:T( 'Added PickupMenu: ' .. self.TEXT[1] .. " " .. Cargo.CargoType ) - end - - if Client._Menus[Cargo.CargoType].PickupSubMenus == nil then - Client._Menus[Cargo.CargoType].PickupSubMenus = {} - end - - Client._Menus[Cargo.CargoType].PickupSubMenus[ #Client._Menus[Cargo.CargoType].PickupSubMenus + 1 ] = missionCommands.addCommandForGroup( - Client:GetClientGroupID(), - Cargo.CargoName .. " ( " .. Cargo.CargoWeight .. "kg )", - Client._Menus[Cargo.CargoType].PickupMenu, - self.MenuAction, - { ReferenceTask = self, CargoTask = Cargo } - ) - self:T( 'Added PickupSubMenu' .. Cargo.CargoType .. ":" .. Cargo.CargoName .. " ( " .. Cargo.CargoWeight .. "kg )" ) - end - end - end - -end - -function PICKUPTASK:RemoveCargoMenus( Client ) - self:F() - - for MenuID, MenuData in pairs( Client._Menus ) do - for SubMenuID, SubMenuData in pairs( MenuData.PickupSubMenus ) do - missionCommands.removeItemForGroup( Client:GetClientGroupID(), SubMenuData ) - self:T( "Removed PickupSubMenu " ) - SubMenuData = nil - end - if MenuData.PickupMenu then - missionCommands.removeItemForGroup( Client:GetClientGroupID(), MenuData.PickupMenu ) - self:T( "Removed PickupMenu " ) - MenuData.PickupMenu = nil - end - end - - for CargoID, Cargo in pairs( CARGOS ) do - self:T( { Cargo.ClassName, Cargo.CargoName, Cargo.CargoType, Cargo:IsStatusNone(), Cargo:IsStatusLoaded(), Cargo:IsStatusLoading(), Cargo:IsStatusUnLoaded() } ) - if Cargo:IsStatusLoading() and Client == Cargo:IsLoadingToClient() then - Cargo:StatusNone() - end - end - -end - - - -function PICKUPTASK:HasFailed( ClientDead ) - self:F() - - local TaskHasFailed = self.TaskFailed - return TaskHasFailed -end - diff --git a/Moose Development/Old/RouteTask.lua b/Moose Development/Old/RouteTask.lua deleted file mode 100644 index 0c39ef425..000000000 --- a/Moose Development/Old/RouteTask.lua +++ /dev/null @@ -1,41 +0,0 @@ ---- A ROUTETASK orchestrates the travel to a specific zone defined within the ME. --- @module ROUTETASK - ---- The ROUTETASK class --- @type -ROUTETASK = { - ClassName = "ROUTETASK", - GoalVerb = "Route", -} - ---- Creates a new ROUTETASK. --- @param table{sring,...}|string LandingZones Table of Zone Names where the target is located. --- @param string TaskBriefing (optional) Defines a text describing the briefing of the task. --- @return ROUTETASK -function ROUTETASK:New( LandingZones, TaskBriefing ) - local self = BASE:Inherit( self, TASK:New() ) - self:F( { LandingZones, TaskBriefing } ) - - local Valid = true - - Valid = routines.ValidateZone( LandingZones, "LandingZones", Valid ) - - if Valid then - self.Name = 'Route To Zone' - if TaskBriefing then - self.TaskBriefing = TaskBriefing .. " Your co-pilot will provide you with the directions (required flight angle in degrees) and the distance (in km) to the target objective." - else - self.TaskBriefing = "Task: Fly to specified zone(s). Your co-pilot will provide you with the directions (required flight angle in degrees) and the distance (in km) to the target objective." - end - if type( LandingZones ) == "table" then - self.LandingZones = LandingZones - else - self.LandingZones = { LandingZones } - end - self.Stages = { STAGEBRIEF:New(), STAGESTART:New(), STAGEROUTE:New(), STAGEARRIVE:New(), STAGEDONE:New() } - self.SetStage( self, 1 ) - end - - return self -end - diff --git a/Moose Development/Old/Stage.lua b/Moose Development/Old/Stage.lua deleted file mode 100644 index f6902ab18..000000000 --- a/Moose Development/Old/Stage.lua +++ /dev/null @@ -1,967 +0,0 @@ ---- Stages within a @{TASK} within a @{MISSION}. All of the STAGE functionality is considered internally administered and not to be used by any Mission designer. --- @module STAGE --- @author Flightcontrol - - - - - - - ---- The STAGE class --- @type -STAGE = { - ClassName = "STAGE", - MSG = { ID = "None", TIME = 10 }, - FREQUENCY = { NONE = 0, ONCE = 1, REPEAT = -1 }, - - Name = "NoStage", - StageType = '', - WaitTime = 1, - Frequency = 1, - MessageCount = 0, - MessageInterval = 15, - MessageShown = {}, - MessageShow = false, - MessageFlash = false -} - - -function STAGE:New() - local self = BASE:Inherit( self, BASE:New() ) - self:F() - return self -end - -function STAGE:Execute( Mission, Client, Task ) - - local Valid = true - - return Valid -end - -function STAGE:Executing( Mission, Client, Task ) - -end - -function STAGE:Validate( Mission, Client, Task ) - local Valid = true - - return Valid -end - - -STAGEBRIEF = { - ClassName = "BRIEF", - MSG = { ID = "Brief", TIME = 1 }, - Name = "Brief", - StageBriefingTime = 0, - StageBriefingDuration = 1 -} - -function STAGEBRIEF:New() - local self = BASE:Inherit( self, STAGE:New() ) - self:F() - self.StageType = 'CLIENT' - return self -end - ---- Execute --- @param #STAGEBRIEF self --- @param Tasking.Mission#MISSION Mission --- @param Wrapper.Client#CLIENT Client --- @param Tasking.Task#TASK Task --- @return #boolean -function STAGEBRIEF:Execute( Mission, Client, Task ) - local Valid = BASE:Inherited(self):Execute( Mission, Client, Task ) - self:F() - Client:ShowMissionBriefing( Mission.MissionBriefing ) - self.StageBriefingTime = timer.getTime() - return Valid -end - -function STAGEBRIEF:Validate( Mission, Client, Task ) - local Valid = STAGE:Validate( Mission, Client, Task ) - self:T() - - if timer.getTime() - self.StageBriefingTime <= self.StageBriefingDuration then - return 0 - else - self.StageBriefingTime = timer.getTime() - return 1 - end - -end - - -STAGESTART = { - ClassName = "START", - MSG = { ID = "Start", TIME = 1 }, - Name = "Start", - StageStartTime = 0, - StageStartDuration = 1 -} - -function STAGESTART:New() - local self = BASE:Inherit( self, STAGE:New() ) - self:F() - self.StageType = 'CLIENT' - return self -end - -function STAGESTART:Execute( Mission, Client, Task ) - self:F() - local Valid = BASE:Inherited(self):Execute( Mission, Client, Task ) - if Task.TaskBriefing then - Client:Message( Task.TaskBriefing, 30, "Command" ) - else - Client:Message( 'Task ' .. Task.TaskNumber .. '.', 30, "Command" ) - end - self.StageStartTime = timer.getTime() - return Valid -end - -function STAGESTART:Validate( Mission, Client, Task ) - self:F() - local Valid = STAGE:Validate( Mission, Client, Task ) - - if timer.getTime() - self.StageStartTime <= self.StageStartDuration then - return 0 - else - self.StageStartTime = timer.getTime() - return 1 - end - - return 1 - -end - -STAGE_CARGO_LOAD = { - ClassName = "STAGE_CARGO_LOAD" -} - -function STAGE_CARGO_LOAD:New() - local self = BASE:Inherit( self, STAGE:New() ) - self:F() - self.StageType = 'CLIENT' - return self -end - -function STAGE_CARGO_LOAD:Execute( Mission, Client, Task ) - self:F() - local Valid = BASE:Inherited(self):Execute( Mission, Client, Task ) - - for LoadCargoID, LoadCargo in pairs( Task.Cargos.LoadCargos ) do - LoadCargo:Load( Client ) - end - - if Mission.MissionReportFlash and Client:IsTransport() then - Client:ShowCargo() - end - - return Valid -end - -function STAGE_CARGO_LOAD:Validate( Mission, Client, Task ) - self:F() - local Valid = STAGE:Validate( Mission, Client, Task ) - - return 1 -end - - -STAGE_CARGO_INIT = { - ClassName = "STAGE_CARGO_INIT" -} - -function STAGE_CARGO_INIT:New() - local self = BASE:Inherit( self, STAGE:New() ) - self:F() - self.StageType = 'CLIENT' - return self -end - -function STAGE_CARGO_INIT:Execute( Mission, Client, Task ) - self:F() - local Valid = BASE:Inherited(self):Execute( Mission, Client, Task ) - - for InitLandingZoneID, InitLandingZone in pairs( Task.LandingZones.LandingZones ) do - self:T( InitLandingZone ) - InitLandingZone:Spawn() - end - - - self:T( Task.Cargos.InitCargos ) - for InitCargoID, InitCargoData in pairs( Task.Cargos.InitCargos ) do - self:T( { InitCargoData } ) - InitCargoData:Spawn( Client ) - end - - return Valid -end - - -function STAGE_CARGO_INIT:Validate( Mission, Client, Task ) - self:F() - local Valid = STAGE:Validate( Mission, Client, Task ) - - return 1 -end - - - -STAGEROUTE = { - ClassName = "STAGEROUTE", - MSG = { ID = "Route", TIME = 5 }, - Frequency = STAGE.FREQUENCY.REPEAT, - Name = "Route" -} - -function STAGEROUTE:New() - local self = BASE:Inherit( self, STAGE:New() ) - self:F() - self.StageType = 'CLIENT' - self.MessageSwitch = true - return self -end - - ---- Execute the routing. --- @param #STAGEROUTE self --- @param Tasking.Mission#MISSION Mission --- @param Wrapper.Client#CLIENT Client --- @param Tasking.Task#TASK Task -function STAGEROUTE:Execute( Mission, Client, Task ) - self:F() - local Valid = BASE:Inherited(self):Execute( Mission, Client, Task ) - - local RouteMessage = "Fly to: " - self:T( Task.LandingZones ) - for LandingZoneID, LandingZoneName in pairs( Task.LandingZones.LandingZoneNames ) do - RouteMessage = RouteMessage .. "\n " .. LandingZoneName .. ' at ' .. routines.getBRStringZone( { zone = LandingZoneName, ref = Client:GetClientGroupDCSUnit():getPoint(), true, true } ) .. ' km.' - end - - if Client:IsMultiSeated() then - Client:Message( RouteMessage, self.MSG.TIME, "Co-Pilot", 20, "Route" ) - else - Client:Message( RouteMessage, self.MSG.TIME, "Command", 20, "Route" ) - end - - - if Mission.MissionReportFlash and Client:IsTransport() then - Client:ShowCargo() - end - - return Valid -end - -function STAGEROUTE:Validate( Mission, Client, Task ) - self:F() - local Valid = STAGE:Validate( Mission, Client, Task ) - - -- check if the Client is in the landing zone - self:T( Task.LandingZones.LandingZoneNames ) - Task.CurrentLandingZoneName = routines.IsUnitNearZonesRadius( Client:GetClientGroupDCSUnit(), Task.LandingZones.LandingZoneNames, 500 ) - - if Task.CurrentLandingZoneName then - - Task.CurrentLandingZone = Task.LandingZones.LandingZones[Task.CurrentLandingZoneName].CargoZone - Task.CurrentCargoZone = Task.LandingZones.LandingZones[Task.CurrentLandingZoneName] - - if Task.CurrentCargoZone then - if not Task.Signalled then - Task.Signalled = Task.CurrentCargoZone:Signal() - end - end - - self:T( 1 ) - return 1 - end - - self:T( 0 ) - return 0 -end - - - -STAGELANDING = { - ClassName = "STAGELANDING", - MSG = { ID = "Landing", TIME = 10 }, - Name = "Landing", - Signalled = false -} - -function STAGELANDING:New() - local self = BASE:Inherit( self, STAGE:New() ) - self:F() - self.StageType = 'CLIENT' - return self -end - ---- Execute the landing coordination. --- @param #STAGELANDING self --- @param Tasking.Mission#MISSION Mission --- @param Wrapper.Client#CLIENT Client --- @param Tasking.Task#TASK Task -function STAGELANDING:Execute( Mission, Client, Task ) - self:F() - - if Client:IsMultiSeated() then - Client:Message( "We have arrived at the landing zone.", self.MSG.TIME, "Co-Pilot" ) - else - Client:Message( "You have arrived at the landing zone.", self.MSG.TIME, "Command" ) - end - - Task.HostUnit = Task.CurrentCargoZone:GetHostUnit() - - self:T( { Task.HostUnit } ) - - if Task.HostUnit then - - Task.HostUnitName = Task.HostUnit:GetPrefix() - Task.HostUnitTypeName = Task.HostUnit:GetTypeName() - - local HostMessage = "" - Task.CargoNames = "" - - local IsFirst = true - - for CargoID, Cargo in pairs( CARGOS ) do - if Cargo.CargoType == Task.CargoType then - - if Cargo:IsLandingRequired() then - self:T( "Task for cargo " .. Cargo.CargoType .. " requires landing.") - Task.IsLandingRequired = true - end - - if Cargo:IsSlingLoad() then - self:T( "Task for cargo " .. Cargo.CargoType .. " is a slingload.") - Task.IsSlingLoad = true - end - - if IsFirst then - IsFirst = false - Task.CargoNames = Task.CargoNames .. Cargo.CargoName .. "( " .. Cargo.CargoWeight .. " )" - else - Task.CargoNames = Task.CargoNames .. "; " .. Cargo.CargoName .. "( " .. Cargo.CargoWeight .. " )" - end - end - end - - if Task.IsLandingRequired then - HostMessage = "Land the helicopter to " .. Task.TEXT[1] .. " " .. Task.CargoNames .. "." - else - HostMessage = "Use the Radio menu and F6 to find the cargo, then fly or land near the cargo and " .. Task.TEXT[1] .. " " .. Task.CargoNames .. "." - end - - local Host = "Command" - if Task.HostUnitName then - Host = Task.HostUnitName .. " (" .. Task.HostUnitTypeName .. ")" - else - if Client:IsMultiSeated() then - Host = "Co-Pilot" - end - end - - Client:Message( HostMessage, self.MSG.TIME, Host ) - - end -end - -function STAGELANDING:Validate( Mission, Client, Task ) - self:F() - - Task.CurrentLandingZoneName = routines.IsUnitNearZonesRadius( Client:GetClientGroupDCSUnit(), Task.LandingZones.LandingZoneNames, 500 ) - if Task.CurrentLandingZoneName then - - -- Client is in de landing zone. - self:T( Task.CurrentLandingZoneName ) - - Task.CurrentLandingZone = Task.LandingZones.LandingZones[Task.CurrentLandingZoneName].CargoZone - Task.CurrentCargoZone = Task.LandingZones.LandingZones[Task.CurrentLandingZoneName] - - if Task.CurrentCargoZone then - if not Task.Signalled then - Task.Signalled = Task.CurrentCargoZone:Signal() - end - end - else - if Task.CurrentLandingZone then - Task.CurrentLandingZone = nil - end - if Task.CurrentCargoZone then - Task.CurrentCargoZone = nil - end - Task.Signalled = false - Task:RemoveCargoMenus( Client ) - self:T( -1 ) - return -1 - end - - - local DCSUnitVelocityVec3 = Client:GetClientGroupDCSUnit():getVelocity() - local DCSUnitVelocity = ( DCSUnitVelocityVec3.x ^2 + DCSUnitVelocityVec3.y ^2 + DCSUnitVelocityVec3.z ^2 ) ^ 0.5 - - local DCSUnitPointVec3 = Client:GetClientGroupDCSUnit():getPoint() - local LandHeight = land.getHeight( { x = DCSUnitPointVec3.x, y = DCSUnitPointVec3.z } ) - local DCSUnitHeight = DCSUnitPointVec3.y - LandHeight - - self:T( { Task.IsLandingRequired, Client:GetClientGroupDCSUnit():inAir() } ) - if Task.IsLandingRequired and not Client:GetClientGroupDCSUnit():inAir() then - self:T( 1 ) - Task.IsInAirTestRequired = true - return 1 - end - - self:T( { DCSUnitVelocity, DCSUnitHeight, LandHeight, Task.CurrentCargoZone.SignalHeight } ) - if Task.IsLandingRequired and DCSUnitVelocity <= 0.05 and DCSUnitHeight <= Task.CurrentCargoZone.SignalHeight then - self:T( 1 ) - Task.IsInAirTestRequired = false - return 1 - end - - self:T( 0 ) - return 0 -end - -STAGELANDED = { - ClassName = "STAGELANDED", - MSG = { ID = "Land", TIME = 10 }, - Name = "Landed", - MenusAdded = false -} - -function STAGELANDED:New() - local self = BASE:Inherit( self, STAGE:New() ) - self:F() - self.StageType = 'CLIENT' - return self -end - -function STAGELANDED:Execute( Mission, Client, Task ) - self:F() - - if Task.IsLandingRequired then - - local Host = "Command" - if Task.HostUnitName then - Host = Task.HostUnitName .. " (" .. Task.HostUnitTypeName .. ")" - else - if Client:IsMultiSeated() then - Host = "Co-Pilot" - end - end - - Client:Message( 'You have landed within the landing zone. Use the radio menu (F10) to ' .. Task.TEXT[1] .. ' the ' .. Task.CargoType .. '.', - self.MSG.TIME, Host ) - - if not self.MenusAdded then - Task.Cargo = nil - Task:RemoveCargoMenus( Client ) - Task:AddCargoMenus( Client, CARGOS, 250 ) - end - end -end - - - -function STAGELANDED:Validate( Mission, Client, Task ) - self:F() - - if not routines.IsUnitNearZonesRadius( Client:GetClientGroupDCSUnit(), Task.CurrentLandingZoneName, 500 ) then - self:T( "Client is not anymore in the landing zone, go back to stage Route, and remove cargo menus." ) - Task.Signalled = false - Task:RemoveCargoMenus( Client ) - self:T( -2 ) - return -2 - end - - local DCSUnitVelocityVec3 = Client:GetClientGroupDCSUnit():getVelocity() - local DCSUnitVelocity = ( DCSUnitVelocityVec3.x ^2 + DCSUnitVelocityVec3.y ^2 + DCSUnitVelocityVec3.z ^2 ) ^ 0.5 - - local DCSUnitPointVec3 = Client:GetClientGroupDCSUnit():getPoint() - local LandHeight = land.getHeight( { x = DCSUnitPointVec3.x, y = DCSUnitPointVec3.z } ) - local DCSUnitHeight = DCSUnitPointVec3.y - LandHeight - - self:T( { Task.IsLandingRequired, Client:GetClientGroupDCSUnit():inAir() } ) - if Task.IsLandingRequired and Task.IsInAirTestRequired == true and Client:GetClientGroupDCSUnit():inAir() then - self:T( "Client went back in the air. Go back to stage Landing." ) - self:T( -1 ) - return -1 - end - - self:T( { DCSUnitVelocity, DCSUnitHeight, LandHeight, Task.CurrentCargoZone.SignalHeight } ) - if Task.IsLandingRequired and Task.IsInAirTestRequired == false and DCSUnitVelocity >= 2 and DCSUnitHeight >= Task.CurrentCargoZone.SignalHeight then - self:T( "It seems the Client went back in the air and over the boundary limits. Go back to stage Landing." ) - self:T( -1 ) - return -1 - end - - -- Wait until cargo is selected from the menu. - if Task.IsLandingRequired then - if not Task.Cargo then - self:T( 0 ) - return 0 - end - end - - self:T( 1 ) - return 1 -end - -STAGEUNLOAD = { - ClassName = "STAGEUNLOAD", - MSG = { ID = "Unload", TIME = 10 }, - Name = "Unload" -} - -function STAGEUNLOAD:New() - local self = BASE:Inherit( self, STAGE:New() ) - self:F() - self.StageType = 'CLIENT' - return self -end - ---- Coordinate UnLoading --- @param #STAGEUNLOAD self --- @param Tasking.Mission#MISSION Mission --- @param Wrapper.Client#CLIENT Client --- @param Tasking.Task#TASK Task -function STAGEUNLOAD:Execute( Mission, Client, Task ) - self:F() - - if Client:IsMultiSeated() then - Client:Message( 'The ' .. Task.CargoType .. ' are being ' .. Task.TEXT[2] .. ' within the landing zone. Wait until the helicopter is ' .. Task.TEXT[3] .. '.', - "Co-Pilot" ) - else - Client:Message( 'You are unloading the ' .. Task.CargoType .. ' ' .. Task.TEXT[2] .. ' within the landing zone. Wait until the helicopter is ' .. Task.TEXT[3] .. '.', - "Command" ) - end - Task:RemoveCargoMenus( Client ) -end - -function STAGEUNLOAD:Executing( Mission, Client, Task ) - self:F() - env.info( 'STAGEUNLOAD:Executing() Task.Cargo.CargoName = ' .. Task.Cargo.CargoName ) - - local TargetZoneName - - if Task.TargetZoneName then - TargetZoneName = Task.TargetZoneName - else - TargetZoneName = Task.CurrentLandingZoneName - end - - if Task.Cargo:UnLoad( Client, TargetZoneName ) then - Task.ExecuteStage = _TransportExecuteStage.SUCCESS - if Mission.MissionReportFlash then - Client:ShowCargo() - end - end -end - ---- Validate UnLoading --- @param #STAGEUNLOAD self --- @param Tasking.Mission#MISSION Mission --- @param Wrapper.Client#CLIENT Client --- @param Tasking.Task#TASK Task -function STAGEUNLOAD:Validate( Mission, Client, Task ) - self:F() - env.info( 'STAGEUNLOAD:Validate()' ) - - if routines.IsUnitNearZonesRadius( Client:GetClientGroupDCSUnit(), Task.CurrentLandingZoneName, 500 ) then - else - Task.ExecuteStage = _TransportExecuteStage.FAILED - Task:RemoveCargoMenus( Client ) - if Client:IsMultiSeated() then - Client:Message( 'The ' .. Task.CargoType .. " haven't been successfully " .. Task.TEXT[3] .. ' within the landing zone. Task and mission has failed.', - _TransportStageMsgTime.DONE, "Co-Pilot" ) - else - Client:Message( 'The ' .. Task.CargoType .. " haven't been successfully " .. Task.TEXT[3] .. ' within the landing zone. Task and mission has failed.', - _TransportStageMsgTime.DONE, "Command" ) - end - return 1 - end - - if not Client:GetClientGroupDCSUnit():inAir() then - else - Task.ExecuteStage = _TransportExecuteStage.FAILED - Task:RemoveCargoMenus( Client ) - if Client:IsMultiSeated() then - Client:Message( 'The ' .. Task.CargoType .. " haven't been successfully " .. Task.TEXT[3] .. ' within the landing zone. Task and mission has failed.', - _TransportStageMsgTime.DONE, "Co-Pilot" ) - else - Client:Message( 'The ' .. Task.CargoType .. " haven't been successfully " .. Task.TEXT[3] .. ' within the landing zone. Task and mission has failed.', - _TransportStageMsgTime.DONE, "Command" ) - end - return 1 - end - - if Task.ExecuteStage == _TransportExecuteStage.SUCCESS then - if Client:IsMultiSeated() then - Client:Message( 'The ' .. Task.CargoType .. ' have been sucessfully ' .. Task.TEXT[3] .. ' within the landing zone.', _TransportStageMsgTime.DONE, "Co-Pilot" ) - else - Client:Message( 'The ' .. Task.CargoType .. ' have been sucessfully ' .. Task.TEXT[3] .. ' within the landing zone.', _TransportStageMsgTime.DONE, "Command" ) - end - Task:RemoveCargoMenus( Client ) - Task.MissionTask:AddGoalCompletion( Task.MissionTask.GoalVerb, Task.CargoName, 1 ) -- We set the cargo as one more goal completed in the mission. - return 1 - end - - return 1 -end - -STAGELOAD = { - ClassName = "STAGELOAD", - MSG = { ID = "Load", TIME = 10 }, - Name = "Load" -} - -function STAGELOAD:New() - local self = BASE:Inherit( self, STAGE:New() ) - self:F() - self.StageType = 'CLIENT' - return self -end - -function STAGELOAD:Execute( Mission, Client, Task ) - self:F() - - if not Task.IsSlingLoad then - - local Host = "Command" - if Task.HostUnitName then - Host = Task.HostUnitName .. " (" .. Task.HostUnitTypeName .. ")" - else - if Client:IsMultiSeated() then - Host = "Co-Pilot" - end - end - - Client:Message( 'The ' .. Task.CargoType .. ' are being ' .. Task.TEXT[2] .. ' within the landing zone. Wait until the helicopter is ' .. Task.TEXT[3] .. '.', - _TransportStageMsgTime.EXECUTING, Host ) - - -- Route the cargo to the Carrier - - Task.Cargo:OnBoard( Client, Task.CurrentCargoZone, Task.OnBoardSide ) - Task.ExecuteStage = _TransportExecuteStage.EXECUTING - else - Task.ExecuteStage = _TransportExecuteStage.EXECUTING - end -end - -function STAGELOAD:Executing( Mission, Client, Task ) - self:F() - - -- If the Cargo is ready to be loaded, load it into the Client. - - local Host = "Command" - if Task.HostUnitName then - Host = Task.HostUnitName .. " (" .. Task.HostUnitTypeName .. ")" - else - if Client:IsMultiSeated() then - Host = "Co-Pilot" - end - end - - if not Task.IsSlingLoad then - self:T( Task.Cargo.CargoName) - - if Task.Cargo:OnBoarded( Client, Task.CurrentCargoZone ) then - - -- Load the Cargo onto the Client - Task.Cargo:Load( Client ) - - -- Message to the pilot that cargo has been loaded. - Client:Message( "The cargo " .. Task.Cargo.CargoName .. " has been loaded in our helicopter.", - 20, Host ) - Task.ExecuteStage = _TransportExecuteStage.SUCCESS - - Client:ShowCargo() - end - else - Client:Message( "Hook the " .. Task.CargoNames .. " onto the helicopter " .. Task.TEXT[3] .. " within the landing zone.", - _TransportStageMsgTime.EXECUTING, Host ) - for CargoID, Cargo in pairs( CARGOS ) do - self:T( "Cargo.CargoName = " .. Cargo.CargoName ) - - if Cargo:IsSlingLoad() then - local CargoStatic = StaticObject.getByName( Cargo.CargoStaticName ) - if CargoStatic then - self:T( "Cargo is found in the DCS simulator.") - local CargoStaticPosition = CargoStatic:getPosition().p - self:T( "Cargo Position x = " .. CargoStaticPosition.x .. ", y = " .. CargoStaticPosition.y .. ", z = " .. CargoStaticPosition.z ) - local CargoStaticHeight = routines.GetUnitHeight( CargoStatic ) - if CargoStaticHeight > 5 then - self:T( "Cargo is airborne.") - Cargo:StatusLoaded() - Task.Cargo = Cargo - Client:Message( 'The Cargo has been successfully hooked onto the helicopter and is now being sling loaded. Fly outside the landing zone.', - self.MSG.TIME, Host ) - Task.ExecuteStage = _TransportExecuteStage.SUCCESS - break - end - else - self:T( "Cargo not found in the DCS simulator." ) - end - end - end - end - -end - -function STAGELOAD:Validate( Mission, Client, Task ) - self:F() - - self:T( "Task.CurrentLandingZoneName = " .. Task.CurrentLandingZoneName ) - - local Host = "Command" - if Task.HostUnitName then - Host = Task.HostUnitName .. " (" .. Task.HostUnitTypeName .. ")" - else - if Client:IsMultiSeated() then - Host = "Co-Pilot" - end - end - - if not Task.IsSlingLoad then - if not routines.IsUnitNearZonesRadius( Client:GetClientGroupDCSUnit(), Task.CurrentLandingZoneName, 500 ) then - Task:RemoveCargoMenus( Client ) - Task.ExecuteStage = _TransportExecuteStage.FAILED - Task.CargoName = nil - Client:Message( "The " .. Task.CargoType .. " loading has been aborted. You flew outside the pick-up zone while loading. ", - self.MSG.TIME, Host ) - self:T( -1 ) - return -1 - end - - local DCSUnitVelocityVec3 = Client:GetClientGroupDCSUnit():getVelocity() - local DCSUnitVelocity = ( DCSUnitVelocityVec3.x ^2 + DCSUnitVelocityVec3.y ^2 + DCSUnitVelocityVec3.z ^2 ) ^ 0.5 - - local DCSUnitPointVec3 = Client:GetClientGroupDCSUnit():getPoint() - local LandHeight = land.getHeight( { x = DCSUnitPointVec3.x, y = DCSUnitPointVec3.z } ) - local DCSUnitHeight = DCSUnitPointVec3.y - LandHeight - - self:T( { Task.IsLandingRequired, Client:GetClientGroupDCSUnit():inAir() } ) - if Task.IsLandingRequired and Task.IsInAirTestRequired == true and Client:GetClientGroupDCSUnit():inAir() then - Task:RemoveCargoMenus( Client ) - Task.ExecuteStage = _TransportExecuteStage.FAILED - Task.CargoName = nil - Client:Message( "The " .. Task.CargoType .. " loading has been aborted. Re-start the " .. Task.TEXT[3] .. " process. Don't fly outside the pick-up zone.", - self.MSG.TIME, Host ) - self:T( -1 ) - return -1 - end - - self:T( { DCSUnitVelocity, DCSUnitHeight, LandHeight, Task.CurrentCargoZone.SignalHeight } ) - if Task.IsLandingRequired and Task.IsInAirTestRequired == false and DCSUnitVelocity >= 2 and DCSUnitHeight >= Task.CurrentCargoZone.SignalHeight then - Task:RemoveCargoMenus( Client ) - Task.ExecuteStage = _TransportExecuteStage.FAILED - Task.CargoName = nil - Client:Message( "The " .. Task.CargoType .. " loading has been aborted. Re-start the " .. Task.TEXT[3] .. " process. Don't fly outside the pick-up zone.", - self.MSG.TIME, Host ) - self:T( -1 ) - return -1 - end - - if Task.ExecuteStage == _TransportExecuteStage.SUCCESS then - Task:RemoveCargoMenus( Client ) - Client:Message( "Good Job. The " .. Task.CargoType .. " has been sucessfully " .. Task.TEXT[3] .. " within the landing zone.", - self.MSG.TIME, Host ) - Task.MissionTask:AddGoalCompletion( Task.MissionTask.GoalVerb, Task.CargoName, 1 ) - self:T( 1 ) - return 1 - end - - else - if Task.ExecuteStage == _TransportExecuteStage.SUCCESS then - CargoStatic = StaticObject.getByName( Task.Cargo.CargoStaticName ) - if CargoStatic and not routines.IsStaticInZones( CargoStatic, Task.CurrentLandingZoneName ) then - Client:Message( "Good Job. The " .. Task.CargoType .. " has been sucessfully " .. Task.TEXT[3] .. " and flown outside of the landing zone.", - self.MSG.TIME, Host ) - Task.MissionTask:AddGoalCompletion( Task.MissionTask.GoalVerb, Task.Cargo.CargoName, 1 ) - self:T( 1 ) - return 1 - end - end - - end - - - self:T( 0 ) - return 0 -end - - -STAGEDONE = { - ClassName = "STAGEDONE", - MSG = { ID = "Done", TIME = 10 }, - Name = "Done" -} - -function STAGEDONE:New() - local self = BASE:Inherit( self, STAGE:New() ) - self:F() - self.StageType = 'AI' - return self -end - -function STAGEDONE:Execute( Mission, Client, Task ) - self:F() - -end - -function STAGEDONE:Validate( Mission, Client, Task ) - self:F() - - Task:Done() - - return 0 -end - -STAGEARRIVE = { - ClassName = "STAGEARRIVE", - MSG = { ID = "Arrive", TIME = 10 }, - Name = "Arrive" -} - -function STAGEARRIVE:New() - local self = BASE:Inherit( self, STAGE:New() ) - self:F() - self.StageType = 'CLIENT' - return self -end - - ---- Execute Arrival --- @param #STAGEARRIVE self --- @param Tasking.Mission#MISSION Mission --- @param Wrapper.Client#CLIENT Client --- @param Tasking.Task#TASK Task -function STAGEARRIVE:Execute( Mission, Client, Task ) - self:F() - - if Client:IsMultiSeated() then - Client:Message( 'We have arrived at ' .. Task.CurrentLandingZoneName .. ".", self.MSG.TIME, "Co-Pilot" ) - else - Client:Message( 'We have arrived at ' .. Task.CurrentLandingZoneName .. ".", self.MSG.TIME, "Command" ) - end - -end - -function STAGEARRIVE:Validate( Mission, Client, Task ) - self:F() - - Task.CurrentLandingZoneID = routines.IsUnitInZones( Client:GetClientGroupDCSUnit(), Task.LandingZones ) - if ( Task.CurrentLandingZoneID ) then - else - return -1 - end - - return 1 -end - -STAGEGROUPSDESTROYED = { - ClassName = "STAGEGROUPSDESTROYED", - DestroyGroupSize = -1, - Frequency = STAGE.FREQUENCY.REPEAT, - MSG = { ID = "DestroyGroup", TIME = 10 }, - Name = "GroupsDestroyed" -} - -function STAGEGROUPSDESTROYED:New() - local self = BASE:Inherit( self, STAGE:New() ) - self:F() - self.StageType = 'AI' - return self -end - ---function STAGEGROUPSDESTROYED:Execute( Mission, Client, Task ) --- --- Client:Message( 'Task: Still ' .. DestroyGroupSize .. " of " .. Task.DestroyGroupCount .. " " .. Task.DestroyGroupType .. " to be destroyed!", self.MSG.TIME, Mission.Name .. "/Stage" ) --- ---end - -function STAGEGROUPSDESTROYED:Validate( Mission, Client, Task ) - self:F() - - if Task.MissionTask:IsGoalReached() then - return 1 - else - return 0 - end -end - -function STAGEGROUPSDESTROYED:Execute( Mission, Client, Task ) - self:F() - self:T( { Task.ClassName, Task.Destroyed } ) - --env.info( 'Event Table Task = ' .. tostring(Task) ) - -end - - - - - - - - - - - - - ---[[ - _TransportStage: Defines the different stages of which of transport missions can be in. This table is internal and is used to control the sequence of messages, actions and flow. - - - _TransportStage.START - - _TransportStage.ACT_ROUTE - - _TransportStage.LAND - - _TransportStage.EXECUTE - - _TransportStage.DONE - - _TransportStage.REMOVE ---]] -_TransportStage = { - HOLD = "HOLD", - START = "START", - ACT_ROUTE = "ACT_ROUTE", - LANDING = "LANDING", - LANDED = "LANDED", - EXECUTING = "EXECUTING", - LOAD = "LOAD", - UNLOAD = "UNLOAD", - DONE = "DONE", - NEXT = "NEXT" -} - -_TransportStageMsgTime = { - HOLD = 10, - START = 60, - ACT_ROUTE = 5, - LANDING = 10, - LANDED = 30, - EXECUTING = 30, - LOAD = 30, - UNLOAD = 30, - DONE = 30, - NEXT = 0 -} - -_TransportStageTime = { - HOLD = 10, - START = 5, - ACT_ROUTE = 5, - LANDING = 1, - LANDED = 1, - EXECUTING = 5, - LOAD = 5, - UNLOAD = 5, - DONE = 1, - NEXT = 0 -} - -_TransportStageAction = { - REPEAT = -1, - NONE = 0, - ONCE = 1 -} diff --git a/Moose Development/ReleaseNotes.txt b/Moose Development/ReleaseNotes.txt deleted file mode 100644 index 64a580998..000000000 --- a/Moose Development/ReleaseNotes.txt +++ /dev/null @@ -1,385 +0,0 @@ -2017-02-18 - - - Reworked some vector functions. - -- POINT_VEC3:NewFromVec2( Vec2, LandHeightAdd ) added. - -- ZONE_RADIUS:GetRandomPointVec2( inner, outer ) added. - -- ZONE_RADIUS:GetRandomPointVec3( inner, outer ) added. - -- ZONE_POLYGON_BASE:GetRandomPointVec2() added. - -- ZONE_POLYGON_BASE:GetRandomPointVec3() added. - -2017-02-17 - - - Added ACT_ROUTE_POINT - -- Routes a controllable to a point with a defined distance. - -- Upon arrived within the engagement distance, an arrival text is shown. - -2016-12-06 - - - Renamed the documentation references following the structure of the files. - -- All STATEMACHINE references became FSM - -- FSM_TEMPLATE references are also abbreviated by FSMT - -- Removed Process#PROCESS references. - -- All cross file documentation references updated. That was a lot of work! - - - Tasking is working now. But needs further cleanup. - - Templates are assigned to Tasks. When a task is assigned to a player, the FSMT - - Removed 2nd level in tasking. Now there is only one level. - - Tasking works now with FSM. - - Made FSMT process templates that can be used in Tasks. - - Scoring can now also be added to the templates. - -2016-09-01 - - - Expanded the CARGO classes and implemented the CARGO_GROUPED classes. - -- Finished the correct state machine implementation to Board, UnBoard, Load, UnLoad cargo to and from carriers. - -- Created the CARGO_GROUPED class, which groups CARGO_UNITs into one group. The cargo behaves like groups, but can be transported by carriers. - -- Documented CARGO event functions, state transition functions + overall documentation. - -- Updated test missions located in the directory: Moose_Test_CARGO - - - Expanded the PROCESS_PATROLZONE class. - -2016-08-21 - - - Made a new STATEMACHINE_CONTROLLABLE object, which models a base state machine class to be inherited by AI controllable classes. - -- Created the class as such that intherited AI classes become "finite state machines". - -- Each STATEMACHINE_CONTROLLABLE class contains a Controllable object, which is one Unit, Client or Group object. - -- Added state transition functions that are called before and after the state transition. - -- Event functions are automatically added to the class, based on the FSMT. - -- Added immediate and delayed event processing as part of the STATEMACHINE_CONTROLLABLE class. - --- Events that start with __Event are processed with a delay. The delay is given in seconds as a parameter. - - - Created a new PROCESS_PATROLZONE class, which inherites STATEMACHINE_CONTROLLABLE. - -- This class implements a complete new revamped patrol zone AI pattern. - -- Created a new test directory: Moose_Test_PROCESS_PATROLZONE with test missions. - -2016-08-15 - - - Removed the old classes and moved into an "Old" folder in the Moose/Development folder. - -- Cleaned Moose.lua + Documented class types - -- Cleaned Create_Moose.bat + Documented class types - - - Extend the ZONE_BASE class with a probability randomization factor, that can be used for zone randomization purposes. - - - Documented the Zone module classes. - - - Changed and removed the POINT_VEC3 SmokeColor and FlareColor structure. Replaced with SMOKECOLOR and FLARECOLOR types. - -- Replaced also code in test missions with SMOKECOLOR and FLARECOLOR references. - - - Added change logs of API changes in MOOSE documentation. - - - Added ZONE_BASE:GetName() method. - - - Added ZONE_BASE:GetZoneProbability() method. - - - Added ZONE_BASE:SetZoneProbability() method. - - - Added ZONE_BASE:GetZoneMaybe() method. - - - Added SPAWN:InitRandomizeZones() method. - - - Renamed SPAWN:CleanUp() method to SPAWN:InitCleanUp() method. - - - Reviewed documentation of the PatrolZone module and PATROLZONE class. - - -2016-08-14 - - - Changed Spawn APIs to express Group position and Unit position randomization. - - - Changed the API protocol of SpawnInZone() method. - -- Removed OuterRadius and InnerRadius parameters !!! - - - Changed the API protocol of SpawnFromUnit() method. - -- Removed OuterRadius and InnerRadius parameters !!! - - - Added InitRandomizeUnits() method, taking 3 parameters: - -- RandomizeUnits given the value true, will randomize the units upon spawning, false (default) will not randomize the untis. - -- OuterRadius is the outer radius of the band where the units will be spawned, if RandomizeUnits is true. - -- InnerRadius is the inner radius of the band where the units will not be spawned, if RandomizeUnits is true. - - - Removed SpawnFunction() method. - - - Added OnSpawnGroup() method as the new official CallBack function method to catch when a new function will be called. - -- Documented OnSpawnGroup() method. - - - Renamed Limit() method to InitLimit() method. - - - Renamed Array() method to InitArray() method. - - - Renamed RandomizeRoute() method to InitRandomizeRoute() method. - - - Renamed RandomizeTemplate() method to InitRandomizeTemplate() method. - - - Renamed UnControlled() method to InitUnControlled method. - - - Reviewed all test missions for the changes executed and made adaptions where necessary + re-tests. - - -2016-08-12 - - - Temporary release of the new cargo handling. - -- Released available functionality to handle one CARGO_UNIT loading, boarding, unloading. - -- Created CARGO_UNIT test missions. - - - Added Translate() method in POINT_VEC3, translating a 3D point over the horizontal plane with a Distance and Angle coordinate. - -2016-08-08 - - - Added briefing to method ESCORT:New() - -- If no EscortBriefing is given, the New() method will show the default briefing. - -2016-08-06 - - - Made PointVec3 and Vec3, PointVec2 and Vec2 terminology used in the code consistent. - -- Replaced method PointVec3() to Vec3() where the code manages a Vec3. Replaced all references to the method. - -- Replaced method PointVec2() to Vec2() where the code manages a Vec2. Replaced all references to the method. - -- Replaced method RandomPointVec3() to RandomVec3() where the code manages a Vec3. Replaced all references to the method. - -2016-08-03 - - - Fixed error at SPAWN:RandomizeTemplate() - -- Units started in wrong x, y position (at the template, instead of at the master template of the SPAWN). - -- Adjusted x, y and alt to the start position of the first unit of the master template. - -- Added a test mission Moose_Test_SPAWN_RandomizeTemplate. - -- Regenerated MOOSE.lua - -2016-07-31 - - - Added a SpawnHeight parameter to the SPAWN method RandomizeRoute(), based upon a bug report of David. Air units will now also have optionally the route height randomized. - -2016-07-29 - - - Documentation of methods GetFirstAliveGroup, GetNextAliveGroup, GetLastAliveGroup + code snippets. - -2016-07-23 - - - Fixed problem in MISSILETRAINER - - For some weapontypes, there is no target known when launched. - - Workaround: Missiles get destroyed immediately after launch for those missile types. - - Known missiles that have these problem are mavericks and missiles launched by Tunguskas. - - - Added more tracing in the EVENT class, appearing in DCS.log - - - Added MENU_MISSION classes - -- Added class MENU_MISSION - -- Added class MENU_MISSION_COMMAND - -- Revised documentation of Menu - -- Fixed bug in SCORING class to set the scoring menu - - - Added functions in SPAWN class - -- Added SPAWN:SpawnFromVec3() - -- Added SPAWN:SpawnFromVec2() - -- Revised SPAWN:SpawnFromUnit() - -- Revised SPAWN:SpawnFromZone() - - - Added test missions for SPAWN class - - Moose_Test_SPAWN_SpawnFromVec3.miz - - Moose_Test_SPAWN_SpawnFromVec2.miz - - Moose_Test_SPAWN_SpawnFromUnit.miz - - Moose_Test_SPAWN_SpawnFromZone.miz - - - Added functions in POINT_VEC3 class - -- Added POINT_VEC3:GetVec2() - -- Added POINT_VEC3:GetRandomVec2InRadius() - - - Added functions in POINT_VEC2 class - -- Added POINT_VEC2:NewFromVec2() - - - Revised the STATIC class working with POSITIONABLE - - Revised ZONE_RADIUS:GetPointVec3() - - Revised the documentation. - - - Revised the SCHEDULER class - -- Added SCHEDULER:Schedule() - -- Reworked SCHEDULER:New() - -2016-07-21 - - - Added methods in CONTROLLABLE class - - CONTROLLABLE:GetMessage( Message, Duration ) - - CONTROLLABLE:MessageToAll( Message, Duration ) - - CONTROLLABLE:MessageToRed( Message, Duration ) - - CONTROLLABLE:MessageToBlue( Message, Duration ) - - CONTROLLABLE:MessageToClient( Message, Duration, Client ) - - CONTROLLABLE:MessageToGroup( Message, Duration, MessageGroup ) - - CONTROLLABLE:Message( Message, Duration ) - - - Added methods in DETECTION_AREAS class - - DETECTION_AREAS:NearestFAC( DetectedArea ) - - - Removed Message methods from GROUP - - - Replaced TASK_CAS and TASK_BAI with TASK_A2G - - - Added PROCESS_JTAC (which fits into TASK_A2G) - - - Added methods in POINT_VEC3 class: - - POINT_VEC3:NewFromVec3( Vec3 ) - - - Added methods in SET_UNIT class - - SET_UNIT:GetUnitTypesText() - - SET_UNIT:GetUnitThreatLevels() - - - Added methods in UNIT class - - UNIT:GetCallsign() - - - Fixed bug in ZONE_GROUP - - Fixed bug in SCHEDULER - -2016-07-19 - - - Updated presentation Moose Training/Presentations/DCS World - MOOSE - Detection - Part 1 - Explanation.pptx - - - Fixed bug in AIBALANCER - - - Added function BASE:IsTrace() - - - Renamed functions GetPointVec2() to GetVec2() to prepare new naming convension... - - Still pending is the rename of GetPointVec3 to GetVec3().. - - - Added DETECTION_AREAS class to manage detection in areas. - - Added DETECTION_BASE class - - - Added DETECTION_MANAGER class - - Added DETECTION_DISPATCHER class to dispatch tasks to players. - - Added DETECTION_REPORTING class - - - Added in EVENT class the RemoveEvent functions - - - Removed FAC.lua file - - - Added MENU classes to manager the menus. - - MENU_COALITION class - - MENU_COALITION_COMMAND class - - MENU_CLIENT class - - MENU_CLIENT_COMMAND class - - MENU-GROUP class - - MENU_GROUP_COMMAND class - - - Added new TASK_BASE classes - - Added TASK_BAI - - Added TASK_CAS - - Added TASK_SEAD - - - Added new PROCESS classes - - Added PROCESS_ASSIGN class - - Added PROCESS_DESTROY class - - Added PROCESS_ROUTE class - - Added PROCESS_SMOKE class - - - Added POINT_VEC3 methods - - POINT_VEC3:GetVec3() - - POINT_VEC3:GetX() - - POINT_VEC3:GetY() - - POINT_VEC3:GetZ() - - POINT_VEC3:GetDirectionVec3( TargetPointVec3 ) - - POINT_VEC3:GetNorthCorrectionRadians() - - POINT_VEC3:GetDirectionRadians( DirectionVec3 ) - - POINT_VEC3:Get2DDistance( TargetPointVec3 ) - - POINT_VEC3:Get3DDistance( TargetPointVec3 ) - - POINT_VEC3:ToStringBR( AngleRadians, Distance ) - - POINT_VEC3:ToStringLL( acc, DMS ) - - POINT_VEC3:GetAltitudeText() - - POINT_VEC3:GetBRText( TargetPointVec3 ) - - POINT_VEC3:SetMetric( Metric ) - - POINT_VEC3:IsMetric() - - - Added POINT_VEC2 methods - - POINT_VEC2:GetAltitudeText() - - - Added POSITIONABLE method - - POSITIONABLE:GetRandomPointVec3( Radius ) - - POSITIONABLE:GetVelocityKMH() - - - Cleaned up Routines.lua file - - - Fixed bug in handling CSV files in SCORING class - - - Added lists to SET_ classes in Set.lua file - - - Added STATEMACHINE classes - - - Added UNIT methods - - UNIT:Destroy() - - UNIT:HasSensors( ... ) - - UNIT:HasSEAD() - - UNIT:GetThreatLevel() - - UNIT:IsGround() - - UNIT:IsFriendly( FriendlyCoalition ) - - UNIT:IsShip() - - - Created Utils.lua file with many utility functions. - - - Added method in ZONE_BASE - - ZONE_BASE:GetVec2() - - - Added method in ZONE_UNIT - - ZONE_UNIT:GetPointVec3( Height ) - - - Reworked ZONE_UNIT so that it always will provide a position. - - - Optimized the ray casting algorithm in ZONE_POLYGON_BASE:IsPointVec2InZone( PointVec2 ) - -2016-07-12 - - - Fixed bug in SPAWN, related to DEAD events. - - - Added test mission Moose_Test_SPAWN_Limit_Scheduled - -2016-07-08 - - - Fixed bug with velocity in AIRBASEPOLICE class - - - Release in cooperation with dutch-baron the AIRBASEPOLIC_NAVADA class. - - - Removed messages menu from CLIENT class - - - Removed Moose_Test_DETECTION_Laser mission - -2016-07-06 - - - Bugfixes in CONTROLLABLE and GROUP - -2016-07-05 - - - Added country in DCScountry.lua - - - Added DATABASE:GetGroupTemplate( GroupName ) - - - Added methods in GROUP class - - GROUP:Respawn( Template ) - - GROUP:SetTemplateControlled( Template, Controlled ) - - GROUP:SetTemplateCountry( Template, CountryID ) - - GROUP:SetTemplateCoalition( Template, CoalitionID ) - - - Added ZONE_GROUP class - -2016-07-04 - - - Fixed bug in SPAWN class restarting GROUPS after landing. - -2016-07-03 - - - Added method in ZONE_UNIT - - ZONE_UNIT:GetRandomVec2() - -2016-06-28 - - - Release of rework of MOOSE wrapper object model - - Added IDENTIFIABLE class - - Added POSITIONABLE class - - Added OBJECT class - - Added CONTROLLABLE class - -2016-06-26 - - - Reworked scheduler implementations - -2016-06-22 - - - Added AIBALANCER class - - Added PATROLZONE class - - Added POINT_VEC3 and POINT_VEC2 classes - - - \ No newline at end of file diff --git a/Moose Mission Setup/Moose Create Dynamic/Moose_Dynamic_Loader.lua b/Moose Mission Setup/Moose Create Dynamic/Moose_Dynamic_Loader.lua deleted file mode 100644 index 9ab74881e..000000000 --- a/Moose Mission Setup/Moose Create Dynamic/Moose_Dynamic_Loader.lua +++ /dev/null @@ -1,21 +0,0 @@ - -local base = _G - -MOOSE = {} - -MOOSE.Include = function( LuaPath, IncludeFile ) - if not MOOSE.Includes[ IncludeFile ] then - MOOSE.Includes[IncludeFile] = IncludeFile - local f = assert( base.loadfile( LuaPath .. IncludeFile ) ) - if f == nil then - error ("MOOSE: Could not load Moose file " .. IncludeFile ) - else - env.info( "MOOSE: " .. IncludeFile .. " dynamically loaded from " .. LuaPath ) - return f() - end - end -end - -MOOSE.ProgramPath = "Scripts/Moose/" - -MOOSE.Includes = {} diff --git a/Moose Mission Setup/Moose Create Static/Moose_Static_Loader.lua b/Moose Mission Setup/Moose Create Static/Moose_Static_Loader.lua deleted file mode 100644 index 07a16c79c..000000000 --- a/Moose Mission Setup/Moose Create Static/Moose_Static_Loader.lua +++ /dev/null @@ -1,4 +0,0 @@ -MOOSE = {} -function MOOSE.Include() - -end diff --git a/Moose Mission Setup/Moose Mission Update/Moose_Update_Missions.bat b/Moose Mission Setup/Moose Mission Update/Moose_Update_Missions.bat deleted file mode 100644 index 82b6c3406..000000000 --- a/Moose Mission Setup/Moose Mission Update/Moose_Update_Missions.bat +++ /dev/null @@ -1,23 +0,0 @@ -echo off - -rem Update Missions with a new version of Moose.lua -rem Provide as the only parameter the path to the .miz files, which can be embedded in directories. - -echo Path to Mission Files: %1 - -rem For /R %1 %%G IN (*.miz) do 7z u "%%G" "l10n\DEFAULT\Moose.lua" -For /R %1 %%M IN (*.miz) do ( - echo off - cd > NUL: - echo "Mission: %%M" - mkdir Temp - cd Temp - mkdir l10n - mkdir l10n\DEFAULT - copy ..\..\Moose.lua l10n\DEFAULT > NUL: - copy "%%~pM%%~nM.lua" l10n\DEFAULT\*.* > NUL: - rem dir l10n\DEFAULT - "%~dp0..\..\Utils\7-Zip\7z" -bb0 u "%%M" "l10n\DEFAULT\*.lua" > NUL: - cd .. - rmdir /S /Q Temp -) \ No newline at end of file diff --git a/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua b/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua deleted file mode 100644 index 3b2b611ed..000000000 --- a/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua +++ /dev/null @@ -1,31 +0,0 @@ -env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' ) -env.info( 'Moose Generation Timestamp: 20170328_0728' ) - -local base = _G - -Include = {} - -Include.File = function( IncludeFile ) - if not Include.Files[ IncludeFile ] then - Include.Files[IncludeFile] = IncludeFile - env.info( "Include:" .. IncludeFile .. " from " .. Include.ProgramPath ) - local f = assert( base.loadfile( Include.ProgramPath .. IncludeFile .. ".lua" ) ) - if f == nil then - error ("Could not load MOOSE file " .. IncludeFile .. ".lua" ) - else - env.info( "Include:" .. IncludeFile .. " loaded from " .. Include.ProgramPath ) - return f() - end - end -end - -Include.ProgramPath = "Scripts/Moose/" - -env.info( "Include.ProgramPath = " .. Include.ProgramPath) - -Include.Files = {} - -Include.File( "Moose" ) - -BASE:TraceOnOff( true ) -env.info( '*** MOOSE INCLUDE END *** ' ) diff --git a/Moose Mission Setup/Moose.lua b/Moose Mission Setup/Moose.lua deleted file mode 100644 index 0f9955717..000000000 --- a/Moose Mission Setup/Moose.lua +++ /dev/null @@ -1,98 +0,0 @@ -env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' ) -env.info( 'Moose Generation Timestamp: 20171130_1444' ) - -local base = _G - -MOOSE = {} - -MOOSE.Include = function( LuaPath, IncludeFile ) - if not MOOSE.Includes[ IncludeFile ] then - MOOSE.Includes[IncludeFile] = IncludeFile - local f = assert( base.loadfile( LuaPath .. IncludeFile ) ) - if f == nil then - error ("MOOSE: Could not load Moose file " .. IncludeFile ) - else - env.info( "MOOSE: " .. IncludeFile .. " dynamically loaded from " .. LuaPath ) - return f() - end - end -end - -MOOSE.ProgramPath = "Scripts/Moose/" - -MOOSE.Includes = {} -MOOSE.Include( MOOSE.ProgramPath, 'Utilities/Routines.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Utilities/Utils.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Core/Base.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Core/UserFlag.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Core/UserSound.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Core/Report.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Core/Scheduler.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Core/ScheduleDispatcher.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Core/Event.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Core/Settings.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Core/Menu.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Core/Zone.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Core/Database.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Core/Set.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Core/Point.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Core/Velocity.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Core/Message.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Core/Fsm.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Core/Radio.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Core/Spawn.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Core/SpawnStatic.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Core/Goal.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Core/Cargo.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Core/Spot.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Wrapper/Object.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Wrapper/Identifiable.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Wrapper/Positionable.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Wrapper/Controllable.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Wrapper/Group.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Wrapper/Unit.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Wrapper/Client.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Wrapper/Static.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Wrapper/Airbase.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Wrapper/Scenery.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Functional/Scoring.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Functional/CleanUp.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Functional/Movement.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Functional/Sead.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Functional/Escort.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Functional/MissileTrainer.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Functional/ATC_Ground.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Functional/Detection.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Functional/Designate.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Functional/RAT.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Functional/ZoneGoal.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Functional/ZoneGoalCoalition.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Functional/ZoneCaptureCoalition.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'AI/AI_Balancer.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'AI/AI_A2A.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'AI/AI_A2A_Patrol.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'AI/AI_A2A_Cap.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'AI/AI_A2A_Gci.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'AI/AI_A2A_Dispatcher.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'AI/AI_Patrol.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'AI/AI_Cap.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'AI/AI_Cas.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'AI/AI_Bai.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'AI/AI_Formation.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Actions/Act_Assign.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Actions/Act_Route.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Actions/Act_Account.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Actions/Act_Assist.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Tasking/CommandCenter.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Tasking/Mission.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Tasking/Task.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Tasking/DetectionManager.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Tasking/Task_A2G_Dispatcher.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Tasking/Task_A2G.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Tasking/Task_A2A_Dispatcher.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Tasking/Task_A2A.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Tasking/Task_Cargo.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Tasking/TaskZoneCapture.lua' ) -MOOSE.Include( MOOSE.ProgramPath, 'Moose.lua' ) -BASE:TraceOnOff( true ) -env.info( '*** MOOSE INCLUDE END *** ' ) diff --git a/Moose Mission Setup/Moose_.lua b/Moose Mission Setup/Moose_.lua deleted file mode 100644 index ed6bf785a..000000000 --- a/Moose Mission Setup/Moose_.lua +++ /dev/null @@ -1,93 +0,0 @@ -env.info('*** MOOSE DYNAMIC INCLUDE START *** ') -env.info('Moose Generation Timestamp: 20171130_1444') -local base=_G -MOOSE={} -MOOSE.Include=function(LuaPath,IncludeFile) -if not MOOSE.Includes[IncludeFile]then -MOOSE.Includes[IncludeFile]=IncludeFile -local f=assert(base.loadfile(LuaPath..IncludeFile)) -if f==nil then -error("MOOSE: Could not load Moose file "..IncludeFile) -else -env.info("MOOSE: "..IncludeFile.." dynamically loaded from "..LuaPath) -return f() -end -end -end -MOOSE.ProgramPath="Scripts/Moose/" -MOOSE.Includes={} -MOOSE.Include(MOOSE.ProgramPath,'Utilities/Routines.lua') -MOOSE.Include(MOOSE.ProgramPath,'Utilities/Utils.lua') -MOOSE.Include(MOOSE.ProgramPath,'Core/Base.lua') -MOOSE.Include(MOOSE.ProgramPath,'Core/UserFlag.lua') -MOOSE.Include(MOOSE.ProgramPath,'Core/UserSound.lua') -MOOSE.Include(MOOSE.ProgramPath,'Core/Report.lua') -MOOSE.Include(MOOSE.ProgramPath,'Core/Scheduler.lua') -MOOSE.Include(MOOSE.ProgramPath,'Core/ScheduleDispatcher.lua') -MOOSE.Include(MOOSE.ProgramPath,'Core/Event.lua') -MOOSE.Include(MOOSE.ProgramPath,'Core/Settings.lua') -MOOSE.Include(MOOSE.ProgramPath,'Core/Menu.lua') -MOOSE.Include(MOOSE.ProgramPath,'Core/Zone.lua') -MOOSE.Include(MOOSE.ProgramPath,'Core/Database.lua') -MOOSE.Include(MOOSE.ProgramPath,'Core/Set.lua') -MOOSE.Include(MOOSE.ProgramPath,'Core/Point.lua') -MOOSE.Include(MOOSE.ProgramPath,'Core/Velocity.lua') -MOOSE.Include(MOOSE.ProgramPath,'Core/Message.lua') -MOOSE.Include(MOOSE.ProgramPath,'Core/Fsm.lua') -MOOSE.Include(MOOSE.ProgramPath,'Core/Radio.lua') -MOOSE.Include(MOOSE.ProgramPath,'Core/Spawn.lua') -MOOSE.Include(MOOSE.ProgramPath,'Core/SpawnStatic.lua') -MOOSE.Include(MOOSE.ProgramPath,'Core/Goal.lua') -MOOSE.Include(MOOSE.ProgramPath,'Core/Cargo.lua') -MOOSE.Include(MOOSE.ProgramPath,'Core/Spot.lua') -MOOSE.Include(MOOSE.ProgramPath,'Wrapper/Object.lua') -MOOSE.Include(MOOSE.ProgramPath,'Wrapper/Identifiable.lua') -MOOSE.Include(MOOSE.ProgramPath,'Wrapper/Positionable.lua') -MOOSE.Include(MOOSE.ProgramPath,'Wrapper/Controllable.lua') -MOOSE.Include(MOOSE.ProgramPath,'Wrapper/Group.lua') -MOOSE.Include(MOOSE.ProgramPath,'Wrapper/Unit.lua') -MOOSE.Include(MOOSE.ProgramPath,'Wrapper/Client.lua') -MOOSE.Include(MOOSE.ProgramPath,'Wrapper/Static.lua') -MOOSE.Include(MOOSE.ProgramPath,'Wrapper/Airbase.lua') -MOOSE.Include(MOOSE.ProgramPath,'Wrapper/Scenery.lua') -MOOSE.Include(MOOSE.ProgramPath,'Functional/Scoring.lua') -MOOSE.Include(MOOSE.ProgramPath,'Functional/CleanUp.lua') -MOOSE.Include(MOOSE.ProgramPath,'Functional/Movement.lua') -MOOSE.Include(MOOSE.ProgramPath,'Functional/Sead.lua') -MOOSE.Include(MOOSE.ProgramPath,'Functional/Escort.lua') -MOOSE.Include(MOOSE.ProgramPath,'Functional/MissileTrainer.lua') -MOOSE.Include(MOOSE.ProgramPath,'Functional/ATC_Ground.lua') -MOOSE.Include(MOOSE.ProgramPath,'Functional/Detection.lua') -MOOSE.Include(MOOSE.ProgramPath,'Functional/Designate.lua') -MOOSE.Include(MOOSE.ProgramPath,'Functional/RAT.lua') -MOOSE.Include(MOOSE.ProgramPath,'Functional/ZoneGoal.lua') -MOOSE.Include(MOOSE.ProgramPath,'Functional/ZoneGoalCoalition.lua') -MOOSE.Include(MOOSE.ProgramPath,'Functional/ZoneCaptureCoalition.lua') -MOOSE.Include(MOOSE.ProgramPath,'AI/AI_Balancer.lua') -MOOSE.Include(MOOSE.ProgramPath,'AI/AI_A2A.lua') -MOOSE.Include(MOOSE.ProgramPath,'AI/AI_A2A_Patrol.lua') -MOOSE.Include(MOOSE.ProgramPath,'AI/AI_A2A_Cap.lua') -MOOSE.Include(MOOSE.ProgramPath,'AI/AI_A2A_Gci.lua') -MOOSE.Include(MOOSE.ProgramPath,'AI/AI_A2A_Dispatcher.lua') -MOOSE.Include(MOOSE.ProgramPath,'AI/AI_Patrol.lua') -MOOSE.Include(MOOSE.ProgramPath,'AI/AI_Cap.lua') -MOOSE.Include(MOOSE.ProgramPath,'AI/AI_Cas.lua') -MOOSE.Include(MOOSE.ProgramPath,'AI/AI_Bai.lua') -MOOSE.Include(MOOSE.ProgramPath,'AI/AI_Formation.lua') -MOOSE.Include(MOOSE.ProgramPath,'Actions/Act_Assign.lua') -MOOSE.Include(MOOSE.ProgramPath,'Actions/Act_Route.lua') -MOOSE.Include(MOOSE.ProgramPath,'Actions/Act_Account.lua') -MOOSE.Include(MOOSE.ProgramPath,'Actions/Act_Assist.lua') -MOOSE.Include(MOOSE.ProgramPath,'Tasking/CommandCenter.lua') -MOOSE.Include(MOOSE.ProgramPath,'Tasking/Mission.lua') -MOOSE.Include(MOOSE.ProgramPath,'Tasking/Task.lua') -MOOSE.Include(MOOSE.ProgramPath,'Tasking/DetectionManager.lua') -MOOSE.Include(MOOSE.ProgramPath,'Tasking/Task_A2G_Dispatcher.lua') -MOOSE.Include(MOOSE.ProgramPath,'Tasking/Task_A2G.lua') -MOOSE.Include(MOOSE.ProgramPath,'Tasking/Task_A2A_Dispatcher.lua') -MOOSE.Include(MOOSE.ProgramPath,'Tasking/Task_A2A.lua') -MOOSE.Include(MOOSE.ProgramPath,'Tasking/Task_Cargo.lua') -MOOSE.Include(MOOSE.ProgramPath,'Tasking/TaskZoneCapture.lua') -MOOSE.Include(MOOSE.ProgramPath,'Moose.lua') -BASE:TraceOnOff(true) -env.info('*** MOOSE INCLUDE END *** ') diff --git a/Release Notes 2.2.0.docx b/Moose Release Notes/Release Notes 2.2.0.docx similarity index 100% rename from Release Notes 2.2.0.docx rename to Moose Release Notes/Release Notes 2.2.0.docx diff --git a/Release Notes 2.2.0.pdf b/Moose Release Notes/Release Notes 2.2.0.pdf similarity index 100% rename from Release Notes 2.2.0.pdf rename to Moose Release Notes/Release Notes 2.2.0.pdf diff --git a/Moose Setup/Moose Templates/Moose_Dynamic_Loader.lua b/Moose Setup/Moose Templates/Moose_Dynamic_Loader.lua new file mode 100644 index 000000000..87044ad51 --- /dev/null +++ b/Moose Setup/Moose Templates/Moose_Dynamic_Loader.lua @@ -0,0 +1,22 @@ +env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' ) + +local base = _G + +__Moose = {} + +__Moose.Include = function( IncludeFile ) + if not __Moose.Includes[ IncludeFile ] then + __Moose.Includes[IncludeFile] = IncludeFile + local f = assert( base.loadfile( __Moose.ProgramPath .. IncludeFile ) ) + if f == nil then + error ("Moose: Could not load Moose file " .. IncludeFile ) + else + env.info( "Moose: " .. IncludeFile .. " dynamically loaded from " .. __Moose.ProgramPath ) + return f() + end + end +end + +__Moose.ProgramPath = "Scripts/Moose/" + +__Moose.Includes = {} diff --git a/Moose Setup/Moose Templates/Moose_Static_Loader.lua b/Moose Setup/Moose Templates/Moose_Static_Loader.lua new file mode 100644 index 000000000..eedc31db7 --- /dev/null +++ b/Moose Setup/Moose Templates/Moose_Static_Loader.lua @@ -0,0 +1,2 @@ +env.info( '*** MOOSE STATIC INCLUDE START *** ' ) + diff --git a/Moose Mission Setup/Moose.files b/Moose Setup/Moose.files similarity index 96% rename from Moose Mission Setup/Moose.files rename to Moose Setup/Moose.files index 0179920de..657ffe1bd 100644 --- a/Moose Mission Setup/Moose.files +++ b/Moose Setup/Moose.files @@ -14,7 +14,6 @@ Core/Zone.lua Core/Database.lua Core/Set.lua Core/Point.lua -Core/Velocity.lua Core/Message.lua Core/Fsm.lua Core/Radio.lua @@ -41,7 +40,7 @@ Functional/Movement.lua Functional/Sead.lua Functional/Escort.lua Functional/MissileTrainer.lua -Functional/ATC_Ground.lua +Functional/AirbasePolice.lua Functional/Detection.lua Functional/Designate.lua Functional/RAT.lua @@ -78,4 +77,3 @@ Tasking/Task_Cargo.lua Tasking/TaskZoneCapture.lua Moose.lua - diff --git a/Moose Mission Setup/Moose_Create.lua b/Moose Setup/Moose_Create.lua similarity index 73% rename from Moose Mission Setup/Moose_Create.lua rename to Moose Setup/Moose_Create.lua index 0d39f746c..c15f3f5e2 100644 --- a/Moose Mission Setup/Moose_Create.lua +++ b/Moose Setup/Moose_Create.lua @@ -1,37 +1,34 @@ -- This routine is called from the LDT environment to create the Moose.lua file stub for use in .miz files. local MooseDynamicStatic = arg[1] -local MooseDate = arg[2] +local MooseCommitHash = arg[2] local MooseDevelopmentPath = arg[3] local MooseSetupPath = arg[4] +local MooseTargetPath = arg[5] print( "Moose (D)ynamic (S)tatic : " .. MooseDynamicStatic ) -print( "Current Date : " .. MooseDate ) +print( "Commit Hash ID : " .. MooseCommitHash ) print( "Moose development path : " .. MooseDevelopmentPath ) print( "Moose setup path : " .. MooseSetupPath ) +print( "Moose target path : " .. MooseTargetPath ) local MooseSourcesFilePath = MooseSetupPath .. "/Moose.files" -local MooseFilePath = MooseSetupPath .. "/Moose.lua" +local MooseFilePath = MooseTargetPath.."/Moose.lua" print( "Reading Moose source list : " .. MooseSourcesFilePath ) local MooseFile = io.open( MooseFilePath, "w" ) -if MooseDynamicStatic == "D" then - MooseFile:write( "env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' )\n" ) -end if MooseDynamicStatic == "S" then - MooseFile:write( "env.info( '*** MOOSE STATIC INCLUDE START *** ' )\n" ) -end - -MooseFile:write( "env.info( 'Moose Generation Timestamp: " .. MooseDate .. "' )\n" ) + MooseFile:write( "env.info( '*** MOOSE GITHUB Commit Hash ID: " .. MooseCommitHash .. " ***' )\n" ) +end local MooseLoaderPath if MooseDynamicStatic == "D" then - MooseLoaderPath = MooseSetupPath .. "/Moose Create Dynamic/Moose_Dynamic_Loader.lua" + MooseLoaderPath = MooseSetupPath .. "/Moose Templates/Moose_Dynamic_Loader.lua" end if MooseDynamicStatic == "S" then - MooseLoaderPath = MooseSetupPath .. "/Moose Create Static/Moose_Static_Loader.lua" + MooseLoaderPath = MooseSetupPath .. "/Moose Templates/Moose_Static_Loader.lua" end local MooseLoader = io.open( MooseLoaderPath, "r" ) @@ -50,7 +47,7 @@ while( MooseSource ) do local MooseFilePath = MooseDevelopmentPath .. "/" .. MooseSource if MooseDynamicStatic == "D" then print( "Load dynamic: " .. MooseSource ) - MooseFile:write( "MOOSE.Include( MOOSE.ProgramPath, '" .. MooseSource .. "' )\n" ) + MooseFile:write( "__Moose.Include( '" .. MooseSource .. "' )\n" ) end if MooseDynamicStatic == "S" then print( "Load static: " .. MooseSource ) diff --git a/Moose Setup/build_missions.bat b/Moose Setup/build_missions.bat new file mode 100644 index 000000000..dbe405ee0 --- /dev/null +++ b/Moose Setup/build_missions.bat @@ -0,0 +1,20 @@ +git clone https://github.com/FlightControl-Master/MOOSE_MISSIONS.git missions + +appveyor DownloadFile https://github.com/FlightControl-Master/MOOSE_MISSIONS/archive/Release.zip + +7z x Release.zip + +dir + +For /R MOOSE_MISSIONS-Release %%M IN (*.miz) do ( + echo "Mission: %%M" + mkdir Temp + cd Temp + mkdir l10n + mkdir l10n\DEFAULT + copy "..\Moose Mission Setup\Moose.lua" l10n\DEFAULT + copy "%%~pM%%~nM.lua" l10n\DEFAULT\*.* + 7z -bb0 u "%%M" "l10n\DEFAULT\*.lua" + cd .. + rmdir /S /Q Temp +) diff --git a/README.md b/README.md index ddbde8af8..7af293f90 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ It is the ambition to grow this framework as a de-facto standard for mission des ## MOOSE Main Site -[Click on this link to browse to the MOOSE main web page.](http://flightcontrol-master.github.io/MOOSE) +[Click on this link to browse to the MOOSE main web page.](http://flightcontrol-master.github.io/MOOSE_DOCS) Documentation on the MOOSE class hierarchy, usage guides and background information can be found here for normal users, beta testers and contributors. ## MOOSE Missions diff --git a/Utils/7-Zip/7-zip.chm b/Utils/7-Zip/7-zip.chm deleted file mode 100644 index 1dd03b8e3..000000000 Binary files a/Utils/7-Zip/7-zip.chm and /dev/null differ diff --git a/Utils/7-Zip/7-zip.dll b/Utils/7-Zip/7-zip.dll deleted file mode 100644 index c06074bc5..000000000 Binary files a/Utils/7-Zip/7-zip.dll and /dev/null differ diff --git a/Utils/7-Zip/7-zip32.dll b/Utils/7-Zip/7-zip32.dll deleted file mode 100644 index c5d427fc5..000000000 Binary files a/Utils/7-Zip/7-zip32.dll and /dev/null differ diff --git a/Utils/7-Zip/7z.dll b/Utils/7-Zip/7z.dll deleted file mode 100644 index 042cbf1d4..000000000 Binary files a/Utils/7-Zip/7z.dll and /dev/null differ diff --git a/Utils/7-Zip/7z.exe b/Utils/7-Zip/7z.exe deleted file mode 100644 index c8feeddf8..000000000 Binary files a/Utils/7-Zip/7z.exe and /dev/null differ diff --git a/Utils/7-Zip/7z.sfx b/Utils/7-Zip/7z.sfx deleted file mode 100644 index 5a8b5f662..000000000 Binary files a/Utils/7-Zip/7z.sfx and /dev/null differ diff --git a/Utils/7-Zip/7zCon.sfx b/Utils/7-Zip/7zCon.sfx deleted file mode 100644 index 308663917..000000000 Binary files a/Utils/7-Zip/7zCon.sfx and /dev/null differ diff --git a/Utils/7-Zip/7zFM.exe b/Utils/7-Zip/7zFM.exe deleted file mode 100644 index 237e97eae..000000000 Binary files a/Utils/7-Zip/7zFM.exe and /dev/null differ diff --git a/Utils/7-Zip/7zG.exe b/Utils/7-Zip/7zG.exe deleted file mode 100644 index 0442d42e3..000000000 Binary files a/Utils/7-Zip/7zG.exe and /dev/null differ diff --git a/Utils/7-Zip/History.txt b/Utils/7-Zip/History.txt deleted file mode 100644 index 89702db1f..000000000 --- a/Utils/7-Zip/History.txt +++ /dev/null @@ -1,1317 +0,0 @@ -HISTORY of the 7-Zip --------------------- - -16.04 2016-10-04 -------------------------- -- The bug was fixed: 7-Zip 16.03 exe installer under Vista didn't create - links in Start / Programs menu. -- Some bugs were fixed in RAR code. - - -16.03 2016-09-28 -------------------------- -- Installer and SFX modules now use some protection against DLL preloading attack. -- Some bugs were fixed in 7z, NSIS, SquashFS, RAR5 and another code. - - -16.02 2016-05-21 -------------------------- -- 7-Zip now can extract multivolume ZIP archives (z01, z02, ... , zip). -- Some bugs were fixed. - - -15.14 2015-12-31 -------------------------- -- 7-Zip File Manager: - - The code for "Open file from archive" operation was improved. - - The code for "Tools/Options" window was improved. - - The BUG was fixed: there was incorrect mouse cursor capture for - drag-and-drop operations from open archive to Explorer window. -- Some bugs were fixed. -- New localization: Yoruba. - - -15.12 2015-11-19 -------------------------- -- The release version. - - -15.11 beta 2015-11-14 -------------------------- -- Some bugs were fixed. - - -15.10 beta 2015-11-01 -------------------------- -- The BUG in 9.21 - 15.09 was fixed: - 7-Zip could ignore some parameters, specified for archive creation operation - for gzip and bzip2 formats in "Add to Archive" window and in command line - version (-m switch). -- Some bugs were fixed. - - -15.09 beta 2015-10-16 -------------------------- -- 7-Zip now can extract ext2 and multivolume VMDK images. -- Some bugs were fixed. - - -15.08 beta 2015-10-01 -------------------------- -- 7-Zip now can extract ext3 and ext4 (Linux file system) images. -- Some bugs were fixed. - - -15.07 beta 2015-09-17 -------------------------- -- 7-Zip now can extract GPT images and single file QCOW2, VMDK, VDI images. -- 7-Zip now can extract solid WIM archives with LZMS compression. -- Some bugs were fixed. - - -15.06 beta 2015-08-09 -------------------------- -- 7-Zip now can extract RAR5 archives. -- 7-Zip now doesn't sort files by type while adding to solid 7z archive. -- new -mqs switch to sort files by type while adding to solid 7z archive. -- The BUG in 7-Zip File Manager was fixed: - The "Move" operation to open 7z archive didn't delete empty files. -- The BUG in 15.05 was fixed: - console version added some text to the end of stdout stream, is -so switch was used. -- The BUG in 9.30 - 15.05 was fixed: - 7-Zip could not open multivolume sfx RAR archive. -- Some bugs were fixed. - - -15.05 beta 2015-06-14 -------------------------- -- 7-Zip now uses new installer. -- 7-Zip now can create 7z, xz and zip archives with 1536 MB dictionary for LZMA/LZMA2. -- 7-Zip File Manager now can operate with alternate file streams at NTFS - volumes via "File / Alternate Streams" menu command. -- 7-Zip now can extract .zipx (WinZip) archives that use xz compression. -- new optional "section size" parameter for BCJ2 filter for compression ratio improving. - Example: -mf=BCJ2:d9M, if largest executable section in files is smaller than 9 MB. -- Speed optimizations for BCJ2 filter and SHA-1 and SHA-256 calculation. -- Console version now uses stderr stream for error messages. -- Console version now shows names of processed files only in progress line by default. -- new -bb[0-3] switch to set output log level. -bb1 shows names of processed files in log. -- new -bs[o|e|p][0|1|2] switch to set stream for output messages; - o: output, e: error, p: progress line; 0: disable, 1: stdout, 2: stderr. -- new -bt switch to show execution time statistics. -- new -myx[0-9] switch to set level of file analysis. -- new -mmtf- switch to set single thread mode for filters. -- The BUG was fixed: - 7-Zip didn't restore NTFS permissions for folders during extracting from WIM archives. -- The BUG was fixed: - The command line version: if the command "rn" (Rename) was called with more - than one pair of paths, 7-Zip used only first rename pair. -- The BUG was fixed: - 7-Zip crashed for ZIP/LZMA/AES/AES-NI. -- The BUG in 15.01-15.02 was fixed: - 7-Zip created incorrect ZIP archives, if ZipCrypto encryption was used. - 7-Zip 9.20 can extract such incorrect ZIP archives. -- Some bugs were fixed. - - -9.38 beta 2015-01-03 -------------------------- -- Some bugs were fixed. - - -9.36 beta 2014-12-26 -------------------------- -- The BUG in command line version was fixed: - 7-Zip created temporary archive in current folder during update archive - operation, if -w{Path} switch was not specified. - The fixed 7-Zip creates temporary archive in folder that contains updated archive. -- The BUG in 9.33-9.35 was fixed: - 7-Zip silently ignored file reading errors during 7z or gz archive creation, - and the created archive contained only part of file that was read before error. - The fixed 7-Zip stops archive creation and it reports about error. -- Some bugs were fixed. - - -9.35 beta 2014-12-07 -------------------------- -- The BUG was fixed: - 7-Zip crashed during ZIP archive creation, if the number of CPU threads was more than 64. -- The BUG in 9.31-9.34 was fixed: - 7-Zip could not correctly extract ISO archives that are larger than 4 GiB. -- The BUG in 9.33-9.34 was fixed: - The option "Compress shared files" and -ssw switch didn't work. -- The BUG in 9.26-9.34 was fixed: - 7-Zip File Manager could crash for some archives open in "Flat View" mode. -- Some bugs were fixed. - - -9.34 alpha 2014-06-22 -------------------------- -- The BUG in 9.33 was fixed: - Command line version of 7-Zip could work incorrectly, if there is relative - path in exclude filename optiton (-x) and absolute path as include filename. -- The BUG in 9.26-9.33 was fixed: - 7-Zip could not open some unusual 7z archives that were created by another - software (not by 7-Zip). -- The BUG in 9.31-9.33 was fixed: - 7-Zip could crash with switch -tcab. - - -9.33 alpha 2014-06-15 -------------------------- -- 7-Zip now can show icons for 7-Zip items in Explorer's context menu. -- "Add to archive" dialog box: - - new options in "Path Mode" - - new option "Delete files after compression" - - new "NTFS" options for WIM and TAR formats: - - Store symbolic links - - Store hard links - - Store alternate data streams - - Store file security -- "Extract" dialog box: - - new optional field to set output folder name - - new option "Eliminate duplication of root folder" - - new option "Absolute pathnames" in "Path Mode". - - new option "Restore file security" (that works for WIM archives only) -- 7-Zip File Manager: - - new "File / Link" dialog box in to create symbolic links and hard links. -- Command line version: - - new -spd switch to Disable wildcard matching for file names - - new -spe switch to Eliminate duplication of root folder for extract archive command - - new -snh switch to store hard links as links (WIM and TAR formats only) - - new -snl switch to store symbolic links as links (WIM and TAR formats only) -- NSIS support was improved. -- The problem was fixed: - The command "extract to \*" with multiple archives could use same - output folder, if archives are placed inside PE (EXE) file. -- The BUG of 9.31-9.32 was fixed: - Command line version for test and extract commands returned the - value 0 as exit code, if it couldn't open archive. -- The BUG was fixed: - 7-Zip could not create archives with anti-items for any archive type, - except of 7z type -- Some bugs were fixed. -- New localization: Mongolian (script). - - -9.32 alpha 2013-12-01 -------------------------- -- 7-Zip now can create multivolume SFX archives in 7z format. - Standalone sfx module now can unpack external 7z archive with name that is - matched to name of sfx module. For example, sfx module renamed to archive.exe - can unpack archive.7z or archive.7z.001 . -- ZIP, NSIS, HFS, AR support was improved. -- 7-Zip now supports files larger than 4 GiB in ISO archives. -- Improved compression ratio in 7z format with maximum or ultra level for - executable files (EXE and DLL) that are larger than 16 MB (improved BCJ2 filter). -- Improved support for file pathnames longer than 260 characters. -- CRC and SHA checksum calculation for files can be called via Explorer's context menu. -- 7-Zip File Manager now also takes into account the numbers in filenames for sorting order. -- 7-Zip File Manager now can use RAM buffers instead of temp files to open - nested archives, if temp file is smaller than 1/4 of RAM size. -- 7-Zip File Manager can open files in "Parser" mode via "Open Archive > #" context - menu command. It shows the list of archives inside file. -- Command line version: - - new -t# switch to open file in "Parser" mode and show the list of archives inside file. - - new -stx{Type} switch to exclude archive type from using. - - -scs switch now supports UTF-16 encoding. - - now it shows time and memory usage statistics at the end of execution. -- The BUGs were fixed: - - 7-Zip 9.30 and early versions created ZIP archives with minor errors - in extra field of headers for directory items, if AES (WinZip-AES) encryption was used. - - 7-Zip could work incorrectly in decompression of more than one - multi-volume archive in one command. - - 7-Zip 9.24 alpha - 9.30 alpha versions could not extract ZIP archives - encrypted with PKWARE-AES method. -- Minimum supported system now is Windows 2000. 7-Zip doesn't work on Windows 95/98/ME. -- New localization: Irish. - - -9.30 alpha 2012-10-26 -------------------------- -- LZMA2 now is default compression method for .7z format. -- 7-Zip now can update WIM archives. -- 7-Zip File Manager now can move files to archives. -- The default encoding for TAR format now is UTF-8. You can use -mcp=1 switch for OEM encoding. -- Command line version: - - new "rn" command to rename files in archive. - - new -sdel switch to delete files after including to archive. - - new -sns switch to store NTFS alternate streams (for WIM format only). - - new -sni switch to store NT security information for files (for WIM format only). - - new -stl switch to set archive timestamp from the most recently modified file. -- Speed optimizations for opening big archives and big disk folders. -- 7-Zip now writes special padding blocks to headers of 7z archives for - faster archive opening. Note that 7-Zip 4.50 - 4.58 contain BUG, - so these old versions can't correctly work with such new 7z archives. -- DMG support was improved -- Some bugs were fixed. -- The BUG in 7-Zip 9.26 alpha - 9.29 alpha versions was fixed. - These alpha versions could not open non-solid 7z archive, if - some files were skipped during creation of that archive. - That problem is also related to 7z archives created in solid mode, - if each solid block contains no more than one file. - Note: 7-Zip skips files that were open for writing by another - application and shows warning in that case. -- New localization: Aragonese. - - -9.25 alpha 2011-09-16 -------------------------- -- LZMA decompression speed was improved. -- "compress and send to email" code was improved to support more email clients. -- New command "h" to calculate hash values CRC-32, CRC-64, SHA-256 or SHA-1 for files on disk. -- New -spf switch to store full file paths including drive letter to archive. - If you use that switch with extract command, please check that file names in archive are correct. -- Some bugs were fixed. - - -9.23 alpha 2011-06-07 -------------------------- -- The format of language files was changed. -- Some bugs were fixed. -- New localization: Karakalpak. - - -9.22 beta 2011-04-18 -------------------------- - -- 7-Zip now uses progress indicator displayed on a taskbar button under Windows 7. -- The BUG in 7-Zip 9.21 beta was fixed: - 7-Zip could ignore some options when you created ZIP archives. - For example, it could use ZipCrypto cipher instead of AES-256. - - -9.21 beta 2011-04-11 -------------------------- -- 7-Zip now can unpack UEFI BIOS files. -- 64-bit version of 7-Zip now includes additional 32-bit shell extension DLL. - So other 32-bit programs can call 64-bit 7-Zip via context menu. -- Now it's possible to associate 7-Zip with file types without Administrator rights. -- New -mf=FilterID switch to specify compression filter. Examples: - 7z a -mf=bcj2 a.7z a.tar - 7z a -mf=delta:4 a.7z a.wav - 7z a -mf=bcj a.tar.xz a.tar -- 32-bit 7-Zip running under 64-bit Windows now can use up to 4 GB of RAM. -- Some bugs were fixed. -- New localizations: Corsican, Kyrgyz, Ligurian. - - -9.20 2010-11-18 -------------------------- -- Some bugs were fixed. - - -9.19 beta 2010-11-11 -------------------------- -- The console version now doesn't show entered password. -- Some bugs were fixed. - - -9.18 beta 2010-11-02 -------------------------- -- 7-Zip now can unpack SquashFS and CramFS filesystem images. -- 7-Zip now can unpack some TAR and ISO archives with incorrect headers. -- New small SFX module for installers (in Extra package). -- Some bugs were fixed. - - -9.17 beta 2010-10-04 -------------------------- -- Disk fragmentation problem for ZIP archives created by 7-Zip was fixed. - - -9.16 beta 2010-09-08 -------------------------- -- 7-Zip now supports files that are larger than 8 GB in TAR archives. -- NSIS support was improved. -- Some bugs were fixed. -- New localizations: Hindi, Gujarati, Sanskrit. - - -9.15 beta 2010-06-20 -------------------------- -- Some bugs were fixed. -- New localization: Tatar. - - -9.14 beta 2010-06-04 -------------------------- -- WIM support was improved. - - -9.13 beta 2010-04-15 -------------------------- -- 7-Zip now stores NTFS file timestamps to ZIP archives. -- New additional "Open archive >" item in context menu allows to select - archive type for some files. -- Some bugs were fixed. -- New localization: Uyghur. - - -9.12 beta 2010-03-24 -------------------------- -- ZIP / PPMd compression ratio was improved in Maximum and Ultra modes. -- The BUG in 7-Zip 9.* beta was fixed: LZMA2 codec didn't work, - if more than 10 threads were used (or more than 20 threads in some modes). - - -9.11 beta 2010-03-15 -------------------------- -- 7-Zip now supports PPMd compression in ZIP archives. -- Speed optimizations in PPMd codec. -- The support for archives in installers was improved. -- Some bugs were fixed. -- New localization: Kazakh. - - -9.10 beta 2009-12-22 -------------------------- -- The BUG in 7-Zip 9.09 beta was fixed: - 7-Zip created incorrect ZIP archives, if ZipCrypto encryption was used. - - -9.09 beta 2009-12-12 -------------------------- -- 7-Zip now can unpack Apple Partition Map (APM) disk images. -- Speed optimizations in AES code for Intel's 32nm CPUs. -- Speed optimizations in CRC calculation code for Intel's Atom CPUs. -- Some bugs were fixed. - - -9.07 beta 2009-08-27 -------------------------- -- It's possible to specify Diff program in options (7-Zip File Manager). -- Some bugs were fixed. - - -9.06 beta 2009-08-17 -------------------------- -- 7-Zip now can unpack MSLZ archives. -- Partial parsing for EXE resources, SWF and FLV. -- Some bugs were fixed. - - -9.04 beta 2009-05-30 -------------------------- -- 7-Zip now can update solid .7z archives. -- 7-Zip now supports LZMA2 compression method. -- 7-Zip now supports XZ archives. -- 7-Zip now can unpack NTFS, FAT, VHD and MBR archives. -- 7-Zip now can unpack GZip, BZip2, LZMA, XZ and TAR archives from stdin. -- 7-Zip now can open/copy/compress disk images (like \\.\c:) from \\.\ folder. -- 7-Zip File Manager now doesn't use temp files to open nested archives - stored without compression. -- New -scrc switch to calculate total CRC-32 during extracting / testing. -- New -scc{WIN|DOS|UTF-8} switch to specify charset for console input/output (default = DOS). -- Some bugs were fixed. - - -4.65 2009-02-03 -------------------------- -- 7-Zip File Manager now can calculate SHA-256 checksum. -- Some bugs were fixed. - - -4.64 2009-01-03 -------------------------- -- The bug in 7-Zip 4.63 was fixed: 7-Zip could not decrypt .ZIP archives - encrypted with WinZip-AES method. - - -4.63 2008-12-31 -------------------------- -- 7-Zip now can unpack ZIP archives encrypted with PKWARE-AES. -- Some bugs were fixed. - - -4.62 2008-12-02 -------------------------- -- Some bugs were fixed. - - -4.61 beta 2008-11-23 -------------------------- -- 7-Zip now supports LZMA compression for .ZIP archives. -- Some bugs were fixed. -- New localization: Sinhala. - - -4.60 beta 2008-08-19 -------------------------- -- Some bugs were fixed. - - -4.59 beta 2008-08-13 -------------------------- -- 7-Zip now can unpack UDF, XAR and DMG/HFS archives. -- 7-Zip File Manager now keeps encryption when you edit encrypted file inside archive. -- 7-Zip File Manager now allows to change current folder from the address bar drop-down list. -- It's allowed to use -t switch for "list" and "extract" commands. -- Some bugs were fixed. -- New localizations: Icelandic, Kurdish Sorani. - - -4.58 beta 2008-05-05 -------------------------- -- Some speed optimizations. -- 7-Zip now can unpack .lzma archives. -- Unicode (UTF-8) support for filenames in .ZIP archives. Now there are 3 modes: - 1) Default mode: 7-Zip uses UTF-8, if the local code page doesn't contain required symbols. - 2) -mcu switch: 7-Zip uses UTF-8, if there are non-ASCII symbols. - 3) -mcl switch: 7-Zip uses local code page. -- Now it's possible to store file creation time in 7z and ZIP archives (-mtc switch). -- 7-Zip now can unpack multivolume RAR archives created with - "old style volume names" scheme and names *.001, *.002, ... -- Now it's possible to use -mSW- and -mSW+ switches instead of -mSW=off and -mSW=on -- Some bugs were fixed. -- New localizations: Punjabi (Indian), Pashto. - - -4.57 2007-12-06 -------------------------- -- The BUG in command line version was fixed: -up3 switch - could work incorrectly. - - -4.56 beta 2007-10-24 -------------------------- -- Some bugs were fixed. - - -4.55 beta 2007-09-05 -------------------------- -- Some bugs were fixed. - - -4.54 beta 2007-09-04 -------------------------- -- Decompression speed was increased. - - -4.53 beta 2007-08-27 -------------------------- -- "Test" and "Info" buttons now work for open archives. -- The bug in 7-Zip 4.48 - 4.52 beta was fixed: - 7-Zip could create .ZIP archives with broken files. -- Some bugs were fixed. - - -4.52 beta 2007-08-03 -------------------------- -- 7-Zip now can unpack Compound files (msi, doc, ...). -- Some bugs were fixed. - - -4.51 beta 2007-07-25 -------------------------- -- Bug was fixed: 7-Zip 4.50 beta could not open some .7z archives. - - -4.50 beta 2007-07-24 -------------------------- -- New switch for command line version: - -ssc[-] enables/disables case-sensitive mode for file names. -- Speed optimizations for AES encryption. -- Some bugs were fixed. - - -4.49 beta 2007-07-11 -------------------------- -- 7-Zip now can unpack WIM archives. -- 7-Zip now replaces incorrect characters in filenames during extracting. - - -4.48 beta 2007-06-26 -------------------------- -- Encryption strength for .7z format was increased. - Now it uses random initialization vectors. -- Some bugs were fixed. - - -4.47 beta 2007-05-27 -------------------------- -- Bugs of 7-Zip 4.46 beta were fixed: BZip2 could work incorrectly. - - -4.46 beta 2007-05-25 -------------------------- -- New fast compression mode for Deflate method in Zip and GZip. -- New "Compress shared files" option in GUI and -ssw switch. -- Some bugs were fixed. -- New localization: Norwegian Nynorsk. - - -4.45 beta 2007-04-17 -------------------------- -- Now it's possible to specify the size of solid block and the number - of CPU threads in "Add to archive" dialog box. -- Default dictionary size was increased: Normal: 16 MB, Max: 32 MB. -- Speed optimizations. -- Benchmark was improved (new "b" command in command line version). -- The number of DLL files was reduced. -- Now it's possible to associate 7-zip with combined types like .tbz2 -- switch -mhcf=off is not supported now. -- If -t{Type} switch is not specified, 7-Zip now uses extension of archive to - detect the type of archive. -- Some bugs were fixed. -- New localization: Welsh. - - -4.44 beta 2007-01-20 -------------------------- -- Speed optimizations for LZMA, Deflate, BZip2 and unRAR. -- 7-Zip now supports file pathnames longer than 260 characters. -- Some bugs were fixed. -- New localizations: Bangla, Bashkir, Nepali. - - -4.43 beta 2006-09-15 -------------------------- -- 7-Zip now can use multi-threading mode for compressing to .ZIP archives. -- ZIP format supporting was improved. -- 7-Zip now supports WinZip-compatible AES-256 encryption for .ZIP archives. -- New context menu items for .ZIP archives creating. -- 7-Zip now uses order list (list of extensions) for files sorting for compressing - to .7z archives. It can slightly increase compression ratio in some cases. -- 7-Zip now restores modification time of folders during .7z archives extracting. -- Some bugs were fixed. -- New localizations: Armenian, Marathi. - - - -4.42 2006-05-14 -------------------------- -- Compressing speed and Memory requirements were increased. - Default dictionary size was increased: Fastest: 64 KB, Fast: 1 MB, - Normal: 4 MB, Max: 16 MB, Ultra: 64 MB. -- BZip2 compressing / decompressing now can work in multi-threading mode -- Multi-threading mode now is default for multi-processor systems -- 64-bit version now supports 1 GB dictionary -- 7z/LZMA now can use only these match finders: HC4, BT2, BT3, BT4 -- Compression ratio in Zip/GZip/Deflate in Ultra mode was increased -- 7-Zip now can unpack ISO archives and some installers created by NSIS -- Optional "Flat View" mode in 7-Zip File Manager -- 7-Zip File Manager now can calculate CRC checksums for files -- -x switch with relative paths now affects files specified with absolute paths -- New switch for 7za.exe (console version): -slt. - "l" (list) command with -slt shows technical information for archive. -- New switch: -scs{WIN|DOS|UTF-8} specifies charset for list files. - Default charset for list files is UTF-8 now. -- Some bugs were fixed -- New localizations: Albanian, Kurdish - - -4.32 2005-12-09 -------------------------- -- Bug was fixed: 7-Zip 4.31 didn't work in Windows 95 - - -4.31 2005-12-04 -------------------------- -- Small changes -- New localization: Basque - - -4.30 beta 2005-11-18 -------------------------- -- Files 7zFMn.exe, 7zGn.exe, 7-zipn, 7za.exe, 7zC.sfx were removed from 7-zip package -- 7-Zip now uses uncompressed SFX: 7z.sfx -- Sfx modules 7z.sfx and 7zCon.sfx now use msvcrt.dll -- Speed optimizations in LZMA maximum/ultra compressing. -- LZMA now supports word size up to 273 -- 7-Zip now reduces dictionary size for LZMA, if you compress files - smaller than specified dictionary size. -- 7-Zip now can use large memory pages: - GUI: 7-Zip File Manager / Options / Settings / Use large memory pages. - Command line version: -slp switch. - This feature allows to increase speed of compressing. - But 7-Zip can make some pause at starting of compressing for allocating large pages. - Also Task Manager doesn't show real memory usage of program, if 7-Zip uses large pages. - This feature works only on Windows 2003 / XP x64 / Vista. - Also you must have administrator's rights for your system. - Recommended size of RAM: 1 GB or more. - To install this feature you must run 7-Zip File Manager at least once, - close it and reboot system. -- Some bugs were fixed - - -4.29 beta 2005-09-28 -------------------------- -- Bug was fixed: 7-Zip 4.28 beta worked incorrectly in Windows 95/98/Me - - -4.28 beta 2005-09-27 -------------------------- -- Bug was fixed: 7-Zip 4.27 beta created incorrect multivolume archives. -- "Duplicate filename" collision problem between names with ligatures was fixed. - - -4.27 beta 2005-09-21 -------------------------- -- 7-Zip can unpack CHM/HXS (MS HTML HELP) archives -- 7-Zip can unpack multivolume CAB archives -- Now 7-Zip deletes files to the Recycle Bin by default. - Shift+Delete deletes files permanently. -- Some bugs were fixed -- New localization: Tatarish - - -4.26 beta 2005-08-05 -------------------------- -- LZH format support (extracting only) -- Some bugs were fixed -- New localization: Ido - - -4.25 beta 2005-07-31 -------------------------- -- 7-Zip now doesn't interrupt the compressing when it can not - find specified file as in version 4.24 beta. It just shows warning. -- 7-Zip now supports standard selection mode in the file list -- Some bugs were fixed - - -4.24 beta 2005-07-06 -------------------------- -- 7-Zip now supports right-click Drag and Drop in Explorer -- Command line version now supports short file names (like FILENA~1.TXT) -- If there are no wildcard names and there is no -r switch in command line, - 7-Zip now checks that specified files exist on disk before compressing. -- Some bugs were fixed - - -4.23 2005-06-29 -------------------------- -- Drag and Drop support -- 7-Zip File Manager now can copy files from one archive to another -- Some bugs were fixed -- New localizations: Extremaduran, Malay - - -4.20 2005-05-30 -------------------------- -- No changes - - -4.19 beta 2005-05-21 -------------------------- -- BZip2 code was rewritten. Now it supports 3 modes: Normal, Maximum and - Ultra. In Normal mode it compresses almost as original BZip2 compressor. - Compression ratio in Maximum and Ultra modes is 1-3% better for some files, - but Maximum Mode is about 3 times slower and Ultra Mode is about 8 times - slower than Normal mode. -- Console version now prints all messages to stdout by default, - and if -so switch is specified, 7-Zip prints messages to stderr. -- Some bugs were fixed -- New localizations: Azeri, Georgian - - -4.18 beta 2005-04-19 -------------------------- -- Bug in v4.17 beta was fixed: 7-Zip File Manager could crash - after some operations with archives - - -4.17 beta 2005-04-18 -------------------------- -- To increase protection from viruses, 7-Zip now does not open - files with more than 4 continuous spaces in the name. - And 7-Zip changes such long spaces in name to " ... " in the file list. -- Code size optimization -- Some files were moved from main package to extra package: - - Plugin for FAR Manager - - SFX modules for installers (7zS.sfx and 7zSD.sfx) -- New localizations: Asturian, Indonesian - - -4.16 beta 2005-03-29 -------------------------- -- Speed optimization (5%) for 7z / LZMA -- 7za.exe now supports .Z archives -- -r- switch in command line now is default for all commands -- Some bugs were fixed -- New localization: Uzbek - - -4.15 beta 2005-01-25 -------------------------- -- Z format supporting (extracting only) -- 7-Zip now can extract ZIP archives compressed with "Shrink" method -- 7-Zip now doesn't interrupt the compressing when it can not open file. - 7-Zip just skips that file and shows warning. -- Some bugs were fixed -- New localization: Frisian - - -4.14 beta 2005-01-11 -------------------------- -- 7-Zip installer was created with NSIS. - Now it installs 7-Zip for all users (under Windows 2000/XP). -- Now 7-Zip can create multivolume archives - (switch -v for command line) -- Some bugs were fixed -- New localizations: Breton, Farsi - - -4.13 beta 2004-12-14 -------------------------- -- Switch "--" stops switches parsing -- Some bugs were fixed - - -4.12 beta 2004-11-18 -------------------------- -- Bug in v4.11 beta was fixed: - 7-Zip created incorrect ZIP archives if file size was - from 3.75 GB to 4 GB. - - -4.11 beta 2004-11-16 -------------------------- -- 7-Zip now shows file names during compressing/decompressing -- 7-Zip now supports Zip64 extension of ZIP format. So now it's - possible to compress files bigger than 4 GB to ZIP archives. -- Some bugs were fixed -- New localization: Galician - - -4.10 beta 2004-10-21 -------------------------- -- Bugs in v4.0* were fixed: - - Some commands in command line with "-r" switch worked incorrectly, - so 7-zip could skip some files during compressing - - Some other bugs were fixed -- Small internal changes - - -4.09 beta 2004-10-05 -------------------------- -- Bugs in v4.0* were fixed: - - Renaming inside archives didn't work or worked incorrectly - - GUI SFX didn't show extracting dialog at start -- Small fixes in 7-Zip GUI (7zG.exe) - - -4.08 beta 2004-10-04 -------------------------- -- Bug in installer for v4.07 was fixed: when rebooting - is required, it rebooted without asking user -- Small fixes in 7-Zip GUI (7zG.exe) - - -4.07 beta 2004-10-03 -------------------------- -- Big amount of code was changed in this beta version. - So don't use it for important data compressing. - And test archive after compressing. - -- Unified command line interface to GUI and console versions -- 7-Zip now can extract or test several archives in one command -- 7-Zip now doesn't interrupt the compressing when file is locked by - other application. 7-Zip just skips that file and shows warning. - Note: previous versions of 7-Zip had bug, so they can not unpack - non-solid and some solid 7z archives with such skipped files. -- Command line interface was changed: - - now it's possible to use absolute pathnames - - syntax simplification: - was: 7z a a Folder1\* Folder2\* -r - now: 7z a a Folder1 Folder2 - - now it's possible to use complex wildcard commands, like *\*111*\* -- More smart detection of archive type for files with unusual - file name extensions -- Supporting for RAR archives with encrypted headers -- CPIO format supporting was improved -- For GZip and BZip2 formats you can: - - Compress from stdin (-si switch) - - Compress to stdout (-so switch) - - Extract to stdout (-so switch) -- 7-Zip File Manager: - - Split and Combine commands - - new list view options: Full row select, Show grid lines -- Internal reconstruction -- Some bugs were fixed -- New localizations: Friulian, Macedonian, Mongolian, Tamil, Thai - - -3.13 2003-12-11 -------------------------- -- Some small bugs were fixed - - -3.12 2003-12-10 -------------------------- -- Now you can select compression method, dictionary size - and word size in "Add to archive" dialog box. Also it - shows memory usage. -- 7-Zip File Manager now contains toolbars. -- New "Benchmark" command in 7-Zip File Manager. - It measures compressing and decompressing speeds and - shows rating values. -- Some bugs were fixed. - - -3.11 2003-10-06 -------------------------- -- 7-zip now use limitations for solid block size - for increasing the speed of random file decompressing: - - in Store mode: 0 B - - in Fast mode: 16 MB - - in Normal mode: 256 MB - - in Maximum mode: 1 GB - - in Ultra mode: 4 GB -- 7z.exe, 7za.exe and SFX modules now support Unicode - file names under Windows NT/2000/XP/2003. - 7zn.exe and 7zan.exe were removed from package. -- Some bugs were fixed -- New localization: Afrikaans - - -3.10 2003-09-27 -------------------------- -- Drag-and-Drop from external application -- GUI version (7zG.exe) can compress files with absolute paths -- Compression dialog doesn't suggest bzip2 and gzip2 types when - there are more than one selected file -- Optional auto renaming for existing files during extraction - in command line version (-aot switch). -- Some bugs were fixed - - -3.09.02 2003-09-20 -------------------------- -- Optional limitation for solid block size for increasing - the speed of random file decompressing (-ms switch) - - -3.09.01 beta 2003-09-06 -------------------------- -- Automatic compression filter for executable files: - dll, exe, ocx, sfx, sys, (-mf switch) -- Compression levels in 7z now are: - - Fast: 32 KB dictionary, BCJ filter - - Normal: 2 MB dictionary, BCJ filter - - Maximum: 8 MB dictionary, BCJ filter, max settings - - Ultra: 32 MB dictionary, BCJ2 filter, max settings -- Updating solid 7z archives now is supported, if it doesn't - require repacking solid blocks -- -mhcf switch for 7z format now is default -- Some bugs were fixed - - -3.08.04 beta 2003-08-24 -------------------------- -- Favorites menu in 7-Zip File Manager -- Some bugs were fixed - - -3.08.03 beta 2003-08-21 -------------------------- -- Automatic adding of extension to archive name in Compress Dialog -- Some bugs in previous 3.08.* versions were fixed: - - Storing columns width inside archives in File Manager - - Opening archive inside archive - - Quotes in list files in console version - - -3.08.02 beta 2003-08-20 -------------------------- -- Some bugs were fixed - - -3.08 beta 2003-08-19 -------------------------- -- Compress dialog: - - Supporting fast compressing mode (-mx=1 switch) - - Multi-threading option for Multi-Processor systems - or Pentium 4 with Hyper-Threading - - Encrypt file names option -- New context menu items: - - Extract here - - Extract to - - Compress and email -- Internal reconstruction, registry using was reduced -- New localization: Esperanto - - -2.30 Beta 32 2003-05-15 -------------------------- -- New features in compressing / decompressing window. -- "Show password" option. -- Some other small changes. -- New localization: Valencian. - - -2.30 Beta 31 2003-04-29 -------------------------- -- Some bugs were fixed. - - -2.30 Beta 30 2003-04-19 -------------------------- -- 7-Zip File Manager: - - Showing .. item. - - 1/2 Panels mode switching (F9). -- Supporting Bzip2 compression in ZIP archives. -- Some bugs were fixed. -- Some optimization recompiling for reducing code size. - - -2.30 Beta 29 2003-04-07 -------------------------- -- 7-Zip File Manager: - - "7-Zip" and "System" submenus in "Files" menu. - - Path history and "Browse" button in "Copy" dialog. -- RAR supporting was improved. -- Some bugs were fixed. -- Small changes in LZMA code. -- New localizations: Hebrew, Vietnamese. - - -2.30 Beta 28 2003-02-16 -------------------------- -- Some bugs were fixed: - - Updating 7z archives that are larger than 4 GB. - - Using anti-items in 7z format. - - Compressing empty files with password to zip format. -- In max mode 7z now uses 8 MB dictionary instead of 4 MB. -- 7-Zip File Manager: - - Supporting file comments: Ctrl-Z. - - New key alias for folder bookmarks: [Shift]+Alt+Number. - - -2.30 Beta 27 2003-01-24 -------------------------- -- Two BUGs in two previous beta versions (Beta 25 and Beta 26) - were fixed: - 1. Incorrect compressing to non-solid 7z archive - when files have some very big sizes: - 4 GB, 8 GB, 12 GB, 16 GB, ... - 2. Incorrect percent showing in 7z compressing - when files are bigger than 4 GB. -- Supporting multivolume RAR and SPLIT archives. -- Supporting DEB archives. -- Supporting old version of CPIO format. -- Some bugs were fixed. -- New localizations: Korean, Swedish. - - -2.30 Beta 26 2003-01-12 -------------------------- -- Supporting Deflate64 method in Zip archives. -- Supporting Rar 1.50 archives. -- Some bugs were fixed. - - -2.30 Beta 25 2003-01-02 -------------------------- -- Encryption feature for 7z format (AES-256). -- New optional archive header compressing mode (-mhcf). -- Archive headers now always are compressed with LZMA method. -- Updating non-solid 7z archives without -ms=off now is allowed. -- Folder creating and item renaming inside archive now is supported. -- Supporting encrypted Rar3 archives. -- Supporting Unicode names in Rar3 archives. -- Some bugs were fixed. -- New localizations: Lithuanian, Voro. - - -2.30 Beta 24 2002-11-01 -------------------------- -- Some internal reconstructions. -- -m switch syntax was slightly changed. -- Some bugs were fixed. -- New localizations: Catalan, Norwegian, Romanian. - - -2.30 Beta 23 2002-09-07 -------------------------- -- Encryption feature for zip format. -- Percent indicating for some operations. -- Some bugs were fixed. - - -2.30 Beta 22 2002-08-31 -------------------------- -- New program: 7-Zip File Manager. -- Command line version now doesn't allow absolute paths - for compressing files. -- New localizations: Belarusian, Greek. -- Bug in FAR plugin was fixed: - Incorrect updating when archive has no explicit - directory items for file items. -- Some bugs were fixed. - - -2.30 Beta 21 2002-07-08 -------------------------- -- RAM requirements for LZMA (7z) compression were reduced. -- Small bug in FAR plugin was fixed. - - -2.30 Beta 20 2002-07-01 -------------------------- -- RAM requirements for LZMA (7z) decompression were reduced. -- New localization: Turkish. -- Some bugs were fixed. - - -2.30 Beta 19 2002-04-11 -------------------------- -- Supporting RAR 3.0 archives. -- New localizations: Danish, Ukrainian. - - -2.30 Beta 18 2002-03-25 -------------------------- -- Compressing speed in 7z format was slightly increased. -- New localizations: Estonian, Finnish. -- Some bugs were fixed. - - -2.30 Beta 17 2002-03-03 -------------------------- -- Supporting ARJ archives. -- New localization: Chinese Simplified. - - -2.30 Beta 16 2002-02-24 -------------------------- -- Supporting RPM and CPIO archives. -- New fast compression mode for LZMA: -m0a=0. -- New match finders for LZMA: bt4b, hc3, hc4. -- Some bugs were fixed. - - -2.30 Beta 15 2002-02-17 -------------------------- -- Compression ratio in 7z was slightly improved. -- New localization: Dutch. - - -2.30 Beta 14 2002-02-10 -------------------------- -- Speed optimization for multiprocessor computers (-mmt switch). -- New localizations: Czech, Japanese, Polish. -- Some bugs were fixed. - - -2.30 Beta 13 2002-01-31 -------------------------- -- New SFX module for installers. -- New match finder for LZMA: bt3. -- New localizations: Portuguese, Portuguese Brazil, Serbo-Croatian. -- Some bugs were fixed. - - -2.30 Beta 12 2002-01-16 -------------------------- -- Bug was fixed: memory leak in Beta 11. -- New localization: Hungarian. - - -2.30 Beta 11 2002-01-15 -------------------------- -- Archive testing feature for GUI version. -- Now 7-Zip can use more than 256 MB of RAM in all Windows versions. -- New localizations: Bulgarian, Chinese Traditional, Latvian, Slovak. -- Some bugs were fixed. - - -2.30 Beta 10 2002-01-11 -------------------------- -- Bugs were fixed: - - Updating 7z archives in Beta 8 and 9 didn't work. - - Unicode version in Beta 9 didn't work in Windows NT4. - - Some other bugs were fixed. -- New localizations: Arabic, French, Italian, Slovenian, Spanish. - - -2.30 Beta 9 2002-01-08 -------------------------- -- Program localization: English, German, Russian. -- Additional optimized versions of programs - for Windows NT4/2000/XP. -- Two new match finders for LZMA: pat3h and pat4h. -- Some bugs were fixed. - - -2.30 Beta 8 2001-12-21 -------------------------- -- 7-Zip now supports some zip archives that were not - supported by previous versions. -- 7-Zip now supports new state (-uw switch) for cases - when 7-Zip can not detect whether file is newer or the same. -- Supporting anti-items in 7z format for incremental - update (-u with action #3). -- Some bugs were fixed. - - -2.30 Beta 7 2001-11-04 -------------------------- -- BCJ2: new converter for x86 code. -- Supporting tar archives with very long file names - (GNU extension to 'tar' format). -- Supporting multistream coders in 7z (-mb switch). -- More compressing parameters for zip and gzip - in console version (-m switch). -- Solid compressing option in Windows version. -- Compressing parameters option in Windows version. -- Auto renaming existing files feature for - extracting files. -- Overwrite mode switch for extracting (-ao). -- Some bugs were fixed. - - -2.30 Beta 6 2001-10-13 -------------------------- -- Supporting 7z format in MultiArc plugin for FAR Manager. -- Some bugs were fixed. - - -2.30 Beta 5 2001-10-02 -------------------------- -- Creating SFX archives from explorer. -- 7zWin.sfx: Windows version of SFX module. -- Auto adding .exe extension to SFX archive name. -- 7za.exe now supports 7z, bzip2, gzip, tar, zip. -- Some bugs were fixed. - - -2.30 Beta 4 2001-09-15 -------------------------- -- Self extract capability for 7z format. -- 7z archive format is default for 7z.exe and 7za.exe. -- 7z in default mode now uses bt234 match finder - and solid compression. -- 7z in maximum mode (-mx) now uses 4MB dictionary. - - -2.30 Beta 3 2001-09-10 -------------------------- -- Bug was fixed: decompressing .7z solid archives - containing empty files. -- new 7za.exe: standalone command line version - (only for 7z format). -- Speed of compressing to Deflate format (zip, gzip) - was slightly increased. - - -2.30 Beta 2 2001-08-30 -------------------------- -- Supporting the new 7z format with high compression ratio. -- -bd (Disable percentage indicator) switch in - console version. -- Bug in console version was fixed: - previous versions incorrectly execute compression - commands with non-recursive wildcards in combination - with subfolders. -- Some other bugs were fixed. - - -2.30 Beta 1 2001-05-07 -------------------------- -- Speed of reading of archive contents was increased. -- Bug was fixed: incorrect showing file names with - national charsets in some zip archives. -- Now it is possible to compress files larger than 4GB - to GZip archives. - - -2.24 2001-03-21 -------------------------- -- Bugs in GZip and Cab decoders were fixed. - - -2.23 2001-03-04 -------------------------- -- Opening archive items in Explorer. -- Context menu for archive items in Explorer. -- Automatic adding extension to archive name in console version. -- Some bugs were fixed. - - -2.22 2001-01-21 -------------------------- -- Supporting Zip archives containing more than 65535 files. -- Speed of Plugin for Explorer was increased. -- Searching start position of archive now is limited by - first 1MB part of file. -- Some bugs were fixed. -- Packet now doesn't contain 7zip.exe, far7zip.reg and - far7zip2.reg files. There is new far7z.reg file. - - -2.21 2000-12-21 -------------------------- -- FAR Plugin was improved: - - - Showing process box during opening archives. - - Viewing properties of file by Ctrl-A. - - Alt-F6 in archive now immediately extracts selected files - to current directory. - -- Some bugs were fixed: - - - Entering to archive's subfolders in Explorer by clicking - items in main window didn't work under Windows ME/2000. - - Decompressing solid Rar archives sometimes gave error. - - Console version 7z.exe during list operation incorrectly - showed file names with national (non-english) charsets. - - FAR Plugin didn't execute some operations. - - Showing percents during extracting ZIP archives sometimes - was incorrect. - - -2.20 2000-11-20 -------------------------- -- Supporting BZip2 and Cab. -- New program architecture with external - compression and cryptographic modules. -- Decryption support (Rar and Zip). -- New console client. -- Some bugs were fixed. - - -2.11 2000-06-15 -------------------------- -- Bugs were fixed: - - - FAR Plugin incorrectly processed - names of subdirectories that use national - (non-english) charsets. - - gzip plugin could not compress empty files. - - -2.10 2000-05-16 -------------------------- -- First level 7-Zip Plugin for FAR Manager. -- GUI version with integration to Windows Shell. -- Compression and decompressing GZip and TAR formats. -- Decompression RAR. -- Install & Uninstall support. -- Some bugs were fixed. - - -2.01 1999-09-19 -------------------------- -- Small bug was fixed. -- Compression ratio was improved for some files. - - -2.00 1999-07-18 -------------------------- -- Release. -- Big bug was fixed: previous versions incorrectly worked - during compressing with files that were referred by - direct(without wildcards) paths, containing subdirs parts. -- Compression and decompression speed were improved. -- -mx switch (maXimize compression) was added. -- Small bugs were fixed. - - -2.00 Beta 1 1999-01-02 -------------------------- -- Original beta version. - - -End of document diff --git a/Utils/7-Zip/Lang/af.txt b/Utils/7-Zip/Lang/af.txt deleted file mode 100644 index c578d4530..000000000 --- a/Utils/7-Zip/Lang/af.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.09 : Petri Jooste -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Afrikaans -Afrikaans -401 -OK -Kanselleer - - - -&Ja -&Nee -A&fsluit -Hulp - -&Gaan voort -440 -Ja vir &almal -Nee vir a&lmal -Stop -Herbegin -&Agtergrond -&Voorgrond -&Wag -Wagtend -Is u seker dat u wil kanselleer? -500 -&Lêer -R&edigeer -&Vertoon -G&unstelinge -&Gereedskap -&Hulp -540 -&Open -Open &Binne -Open B&uite -&Wys -R&edigeer -Her&noem -&Kopieer na... -&Verskuif na... -Ve&rwyder -Ver&deel lêer... -Kom&bineer lêers... -E&ienskappe -Komme&ntaar - - -Maak gids -Maak lêer -A&fsluit -600 -Selekteer &alles -Deselekteer a&lles -Keer &seleksie om -Selekteer... -Deselekteer... -Selekteer op Soort -Deselekteer op Soort -700 -&Groot ikone -&Klein ikone -&Lys -&Detail -730 -Ongesorteer - -&2 Panele -&Nutsbalke -Maak wortelgids oop -Een vlak hoër -Gidse geskiedenis... -&Verfris -750 -Argiveernutsbalk -Standaardnutsbalk -Groot knoppies -Wys teks op knoppies -800 -Voeg gids by gunstelinge &as -Boekmerk -900 -&Opsies... -&Normtoetsing -960 -&Inhoud... -&Aangaande 7-Zip... -1003 -Pad -Naam -Uitgang -Gids -Grootte -Ingepakte grootte -Kenmerke -Gemaak -Laatste toegang -Gewysig -Kompak -Kommentaar -Versleuteld -Verdeel Voor -Verdeel Na -Woordeboek -CRC -Tipe -Anti -Metode -Gasheer BS -Lêersstelsel -Gebruiker -Groep -Blok -Kommentaar -Posisie - - - - - - - - - - - - - - - - - - - - - - - - - -Fout -Totale grootte -Vrye ruimte -Klustergrootte -Etiket -Plaaslike naam -Verskaffer -2100 -Opsies -Taal -Taal: -Redigeerder -R&edigeerder: - -2200 -Stelsel -Assosieer 7-Zip met: -2301 -Integreer 7-Zip in kontekskeuselys. -Trapsgewyse kontekskeuselys -Kontekskeuselysitems: -2320 - - -Open -Pak lêers uit... -Voeg by argief... -Toets argief -Pak hier uit -Pak uit in {0} -Voeg by {0} -Saampers en e-pos... -Pers saam in {0} en e-pos -2400 -Gidse -&Werkgids -&TEMP-gids van het stelsel -&Huidige gids -&Gespesifiseerde gids: -Gebruik slegs vir verwisselbare media. -Spesifiseer die stoorplek vir tydelyke argieflêers. -2500 -Instellings -Wys ".." &item -Wys &ware lêerikone -Wys &stelselkeuselys -Wys seleksie oor &hele ry(e) -Wys &roosterlyne - - - -2900 -Aangaande 7-Zip -7-Zip is gratis programmatuur. Indien u egter so baie van 7-Zip hou dat u die verdere ontwikkeling wil ondersteun, registreer dan asb. met 'n geldelike donasie aan die 7-Zip Projek. -3000 - -Daar is geen foute nie -{0} objekt(e) is geselekteer -Kan gids '{0}' nie maak nie -Bywerk-funksie word vir hierdie argief nie ondersteun nie. - - - - -Lêer '{0}' is gewysig.\nWil u dit bywerk in die argief? -Kan lêer\n'{0}' nie bywerk nie -Redigeerder nie aan die gang gesit word nie. - - - - -Te veel items -3300 -Besig om uit te pak -Besig met saampersing -Besig om te toets -Besig om oop te maak... - -3400 -&Uitpak -U&itpak in: -Gee 'n bestemming vir uitgepakte lêers. -3410 -Pad-metode -Volledige padname -Geen padname -3420 -Vervang lêers -Vervang slegs met bevestiging -Vervang sonder bevestiging -Slaan bestaande lêers oor -Hernoem outomaties -Hernoem bestaande lêers outomaties -3500 -Bevestig lêeroorskrywing -Doelgids bevat alreeds 'n lêer met hierdie naam. -Wil u die bestaande lêer vervang -deur hierdie lêer ? -{0} grepe -O&utomaties hernoem -3700 -Nie-ondersteunde saampersmetode vir '{0}'. -Datafout in '{0}'. Lêer is beskadig. -CRC het misluk in '{0}'. Lêer is beskadig. - - -3800 -Tik wagwoord in -Tik wagwoord in: - -&Wys wagwoord - - - -&Wagwoord -3900 -Tydsduur sovêr: -Oorblywende tyd: -Grootte: -Spoed: - - -Foute: - -4000 -Voeg by argief -&Argief: -&Bywerkwyse: -Argie&fformaat: -Saampersingv&lak: -&Saampersmetode: -&Woordeboekgrootte: -&Woordgrootte: - - -Pa&rameters: -Opsies -Maak SF&X argief - - - -Enkripteer lêer&name -Geheuegebruik vir saampersing: -Geheuegebruik vir uitpakking: -4050 -Stoor -Vinnigste -Vinnig -Normaal -Maksimum -Ultra -4060 -Lêers byvoeg en vervang -Lêers bywerk en byvoeg -Verfris bestaande lêers -Sinkroniseer lêers -4070 -Blaai -Alle lêers - - -6000 -Kopieer -Verskuif -Kopieer na: -Verskuif na: -Besig met kopiëring... -Besig met verskuiwing... -Besig met hernoeming... - -Bewerking word nie ondersteun nie. -Fout by hernoeming van lêer of gids - - -6100 -Bevestig lêerverwydering -Bevestig gidsverwydering -Bevestig verwydering van meerdere lêers -Is u seker dat u '{0}' wil verwyder? -Is u seker dat u gids '{0}' asook die inhoud daarvan wil verwyder? -Is u seker dat u hierdie {0} items wil verwyder? -Besig met verwydering... -Fout by verwydering van lêer of gids - -6300 -Maak gids -Maak lêer -Naam van die gids: -Lêernaam: -Nuwe gids -Nuwe lêer -Fout by maak van gids -Fout by maak van nuwe lêer -6400 - - -Selekteer -Deselekteer -Masker: -6600 - -Gidse-geskiedenis -Diagnostiese boodskappe -Boodskap -7100 -Rekenaar -Network - -Stelsel -7200 -Voeg by -Pak uit -Toets -Kopiëer -Skuif -Vee uit -Intigting -7300 -Verdeel lêer -&Verdeel na: -Verdeel in &volumes, aantal grepe: -Besig met verdeling... - - - - - -7400 -Kombineer lêers -&Kombineer na: -Besig met kombinering... - - - -7500 - - - - -7600 -Meet -Geheuegebruik: -Inpakking -Uitpakking -Gradering -Totale gradering -Huidige -Resultaat - - -Lopies: diff --git a/Utils/7-Zip/Lang/an.txt b/Utils/7-Zip/Lang/an.txt deleted file mode 100644 index 6264849e9..000000000 --- a/Utils/7-Zip/Lang/an.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; : Feliciano Martínez Tur -; 9.07 : Juan Pablo Martínez -; -; -; -; -; -; -; -; -; -0 -7-Zip -Aragonese -Aragonés -401 -Acceptar -Cancelar - - - -&Sí -&No -&Zarrar -Aduya - -&Continar -440 -Sí a &tot -No a t&ot -Aturar -Tornar a empecipiar -Se&gundo plano -P&rimer plano -&Pausa -Aturau -Yes seguro que quiers cancelar? -500 -&Fichero -&Editar -&Veyer -&Favoritos -&Ferramientas -Ad&uya -540 -&Ubrir -Ubrir &adintro -Ubrir &difuera -&Veyer -&Editar -Re&nombrar -&Copiar en... -&Mover ta... -&Borrar -Di&vidir o fichero... -C&ombinar os fichers... -&Propiedatz -Comen&tario -Calcular a suma de comprebación -Diff -Creyar carpeta -Creyar fichero -&Salir -600 -Seleccionar-lo &tot -Deseleccionar-lo tot -&Invertir selección -Seleccionar... -Deseleccionar... -Seleccionar por tipo -Deseleccionar por tipo -700 -Iconos g&rans -&Iconos chicotz -&Lista -&Detalles -730 -Desordenau -Anvista plana -&2 panels -&Barras de ferramientas -Ubrir a carpeta radiz -Carpeta mai -Historial de carpetas... -&Esviellar -750 -Barra de ferramientas d'archivo -Barras de ferramientas estandard -Botons grans -Amostrar texto en os botons -800 -&Adhibir carpeta a favoritos como -Adhibir a favoritos -900 -&Opcions... -&Prebas de referencia (benchmark) -960 -&Conteniu... -A&rredol de 7-Zip... -1003 -Rota -Nombre -Tipo de fichero -Carpeta -Grandaria -Grandaria comprimida -Atributos -Creyau -Zaguer acceso -Zaguera modificación -Compacto -Comentario -Zifrau -Expandiu antis -Expandiu dimpués -Diccionario -CRC -Tipo -Anti -Metodo -SO d'orichen -Sistema de fichers -Usuario -Grupo -Bloque -Comentario -Posición -Prefixo de rota -Carpeta -Fichers -Versión -Fragmento -Multiframento -Desplazamiento -Vinclos -Bloques -Fragmentos - -64-bit -Big-endian -CPU -Grandaria fisica -Grandaria d'as cabeceras -Suma de comprebación -Caracteristicas -Adreza virtual -ID -Nombre curto -Aplicación creyadera -Grandaria de sector -Modo -Vinclo -Error -Espacio total -Espacio libre -Grandaria de sector -Etiqueta -Nombre local -Proveyedor -2100 -Opcions -Luenga -Luenga: -Editor -&Editor: -&Diff: -2200 -Sistema -Asociar 7-Zip con: -2301 -Integrar 7-Zip en o menú contextual de Windows -Menú contextual en cascada -Elementos d'o menú contextual: -2320 - - -Ubrir archivo -Extrayer-ne os fichers... -Adhibir a l'archivo... -Comprebar l'archivo -Extrayer aquí -Extrayer en {0} -Adhibir a {0} -Comprimir y ninviar por correu... -Comprimir en {0} y ninviar por correu -2400 -Carpeta -Carpeta de &treballo -Carpeta temporal d'o &sistema -Carpeta &actual -&Especificar una carpeta: -No emplegar que ta dispositivos extrayibles -Especificar una carpeta ta archivos temporals. -2500 -Propiedatz -Amostrar l'elemento ".." -Amostrar iconos propios -Amostrar o menú d'o sistema -&Seleccionar ringlera(s) completa(s) -Amostrar as linias d'a &quadricla -Clicar una vegada ta ubrir elemento -Modo de selección &alternativo -Emplegar pachinas de memoria &grans -2900 -Arredol de 7-Zip -7-Zip ye un programa libre y gratuito. Si quiers, puetz colaborar en o desembolique de 7-Zip rechistrando-te ta contribuyir a amillorar o programa. -3000 -O sistema no ha puesto asignar a cantidat necesaria de memoria -No i hai errors -{0} elemento(s) seleccionau(s) -No se puet creyar a carpeta '{0}' -Ista mena d'archivo no permite actualización. -No se puet ubrir o fichero '{0}' como archivo comprimiu -No se puet ubrir l'archivo zifrau '{0}'. Comprebe si a clau ye incorrecta. -Tipo d'archivo no admeso -O fichero {0} ya existe -O fichero '{0}' s'ha modificau.\nQuiers esviellar-lo en l'archivo? -No se puet esviellar o fichero\n'{0}' -No se puet executar l'editor. -O fichero pareix un virus (o nombre d'o fichero contiene espacios largos). -No se puet execitar ista operación dende una carpeta que tienga una rota larga. -Has de seleccionar un fichero -Has de seleccionar un u más fichers -Masiaus elementos -3300 -Extrayendo -comprimindo -Prebando -Ubrindo... -Buscando... -3400 -Extrayer -E&xtrayer a: -Selecciona un destín ta os fichers extrayius. -3410 -Modo de rota -Rotas completas -Sin rotas -3420 -Modo de sobrescritura -Con confirmación -Sin confirmación -Conservar os fichers ya existents -Renombrar automaticament -Renombrar automaticament os fichers ya existents -3500 -Confirmar a substitución de fichers -A carpeta de destín ya contiene un fichero con o mesmo nombre. -Quiers substituyir o fichero existent -por iste atro? -{0} bytes -Renombrar a&utomaticament -3700 -Metodo de compresión no valido ta '{0}'. -Error de datos en '{0}'. O fichero ye corrompiu. -O CRC ha fallau en '{0}'. O fichero ye corrompiu. -Error de datos en o fichero zifrau '{0}'. Verifica a clau. -Error de CRC en o fichero zifrau '{0}'. Verifica a clau. -3800 -Escribe a clau -Escribe a clau: -Torne a escribir a clau: -&Amostrar a clau -As claus son diferents. Por favor, torne a escribir-la. -Emplega en a clau nomás as letras de l'alfabeto anglés, numeros y caracters especials (!, #, $, ...) -A clau ye masiau larga. -Contrasenya -3900 -Tiempo transcorriu: -Tiempo pendient: -Grandaria: -Velocidat: -Procesau: -Razón de compresión: -Errors: -Archivos: -4000 -Adhibir a l'archivo -&Archivo: -M&odo d'actualización: -&Formato d'archivo: -&Libel de compresión: -&Metodo de compresión: -Grandaria de &diccionario: -Granda&ria d'a parola: -Grandaria de bloque compacto: -Numero de filos d'a CPU: -&Parametros: -Opcions -Creyar archivo SF&X (autoextrayible) -Comprimir fichers compartius -Encriptación -Metodo d'e &zifrau: -Zifrar &nombres de fichero -Memoria emplegada ta comprimir: -Memoria emplegada ta descomprimir: -4050 -Sin compresión -A mas rapida -Rapida -Normal -Maxima -Ultra -4060 -Adhibir y substituyir fichers -Esviellar y adhibir-ie fichers -Esviellar fichers ya presents -Sincronizar fichers -4070 -Explorar -Totz os fichers -No compacto -Compacto -6000 -Copiar -Mover -Copiar en: -Mover ta: -Copiando... -Movendo... -Renombrando... -Selecciona a carpeta de destín -Operación no permitida. -Error en enombrar un fichero u carpeta -Confirmar a copia d'o fichero -Yes seguro de que quiers copiar os fichers en l'archivo -6100 -Confirmar borrau de fichero -Confirmar borrau de carpeta -Confirmar borrau multiple fichers -Yes seguro que quiers borrar '{0}'? -Yes seguro que quiers borrar a carpeta '{0}' y tot o suyo conteniu? -Yes seguro que quiers borrar istos {0} elementos? -Borrando... -Error borrando fichero u carpeta -O sistema no puet mover un fichero con rota larga ta la Papelera de Reciclache -6300 -Creyar carpeta -Creyar fichero -Nombre de'a carpeta: -Nombre de'o fichero: -Carpeta nueva -Fichero nuevo -Error en creyar carpeta -Error en creyar o fichero: -6400 -Comentario -&Comentario: -Seleccionar -Deseleccionar -Patrón: -6600 -Propiedatz -Historial de carpetas -Mensaches de diagnostico -Mensache -7100 -O mío ordinador -Entorno de ret -Documentos -Sistema -7200 -Adhibir -Extrayer -Prebar -Copiar -Mover -Borrar -Información -7300 -Dividir fichero -Di&vidir a: -Dividir en fra&gmentos (bytes): -Dividindo... -Confirmar a división -Yes seguro que quiers dividir o fichero en {0} fragmentos? -A grandaria d'os fragmentos ha d'estar menor que a d'o fichero orichinal -Grandaria de fragmento incorrecta -Grandaria de fragmento especificada: {0} bytes.\nYe seguro que quiere dividir o fichero en fragmentos d'ixa grandaria? -7400 -Combinar fichers -&Combinar en: -Combinando... -Selecciona només o primer fichero -No s'ha puesto detectar o fichero como parti d'un fichero por fragmentos -No s'ha puesto trobar que un fragmento d'o fichero por fragmentos -7500 -Calculando a suma de verificación... -Suma de verificación (CRC) -CRC d'os datos: -CRC d'os datos y os nombres: -7600 -Prebas de referencia (benchmark) -Emplego de memoria: -Compresión -Descompresión -Taxa -Taxa total -Actual -Resultant -Emplego de CPU -Taxa / Emplego -Pasadas: diff --git a/Utils/7-Zip/Lang/ar.txt b/Utils/7-Zip/Lang/ar.txt deleted file mode 100644 index f62e23c62..000000000 --- a/Utils/7-Zip/Lang/ar.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; 9.07 :ترجمةالاستاذ:عوض ال-عائض الغامدي -; 9.07 : Awadh A Al-Ghaamdi -; -; 15.00 : 2016-08-28 : تعديل وتصحيح الترجمة: سيف حسام الاسدي -; 15.00 : 2016-08-28 : Saif H Al-asadi (edited and corrected) -; -; -; -; -; -; -0 -7-Zip -Arabic -عربي -401 -حسنا -إلغاء الأمر - - - -&نعم -&لا -&إغلاق -المساعدة - -&استمرار -440 -نعم للكل -لا للكل -إيقاف -إعادة تشغيل -&بالخلفية -&بالمقدمة -&إيقاف مؤقت -متوقف مؤقتا -هل أنت متأكد من الإلغاء؟ -500 -&الملف -&التعديل -&العرض -التف&ضيلات -&ألادوات -&المساعدة -540 -&فتح -&افتح بالداخل -&افتح للخارج -&عرض -&تعديل -إعادة التسمية -..نسخ إلى -..نقل إلى -&حذف -&تقسيم الملف... -دم&ج الملفات... -الخ&صائص -تعليق& -حساب قيمة التدقيق -فرق -إنشاء مجلد -إنشاء ملف -خروج -الربط -&الجداول البديلة -600 -تحديد الكل -عدم تحديد الكل -عكس التحديد -تحديد... -عدم تحديد... -تحديد حسب النوع -عدم تحديد حسب النوع -700 -رموز كبيرة -رموز صغيرة -&القائمة -&التفاصيل -730 -غير مرتب -العرض الافقي -&مجموعتين -&أشرطة الأدوات -فتح المجلد الرئيسي -للأعلى بمستوى واحد -...محفوظات المجلدات -&تحديث -تحديث تلقائي -750 -شريط أدوات الأرشفة -شريط ألادوات قياسي -أزرار كبيرة -إظهار تسميات الازرار -800 -&إضافة المجلد للمفضلة باسم -العلامات المرجعية -900 -...&الخيارات -&معالج الاداء -960 -..&المحتويات -7-Zip &حول... -1003 -المسار -الإسم -الإمتداد -المجلد -الحجم -الحجم المضغوط -الخواص -تم انشاءه -تم الدخول -تم تعديله -ثابت -تم التعيلق -مشفر -التقسيم قبل -التقسيم بعد -القاموس - -النوع -متعدد -الطريقة -نظام التشغيل -ملفات النظام -المستخدم -المجموعة -التكتل -التعليق -الموقع -بادئة المسار -المجلدات -الملفات -الإصدار -وحدة التخزين -وحدة تخزين متعددة -التعويض -روابط -كتل -وحدات تخزين - -64-بت -Big-endian -CPU -الحجم الطبيعي -حجم المقدمات -قيمة التحقق -المميزات -العنوان الظاهري -الهوية -إسم قصير -برنامج الانشاء -حجم القطاع -الوضع -الرابط الرمزي -خطأ -الحجم الكلي -المساحة الحرة -حجم الجزء -العلامة -الإسم المحلي -المجهز -NT أمان -الجداول البديلة -Aux -تم حذفة -التفرعات - - -خطأ في النوع -اخطاء -اخطاء -تحذيرات -تحذير -الجداول -الجداول البديلة -حجم الجداول البديلة -الحجم الظاهري -حجم الاخراج -الحجم الطبيعي الكلي -دليل الحجم -النوع الفرعي -تعليق قصير -رمز الصفحة - - - -حجم التذييل -حجم العقبات المضمن -الارتباط -الارتباط الصعب -iNode - -للقراءة-فقط -2100 -الخيارات -اللغة -ترجمةالأستاذ عوض الغامدي -التعديل سيف الاسدي -المحرر -&المحرر: -ال&فرق: -2200 -النظام -تكامل البرنامج مع : -جميع المستخدمين -2301 -الإندماج مع قائمة الزر الايمن -تتالي قائمة الزر الايمن -عناصر قائمة الزر الايمن : -الايقونات في قائمة الزر الايمن -2320 -<مجلد> -<إرشيف> -فتح ارشيف -استخراج الملفات... -إضافة إلى الإرشيف... -فحص الإرشيف -إستخرج هنا -إستخرج إلى {0}ـ -إضافة إلى {0}ـ -ضغط ثم إرسال... -ضغط إلى {0} ثم إرسال -2400 -مجلدات -&مجلد العمل -&مجلد النظام المؤقت -&الحالي -&محدد: -الإستخدام فقط للأقراص المتحركة -تحديد موضع للإرشيف المؤقت للملفات -2500 -الاعدادات -".." إظهار عنصر -إظهار أيقونات الملف الفعلية -إظهار قائمة النظام -&تحديد الصف بالكامل -إظهار خطوط الشبكة -نقرة واحدة لفتح أي مادة -&نظام تحديد بديل -إستعمال &صفحات ذاكرة كبيرة -2900 -حول البرنامج -7-Zip البرنامج مجاني -3000 -لا يمكن للنظام تخصيص الكمية المطلوبة للذاكرة -لا يوجد أخطاء -تم تحديد {0} عنصر -'{0}' لا يمكن إنشاء المجلد -تحديث العمليات غير مدعوم لهذا الإرشيف -كأرشيف '{0}' لا يمكن فتح الملف -كلمة المرور خطأ ؟ . '{0}' تعذر فتح الأرشيف المشفر -نوع أرشيف غير معتمد -موجود مسبقا {0} الملف -أتريد تحديثه في الإرشيف ؟\nالملف '{0}' تم تعديله -لا يمكن تحديث الملف\n'{0}' -لا يمكن بدء المحرر -(الملف يشبه فيروس (إسم الملف يحتوي على مسافات طويلة -لا يمكن إستدعاء العملية من مجلد له مسار طويل -يجب تحديد ملف واحد -يجب تحديد ملف واحد أو أكثر -عناصر كثيرة جداً -لايمكن فتح الملف {0} كأرشيف -الملف مفتوح {0} كأرشيف -ان الارشيف مفتوح بطريقة الطباعة بالاوفسيت -3300 -استخراج -الضغط -فحص -...فـتـح... -...يتم التفحص -تتم الازالة -3320 -يتم الاضافة -يتم التحديث -يتم التحليل -يتم التكرار -يتم اعادة الضغط -يتم التجاهل -يتم الحذف -يتم انشاء المقدمة -3400 -استخراج -استخراج إلى: -تحديد الموضع للملفات المستخرجة -3410 -حالة المسار -اسم المسار بالكامل -بدون اسم المسار -اسم المسار المطلق -اسم المسار النسبي -3420 -حالة إعادة الكتابة -السؤال قبل إعادة الكتابة -إعادة الكتابة بدون تنبيه -تجاوز الملفات المتوفرة -تسمية تلقائية -تسمية الملفات الموجودة تلقائياً -3430 -ازالة تكرارات المجلد الرئيسي -استعادة ملف الامان -3500 -تأكيد استبدال الملف -المجلد الهدف يحوي مسبقاً الملف -أتريد استبدال الملف الموجود؟ -بهذا الملف؟ -{0} بايت -إعادة تسمية تلقائية -3700 -'{0}'طريقة ضغط غير معتمدة لـ -'{0}'خطأ بيانات في. الملف تالف -'{0}' خطأ بصمة في . الملف تالف -خطأ بيانات في الملف المشفر '{0}' . كلمة المرور غير صحيحة ؟ -فشل الفحص الدوري في الملف المشفر '{0}' . كلمة المرور غير صحيحة ؟ -3710 -كلمة مرور خاطئة? -3721 -طريقة ضغط غير مدعومة -بيانات خطأ -CRC فشل -بيانات غير متاحة -النهاية المفاجئة للبيانات -هناك بعض البيانات بعد نهاية بيانات الحمولة -ليس ارشيفاً -مقدمات خطأ -كلمة مرور خاطئة -3763 -البداية غير متوفرة للارشيف -البداية غير مؤكدة للارشيف - - - -ميزة غير مدعومة -3800 -أدخل كلمة المرور -أدخل كلمة المرور: -إعادة كلمة المرور : -&إظهار كلمة المرور -كلمتا المرور غير متطابقتان -أستخدم فقط حروف إنجليزية و أرقام و علامات خاصة (!,#,,$ ...) لكلمة المرور -كلمة المرور طويلة جدا -كلمة المرور -3900 -الزمن المنقضي: -الزمن المتبقي: -الحجم الكلي: -السرعة: -المعالج: -نسبة الضغط: -الأخطاء: -ملفات الإرشيف: -4000 -إضافة للإرشيف -&الإرشيف: -&حالة التحديث: -صيغة الإرشيف: -مستوى الضغط&: -طريقة الضغط: -&حجم المعجم: -&حجم الكلمة: -حجم الكتلة الخاصة : -CPU عدد مؤشرات الـ : -&أوامر إضافية: -الخيارات -إنشاء إرشيف ذاتي الإستخراج -ضغط الملفات المشاركة -التشفير -طريقة التشفير : -تشفير أسماء ال&ملفات -إستهلاك الذاكرة للضغط : -إستهلاك الذاكرة لإلغاء الضغط : -حذف الملفات بعد الضغط -4040 -خزن الاتباطات الرمزية -خزن الارتباطات الصعبة -خزن جداول البيانات البديلة -خزن ملف الامان -4050 -للخزن -ألاسرع -السريع -الطبيعي -المرتفع -ألاقصى -4060 -إضافة واستبدال الملفات -تحديث و إضافة الملفات -تجديد الملفات المتوفرة فقط -مزامنة الملفات -4070 -إستعراض -كافة الملفات -غير خالص -خالص -6000 -نسخ -نقل -نسخ إلى: -نقل إلى: -...نـسـخ... -...نـقـل... -إعادة تسمية... -تحديد مجلد الوجهة -العملية غير معتمدة -حدوث خطأ لدي إعادة تسمية الملف أو المجلد -تأكيد نسخ الملف -هل أنت متأكد من نسخ الملفات للإرشيف؟ -6100 -تأكيد الحذف للملف -تأكيد الحذف للمجلد -تأكيد الحذف للملفات -'؟ {0}'هل أنت متأكد من حذف -هل أنت متأكد من حذف المجلد '{0}' و كافة محتوياته ؟ -؟ {0} هل أنت متأكد من حذف العناصر التالية -حذف... -حدوث خطأ لدي حذف الملف أو المجلد -لا يمكن للنظام نقل ملف له مسار طويل إلى سلة المحذوفات -6300 -إنشاء مجلد -إنشاء ملف -اسم المجلد: -اسم الملف: -مجلد جديد -ملف جديد -حدوث خطأ لدي إنشاء المجلد -حدوث خطأ لدي إنشاء الملف -6400 -تعليق -&تعليق: -تحديد -عدم تحديد -إخفاء: -6600 -خصائص -محفوظات المجلدات -رسائل الفاحص -رسالة -7100 -جهاز الكمبيوتر -الشبكة -المستندات -النظام -7200 -إضافة -إستخراج -فحص -نسخ -نقل -حذف -معلومات -7300 -تقسيم الملف -&التقسيم إلى: -التقسيم لكتل أو بايتات: -تقسيم... -تأكيد التقسيم -هل تريد فعلا تقسيم الملف إلى {0} كتلة ؟ -يجب أن يكون حجم الكتلة أصغر من حجم الملف الأصلي -كتلة الحجم غير صحيحة -حجم الكتلة المعين : {0} بايت\nهل تريد فعلا تقسيم الأرشيف إلى مثل هذه الكتل ؟ -7400 -دمج الملفات -&دمج إلى: -دمج... -حدد فقط الجزء الأول من ملف التقسيم -لا يمكن إكتشاف الملف كجزء من ملف التقسيم -لا يمكن العثور على أكثر من جزء واحد من ملف التقسيم -7500 -...يتم حساب مجموعة الإختبار -معلومات مجموعة الإختبار -للبيانات CRC مجموعة الإختبار: -للبيانات و للأسماء CRC مجموعة الإختبار: -7600 -تقييم الأداء -إستخدام الذاكرة: -ضغط -فك ضغط -المعدل -المعدل الكلي -الحالي -الناتج -CPU إستهلاك الـ -التقدير / الإستهلاك -العمليات: -7700 -الرابط -الارتباط -ربط من: -ربط الى: -7710 -نوع الربط -ربط قوي -ربط الملف الرمزي -ربط القاموس الرمزي -قاموس الربط diff --git a/Utils/7-Zip/Lang/ast.txt b/Utils/7-Zip/Lang/ast.txt deleted file mode 100644 index 623ac9063..000000000 --- a/Utils/7-Zip/Lang/ast.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.07 : Dinamiteru -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Asturian -Asturianu -401 -Val -Torgar - - - -&Si -&Non -&Zarrar -Axuda - -&Siguir -440 -Si a &Too -Non a T&oo -Parar -Reentamar -&De fondu -&En primer planu -&Posar -Posao -¿Tas fixu que quies paralo? -500 -F&icheru -&Remanar -&Ver -F&avoritos -&Ferramientes -A&xuda -540 -&Abrir -Abrir &Dientro -Abrir F&uera -&Ver -&Remanar -Reno&mar -&Copiar a... -&Mover a... -&Borrar -&Partir ficheru... -Com&binar ficheros... -P&ropiedaes -Come&ntariu - - -Crear carpeta -Crear ficheru -Co&lar -600 -Seleicionar &Too -Deseleicionar too -&Invertir seleición -Seleicionar... -Deseleicionar... -Seleicionar por Tipu -Deseleicionar por Tipu -700 -Miniatures &Grandes -&Miniatures Pequeñes -&Llista -&Detalles -730 -Ensín Ordenar - -&2 Paneles -&Barres de Ferramientes -Abrir Carpeta Raiz -Xubir Un Nivel -Hestorial de Carpetes... -Actualiza&r -750 -Barra Ferramientes d´Archivu -Barra Ferramientes Normal -Botones Grandes -Amosar Testu nos Botones -800 -&Añedir carpeta a Favoritos como -Marca -900 -&Opciones... -&Bancu de Pruebes -960 -&Conteníos... -&Al rodiu 7-Zip... -1003 -Ruta -Nome -Estensión -Carpeta -Tamañu -Tamañu comprimío -Atributos -Creao -Accedío -Cambiao -Sólidu -Comentao -Cifrao -Partir antes -Partir dempués -Diccionariu -CRC -Tipu -Anti -Métodu -S.O. d´Acoyida -Sistema de ficheros -Usuariu -Grupu -Bloque -Comentariu -Posición - - - - - - - - - - - - - - - - - - - - - - - - - -Error -Tamañu total -Espaciu llibre -Tamañu del clúster -Etiqueta -Nome llocal -Suministrador -2100 -Opciones -Llingua -Llingua: -Remanaor -&Remanaor: - -2200 -Sistema -Asociar 7-Zip con: -2301 -Integrar 7-Zip nel menú contestual -Menú contestual en ´cascada´ -Artículos del menú contestual: -2320 - - -Abrir archivu -Estrayer ficheros... -Añedir al archivu... -Probar archivu -Estrayer equí -Estrayer a {0} -Añedir a {0} -Comprimir y mandar per correu... -Comprimir en {0} y mandar per correu -2400 -Carpetes -&Carpeta de trabayu -Carpeta &temporal de sistema -&Actual -&Especificar: -Usar sólo pa dispositivos estrayibles -Especificar llocalización pa ficheros d´archivos temporales. -2500 -Igües -Amosar ".." artículu -Amosar les miniatures reales del ficheru -Amosar menú del sistema -Seleicionar tola &fila -Amosar les llinies de la &cuadrícula - - - -2900 -Al rodiu 7-Zip -7-Zip ye software llibre. De toos moos, tú pues sofitar el desendolcu de 7-Zip rexistrándote. -3000 - -Ensín errores -{0} oxetu(os) seleicionaos -Nun se puede crear la carpeta '{0}' -Esti archivu nun permite les operaciones d´actualización. - - - - -El ficheru '{0}' foi modificáu.\nDo ¿Quies actualizalu nel archivu? -Nun se pudo actualizar l´archivu\n'{0}' -Nun se pudo entamar el Remanaor. - - - - -Demasiaos artículos -3300 -Estrayendo -Comprimiendo -Probando -Abriendo... - -3400 -Estrayer -E&strayer a: -Especificar llocalización pa ficheros estrayíos. -3410 -Mou de ruta -Nomes de ruta completos -Ensín nomes de ruta -3420 -Mou de sobreescritura -Entrugar enantes de sobreescribir -Sobreescribir ensín confirmación -Dexar ficheros esistentes -Auto renomar -Auto renomar ficheros esistentes -3500 -Confirmar sustitución de ficheros -La carpeta destín yá tien el ficheru procesáu. -¿Quiés sustituyir el ficheru esistente -con esti otru? -{0} bytes -A&uto Renomar -3700 -Métodu de compresión nun permitíu pa '{0}'. -Error de datos en '{0}'. El ficheru ta rotu. -El CRC falló en '{0}'. El ficheru ta rotu. - - -3800 -Introduz clave -Introduz clave: - -Amo&sar clave - - - -Clave -3900 -Tiempu trescurríu: -Tiempu pa finar: -Tamañu: -Velocidá: - - -Errores: - -4000 -Añedir al archivu -&Archivu: -Mo&u d´actualización: -&Formatu del archivu: -Nive&l de compresión: -&Métodu de compresión: -Tamañu del &Diccionariu: -Tamañu de la pa&llabra: - - -&Parámetros: -Opciones -Crear archivu SF&X - - - -Cifrar &nomes de ficheru -Usu de memoria pa la compresión: -Usu de memoria pa la descompresión: -4050 -Nenguna -Más rápida -Rápida -Normal -Másima -Ultra -4060 -Añedir y sustituyir ficheros -Actualizar y añedir ficheros -Actualizar ficheros esistentes -Sincronizar ficheros -4070 -Agüeyar -Tolos ficheros - - -6000 -Copiar -Mover -Copiar a: -Mover a: -Copiando... -Moviendo... -Renomando... - -La operación nun tá permitía. -Error al renomar el ficheru o carpeta - - -6100 -Confirmar Borráu de Ficheru -Confirmar Borráu de Carpeta -Confirmar Borráu Múltiple de Ficheros -¿Tas fixu que quies borrar '{0}'? -¿Tas fixu que quies borrar la carpeta '{0}' y tolos sos conteníos? -¿Tas fixu que quies borrar estos {0} artículos? -Borrando... -Error al borrar el ficheru o carpeta - -6300 -Crear Carpeta -Crear ficheru -Nome de la carpeta: -Nome del ficheru: -Nueva carpeta -Nuevu ficheru -Error al crear la carpeta -Error al crear el ficheru -6400 -Comentariu -&Comentariu: -Seleicionar -Deseleicionar -Mazcarita: -6600 - -Hestorial de carpetes -Mensaxes de diagnósticu -Mensax -7100 -Ordenador -Rede de Trabayu - -Sistema -7200 -Añedir -Estrayer -Probar -Copiar -Mover -Borrar -Información -7300 -Partir Ficheru -&Partir a: -Partir en &cachos, bytes: -Partiendo... - - - - - -7400 -Combinar Ficheros -&Combinar a: -Combinando... - - - -7500 - - - - -7600 -Bancu de Pruebes -Usu de memoria: -Comprimiendo -Descomprimiendo -Valoración -Valoración total -Actual -Resultáu - - -Correutos: diff --git a/Utils/7-Zip/Lang/az.txt b/Utils/7-Zip/Lang/az.txt deleted file mode 100644 index 712b82833..000000000 --- a/Utils/7-Zip/Lang/az.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; 9.07 : F@rhad -; 15.02 : 22/05/2015 : Г. Гасымов -; -; -; -; -; -; -; -; -; -0 -7-Zip -Azerbaijani -Azərbaycanca -401 -OLDU -İmtina - - - -&Bəli -&Xeyr -&Bağla -Kömək - -&Davam -440 -&Hamısına Bəli -Ha&mısına Xeyr -Dayan -Yenidən başla -&Arxa planda -Ö&ndə -F&asilə -Fasilədə -Həqiqətən əməliyyatı dayandırmaq istəyirsiniz? -500 -&Fayl -&Düzəliş -&Görünüş -S&eçilmişlər -&Vasitələr -&Arayış -540 -&Aç -&Daxildə Aç -B&ayırda aç -&Baxış -&Düzəliş -Ye&nidən Adlandır -&Nüsxələ... -&Köçür... -&Sil -Faylı &Böl... -Faylları B&irləşdir... -X&üsusiyyətlər -Şər&h... -Yoxlama Cəmi -Müqayisə -Qovluq Yarat -Fayl Yarat -Ç&ıxış -İstinad -&Əvəzedici Axınlar -600 -&Hamısını Seç -Seçimi Ləğv Et -&Seçimi Çevir -Seç... -Seçimi Ləğv Et... -Növünə Görə Seç -Növünə Görə Seçimi Ləğv Et -700 -&Böyük İşarələr -K&içik İşarələr -&Siyahı -&Cədvəl -730 -Çeşidsiz -Müstəvi Görünüş -&2 Lövhə -&Alətlər Lövhələri -Kök Qovluğu Aç -Bir Səviyyə Yuxarı -Qovluqlar Tarixçəsi... -&Yenilə -Bilavasitə Yeniləmə -750 -Arxivləyicinin Düymələr Lövhəsi -Sadə Düymələr Lövhəsi -Böyük Düymələr -Düymələr Üzərində Mətnlər -800 -&Qovluğu Seçilmişlərə Fərqli Əlavə Et -Əlfəcin -900 -Tənzimləmələr... -Səmərə Sınağı -960 -&Başlıq... -7-Zip &Haqqında... -1003 -İstiqamət -Ad -Genişləmə -Qovluq -Ölçü -Sıxılmış -Rəmzlər -Yaranıb -Açıq -Dəyişilib -Aramsız -Şərh -Şifrələnib -Əvvəlki parça -Sonrakı parça -Lüğət - -Növ -Əleyhinə -Sıxılma Üsulu -Quruluş -Fayl Quruluşu -İstifadəçi -Dəstə -Bölmə -Şərh -Mövqe -İstiqamət -Qovluq -Fayl -Buraxılış -Cild -Çox Cildli -Uzlaşma -İstinad -Bölmə -Cild - - - -Prosessor -Fiziki Ölçü -Başlıqlar Ölçüsü -Yoxlama Cəmi -Xassələr -Xəyali Ünvan - -Qısa Ad -Yaradıcı -Sahə Ölçüsü -Vəziyyət -Rəmzi İstinad -Xəta -Cəmi Həcm -Azad Həcm -Toplam Həcm -Nişan -Qısa Ad -Təchizatcı -NT Təhlükəsizlik -Əvəzedici Axın - -Silinmiş -Ağac - - -Xəta Növü -Xətalar -Xətalar -Xəbərdarlıqlar -Xəbərdarlıq -Axınlar -Əvəzedici Axınlar -Əvəzedici Axınlar Ölçüsü -Xəyali Ölçü -Ceşidli Ölçü -Ümumi Fiziki Ölçü -Cild Nömrəsi -Növaltı -Qısa Şərh -Şifrələnmiş Səhifə - - - -Qalıq Ölçüsü -Tətbiq Olunmuş Bölmə Ölçüsü -İstinad -Sərt İstinad -iNode - -Yalnız Oxumaq Üçün -2100 -Tənzimləmələr -Dil -Dil: -Düzəliş -&Düzəliş: -&Müqayisə: -2200 -Quruluş -7-Zip Fayllarla Əlaqələnsin -Bütün İstifadəçilər -2301 -7-Zip əhatə təklifinə tətbiq edilsin -Zəncirvari əhatə təklifi -Ünsürlü əhatə təklifi: -Əhatə təklifində nişanlar -2320 - -<Аrxiv> -Arxivi Aç -Çeşidlə -Arxivə Əlavə Et... -Sınaq -Burda Çeşidlə -{0} Çeşidlə -{0} Əlavə Et -Sıx Və E-Poçtla Göndər... -{0} Sıx Və E-Poçtla Göndər -2400 -Qovluqlar -&İş Qovluğu -&Müvəqqəti Quruluş Qovluğu -&Cari -&Təyin Et: -Yalnız dəyişkən daşıyıcılar üçün istifadə -Müvəqqəti arxivlər üçün yer göstər. -2500 -Tənzimləmələr -".." ünsürünü göstər -Həqiqi fayl işarələri göstər -Quruluş təklifini göstər -Ox bütün sətir üzrə -Ayrıcıları Göstər -Bir Toxunuşla Aç -Əvəzedici vəziyyət işarələnməsi -Böyük yaddaş səhifələri istifadəsi -2900 -7-Zip Haqqında -7-Zip Sərbəst Yayılan Proqramdır -3000 -Kifayət qədər boş yaddaş yoxdur -Səhvlər tapılmadı -{0} Ayrılmış hədəf -'{0}' Qovluğunu yaratmaq mümkün olmadı -Bu arxiv üçün dəyişiklik əməliyatı dəstəklənmir -'{0}' Faylını arxiv kimi açmaq alınmadı -Şifrələnmiş '{0}' arxivini açmaq alınmadı. Yanlış şifrə? -Dəstəklənməyən arxiv -{0} faylı artıq mövcuddur -'{0}' faylına dəyişiklik edildi.\nSiz onu arxivdə yeniləmək istəyirsiz? -\n'{0}' faylını yeniləmək alınmadı -Redaktəni işə salmaq alınmadı -Fayl zərərvericiyə oxşayır (faylın adı uzun boşluq ardıcıllığı təşkil edir). -Əməliyyat uzun yol təşkil edən qovluqdan icra oluna bilmir. -Siz bir fayl seçməlisiniz -Siz bir və ya bir neçə fayl seçməlisiniz -Həddən çox ünsür -Faylı, '{0}' arxivi kimi açmaq alınmadı -Fayl, {0} arxivi kimi açıldı -Arxiv əvəzlənərək açıldı -3300 -Çeşidlənmə -Sıxılma -Sınaq -Açılma... -Yoxlama... -Silinmə -3320 -Əlavə Etmək -Yenilənmə -Təhlil -Nüsxələnmə -Yenidən Çeşidlənmə -Keçmə İcazəsi -Silinmə -Başlıqlar Yaradılması -3400 -Ayır -Ç&eçidlə: -Ayrılan faylların yerini göstərin. -3410 -Fayllara istiqamət: -Tam istiqamətlər -İstiqamətsiz -Mütləq istiqamətlər -Nisbi istiqamətlər -3420 -Yenidən yazılma: -Təsdiqli -Təsdiqsiz -Ötürmək -Birbaşa yenidən adlandır -Mövcud olanları yenidən adlandır -3430 -Kök qovluqla bənzərliyi aradan qaldır -Faylın təhlükəsizlik bərpası -3500 -Faylın əvəzlənmə təsdiqi -Qovluq artıq emal olunan fayl təşkil edir. -Mövcud faylı əvəzlə -növbəti faylla? -{0} bayt -Birbaşa yenidən adlandır -3700 -'{0}' faylının dəstəklənməyən sıxılma üsulu. -'{0}' məlumatlarında xəta. Fayl korlanıb. -'{0}' CRC xətası. Fayl korlanıb. -'{0}' şifrəli fayl məlumatlarında xəta. Yanlış şifrə? -'{0}' şifrəli faylı üçün CRC xətası. Yanlış şifrə? -3710 -Yanlış şifrə? -3721 -Dəstəklənməyən sıxılma üsulu -Dəlillərdə xəta -CRC xətası -Mövcud olmayan dəlillər -Dəlillərin gözlənilməz sonu -Bölmənin sonunda faydalı dəlillər olduğuna dəlillər var -Arxiv deyil -Başlıqlarda Xəta -Yanlış şifrə -3763 -Arxivin əvvəli mövcud deyil -Təsdiqsiz arxiv əvvəli - - - -Dəstəklənməyən xüsusiyyət -3800 -Şifrə daxil etmə -&Şifrə daxil edin: -Şifrəni təkrarlayın: -&Şifrəni göstər -Şifrələr uyğun deyil -Şifrə üçün yalnız latın hərfləri, rəqəmlər və xüsusi rəmzlər istifadə edin (!, #, $, ...) -Şifrə şox uzundur -&Şifrə -3900 -Keçdi: -Qalıb: -Cəmi: -Sürət: -Ölçü: -Sıxılma dərəcəsi: -Xəta: -Arxiv: -4000 -Arxivə əlavə etmək -&Arxiv: -&Dəyişmə vəziyyəti: -Arxiv &qismi: -Sıxılma &dərəcəsi: -Sıxılma &üsulu: -&Lüğət ölçüsü: -&Söz ölçüsü: -Bölmə ölçüsü: -Axın sayı: -&Nizamlar: -&Seçimlər -SF&X arxiv yarat -Yazılış üçün açıq faylları sıx -Şifrələmə -Şifrələmə üsulu: -Fayl adlarını &şifrələ -Qablaşdırma üçün yaddaş həcmi: -Çeşidləmə üçün yaddaş həcmi: -Sıxılmadan sonra faylları sil -4040 -Rəmzli keçidləri saxla -Sərt keçidləri saxla -Əvəzedici axınları saxla -Giriş hüququnu saxla -4050 -Sıxılmasız -Sürətli -Cəld -Məqbul -Yüksək -Daha Yüksək (Ultra) -4060 -Əlavə et və əvəzlə -Yenilə və əlavə et -Yenilə -Eyniləşdir (Sinxron) -4070 -Vərəqlə -Bütün Fayllar -Fayl ölçüsünə görə -Aramsız -6000 -Nüsxələ -Köçür -Nüsxələ: -Köçür: -Nüsxələlənmə... -Köçürülmə... -Yenidən adlandırılma... -Qovluğu göstərin. -Əməliyyat bu qovluq üçün dəstəklənmir. -Fayl və ya Qovluğun Yenidən Adlandırılması Zamanı Xəta -Faylların Nüsxələlənmə Təsdiqi -Siz həqiqətən bu faylları arxivə nüsxələmək istəyirsiz -6100 -Fayl silinmə təsdiqi -Qovluq silinmə təsdiqi -Fayllar dəstəsinin silinmə təsdiqi -Siz həqiqətən "{0}" silmək istəyirsiz? -Siz həqiqətən "{0}" qovluğunu və onun bütün məzmununu silmək istəyirsiz? -Siz həqiqətən {0} hədəfi silmək istəyirsiz? -Silinmə... -Fayl və ya Qovluq Silinməsi Zamanı Xəta -Quruluş uzun yollu faylların səbətə silinməsi əməliyyatını dəstəkləmir -6300 -Qovluq Yarat -Fayl Yarat -Qovluq Adı: -Fayl Adı: -Yeni Qovluq -Yeni Fayl -Qovluq Yaradılması Zamanı Zəta -Fayl Yaradılması Zamanı Zəta -6400 -Şərh -&Şərh: -Seçin -Seçimi Ləğv Edin -Üzlük (Maska): -6600 -Xassələr -Qovluqlar Tarixçəsi -İsmarıclar -İsmarıc -7100 -Kompüter -Şəbəkə -Sənədlər -Quruluş -7200 -Əlavə Et -Ayır -Sınaq -Nüsxələ -Köçür -Sil -Məlumat -7300 -Fayl Bölmək -&Bölmək: -Cildlərə &bölmək, (bayt) ölçüdə: -Bölünmə... -Bölünmə Təsdiqi -Siz həqiqətən faylı {0} hissəyə bölmək istəyirsiz? -Cild ölçüsü ilkin fayl ölçüsündən kiçik olmalıdır -Cildlərin ölçü təyin etmə sahəsində xəta -Təyin edilmiş cild ölçüsü: {0} bayt.\nSiz həqiqətən arxivi belə cildlərə bölmək istəyirsiniz? -7400 -Faylları Birləşdir -&Birləşdirmək: -Birləşmə... -Bölünmüş faylın yalnız birinci hissəsini seçmək lazımdır -Bölünmüş faylın tanınması mümkün olmadı -Bölünmüş faylın birdən çox hissəsini tapmaq mümkün olmadı -7500 -Yoxlanma cəminin hesablanması... -Yoxlanma cəmi -Dəlillər üçün CRC yoxlanma cəmi: -Dəlillər və adlar üçün CRC yoxlanma cəmi: -7600 -Səmərə Sinağı -Yaddaş Həcmi: -Qablaşdırma -Çeşidlənmə -Dərəcə -Ümumi Dərəcə -Cari -Nəticə -Yüklənmə -Yüklənmə Dərəcəsi -Keçid: -7700 -İstinad -Əlaqələndir -Mənbə: -Məqsəd: -7710 -İstinad Qismi -Sərt İstinad -Rəmzi İstinad (Fayl) -Rəmzi İstinad (Qovluq) -Bağlantı Nöqtəsi (Qovşaq) diff --git a/Utils/7-Zip/Lang/ba.txt b/Utils/7-Zip/Lang/ba.txt deleted file mode 100644 index 947d4a808..000000000 --- a/Utils/7-Zip/Lang/ba.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 9.20 : Haqmar : www.bashqort.com -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Bashkir -Башҡортса -401 -Тамам -Кире ал - - - -&Эйе -&Юҡ -&Яп -Ярҙам - -&Дауам -440 -Бөтәһенә лә Э&йе -Бө&тәһенә лә Юҡ -Туҡта -Яңынан башла -&Артҡы планда -А&лғы планда -&Туҡтатып тор -Паузала -Был эште ысынлап та өҙөргә теләйһегеҙме? -500 -&Файл -Һа&йлау -&Күренеш -Һ&айланмалар -&Сервис -&Белешмә -540 -&Асырға -&Эсендә асырға -&Тышта асырға -Ҡа&рау -&Мөхәррирләргә -&Исемен алыштырырға -&Күбәйтергә... -Кү&серергә... -&Юйырға -Файлды &бүл... -Файлдар бер&ләштереү... -Мәғ&лүмәт -Тас&уирлама -Тикшереү һаны -Diff -Яңы папка... -Яңы &файл... -С&ығырға -600 -&Бөтәһен дә һайларға -Һай&лауҙы кире алырға -Бил&дәләнгәндәрҙе кире әйләндерергә -Маска менән һайларға... -Һайлауҙы ябырға... -Төр буйынса һайларға -Төр буйынса һайлауҙы ябырға -700 -&Эре тамғалар -&Бәләкәй тамғалар -&Исемлек -&Ентекле -730 -Тәртип булмаһын -Барыһын да күрһәт -&2 Панель -&Ҡоралдар панеле -Төп папканы ас -Бер кимәл юғары -Папкалар тарихы... -&Яңырт -750 -&Архивлау төймәләре -Стандарт төймәләр -Эре төймәләр -Төймәләр аңлатмалы -800 -Ғәмәлдәге папканы һайланғандарға өҫтәргә: -Урын -900 -&Көйләү... -&Етештереүсәнлекте үлсәү -960 -&Эстәлек... -7-Zip &тураhында... -1003 -Юл -Исем -Киңәйеүе -Папка -Күләм -Архивдағы күләме -Атрибуттар -Яһалған -Асылған -Үҙгәртелгән -Өҙөлмәгән -Аңлатма -Серләнгән -Алдағы киҫәк -Киләһе киҫәк -Һүҙлек -CRC -Төр -Анти -Ысул -Система -Файл системаһы -Ҡулланыусы -Tөркөм -Блок -Тасуирлама -Урын -Юл префиксы -Папкалар -Файлдар -Версия -Том -Күп томлы -Шылыу -Һылтанмалар -Блоктар -Томдар - -64-bit -Big-endian -Процессор -Физик күләме -Башлыҡтар күләме -Тикшереү суммаһы -Характеристикалар -Виртуаль адрес -ID -Ҡыҫҡа исем -Яһаусы -Сектор күләме -Режим -Һылтанма -Хата -Бар күләм -Буш урын -Кластер күләме -Билдә -Урындағы Исем -Провайдер -2100 -Көйләүҙәр -Тел һайлау -Тел: -Мөхәррирләүсе -&Мөхәррирләүсе: -&Diff: -2200 -Система -7-Zip менән килештер: -2301 -Контекст менюла 7-Zip-ты күрһәтергә -Каскадлы контекст меню -Контекст меню элементтары: -2320 -<Папка> -<Архив> -Архивты асырға -Файлдар сығарыу... -Архивғ өҫтәргә... -Архивты һынарға -Бында сығарырға -{0} папкаһына сығарырға -{0} итеп архивла -Архивлап, e-mail менән ебәрергә... -{0} итеп архивларға һәм e-mail менән ебәрергә -2400 -Папкалар -&Эш папкаһы -&Ваҡытлыса система папкаһы -&Ағымдағы -&Билдәләргә: -Алмаш ташығыстар өсөн генә ҡулланырға -Ваҡытлыса архивтар өсөн урын күрһәтегеҙ. -2500 -Көйләүҙәр -".." элементы күренһен -Файлдарҙың ысын тамғалары күренһен -Система менюһы күренһен -Бөтә юл һайланһын -Һыҙыҡтар күренһен -Бер сиртеү менән асырға -Альтернатив һайлау ысулы -Ҙур хәтер биттәрен ҡуллан -2900 -7-Zip тураhында -7-Zip – ирекле таратылған программа. -3000 -Буш хәтер етмәй -Хата табылманы -{0} объект һайланған -{0} папкаһын яһап булмай -Был архивды үҙгәртеү ғәмәлен үтәп булмай. -'{0}' файлын архив һымаҡ асып булмай -Шифрланған '{0}' файлын асып булманы. Хаталы пароль? -Терәкләнмәгән архив төрө -{0} файлы бар -'{0}' файлы мөхәррирләнде.\nБыл файл архивда яңыртылһынмы? -Файлды яңыртып булманы\n'{0}' -Мөхәррирләүсене асып булманы. -Файл вирусҡа оҡшаған (файл исемендә бер-бер артлы килгән күп бушлыҡтар бар). -Ғәмәлде бындай оҙон юллы папканан үтәп булмай. -Бер файлды һайлау кәрәк -Бер йәки күберәк файлды һайлау кәрәк -Бик күп элемент -3300 -Сығарыу бара... -Ҡыҫыу бара... -Һынау -Асыла... -Тарау бара... -3400 -Сығар -Бында &сығар: -Сығарыласаҡ файлдар өсөн урын һайлағыҙ. -3410 -Юл исемдәре -&Тулы юл исемдәре -Юл исемдәре булмаһын -3420 -Өҫтөнә яҙыу -&Өҫтөнә яҙыу алдынан һора -&Өҫтөнә яҙыу алдынан һорама -Булған файлдарҙы үтеп кит -Яңы исем ҡуш -Булған файлдарға яңы исем ҡуш -3500 -Файл алмаштырыуҙы раҫлағыҙ -Сығарыласаҡ папкала эшкәртелгән файл бар. -Булған -файлын киләһе менән алыштырырғамы? -{0} байт -&Яңы исем ҡушылһын -3700 -'{0}' файлын ҡыҫыу ысулын табып булманы. -'{0}' файлында мәғлүмәт хатаһы бар. Файл боҙоҡ. -'{0}' файлында CRC хатаһы бар. Файл боҙоҡ. -Шифрланған '{0}' файлы мәғлүмәттәрендә хата. Хаталы пароль? -Шифрланған '{0}' файлында CRC хатаһы. Хаталы пароль? -3800 -Пароль керетеү -&Паролде керетегеҙ: -Па&ролде яңынан керетегеҙ: -П&ароль күренһен -Паролдәр тап килмәй -Пароль өсөн тик латин хәрефтәрен, һандарҙы һәм махсус символдарҙы (!, #, $, ...) ҡулланығыҙ -Пароль бик оҙон -Пароль -3900 -Үткән ваҡыт: -Ҡалған ваҡыт: -Барыһы: -Тиҙлек: -Күләм: -Ҡыҫыу нисбәте: -Хаталар: -Архив: -4000 -Архивлау -&Архив: -&Яңыртыу ысулы: -А&рхив төрө: -Ҡыҫыу &дәрәжәһе: -Ҡ&ыҫыу ысулы: -Һүҙ&лек күләме: -Һүҙ күлә&ме: -Блоктар күләме: -Ағымдар һаны: -&Параметрҙар: -&Көйләү -SFX ар&хивын яһау -Яҙыуға асыҡ файлдарҙы ҡыҫырға -Шифрлау -Шифрлау методы: -&Файл исемдәрен шифрла -Ҡыҫҡанда хәтер ҡулланыу: -Сығарғанда хәтер ҡулланыу: -4050 -Ҡыҫыуһыҙ -Бик тиҙ -Тиҙ -Ғәҙәти -Максимум -Ультра -4060 -Өҫтәргә һәм алмаштырырға -Яңыртырға һәм өҫтәргә -Яңыртырға -Синхронларға -4070 -Ҡарау -Бар файлдар -Файл күләме буйынса -Өҙөлмәгән -6000 -Копияһын ал -Күсер -Копия ҡуйыласаҡ урын: -Күсереләсәк урын: -Копияһын алыу... -Күсереү... -Яңынан исемләү бара... -Папканы күрһәтегеҙ. -Ғәмәлде үтәп булмай -Файлға йәки папкаға яңы исем биреү хатаһы -Файлдарҙы күбәйтеүҙе раҫлау -Был файлдар архивға ҡуйылһынмы? -6100 -Файл юйыуҙы раҫлау -Папка юйыуҙы раҫлау -Берҙән күп файл юйыуҙы раҫлау -'{0}' юйылһынмы? -'{0}' папкаһы һәм эсендәгеләр юйылһынмы? -{0} есеме юйылһынмы? -Юйыу бара... -Файл йәки папка юйыу хатаһы -Оҙон юллы файлдарҙы кәрзингә юйыуҙы система терәкләмәй -6300 -Папка яhа -Файл яhа -Папка исеме: -Файл исеме: -Яңы папка -Яңы файл -Папка яһау хатаһы -Файл яһау хатаһы -6400 -Тасуирлама -&Асыҡлама: -hайла -Һайлауҙы кире ал -Маска: -6600 -Үҙенсәлектәр -Папкалар тарихы -Белдереүҙәр -Белдереү -7100 -Компьютер -Селтәр -Документтар -Система -7200 -Өҫтәргә -Сығарырға -Һынарға -Копияһын алырға -Күсерергә -Юйырға -Мәғлүмәт -7300 -Файлды бүл -&Ошо папкаға бүл: -Киҫәк/&байт итеп бүл: -Бүлеү бара... -Бүлеүҙе раҫлау -Был файлды {0} киҫәккә бүлеүҙе раҫлайһығыҙмы? -Том күләме сығанак файлдан бәләкәй булырға тейеш -Хаталы том күләме -Том күләме : {0} байт.\nФайлды бындай томдарға бүлеүҙе раҫлайһығыҙмы? -7400 -Файлдарҙы берләштер -&Ошо папкала берләштер: -Берләштереү бара... -Бүленгән файлдың беренсе киҫәген генә һайлағыҙ -Бүленгән файлды танып булманы -Бүленгән файлдың берҙән күп киҫәген табып булманы -7500 -Тикшереү һанын иҫәпләү бара... -Тикшереү һаны -Мәғлүмәттәр өсөн CRC тикшереү һаны: -Мәғлүмәттәр һәм исемдәр өсөн CRC тикшереү һаны: -7600 -Етештереүсәнлекте тикшереү -Хәтер ҡулланыу: -Ҡыҫыу -Сығарыу -Рейтинг -Дөйөм рейтинг -Хәҙерге -Һөҙөмтә -Процессор ҡулланыу -Рейтинг / Проц. ҡулл. -Үтеүҙәр: diff --git a/Utils/7-Zip/Lang/be.txt b/Utils/7-Zip/Lang/be.txt deleted file mode 100644 index 5a16ebdc9..000000000 --- a/Utils/7-Zip/Lang/be.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; : Kirill Gulyakevitch -; 9.07 : 2011-03-15 : Drive DRKA -; -; -; -; -; -; -; -; -; -0 -7-Zip -Belarusian -Беларуская -401 -OK -Адмена - - - -&Так -&Не -&Зачыніць -Дапамога - -&Працягнуць -440 -Так для &усіх -Не для ў&сіх -Стоп -Перазапуск -&Фонам -&На пярэдні план -&Паўза -На паўзе -Вы сапраўды жадаеце перапыніць аперацыю? -500 -&Файл -&Праўка -&Выгляд -&Абранае -С&ервіс -&Даведка -540 -&Адкрыць -Адкрыць &усярэдзіне -Адкрыць з&вонку -Прагляд -&Рэдагаваць -Пера&назваць -&Капіяваць у... -&Перамясціць у... -&Выдаліць -Ра&збіць файл... -А&б'яднаць файлы... -Сво&йства -Коме&нтар -Кантрольная сума -Diff -&Стварыць папку -Ств&арыць Файл -В&ыхад -600 -Вылучыць у&сё -Прыбраць вылучэнне -&Звярнуць в&ыдзяленне -Вылучыць... -Прыбраць вылучэнне... -Вылучыць па тыпе -Прыбраць вылучэнне па тыпе -700 -&Буйныя значкі -&Дробныя значкі -Спі&с -&Табліца -730 -Без сартавання -Плоскі рэжым -&2 Панэлі -&Панэлі прылад -Адкрыць каранёвую папку -Пераход на адзін узровень уверх -Гісторыя папак... -А&бнавіць -750 -Панэль кнопак архіватара -Стандартная панэль кнопак -Вялікія кнопкі -Надпісы на кнопках -800 -Дадаць папку ў &абранае як -Закладка -900 -Налады... -Тэставанне прадукцыйнасці -960 -&Змест... -Аб &праграме... -1003 -Шлях -Імя -Пашырэнне -Папка -Памер -Сціснуты -Атрыбуты -Створаны -Адчынены -Зменены -Бесперапынны -Каментар -Зашыфраваны -Пабіты Да -Пабіты Пасля -Слоўнік -CRC -Тып -Анты -Метад -Сістэма -Файлавая Сістэма -Карыстальнік -Група -Блок -Каментар -Пазіцыя -Шлях -Папак -Файлаў -Версія -Тым -Шматтомны -Зрушэнне -Спасылак -Блокаў -Тамоў - -64-bit -Big-endian -Працэсар -Фізічны Памер -Памер Загалоўкаў -Кантрольная Сума -Характарыстыкі -Віртуальны Адрас -ID -Кароткае Iмя -Создатель -Памер Сектара -Рэжiм -Ссылка -Памылка -Ёмістасць -Вольна -Памер кластара -Пазнака -Лакальнае імя -Правайдэр -2100 -Налады -Мова -Мова: -Рэдактар -&Рэдактар: -&Diff: -2200 -Сістэма -Асацыяваць 7-Zip з файламі: -2301 -Убудаваць 7-Zip у кантэкстнае меню абалонкі -Каскаднае кантэкстнае меню -Элементы кантэкстнага меню: -2320 -<Папка> -<Архіў> -Адкрыць архіў -Распакаваць -Дадаць да архіва... -Тэставаць -Распакаваць тут -Распакаваць у {0} -Дадаць да {0} -Сціснуць і адправіць па email... -Сціснуць у {0} і адправіць па email -2400 -Папкі -&Працоўная Папка -&Сістэмная часавая Папка -&Бягучая -&Задаць: -Выкарыстаць толькі для зменных носьбітаў -Пакажыце становішча для часавых архіваў. -2500 -Налады -Паказваць элемент ".." -Паказваць рэальныя абразкі файлаў -Паказваць сістэмнае меню -Курсор на ўвесь радок -Паказваць падзельнікі -Адчыняць элемент адным клiкам -Альтэрнатыўны рэжым пазнакі -Выкарыстаць вялікія старонкі памяці -2900 -Аб праграме 7-Zip -7-Zip з'яўляецца вольна распаўсюджваемай праграмай. Аднак калі вы жадаеце падтрымаць распрацоўку 7-Zip, вы можаце зарэгістраваць праграму.Праграма перакладена Drive DRKA.Мая электронная скрыня: drka2003@mail.ru.Пераклад зроблен у верасні 2007 года. -3000 -Нядосыць вольнай памяці -Памылак не знойдзена -Вылучана аб'ектаў: {0} -Не атрымалася стварыць папку '{0}' -Аперацыі змены не падтрымліваюцца для гэтага архіва. -Не атрымалася адкрыць файл '{0}' як архіў -Не атрымалася адкрыць зашыфраваны архіў '{0}'. Няслушны пароль? -Непадтрымоўваны тып архіва -Файл {0} ужо існуе -Файл '{0}' быў зменены.\nВы жадаеце абнавіць яго ў архіве? -Не атрымалася абнавіць файл\n'{0}' -Не атрымалася запусціць рэдактар -Файл падобны на вірус (імя файла ўтрымоўвае доўгую паслядоўнасць прабелаў). -Аперацыя не можа быць выкананая з папкі, якая мае доўгі шлях. -Вы павінны вылучыць адзін файл -Вы павінны вылучыць адзін або некалькі файлаў -Занадта шмат элементаў -3300 -Распакаванне -Кампрэсія -Тэставанне -Адкрыццё... -Сканаванне... -3400 -Выняць -&Распакаваць у: -Пакажыце становішча для вымаемых файлаў. -3410 -Шляхі -По&ўные шляхі -&Без шляхоў -3420 -Перазапіс -&З пацверджаннем -Бы&ез пацверджанні -Прап&ускаць -Пераназваць аўтам. -Переім. аўтам. істот. -3500 -Пацверджанне замены файла -Папка ўжо ўтрымоўвае апрацоўваемы файл. -Замяніць наяўны файл -наступным файлам? -{0} байтаў -Пераназваць аўтам. -3700 -Непадтрымоўваны метад сціску для файла '{0}'. -Памылка ў дадзеных у '{0}'. Файл сапсаваны. -Памылка CRC у '{0}'. Файл сапсаваны. -Памылка ў дадзеных зашыфраванага файла '{0}'. Няслушны пароль? -Памылка CRC для зашыфраванага файла '{0}'. Няслушны пароль? -3800 -Увод пароля -&Увядзіце пароль: -&Паўтарыце пароль: -&Паказаць пароль -Паралі не супадаюць -Для пароля выкарыстайце толькі знакі лацінскага алфавіту, лічбы і адмысловыя знакі (!, #, $, ...) -Пароль занадта доўгі -&Пароль -3900 -Мінула: -Засталося: -Усяго: -Хуткасць: -Памер: -Ступень сціску: -Памылак: -Архіваў: -4000 -Дадаць да архіва -&Архіў: -&Рэжым змены: -&Фармат архіва: -&Узровень сціску: -&Метад сціску: -Памер &слоўніка: -Памер з&лоўлі: -Памер блока: -Лік струменяў: -&Параметры: -&Опцыі -Стварыць SF&X-архіў -Сціскаць адчыненыя для запісу файлы -Шыфраванне -Метад шыфравання: -&Шыфраваць імёны файлаў -Аб'ём памяці для пакавання: -Аб'ём памяці для распакавання: -4050 -Без сціску -Хуткасны -Хуткі -Нармалёвы -Максімальны -Ультра -4060 -Дадаць і замяніць -Абнавіць і дадаць -Абнавіць -Сінхранізаваць -4070 -Прагартаць -Усе файлы -Па памеры файла -Бесперапынны -6000 -Капіяваць -Перамясціць -Капіяваць у: -Перамясціць у: -Капіяванне... -Перамяшчэнне... -Пераназванне... -Пакажыце папку. -Аперацыя не падтрымліваецца для гэтай папкі. -Памылка пры пераназванні файла або папкі -Пацверджанне капіявання файлаў -Вы сапраўды жадаеце скапіяваць гэтыя файлы ў архіў -6100 -Пацверджанне выдалення файла -Пацверджанне выдалення папкі -Пацверджанне выдалення групы файлаў -Вы сапраўды жадаеце выдаліць "{0}"? -Вы сапраўды жадаеце выдаліць папку "{0}" і ўсё яе змесціва? -Вы сапраўды жадаеце выдаліць гэтыя аб'екты ({0} шт.)? -Выдаленне... -Памылка пры выдаленні файла або папкі -Сістэма не падтрымлівае аперацыю выдалення файлаў з доўгімі шляхамі ў кошык -6300 -Стварыць папку -Стварыць файл -Імя папкі: -Імя файла: -Новая Папка -Новы файл -Памылка пры стварэнні папкі -Памылка пры стварэнні файла -6400 -Каментар -&Каментар: -Вылучыць -Прыбраць вылучэнне -Маска: -6600 -Уласцівасці -Гісторыя папак -Паведамленні -Паведамленне -7100 -Кампутар -Сетка -Дакументы -Сістэма -7200 -Дадаць -Выняць -Тэставаць -Капіяваць -Перамясціць -Выдаліць -Інфармацыя -7300 -Разбіць файл -&Разбіць у: -Разбіць на &тамы памерам (у байтах): -Разбіццё... -Пацверджанне разбіцця -Вы сапраўды жадаеце разбіць файл на {0} частак? -Памер тома павінен быць менш памеру зыходнага файла -Памылка ў поле для задання памеру тамоў -Усталяваны памер тома: {0} байтаў.\nВы сапраўды жадаеце разбіць архіў на такія тамы? -7400 -Аб'яднаць файлы -&Аб'яднаць у: -Аб'яднанне... -Неабходна вылучыць толькі першую частку пабітага файла -Не атрымалася распазнаць пабіты файл -Не атрымалася знайсці больш адной часткі пабітага файла -7500 -Вылічэнне кантрольнай сумы... -Кантрольная сума -Кантрольная сума CRC для дадзеных: -Кантрольная сума CRC для дадзеных і імёнаў: -7600 -Тэставанне прадукцыйнасці -Аб'ём памяці: -Пакаванне -Распакаванне -Рэйтынг -Агульны рэйтынг -Бягучы -Выніковы -Нагрузка -Рэйтынг / Нагр. -Праходаў: diff --git a/Utils/7-Zip/Lang/bg.txt b/Utils/7-Zip/Lang/bg.txt deleted file mode 100644 index 4346f1660..000000000 --- a/Utils/7-Zip/Lang/bg.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; : chavv -; : icobgr -; 4.65 : Vassia Atanassova -; -; -; -; -; -; -; -; -0 -7-Zip -Bulgarian -Български -401 -OK -Отказ - - - -&Да -&Не -&Затваряне -Помощ - -Пр&одължаване -440 -Да за &всички -Не за &всички -Стоп -От начало -&Фонов режим -&Нормален режим -&Пауза -В пауза -Наистина ли желаете да прекратите? -500 -&Файл -&Редактиране -&Показване -&Любими -&Инструменти -&Помощ -540 -&Отваряне -Отваряне &в -Отваряне &извън -&Показване -&Редактиране -Преи&менуване -&Копиране в... -Пре&местване в... -Из&триване -Р&азделяне на файл... -О&бединяване на файлове... -&Свойства -Ком&ентар -Изчисляване на контролна сума - -Създаване на директория -Създаване на файл -Из&ход -600 -&Маркиране на всички -&Размаркиране на всички -&Обръщане на избора -Маркиране... -Размаркиране... -Маркиране по тип -Размаркиране по тип -700 -&Големи икони -&Малки икони -&Списък -&Детайли -730 -Несортиран -Плосък изглед -&2 панела -&Ленти с инструменти -Отваряне на главната директория -Едно ниво нагоре -История на директориите... -&Опресняване -750 -Лента на архива -Стандартна лента -Големи бутони -Показване на текст под бутоните -800 -&Добавяне на директорията като любима: -Отметка -900 -&Настройки... -&Статистика -960 -&Съдържание... -&За 7-zip... -1003 -Път -Име -Разширение -Директория -Размер -Компресиран размер -Атрибути -Създаден -Отварян -Изменен -Солиден -Коментар -Зашифрован -Разделен до -Разделен след -Речник -CRC -Тип -Анти -Метод -Операционна система -Файлова система -Потребител -Група -Блок -Коментар -Позиция -Префикс на пътя -Директории -Файлове -Версия -Том -Multivolume -Offset -Links -Blocks -Томове - -64-битов -Big-endian -CPU -Физически размер -Размер на заглавната част -Контролна сума -Характеристики -Виртуален адрес - - - - - - -Грешка -Пълен размер -Свободно пространство -Размер на клъстер -Етикет -Локално име -Доставчик -2100 -Настройки -Език -Език: -Редактор -&Редактор: - -2200 -Система -Асоцииране на 7-Zip с: -2301 -Интегриране на 7-Zip в контекстното меню на шела -Каскадно контекстно меню -Елементи на контекстното меню: -2320 -<Директория> -<Архив> -Отваряне на архив -Разархивиране на файловете... -Добавяне към архив... -Проверка на архива -Разархивиране тук -Разархивиране в {0} -Добавяне в {0} -Архивиране и изпращане... -Архивиране в {0} и изпращане -2400 -Директории -&Работна директория -&Системната TEMP директория -&Текущата -&Друга: -Използване само за преносими носители -Указване на място за временните архиви. -2500 -Настройки -Показване на обекта ".." -Показване на истинските икони на файловете -Показване на системното меню -&Избор на цял ред -Показване на помощни &линии - -&Алтернативен режим на избор -Използване на &големи страници от паметта -2900 -Информация -7-Zip се разпространява като свободен софтуер. Все пак, можете да подпомогнете разработката на 7-zip, като се регистрирате. -3000 -Системата не може да задели необходимото количество памет. -Няма грешки в архива -{0} обект(и) избрани -Не може да бъде създадена директория '{0}' -Този архив не поддържа операции за изменение. -Файлът '{0}' не може да се отвори като архив -Криптираният архив '{0}' не може да се отвори. Грешка в паролата? -Архив от тип, който не се поддържа -Файлът {0} вече съществува -Файлът '{0}' е бил променен.\nИскате ли да обновите копието му в архива? -Не може да бъде обновен файл \n'{0}' -Не може да бъде стартиран редактора. -Файлът прилича на вирус (името му съдържа дълги поредици интервали). -Операцията не може да бъде извикана от директория с толкова дълъг път. -Трябва да се избере един файл -Трябва да се изберат един или повече файлове -Твърде много обекти -3300 -Разархивиране -Компресия -Проверка -Отваряне... -Претърсване... -3400 -Разархивиране -&Разархивиране в: -Избор на място за разархивираните файлове. -3410 -Режим за пътищата -Пълни пътища -Без пътища -3420 -Режим за презаписване -Потвърждение преди презаписване -Презаписване без потвърждение -Пропускане на съществуващите файлове -Автоматично преименуване -Автоматично преименуване на съществуващите файлове -3500 -Подтвърдете замяната на файла -Директорията вече съдържа файл с такова име. -Желаете ли да замените съществуващия файл -с този файл? -{0} байта -&Автоматично преименуване -3700 -Неподдържан метод за компресия във файл '{0}'. -Грешка в данните в '{0}'. Файлът е повреден. -Проверката на цикличния остатък даде грешка в '{0}'. Файлът е повреден. -Грешка в данните в криптирания файл '{0}'. Грешка в паролата? -Проверката на цикличния остатък даде грешка в криптирания файл '{0}'. Грешка в паролата? -3800 -Въведете парола -Въведете парола: -Въведете повторно парола: -&Показване на паролата -Двете пароли не съвпадат -За паролата си използвайте само латински букви, цифри и специални символи (!, #, $, ...) -Паролата е твърде дълга -&Парола -3900 -Изминало време: -Оставащо време: -Размер: -Скорост: -Обработени: -Коефициент на компресия: -Грешки: -Архиви: -4000 -Добавяне към архив -&Архив: -Режим за изменение: -Формат на архива: -&Ниво на компресия: -Метод за компресия: -Размер на &речника: -Размер на &думата: -Размер на непрекъснат блок: -Брой процесорни нишки: -&Параметри: -&Опции -Самора&зархивиращ се архив -Компресирани споделени файлове -Криптиране -Метод за криптиране: -Криптиране на файловите &имена -Използвана памет за архивиране: -Използвана памет за разархивиране: -4050 -Без компресия -Най-бърза -Бърза -Нормална -Максимална -Ултра -4060 -Добавяне и замяна на файлове -Обновяване и добавяне на файлове -Опресняване на съществуващите файлове -Синхронизиране на файловете -4070 -Разглеждане -Всички файлове -Non-solid -Непрекъсната (solid) компресия -6000 -Копиране -Преместване -Копиране в: -Преместване в: -Копиране... -Местене... -Преименуване... -Избор на целева директория. -Операцията не се поддържа за тази директория. -Грешка при преименуването на файл или директория -Потвърждение за копирането на файл -Сигурни ли сте, че искате да копирате файлове към архива? -6100 -Потвърждение за изтриването на файл -Потвърждение за изтриването на директория -Потвърждение за изтриването на множество файлове -Сигурни ли сте, че искате да изтриете '{0}'? -Сигурни ли сте, че искате да изтриете диркеторията '{0}' с цялото й съдържание? -Сигурни ли сте, че искате да изтриете тези {0} обекта? -Изтриване... -Грешка при изтриване на файл или директория -Системата не може да изтрие файл с толкова дълъг път -6300 -Създаване на директория -Създаване на файл -Име на директория: -Име на файл: -Нова директория -Нов файл -Грешка при създаване на директория -Грешка при създаване на файл -6400 -Коментар -&Коментар: -Маркиране -Размаркиране -Маска: -6600 -Свойства -История на директориите -Диагностични съобщения -Съобщение -7100 -Компютър -Мрежа -Документи -Система -7200 -Добавяне -Извличане -Тестване -Копиране -Преместване -Изтриване -Информация -7300 -Разделяне на файл -&Разделяне на: -Разделяне на &томове, байтове: -Разделяне... -Потвърждение на разделянето -Сигурни ли сте, че искате да разделите файла на {0} тома? -Размерът на том трябва да бъде по-малък от размера на оригиналния файл -Невалиден размер на том -Указан размер на том: {0} байта.\nСигурни ли сте, че искате да разделите архива на томове с такъв размер? -7400 -Обединяване на файлове -&Обединяване в: -Обединяване... -Избиране само на първата част от разделения файл -Файлът не се разпознава като част от разделен оригинален файл -Не се открива повече от една част от разделения файл -7500 -Изчисляване на контролната сума... -Информация за контролната сума -CRC контролна сума за данни: -CRC контролна сума за данни и имена: -7600 -Статистика -Използвана памет: -Архивиране -Разархивиране -Оценка -Обща оценка -Текущо -Резултат - - -Успешно преминали: diff --git a/Utils/7-Zip/Lang/bn.txt b/Utils/7-Zip/Lang/bn.txt deleted file mode 100644 index 3e1865694..000000000 --- a/Utils/7-Zip/Lang/bn.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.46 : Team Oruddho (Fahad Mohammad Shaon, Mahmud Hassan) : http://www.oruddho.com -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Bangla -বাংলা -401 -ঠিক আছে -বাতিল - - - -&হ্যাঁ -&না -&বন্ধ করা -সাহায্য - -&চালিয়ে যাওয়া -440 -&সবগুলোর জন্য হ্যাঁ -স&বগুলোর জন্য না -বন্ধ -আবার শুরু -&পটভূমি -& সামনে -&বিরতি -বিরতিতে অবস্থানরত -আপনি বাতিল করতে ইচ্ছুক? -500 -&ফাইল -&পরিবর্তন -প্রদর্শন& -&প্রিয় -&দরকারি -&সহায়তা -540 -&উন্মুক্ত করা -7-zip-এ উন্মুক্ত করা -বাহিরে উন্মুক্ত করা -&প্রদর্শন -&পরিবর্তন -নাম পরিবর্তন -&অনুলিপি হবে... -প্রতিস্থাপন হবে... -&মুছে ফেলা -&ফাইল খন্ডায়ন... -ফাইল সংযোজন... -বৈশিষ্টাবলি -মন্তব্য -Checksum গননা করা - -ফোল্ডার সৃষ্টি -ফাইল সৃষ্টি -বাহির -600 -সব নির্বাচন -নির্বাচন রদ করা -উল্টো নির্বাচন -নির্বাচন... -নির্বাচন রদ করা... -ধরণ অনুযায়ী নির্বাচন -ধরণ অনুযায়ী নির্বাচন রদ করা -700 -বৃহৎ প্রতিক -ছোট্ট প্রতিক -&তালিকা -&বিবরণ -730 -অসজ্জিত -সমতল সজ্জা -&ব্যবস্থাপক দ্বিখন্ডন -&দরকারিখুটি -মূল ফোল্ডার উন্মুক্ত করা -এক পর্যায় উপরে ... -ফোল্ডারের অতীত বিবরণ... -&সতেজতা -750 -সংকোচোন ব্যবস্থাপক খুটি -সাধারণ খুটি -বৃহৎ বোতাম -বোতামের শিরোনাম প্রদর্শন -800 -&প্রিয় ফোল্ডার হিসাবে সংযোজন ... -পছন্দের তালিকা -900 -&পছন্দগুলো... -&বেঞ্চমার্ক -960 -&সাহায্য... -&7-Zip সর্ম্পকে... -1003 -অবস্থান -নাম -পরিচয় -ফোল্ডার -আকার -সংকুচিত আকার -বৈশিষ্ট -সৃষ্টি হয়েছে -ব্যবহার হয়েছে -পরিবর্ধন হয়েছে -দৃঢ় -Commented -আটকানো -খন্ডনের পূর্বে -খন্ডনের পরে -অভিধান -CRC -ধরন -বিরোধী -পদ্ধতি -চলতি অপারেটিং সিস্টেম -ফাইল ব্যবস্থা -ব্যবহারকারী -দল -বাধা -মন্তব্য -অবস্থান -পথের বিশেষায়ণ (Path Prefix) - - - - - - - - - - - - - - - - - - - - - - - - -ত্রুটি -সম্পূর্ণ আকার -অবশিষ্ট জায়গা -ক্লাস্টারের আকার -শিরোনাম -স্থানীয় নাম -বিতরণকারী -2100 -পছন্দগুলো -ভাষা -ভাষা: -সম্পাদক -বর্তমান সম্পাদক : - -2200 -বর্তমান অবস্থা -7-Zip-এর সাথে সম্পর্কিত : -2301 -সাহায্যকারী তালিকায় 7-Zip সংযোজন -সাহায্যকারী তালিকায় একের ভিতর সব গুটিয়ে ফেলা -সাহায্যকারী তালিকার বিষয়সমূহ: -2320 -<ফোল্ডার> -<সংকুচিত ফাইল> -সংকুচিত ফাইল চালু করা -ফাইল সম্প্রসারণ... -সংকুচিত ফাইলে সংযোজন... -সংকুচিত ফাইল নিরীক্ষণ -এখানেই সম্প্রসারণ -সম্প্রসারণ করা হবে {0} -সযোজন করা হবে {0} -সংকোচন এবং ই-মেইল... -সংকোচন - {0} এবং ই-মেইল -2400 -ফোল্ডার -&কার্যরত ফোল্ডার -&অস্থায়ী ফোল্ডার -&প্রচলিত -&নির্দিষ্ট: -অস্থায়ী অংশের জন্য ব্যবহার করা -অস্থায়ী ফোল্ডার নির্বাচন করুন। -2500 -পছন্দগুলো -".." ফাইল প্রদর্শন -ফাইলের আসল প্রতিক দেখানো -কম্পিউটার চালকের তালিকা দেখানো -পূর্ণ পর্যায় প্রদর্শন -ছকের লাইন প্রদর্শন - -পরিপূরক নিবাচনের পদ্ধতি -বেশি স্মৃতির ব্যবহার -2900 -7-Zip সম্পর্কে -7-Zip একটি মুক্ত প্রোগ্রাম কিন্তু এটি 7-Zip এর কতৃপক্ষের কাচে নিবন্ধনের মাধ্যমে আপনি উন্নত সেবা পেতে পারেন -3000 - -কোন ত্রুটি নেই -{0} ফাইল(সমূহ) নির্বাচিত -'{0}' ফোল্ডার সৃষ্টি করা সম্ভব হচ্ছেনা -এই সংকোচনের ক্ষেত্রে এই সেবা প্রদান করা সম্ভব হচ্ছে না। -'{0}' -কে সংকুচিত ফাইল হিসেবে চালু করা সম্ভব হচ্ছেনা -'{0}' বদ্ধ সংকুচিত ফাইল চালু করা সম্ভব হচ্ছেনা. ভুল পাসওয়ার্ড? - - -ফাইলটি '{0}' পরিমার্জিত.\nআপনি সংকুচিত ফাইলটি ও পরিমার্জন করতে চান? -পরিমার্জন করা সম্ভব হয়নি\n'{0}' -সম্পাদক চালু করা সম্ভব নয় - - - - -অনেক বেশী ফাইল -3300 -সম্প্রসারণ করা হচ্ছে -সংকোচায়ন প্রক্রিয়াধীন -নিরক্ষণ করছে ... -উন্মুক্ত করা হচ্ছে... -তথ্য সংগ্রহ চলছে... (Scanning...) -3400 -সম্প্রসারণ -&সম্প্রসারণ করা হবে: -ফাইল সম্প্রসারনের ঠিকানা -3410 -ঠিকানা নির্বাচন পদ্ধতি -পূর্ণ ঠিকানাসমূহ -ঠিকানাবিহীন -3420 -প্রতিস্থাপন পদ্ধতি -প্রতিস্থাপনের পূর্বাভাস -আভাসবিহীন প্রতিস্থাপন -একই পরিচয় প্রাপ্ত ফাইল এড়িয়ে চলা -স্বয়ংক্রিয় পুঃনামকরণ -একই পরিচয় প্রাপ্ত ফাইলের নাম পরিবর্ত্ন -3500 -ফাইল প্রতিস্থাপন নিশ্চিত করণ -নির্ধারিত ফোল্ডারে ফাইলটি আগেথেকেই আছে -আপনিকি বর্তমান ফাইলটি প্রতিস্থাপন করতে চান? -এইটির সাথে? -{0} bytesবাইট -স্বয়ংক্রিয় পুঃনামকরণ -3700 -অসমর্থিত সংকোচন পদ্ধতি -'{0}'. -'{0}' ফাইলে ত্রুটিপূর্ণ তথ্য. ফাইলটি খন্ডিত -'{0}' ফাইলে CRC ব্যর্থ. ফাইলটি খন্ডিত -'{0}' বদ্ধ ফাইলে তথ্যে ত্রুটি. ভুল পাসওয়ার্ড? -'{0}' বদ্ধ ফাইলে CRC ব্যর্থ. ভুল পাসওয়ার্ড? -3800 -পাসওয়ার্ডটি প্রবেশ করুনঃ -পাসওয়ার্ডটি প্রবেশ করুনঃ -আবার পাসওয়ার্ড প্রবেশ করুনঃ -&পাসওয়ার্ড প্রদর্শন -পাসওয়ার্ড দুটি একই নয় -শুধু ইংলিশ বর্ণ, সংখ্যা এবং বিশেষ বর্ণ (!, #, $, ...) পাসওয়ার্ড হিসেবে ব্যবহার করুন -পাসওয়ার্ডটি খুব বেশী বড় হয়েছে -পাসওর্য়াড -3900 -অতিবাহিত সময়ঃ -সময় বাকি আছেঃ -আকার: -গতি: - - -বিফলতা : - -4000 -সংকোচনে সংযোজন -&সংকোচন -&পরিমার্জন পদ্ধতি: -সংকোচনের & পরিচয়: -সংকোচনের &পর্যায়: -সংকোচন &পদ্ধতি: -&Dictionary size: -&Word size: -Solid block size: -CPU-এর thread-এর সংখ্যা: -&Parameters: -পছন্দনীয় -স্বয়ংক্রিয় সংকোচন প্রোগ্রাম তৈরি -বিনিময়যোগ্য ফাইল সংকোচন -বদ্ধ করা -বদ্ধ করার পদ্ধতি: -ফাইলের নাম &আটকে ফেলা -সংকোচনের জন্য স্মৃতির ব্যবহার: -সম্প্রসারনের জন্য স্মৃতির ব্যবহার: -4050 -অতি সংকোচায়ন -অতি দ্রুত -দ্রুত -সাধারন -সর্ব্বোচ্চ -পলকের গতি -4060 -সংকোচন ও ফাইল প্রতিস্থাপন -পরিমার্জন ও ফাইল প্রতিস্থাপন -উল্লেখিত ফাইলে সতেজতা প্রদান -ফাইল সাজিয়ে রাখা -4070 -বিচরণ -সকল ফাইল -Non-solid -Solid -6000 -অনুলিপি গ্রহন -অনুলিপি গ্রহন এবং মুছে ফেলা -অনুলিপি করা হবে: -প্রতিস্থাপিত হবে: -অনুলিপি করা হচ্ছে... -প্রতিস্থাপিত হচ্ছে... -নাম পরিবর্তন... -গন্তব্য ফোল্ডার নির্বাচন. -কার্যটি সম্ভব নয় -ফাইল বা ফোল্ডারের নাম পরিবর্তনে সম্ভব নয় -ফাইল অনুলিপি নিশ্চিতকরণ -আপনি কি ফাইলগুলোকে সংকুচিত ফাইলে অনুলিপি গ্রহণ করতে চান। -6100 -ফাইলটি মুছে ফেলতে কি আপনি নিশ্চিত -ফোল্ডারটি মুছে ফেলতে কি আপনি নিশ্চিত -ফাইলটি মুছে ফেলতে কি আপনি নিশ্চিত -মুছে ফেলতে আপনি কি নিশ্চিত - '{0}'? -'{0}' ফোল্ডার এবং এর সব ফাইল আপনি কি মুছে ফেলতে নিশ্চিত? -নির্বাচিত {0} টি ফাইল আপনি কি মুছে ফেলতে নিশ্চিত? -মুছে ফেলা হচ্ছে... -ফাইল বা ফোল্ডার মুছে ফেলাতে সমস্যা হচ্ছে - -6300 -ফোল্ডার সৃষ্টি -ফাইল সৃষ্টি -ফোল্ডারের নাম: -ফাইল নাম: -নতুন ফোল্ডার -নতুন ধারক -ফোল্ডার সৃষ্টিতে সমস্যা -ফাইল সৃষ্টিতে সমস্যা -6400 -মন্তব্য -&মন্তব্য: -নির্বাচন -নির্বাচন রদ করা -আড়াল করা: -6600 - -ফোল্ডারের অতিত বিবরন -সমস্যা নিরাময় আভাস -আভাস -7100 -কম্পিউটার -আন্তঃ সম্পর্ক - -কম্পিউটার চালক -7200 -সংজোযন -সম্প্রসারন -নিরীক্ষণ -অনুলিপি গ্রহন -প্রতিস্থাপন -মুছে ফেলা -তথ্য -7300 -ফাইল খন্ডায়ন -&ফাইল খন্ডায়িত হবে: -volumes(খন্ডে), bytes(বাইটস)-এ খন্ডায়নঃ -ফাইল খন্ডায়ন চলছে... -ফাইল খন্ডায়ন নিশ্চিতকরণ -আপনি কি সংকুচিত ফাইলটিকে {0} খন্ডে খন্ডায়ন করতে চান? -খন্ডের আকার অবশ্যই মূল ফাইলের চেয়ে ছোট হতে হবে -খন্ডের আকারে ভুল -উল্লেক্ষিত খন্ডের আকার : {0} bytes.\nআপনি কি সংকোচিত ফাইলটিকে এ ভাবেই খন্ডে খন্ডায়ন করতে চান? -7400 -ফাইল একীভূতি করণ -&একীভূতি করা হবে: -একীভূতি চলছে... -শুধু প্রথম ফাইলটি নির্বাচন করুন - - -7500 -Checksum গননা চলছে... -Checksum তথ্য -তথ্যের জন্য CRC checksum: -তথ্য এবং নামের জন্য CRC checksum: -7600 -বেঞ্চমার্ক -ব্যবহৃত স্মৃতি : -সংকোচায়ন ... -সম্প্রসারণ ... -রেটিং -মোট রেটিং -চলতি -ফলাফল -CPU ব্যবহার করছে -Rating / ব্যবহার করছে -সফলতা : diff --git a/Utils/7-Zip/Lang/br.txt b/Utils/7-Zip/Lang/br.txt deleted file mode 100644 index f7f7fa3b8..000000000 --- a/Utils/7-Zip/Lang/br.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 3.12 : KAD-Korvigelloù An Drouizig (drouizig.org). -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Breton -Brezhoneg -401 -Mat eo -Nullañ - - - -&Ya -&Ket -&Serriñ -Skoazell - -&Kenderc'hel -440 -Ya be&pred -Ket &bepred -Paouez -Adloc'hañ -&Drekleur -&Rakleur -&Ehan -Ehanet -Ha fellout a ra deoc'h nullañ ? -500 -&Restr -&Aozañ -&Gwelout -Di&baboù -&Ostilhoù -&Skoazell -540 -&Digeriñ -Digeriñ a-zia&barzh -Digeriñ a-zia&vaez -&Gwelout -&Aozañ -Adenv&el -&Kopiañ diwar... -&Dilec'hiañ diwar... -D&ilemel -&Troc'hañ restr... -&Kendeuziñ restroù... -P&erzhioù -Evezhia&denn - - -Sevel un teul -Sevel ur restr -&Kuitaat -600 -Diuz pep &tra -Diziuz pe tra -Lakaat an &diuzad war an tu gin -Diuz... -Diziuz... -Diuz diouzh ar rizh -Diziuz diouzh ar rizh -700 -Arlunioù &bras -Arlunioù &bihan -&Roll -&Munudoù -730 -Dirummet - -&2 brenestr -&Barrennoù ostilhoù -Digeriñ an teul gwrizienn -Teul kerent -Roll istor an teul... -Fresk&aat -750 -Barrenn ziell -Barrenn skouerek -Meudellioù bras -Diskouez an destenn -800 -&Ouzhpennañ ar c'havlec'h d'ar sinedoù -Sined -900 -&Dibaboù... -&Amprouiñ -960 -&Roll ar pennadoù... -A-&zivout 7-Zip... -1003 -Treug -Anv -Astenn -Teul -Ment -Gwasket -Doareennoù -Savet d'ar -Stoket d'ar -Kemmet d'ar -Solut -Evezhiadenn -Ennodet -Rannañ a-raok -Rannañ war-lerc'h -Geriadur -CRC -Rizh -Enep -Hentenn -OS ostiz -Reizhiad restroù -Implijour -Strollad -Bloc'h -Evezhiadenn -Lec'hiadur - - - - - - - - - - - - - - - - - - - - - - - - - -Fazi -Ment en holl -Egor vak -Ment ar c'hleusteurioù -Skritellig -Anv lec'hel -Pourchaser -2100 -Dibaboù -Yezh -Yezh : -Embanner -&Embanner : - -2200 -Reizhiad -Kenstagañ 7-Zip ouzh : -2301 -Lakaat 7-Zip el lañser kemperzhel -Lañser kemperzhel a-steud -Elfennoù al lañser kemperzhel : -2320 - - -Digeriñ -Eztennañ ar restroù... -Ouzhpennañ d'an diell... -Gwiriañ an diell -Eztennañ amañ -Eztennañ diwar {0} -Ouzhpennañ da {0} -Gwaskañ ha kas dre postel... -Gwaskañ diwar {0} ha kas dre postel. -2400 -Teulioù -Teulioù &labour -Teul dibadelus ar &reizhiad -Teul &red -Teul &spisaet : -Implijout nemet evit ar mediaoù dilec'hus -Spisait un teul evit lakaat ar restroù diell dibadelus. -2500 -Perzhioù -Diskouez an elfenn ".." -Diskouez arlunioù gwirion ar restroù -Diskouez al lañser reizhiad -&Diuz ar bannoù a-bezh -Diskouez al &linennoù kael - - - -2900 -Keloù -Digoust eo ar meziant 7-Zip. Mar plij deoc'h 7-zip ha mar fell deoc'h skoazellañ ar raktres-mañ e c'hellit donezoniñ argant da 7-Zip. -3000 - -N'eus fazi ebet -{0} elfenn ziuzet -N'haller ket sevel ar restr '{0}' -N'haller ket ober gant an oberiadennoù nevesaat evti an diell-mañ. - - - - -Kemmet ez eo bet ar restr '{0}'.\nHa fellout a ra deoc'h he nevesaat en diell ? -N'haller ket nevesaat\n'{0}' -N'haller ket loc'hañ an embanner. - - - - -Re a elfennoù -3300 -Eztennañ -O waskañ -Gwiriañ -O tigeriñ... - -3400 -Eztennañ -E&ztennañ diwar : -Dibabit un teul evit eztennañ an restroù. -3410 -Treugoù -Treugoù klok -Treug ebet -3420 -Mod erlec'hiañ -Goulenn a-raok erlec'hiañ -Erlec'hiañ hep goulenn -Lakaat ar restroù a zo anezho a-gostez -Adenvel ent-emgefre ar restroù a zo anezho - -3500 -Kadarnaat a-raok erlec'hiañ ur restr -Emañ dija ur restr gant ar memes anv en teul bukenn. -Ha fellout a ra deoc'h lakaat e-lec'h -ar restr da heul ? -{0} eizhtet -Adenvel ent-&emgefre -3700 -Hentenn waskañ direizh evit '{0}'. -Stlenn faziet e-barzh '{0}'. Gwastet eo ar restr. -Fazi ar reoliñ CRC evit '{0}'. Gwastet eo ar restr. - - -3800 -Roit ar ger-tremen -Roit ar ger-tremen : - -&Diskouez ar ger-tremen - - - -Ger-tremen -3900 -Amzer dremenet : -Amzer o chom : -Ment : -Tizh : - - -Fazioù : - -4000 -Ouzhpennañ d'an diell -&Diell : -&Mod nevesaat : -&Mentrezh an diell : -L&ive gwaskañ : -Rizh &gwaskañ: -&Ment ar geriadur : -Me&nt ar gerioù : - - -&Perzhioù: -&Dibaboù -Sevel un diell SF&X - - - -Ennodiñ an &anvioù restroù -Memor evit ar waskerezh : -Memor evit an diwaskerezh : -4050 -Gwaskañ ebet -Primañ -Prim -Reizh -Uhelañ -Gour -4060 -Ouzhpennañ hag erlec'hiañ ar restroù -Nevesaat hag ouzhpennañ ar restroù -Freskaat ar restroù a zo anezho -Goubredañ ar restroù -4070 -Furchal -An holl restroù - - -6000 -Kopiañ -Dilec'hiañ -Kopiañ e-barzh : -Dilec'hiañ diwar : -O kopiañ... -O tilec'hiañ... -Oc'h adenvel... - -N'haller ket ober an oberiadenn-mañ. -Fazi oc'h adenvel ar restr pe an teul - - -6100 -Kadarnañ a-raok dilemel ar restr -Kadarnañ a-raok dilemel an teul -Kadarnañ a-raok dilemel an holl restroù -Ha fellout a ra deoc'h dilemel '{0}' ? -Ha fellout a ra deoc'h dilemel an teul '{0}' ha pep tra a zo e-barzh ? -Ha fellout a ra deoc'h dilemel ar {0} elfenn-mañ ? -O tilemel... -Fazo o tilemel ar restr pe an teul - -6300 -Sevel un teul -Sevel ur restr -Anv an teul : -Anv restr : -Teul nevez -Restr nevez -Fazi o sevel an teul -Fazi o sevel ar restr -6400 -Evezhiadenn -&Evezhiadenn : -Diuz -Diziuz -Kuzh : -6600 - -Roll istor an teulioù -Kemennoù yalc'h -Kemenn -7100 -Urzhiataer -Rouedad - -Reizhiad -7200 -Ouzhpennañ -Eztennañ -Amprouiñ -Kopiañ -Dilec'hiañ -Dilemel -Keloù -7300 -Troc'hañ restr -&Troc'hañ da : -Troc'hañ e &levrennoù, eizhtetoù : -O troc'hañ... - - - - - -7400 -Kendeuziñ restroù -&Kendeuziñ da : -O kendeuziñ... - - - -7500 - - - - -7600 -Amprouiñ -Implij ar vemor : -Gwaskerezh -Diwaskerezh -Feur -Feur en holl -Red -Da heul - - -Tremenioù : diff --git a/Utils/7-Zip/Lang/ca.txt b/Utils/7-Zip/Lang/ca.txt deleted file mode 100644 index 767d93521..000000000 --- a/Utils/7-Zip/Lang/ca.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 9.07 : Josep Casals, Marc Folch -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Catalan -Català -401 -D'acord -Cancel.la - - - -&Sí -&No -Tan&ca -Ajuda - -&Continua -440 -Sí a &tot -No a t&ot -Atura -Reinicia -Rerefons -Primer pla -&Pausa -Aturat -Esteu segur que voleu cancel.lar? -500 -&Fitxer -&Edita -&Visualitza -&Preferits -E&ines -Aj&uda -540 -&Obre -Obre d&ins -Obre fora -&Visualitza -&Edita -Renom&ena -&Copia a... -&Moure a... -Suprimeix -&Divideix el fitxer... -Com&bina el fitxer... -P&ropietats -Come&ntari -Calcula el checksum -Diff -Crea carpeta -Crea fitxer -Surt -600 -Seleccion&a-ho tot -Deselecciona-ho tot -&Inverteix selecció -Selecciona... -Deselecciona... -Selecciona per tipus -Deselecciona per tipus -700 -Icones g&rans -Icones petites -&Llista -&Detalls -730 -No ordenat -Vista plana -&2 Taules -&Barres d'eines -Obre carpeta arrel -Carpeta pare -Historial de carpetes... -&Actualitza -750 -Barra d'eines afegeix/extreu -Barra d'eines estàndard -Botons grans -Mostra botons amb text -800 -&Afegeix la carpeta als Preferits com -Personal -900 -Opcions... -&Test de referència -960 -&Contingut... -Quant a 7-Zip... -1003 -Adreça -Nom -Tipus de fitxer -Carpeta -Mida -Mida comprimit -Atributs -Creat -Darrer accés -Darrera modificació -Compacte -Comentari -Xifrat -Expandit abans -Expandit després -Diccionari -CRC -Tipus -Anti -Mètode -SO orígen -Sistema de fitxers -Usuari -Grup -Bloc -Comentari -Posició -Path Prefix -Carpetes -Fitxers -Versió -Volum -Multivolum -Desplaçament -Enllaços -Blocs -Volums - -64-bits -Big-endian -CPU -Mida física -Mida capçaleres -Suma de verificació -Característiques -Adreça virtual -ID -Nom curt -Aplicació creadora -Mida del sector -Mode -Enllaç -Error -Mida total -Espai lliure -Mida sector -Etiqueta -Nom local -Proveïdor -2100 -Opcions -Llengua -Llengua: -Editor -&Editor: -&Diff: -2200 -Sistema -Associa 7-Zip amb: -2301 -Integra 7-Zip dins el menú contextual de Windows -Menú contextual en cascada -Objectes del menú contextual: -2320 - - -Obre -Extreu fitxers... -Afegeix al fitxer... -Comprova el fitxer -Extreu a aquesta carpeta -Extreu a {0} -Afegeix a {0} -Comprimeix i envia per correu electrònic... -Comprimeix a {0} i envia per correu electrònic -2400 -Carpetes -Carpeta de &treball -Carpeta temporal del &sistema -Carpeta a&ctual -E&specifica una carpeta: -Utilitza únicament per a discs extraïbles -Especifica una carpeta pels fitxers temporals. -2500 -Selecció -Mostra l'element ".." -Mostra icones reals dels fitxers -Mostra el menú de sistema -&Selecció de columna completa -Mostra les línies de &graella -Obre amb un sol clic els elements -Mode de selecció &alternatiu -Usa pàgines de memòria &grans -2900 -Informació sobre 7-Zip -7-Zip és programari lliure. De totes maneres, podeu col.laborar en el seu desenvolupament registrant el programa. -3000 -El sistema no pot assignar la quantitat de memòria requerida -No hi ha errors -{0} objecte(s) seleccionat(s) -No es pot crear la carpeta '{0}' -Aquest tipus de fitxer no permet actualització. -No es pot obrir el fitxe '{0}' com a arxiu -No es pot obrir el fitxer xifrat '{0}'. La contrasenya és incorrecta? -Tipus d'arxiu no admès -El fitxer {0} ja existeix -El fitxer '{0}' ha estat modificat.\nVoleu actualitzar-lo a l'arxiu? -No pot actualitzar-se el fitxer\n'{0}' -No pot executar-se l'editor. -El fitxer sembla un virus (el nom del fitxer conté espais molt llargs al nom). -L'operació no es pot cridar des d'una carpeta amb una ruta llarga. -Heu de seleccionar un fitxer -Heu de seleccionar un o més fitxers -Massa objectes -3300 -Extraient -Comprimint -Provant -Obrint... -Scanning... -3400 -Extreu -E&xtreu a: -Seleccioneu una destinació pels fitxers extrets. -3410 -Mode d'adreça -Adreça completa -Sense adreça -3420 -Sobreescriure -Amb confirmació -Sense confirmació -Conserva els fitxers ja existents -Reanomena automàticament -Auto-reanomena fitxers existents -3500 -Confirmeu substitució de fitxers -La carpeta de destí conté un fitxer amb el mateix nom. -Voleu substituir el fitxer existent -per aquest altre? -{0} bytes -Renomena a&utomàticament -3700 -Mètode de compressió no vàlid per a '{0}'. -Error de dades en '{0}'. El fitxer és corrupte. -CRC ha fallat en '{0}'. El fitxer és corrupte. -Error de dades al fitxer xifrat '{0}'. Contrasenya errònia? -CRC ha fallat al fitxer xifrat '{0}'. Contrasenya errònia? -3800 -Introduïu la contrasenya -Introduïu la contrasenya: -Torneu a introduir la contrasenya: -Mo&stra la contrasenya -Les contrasenyes no coincideixen -Utilitza només lletres (sense accents), números i caràcters especials (!, #, $, ...) a la contrasenya -La contrasenya és massa llarga -Contrasenya -3900 -Temps transcorregut: -Temps restant: -Mida: -Taxa: -Processat: -Ràtio de compressió: -Errors: -Arxius: -4000 -Afegir al fitxer -&Fitxer: -Mode d'act&ualització: -&Format del fitxer: -Nivell de &compressió: -&Tipus de compressió: -Mida del &diccionari: -Mida de la paraula: -Mida de bloc sòlid: -Nombre de fils de la CPU: -&Paràmetres: -Opcions -Crea fitxer SF&X -Comprimeix fitxers compartits -Xifrat -Mètode de xifrat: -Xifra el nom dels fitxers -Ús de memòria per comprimir: -Ús de memòria per descomprimir: -4050 -Sense compressió -Ràpida - -Normal -Màxima -Ultra -4060 -Afegeix i substitueix fitxers -Actualitza i afegeix fitxers -Actualitza fitxers ja presents -Sincronitza fitxers -4070 -Visualitza -Tots els fitxers -No sòlid -Sòlid -6000 -Copia -Mou -Copia a: -Mou a: -Copiant... -Movent... -Renomenant... -Seleccioneu una carpeta de destí. -Operació no permesa. -Error renomenant fitxer o carpeta -Confirmeu la còpia del fitxer -Esteu segur que voleu copiar els fitxers a l'arxiu -6100 -Confirmeu la supressió del fitxer -Confirmeu la supressió de la carpeta -Confirmeu supressió múltiple de fitxers -Esteu segur que voleu suprimir '{0}'? -Esteu segur que voleu suprimir la carpeta '{0}' i tot el seu contingut? -Esteu segur que voleu esborrar aquests {0} elements? -Suprimint... -Error esborrant fitxer o carpeta -El sistema no pot moure un fitxer amb una ruta llarga a la paperea de reciclatge -6300 -Crea carpeta -Crea arxiu -Nom de carpeta: -Nom d'arxiu: -Carpeta nova -Fitxer nou -Error creant carpeta -Error creant el fitxer -6400 -Comentari -&Comentari: -Selecciona -No selecciona -Màscara: -6600 -Properties -Historial de carpetes -Missatges de diagnosi -Missatge -7100 -El meu ordinador -Entorn de xarxa -Documents -Sistema -7200 -Afegeix -Extreu -Prova -Copia -Mou -Suprimeix -Info -7300 -Divideix fitxer -&Divideix a: -Divideix en &volums, bytes: -Dividint... -Confirmació de la divisió -Esteu segur que voleu dividir el fitxer en {0} volums? -La mida del volum ha de ser més petita que la mida del fitxer original -Mida del volum incorrecte -Mida de volum especificada: {0} bytes.\nEsteu segur que voleu dividir el fitxer en aquests volums? -7400 -Combina fitxers -&Combina a: -Combinant... -Seleccioneu només el primer fitxer -No es pot detectar un fitxer com a una part del fitxer dividit -No es pot trobar més d'una part del fitxer dividit -7500 -Calculant el checksum... -Informació del checksum -CRC checksum per les dades: -CRC checksum per les dades i els noms: -7600 -Test de referència -Ús de la memòria: -Comprimint -Decomprimint -Taxa -Taxa total -Actual -Resultant -Ús de la CPU -Taxa / Ús -Passades: diff --git a/Utils/7-Zip/Lang/co.txt b/Utils/7-Zip/Lang/co.txt deleted file mode 100644 index 4b05003b6..000000000 --- a/Utils/7-Zip/Lang/co.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; 15.00 : Patriccollu di Santa Maria è Sichè -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Corsican -Corsu -401 -OK -Abbandunà - - - -&Iè -I&nnò -&Chjode -Aiutu - -&Cuntinuà -440 -Iè per &Tutti -Innò per T&utti -Piantà -Riavvià -&Arci pianu -P&rimu pianu -&Pausa -In pausa -Site sicuru di vulè abbandunà ? -500 -&Schedariu -&Mudificà -&Affissà -&Favuriti -A&ttrezzi -A&iutu -540 -&Apre -Apre Den&tru -Apre F&ora -A&ffissà -&Mudificà -&Rinumà -&Cupià Ver Di... -&Dispiazzà Ver Di... -S&quassà -&Sparte u schedariu... -&Unisce i schedarii... -&Pruprietà -Cumme&ntu... -Calculà a somma di cuntrollu -Paragunà e sfarenze -Creà un Cartulare -Creà un Schedariu -&Esce -Leia -Flussi A<ernativi -600 -Selezziunà &Tuttu -Ùn selezziunà &Nunda -&Arritrusà a Selezzione -&Selezziunà... -Ùn selezziunà &micca... -Selezziunà da u Tipu -Ùn Selezziunà da u Tipu -700 -Icone &Maiò -Icone &Chjuche -&Lista -&Detaglii -730 -Non &Ordinatu -&Vista Sparta -&2 Finestre -&Barre d'Attrezzi -Apre u Cartulare di &Radica -Livellu &Superiore -Crunulugia di i Cartulari... -&Attualizà -Attualisazione Autumatica -750 -Barra d'Attrezzi d'Archiviu -Barra d'Attrezzi Classica -Buttoni Maiò -Affissà u Testu di i Buttoni -800 -&Aghjunghje u cartulare à i Favuriti cum'è -Indetta -900 -&Ozzioni... -&Sperimentu di pussibilità -960 -&Cuntenutu (in inglese)... -&Apprupositu di 7-Zip... -1003 -Passeghju -Nome -Estensione -Cartulare -Dimensione -Dimensione Cumpressa -Attributi -Creatu u -Accessu u -Mudificatu u -Solidu -Cummentatu -Cifratu -Frazziunà Nanzu -Frazziunà Dopu -Dizziunariu - -Tipu -Anti -Metoda -OS ospite -Sistema di Schedariu -Utilizatore -Gruppu -Bloccu -Cummentu -Pusizione -Prefissu di Passeghju -Cartulari -Schedarii -Versione -Vulume -Multi-Vulume -Offset -Leie -Blocchi -Vulumi - -64-bit -Big-endian -CPU -Dimensione Fisica -Dimensione di l'Intestature -Somma di cuntrollu -Caratteristiche -Indirizzu Virtuale -ID -Nome Cortu -Appiecazione d'Urigine -Dimensione di Settore -Modu -Leia Simbolica -Sbagliu -Dimensione Tutale -Spaziu Liberu -Dimensione di Cluster -Nome di Vulume -Nome Lucale -Furnidore -Sicurità NT -Flussu Alternativu -Ausiliaru -Squassatu -In Arburu - - -Tipu di Sbagliu -Sbaglii -Sbaglii -Avertimenti -Avertimentu -Flussi -Flussi Alternativi -Dimensione di i Flussi Alternativi -Dimensione Virtuale -Dimensione Senza Compressione -Dimensione Fisica Tutale -Indice di Vulume -SottuTipu -Cummentu Cortu -Pagina di Codice - - - -Dimensione di a Coda -Dimensione di u Mozzicone Incurpuratu -Leia -Leia Solida -iNode - -Lettura sola -2100 -Ozzioni -Lingua -Lingua : -Editore -&Editore : -Paragunà e sfarenze : -2200 -Sistema -Assucià 7-Zip cù : -Tutti l'utilizatori -2301 -Integrà 7-Zip à l'interfaccia cuntestuale -Interfaccia cuntestuale in cascata -Elementi di l'interfaccia cuntestuale : -Icone in l'interfaccia cuntestuale -2320 - - -Apre l'archiviu -Estrae i schedarii... -Aghjunghje à l'archiviu... -Verificà l'archiviu -Estrae Quì -Estrae ver di {0} -Aghjunghje à {0} -Cumprime è mandà da email... -Cumprime ver di {0} è mandà da email. -2400 -Cartulari -Cartulare di &travagliu -Cartulare timpurariu di &sistema -&Currente -&Specificatu : -Impiegà solu per i dischi amuvibili -Specificate un cartulare per i schedarii timpurarii d'archiviu. -2500 -Preferenze -Affissà l'elementu ".." -Affissà e vere icone di i schedarii -Affissà l'interfaccia sistema -Selezziunà tutta a linea -Affissà linee &quadrittate -Cliccu unicu per apre un elementu -Modu di selezzione &alternativa -Impiegà pagine maiò di memoria -2900 -Apprupositu di 7-Zip -7-Zip hè un prugramma liberu.\n\nTraduttu in lingua corsa da Patriccollu di Santa Maria è Sichè. -3000 -U sistema ùn pò micca attribuisce a quantità richiesta di memoria -Ùn ci hè micca sbagliu -{0} ughjettu(i) selezziunatu(i) -U cartulare '{0}' ùn pò micca esse creatu -L'azzioni di mudificazione ùn sò micca pussibule per quessu archiviu. -U schedariu '{0}' ùn pò micca esse apertu cum'è un archiviu -L'archiviu cifratu '{0}' ùn pò micca esse apertu. Parolla d'intrata falsa ? -Stu tipu d'archiviu ùn hè micca accettatu -U schedariu {0} esiste dighjà -U schedariu '{0}' hè statu mudificatu.\nVulete cambiallu in l'archiviu ? -Ùn hè micca pussibule di cambià u schedariu\n'{0}' -Ùn hè micca pussibule d'avvià l'editore. -U schedariu hè podasse infettatu da un virus (u so nome cuntene spazii numerosi). -St'azzione ùn pò micca fassi dapoi un cartulare cù u nome di passeghju cusì longu. -Ci vole à selezziunà un schedariu -Ci vole à selezziunà al menu un schedariu -Troppu elementi -Ùn hè micca pussibule d'apre u schedariu cum'è un archiviu {0} -U schedariu hè apertu cum'è un archiviu {0} -L'archiviu hè apertu cù offset -3300 -Estrazzione -Cumpressione -Verificazione -Apertura... -Esplurazione... -Cacciatura -3320 -Aghjuntu -Mudificazione -Analisa -Riproduzzione -Rimballasgiu -Tralasciamentu -Squassatura -Creazione di l'intestatura in corsu -3400 -Estrae -E&strae ver di : -Sciglite un cartulare per l'estrazzione di i schedarii. -3410 -Modu di passeghju : -Nomi cumpletti di passeghju -Alcunu nome di passeghju -Nomi assuluti di passeghju -Nomi relativi di passeghju -3420 -Modu di rimpiazzamentu : -Cunfirmà nanzu di rimpiazzà -Rimpiazzà senza dumandà -Ignurà i schedarii esistenti -Rinumà autumaticamente -Rinumà autumaticamente i schedarii esistenti -3430 -Ùn cupià micca u cartulare di radica -Risturà a sicurità di i schedarii -3500 -Cunfirmà u Rimpiazzamentu di Schedariu -U cartulare di distinazione cuntene dighjà un schedariu cù stu nome. -Vulete rimpiazzà u schedariu esistentu -cù quessu ? -{0} ottetti -Rinumà &Autumaticamente -3700 -Metoda di cumpressione micca accettatu per '{0}'. -Sbagliu di dati in '{0}'. U schedariu hè alteratu. -Fiascu di l'ispezzione CRC per u schedariu '{0}'. U schedariu hè alteratu. -Sbagliu di dati in u schedariu cifratu '{0}'. Parolla d'intrata falsa ? -Fiascu di l'ispezzione CRC per u schedariu cifratu '{0}'. Parolla d'intrata falsa ? -3710 -Parolla d'intrata falsa ? -3721 -Metoda di compressione micca accettatu -Sbagliu di dati -Fiascu di CRC -Dati micca dispunibule -Fine inaspettata di dati -Ci hè d'altri dati dopu à a fine di i dati ghjuvevule -Ùn hè un archiviu -Sbagliu d'Intestature -Parolla d'intrata falsa -3763 -Principiu di l'archiviu micca dispunibule -Principiu di l'archiviu micca confirmatu - - - -Funzione micca accettata -3800 -Scrivite a parolla d'intrata -Scrivite a parolla d'intrata : -Scrivite torna a parolla d'intrata : -&Affissà a parolla d'intrata -E parolle d'intrata sò sfarente -Per a parolla d'intrata, pudete impiegà solu : lettere senza aletta, cifri è segni particulari (!, #, $, ...) -A parolla d'intrata hè troppu longa -Parolla d'intrata -3900 -Tempu passatu : -Tempu rimanentu : -Dimensione tutale : -Celerità : -Prucessu : -Reditu di cumpressione : -Sbaglii : -Archivii : -4000 -Aghjunghje à l'archiviu -&Archiviu : -Modu di m&udificazione : -&Forma d'archiviu : -&Livellu de cumpressione : -&Metoda di cumpressione : -&Dimensione di u dizziunariu : -Dimensione di &e parolle : -Dimensione di u bloccu solidu : -Numeru di flussi CPU : -&Parametri : -Ozzioni -Creà un archiviu SF&X -Cumprime schedarii sparti -Cifratura -Metoda di cifratura : -Cifrà i &nomi di schedariu -Memoria impiegata da a Cumpressione : -Memoria impiegata da a Scumpressione : -Squassà i schedarii dopu à a cumpressione -4040 -Cunservà e leie simboliche -Cunservà e leie solide -Cunservà i flussi di dati alternativi -Cunservà a sicurità di i schedarii -4050 -Alcuna -A più rapida -Rapida -Nurmale -Massima -Ultra -4060 -Aghjunghje è rimpiazzà i schedarii -Mudificà è aghjunghje i schedarii -Attualizà i schedarii esistenti -Sincrunizà i schedarii -4070 -Sfuglià -Tutti i Schedarii -Non-solidu -Solidu -6000 -Cupià -Dispiazzà -Cupià ver di : -Dispiazzà ver di : -Copia in corsu... -Dispiazzamentu in corsu... -Cambiamentu di nome in corsu... -Selezziunà u cartulare di distinazione. -St'azzione ùn hè micca accettata per stu cartulare. -Sbagliu durante u Cambiu di Nome di Schedariu o di Cartulare -Cunfirmazione di a Copia di Schedariu -Site sicuru di vulè cupià u(i) schedariu(i) ver di l'archiviu -6100 -Cunfirmà a Squassatura di u Schedariu -Cunfirmà a Squassatura di u Cartulare -Cunfirmà a Squassatura di Schedarii Multiplice -Site sicuru di vulè squassà '{0}' ? -Site sicuru di vulè squassà u cartulare '{0}' è tuttu u so cuntenutu ? -Site sicuru di vulè squassà sti {0} elementi ? -Squassatura in corsu... -Sbagliu durante a Squassatura di Schedariu o di Cartulare -U sistema ùn pò micca mette à a Rumenzula un schedariu cù u nome di passeghju cusì longu -6300 -Creà un Cartulare -Creà un Schedariu -Nome di cartulare : -Nome di schedariu : -Novu Cartulare -Novu Schedariu -Sbagliu durante a Creazione di Cartulare -Sbagliu durante a Creazione di Schedariu -6400 -Cummentu -&Cummentu : -Selezziunà -Ùn Selezziunà -Filtru : -6600 -Pruprietà -Crunulugia di i Cartulari -Messaghji di diagnosticu -Messaghju -7100 -Urdinatore -Reta -Ducumenti -Sistema -7200 -Aghjunghje -Estrae -Verificà -Cupià -Dispiazzà -Squassà -Infurmazione -7300 -Sparte u schedariu -&Sparte in : -Sparte in &vulumi, ottetti : -Spartimentu... -Cunfirmà u Spartimentu -Site sicuru di vulè sparte u schedariu in {0} vulumi ? -A dimensione di u vulume deve esse più chjucu chì u schedariu d'urighjine -Dimensione di vulume falsa -Dimensione di vulume specificata : {0} ottetti.\nSite sicuru di vulè taglià l'archiviu in tali vulumi ? -7400 -Unisce i Schedarii -&Unisce in : -Unione... -Selezziunà solu a prima parte di l'archiviu spartutu -Ùn si trova alcuna parte d'archiviu spartutu -Ùn si trova micca più d'una parte d'archiviu spartutu -7500 -Calculu di a somma di cuntrollu... -Infurmazione nant'à a somma di cuntrollu -Somma di cuntrollu CRC per i dati : -Somma di cuntrollu CRC per i dati è i nomi : -7600 -Sperimentu di pussibilità -Memoria impiegata : -Cumpressione -Scumpressione -Percentuale -Percentuale tutale -Attuale -Risultante -Impiegu CPU -Estimatu / Impiegatu -Passagi : -7700 -Leia -Ligà -Leia d'urigine : -Leia di distinazione : -7710 -Tipu di Leia -Leia Solida -Leia Simbolica di Schedariu -Leia Simbolica di Cartulare -Unione di Cartulare diff --git a/Utils/7-Zip/Lang/cs.txt b/Utils/7-Zip/Lang/cs.txt deleted file mode 100644 index 8eb5a2a3d..000000000 --- a/Utils/7-Zip/Lang/cs.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.30 : Milan Hrubý -; 4.33 : Michal Molhanec -; 9.07 : Jiří Malák -; -; -; -; -; -; -; -; -0 -7-Zip -Czech -Čeština -401 -OK -Storno - - - -&Ano -&Ne -Zavří&t -Nápověda - -Po&kračovat -440 -Ano na &všechno -N&e na všechno -Zastavit -Spustit znovu -&Pozadí -P&opředí -Po&zastavit -Pozastaveno -Jste si jistí, že to chcete stornovat? -500 -&Soubor -Úpr&avy -&Zobrazení -&Oblíbené -&Nástroje -Nápo&věda -540 -&Otevřít -Otevřít u&vnitř -Otevřít &mimo -&Zobrazit -&Upravit -&Přejmenovat -Kopírovat &do... -Př&esunout do... -Vymaza&t -&Rozdělit soubor... -&Sloučit soubory... -Vlast&nosti -Poznámk&a -Vypočítat kontrolní součet -Porovnat soubory -Vytvořit složku -Vytvořit soubor -&Konec -600 -Vybrat &vše -Zrušit výběr vše -&Invertovat výběr -Vybrat... -Zrušit výběr... -Vybrat podle typu -Zrušit výběr podle typu -700 -&Velké ikony -&Malé ikony -&Seznam -&Podrobnosti -730 -&Bez třídění -"Ploché" zobrazení -&2 panely -Nástrojové lišty -Otevřít kořenovou složku -O úroveň výš -Historie složek... -&Obnovit -750 -Archivační lišta -Standardní lišta -Velká tlačítka -Zobrazovat text tlačítek -800 -&Přidat složku do oblíbených jako -Záložka -900 -&Možnosti... -&Zkouška výkonu -960 -&Obsah... -O progr&amu 7-Zip... -1003 -Cesta -Název -Přípona -Složka -Velikost -Komprimovaná velikost -Atributy -Vytvořen -Použit -Změněn -Pevný -S poznámkou -Zakódovaný -Rozdělen do -Rozdělen od -Slovník -CRC -Typ -Anti -Metoda -Hostitelský OS -Souborový systém -Uživatel -Skupina -Blok -Poznámka -Pozice -Cesta -Složky -Soubory -Verze -Díl -Vícedílný -Offset -Odkazy -Bloků -Dílů - -64-bit -Big-endian -Pocesor -Fyzická velikost -Velikost hlaviček -Kontrolní součet -Charakteristiky -Virtuální adresa -ID -Krátké jméno -Autor -Velikost sektoru -Režim -Odkaz -Chyba -Celková velikost -Volné místo -Velikost clusteru -Označení -Místní název -Poskytovatel -2100 -Možnosti -Jazyk -Jazyk: -Editor -&Editor: -Program pro &porovnání souborů: -2200 -Systém -Asociovat 7-Zip s: -2301 -&Integrovat 7-Zip do kontextového menu -S&tupňovité kontextové menu -&Položky kontextového menu: -2320 - - -Otevřít -Rozbalit soubory... -Přidat do archivu... -Zkontrolovat archiv -Rozbalit zde -Rozbalit do {0} -Přidat do {0} -Zkomprimovat a odeslat poštou... -Zkomprimovat do {0} a odeslat poštou -2400 -Složky -Pracovní složka -&Systémová složka pro dočasné soubory -&Aktuální -S&ložka: -&Používat pouze pro vyjímatelné disky -Vyberte umístění pro dočasné komprimované soubory. -2500 -Nastavení -Zobrazovat položku ".." -Zobrazovat skutečnou ikonu souboru -Zobrazovat systémové menu -&Vybírat celý řádek -Zobrazovat &mřížku -Otevřít položku jedním kliknutím -&Alternativní způsob výběru -&Používat velké stránky paměti -2900 -O programu 7-Zip -7-Zip je svobodný software. Nicméně můžete podpořit jeho vývoj registrací. -3000 -Systém nemůže přidělit požadovanou velikost paměti -Nedošlo k žádným chybám -vybráno {0} objekt(ů) -Nelze vytvořit složku '{0}' -Aktualizace není podporována pro tento archiv. -Soubor '{0}' nelze otevřít jako archiv -Zakódovaný archiv '{0}' nelze otevřít. Špatné heslo? -Nepodporovaný typ archivu -Soubor {0} již existuje -Soubor '{0}' byl změněn.\nChcete ho aktualizovat v archivu? -Nelze aktualizovat soubor\n'{0}' -Editor nelze spustit. -Soubor se jeví jako virus (ve jménu souboru jsou dlouhé mezery). -Operace nemůže být provedena ze složky s dlouhou cestou. -Musíte vybrat jeden soubor -Musíte vybrat jeden nebo více souborů -Příliš mnoho položek -3300 -Rozbalování -Komprimování -Konrola -Otevírání... -Prohledávání... -3400 -Rozbalit -&Rozbalit do: -Vyberte umístění pro rozbalené soubory. -3410 -Cesty -Plné cesty -Bez cesty -3420 -Způsob přepisování -Zeptat se před přepisem -Přepsat bez výzvy -Přeskočit existující soubory -Automatické přejmenování -Automatické přejmenování existujících souborů -3500 -Potvrzení nahrazení souboru -Cílová složka již obsahuje zpracovaný soubor. -Chcete nahradit existující soubor -tímto? -{0} bajtů -A&utomaticky přejmenovat -3700 -Nepodporovaná komprimační metoda pro '{0}'. -Chyba dat v '{0}'. Soubor je poškozený. -Chyba CRC v '{0}'. Soubor je poškozený. -Chyba dat v zakódovaném souboru '{0}'. Chybné heslo? -Chyba CRC v zakódovaném souboru '{0}'. Chybné heslo? -3800 -Vložit heslo -Vložit heslo: -Potvrzení hesla: -Zobrazit he&slo -Heslo nesouhlasí -Pro heslo použíjte pouze anglická písmena, číslice a speciální znaky (!, #, $, ...) -Heslo je příliš dlouhé -Heslo -3900 -Uplynulý čas: -Zbývající čas: -Celková velikost: -Rychlost: -Zpracováno: -Komprimační poměr: -Chyb: -Archívy: -4000 -Přidat do archivu -&Archiv: -Způsob aktualizace: -&Formát archivu: -Ú&roveň komprese: -&Komprimační metoda: -Ve&likost slovníku: -V&elikost slova: -Velikost bloku: -Počet vláken procesoru: -&Parametry: -Možnosti -Vytvořit SF&X archiv -Zkomprimovat otevřené soubory -Zakódování -Metoda zakódování: -Zakódovat &názvy souborů -Spotřeba paměti pro zabalení: -Spotřeba paměti pro rozbalení: -4050 -Skladovací -Nejrychlejší -Rychlá -Normální -Maximální -Ultra -4060 -Přidat a nahradit soubory -Aktualizovat a přidat soubory -Aktualizovat existující soubory -Synchronizovat soubory -4070 -Procházet -Všechny soubory -Podle velikosti souboru -Pevný -6000 -Kopírovat -Přesunout -Kopírovat do: -Přesunout do: -Kopírování... -Přesouvání... -Přejmenování... -Vyberte cílovou složku. -Operace není podporována. -Chyba při přejmenování souboru nebo složky -Potvrzení kopírování souborů -Jste si jistí, že chcete zkopírovat soubory do archivu -6100 -Potvrdit vymazání souboru -Potvrdit vymazání složky -Potvrdit mnohonásobné vymazání souboru -Jste si jistí, že chcete vymazat '{0}'? -Jste si jistí, že chcete vymazat složku '{0}' a všechno co obsahuje? -Jste si jistí, že chcete vymazat tyto {0} položky? -Mazání... -Chyba při mazání souboru nebo složky -Systém nepodporuje přesun soubor s dlouhou cestou do Odpadkového koše -6300 -Vytvořit složku -Vytvořit soubor -Název složky: -Název souboru: -Nová složka -Nový soubor -Chyba při vytváření složky -Chyba při vytváření souboru -6400 -Poznámka -&Poznámka: -Vybrat -Zrušit výběr -Maska: -6600 -Vlastnosti -Historie složek -Diagnostické zprávy -Zpráva -7100 -Počítač -Síť -Dokumenty -Systém -7200 -Přidat -Rozbalit -Zkontrolovat -Kopírovat -Přesunout -Vymazat -Informace -7300 -Rozdělit soubor -Rozdělit do: -Rozdělit na díly, bajtů: -Rozdělování... -Potvrdit rozdělování -Jste si jistí, že chcete rozdělit soubor na {0} dílů? -Velikost dílu musí být menší než velikost původního souboru -Nesprávná velikost dílu -Zadaná velikost dílu: {0} bytů.\nJste si jistí, že chcete rozdělit archiv do takových dílů? -7400 -Sloučit soubory -Sloučit do: -Slučování... -Musí se vybrat pouze první díl rozděleného soubor -Nepodařilo se rozpoznat rozdělený soubor -Nepodařilo se nalézt více než jeden díl rozděleného souboru -7500 -Vypočítávání kontrolního součtu... -Informace o kontrolním součtu -CRC kontrolní součet pro data: -CRC kontrolní součet pro data a jména: -7600 -Zkouška výkonu -Spotřeba paměti: -Komprimování -Rozbalování -Výkon -Celkový výkon -Aktuální -Výsledné -Využití procesoru -Výkon / Využití -Průchodů: diff --git a/Utils/7-Zip/Lang/cy.txt b/Utils/7-Zip/Lang/cy.txt deleted file mode 100644 index 38be91b3b..000000000 --- a/Utils/7-Zip/Lang/cy.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.37 : Owain Lewis -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Welsh -Cymraeg -401 -Iawn -Canslo - - - -&Iawn -&Na -&Cau -Cymorth - -P&arhau -440 -Iawn i'r &Cwbwl -Na i'r C&wbwl -Stopio -Ailgychwyn -&Cefndir -&Blaendir -&Pwyllo -Pwyllo -Ydych chi am canslo? -500 -&Ffeil -&Golygu -Gwe&ld -Ff&efrynnau -&Offer -&Cymorth -540 -&Agor -Agor tu &Mewn -Agor tu &Fas -Gwe&ld -&Golygu -A&ilenwi -&Copïo i... -&Symud i... -&Dileu -&Hollti ffeil... -Cy&funo ffeilau... -&Priodweddau -Syl&wad -Cyfrifo swm-gwirio - -Creu Ffolder -Creu Ffeil -Alla&n -600 -Dewis y C&yfan -Dad-ddewis y Cyfan -Gwrt&hdroi'r Dewis -Dewis... -Dad-ddewis... -Dewis trwy Math -Dad-ddewis trwy Math -700 -Eiconau &Mawr -Eiconau &Bach -&Rhestr -Ma&nylion -730 -Dad-dosbarthu -Golwg Flat -&2 Paneli -Bariau &Offer -Agor Ffolder Gwraidd -Lan Un Lefel -Hanes Ffolderi... -&Adnewyddu -750 -Bar Offer Archif -Bar Offer Arferol -Botwmau Fawr -Dangos Testun Botwmau -800 -&Ychwanegu ffolder i Ffefrynnau fel -Llyfrnod -900 -&Dewisiadau... -&Meincnod -960 -&Cynnwys... -&Manylion 7-Zip... -1003 -Llwybr -Enw -Estyniad -Ffolder -Maint -Maint wedi'i Cywasgu -Priodweddau -Crëwyd -Cyrchwyd -Addaswyd -Solet -Sylwad -Amgryptio -Hollti Cyn -Hollti ar Ôl -Geiriadur -CRC -Math -Anti -Dull -SW Cynnal -System Ffeiliau -Ddefnyddiwr -Grŵp -Bloc -Sylwad -Safle -Rhagddodiad y Llwybr - - - - - - - - - - - - - - - - - - - - - - - - -Gwall -Cyfanswm Maint -Lle Rhydd -Maint Clwstwr -Label -Enw Lleol -Darparwr -2100 -Dewisiadau -Iaith -Iaith: -Golygydd -&Golygydd: - -2200 -System -Cysylltu 7-Zip gyda: -2301 -Cyfuno 7-Zip mewn i dewislen cyd-destun y cribyn -Dewislen cyd-destun wedi'i rhaeadru -Eitemau dewislen cyd-destun: -2320 - - -Agor archif -Echdynnu ffeiliau... -Ychwanegu i'r archif... -Profi archif -Echdynnu Yma -Echdynnu i {0} -Ychwanegu i {0} -Cywasgu ac e-bostio... -Cywasgu i {0} ac e-bostio -2400 -Ffolderi -Ffolder &gweithio -Ffolder tymor byr y &system -&Cyfredol -&Penodol: -Defnyddiwch am gyriant symudadwy yn unig -Nodwch lleoliad am ffeiliau archif tymor byr. -2500 -Gosodiadau -Dangos eitem ".." -Dangos eicon ffeil go iawn -Dangos dewislen y system -Dethol &holl rhes -Dangos llinellau &grid - -Modd dethol &arallddewisiol -Defnyddiwch tudalenau cof &mawr -2900 -Manylion 7-Zip -Mae 7-Zip yn meddalwedd am ddim. Ond, gallwch cefnogi y \ndatblygiad o 7-Zip trwy cofrestru. -3000 - -Mae na ddim wallau -{0} gwrthrych(au) dethol -Ddim yn gallu creu y ffolder '{0}' -Mae gweithrediadau diweddaru ddim yn ateg am yr archif hyn. - - - - -Roedd ffeil '{0}' wedi'i addasu.\nWyt ti moen ei diweddaru yn yr \narchif? -Ddim yn gallu diweddaru ffeil\n'{0}' -Ddim yn gallu dechrau golygydd. - - - - -Gormod o eitemau -3300 -Echdynnu -Cywasgu -Ymbrofi -Agor... -Sganio... -3400 -Echdynnu -E&chdynnu i: -Nodwch lleoliad am echdynnu ffeiliau. -3410 -Modd llwybr -Enwau llwybr llawn -Dim enwau llwybr -3420 -Modd disodli -Gofyn cyn disodli -Disodli heb awgrymeb -Crychneidio ffeiliau presennol -Ailenwu yn awtomatig -Ailenwu ffeiliau presennol yn awtomatig -3500 -Cadarnhau Disodli Ffeil -Mae'r ffolder hon eisioes yn cynnwys y ffeil cyrchfan. -Hoffech chi ddisodli'r ffeil sy'n bodoli eisioes -Gyda hon? -{0} beit -Ailenwi A&wtomatig -3700 -Modd cywasgu ddim yn dilys am '{0}'. -Gwall data mewn '{0}'. Ffeil wedi'i torri. -CRC wedi'i methu mewn '{0}'. Ffeil wedi'i torri. - - -3800 -Mewnbynnwch cyfrinair -Mewnbynnwch cyfrinair: - -&Dangos cyfrinair - - - -Cyfrinair -3900 -Wedi treiglo: -Amser a'r ôl: -Maint: -Cyflymder: - - -Gwallau: - -4000 -Ychwanegu i'r archif -&Archif: -Modd &diweddaru: -&Fformat yr archif: -&Lefel cywasgu: -Dull &cywasgu: -Maint &geiriadur: -Maint geiria&u: - - -&Paramedrau: -Dewisiadau -Creu archif SF&X - - - -Amgryptio &enwau ffeiliau -Defnydd cof am Cywasgu: -Defnydd cof am Datgywasgu: -4050 -Storio -Cyflymach -Cyflum -Arferol -Uchafswm -Ultra -4060 -Ychwanegu ac amnewid ffeiliau -Diweddaru ac ychwanegu ffeiliau -Adnewyddu y ffeiliau presennol -Cyfamseru ffeiliau -4070 -Pori -Pob Ffeil - - -6000 -Copïo -Symud -Copïo i: -Symud i: -Copïo... -Symud... -Ailenwi... - -Mae'r gweithrediad ddim wedi'i ategu. -Gwall wrth Ailenwi Ffeil neu Ffolder -Cadarnhau Copi Ffeil -Ydych chi'n siŵr eich bod am copïo'r ffeiliau i'r archif -6100 -Cadarnhau Dileu Ffeil -Cadarnhau Dileu Ffolder -Cadarnhau Dileu Ffeiliau Amryfal -Ydych chi'n siŵr eich bod am dileu '{0}'? -Ydych chi'n siŵr eich bod am dileu y ffolder '{0}' ac ei holl \ncynnwys? -Ydych chi'n siŵr eich bod am dileu yr eitemau hyn {0}? -Dileu... -Gwall Dileu Ffeil neu Ffolder - -6300 -Creu Ffolder -Creu Ffeil -Enw Ffolder: -Enw Ffeil: -Ffolder Newydd -Ffeil Newydd -Gwall wrth Creu Ffolder -Gwall wrth Creu Ffeil -6400 -Sylwad -&Sylwad: -Dewis -Dad-ddewis -Mwgwd: -6600 - -Hanes Ffolderi -Neges diagnostig -Neges -7100 -Cyfrifiadur -Rhyngrwyd - -System -7200 -Ychwanegu -Echdynnu -Profi -Copïo -Symud -Dileu -Gwybodaeth -7300 -Hollti Ffeil -&Hollti i: -Hollti i &cyfeintiau, beitiau: -Hollti... - - - - - -7400 -Cyfuno Ffeiliau -&Cyfuno i: -Cyfuno... - - - -7500 -Cyfrifo swm-gwirio... -Gwybodaeth swm-gwirio -Swm-gwirio CRC am data: -Swm-gwirio CRC am data ac enwau: -7600 -Meincnod -Defnyddiad cof: -Cywasgu -Datgywasgu -Amcangyfrif -Amcangyfrif llwyr -Presennol -Canlyniad - - -Pasio: diff --git a/Utils/7-Zip/Lang/da.txt b/Utils/7-Zip/Lang/da.txt deleted file mode 100644 index 563b1978a..000000000 --- a/Utils/7-Zip/Lang/da.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; : Jakob Schmidt -; 9.07 : Kian Andersen, Jørgen Rasmussen -; 15.00 : 2016-08-19 : scootergrisen -; -; -; -; -; -; -; -; -0 -7-Zip -Danish -Dansk -401 -OK -Annuller - - - -&Ja -&Nej -&Luk -Hjælp - -&Fortsæt -440 -Ja til &alle -Nej til a&lle -Stop -Genstart -&Baggrund -&Forgrund -&Pause -Pauset -Er du sikker på, at du vil annullere? -500 -&Filer -R&ediger -&Vis -F&avoritter -Funk&tioner -&Hjælp -540 -&Åbn -Åbn &inden i -Åbn &uden for -&Vis -&Rediger -O&mdøb -&Kopier til... -&Flyt til... -S&let -&Opdel fil... -Kom&biner filer... -&Egenskaber -Komme&ntar... -Udregn checksum -Sammenlign -Opret mappe -Opret fil -&Afslut -Opret/rediger henvisning -&Alternative strømme -600 -Vælg &alle -Fravælg alle -&Omvendt markering -Vælg... -Fravælg... -Vælg efter type -Fravælg efter type -700 -Sto&re ikoner -S&må ikoner -&Liste -&Detaljer -730 -Usorteret -Flad visning -&2 paneler -&Værktøjslinjer -Åbn rodmappe -Et niveau op -Mappehistorik... -&Opdater -Opdater automatisk -750 -Arkivlinje -Standardlinje -Store knapper -Vis knappernes tekst -800 -&Føj mappe til Favoritter som -Bogmærke -900 -&Funktioner... -&Benchmark -960 -&Indhold... -&Om 7-Zip... -1003 -Sti -Navn -Filtype -Mappe -Størrelse -Pakket størrelse -Attributter -Oprettet -Åbnet -Ændret -Solid -Kommenteret -Krypteret -Opdel før -Opdel efter -Leksikon - -Type -Anti -Metode -Vært OS -Filsystem -Bruger -Gruppe -Blok -Kommentar -Placering -Sti præfiks -Mapper -Filer -Version -Bind -Flerbindsarkiv -Forskydning -Henvisning -Blokke -Bind - -64-bit -Big-endian -CPU -Fysisk størrelse -Hovedernes størrelse -Checksum -Karakteristika -Virtuel adresse -ID -Kort navn -Oprettende program -Sektorstørrelse -Tilstand -Symbolsk henvisning -Fejl -Samlet størrelse -Fri plads -Klyngestørrelse -Etiket -Lokalt navn -Udbyder -NT Security -Alternativ strøm -Aux -Slettet -Er træ - - -Fejltype -Fejl -Fejl -Advarsler -Advarsel -Strømme -Alternative strømme -Størrelse på alternative strømme -Virtuel størrelse -Udpakket størrelse -Samlet fysiske størrelse -Bind-indeks -Undertype -Kort kommentar -Tegnsæt - - - -Halestørrelse -Indlejret stumpstørrelse -Henvisning -Fast henvisning -iNode - -Skrivebeskyttet -2100 -Funktioner -Sprog -Sprog: -Redigering -&Rediger: -&Sammenlign: -2200 -System -Knyt 7-Zip til: -Alle brugere -2301 -Vis i Windows genvejsmenu -Brug undermenu -Punkter i genvejsmenu: -Ikoner i genvejsmenu -2320 - - -Åbn arkiv -Udpak filer... -Føj til arkiv... -Test arkiv -Udpak her -Udpak til {0} -Føj til {0} -Komprimer og vedhæft i e-mail... -Komprimer til {0} og vedhæft i e-mail -2400 -Mapper -&Arbejdsmappe -&Systemets midlertidige mappe -&Aktuelle -&Brugerdefineret: -Brug kun til flytbare drev -Angiv en placering til midlertidige arkivfiler. -2500 -Indstillinger -Vis ".."-element -Vis rigtige filikoner -Vis systemmenu -&Marker hele rækken -Vis &gitter -Åbn element med ét klik -&Alternativ markeringsmetode -Brug &store hukommelsessider -2900 -Om 7-Zip -7-Zip er fri software -3000 -Systemet kan ikke tildele den nødvendige mængde hukommelse -Der er ingen fejl -{0} markerede element(er) -Kan ikke oprette mappen "{0}" -Arkivet understøtter ikke opdateringshandlinger. -Kan ikke åbne filen "{0}" som arkiv -Kan ikke åbne det krypterede arkiv "{0}". Forkert adgangskode? -Arkivtypen er ikke understøttet -Filen {0} findes allerede -Filen "{0}" er blevet ændret.\nVil du opdatere den i arkivet? -Kan ikke opdatere filen\n"{0}" -Kan ikke starte redigering. -Filen ligner en virus (filnavnet indeholder lange mellemrum i navn). -Handlingen kan ikke kaldes fra en mappe som har en lang sti. -Du skal vælge en fil -Du skal vælge en eller flere filer -For mange elementer -Kan ikke åbne filen som {0}-arkiv -Filen er åbnet som {0}-arkiv -Arkivet er åbnet med forskydning -3300 -Udpakker -Komprimerer -Tester -Åbner... -Skanner... -Fjerner -3320 -Tilføjer -Opdaterer -Analyserer -Replikerer -Ompakker -Springer over -Sletter -Opretter hovede -3400 -Udpak -U&dpak til: -Angiv en placering til udpakkede filer. -3410 -Stitilstand: -Fulde stinavne -Ingen stinavne -Absolutte stinavne -Relative stinavne -3420 -Overskrivningstilstand: -Spørg før overskrivning -Overskriv uden at spørge -Spring eksisterende filer over -Automatisk omdøbning -Automatisk omdøbning af eksisterende filer -3430 -Forhindr duplikering af rodmappe -Genskab filsikkerhed -3500 -Bekræft filerstatning -Destinationsmappen indeholder allerede behandlet fil. -Vil du erstatte den eksisterende fil -med denne? -{0} byte -A&utomatisk omdøbning -3700 -Komprimeringsmetode for "{0}" er ikke understøttet. -Datafejl i "{0}". Filen er ødelagt. -CRC mislykkedes i "{0}". Filen er ødelagt. -Datafejl i den krypterede fil "{0}". Forkert adgangskode? -CRC mislykkedes i den krypterede fil "{0}". Forkert adgangskode? -3710 -Forkert adgangskode? -3721 -Komprimeringsmetoden er ikke understøttet -Datafejl -CRC mislykkedes -Utilgængelig data -Uventet slutning på data -Der er data efter slutningen af nyttedataene -Ikke et arkiv -Fejl i hoveder -Forkert adgangskode -3763 -Utilgængelig begyndelse på arkiv -Ubekræftet begyndelse på arkiv - - - -Faciliteten understøttes ikke -3800 -Indtast adgangskode -Indtast adgangskode: -Indtast adgangskode igen: -&Vis adgangskode -Adgangskoderne er ikke ens -Brug kun engelske bogstaver, numre og specialtegn (!, #, $, ...) til adgangskoden -Adgangskoden er for lang -Adgangskode -3900 -Forløbet tid: -Resterende tid: -Samlet størrelse: -Hastighed: -Behandlet: -Komprimeringsforhold: -Fejl: -Arkiver: -4000 -Føj til arkiv -&Arkiv: -O&pdateringstilstand: -Arkiv&format: -Komprimerings&niveau: -Komprimerings&metode: -Størrelse på or&dbog: -Størrelse på &ord: -Størrelse på solid blok: -Antal CPU-tråde: -Pa&rametre: -Funktioner -Opret SF&X-arkiv -Komprimer delte filer -Kryptering -Krypteringsmetode: -Kr&ypter filnavne -Hukommelsesforbrug ved komprimering: -Hukommelsesforbrug ved udpakning: -Slet filer efter komprimering -4040 -Gem symbolske henvisninger -Gem hårde henvisninger -Gem alternative datastrømme -Gem filsikkerhed -4050 -Gem -Hurtigst -Hurtig -Normal -Maksimum -Ultra -4060 -Tilføj og erstat filer -Opdater og tilføj filer -Opdater eksisterende filer -Synkroniser filer -4070 -Gennemse -Alle filer -Ikke-solid -Solid -6000 -Kopier -Flyt -Kopier til: -Flyt til: -Kopierer... -Flytter... -Omdøber... -Vælg destinationsmappen. -Handlingen understøttes ikke af denne mappe. -Fejl under omdøbning af fil eller mappe -Bekræft kopiering af fil -Er du sikker på, at du vil kopiere filer til arkiv -6100 -Bekræft sletning af fil -Bekræft sletning af mappe -Bekræft sletning af flere filer -Er du sikker på, at du vil slette "{0}"? -Er du sikker på, at du vil slette mappen "{0}" og alt dens indhold? -Er du sikker på, at du vil slette disse {0} elementer? -Sletter... -Fejl under sletning af fil eller mappe -Systemet kan ikke flytte en fil med lang sti til Papirkurven -6300 -Opret mappe -Opret fil -Mappenavn: -Filnavn: -Ny mappe -Ny fil -Fejl under oprettelse af mappe -Fejl under oprettelse af fil -6400 -Kommentar -&Kommentar: -Vælg -Fravælg -Maske: -6600 -Egenskaber -Mappers historik -Diagnostiske meddelelser -Meddelelse -7100 -Computer -Netværk -Dokumenter -System -7200 -Tilføj -Udpak -Test -Kopier -Flyt -Slet -Info -7300 -Opdel fil -&Opdel til: -Opd&el i bind, byte: -Opdeler... -Bekræft opdeling -Er du sikker på, at du vil opdele filen i {0} bind? -Størrelsen på bind skal være mindre end størrelsen på den oprindelige fil -Forkert størrelse på bind -Angivet størrelse på bind: {0} byte.\nEr du sikker på, at du vil opdele arkivet i disse bind? -7400 -Kombiner filer -&Kombiner til: -Kombinerer... -Vælg kun første del af opdelt fil -Kan ikke genkende fil, som del af opdelt fil -Kan ikke finde mere end én del af opdelt fil -7500 -Beregner checksum... -Checksum information -CRC-checksum for data: -CRC-checksum for data og navne: -7600 -Benchmark -Hukommelsesforbrug: -Komprimering -Udpakning -Vurdering -Samlet vurdering -Aktuelt -Resultat -CPU forbrug -Vurdering/forbrug -Gennemløb: -7700 -Opret/rediger henvisning -Opret/rediger henvisning -Henvisning fra: -Henvisning til: -7710 -Henvisningstype -Fast henvisning -Fil symbolsk henvisning -Mappe symbolsk henvisning -Mappe forbindelsespunkt diff --git a/Utils/7-Zip/Lang/de.txt b/Utils/7-Zip/Lang/de.txt deleted file mode 100644 index 828dd17d6..000000000 --- a/Utils/7-Zip/Lang/de.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; 2.30 : Soeren Finster -; 4.07 : JAK-Software.DE -; 9.07 : Joachim Henke -; -; -; -; -; -; -; -; -0 -7-Zip -German -Deutsch -401 -OK -Abbrechen - - - -&Ja -&Nein -&Schließen -Hilfe - -&Fortsetzen -440 -Ja für &alle -Nein für a&lle -Stopp -Neustart -&Hintergrund -&Vordergrund -&Pause -Pause -Möchten Sie wirklich abbrechen? -500 -&Datei -&Bearbeiten -&Ansicht -&Favoriten -&Extras -&Hilfe -540 -Ö&ffnen -I&ntern öffnen -E&xtern öffnen -&Ansehen -&Bearbeiten -&Umbenennen -&Kopieren nach... -&Verschieben nach... -&Löschen -Datei auf&splitten... -Dateien &zusammenfügen... -E&igenschaften -K&ommentieren -&Prüfsumme berechnen -Ver&gleichen -Ordner erstellen -Datei erstellen -Be&enden -Verknüpfung... -&Alternative Datenströme -600 -Alles &markieren -Alles abwählen -Markierung &umkehren -Auswählen... -Auswahl aufheben... -Nach Typ auswählen -Nach Typ abwählen -700 -&Große Symbole -&Kleine Symbole -&Liste -&Details -730 -Unsortiert -Alles in einer &Ebene -&Zweigeteiltes Fenster -&Symbolleisten -Wurzelverzeichnis -Übergeordneter Ordner -Ordnerverlauf... -&Aktualisieren -Auto-Aktualisierung -750 -Archivfunktionen -Standardfunktionen -Große Schaltflächen -Schaltflächenbeschriftung -800 -&Ordner hinzufügen als -Favorit -900 -&Optionen... -&Benchmark -960 -&Hilfethemen -Ü&ber 7-Zip... -1003 -Pfad -Name -Erweiterung -Ordner -Größe -Gepackte Größe -Attribute -Erstellt am -Letzter Zugriff -Geändert am -Kompakt (solid) -Kommentiert -Verschlüsselt -Vorher geteilt -Danach geteilt -Wörterbuch -CRC -Typ -Anti -Verfahren -Herkunft -Dateisystem -Besitzer -Gruppe -Block -Kommentar -Position -Pfad -Ordner -Dateien -Version -Teilarchiv -Mehrteiliges Archiv -Offset -Verknüpfungen -Blöcke -Teilarchive - -64 Bit -Big-Endian -CPU -Gesamtgröße -Header-Größe -Prüfsumme -Kenndaten -Virtuelle Adresse -ID -Kurzname -Erstellt durch -Sektorgröße -Zugriffsrechte -Link -Fehler -Gesamtgröße -Freier Speicherplatz -Cluster-Größe -Name -Lokaler Name -Provider -NT-Sicherheit -Alternativer Datenstrom -Aux -Gelöscht -Ist Baum - - -Fehlertyp -Fehler -Fehler -Warnungen -Warnung -Datenströme -Alternative Datenströme -Größe der alternativen Datenströme -Virtuelle Größe -Entpackte Größe -Gesamte physikalische Größe -Teilstück Index -Untertyp -Kurzkommentar -Code-Seite - - - -Endungsgröße -integrierte Stub-Größe -Verknüpfung -Harte Verknüpfung -iNode - -Schreibgeschützt -2100 -Optionen -Sprache -Sprache: -Editor -&Editor: -Programm zum &Vergleichen: -2200 -System -7-Zip verknüpfen mit: -alle Benutzer -2301 -7-Zip in Kontextmenü integrieren -Kontextmenü kaskadieren -Einträge im Kontextmenü: -Symbole im Kontextmenü -2320 - - -Öffnen -Dateien entpacken... -Zu einem Archiv hinzufügen... -Archiv überprüfen -Hier entpacken -Entpacken nach {0} -Hinzufügen zu {0} -Archivieren und versenden... -Archivieren in {0} und versenden -2400 -Ordner -&Arbeitsverzeichnis -&TEMP-Ordner des Systems -Aktueller &Ordner -&Benutzerdefiniert: -Nur bei &Wechselmedien benutzen -Wählen Sie einen Ordner für temporäre Archivdateien: -2500 -Einstellungen -&Verzeichniseintrag ".." anzeigen -Symbole aus &Dateien laden und anzeigen -System-Kontext&menü im Dateimenü anzeigen -Dateiauswahl markiert ganze &Zeile -&Gitternetzlinien anzeigen -Einfacher &Klick zum Öffnen -&Alternativer Dateiauswahl-Modus -Große &Speicherseiten verwenden -2900 -Info über 7-Zip -7-Zip ist freie Software. Sie können jedoch das Projekt durch eine Registrierung unterstützen. -3000 -Das System kann die benötigte Speichermenge nicht bereit stellen. -Es sind keine Fehler aufgetreten. -{0} Objekt(e) markiert -Kann den Ordner "{0}" nicht erstellen. -Aktualisierungen werden für dieses Archiv nicht unterstützt. -Die Datei "{0}" kann nicht als Archiv geöffnet werden. -Das verschlüsselte Archiv "{0}" kann nicht geöffnet werden. Falsches Passwort? -Typ des Archives wird nicht unterstützt -Die Datei {0} existiert bereits. -Die Datei "{0}" wurde geändert.\nSoll sie im Archiv aktualisiert werden? -Die Datei konnte nicht aktualisiert werden.\n"{0}" -Kann Editor nicht starten -Die Datei scheint ein Virus zu sein (Dateiname enthält lange Reihen von Leerzeichen). -Die Operation kann nicht aus einem Ordner mit langem Pfad aufgerufen werden. -Bitte genau eine Datei auswählen. -Bitte mindestens eine Datei auswählen. -Zu viele Objekte -Die Datei kann nicht als {0}-Archiv geöffnet werden. -Die Datei wurde als {0}-Archiv geöffnet. -Die Datei wurde mit einem Offset geöffnet. -3300 -Entpacken -Komprimiere -Überprüfen -Öffne... -Durchsuche... -Entferne -3320 -Hinzufügen -Aktualisieren -Analysieren -Replizieren -Neu Packen -Überspringen -Löschen -Header erstellen -3400 -Entpacken -&Entpacken nach: -Wählen Sie einen Ordner für die entpackten Dateien: -3410 -Verzeichnisstruktur wiederherstellen -Komplette Pfadangaben -Keine Pfadangaben -Absolute Pfadangaben -Relative Pfadangaben -3420 -Dateien überschreiben -Nur mit Bestätigung -Ohne Bestätigung -Vorhandene Dateien überspringen -Automatisch umbenennen -Vorhandene Dateien umbenennen -3430 -Verdoppelung des Wurzelordners vermeiden -Dateirechte wiederherstellen -3500 -Überschreiben bestätigen -Der Zielordner beinhaltet bereits eine Datei diesen Namens. -Wollen Sie diese Datei -durch diese ersetzen? -{0} Bytes -A&utomatisch umbenennen -3700 -Das Kompressionsverfahren in "{0}" wird nicht unterstützt. -Datenfehler in "{0}". Die Datei ist beschädigt. -CRC-Prüfsummenfehler. Die Datei "{0}" ist beschädigt. -Datenfehler in der verschlüsselten Datei "{0}". Falsches Passwort? -CRC-Prüfsummenfehler bei verschlüsselter Datei "{0}". Falsches Passwort? -3710 -Falsches Passwort? -3721 -Nicht unterstützte Kompressionsmethode -Datenfehler -CRC-Fehler -Daten stehen nicht zur Verfügung -Unerwartetes Datenende -Es gibt noch Daten hinter den Hauptdaten -Ist kein Archiv -Headers-Fehler -Falsches Passwort -3763 -Anfang des Archivs fehlt -Anfang des Archivs nicht bestätigt - - - -Nicht unterstützte Funktion -3800 -Kennworteingabe -Passwort eingeben: -Passwort bestätigen: -Passwort an&zeigen -Die Passwörter stimmen nicht überein. -Bitte nur Buchstaben des englischen Alphabets, Ziffern und Sonderzeichen (!, #, $, ...) im Passwort verwenden! -Das Passwort ist zu lang. -Passwort -3900 -Verstrichene Zeit: -Verbleibende Zeit: -Gesamtdatenmenge: -Geschwindigkeit: -Verarbeitet: -Kompressionsrate: -Fehler: -Archive: -4000 -Zu Archiv hinzufügen -&Archiv: -Art der Akt&ualisierung: -Archiv&format: -&Kompressionsstärke: -Kompressions&verfahren: -Wörter&buchgröße: -&Wortgröße: -Größe &solider Blöcke: -Anzahl &CPU-Threads: -&Parameter: -Optionen -Selbstentpackendes Archiv (SF&X) erstellen -Zum Schreiben &geöffnete Dateien einbeziehen -Verschlüsselung -Verfahren: -Datei&namen verschlüsseln -Speicherbedarf beim Komprimieren: -Speicherbedarf beim Entpacken: -Dateien nach Komprimierung löschen -4040 -Symbolische Verknüpfungen speichern -Harte Verknüpfungen speichern -Alternative Datenströme speichern -Dateirechte speichern -4050 -Speichern -Schnellste -Schnell -Normal -Maximum -Ultra -4060 -Hinzufügen und Ersetzen -Aktualisieren und Hinzufügen -Vorhandene Dateien aktualisieren -Synchronisieren -4070 -Durchsuchen -Alle Dateien -Nicht solide -Solide -6000 -Kopieren -Verschieben -Kopieren nach: -Verschieben nach: -Kopiere... -Verschiebe... -Umbenennen... -Zielordner auswählen -Die Operation wird für diesen Ordner nicht unterstützt. -Fehler beim Umbenennen von Datei oder Ordner -Kopieren bestätigen -Sollen die Dateien wirklich in dieses Archiv kopiert werden: -6100 -Löschen von Datei bestätigen -Löschen von Ordner bestätigen -Löschen von mehreren Dateien bestätigen -Soll "{0}" wirklich gelöscht werden? -Soll der Ordner "{0}" und sein gesamter Inhalt wirklich gelöscht werden? -Sollen diese {0} Objekte wirklich gelöscht werden? -Lösche... -Fehler beim Löschen von Datei oder Ordner -Das System kann Dateien mit langem Pfad nicht in den Papierkorb verschieben. -6300 -Ordner erstellen -Datei erstellen -Ordnername: -Dateiname: -Neuer Ordner -Neue Datei -Fehler beim Erstellen des Ordners -Fehler beim Erstellen der Datei -6400 -Kommentar -&Kommentar: -Auswählen -Auswahl aufheben -Filter: -6600 -Eigenschaften -Ordnerverlauf -Diagnosemeldungen -Meldung -7100 -Arbeitsplatz -Netzwerk -Dokumente -System -7200 -Hinzufügen -Entpacken -Überprüfen -Kopieren -Verschieben -Löschen -Eigenschaften -7300 -Datei aufsplitten -Teildateien &nach: -In &Teildateien aufsplitten (Bytes): -Aufsplitten... -Aufsplitten bestätigen -Sind Sie sicher, die Datei in {0} Teildateien aufsplitten zu wollen? -Die Größe der Teildateien muss kleiner sein als die der ursprünglichen Datei. -Ungültiger Wert für Dateigrößen -Angegebene Größe für Teildateien: {0} Bytes.\nSind Sie sicher, dass das Archiv dementsprechend aufgesplittet werden soll? -7400 -Dateien zusammenfügen -Zieldatei &nach: -Zusammenfügen... -Bitte nur den ersten Teil der Datei auswählen. -Datei nicht als Teil einer aufgesplitteten Datei erkannt -Kann nicht mehr als eine Teildatei finden. -7500 -Berechne Prüfsumme... -Prüfsummen-Information -CRC-Prüfsumme über die Daten: -Prüfsumme über Daten und Namen: -7600 -Benchmark -Speichernutzung: -Komprimierung -Dekomprimierung -Bewertung -Gesamtwertung -Aktuell -Ergebnis -CPU-Nutzung -Bewert./Nutzung -Durchläufe: -7700 -Verknüpfung -Verknüpfung -Verknüpfung von: -Verknüpfung zu: -7710 -Verknüpfungsart -Harte Verknüpfung -Datei Symbolische Verknüpfung -Ordner Symbolische Verknüpfung -Ordner Verbindung diff --git a/Utils/7-Zip/Lang/el.txt b/Utils/7-Zip/Lang/el.txt deleted file mode 100644 index faa7b3650..000000000 --- a/Utils/7-Zip/Lang/el.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; : Vasileios Karakoidas, Jacaranda Bill, Vasilis Kosmidis -; 9.07 : SkyHi [HDManiacs Team] -; 15.00 : 2015-05-07: Pete D -; -; -; -; -; -; -; -; -0 -7-Zip -Greek -Ελληνικά -401 -OK -Άκυρο - - - -&Ναι -Ό&χι -&Κλείσιμο -Βοήθεια - -&Συνέχεια -440 -Ναι σε &όλα -Όχι σε ό&λα -&Παύση -Επανεκκίνηση -Στο &παρασκήνιο -Στο &προσκήνιο -&Παύση -Παύθηκε -Είστε σίγουροι ότι θέλετε να ακυρώσετε; -500 -&Αρχείο -&Επεξεργασία -Π&ροβολή -Αγα&πημένα -Εργα&λεία -&Βοήθεια -540 -Άν&οιγμα -Άνοιγμα στο &ίδιο παράθυρο -Άνοιγμα σε &νέο παράθυρο -Π&ροβολή -Επε&ξεργασία -Με&τονομασία -Αντι&γραφή... -Μετα&κίνηση... -Διαγρα&φή -&Τεμαχισμός αρχείου... -&Συνένωση αρχείων... -&Ιδιότητες -Σχόλιο -Υπολογισμός αθροίσματος ελέγχου -Diff -Δημιουργία φακέλου -Δημιουργία αρχείου -Έ&ξοδος -Σύνδεσμος -&Alternate Streams -600 -Ε&πιλογή όλων -Αποεπιλογή όλων -Αντιστροφή επιλογής -Επιλογή... -Αποεπιλογή... -Επιλογή σύμφωνα με τον τύπο αρχείου -Αποεπιλογή σύμφωνα με τον τύπο αρχείου -700 -Μεγάλα εικονί&δια -&Μικρά εικονίδια -&Λίστα -Λε&πτομέρειες -730 -Χωρίς ταξινόμηση -Επίπεδη προβολή -2 πάνελ -&Γραμμές εργαλείων -Άνοιγμα κεντρικού φακέλου -Μετάβαση ένα επίπεδο πάνω -&Ιστορικό φακέλων... -Α&νανέωση -Αυτόματη ανανέωση -750 -Συμπίεσης -Βασική -Μεγάλα εικονίδια -Εμφάνιση κειμένου -800 -&Προσθήκη καταλόγου στα Αγαπημένα ως -Σελιδοδείκτης -900 -&Ρυθμίσεις... -&Ελεγχος επιδόσεων -960 -&Περιεχόμενα... -Π&ερί του 7-Zip... -1003 -Θέση -Όνομα -Τύπος -Φάκελος -Μέγεθος -Συμπιεσμένο μέγεθος -Ιδιότητες -Δημιουργήθηκε -Προσπελάστηκε -Τροποποιήθηκε -Συμπαγές -Σχόλιο -Κωδικοποιημένο -Τεμαχισμός πριν -Τεμαχισμός μετά -Λεξικό - -Τύπος -Αντί -Μέθοδος -Λειτουργικό -Σύστημα αρχείων -Χρήστης -Ομάδα -Μπλοκ -Σχόλιο -Θέση -Προκαθορισμένη διαδρομή -Φάκελοι -Αρχεία -Έκδοση -Τόμος -Πολυτόμος -Offset -Σύνδεσμοι -Μπλοκ -Τόμοι - -64-bit -Big-endian -CPU -Φυσικό μέγεθος -Μέγεθος headers -Άθροισμα ελέγχου -Χαρακτηριστικά -Εικονική διεύθυνση -ID -Σύντομο όνομα -Εφαρμογή δημιουργίας -Μέγεθος τομέα -Κατάσταση λειτουργίας -Σύνδεσμος -Σφάλμα -Συνολικό μέγεθος -Ελεύθερος χώρος -Μέγεθος συμπλέγματος -Ετικέτα -Τοπικό όνομα -Παροχέας -NT Security -Alternate Stream -Aux -Deleted -Is Tree - - -Τύπος λάθους -Λάθη -Λάθη -Προειδοποιήσεις -Προειδοποίηση -Streams -Alternate Streams -Alternate Streams Size -Εικονικό μέγεθος -Αποσυμπιεσμένο μέγεθος -Συνολικό φυσικό μέγεθος -Ευρετήριο τόμου -SubType -Σύντομο σχόλιο -Κωδικοσελίδα - - - -Tail Size -Embedded Stub Size -Σύνδεσμος -Σταθερός σύνδεσμος -iNode - -Ανάγνωση-Μόνο -2100 -Ρυθμίσεις -Γλώσσα -Γλώσσα: -Πρόγραμμα επεξεργασίας -&Πρόγραμμα επεξεργασίας: -&Diff: -2200 -Σύστημα -Συσχέτιση του 7-Zip με τα αρχεία: -Ολοι οι χρήστες -2301 -Ενσωμάτωση του 7-Zip στο λειτουργικό -Με ομαδοποίηση των επιλογών -Στοιχεία του αναδυόμενου μενού: -Εικονίδια στο αναδυόμενο μενού -2320 -<Φάκελος> -<Αρχείο Συμπίεσης> -Άνοιγμα -Αποσυμπίεση αρχείων... -Προσθήκη σε αρχείο συμπίεσης... -Έλεγχος αρχείου συμπίεσης -Αποσυμπίεση εδώ -Αποσυμπίεση στο φάκελο {0} -Προσθήκη στο {0} -Συμπίεση και αποστολή με e-mail... -Συμπίεση στο {0} και αποστολή με e-mail -2400 -Φάκελοι -&Φάκελος εργασίας -&Προσωρινός φάκελος συστήματος -&Τρέχων φάκελος -&Καθορισμένος: -Χρήση μόνο για αφαιρούμενες μονάδες δίσκου -Καθορίστε μια τοποθεσία για τα προσωρινά αρχεία συμπίεσης. -2500 -Επιλογές -Εμφάνιση αντικειμένου ".." -Εμφάνιση των κανονικών εικονιδίων των αρχείων -Εμφάνιση μενού συστήματος -&Επιλογή ολόκληρης διαδρομής -Εμφάνιση γραμμών πλέγματος -Άνοιγμα αντικειμένου με μονό κλικ -Εναλλακτική κατάσταση επιλογής -Χρήση μεγάλων &σελίδων μνήμης -2900 -Πληροφορίες για το 7-Zip -Το 7-Zip είναι ελεύθερο λογισμικό. Ωστόσο μπορείτε να υποστηρίξετε την περαιτέρω ανάπτυξη του με την εγγραφή σας. -3000 -Το σύστημα δεν μπορεί να διαθέσει την απαιτούμενη ποσότητα μνήμης. -Δεν υπάρχουν σφάλματα -{0} επιλεγμένα στοιχεία -Αδύνατη η δημιουργία του φακέλου '{0}' -Οι λειτουργίες ενημέρωσης δεν είναι διαθέσιμες για αυτόν τον τύπο συμπιεσμένου αρχείου. -Δεν μπορεί να ανοιχθεί το αρχείο '{0}' σαν αρχείο συμπίεσης -Δεν μπορεί να ανοιχθεί το κρυπτογραφημένο αρχείο '{0}'. Λάθος κωδικός; -Μη υποστηριζόμενο αρχείο συμπίεσης. -Το αρχείο {0} ήδη υπάρχει. -Το αρχείο '{0}' τροποποιήθηκε.\nΘέλετε να ενημερώσετε το αρχείο συμπίεσης; -Αδυνατή η ενημέρωση του αρχείου\n'{0}' -Δεν είναι δυνατή η εκκίνηση του προγράμματος επεξεργασίας. -Το αρχείο μοιάζει με ιό (το όνομα του περιέχει μεγάλα κενά). -Η λειτουργία δεν μπορεί να κληθεί από ένα φάκελο που έχει μεγάλη διαδρομή. -Πρέπει να επιλέξετε ένα αρχείο. -Πρέπει να επιλέξετε ένα ή περισσότερα αρχεία. -Πάρα πολλά στοιχεία -Αδυναμία ανοίγματος του αρχείου ως {0} συμπιεσμένο -Το αρχείο είναι ανοιχτό ως {0} συμπιεσμένο -Το συμπιεσμένο αρχείο είναι ανοιχτό με offset -3300 -Αποσυμπίεση -Συμπίεση -Έλεγχος -Άνοιγμα... -Σάρωση... -Διαγραφή... -3320 -Προσθήκη.. -Ενημέρωση.. -Ανάλυση.. -Αντιγραφή.. -Επανασυμπίεση.. -Παράλειψη.. -Διαγραφή.. -Δημιουργία κεφαλίδας.. -3400 -Αποσυμπίεση -&Αποσυμπίεση στο φάκελο: -Καθορίστε τον φάκελο αποσυμπίεσης. -3410 -Επιλογές διαδρομών φακέλων -Πλήρεις διαδρομές φακέλων -Χωρίς διαδρομές φακέλων -Απόλυτες διαδρομές φακέλων -Σχετικές διαδρομές φακέλων -3420 -Επιλογές αντικατάστασης αρχείων -Αντικατάσταση με ερώτηση -Αντικατάσταση χωρίς ερώτηση -Παράβλεψη των υπαρχόντων αρχείων -Αυτόματη μετονομασία -Αυτόματη μετονομασία των υπαρχόντων αρχείων -3430 -Απαλοιφή ριζικού καταλόγου -Επαναφορά ασφάλειας αρχείου -3500 -Επιβεβαίωση αντικατάστασης του αρχείου -Ο φάκελος προορισμού περιέχει ήδη ένα αρχείο με το ίδιο όνομα. -Θέλετε να αντικαταστήσετε το υπάρχον αρχείο -με αυτό; -{0} bytes -Αυτόματη &μετονομασία -3700 -Μη υποστηριζόμενη μέθοδος συμπίεσης για το '{0}'. -Λάθος δεδομένων στο {0}. Το αρχείο είναι φθαρμένο. -Ο έλεγχος CRC απέτυχε στο '{0}'. Το αρχείο είναι φθαρμένο. -Λάθος δεδομένων στο κρυπτογραφημένο αρχείο '{0}'. Λάθος κωδικός; -Ο έλεγχος CRC απέτυχε στο κρυπτογραφημένο αρχείο '{0}'. Λάθος κωδικός; -3710 -Λάθος κωδικός; -3721 -Μη υποστηριζόμενη μέθοδος συμπίεσης -Λάθος δεδομένων -Ο έλεγχος CRC απέτυχε -Μη διαθέσιμα δεδομένα -Απρόβλεπτο τελείωμα δεδομένων -Υπάρχουν μερικα δεδομένα στο τέλος των χρήσιμων δεδομένων -Δεν είναι συμπιεσμένο αρχείο -Λάθος επικεφαλίδων -Λάθος κωδικός -3763 -Μη διαθέσιμη αρχή του συμπιεσμένου αρχείου -Ανεπιβεβαίωτη αρχή του συμπιεσμένου αρχείου - - - -Μη υποστηριζόμενη λειτουργία -3800 -Εισαγωγή κωδικού πρόσβασης -Κωδικός πρόσβασης: -Επανεισάγετε τον κωδικό πρόσβασης: -&Εμφάνιση κωδικού -Οι κωδικοί δεν ταιριάζουν. -Χρησιμοποιήστε μόνο Αγγλικά γράμματα, αριθμούς και ειδικούς χαρακτήρες (!, #, ...) για κωδικό. -Ο κωδικός είναι πολύ μεγάλος. -Κωδικός πρόσβασης -3900 -Διανύθηκε: -Απομένει: -Μέγεθος: -Ταχύτητα: -Επεξεργάσθηκαν: -Αναλογία συμπίεσης -Σφάλματα: -Αρχεία συμπίεσης: -4000 -Προσθήκη σε συμπιεσμένο αρχείο -&Όνομα αρχείου συμπίεσης: -&Τρόπος ενημέρωσης: -Συμπίεση στη μορ&φή: -Επίπεδο συμπίεσης: -&Μέθοδος συμπίεσης: -Μέγεθος &λεξικού: -Μέγεθος &λέξης: -Μέγεθος συμπαγούς μπλοκ: -Αριθμός νημάτων CPU -&Παράμετροι: -Επιλογές συμπίεσης -Με αυτόματη αποσυμπίεση (SF&X) -Συμπίεση κοινών αρχείων -Κρυπτογράφηση -Μέθοδος κρυπτογράφησης -Κρυπτογράφηση των &ονομάτων -Χρήση μνήμης για συμπίεση: -Χρήση μνήμης για αποσυμπίεση: -Διαγραφή αρχείων μετά τη συμπίεση -4040 -Αποθήκευση συμβολικών συνδέσμων -Αποθήκευση σταθερών συνδέσμων -Αποθήκευση ενναλλακτικών ροών δεδομένων -Αποθήκευση ασφάλειας αρχείου -4050 -Αποθήκευση -Πολύ γρήγορη -Γρήγορη -Κανονική -Μέγιστη -Υπερσυμπίεση -4060 -Προσθήκη και αντικατάσταση αρχείων -Προσθήκη και ενημέρωση αρχείων -Ενημέρωση των υπαρχόντων αρχείων -Συγχρονισμός αρχείων -4070 -Αναζήτηση -Όλα τα αρχεία -Μη-συμπαγές -Συμπαγές -6000 -Αντιγραφή -Μετακίνηση -Αντιγραφή στο: -Μετακίνηση στο: -Αντιγραφή... -Μετακίνηση... -Μετονομασία... -Επιλέξτε φάκελο προορισμού. -Η λειτουργία δεν υποστηρίζεται. -Παρουσιάστηκε σφάλμα κατά τη μετονομασία. -Επιβεβαίωση αντιγραφής αρχείων -Είστε βέβαιος ότι θέλετε να αντιγράψετε τα αρχεία στο αρχείο συμπίεσης; -6100 -Επιβεβαίωση διαγραφής του αρχείου -Επιβεβαίωση διαγραφής του φακέλου -Επιβεβαίωση διαγραφής πολλών αρχείων -Είστε βέβαιοι ότι θέλετε να διαγράψετε το '{0}' ; -Είστε βέβαιοι ότι θέλετε να διαγράψετε το φάκελο '{0}' και όλα τα περιεχόμενα του; -Είστε βέβαιοι ότι θέλετε να διαγράψετε αυτά τα {0} στοιχεία; -Διαγραφή... -Παρουσιάστηκε σφάλμα κατά τη διαγραφή. -Το σύστημα δεν μπορεί να μετακινήσει ένα αρχείο με μεγάλη διαδρομή στον Κάδο Ανακύκλωσης. -6300 -Δημιουργία φακέλου -Δημιουργία αρχείου -Όνομα φακέλου: -Όνομα αρχείου: -Νέος φάκελος -Νέο αρχείο -Σφάλμα κατά την δημιουργία φακέλου. -Σφάλμα κατά την δημιουργία αρχείου. -6400 -Σχόλιο -&Σχόλιο: -Επιλογή -Αποεπιλογή -Με όνομα: -6600 -Ιδιότητες -Ιστορικό φακέλων -Διαγνωστικά μηνύματα -Μήνυμα -7100 -Υπολογιστής -Δικτύο -Έγγραφα -Σύστημα -7200 -Προσθήκη -Αποσυμπίεση -Έλεγχος -Αντιγραφή -Μετακίνηση -Διαγραφή -Πληροφορίες -7300 -Τεμαχισμός αρχείου -&Τεμαχισμός σε: -Τεμαχισμός σε τόμους: -Τεμαχισμός... -Επιβεβαίωση τεμαχισμού -Είστε βέβαιος ότι θέλετε να τεμαχίσετε το αρχείο σε {0} τόμους; -Το μέγεθος του τόμου πρέπει να είναι μικρότερο από αυτό του αρχικού αρχείου. -Λάθος μέγεθος τόμου -Καθορισμένο μέγεθος τόμου: {0} bytes.\nΕίστε σίγουρος ότι θέλετε να χωρίσετε το αρχείο σε τέτοιους τόμους; -7400 -Συνένωση αρχείων -&Συνένωση σε: -Συνένωση... -Επιλέξτε μόνο το πρώτο αρχείο -Το αρχείο δεν μπορεί να ανιχνευθεί ως μέρος τεμαχισμένου αρχείου. -Δεν μπορούν να βρεθούν πάνω από ένα μέρη τεμαχισμένου αρχείου. -7500 -Υπολογισμός αθροίσματος ελέγχου... -Πληροφορίες αθροίσματος ελέγχου -Άθροισμα ελέγχου CRC για δεδομένα: -Άθροισμα ελέγχου CRC για δεδομένα και ονόματα: -7600 -Αξιολόγηση επιδόσεων -Χρήση μνήμης: -Συμπίεση -Αποσυμπίεση -Εκτίμηση -Συνολ. εκτίμηση -Τρέχων πέρασμα -Αποτέλεσμα -Χρήση CPU -Ταξ/μιση/Χρήση -Περάσματα: -7700 -Σύνδεσμος -Σύνδεσμος -Σύνδεσμος από: -Σύνδεσμος έως: -7710 -Τύπος συνδέσμου -Σταθερός σύνδεσμος -Συμβολικός σύνδεσμος αρχείου -Συμβολικός σύνδεσμος καταλόγου -Συνένωση καταλόγου diff --git a/Utils/7-Zip/Lang/en.ttt b/Utils/7-Zip/Lang/en.ttt deleted file mode 100644 index d94df3816..000000000 --- a/Utils/7-Zip/Lang/en.ttt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; 15.00 : 2015-03-29 : Igor Pavlov -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -English -English -401 -OK -Cancel - - - -&Yes -&No -&Close -Help - -&Continue -440 -Yes to &All -No to A&ll -Stop -Restart -&Background -&Foreground -&Pause -Paused -Are you sure you want to cancel? -500 -&File -&Edit -&View -F&avorites -&Tools -&Help -540 -&Open -Open &Inside -Open O&utside -&View -&Edit -Rena&me -&Copy To... -&Move To... -&Delete -&Split file... -Com&bine files... -P&roperties -Comme&nt... -Calculate checksum -Diff -Create Folder -Create File -E&xit -Link -&Alternate Streams -600 -Select &All -Deselect All -&Invert Selection -Select... -Deselect... -Select by Type -Deselect by Type -700 -Lar&ge Icons -S&mall Icons -&List -&Details -730 -Unsorted -Flat View -&2 Panels -&Toolbars -Open Root Folder -Up One Level -Folders History... -&Refresh -Auto Refresh -750 -Archive Toolbar -Standard Toolbar -Large Buttons -Show Buttons Text -800 -&Add folder to Favorites as -Bookmark -900 -&Options... -&Benchmark -960 -&Contents... -&About 7-Zip... -1003 -Path -Name -Extension -Folder -Size -Packed Size -Attributes -Created -Accessed -Modified -Solid -Commented -Encrypted -Split Before -Split After -Dictionary - -Type -Anti -Method -Host OS -File System -User -Group -Block -Comment -Position -Path Prefix -Folders -Files -Version -Volume -Multivolume -Offset -Links -Blocks -Volumes - -64-bit -Big-endian -CPU -Physical Size -Headers Size -Checksum -Characteristics -Virtual Address -ID -Short Name -Creator Application -Sector Size -Mode -Symbolic Link -Error -Total Size -Free Space -Cluster Size -Label -Local Name -Provider -NT Security -Alternate Stream -Aux -Deleted -Is Tree - - -Error Type -Errors -Errors -Warnings -Warning -Streams -Alternate Streams -Alternate Streams Size -Virtual Size -Unpack Size -Total Physical Size -Volume Index -SubType -Short Comment -Code Page - - - -Tail Size -Embedded Stub Size -Link -Hard Link -iNode - -Read-only -2100 -Options -Language -Language: -Editor -&Editor: -&Diff: -2200 -System -Associate 7-Zip with: -All users -2301 -Integrate 7-Zip to shell context menu -Cascaded context menu -Context menu items: -Icons in context menu -2320 - - -Open archive -Extract files... -Add to archive... -Test archive -Extract Here -Extract to {0} -Add to {0} -Compress and email... -Compress to {0} and email -2400 -Folders -&Working folder -&System temp folder -&Current -&Specified: -Use for removable drives only -Specify a location for temporary archive files. -2500 -Settings -Show ".." item -Show real file icons -Show system menu -&Full row select -Show &grid lines -Single-click to open an item -&Alternative selection mode -Use &large memory pages -2900 -About 7-Zip -7-Zip is free software -3000 -The system cannot allocate the required amount of memory -There are no errors -{0} object(s) selected -Cannot create folder '{0}' -Update operations are not supported for this archive. -Can not open file '{0}' as archive -Can not open encrypted archive '{0}'. Wrong password? -Unsupported archive type -File {0} is already exist -File '{0}' was modified.\nDo you want to update it in the archive? -Can not update file\n'{0}' -Cannot start editor. -The file looks like a virus (the file name contains long spaces in name). -The operation cannot be called from a folder that has a long path. -You must select one file -You must select one or more files -Too many items -Can not open the file as {0} archive -The file is open as {0} archive -The archive is open with offset -3300 -Extracting -Compressing -Testing -Opening... -Scanning... -Removing -3320 -Adding -Updating -Analyzing -Replicating -Repacking -Skipping -Deleting -Header creating -3400 -Extract -E&xtract to: -Specify a location for extracted files. -3410 -Path mode: -Full pathnames -No pathnames -Absolute pathnames -Relative pathnames -3420 -Overwrite mode: -Ask before overwrite -Overwrite without prompt -Skip existing files -Auto rename -Auto rename existing files -3430 -Eliminate duplication of root folder -Restore file security -3500 -Confirm File Replace -Destination folder already contains processed file. -Would you like to replace the existing file -with this one? -{0} bytes -A&uto Rename -3700 -Unsupported compression method for '{0}'. -Data error in '{0}'. File is broken. -CRC failed in '{0}'. File is broken. -Data error in encrypted file '{0}'. Wrong password? -CRC failed in encrypted file '{0}'. Wrong password? -3710 -Wrong password? -3721 -Unsupported compression method -Data error -CRC failed -Unavailable data -Unexpected end of data -There are some data after the end of the payload data -Is not archive -Headers Error -Wrong password -3763 -Unavailable start of archive -Unconfirmed start of archive - - - -Unsupported feature -3800 -Enter password -Enter password: -Reenter password: -&Show password -Passwords do not match -Use only English letters, numbers and special characters (!, #, $, ...) for password -Password is too long -Password -3900 -Elapsed time: -Remaining time: -Total size: -Speed: -Processed: -Compression ratio: -Errors: -Archives: -4000 -Add to archive -&Archive: -&Update mode: -Archive &format: -Compression &level: -Compression &method: -&Dictionary size: -&Word size: -Solid block size: -Number of CPU threads: -&Parameters: -Options -Create SF&X archive -Compress shared files -Encryption -Encryption method: -Encrypt file &names -Memory usage for Compressing: -Memory usage for Decompressing: -Delete files after compression -4040 -Store symbolic links -Store hard links -Store alternate data streams -Store file security -4050 -Store -Fastest -Fast -Normal -Maximum -Ultra -4060 -Add and replace files -Update and add files -Freshen existing files -Synchronize files -4070 -Browse -All Files -Non-solid -Solid -6000 -Copy -Move -Copy to: -Move to: -Copying... -Moving... -Renaming... -Select destination folder. -The operation is not supported for this folder. -Error Renaming File or Folder -Confirm File Copy -Are you sure you want to copy files to archive -6100 -Confirm File Delete -Confirm Folder Delete -Confirm Multiple File Delete -Are you sure you want to delete '{0}'? -Are you sure you want to delete the folder '{0}' and all its contents? -Are you sure you want to delete these {0} items? -Deleting... -Error Deleting File or Folder -The system cannot move a file with long path to the Recycle Bin -6300 -Create Folder -Create File -Folder name: -File Name: -New Folder -New File -Error Creating Folder -Error Creating File -6400 -Comment -&Comment: -Select -Deselect -Mask: -6600 -Properties -Folders History -Diagnostic messages -Message -7100 -Computer -Network -Documents -System -7200 -Add -Extract -Test -Copy -Move -Delete -Info -7300 -Split File -&Split to: -Split to &volumes, bytes: -Splitting... -Confirm Splitting -Are you sure you want to split file into {0} volumes? -Volume size must be smaller than size of original file -Incorrect volume size -Specified volume size: {0} bytes.\nAre you sure you want to split archive into such volumes? -7400 -Combine Files -&Combine to: -Combining... -Select only first part of split file -Can not detect file as part of split file -Can not find more than one part of split file -7500 -Checksum calculating... -Checksum information -CRC checksum for data: -CRC checksum for data and names: -7600 -Benchmark -Memory usage: -Compressing -Decompressing -Rating -Total Rating -Current -Resulting -CPU Usage -Rating / Usage -Passes: -7700 -Link -Link -Link from: -Link to: -7710 -Link Type -Hard Link -File Symbolic Link -Directory Symbolic Link -Directory Junction diff --git a/Utils/7-Zip/Lang/eo.txt b/Utils/7-Zip/Lang/eo.txt deleted file mode 100644 index 45261353a..000000000 --- a/Utils/7-Zip/Lang/eo.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.37 : Dmitri Gabinski -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Esperanto -Esperanto -401 -B&one -Nuligu - - - -&Jes -&Ne -&Fermu -Helpo - -&Daŭrigu -440 -Jes por ĉ&iuj -Ne por ĉi&uj -&Haltu -Restartigu -&Fono -&Malfono -&Paŭzo -Paŭzita -Ĉu vi vere volas nuligi? -500 -&Dosiero -&Redakto -&Vido -&Favoritaj -&Agordoj -&Helpo -540 -&Malfermu -Malfermu &ene -Malfermu ek&stere -&Vidigu -&Redaktu -Ŝ&anĝu nomon -&Kopiu en... -M&ovu en... -&Forigu -&Erigu dosierojn... -Komb&inu dosierojn... -A&tributoj -Ko&mentu -Kalkulu kontrolsumon - -Kreu &dosierujon -Kre&u dos&ieron -E&liru -600 -M&arku ĉiun -Ma&lmarku ĉiun -&Inversigu markon -Marku... -Malmarku... -Marku laŭ tipo -Malmarku laŭ tipo -700 -&Grandaj bildetoj -&Malgrandaj bildetoj -&Listo -&Detale -730 -&Neordigite -Ununivela vido -&2 paneloj -&Ilobretoj -Malfermu radikan dosierujon -Supren je unu nivelo -Dosierujhistorio... -Ĝ&isdatigu -750 -Arĥivo-ilobreto -Norma ilobreto -Grandaj bildetoj -Montru butontekston -800 -&Aldonu dosierujon al favorataj kiel -Legosigno -900 -&Agordoj... -&Etalono -960 -&Enhavo... -&Pri 7-Zip... -1003 -Dosierindiko -Nomo -Dosiernoma sufikso -Dosierujo -Grando -Enarĥiva grando -Atributoj -Kreita -Malfermita -Ŝanĝita -Solida -Komento -Ĉifra -Disigita antaŭ -Disigita post -Vortaro -CRC -Tipo -Kontraŭ -Metodo -Gastiga operaciumo -Dosiersistemo -Uzulo -Grupo -Bloko -Komento -Pozicio -Vojprefikso - - - - - - - - - - - - - - - - - - - - - - - - -Eraro -Kapacito -Libera -Faskogrando -Marko -Loka nomo -Provizanto -2100 -Agordoj -Lingvo -Lingvo: -Redaktilo -&Redaktilo: - -2200 -Sistemo -Asociu 7-Zip-on kun dosieroj: -2301 -Metu 7-Zip'on en kuntekstan menuon de ŝelo -Kaskada kunteksta menuo -Punktoj de kunteksta menuo: -2320 - - -Malfermu -Elarĥivigu dosierojn... -Enarĥivigu... -Testu arĥivon -Elarĥivigu ĉi-tien -Elarĥivigu en {0} -Aldonu al {0} -Enarĥivigu kaj enretpoŝtigu... -Enarĥivigu en {0} kaj enretpoŝtigu... -2400 -Dosierujoj -&Kuranta dosierujo -&Sistema labora dosierujo -&Ĉi tiu -&Specifu: -&Uzi nur por demeteblaj datumportiloj -Specifu ujon por laboraj dosieroj. -2500 -Agordoj -Montru ".."-elementon -Montru realajn dosierbildetojn -Montru sisteman menuon -Marku &tutan linion -Montru &kradliniojn - -&Alternativa markreĝimo -Uzu &grandajn memorpaĝojn -2900 -Informo -7-Zip estas senpaga programo. Tamen, vi povas subteni evoluadon de 7-Zip per enregistriĝo. -3000 - -Eraroj ne trovitaj -{0} objekto(j) markita(j) -Fiaskis krei dosierujon '{0}' -Ĝisdatigoperacioj ne estas subtenataj por ĉi-tiu arĥivo. - - - - -Dosiero '{0}' ŝanĝiĝis.\nĈu vi volas ĝistadigi ĝin enraĥive? -Fiaskis ĝisdatigi dosieron\n'{0}'' -Fiaskis startigi redaktilon. - - - - -Troaj elementoj -3300 -Elarĥivigo -Densigo -Testado -Malfermo... -Analizante... -3400 -&Elarĥivigu -E&larĥivigu en: -Specifu ujon por elarĥivendaj dosieroj. -3410 -Dosierindikoj -&Absolutaj dosierindikoj -&Sen dosierindikoj -3420 -Anstataŭiga skribreĝimo -&Kun konfirmo -&Sen konfirmo -&Preterlasu estantaj dosieroj -Aŭtonomŝanĝo -Aŭtonomŝanĝo de ekzistantaj dosieroj -3500 -Konfirmo de nomŝanĝo -Dosierujo jam enhavas prilaboratan dosieron. -Anstataŭigu estantan dosieron -per ĉi-tiu? -{0} bajtoj -&Aŭtonomŝanĝo. -3700 -Ne estas subtenata densigmetodo por dosiero '{0}'. -Datumeraro en '{0}'. Difektiĝinta dosiero. -CRC-eraro en '{0}'. Difektiĝinta dosiero. - - -3800 -Pasvorto -Enigu pasvorton: - -&Montru pasvorton - - - -&Pasvorto -3900 -Pasinta tempo: -Restanta tempo: -Grando: -Rapideco: - - -Eraroj: - -4000 -Enarĥivigu -&Arĥivo: -A&nstataŭigreĝimo: -A&rĥivformato: -Densigo&nivelo -&Densigmetodo: -&Vortarogrando: -Vo&rtogrando: - - -&Parametroj: -Agordoj -Kreu SF&X-arĥivon - - - -Ĉifru dosier&nomojn -Memoruzo por densigo: -Memoruzo por maldensigo: -4050 -Sen densigo -Plej rapide -Rapide -Normala densigo -Maksimuma densigo -Ultra -4060 -Aldonu kaj anstataŭigu dosierojn -Ĝisdatigu kaj aldonu dosierojn -Refreŝigu estantajn dosierojn -Sinkronigu dosierojn -4070 -Foliumu -Ĉiuj dosieroj - - -6000 -Kopiu -Movu -Kopiu en: -Movu en: -Kopio... -Movo... -Nomŝanĝo... - -Operacio ne estas subtenata. -Eraro dum nomŝanĝo de dosiero aŭ dosierujo -Konfirmu dosierkopion -Ĉu vere kopii dosierojn enarĥiven -6100 -Konfirmo de forigo de dosiero -Konfirmo de forigo de dosierujo -Konfirmo de forigo de dosieraro -Ĉu vi vere volas forigi '{0}'? -Ĉu vi vere volas forigi dosierujon "{0}" kaj tutan ĝian enhavon? -Ĉu vi vere volas forigi ĉi tiajn {0} objektojn? -Forigo... -Eraro dum forigo de dosiero aŭ dosierujo - -6300 -Kreu dosierujon -Kreu dosieron -Dosierujnomo: -Dosiernomo: -Nova dosierujo -Nova dosiero -Eraro dum dosierujkreo -Eraro dum dosierkreo -6400 -Komento -&Komento: -Marku -Malmarku -Masko: -6600 - -Dosierujhistorio -Diagnozaj mesaĝoj -Mesaĝo -7100 -Komputilo -Reto - -Sistemo -7200 -Enarĥivigu -Elarĥivigu -Testu -Kopiu -Movu -Forigu -Informo -7300 -Erigu dosieron -&Erigu en: -&Plurvolumigu, bajtoj: -Erigo... - - - - - -7400 -Kombinu dosierojn -&Kombinu en: -Kombino... - - - -7500 -Kalkulante kontrolsumon... -Informo pri kontrolsumo -CRC-kontrolsumo por datumoj: -CRC-kontrolsumo por datumoj kaj nomoj: -7600 -Etalono -Memoruzo: -Densigo -Maldensigo -Takso -Tuta takso -Kuranta -Rezulta - - -Pasoj: diff --git a/Utils/7-Zip/Lang/es.txt b/Utils/7-Zip/Lang/es.txt deleted file mode 100644 index 15b17071d..000000000 --- a/Utils/7-Zip/Lang/es.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; : Pablo Rodriguez -; : Jbc25 -; : 2007-09-05 : Guillermo Gabrielli -; 9.07 : 2010-06-10 : Purgossu -; 2010-10-23 : Sergi Medina (corrected) -; -; -; -; -; -; -0 -7-Zip -Spanish -Español -401 -Aceptar -Cancelar - - - -&Sí -&No -&Cerrar -Ayuda - -&Continuar -440 -Sí a &todo -No a t&odo -Parar -Volver a empezar -Se&gundo plano -P&rimer plano -&Pausa -Pausado -¿Estás seguro de que deseas cancelar? -500 -&Archivo -&Editar -&Ver -&Favoritos -&Herramientas -Ay&uda -540 -&Abrir -Abrir &dentro -Abrir &fuera -&Ver -&Editar -Re&nombrar -&Copiar a... -&Mover a... -&Borrar -Di&vidir archivo... -C&ombinar archivos... -&Propiedades -Comen&tario -Suma de verificación -Diff -Crear carpeta -Crear archivo -&Salir -600 -Seleccionar &todo -Deseleccionar todo -&Invertir selección -Seleccionar... -Deseleccionar... -Seleccionar por tipo -Deseleccionar por tipo -700 -Iconos g&randes -&Iconos pequeños -&Lista -&Detalles -730 -Desordenado -Vista plana (flat view) -&2 paneles -&Barras de herramientas -Abrir directorio raíz -Subir un directorio -Historia de carpetas... -&Actualizar -750 -Barra de herramientas Archivo -Barras de herramientas estándar -Botones grandes -Mostrar texto en los botones -800 -&Añadir carpeta a favoritos como -Agregar a favoritos -900 -&Opciones... -&Pruebas (benchmark) -960 -&Contenido... -&Acerca de 7-Zip... -1003 -Ruta -Nombre -Tipo de archivo -Directorio -Tamaño -Tamaño comprimido -Atributos -Creado -Acceso -Modificado -Compacto -Comentado -Encriptado -expandido antes -expandido después -Diccionario -CRC -Tipo -Anti -Método -SO de origen -Sistema de archivos -Usuario -Grupo -Bloque -Comentario -Posición -Ruta -Directorios -Ficheros -Versión -Volumen -Multivolumen -Desplazamiento -Vínculos -Bloques -Volúmenes - -64-bit -Big-endian -CPU -Tamaño físico -Tamaño de las cabeceras -Verificación de suma -Características -Dirección virtual -ID -Nombre corto -Aplicación de creación -Tamaño de sector -Modo -Enlace -Error -Espacio total -Espacio libre -Tamaño de clúster -Etiqueta -Nombre local -Proveedor -2100 -Opciones -Lengua -Lengua: -Editor -&Editor: -&Diff: -2200 -Sistema -Asociar 7-Zip con: -2301 -Integrar 7-Zip en el menú contextual de Windows -Menú contextual en cascada -Elementos en el menú contextual: -2320 - - -Abrir comprimido -Extraer ficheros... -Añadir al archivo... -Comprobar archivo -Extraer aquí -Extraer en {0} -Añadir a {0} -Comprimir y enviar por correo... -Comprimir a {0} y enviar por correo -2400 -Directorios -Directorio de &trabajo -Directorio temporal del &sistema -Directorio &actual -&Especificar directorio: -Usar solo para dispositivos extraíbles -Especificar un directorio para archivos temporales. -2500 -Propiedades -Mostrar el elemento ".." -Mostrar iconos propios -Mostrar menú del sistema -&Seleccionar fila(s) entera(s) -Mostrar &cuadrícula -Clicar una vez para abrir elemento -Modo de selección &alternativo -Usar páginas &grandes de memoria -2900 -Acerca de 7-Zip -7-Zip es un programa excelente; además, es libre y gratuito. Tú puedes apoyar el desarrollo de 7-Zip registrándote para contribuir a mejorar el programa. -3000 -El sistema no ha podido asignar la cantidad necesaria de memoria -No hay errores -{0} elemento(s) seleccionado(s) -No se puede crear el directorio '{0}' -Este tipo de archivo no permite actualización. -No se puede abrir '{0}' como un archivo comprimido -No se puede abrir el archivo encriptado '{0}'. Verifique la contraseña. -Tipo de archivo no soportado -El fichero {0} ya existe -El fichero '{0}' ha sido modificado.\n¿Quieres actualizarlo en el archivo? -No puede actualizarse el fichero\n'{0}' -No puede ejecutarse el editor. -El fichero parece un virus (el nombre del fichero contiene espacios largos). -No puede realizarse la operación desde una carpeta que tenga una ruta larga. -Debes seleccionar un fichero -Debes seleccionar uno o más ficheros -Demasiados elementos -3300 -extrayendo -comprimiendo -probando -abriendo... -Buscando... -3400 -Extraer -E&xtraer a: -Selecciona destino para los archivos extraídos. -3410 -Modo de directorio -Directorio completo -Sin directorio -3420 -Sobreescribir -Con confirmación -Sin confirmación -Conservar archivos existentes -Renombrar automáticamente -Autorrenombrar archivos existentes -3500 -Confirmar sustitución de archivos -El directorio ya contiene un archivo con el mismo nombre. -¿Deseas sustituir el archivo existente -por este otro? -{0} bytes -Renombrar a&utomáticamente -3700 -Método de compresión no válido para '{0}'. -Error de datos en '{0}'. El archivo está corrupto. -CRC ha fallado en '{0}'. El archivo está corrupto. -Error de datos en el archivo encriptado '{0}'. Verifica la contraseña. -Fallo de CRC en el archivo encriptado '{0}'. Verifica la contraseña. -3800 -Introduce la contraseña -E&scribe la contraseña: -Escribe nue&vamente la contraseña: -&Mostrar la contraseña -Las contraseñas son diferentes. Por favor, vuelve a escribirlas. -Usa en la contraseña solamente letras del alfabeto inglés, números y caracteres especiales (!, #, $, ...) -La contraseña es demasiado larga. -Contraseña -3900 -Tiempo transcurrido: -Tiempo pendiente: -Tamaño: -Velocidad: -Procesado: -Razón de compresión: -Errores: -Archivos: -4000 -Añadir al archivo -&Archivo: -M&odo de actualización: -&Formato de archivo: -Nive&l de compresión: -&Tipo de compresión: -Tamaño de &diccionario: -Tama&ño de la palabra: -Tamaño de bloque compacto: -Número de hilos de la CPU: -&Parámetros: -Opciones -Crear archivo SF&X (autoextraíble) -Comprimir archivos abiertos para escritura -Encriptación -Método de &encriptación: -Encriptar &nombres de fichero -Memoria usada para comprimir: -Memoria usada para descomprimir: -4050 -Sin compresión -La más rápida -Rápida -Normal -Máxima -Ultra -4060 -Añadir y sustituir archivos -Actualizar y añadir archivos -Solo actualizar archivos -Sincronizar archivos -4070 -Explorar -Todos los archivos -No compacto -Sin límite -6000 -Copiar -Mover -Copiar a: -Mover a: -copiado... -movido... -Renombrando... -Selecciona la carpeta de destino -Operación no permitida. -Error renombrando fichero o carpeta -Confirmar copia de ficheros -¿Estás seguro de que deseas copiar los ficheros al archivo -6100 -Confirmar borrado de archivo -Confirmar borrado de carpeta -Confirmar borrado de numerosos ficheros -¿Estás seguro de querer borrar '{0}'? -¿Estás seguro de querer borrar la carpeta '{0}' y todo su contenido? -¿Estás seguro de querer borrar estos {0} elementos? -Borrando... -Error borrando fichero o carpeta -El sistema no puede mover un fichero con ruta larga a la Papelera de Reciclaje -6300 -Crear carpeta -Crear archivo -Nombre de carpeta: -Nombre de archivo: -Carpeta nueva -Archivo nuevo -Error creando carpeta -Error creando archivo -6400 -Comentario -&Comentario: -Seleccionar -Deseleccionar -Máscara: -6600 -Propiedades -Historial de carpetas -Mensajes de diagnóstico -Mensaje -7100 -Mi PC -Entorno de red -Documentos -Sistema -7200 -Agregar -Extraer -Probar -Copiar -Mover -Borrar -Información -7300 -Dividir archivo -Di&vidir a: -Dividir en fra&gmentos (bytes): -Dividiendo... -Confirmar división -¿Estás seguro de que deseas dividir el archivo en {0} partes? -El tamaño de los fragmentos debe ser menor que el del archivo original -Tamaño de fragmento incorrecto -Tamaño de fragmento especificado: {0} bytes.\n¿Estás seguro de que deseas dividir el archivo en fragmentos de ese tamaño? -7400 -Combinar archivos -&Combinar a: -Combinando... -Selecciona solamente el primer archivo -No se ha podido detectar el fichero como parte de un fichero por volúmenes -No se ha podido encontrar más que un fragmento del fichero por volúmenes -7500 -Calculando suma de verificación... -Suma de verificación (CRC) -CRC de los datos: -CRC de los datos y nombres: -7600 -Pruebas (benchmark) -Uso de memoria: -Compresión -Descompresión -Tasa -Tasa total -Actual -Resultante -Uso de CPU -Resultante/uso -Pasos: diff --git a/Utils/7-Zip/Lang/et.txt b/Utils/7-Zip/Lang/et.txt deleted file mode 100644 index de2282f23..000000000 --- a/Utils/7-Zip/Lang/et.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 3.09 : Kaupo Suviste -; 9.07 : Mihkel Tõnnov -; -; -; -; -; -; -; -; -; -0 -7-Zip -Estonian -eesti keel -401 -OK -Loobu - - - -&Jah -&Ei -&Sulge -Abi - -&Jätka -440 -Kõigile j&ah -Kõigile e&i -Seiska -Restardi -&Taustal -&Esiplaanile -&Paus -Pausiks peatatud -Kas soovite kindlasti loobuda? -500 -&Fail -&Redigeeri -&Vaade -&Lemmikud -&Tööriistad -&Abi -540 -&Ava -Ava s&ees -Ava väljasp&ool -Vaat&ur -&Redigeeri -&Nimeta ümber -&Kopeeri asukohta... -&Teisalda asukohta... -Ku&stuta -Tükel&da fail... -Ü&henda failid... -Atri&buudid -Ko&mmentaar... -Arvuta kontrollsumma -Võrdle -Loo kaust -Loo fail -&Välju -600 -V&ali kõik -Tühista kõik valikud -&Pööra valik -Vali... -Tühista valik... -Vali tüübi järgi -Tühista tüübi järgi valik -700 -&Suured ikoonid -Väik&esed ikoonid -&Loend -Üksikasja&d -730 -Sortimata -Lame vaade -&Kaks paani -&Tööriistaribad -Ava juurkaust -Taseme võrra üles -Kaustaajalugu... -&Värskenda -750 -Arhiiviriistariba -Standardnupuriba -Suured nupud -Kuva nupusildid -800 -&Lisa kaust lemmikute hulka järjehoidjana -Järjehoidja -900 -&Häälestus... -&Jõudlustest -960 -&Sisukord... -&Teave 7-Zipi kohta... -1003 -Tee -Nimi -Laiend -Kaust -Maht -Maht tihendatult -Atribuudid -Loodud -Avatud -Muudetud -Ühtne -Kommenteeritud -Krüptitud -Tükeldatud enne -Tükeldatud pärast -Sõnastik -CRC -Tüüp -Anti -Meetod -Opsüsteem -Failisüsteem -Kasutaja -Rühm -Plokk -Kommentaar -Koht -Tee prefiks -Kaustu -Faile -Versioon -Köide -Mitmeköiteline -Nihe -Linke -Plokke -Köiteid - -64-bitine -Big-Endian -Protsessor -Füüsiline maht -Päiste maht -Kontrollsumma -Karakteristikud -Virtuaalaadress -ID -Lühinimi -Loomisrakendus -Sektori maht -Režiim -Link -Tõrge -Kogumaht -Vaba ruum -Klastri suurus -Silt -Kohalik nimi -Teenusepakkuja -2100 -Häälestus -Keel -Keel: -Redaktor -&Redaktor: -&Võrdlusprogramm: -2200 -Süsteem -Seosta 7-Zip laienditega: -2301 -Integreeri 7-Zip kesta hüpikmenüüsse -Kaskaad-hüpikmenüü -Hüpikmenüü käsud: -2320 - - -Ava arhiiv -Eralda failid... -Lisa arhiivi... -Testi arhiivi -Eralda siia -Eralda kausta {0} -Lisa arhiivi {0} -Tihenda ja meili... -Tihenda arhiiviks {0} ja meili -2400 -Kaustad -&Töökaust -&Süsteemi ajutiste failide kaust -&Praegune kaust -&Kasutaja määratud: -Kasuta ainult irddraivide puhul -Määrake ajutiste arhiivifailide asukoht. -2500 -Sätted -Kuva element ".." -Kuva tegelikud failiikoonid -Kuva süsteemimenüü -&Vali terve rida -Kuva &ruudujooned -Ava üksus ühe klõpsuga -&Alternatiivne valikurežiim -Kasuta &suuri mälulehekülgi -2900 -Teave 7-Zipi kohta -7-Zip on vaba tarkvara. Kuid kui soovite toetada 7-Zipi arendamist, siis saate programmi registreerida.\n\n7-Zipi Eesti koduleht:\nhttp://www.hot.ee/somberg/7zip.html -3000 -Süsteem ei saa eraldada nõutavat mälumahtu. -Vigu ei leitud. -{0} üksus(t) valitud -Ei saa luua kausta {0} -Selle arhiivi värskendamistoiminguid ei toetata. -Ei saa avada faili {0} arhiivina. -Ei saa avada krüptitud arhiivi {0}. Kas vale parool? -Toetamata arhiivitüüp. -Fail {0} on juba olemas. -Faili {0} on muudetud.\nKas soovite selle arhiivis värskendada? -Ei saa värskendada faili\n{0} -Ei saa käivitada redaktorit. -See fail sarnaneb viirusega (faili nimi sisaldab pikka tühikute jada). -Toimingut ei saa käivitada kaustast, millel on pikk tee. -Te peate valima ühe faili. -Te peate valima ühe või mitu faili. -Liiga palju üksusi. -3300 -välja eraldatud -tihendatud -Testimine -Avamine... -Läbivaatamine... -3400 -Väljaeraldamine -&Eralda välja kausta: -Määrake väljaeraldatud failide asukoht. -3410 -Teed -&Täielikud teenimed -Teenime&deta -3420 -Ülekirjutus -Küsi e&nne ülekirjutamist -Ki&rjuta küsimata üle -&Jäta olemasolevad failid vahele -Nimeta a&utomaatselt ümber -Nimeta &olemasolevad f. autom. ümber -3500 -Failiasenduse kinnitamine -Sihtkaust juba sisaldab töödeldavat faili. -Kas soovite asendada olemasoleva faili -selle failiga? -{0} baiti -Nimeta a&utomaatselt ümber -3700 -Toetuseta tihendusmeetod failile {0}. -Andmeviga failis {0}. Fail on rikutud. -Tsükkelkoodkontroll (CRC) failis {0} nurjus. Fail on rikutud. -Andmeviga krüptitud failis {0}. Kas vale parool? -Tsükkelkoodkontroll (CRC) krüptitud failis {0} nurjus. Kas vale parool? -3800 -Parooli sisestamine -Sisestage parool: -Parooli kordus: -&Kuva parool -Paroolid ei kattu. -Kasutage paroolis ainult inglise keele tähti, numbreid ja erimärke (!, #, $, ...). -Parool on liiga pikk. -&Parool -3900 -Kulunud aeg: -Järelejäänud aeg: -Kogumaht: -Kiirus: -Töödeldud: -Tihendussuhe: -Vigu: -Arhiive: -4000 -Arhiivi lisamine -&Arhiiv: -Värskend&usrežiim: -Arhiivi&vorming: -&Tihendusaste: -Tihendus&meetod: -Sõnaraamatu ma&ht: -&Sõna maht: -Ühtse ploki maht: -Protsessorilõimede arv: -Pa&rameetrid: -Suvandid -Loo is&eavanev arhiiv -Tihenda kirjutuseks avatud failid -Krüptimine -Krüptimismeetod: -Krüpti faili&nimed -Mälu hõivatus tihendamisel: -Mälu hõivatus hõrendamisel: -4050 -Tihenduseta -Kiireim tihendus -Kiirtihendus -Normaaltihendus -Maksimaaltihendus -Ultratihendus -4060 -Lisa ja asenda failid -Värskenda ja lisa failid -Värskenda olemasolevad failid -Sünkrooni failid -4070 -Sirvi -Kõik failid -Mitteühtne -Ühtne -6000 -Kopeerimine -Teisaldamine -Kopeeri asukohta: -Teisalda asukohta: -Kopeerimine... -Teisaldamine... -Ümbernimetamine... -Valige sihtkaust. -See toiming pole selles kaustas toetatud. -Tõrge faili või kausta ümbernimetamisel -Failikopeerimise kinnitamine -Kas soovite kindlasti kopeerida arhiivi järgmised failid: -6100 -Failikustutuse kinnitamine -Kaustakustutuse kinnitamine -Mitme faili kustutamise kinnitamine -Kas soovite kindlasti kustutada faili {0}? -Kas soovite kindlasti kustutada kausta {0} ja kogu selle sisu? -Kas soovite kindlasti kustutada need {0} üksust? -Kustutamine... -Tõrge faili või kausta kustutamisel -Süsteem ei saa teisaldada prügikasti pika teega faili. -6300 -Kausta loomine -Faili loomine -Kausta nimi: -Faili nimi: -Uus kaust -Uus fail -Tõrge kausta loomisel -Tõrge faili loomisel -6400 -- kommentaar -&Kommentaar: -Valimine -Valiku tühistamine -Mask: -6600 -Atribuudid -Kaustaajalugu -Diagnostikateated -Teade -7100 -Arvuti -Võrk -Dokumendid -Süsteem -7200 -Lisa -Eralda välja -Testi -Kopeeri -Teisalda -Kustuta -Teave -7300 -Faili tükeldamine: -&Tükelda asukohta: -&Tükelda köideteks (baitides): -Tükeldamine... -Tükeldamise kinnitamine -Kas soovite kindlasti tükeldada faili {0} köiteks? -Köite maht peab olema algfaili mahust väiksem. -Sobimatu köitemaht. -Määratud köitemaht: {0} baiti.\nKas soovite kindlasti tükeldada arhiivi niisugusteks köideteks? -7400 -Failide ühendamine: -Ü&henda asukohta: -Ühendamine... -Valige ainult tükeldatud faili esimene osa. -Ei õnnestu tuvastada, et see fail oleks tükeldatud faili osa. -Ei leia rohkem kui ühte tükeldatud faili osa. -7500 -Kontrollsumma arvutamine... -Kontrollsumma -Andmete CRC-kontrollsumma: -Andmete ja nimede CRC-kontrollsumma: -7600 -Jõudlustest -Mälu hõivatus: -Tihendamine -Hõrendamine -Hinnang -Üldine jõudlushinnang -Praegune: -Lõpptulemus: -CPU hõivatus -Hinnang/hõivatus -Töötiire: diff --git a/Utils/7-Zip/Lang/eu.txt b/Utils/7-Zip/Lang/eu.txt deleted file mode 100644 index e9be78746..000000000 --- a/Utils/7-Zip/Lang/eu.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; 15.12 : 2015-12-04 : Xabier Aramendi -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Basque -Euskara -401 -&Ongi -E&zeztatu - - - -&Bai -&Ez -It&xi -&Laguntza - -&Jarraitu -440 -Bai &Guztiari -Ez G&uztiari -Gelditu -Berrabiarazi -Ba&rrenean -&Gainean -&Pausatu -Pausatuta -Zihur zaude ezeztatzea nahi duzula? -500 -&Agiria -&Editatu -&Ikusi -&Gogokoenak -&Tresnak -&Laguntza -540 -&Ireki -Ireki &Barnean -Ireki &Kanpoan -Ik&usi -&Editatu -Berrize&ndatu -Kopiatu &Hona... -&Mugitu Hona... -E&zabatu -Banan&du agiria... -Nahas&tu agiriak... -Ezau&garriak -&Aipamena... -Ka&lkulatu egiaztapen-batura -Ezber -Sortu Agiritegia -S&ortu Agiria -I&rten -Lotura -&Aldikatu Jarioak -600 -Hautatu &Guztiak -Deshatutau G&uztiak -&Alderantzizkatu Hautapena -&Hautatu... -&Deshautatu... -Hautatu &Motaz -Deshautatu M&otaz -700 -Ikur &Handiak -Ikur Txi&kiak -&Zerrenda -&Xehetasunak -730 -Ant&olatugabe -Ik&uspegi Laua -&2 Panel -&Tresnabarrak -Ireki &Erro Agiritegia -Maila Bat &Gora -Agiritegi &Historia... -&Berritu -Be&rez Berritu -750 -Artxibo Tresnabarra -Tresnabarra Estandarra -Botoi Handiak -Erakutsi Botoien Idazkia -800 -&Gehitu agiritegia Gogokoenetara honela -Lastermarka -900 -A&ukerak... -&Benchmark -960 -&Edukiak... -&7-Zip Buruz... -1003 -Helburua -Izena -Luzapena -Agiritegia -Neurria -Pakete Neurria -Ezaugarriak -Sortua -Sartua -Aldatua -Solidoa -Aipatua -Enkriptatua -Banandu Aurretik -Banandu Ondoren -Hiztegia - -Mota -Anti -Metodoa -Hostalari SE -Agiri Sistema -Erabiltzailea -Taldea -Blokea -Aipamena -Kokapena -Helburu Aurrizkia -Agiritegiak -Agiriak -Bertsioa -Bolumena -Bolumen-anitz -Oreka -Loturak -Blokeak -Bolumenak - -64-bit -Big-endian -CPU -Neurri Fisikoa -Idazburu Neurria -Egiaztapen-batura -Ezaugarriak -Helbide Birtuala -ID-a -Izen Laburra -Aplikazio Sortzailea -Sektore Neurria -Modua -Lotura Sinbolikoa -Akatsa -Neurria Guztira -Toki Askea -Kluster Neurria -Etiketa -Tokiko Izena -Hornitzailea -NT Segurtasuna -Aldikatu Jarioa -Aux -Ezabatuta -Zuhaitza da - - -Akats Mota -Akatsak -Akatsak -Ohartarazpenak -Ohartarazpena -Jarioak -Aldikatu Jarioak -Aldikatu Jario Neurriak -Neurri Birtuala -Despaketatu Neurria -Neurri Fisikoa Guztira -Bolumen Aurkibidea -AzpiMota -Aipamen Labura -Kode Orrialdea - - - -Isats Neurria -Barneratutako Stub Neurria -Lotura -Lotura Gogorra -iNode - -Irakurtzeko-bakarrik -2100 -Aukerak -Hizkuntza -Hizkuntza: -Editatzailea -&Editatzailea: -E&zberdintasunak: -2200 -Sistema -Elkartu 7-Zip hauekin: -Erabiltzaile guztiak -2301 -&Bateratu 7-Zip shell hitzinguru menura -&Urjauzi hitzinguru menua -Hitzinguru menuko gaiak: -&Ikurrak hitzinguru menuan -2320 - - -Ireki artxiboa -Atera agiriak... -Gehitu &artxibora... -Aztertu artxiboa -Atera Hemen -Atera hona: {0} -Gehitu hona: {0} -Konprimitu eta &bidali post@z... -Konprimitu hona {0} eta bidali post@z -2400 -Agiritegiak -&Lan agiritegia -&Sistemaren aldibaterako agiritegia -&Oraingoa -A&dierazia: -&Erabili gidagailu kengarrientzat bakarrik -Adierazi aldibaterako artxibo agirientzako kokalekua -2500 -Ezarpenak -&Erakutsi ".." gai -E&rakutsi egizko agiriaren ikurrak -Erakutsi siste&maren menua -&Lerro osoko hautapena -Erakutsi &saretxo lerroak -&Klik-bakarra gai bat irekitzeko -A&ukerazko hautapen modua -Erabili &oroimen handiko orrialdeak -2900 -7-Zip buruz -7-Zip software askea da -3000 -Sistemak ezin du beharrezko oroimen kopurua esleitu -Ez dago akatsik -{0} objetu hautaturik -Ezin da '{0}' agiritegia sortu -Eguneratze eragiketak ez daude sostengaturik artxibo honentzat. -Ezinezkoa '{0}' agiria artxibo bezala irekitzea -Ezinezkoa '{0}' artxibo enkriptatua ireki. Sarhitz okerra? -Artxibo mota ez dago sostengatua -{0} agiria badago jadanik -'{0}' agiria aldatu egin da.\nArtxioboan eguneratzea nahi duzu? -Ezinezkoa agiria eguneratzea\n'{0}' -Ezin da editatzailea abiarazi. -Agiriak birus bat ematen du (agiri izenak tarte luzeak ditu izenean). -Eragiketa ezin da helburu luze bat duen agiritegi batetik deitu -Agiri bat hautatu behar duzu -Agiri bat edo gehiago hautatu behar dituzu -Gai gehiegi -Ezin da agiria {0} artxibo bezala ireki -Agiria {0} artxibo bezala dago irekita -Artxiboa orekaz irekita dago -3300 -Ateratzen -Konprimitzen -Aztertzen -Atzeratzen... -Mihatzen... -Kentzen -3320 -Gehitzen -Eguneratzen -Aztertzen -Erreplikatzen -Berpaketatzen -Jauzten -Ezabatzen -Idazburua sortzen -3400 -&Atera -Atera &hona: -A&dierazi ateratako agirientzako kokaleku bat. -3410 -Helburu mo&dua: -Helburu-izen osoak -Helburu-izenik ez -Helburu-izen absolutoak -Helburu-izen erlatiboak -3420 -Gainidazketa modua: -Galdetu gainidatzi aurretik -Gainidazi galdetu gabe -Jauzi dauden agiriak -Berez berrizendatu -Berez berrizendatu dauden agiriak -3430 -Ezabatu erro agiritegi bikoizketa -Leheneratu agiri segurtasuna -3500 -Baieztatu Agiri Ordeztea -Helmuga agiritegiak jadanik badu prozesatutako agiria. -Dagoen agiria ordeztea nahi duzu -beste honekin? -{0} byte -&Berez Berrizendatu -3700 -Konpresio metodo sostengatu gabea '{0}'-rako. -Datu akatsa '{0}'. Agiria hautsita dago. -CRC hutsegitea '{0}'. Agiria hautsita dago. -Datu akatsa '{0}' enkriptaturiko agirian. Sarhitz okerra? -CRC hutsegitea '{0}' enkriptaturiko agirian. Sarhitz okerra? -3710 -Sarhitz okerra? -3721 -Konpresio metodoa ez dago sostengatua -Datu akatsa -CRC hutsegitea -Datu eskuraezinak -Ustekabeko datu amaiera -Zenbait akats daude gertaketa amaieraren ondoren -Ez da artxiboa -Idazburu Akatsa -Sarhitz okerra -3763 -Artxibo hasiera eskuraezina -Artxibo hasiera baieztatugabe - - - -Ezaugarri sostengu gabea -3800 -Sartu sarhitza -Sartu sarhitza: -Bersartu sarhitza: -&Erakutsi sarhitza -Sarhitzak ez datoz bat -Erabili bakarrik Ingelerazko hizkiak, zenbakiak eta hizki bereziak (!, #, $, ...) sarhitzarentzat -Sarhitza luzeegia da -Sarhitza -3900 -Igarotako denbora: -Gelditzen den denbora: -Neurria guztira: -Abiadura: -Prozesatuta: -Konpresio maila: -Akatsak: -Artxiboak: -4000 -Gehitu artxibora -&Artxiboa: -Egu&neraketa modua: -Artxibo he&uskarria: -Konpre&sio maila: -Konpresio &metodoa: -&Hiztegi neurria: -Hi&tz neurria: -&Bloke solidoaren neurria: -&CPU hari zenbatekoa: -&Parametroak: -Aukerak -Sortu SF&X artxiboa -&Konprimitu elkarbanaturiko agiriak -Enkriptaketa -Enkriptaketa metodoa: -Enkriptatu agiri &izenak -Oroimen erabilera Konprimitzeko: -Oroimen erabilera Deskonprimitzeko: -Ezabatu agi&riak konprimitu ondoren -4040 -Biltegiratu lotura sinbolikoak -Biltegiratu lotura gogorrak -Biltegiratu aldikatu datu jarioak -Biltegiratu agiri segurtasuna -4050 -Biltegia -Azkarrena -Azkarra -Arrunta -Gehiena -Ultra -4060 -Gehitu eta ordeztu agiriak -Eguneratu eta gehitu agiriak -Berritu dauden agiriak -Aldiberetu agiriak -4070 -Bilatu -Agiri Denak -Ez-solidoa -Solidoa -6000 -Kopiatu -Mugitu -Kopiatu hona: -Mugitu hona: -Kopiatzen... -Mugitzen... -Berrizendatzen... -Hautatu helmuga agiritegia. -Eragiketa hau ez dago sostengatua agiritegi honentzat. -Akatsa Agiria edo Agiritegia Berrizendatzerakoan -Baieztatu Agiri Kopiatzea -Zihur zaude agiriak artxibora kopiatzea nahi dituzula -6100 -Baieztatu Agiri Ezabapena -Baieztatu Agiritegi Ezabapena -Baieztatu Agiri Anitz Ezabapena -Zihur zaude '{0}' ezabatzea nahi duzula? -Zihur zaude '{0}' agiritegia eta bere eduki guztiak ezabatzea nahi dituzula? -Zihur zaude {0} gai hauek ezabatzea nahi dituzula? -Ezabatzen... -Akatsa Agiria edo Agiritegia Ezabatzerakoan -Sistemak ezin du helburu luzeko agiria Birziklapen Ontzira mugitu -6300 -Sortu Agiritegia -Sortu Agiria -Agiritegi izena: -Agiri Izena: -Agiritegi Berria -Agiri Berria -Akatsa Agiritegia Sortzerakoan -Akatsa Agiria Sortzerakoan -6400 -Aipamena -&Aipamena: -Hautatu -Deshautatu -Mozorroa: -6600 -Ezaugarriak -Agiritegi Historia -Azterketa mezuak -Mezuak -7100 -Ordenagailua -Sarea -Agiriak -Sistema -7200 -Gehitu -Atera -Aztertu -Kopiatu -Mugitu -Ezabatu -Argibideak -7300 -Banandu Agiria -Banandu &hona: -Banandu &bolumenetan, byte: -Banantzen... -Baieztatu Banantzea -Zihur zaude agiria {0} bolumenetan banantzea nahi duzula? -Bolumen neurria jatorrizko agiriaren neurria baino txikiagoa izan behar da -Bolumen neurri okerra -Adierazitako bolumen neurria: {0} byte.\nZihur zaude artxiboa bolumenetan banantzea nahi duzula? -7400 -Nahastu Agiriak -&Nahastu hona: -Nahasten... -Hautatu bakarrik banantzeko agiriaren lehen atala -Ezin da agiria atzeman banandutako agiriaren atal bezala -Ezin da aurkitu banandutako agiriaren atal bat baino gehiago -7500 -Egiaztapen-batura kalkulatzen... -Egiaztapen-batura argibideak -CRC Egiaztapen-batura datuentzat: -CRC Egiaztapen-batura datu eta izenentzat: -7600 -Benchmark -Oroimen erabilpena: -Konprimitzen -Deskonprimitzen -Mailaketa -Mailaketa Guztira -Oraingoa -Emaitza -CPU Erabilpena -Mailaketa / Erabilpena -Pasaldiak: -7700 -Lotura -Lotura -Lotura hemendik: -Lotura hona: -7710 -Lotura Mota -Lotura Gogorra -Agiri Lotura Sinbolikoa -Zuzenbide Lotura Sinbolikoa -Zuzenbide Elkargunea diff --git a/Utils/7-Zip/Lang/ext.txt b/Utils/7-Zip/Lang/ext.txt deleted file mode 100644 index 469cd18f4..000000000 --- a/Utils/7-Zip/Lang/ext.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; : Miguel Angel -; 9.07 : Purgossu -; -; -; -; -; -; -; -; -; -0 -7-Zip -Extremaduran -Estremeñu -401 -Acetal -Cancelal - - - -&Sí -&Nu -&Fechal -Ayua - -A&continal -440 -Sí &a tó -Nu a &tó -Paral -Reinicial -Se&gundu pranu -&Primel pranu -&Paral -Parau -De siguru que quieri cancelal la operación? -500 -&Archivu -&Eital -&Vel -A&tihus -&Herramientas -A&yua -540 -&Abril -Abril &dentru -Abril &huera -&Vel -&Eital -Renom&bral -&Copial a... -&Movel pa... -&Eliminal -De&sapartal ficheru... -Com&binal ficherus... -P&ropieais -Come&ntariu -Calculal suma e verificación -Diff -Creal diretóriu -Creal ficheru -&Salil -600 -Selecional &tó -Deselecional tó -&Invertil seleción -Selecional... -Deselecional... -Selecional pol tipu -Deselecional pol tipu -700 -Iconus g&randis -Iconus caquerus -&Listau -&Detallis -730 -Nu soportau -Vista prana -&2 panelis -Barra e herramien&tas -Abril diretóriu raí -Subil un nivel -Estorial de diretórius... -&Atualizal -750 -Barra e herramientas 'archivu' -Barra e herramientas estándal -Botonis grandis -Muestral testu enus botonis -800 -&Añíl diretóriu a Atihus comu -Atihu -900 -&Ocionis... -&Prebas ('benchmark') -960 -&Contenius... -&Al tentu 7-Zip... -1003 -Ruta -Nombri -Estensión -Diretóriu -Tamañu -Tamañu comprimiu -Atributus -Creau'l -Úrtimu acesu -Escambiau'l -Sóliu -Comentau -Encrihtau -Desapartau enantis -Desapartau endispués -Izionáriu -CRC -Tipu -Anti -Métou -S.O. orihin -Sistema d'archivus -Usuariu -Grupu -Broqui -Comentariu -Posición -Prefihu la ruta -Diretórius -Ficherus -Velsión -Volumin -Murtivolumin -Desprazamientu -Enlacis -Broquis -Volúmenis - -64-bit -Big-endian -UCP -Tamañu físicu -Tamañu las cabiceras -Suma e cumprebación -Caraterísticas -Direción virtual -ID -Nombri cortu -Apricación criaora -Tamañu el setol -Mou -Enlaci -Yerru -Tamañu total -Espaciu dispunibri -Tamañu el 'cluster' -Etiqueta -Nombri local -Proveol -2100 -Ocionis -Palra -Palra: -Eitol -&Eitol: -&Diff: -2200 -Sistema -Asocial 7-Zip a hormatus: -2301 -Integral 7-Zip nel menú contestual -Menú contestual en cascá -Elementus del menú contestual: -2320 - - -Abril archivu -Estrayel ficherus... -Añíl al archivu... -Comprebal archivu -Estrayel aquina -Estrayel en {0} -Añiil a {0} -Comprimil i envial pol correu-e... -Comprimil en {0} i envial pol correu -2400 -Diretórius -Diretóriu e labu&tu -Diretóriu temporal del &sistema -Diretóriu &ahtual -&Especifical: -Usal sólu pa dispositivus estrayíbris -Especifical ruta pa ficherus d'archivus temporalis. -2500 -Configuración -Muestral l'elementu \.." -Muestral icunus propius del ficheru -Muestral menú el sistema -&Selecional fila(s) enteriza(s) -Muestral línias e la &cuairícula -'Click' únicu p'abril un elementu -Móu e seleción &alternativu -Usa&l páhinas de memoria grandis -2900 -About 7-Zip -7-Zip es una apricación libri i a gastus pagus. Peru puei apoyal el desarrollu e 7-Zip meyanti'l rehistru el pograma. -3000 -El sistema nu á síu escapás d'asinal la cantiá prehisa de memoria -Sin yerrus -{0} elementu(s) selecionaus -Nu s'á puiu crial el diretóriu '{0}' -Nu se puei atualizal esti tipu d'archivu. -Nu s'á puiu abril '{0}' comu archivu -Nu s'a puiu abril l'archivu encritau '{0}'. Conseña yerronia? -Tipu archivu nu suportau -File {0} is already exist -El ficheru '{0}' á síu moificau.\nAtualizalu nel archivu? -Nu s'á puíu atualizal l'archivu\n'{0}' -Nu s'á puíu ehecutal el eitol. -El ficheru pahi un virus (el nombri'l ficheru contieni espacius largus nel nombri). -Nu puei realizasi la operación dendi un diretóriu que tenga una ruta larga. -You must select one file -You must select one or more files -Ai elementus en demasía -3300 -Estrayendu -Comprimiendu -Comprebandu -Abriendu... -Escaneandu... -3400 -Estrayel -E&strayel a: -Especifical destinu palus ficherus estrayíus. -3410 -Mou e ruta -Ruta compreta -Sin ruta -3420 -Mou e sobrescrebil -Preguntal enantis -Sobrescrebil sin preguntal -Conserval ficherus esistentis -Renombral de horma automática -Autu-renombral ficherus esistentis -3500 -Confirmal remprazu de ficherus -El diretóriu ya contieni un ficheru el mesmu nombri. -Escambial el ficheru esistenti -pol esti otru? -{0} bytes -Escambial nombri a&utomáticamenti -3700 -Métou e compresión nu soportau pa '{0}'. -Yerru datus en '{0}'. El ficheru está changarrau. -Yerru e CRC '{0}'. El ficheru está changarrau. -Yerru e datus nel ficheru encritau '{0}'. Conseña yerrónia? -Yerru e CRC nel ficheru encritau '{0}'. Conseña yerrónia? -3800 -Introuzil conseña -Introuzil conseña: -Repitil conseña: -Mue&stral conseña -Las cunseñas nu coinciín -Usi sólu letras ingresas, númirus i caráteris especialis (!, #, $, ...) pala conseña -La conseña tieni largura'n demasía -Conseña -3900 -Tiempu trascurríu: -Tiempu restanti: -Tamañu total: -Velociá: -Procesau: -Tasa e compresión: -Yerrus: -Archivus: -4000 -Añiil a archivu -&Archivu: -&Mou d'atualización: -&Hormatu d'archivu: -Nive&l de compresión: -Mé&tou e compresión: -Tamañu el i&zionariu: -Tama&ñu e parabra: -Tamañu el bloqui sóliu: -Númiru hilus e la UCP: -&Parámetrus: -Ocionis -Creal archivu 'SF&X' -Comprimil ficherus compartíus -Encritación -Métou encritación: -Encrital &nombris de ficheru -Usu e memoria pa compresión: -Usu e memoria pa decompresión: -4050 -Almacenal -La más respahila -Respahila -Normal -Másima -Ultra -4060 -Añiil i remprazal ficherus -Atualizal i añiil ficherus -Atualizal sólu ficherus esistentis -Sincronizal ficherus -4070 -Esproral -Tolos ficherus -Nu sóliu -Sóliu -6000 -Copial -Movel -Copial a: -Movel pa: -Copiandu... -Moviendu... -Renombrandu... -Selecional diretóriu destinu. -Operación nu soportá. -S'alcuentrau'n yerru al renombral el ficheru u diretóriu -Confirmal copia el ficheru -De siguru que quieri copiar estus ficherus al archivu? -6100 -Confirmal eliminación del ficheru -Confirmal eliminación del direhtoriu -Confirmal eliminación de varius ficherus -De siguru que quieri eliminal '{0}'? -De siguru que quieri eliminal el diretóriu '{0}' i tol su conteniu? -De siguru que quieri eliminal estus {0} elementus? -Eliminandu... -S'alcuentrau'n yerru al eliminal el ficheru u diretóriu -El sistema nu puei movel un ficheru con ruta larga a la Papelera Recicrahi -6300 -Creal diretóriu -Creal ficheru -Nombri e diretóriu: -Nombri el ficheru: -Nuevu diretóriu -Nuevu ficheru -S'alcuentrau'n yerru al creal el diretóriu -S'alcuentrau'n yerru al creal el ficheru -6400 -Comentáriu -&Comentáriu: -Selecional -Deselecional -Máscara: -6600 -Propieais -Estorial de diretórius -Mensahis de dianósticu -Mensahi -7100 -Mi PC -Entorno de red -Documentos -Sistema -7200 -Añiil -Estrayel -Comprebal -Copial -Movel -Eliminal -Inhormazión -7300 -Desapartal ficheru -&Desapartal a: -Desapartal en &balandronis, 'bytes': -Desapartandu... -Confirmal desapartamientu -De siguru que quieri desapartal el ficheru'n {0} volúmenis? -El tamañu lus volúmenis debi sel mas caqueru que'l del ficheru orihinal -Tamañu el volumin nu váliu -Introuza'l tamañu el volumin: {0} 'bytes'.\nDe siguru que quieri desapartal l'archivu'n tantus volúmenis? -7400 -Uñil ficherus -&Uñil en: -Uñiendu... -Selecional sólu'l primel ficheru -Nu s'á puíu detetal el ficheru comu parti d'un ficheru desapartau -Nu s'á puíu alcuentral más d'un balandrón del ficheru desapartau -7500 -Calculandu la suma e verificación... -Inhormazión de suma e verificación -Suma e verificación de 'CRC' pala inhormazión: -Suma e verificación de 'CRC' pala inhormazión i lus nombris: -7600 -Prebas ('benchmark') -Usu e memoria: -Comprimiendu -Comprimiendu -Razón -Razón total -Atual -Resurtau -Usu e CPU -Razón / Usu -Pasis: diff --git a/Utils/7-Zip/Lang/fa.txt b/Utils/7-Zip/Lang/fa.txt deleted file mode 100644 index c524ed468..000000000 --- a/Utils/7-Zip/Lang/fa.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 3.12 : Edris Naderan -; 4.53 : Mehdi Farhadi -; 9.22 : Hessam Mohamadi -; -; -; -; -; -; -; -; -0 -7-Zip -Farsi -فارسی -401 -تایید -لغو - - - -بله&ه -&خیر -بستن -راهنما - -ادامه -440 -بله روی همه -نه روی همه -توقف -ریستارت -پس زمینه -پیش زمینه -وقفه -متوقف -آیا میخواهید عملکرد را لغو میکنید؟ -500 -فایل -ویرایش -مشاهده -موردعلاقه ها -ابزارها -راهنما -540 -بازکردن -بازکردن از داخل -بازکردن از خارج -مشاهده -ویرایش -تغییرنام -کپی به... -انتقال به... -حذف -تقسیم فایل... -ادغام فایل.. -مشخصات -توضيح.. -محاسبه مجموع مقابله ای -مقایسه گر -ایجاد پوشه -ایجاد فایل -خروج -600 -انتخاب همه -لغو انتخاب‌ همه -انتخاب معکوس -انتخاب... -لغو انتخاب... -انتخاب بر حسب نوع -لغو انتخاب بر حسب نوع -700 -آیکون‌ بزرگ -آیکون‌ کوچک -لیست -جزئیات -730 -نامرتب -مشاهده یکنواخت -2 پانل -نوارابزارها -بازکردن ریشه پوشه -یک مرحله به بالا -تاریخچه پوشه ها.. -تازه کردن -750 -نوارابزار آرشیو -نوارابزار استاندارد -دکمه بزرگ -نمایش متن دکمه ها -800 -افزودن پوشه به مورد علاقه بعنوان -بوکمارک -900 -گزینه ها.. -سنجش -960 -محتویات.. -درباره برنامه.. -1003 -مسیر -نام -پسوند -پوشه -حجم -حجم فشرده شده -صفات -ساخته شده -دستیابی شده -تغییر یافته -یکدست -توضیح دار -رمزگذاری شده -تقسیم قبل از -تقسیم بعد از -لغت نامه -سی آر سی -نوع -Anti -روش -سیستم میزبان -فایل سیستمی -کاربر -گروه -بلوک -توضيح‌ -موقعیت -مسیر پیشوند -پوشه ها -فایل ها -نسخه -بخش -چند بخشی -آفست -لینک -بلوک ها -بخش ها - -64 بیت -Big-endian -پردازنده -حجم فیزیکی -حجم سرساز ها -مجموع مقابله ای -خصوصیات -آدرس مجازی -شناسه -نام کوتاه -سازنده برنامه -حجم قطاع -حالت -لینک -خطا -مجموع حجم -فضای خالی -حجم کلاستر -برچسب -نام محلی -ارائه دهنده -2100 -گزینه ها -زبان -زبان: -ویرایشگر -ویرایشگر: -مقایسه گر: -2200 -سیستم -وابسته سازی برنامه با: -2301 -افزودن منوی برنامه به منوی ویندوز -منوها به صورت آبشاری در یک منو -آیتم های منوی برنامه: -2320 -<پوشه> -<آرشیو> -بازکردن آرشیو -استخراج فایل‌ها... -افزودن به آرشیو... -تست آرشیو -استخراج در اینجا -استخراج به {0} -افزودن به {0} -فشرده سازی و ارسال با ایمیل... -فشرده‌سازی در {0} و ارسال با ایمیل -2400 -پوشه ها -پوشه در حال کار -پوشه موقت سیستم -فعلی -مشخص کنید: -فقط برای درایوهای پرتابل استفاده شود -یک مکان برای فایل های موقتی آرشیو مشخص کنید -2500 -تنظیمات -نمایش آیتم ".." -نمایش آیکون واقعی فایل -نمایش منوی سیستم -انتخاب سطر به طور کامل -نمایش خطوط توری -تک کلیک برای بازکردن یک آیتم -حالت انتخاب جايگزين -استفاده از صفحات حافظه حجیم -2900 -درباره برنامه -برنامه‌ای که در پیش رو دارید یک برنامه رایگان است، اما شما می توانید با پرداخت مبلغی جزئی به توسعه این نرم‌افزار کمک کنید. -3000 -سیستم مقدار حافظه موردنیاز را نمیتواند اختصاص دهد -خطایی وجود ندارد -{0} آیتم انتخاب شده -ایجاد پوشه '{0}' ممکن نیست -عملکرد بروزرسانی برای این آرشیو بروزرسانی نمیشود -فایل '{0}' را بعنوان یک آرشیو نمیتوان باز کرد -آرشیو رمزگذاری شده '{0}' را نمیتوان باز کرد.رمزعبور اشتباه است؟ -نوع آرشیو پشتیبانی نشده -فایل {0} از قبل موجود است -فایل '{0}' تغییر کرده است.\n آیا میخواهید این فایل در آرشیو بروزرسانی شود؟ -این فایل قابل بروزرسانی نمی‌باشد\n'{0}' -ویرایشگر را نمیتوان اجرا کرد -فایل شبیه ویروس است (نام فایل حاوی فضای بلندی در نام هست). -عملکرد نمیتواند از پوشه ای که مسیر بلند دارد فراخوانی شود -شما باید یک فایل انتخاب کنید -شما باید یک یا تعداد بیشتری فایل انتخاب کنید -تعداد آیتم ها بسیار زیاد است -3300 -در حال استخراج -فشرده سازی -تست -درحال بازکردن.. -در حال اسکن.. -3400 -استخراج -استخراج به: -یک مکان برای فایل های استخراج شده تعیین کنید -3410 -نوع مسیر -نام مسیر کامل -بدون نام مسیر -3420 -حالت جایگزینی -پرسش قبل از جایگزینی -جایگزینی بدون اخطار -چشمپوشی فایل‌های موجود -تغییرنام خودکار -تغییرنام خودکار فایل های موجود -3500 -تایید جایگزینی فایل -پوشه مقصد از قبل حاوی فایل در حال پردازش هست -آیا میخواهید فایل موجود با -این یکی جایگزین شود؟ -{0} بایت -تغییرنام خودکار -3700 -روش فشرده سازی برای '{0}' پشتیبانی نشذه است -خطای داده در '{0}'. اين فايل شکسته هست -سی آر سی در '{0}' موفق نشد.فایل شکسته هست -خطای داده در فايل رمزگذارى شده '{0}'. رمزعبور اشتباه است؟ -سی آر سی در فایل رمزگذاری شده '{0}' موفق نشد.رمزعبور اشتباه است -3800 -رمزعبور -رمزعبور: -تكرار رمزعبور: -نمایش رمزعبور -رمزعبورها یکسان نیست -فقط از حروف انگليسى، اعداد و علامت‌هاى خاص (!، #، $، ...) در رمزعبور استفاده كنيد -رمزعبور خیلی بلند است -رمزعبور -3900 -زمان سپری شده: -زمان باقیمانده: -مجموع حجم: -سرعت: -پردازش شده: -نسبت فشرده سازی: -خطاها: -آرشیو‌: -4000 -افزودن به آرشیو -آرشیو: -حالت بروزرسانی: -فرمت آرشیو: -ميزان فشرده‌سازی: -روش فشرده سازی: -حجم لغت نامه: -اندازه لغت: -حجم بلوک یکدست: -تعداد هسته پردازنده -پارامترها: -گزینه ها -ایجاد ارشیو خوداستخراجگر -فشرده سازی فایل های مشترک درسایر برنامه ها -رمزگذاری -روش رمزگذاری: -رمزگذاری نام فایل ها -حافظه مصرفی برای فشرده سازی: -حافظه مصرفی برای استخراج: -4050 -ذخیره -سریعترین -سریع -عادی -حداکثر -مافوق -4060 -افزودن و جایگزینی فایل ها -بروزرسانی و افزودن فایل ها -تازه کردن فایل های موجود -همگامسازی فایل ها -4070 -جستجو -همه فایل ها -غیر-یکدست -یکدست -6000 -کپی -انتقال -کپی به: -انتقال به: -در حال کپی... -در حال انتقال... -تغییرنام... -پوشه مقصد را انتخاب كنيد -عملکرد برای این پوشه پشتیبانی نمیشود -خطای تغییر نام فایل یا پوشه -تایید کپی فایل -آیا میخواهید فایل ها را به ارشیو کپی کنید -6100 -تایید حذف فایل -تایید حذف پوشه -تایید حذف فایل ها -آیا میخواهید '{0}' را حذف کنید؟ -آیا میخواهید پوشه '{0}' و همه محتویات آن را حذف کنید؟ -آیا میخواهید این {0} آیتم را حذف کنید؟ -در حال حذف... -خطای حذف فایل یا پوشه -سیستم فایل با مسیر بلند را نمیتواند به سطل زباله انتقال دهد -6300 -ایجاد پوشه -ایجاد فایل -نام پوشه: -نام فایل: -پوشه جدید -فایل جدید -خطای ایجاد پوشه -خطای ایجاد فایل -6400 -توضيح -توضيح: -انتخاب -لغو انتخاب -ماسك: -6600 -مشخصات -تاریخچه پوشه‌ها -پیغام‌های تشخيصی -پیام -7100 -رایانه -شبکه -اسناد -سیستم -7200 -افزودن -استخراج -تست -کپی -انتقال -حذف -اطلاعات -7300 -تقسیم فایل -تقسیم در: -تقسیم به چندین بخش،برحسب بایت: -در حال تقسیم... -تاييد تقسیم فایل -آیا میخواهید اين فايل را به {0} بخش تقسيم كنيد؟ -حجم بخش ها باید کوچکتر از اندازه فایل اصلی باشد -حجم بخش نادرست است -حجم بخش های مشخص شده: {0} بايت.\nآیا میخواهید آرشيو را به بخش هایی به اين اندازه تقسيم كنيد؟ -7400 -ادغام فایل ها -ادغام در: -در حال ادغام... -فقط اولین بخش فایل را انتخاب کنید -فایل را نمی تواند بعنوان فایل تقسیمی تشخیص دهد -بیشتر از یک بخش از فایل تقسیمی را نمیتواند پیدا کند -7500 -محاسبه مجموع مقابله ای.. -اطلاعات مجموع مقابله ای -مجموع مقابله ای سی آر سی برای داده: -مجموع مقابله ای سی آر سی برای داده و نام: -7600 -سنجش -حافظه مصرفی: -فشرده سازی -استخراج -رتبه بندی -رتبه بندی کلی: -فعلی -دستاورد -مصرف پردازنده -رتبه بندی / مصرف -تعداد عبور: diff --git a/Utils/7-Zip/Lang/fi.txt b/Utils/7-Zip/Lang/fi.txt deleted file mode 100644 index c40152594..000000000 --- a/Utils/7-Zip/Lang/fi.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; 3.08 : Ari Ryynanen -; 4.30 : Jarko P. -; 4.42 : Juhani Valtasalmi -; 9.35b : T.Sakkara -; 15.05 : 2015-08-07 : Lauri Kenttä -; -; -; -; -; -; -0 -7-Zip -Finnish -Suomi -401 -OK -Peruuta - - - -&Kyllä -&Ei -&Sulje -Ohje - -&Jatka -440 -Kyllä k&aikkiin -E&i kaikkiin -Pysäytä -Aloita uudelleen -&Tausta-ajona -&Normaali prioriteetti -&Pysäytä -Pysäytetty -Keskeytetäänkö toiminto? -500 -&Tiedosto -&Muokkaa -&Näytä -&Suosikit -Työ&kalut -&Ohje -540 -&Avaa -Avaa s&isäisesti -Avaa ulkoisesti -&Näytä -&Muokkaa -Nimeä &uudelleen -&Kopioi... -&Siirrä... -&Poista -&Jaa osiin... -&Yhdistä jaetut... -&Ominaisuudet -Ku&vaus -Laske tarkiste -Erot -Luo kansio -Luo tiedosto -&Lopeta -Linkitä -Vaihtoehtoiset tietovirrat -600 -V&alitse kaikki -Poista &valinnat -&Käänteinen valinta -Valitse... -Poista valinta... -Valitse lajeittain -Poista valinta lajeittain -700 -Suu&ret kuvakkeet -&Pienet kuvakkeet -&Luettelo -&Tiedot -730 -Alkuperäinen järjestys -Kansioiden sisältö luetteloituna -&Kaksi panelia -&Työkalupalkki -Avaa pääkansio -Avaa yläkansio -Kansiohistoria... -P&äivitä -Automaattipäivitys -750 -Pakettipalkki -Vakiopalkki -Suuret painikkeet -Näytä painiketekstit -800 -&Lisää kansio Suosikkeihin -Kirjanmerkki -900 -&Asetukset... -&Nopeustesti -960 -&Sisältö... -&Tietoja ohjelmasta... -1003 -Polku -Nimi -Pääte -Kansio -Koko -Pakattu koko -Määritteet -Luotu -Käytetty -Muokattu -Kiinteä -Kuvailtu -Suojaus -Jaa ennen -Jaa jälkeen -Sanakirja -Tarkiste -Laji -Vastakohta -Menetelmä -Isäntäjärjestelmä -Tiedostojärjestelmä -Käyttäjä -Ryhmä -Lohkoja -Kuvaus -Kohta -Polun etuliite -Kansioita -Tiedostoja -Versio -Nimi -Jaettu osiin -Siirtymä -Linkit -Lohkot -Nimet - -64-bittinen -Big-endian -Suoritin -Fyysinen koko -Otsikon koko -Tarkiste -Ominaisuudet -Näennäisosoite -ID -Lyhyt nimi -Luontisovellus -Sektorikoko -Tila -Symbolinen linkki -Virhe -Aseman koko -Vapaata tilaa -Varausyksikön koko -Nimi -Paikallinen nimi -Palveluntarjoja -NT-suojaukset -Vaihtoehtoinen tietovirta -Muu -Poistettu -On kansiorakenne - - -Virhelaji -Virheet -Virheet -Varoitukset -Varoitus -Tietovirrat -Vaihtoehtoiset tietovirrat -Vaihtoehtoisten tietovirtojen koko -Näennäiskoko -Pakkaamaton koko -Fyysinen koko -Aseman indeksi -Alilaji -Kuvaus -Koodisivu - - - -Loppupään koko -Upotetun segmentin koko -Linkki -Kiinteä linkki -iNode - -Vain luku -2100 -Asetukset -Kieli -Kieli: -Muokkausohjelmat -&Tekstieditori: -&Erojen etsintä: -2200 -Järjestelmäliitännät -Liitä 7-Zip seuraaviin tiedostotyypeihin: -Kaikki käyttäjät -2301 -Liitä 7-Zip järjestelmän valikoihin. -Ryhmitetty järjestelmävalikko -Järjestelmävalikon sisältö: -Näytä järjestelmävalikon kuvakkeet -2320 - - -Avaa -Pura... -Lisää pakettiin... -Eheystarkastus -Pura tänne -Pura kansioon {0} -Lisää pakettiin {0} -Pakkaa tiedostot ja lähetä... -Lisää pakettiin {0} ja lähetä -2400 -Kansiot -&Työkansio -&Järjestelmän väliaikaiskansio -&Nykyinen kansio -&Valittu kansio: -Käytä vain siirrettäville tietovälineille -Määritä väliaikaistiedostojen sijainti. -2500 -Tiedostoikkuna -Näytä &yläkansion symboli -Näytä &aidot tiedostokuvakkeet -Näytä &järjestelmävalikko -&Valitse koko rivi -Näytä &ruudukko -Avaa &kertanapsautuksella -Vaihtoehtoinen valintojen &esitystapa -Käytä &suuria muistisivuja -2900 -Tietoja -7-Zip on ilmaisohjelmisto. -3000 -Ei riittävästi muistia toimintoa varten -Ei virheitä. -{0} tiedosto(a) valittu -Ei voida luoda kansioita '{0}.' -Tätä pakettia ei voi päivittää. -Tiedoston '{0}' pakkausta ei voi purkaa. -Ei voi avata suojattua pakettia '{0}'. Väärä salasana? -Pakkaustapaa ei tueta -Tiedosto {0} on jo olemassa -Tiedostoa '{0}' on muutettu.\nHaluatko päivittää paketin? -Ei voida päivittää tiedostoa \n'{0}'. -Editoria ei voida käynnistää. -Tiedosto vaikuttaa haittaohjelmalta, sillä sen nimi sisältää peräkkäisiä välilyöntejä. -Toimintoa ei voi suorittaa kansiosta, jonka nimi on pitkä. -Valitse yksi tiedosto -Valitse vähintään yksi tiedosto -Liian monta kohdetta. -Ei voida avata tiedostoa {0}-pakettina -Tiedosto on avattu {0}-pakettina -Paketti on auki eri alkukohdasta (offset) -3300 -Puretaan paketti -Lisätään pakettiin -Eheystarkistus -Avataan... -Etsitään... -Poistetaan -3320 -Lisätään -Päivitetään -Analysoidaan -Kopioidaan -Pakataan uudestaan -Ohitetaan -Poistetaan -Luodaan otsikkoa -3400 -Pura -&Pura kansioon -Määritä puretuille tiedostoille sijainti. -3410 -Polut: -Täydet polut -Ei polkuja (vain nimi) -Absoluuttiset polut -Suhteelliset polut -3420 -Samannimiset tiedostot: -Kysy tapauskohtaisesti -Korvaa -Ohita -Uudelleennimeä automaattisesti -Uudelleennimeä entiset automaattisesti -3430 -Estä pääkansion kahdennus -Palauta tiedostojen suojaukset -3500 -Vahvista tiedoston korvaus -Kansiossa on jo samanniminen tiedosto. -Korvataanko aiempi tiedosto -tällä tiedostolla? -{0} tavua -&Uudelleennimeä automaattisesti -3700 -Tiedoston '{0}' pakkaustapaa ei tueta. -Sisältövirhe tiedostossa '{0}'. Tiedosto on viottunut. -Tiedoston '{0}' eheystarkistus epäonnistui. Tiedosto on vioittunut. -Virhe avattaessa suojattua tiedostoa '{0}'. Väärä salasana? -Tarkistevirhe avattaessa suojattua tiedostoa '{0}'. Väärä salasana? -3710 -Väärä salasana? -3721 -Pakkaustapaa ei tueta -Sisältövirhe -Tarkistevirhe -Sisältö ei ole käytettävissä -Sisällön ennenaikainen loppuminen -Varsinaisen tietosisällön jälkeen on ylimääräistä sisältöä -Tiedosto ei ole pakattu -Otsikkovirhe -Väärä salasana -3763 -Pakkauksen alku ei käytettävissä -Pakkauksen alkua ei vahvistettu - - - -Toiminto ei tuettu -3800 -Syötä salasana -Syötä salasana: -Toista salasana: -Näytä &salasana -Salasanat eivät täsmää -Salasanassa voi käyttää numeroita ja erikoismerkkejä, mutta EI skandinaavisia kirjaimia. -Liian pitkä salasana -Salasana -3900 -Aikaa kulunut: -Aikaa jäljellä: -Koko: -Nopeus: -Käsitelty: -Pakkaussuhde: -Virheitä: -Paketteja: -4000 -Lisää pakettiin -&Paketti: -&Päivitystapa: -Pakkaus&: -Pakkauksen &taso: -Pakkaus&menetelmä: -&Sanakirjan koko: -&Sanan koko: -Lohkokoko -Prosessorisäikeet: -&Parametrit: -Lisäasetukset -Luo itsepurkautuva paketti -Pakkaa yhteiset tiedostot -Suojaus -Salausalgoritmi -Tiedosto&nimien suojaus -Pakkaamiseen käytettävä muisti: -Purkamiseen käytettävä muisti: -Poista pakkauksen jälkeen -4040 -Tallenna symboliset linkit -Tallenna kiinteät linkit -Tallenna vaihtoehtoiset tietovirrat -Tallenna tiedostojen suojaukset -4050 -Ei pakkausta -Nopein -Nopea -Normaali -Maksimi -Ultra -4060 -Lisää ja korvaa -Päivitä ja lisää -Päivitä -Synkronoi -4070 -Selaa -Kaikki tiedostot -Muuttuva -Kiinteä -6000 -Kopioi -Siirrä -Kopioi kansioon: -Siirrä kansioon: -Kopioidaan... -Siirretään... -Nimetään uudelleen... -Valitse kohdekansio. -Toiminto ei ole tuettu. -Virhe uudelleennimettäessä tiedostoa tai kansiota -Vahvista tiedoston kopioiminen -Kopioidaanko tiedostot pakettiin -6100 -Vahvista tiedoston poisto -Vahvista kansion poisto -Vahvista useiden kohteiden poisto -Poistetaanko tiedosto '{0}'? -Poistetaanko kansio '{0}' ja kaikki sen sisältö? -Poistetaanko nämä {0} kohdetta? -Poistetaan... -Virhe poistettaessa tiedostoa tai kansiota -Roskakoriin ei voida siirtää tiedostoa, jolla on pitkä nimi -6300 -Luo uusi kansio -Luo uusi tiedosto -Kansion nimi: -Tiedostonimi: -Uusi kansio -Uusi tiedosto -Virhe luotaessa kansiota -Virhe luotaessa tiedostoa -6400 -Kuvaus -&Kuvaus: -Valitse -Poista valinta -Maski: -6600 -Ominaisuudet -Kansiohistoria -Tietoja -Viesti -7100 -Tietokone -Verkko -Dokumentit -Järjestelmä -7200 -Lisää -Pura -Eheystarkistus -Kopioi -Siirrä -Poista -Ominaisuudet -7300 -Jaa tiedosto osiin -&Jaa kansioon: -&Osien koko jaettaessa: -Jaetaan osiin... -Vahvista jakaminen. -Jaetaanko tiedosto {0} osaan? -Jaetun osan koon pitää olla alkuperäistä pienempi. -Jaetun osan koko ei kelpaa -Jaettavien osien koko: {0} tavua.\nJaetaanko tiedosto sen kokoisiin osiin? -7400 -Yhdistä jaetut tiedostot -&Yhdistä kansioon: -Yhdistetään... -Valitse jaetusta tiedostosta vain ensimmäinen osa -Tiedosto ei ole jaetun tiedoston osa -Jaetun tiedoston osista löydettiin vain yksi -7500 -Lasketaan tarkiste... -Tarkisteet -Sisällön tarkiste: -Sisällön ja tiedostonimien tarkiste: -7600 -Nopeustesti -Muistin käyttö: -Pakkaaminen -Purkaminen -Luokitus -Kokonaisluokitus -Nykyinen -Tulos -Suoritinkäyttö -Luokitus / käyttö -Läpäisty: -7700 -Linkitys -Linkitä -Linkitys kohteesta: -Linkitys kohteeseen: -7710 -Linkkilaji -Kiinteä linkki -Symbolinen tiedostolinkki -Symbolinen kansiolinkki -Kansioliitos diff --git a/Utils/7-Zip/Lang/fr.txt b/Utils/7-Zip/Lang/fr.txt deleted file mode 100644 index fa661c7a0..000000000 --- a/Utils/7-Zip/Lang/fr.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.07 : Nicolas Sierro -; 9.07 : Philippe Berthault -; 15.14 : Sylvain St-Amand (SSTSylvain) -; -; -; -; -; -; -; -; -0 -7-Zip -French -Français -401 -OK -Annuler - - - -&Oui -&Non -&Fermer -Aide - -&Continuer -440 -Oui pour &Tous -Non pour T&ous -Arrêter -Redémarrer -&Arrière-plan -P&remier plan -&Pause -En pause -Êtes-vous sur de vouloir annuler ? -500 -&Fichier -&Édition -Affic&hage -Fa&voris -&Outils -&Aide -540 -&Ouvrir -Ouvrir à l'&intérieur -Ouvrir à l'e&xtérieur -&Voir -&Édition -Reno&mmer -&Copier vers... -&Déplacer vers... -S&upprimer -Diviser le &fichier... -Combiner les fic&hiers... -P&ropriétés -Comme&ntaire... -Somme de contrôle -Diff -Créer un dossier -Créer un fichier -&Quitter -Lien -Flux &Alternatif -600 -Sélectionner &Tout -Désélectionner Tout -&Inverser la Sélection -Sélectionner... -Désélectionner... -Sélectionner par Sorte -Désélectionner par Sorte -700 -&Grandes Icônes -&Petites Icônes -&Liste -&Détails -730 -Non trié -Vue à plat -&2 Fenêtres -&Barres d'outils -Ouvrir le dossier racine -Dossier parent -Historique des dossiers... -Actualis&er -Actualiser Automatiquement -750 -Barre d'Archive -Barre Standard -Grands Boutons -Montrer le texte des Boutons -800 -&Ajouter le répertoire aux Favoris -Signet -900 -&Options... -&Test de performance -960 -&Contenu... -À &propos de 7-Zip... -1003 -Chemin -Nom -Extension -Dossier -Taille -Compressé -Attributs -Créé le -Accédé le -Modifié le -Solide -Commentaire -Chiffrer -Diviser Avant -Diviser Après -Dictionnaire - -Sorte -Anti -Méthode -OS hôte -Système de Fichiers -Utilisateur -Groupe -Bloc -Commentaire -Position -Préfixe -Dossiers -Fichiers -Version -Volume -Multivolume -Offset -Liens -Blocs -Volumes - -64 bits -Big-endian -CPU -Taille physique -Taille des en-têtes -Somme de contrôle -Caractéristiques -Adresse virtuelle -ID -Nom court -Application créatrice -Taille de secteur -Mode -Lien Symbolique -Erreur -Taille Totale -Espace Libre -Taille des clusters -Nom de volume -Nom local -Fournisseur -Sécurité NT -Flux alternatif -Aux -Effacer -En Arbre - - -Type d'erreur -Erreurs -Erreurs -Avertissements -Avertissement -Flux -Flux Alterné -Grosseur du Flux Alterné -Grosseur Virtuel -Grosseur Décompressé -Grosseur Physique Totale -Indexe du Volume -Sous-Type -Commentaire Bref -Code Page - - - -Grosseur Tail -Grosseur Embedded Stub -Lien -Lien Solide -iNode - -Lecture-seulement -2100 -Options -Langue -Langue : -Éditeur -&Éditeur : -&Diff : -2200 -Système -Associer avec 7-Zip : -Tous les utilisateurs -2301 -Intégrer 7-Zip au menu contextuel -Menu contextuel en cascade -Éléments du menu contextuel : -Icônes dans le menu contextuel -2320 - - -Ouvrir archive -Extraire les fichiers... -Ajouter à l'archive... -Contrôler l'archive -Extraire Ici -Extraire vers {0} -Ajouter à {0} -Compresser et envoyer par courriel... -Compresser vers {0} et envoyer par courriel -2400 -Dossiers -Dossier de &travail -Dossier temporaire du &système -&Courant -S&pécifié : -N'utiliser que pour les médias amovibles -Spécifiez un dossier pour les fichiers d'archive temporaires. -2500 -Paramètres -Afficher l'élément ".." -Afficher les icônes réelles des fichiers -Afficher le menu système -&Sélectionner toute la ligne -Afficher la &grille -Simple clic pour ouvrir un item -Utiliser la sélection &alternative -Utiliser des &grosses pages mémoire -2900 -A propos de 7-Zip -7-Zip est un logiciel libre -3000 -Le système ne peut allouer la quantité de mémoire nécessaire -Il n'y a pas d'erreurs -{0} objet(s) sélectionné(s) -Le dossier '{0}' ne peut pas être créé -Les opérations de mise à jour ne sont pas disponibles pour cette archive. -Le fichier '{0}' ne peut être ouvert comme une archive -L'archive cryptée '{0}' ne peut être ouverte. Mauvais mot de passe ? -Ce type d'archive n'est pas supporté -Le fichier {0} existe déjà -Le fichier '{0}' a été modifié.\nVoulez-vous le mettre à jour dans l'archive ? -Impossible de mettre à jour\n'{0}' -Impossible de démarrer l'éditeur. -Le fichier est peut-être un virus (le nom contient des grands espacements pour masquer l'extension). -Cette opération ne peut être effectuée depuis un dossier ayant un trop long chemin d'accès. -Vous devez sélectionner un fichier -Vous devez sélectionner un ou plusieurs fichiers -Trop d'objets -Ne peut ouvrir les fichiers {0} comme une archive -Le fichier {0} est ouvert comme une archive -L'archive est ouverte avec un décalage -3300 -Extraction -Compression -Contrôle -Ouverture... -Exploration... -Enlever -3320 -Ajoute -Modifie -Analyse -Réplique -Remballage -Passe -Efface -Création d'un en-tête -3400 -Extraire -E&xtraire vers : -Choisissez un dossier pour l'extraction des fichiers. -3410 -Mode de chemin : -Nom de chemin complet -Pas de nom de chemin -Nom de chemin absolu -Nom de chemin relatif -3420 -Mode de remplacement : -Confirmer avant de remplacer -Remplacer sans demander -Ignorer les fichiers existants -Renommer automatiquement -Renommer les fichiers existants -3430 -Élimine la duplication du répertoire racine -Restauration du fichier de sécurité -3500 -Confirmer le remplacement de fichier -Le dossier de destination contient déjà un fichier avec ce nom. -Voulez-vous remplacer le fichier existant -par celui-ci ? -{0} octets -Renommer &automatiquement -3700 -Méthode de compression non valide pour '{0}'. -Donnée erronée dans le fichier '{0}'. Le fichier est corrompu. -Échec du contrôle CRC dans le fichier '{0}'. Le fichier est corrompu. -Donnée erronée dans le fichier crypté '{0}'. Mauvais mot de passe ? -Échec du contrôle CRC dans le fichier crypté '{0}'. Mauvais mot de passe ? -3710 -Pas le bon mot de passe ? -3721 -Méthode de compression non supportée -Erreur de donnée -Échec de CRC -Donnée non disponible -Fin de données inattendues -Il y a des données après la fin des données utiles -N'est pas une archive -Erreur en-têtes -Mauvais mot de passe -3763 -Démarrage non disponible d'une archive -Démarrage non confirmé d'une archive - - - -Option non supportée -3800 -Entrez le mot de passe -Entrez le mot de passe : -Entrez le mot de passe à nouveau : -&Afficher le mot de passe -Les mots de passe ne correspondent pas -Pour le mot de passe, n'utilisez que des lettres non accentuées, des chiffres et des caractères spéciaux (!, #, $, ...) -Le mot de passe est trop long -Mot de passe -3900 -Temps écoulé : -Temps restant : -Taille totale : -Vitesse : -Traité : -Taux de compression : -Erreurs : -Archive : -4000 -Ajouter à l'archive -&Archive : -&Mode de mise à jour : -&Format de l'archive : -N&iveau de compression : -Méthode de &compression : -&Taille du dictionnaire : -Tai&lle des mots : -Taille de bloc solide : -Nombre de threads CPU : -&Paramètres : -Options -Créer une archive SF&X -Compresser des fichiers partagés -Chiffrement -Méthode de chiffrement : -Chiffre les &noms de fichiers -Mémoire pour la compression : -Mémoire pour la décompression : -Effacer les fichiers après compression -4040 -Emmagasine liens symboliques -Emmagasine liens solides -Emmagasine flux de données alternatifs -Emmagasine fichier de sécurité -4050 -Aucune -Le plus rapide -Rapide -Normale -Maximum -Ultra -4060 -Ajouter et remplacer les fichiers -Mettre à jour et ajouter les fichiers -Rafraîchir les fichiers existants -Synchroniser les fichiers -4070 -Choisir -Tous les fichiers -Non-solide -Solide -6000 -Copier -Déplacer -Copier dans : -Déplacer vers : -Copie... -Déplacement... -Renommage... -Sélectionnez le dossier de destination. -L'opération n'est pas possible pour ce dossier. -Erreur durant le Renommage du Fichier ou du Dossier -Confirmation de la Copie de(s) Fichier(s) -Confirmer la copie de(s) fichier(s) à archiver -6100 -Confirmer la Suppression du Fichier -Confirmer la Suppression du Dossier -Confirmer la Suppression de Multiple Fichiers -Êtes-vous sûr de vouloir supprimer '{0}' ? -Êtes-vous sûr de vouloir supprimer le dossier '{0}' et tout ce qu'il contient ? -Êtes-vous sûr de vouloir supprimer ces {0} objets ? -Suppression... -Erreur durant la suppression du fichier ou du dossier -Le système ne peut mettre à la Corbeille un fichier avec un trop long chemin d'accès -6300 -Créer un Dossier -Créer un Fichier -Nom du dossier : -Nom du fichier : -Nouveau dossier -Nouveau fichier -Erreur durant la création du dossier -Erreur durant la création du fichier -6400 -Commentaire -&Commentaire : -Sélectionner -Désélectionner -Masquer : -6600 -Propriétés -Historique des dossiers -Messages de diagnostic -Message -7100 -Ordinateur -Réseau -Documents -Système -7200 -Ajouter -Extraire -Tester -Copier -Déplacer -Supprimer -Informations -7300 -Diviser le fichier -&Diviser en : -Diviser en &volumes, octets : -Découper... -Confirmez le découpage -Êtes-vous sûr de vouloir découper le fichier en {0} volumes ? -La taille de volume doit être inférieure à la taille du fichier d'origine -Taille de volume incorrecte -Taille de volume spécifiée : {0} octets.\nÊtes-vous sûr de vouloir découper l'archive dans de tels volumes ? -7400 -Combiner les fichiers -&Combiner en : -Combinaison... -Ne sélectionnez que le premier fichier -Ne trouve aucun fichier faisant partie d'une archive divisée -Ne trouve qu'un seul fichier faisant partie d'une archive divisée -7500 -Calcul de la somme de contrôle... -Informations sur la somme de contrôle -Somme de contrôle des données : -Somme de contrôle des données et des noms : -7600 -Test de performance -Utilisation de la mémoire : -Compression -Décompression -Taux -Taux total -Actuel -Résultant -Utilisation CPU -Estimé / Usage -Passe : -7700 -Lien -Lien -Lien depuis : -Lien ver : -7710 -Sorte de lien -Lien solide -Lien symbolique de fichier -Lien symbolique de répertoire -Jonction de répertoire diff --git a/Utils/7-Zip/Lang/fur.txt b/Utils/7-Zip/Lang/fur.txt deleted file mode 100644 index ef4ae0dbe..000000000 --- a/Utils/7-Zip/Lang/fur.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.60 : Andrea Decorte (Klenje) : http://softfurlan.altervista.org : secont l'ortografie uficiâl de Provincie di Udin -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Friulian -Furlan -401 -Va ben -Scancele - - - -&Sì -&No -&Siare -&Jutori - -&Continue -440 -Sì &a ducj -No a &ducj -Ferme -Torne a inviâ -&Sfont -P&rin plan -&Pause -In pause -Sêstu sigûr di volê scancelâ? -500 -&File -&Modifiche -&Viodude -&Preferîts -&Imprescj -&Jutori -540 -&Viarç -Viarç dentri 7-&Zip -V&iarç fûr di 7-Zip -&Mostre -M&odifiche -Gambie &non -&Copie in... -Mô&f in... -&Elimine -&Divît file... -Torne a &unî files... -P&ropietâts -Comen&t -Calcole so&me di control - -Cree cartele -Cree file -V&a fûr -600 -Selezione d&ut -&Deselezione dut -&Invertìs selezion -Selezione... -Deselezione... -Selezione par gjenar -Deselezione par gjenar -700 -Iconis &grandis -Iconis &piçulis -&Liste -&Detais -730 -Cence ordin -Viodude plane -&2 panei -Sbaris dai impresc&j -Viarç cartele principâl -Parsore di un nivel -Storic des cartelis... -&Atualize -750 -Sbare dai imprescj par l'archivi -Sbare dai imprescj standard -Botons larcs -Mostre test dai botons -800 -&Zonte cartele ai Preferîts sicu -Preferît -900 -&Opzions... -&Banc di prove -960 -&Argoments... -&Informazions su 7-Zip... -1003 -Percors -Non -Estension -Cartele -Dimension -Dimension comprimude -Atribûts -Creât -Ultin acès -Modificât -Solit -Comentât -Cifrât -Divît prin di -Divît daspò di -Dizionari -CRC -Gjenar -Anti -Metodi -SO di origjin -Sisteme dai files -Utent -Grup -Bloc -Coment -Posizion -Prefìs dal troi -Cartelis -Files -Version -Volum -Multivolum -Offset -Leams -Blocs -Volums - -64-bit -Big-endian -CPU -Dimension fisiche -Dimension intestazions -Some di control -Caracteristichis -Direzion virtuâl - - - - - - -Erôr -Dimension totâl -Puest libar -Dimension setôr -Etichete -Non locâl -Furnidôr -2100 -Opzions -Lenghe -Lenghe: -Editôr -&Editôr: - -2200 -Sisteme -Associe 7-Zip cun: -2301 -Integre 7-Zip intal menù contestuâl de shell -Menù contestuâl in discjadude -Elements dal menù contestuâl: -2320 - - -Viarç archivi -Tire fûr files... -Zonte a un archivi... -Prove archivi -Tire fûr ca -Tire fûr in {0} -Zonte a {0} -Comprim e mande par email... -Comprim in {0} e mande par email -2400 -Cartelis -Cartele di &vore -Cartele &provisorie dal sisteme -&Corinte -&Specificade: -Dopre dome pai drives che si puedin gjavâ -Specifiche une posizion pai files provisoris di un archivi. -2500 -Configurazion -Mostre l'element ".." -Mostre lis veris iconis dai files -Mostre il menù dal sisteme -&Selezione la rie intire -Mostre les liniis de &gridele sot - -Mût di selezion &alternatîf -Dopre pagjinis di memorie &largjis -2900 -Informazions su 7-Zip -7-Zip al è un program libar. Purpûr, tu puedis supuartâ il disvilup di 7-Zip cu la regjistrazion. I utents regjistrâts a podaran otignî supuart tecnic. -3000 -Il sisteme nol rive a cjoli la cuantitât di memorie che e covente -Nissun erôr cjatât -{0} ogjet(s) selezionât(s) -No si pues creâ la cartele '{0}' -Lis operazions di atualizazion no son supuartadis par chest archivi. -No si pues viarzi il file '{0}' come archivi -No si pues viarzi l'archivi cifrât '{0}'. Ise sbaliade la peraule clâf? -Gjenar di archivi no supuartât -Il file {0} al esist za -Il file '{0}' al è stât modificât.\nVuelistu atualizâlu intal archivi? -No si pues atualizâ il file\n'{0}' -No si pues inviâ l'editôr. -Il file al samee un virus (il non al à dentri un grum di spazis). -Cheste operazion no pues jessi clamade di une cartele cuntun troi lunc. -Tu scugnis sielzi un file -Tu scugnis sielzi un o plui files -Masse elements -3300 -Daûr a tirâ fûr... -Daûr a comprimi -Daûr a provâ -Daûr a viarzi... -Daûr a scandaiâ... -3400 -Tire fûr -Tir&e fûr in: -Specifiche une posizion pai files tirâts fûr. -3410 -Struture des cartelis -Percors intîrs -Nissun percors -3420 -Sore scriture -Domande prin di scrivi parsore -Scrîf parsore cence domandâ -Salte i files che esistin -Gambie nons in automatic -Gambie nons in automatic se a esistin -3500 -Conferme de sostituzion dal file -Inte cartele di destinazion al è za il file processât. -Vuelistu sostituî il file esistint -cun chest file? -{0} bytes -&Gambie non in automatic -3700 -Il metodi di compression nol è supuartât par '{0}'. -Erôr di dâts in '{0}'. Il file al è corot. -CRC falît in '{0}'. Il file al è corot. -Erôr di dâts tal file cifrât '{0}'. Peraule clâf sbaliade? -CRC falît tal file cifrât '{0}'. Peraule clâf sbaliade? -3800 -Scrîf peraule clâf -Scrîf la peraule clâf: -Torne a inserî la peraule clâf: -&Mostre la peraule clâf -Lis peraulis clâfs no son compagnis -Dopre dome lis letaris inglesis (no acentadis), i numars e i caratars speciâi (!, #, $, ...) inte peraule clâf -La peraule clâf e je masse lungje -Peraule clâf -3900 -Timp passât: -Timp restant: -Dimension: -Sveltece: -Elaborât: -Tas di compression: -Erôrs: -Archivis: -4000 -Zonte a un archivi -&Archivi: -Mût di at&ualizazion: -&Formât archivi: -Nive&l di compression: -&Metodi di compression: -&Dimension dizionari: -Dimension &peraule: -Dimension bloc solit: -Numar di threads de CPU: -&Parametris: -Opzions -Cree archivi SF&X -Comprim i files condividûts -Ciframent -Metodi di ciframent: -Cifre i &nons dai files -Utilizazion memorie comprimint: -Utilizazion memorie decomprimint: -4050 -Cence compression -Il pi svelt -Svelt -Normâl -Massim -Super -4060 -Zonte e sostituìs files -Atualize e zonte files -Atualize i files che esistin -Sincronize i files -4070 -Sgarfe -Ducj i files -No-solit -Solit -6000 -Copie -Môf -Copie in: -Môf in: -Daûr a copiâ... -Daûr a movi... -Daûr a gambiâ non... -Sielç la cartele di destinazion. -L'operazion no je supuartade. -Erôr gambiant non a un file o une cartele -Conferme de copie dai files -Sêstu sigûr di volê copiâ i files tal archivi -6100 -Conferme de eliminazion dal file -Conferme de eliminazion de cartele -Conferme de eliminazion di plui files -Sêstu sigûr di volê eliminâ '{0}'? -Sêstu sigûr di volê eliminâ la cartele '{0}' e dut ce ch'al è lì dentri? -Sêstu sigûr di volê eliminâ chescj {0} elements? -Daûr a eliminâ... -Erôr eliminant un file o une cartele -Il sisteme nol pues movi un file cuntun troi lunc te Scovacere -6300 -Cree cartele -Cree file -Non de cartele: -Non dal file: -Gnove cartele -Gnûf file -Erôr inte creazion de cartele -Erôr inte creazion dal file -6400 -Coment -&Coment: -Selezione -Deselezione -Filtri: -6600 -Propietâts -Storic des cartelis -Messaçs diagnostics -Messaç -7100 -Ordenadôr -Rêt -Documents -Sisteme -7200 -Zonte -Tire fûr -Prove -Copie -Môf -Elimine -Info -7300 -Divît file -&Divît in: -Divît in &volums, grandece in bytes: -Daûr a dividi... -Conferme de division -Sêstu sigûr di volê dividi il file in {0} tocs? -La dimension di un volum e à di jessi plui piçule di chê dal file origjinâl -Dimension dai volums sbaliade -Dimension dai volums volude: {0} bytes.\nSêstu sigûr di volê dividi l'archivi in tocs di cheste dimension? -7400 -Torne a unî files -&Torne a unî in: -Daûr a tornâ a unî... -Sielç dome il prin file -No si pues rilevâ il file come toc di un file dividût -No son stâts cjatâts plui tocs di file dividûts -7500 -Daûr a calcolâ la some di control... -Informazions su la some di control -Some di control CRC pai dâts: -Some di control CRC pai dâts e i nons: -7600 -Banc di prove -Utilizazion memorie: -Comprimint -Decomprimint -Valutazion -Valutazion totâl -Corint -Risultant -Utilizazion CPU -Judizi / Utilizazion -Passaçs: diff --git a/Utils/7-Zip/Lang/fy.txt b/Utils/7-Zip/Lang/fy.txt deleted file mode 100644 index aed26dfb4..000000000 --- a/Utils/7-Zip/Lang/fy.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.53 : Berend Ytsma -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Frisian -Frysk -401 -Okee -Ofbrekke - - - -&Jawis -&Nee -&Slute -Help - -&Ferfetsje -440 -Jawis foar &Alles -Nee foar A&lles -Stopje -Opnij begjinne -&Eftergrûn -&Foargrûn -&Skoftsje -Skoft -Binne jo wis dat jo ôfbrekke wolle? -500 -&Triem -&Bewurkje -&Byld -B&lêdwizers -&Ark -&Help -540 -&Iepenje -Iepenje &yn -Iepenje bû&ten -&Byld -&Bewurkje -Omne&ame -&Kopiearje nei... -&Ferpleats nei... -&Wiskje -Triemmen &spjalte... -Triemmen Kom&binearje... -E&igenskippen -Komme&ntaar -Kontrôlesom berekenje - -Map meitsje -Triem meitsje -U&tgong -600 -&Alles selektearje -Alles net selektearje -&Seleksje omdraaien -Selektearje... -Net selektearje... -Selektearje neffens type -Net selektearje neffens type -700 -Gru&tte Ikoanen -L&ytse Ikoanen -&List -&Details -730 -Net Sortearre -Platte werjefte -&2 Panielen -&Arkbalke -Haadmap iepenje -Ien nivo omheech -Maphistoarje... -&Ferfarskje -750 -Argyf arkbalke -Standert arkbalke -Grutte knoppen -Knoptekst sjen litte -800 -Map oan blêdwizers &taheakje as -Blêdwizer meitsje -900 -&Opsjes... -&Ykpunt -960 -&Ynhâld... -&7-Zip it hoe en het... -1003 -Paad -Namme -Taheaksel -Map -Grutte -Ynpakte grutte -Skaaimerk -Makke -Lêste tagong -Feroare -Kompakt -Kommentaar -Fersifere -Spjalt foar -Spjalt efter -Wurdboek -CRC -Type -Anty -Metoade -Host OS -Triemsysteem -Brûker -Keppel -Blok -Kommentaar -Posysje -Paad foarheaksel -Mappen -Triemmen -Ferzje -Folume -Multifolume -Offset -Links -Blokken -Folumes - - - - - - - - - - - - - - - -Flater -Totale grutte -Frije romte -Kluster grutte -Kaartsje -Lokale namme -Ferskaffer -2100 -Opsjes -Taal -Taal: -Bewurker -&Bewurker: - -2200 -Systeem -Ferbyn 7-Zip Mei: -2301 -Yntegraasje fan 7-Zip yn ferbânmenu -Ferbânmenu yn trepfoarm -Ferbânmenu-items: -2320 - - -Argyf iepenje -Triemmen útpakke... -Oan argyf taheakje... -Argyf teste -Hjir útpakke -Utpakke yn {0} -Oan {0} taheakje -komprimearje en ferstjoere... -Komprimearje nei {0} en poste -2400 -Mappen -&Wurkmap -&Tydlikesysteemmap -&Aktive -&Oantsjutte: -Allinnich brûke foar útnimbere skiven -ynfiere fan de lokaasje foar tydlike argyftriemmen. -2500 -Ynstellings -".." item sjen litte -Echte triem ikoanen sjen litte -Systeemmenu sjen litte -&Folsleine rige selektearje -&Roaster sjen litte - -&Alternative seleksje modus -Brûk &grut ûnthâld siden -2900 -7-Zip it hoe en het -7-Zip is fergees. Mar, jo kinne de ûntwikkeling stypje troch jo te registrearjen. -3000 - -Der binne gjin flaters -{0} objekt(en) selektearre -Kin map '{0}' net meitsje -Bywurk operaasje waard net stipe troch dit argyf. -Kin triem '{0} net as argyf iepenje -Kin fersifere argyf '{0}' net iepenje. Ferkeard wachtwurd? - - -Triem '{0}' is wizige.\nWolle jo it bywurkje yn it argyf? -Kin triem '{0}'\nnet bywurkje -Kin bewurker net starte. - - - - -Tefolle items -3300 -Utpakke -Oan it komprimearjen -Oan it Testen -Oan it iepenjen... -Oan it skennen... -3400 -Utpakke -U&tpakke nei: -De lokaasje om nei út te pakken oantsjutte. -3410 -Paad modus -Folsleine paadnammen -Gjin paadnammen -3420 -Oerskriuw modus -Freegje foardat jo oerskriuwe -Oerskriuwe sûnder pront -Besteande triemmen oerslaan -Automatysk omneame -Automatysk ek by besteande triemmen -3500 -It ferfangen fan de triem befêstigje -Bestimmingsmap befettet al in triem mei dizze namme. -Wolle jo de triem ferfange -Mei dizze? -{0} bytes -A&utomatysk omneame -3700 -Net stipe kompresjemetoade foar '{0}'. -Data flater yn '{0}'. Triem is beskeadige. -CRC mislearre yn '{0}'. Triem is beskeadige. -Data flater yn fersifere triem '{0}'. Ferkeard wachtwurd? -CRC mislearre yn fersifere triem '{0}'. Ferkeard wachtwurd? -3800 -Wachtwurd ynfiere -Wachtwurd ynfiere: -Wachwurd opnij ynfiere: -Wachtwurd &sjen litte -Wachtwurden komme net oerien -Brûk allinne ingelske letters, nûmers en spesjale karakters (!, #, $, ...) foar it wachtwurd -Wachtwurd is te lang -Wachtwurd -3900 -Ferstrutsen tiid: -Tiid noch te gean: -Totale grutte: -Fluggens: -Ferwurke: -Kompresje nivo: -Flaters: -Argiven: -4000 -Oan argyf taheakje -&Argyf: -&Bywurkmodus: -Argyf &formaat: -Kompresje&nivo: -Kompresje&metoade: -&Wurdboekgrutte: -&Wurdgrutte: -Kompakte blokgrutte: -Tal CPU trieden: -&Parameters: -Opsjes -Meitsje SF&X-argyf -Dielde triemmen komprimearje -Fersifering -Fersiferingmetoade: -Fersiferje triem&nammen -Unthâld gebrûk by komprimearjen: -Unthâld gebrûk by ûntkomprimearjen: -4050 -Bewarje -Fluchst -Fluch -Normaal -Maksimum -Ultra -4060 -Triemmen taheakje en ferfange -Triemmen taheakje en bywurkje -Besteande triemmen ferfarskje -Triemmen lyk rinne litte -4070 -Blêdzje -Alle triemmen -net-kompakt -Kompakt -6000 -Kopiearje -Ferpleatse -Kopiearje nei: -Ferpleats nei: -Oan it kopiearren... -Oan it ferpleatsen... -Omneame... -Bestimmingsmap selektearje. -Operaasje wurdt net stipe. -Flater by it omneamen fan triem of map -Triem kopiearje befêstigje -Binne jo wis dat jo de triemmen nei it argyf kopiearje wolle? -6100 -It wiskjen fan de triem befêstigje -It wiskjen fan de map befêstigje -It wiskjen fan meardere triemmen befêstigje -Binne jo wis dat jo '{0}' wiskje wolle? -Binne jo wis dat jo de map '{0}' en al syn ynhâld wiskje wolle? -Binne jo wis dat jo {0} items wiskje wolle? -Oan it wiskjen -Flater by it wiskjen fan triem of map - -6300 -Map meitsje -Triem meitsje -Mapnamme: -Triem namme: -Nije map -Nije triem -Flater by it meitsjen fan map -Flater by’t meitsjen fan triem -6400 -Kommentaar -&Kommentaar: -Selektearje -Net Selektearje -Masker: -6600 -Eigenskippen -Maphistoarje -Diagnostyk berjocht -Berjocht -7100 -Kompjûter -Netwurk - -Systeem -7200 -Taheakje -Utpakke -Test -Kopiearje -Ferpleatse -Wiskje -Ynformaasje -7300 -Triem spjalte -&Spjalt nei: -Spjalte nei &folumes, bytes: -Oan it Spjalten... -Spjalte befêstigje -Wolle jo de triem spjalte yn {0} dielen? -Folumegrutte moat lytser wêze dan de grutte fan it orizjineel -Net juste folumegrutte -Oantsjutte folumegrutte: {0} bytes.\nWolle jo it argyf yn sokke folumes spjalte? -7400 -Triemmen kombinearje -&Kombinearje nei: -Oan it kombinearjen... -Allinne earste triem selektearje - - -7500 -Kontrôlesom oan it berekenjen... -Kontrôlesom ynformaasje -CRC kontrôlesom foar data: -CRC kontrôlesom foar data en nammen: -7600 -Benchmark -Unthâld gebrûk: -Oan it komprimearren -Oan it ûntkomprimearren -Wurdearring -Totale Wurdearring -Hjoeddeiske -Resultaat -CPU brûkens -Beoardieling / Brûkens -Kear foarbei: diff --git a/Utils/7-Zip/Lang/ga.txt b/Utils/7-Zip/Lang/ga.txt deleted file mode 100644 index 0c5a8a966..000000000 --- a/Utils/7-Zip/Lang/ga.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 9.07 : Seanán Ó Coistín -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Irish -Gaeilge -401 -Tá go maith -Cealaigh - - - -&Tá -&Níl -&Dún -Cabhair - -&Lean ar aghaidh -440 -Tá do gach ceann -Níl go gach ceann -Stad -Atosaigh -&Cúlra -&Tulra -&Cuir ar sos -Ar sos -An bhfuil tú cinnte gur mian leat é a chealú? -500 -&Comhad -&Leagan -Am&harc -Ceanáin -&Uirlisí -&Cabhair -540 -&Oscail -Oscail &istigh -Oscail &lasamuigh -&Amharc -&Eagar -Athainmnigh -&Macasamhlaigh go... -&Bog go... -S&crios -Scar an comhad... -Cumascaigh na comhaid... -Airíonna -Nóta tráchta -Ríomh an tsuim sheiceála -Diff -Cruthaigh fillteán -Cruthaigh comhad -&Scoir -600 -Roghnaigh &uile -Díroghnaigh uile -&Aisiompaigh an roghnúchán -Roghnaigh... -Díroghnaigh... -Roghnaigh de réir cineál -Díroghnaigh de réir cineál -700 -&Deilbhíní móra -&Deilbhíní beaga -&Liosta -&Sonraí -730 -Neamhaicmithe -Gach rud in aon chiseal -&2 fhuinneog -&Barraí na n-uirlisí -Oscail an fréamhfhillteán -Suas fillteán amháin -Oireas na bhfillteán... -Athnuaigh -750 -Barra cartlanna -Barra na n-uirlisí caighdeánacha -Cnaipí móra -Taispeáin an téacs ar na cnaipí -800 -&Cuir an fillteán leis na Ceanáin -Leabharmharc -900 -&Roghanna... -Tástáil fheidhmíochta -960 -&Inneachair... -Maidir le 7-Zip... -1003 -Conair -Ainm -Breiseán -Fillteán -Méid -Comhbhrúite -Tréithe -Cruthaithe an -Rochtain faighte ar an -Mionathraithe ar an -Fothúil -Trácht -Criptithe -Roinn roimh -Roinn i ndiaidh -Foclóir -CRC -Cineál -Frith -Modh -Óstach an CO -Córas na gcomhad -Úsáideoir -Aicme -Ceap -Nóta tráchta -Suíomh -Réimír na conaire -Fillteáin -Comhaid -Leagan -Imleabhar -Il-imleabhair -Fritháirigh -Naisc -Ceapa -Imleabhair - -64 bheart -Foirceann mór -LAP -Méid aiceanta -Méid na gceanntásc -Suim seiceála -Tréithe -Seoladh fíorúil -ID -Ainm gearr -Feidhmchlár a chruthaigh í -Méid na hearnála -Modh -Nasc -Botún -Méid iomlán -Slí atá saor -Méid na braisle -Lipéad -Ainm logánta -Soláthraí -2100 -Roghanna -Teanga -Teanga: -Eagarthóir -&Eagarthóir: -&Diff: -2200 -Córas -Comhthiomsaigh 7-Zip le: -2301 -Comhtháthaigh 7-Zip sa roghchlár comhthéacs -Roghchlár comhthéacs ag titim -Nithe an roghchláir chomhthéacs: -2320 - - -Oscail -Asbhain na comhaid... -Cuir leis an gcartlann... -Tástáil an chartlann -Asbhain anseo -Bain go {0} -Cuir le {0} -Comhbhrúigh agus seol i ríomphost iad... -Comhbhrúigh go {0} agus seol i ríomhphost iad -2400 -Fillteáin -Fillteán oibre -Fillteán sealadach an chórai&s -An comhad reatha -Fillteán &sonraithe: -Bain feidhm as do thiomántáin inaistrithe amháin -Sonraigh suíomh i gcomhair comhaid chartlainne sealadacha. -2500 -Socruithe -Taispeáin an ní ".." -Taispeáin fíordheilbhíní an chomhaid -Taispeáin roghchlár an chórais -Roghnaigh an tsraith ar fad -Taispeáin línte na greille -Brúigh uair amháin chun ní a oscailt -Bain feidhm as modh roghnaithe malartach -Bain feidhm as leathanaigh chuimhne mhóra -2900 -Maidir le 7-Zip -Is saorearra é 7-Zip. Is féidir tacaíocht a thabhairt dá fhorbairt amach anseo, áfach, trí chlárú. -3000 -Ní féidir leis an gcóras an méid cuimhne atá de dhíth a leathdháileadh dó -Níl aon bhotún ann -{0} ní/nithe roghnaithe -Ní féidir an fillteán '{0}' a chruthú -Ní féidir an chartlann seo a nuashonrú. -Ní féidir an comhad '{0}' a oscailt mar chartlann -Ní féidir an chartlann chriptithe '{0}' a oscailt. An bhfuil an focal faire mícheart? -Ní thugtar tacaíocht don chineál comhad seo -Tá an comhad {0} ann cheana -Mionathraíodh an comhad '{0}'.\nAr mhaith leat é a nuashonrú sa chartlann? -Ní féidir an comhad a leanas a nuashonrú\n'{0}' -Ní féidir an t-eagarthóir a thosú. -B'fhéidir gur aicíd é an comhad (tá bearnaí móra in ainm an chomhaid). -Ní féidir an oibríocht seo a chur i bhfeidhm ó fhillteán a bhfuil conair fhada aige. -Caithfear comhad amháin a roghnú -Caithfear comhad amháin nó níos mó a roghnú -An iomarca nithe -3300 -Asbhaint -Ag comhbhrú -Ag tástáil -Ag oscailt... -Ag taiscéal... -3400 -Bain -Bain go: -Roghnaigh fillteán do na comhaid asbhainte. -3410 -Conairí -Conairí iomlána -Níl conair ann -3420 -Modh forscríofa -Deimhnigh sular forscríobhtar -Forscríobh gan iarraidh -Déan neamhaird de na comhaid atá ann cheana -Athainmnigh go huathoibríoch -Athainmnigh na comhaid atá ann cheana -3500 -Deimhnigh ionadú comhaid -Tá comhad leis an ainm seo sa spriocfhillteán cheana féin. -Ar mhaith leat an comhad atá ann cheana a ionadú -leis an gceann seo? -{0} bearta -Athainmnigh go huathoibríoch -3700 -Níl an bealach comhbhrúite bailí i gcomhair '{0}'. -Botún sna sonraí sa chomhad '{0}'. Tá an comhad briste. -Theip ar CRC sa chomhad '{0}'. Tá an comhad briste. -Sonra mícheart sa chomhad criptithe '{0}'. Focal faire mícheart? -Theip ar CRC sa chomhad chriptithe '{0}'. Focal faire mícheart? -3800 -Cuir isteach an focal faire -Cuir an focal faire isteach: -Cuir an focal faire isteach arís: -&Taispeáin an focal faire -Ní hionann an dá fhocal faire -Bain feidhm as litreacha gan síntí fada, uimhreacha agus carachtair shainiúla (!, #, $, ...) -Tá an focal faire rófhada -Focal faire -3900 -Am caite: -Am fágtha: -Méid iomlán: -Luas: -Déanta: -Luas an chomhbhrúite: -Botúin: -Cartlanna: -4000 -Cuir leis an gcartlann -&Cartlann: -&Modh nuashonraithe: -&Formáid na cartlainne: -Méid comhbhrúite: -Modh comhbhrúite: -&Méid an fhoclóra: -Méid na bhfocal: -Méid an chip fhothúla: -Líon na snáitheanna LAP: -&Teorainneacha: -Roghanna -Cruthaigh cartlann SF&X -Comhbhrúigh na comhaid a roinneadh -Criptiú -Modh criptiúcháin: -Criptigh ainmneacha na gcomhad -Cuimhne don chomhbhrúigh: -Cuimhne don dhíchomhbhrúigh: -4050 -Taisc -Is gasta -Gasta -Gnáth -Uasmhéid -Fíorghasta -4060 -Cuir comhaid leis agus ionadaigh -Nuashonraigh na comhaid agus cuir leo -Athnuaigh comhaid atá ann cheana -Comhionannaigh na comhaid -4070 -Siortaigh -Gach comhad -Neamhfhothúil -Fothúil -6000 -Macasamhlaigh -Bog -Macasamhlaigh chuig: -Bog chuig: -Ag acasamhlú... -Ag bogadh... -Ag athainmniú... -Roghnaigh an spriocfhillteán. -Ní féidir sin a dhéanamh. -Tharla botún ag athainmniú an comhad nó an fillteán -Deimhnigh macasamhlú an chomhaid -An bhfuil tú cinnte gur mian leat na comhaid a mhacasamhlú go dtí an chartlann? -6100 -Deimhnigh scriosadh an chomhaid -Deimhnigh scriosadh an chomhaid -Deimhnigh scriosadh iliomad comhad -An bhfuil tú cinnte gur mian leat '{0}' a scriosadh? -An bhfuil tú cinnte gur mian leat an fillteán '{0}' agus gach rud ann a scriosadh? -An bhfuil tú cinnte gur mian leat na {0} nithe seo a scriosadh? -Ag scriosadh... -Tharla botún ag scriosadh an comhad nó an fillteán -Ní thig leis an gcóras comhad le conair fhada a bhogadh go dtí an bosca athchúrsála -6300 -Cruthaigh comhad -Cruthaigh comhad -Ainm an chomhaid: -Ainm an chomhaid: -Comhad nua -Comhad nua -Tharla botún fad is a bhí an comhad á chruthú -Tharla botún fad is a bhí an comhad á chruthú -6400 -Trácht -&Trácht: -Roghnaigh -Díroghnaigh -Folaigh: -6600 -Airíonna -Oireas na bhfillteán -Teachtaireachtaí diagnóiseach -Teachtaireacht -7100 -Ríomhaire -Líonra -Cáipéisí -Córas -7200 -Cuir leis -Asbhain -Tástáil -Macasamhlaigh -Bog -Scrios -Faisnéis -7300 -Roinn an comhad -&Roinn chuig: -Roinn in imleabhair, bearta: -Ag roinnt... -Deimhnigh an roinnt -An bhfuil tú cinnte go dteastaíonn uait an comhad a roinnt i {0} imleabhair? -Ní mór do mhéid an imleabhair a bheith níos lú ná méid an chomhaid bhunaidh -Tá méid an cholúin mícheart -Méid an cholúin sonraithe: {0} bearta.\nAn bhfuil tú cinnte gur mian leat an chartlann a roinnt in imleabhair? -7400 -Cumaisc comhaid -&Cumaisc go: -Ag cumasc... -Ná roghnaigh an chéad chomhad -Ní féidir an comhad a bhraith mar chuid de chomhad scoilte -Ní féidir níos mó ná aon chuid amháin den chomhad scoilte a aimsiú -7500 -Ag ríomh na suime seiceála... -Faisnéis maidir leis an suim sheiceála -Suim sheiceála do shonraí: -Suim sheiceála do shonraí agus d'ainmneacha -7600 -Tástáil fheidhmíochta -Gnáthaíocht na cuimhne: -Ag comhbhrú -Ag díchomhbhrú -Measúnú -Measúnú iomlán -Reatha -Toradh -Gnáthaíocht an LAP -Measúnú / Gnáthaíocht -Bealaí: diff --git a/Utils/7-Zip/Lang/gl.txt b/Utils/7-Zip/Lang/gl.txt deleted file mode 100644 index 46c4ff908..000000000 --- a/Utils/7-Zip/Lang/gl.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; 15.00 : 2016-02-01 : enfeitizador -; -; 9.20 : 2014-11-26 : enfeitizador -; -; 3.12 : 2007-11-22 : Xosé Calvo -; -; -; -; -; -; -0 -7-Zip -Galician -Galego -401 -De acordo -Cancelar - - - -&Si -&Non -Pe&char -Axuda - -&Continuar -440 -Si &a todo -Non a &todo -Parar -Reiniciar -Poñer por de&baixo -Traer ao &fronte -&Pausa -Pausado -Ten a certeza de querer cancelar? -500 -&Ficheiro -&Editar -&Ver -F&avoritos -Ferramen&tas -A&xuda -540 -&Abrir -Abrir &dentro -Abrir &fora -&Ver -&Editar -Rena&me -&Copiar a... -&Mover a... -&Eliminar -&Dividir ficheiro... -Com&binar ficheiros... -P&ropiedades -Come&ntario... -Calcular suma de verificación -Diferenzas -Crear cartafol -Crear ficheiro -Sa&ír -Ligazón -&Alternar fluxos -600 -Seleccion&ar todo -Desmarcar todo -&Inverter selección -Seleccionar... -Desmarcar... -Seleccionar por tipo -Desmarcar por tipo -700 -Iconas lon&gas -Iconas &miúdas -&Lista -&Detalles -730 -Sen orde -Vista plana -&2 paneis -Barras de ferramen&tas -Abrir cartafol raíz -Subir un nivel -Históricos de cartafoles... -&Recargar -Recargar auto. -750 -Barra de ferramentas de arquivos -Barra de ferramentas normal -Botóns grandes -Amosar texto dos botóns -800 -Eng&adir cartafol a favoritos como -Marcador -900 -&Opcións... -&Rendemento -960 -&Contidos... -&Acerca de 7-Zip... -1003 -Camiño -Nome -Extensión -Cartafol -Tamaño -Tamaño comprimido -Atributos -Creado -Último acceso -Modificado -Sólido -Comentado -Cifrado -Partir antes -Partir despois -Dicionario -CRC -Tipo -Anti -Método -SO servidor -Sistema de ficheiros -Usuario -Grupo -Bloque -Comentario -Posición -Prefixo do camiño -Cartafoles -Ficheiros -Versión -Volume -Varios volumes -Desprazamento -Ligazóns -Bloques -Volumes - -64-bit -Big-Endian -Procesador -Tamaño físico -Tamaño cabeceiras -Suma de verificación -Características -Enderezo virtual -ID -Nome curto -Aplicación orixinal -Tamaño sector -Modo -Ligazón simbólica -Erro -Tamaño total -Tamaño libre -Tamaño do clúster -Etiqueta -Nome local -Fornecedor -Seguridade NT -Fluxos alternos -Aux !BUSCA -Eliminado -Is Tree !BUSCA - - -Tipo de error -Erros -Erros -Avisos -Aviso -Fluxos -Fluxos alternos -Tamaño fluxos alternos -Tamaño virtual -Tamaño sen comprimir -Total tamaño físico -Indexar volume -SubTipo -Comentario curto -Código de páxina - - - -Tamaño de cola -Tamaño temporal inserido -Ligazón -Ligazón forte -iNode - -Só lectura -2100 -Opcións -Idioma -Idioma: -Editor -&Editor: -&Diferenza: -2200 -Sistema -Asociar 7-Zip con: -Todos os usuarios -2301 -Integrar 7-Zip no menú de contexto -Menú do contexto en cascada -Elementos do menú do contexto: -Iconas no menú de contexto -2320 - - -Abrir arquivo -Extraer ficheiros... -Engadir ao arquivo... -Comprobar arquivo -Extraer aquí -Extraer a {0} -Engadir a {0} -Comprimir e enviar por correo... -Comprimir a {0} e enviar por correo -2400 -Cartafoles -Cartafol en &uso -Cartafol temporal do &sistema -Cartafol a&ctual -E&specificar: -Usar só en unidades extraíbles -Especificar unha localización para os arquivos temporais. -2500 -Axustes -Amosar o elemento ".." -Amosar iconas reais do ficheiro -Amosar menú do sistema -Seleccionar &fila completa -Amosar liñas de &grella -Clic simple para abrir un elemento -Modo de selección &alternativo -Usar memoria &longa de páxinas -2900 -Acerca de 7-Zip -7-Zip é un programa gratuíto -3000 -O sistema non puido atribuír a memoria requirida -Non se produciron erros -{0} obxecto(s) seleccionados -Non se pode crear o cartafol '{0}' -Este tipo de arquivo non permite actualizacións. -Non se pode abrir o ficheiro '{0}' como arquivo -Non se pode abrir o ficheiro cifrado '{0}'. Contrasinal incorrecto? -Tipo de arquivo non admitido -O ficheiro {0} xa existe -Modificouse o ficheiro '{0}'.\nQuéreo actualizar no arquivo? -Non se pode actualizar o ficheiro\n'{0}' -Non se pode iniciar o editor. -O ficheiro parécese a un virus (o nome do ficheiro contén espazos longos). -A operación non pode responder dende un cartafol cun camiño longo. -Tes que seleccionar un ficheiro -Tes que seleccionar un ou máis ficheiros -Demasiados elementos -Non se pode abrir o ficheiro como arquivo {0} -O ficheiro está aberto como arquivo {0} -O arquivo está aberto con desprazamento -3300 -Extraendo -Comprimindo -Probando -Abrindo... -Escaneando... -Eliminando -3320 -Engadindo -Actualizando -Analizando -Replicando -Volvendo comprimir -Omitindo -Eliminando -Creando cabeceira -3400 -Extraer -E&xtraer a: -Especificar unha localización para os ficheiros extraídos. -3410 -Modo camiño: -Nomes de camiño completos -Sen nomes de camiño -Nomes de camiño absoluto -Nomes de camiño relativo -3420 -Modo sobrescribir: -Preguntar antes de sobrescribir -Sobrescribir sen preguntar -Omitir ficheiros existentes -Renomeo automático -Renomeo automático de ficheiros existentes -3430 -Eliminar duplicidade do cartafol raíz -Restaurar seguridade do ficheiro -3500 -Confirmar a substitución de ficheiro -O cartafol destino xa ten un ficheiro co mesmo nome. -Desexa substituír o ficheiro existente -con estoutro? -{0} bytes -Renomeo a&utomático -3700 -Método de compresión non admitido para '{0}'. -Erro de datos en '{0}'. O ficheiro está danado. -Fallou a verificación CRC en '{0}'. O ficheiro está danado. -Erro de datos no ficheiro cifrado '{0}'. Contrasinal incorrecto? -Fallou a verificación CRC no ficheiro cifrado '{0}'. Contrasinal incorrecto? -3710 -Contrasinal incorrecto? -3721 -Método de compresión non admitido -Erro de datos -Fallou a verificación CRC -Datos non dispoñibles -Remate de datos inesperado -Hai certos datos despois do remate dos datos cargados -Non é arquivo -Erro de cabeceiras -Contrasinal incorrecto -3763 -Inicio de arquivo non dispoñible -Inicio de arquivo non confirmado - - - -Característica non admitida -3800 -Insira contrasinal -Insira contrasinal: -Insírao de novo: -Amo&sar contrasinal -Os contrasinais non coinciden -Use só letras latinas, números e caracteres especiais (!, #, $, ...) para o contrasinal -O contrasinal é moi longo -Contrasinal -3900 -Tempo transcorrido: -Tempo restante: -Tamaño total: -Velocidade: -Procesado: -Proporción de compresión: -Erros: -Arquivos: -4000 -Engadir ao arquivo -&Arquivo: -Función act&ualizar: -&Formato de arquivo: -Nive&l de compresión: -&Método de compresión: -Tamaño do &dicionario: -Tamaño de &palabra: -Tamaño de bloque sólido: -Número de procesos da CPU: -&Parámetros: -Opcións -Crear ficheiro SF&X -Comprimir ficheiros compartidos -Cifrado -Método de cifrado: -Cifrar &nomes de ficheiro -Uso de memoria para compresión: -Uso de memoria para extracción: -Eliminar ficheiros despois de comprimir -4040 -Arquivar ligazóns simbólicas -Arquivar ligazóns fortes -Arquivar fluxo de datos alternos -Arquivar seguridade de ficheiro -4050 -Arquivar -Máis rápida -Rápida -Normal -Máxima -Ultra -4060 -Engadir e substituír ficheiros -Actualizar e engadir ficheiros -Só actualizar ficheiros existentes -Sincronizar ficheiros -4070 -Navegar -Todos os ficheiros -Non sólido -Sólido -6000 -Copiar -Mover -Copiar a: -Mover a: -Copiando... -Movendo... -Renomeando... -Seleccione cartafol destino. -A operación non é admitida para este cartafol. -Erro ao renomear ficheiro ou cartafol -Confirmar copia de ficheiro -Desexa copiar os ficheiros ao arquivo -6100 -Confirmar eliminar ficheiro -Confirmar eliminar cartafol -Confirmar eliminar ficheiro múltiplo -Ten a certeza de eliminar '{0}'? -Ten a certeza de eliminar o cartafol '{0}' e todo o que contén? -Ten a certeza de eliminar estes {0} elementos? -Eliminando... -Erro ao eliminar ficheiro ou cartafol -O sistema non pode mover un ficheiro cun nome tan longo á papeleira -6300 -Crear cartafol -Crear ficheiro -Nome do cartafol: -Nome do ficheiro: -Novo cartafol -Novo ficheiro -Erro ao crear cartafol -Erro ao crear ficheiro -6400 -Comentario -&Comentario: -Seleccionar -Desmarcar -Máscara: -6600 -Propiedades -Histórico de cartafoles -Mensaxes de diagnose -Mensaxe -7100 -Computador -Rede -Documentos -Sistema -7200 -Engadir -Extraer -Probar -Copiar -Mover -Eliminar -Información -7300 -Dividir ficheiro -&Dividir a: -Dividir en &volumes, bytes: -Dividindo... -Confirmar división -Ten a certeza de dividir o ficheiro en {0} volumes? -O tamaño do volume ten que ser menor que o tamaño do ficheiro orixinal -Tamaño de volume incorrecto -Tamaño de volume especificado: {0} bytes.\nTen a certeza de dividir o arquivo nestes volumes? -7400 -Combinar ficheiros -&Combinar a: -Combinando... -Seleccionar só a primeira parte do ficheiro dividido -Non se detecta o ficheiro como parte dun ficheiro dividido -Non se atopan máis ca unha parte do ficheiro dividido -7500 -Calculando suma de verificación... -Información da suma de verificación -Verificación CRC para datos: -Verificación CRC para datos e nomes: -7600 -Rendemento -Uso de memoria: -Comprimindo -Extraendo -Proporción -Proporción total -Actual -Resultante -Uso de CPU -Proporción / Uso -Pases: -7700 -Ligazón -Ligazón -Ligazón desde: -Ligazón a: -7710 -Tipo de ligazón -Ligazón forte -Ligazón simbólica de ficheiro -Directorio ligazón simbólica -Directorio nexo diff --git a/Utils/7-Zip/Lang/gu.txt b/Utils/7-Zip/Lang/gu.txt deleted file mode 100644 index abcedc727..000000000 --- a/Utils/7-Zip/Lang/gu.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 9.07 : Vinayy Sharrma : વિનય શર્મા દ્વારા અનુવાદિત મેહનત કરેલી છે તો પોતાનું નામ લખવામાં કાંઇ બુરાઈ નથી. હિન્દ પર ગર્વ કરો, જય હિન્દ ! જય હિન્દી ! જય ગરવી ગુજરાત ! જય ગુજરાતી -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Gujarati, Indian, હિન્દુસ્તાન -ગુજરાતી -401 -સારું -રદ્દ - - - -&હાઁ -&ના -&બંદ કરો -મદદ - -&જારી રાખો -440 -&બધા માટે હાઁ -&બધા માટે ના -રૂકો -પુનઃ શુરુ કરો -&પૄષ્ઠ્ભૂમિ -&અગ્રભૂમિ(ડેસ્ક્ટોપ) -&વિશ્રામ -થોભેલું -તુમે રદ્દ કરવા ચાહો છો. શું તમને યકીન છે? -500 -&ફ઼ાઇલ -&સંપાદન -&દર્શન -&મનપસંદ -&ઔજાર -&મદદ -540 -&ખોલો -&અંદર ખોલો -&બાહર ખોલો -&દૃશ્ય -&સંપાદન -&પુન: નામકરણ -&માં નકલ બનાવો... -&માં લઇ જાઓ... -&મિટાવો -&ફ઼ાઇલનો વિભાજન કરો... -&ફ઼ાઇલનો સંયોજન કરો... -&સંપત્તિયાઁ યા ગુણ -&ટિપ્પણી -&જાઁચ યોગની ગણના કરો -&અન્તર -&ફ઼ોલ્ડર તૈયાર કરો -&ફ઼ાઇલ તૈયાર કરો -&નિર્ગમન -600 -&બધા ચયન કરો -&બધા અચયનિત કરો -&ચયન ઊંધું કરો -ચયન કરો... -અચયન કરો... -પ્રકાર દ્વારા ચયન -પ્રકાર દ્વારા અચયન -700 -મોટાં પ્રતીક -લઘુ પ્રતીક -&સૂચી -&વર્ણન -730 -અવિતરિત -ચૌડ઼ા દૃશ્ય -&૨ ફ઼લક -&ઔજાર પટ્ટીઓ -મૂલ ફ઼ોલ્ડર ખોલો -એક સ્તર ઊપર ચઢ઼ો -ફ઼ોલ્ડરો નો ઇતિહાસ... -&તાજા કરો -750 -સંગ્રહ ઔજાર પટ્ટી -માનક ઔજાર પટ્ટી -મોટા ખટકા(બટન) -ખટકા(બટન)ના શબ્દ દિખાવો -800 -&ફ઼ોલ્ડર મનપસંદમાં એવી રીતે જોડો... -પુસ્તચિન્હ -900 -&વિકલ્પ... -&બેઞ્ચમાર્ક(પ્રામાણિક તુલના) -960 -&સામગ્રી... -૭-જિપ ના વિશેમાં... -1003 -માર્ગ -નામ -વિસ્તાર -ફ઼ોલ્ડર -આકાર -કુલ આકાર -વિશેષતા યા ગુણધર્મ -સર્જિત -ચલાવેલી -પરિવર્ધિત -ઠોસ -ટિપ્પણી -ગુપ્તિકૃત -ના પૂર્વે વિભાજન(ટુકડે) કરો -ના બાદ વિભાજન(ટુકડે) કરો -શબ્દકોશ -સીઆરસી -પ્રકાર -વિરોધી -પદ્ધતિ -યજમાન આજ્ઞાવલી(ઓપરેટિંગ સિસ્ટમ) -ફ઼ાઇલ પ્રણાલી -પ્રયોગકર્તા -સમૂહ -રોક કે ટુકડાઓ -પ્રતિક્રિયા -સ્થાન -માર્ગ પ્રત્યય -ફોલ્ડરસ -ફાઇલ્સ -સંસ્કરણ -જત્થા -અનેક જત્થાઓ -ઓફસેટ -કડિયાઁ -ટુકડ઼ે -જત્થે - -૬૪-બિટ -મોટું-એન્ડિયન -સીપીયૂ -ભૌતિક આકાર -શીર્ષકોંના આકાર -જાઁચયોગ -ચરિત્રતાઓ -આભાસી પત્તો -આઈડી -સંક્ષિપ્ત નામ -સર્જક અનુપ્રયોગ -સેક્ટરનો આકાર -સ્થિતિ -કડ઼ી -ત્રુટિ -કુલ આકાર -સ્વતન્ત્ર રિક્તસ્થાન(ખાલી જગહ) -ક્લસ્ટર(સમૂહ) આકાર -ધ્યાનાકર્ષક(લેબલ) -સ્થાનિક નામ -પ્રદાયક -2100 -વિકલ્પ -ભાષા -ભાષા: -સંપાદક -&સંપાદક: -&અન્તર: -2200 -પ્રણાલી કે તંત્ર -સંબધિત કરો ૭-જિપ ના સાથે: -2301 -૭-જિપ ના શેલ (કવચ) પ્રસંગ મેનુ માં જોડો -સોપાનીકૃત(કેસ્કેડેડ) પ્રસંગ મેનુ -પ્રસંગ(કોન્ટેક્સ્ટ) મેનુ વસ્તુએઁ: -2320 -<ફોલ્ડર> -<સંગ્રહ(આર્ચિવ)> -સંગ્રહ ખોલો -ફ઼ાઇલ્સ બાહર કાઢો... -સંગ્રહમાં જોડો... -સંગ્રહની જાઁચ કરો -અહિયાં બાહર કાઢો -{0} માં બાહર કાઢો -{0} માં જોડો -દબાવો(સંકુચન) અને ઇમેલ કરો... -{0} માં દબાવો અને ઈમેલ કરો -2400 -ફોલ્ડર્સ -&કાર્યરત ફોલ્ડર -&પ્રણાલીનું અસ્થાયી(ટેમ્પરરી) ફોલ્ડર -&ચાલુ -&નિર્દિષ્ટ: -ફક્ત હટાવવા યોગ્ય(રિમૂવેબલ) ડ્રાઈવ માટે જ પ્રયોગ કરો -અસ્થાયી સંગ્રહ ફાઇલ માટે સ્થાન નિર્દિષ્ટ કરો(બતાવો). -2500 -વ્યવસ્થાઓ -દિખાવો ".."વસ્તુ -વાસ્તવિક ફ઼ાઇલ પ્રતીક બતાવો -તંત્ર નો મેનુ બતાવો -&આખી પન્ક્તિનું ચયન -&ગ્રિડ(જાલ) રેખા દિખાવો -વસ્તુ ખોલવા માટે એક જ(સિંગલ)-ક્લિક -&વૈકલ્પિક ચયન સ્થિતિ -&મોટા સ્મૃતિ પૃષ્ઠનો પ્રયોગ કરો -2900 -7-જિપ ના વિશે -7-જિપ એ નિઃશુલ્ક સૉફ઼્ટવેયર છે. તો પણ, આપ પંજીકૃત(રજિસ્ટર્ડ) થઈને ૭-જ઼િપ ના વિકાસમાં સહયોગ કરી શકો છો. -3000 -તંત્ર જરૂરી માત્રામાં મેમોરી(સ્મૃતિ) વિતરિત નથી કરી શકતું -આમાં કોઈ પણ ત્રુટિ નથી -{0} ચયનિત વસ્તુ(ઓ) -'{0}' ફ઼ોલ્ડર સર્જિત નથી કરી શકતું -આ સંગ્રહ માટે અદ્યતનીકૃત સંચાલન સમર્થિત નથી. -'{0}' ફાઇલને સંગ્રહનાં રૂપમાં નથી ખોલી શકતું -'{0}' ગુપ્તિકૃત સંગ્રહને નથી ખોલી શકતુ. ગલત કૂટશબ્દ? -અસમર્થિત સંગ્રહ પ્રકાર -ફાઇલ {0} પહેલાથી હયાત છે -'{0}' ફ઼ાઇલ પરિવર્ધિત થઈ છે.\nશું તમે સંગ્રહમાં આને અદ્યતનીકૃત કરવા માગો છો? -ફ઼ાઇલ ને અદ્યતનીકૃત નથી કરી શકતું\n'{0}' -સંપાદકને શરૂ નથી કરી શકતું. -આ ફાઇલ એક વિષાણુ(વાયરસ) જેવી લાગે છે (ફાઇલ નામ લાંબી ખાલી જગહ નામમાં રાખતો છે). -જે ફોલ્ડરનો લાંબો માર્ગ છે તેનાથી સઞ્ચાલન ક્રિયા બોલાવી નથી શકાતી. -તમારે એક ફાઇલનો ચયન તો કરવો જ પડશે -તમારે એક કે જ્યાદા ફાઇલોંનો ચયન તો કરવો જ પડશે -બહુ વધારે વસ્તુઓ -3300 -બાહર કાઢી રહ્યું છે -સંકુચન કરી રહ્યું છે -પરીક્ષણ -ખોલી રહ્યુ છે... -તલાશી(સ્કૈનિંગ) કરી રહ્યુ છે... -3400 -બાહર કાઢો -&બાહર કાઢો: -બાહર કાઢેલી ફ઼ાઇલોં માટે સ્થાન નિર્દિષ્ટ કરો. -3410 -માર્ગ સ્થિતિ -આખો માર્ગનામ -કોઈ માર્ગ નામ નથી -3420 -અધિલેખન રીત -અધિલેખન કરતાં પહલાં પૂછો -વગર પૂછે અધિલેખન(જુનું મટાવવું) કરો -પહેલાથી હયાત ફ઼ાઇલસને છોડો -સ્વચાલિત પુન: નામકરણ -પહેલાથી હયાત ફ઼ાઇલસનો સ્વચાલિત(ઓટોમેટિક) પુન: નામકરણ કરો -3500 -ફ઼ાઇલ પ્રતિસ્થાપન ને પાક્કુ કરો -ગન્તવ્ય ફોલ્ડરમાં પહેલાથી જ પ્રક્રિયા થએલી ફ઼ાઇલ છે. -શું આપ પહેલાથી હયાત ફ઼ાઇલ ને બદલવું પસંદ કરશો? -આની જોડે? -{0} બાઇટ્સ -સ્વચાલિત પુન: નામકરણ -3700 -'{0}' ના માટે અસહાયક દબાવાવાની પદ્ધતિ. -ડેટા ત્રુટિ’{0}' માં. ફ઼ાઇલ તૂટેલી છે. -'{0}' માં સીઆરસી અસફલ. ફ઼ાઇલ તૂટેલી છે. -'{0}' ગુપ્તિકૃત(એનક્રિપ્ટેડ) ફાઇલ માં ડેટા ત્રુટિ. ગલત કૂટશબ્દ? -'{0}' ગુપ્તિકૃત(એનક્રિપ્ટેડ) ફાઇલ માં સીઆરસી અસફલ. ગલત કૂટશબ્દ? -3800 -કૂટશબ્દ(પાસવર્ડ) ડાલે -કૂટશબ્દ(પાસવર્ડ) ડાલે: -કૂટશબ્દ પુનઃ નાખો: -&કૂટશબ્દ(પાસવર્ડ) દિખાવો -કૂટશબ્દ સહેજેલાંથી જુદૂં છે -કૂટશબ્દ માટે ફક્ત ઇંગ્લિશ વર્ણમાલા, અંકો અને વિશેષ અક્ષરોં (!, #, $, ...) નો જ ઉપયોગ કરો -કૂટશબ્દ ખૂબ જ મોટું છે -કૂટશબ્દ(પાસવર્ડ) -3900 -વ્યતીત સમય: -શેષ બચેલું સમય: -કુલ આકાર: -ગતિ: -પ્રક્રિયા કરેલું: -દબાવાનું(આકાર છોટા કરવાનું)અનુપાત: -ત્રુટિયાઁ: -સંગ્રહ: -4000 -સંગ્રહમાં જોડો -&સંગ્રહ: -&અદ્યતનીકરણ સ્થિતિ(મોડ): -સંગ્રહ &ઢાઁચા: -&સંકુચન સ્તર: -&સંકુચન વિધિ: -&શબ્દકોશ આકાર: -&શબ્દ આકાર: -ઠોસ ટુકડાનો આકાર: -સીપીયૂ સૂત્ર સંખ્યા: -&પરિમાપ: -વિકલ્પ -&એસએફ઼એક્સ(SFX) સંગ્રહ તૈયાર કરો -સાઝી ફાઇલો સંકુચિત કરો -ગુપ્તિકરણ -ગુપ્તિકરણ પદ્ધતિ: -ફ઼ાઇલ &નામ ગુપ્તિકરણ કરો -સંકુચન માટે સ્મૃતિ પ્રયોગ: -પ્રસારણ માટે સ્મૃતિ પ્રયોગ: -4050 -ભંડારણ -સર્વાધિક તેજ -તેજ -સાધારણ -અધિકતમ -અત્યન્ત -4060 -ફ઼ાઇલેં જોડો અને પ્રતિસ્થાપિત કરો -ફાઇલો અદ્યતનીકૃત કરો અને જોડો -અવસ્થિત ફાઇલોં તાજા કરો -ફાઇલોં સમક્રમણ(સિંક્રોનાઈજ઼) કરો -4070 -બ્રાઉજ યા ઘૂમો -બધા ફાઇલોં -અ-ઠોસ -ઠોસ -6000 -નકલ -લઇ જાઓ -માં નકલ: -માં લઇ જાઓ: -નકલ... -લઇ જાઇ રહ્યુ છે... -પુનઃ નામકરણ... -ગન્તવ્ય ફોલ્ડર ચયનિત કરો. -આ ફોલ્ડર માટે આ સઞ્ચાલન ક્રિયા સમર્થિત નથી. -ફ઼ાઇલ કે ફ઼ોલ્ડરના પુનઃ નામકરણ માં ત્રુટિ -ફ઼ાઇલની નકલ કરવુ પાક્કું કરો -તમે સંગ્રહમાં ફાઇલ ની પ્રતિલિપિ કરવા ચાહો છો શું તમને યકીન છે -6100 -ફ઼ાઇલ મિટાવો આ પાક્કું કરો -ફ઼ોલ્ડર મિટાવો પાક્કું કરો -અનેક ફ઼ાઇલ મિટાવો પાક્કું કરો -શું તમને યકીન છે કે તમે મેટવવા ચાહો છો '{0}'? -શું તમને યકીન છે કે તમે ફ઼ોલ્ડર મિટાવવા માંગો છો ’{0}' અને આની બધી સામગ્રી પણ? -શું તમને યકીન છે કે તમે મિટાવવા માંગો છો આ {0} વસ્તુઓં ને? -મેટવી રહ્યુ છે... -ફ઼ાઇલ કિંવા ફ઼ોલ્ડર મિટાવામાં ત્રુટિ -તંત્ર લાંબા માર્ગ વાલી ફાઇલને પુનઃચક્રણ પેટી(રિસાઈકલ બિન)માં નથી લઇ જાઇ શકતુ. -6300 -ફ઼ોલ્ડર તૈયાર કરો -ફ઼ાઇલ તૈયાર કરો -ફ઼ોલ્ડર નામ: -ફ઼ાઇલ નામ: -નવુ ફ઼ોલ્ડર -નવી ફ઼ાઇલ -ફ઼ોલ્ડર તૈયાર કરવામાં ત્રુટિ -ફ઼ાઇલ તૈયાર કરવામાં ત્રુટિ -6400 -ટિપ્પણી -&ટિપ્પણી: -ચયન -ચયન રદ્દ -મુખૌટો: -6600 -ગુણ યા સંપત્તિયાઁ -ફ઼ોલ્ડરોંનો ઇતિહાસ -નિદાનાત્મક સંદેશ -સંદેશ -7100 -સંગણક -સઞ્જાલ -દસ્તાવેજ -પ્રણાલી -7200 -જોડો -બાહર કાઢો -પરીક્ષણ -નકલ -લઈ જાઓ -મિટાવો -સૂચના -7300 -ફ઼ાઇલનું વિભાજન કરો -&માં વિભાજન: -જત્થાઓમાં વિભાજન, બાઇટ્સ: -વિભાજન કરી રહ્યુ છે... -વિભાજન કરવાનું પાક્કું કરો -શું તમને યકીન છે કે તમે ફાઇલ ને {0} જત્થાઓમાં વિભાજિત કરવા માગો છો? -મૂલ ફાઇલના આકારની તુલનામાં જત્થાનું આકાર નાનો જ હોવો જોઇએ -જત્થાનો આકાર ખોટું છે -નિર્દેશિત જત્થા આકાર: {0} બાઇટસ.\n આપ સંગ્રહને એવા જત્થાઓમાં વિભાજિત કરવા ચાહો છો, શું તમને યકીન છે? -7400 -ફાઇલો સંયોજિત કરો -&માં સંયોજન કરો: -સંયોજન થઇ રહ્યુ છે... -વિભાજિત ફાઇલનો ફક્ત પ્રથમ ભાગ જ ચયનિત કરો -ફાઇલ ને વિભાજિત ફાઇલના ભાગના રૂપમાં ઓળખી નથી શકતુ -વિભાજિત ફાઇલના એક થી વધારે ભાગ શોધી નથી શકતુ -7500 -જાઁચયોગ(ચેકસમ)ની ગણના કરી રહ્યુ છે... -જાઁચયોગ(ચેકસમ) માહિતી -સીઆરસી જાઁચયોગ(ચેકસમ) આઁકડ઼ોં માટે : -સીઆરસી જાઁચયોગ(ચેકસમ) આઁકડ઼ોં અને નામોં માટે : -7600 -(કસૌટી ચિન્હ)બેઞ્ચમાર્ક -સ્મૃતિ ઉપયોગ: -સંકુચન કરી રહ્યું છે -પ્રસારણ કરી રહ્યું છે -ક્રમાંકન -કુલ ક્રમાંકન -વર્તમાન -પરિણામ -સીપીયૂ ઉપયોગ -ક્રમાંકન / ઉપયોગ -પાસ: diff --git a/Utils/7-Zip/Lang/he.txt b/Utils/7-Zip/Lang/he.txt deleted file mode 100644 index c4e9d39d9..000000000 --- a/Utils/7-Zip/Lang/he.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; : peterg -; : Gal Brill -; 9.13 : 2010-04-30 : Jonathan Lahav -; -; -; -; -; -; -; -; -0 -7-Zip -Hebrew -עברית -401 -אישור -ביטול - - - -&כן -&לא -&סגור -עזרה - -ה&משך -440 -כן ל&הכל -ל&א להכל -עצור -התחל מחדש -&רקע -&קדמה -ה&שהה -מושהה -?האם את/ה בטוח/ה שברצונך לבטל -500 -&קובץ -&עריכה -&תצוגה -&מועדפים -&כלים -ע&זרה -540 -&פתח -פתח ב&תוכנה -פתח ב&חלון -&הצג -&ערוך -&שנה שם -...העתק ל& -...העבר ל& -&מחק -...פצל קובץ& -...מזג קבצים& -מ&אפיינים -הערה -חשב סיכום ביקורת -הבדל -צור תיקייה -צור קובץ -י&ציאה -600 -בח&ר הכל -בטל בחירה -ה&פוך בחירה -...בחר -...בטל בחירה -בחר לפי סוג -בטל בחירה לפי סוג -700 -סמלים &גדולים -סמלים &קטנים -&רשימה -&פרטים -730 -לא מסודר -תצוגה בפריסה מלאה -&שני חלונות -&סרגלי כלים -פתח תיקיית שורש -חזור שלב אחד -...היסטוריית תיקיות -ר&ענן -750 -סרגל ארכיון -סרגל רגיל -כפתורים גדולים -הצג את פעולת הכפתור מתחתיו -800 -&הוסף תיקייה למועדפים כ -סימנייה -900 -&...אפשרויות -&מבחן ביצועים -960 -&...תוכן -&...7-Zip אודות -1003 -נתיב -שם -סיומת -תיקייה -גודל -גודל מכווץ -תכונות -נוצר -נצפה -השתנה -רצוף -נרשמה הערה -הוצפן -פצל לפני -פצל אחרי -מילון -CRC -סוג -אנטי -שיטה -מערכת הפעלה -מערכת קבצים -משתמש -קבוצה -קטע -הערה -מיקום -תחילית נתיב -תיקיות -קבצים -גירסה -חלק -ריבוי חלקים -קיזוז -קישורים -קטעים -חלקים - -64ביט -אחסון בסדר חשיבות יורד -משאבי מערכת/מעבד -גודל פיזי -גודל כותרת עליונה -בדיקת סיכום -מאפיינים -כתובת וירטואלית -מס' זיהוי -שם קצר -תוכנה יוצרת -גודל סקטור -מצב -קישור -שגיאה -גודל כללי -שטח פנוי -גודל קלסטר/יחידת אחסון -תווית -שם מקומי -ספק -2100 -אפשרויות -Language / שפה -Language / שפה: -עורך -&עורך: -&הבדל: -2200 -מערכת -7-Zip שייך ל : -2301 -שלב את התוכנה בתפריט-ההקשר הכללי -תפריט מדורג -פריטי תפריט: -2320 -<תיקייה> -<ארכיון> -פתח ארכיון -...חלץ קבצים -...הוסף לארכיון -בדוק ארכיון -חלץ לכאן -{0} -חלץ ל -{0} -הוסף ל -כווץ ושלח בדואר אלקטרוני -כווץ ל- {0} ושלח בדואר אלקטרוני -2400 -תיקיות -&תיקיית עבודה -של המ&ערכת "Temp" תיקיית ה -&נוכחית -&בחר תיקייה: -השתמש בהגדרות אלו עבור כוננים ניידים בלבד -.בחר מיקום לקבצי ארכיון זמניים -2500 -הגדרות -".." הצג את הפריט -הצג סמלי קבצים אמיתיים -הצג את תפריט המערכת -בחר את כל ה&שורה -הצג קווי &טבלה -לחיצה אחת לפתיחת פריט -שיטת &בחירה חלופית -השתמש בקטעי זיכרון &גדולים יותר -2900 -7-Zip אודות -זו היא תוכנה חופשית. עם זאת, ביכולתך לתמוך בפיתוח התוכנה על ידי הרשמה -3000 -המערכת אינה יכולה להקצוות את כמות הזיכרון הדרושה -אין שגיאות -(נבחרו {0} פריט(ים -'{0}' אין אפשרות ליצור את התיקייה -.פעולות עדכון לא נתמכות עבור ארכיון זה -'לא היה ניתן לפתוח את הקובץ '{0}' כארכיון -'?לא היה ניתן לפתוח את הארכיון המקודד '{0}'. סיסמא שגוייה -סוג ארכיון אינו נתמך -הקובץ {0} כבר קיים -?האם ברצונך לעדכן אותו בארכיון\n.הקובץ '{0}' שונה -'{0}'\nאין אפשרות לעדכן את הקובץ -.אין אפשרות להפעיל את העורך -(ייתכן והקובץ היינו וירוס (ישנם רווחים גדולים בשם הקובץ -.הפעולה אינה יכולה להתבצע מתיקייה בעלת נתיב ארוך -הינך חייב/ת לבחור קובץ אחד -הינך חייב לבחור קובץ אחד או יותר -יותר מדי פריטים -3300 -מחלץ -מכווץ -בודק -...פותח -...סורק -3400 -חלץ -&חלץ ל: -.ציין יעד לחילוץ הקבצים -3410 -שיטת הנתיבים -נתיבים מלאים -ללא נתיבים -3420 -מצב שכתוב קבצים -שאל לפני שכתוב -שכתב בלי לשאול -דלג על קבצים קיימים -שינוי שם אוטומטי -שינוי שם אוטומטי לקבצים קיימים -3500 -אשר החלפת קובץ -.תיקיית היעד מכילה כבר קובץ בשם זה -האם ברצונך להחליף את הקובץ הקיים -?בקובץ הזה -{בתים: {0 -שינוי שם &אוטומטי -3700 -.'{0}' שיטת הדחיסה אינה נתמכת עבור -.שגיאת מידע ב '{0}'. הקובץ אינו תקין -.בדיקת סכום הנתונים נכשלה ב '{0}'. הקובץ אינו תקין -'?שגיאת נתון בקובץ המקודד '{0}'. סיסמא שגוייה -'?שגיאה בבדיקת סכום הנתונים בקובץ המקודד '{0}'. סיסמא שגוייה -3800 -הכנס סיסמא -הכנס סיסמא: -הכנס שנית את הסיסמא: -&הצג סיסמא -הסיסמאות אינן תואמות -(!, #, $, ...) ליצירת הסיסמא השתמש רק באותיות אנגליות, מספרים או תווים מיוחדים -הסיסמא ארוכה מידי -סיסמא -3900 -הזמן שעבר: -הזמן שנותר: -גודל כולל: -מהירות: -התקדמות: -יחס כיווץ: -שגיאות: -ארכיונים: -4000 -הוסף לארכיון -&ארכיון: -מצב &עדכון: -&פורמט הארכיון: -רמת &דחיסה: -&שיטת דחיסה: -גודל מי&לון: -גודל &מילה: -גודל קטע רצוף: -כמות הליכי מעבד/מערכת: -&פרמטרים: -אפשרויות -צור ארכיון &חילוץ-עצמי -דחוס קבצים שבשיתוף -הצפנה -שיטת הצפנה: -&קדד שמות קבצים -זיכרון הדרוש לדחיסה: -זיכרון הדרוש לחילוץ: -4050 -אחסון -הכי מהירה -מהירה -רגילה -מקסימאלית -אולטרה -4060 -הוסף והחלף קבצים -עדכן והוסף קבצים -רענן קבצים קיימים -סנכרן קבצים -4070 -עיון -כל הקבצים -לא רצוף -רצוף -6000 -העתק -העבר -העתק ל: -העבר ל: -...מעתיק -...מעביר -...משנה שם -בחר תיקיית יעד. -הפעולה אינה נתמכת עבור תיקייה זו -אירעה שגיאה בשינוי שם של קובץ או תיקייה -אשר העתקת קובץ -?האם את/ה בטוח/ה שברצונך להעתיק קבצים לארכיון -6100 -אשר מחיקת קובץ -אשר מחיקת תיקייה -אשר מחיקת מספר קבצים -?'{0}' האם את/ה בטוח/ה שברצונך למחוק את -?האם את/ה בטוח/ה שברצונך למחוק את התיקייה '{0}' ואת כל תוכנה -?האם את/ה בטוח/ה שברצונך למחוק את {0} הפריטים האלה -...מוחק -אירעה שגיאה במהלך מחיקת קובץ או תיקייה -המערכת אינה יכולה להעביר קובץ עם נתיב ארוך לפח המחזור -6300 -צור תיקייה -צור קובץ -שם התיקייה: -שם הקובץ: -תיקייה חדשה -קובץ חדש -שגיאה ביצירת תיקייה -שגיאה ביצירת קובץ -6400 -הערה -&הערה: -בחר -בטל בחירה -מיסוך: -6600 -מאפיינים -היסטוריית תיקיות -הודעות איבחון -הודעה -7100 -מחשב -רשת -מסמכים -מערכת -7200 -הוסף -חלץ -בדוק -העתק -העבר -מחק -מידע -7300 -פצל קובץ -&פצל ל: -פצל לחלקים, בתים: -...מפצל -אשר פיצול -? האם את/ה בטוח/ה שברצונך לפצל את הקובץ ל{0} חלקים -גודל החלק חייב להיות קטן יותר מהקובץ המקורי -גודל חלק שגוי -?האם את/ה בטוח/ה שברצונך לפצל את הארכיון לחלקים אלה\nגודל החלק המוגדר: {0} בתים -7400 -מזג קבצים -&מזג ל: -...מבצע מיזוג -בחר רק את החלק הראשון של הקובץ המפוצל -לא היה ניתן למצוא קובץ שהוא חלק מהקובץ המפוצל -לא ניתן למצוא יותר מחלק אחד של הקובץ המפוצל -7500 -...מחשב סיכום ביקורת -תוצאות סיכום ביקורת -עבור הנתונים CRC בדיקת סיכום ביקורת : -עבור הנתונים ושמות CRC בדיקת סיכום ביקורת : -7600 -מבחן ביצועים -זיכרון בשימוש: -מכווץ -מחלץ -קצב -סיכום הקצב -נוכחי -סופי -משאבי מערכת/מעבד -קצב / שימוש -הצלחות: diff --git a/Utils/7-Zip/Lang/hi.txt b/Utils/7-Zip/Lang/hi.txt deleted file mode 100644 index 03a75a199..000000000 --- a/Utils/7-Zip/Lang/hi.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 9.07 : Vinayy Sharrma : अनुवाद विनय शर्मा मेहनत की है तो अपना नाम लिखने मे कोई बुराई तो है नही. हिन्दी पर गर्व करो, जय हिन्द ! जय हिन्दी ! -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Hindi, Indian, हिन्दुस्तान -हिन्दी -401 -ठीक है -रद्द - - - -&हाँ -&नहीं -&बंद करो -मदद - -&जारी रखे -440 -&सभी के लिये हाँ -&सभी के लिये नहीं -रूको -पुनः शुरु करें -&पॄष्ठ्भूमि -&अग्रभूमि(डेस्क्टोप) -&विश्राम -विश्रामित -तुम रद्द करना चाहते हो. तुम्हें यकीन है क्या? -500 -&फ़ाइल -&संपादन -&दर्शन -&मनपसंद -&औजार -&मदद -540 -&खोले -&अंदर खोले -&बाहर खोले -&दृश्य -&संपादन -&पुन: नामकरण -&में नकल बनाये... -&में ले जायें... -&मिटायें -&फ़ाइल का विभाजन करें... -&फ़ाइल का संयोजन करें... -&संपत्तियाँ या गुण -&टिप्पणी -&जाँच योग की गणना करें -&अन्तर -&फ़ोल्डर तैयार करें -&फ़ाइल तैयार करें -&निर्गमन -600 -&सभी चयन करे -&सभी अचयनित करें -&चयन उलटा करें -चयन करें... -अचयन करे... -प्रकार द्वारा चयन -प्रकार द्वारा अचयन -700 -बड़ी प्रतीक -लघु प्रतीक -&सूची -&वर्णन -730 -अवितरित -चौड़ा दृश्य -&२ फ़लक -&औजार पट्टीयाँ -मूल फ़ोल्डर खोले -एक स्तर ऊपर चढ़े -फ़ोल्डरो का इतिहास... -&ताजा करें -750 -संग्रह उपकरणपट्टी -मानक औजार पट्टी -बड़े खटके(बटन) -खटके(बटन) के शब्द दिखायें -800 -&फ़ोल्डर मनपसंद में ऎसे जोड़े... -पुस्तचिन्ह -900 -&विकल्प... -&बेञ्चमार्क(प्रामाणिक तुलना) -960 -&सामग्री... -7-जिप के बारे में... -1003 -मार्ग -नाम -विस्तार -फ़ोल्डर -आकार -कुल आकार -विशेषता या गुणधर्म -सर्जित -चलायी गई -परिवर्धित -ठोस -टिप्पणी -गुप्तिकृत -के पूर्व विभाजन(टुकडे) करें -के बाद विभाजन(टुकडे) करें -शब्दकोश -सीआरसी -प्रकार -विरोधी -पद्धति -यजमान आज्ञावली(ओपरेटिंग सिस्टम) -फ़ाइल प्रणाली -प्रयोगकर्ता -समूह -रोक या टुकड़े -प्रतिक्रिया -स्थान -मार्ग प्रत्यय -फोल्डर्स -फाइल्स -संस्करण -जत्था -अनेक जत्थे -ओफसेट -कडियाँ -टुकड़े -जत्थे - -64-बिट -बड़ा-एन्डियन -सीपीयू -भौतिक आकार -शीर्षकों के आकार -जाँचयोग -चरित्रताऎं -आभासी पता -आईडी -संक्षिप्त नाम -सर्जक अनुप्रयोग -सेक्टर का आकार -स्थिति -कड़ी -त्रुटि -कुल आकार -स्वतन्त्र रिक्तस्थान(खाली जगह) -क्लस्टर(समूह) आकार -ध्यानाकर्षक(लेबल) -स्थानिय नाम -प्रदायक -2100 -विकल्प -भाषा -भाषा: -संपादक -&संपादक: -&अन्तर: -2200 -प्रणाली या तंत्र -संबधित करें 7-जिप के साथ: -2301 -7-जिप के शेल (कवच) प्रसंग मेनु में जोडें -सोपानीकृत(केस्केडेड) प्रसंग मेनु -प्रसंग(कोन्टेक्स्ट) मेनु वस्तुएँ: -2320 -<फोल्डर> -<संग्रह(आर्चिव)> -संग्रह खोले -फ़ाइल्स बाहर निकाले... -संग्रह में जोड़े... -संग्रह की जाँच करे -यहीं बाहर निकाले -{0} में बाहर निकाले -{0} में जोड़े -दबायें(संकुचन) ओर इमेल करें... -{0} में दबायें ओर ईमेल करें -2400 -फ़ोल्डर्स -&कार्यरत फ़ोल्डर -&प्रणाली का अस्थायी(टेम्पररी) फोल्डर -&चालू -&निर्दिष्ट: -सिर्फ हटाने योग्य(रिमूवेबल) ड्राईव के लिये ही प्रयोग करें -अस्थायी संग्रह फाइल के लिये स्थान निर्दिष्ट करें(बतायें). -2500 -व्यवस्थाएँ -दिखाओ ".."वस्तु -वास्तविक फ़ाइल प्रतिमायें दिखाओ -तंत्र का मेनु दिखाओ -&पूरी पन्क्ति का चयन -&ग्रिड(जाल) रेखा दिखाओ -वस्तु खोलने के लिये एक ही(सिंगल)-क्लिक -&वैकल्पिक चयन स्थिति -&बड़े स्मृति पृष्ठ का प्रयोग करे -2900 -7-जिप के बारे में -7-जिप यह निःशुल्क सॉफ़्टवेयर है. फिर भी, आप पंजीकृत(रजिस्टर्ड) होकर७-ज़िप के विकास में सहयोग कर सकते हैं. -3000 -तंत्र जरूरी मात्रा में मेमोरी(स्मृति) वितरित नही कर सकता है -इनमे कोई भी त्रुटि नहीं है -{0} चयनित वस्तु(एँ) -'{0}' फ़ोल्डर सर्जित नहीं कर सकता -इस संग्रह के लिये अद्यतनीकृत संचालन समर्थित नहीं हैं. -'{0}' फाइल को संग्रह के रूप में नही खोल सकता -'{0}' गुप्तिकृत संग्रह को नही खोल सकता. गलत कूटशब्द? -असमर्थित संग्रह प्रकार -फाइल {0} पहले से मौजूद है -'{0}' फ़ाइल परिवर्धित हुई है.\nक्या तुम संग्रह में इसे अद्यतनीकृत करना चाहते हो? -फ़ाइल को अद्यतनीकृत नही कर सकता\n'{0}' -संपादक को शुरू नही कर सकता. -यह फाइल एक विषाणु(वायरस) जैसी लगती है(फाइल नाम लंबी खाली जगह नाम में रखता है). -जिस फोल्डर का लंबा मार्ग है उससे सञ्चालन क्रिया नही बुलाई जा सकती. -तुम्हे एक फाइल का चयन तो करना ही होगा -तुम्हे एक या ज्यादा फाइलों को चुनना ही होगा -बहुत ज्यादा वस्तुएँ -3300 -बाहर निकाल रहा है -संकुचन कर रहा है -परीक्षण -खोल रहा है... -तलाशी(स्कैनिंग) कर रहा है... -3400 -बाहर निकाले -&बाहर निकाले: -बाहर निकाली हुई फ़ाइलों के लिये स्थान निर्दिष्ट करें. -3410 -मार्ग स्थिति -पूरा मार्गनाम -कोई मार्ग नाम नहीं है -3420 -अधिलेखन रीत -अधिलेखन करने से पहले पूछे -बिना पूछे अधिलेखन(पुराने को मिटाना) करें -पहले से मौजूद फ़ाइलस को छोड़े -स्वचालित पुन: नामकरण -पहले से मौजूद फ़ाइलस का स्वचालित(ओटोमेटिक) पुन: नामकरण करे -3500 -फ़ाइल प्रतिस्थापन को पक्का करें -गन्तव्य फोल्डर में पहले से ही प्रक्रिया हुई फ़ाइल है. -क्या आप पहले से मौजूद फ़ाइल को बदलना पसंद करेंगे? -इसके साथ? -{0} बाइट्स -स्वचालित पुन: नामकरण -3700 -'{0}' के लिए असहायक दबाने की पद्धति. -डेटा त्रुटि'{0}' में. फ़ाइल टूटी हुई है. -'{0}' में सीआरसी असफल. फ़ाइल टूटी हुई है. -'{0}' गुप्तिकृत(एनक्रिप्टेड) फाइल में डेटा त्रुटि. गलत कूटशब्द? -'{0}'गुप्तिकृत(एनक्रिप्टेड) फाइल में सीआरसी असफल. गलत कूटशब्द? -3800 -कूटशब्द(पासवर्ड) डाले -कूटशब्द(पासवर्ड) डाले: -कूटशब्द पुनः डाले: -&कूटशब्द(पासवर्ड) दिखाओ -कूटशब्द सहेजे हुए से अलग है -कूटशब्द के लिये सिर्फ़ इंग्लिश वर्णमाला, अंको और विशेष अक्षरों (!, #, $, ...) का ही उपयोग करें -कूटशब्द बहुत ज्यादा बड़ा है -कूटशब्द(पासवर्ड) -3900 -व्यतीत समय: -बाकी बचा समय: -कुल आकार: -गति: -प्रक्रिया किया हुआ: -दबाने(आकार छोटा करने) का अनुपात: -त्रुटियाँ: -संग्रह: -4000 -संग्रह में जोड़े -&संग्रह: -&अद्यतनीकरण स्थिति(मोड): -संग्रह &ढाँचा: -&संकुचन स्तर: -&संकुचन विधि: -&शब्दकोश आकार: -&शब्द आकार: -ठोस टुकडे का आकार: -सीपीयू सूत्र संख्या: -&परिमाप: -विकल्प -&एसएफ़एक्स(SFX) संग्रह तैयार करें -साझी फाइलें संकुचित करें -गुप्तिकरण -गुप्तिकरण पद्धति: -फ़ाइल &नाम गुप्तिकरण करें -संकुचन के लिये स्मृति प्रयोग: -प्रसारण के लिये स्मृति प्रयोग: -4050 -भण्डारण -सर्वाधिक तेज -तेज -साधारण -अधिकतम -अत्यन्त -4060 -फ़ाइलें जोड़े और प्रतिस्थापित करे -फ़ाइले अद्यतनीकृत करें और जोड़े -अवस्थित फ़ाइलें ताजा करें -फाइलें समक्रमण(सिंक्रोनाईज़) करें -4070 -ब्राउज या घूमे -सभी फ़ाइलें -अ-ठोस -ठोस -6000 -नकल -ले जायें -में नकल: -में ले जायें: -नकल... -ले जा रहा है... -पुन: नामकरण... -गन्तव्य फोल्डर चयनित करें. -इस फोल्डर के लिये यह सञ्चालन क्रिया समर्थित नहीं है. -फ़ाइल या फ़ोल्डर के पुन: नामकरण में त्रुटि -फ़ाइल की नकल करना पक्का करो -तुम संग्रह में फाइल की प्रतिलिपि करना चाहते हो क्या तुम्हे यकीन है -6100 -फ़ाइल मिटाये यह पक्का करो -फ़ोल्डर मिटायें पक्का करो -अनेक फ़ाइल मिटायें पक्का करो -क्या तुम्हे यकीन है कि तुम मिटाना चाहते हो '{0}'? -क्या तुम्हे यकीन है कि तुम फ़ोल्डर मिटाना चाहते हो '{0}' और इसकी सब सामग्री भी? -क्या तुम्हे यकीन है कि तुम मिटाना चाहते हो इन {0} वस्तुओं को? -मिटा रहा है... -फ़ाइल किंवा फ़ोल्डर मिटाने में त्रुटि -तंत्र लंबे मार्ग वाली फाइल को पुनःचक्रण पेटी(रिसाईकल बिन) में नही ले जा सकता है. -6300 -फ़ॊल्डर तैयार करें -फ़ाइल तैयार करें -फ़ोल्डर नाम: -फ़ाइल नाम: -नया फ़ॊल्डर -नया फ़ाइल -फ़ोल्डर तैयार करने में त्रुटि -फ़ाइल तैयार करने में त्रुटि -6400 -टिप्पणी -&टिप्पणी: -चयन -चयन रद्द -मुखौटा: -6600 -गुण या संपत्तियाँ -फ़ोल्डरों का इतिहास -निदानात्मक संदेश -संदेश -7100 -संगणक -सञ्जाल -दस्तावेज -प्रणाली -7200 -जोड़े -बाहर निकाले -परीक्षण -नकल -ले जायें -मिटायें -सूचना -7300 -फ़ाइल का विभाजन करें -&में विभाजन: -जत्थों में विभाजन, बाइट्स: -विभाजन कर रहा है... -विभाजन करना पक्का करे -क्या तुम्हे यकीन है कि तुम फाइल को {0} जत्थों में विभाजित करना चाहते हो? -मूल फाइल के आकार की तुलना में जत्थे का आकार छोटा ही होना चाहिए -जत्थे का आकार गलत है -निर्देशित जत्था आकार: {0} बाइटस.\n आप संग्रह को ऎसे जत्थों में विभाजित करना चाहते है, क्या आपको यकीन है? -7400 -फ़ाइले संयोजित करें -&मेंसंयोजन करे: -संयोजन हो रहा है... -विभाजित फाइल का सिर्फ़ प्रथम भाग ही चयनित करे -फाइल को विभाजित फाइल के भाग के रूप में पहचान नही सकता -विभाजित फाइल का एक से ज्यादा भाग नही ढूँढ सकता -7500 -जाँचयोग(चेकसम) की गणना कर रहा है... -जाँचयोग(चेकसम) माहिती -सीआरसी जाँचयोग(चेकसम) आँकड़ों के लिये : -सीआरसी जाँचयोग(चेकसम) आँकड़ों और नामों के लिये : -7600 -(कसौटी चिन्ह)बेञ्चमार्क -स्मृति उपयोग: -संकुचन कर रहा है -प्रसारण हो रहा है -क्रमांकन -कुल क्रमांकन -वर्तमान -परिणाम -सीपीयू उपयोग -क्रमांकन / उपयोग -पास: diff --git a/Utils/7-Zip/Lang/hr.txt b/Utils/7-Zip/Lang/hr.txt deleted file mode 100644 index dd61b97a1..000000000 --- a/Utils/7-Zip/Lang/hr.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; 3.12 : Alan Šimek -; 4.53 : Hasan Osmanagić -; 9.07 : -; 15.05 : 2015-06-15 : Stjepan Treger -; -; -; -; -; -; -; -0 -7-Zip -Croatian -Hrvatski -401 -U redu -Odustani - - - -&Da -&Ne -&Zatvori -Pomoć - -Nastavi -440 -Da za &Sve -Ne za Sv&e -&Stani -Ponovi -U pozadini -U prvom planu -&Pauza -Pauzirano -Poništiti? -500 -&Datoteke -&Uređivanje -&Izgled -Omiljene mape -&Alati -&Pomoć -540 -&Otvori -Ot&vori mapu -Otvori u &sustavu -Iz&gled -&Uređivanje -Prei&menuj -&Kopiraj u... -Premje&sti u... -O&briši -Podije&li datoteku... -Spo&ji datoteke... -Svojs&tva -Komentar -Izračun kontrolnog zbroja -Uspoređivanje -Stvo&ri mapu -Stvori &datoteku -&Izlaz -Poveznica -&Alternativni tokovi -600 -Odaberi &sve -Poništi odabir -&Obrni odabir -Odaberi... -Poništi odabir... -Odabir po tipu -Poništi odabir tipa -700 -&Velike ikone -&Male ikone -&Popis -&Detalji -730 -Neso&rtirano -Sadržaj mapa -&2 okna -Alatne &trake -&Korijen -&Nadmapa -Proš&le mape... -O&svježi -Automatski osvježi -750 -Alatna traka arhiva -Standardna alatna traka -Velike tipke -Prikaži tekst -800 -Dod&aj u popis omiljenih kao -Zabilješka -900 -&Mogućnosti... -M&jerenje -960 -&7-Zip pomoć... -&O programu... -1003 -Putanja -Prema nazivu -Tip -Mapa -Prema veličini -Sažeta veličina -Atributi -Kreirano -Pristupano -Prema mijenjanju -Zbijeno -Komentar -Enkripcija -Podjeli prije -Podjeli poslije -Rječnik - -Prema tipu -Anti -Način -Glavni OS -Sustav datoteka -Korisnik -Grupa -Zbijeno -Komentar -Pozicija -U datoteci -Mape -Datoteke -Inačica -Dio -Višedijelni -Razmak -Veza -Blokovi -Dijelova - -64-bitno -Big-endian -CPU -Fizička veličina -Veličina zaglavlja -Kontrolni zbroj -Karakteristike -Virtualna adresa -Jedinstvena oznaka -Kratko ime -Aplikacija stvaranja -Veličina sektora -Način -Poveznica -Greška -Ukupni kapacitet -Slobodni prostor -Veličina klastera -Naziv -Lokalni naziv -Pružatelj -NT sigurnost -Alternativni tok -Dodatno -Obrisano -Je stablo - - -Tip greške -Greške -Greške -Upozorenja -Upozorenje -Tokovi -Alternativni tokovi -Veličina alternativnih tokova -Virtualna veličina -Veličina raspakiranog -Ukupna fizička veličina -Indeks dijela -Podtip -Kratki komentar -Kodna stranica - - - -Veličina repa -Veličina ugrađenog odsječka -Poveznica -Čvrsta poveznica -iNode - -Samo za čitanje -2100 -Mogućnosti -Jezik -Jezik: -Uređivač -&Program za uređivanje: -Program za uspoređivanje: -2200 -Sustav -Poveži 7-Zip sa: -Svi korisnici -2301 -Integriraj 7-Zip u padajući kontekstni izbornik -Padajući kontekstni izbornik -Stavke kontekstnog izbornika: -Ikone kontekstnog izbornika -2320 - - -Otvori arhiv -Raspakiraj datoteke... -Dodaj u arhiv... -Testiraj arhiv -Raspakiraj ovdje -Raspakiraj u {0} -Dodaj u {0} -Sažimanje i slanje e-poštom -Sažimanje u {0} i slanje e-poštom -2400 -Mape -&Radna mapa -&Privremena sistemska mapa -&Trenutna -&Navedena: -Koristi samo za izmjenjive diskove -Lokaciju za smještaj privremenih datoteka. -2500 -Postavke -Nadmapa ".." -Prikaži prave ikone datoteka -Prikaži sistemski izbornik -&Označi cijeli redak -Prikaži &linije mreže -Jedan klik za otvaranje stavke -Drugi n&ačin označavanja -Koristi raspo&loživu memoriju -2900 -O 7-Zip-u -7-Zip je besplatan softver. -3000 -Sustav ne može pripremiti potrebnu količinu memorije -Nema grešaka -{0} objekt(a) izabrano -Ne mogu kreirati mapu '{0}' -Obnova nije podržana za ovaj arhiv. -Nemoguće otvoriti datoteku '{0}' kao arhiv -Nemoguće otvoriti kriptiranu arhivu '{0}'. Kriva lozinka? -Tip arhive nije podržan -Datoteka {0} već postoji -Datoteka '{0}' je izmijenjena.\nObnoviti arhiv? -Nije moguće obnoviti datoteku\n'{0}' -Nije moguće započeti uređivanje. -Datoteka izgleda kao virus (naziv datoteke sadrži dugačke razmake). -Operaciju nemoguće pozvati iz mape koja ima dugačku putanju. -Morate obilježiti jednu datoteku -Morate obilježiti jednu ili više datoteka -Previše stavki -Nemoguće otvoriti datoteku kao {0} arhivu -Datoteka je otvorena kao {0} arhiva -Arhiva je otvorena sa pomakom -3300 -Raspakiranje -Sažimanje u arhiv -Testiranje -Otvaranje u tijeku... -Skeniram... -Uklanjanje -3320 -Dodavanje -Ažuriranje -Analiziranje -Replikiranje -Repakiranje -Preskakanje -Brisanje -Stvaranje zaglavlja -3400 -Raspakiraj -&Raspakiraj u: -Lokacija za raspakiranje datoteka. -3410 -Putanja mapa: -Potpune putanje -Bez putanja -Apsolutne putanje -Relativne putanje -3420 -Natpiši postojeće -Pitaj prije natpisivanja postojećeg -Natpiši postojeće bez upozorenja -Preskoči postojeće datoteke -Automatska promjena naziva -Automatska promjena naziva postojećih datoteka -3430 -Eliminiraj dupliranje korijenske mape -Vrati sigurnost datoteka -3500 -Potvrdite zamjenu datoteka -Ciljana mapa već sadrži datoteku koja se trenutno obrađuje. -Zamijeniti postojeću -datoteku s ovom? -{0} bajte -A&utomatska promjena naziva -3700 -Nije podržan način sažimanja za '{0}'. -Podatkovna greška u '{0}'. Datoteka je neispravna. -CRC greška u '{0}'. Datoteka je neispravna. -Greška u kriptiranoj datoteci '{0}'. Kriva lozinka? -CRC greška u kriptiranoj datoteci '{0}'. Kriva lozinka? -3710 -Kriva lozinka? -3721 -Nepodržana metoda kompresije -Greška podataka -CRC neuspješan -Nedostupni podaci -Neočekivan kraj podataka -Postoji još podataka nakon glavnih podataka -Nije arhiva -Greška zaglavlja -Kriva lozinka -3763 -Neočekivan početak arhive -Nepotvrđen početak arhive - - - -Nepodržano svojstvo -3800 -Unesite lozinku -Unesite lozinku: -Ponovite lozinku: -&Prikaži lozinku -Lozinka nije jednaka -Koristite samo engleska slova, brojeve i specijalne znake (!, #, $, ...) za lozinku -Lozinka je preduga -&Lozinka -3900 -Utrošeno vrijeme: -Preostalo vrijeme: -Veličina: -Brzina: -Obrađeno: -Omjer kompresije: -Greške: -Arhive: -4000 -Dodaj u arhiv -&Arhiv: -&Način obnove: -&Format arhiva: -Stupanj sažimanja -&Metoda sažimanja: -Veličina &rječnika: -&Veličina riječi: -Veličina bloka u zbijenom: -Broj niti u CPU: -&Parametri: -&Mogućnosti -Kreiraj E&XE arhiv -Sažmi dijeljene datoteke -Kriptiranje -Metoda kriptiranja: -Enkripcija naziva datoteka -Korištenje memorije za sažimanje: -Korištenje memorije za raspakiranje: -Obriši datoteke nakon kompresije -4040 -Spremi simbolične poveznice -Spremi čvrste poveznice -Spremi alternativne tokove podataka -Spremi sigurnost datoteka -4050 -Bez sažimanja -Vrlo brzo -Brzo -Uobičajeno -Najjače -Ultra -4060 -Dodaj i zamjeni datoteke -Obnovi i dodaj datoteke -Osvježi postojeće datoteke -Sinkroniziraj datoteke -4070 -Traži -Sve datoteke -Bez-zbijanja -Zbijeno -6000 -Kopiraj -Premjesti -Kopiraj u: -Premjesti u: -Kopiranje u tijeku... -Premještanje u tijeku... -Preimenovanje u tijeku... -Odabir odredišne mape. -Operacija nije podržana. -Greška pri preimenovanju datoteke ili mape -Potvrdite kopiranje datoteka -Kopiranje datoteka u arhiv? -6100 -Potvrdite brisanje datoteke -Potvrdite brisanje mape -Potvrdite višestruko brisanje datoteka -Obrisati '{0}'? -Obrisati mapu '{0}' i sav njezin sadržaj? -Obrisati ove {0} podatke? -Brisanje u tijeku... -Greška pri brisanju datoteke ili mape -Sustav ne može premjestiti datoteku sa dugačkom putanjom u Kantu za recikliranje -6300 -Kreiraj mapu -Kreiraj datoteku -Naziv mape: -Naziv datoteke: -Nova mapa -Nova datoteka -Greška pri kreiranju mape -Greška pri kreiranju datoteka -6400 -Komentar -&Komentar: -Odaberi -Poništi odabir -Maska: -6600 -Svojstva -Kronologija mapa -Dijagnostičke poruke -Poruka -7100 -Računalo -Mreža -Dokumenti -Sustav -7200 -Dodaj -Raspakiraj -Testiraj -Kopiraj -Premjesti -Obriši -Svojstva -7300 -Podijeli datoteku -&Podijeli u: -Razdvajanje na dijelove, bajta: -Dioba... -Potvrdite diobu -Podijeliti datoteku u {0} dijelova? -Veličina diobenog dijela mora biti manja od izvorne datoteke -Netočna veličina bloka -Veličina bloka: {0} bajtova.\nJeste li sigurni da želite podijeliti u takve dijelove? -7400 -Spoji datoteke -&Spoji u: -Spajanje... -Označite samo prvu datoteku -Nije pronađena datoteka koja je dio razdijeljenih datoteka -Pronađena samo jedna datoteka od razdijeljenih datoteka -7500 -Izračunavanje kontrolnog zbroja... -Info kontrolni zbroj -CRC kontrolni zbroj za podatke: -CRC kontrolni zbroj za podatke i nazive: -7600 -Mjerenje -Korištenje memorije: -Sažimanje -Raspakiranje -Ocjena -Ukupna ocjena -Trenutno -Rezultat -CPU zauzeće -Ocjena / Zauzeće -Prolazi: -7700 -Poveznica -Poveznica -Veza od: -Veza do: -7710 -Tip poveznice -Čvrsta poveznica -Simbolična poveznica datoteka -Simbolična poveznica mapa -Mapa čvorišta diff --git a/Utils/7-Zip/Lang/hu.txt b/Utils/7-Zip/Lang/hu.txt deleted file mode 100644 index b7b40ba94..000000000 --- a/Utils/7-Zip/Lang/hu.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; : Jozsef Tamas Herczeg -; 9.16 : Nyilas MISY -; -; -; -; -; -; -; -; -; -0 -7-Zip -Hungarian -Magyar -401 -OK -Mégsem - - - -&Igen -&Nem -&Bezárás -Súgó - -&Folytatás -440 -I&gen, mindre -N&em, mindre -Leállítás -Újraindítás -&Háttérben -&Előtérben -&Szünet -Szünet -Biztos, hogy megszakítja a folyamatot? -500 -&Fájl -S&zerkesztés -&Nézet -Ked&vencek -&Eszközök -&Súgó -540 -M&egnyitás -Megnyitás &belül -Megnyitás kí&vül -&Nézet -S&zerkesztés -Átn&evezés -Más&olás mappába... -Át&helyezés mappába... -&Törlés -Fájl&darabolás... -Fájl&egyesítés... -T&ulajdonságok -&Megjegyzés -Checksum számolása -Különbség -Mappa létrehozása -Fájl létrehozása -&Kilépés -600 -Min&d kijelölése -Kijelölés megszüntetése -Kijelölés &megfordítása -Kijelölés... -Megszüntetés... -Kijelölés típus alapján -Megszüntetés típus alapján -700 -&Nagy ikonok -&Kis ikonok -&Lista -&Részletek -730 -Rendezetlen -Lapos ikonok -&2 panel -&Eszköztárak -Gyökérmappa megnyitása -Egy szinttel feljebb -Mappa előzmények... -&Frissítés -750 -Archiválás eszköztár -Szokásos eszköztár -Nagy gombok -Szövegcímkék megjelenítése -800 -Mappa &hozzáadása a Kedvencekhez mint -Könyvjelző -900 -&Beállítások... -&Teljesítménymérés -960 -&Tartalomjegyzék... -7-Zip &névjegye... -1003 -Útvonal -Név -Kiterjesztés -Mappa -Méret -Tömörített méret -Attribútumok -Létrehozva -Hozzáférés -Módosítva -Tömör -Megjegyzés -Titkosított -Feldarabolás előtt -Feldarabolás után -Szótár -CRC -Típus -Anti -Módszer -Gazda OS -Fájlrendszer -Felhasználó -Csoport -Blokk -Megjegyzés -Pozíció -Útvonal előtag -Mappák -Fájlok -Verzió -Kötet -Többkötet -Eltolás -Linkek -Blokkok -Kötetek - -64-bit -Big-endian -CPU -Fizikai méret -Fejlécek mérete -Checksum -Karakterisztika -Virtuális cím -ID -Név rendezése -Alkalmazás készítője -Szakasz mérete -Mód -Link -Hiba -Teljes méret -Szabad terület -Kluszterméret -Címke -Helyi név -Szolgáltató -2100 -Beállítások -Nyelv -Nyelv: -Szerkesztő -&Szerkesztő: -&Különbség: -2200 -Rendszer -7-Zip társítása: -2301 -7-Zip hozzáadása a parancsértelmező helyi menüjéhez -Lépcsőzetes helyi menü -Helyi menü elemek: -2320 - - -Archívum megnyitása -Fájlok kibontása... -Hozzáad az archívumhoz... -Archívum tesztelése -Kibontás ide -Kibontás ide: {0} -Hozzáadás: {0} -Tömörítés és küldés... -Tömörítés {0} archívumba és küldés -2400 -Mappák -&Munkamappa -A &rendszer ideiglenes mappája -&Jelenlegi -&Meghatározott: -Csak cserélhető meghajtókhoz -Válassza ki az ideiglenes archív fájlok mappáját. -2500 -Beállítások -A ".." elem látható -Az eredeti fájlikonok láthatók -Látható a rendszermenü -&Teljes soros kijelölés -&Rácsvonalak kijelzése -Elem megnyitása egyszeres kattintással -&Alternativ kiválasztási mód -&Nagy memória haszálata -2900 -A 7-Zip névjegye -A 7-Zip ingyenes szoftver. Ha elnyerte a tetszését, s mégis szeretné támogatni a további fejlesztését, regisztrálja 20 USD áron, fizethet hitelkártyával vagy más módon. -3000 -A rendszer nem tudja lefoglalni a szükséges memóriát -Az archívum hibamentes -{0} objektum kijelölve -A(z) '{0}' mappát nem lehet létrehozni -Az aktualizálás ennél az archívumtípusnál nem támogatott. -A(z) '{0}' fájl nem nyitható meg archívként -A(z) '{0}' titkosított archívum nem megnyitható. Hibás a jelszó? -Nem támogatott archívum típus -A(z) {0} fájl már létezik -'{0}'\nA fájl tartalma megváltozott.\nKívánja aktualizálni az archívumban? -A fájl nem aktualizálható:\n'{0}' -A szerkesztő nem indítható. -A fájl vírusnak néz ki (a fájlnév hosszú szóközt tartalmaz a nevében). -A művelet nem hívható meg abból a mappából amelynek hosszú az elérési útvonala. -Egy fájlt ki kell jelölnie! -Egy vagy több fájlt ki kell jelölnie -Túl sok elem -3300 -Kibontás -Tömörítés -Tesztelés -Megnyitás... -Vizsgálat... -3400 -Kibontás -&Kibontás ide: -Határozza meg a kibontott fájlok tárolómappáját. -3410 -Útvonal -Teljes útvonal -Nincs útvonal -3420 -Felülírás -Rákérdezés felülírás előtt -Felülírás rákérdezés nélkül -A létező fájlok kihagyása -Automatikus átnevezés -A létező fájlok automatikus átnevezése -3500 -Fájlcsere megerősítése -A célmappa már tartalmazza a feldolgozott fájlt. -Kívánja lecserélni a létező fájlt -ezzel a fájllal? -{0} bájt -A&utomatikus átnevezés -3700 -A(z) '{0}' tömörítési módja nem támogatott. -Adathiba a következőben: '{0}'. A fájl sérült. -CRC-hiba a következőben: '{0}'. A fájl sérült. -Adathiba a titkosított fájlban: '{0}'. Hibás a jelszó? -CRC-hiba a titkosított fájlban: '{0}'. Hibás a jelszó? -3800 -Jelszó beírása -Írja be a jelszót: -Jelszó újbóli beírása: -A &jelszó megjelenítése -Jelszavak nem egyeznek -Csak ékezetmentes karaktereket, számokat és speciális karaktereket (!, #, $, ...) használjon a jelszavaknak -A jelszó túl hosszú -Jelszó -3900 -Eltelt idő: -Hátralévő idő: -Méret: -Sebesség: -Feldolgozott: -Tömörítési arány: -Hibák: -Archívumok: -4000 -Behelyezés archívumba -&Archívum: -Akt&ualizálás módja: -Arcíhvum &formátuma: -Tömörítés &foka: -Tömörítés &módja: -&Címtár mérete: -&Szó mérete: -Tömör blokk méret: -CPU számok: -&Tulajdonságok: -Beállítások -SF&X archívum létrehozása -Megosztott fájlok tömörítése -Titkosítás -Titkosítási eljárás: -Fájlnevek &titkosítása -A tömörítés memóriahasználata: -A kitömörítés memóriahasználata: -4050 -Raktár -Leggyorsabb -Gyors -Normál -Legnagyobb -Ultra -4060 -Fájlok behelyezése és cseréje -Fájlok aktualizálása és behelyezése -Létező fájlok frissítése -Fájlok szinkronizálása -4070 -Tallózás -Minden fájl -Nem tömör -Tömör -6000 -Másolás -Áthelyezés -Másolás ide: -Áthelyezés ide: -Másolás... -Áthelyezés... -Átnevezés... -Válassza ki a cél mappát. -A művelet nem támogatott. -Hiba történt a fájl vagy a mappa átnevezésekor -Fájl másolásának megerősítése -Biztos, hogy fájl(oka)t akar másolni az archívumba? -6100 -Fájltörlés megerősítése -Mappatörlés megerősítése -Több fájltörlés megerősítése -Biztos, hogy törölni akarja a következőt: '{0}'? -Biztos, hogy törölni akarja a(z) '{0}' mappát és annak teljes tartalmát? -Biztos, hogy törölni akarja ezt a(z) {0} elemet? -Törlés... -Hiba történt a fájl vagy a mappa törlésekor -A rendszer nembírja mozgatni a fájlt a hosszú útvonallal a Lomtárba -6300 -Mappa létrehozása -Fájl létrehozása -Mappa neve: -Fájlnév: -Új mappa -Új fájl -Hiba történt a mappa létrehozásakor -Hiba történt a fájl létrehozásakor -6400 -Megjegyzés -&Megjegyzés: -Kijelölés -Megszüntetés -Maszk: -6600 -Tulajdonságok -Mappa előzmények -Diagnosztikai üzenetek -Üzenet -7100 -Sajátgép -Hálózati helyek -Dokumentumok -Rendszer -7200 -Hozzáadás -Kibontás -Teszt -Másolás -Áthelyezés -Törlés -Tulajdonságok -7300 -Fájldarabolás -&Darabolás ide: -Darabolás &kötetekre, bájt: -Darabolás... -Darabolás megerősítése -Biztos szét akarja darabolni a fájlt {0} kötetre? -Kötet méretének kissebbnek kell lennie, mint az eredeti fájl mérete -Hibás kötet méret -A megadott kötet mérete: {0} byte.\nBiztos fel akarja darabolni az archívumot ilyen kötetre? -7400 -Fájlegyesítés -&Egyesítés ide: -Egyesítés... -Csak az első rész kiválasztása a darabolt fájlból -Nem ismeri fel a fájlt, mint darabolt fájl része -Nem talál egynél több részt a darabolt fájlból -7500 -Leírás számolása... -Leírás információ -CRC leírás az adathoz: -CRC leírás az adathoz és névhez: -7600 -Teljesítménymérés -Memóriahasználat: -Tömörítés -Kitömörítés -Értékelés -Összértékelés -Jelenlegi -Eredmény -CPU használata -Becslés / Használat -Menetek: diff --git a/Utils/7-Zip/Lang/hy.txt b/Utils/7-Zip/Lang/hy.txt deleted file mode 100644 index 343d0284a..000000000 --- a/Utils/7-Zip/Lang/hy.txt +++ /dev/null @@ -1,501 +0,0 @@ -;!@Lang2@!UTF-8! -; : Gevorg Papikyan -; 15.00 : Hrant Ohanyan : http://haysoft.org -; -; -; -; -; -; -; -; -; -0 -7-Zip -Armenian -Հայերեն -401 -ԼԱՎ -Չեղարկել - - - -&Այո -&Ոչ -&Փակել -Օգնություն - -&Շարունակել -440 -Այո բոլորի &համար -Ոչ բոլորի &համար -Կանգնեցնել -Վերսկսել -&Խորապատկերում -&Առջևում -&Դադար -Դադարի մեջ է -Ընդհատե՞լ -500 -&Ֆայլ -&Խմբագրել -&Տեսք -&Ընտրյալներ -Գ&ործիքներ -&Օգնություն -540 -&Բացել -Բացել &ներսում -Բացել դրս&ում -Ընտրել -&Խմբագրել -Վեր&անվանել -&Պատճենել... -&Տեղափոխել... -&Ջնջել -Տրոհել& ֆայլը... -Հ&ամակցել ֆայլը... -Հատկու&թյուններ -Մեկնաբա&նություններ -Հանրագումար -Համեմատել -&Ստեղծել թղթապանակ -Ստեղ&ծել ֆայլ -Փակ&ել -Հղում -&Այլընտրանքային հոսքեր -600 -Նշել &բոլորը -Ապանշել -&Ետարկել ն&շումը -Նշել... -Ապանշել... -Նշել ըստ տեսակի -Ապանշել ըստ տեսակի -700 -&Մեծ պատկերակներով -&Փոքր պատկերակներով -Ցուց&ակ -&Աղյուսակ -730 -Առանց դասավորելու -Հարթ եղանակ -&2 վահանակ -&Գործիքների վահանակ -Բացել արմատային թղթապանակը -Մեկ մակարդակ վերև -Թղթապանակների պատմությունը... -Թ&արմացնել -Ինքնաթարմացում -750 -Ծրագրի կոճակների վահանակ -Կոճակների ստանդարտ վահանակ -Մեծ կոճակներով -Կոճակների անունը -800 -Ավելացնել թղթապանակը &ընտրյալներին որպես -Էջանիշ -900 -Կարգավորումներ... -Արտադրողականության թեստ -960 -&Բովանդակություն... -Ծրագրի &մասին... -1003 -Ուղի -Անուն -Ընդլայնում -Թղթապանակ -Չափ -Սեղմած -Հատկություններ -Ստեղծվել է -Մուտք -Փոփոխվել է -Անընդհատ -Մեկնաբանություններ -Կոդավորված է -Տրոհված է մինչ -Տրոհված է հետո -Բառարան - -Տեսակ -Հակա -Մեթոդ -Համակարգ -Ֆայլային համակարգ -Օգտվող -Խումբ -Կողպում -Մեկնաբանություններ -Դիրք -Ուղի -Թղթապանակներ -Ֆայլեր -Տարբերակ -Հատոր -Բազմահատոր -Շեղում -Հղումներ -Հատվածներ -Հատորներ - - - -CPU -Ֆիզիկական չափը -Գլխագրերի չափը -Արդյունքը -Բնութագրություններ -Վիրտուալ հասցե - -Կարճ անուն -Ստեղծող -Հատվածի չափ -Եղանակ -Նշանային հղում -Սխալ -Ծավալ -Ազատ է -Կլաստերի չափ -Տառ -Տեղային անուն -Մատակարար -Անվտանգություն -Այլընտրանքային հոսք - -Հեռակա -Ծառ - - -Սխալի տեսակ -Սխալներ -Սխալներ -Զգուշացում -Զգուշացումներ -Հոսքեր -Այլընտրանքային հոսքեր -Այլընտրանքային հոսքերի չափ -Վիրտուալ չափը -Բացված չափը -Ընդհանուր ֆիզիկական չափը -Հատորի համարը -Ենթատեսակ -Կարճ մեկնաբանություն -Կոդային էջ - - - -Մնացորդի չափը -Ներկառուցված հատվածի չափը -Հղում -Կոշտ հղում -iNode - -Միայն կարդալու - - - - - - -2100 -Կարգավորումներ -Լեզուն -Լեզուն. -Խմբագիր -&Խմբագիր -&Համեմատելու ծրագիր. -2200 -Համակարգը -Ասոցիացնել 7-Zip-ը հետևյալ ֆայլերի հետ՝ -Բոլոր օգտվողները -2301 -Ներդնել 7-Zip-ը համատեքստային ցանկում -Կասկադային ցանկ -Համատեքստային ցանկի բաղադրիչները -Պատկերակներ համատեքստային ցանկում -2320 -«Թղթապանակ» -«Արխիվ» -Բացել արխիվը -Դուրս բերել -Ավելացնել արխիվի... -Թեստավորել -Դուրս բերել այստեղ -Դուրս բերել{0}-ում -Ավելացնել {0}-ին -Սեղմել և ուղարկել էլ. փոստով... -Սեղմել {0}-ում և ուղարկել էլ. փոստով -2400 -Թղթապանակներ -&Աշխատանքային թղթապանակ -&Համակարգային ժամանակավոր թղթապանակ -&Ընթացիկ -&Նշանակել. -Օգտագործել միայն շարժական կրիչների համար -Նշեք ժամանակավոր արխիվների համար տեղ -2500 -Կարգավորումներ -Ցուցադրել բաղադրիչը ".." -Ցուցադրել ֆայլերի իրական պատկերները -Ցուցադրել համակարգային ցանկը -Կուրսորը ամբողջ տողով -Ցուցադրել բաժանարարներ -Բացել մեկ սեղմամբ -Նշելու այլընտրանքային եղանակ -Օգտագործել հիշողության մեծ ծավալներ -2900 -7-Zip-ի մասին -7-Zip-ը ազատ տարածվող ծրագիր է: -3000 -Չկա ազատ տեղ -Սխալներ չկան -Ընտրված են {0} ֆայլեր -Հնարավոր չէ ստեղծել '{0}' թղթապանակը: -Փոփոխման գործողությունը այս արխիվը չի աջակցում: -Հնարավոր չէ բացել '{0}' ֆայլը որպես արխիվ -Հնարավոր չէ բացել '{0}' կողփած արխիվը: Մուտքագրեք գաղտնաբառը: -Արխիվի տեսակը չի աջակցվում -{0} ֆայլը արդեն գոյություն ունի -'{0}' ֆայլը փոփոխվել է:\n Թարմացնե՞լ այն արխիվում: -Հնարավոր չէ թարմացնել ֆայլը \n'{0}' -Հնարավոր չէ բացել խմբագիրը: -Ֆայլը նման է վիրուսի: -Գործողությունը չի կարող կատարվել այն թղթապանակից, որը ունի երկար ճանապարհ: -Ընտրեք գոնե մեկ ֆայլ -Ընտրեք գոնե մեկ կամ մի քանի ֆայլեր -Բաղադրիչները շատ են -Հնարավոր չեղավ բացել ֆայլը որպես {0} արխիվ -Ֆայլը բացվել է որպես {0} արխիվ -Ֆայլը բացվել է շեղումով -3300 -Դուրս է բերվում -Սեղմվում է -Թեստավորվում է -Բացվում է... -Տեսածրում... -Ջնջում -3320 -Ավելացվում է -Թարմացվում է -Վերլուծում -Պատճենվում է -Վերափաթեթավորում -Բաց է թողնվում -Ջնջում -Գլխագրերի ստեղծում -3400 -Դուրս բերել -&Դուրս բերել՝ -Նշեք հանվող ֆայլերի տեղադրությունը: -3410 -Ֆայլերի ուղին. -Ամբողջական& ուղիներ -&Առանց ուղիների -Բացարձակ ուղիներ -Հարաբերական ուղիներ -3420 -Վերագրանցում -Հաստատումով -Առանց հաստատման -Բաց թողնել -Վերանվանել -Վերանվանել գոյություն ունեցողները -3430 -Վերացնել արմատային թղթ. կրկնօրինակումը -Վերացնել մուտքի թույլտվությունը -3500 -Հաստատեք ֆայլի փոխարինումը -Թղթապանակում արդեն կա մշակված ֆայլ: -Փոխարինե՞լ առկա ֆայլը -տվյալ ֆայլով: -{0} բայթ -Վերանվանել ինք. -3700 -'{0}' ֆայլը սեղմելու եղանակը չի աջակցվում -Տվյալների սխալ'{0}'-ում: Ֆայլը վնասված է: -CRC սխալ'{0}'-ում: Ֆայլը վնասված է: -Սխալ՝ '{0}' ֆայլի կոդավորման տվյալներում: Գաղտնաբառը սխա՞լ է: -CRC սխալ '{0}' կոդավորված ֆայլի համար: Գաղտնաբառը սխա՞լ է: -3710 -Գաղտնաբառը սխա՞լ է -3721 -Սեղմելու չաջակցվող եղանակ -Սխալ տվյալներում -CRC սխալ -Անհասանելի տվյալներ -Տվյալների անսպասելի ավարտ -Կան տվյալներ՝ օգտակար տվյալների հատվածի վերջում -Արխիվ չէ -Սխալ գլխագրերում -Գաղտնաբառը սխալ է -3763 -Արխիվի անընդունելի սկիզբ -Արխիվի չհաստատված սկիզբ - - - -Չաջակցվող յուրահատկություն -3800 -Մուտքագրել գաղտնաբառ -&Մուտքագրել գաղտնաբառ. -Կրկնել գաղտնաբառը. -&Ցուցադրել գաղտնաբառը -Գաղտնաբառը չի համապատասխանում -Գաղտնաբառի համար օգտագործեք միայն լատիներեն տառեր, թվեր և հատուկ նշաններ (!, #, $, ...) -Գաղտնաբառը չափազանց երկար է -&Գաղտնաբառը. -3900 -Անցել է. -Մնացել է. -Չափ. -Արագություն. -Ընթացք. -Սեղմելու աստիճան -Սխալներ. -Արխիվներ. -4000 -Ավելացնել արխիվի -&Արխիվ. -&Փոփոխման կարգը. -&Արխիվի տեսակը. -&Սեղմելու աստիճանը. -&Սեղմելու մեթոդը. -Բառարանի &չափը. -Բառի չ&ափը. -Հատվածի չափը. -CPU հոսքերի քանակը. -&Ցուցիչներ. -&Ընտրանքներ -Ստեղծել SF&X արխիվ -Սեղմել համաօգտագործվող ֆայլերը -Կոդավորում -Կոդավորման եղանակ. -&Կոդավորել ֆայլերի անունները -Հիշող. ծավալը սեղմելու համար. -Հիշող. ծավալը դուրս բերելու համար. -Սեղմելուց հետո ջնջել ֆայլերը -4040 -Պահպանել նշանային հղումները -Պահպանել կոշտ հղումները -Պահպանել այլընտրանքային հոսքերը -Պահպանել մուտքի իրավունքը -4050 -Առանց սեղմելու -Արագընթաց -Արագ -Նորմալ -Առավելագույն -Ուլտրա -4060 -Ավելացնել և փոխարինել -Թարմացնել և ավելացնել -Թարմացնել -Համաժամեցնել -4070 -Թերթել -Բոլոր ֆայլերը -Ֆայլի չափով -Անդադար -6000 -Պատճենել -Տեղափոխել -Պատճենել՝ -Տեղափոխել՝ -Պատճենվում է... -Տեղափոխվում է... -Վերանվանվում է... -Ընտրել թղթապանակ -Գործողությունը չի աջակցվում -Սխալ` ֆայլը կամ թղթապանակը անվանափոխելիս: -Հաստատեք ֆայլերի պատճենումը -Պատճենե՞լ այս ֆայլերը արխիվի մեջ: -6100 -Հաստատել ֆայլի ջնջումը -Հաստատել թղթապանակի ջնջումը -Հաստատել ֆայլերի ջնջումը -Իրո՞ք ցանկանում եք ջնջել "{0}"-ը: -Իրո՞ք ցանկանում եք ջնջել "{0}" թղթապանակը և նրա պարունակությունը: -Իրո՞ք ցանկանում եք ջնջել ({0} հատ) ֆայլերը: -Ջնջում է... -Սխալ` ֆայլը կամ թղթապանակը ջնջելիս: -Հնարավոր չէ Աղբարկղ տեղափոխել երկար անուններով ֆայլեր: -6300 -Ստեղծել թղթապանակ -Ստեղծել ֆայլ -Թղթապանակի անունը. -Ֆայլի անունը. -Նոր թղթապանակ -Նոր ֆայլ -Սխալ` թղթապանակ ստեղծելիս -Սխալ` ֆայլ ստեղծելիս -6400 -Մեկնաբանություններ -&Մեկնաբանություններ -Նշել -Ապանշել -Դիմակ. -6600 -Հատկություններ -Թղթապանակների պատմությունը -Հաղորդագրություն -Հաղորդագրություն -7100 -Համակարգիչ -Ցանց -Փաստաթղթեր -Համակարգ -7200 -Ավելացնել -Դուրս բերել -Թեստավորել -Պատճենել -Տեղափոխել -Ջնջել -Տեղեկություն -7300 -Տրոհել ֆայլը -&Տրոհել՝ -Տրոհել &մասերի (բայթերով)` -Տրոհում... -Հաստատեք տրոհումը -Իրո˚ք տրոհել ֆայլը {0} հատորների -Հատորի չափը պետք է փոքր լինի ընթացիկ ֆայլի չափից -Գործողության սխալ -Հատորի նշված չափը. {0} բայթ:\nՏրոհե˚լ արխիվը հատորների: -7400 -Համակցել ֆայլը -&Համակցել. -Համակցում... -Ընտրել տրոհված ֆայլի միայն առաջին մասը -Հնարավոր չեղավ ճանաչել տրոհված ֆայլը -Հնարավոր չեղավ գտնել տրոհված ֆայլի մասերը -7500 -Checksum-ի որոշում... -Checksum -CRC checksum ֆայլերի համար. -CRC checksum ֆայլերի և անունների համար. -7600 -Արտադրողականության թեստ -Հիշողության ծավալը. -Սեղմել -Դուրս բերել -Վարկանիշ -Ընդհանուր վարկանիշը -Ընթացիկը -Ավարտուն արդյունքը -CPU-ի օգտ-ը -Վարկ./Օգտ. -Անցումներ. -7700 -Հղում -Կապել -Աղբյուր. -Նպատակ. -7710 -Հղման տեսակ -Կոշտ հղում -Նշանային հղում (ֆայլ) -Նշանային հղում (թղթապանակ) -Միացման կետ (Junction) diff --git a/Utils/7-Zip/Lang/id.txt b/Utils/7-Zip/Lang/id.txt deleted file mode 100644 index c4fc1b78b..000000000 --- a/Utils/7-Zip/Lang/id.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; 15.14 : 02/01/2016 : Frans Liando -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Indonesian -Bahasa Indonesia -401 -Oke -Batal - - - -&Ya -&Tidak -&Tutup -Bantuan - -&Lanjut -440 -Ya untuk &semua -Tidak untuk s&emua -Henti -Mulai Ulang -Latar Bela&kang -Latar &Depan -&Jeda -Terjeda -Anda yakin ingin batal? -500 -&Berkas -&Edit -Tam&pilan -&Kesukaan -Pera&latan -Ban&tuan -540 -&Buka -Buka Sisi &Dalam -Buka Sisi L&uar -&Tampilkan -&Edit -&Nama Ulang -&Salin Ke... -P&indahkan Ke... -&Hapus -Be&lah Berkas... -Gabun&g Berkas... -P&roperti -K&omentari -Hitung ceksum -Beda -Buat Direktori -Buat Berkas -&Keluar -Tautan -Alternati&f Aliran -600 -Pi&lih Semua -Batal Pilih Semua -Pilih Sebal&iknya -Pilih... -Batal Pilih... -Pilih Berdasarkan Tipe -Batal Pilih Berdasarkan Tipe -700 -Ikon &Besar -Ikon &Kecil -&Daftar -&Rincian -730 -Tidak Berurutan -Tampilan Datar -&2 Panel -Bilah Ala&t -Buka Akar Direktori -Naik Satu Tingkat -Riwayat Direktori... -&Segarkan -Segarkan Otomatis -750 -Bilah Alat Arsip -Bilah Ala&t Standar -Tombol Besar -Perlihatkan Teks Tombol -800 -Tambah direktori ke Favorit sebagai -Markah -900 -&Pilihan... -&Tolok Ukur -960 -Petun&juk... -Mengen&ai 7-Zip... -1003 -Lintasan -Nama -Ekstensi -Direktori -Ukuran -Ukuran dipak -Atribut -Dibuat -Diakses -Dimodifikasi -Padat -Dikomentari -Dienkripsi -Belah Sebelum -Belah Setelah -Kamus - -Tipe -Anti -Metode -SO Host -Sistem Berkas -Pengguna -Grup -Blok -Komentar -Posisi -Awalan Lintasan -Direktori -Berkas -Versi -Volume -Multivolume -Gelinciran -Tautan -Blok -Volume - -64-bit -Big-endian -CPU -Ukuran Fisik -Ukuran Tajuk -Ceksum -Karakteristik -Alamat Maya -ID -Nama Singkat -Aplikasi Pembuat -Ukuran Sektor -Ragam -Tautan Simbolik -Kesalahan -Ukuran Total -Ruang Kosong -Ukuran Gugus -Label -Nama Lokal -Penyelenggara -Keamanan NT -Alternatif ALiran -Aux -Dihapus -Apakah Pohon - - -Tipe Kesalahan -Kesalahan -Kesalahan -Peringatan -Peringatan -Aliran -Alternatif Aliran -Ukuran Alternatif Aliran -Ukuran Maya -Ukuran Terbongkar -Jumlah Ukuran Fisik -Indeks Volume -SubTipe -Komentar Singkat -Laman Kode - - - -Ukuran Ujung -Ukuran Rintisan Tertanam -Tautan -Tautan Keras -iNode - -Hanya-baca -2100 -Pilihan -Bahasa -Bahasa: -Editor -&Editor: -Be&da: -2200 -Sistem -Asosiasikan 7-Zip dengan: -Semua pengguna -2301 -Integrasikan 7-Zip ke cangkang menu konteks -Menu konteks dikaskade -Butir-butir menu konteks: -Ikon-ikon di menu konteks -2320 - - -Buka arsip -Ekstrak berkas... -Tambah ke arsip... -Uji arsip -Ekstrak di sini -Ekstrak ke {0} -Tambah ke {0} -Mampat dan surat kawat... -Mampat ke {0} dan surat kawat -2400 -Direktori -&Direktori kerja -Direktori temporer &sistem -S&ekarang -&Ditentukan: -Hanya untuk kandar yang dapat dilepas -Tetapkan lokasi untuk berkas arsip sementara. -2500 -Pengaturan -Perlihatkan butir ".." -Perlihatkan ikon asli berkas -Perlihatkan menu sistem -&Memilih baris penuh -Perlihatkan &garis kisi-kisi -Klik-tunggal untuk membuka -Ragam pemilihan &alternatif -Gunakan halaman memori &besar -2900 -Mengenai 7-Zip -7-Zip merupakan perangkat lunak gratis.\n\nTerjemahan oleh Frans Liando. -3000 -Sistem tidak bisa mengalokasikan jumlah memori yang diperlukan -Tidak ada kesalahan -{0} objek terpilih -Tidak bisa membuat Direktori '{0}' -Operasi pembaruan tidaklah didukung untuk arsip ini. -Tidak bisa membuka berkas arsip '{0}' -Tidak bisa membuka arsip terenkripsi '{0}'. Salah kata sandi? -Tipe arsip tidak didukung -Berkas {0} telah ada -Berkas '{0}' telah termodifikasi.\nApakah Anda ingin perbarui berkas dalam arsip? -Tidak bisa perbarui berkas\n'{0}' -Tidak bisa memulai editor. -Berkas ini tampaknya seperti virus (pada nama berkas berisi spasi yang panjang). -Pengoperasian tidak bisa dipanggil dari direktori yang berlintasan panjang. -Anda harus pilih satu berkas -Anda harus pilih satu berkas atau lebih -Terlalu banyak butir -Tidak bisa buka berkas sebagai arsip {0} -Berkas dibuka sebagai arsip {0} -Berkas dibuka dengan gelinciran -3300 -Mengekstrak -Pemampatan -Pengujian -Membuka... -Memindai... -Memindah -3320 -Menambah -Memperbarui -Menganalisa -Mereplikasi -Pak ulang -Melewatkan -Menghapus -Membuat tajuk -3400 -Ekstrak -E&kstrak ke: -Tetapkan lokasi untuk berkas yang diekstrak. -3410 -Ragam lintasan: -Nama lengkap lintasan -Tidak ada nama lintasan -Nama lintasan absolut -Nama lintasan relatif -3420 -Ragam tulis timpa: -Konfirmasikan sebelum tulis timpa -Tulis timpa tanpa konfirmasi -Lewati berkas yang ada -Penamaan ulang automatis -Penamaan ulang automatis terhadap berkas yang ada -3430 -Hilangkan duplikasi direktori akar -Pulihkan keamanan berkas -3500 -Konfirmasi Penggantian Berkas -Direktori tujuan telah berisi berkas yang terproses. -Maukah Anda mengganti berkas yang ada -dengan yang satu ini? -{0} bita -Nama &Ulang Automatis -3700 -Metode mampat untuk '{0}' tidak didukung. -Kesalahan data di '{0}'. Berkas ini rusak. -CRC gagal di '{0}'. Berkas ini rusak. -Kesalahan data di berkas terenkripsi '{0}'. Salah kata sandi? -CRC gagal di berkas terenkripsi '{0}'. Salah kata sandi? -3710 -Salah kata sandi? -3721 -Metode mampat tidak didukung -Kesalahan data -CRC gagal -Data tidak tersedia -Akhir data tidak terduga -Terdapat suatu data setelah akhir muatan data -Bukan arsip -Kesalahan Tajuk -Salah kata sandi -3763 -Awal arsip belum tersedia -Awal arsip belum dikonfirmasi - - - -Fitur tidak didukung -3800 -Masukkan kata sandi -Masukkan kata sandi: -Konfirmasi kata sandi: -&Perlihatkan kata sandi -Kata sandi tidak cocok -Gunakanlah hanya huruf bahasa Indonesia, nomor dan karakter khusus (!, #, $, ...) untuk kata sandi -Kata sandi terlalu panjang -Kata sandi -3900 -Waktu terpakai: -Sisa waktu: -Jumlah ukuran: -Kecepatan: -Terproses: -Rasio mampat: -Kesalahan: -Arsip: -4000 -Tambah ke arsip -&Arsip: -Ragam perbar&u: -&Format arsip: -&Level mampat: -&Metode mampat: -Ukuran &kamus: -Ukuran ka&ta: -Ukuran blok padat: -Jumlah CPU: -&Parameter: -Pilihan -Buat arsip SF&X -Kompres berkas bersama -Enkripsi -Metode enkripsi: -Enkripsi &nama berkas -Pemakaian memori untuk Pemampatan: -Pemakaian memori untuk Pengawamampatan: -Hapus berkas setelah dimampatkan -4040 -Simpan tautan simbolik -Simpan tautan keras -Simpan alternatif aliran data -Simpan keamanan berkas -4050 -Simpan -Tercepat -Cepat -Normal -Maksimum -Ultra -4060 -Tambah dan ganti berkas -Perbarui dan tambah berkas -Segarkan ulang berkas yang ada -Sinkronisasikan berkas -4070 -Ramban -Semua Berkas -Non-padat -Padat -6000 -Salin -Pindah -Salin ke: -Pindah ke: -Menyalin... -Memindah... -Penamaan Ulang... -Pilih direktori tujuan. -Pengoperasian tidak didukung untuk direktori demikian. -Kesalahan Penamaan Ulang Berkas atau Direktori -Konfirmasi Salin Berkas -Anda yakin ingin menyalin berkas ke arsip? -6100 -Konfirmasi Hapus Berkas -Konfirmasi Hapus Direktori -Konfirmasi Hapus Berkas-berkas -Anda yakin ingin hapus '{0}'? -Anda yakin ingin hapus direktori '{0}' dan semua isinya? -Anda yakin ingin hapus {0} butir? -Menghapus... -Kesalahan Penghapusan Berkas atau Direktori -Sistem tidak bisa memindah suatu berkas yang berlintasan panjang ke Recycle Bin -6300 -Buat Direktori -Buat Berkas -Nama Direktori: -Nama berkas: -Direktori Baru -Berkas Baru -Kesalahan Membuat Direktori -Kesalahan Pembuatan Berkas -6400 -Komentar -&Komentari: -Pilih -Tidak Memilih -Masker: -6600 -Properti -Riwayat Direktori -Pesan Diagnosa -Pesan -7100 -Komputer -Jaringan -Dokumen -Sistem -7200 -Tambah -Ekstrak -Uji -Salin -Pindah -Hapus -Info -7300 -Belah Berkas -&Belah ke: -Belah ke &volume, bita: -Membelah... -Konfirmasi Membelah -Anda yakin ingin membelah berkas menjadi {0} volume? -Ukuran volume seharusnya lebih kecil dari pada ukuran asli berkas -Ukuran volume salah -Tentukan ukuran volume: {0} bita.\nAnda Yakin ingin membelah arsip menjadi volume demikian? -7400 -Gabung Berkas -&Gabung ke: -Menggabung... -Pilih bagian pertama saja dari berkas belahan -Tidak bisa mendeteksi berkas sebagai bagian berkas belahan -Tidak bisa menemukan lebih dari satu bagian berkas belahan -7500 -Hitung ceksum... -Informasi ceksum -Ceksum CRC untuk data: -Ceksum CRC untuk data dan nama: -7600 -Tolok Ukur -Pemakaian memori: -Pemampatan -Pengawamampatan -Penilaian -Jumlah Penilaian -Sekarang -Hasil -Pemakaian CPU -Penilaian/Pemakaian -Lulus: -7700 -Tautan -Tautan -Tautan dari: -Tautan ke: -7710 -Tipe Tautan -Tautan Keras -Berkas Tautan Simbolik -Direktori Tautan Simbolik -Cabang Direktori diff --git a/Utils/7-Zip/Lang/io.txt b/Utils/7-Zip/Lang/io.txt deleted file mode 100644 index ccc4f6c91..000000000 --- a/Utils/7-Zip/Lang/io.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.08 : iZoom -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Ido -Ido -401 -B&one -Abandonar - - - -&Yes -&No -&Klozez -Helpo - -&Durez -440 -Yes por &omni -No por o&mni -Haltez -Ristartez -&Fono -&Avanajo -&Pauzo -Pauzita -Kad vu ya volas abortar? -500 -&Dosiero -&Redakto -&Aspekto -&Favoraji -&Utensili -&Helpo -540 -&Apertigar -Apertigar int&erne -Apertigar e&xter -&Vidigar -&Redaktar -Ch&anjar nomo -Ko&piar aden... -Transp&ozar aden... -E&facar -F&endar dosiero... -Komb&inar dosieri... -In&heraji -Ko&mentar - - -Krear &dosieruyo -Krear dos&iero -E&kirar -600 -Merk&ar omno -Des&merkar omno -&Inversigar merko -Merkar... -Desmerkar... -Merkar segun tipo -Desmerkar segun tipo -700 -&Granda ikoneti -&Mikra ikoneti -&Listo -&Tabelo -730 -&Nearanjite - -&2 paneli -Utens&ila paneli -Apertigar radika dosieruyo -Ad-supre ye un nivelo -Dosieruya historio... -R&inovigar -750 -Utensila panelo di arkivo -Norma utensila panelo -Granda ikoneti -Videbla butontexto -800 -&Adjuntar dosieruyo ad la favorata quale -Lektomerkajo -900 -&Ajusti... -&Experienco dil rapideso -960 -&Konteno... -&Pri 7-Zip... -1003 -Dosiervoyo -Nomo -Dosiernoma sufixo -Dosieruyo -Grandeso -Enarkiva grandeso -Atributi -Kreita -Acesita -Chanjita -Solida -Komentita -Chifrita -Fendita ante -Fendita pos -Vortaro -CRC -Tipo -Kontre -Metodo -Operacala sistemo -Dosiersistemo -Uzero -Grupo -Bloko -Komenturo -Poziciono - - - - - - - - - - - - - - - - - - - - - - - - - -Eroro -Tota kapacivo -Vakanta -Faskogrando -Etiketo -Lokala nomo -Provizanto -2100 -Ajusti -Linguo -Linguo: -Redaktilo -&Redaktilo: - -2200 -Sistemo -Asociar 7-Zip-o kun dosieru: -2301 -Pozar 7-Zip'o en kuntexta menuo di shelo -Kaskada kuntexta menuo -Elementi di kuntexta menuo: -2320 - - -Apertar -Extraktar dosieri... -Adjuntar ad arkivo... -Verifikar arkivo -Extraktez hike -Extraktez aden {0} -Adjuntar ad {0} -Enarkivigar ed sendar elk-posto... -Enarkivigar aden {0} e sendar elk-posto... -2400 -Dosieruyi -&Laborala dosieruyo -&Sistemala provizora dosieruyo -&Nuna -&Definez: -&Uzar nur por deprenebla datumportili -Definar loko por provizora arkiva dosieri. -2500 -Ajusti -Montrar ".."-elemento -Montrar reala dosier-ikoneti -Montrar sistemala menuo -Merkar &tota lineo -Montrar &streki separanta - - - -2900 -Pri progamo... -7-Zip esas gratuita programo. Tamen, vu povas mantenar developado di 7-Zip per enregistrigesar. -3000 - -Erori ne es trovita -{0} objekt(o|i) merkita -Krear dosieruyo '{0}' neposiblesis -Rinovigo ne suportesas por ica arkivo. - - - - -Dosiero '{0}' chanjesis.\nKa vu volas rinovigar lu enarkive? -Rinovigo dil dosiero\n'{0}' faliis -Startigo dil redaktilo. - - - - -Tro multa objekti -3300 -Extrakto -Kompreso -Probado -Aperto... - -3400 -&Extraktar -E&xtraktar aden: -Definez loko por dosieri extraktenda. -3410 -Dosiervoyi -&Absoluta dosiervoyi -&Sen dosiervoyi -3420 -Remplasala skribmodo -&Kun konfirmo -&Sen konfirmo -&Omisar existanta dosieri -Automata nomchanjo -Automata nomchanjo de existanta dosieri -3500 -Konfirmo di nomchanjo -Dosieruyo ja kontenas operacata dosiero. -Kad remplasor esanta dosiero -per la ica? -{0} bayti* -&Automata nomchanjo. -3700 -Kompresmetodo ne esas suportata por dosiero '{0}'. -Datumeroro en '{0}'. Dosiero es fushita. -CRC-eroro en '{0}'. Dosiero es fushita. - - -3800 -Pasovorto -Sugestez pasovorto: - -&Montrar pasovorto - - - -&Pasovorto -3900 -Pasinta tempo: -Restanta tempo: -Grandeso: -Rapideso: - - -Erori: - -4000 -Adjuntar aden arkivo -&Arkivo: -R&emplasomodo: -A&rkiva formato: -Kompreso&grado -&Kompresometodo: -&Vortarograndeso: -Vo&rtograndeso: - - -&Parametri: -Ajustaji -Krear SF&X-arkivo - - - -Chifrar dosier&nomi -Memoruzo por kompresar: -Memoruzo por extraktar: -4050 -Sen kompresar -Maxim rapide -Rapide -Normala kompreso -Maxim granda kompreso -Extreme -4060 -Adjuntar e remplasar dosieri -Rinovigar e adjuntar dosieri -Rifreshigar existanta dosieri -Sinkronizar dosieri -4070 -Inspektar -Omna dosieri - - -6000 -Kopiar -Transpozar -Kopiez aden: -Transpozez aden: -Kopio... -Transpozo... -Nomchanjo... - -Operaco ne suportesas. -Eroro dum nomchanjo di dosiero o dosieruyo - - -6100 -Konfirmo dil efaco di dosiero -Konfirmo dil efaco di dosieruyo -Konfirmo dil efaco di dosieraro -Ka vu ya volas efacar '{0}'? -Ka vu ya volas efacar dosieruyo "{0}" e omna lua kontenaji? -Ka vu ya volas efacar ita {0} objekti? -Efaco... -Eroro dum efacar di dosiero o dosieruyo - -6300 -Krear dosieruyo -Krear dosiero -Dosieruynomo: -Dosiernomo: -Nova dosieruyo -Nova dosiero -Eroro dum dosieruykreo -Eroro dum dosierkreo -6400 -Komento -&Komento: -Merkar -Desmerkar -Masko: -6600 - -Dosieruyhistorio -Diagnozala mesaji -Mesajo -7100 -Komputilo -Reto - -Sistemo -7200 -Adjuntar -Extraktar -Verifikar -Kopiar -Transpozar -Efacar -Informo -7300 -Fendar dosiero -&Fendez aden: -&Fendar por volumini, bayti: -Fendo... - - - - - -7400 -Kombinar dosieri -&Kombinar aden: -Kombino... - - - -7500 - - - - -7600 -Experienco dil rapideso -Memoruzo: -Kompresado -Extraktado -Aprecuro -Tota aprecuro -Kuranta -Rezulta - - -Pasi: diff --git a/Utils/7-Zip/Lang/is.txt b/Utils/7-Zip/Lang/is.txt deleted file mode 100644 index f324c6e94..000000000 --- a/Utils/7-Zip/Lang/is.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; 15.14 : 2016-04-23 : Stefán Örvar Sigmundsson -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Icelandic -Íslenska -401 -Í lagi -Viðhætta - - - -&Já -&Nei -&Loka -Hjálp - -&Halda áfram -440 -&Já við öllu -&Nei við öllu -Stöðva -Endurræsa -&Bakgrunnur -&Forgrunnur -&Gera hlé -Í hléi -Ert þú viss um að þú viljir viðhætta? -500 -&Skrá -&Breyta -S&koða -&Uppáhald -&Verkfæri -&Hjálp -540 -&Opna -Opna að &innanverðu -Opna að &utanverðu -S&koða -&Breyta -&Endurnefna -&Afrita í… -&Færa í… -E&yða -K&ljúfa skrá -S&ameina skrár -E&iginleikar -&Gera athugasemd -Reikna samtölu -Mismunur -Skapa &möppu -Skapa &skrá -&Hætta -&Tengill -&Víxlstraumar -600 -&Velja allt -&Afvelja allt -&Umsnúa vali -&Velja -&Afvelja -&Velja eftir tegund -&Afvelja eftir tegund -700 -&Stórar táknmyndir -S&máar táknmyndir -&Listi -Sm&áatriði -730 -Óflokkað -&Flatsýn -&2 spjöld -&Verkfærastikur -&Opna rótarmöppu -&Upp um eitt stig -M&öppusaga -&Endurglæða -S&jálfendurglæðun -750 -Safnverkfærastika -Stöðluð verkfærastika -Stórir takkar -Sýna takkatexta -800 -&Viðbæta möppu í uppáhald sem -Bókamerki -900 -&Valmöguleikar -&Afkastaprófa -960 -&Efnisyfirlit -&Um 7-Zip -1003 -Slóð -Nafn -Framlenging -Mappa -Stærð -Þjöppuð stærð -Eiginleikar -Skapað -Aðkomið -Dagsetning -Þétt -Athugasemd -Dulkóðað -Kljúfa fyrir -Kljúfa eftir -Orðasafn - -Tegund -And -Aðferð -Stýrikerfi hýsils -Skráakerfi -Notandi -Hópur -Bálkur -Athugasemd -Staðsetning -Slóðarforskeyti -Möppur -Skrár -Útgáfa -Bindi -Fjölbinda -Afsetning -Tenglar -Bálkar -Bindi - -64-bita -Háenda -Gjörvi -Efnisleg stærð -Höfðastærð -Samtala -Einkenni -Sýndarvistfang -Auðkenni -Stutt nafn -Skaparahugbúnaður -Geirastærð -Hamur -Mjúktengill -Villa -Heildarstærð -Laust pláss -Klasastærð -Merki -Staðarnafn -Veitandi -NT-öryggi -Víxlstraumur -Aðstoðar- -Eytt -Er tré - - -Villutegund -Villur -Villur -Viðvaranir -Viðvörun -Straumar -Víxlstraumar -Víxlstraumastærð -Sýndarstærð -Afþjöppuð stærð -Efnisleg heildarstærð -Bindaskrá -Undirtegund -Stutt athugasemd -Kóðasíða - - - -Halastærð -Innfallin stubbastærð -Tengill -Harðtengill -Skráhnútur - -Einungis lesanlegt -2100 -Valmöguleikar -Tungumál -Tungumál: -Ritill -&Ritill: -&Mismunur: -2200 -Kerfi -Tengja 7-Zip við: -Allir notendur -2301 -&Innleiða 7-Zip í samhengisvalmynd skeljar -&Þrepaskipt samhengisvalmynd -Samhengisvalmyndaratriði: -&Táknmyndir í samhengisvalmynd -2320 - - -Opna safn -Afþjappa skrár -Viðbæta í safn -Prófa safn -Afþjappa hér -Afþjappa í „{0}“ -Viðbæta í „{0}“ -Þjappa og senda í rafpósti -Þjappa í „{0}“ og senda í rafpósti -2400 -Möppur -Vinnslumappa -&Tímabundin mappa kerfis -&Núverandi -Til&greind: -N&ota einungis fyrir fjarlægjanleg drif -Tilgreina staðsetningu fyrir tímabundnar safnskrár. -2500 -Stillingar -Sýna „..“ &atriði -Sýna &raunverulegar skráartáknmyndir -Sýna &kerfisvalmynd -&Fullraðaval -Sýna &töflulínur -&Einsmella til að opna atriði -Annars konar &valhamur -Nota stórar &minnissíður -2900 -Um 7-Zip -7-Zip er frjáls hugbúnaður -3000 -Kerfið getur ekki ráðstafað nauðsynlega magninu af minninu -Það eru engar villur -„{0}“ hlutir valdir -Getur ekki skapað möppuna „{0}“ -Uppfærsluaðgerðir eru ekki studdar fyrir þetta safn. -Getur ekki opnað skrána „{0}“ sem safn -Getur ekki opnað dulkóðaða safnið „{0}“. Rangt aðgangsorð? -Óstudd safntegund -Skráin „{0}“ er nú þegar til -Skránni „{0}“ var breytt.\nVilt þú uppfæra hana í safninu? -Getur ekki uppfært skrána\n„{0}“ -Getur ekki ræst ritilinn. -Skráin lítur út eins og veira (skráarnafnið inniheldur löng bil). -Aðgerðina er ekki hægt að kalla í frá möppu sem hefur langa slóð. -Þú verður að velja eina skrá -Þú verður að velja eina eða fleiri skrár -Of mörg atriði -Getur ekki opnað skrána sem „{0}“-safn -Skráin er opin sem „{0}“-safn -Safnið er opið með afsetningu -3300 -Afþjappar -Þjappar -Prófar -Opnar -Skimar -Fjarlægir -3320 -Viðbætir -Uppfærir -Greinir -Endurtekur -Endurpakkar -Sleppir -Eyðir -Skapar höfuð -3400 -Afþjappa -Afþjappa í: -Tilgreindu staðsetningu fyrir afþjöppuðu skrárnar. -3410 -Slóðarhamur: -Full slóðarnöfn -Engin slóðarnöfn -Algild slóðarnöfn -Afstæð slóðarnöfn -3420 -Yfirritunarhamur: -Spyrja áður en yfirritað er -Yfirrita án kvaðningar -Sleppa gildandi skrám -Sjálfendurnefnun -Sjálfendurnefnun gildandi skráa -3430 -Útrýma afritinu af rótarmöppunni -Endurheimta skráaröryggi -3500 -Staðfesta skráaryfirritun -Áfangastaðsmappan inniheldur nú þegar meðhöndluðu skrána. -Vilt þú yfirrita gildandi skrána -með þessari? -{0} bæti -Sjálfendurnefnun -3700 -Óstudd þjöppunaraðferð fyrir „{0}“. -Gagnavilla í „{0}“. Skráin er brotin -CRC mistókst í „{0}“. Skráin er brotin. -Gagnavilla í dulkóðuðu „{0}“. Rangt aðgangsorð? -CRC mistókst í dulkóðuðu skránni „{0}“. Rangt aðgangsorð? -3710 -Rangt aðgangsorð? -3721 -Óstudd þjöppunaraðferð -Gagnavilla -CRC mistókst -Ótiltæk gögn -Óvæntur endir gagna -Það eru gögn eftir endanum á aðalgögnunum -Er ekki safn -Höfðavillur -Rangt aðgangsorð -3763 -Ótiltækt upphaf safns -Óstaðfest upphaf safns - - - -Óstuddur eiginleiki -3800 -Ritaðu aðgangsorðið -Ritaðu aðgangsorðið: -Endurritaðu aðgangsorðið: -Sýna aðgangsorðið -Aðgangsorðin samsvarast ekki -Notaðu einungis enska stafi, tölur og sérstök rittákn (!, #, $, o.s.frv.) í aðgangsorðunum -Aðgangsorðið er of langt -Aðgangsorð -3900 -Liðinn tími: -Tími eftir: -Heildarstærð: -Hraði: -Meðhöndlað: -Þjöppunarhlutfall: -Villur: -Söfn: -4000 -Viðbæta safni -Safn: -Uppfærsluhamur: -Safnsnið: -Þjöppunarsnið: -Þjöppunaraðferð: -Orðasafnsstærð: -Orðastærð: -Þéttbálkstærð: -Fjöldi gjörvaþráða: -Færibreytur: -Valmöguleikar -Skapa SFX-safn -Þjappa sameiginlegum skrám -Dulkóðun -Dulkóðunaraðferð: -Dulkóða skráarnöfn -Minnisnotkun fyrir þjöppun: -Minnisnotkun fyrir afþjöppun: -Eyða skrám eftir þjöppun -4040 -Geyma mjúktengla -Geyma harðtengla -Geyma víxlgagnastrauma -Geyma skráaröryggi -4050 -Geyma -Hraðast -Hratt -Venjulegt -Hámarks -Öfga- -4060 -Viðbæta og yfirrita skrár -Uppfæra og viðbæta skrám -Hressa við gildandi skrám -Samstilla skrár -4070 -Vafra -Allar skrár -Óþétt -Þétt -6000 -Afrita -Færa -Afrita í: -Færa í: -Afritar -Færir -Endurnefnir -Veldu móttökumöppu. -Aðferðin er ekki stutt fyrir þessa möppu. -Villa við endurnefnun skráar eða möppu -Staðfesta skráarafritun -Ert þú viss um að þú viljir afrita skrárnar í safnið -6100 -Staðfesta skráareyðingu -Staðfesta möppueyðingu -Staðfesta fjölskráaeyðingu -Ert þú viss um að þú viljir eyða „{0}“? -Ert þú viss um að þú viljir eyða möppunni „{0}“ og öllu innihaldinu hennar? -Ert þú viss um að þú viljir eyða þessum {0} atriðum? -Eyðir -Villa við eyðingu skráar eða möppu -Kerfið getur ekki fært skrá með langri slóð í Recycle Bin -6300 -Skapa möppu -Skapa skrá -Möppunafn: -Skráarnafn: -Ný mappa -Ný skrá -Villa við sköpun möppunnar -Villa við sköpun skráarinnar -6400 -Athugasemd -Athugasemd: -Velja -Afvelja -Mát: -6600 -Eiginleikar -Möppusaga -Greiningarskilaboð -Skilaboð -7100 -Tölva -Net -Skjöl -Kerfi -7200 -Viðbæta -Afþjappa -Prófa -Afrita -Færa -Eyða -Upplýsingar -7300 -Kljúfa skrá -Kljúfa í: -Kljúfa í bindi, bæti: -Klýfur -Staðfesta klofning -Ert þú viss um að þú viljir kjúfa skrána í {0} bindi? -Bindisstærð verður að vera minni en stærðin á upprunalegu skránni -Röng bindisstærð -Tilgreindu bindisstærð: {0} bæti.\nErt þú viss um að þú viljir kljúfa safnið í slík bindi? -7400 -Sameina skrár -Sameina í: -Sameinar -Veldu einungis fyrsta hlutann af klofningsskránni -Get ekki greint skrána sem hluta af klofningsskránni -Get ekki fundið meira en einn hluta af klofningsskránni -7500 -Reiknar samtölu -Samtöluupplýsingar -CRC-samtala fyrir gögn: -CRC-samtala fyrir gögn og nöfn: -7600 -Afkastapróf -Minnisnotkun: -Þjöppun -Afþjöppun -Niðurstaða -Heildarniðurstaða -Núverandi -Útkoma -Gjörvanotkun -Niðurstaða / Notkun -Yfirferðir: -7700 -Tengill -Tengill -Tengill frá: -Tengill til: -7710 -Tengiltegund -Harðtengill -Skráarmjúktengill -Skráasafnsmjúktengill -Skráasafnstenging \ No newline at end of file diff --git a/Utils/7-Zip/Lang/it.txt b/Utils/7-Zip/Lang/it.txt deleted file mode 100644 index ee4e3b1cf..000000000 --- a/Utils/7-Zip/Lang/it.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.07 : Leandro Spagnol -; : Vincenzo Reale (some corrections) -; 15.05 : 2015-06-17 : TJL73 : http://tjl73.altervista.org/ -; -; -; -; -; -; -; -; -0 -7-Zip -Italian -Italiano -401 -OK -Annulla - - - -&Sì -&No -&Chiudi -Aiuto - -&Riprendi -440 -Sì per &tutti -No per t&utti -Ferma -Riavvia -&In background -&In primo piano -&Pausa -In pausa -Sei sicuro di voler annullare? -500 -&File -&Modifica -&Visualizza -&Preferiti -&Strumenti -&Aiuto -540 -&Apri -Apri in &7-Zip File Manager -Apri in E&xplorer -&Visualizza -Apri con l'&editor predefinito -Rino&mina -&Copia in... -&Sposta in... -&Elimina -&Dividi il file... -&Unisci i file... -&Proprietà -Comme&nto... -Calcola chec&ksum -Comparazione differenze (Diff) -Crea cartella -Crea file -E&sci -Collegamento -&Alternate Data Streams -600 -&Seleziona tutto -&Deseleziona tutto -In&verti selezione -Seleziona... -Deseleziona... -Seleziona per tipo -Deseleziona per tipo -700 -Icone &grandi -Icone &piccole -&Elenco -&Dettagli -730 -Nessun ordine -Vista non strutturata -Interfaccia a &2 pannelli -Barre degli &strumenti -Apri cartella principale -Livello superiore -Cronologia... -&Aggiorna -Aggiornamento automatico -750 -Barra archivio -Barra standard -Icone grandi -Mostra etichette di testo -800 -&Aggiungi la cartella ai Preferiti come -Collegamento -900 -&Opzioni... -&Benchmark -960 -&Guida... -&Informazioni su 7-Zip... -1003 -Percorso -Nome -Estensione -Cartella -Dimensione -Dimensione compressa -Attributi -Creato -Ultimo accesso -Ultima modifica -Solido -Commentato -Cifrato -Dividi prima -Dividi dopo -Dizionario - -Tipo -Estensione -Metodo -OS destinatario -File system -Utente -Gruppo -Blocco -Commento -Posizione -Percorso completo -Cartelle -File -Versione -Unità -Unità multiple -Offset -Collegamenti -Blocchi -Unità - -64-bit -Big-endian -CPU -Dimensione fisica -Dimensione intestazioni -Checksum -Caratteristiche -Indirizzo virtuale -ID -Nome breve -Applicativo origine -Dimensione settore -Modalità -Collegamento simbolico -Errore -Capacità -Disponibili -Dimensione dei cluster -Etichetta -Nome locale -Rete -Sicurezza NT -Flusso alternato -Ausiliario -Eliminato -Ad albero - - -Tipo di errori -Errori -Errori -Avvertimenti -Avvertimento -Flussi -Flussi alternati -Dimensione dei flussi alternati -Dimensione virtuale -Dimensione decompressione -Dimensione fisica totale -Indice del volume -Sottotipo -Commento breve -Pagina dei codici - - - -Dimensione della coda -Dimensione della matrice integrato -Collegamento -Collegamento statico -iNode - -Sola lettura -2100 -Opzioni -Lingua -Lingua: -Editor -&Editor predefinito: -Comparatore &differenze (Diff): -2200 -Sistema -Associa 7-Zip a: -Tutti gli utenti -2301 -Integra 7-Zip nel menu contestuale della shell -Menu contestuale a cascata -Elementi del menu contestuale: -Icone nel menu contestuale -2320 - - -Apri -Estrai i file... -Aggiungi all'archivio... -Verifica l'archivio -Estrai qui -Estrai in {0} -Aggiungi a {0} -Comprimi ed invia per email... -Comprimi in {0} ed invia per email -2400 -Cartelle -Cartella di lavoro -Cartella &TEMP di sistema -&Corrente -&Specificata: -&Utilizza solo per dischi rimovibili -Specifica una cartella per i file temporanei. -2500 -Impostazioni -Mostra l'elemento ".." -Mostra le icone dei file -Mostra le icone di sistema -Selezione a &riga intera -Mostra &griglia -Click singolo per aprire una voce -Modalità di selezione &alternativa -Utilizza pagine &larghe di memoria -2900 -Informazioni -7-Zip è un software libero.\n\nLocalizzazione italiana a cura di:\nTJL73 -3000 -Non è possibile allocare la quantità di memoria richiesta -Nessun errore. -Oggetti selezionati: {0} -Impossibile creare la cartella '{0}' -Non è possibile effettuare aggiornamenti su questo archivio. -Impossibile aprire il file '{0}' come archivio. -Impossibile aprire l'archivio cifrato '{0}'. Password errata? -Archivio non supportato -Il file {0} è già presente -Il file '{0}' è stato modificato.\nVuoi aggiornare l'archivio? -Impossibile aggiornare il file\n'{0}' -Impossibile avviare l'editor. -Il file sembra essere un virus (contiene molti spazi nel nome). -L'operazione non può essere richiamata da una cartella con percorso lungo. -Devi selezionare un file -Devi selezionare almeno un file -Troppi elementi -Impossibile aprire il file come archivio {0} -Il file è aperto come archivio {0} -L'archivio è aperto con offset -3300 -Estrazione in corso -Compressione in corso -Verifica archivio -Apertura in corso... -Scansione... -Rimozione -3320 -Aggiunta -Aggiornamento -Analisi -Replica -Ripacchettizzazione -Salto -Eliminazione -Creazione intestazione -3400 -Estrai -E&strai in: -Specifica una cartella in cui estrarre i file. -3410 -Struttura delle cartelle: -Percorsi completi -Nessun percorso -Percorsi assoluti -Percorsi relativi -3420 -Sovrascrittura: -Chiedi prima di sovrascrivere -Sovrascrivi senza chiedere -Non sovrascrivere i file esistenti -Rinomina automaticamente -Rinomina autom. i file esistenti -3430 -Elimina la duplicazione della radice -Ripristina sicurezza dei file -3500 -Conferma la sovrascrittura del file -File già esistente nella cartella di destinazione. -Vuoi sostituire il file esistente -con questo? -{0} byte -&Rinomina automaticamente -3700 -Metodo di compressione non supportato per '{0}'. -Errore nei dati in '{0}'. Il file è danneggiato. -CRC non corretto in '{0}'. Il file è danneggiato. -Errore nel file cifrato '{0}'. Password errata? -CRC errato nel file cifrato '{0}'. Password errata? -3710 -Password errata? -3721 -Metodo di compressione non supportata -Errore dei dati -CRC errato -Dati non disponibili -Fine dei dati inattesa -Sono presenti dati oltre la fine del blocco utile -Non è un archivio -Errore intestazioni -Password errata -3763 -Inizio dell'archivio non disponibile -Inizio dell'archivio non confermato - - - -Funzionalità non supportata -3800 -Inserisci password -&Inserisci password: -&Reinserisci password: -Mostra pass&word -Password differenti -Per la password, utilizzare solo lettere ASCII, numeri e caratteri speciali (!, #, $, ...) -La password è troppo lunga -Password -3900 -Tempo trascorso: -Tempo rimanente: -Dimensione totale: -Velocità: -Elaborato: -Rapporto compressione: -Errori: -Archivi: -4000 -Aggiungi all'archivio -Nome &archivio: -Modalità a&ggiornamento: -&Formato dell'archivio: -&Livello di compressione: -&Metodo di compressione: -Dimensione &Dizionario: -Dimensioni &Parola: -Dimensione del &blocco solido: -N&umero di flussi (thread) CPU: -Parametri &opzionali: -Opzioni -Crea archivio auto-&estraente -Comprimi file condivisi -Cifratura -Metodo &cifratura: -Cifra anche il &nome dei file -Quantità memoria per compressione: -Quantità memoria per decompressione: -Elimina i file dopo la compressione -4040 -Memorizza collegamenti simbolici -Memorizza collegamenti statici -Memorizza flussi dati alternati -Memorizza sicurezza dei file -4050 -Nessuna -Velocissima -Veloce -Normale -Massima -Ultra -4060 -Aggiungi e sostituisci i file -Aggiorna e aggiungi i file -Aggiorna i file esistenti -Sincronizza i file -4070 -Sfoglia -Tutti i file -Non-solido -Solido -6000 -Copia -Sposta -Copia in: -Sposta in: -Copia in corso... -Spostamento in corso... -Rinomina in corso... -Selezionare la cartella di destinazione. -Operazione non supportata per questa cartella. -Errore nella rinomina del file o cartella -Conferma copia -Sei sicuro di voler copiare questi file nell'archivio -6100 -Conferma l'eliminazione del file -Conferma l'eliminazione della cartella -Conferma l'eliminazione di più elementi -Sei certo di voler eliminare '{0}'? -Sei certo di voler eliminare la cartella '{0}' e tutto il suo contenuto? -Sei certo di voler eliminare questi {0} elementi? -Eliminazione in corso... -Errore nell'eliminazione del file o della cartella -Impossibile spostare un file con percorso lungo nel Cestino -6300 -Crea cartella -Crea file -Nome cartella: -Nome file: -Nuova cartella -Nuovo file -Errore nella creazione della cartella -Errore nella creazione del file -6400 -Commento -&Commento: -Seleziona -Deseleziona -Filtro: -6600 -Proprietà -Cronologia -Messaggi di diagnostica -Messaggio -7100 -Computer -Rete -Documenti -Sistema -7200 -Aggiungi -Estrai -Verifica -Copia -Sposta -Elimina -Proprietà -7300 -Dividi file -&Dividi in: -Di&vidi in più file (dimensione in byte): -Dividi in... -Conferma divisione -Sicuro di voler dividere l'archivio in {0} porzioni? -La dimensione di ciascuna porzione deve essere più piccola della dimensione totale dell'archivio originale -Dimensione non corretta -Dimensione specificata: {0} byte.\nSicuro di voler dividere l'archivio in questo modo? -7400 -Unisci i file -&Unisci in: -Unisci... -Seleziona solo la prima parte del file diviso -Impossibile riconoscere il file come archivio diviso -Impossibile trovare più di una parte dell'archivio diviso -7500 -Calcolo del checksum... -Informazioni sul checksum -CRC checksum sui dati: -CRC checksum su dati e nomi: -7600 -Benchmark -Utilizzo memoria: -Compressione in corso -Decompressione in corso -Valutazione -Valutazione totale -Attuale -Risultante -Utilizzo CPU -Stima / Utilizzo -Passaggi: -7700 -Collegamento -Collega -Origine collegamento: -Destinazione collegamento: -7710 -Tipo di collegamento -Collegamento statico -Collegamento simbolico al file -Collegamento simbolico alla cartella -Giunzione cartella diff --git a/Utils/7-Zip/Lang/ja.txt b/Utils/7-Zip/Lang/ja.txt deleted file mode 100644 index c475e03a0..000000000 --- a/Utils/7-Zip/Lang/ja.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; : Komuro, Mick, 2chBBS-software -; : Crus Mitsuaki -; 9.07 : Stepanushkin Dmitry -; 9.23 : 2011-06-22 : Stepanushkin Dmitry, nabeshin -; 9.33 : 2014-06-17 : Stepanushkin Dmitry -; 15.00 : 2015-04-30 : Stepanushkin Dmitry -; -; -; -; -; -0 -7-Zip -Japanese -日本語 -401 -OK -キャンセル - - - -はい(&Y) -いいえ(&N) -閉じる(&C) -ヘルプ - -続行(&C) -440 -すべてに はい(&A) -すべてに いいえ(&L) -停止 -再開 -バックグラウンド(&B) -フォアグラウンド(&F) -一時停止(&P) -一時停止 -本当に圧縮を取りやめますか? -500 -ファイル(&F) -編集(&E) -表示(&V) -お気に入り(&A) -ツール(&T) -ヘルプ(&H) -540 -開く(&O) -7-Zipで閲覧(&I) -関連付けで開く(&U) -表示(&V) -編集(&E) -名前の変更(&M) -コピー(&C)... -移動(&M)... -削除(&D) -ファイル分割(&S)... -ファイル結合(&B)... -プロパティ(&R) -コメント(&N) -チェックサムの計算 -比較 -フォルダ作成 -ファイル作成 -閉じる(&X) -リンク作成 -代替データストリーム(&A) -600 -全て選択(&A) -全て選択解除 -反転選択(&I) -選択... -選択解除... -同一形式選択 -同一形式選択解除 -700 -大きいアイコン(&G) -小さいアイコン(&M) -一覧(&L) -詳細(&D) -730 -並べ替え解除 -フラットビュー -&2分割画面 -ツールバー(&T) -ルートフォルダを開く -1つ上の階層へ -フォルダ履歴... -最新の情報に更新(&R) -自動更新 -750 -書庫ツールバー -標準ツールバー -大きなボタン -ボタンのテキスト表示 -800 -フォルダをお気に入りに追加(&A) -ブックマーク -900 -オプション(&O)... -ベンチマーク(&B) -960 -ヘルプの表示(&C)... -7-Zipについて(&A)... -1003 -パス -名前 -拡張子 -フォルダ -サイズ -圧縮後サイズ -属性 -作成日時 -アクセス日時 -更新日時 -ソリッド -コメント済み -暗号化 -分割前 -分割後 -辞書 - -種類 -逆 -圧縮方法 -ホストOS -ファイルシステム -ユーザー -グループ -ブロック -コメント -ポジション -パスプレフィックス -フォルダ数 -ファイル数 -バージョン -ボリューム -多重ボリューム書庫 -オフセット -リンク数 -使用ブロック数 -ボリューム数 - -64ビット -ビッグエンディアン -CPU -物理サイズ -ヘッダーサイズ -チェックサム -特性 -仮想アドレス -ID -省略名 -作成アプリケーション -セクターサイズ -モード -リンク -エラー -合計サイズ -空き領域 -クラスタサイズ -ラベル -ローカル名 -プロバイダ -NTセキュリティ -代替データストリーム -補助 -削除済み -はツリー - - -エラー種類 -エラー -エラー -警告 -警告 -ストリーム -代替データストリーム -代替データストリームサイズ -仮想サイズ -解凍後サイズ -物理サイズ合計 -ボリュームインデックス -亜類型 -コメント -コードページ - - - -テイルのサイズ -組み込みスタブのサイズ -リンク -ハードリンク -iノード - -読み取り専用 -2100 -オプション -言語 -言語設定: -外部ツール -編集(&E): -比較(diff)(&D): -2200 -システム -7-Zipに関連付けるファイル: -全てのユーザー -2301 -シェルコンテキスト(右クリック)メニューに7-Zipを登録 -7-Zipをサブメニュー化する -メニュー項目: -コンテキストメニューにアイコンを表示 -2320 -<フォルダ> -<書庫> -開く -展開... -圧縮... -書庫をテスト -ここに展開 -{0}に展開 -{0}に圧縮 -圧縮して電子メール送信... -{0}に圧縮して電子メール送信 -2400 -フォルダ -作業フォルダ(&W) -システム一時フォルダ(&S) -カレントフォルダ(&C) -フォルダ指定(&P): -リムーバブルドライブのみ使用する -一時ファイルのための場所を指定してください -2500 -設定 -'..'を表示する -各ファイルの実際のアイコンを表示する -システム(エクスプローラ)のメニューも表示する -行単位(列アイテムを一括)で選択する(&F) -グリッド線を表示する(&G) -シングルクリックで開く -カーソル移動で選択が自動解除されないモード(&A) -大きなメモリページを使用する(&L) -2900 -7-Zipについて -7-Zipはフリーソフトウェアです -3000 -要求された量のメモリを割り当てることができません -正常です -{0}個のオブジェクトを選択 -'{0}'フォルダが作成できません -この書庫は更新機能がサポートされていません -ファイル'{0}'は書庫として開くことができません -暗号化された書庫'{0}'を開くことができません。パスワードが間違っていませんか? -未対応の書庫形式です -{0}ファイルは既に存在しています -'{0}'ファイルが変更されました。\n書庫を更新しますか? -ファイルを更新できません。\n'{0}' -エディタを起動できません。 -このファイルは、ウイルスのように見えます(ファイル名に大量のスペースを含んでいる)。 -パスが長いフォルダではこの操作を実行できません。 -1つのファイルを選択してください -1つ以上のファイルを選択してください -アイテムが多過ぎます -ファイルを{0}書庫として開くことができません -ファイルが{0}書庫として開かれています -書庫がオフセットを使用して開かれています -3300 -展開中 -圧縮中 -テスト中 -開いています... -スキャン中... -削除中 -3320 -追加中 -更新中 -解析中 -複製中 -再圧縮中 -スキップ中 -削除中 -ヘッダーの作成中 -3400 -展開 -展開先(&X): -展開先指定 -3410 -パス名出力方法: -フルパス -パスなし -絶対パス -相対パス -3420 -上書き方法 -上書きするときは確認する -常に上書き -ファイルが存在するときはスキップ -自動的にリネーム -ファイルが存在するときは自動リネーム -3430 -ルートフォルダーの重複を回避 -ファイルのセキュリティ属性を復元 -3500 -ファイル上書き確認 -出力先のフォルダには既に以下の同じファイルが存在します -現在のファイル -に次の新しいファイルを上書きしますか? -{0}バイト -自動的にリネーム(&U) -3700 -'{0}'はサポートされていない圧縮方式です -'{0}'でデータエラーが発生しました。ファイルは壊れています -'{0}'のCRCが違います。ファイルは壊れています -暗号化されたファイル'{0}'でデータエラーが発生しました。パスワードが間違っていませんか? -暗号化されたファイル'{0}'のCRCが違います。パスワードが間違っていませんか? -3710 -パスワードが間違っていませんか? -3721 -非対応圧縮方法 -データエラー -CRCが違います -データ取得失敗 -データ不足 -データのペイロード後にデータが存在します -書庫ではありません -ヘッダーエラー -パスワードが間違っています -3763 -書庫先頭の取得失敗 -無効な書庫先頭 - - - -非対応機能 -3800 -パスワード入力 -パスワード入力: -パスワード再入力: -パスワードを表示する(&S) -パスワードが一致しません -パスワードには半角英数記号(!, #, $, ...)のみを使用してください。 -パスワードがあまりに長過ぎます -パスワード -3900 -経過時間: -残り時間: -サイズ合計: -速度: -処理済み: -圧縮率: -エラー: -書庫数: -4000 -ファイル圧縮 -圧縮先(&A): -更新方法(&U): -書庫形式(&F): -圧縮レベル(&L): -圧縮方式(&M): -辞書サイズ(&D): -ワードサイズ(&W): -ソリッドブロックサイズ: -CPUスレッド数: -パラメータ(&P): -オプション -自己展開書庫作成(&X) -共有(編集中の)ファイルも圧縮 -暗号化 -暗号化方式: -ファイル名を暗号化(&N) -圧縮に必要なメモリ: -展開に必要なメモリ: -圧縮後に元のファイルを削除 -4040 -シンボリックリンクを保存 -ハードリンクを保存 -代替データストリームを保存 -ファイルのセキュリティ属性を保存 -4050 -無圧縮 -最速 -高速 -標準 -最高 -超圧縮 -4060 -すべてのファイル上書き -ファイル追加と更新 -変更したファイルのみ更新 -ファイルを同期させる -4070 -閲覧 -すべてのファイル -ソリッドなし -無制限 -6000 -コピー -移動 -フォルダへコピー: -フォルダへ移動: -コピーしています... -移動しています... -リネームしています... -対象のフォルダを選択してください。 -このフォルダでは、その操作はサポートされていません。 -ファイルまたはフォルダのリネームエラー -ファイルコピーの確認 -本当にファイルを書庫に追加しますか? -6100 -ファイル削除の確認 -フォルダ削除の確認 -複数ファイル削除の確認 -'{0}'を本当に削除しますか? -'{0}'フォルダとその中身のすべてを削除しますか? -これらの{0}個の項目を本当に削除しますか? -削除中... -ファイルまたはフォルダの削除エラー -ファイルのパスが長すぎるため、ファイルをごみ箱に移動できません -6300 -フォルダ作成 -ファイル作成 -フォルダ名: -ファイル名: -新しいフォルダ -新しいファイル -フォルダ作成エラー -ファイル作成エラー -6400 -コメント -コメント(&C): -選択 -選択解除 -マスク: -6600 -プロパティ -フォルダ履歴 -診断結果 -メッセージ -7100 -コンピュータ -ネットワーク -ドキュメント -システム -7200 -追加 -展開 -テスト -コピー -移動 -削除 -情報 -7300 -ファイル分割 -分割先(&S): -書庫をサイズで分割(&V): -分割中... -分割の確認 -{0}個にファイルを分割してもよろしいですか? -分割後のサイズは元のファイルサイズより小さいサイズを指定してください -不正なボリュームサイズ -選択されたボリュームサイズ:{0}バイト\nこのサイズに書庫を分割しますか? -7400 -ファイル結合 -結合先(&C): -結合中... -分割ファイルの先頭のファイルだけ選択してください -分割ファイルが見つかりません -分割ファイルの一部しか見つかりません -7500 -チェックサム計算中... -チェックサム情報 -データのCRCチェックサム: -データと名前のCRCチェックサム: -7600 -ベンチマーク -必要メモリ: -圧縮中 -展開中 -評価 -総合評価 -現在 -結果 -CPU使用率 -評価 / 使用率 -テスト回数: -7700 -リンク -リンク作成 -リンク元: -リンク先: -7710 -リンク種類 -ハードリンク -ファイルのシンボリックリンク -ディレクトリのシンボリックリンク -ディレクトリのジャンクション diff --git a/Utils/7-Zip/Lang/ka.txt b/Utils/7-Zip/Lang/ka.txt deleted file mode 100644 index a920e7318..000000000 --- a/Utils/7-Zip/Lang/ka.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 9.23 : 2011-09-25 : Translated by Giorgi Maghlakelidze, original translation by Dimitri Gogelia, -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Georgian -ქართული -401 -OK -გაუქმება - - - -&დიახ -&არა -&დახურვა -დახმარება - -&გაგრძელება -440 -დიახ &ყველასათვის -არა ყვე&ლასათვის -შეწყვეტა -ხელახლა -&ფონურად -&წინა პლანზე -&შეჩერება -&შეჩერებული -ნამდვილად გსურთ მოქმედების შეწყვეტა? -500 -&ფაილი -&დამუშავება -&ხედი -რ&ჩეულები -&ხელსაწყოები -&დახმარება -540 -&გახსნა -გახსნა &შიგნით -გახსნა გა&რეთ -და&თვალიერება -და&მუშავება -გადა&რქმევა -&ასლის მოთავსება... -&გადატანა... -&წაშლა -&ფაილის დაყოფა... -&ფაილების გაერთიანება... -თ&ვისებები -კომენ&ტარი -საკონტროლო ჯამის დათვლა -Diff -საქაღალდის შექმნა -ფაილის შექმნა -გ&ამოსვლა -600 -&ყველაფრის მონიშვნა -მონიშვნის გაუქმება -მონიშვნის შებრუნება -მოინიშნოს... -მოიხსნას მონიშვნა... -მონიშვნა ტიპის მიხედვით -მონიშვნის მოხსნა ტიპის მიხედვით -700 -&დიდი ხატულები -&პატარა ხატულები -&სია -&დაწვრილებით -730 -დაულაგებელი -ბრტყელი ხედი -&2 პანელი -&ხელსაწყოთა ზოლი -ძირეული საქაღალდის გახსნა -საქაღალდიდან გასვლა -საქაღალდეების ისტორია... -&განახლება -750 -დაარქივების ზოლი -ძირითადი ზოლი -დიდი ღილაკები -წარწერები ღილაკებზე -800 -&საქაღალდის რჩეულებში დამატება როგორც -სანიშნე -900 -&გამართვა... -&წარმადობის შემოწმება -960 -სარჩევი... -7-Zip-ის შესახებ... -1003 -მდებარეობა -სახელი -გაფართოება -საქაღალდე -ზომა -შეკუმშულის ზომა -ატრიბუტები -შექმნილია -გახსნილია -შეცვლილია -უწყვეტი -კომენტარი -დაშიფრულია -დაყოფა სანამ -დაყოფა შემდეგ -ლექსიკონი -CRC -ტიპი -ანტი -მეთოდი -სისტემა -ფაილური სისტემა -მომხმარებელი -ჯგუფი -ბლოკი -კომენტარი -მდებარეობა -მდებარეობის თავსართი -საქაღალდეები -ფაილები -ვერსია -ტომი -მრავალტომიანი -წანაცვლება -ბმულები -ბლოკები -ტომები - -64 ბიტი -Big-endian -CPU -ფიზიკური ზომა -სათაურების ზომა -საკონტროლო ჯამი -თვისებები -ვირტუალური მისამართი -ID -მოკლე სახელი -შემქმნელი პროგრამა -სექტორის ზომა -რეჟიმი -ბმული -შეცდომა -სრული მოცულობა -თავისუფალი სივრცე -კლასტერის ზომა -წარწერა -ადგილობრივი სახელი -მომწოდებელი -2100 -გამართვა -ენები -ენა: -რედაქტორი -რედაქტორი: -&Diff: -2200 -სისტემა -ასოცირება 7-Zip-თან: -2301 -7-Zip-ის გარსის კონტექსტურ მენიუში ჩადგმა -კასკადური კონტექსტური მენიუ -კონტექსტური მენიუს შემადგენლობა: -2320 -<საქაღალდე> -<არქივი> -არქივის გახსნა -ფაილების ამოღება... -არქივში ჩამატება... -არქივის შემოწმება -ამოღება აქ -ამოღება {0}-ში -{0}-ში ჩამატება -შეკუმშვა და ელფოსტით გაგზავნა... -{0}-ში შეკუმშვა და ელფოსტით გაგზავნა -2400 -საქაღალდეები -&მუშაობის საქაღალდე -&სისტემური დროებითი საქაღალდე -&მიმდინარე -&მითითებული: -გამოიყენება ცვლადი მეხსიერების მოწყობილობებისთვის -მიუთითეთ მდებარეობა დროებითი არქივებისათვის. -2500 -გამართვა -".." ელემენტის ჩვენება -ფაილთა ნამდვილი ხატულების ჩვენება -სისტემური მენიუს ჩვენება -კურსორი &მთელ სტრიქონზე -ჩვენება &ცხრილის სახით -ელემენტთა გახსნა ერთი წკაპით -მონიშნვის &ალტერნატიული რეჟიმი -&დიდი მეხსიერების ბლოკების გამოყენება -2900 -7-Zip-ის შესახებ -7-Zip არის თავისუფლად გავრცელებადი პროგრამული უზრუნველყოფა. -3000 -შეუძლებელია საჭირო ზომის მეხსიერების გამოყოფა -შეცდომები არ მოიძებნა -მონიშნულია {0} ობიექტი -ვერ მოხერხდა '{0}' საქაღალდეს შექმნა -ამ ტიპის არქივისათვის ცვლილების ოპერაცია ხელმიუწვდომელია. -'{0}' ფაილის არქივად გახსნა ვერ მოხერხდა -'{0}' დაშიფრული არქივის გახსნა ვერ მოხერხდა. არასწორი პაროლი? -არქივთა ამ სახეობის გახსნა შეუძლებელია -ფაილი '{0}' უკვე არსებობს -ფაილი '{0}' შეიცვალა.\nგნებავთ მისი არქივში განახლება? -შეუძლებელია \n'{0}'-ის განახლება -შეუძლებელია რედაქტორის გაშვება. -ფაილი შესაძლოა აღმოჩნდეს ვირუსი (სახელი შეიცავს ძალიან ბევრ თავმოყრილ ჰარს). -შეუძლებელია გრძელ-სახელიანი საქაღალდიდან ქმედების შესრულება -უნდა აირჩიოთ ერთი ფაილი -უნდა აირჩიოთ ერთი ან მეტი ფაილი -მეტისმეტად ბევრი ელემენტი -3300 -მიმდინარეობს ამოღება -მიმდინარეობს შეკუმშვა -მიმდინარეობს შემოწმება -მიმდინარეობს გახსნა... -მიმდინარეობს ამოკითხვა... -3400 -ამოღება -ა&მოღება: -მიუთითეთ ადგილი ამოსაღები ფაილებისათვის. -3410 -მდებარეობა -სრული მდებარეობა -მდებარეობის გარეშე -3420 -ზედგადაწერა -ზედგადაწერის დასტური -ზედგადაწერა დასრურის გარეშე -არსებული ფაილების გამოტოვება -ავტო-გადარქმევა -არსებული ფაილების ავტო-გადარქმევა -3500 -ფაილის ზედგადაწერის დასტური -საქაღალდე უკვე შეიცავს დამუშავებულ ფაილს. -გსურთ ჩაანაცვლოთ არსებული ფაილი -ახალი ფაილით? -{0} ბაიტი -ა&ვტო-გადარქმევა -3700 -შეკუმშვის შეუთავსებადი მეთოდი '{0}'-თვის. -მონაცემების შეცდომა '{0}'-ში. ფაილი დაზიანებულია. -CRC-ის შეცდომა '{0}'-ში. ფაილი დაზიანებულია. -მონაცემების შეცდომა დაშიფრულ ფაილში '{0}'. არასწორი პაროლი? -CRC ჩაიშალა დაშიფრულ ფაილში '{0}'. არასწორი პაროლი? -3800 -პაროლის შეყვანა -შეიყვანეთ პაროლი: -პაროლი ხელახლა: -პაროლის &ჩვენება -პაროლები არ დაემთხვა -პაროლად შეიყვანეთ მხოლოდ ლათინური ასოები, ციფრები და განსაკუთერებული სიმბოლოები (!, #, $, ...) -პაროლი მეტისმეტად გრძელია -პაროლი -3900 -გასული დრო: -დარჩენილი დრო: -ჯამური ზომა: -სიჩქარე: -დამუშავებული: -შეკუმშვის დონე: -შეცდომა: -არქივები: -4000 -არქივში ჩამატება -&არქივი: -&განახლების რეჟიმი: -არქივის &ფორმატი: -შეკუმშვის &დონე: -შეკუმშვის &მეთოდი: -&ლექსიკონის ზომა: -&სიტყვის ზომა: -უწყვეტი ბლოკის ზომა: -CPU ნაკადების ოდენობა: -&პარამეტრები: -დამატებითი -შეიქმნას SF&X არქივი -გაზიარებული ფაილების შეკუმშვა -დაშიფრვა -დაშიფრვის მეთოდი: -ფაილთა &სახელების დაშიფრვა -მეხსიერება შეკუმშვისათვის: -მეხსიერება ამოღებისათვის: -4050 -შეკუმშვის გარეშე -უსწრაფესი -სწრაფი -ჩვეულებრივი -მაღალი -უმაღლესი -4060 -ფაილთა დამატება და შეცვლა -ფაილთა განახლება და დამატება -ფაილთა განახლება -ფაილთა სინქრონიზება -4070 -დათვალიერება -ყველა ფაილი -წყვეტილი -უწყვეტი -6000 -ასლის აღება -გადატანა -ასლის მოთავსება: -გადატანა: -ასლის აღება... -გადატანა... -გადარქმევა... -აირჩიეთ დანიშნულების საქაღალდე. -ქმედება შუთავსებელია მიმდინარე საქაღალდესთან. -ფაილის ან საქაღალდის გადარქმევის შეცდომა -ფაილის ასლის შექმნის დასტური -ნადმვილად გსურთ ფაილების არქივში ჩამატება -6100 -ფაილის წაშლის თანხმობა -საქაღალდის წაშლის თანხმობა -რამდენიმე ფაილის წაშლის თანხმობა -დარწმუნებული ხართ, რომ გინდათ წაშალოთ '{0}'? -დარწმუნებული ხართ, რომ გინდათ წაშალოთ '{0}' საქაღალდე და მთელი მისი შიგთავსი? -დარწმუნებული ხართ, რომ გინდათ წაშალოთ {0} ელემენტები? -იშლება... -ფაილის ან საქაღალდის წაშლის შეცდომა -სისტემას არ შეუძლია გადაიტანოს სანაგვე ყუთში ფაილი მეტისმეტად გრძელი მისამართით. -6300 -საქაღალდის შექმნა -ფაილის შექმნა -საქაღალდის სახელი: -ფაილის სახელი: -ახალი საქაღალდე -ახალი ფაილი -შეცდომა საქაღალდის შექმნისას -შეცდომა ფაილის შექმნისას -6400 -კომენტარი -&კომენტარი: -მონიშვნა -მონიშვნის გაუქმება -ნიღაბი: -6600 -თვისებები -საქაღალდეთა ისტორია -დიაგნოსტიკური შეტყობინება -შეტყობინება -7100 -კომპიუტერი -ქსელი -დოკუმენტები -სისტემა -7200 -დამატება -ამოღება -შემოწმება -ასლი -გადატანა -წაშლა -ცნობები -7300 -ფაილის დაყოფა -&დაიყოფა: -დაიყოს &ტომებად, ზომით (ბაიტებში): -დაყოფა... -დაყოფის დასტური -ნამდვილად გსურთ ფაილის დაყოფა {0} ნაწილად? -ნაწილის ზომა უნდა იყოს საწყისი ფაილის ზომაზე ნაკლები -ნაწილის ზომა მიუღებელია -მითითებული ნაწილის ზომა: {0} ბაიტი.\nნამდვილად გსურთ ასეთი ზომის ნაწილებას დაყოთ ფაილი? -7400 -ფაილების შეერთება -&შეერთება: -შეერთება... -მონიშნეთ დაყოფილი ფაილის მხოლოდ პირველი ნაწილი -როგორც ჩანს, ფაილი არ წარმოადგენს დაყოფილი ფაილის ნაწილს -ვერ მოიზებნა დაყოფილი ფაილის ერთზე მეტი ნაწილი -7500 -საკონტროლო ჯამის დათვლა... -საკონტრლო ჯამის შესახებ -CRC ჯამი მონაცემთათვის: -CRC ჯამი სახელთა და მონაცემთათვის: -7600 -წარმადობის შემოწმება -გამოყენებული მეხსიერება: -შეკუმშვა -გაშლა -შეფასება -საერთო შეფასება -მიმდინარე -შემაჯამებელი -CPU დატვირთვა -შეფას./დატვირთვა -გატარება: diff --git a/Utils/7-Zip/Lang/kaa.txt b/Utils/7-Zip/Lang/kaa.txt deleted file mode 100644 index 0ac118e38..000000000 --- a/Utils/7-Zip/Lang/kaa.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 9.07 : Atabek Murtazaev -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Karakalpak - Latin -Qaraqalpaqsha - Latın -401 -OK -Biykar etiw - - - -&Awa -&Yaq -&Jabıw -Ja'rdem - -&Dawam etiw -440 -&Barlıg'ına awa -Ba&rlıg'ına yaq -Toqtatıw -Qaytadan baslaw -&Artqı fong'a -Aldıng'ı &fong'a -&Pauza -Pauza qılıng'an -Anıq biykar etiwdi qa'leysizbe? -500 -&Fayl -&Du'zetiw -&Ko'rinis -&Saylandılar -A's&baplar -&Ja'rdem -540 -&Ashıw -&İshinde ashıw -&Sırtında ashıw -&Ko'riw -&Du'zetiw -Atın o'&zgertiw -Bul jerge &nusqasın alıw... -Bul jerge ko'shiriw... -O'shiriw -&Fayldı bo'liw... -Fayllardı &biriktiriw... -Sazlawla&r -Kom&mentariy... -Qadag'alaw summası -Diff -Papka jaratıw -Fayl jaratıw -Sh&ıg'ıw -600 -Barlıg'ın &saylaw -Saylawdı alıp taslaw -Saylawdı &teris awdarıw -Saylaw... -Saylawdı alıp taslaw... -Tu'ri boyınsha saylaw -Tu'ri boyınsha saylawdı alıp taslaw -700 -U'&lken ikonalar -Kishi &ikonalar -&Dizim -&Keste -730 -Ta'rtipsiz -Tegis ko'rinis -&2 panel -&A'sbaplar paneli -Derek papkasın ashıw -Bir da'reje joqarıg'a ko'teriliw -Papkalar tariyxı... -&Jan'alaw -750 -Arxivator knopkalar paneli -Standart knopkalar paneli -U'lken knopkalar -Knopkalar tekstin ko'rsetiw -800 -&Papkanı saylandılarg'a qosıw -Belgi -900 -&Sazlawlar... -&O'nimlilikti tekseriw -960 -&Mazmunı... -&7-Zip haqqında... -1003 -Jol -Atı -Ken'eytpe -Papka -Ko'lemi -Qısılg'andag'ı ko'lemi -Attributları -Jaratılg'an -Ashılg'an -O'zgertilgen -U'ziliksiz -Kommentariy berilgen -Shifrlengen -deyin bo'lingen -keyin bo'lingen -So'zlik -CRC -Tu'ri -Anti -Usıl -Basqarıwshı OS -Fayl sisteması -Paydalanıwshı -Topar -Blok -Kommentariy -Ornı -Jol prefiksi -Papkalar -Fayllar -Versiya -Tom -Ko'p tomlı -Jıljıw -Siltewler -Bloklar -Tomlar - -64-bit -Big-endian -Protsessor -Fizikalıq ko'lemi -Baslama ko'lemi -Qadag'alaw summası -Xarakteristika -Virtual adresi -ID -Qısqa atı -Jaratıwshı bag'darlama -Sektor ko'lemi -Rejim -Siltew -Qa'te -Ulıwma ko'lem -Bos orın -Klaster ko'lemi -Belgi -Jergilikli atı -Provayder -2100 -Sazlawlar -Til -Til: -Redaktor -&Redaktor: -&Diff: -2200 -Sistema -To'mendegi fayllardı 7-Zip penen baylanıstırıw: -2301 -7-Zip ti qabıq kontekst menyuine qosıw -Kaskadlı kontekst menyu -Kontekst menyu elementleri: -2320 - - -Arxivti ashıw -Fayllardı shıg'arıp alıw... -Arxivke qosıw... -Arxivti sınaw -Usı jerge shıg'arıw -Mına jerge shıg'arıw: {0} -Mınag'an qosıw: {0} -Qısıw ha'm email arqalı jiberiw... -Mınag'an qısıw: {0} ha'm email arqalı jiberiw -2400 -Papkalar -&İslewshi papka -&Sistemanın' waqtınshalıq papkası -Ha'zirgi &papka -&Ko'rsetilgen: -Tek alınbalı tasıg'ıshlar ushın paydalanıw -Waqtınshalıq arxiv fayllardın' ornın ko'rsetin'. -2500 -Sazlawlar -".." elementti ko'rsetiw -Fayldın' haqıyqıy ikonaların ko'rsetiw -Sistema menyuin ko'rsetiw -&Tolıq joldı saylaw -Tor &sızıqların ko'rsetiw -Elementti bir basıwdan ashıw -Saylawdın' &alternativ usılı -U'lken &yad betlerin paydalanıw -2900 -7-Zip haqqında -7-Zip bul biypul bag'darlama -3000 -Sistema kerekli bolg'an yad mug'darın ajırata almadı -Qa'te tabılmadı -{0} obekt saylang'an -'{0}' papkasın jaratıw iske aspadı -Bul arxiv ushın jan'alaw operatsiyaları qollanılmaydı. -'{0}' faylın arxiv sıpatında ashıw iske aspadı -Shifrlang'an '{0}' arxivin ashıw iske aspadı. Parol qa'te emespe? -Qollanbaytug'ın arxiv tu'ri -{0} faylı a'lle qashan bar (jaratılg'an) -'{0}' faylı o'zgertilgen.\nOnı arxiv ishinde jan'alawdı qa'leysizbe? -Mına fayldı jan'alaw iske aspadı\n'{0}' -Redaktordı ashıw iske aspadı. -Fayl virusqa uqsaydı (fayl atında uzın bos orınlar qollanılg'an). -Operatsiya uzun jollı papkadan ju'klene almaydı. -Siz bir fayl saylawın'ız kerek -Siz bir yamasa onnan ko'p fayllardı saylawın'ız kerek -Elementler sanı dım ko'p -3300 -Shıg'arılmaqta -Qısılmaqta -Sınaw -Ashılmaqta... -Skanerlenbekte... -3400 -Shıg'arıw -&Bul jerge shıg'arıw: -Shıg'arılatug'ın fayllar ushın orın ko'rsetin'. -3410 -Jol usılı -Tolıq jol atları -Jolsız -3420 -U'stinen jazıw usılı -U'stine jazıwdan aldın soraw -Soramastan u'stine jazıw -Aldınnan bar fayllardı o'tkizip jiberiw -Avtomat ta'rizde qayta at beriw -Aldınnan bar fayllarg'a avtomat ta'rizde qayta at beriw -3500 -Fayldın' u'stinen jazıwdı tastıyqlaw -Tayınlang'an papka a'lle qashan islengen fayldı o'z ishine alg'an. -Siz bar fayldı -mına fayl menen almastırıwdı qa'leysizbe? -{0} bayt -A&vtomat ta'rizde qayta at beriw -3700 -'{0}' faylı ushın tanıs bolmag'an qısıw usılı. -'{0}' faylında mag'lıwmat qa'tesi tabıldı. Fayl buzılg'an. -'{0}' faylında CRC qa'tesi tabıldı. Fayl buzılg'an. -'{0}' shifrlang'an faylında mag'lıwmat qa'tesi tabıldı. Parol qa'te emespe? -'{0}' shifrlang'an faylında CRC qa'tesi tabıldı. Parol qa'te emespe? -3800 -Paroldi kiritiw -Paroldi kiritin': -Paroldi qayta kiritin': -Paroldi &ko'rsetiw -Paroller sa'ykes kelmedi -Parol ushın tek latın a'lipbesi ha'riplerin, sanlar ha'm arnawlı simvollardı (!, #, $, ...) paydalanın' -Parol dım uzın -Parol -3900 -O'tken waqıt: -Qalg'an waqıt: -Tolıq ko'lem: -Tezlik: -İslengen ko'lem: -Qısıw da'rejesi: -Qa'teler: -Arxivler: -4000 -Arxivke qosıw -&Arxiv: -&Jan'alaw usılı: -Arxiv &formatı: -Qısıw &da'rejesi: -Qısıw &usılı: -&So'zlik ko'lemi: -So'z &ko'lemi: -Blok ko'lemi: -CPU ag'ımlar sanı: -&Parametrler: -Sazlawlar -SF&X arxivin jaratıw -Jazıw ushın ashılg'an fayllardı qısıw -Shifrlaw -Shifrlaw usılı: -Fayl a&tların shifrlaw -Qısıwg'a arnalg'an yad: -Ajıratıwg'a arnalg'an yad: -4050 -Qısıwsız -En' tez -Tez -Qa'dimgi -En' joqarı -Ultra -4060 -Fayllardı qosıw ha'm almastırıw -Fayllardı jan'alaw ha'm qosıw -Bar fayllardı jan'alaw -Fayllardı sinxronlastırıw -4070 -Belgilew -Barlıq fayllar -Fayl ko'lemi boyınsha -U'ziliksiz -6000 -Nusqasın alıw -Ko'shiriw -Mına papkag'a nusqasın alıw: -Mına papkag'a ko'shiriw: -Nusqa alınbaqta... -Ko'shirilmekte... -Qayta at berilmekte... -Papkanı saylan'. -Ko'rsetilgen operatsiya bul papka ushın qollanılmaydı. -Fayl yaki papkag'a qayta at beriwde qa'te ju'z berdi -Fayldın' nusqasın alıwdı tastıyqlan' -Siz bul fayllardı anıq arxivke ko'shiriwdi qa'leysizbe -6100 -Fayl o'shiriliwin tastıyqlaw -Papka o'shiriliwin tastıyqlaw -Fayllar toparının' o'shiriliwin tastıyqlaw -'{0}' degendi anıq o'shiriwdi qa'leysizbe? -'{0}' papkası ha'm onın' ishindegilerdi anıq o'shiriwdi qa'leysizbe? -Bul obektlerdi ({0} dana) anıq o'shiriwdi qa'leysizbe? -O'shirilmekte... -Fayl yaki papkanı o'shiriwde qa'te ju'z berdi -Sistema uzın jollı fayllardı sebetke ko'shire almaydı -6300 -Papka jaratıw -Fayl jaratıw -Papka atı: -Fayl atı: -Jan'a papka -Jan'a fayl -Papkanı jaratıwda qa'te ju'z berdi -Fayldı jaratıwda qa'te ju'z berdi -6400 -Kommentariy -&Kommentariy: -Saylaw -Saylawdı alıp taslaw -Maska: -6600 -Sazlawlar -Papkalar tariyxı -Diagnostik xabarlar -Xabar -7100 -Kompyuter -Tarmaq -Hu'jjetler -Sistema -7200 -Qosıw -Shıg'arıw -Sınaw -Nusqa alıw -Ko'shiriw -O'shiriw -Mag'lıwmat -7300 -Fayldı bo'liw -&Mınag'an bo'liw: -Tomlarg'a &bo'liw (baytlarda): -Bo'linbekte... -Bo'liwdi tastıyqlan' -Siz fayldı {0} bo'lekke anıq bo'liwdi qa'leysizbe? -Bo'lek ko'lemi original fayl ko'leminen kishi bolıwı kerek -Tom ko'lemi natuwrı berilgen -Tomnın' ko'rsetilgen ko'lemi: {0} bayt.\nArxivti bunday tomlarg'a anıq bo'liwdi qa'leysizbe? -7400 -Fayllardı biriktiriw -&Mınag'an biriktiriw: -Biriktirilmekte... -Bo'lingen fayldın' tek birinshi bo'legin saylaw kerek -Fayl bo'lingen fayldın' bo'legi retinde tanılmadı -Bo'lingen fayldın' birden ko'p bo'legi tabılmadı -7500 -Qadag'alaw summasın esaplaw... -Qadag'alaw summası mag'lıwmatı -Mag'lıwmatlar ushın CRC qadag'alaw summası: -Mag'lıwmatlar ha'm atamalar ushın CRC qadag'alaw summası: -7600 -O'nimlilikti tekseriw -Yad ko'lemi: -Qısıw -Ajıratıw -Reyting -Ulıwma reyting -Ha'zirgi -Ja'mi -Awırlıq -Reyting / Awır. -O'tkenler: diff --git a/Utils/7-Zip/Lang/kk.txt b/Utils/7-Zip/Lang/kk.txt deleted file mode 100644 index 0db20e07a..000000000 --- a/Utils/7-Zip/Lang/kk.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 9.07 : Arslan Beisenov, Arman Beisenov -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Kazakh -Қазақша -401 -Жарайды -Болдырмау - - - -&Иә -&Жоқ -&Жабу -Анықтама - -&Жалғастыру -440 -Бәріне &ия -Бәріне &жоқ -Тоқтату -Қайта іске қосу -&Фонды -&Алдыңғы жоспарға -&Үізілс -Үзілісте -Операцияны тоқтату керек пе? -500 -&Файл -&Өңдеу -&Көрініс -&Таңдаулы -С&ервис -&Анықтама -540 -&Ашу -Ішінен &ашу -Сыртынан ашу -Қарау -&Өңдеу -Қайта атау -&Көшіру... -&Жылжыту... -&Жою -Файлды бөлшектеу... -Файлды біріктіру... -Сипаттар -Комме&нтарий... -Бақылау сомасы -Diff -&Қалта жасау -Файл жасау -Шығу -600 -Бәрін ерекшелеу -Ерекшелеуді аластау -&Ерекшелеуді көрсету -Ерекшелеу... -Ерекшедеужі аластау... -Түрі б-ша ерекшелеу -Түрі б-ша ерекшелеуді аластау -700 -&Үлкен таңбаша -&Кішк. таңбаша -Тізім -&Кесте -730 -Сұрыптаусыз -Жалпақ режим -&2 тақта -&Құралдар тақтасы -Негізгі қалтады ашу -Бір деңгей жоғары өту -Қалта тарихы... -Жаңарту -750 -Мұрағаттауыш батырма тақтасы -Батырманың кәдімгі тақтасы -Үлкен батырмалар -Батырмада жазулар -800 -Қалтаны таңдаулыға басқаша үстеу -Таңдаулы -900 -Баптау... -Өнімді тестілеу -960 -&Басты... -Бағдарламада... -1003 -Жол -Аты -Кеңейтімі -Қалта -Көлем -Сығылған -Атрибут -Жасалған -Ашылған -Өзгерген -Үзіліссіз -Комментарий -Шифрланған -дейін бөлінген -кейін бөлінген -Сөздік -CRC -Түрі -Анти -Тәсіл -Жүйе -Файлдық жүйе -Пайдаланушы -Топ -Блок -Комментарий -Орны -Жолы -Қалта -Файл -Нұсқа -Том -Көп томды -Жылжу -Сілтеме -Блок -Том - -64-bit -Big-endian -Процессор -Физикалық көлемі -Тақырып көлемі -Бақылау сомасы -Характеристика -Виртуальды мекен-жай -ID -Қысқа аты -Жасаушы -Сектор көлемі -Режим -Сілтеме -Қателік -Сыйымы -Бос -Кластер көлемі -Белгі -Жергілікті аты -Провайдер -2100 -Баптау -Тіл -Тіл: -Өңдегіш -&Өңдегіш: -&Diff: -2200 -Жүйе -7-Zip файлмен ассорциялау: -2301 -Мұқабаның мәтінміндің мәзіріне 7-Zip қою -Каскадты мәтінмәндік мәзір -Мәтінміндік мәзірдің элементтері: -2320 -<Қалта> -<Мұрағат> -Мұрағат ашу -Бумадан шешу -Мұрағатқа үстеу... -Тестілеу -Мұнда шешу -{0} дегенде шешу -{0} дегенге үстеу -Сығып э-поштамен жіберу... -{0} дегенде сығып, э-поштамен жіберу -2400 -Қалта -&Жұмыс қалтасы -&Жүйелік уақытша қалта -&Ағымдық -&Сұрау: -Тек алмалы тасығыштарға ғана пайдалану -Уақытша мұрағаттардың орнын нұсқаңыз. -2500 -Баптау -".." элементті көрсету -Файлдың шынайы таңбашасын көрсету -Жүйелік мәзірді көрсету -Барлық жолаққа меңзер -Бөлгіштерді көрсету -Бір шерткеннен ашу -Белгілеудің альтернативті режимі -Жадтың үлкен беттерін пайдалану -2900 -7-Zip туралы -7-Zip - тегін таратылатын бағдарлама. -3000 -Бос жад жоқ -Қателік табылған жоқ -Ерекшеленген нысан: {0} -'{0}' қалтасын жасау мүмкін емес -Көтермейтін мұрағат үшін операция өзгертіледі. -'{0}' файлды мұрағат ретінде ашу мүмкін емес -Шифрланған '{0}' мұрағатты ашу мүмкін емес. Кілтсөз дұрыс емес пе? -Көтермейтін мұрағат түрі -{0} деген файл бар -'{0}' файлы өзгерді.\nОны мұрағатта жаңарту керек пе? -\n'{0}' файлды жаңарту мүмкін емес -Өңдегішті ашу мүмкін емес -Файл вирусқа ұқсайды (файл аты ұзақ жолды мәселені құрайды). -Операция қалтаға жолдың ұзақтығынан орындалмайды -Сізге бір файл таңдау керек -Сізге бір не бірнеше файл таңдау керек -Өте көп элемент -3300 -Шешу -Компрессия -Тестілеу -Ашылу... -Сканерлеу... -3400 -Шығару -&Мұнда шешу: -Шығарылатын файл орнын нұсқаңыз. -3410 -Жолдар -&Толық жол -&Жолсыз -3420 -Қайта жазу -&Растаумен -&Растаусыз -Өткізіп &жіберу -Автоматты қайта атау. -Бар файлды автом. қайта атау -3500 -Файлды ауыстыру растау -Қалтада іс жүргізілетін файл бар. -Файлды ауыстыру -келесі файлмен ба? -{0} байт -Автоматты қайта атау -3700 -'{0}' файлы үшін сығу әдісін көтермейді. -'{0}' мәліметінде қателік. Файл зақымдалған. -'{0}' CRC қателік. Файл зақымдалған. -Шифрланған '{0}' файлында мәліміт қате. Кілтсөз дұрыс емес пе? -Шифрланған '{0}' файлында CRС қате. Кілтсөз дұрыс емес пе? -3800 -Кілтсөзді енгізу -&Кілтсөзді енгізіңіз: -&Кілтсөзді қайталаңыз: -&Кілтсөзді көрсету -Кілтсөздер сәйкес емес -Кілтсөзге тек ағылшын әліпбиін пайдаланыңыз, сандар және арнайы нышандар (!, #, $, ...) -Кілтсөз өте ұзақ -&Кілтсөз -3900 -Өтті: -Қалды: -Барлығы: -Жылд.: -Көлем: -Сығу дәрежесі: -Қате: -Мұрағат: -4000 -Мұрағатқа үстеу -&Мұрағат: -&Өзгерту режимі: -&Мұрағат пішімі: -&Сығу деңгейі: -&Сығу тәсілі: -Сөздік &көлемі: -Сөз &көлемі: -Блог көлемі: -Ағым саны: -&Параметр: -&Баптау -SF&X-мұрағат жасау -Ашылған файд жазу үшін сығу -Шифрлау -Шифрлау тәсілі: -&Файлдың атын шифрлау -Бууға арналған көлем: -Шешуге арналған көлем: -4050 -Сығусыз -Жылдам -Шапшаң -Кәдімгі -Ең жоғарғы -Ультра -4060 -Үстеу, ауыстыру -Жаңарту, үстеу -Жаңату -Теңестіру -4070 -Сапыру -Барлық файл -Файл көлемі б-ша -Үзіліссіз -6000 -Көшіру -Жылжыту -Мұнда көшіру: -Мұнда жылжыту: -Көшіру... -Жылжыту... -Атын өзгерту... -Қалтаны нұсқаңыз -Бұл қалтаға операция көтермейді. -Файл не қалтаның атын өзгерту мүмкін емес -Файлды көшіруді растау -Мына файлдарды мұрағатқа көшіру керек пе -6100 -Файлды жоюды растау -Қалтаны жоюды растау -Бірнеше файлды жоюды растау -"{0}" дегенді жою керек пе? -"{0}" қалтасын және оның ішіндегілерін жою керек пе? -({0} дана) нысандарды жою керек пе? -Жойылу... -Файл не қалтаны жою қате -Ұзақ жолды файлдарды себетке жоюды жүйе көтермейді -6300 -Қалта жасау -Файл жасау -Қалта аты: -Файл аты: -Жаңа қалта -Жаңа файл -Қалтаны жасау қате -Файлды жасау кезінде қателік болды -6400 -Комментарий -&Комментарий: -Ерекшелеу -Аластау -Маска: -6600 -Сипаттар -Қалта тарихы -Хабарлама -Хабарлама -7100 -Компьютер -Желі -Құжаттар -Жүйе -7200 -Үстеу -Шығару -Тестілеу -Көшіру -Жылжыту -Жою -Ақпарат -7300 -Файлды бөлшектеу -&Бөлшектеу: -Томға бөлшектеу (байтқа): -Бөлшектеу... -Бөлшектеуді растау -Файлд {0} бөлікке бөлшектеу керек пе? -Том көлемі файлдың кіріс көлемінен аз болу керек -Томның көлемін енгізу қате -Томның орнатылған көлемі: {0} байт.\nМұрағатты томға бөлшектеу керек пе? -7400 -Файлдарды біріктіру -&Мұнда біріктіру: -Біріктіру... -Бөлшектенген файлдың бірінші бөлігін таңдау керек -Бөлшектенген файлды тану мүмкін емес -Бөлшектенген файлдың бөліктерін табу мүмкін емес -7500 -Бақылау сомасын есептеу... -Бақылау сомасы -Мәлімет үшін CRC бақылау сомасы: -Мәлімет және атау үшін CRC бақылау сомасы: -7600 -Өнімділікке тестілеу -Жад көлемі: -Буу -Шешу -Рейтинг -Жалпы рейтинг -Ағымдық -Нәтижесі -Ауырлық -Рейтинг / Жеңіс. -Өтулер: diff --git a/Utils/7-Zip/Lang/ko.txt b/Utils/7-Zip/Lang/ko.txt deleted file mode 100644 index 5e9644d58..000000000 --- a/Utils/7-Zip/Lang/ko.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; : ZannyLim (임재형) -; : bzImage -; 4.52 : Hyeong il Kim (kurt Sawyer) -; 9.07 : Dong-yoon Han (한동윤) -; 15.12 : Winterscenery (Ji-yong BAE) -; 16.02 : Add translation and Modify Typos by Winterscenery (Ji-yong BAE) -; -; -; -; -; -0 -7-Zip -Korean -한국어 -401 -확인 -취소 - - - -예(&Y) -아니오(&N) -닫기(&C) -도움말 - -계속(&C) -440 -모두 예(&A) -모두 아니오(&L) -중지 -다시 시작 -낮은 순위로(&B) -우선 순위로(&F) -일시정지(&P) -일시정지 됨 -정말로 취소하시겠습니까? -500 -파일(&F) -편집(&E) -보기(&V) -즐겨찾기(&A) -도구(&T) -도움말(&H) -540 -열기(&O) -내부 열기(&I) -외부 열기(&U) -파일 뷰어(&V) -편집(&E) -새 이름(&M) -복사(&C)... -이동(&M)... -삭제(&D) -파일 나누기(&S)... -파일 합치기(&B)... -속성(&R) -설명(&N)... -체크섬 계산 -파일 비교 -폴더 만들기 -파일 만들기 -끝내기(&X) -연결 -대체 데이터 스트림(&A) -600 -모두 선택(&A) -모두 선택 취소 -선택 항목 반전(&I) -선택... -선택 취소... -파일 형식으로 선택 -파일 형식으로 선택 취소 -700 -큰 아이콘(&G) -작은 아이콘(&M) -목록(&L) -자세히(&S) -730 -정렬 안함 -펼쳐 보기 -2 패널(&2) -도구 모음(&T) -최상위 폴더 열기 -한단계 위로 -폴더 히스토리... -새로 고침(&R) -자동 새로 고침 -750 -압축 도구 모음 -표준 도구 모음 -큰 버튼 -버튼 텍스트 보기 -800 -즐겨찾기에 추가(&A) -북마크 -900 -옵션(&P)... -벤치마크(&B) -960 -도움말 항목(&C)... -7-Zip 정보(&A)... -1003 -경로 -이름 -확장자 -폴더 -크기 -압축된 크기 -속성 -만든 날짜 -액세스한 날짜 -수정한 날짜 -솔리드 -설명 -암호화 -나누기 이전 -나누기 후 -사전 -CRC -형식 -안티 -압축 방식 -생성한 OS -파일 시스템 -사용자 -그룹 -블럭 -설명 -위치 -경로 접두 -폴더 -파일 -버전 -볼륨 -다중볼륨 -오프셋 -연결 -블록 -볼륨 - -64-bit -Big-endian -CPU -물리적 크기 -해더 크기 -체크섬 -특성 -가상 주소 -ID -짧은 이름 -생성 응용프로그램 -섹터 크기 -모드 -기호 연결 -오류 -전체 크기 -여유 공간 -클러스터 크기 -라벨 -로컬 이름 -제공자 -NT 보안 -대체 데이터 스트림 -보조 -삭제 -Is Tree - - -오류 유형 -오류 -오류 -경고 -경고 -스트림 -대체 데이터 스트림 -대체 데이터 스트림 크기 -가상 크기 -압축 해제 후 크기 -용량 실제 크기 -볼륨 인덱스 -보조형식 -주석 -코드 페이지 - - - -테일 크기 -임베디드 스텁 크기 -연결 -하드 연결 -i노드 - -읽기 전용 -2100 -옵션 -언어 -언어: -편집기 -파일 편집기(&E): -파일 비교(&D): -2200 -시스템 -7-Zip 으로 연결: -모든 사용자 -2301 -7-Zip 탐색기 메뉴 사용 -탐색기 메뉴 계단식 보기 -탐색기 메뉴 항목: -탐색기 메뉴 아이콘 보기 -2320 -<폴더> -<압축파일> -압축파일 열기 -압축 풀기... -압축파일에 추가... -압축파일 테스트 -여기에 압축 풀기 -{0}에 풀기 -{0}에 추가 -압축해서 이메일 보내기 -{0}로 압축해서 이메일 보내기 -2400 -폴더 -작업 폴더(&W) -시스템 임시 폴더(&S) -현재 폴더(&C) -지정 폴더(&S): -이동식 드라이브에서만 사용 -압축에 관계된 파일이 임시적으로 사용할 위치 지정. -2500 -설정 -상위 폴더 ".." 항목 보기 -실제 파일 아이콘 보기 -시스템 메뉴 보기 -행 전체 선택(&F) -눈금선 보기(&G) -한 번 클릭으로 항목 열기 -우선 선택적 선택 모드 -큰 메모리 페이지 사용 -2900 -7-Zip 정보 -7-Zip 은 무료 소프트웨어입니다. -3000 -시스템이 필요한 양의 메모리를 할당할 수 없음 -오류 없음 -{0} 항목이 선택됨 -'{0}' 폴더를 생성할 수 없음 -업데이트 작업이 이 압축파일에서는 지원되지 않습니다. -파일 '{0}'을(를) 압축파일로 열 수 없음 -암호화된 압축파일 '{0}'을(를) 열 수 없습니다. 잘못 입력된 암호? -지원되지 않는 압축파일 유형 -{0} 파일은 이미 존재함 -파일 '{0}'이 수정되었습니다.\n압축파일에 업데이트 하시겠습니까? -'{0}' 파일을 업데이트 할 수 없습니다. -편집기를 시작할 수 없습니다. -해당 파일이 바이러스 같습니다 (파일 이름에 길다란 공백이 들어있음). -긴 경로로된 폴더에서 해당 작업을 호출할 수 없습니다. -반드시 한 개의 파일을 선택해야함 -반드시 한 개 이상의 파일을 선택해야 함 -항목이 너무 많음 -{0} 압축파일로 파일을 열 수 없습니다 -{0} 압축파일로 파일이 열리고 있습니다 -압축파일 오프셋을 사용하여 열려 있습니다 -3300 -압축 푸는 중 -압축하는 중 -검사 중 -여는 중... -검색 중... -삭제 중 -3320 -추가 중 -업데이트 중 -분석 중 -덮어 쓰는 중 -다시 압축 중 -건너뛰는 중 -삭제 중 -헤더 작성 중 -3400 -압축 풀기 -압축 풀기(&X): -압축 풀린 파일의 위치를 지정합니다. -3410 -경로 모드 -전체 경로명 -경로명 없음 -절대 경로명 -상대 경로명 -3420 -덮어쓰기 모드 -덮어쓰기 전에 확인 -물어보지 않고 덮어쓰기 -존재하는 파일 건너뛰기 -자동으로 이름 바꾸기 -존재하는 파일 이름 바꾸기 -3430 -최상위 폴더의 중복을 방지 -파일 보안 속성을 복원 -3500 -파일 덮어쓰기 확인 -대상 폴더에 이미 파일이 존재합니다. -존재하는 파일을 -이것으로 덮어쓰기 하시겠습니까? -{0} 바이트 -자동으로 이름 바꾸기(&U) -3700 -'{0}'은 지원하지 않는 압축 방식입니다. -'{0}'에 데이터 오류가 있습니다. 파일이 손상되었습니다. -'{0}'의 CRC 검사를 실패했습니다. 파일이 손상되었습니다. -암호화 파일 '{0}'에 데이터 오류가 있습니다. 암호가 틀리나요? -암호화 파일 '{0}'의 CRC 검사를 실패했습니다. 암호가 틀리나요? -3710 -잘못 입력된 암호? -3721 -지원하지 않는 압축 방법 -데이터 오류 -CRC가 다릅니다 -사용할 수없는 데이터 -데이터의 예기치 않은 종료 -페이로드 데이터의 종료 후에 일부 데이터가있다. -압축되지 않습니다. -헤더 오류 -암호가 잘못되었습니다. -3763 -사용할 수 없는 시작의 압축파일 -확인되지 않는 시작의 압축파일 - - - -지원하지 않는 기능 -3800 -암호 입력 -암호 입력: -암호 다시 입력: -암호 보기(&S) -암호가 일치하지 않음 -암호로는 영문자, 숫자 그리고 특수 문자 (!, #, $, ...)만 사용 -암호가 너무 깁니다. -암호 -3900 -경과 시간: -남은 시간: -전체 크기: -속도: -처리됨: -압축 효율: -오류: -압축파일: -4000 -압축파일에 추가 -압축파일(&A): -업데이트 모드(&U): -압축파일 형식(&F): -압축 레벨(&L): -압축 방식(&M): -사전 크기(&D): -단어(word) 크기(&W): -솔리드 블록 크기: -CPU 스레드 수: -매개변수(&P): -옵션 -자동(SFX) 압축파일 생성(&X) -공유하고있는 파일 압축 -암호화 -암호화 방식: -파일 이름 암호화(&N) -압축시 사용 메모리: -압축 풀기시 사용 메모리: -압축 후 원본 파일을 삭제 -4040 -심볼릭 연결을 저장 -하드 연결을 저장 -대체 데이터 스트림을 저장 -파일 보안 속성을 저장 -4050 -저장 -가장 빠름 -빠름 -보통 -최고 -가장 느림 -4060 -파일을 추가하고 덮어쓰기 -파일을 업데이트하고 추가 -존재하는 파일만 새롭게 하기 -압축파일 내용을 동기화 -4070 -찾아보기 -모든 파일 -솔리드 사용 않함 -솔리드 -6000 -복사 -이동 -폴더로 복사: -폴더로 이동: -복사 중... -이동 중... -이름 바꾸는 중... -대상 폴더를 선택하세요. -지원되지 않는 작업입니다. -파일 또는 폴더 이름 바꾸기 실패 -파일 복사 확인 -파일을 압축파일로 복사 하시겠습니까? -6100 -파일 삭제 확인 -폴더 삭제 확인 -여러 파일 지우기 확인 -'{0}'을(를) 삭제하시겠습니까? -폴더 '{0}'와 그 모든 내용을 삭제하시겠습니까? -이 {0} 항목들을 삭제하시겠습니까? -삭제 중... -파일 또는 폴더 삭제 실패 -시스템이 긴 경로의 파일을 휴지통으로 이동할 수 없음 -6300 -폴더 만들기 -파일 만들기 -폴더 이름: -파일 이름: -새 폴더 -새 파일 -폴더 만들기 오류 -파일 만들기 오류 -6400 -설명 -설명(&C): -선택 -선택 취소 -마스크: -6600 -속성 -폴더 히스토리 -진단 메시지 -메시지 -7100 -컴퓨터 -네트워크 -문서 -시스템 -7200 -추가 -압축 풀기 -테스트 -복사 -이동 -삭제 -속성 -7300 -파일 분할하기 -분할하기(&S): -볼륨 나누기, 바이트(&V): -분할하는 중... -분할 확인 -정말 {0} 볼륨들로 분할 하시겠습니까? -볼륨 크기가 원본 파일보다 작아야만 합니다. -볼륨 크기가 부적절합니다. -지정된 볼륨 크기: {0} 바이트.\n이 볼륨 크기로 분할 하시겠습니까? -7400 -파일 합치기 -합치기(&B): -파일 합치는 중... -첫번째 파일만 선택하시오 -분할한 파일의 한 부분으로 인식할 수 없음 -분할 파일의 한 부분 이상을 찾을 수 없음 -7500 -체크섬 계산중... -체크섬 정보 -데이터 CRC 체크섬: -데이터와 이름 CRC 체크섬: -7600 -벤치마크 -메모리 사용량: -압축 중 -압축 푸는 중 -평가 -전체 평가 -현재 -결과 -CPU 사용량 -평가 / 사용량 -통과: -7700 -연결 -연결 만들기 -원본: -연결: -7710 -연결 유형 -하드 연결 -파일의 심볼릭 연결 -디렉토리의 심볼릭 연결 -디렉토리 접합 diff --git a/Utils/7-Zip/Lang/ku-ckb.txt b/Utils/7-Zip/Lang/ku-ckb.txt deleted file mode 100644 index a6b52cea5..000000000 --- a/Utils/7-Zip/Lang/ku-ckb.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; : Ara Bakhtiar -; 4.66 : Ara Qadir : http://www.chawg.org -; -; -; -; -; -; -; -; -; -0 -7-Zip -Kurdish - Sorani -کوردی -401 -باشە -پاشگەزبوونەوە - - - -&بەڵێ -&نەخێر -&داخستن -یارمەتی - -&بەردەوامبوون -440 -بەڵێ بۆ &هەموو -نەخێر بۆ هە&موو -وەستاندن -دەستپێکردنەوە -&پاشەبنەما -پ&ێشەبنەما -&ڕاگرتن -ڕاگیردرا -دڵنیایت لە پاشگەزبوونەوە؟ -500 -&فایل -&دەستکاری -&بینین -د&ڵخوازەکان -&ئامڕازەکان -&یارمەتی -540 -&کردنەوە -کردنەوە لە&ناو خۆدا -کردنەوە لە &دەرەوە -&بینین -&دەستکاری -&ناوگۆڕین -&لەبەرگرتنەوە بۆ... -&گواستنەوە بۆ... -&سڕینەوە -&لەتکردنی پەڕگە... -&پێکەوە لکاندنی پەڕگەکان... -&تایبەتمەندییەکان -ل&ێدوان -ژماردنی checksum - -دروستکردنی بوخچە -دروستکردنی پەڕگە -دەر&چوون -600 -هەمووی دیاری بکە -هەموو دیاریکراوەکان لاببە -%پێچەوانەکردنەوەی دیاریکراو -دیاری بکە... -دیاری مەکە... -بە پێی جۆر دیاری بکە -لابردنی دیاریکراوەکان بەپێ جۆر -700 -ئایکۆنی &گەورە -ئایکۆنی &بچوک -&لیست -&وردەکاری -730 -ڕیزنەکراو -بینین بەشێوەی فلات -&2 پانێڵ -&جێ ئامڕاز -کردنەوەی بوخچەی ڕەگ -یەک ئاست بۆ سەرەوە -مێژووی بوخچەکان... -&بووژاندنەوە -750 -جێ ئامڕازی ئەرشیڤ -جی ئامڕازی بنچینە -دوگمەی گەورە -پیشاندانی دەقی دوگمەکان -800 -&زیادکردنی بوخچە بۆ دڵخوازەکان وەک -دڵخوازی -900 -&هەڵبژاردنەکان -&نیشانەی پێوان -960 -&ناوەڕۆکەکان... -&دەربارەی 7-Zip... -1003 -ڕێڕەو -ناو -پاشگر -بوخچە -قەبارە -قەبارەی پێچراو -تایبەتمەندی -دروستکراوە -بینراوە -دەستکاریکراوە -ڕەق -لێدوانی لەسەر دراوە -پارێزراو -لەتکردن پێش -لەتکردن پاش -فەرهەنگ -CRC -جۆر -دژ -ڕێباز -سیستەمی خانەخوێ -سیستەمی پەڕگە -بەکارهێنەر -گوروپ -بلۆک -لێدوان -جێگە -ـی ڕێڕەو Prefix -بوخچەکان -پەڕگەکان -وەشان -قەبارەکان -فرە قەبارە -Offset -بەستەرەکان -بلۆکەکان -قەبارەکان - -٦٤-بت -Big-endian -CPU -قەبارەی فیزیکی -قەبارەی سەر -کۆپشکنین -تایبەتمەندی -ناونیشانی ڕاستی - - - - - - -هەڵە -سەرجەمی قەبارە -بۆشایی بەتاڵ -قەبارەی کۆمەڵەکە -نیشان -ناوی ناوخۆیی -دابینکەر -2100 -ەەڵبژاردنەکان -زمان -زمان: -دەستکاریکەر -&دەستکاریکەر: - -2200 -سیستەم -7-Zip پەیوەست بکە بە: -2301 -7-Zip بکە نێو لیستەی مێنیوەوە -مێنیو بکە بە یەک هاوپۆل -کەرەستەکانی نێو مێنیو: -2320 -<بوخچە> -<ئەرشیڤ> -کردنەوەی ئەشیڤ -دەرکێشانی پەڕگەکان -زیادکردن بۆ ئەرشیڤ -تاقیکردنەوەی ئەرشیڤ -لێرە دەریبکێشە -دەرکێشان بۆ {0} -زیادکردنی بۆ {0} -پەستاندن و پەیامی ئەلیکترۆنی... -بیپەستێنە بۆ {0} و بە پەیامی ئەلیکترۆنی بینێرە -2400 -بوخچەکان -بوخچەی &کارکردن -بوخچەی کاتی &سیستەم -&ئێستایی -&دیاریکراو: -تەنها بۆ ئەو وەگەڕخەرانە بەکاری بهێنە کە توانای لابردنیان هەیە (removable disk) -شوێنێک دیاری بکە بۆ پەڕگە کاتییەکانی ئەرشیڤ. -2500 -ڕێکخستەکان -شتەکانی ".." پیشانبدە -ئایکۆنی ڕاستەقینەی پەڕگەکان پیشانبدە -مێنیوی سیستەم پیشانبدە -دیاریکردنی هەموو &ڕیزەکە -پیشاندانی هێڵە &grid ـەکان - -جۆری دیاریکردنی &جێگرەوە/ ئەڵتەرناتیڤ -پەڕەی بیرگەی &گەورە بەکارببە -2900 -7-Zip دەربارەی -7-Zip پڕۆگرامێکی خۆڕایە. لەگەڵ ئەوەشدا، ئەتوانی پاڵپشت بیت لە پەرەپێدانی 7-Zip. -3000 -سیستەم ناتوانێت بڕی پێویست لە بیرگە دابین بکات -هیچ هەڵەیەک نییە -{0} شت دیاریکراوە -ناتوانرێ بوخچەی '{0}' دروستبکرێت. -کارپێکردنی نوێکاری پاڵپشت نەکراوە بۆ ئەم ئەرشیڤە. -ناتوانرێت پەڕگەی '{0}' بکرێتەوە وەک ئەرشیڤ. -ناتوانرێت ئەرشیڤی پارێزراوی '{0}' بکرێتەوە. ئایا تێپەڕەوشە هەڵەیە؟ -جۆری ئەرشیڤ پاڵپشتی نەکراوە -پەڕگەی {0} پێشتر ەەیە -پەڕگەی '{0}' دەستکاریکراوە. ئەتەوێت لە ئەرشیڤەکەدا نوێی بکەیتەوە؟ -ناتوانرێ پەڕگەی \n'{0}' نوێبکرێتەوە -ناتوانرێ دەستکاریکەر دەستپێبکرێت. -پەڕگەکە لە ڤایرۆس دەچێت (ناوی پەڕگەکە بۆشایی زۆری تیادایە). -ناتوانرێت ئەو کردارە بانگبکرێت لە بوخچەیەکەوە کە ڕێڕەوێکی درێژی ەەیە. -پێویستە پەڕگەیەک دیاریبکەیت -پێویستە پەڕگەیەک یان زیاتر دیاریبکەیت -شتی(item) زۆر هەن -3300 -دەری دەکێشێ -دەی پەستێنێ... -تاقیدەکاتەوە -دەیکاتەوە... -دەی پشکنێت... -3400 -دەرکێشان -&دەرکێشان بۆ: -شوێنێک دیاری بکە بۆ پەڕگە دەرکێشراوەکان -3410 -جۆری ڕێڕەو -ناوی ڕێڕەوی تەواوەتی -ناوی ڕێڕەو نییە -3420 -جۆری بەسەردا نووسینەوە -بپرسە پێش بەسەردا نووسینەوە -بەسەردا بنووسەوە بەبێ ڕەزامەندی -پەڕگە هەبووەکان بپەڕێنە -خۆکار ناوگۆڕین -خۆکار ناوگۆڕینی پەڕگە هەبووەکان -3500 -دڵنیابە لە جێگرتنەوەی پەڕگە -بوخچەی مەبەست پەڕگەیەکی تیادایە بە هەمان ناو. -ئەتەوێت پەڕگە هەبووەکان جێبگیردرێتەوە؟ -لەگەڵ ئەم دانەیە؟ -{0} بایت -ناوگۆڕینی &خۆکار -3700 -ڕێبازێکی پاڵپشتی نەکراوی پەستاندن بۆ '{0}'. -زانیاری '{0}' هەڵەیە. پەڕگە تێکشکاوە. -CRC سەرکەوتوو نەبوو. پەڕگە تێکشکاوە. -زانیاری هەڵەیە لە پەڕگەی پارێزراودا '{0}'. ئایا تێپەڕەوشە هەڵەیە؟ -CRC هەڵەیە لە پەڕگەی پارێزراودا '{0}'. ئایا تێپەڕەوشە هەڵەیە؟ -3800 -نووسینی تێپەڕەوشە: -تێپەڕەوشە بنووسە: -تێپەڕەوشە بنووسەوە: -&پیشاندانی تێپەڕەوشە -تێپەڕەوشەکان وەک یەک نین -تەنها پیتە ئینگلیزییەکان، ژمارە و نووسە تیبەتییەکان ($، %، #) بۆ تێپەڕەوشە بەکاربهێنە -تێپەڕەوشە زۆر درێژە -تێپەڕەوشە -3900 -ک. دەستپێکردوو: -کاتی ماوە: -سەرجەمی قەبارە: -خێرایی: -جێبەجێکراوە: -ڕێژەی پەستاندن: -هەڵەکان: -ئەرشیڤەکان: -4000 -زیادکردن بۆ ئەرشیڤ -&ئەرشیڤ: -&جۆری نوێکاری: -&فۆڕماتی ئەرشیڤ: -&ئاستی پەستاندن: -&ڕێبازی پەستاندن: -قەبارەی &فەرەەنگ: -قەبارەی &وشە: -قەبارەی بلۆکی ڕەق: -ژمارەی دەزووەکانی CPU: -&هاوکۆڵکەکان: -هەڵبژاردنەکان -دروستکردنی ئەرشیڤی SF&X -پەستاندنی پەڕگە ئاڵوگۆڕکراوەکان -پاراستن -ڕێبازی پاراستن -&ناوی پەڕگەکان بپارێزە (encrypt) -ڕێژەی بەکارهێنانی بیرگە بۆ پەستاندان: -ڕێژەی بەکارهێنانی بیرگە بۆ کردنەوەی پەستێنراو: -4050 -پاشەکەوت -خێراترین -خێرا -ئاسایی -زۆرترین -سەروو -4060 -زیادکردن و جێگرتنەوەی پەڕگەکان -نوێکردنەوە و زیادکردنی پەڕگە -بووژاندنەوەی پەڕگە هەبووەکان -ـکردنی پەڕگەکان Synchronize -4070 -هەڵدەوە/ Browse -هەموو پەڕگەکان -نا-ڕەق -ڕەق -6000 -لەبەرگرتنەوە -گواستنەوە -لەبەرگتنەوە بۆ: -گواستنەوە بۆ: -لەبەری دەگرێتەوە... -دەیگوازێتەوە بۆ... -ناوی دەگۆڕێ... -بوخچەی مەبەست دیاری بکە. -ئەو کارە پاڵپشتی نەکراوە -هەڵە هەیە لە ناو گۆڕینی پەڕگە یان بوخچەکان. -دڵنیابە لە لەبەرگرتنەوەی پەڕگە -دڵنیایت لە لەبەرگرتنەوەی پەڕگەکان بۆ ئەرشیڤ؟ -6100 -دڵنیابە لە سڕینەوەی پەڕگە -دڵنیابە لە سڕینەوەی بوخچە -دڵنیابە لە سڕینەوەی هەموو پەڕگەکان -دڵنیایت لە سڕینەوەی '{0}'؟ -دڵنیایت لە سڕینەوەی بوخچەی '{0}' و هەموو ناوەڕۆکەکانی؟ -دڵنیایت لە سڕینەوەی ئەم {0} شتە؟ -دەی سڕێتەوە... -هەڵە هەیە لە سڕینەوەی پەڕگەکان یا بوخچەکان -سیستەم ناتوانێت پەڕگەیەک بگوێزێتەوە بۆ تەنەکەی خۆڵ بە ڕێڕەوی درێژەوە -6300 -دروستکردنی بوخچە -دروستکردنی پەڕگە -ناوی بوخچە: -ناوی پەڕگە: -بەخچەی نوێ -پەڕگەی نوێ -هەڵە هەیە لە دروستکردنی بوخچە -هەڵە هەیە لە دروستکردنی پەڕگەدا -6400 -لێدوان -&لێدوان: -دیاری بکە -دیاری مەکە -دەمامک: -6600 -تایبەتمەندییەکان -مێژووی بوخچەکان -پەیامی لێکۆڵینەوە/ پشکنین -پەیام -7100 -کۆمپیوتەر -ڕایەڵە -بەڵگەنامەکان -سیستەم -7200 -زیادکردن -دەرکێشان -تاقیکردنەوە -لەبەرگرتنەوە -گواستنەوە -سڕینەوە -زانیاری -7300 -لەتکردنی پەڕگە -&لەتی بکە بۆ: -لەتی بکە بۆ &قەبارە و بایت:‌ -لەتی دەکات... -دڵنیابە لە لەتکردن -دڵنیایت لە لەتکردنی پەڕگەی {0} بۆ دوو قەبارە؟ -پێویستە قەبارەی هەر یەک لە لەتەکان بچوکتربێت لە قەبارەی پەڕگە لەتکراوەکە -قەبارەی لەتکراوەکە هەڵەیە -قەبارەی دیاریکراوی لەتکراوەکە: {0} بایت.\nدڵنیایت لە لەتکردنی ئەرشیڤەکە بۆ ئەو قەبارانە؟ -7400 -پێکەوەلکاندنی پەڕگەکان -%پێکەوەی بلکێنە بۆ: -پێکەوەی دەلکێنێت... -تەنها پەڕگەی یەکەم دیاری بکە -ناتوانێت پەڕگە بدۆزێتەوە وەک بەشێک لە پەڕگە لەتکراوەکە -ناتوانێت لە بەشێک زیاتر بدۆزێتەوە لە پەڕگە لەتکراوەکە -7500 -ژماردنی کۆپشکنین... -زانیاری کۆپشکنین -کۆپشکنینی CRC بۆ دراوە: -کۆپشکنینی CRC بۆ دراوە و ناوەکان: -7600 -نیشانەی پێوان -ڕێژەی بەکارهێنراوی بیرگە: -پەستاندن -کردنەوەی پەستێنراو -هەڵسەنگاندن -سەرجەمی هەڵسەنگاندن -ئێستایی -ئەنجام -CPU ڕێژەی بەکارهێنراوی -ڕێژەی بەکارەێنراو / هەڵسەنگاندن -دەرچوونەکان: diff --git a/Utils/7-Zip/Lang/ku.txt b/Utils/7-Zip/Lang/ku.txt deleted file mode 100644 index e5fb38f53..000000000 --- a/Utils/7-Zip/Lang/ku.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.37 : Rizoyê Xerzî -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Kurdish -Kurdî -401 -Temam -Betal - - - -&Erê -&Na -Bi&gire -Alîkarî - -Bi&domîne -440 -&Ji Bo Hemûyî Erê -Ji &Bo Hemûyî Na -Raweste -Dîsa Destpêke -L%i Pişt -Li &Pêş -&Rawestîne -Rawestiya - -Ma bila betal bibe? -500 -&Dosya -&Bipergalîne -&Nîşan Bide -Bi&jare -&Amûr -A&lîkarî -540 -&Veke -&Di Panelê De Veke -Di &Paceyê De Veke -&Nîşan Bide -&Sererast bike -&Navekî Nû Bidê -&Ji Ber Bigire -B&ar Bike -Jê B&ibe -Parçe Bi&ke... -Bike &Yek... -&Taybetî -Da&xuyanî -checksum heseb bike - -Pe&ldankeke Nû -Do&siyeke Nû -De&rkeve -600 -&Hemûyî hilbijêre -He&mû hilijartinê rake -Be&revajî wê hilbijêre -&Hilbijêre... -Hilbijarti&nê Rake... -Vî cureyî hilbijêre -Hilbijartina cure rake -700 -&Dawêrên Mezin -D&awêrên Biçûk -&Lîste -&Hûragahî -730 -Bê Dor -xuyakirina sade -&2 Panelan veke -Da&rikê amûran -Peldanka Kok Veke -Astekê Berjor -Dîroka Peldankê... -&Nû Bike -750 -Darikê arşîvê -Darikê standart -Bişkojkên mezin -Bila nivîsa bişkojkan bixuye -800 -Pe&ldanka derbasdar veke -Cih -900 -&Vebijêrk... -&Pîvana Çalakbûnê -960 -&Naverok... -D&er barê 7-Zip de... -1003 -Rê -Nav -Cure -Peldank -Mezinahî -Mezinahiya di arşîvê de -Taybetiyên xweser -Çêbûyî -Gihaştî -Guhertî -Hişk -Daxuyankirî -Şîfrekirî -Parçeyê borî -Parçeyê piştre -Ferheng -CRC -Cure -Dij -Awayê şidandinê -Platform -Pergala Dosiyê -Bikarhêner -Kom -Stûn -Daxuyanî -Cih -Path Prefix - - - - - - - - - - - - - - - - - - - - - - - - -Çewtî -Hemû Mezinahî -Cihê Vala -Mezinahiya telpikî -Etîket -Navê Herêmî -Derfetkar -2100 -Vebijêrk -Ziman -Ziman: -Per&galker -Pergalkerê De&qê: - -2200 -Pergal -Bi 7-Zip re têkildar bike: -2301 -Bila di pêşekên naverokê de 7-Zip bixuye -Pêşeka naverokê ya sûlavî -Hêmanên peşeka naverokê: -2320 - - -Arşîvê veke -Dosiyan derxe... -Bike Arşîv... -Arşîvê bihêçîne -Valake vir -Peldanka {0} derxe -Wekî {0} bike arşîv -Bişidîne û bişîne... -Wekî {0} bişidîne û bişîne -2400 -Peldank -Peldanka &Xebatê -&Peldanka TEMP a Pergalê -P&eldanka Derbasdar -Pe&ldanka Navborî: -Bi tenê ji bo ajokarên derketî bi kar bîne -Ji bo dosiyên demdemî yên arşîvê cih belî bike. -2500 -Mîheng -Bila hêmana ".." xuya bike -Bila dawêrên dosiyên rastî xuya bikin -Bila pêşeka pergalê xuya bike -Bila &hemû rêzikê bibore -Bila &xêzên tabloyê xuya bike - -&Kipa hilbijartina alternatîf -bîra berfireh bikar bîne -2900 -Der barê 7-Zip de -7-Zip nivîsbariyeke azad e. Lê, tu dikarî wekî tomarkirin desteka pêşxistina 7-zip bibî. -3000 - -Çewtî nîn e. -{0} heb hêman hilbijartî ne -Peldanka '{0}' nayê çêkirin -Tu nikarî vê arşîvê rojane bikî. - - - - -Dosiya '{0}' hatiye guhartin.\nMa bila di arşîvê bête rojanekirin? -Dosiya '{0}' nehate rojanekirin -Pergalkerê deqê nehate destpêkirin. - - - - -Hêman zêde ne -3300 -Tên derxistin -tên şidandin -tê hêçandin -vedibe... -Tê raguhestin -3400 -Derxe -&Cihê Dê Derkevê: -Ji bo dosya derkevinê cihekî belî bike. -3410 -Navê Rê -Navê tevahî yên rê -Bila navên rê tune bin -3420 -Dosiyên heyî -Ji bo li ser binivîse bipirse -Bê pirs li ser binivîse -Derxistin -Navekî nû li yên di arşîvê de bike -Navekî nû li yên heyî bike -3500 -Rewla Lisernivîsandinê -Di dosiya armanckirî de bi vî navî dosiyek heye. Bila li ser bête nivîsîn? -Dosiya heyî: -Dosiya tê derxistin: -{0} bayt -Na&vekî nû lê bike -3700 -Ji bo '{0}' awayê şidandinê nehate nasîn. -'{0}' xerabe ye. (Çewtiya daneyê) -'{0}' xerabe ye. (Çewtiya CRC) - - -3800 -Têketina Şîfreyê -Şîfreyê binivîse: - -Bi&la şîfre bixuye - - - -Şîfre -3900 -Dema borî: -Dema mayî: -Mezinahî: -Lez: - - -Çewt: - -4000 -Bike Arşîv -&Arşîv: -A&wayê rojanekirinê: -Awa&yê arşîvê: -A&sta şidandinê: -Awayê şi&dandinê: -Me&zinahiya ferhengê: -M&ezinahiya bêjeyê: - - -&Parametre: -Vebijêrk -Bila ew bixwe derxe (SFX) - - - -Navên dosiyê bike şîfre -Bikaranîna bîrê (Şidandin): -Bikaranîna bîrê (Vekirin): -4050 -Bêyî şidandin -Leztirîn -Bi Lez -Asayî -Herî Pir -Ultra -4060 -Dosiyan têxê, yên heyî derxe -Dosiyan têxê, yên kevin rojane bike -Bi tenê yên kevin rojane bike -Dosiyan bike wekî hev -4070 -Bibîne -Hemû dosya - - -6000 -Ji Ber Bigire -Bar Bike -Cihê Dê Were Jibergirtin: -Cihê Dê Were Barkirin: -tê jibergirtin... -tê barkirin... -navekî nû tê lêkirin... - -Kirin ne pêkan e. -Çewtiya Navlêkirinê -Erêkirina Jibergirtinê -Ma bila dosî ji bo arşîvê bên jibergirtin -6100 -Erêkirina jêbirina dosiyê -Erêkirina jêbirina peldankê -Erêkirina jêbirina gelek dosiyan -Ma bila dosiya '{0}' bête jêbirin? -Ma bila peldanka '{0}' û yên tê de bên jêbirin? -Ma bila hêmana {0} bête jêbirin? -tê jêbirin... -Çewtiya Jêbirinê - -6300 -Peldankeke nû -Dosiyeke Nû -Navê peldankê: -Navê Dosiyê: -Peldankeke Nû -Dosiyeke Nû -Çewtiya Çêkirina peldankê -Çewtiya çêkirina Dosiyê -6400 -Daxuyanî -&Daxuyanî: -Hilbijêre -Hilbijartinê rake -Derbirîna hilbijartinê: -6600 - -Rabirdûya Peldankê -Peyamên haydariyê -Peyam -7100 -Komputer -Tor - -Pergal -7200 -Bike Arşîv -Derxe -Bihêçîne -Ji Ber Bigire -Bar Bike -Jê Bibe -Agahî -7300 -Bike Parçe -Di &vê peldankê de parçe bike: -Wekî Bayt/&cilt bike parçe: -tê parçekirin... - - - - - -7400 -Bike Yek -Di vê &peldankê de bike yek: -tê yekirin... - - - -7500 -Hesabê sererastkirî... -Agahiyên hesabê sererast -CRC hesabê sererast bo data: -CRC hesabê sererast bo data û nav: -7600 -Çalakiya komputerê -Bikaranîna birê: -Şidandin -Vekirin -Puan -bi guloverî puanan -Carî -Encam - - -Serkeftî: diff --git a/Utils/7-Zip/Lang/ky.txt b/Utils/7-Zip/Lang/ky.txt deleted file mode 100644 index 3fff8815b..000000000 --- a/Utils/7-Zip/Lang/ky.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 9.20 : Kalil uulu Bolot -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Kyrgyz -Кыргызча -401 -OK -Айнуу - - - -&Ооба -&Жок -&Жабуу -Жардам - -&Улантуу -440 -Ооба &баарына -Жок б&аарына эмес -Токто -Кайта иштетүү -&Фоном -&Алдыңкы планга -&Тыныгуу -Тыныгууда -Сиз чын эле операцияны токтоткуңуз келип жатабы? -500 -&Файл -&Оңдоо -&Кейп -&Тандалган -С&ервис -&Жардам -540 -&Ачуу -Ичи&нен ачуу -Сырты&нан ачуу -Көрүү -&Редактирлөө -Атын& өзгөртүү -&Буга көчүрүү... -&Буга ордун которуу... -&Өчүрүү -Фа&лды бөлүштүрүү... -Ф&айлдарды кошуу... -Кас&иети -Комме&нтарий -Контролдук жыйынтык -Diff -&Баштык жаратуу -Фай&л жаратуу -Ч&ыгуу -600 -Баарын б&өлүү -Бөлүнгөндү алуу -&Бөлүүнү к&аратуу -Бөлүү... -Бөлүнгөндү алуу... -Түзү менен бөлүү -Түзү менен бөлүнгөндү алуу -700 -&Чоң белгилер -&Кичине белгилер -Тиз&ме -&Таблица -730 -Иргөөсүз -Түз түзүлүш -&2 Панель -&Аспап панелдери -Түпкү баштыкты ачуу -Бир деңгээлге өйдө өтүү -Баштыктардын тарыхы... -Ж&аңыртуу -750 -Архиватордун баскычтарынын панели -Стандарттык баскыч панели -Чоң баскычтар -Баскычтагы жазуулар -800 -Кантип тандалганга& баштыкты кошуу -Чөп кат -900 -Оңдоп-түздөмөлөр... -Өндүрүмдүүлүктү тестирлөө -960 -&Мазмуну... -Программа &жөнүндө... -1003 -Жол -Ат -Кенейтүү -Баштык -Көлөм -Кысылган -Атрибуттар -Жаралган -Ачылган -Өзгөртүлгөн -Үзгүлтүксүз -Комментарий -Шифрланган -Чейин бөлүнгөн -Кийин Бөлүнгөн -Сөздүк -CRC -Түр -Анти -Амал -Система -Файлдык система -Колдонуучу -Топ -Блок -Комментарий -Ээлеген ахывал -Жол -Баштыктар -Файлдар -Версиясы -Том -Көптомдуу -Жылдыруу -Сүрүштүрүү -Блоктор -Томдор - -64-bit -Big-endian -Процессор -Физикалык көлөм -Баш аттардын көлөмү -Текшерүү жыйынтык -Мүнөздөмөлөр -Виртуалдык дарек -ID -Кыска ат -Жараткан -Сектордун көлөмү -Түзүлүш -Сүрүштүрүү -Ката -Сыйдыргычтык -Бош -Размер кластера -Белги -Локалдык ат -Провайдер -2100 -Оңдоп-түздөмөлөр -Тил -Тил: -Редактор -&Редактор: -&Diff: -2200 -Система -7-Zip менен файлдарды бириктирүү: -2301 -7-Zipти менюнун контексттик кыртышына жайгаштыруу -Каскадттык контексттик меню -Контексттик менюнун элементтери: -2320 -<Баштык> -<Архив> -Архивди ачуу -Таңгагын чечүү -Архивке кошуу... -Тестирлөө -Мында таңгагын чечүү -Буга таңгагын чечүү {0} -Буга кошуу {0} -Кысып жана аны email менен жиберүү... -Буга кысып {0} жана email менен жиберүү -2400 -Баштыктар -&Иштөө баштык -&Убактылуу системалык баштык -&Учурдагы -&Тапшыруу: -Котормолуу алып жүрүүчүлөргө гана колдонуу -Убактылуу архивтерге турган ордун көрсөтүңүз. -2500 -Оңдоп-түздөмөлөр -".." элементин көрсөтүү -Файлдардын реалдуу иконкаларын көрсөтүү -Системалык менюну көрсөтүү -Курсор жалпы сапка -Бөлгүчтөрдү көрсөтүү -Бир басуу менен ачуу -Белгинин алтернативалык режими -Эстин чоң барактарын колдонуу -2900 -7-Zip программа жөнүндө -7-Zip эркин таратылуучу программа.Бирок сиз 7-Zipтин иштетүүсүн колдогуңуз келсе,сиз программаны каттатып койсоңуз болот. -3000 -Эркин эске тутуу жетишсиз -Ката табылган жок -{0} Нерселер бөлүнгөн -'{0}' баштыкты жаратуу ишке ашкан жок -Бул архив үчүн өзгөртүү операциялары колдолбойт. -'{0}' архивтей кылып ачуу ишке ашкан жок -Шифрленген архивди ачуу ишке ашкан жок '{0}'. Купуя-белги туура эмес? -Архивдин колдоо кылынбаган түрлөрү -{0} деген файл бар -'{0}' файлы өзгөртүлгөн.\nСиз аны архивде жаңырткыңыз келип жатабы? -\n'{0}' файлын жаңыртуу ишке ашкан жок -Редакторду иштетүү, ишке ашкан жок -Файл вируска окшош (файлдын аты ырааттуу бош жерди камтыйт). -Баштыктын ичинен операция аткарылбайт, жолдун узактыгынан. -Сиз бир фалды бөлүшүңүз керек -Сиз бир нече файлды бөлүшүңүз керек -Өтө көп элементтерди камтыйт -3300 -Таңгагын чечүү -Компрессиялоо -Тестирлөө -Ачуу... -Сканирлөө... -3400 -Чыгаруу -& Буга таңгагын чечүү: -Чыгарып жаткан файлдар үчүн ордун көрсөтүңүз. -3410 -Жолдор -То&лук жолдор -&Жолсуз -3420 -Кайта жазуу -&Далилдөө менен -Д&алилдөөсүз -Өткө&рүү -Автоматтык түрдө атын өзгөртүү. -Бар файлдардын аттарын автоматтык түрдө өзгөртүү. -3500 -Файлды алмаштырууну далилдөө -Баштык иштеп чыгарылган файлды камтыйт. -Бар файлдарды алмаштыруу -кийинки файл менен? -{0} байт -Автоматтык түрдө атын өзгөртүү. -3700 -'{0}' файлдагы колдобоочу кысуу амалы. -'{0}' берилүүсүндөгү ката.файл бузук. -'{0}' CRCте ката.файл бузук. -'{0}' шифрленген файлда ката. Туура эмес купуя-белги? -'{0}' шифрленген файл үчүн CRCте ката. Туура эмес купуя-белги? -3800 -Купуя-белгини киргизүү -&Купуя-белгини киргизиңиз: -&Купуя-белгини кайталаңыз: -&Купуя-белгини көрсөтүү -Купуя-белгилер бири-бирине туура келбейт -Купуя-белги үчүн латын алфавитиндеги символдорду гана колдонуңуз,сандарды жана атайын (!, #, $, ...) символдорун -Купуя-белги өтө узун -&Купуя-белги -3900 -Өттү: -Калды: -Баары: -Ылдамдык: -Көлөм: -Кысуунун даражасы: -Каталар: -Архивтер: -4000 -Архивке кошуу -&Архив: -&Өзгөртүүнүн режими: -&Архивдин форматы: -&Кысуунун деңгээли: -&Кысуунун амалы: -Сөздүктүн &көлөмү: -Сөздүн к&өлөмү: -Блоктун көлөмү: -Агымдардын саны: -&Параметрлер: -&Оңдоп-түздөмөлөр -SF&X-архивди жаратуу -Файлдарды жаздыруу үчүн ачууну кысуу -Шифрлөө -Шифрлөөнүн амалы: -&Файлдардын атын шифрлөө -Салып бекитүү үчүн эстин көлөмү: -Таңгагын чечүү үчүн эстин көломү: -4050 -Кысуусуз -Ылдамдуу -Бат -Кадимкидей -Ээң жогорку -Ультра -4060 -Кошуп жана алмаштыруу -Жаңыртып жана кошуу -Жаңыртуу -Калптандыруу -4070 -Барактоо -Баардык файлдар -Файлдын көлөмүндөй -Үзгүлтүксүз -6000 -Көчүрүү -Которуштуруу -Буга көчүрүү: -Буга которуштуруу: -Көчүрүү... -Ордун которуу... -Атын өзгөртүү... -Баштыкты көрсөтүңүз. -Операция бул баштык үчүн колдолбойт. -Баштыктын же файлдын атын өзгөртүүдө ката -Файлдарды көчүрүүнү аныктоо -Сиз бул файлдарды архивке көчүрүүнү чын эле каалап жатасызбы -6100 -Файлдын өчүрүүсүн аныктоо -Баштыктын өчүрүүсүн аныктоо -Файлдын тобун өчүрүүсүн аныктоо -Сиз "{0}" өчүрүүнү чын эле каалап жатасызбы? -Сиз "{0}" баштыктын ичиндегилери менен өчүрүүнү чын эле каалап жатасызбы? -({0} даана.) нерселерди өчүрүүнү чын эле каалап жатасызбы? -Өчүрүү... -Баштыкты же файлды өчүрүүдө ката -Система узун жолдуу файлдарды өчүрүүбаштыкка өчүрүү операциясын колдобойт -6300 -Баштык жаратуу -Файл жаратуу -Баштыктын аты: -Файлдын аты: -Жаңы баштык -Жаңы файл -Баштык жаратуудан ката -Файл жаратуудан ката -6400 -Комментарий -&Комментарий: -Бөлүү -Бөлүнгөндү алып салуу -Маска: -6600 -Касиет -Баштыктардын тарыхы -Билдирүү -Билдирүү -7100 -Компьютер -Желе -Иш кагаздар -Система -7200 -Кошуу -Чыгаруу -Тестирлөө -Көчүрүү -Ордун которуу -Өчүрүү -Маалымат -7300 -Файлды бөлүштүрүү -&Буга бөлүштүрүү: -(байт ) көлөмү менен томдорго бөлүштүрүү: -Бөлүштүрүү... -Бөлүштүрүүнү аныктоо -Сиз файлды {0} бөлүккө бөлгүңүз келип жатабы? -Томдун көлөмү баштапкы файлдын көлөмүнөн кичине болушу керек -Томдордун көлөмүн берүүдө ката -Отургузулган томдун көлөмү: {0} байт.\nСиз чын эле архивди ушундай томдорго бөлгүңүз келип жатабы? -7400 -Файлдарды бириктирүү -&Буга бириктирүү: -Биригүү... -Бөлүштүрүлгөн файлдын биринчи бөлүгүн гана бөлүү керек -Бөлүштүрүлгөн файлды таану ишке ашкан жок -Бөлүштүрүлгөн файлдын бир бөлүгүн дагы табуу ишке ашкан жок -7500 -Текшерүүнүн жыйынтыгын эсептөө... -Текшерүүнүн жыйынтыгы -Маалымат үчүн CRC текшерүү жыйынтыгы: -Маалымат жана аттар үчүн CRC текшерүү жыйынтыгы: -7600 -Өндүрүмдүүлүктү тестирлөө -Эстин көлөмү: -Салып бекитүү -Таңгагын чечүү -Рейтинг -Жалпы рейтинг -Учурдагы -Жыйынтыгы -Жүк -Рейтинг / Жүк. -Өтүүлөр: diff --git a/Utils/7-Zip/Lang/lij.txt b/Utils/7-Zip/Lang/lij.txt deleted file mode 100644 index bf31dacee..000000000 --- a/Utils/7-Zip/Lang/lij.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 9.07 : GENOVES.com.ar -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Ligurian -Zeneize -401 -D'acòrdio -Anulla - - - -&Sci -&No -Sæ&ra -Agiutto - -&Continoa -440 -Sci pe &Tutti -No pe T&utti -Ferma -Inandia torna -Into &sfondo -&In primmo cian -&Paoza -In paoza -Ti ê seguo de voei anulâ? -500 -&Archivio -&Modifica -&Vixoalizza -&Preferii -&Strumenti -A&giutto -540 -&Arvi -Arvi into Manezatô d'archivi 7-Zip -Arvi inte Explorer -&Vixoalizza -&Modifica -Ri&nomina -&Còpia inte... -&Spòsta inte... -Scancel&la -&Dividi l'archivio... -&Unisci i archivi... -P&ropietæ -Comen&ta... -Calcola somma de contròllo -Dif -Crea cartella -Crea archivio -Sc&iòrti -600 -Seleçionn-a &tutto -Deseleçionn-a tutto -In&verti seleçion -Seleçionn-a... -Deseleçionn-a... -Seleçionn-a pe tipo -Deseleçionn-a pe tipo -700 -Figue &grende -Figue picinn-e -&Listin -&Dæti -730 -Nisciun ordine -Vista ciatta -&2 barcoîn -Bare di &Strumenti -Arvi cartella prinçipâ -Livello supeiô -Cronologia... -&Agiorna -750 -Bara di strumenti Archivio -Bara di strumenti Normali -Figue grende -Mostra etichette de tèsto -800 -&Azonzi a cartella a-i Preferii comme -Colegamento -900 -&Òpsioin... -&Ponto de riferimento -960 -&Goidda... -&Informaçioin in sce de 7-Zip... -1003 -Percorso -Nomme -Estension -Cartella -Mezua -Mezua Conpressa -Atributi -Creou -Urtimo acesso -Urtima modifica -Sòlido -Comentou -Criptou -Dividi primma -Dividi dòppo -Diçionaio -CRC -Tipo -Anti -Metodo -OS destinaçion -Archivio do scistemma -Utente -Gruppo -Blòcco -Comento -Poxiçion -Prefisso da destinaçion -Cartelle -Archivi -Verscion -Volumme -Multivolumme -Offset -Colegamenti -Blòcchi -Volummi - -64-bit -Big-endian -CPU -Mezua fixica -Mezua de titoli -Somma de contròllo -Carateristiche -Indirisso Virtoale -ID -Nomme curto -Aplicaçion de creaçion -Mezua da seçion -Mòddo -Colegamento -Erô -Capaçitæ totale -Spaçio disponibile -Mezua de particole (cluster) -Etichetta -Nomme locale -Proveditô -2100 -Òpsioin -Lengoa -Lengoa: -Editô -&Editô: -&Dif: -2200 -Scistemma -Asòccia 7-Zip a: -2301 -Integra 7-Zip into menù contestoale -Menù contestoale a cascaa -Elementi do menù contestoale: -2320 - - -Arvi -Estranni i archivi... -Azonzi a l'archivio... -Contròlla l'archivio -Estranni chi. -Estranni inte {0} -Azonzi a {0} -Conprimmi e invia pe email... -Conprimmi in {0} e invia pe email -2400 -Cartelle -Cartella de tra&vaggio -Cartella &Temp de Scistemma -&Corente -&Specificâ: -Deuvia solo pe dischi estraibili -Specifica unna cartella pe-i archivi tenporanni. -2500 -Inpostaçioin -Mostra l'elemento ".." -Mostra e icöne di archivi -Mostra e icöne do scistemma -Seleçionn-a a &riga intrega -Mostra &grixella -Sciacâ unna vòtta sola pe arvî un elemento -&Mòddo de seleçion alternativo -Deuvia grende &pagine de memöia -2900 -Dæti -7-Zip o l'é un programa libero e de badda. -3000 -O scistemma o no peu separâ a quantitæ de memöia necesaia -Nisciun erô -{0} ògetti seleçionæ -Inposcibile creâ a cartella '{0}' -No l'é poscibile efetoâ agiornamenti in sce quest'archivio. -Inposcibile arvî l'archivio '{0}' comme conpilaçion -Inposcibile arvî a conpilaçion criptâ '{0}'. Scoretta a paròlla d'ordine? -Tipo de conpilaçion no consentia -L'archivio {0} za o l'existe -L'archivio '{0}' o l'é stæto modificou.\nTi veu agiornâ l'archivio? -Inposcibile agiornâ l'archivio\n'{0}' -Inposcibile inandiâ l'editô. -L'archivio o pâ d'ese un virus (o seu nomme o gh'à di spaççi longhi). -L'òperaçion a no peu conpletase da unna cartella da percorso longo. -Ti devi seleçionâ un archivio -Ti devi seleçionâ ùn ò ciù archivi -Tròppi elementi -3300 -Estraçion in corso... -Conprescion in corso... -Contròllo in corso... -Avertua in corso... -Controlemmo... -3400 -Estranni -&Estranni inte: -Specifica unna cartella dove estrae i archivi. -3410 -Strutua de cartelle -Percorsci conpleti -Nisciun percorso -3420 -Sorvescritua -Domanda primma de sorvescrive -Sorvescrivi sensa domandâ -No sorvescrive i archivi existenti -Rinomina outomaticamente -Rinomina outomaticamente i archivi existenti -3500 -Conferma a sostitoçion de l'archivio -A cartella destinaçion a contegne za l'archivio fæto. -Ti voriesci sostitoî l'archivio -con questo? -{0} byte -Rinomina &outomaticamente -3700 -Metodo de conprescion no consentio pe '{0}'. -Erô di dæti inte '{0}'. L'archivio o l'é danezou. -CRC no coretto inte '{0}'. L'archivio o l'é danezou. -Erô di dæti inte l'archivio criptou '{0}'. Scoretta a paròlla d'ordine? -CRC falio inte l'archivio criptou '{0}'. Scoretta a paròlla d'ordine? -3800 -Introduxi paròlla d'ordine -Introduxi paròlla d'ordine: -Ripeti a paròlla d'ordine: -&Mostra paròlla d'ordine -E paròlle d'ordine no coincidan -Deuvia solo segni de l'ingleize, numeri e carateri speciali (!, #, $, ...) pe-a paròlla d'ordine -Paròlla d'ordine tròppo longa -Paròlla d'ordine -3900 -Tenpo trascorso: -Tenpo rimanente: -Mezua: -Velocitæ: -Procesou: -Tascia de conprescion: -Eroî: -Conpilaçion: -4000 -Azonzi a l'archivio -&Archivio: -Modalitæ d'a&giornamento: -&Formato de l'archivio: -&Livello de conprescion: -&Metodo de conprescion: -Mezua &Diçionaio: -Mezue da Pa&ròlla: -Mezua do blòcco sòlido: -Numero de thread CPU: -&Parametri: -Òpsioin -Crea archivio outo-estraente -Conprimmi archivi condivixi -Critografia -Mòddo de criptâ: -Cripta o &nomme di archivi -Utilizzo da memöia pe conprescion: -Utilizzo da memöia pe deconprescion: -4050 -Nisciunn-a -Velociscima -Veloce -Normale -Mascima -Ultra -4060 -Azonzi e sostitoisci i archivi -Agiorna e azonzi i archivi -Agiorna i archivi existenti -Sincronizza i archivi -4070 -Sfeuggia -Tutti i archivi -No-sòlido -Sòlido -6000 -Còpia -Spòsta -Còpia inte: -Spòsta verso: -Còpia in corso... -Spostamento in corso... -Rinominaçion in corso... -Çerni cartella de destinaçion. -L'òperaçion a no l'é consentia. -Erô into rinominâ l'archivio ò a cartella -Conferma a còpia d'archivi -Ti ê seguo de voei copiâ di archivi a unna conpilaçion? -6100 -Conferma l'eliminaçion de l'archivio -Conferma l'eliminaçion da cartella -Conferma l'eliminaçion de ciù elementi -Ti ê seguo de voei eliminâ '{0}'? -Ti ê seguo de voei eliminâ a cartella '{0}' e tutto o seu contegnuo? -Ti ê seguo de voei eliminâ questi {0} elementi? -Eliminaçion in corso... -Erô inte l'eliminaçion de l'archivio ò da cartella -O scistemma o no peu caciâ via un archivio da percorso longo -6300 -Crea Cartella -Crea archivio -Nomme da cartella: -Nomme d'archivio: -Neuva cartella -Neuvo archivio -Erô inta creaçion da cartella -Erô inta creaçion de l'archivio -6400 -Comento -&Comento: -Seleçionn-a -Deseleçionn-a -Filtro: -6600 -Propietæ -Cronologia -Mesaggi diagnòstichi -Mesaggio -7100 -Calcolatô -Ræ -Documenti -Scistemma -7200 -Azonzi -Estranni -Contròlla -Còpia -Spòsta -Cancella -Propietæ -7300 -Dividi Archivio -&Dividi inte: -Di&vidi in ciù archivi, mezua in byte: -Dividimmo... -Conferma a divixon -Ti ê seguo de voei separâ l'archivio inte {0} volummi? -A mezua de volumme a deve ese ciù picinn-a de quella de l'òriginale -Scoretta a mezua do volumme -Mezua de volumme specificâ: {0} byte.\nTi ê seguo de voei separâ l'archivio inte quelli volummi? -7400 -Unisci i archivi -&Unisci inte: -Unimmo... -Seleçionn-a solo a primma parte de l'archivio divizo -No se gh'atreuva un archivio comme parte d'un archivio divizo -No se gh'atreuva ciù d'unna parte d'un archivio divizo -7500 -Calcolemmo a somma de contròllo... -Dæti da somma de contròllo -Somma de contròllo CRC pe dæti: -Somma de contròllo CRC pe dæti e nommi: -7600 -Ponto de riferimento -Utilizzo da memöia: -Conprescion in corso -Deconprescion in corso -Valutaçion -Valutaçion totale -Atoale -Derivou -Utilizzo de CPU -Rating / Utilizzo -Pasaggi: diff --git a/Utils/7-Zip/Lang/lt.txt b/Utils/7-Zip/Lang/lt.txt deleted file mode 100644 index 7f8fb71e9..000000000 --- a/Utils/7-Zip/Lang/lt.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; 2.30 : Marius Navickas : http://www.teisininkas.lt/ivairus/7-zip: -; 4.57 : Domas Jokubauskis -; 15.05 : Vaidas777 (terminų šaltinis: www.raštija.lt) -; -; -; -; -; -; -; -; -0 -7-Zip -Lithuanian -Lietuvių -401 -Gerai -Atšaukti - - - -&Taip -&Ne -&Uždaryti -Elektroninis žinynas - -&Tęsti -440 -T&aip Visiems -Ne v&isiems -Sustabdyti -Iš naujo -&Fone -&Pirminis procesas -&Laikinai sustabdyti -Laikinai sustabdyta -Ar jūs esate tikri, kad norite atšaukti? -500 -&Failas -K&eisti -&Rodyti -Mėgi&amiausi -Įran&kiai -&Elektroninis žinynas -540 -&Atverti -Atverti v&iduje -Atverti iš&orėje -&Rodyti -K&eisti -Pervadi&nti -&Kopijuoti į... -&Perkelti į... -Šalin&ti -&Skaidyti failą... -Jungti &failus... -Savy&bės -Kome&ntuoti -Skaičiuoti kontrolinę sumą -Sulyginti -Sukurti aplanką -Sukurti failą -Išei&ti -Nuoroda -&Alternatyvūs srautai -600 -Pažymėti &viską -Nužymėti viską -Atv&irkštinis žymėjimas -Parinkti... -Atžymėti... -Pasirinkti pagal tipą -Atžymėti pagal tipą -700 -Did&elės piktogramos -&Mažos piktogramos -&Sąrašas -&Išsamiai -730 -Nerūšiuotos -Nepaisyti aplankų -&2 skydeliai -&Mygtukų juostos -Atverti šakninį aplanką -Lygiu aukščiau -Aplankų istorija... -&Atnaujinti -Automatiškai atnaujinti -750 -Archyvo mygtukų juosta -Standartinė mygtukų juosta -Dideli mygtukai -Rodyti užrašus ant mygtukų -800 -&Pridėti aplanką prie mėgiamiausiųjų kaip -Mėgiamiausias -900 -&Nuostatos... -&Spartos bandymas -960 -&Turinys... -&Apie 7-Zip... -1003 -Kelias -Pavadinimas -Plėtinys -Aplankas -Dydis -Dydis archyve -Atributai -Sukurta -Naudota -Pakeista -Vientisas -Komentaras -Šifruotas -Perskyra prieš -Perskyra paskui -Žodynas - -Tipas -Anti -Būdas -Kompiuterio OS -Bylų sistema -Naudotojas -Grupė -Blokas -Komentaras -Pozicija -Kelio priešdėlis -Aplankai -Failai -Versija -Tomas -Daugiatomis -Poslinkis -Nuorodos -Blokai -Tomai - -64-bit -Mažėjantys baitai -Procesorius -Fizinis dysis -Antraštės dydis -Kontrolinė suma -Charakteristikos -Virtualus adresas -ID -Trumpas pavadinimas -Kūrėjo programa -Sektoriaus dydis -Moda -Simbolinė nuoroda -Klaida -Visas dydis -Laisva vieta -Blokinio dydis -Žymė -Vietinis pavadinimas -Teikėjas -NT saugumas -Alternatyvus srautas -Pagalbinis -Ištrintas -Medis - - -Klaidos tipas -Klaidos -Klaidos -Perspėjimai -Perspėjimas -Srautai -Alternatyvūs srautai -Alternatyvių srautų dydis -Virtualus dydis -Išpakuoto dydis -Visas fizinis dydis -Tomo numeris -Subtipas -Trumpas komentaras -Kodų lentelė - - - -Pabaigos dydis -Įterpto bloko dydis -Nuoroda -Patvarioji nuoroda -iNode - -Tik skaityti -2100 -Nustatymai -Kalba -Kalba: -Redaktorius -R&edaktorius: -&Sulyginimas: -2200 -Sistema -Susieti 7-Zip su: -Visi vartotojai -2301 -Integruoti 7-Zip į kontekstinį meniu -Pakopinis kontekstinis meniu -Kontekstinio meniu įrašai: -Piktogramos kontekstiniame meniu -2320 - - -Atverti archyvą -Išskleisti failus... -Įtraukti į archyvą... -Patikrinti archyvą -Išskleisti čia -Išskleisti į {0} -Įtraukti į {0} -Suglaudinti ir išsiųsti el. paštu... -Suglaudinti į {0} ir išsiųsti el. paštu -2400 -Aplankai -&Darbinis aplankas -&Sisteminis laikinas aplankas -D&abartinis -Nurodyta&s: -Naudoti tik išimamiems diskams -Nurodyti vietą laikiniems archyviniams failams. -2500 -Nustatos -Rodyti „..“ failų sąraše -Rodyti tikras failų piktogramas -Rodyti sisteminį meniu -&Žymėti visą eilutę -Rodyti tinklelio linija&s -Atverti vienu spustelėjimu -&Kitoks žymėjimo būdas -Naudoti didžiu&lius atmintinės puslapius -2900 -Apie 7-Zip -7-Zip yra nemokama programa. -3000 -Sistema begali skirti reikalingo atminties kiekio -Klaidų nerasta -Pasirinkta {0} objektų: -Negalima sukurti aplanko „{0}“ -Šio archyvo negalima atnaujinti. -Negalima atverti „{0}“ failo kaip archyvo -Negalima atverti šifruoto archyvo „{0}“. Neteisingas slaptažodis? -Nepalaikomas archyvo tipas -Failas pavadinimu {0} yra -Failas „{0}“ buvo pakeistas.\nAr norite jį atnaujinti archyve? -Negalima atnaujinti failo\n„{0}“ -Negalima paleisti redaktoriaus. -Šis failas panašus į virusą (failo pavadinime yra pasikartojančių tarpų) -Šis veiksmas negali būti vykdomas iš aplanko, kuris turi ilgą kelią -Jūs privalote pažymėti vieną failą -Jūs privalote pažymėti bent vieną failą -Per daug elementų -Negalima atverti failo kaip {0} archyvo -Failas yra atvertas kaip {0} archyvas -Archyvas yra atvertas su ofsetu -3300 -Išskleidžiama -Glaudinama -Tikrinama -Atidaroma... -Skenuojama... -Šalinama -3320 -Glaudinama -Atnaujinama -Analizuojama -Dubliuojama -Glaudinama iš naujo -Praleidžiama -Šalinama -Kuriama antraštė -3400 -Išskleisti -Iš&skleisti į: -Nurodyti vietą išskleidžiamiesiems failams. -3410 -Kelio moda: -Pilni keliai -Jokių kelių -Absoliutūs keliai -Santykiniai keliai -3420 -Perrašymo režimas -Paklausti prieš perrašant -Perrašyti neįspėjant -Praleisti esančius failus -Automatiškai pervadinti -Automatiškai pervadinti esančius failus -3430 -Pašalinti šakninio aplanko pasikartojimą -Atstatyti failų saugumo nuostatas -3500 -Failų pakeitimo patvirtinimas -Paskirtame aplanke jau yra apdorojamas failas. -Ar norėtumėte pakeisti esančią failą -šiuo failu? -{0} baitų -A&utomatinis pervadinimas -3700 -Nepalaikomas suglaudinimo metodas failui „{0}“. -Duomenų klaida „{0}“. Failas pažeistas. -CRC klaida „{0}“. Failas pažeistas. -Duomenų klaida šifruotame faile „{0}“. Neteisingas slaptažodis? -CRC neatitikimas šifruotame faile „{0}“. Neteisingas slaptažodis? -3710 -Neteisingas slaptažodis? -3721 -Nepalaikomas suglaudinimo metodas -Duomenų klaida -CRC neatitikimas -Nepasiekiami duomenys -Netikėta duomenų pabaiga -Yra papildomi duomenys po naudingų duomenų -Tai nėra archyvas -Klaida antraštėse -Klaidingas slaptažodis -3763 -Nepasiekiama archyvo pradžia -Nepatvirtinta archyvo pradžia - - - -Nepalaikoma ypatybė -3800 -Slaptažodžio įvedimas -Įveskite slaptažodį: -Pakartokite slaptažodį: -&Rodyti slaptažodį -Slaptažodžiai nesutampa -Slaptažodžiui naudokite tik lotyniškas raides, numerius bei specialiuosius simbolius (!, #, $, ...) -Slaptažodis yra per ilgas -Slaptažodis -3900 -Praėjęs laikas: -Likęs laikas: -Dydis: -Sparta: -Apdorota: -Suglaudinimo laipsnis: -Klaidos: -Archyvai: -4000 -Įtraukti į archyvą -&Archyvas: -Atna&ujinimo režimas: -Archyvo &formatas: -Suglaudinimo &lygis: -Glaudini&mo būdas: -Žo&dyno dydis: -Ž&odžio dydis: -Vientiso bloko dydis: -CPU gijų skaičius: -&Parametrai: -Nuostatos -Sukurti iš&sipakuojantį archyvą -Glaudinti atvertus įrašymui failus -Šifravimas -Šifravimo metodas: -Už&šifruoti failų pavadinimus -Atmintinės naudojimas suglaudinimui: -Atmintinės naudojimas išskleidimui: -Ištrinti failus suglaudinus -4040 -Įsiminti simbolines nuorodas -Įsiminti patvariasias nuorodas -Įsiminti alternatyvius duomenų srautus -Įsiminti failų saugumo nuostatas -4050 -Mažiausias -Greitesnis -Greitas -Normalus -Didžiausias -Smarkiausias -4060 -Įtraukti ir pakeisti failus -Atnaujinti ir įtraukti failus -Atnaujinti esančius failus -Sinchronizuoti failus -4070 -Naršyti -Visus failus -Ne vientisas -Vientisas archyvas -6000 -Kopijuoti -Perkelti -Kopijuoti į: -Perkelti į: -Kopijuojama... -Perkeliama... -Pervadinama... -Pasirinkite paskirties aplanką. -Šiam aplankui veiksmas nepalaikomas. -Klaida pervadinant failą ar aplanką -Failų kopijavimo patvirtinimas -Ar jūs esate įsitikinę, jog norite kopijuoti failus į archyvą? -6100 -Patvirtinkite failo šalinimą -Patvirtinkite aplanko šalinimą -Patvirtinkite kelių failų šalinimą -Ar esate įsitikinę, jog norite pašalinti „{0}“? -Ar esate įsitikinę, jog norite pašalinti „{0}“ aplanką ir visą jo turinį? -Ar esate įsitikinę, jog norite pašalinti šiuos {0} elementus? -Šalinama... -Klaida trinant failą ar aplanką -Sistema negali perkelti failo į šiukšlinę, kadangi per ilgas kelias -6300 -Sukurti aplanką -Sukurti failą -Aplanko pavadinimas: -Failo pavadinimas: -Naujas aplankas -Naujas failas -Klaida kuriant aplanką -Klaida kuriant failą -6400 -Komentaras -&Komentaras: -Pažymėti -Panaikinti žymėjimą -Šablonas: -6600 -Nuostatos -Aplankų istorija -Diagnostiniai pranešimai -Pranešimas -7100 -Kompiuteris -Tinklas -Dokumentai -Sistema -7200 -Glaudinti -Išskleisti -Bandyti -Kopijuoti -Perkelti -Šalinti -Informacija -7300 -Skaidyti failą -&Skaidyti į: -Skaidyti į dalis bai&tais: -Skaidoma... -Skaidymo patvirtinimas -Ar jūs esate įsitikinę, jog norite failą skaidyti į {0} dalis? -Dalies dydis privalo būti mažesnis už dalijamo failo dydį -Neteisingas dalies dydis -Nurodytas dalies dydis: {0} baitai.\nAr jūs esate įsitikinę, jog norite archyvą skaidyti į tokias dalis? -7400 -Sujungti failus -&Sujungti į: -Sujungiami failai... -Pažymėkite tik pirmą suskaidyto archyvo failą -Nepavyko atpažinti suskaldyto failo -Nepavyko surasti daugiau nei vienos suskaldymo failo dalies -7500 -Skaičiuojama kontrolinė suma... -Kontrolinės sumos informacija -Duomenų CRC kontrolinė suma: -Duomenų ir failų pavadinimų CRC kontrolinė suma: -7600 -Spartos bandymas -Atmintinės naudojimas: -Suglaudinama -Išskleidžiama -Įvertis -Galutinis įvertis -Dabartinis -Galutinis -CPU naudojimas -Įvertis/naudojimas -Kartai: -7700 -Nuoroda -Sujungti -Šaltinis: -Tikslas: -7710 -Nuorodos tipas -Patvarioji nuoroda -Failo simbolinė nuoroda -Aplanko simbolinė nuoroda -Sujungimo taškas (Junction) diff --git a/Utils/7-Zip/Lang/lv.txt b/Utils/7-Zip/Lang/lv.txt deleted file mode 100644 index 85e4a1555..000000000 --- a/Utils/7-Zip/Lang/lv.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.10 : Armands Radzuška -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Latvian -Latviešu -401 -&Labi -&Atcelt - - - -&Jā -&Nē -Aiz&vērt -&Rokasgrāmata - -&Turpināt -440 -Jā &visiem -Nē v&isiem -Stop -Pārstartēt -&Fonā -&Priekšplānā -Pa&uze -Pauzēts -Vai piekrītat pārtraukt šo darbību? -500 -&Fails -&Labošana -&Izskats -Ie&cienītās -&Rīki -&Palīdzība -540 -&Atvērt -Atvērt &iekšpusē -Atvērt ārp&usē -Ap&skate -&Labot -Pā&rdēvēt -&Kopēt uz... -Pār&vietot uz... -&Dzēst -&Sadalīt failu... -Ap&vienot failus... -Īpašī&bas -&Piezīmes - - -Izveidot &mapi -Izveidot &failu -&Beigt -600 -Iezīmēt &visu -Atcelt vis&u -I&nvertēt iezīmējumu -Ie&zīmēt... -&Atcelt... -I&ezīmēt pēc tipa -A&tcelt pēc tipa -700 -&Lielas ikonas -&Mazas ikonas -&Saraksts -Sī&kāk -730 -&Nešķirot - -&2 paneļi -&Rīku joslas -&Atvērt saknes mapi -Līmeni &uz augšu -Mapju &vēsture... -&Pārlasīt -750 -Arhīva rīku josla -Standarta rīku josla -Lielas pogas -Parādīt pogu tekstu -800 -&Pievienot mapi iecienītajām kā -Iecienītās -900 -&Uzstādījumi... -&Darbspējas pārbaude -960 -&Rokasgrāmatas saturs... -&Par 7-Zip... -1003 -Ceļš -Nosaukums -Paplašinājums -Mape -Lielums -Saspiests -Atribūti -Izveidots -Atvērts -Pārveidots -Blīvs -Piezīmes -Šifrēts -Dalīts pirms -Dalīts pēc -Vārdnīca -CRC -Veids -Anti -Paņēmiens -Sistēma -Failu sistēma -Lietotājs -Grupa -Bloks -Piezīmes -Pozīcija - - - - - - - - - - - - - - - - - - - - - - - - - -Kļūda -Tilpums -Brīvā vieta -Klāstera lielums -Nosaukums -Lokālais nosaukums -Provaiders -2100 -Uzstādījumi -Valoda -Valoda: -Labošana -&Labošanas programma: - -2200 -Sistēma -Piesaistīt 7-Zip pie: -2301 -&Integrēt 7-Zip Windows vides kontekstizvēlē -&Kaskādveida kontekstizvēle -Kontekstizvēles elementi: -2320 - - -Atvērt arhīvu -Izvilkt failus... -Ielikt arhīvā... -Pārbaudīt arhīvu -Izvilkt šeit -Izvilkt {0} mapē -Ielikt {0} -Saspiest, sūtīt pa e-pastu... -Saspiest {0}, sūtīt pa e-pastu -2400 -Mapes -&Darba mape -&Sistēmas pagaidfailu mape -&Tekošā -&Noteikt: -&Izmantot tikai maināmajiem nesējiem -Norādiet vietu arhīvu pagaidfailiem. -2500 -Uzstādījumi -Parādīt ".." &vienību -Parādīt īstās &failu ikonas -Parādīt &sistēmas izvēli -&Pilnas rindas iezīmēšana -Parādīt at&dalošās līnijas - - - -2900 -Par 7-Zip -7-Zip ir bezmaksas programma, tomēr, reģistrējoties jūs varat 7-Zip izstrādāšanu atbalstīt. -3000 - -Kļūdu nav. -Iezīmēts(i) {0} objekts(i) -Mapi '{0}' neizdevās izveidot. -Šis arhīvs neatbalsta pārveidošanu. - - - - -Fails '{0}' ir pārveidots.\nVai vēlaties to atjaunināt arī arhīvā? -Failu nav iespējams uzlabot\n'{0}' -Nav iespējams palaist labošanas programmu. - - - - -Par daudz vienību. -3300 -Izvilkšana -saspiešana -Pārbaude -Atvēršana... - -3400 -Izvilkšana -&Izvilkt uz: -Norādiet vietu izvelkamiem failiem. -3410 -Ceļi -Pilni &ceļu nosaukumi -&Bez ceļu nosaukumiem -3420 -Pārrakstīšana -&Jautāt pirms pārrakstīšanas -Pārra&kstīt bez jautāšanas -I&zlaist esošos failus -A&utopārdēvēšana -Automātiski pārdēvēt esošos failu -3500 -Apstipriniet faila aizvietošanu -Mērķa mape jau satur apstrādājamo failu. -Vai vēlaties aizvietot esošo failu -ar šo? -{0} baiti -Autopārdēvēšana -3700 -Neatbalstīts saspiešanas paņēmiens '{0}' failam. -Datu kļūda '{0}'. Fails ir bojāts. -CRC kļūda '{0}'. Fails ir bojāts. - - -3800 -Paroles ievadīšana -Ievadiet paroli: - -Par&ole redzama - - - -&Parole -3900 -Pagājušais laiks: -Atlikušais laiks: -Lielums: -Ātrums: - - -Kļūdas: - -4000 -Pievienošana arhīvam -Ar&hīvs: -Pār&veidošanas režīms: -Arhīva &formāts: -&Saspiešanas līmenis: -&Saspiešanas paņēmiens: -&Vārdnīcas lielums: -Vār&da lielums: - - -Parame&tri: -&Uzstādījumi -Izveidot SF&X arhīvu - - - -Šifrēt failu &nosaukumus -Atmiņa arhivēšanai: -Atmiņa atarhivēšanai: -4050 -Uzkrāšana nesaspiežot -Ātrākais -Ātrais -Parastais -Maksimālā saspiešana -Ultra -4060 -Pievienot un aizvietot failus -Atjaunināt un pievienot failus -Atjaunināt esošos failus -Sinhronizēt failus -4070 -Pārlūkošana -Visi faili - - -6000 -Kopēt -Pārvietot -Kopēt uz: -Pārvietot uz: -Kopēšana... -Pārvietošana... -Pārdēvēšana... - -Darbība nav atbalstīta. -Faila vai mapes pārdēvēšanas kļūda - - -6100 -Faila dzēšanas apstiprinājums -Mapes dzēšanas apstiprinājums -Vairāku failu dzēšanas apstiprinājums -Vai piekrītat '{0}' dzēšanai? -Vai piekrītat mapes '{0}' un visa tās satura dzēšanai? -Vai piekrītat šo {0} vienību dzēšanai? -Dzēšana... -Faila vai mapes dzēšanas kļūda - -6300 -Mapes izveidošana -Faila izveidošana -Mapes nosaukums: -Faila nosaukums: -Jauna mape -Jauns fails -Mapes izveidošanas kļūda -Faila izveidošanas kļūda -6400 -Piezīmes -&Piezīmes: -Iezīmēšana -Iezīmējuma atcelšana -Šablons: -6600 - -Mapju vēsture -Diagnostikas paziņojumi -Paziņojums -7100 -Dators -Tīkls - -Sistēma -7200 -Ievietot -Izvilkt -Pārbaude -Kopēt -Pārvietot -Dzēst -Info -7300 -Sadalīt failu -&Dalīt uz: -&Dalīt sējumos, baitos: -Dalīšana... - - - - - -7400 -Apvienot failus -&Apvienot uz: -Apvienošana... - - - -7500 - - - - -7600 -Darpspējības pārbaude -Atmiņas pielietojums: -Arhivēšana -Atarhivēšana -Vērtējums -Kopējais vērtējums -Patreizējais -Rezultējošais - - -Izdošanās: diff --git a/Utils/7-Zip/Lang/mk.txt b/Utils/7-Zip/Lang/mk.txt deleted file mode 100644 index f2d7a0b92..000000000 --- a/Utils/7-Zip/Lang/mk.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.09 : Gabriel Stojanoski -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Macedonian -Македонски -401 -Ок -Откажи - - - -&Да -&Не -&Затвори -Помош - -П&родолжи -440 -Да &Сите -Не Н&иедна -Стоп -Рестартирај -По&задина -&Напред -&Пауза -Паузирано -Дали сигурно сакате да откажете? -500 -&Датотека -&Уреди -&Изглед -&Омилени -&Алатки -&Помош -540 -&Отвори -Отвори &Внатре -Отвори &Надвор -&Поглед -&Уреди -&Преименувај -&Копирај Во... -&Премести Во... -&Избриши -&Подели датотека... -Ком&бинирај датотеки... -&Карактеристики -К&оментар - - -Креирај Директориум -Креирај Датотека -&Излези -600 -Селектирај &Се -Деселектирај Се -&Обратна Селекција -Селектирај... -Деселектирај... -Селектирај по Тип -Деселектирај по Тип -700 -&Големи Икони -&Мали Икони -&Листа -&Детали -730 -Неподредени - -&2 Панели -&Алатници -Отвори го основниот директориум -Едно Ниво Нагоре -Историја на Директориумите... -&Обнови -750 -Алатница на Архивата -Стандардна Алатница -Големи Копчиња -Текст На Копчињата -800 -&Додади го директориумот во Омилени -Забелешки -900 -&Опции... -&Тест -960 -&Содржина... -&За 7-Zip... -1003 -Патека -Име -Екстензија -Директориум -Големина -Пакувана Големина -Атрибути -Креирано -Пристапено -Променето -Целосна -Објаснета -Енкриптирана -Подели Пред -Подели После -Речник -CRC -Тип -Анти -Метод -Оперативен Систем -Датотечен Систем -Корисник -Група -Блок -Коментар -Позиција - - - - - - - - - - - - - - - - - - - - - - - - - -Грешка -Вкупна Големина -Слободен Простор -Голем на Кластерите -Етикета -Име -Провајдер -2100 -Опции -Јазик -Јазик: -Едитор -&Едитор: - -2200 -Систем -Придружи го 7-Zip со: -2301 -Интегрирај го 7-Zip во додатно мени -Каскадно додатно мени -Во додатното мени: -2320 -<Директориум> -<Архива> -Отвори архива -Отпакувај датотеки... -Додади во Архива... -Тестирај архива -Отпакувај овде -Отпакувај во {0} -Додади во {0} -Компресирај и прати на e-mail... -Компресирај во {0} и испрати -2400 -Директориуми -&Работен директориум -&Системски привремен директориум -&Моментален -&Одреди: -Само за преносни уреди -Одреди локација за привремените архивски датотеки. -2500 -Подесувања -Прикажи ".." предмет -Прикажи вистински икони -Прикажи системско мени -&Селектирај &цел ред -Прикажи &мрежа - - - -2900 -За 7-Zip -7-Zip е бесплатен архивер. Меѓутоа, вие можете да дадете поддршка на понатамошното развивање на 7-Zip со вашето регистрирање. -3000 - -Нема грешки -{0} објект(и) избрано -Не е можно креирање на директориумот '{0}' -Оваа операција не е поддржана за овој тип на архива. - - - - -Датотеката '{0}' е модифицирана.\nДали сакате да ја обновите во архивата? -Не е можно обновување на датотеката\n'{0}' -Грешка при стартување на Едиторот. - - - - -Премногу објекти -3300 -Отпакување -Компресирање -Тестирање -Отворање... - -3400 -Отпакувај -Отпакувај &во: -Одреди локација за отпакуваните датотеки. -3410 -Патеки -Целосна патека -Без патека -3420 -Презапишување -Прашај пред да презапишеш -Презапиши без прашување -Изостави постоечки датотеки -Автоматски преименувај -Автоматски преименувај постоечки датотеки -3500 -Потврди Замена на Датотеки -Конечниот директориум веќе ја содржи датотеката. -Дали сакате да ја замените постоечката датотека -со оваа? -{0} бајти -&Автоматски преименувај -3700 -Неподдржан метод за компресија за '{0}'. -Грешка во податоците во '{0}'. Датотеката е оштетена. -CRC грешка во '{0}'. Датотеката е оштетена. - - -3800 -Внеси лозинка -Внеси лозинка: - -&Прикажи ја лозинката - - - -Лозинка -3900 -Поминато време: -Преостанато време: -Големина: -Брзина: - - -Грешки: - -4000 -Додади во архива -&Архива: -&Додавање: -&Формат на Архива: -&Ниво на компресија: -&Метод на компресија: -Големина на &речникот: -Големина на &зборот: - - -&Параметри: -Опции -Креирај SFX ар&хива - - - -&Енкриптирај ги имињата -Искорист мемор за компрес: -Искорист мемор за декомпрес: -4050 -Спакувај -Најбрзо -Брзо -Нормално -Максимално -Ултра -4060 -Додади и замени датотеки -Обнови и додади датотеки -Обнови ги постоечките датотеки -Синхронизирај ги датотеките -4070 -Барај -Сите Датотеки - - -6000 -Копирај -Премести -Копирај Во: -Премести Во: -Копирање... -Преместување... -Преименување... - -Постапката не е поддржана. -Грешка при преименувањето на Датотеката или Директориумот - - -6100 -Потврдете го Бришењето на Датотеката -Потврдете го Бришењето на Директориумот -Потврдете го бришењето на повеќе датотеки -Дали сте сигурни за бришењето на '{0}'? -Дали сте сигурни за бришењето на директориумот '{0}' и неговата содржина? -Дали сте сигурни за бришењето на овие {0} датотеки? -Бришење... -Грешка при бришењето на Датотеката или Директориумот - -6300 -Креирај Директориум -Креирај датотека -Име на Директориумот: -Име на Датотеката: -Нов Директориум -Нова датотека -Грешка при креирањето на Директориумот -Грешка при креирањето на датотеката -6400 -Коментар -&Коментар: -Селектирај -Деселектитај -Маскирај: -6600 - -Историја на Директориумите -Дијагноза -Порака -7100 -Компјутер -Мрежа - -Систем -7200 -Додади -Отпакувај -Тестирај -Копирај -Премести -Избриши -Инфо -7300 -Подели датотека -&Подели на: -&Подели на делови, бајти: -Делење... - - - - - -7400 -Состави Датотеки -&Состави на: -Составување... - - - -7500 - - - - -7600 -Тест -Искорист Меморија: -Компресирање -Декомпресирање -Проценка -Вкупна Проценка -Моментално -Резултат - - -Поминато: diff --git a/Utils/7-Zip/Lang/mn.txt b/Utils/7-Zip/Lang/mn.txt deleted file mode 100644 index 9ab889ebf..000000000 --- a/Utils/7-Zip/Lang/mn.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 3.12 : Bayar -; : Bayarsaikhan -; -; -; -; -; -; -; -; -; -0 -7-Zip -Mongolian -Монгол хэл -401 -За -Болих - - - -&Тийм -&Үгүй -&Хаах -Тусламж - -&Үргэлжлүүл -440 -Бүг&д тийм -Бүгд ү&гүй -Зогс -Дахин ачаалла -&Ар талд -&Өмнө тал -&Түр зогс -Түр зогслоо -Та үнэхээр болих гэж байна уу? -500 -&Файл -&Засах -&Үзүүлэх -Д&уртай зүйл -&Хэрэгслүүд -&Тусламж -540 -&Нээх -Дотор &нээх -Гадна &нээх -&Харах -&Засварлах -Нэр с&олих -...рүү &Хуулах... -...руу &Зөөх... -&Устгах -&Файл хуваах... -Файлуудыг нэгтгэх... -&Мэдээлэл үзэх -Тай&лбар - - -Хавтас үүсгэх -Файл үүсгэх -Га&рах -600 -Бүгдийг со&нгох -Сонгохоо болих -&Сонголтоо эргүүл -Сонгох... -Сонгохгүй... -Төрлөөр нь сонгох -Төрлөөр нь сонгохгүй -700 -Том& дүрсүүд -Жи&жиг дүрсүүд -&Жагсаалт -&Дэлгэрэнгүй -730 -Ангилаагүй - -&2 самбарууд -&Багажны самбар -Гол хавтсыг нээх -Нэг төвшин дээш -Хавтасны түүх... -&Сэргээ -750 -Aрхив багажны самбар -Стандарт багажны самбар -Том товчлуурууд -Товчлуурын текстийг үзүүл -800 -&Хавтсыг дуртайдаа нэмэх үү -Хавчуурга -900 -&Сонголтууд... -&Бэнчмарк -960 -&Агуулгууд... -&7-Зип-ийн тухай... -1003 -Зам -Нэр -Өргөтгөл -Хавтас -Хэмжээ -Багцалсан хэмжээ -Чанар -Үүсгэсэн -Хандсан -Өөрчилсөн -Баталгаатай -Тайлбар хийгдсэн -Нууцлагдсан -Өмнө хуваасан -Дараа хуваасан -Толь бичиг -CRC -Төрөл -Эсрэг -Арга -Хост ҮС -Файл систем -Хэрэглэгч -Бүлэг -Түгжих -Тайлбар -Байрлал - - - - - - - - - - - - - - - - - - - - - - - - - -Алдаа -Нийт хэмжээ -Хоосон зай -Кластерын зай -Нэр -Локаль Нэр -Хангагч -2100 -Сонголтууд -Хэл -Хэл: -Засварлагч -&Засварлагч: - -2200 -Систем -7-Зипийг дараахтай нэгтгэх: -2301 -7-Зип-ийг шелл контекст цэстэй нийлүүлэх -Контекст цэсийг цувуулан харуул -Контекст цэсийн төрлүүд: -2320 -<Хавтас> - -Архив нээх -Файлуудыг задал... -Архивт нэм... -Архивийн шалгалт -Энд задал -{0} руу задал -{0} рүү нэм -Шахах ба Шуудандах... -{0} рүү шахах ба Шууданд -2400 -Хавтсууд -&Ажлын хавтас -&Систем\завсрын хавтас -&Одоогийн -&Тодорхойлсон: -Зөвхөн зөөврийн төхөөрөмж хэрэглэх -Завсрын архив файл үүсгэх байрлалыг тодорхойл. -2500 -Тохируулгууд -Зүйл ".." үзүүлэх -Жинхэнэ файл дүрсийг харуулах -Системийн цэс харуул -&Бүтэн мөр сонгох -&Мөрийн дундах зураас харуулах - -&Сайжруулсан Сонгох горим -&Том санах ойн хуудас хэрэглэх -2900 -7-Zip-ийн тухай -7-Zip бол үнэгүй програм. Гэлээ ч та 7-Зип-д бүртгүүлэн хөгжүүлэгчдийг дэмжиж болно. Бүртгүүлсэн хэрэглэгчид техникийн дэмжлэг авах болно. -3000 - -Алдаа алга байна -{0} зүйл(үүд) сонгогдсон байна -Хавтас үүсгэж чадахгүй '{0}' -Дэмжигдээгүй архивийг задлах шинэчлэлт хийх. - - - - -Файл '{0}' өөрчлөгдлөө.\nТа архивт шинэчлэлт хиймээр байна уу? -Файлыг шинэчилж чадсангүй\n'{0} -Засварлагчийг нээж чадсангүй. - - - - -Дэндүү их юм байна -3300 -Задалж байна... -Шахаж байна -Шалгаж байна -Нээж байна... - -3400 -Задал -З&адлах газар: -Задалсан файлуудын байрлалыг тодорхойл. -3410 -Замын горим -Бүтэн замын нэр -Параметр алга -3420 -Давхарлаж бичих горим -Давхарлаж бичхээсээ өмнө асуух -Асуултгүй давхарлаж бичих -Байгаа файлыг алгасах -Автоматаар нэр солих -Байвал нэрийг нь солих -3500 -Файл дахин байрлуулахыг батлах -Хавтас файлыг агуулсан байна. -Байгаа файлуудыг дахин байрлуулах уу -Энүүнтэй юу? -{0} битүүд -A&втомат нэр солих -3700 -Дараах файлд шахалтын арга дэмжигдээгүй байна '{0}'. -'{0}'өгөгдлийн алдаа. Файл эвдэрсэн байна. -'{0}'CRC бүтсэнгүй. Файл эвдэрсэн байна. - - -3800 -Нууц үгээ оруулах -Нууц үгээ оруулах: - -&Нууц үг харуулах - - - -Нууц үг -3900 -Өнгөрсөн хугацаа: -Үлдсэн хугацаа: -Хэмжээ: -Хурд: - - -Алдаанууд: - -4000 -Архивт нэм -&Aрхив: -&Шинэчлэх горим: -Архив &өргөтгөл: -Шахалтын &төвшин: -Шахах &арга: -&Толь бичгийн хэмжээ: -&Үгийн хэмжээ: - - -&Параметерүүд: -Сонголтууд -SF&X архив үүсгэх - - - -&Файлын нэрүүдийг нууцал -Шахаж байгаа санах ойн хэрэглээ: -Задалж байгаа санах ойн хэрэглээ: -4050 -Хадгалах -Дээд хурданаар -Хурдан -Энгийн -Дээд хэмжээгээр -Ултра -4060 -Нэмэх ба дахин байрлуулах -Шинэчлэх ба дахин байрлуулах -Байгаа файлуудыг дахин унших -Файлуудыг тааруулах -4070 -Нэгжих -Бүх файлууд - - -6000 -Хуулах -Зөөх -хуулахдаа: -Зөөхдөө: -Хуулж байна... -Зөөж байна... -Нэр солиж байна... - -Үйлдэл дэмжигдээгүй байна. -Файл болон хавтсын нэрийг солиход алдаатай -Файл хуулахыг магадлах -Та үнэхээр файлуудыг архив руу хуулахыг хүсэж байна уу -6100 -Файл устгахыг батал -Хавтас устгахыг батал -Олон файл устгахыг батал -Та'{0}'-ийг устгах гэж байна уу? -'{0}' хавтас болон бүх агуулгыг устгах гэж байна уу? -{0} зүйлүүдийг устгах гэж байна уу? -Устгаж байна... -Файл болон хавтсыг устгахад алдаатай - -6300 -Хавтас үүсгэх -Файл үүсгэх -Хавтас нэр: -Файл нэр: -Шинэ хавтас -Шинэ файл -Хавтас үүсгэхэд алдаа гарав -Файл үүсгэхэд алдаа гарав -6400 -Тайлбар -&Тайлбар: -Сонгох -Сонгохгүй -Maск: -6600 - -Хавтсын түүх -Шинжилгээний зурвас -Зурвас -7100 -Компьютер -Сүлжээ - -Систем -7200 -Нэм -Задал -Шалгах -Хуулах -Зөөх -Устгах -Шинж... -7300 -Хуваах файл: -&Файл хуваах газар: -Эзлэхүүн рүү хуваах, битүүд: -Хувааж байна... - - - - - -7400 -Нэгтгэх файлууд: -&Нэгтгэх газар: -Нэгтгэж байна... - - - -7500 - - - - -7600 -Бэнчмарк -Санах ойн хэрэглээ: -Шахаж байна -Задалж байна -Үнэлж байна -Нийт үнэлгээ -Одоогийн -Хариуг гаргаж байна - - -Өнгөрсөн: diff --git a/Utils/7-Zip/Lang/mng.txt b/Utils/7-Zip/Lang/mng.txt deleted file mode 100644 index f0c0859df..000000000 --- a/Utils/7-Zip/Lang/mng.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 7-Zip 9.20 -; Saqirilatu Mongolqileb -; QQ:136087084 Email:saqirilatu@126.com -; Mongol soft QQ bulug Ⅰ: 39338772 Ⅱ:38803882 -; Toli Mongolian IME -; http://hi.baidu.com/saqirilatuu/item/9438213716f316ebe7bb7a8d -;last updated: 2014-1-1 -; -; -; -; -0 -7-Zip -Mongolian (Unicode) -ᠮᠤᠩᠭᠤᠯ ᠬᠡᠯᠡ -401 -ᠲᠡᠭᠡ -ᠤᠰᠠᠳᠬᠠᠬᠤ - - - -ᠲᠡᠭᠡ (&Y) -ᠪᠣᠯᠢ (&N) -ᠬᠠᠭᠠᠬᠤ (&C) -ᠬᠠᠪᠰᠤᠷᠤᠮᠵᠢ - -ᠵᠠᠯᠭᠠᠭᠠᠳ (&C) -440 -ᠪᠦᠭᠦᠳᠡ ᠲᠡᠭᠡ (&A) -ᠪᠦᠭᠦᠳᠡ ᠪᠣᠯᠢ (&L) -ᠵᠣᠭᠰᠣᠭᠠᠬᠤ -ᠳᠠᠬᠢᠨ ᠡᠬᠢᠯᠡᠬᠦ -ᠠᠷᠤ ᠲᠠᠯ᠎ᠠ (&B) -ᠡᠮᠦᠨ᠎ᠡ ᠲᠠᠯ᠎ᠠ (&F) -ᠵᠣᠭᠰᠣᠭᠠᠬᠤ (&P) -ᠨᠢᠭᠡᠨᠲᠡ ᠵᠣᠭᠰᠣᠪᠠ -ᠲᠠ ᠦᠨᠡᠬᠡᠷ ᠤᠰᠠᠳᠬᠠᠬᠤ ᠦᠦ ︖ -500 -ᠹᠠᠶᠢᠯ (&F) -ᠨᠠᠶᠢᠷᠠᠭᠤᠯᠬᠤ (&E) -ᠦᠵᠡᠬᠦ (&V) -ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ (&A) -ᠪᠠᠭᠠᠵᠢ (&T) -ᠬᠠᠪᠰᠤᠷᠤᠮᠵᠢ (&H) -540 -ᠨᠡᠭᠡᠭᠡᠬᠦ (&O) -ᠣᠳᠣᠬᠢ ᠴᠣᠩᠬᠣ  ᠶᠢ ᠨᠡᠭᠡᠭᠡᠬᠦ (&I) -ᠰᠢᠨ᠎ᠡ ᠴᠣᠩᠬᠣ ᠪᠠᠶᠢᠭᠤᠯᠤᠭᠠᠳ ᠨᠡᠭᠡᠭᠡᠬᠦ (&U) -ᠵᠢᠷᠤᠭ ᠦᠵᠡᠬᠦ (&V) -ᠨᠠᠶᠢᠷᠠᠭᠤᠯᠬᠤ (&E) -ᠲᠠᠬᠢᠨ ᠨᠡᠷᠡᠯᠡᠬᠦ (&M) -ᠬᠣᠣᠰᠯᠠᠬᠤ (&C) -ᠰᠢᠯᠵᠢᠭᠦᠯᠬᠦ (&M) -ᠤᠰᠠᠳᠬᠠᠬᠤ (&D) -ᠹᠠᠶᠢᠯ ᠬᠤᠪᠢᠶᠠᠬᠤ (&S)... -ᠹᠠᠶᠢᠯ  ᠢ ᠨᠡᠶᠢᠯᠡᠭᠦᠯᠬᠦ (&B)... -ᠰᠢᠨᠵᠢ ᠴᠢᠨᠠᠷ (&R) -ᠲᠠᠶᠢᠯᠪᠤᠷᠢ (&N) -ᠹᠠᠶᠢᠯ ᠰᠢᠯᠭᠠᠬᠤ -ᠹᠠᠶᠢᠯ ᠠᠳᠠᠯᠢᠳᠬᠠᠬᠤ -ᠰᠢᠨ᠎ᠡ ᠬᠠᠪᠲᠠᠰᠤ ᠪᠠᠶᠢᠭᠤᠯᠬᠤ -ᠹᠠᠶᠢᠯ ᠪᠠᠶᠢᠭᠤᠯᠬᠤ -ᠭᠠᠷᠬᠤ (&X) -600 -ᠪᠦᠬᠦᠨ  ᠢ ᠰᠣᠩᠭᠣᠬᠤ (&A) -ᠪᠦᠬᠦᠨ  ᠢ ᠤᠰᠠᠳᠬᠠᠬᠤ -ᠡᠰᠡᠷᠭᠦ ᠰᠣᠩᠭᠣᠬᠤ (&I) -ᠰᠣᠩᠭᠣᠬᠤ ... -ᠤᠰᠠᠳᠬᠠᠬᠤ ᠪᠠᠨ ᠰᠣᠩᠭᠣᠬᠤ ... -ᠠᠳᠠᠯᠢ ᠬᠡᠯᠪᠡᠷᠢ  ᠶᠢᠨ ᠹᠠᠶᠢᠯ  ᠢ ᠰᠣᠩᠭᠣᠬᠤ -ᠠᠳᠠᠯᠢ ᠬᠡᠯᠪᠡᠷᠢ  ᠶᠢᠨ ᠹᠠᠶᠢᠯ  ᠢ ᠤᠰᠠᠳᠬᠠᠬᠤ -700 -ᠶᠡᠬᠡ ᠵᠢᠷᠤᠭ (&G) -ᠪᠠᠭ᠎ᠠ ᠵᠢᠷᠤᠭ (&M) -ᠵᠢᠭᠰᠠᠭᠠᠬᠤ (&L) -ᠨᠠᠷᠢᠨ ᠠᠭᠤᠯᠭ᠎ᠠ (&D) -730 -ᠮᠥᠷᠯᠡᠬᠦ ᠦᠭᠡᠢ -ᠲᠡᠭᠰᠢ ᠬᠡᠪ -ᠬᠣᠣᠰ ᠨᠢᠭᠤᠷ (&2) -ᠪᠠᠭᠠᠵᠢ  ᠶᠢᠨ ᠰᠠᠮᠪᠠᠷ᠎ᠠ (&T) -ᠦᠨᠳᠦᠰᠦ ᠬᠠᠪᠲᠠᠰᠤ ᠨᠡᠭᠡᠭᠡᠬᠦ -ᠳᠡᠭᠡᠭᠰᠢ -ᠬᠠᠪᠲᠠᠰᠤᠨ ‍ᠣ ᠲᠡᠦᠬᠡ ... -ᠰᠢᠨᠡᠳᠬᠡᠬᠦ (&R) -750 -ᠳᠠᠩᠰᠠᠨ ‍ᠣ ᠪᠠᠭᠠᠵᠢ  ᠶᠢᠨ ᠰᠠᠮᠪᠠᠷ᠎ᠠ -ᠪᠠᠷᠢᠮᠵᠢᠶ᠎ᠠ ᠪᠠᠭᠠᠵᠢ  ᠶᠢᠨ ᠰᠠᠮᠪᠠᠷ᠎ᠠ -ᠶᠡᠬᠡ ᠳᠠᠷᠤᠪᠴᠢ -ᠳᠠᠷᠤᠪᠴᠢ  ᠶᠢᠨ ᠦᠰᠦᠭ ᠢᠯᠡᠷᠡᠬᠦ -800 -ᠬᠠᠳᠠᠭᠠᠯᠠᠮᠵᠢ ᠲᠠᠭᠠᠨ ᠨᠡᠮᠡᠬᠦ (&A) -ᠱᠣᠰᠢᠭ᠎ᠠ -900 -ᠰᠣᠩᠭᠣᠯᠲᠠ (&O) -ᠥᠭᠭᠦᠭᠳᠡᠯ ᠰᠢᠯᠭᠠᠯᠲᠠ (&B) -960 -ᠬᠠᠪᠰᠤᠷᠤᠮᠵᠢ ᠦᠵᠡᠬᠦ (&C) -7-Zip ‍ᠣ ᠲᠤᠬᠠᠢ (&A) -1003 -ᠵᠠᠮ -ᠨᠡᠷᠡᠶᠢᠳᠦᠯ -ᠥᠷᠭᠡᠳᠭᠡᠭᠰᠡᠨ ᠨᠡᠷ᠎ᠡ -ᠬᠠᠪᠲᠠᠰᠤ -ᠶᠡᠬᠡ ᠪᠠᠭ᠎ᠠ -ᠠᠪᠴᠢᠶᠠᠭᠰᠠᠨ ‍ᠣ ᠳᠠᠷᠠᠭᠠᠬᠢ ᠶᠡᠬᠡ ᠪᠠᠭ᠎ᠠ -ᠰᠢᠨᠵᠢ ᠴᠢᠨᠠᠷ -ᠪᠠᠶᠢᠭᠤᠯᠤᠭᠰᠠᠨ ᠴᠠᠭ -ᠦᠵᠡᠭᠰᠡᠨ ᠴᠠᠭ -ᠵᠠᠰᠠᠭᠰᠠᠨ ᠴᠠᠭ -ᠬᠠᠳᠠᠭᠤᠷ -ᠲᠠᠶᠢᠯᠪᠤᠷᠢ -ᠪᠠᠲᠤᠵᠢᠭᠤᠯᠬᠤ -ᠡᠮᠦᠨ᠎ᠡ ᠨᠢ ᠬᠤᠪᠢᠶᠠᠬᠤ -ᠰᠡᠭᠦᠯᠡᠷ ᠨᠢ ᠬᠤᠪᠢᠶᠠᠬᠤ -ᠲᠣᠯᠢ ᠪᠢᠴᠢᠭ  ᠦᠨ ᠶᠡᠬᠡ ᠪᠠᠭ᠎ᠠ -CRC -ᠲᠥᠷᠥᠯ -ᠠᠷᠢᠯᠭᠠᠬᠤ ᠵᠦᠢᠯ -ᠲᠣᠭᠠᠴᠠᠬᠤ ᠠᠷᠭ᠎ᠠ -ᠭᠣᠣᠯ ᠠᠵᠢᠯᠯᠠᠬᠤ ᠰᠢᠰᠲ᠋ᠧᠮ -ᠹᠠᠶᠢᠯ  ᠤᠨ ᠰᠢᠰᠲ᠋ᠧᠮ -ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢ -ᠪᠦᠯᠦᠭ -ᠥᠰᠦᠭ  ᠦᠨ ᠬᠡᠰᠡᠭ -ᠲᠠᠶᠢᠯᠪᠤᠷᠢ -ᠣᠷᠣᠨ ᠲᠣᠭᠲᠠᠭᠠᠬᠤ -ᠵᠠᠮ  ᠤᠨ ᠡᠮᠦᠨ᠎ᠡ ᠬᠡᠰᠡᠭ -ᠬᠠᠪᠲᠠᠰᠤ -ᠹᠠᠶᠢᠯ -ᠬᠡᠪ -ᠡᠪᠬᠡᠮᠡᠯ -ᠣᠯᠠᠨ ᠡᠪᠬᠡᠮᠡᠯ ᠠᠪᠴᠢᠭᠤᠯᠬᠤ -ᠬᠠᠵᠠᠭᠠᠢ ᠰᠢᠯᠵᠢᠭᠦᠯᠬᠦ -ᠵᠠᠯᠭᠠᠬᠤ -ᠥᠰᠦᠭ  ᠦᠨ ᠬᠡᠰᠡᠭ -ᠡᠪᠬᠡᠮᠡᠯ ᠬᠤᠪᠢᠶᠠᠬᠤ - -64 ᠣᠷᠣᠨ -ᠶᠡᠬᠡ ᠦᠰᠦᠭ  ᠦᠨ ᠬᠡᠰᠡᠭ  ᠦᠨ ᠳᠠᠷᠠᠭᠠᠯᠠᠯ -CPU -ᠹᠢᠽᠢᠺ ᠶᠡᠬᠡ ᠪᠠᠭ᠎ᠠ -ᠹᠠᠶᠢᠯ  ᠤᠨ ᠶᠡᠬᠡ ᠪᠠᠭ᠎ᠠ -ᠨᠡᠶᠢᠯᠡᠪᠦᠷᠢ  ᠶᠢ ᠰᠢᠯᠭᠠᠬᠤ -ᠣᠨᠴᠠᠯᠢᠭ -ᠬᠡᠶᠢᠰᠪᠦᠷᠢ ᠬᠠᠶ᠋ᠢᠭ -ID -ᠵᠢᠭᠠᠬᠠᠨ ᠹᠠᠶᠢᠯ  ᠤᠨ ᠨᠡᠷ᠎ᠡ -ᠫᠷᠦᠭᠷᠡᠮ ᠪᠠᠶᠢᠭᠤᠯᠬᠤ -ᠳᠡᠪᠢᠭᠦᠷ  ᠦᠨ ᠶᠡᠬᠡ ᠪᠠᠭ᠎ᠠ -ᠬᠡᠪ ᠵᠠᠭᠪᠤᠷ -ᠵᠠᠯᠭᠠᠬᠤ -ᠪᠤᠷᠤᠭᠤ -ᠶᠡᠷᠤᠩᠬᠡᠢ ᠶᠡᠬᠡ ᠪᠠᠭ᠎ᠠ -ᠬᠡᠷᠡᠭᠯᠡᠭᠰᠡᠨ ᠣᠷᠣᠨ ᠵᠠᠢ -ᠪᠠᠭᠴᠠ  ᠶᠢᠨ ᠶᠡᠬᠡ ᠪᠠᠭ᠎ᠠ -ᠡᠪᠬᠡᠮᠡᠯ  ᠦᠨ ᠲᠡᠮᠳᠡᠭ -ᠲᠤᠰ ᠭᠠᠵᠠᠷ  ᠤᠨ ᠨᠡᠷᠡᠶᠢᠳᠦᠯ -ᠬᠠᠩᠭᠠᠭᠴᠢ -2100 -ᠰᠣᠩᠭᠣᠯᠲᠠ -ᠬᠡᠯᠡ -ᠬᠡᠯᠡ ᠰᠣᠩᠭᠣᠬᠤ᠄ -ᠨᠠᠶᠢᠷᠠᠭᠤᠯᠤᠭᠴᠢ -ᠲᠣᠭᠲᠠᠭᠰᠠᠨ ᠨᠠᠶᠢᠷᠠᠭᠤᠯᠤᠭᠴᠢ (&E): -ᠲᠣᠭᠲᠠᠭᠰᠠᠨ ᠹᠠᠶᠢᠯ  ᠢ ᠠᠳᠠᠯᠢᠳᠬᠠᠬᠤ (&D): -2200 -ᠰᠢᠰᠲ᠋ᠧᠮ -7-Zip ᠪᠠᠷ ᠹᠠᠶᠢᠯ  ᠤᠨ ᠲᠥᠷᠥᠯ  ᠢ ᠬᠣᠯᠪᠣᠭᠳᠠᠭᠤᠯᠬᠤ ᠄ -2301 -7-Zip ᠶ᠋ᠢ ᠪᠠᠷᠠᠭᠤᠨ ᠳᠠᠷᠤᠪᠴᠢ ᠳ᠋ᠥ ᠨᠡᠮᠡᠬᠦ -ᠪᠠᠷᠠᠭᠤᠨ ᠳᠠᠷᠤᠪᠴᠢ ᠳ᠋ᠥ ᠳᠠᠪᠬᠤᠴᠠᠭᠤᠯᠬᠤ -ᠪᠠᠷᠠᠭᠤᠨ ᠳᠠᠷᠤᠪᠴᠢ ᠳ᠋ᠥ ᠢᠯᠡᠷᠡᠬᠦ ᠺᠣᠳ᠋  ᠢ ᠰᠣᠩᠭᠣᠬᠤ -2320 -<ᠬᠠᠪᠲᠠᠰᠤ > -< ᠡᠪᠬᠡᠮᠡᠯ > -ᠠᠪᠴᠢᠮᠠᠯ  ᠢ ᠨᠡᠭᠡᠭᠡᠬᠦ -ᠮᠠᠲ᠋ᠧᠷᠢᠶᠠᠯ  ᠢ ᠭᠠᠷᠭᠠᠨ ᠠᠪᠬᠤ ... -ᠠᠪᠴᠢᠮᠠᠯ ᠳ᠋ᠥ ᠨᠡᠮᠡᠬᠦ ... -ᠠᠪᠴᠢᠮᠠᠯ  ᠢ ᠰᠢᠯᠭᠠᠬᠤ -ᠳᠣᠣᠷᠠᠬᠢ ᠭᠠᠷᠴᠠᠭ ᠳ᠋ᠥ ᠭᠠᠷᠭᠠᠨ ᠠᠪᠬᠤ -{0}ᠤᠷᠤᠭᠤ ᠵᠠᠳᠠᠯᠬᠤ -{0} ᠳ᠋ᠥ ᠨᠡᠮᠡᠬᠦ -ᠠᠪᠴᠢᠶᠠᠭᠠᠳ ᠢᠮᠸᠯ ᠶᠠᠪᠤᠭᠤᠯᠬᠤ ... -ᠠᠪᠴᠢᠶᠠᠭᠠᠳ {0}ᠶ᠋ᠢ ᠢᠯᠡᠭᠡᠬᠦ -2400 -ᠬᠠᠪᠲᠠᠰᠤ -ᠠᠵᠢᠯ  ᠤᠨ ᠬᠠᠪᠲᠠᠰᠤ (&W) -ᠰᠢᠰᠲ᠋ᠧᠮ \ ᠵᠠᠰᠠᠪᠤᠷᠢ  ᠶᠢᠨ ᠬᠠᠪᠲᠠᠰᠤ (&S) -ᠣᠳᠣ  ᠶᠢᠨ ᠬᠠᠪᠲᠠᠰᠤ (&C) -ᠲᠣᠭᠲᠠᠮᠠᠯ ᠪᠠᠶᠢᠷᠢ (&S) -ᠵᠥᠪᠬᠡᠨ ᠵᠥᠭᠡᠭᠡᠪᠦᠷᠢ  ᠶᠢᠨ ᠲᠥᠬᠥᠭᠡᠷᠦᠮᠵᠢ ᠳ᠋ᠥ ᠬᠡᠷᠡᠭᠯᠡᠬᠦ -ᠲᠦᠷ ᠴᠠᠭ  ᠤᠨ ᠠᠪᠴᠢᠮᠠᠯ ᠹᠠᠶᠢᠯ ᠡᠭᠦᠰᠬᠡᠬᠦ ᠪᠠᠶᠢᠷᠢᠯᠠᠯ  ᠢ ᠲᠣᠳᠣᠷᠬᠠᠶᠢᠯᠠᠯ -2500 -ᠢᠯᠡᠷᠡᠬᠦ -ᠢᠯᠡᠷᠡᠬᠦ “..” ᠵᠦᠢᠯ ( ᠳᠡᠭᠡᠭᠰᠢ ᠬᠣᠣᠰ ᠲᠣᠪᠴᠢᠳᠠᠭᠠᠳ ) -ᠦᠨᠡᠨ ᠵᠢᠷᠤᠭ ᠨᠢ ᠢᠯᠡᠷᠡᠬᠦ -ᠰᠢᠰᠲ᠋ᠧᠮ  ᠦᠨ ᠲᠣᠪᠶᠣᠭ ᠨᠢ ᠢᠯᠡᠷᠡᠬᠦ -ᠪᠦᠬᠦ ᠮᠥᠷ  ᠢ ᠰᠣᠩᠭᠣᠬᠤ (&F) -ᠰᠦᠯᠵᠢᠶᠡᠨ ᠤᠲᠠᠰᠤ ᠢᠯᠡᠷᠡᠬᠦ (&G) -ᠲᠣᠪᠴᠢᠳᠠᠭᠠᠳ ᠨᠡᠭᠡᠭᠡᠬᠦ -7-Zip ᠤᠯᠠᠮᠵᠢᠯᠠᠯᠲᠤ ᠬᠡᠪ  ᠢ ᠰᠣᠩᠭᠣᠬᠤ (&A) -ᠶᠡᠬᠡ ᠷᠠᠮ  ᠤᠨ ᠨᠢᠭᠤᠷ  ᠢ ᠬᠡᠷᠡᠭᠯᠡᠬᠦ (&L) -2900 -7-Zip  ᠶᠢᠨ ᠲᠤᠬᠠᠢ -7-Zip ᠪᠣᠯ ᠲᠥᠯᠥᠪᠦᠷᠢ ᠦᠭᠡᠢ ᠰᠣᠹᠲ ᠂ ᠲᠠ ᠬᠠᠨᠳᠢᠪ  ᠤᠨ ᠬᠡᠯᠪᠡᠷᠢ ᠪᠠᠷ 7 -zip ᠶ᠋ᠢ ᠳᠡᠮᠵᠢᠵᠦ ᠪᠣᠯᠣᠨ᠎ᠠ ᠂ ᠮᠣᠩᠭᠣᠯ ᠰᠣᠹᠲ  ᠤᠨ ᠪᠦᠯᠦᠭ ᠨᠢᠭᠡ 39338772 ᠬᠣᠶᠠᠷ 38803882 ᠵᠢᠨ ᠰᠠᠴᠤᠷᠠᠯᠲᠤ ᠮᠣᠩᠭᠣᠯᠴᠢᠯᠠᠪᠠ ᠂ QQ 136087084 Email: saqirilatu@126.com -3000 -ᠰᠢᠰᠲ᠋ᠧᠮ ᠷᠠᠮ  ᠢ ᠨᠢ ᠬᠤᠪᠢᠶᠠᠵᠤ ᠳᠡᠶᠢᠯᠬᠦ ᠦᠭᠡᠢ -ᠪᠤᠷᠤᠭᠤ ᠦᠭᠡᠢ -{0}  ᠢ ᠰᠣᠩᠭᠣᠬᠤ -{0}” ᠬᠠᠪᠲᠠᠰᠤ ᠪᠠᠶᠢᠭᠤᠯᠵᠤ ᠳᠡᠶᠢᠯᠬᠦ ᠦᠭᠡᠢ -ᠲᠣᠰ ᠠᠪᠴᠢᠮᠠᠯ  ᠤᠨ ᠰᠢᠨᠡᠳᠬᠡᠬᠦ  ᠶᠢ ᠳᠡᠮᠵᠢᠬᠦ ᠦᠭᠡᠢ -ᠠᠪᠴᠢᠮᠠᠯ ᠨᠡᠭᠡᠭᠡᠵᠦ ᠳᠡᠶᠢᠯᠬᠦ ᠦᠭᠡᠢ {0}” -ᠪᠠᠲᠤ ᠠᠪᠴᠢᠮᠠᠯ ᠨᠡᠭᠡᠭᠡᠵᠦ ᠳᠡᠶᠢᠯᠬᠦ ᠦᠭᠡᠢ “{0}” ᠨᠢᠭᠤᠴᠠ ᠨᠣᠮᠧᠷ ᠨᠢ ᠪᠤᠷᠤᠭᠤ -ᠳᠡᠮᠵᠢᠬᠦ ᠦᠭᠡᠢ ᠠᠪᠴᠢᠮᠠᠯ  ᠤᠨ ᠬᠡᠯᠪᠡᠷᠢ -{0} ᠹᠠᠶᠢᠯ ᠨᠢᠭᠡᠨᠲᠡ ᠪᠠᠶᠢᠨ᠎ᠠ -ᠹᠠᠶᠢᠯ“{0}”ᠥᠭᠡᠷᠡᠴᠢᠯᠡᠭᠳᠡᠪᠡ \nᠲᠠ ᠠᠪᠴᠢᠮᠠᠯ  ᠳᠠᠬᠢ ᠹᠠᠶᠢᠯ  ᠢᠶᠠᠨ ᠰᠢᠨᠡᠳᠬᠡᠬᠦ ᠦᠦ ? -ᠹᠠᠶᠢᠯ  ᠢ ᠰᠢᠨᠡᠳᠬᠡᠵᠦ ᠳᠡᠶᠢᠯᠦᠭᠰᠡᠨ ᠦᠭᠡᠢ \n“{0}”ᠲᠤᠰ ᠠᠪᠴᠢᠮᠠᠯ ᠪᠤᠷᠤᠭᠤ ᠭᠠᠷᠴᠠᠢ -ᠭᠠᠳᠠᠨᠠᠬᠢ ᠨᠠᠶᠢᠷᠠᠭᠤᠯᠭ᠎ᠠ  ᠶᠢ ᠠᠵᠢᠯᠯᠠᠭᠤᠯᠵᠤ ᠳᠡᠶᠢᠯᠬᠦ ᠦᠭᠡᠢ -ᠲᠤᠰ ᠹᠠᠶᠢᠯ ᠬᠣᠣᠷ ᠲᠠᠢ ( ᠹᠠᠶᠢᠯ  ᠤᠨ ᠨᠡᠷ᠎ᠡ ᠳ᠋ᠥ ᠣᠯᠠᠨ ᠬᠣᠭᠣᠰᠤᠨ ᠵᠠᠢ ᠪᠠᠶᠢᠨ᠎ᠠ )。 -ᠬᠡᠲᠦᠷᠬᠡᠢ ᠤᠷᠲᠤ ᠂ ᠠᠵᠢᠯᠯᠠᠭᠤᠯᠵᠤ ᠳᠡᠶᠢᠯᠬᠦ ᠦᠭᠡᠢ -ᠲᠠ ᠵᠢᠭᠠᠪᠠᠯ ᠨᠢᠭᠡ ᠹᠠᠶᠢᠯ ᠰᠣᠩᠭᠣᠨ᠎ᠠ -ᠲᠠ ᠬᠠᠮᠤᠭ ᠪᠠᠭ᠎ᠠ  ᠳᠠᠭᠠᠨ ᠨᠢᠭᠡ ᠹᠠᠶᠢᠯ ᠰᠣᠩᠭᠣᠨ᠎ᠠ -ᠮᠠᠲ᠋ᠧᠷᠢᠶᠠᠯ ᠬᠡᠲᠦᠷᠬᠡᠢ ᠣᠯᠠᠨ -3300 -ᠶᠠᠭ ᠭᠠᠷᠭᠠᠨ ᠠᠪᠴᠤ ᠪᠠᠶᠢᠨ᠎ᠠ .... -ᠠᠪᠴᠢᠶᠠᠬᠤ -ᠰᠢᠯᠭᠠᠬᠤ -ᠶᠡᠬ ᠨᠡᠭᠡᠭᠡᠵᠦ ᠪᠠᠶᠢᠨ᠎ᠠ ... -ᠬᠠᠶᠢᠵᠤ ᠪᠠᠶᠢᠨ᠎ᠠ ... -3400 -ᠭᠠᠷᠭᠠᠨ ᠠᠪᠬᠤ -(&X)  ᠠᠴᠠ ᠭᠠᠷᠭᠠᠨ ᠠᠪᠬᠤ : -ᠮᠠᠲ᠋ᠧᠷᠢᠶᠠᠯ  ᠢ ᠭᠠᠷᠭᠠᠨ ᠠᠪᠤᠭᠰᠠᠨ ᠬᠠᠪᠲᠠᠰᠤ  ᠶᠢᠨ ᠪᠠᠶᠢᠷᠢ -3410 -ᠵᠠᠮ  ᠤᠨ ᠬᠡᠯᠪᠡᠷᠢ -ᠪᠦᠷᠢᠨ ᠵᠠᠮ -ᠵᠠᠮ ᠦᠭᠡᠢ -3420 -ᠰᠣᠯᠢᠬᠤ ᠬᠡᠯᠪᠡᠷᠢ -ᠰᠣᠯᠢᠬᠤ  ᠠᠴᠠ ᠡᠮᠦᠨ᠎ᠡ ᠠᠰᠠᠭᠤᠨ᠎ᠠ -ᠰᠠᠨᠠᠭᠤᠯᠬᠤ ᠦᠭᠡᠢ ᠰᠢᠭᠤᠳ ᠰᠣᠯᠢᠬᠤ -ᠪᠠᠶᠢᠬᠤ ᠹᠠᠶᠢᠯ  ᠢ ᠥᠰᠦᠷᠬᠡᠶᠢᠯᠨᠨ ᠭᠠᠷᠬᠤ -ᠠᠦ᠋ᠲ᠋ᠣ᠋ ᠵᠢᠨᠷ ᠨᠡᠷᠡᠯᠡᠬᠦ -ᠣᠳᠣᠬᠢ ᠹᠠᠶᠢᠯ  ᠢᠶᠠᠨ ᠨᠡᠷᠡᠯᠡᠬᠦ -3500 -ᠹᠠᠶᠢᠯ  ᠢ ᠰᠣᠯᠢᠨ᠎ᠠ -ᠲᠣᠰ ᠬᠠᠪᠲᠠᠰᠤ ᠳ᠋ᠥ ᠠᠳᠠᠯᠢ ᠨᠡᠷᠡᠶᠢᠳᠦᠯ ᠲᠠᠢ ᠹᠠᠶᠢᠯ ᠪᠠᠶᠢᠨ᠎ᠠ -ᠣᠳᠣ ᠪᠠᠶᠢᠬᠤ ᠹᠠᠶᠢᠯ  ᠢᠶᠠᠨ -ᠰᠣᠯᠢᠬᠤ -{0}ᠦᠰᠦᠭ  ᠦᠨ ᠰᠢᠷᠬᠡᠭ -ᠠᠦ᠋ᠲ᠋ᠣ᠋ ᠰᠢᠨ᠎ᠡ ᠨᠡᠷᠡᠯᠡᠬᠦ (&U) -3700 -ᠳᠡᠮᠵᠢᠬᠦ ᠦᠭᠡᠢ ᠠᠪᠴᠢᠮᠠᠯ ᠲᠤᠭᠠᠴᠢᠯᠳᠠ “{0}”。 -ᠲᠣᠭ᠎ᠠ ᠪᠠᠷᠢᠮᠲᠠ “{0}” ᠪᠤᠷᠤᠭᠤ ᠭᠠᠷᠴᠠᠢ ᠂ ᠹᠠᠶᠢᠯ ᠡᠪᠳᠡᠷᠡᠭᠰᠡᠨ ᠡ -CRC ᠰᠢᠯᠭᠠᠭᠠᠳ“{0}”ᠢᠯᠠᠭᠳᠠᠵᠠᠢ ᠂ ᠹᠠᠶᠢᠯ ᠡᠪᠳᠡᠷᠡᠭᠰᠡᠨ ᠡ -ᠪᠠᠲᠤ ᠹᠠᠶᠢᠯ “{0}”  ᠤᠨ ᠲᠣᠭ᠎ᠠ ᠪᠠᠷᠢᠮᠲᠠ ᠨᠢ ᠪᠤᠷᠤᠭᠤ ᠂ ᠨᠢᠭᠤᠴᠠ ᠨᠣᠮᠧᠷ ᠨᠢ ᠪᠤᠷᠤᠭᠤ -ᠪᠠᠲᠤ ᠹᠠᠶᠢᠯ “{0}” CRC  ᠵᠢᠨ ᠰᠢᠯᠭᠠᠭᠰᠠᠨ ᠲᠣᠭ᠎ᠠ ᠪᠠᠷᠢᠮᠲᠠ ᠨᠢ ᠪᠤᠷᠤᠭᠤ ᠂ ᠨᠢᠭᠤᠴᠠ ᠨᠣᠮᠧᠷ ᠨᠢ ᠪᠤᠷᠤᠭᠤ -3800 -ᠨᠢᠭᠤᠴᠠ ᠨᠣᠮᠧᠷ ᠣᠷᠣᠭᠤᠯᠬᠤ -ᠨᠢᠭᠤᠴᠠ ᠨᠣᠮᠧᠷ ᠣᠷᠣᠭᠤᠯᠬᠤ ᠄ -ᠳᠠᠬᠢᠨ ᠣᠷᠣᠭᠤᠯᠬᠤ -ᠨᠢᠭᠤᠴᠠ ᠨᠣᠮᠧᠷ ᠢᠯᠡᠷᠡᠬᠦ (&S) -ᠨᠢᠭᠤᠴᠠ ᠨᠣᠮᠧᠷ ᠨᠢ ᠪᠤᠷᠤᠭᠤ -ᠨᠢᠭᠤᠴᠠ ᠨᠣᠮᠧᠷ ᠨᠢ ᠵᠥᠪᠬᠡᠨ ᠠᠩᠭ᠍ᠯᠢ ᠬᠡᠯᠡ ᠪᠣᠯᠣᠨ ᠲᠣᠭ᠎ᠠ ᠬᠢᠭᠡᠳ ᠣᠨᠴᠠᠭᠠᠢ ᠲᠡᠮᠳᠡᠭ (!、#、$...) -ᠨᠢᠭᠤᠴᠠ ᠨᠣᠮᠧᠷ ᠨᠢ ᠬᠡᠲᠦᠷᠬᠡᠢ ᠤᠷᠲᠤ -ᠨᠢᠭᠤᠴᠠ ᠨᠣᠮᠧᠷ -3900 -ᠬᠡᠷᠡᠭᠰᠡᠭᠰᠡᠨ ᠴᠠᠭ ᠄ -ᠦᠯᠡᠳᠡᠭᠰᠡᠨ ᠴᠠᠭ ᠄ -ᠶᠡᠷᠤᠩᠬᠡᠢ ᠶᠡᠬᠡ ᠪᠠᠭ᠎ᠠ -ᠬᠤᠷᠳᠤᠴᠠ ᠄ -ᠨᠢᠭᠡᠨᠲᠡ ᠰᠢᠢᠳᠪᠦᠷᠢᠯᠡᠭᠰᠡᠨ ᠨᠢ ᠄ -ᠠᠪᠴᠢᠶᠠᠭᠰᠠᠨ ᠬᠡᠮᠵᠢᠶ᠎ᠡ ᠄ -ᠪᠤᠷᠤᠭᠤ ᠭᠠᠷᠴᠠᠢ ᠄ -ᠠᠪᠴᠢᠮᠠᠯ ᠄ -4000 -ᠠᠪᠴᠢᠮᠠᠯ ᠳ᠋ᠥ ᠨᠡᠮᠡᠬᠦ -ᠠᠪᠴᠢᠮᠠᠯ (&A): -ᠰᠢᠨᠡᠳᠬᠡᠬᠦ ᠬᠡᠯᠪᠡᠷᠢ (&U): -ᠠᠪᠴᠢᠮᠠᠯ  ᠤᠨ ᠬᠡᠯᠪᠡᠷᠢ (&F): -ᠠᠪᠴᠢᠶᠠᠬᠤ ᠳᠡᠰ (&L): -ᠠᠪᠴᠢᠶᠠᠬᠤ ᠠᠷᠭ᠎ᠠ (&M): -ᠲᠣᠯᠢ  ᠶᠢᠨ ᠶᠡᠬᠡ ᠪᠠᠭ᠎ᠠ (&D): -ᠳᠠᠩ ᠦᠭᠡᠰ  ᠦᠨ ᠶᠡᠬᠡ ᠪᠠᠭ᠎ᠠ (&W): -ᠲᠣᠭ᠎ᠠ ᠪᠠᠷᠢᠮᠲᠠ  ᠶᠢᠨ ᠶᠡᠬᠡ ᠪᠠᠭ᠎ᠠ -CPU ᠬᠡᠷᠡᠭᠯᠡᠭᠰᠡᠨ ᠬᠡᠮᠵᠢᠶ᠎ᠡ -ᠲᠣᠭ᠎ᠠ ᠪᠠᠷᠢᠮᠲᠠ (&P): -ᠰᠣᠩᠭᠣᠯᠲᠠ -ᠥᠪᠡᠷᠲᠡᠭᠡᠨ ᠠᠴᠢᠶᠠᠯᠠᠭᠴᠢ ᠫᠷᠦᠭᠷᠡᠮ ᠪᠠᠶᠢᠭᠤᠯᠬᠤ (&X) -ᠠᠪᠴᠢᠮᠠᠯ ᠹᠠᠶᠢᠯ  ᠢᠶᠠᠨ ᠬᠤᠪᠢᠶᠠᠯᠴᠠᠬᠤ -ᠪᠠᠲᠤᠵᠢᠭᠤᠯᠬᠤ -ᠪᠠᠲᠤᠵᠢᠭᠤᠯᠬᠤ ᠲᠣᠭᠠᠴᠠᠬᠤ ᠠᠷᠭ᠎ᠠ -ᠪᠠᠲᠤ ᠹᠠᠶᠢᠯ  ᠤᠨ ᠨᠡᠷᠡᠶᠢᠳᠦᠯ (&N) -ᠠᠪᠴᠢᠶᠠᠯᠠᠬᠤ ᠳ᠋ᠥ ᠬᠡᠷᠡᠭᠯᠡᠬᠦ ᠷᠠᠮ -ᠵᠠᠳᠠᠯᠬᠤ ᠳ᠋ᠥ ᠬᠡᠷᠡᠭᠯᠡᠬᠦ ᠷᠠᠮ -4050 -ᠵᠥᠪᠬᠡᠨ ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ -ᠣᠨᠴᠠ ᠬᠤᠷᠳᠤᠨ ᠠᠪᠴᠢᠶᠠᠬᠤ -ᠬᠤᠷᠳᠤᠨ ᠠᠪᠴᠢᠶᠠᠬᠤ -ᠪᠠᠷᠢᠮᠵᠢᠶ᠎ᠠ ᠠᠪᠴᠢᠶᠠᠬᠤ -ᠬᠠᠮᠤᠭ ᠶᠡᠬᠡ ᠠᠪᠴᠢᠶᠠᠬᠤ -ᠴᠢᠨᠠᠷᠯᠠᠩᠭᠤᠢ ᠠᠪᠴᠢᠶᠠᠬᠤ -4060 -ᠹᠠᠶᠢᠯ ᠨᠡᠮᠡᠭᠡᠳ ᠰᠣᠯᠢᠬᠤ -ᠹᠠᠶᠢᠯ  ᠢ ᠰᠢᠨᠡᠳᠬᠡᠭᠡᠳ ᠨᠡᠮᠡᠬᠦ -ᠪᠠᠶᠢᠬᠤ ᠹᠠᠶᠢᠯ  ᠢ ᠰᠢᠨᠡᠳᠬᠡᠬᠦ -ᠠᠪᠴᠢᠮᠠᠯ  ᠤᠨ ᠠᠭᠤᠯᠭ᠎ᠠ  ᠶᠢ ᠵᠡᠷᠭᠡᠴᠡᠭᠦᠯᠬᠦ -4070 -ᠦᠵᠡᠬᠦ ... -ᠪᠦᠬᠦ ᠹᠠᠶᠢᠯ -ᠲᠡᠭᠡ -ᠪᠤᠯᠢ -6000 -ᠬᠣᠣᠰᠯᠠᠬᠤ -ᠰᠢᠯᠵᠢᠭᠦᠯᠬᠦ -ᠬᠣᠣᠰᠯᠠᠭᠤᠯᠤᠨ ᠄ -ᠰᠢᠯᠵᠢᠭᠦᠯᠦᠨ -ᠬᠣᠣᠰᠯᠠᠵᠤ ᠪᠠᠶᠢᠨ᠎ᠠ ... -ᠰᠢᠯᠵᠢᠭᠦᠯᠵᠦ ᠪᠠᠶᠢᠨ᠎ᠠ ... -ᠶᠠᠭ ᠰᠢᠨ᠎ᠡ ᠨᠡᠷᠡᠶᠢᠳᠴᠦ ᠪᠠᠶᠢᠨ᠎ᠠ ... -ᠬᠠᠪᠲᠠᠰᠤ ᠰᠣᠩᠭᠣᠬᠤ -ᠣᠳᠣᠬᠢ ᠠᠵᠢᠯᠯᠠᠭ᠎ᠠ  ᠶᠢ ᠳᠡᠮᠵᠢᠬᠦ ᠦᠭᠡᠢ -ᠹᠠᠶᠢᠯ ᠪᠠ ᠬᠠᠪᠲᠠᠰᠤ  ᠶᠢ ᠲᠠᠬᠢᠨ ᠨᠡᠷᠡᠶᠢᠳᠴᠦ ᠳᠡᠶᠢᠯᠬᠦ ᠦᠭᠡᠢ -ᠹᠠᠶᠢᠯ  ᠢ ᠬᠣᠣᠰᠯᠠᠬᠤ ᠦᠦ ︖ -ᠹᠠᠶᠢᠯ  ᠢ ᠠᠪᠴᠢᠮᠠᠯ ᠳ᠋ᠥ ᠬᠣᠣᠰᠯᠠᠬᠤ ᠦᠦ ︖ -6100 -ᠹᠠᠶᠢᠯ ᠤᠰᠠᠳᠬᠠᠬᠤ -ᠬᠠᠪᠲᠠᠰᠤ  ᠶᠢ ᠤᠰᠠᠳᠬᠠᠬᠤ -ᠣᠯᠠᠨ ᠹᠠᠶᠢᠯ  ᠢ ᠤᠰᠠᠳᠬᠠᠬᠤ -ᠦᠨᠡᠬᠡᠷ“{0}” ᠶᠢ ᠤᠰᠠᠳᠬᠠᠬᠤ ᠦᠦ ? -ᠦᠨᠡᠬᠡᠷ“{0}”ᠬᠠᠪᠲᠠᠰᠤ  ᠶᠢᠨ ᠪᠦᠬᠦ ᠠᠭᠤᠯᠭ᠎ᠠ  ᠶᠢ ᠤᠰᠠᠳᠬᠠᠬᠤ ᠦᠦ ? -ᠦᠨᠡᠬᠡᠷ {0} ᠵᠢ ᠤᠰᠠᠳᠬᠠᠬᠤ ᠦᠦ ? -ᠤᠰᠠᠳᠬᠠᠵᠤ ᠪᠠᠶᠢᠨ᠎ᠠ ... -ᠹᠠᠶᠢᠯ ᠪᠠ ᠬᠠᠪᠲᠠᠰᠤ  ᠶᠢ ᠤᠰᠠᠳᠬᠠᠵᠤ ᠳᠡᠶᠢᠯᠬᠦ ᠦᠭᠡᠢ -ᠰᠢᠰᠲ᠋ᠧᠮ ᠬᠡᠲᠦᠷᠬᠡᠢ ᠤᠷᠲᠤ ᠵᠠᠮ ᠲᠠᠢ ᠹᠠᠶᠢᠯ  ᠢ ᠬᠣᠭ ᠬᠤᠷᠢᠶᠠᠭᠴᠢ ᠳ᠋ᠥ ᠰᠢᠯᠵᠢᠭᠦᠯᠵᠦ ᠳᠡᠶᠢᠯᠬᠦ ᠦᠭᠡᠢ -6300 -ᠰᠢᠨ᠎ᠡ ᠬᠠᠪᠲᠠᠰᠤ ᠪᠠᠶᠢᠭᠤᠯᠬᠤ -ᠰᠢᠨ᠎ᠡ ᠹᠠᠶᠢᠯ ᠪᠠᠶᠢᠭᠤᠯᠬᠤ -ᠬᠠᠪᠲᠠᠰᠤ  ᠶᠢᠨ ᠨᠡᠷᠡᠶᠢᠳᠦᠯ ᠄ -ᠹᠠᠶᠢᠯ  ᠤᠨ ᠨᠡᠷ᠎ᠡ -ᠰᠢᠨ᠎ᠡ ᠬᠠᠪᠲᠠᠰᠤ ᠪᠠᠶᠢᠭᠤᠯᠬᠤ -ᠰᠢᠨ᠎ᠡ ᠹᠠᠶᠢᠯ ᠪᠠᠶᠢᠭᠤᠯᠬᠤ .txt -ᠬᠠᠪᠲᠠᠰᠤ ᠪᠠᠶᠢᠭᠤᠯᠵᠤ ᠳᠡᠶᠢᠯᠦᠭᠰᠡᠨ ᠦᠭᠡᠢ -ᠰᠢᠨ᠎ᠡ ᠹᠠᠶᠢᠯ ᠪᠠᠶᠢᠭᠤᠯᠵᠤ ᠳᠡᠶᠢᠯᠦᠭᠰᠡᠨ ᠦᠭᠡᠢ -6400 -ᠲᠠᠶᠢᠯᠪᠤᠷᠢ -ᠲᠠᠶᠢᠯᠪᠤᠷᠢ (&C): -ᠰᠣᠩᠭᠣᠬᠤ -ᠰᠣᠩᠭᠣᠭᠰᠠᠨ  ᠢᠶᠠᠨ ᠤᠰᠠᠳᠬᠠᠬᠤ -ᠨᠣᠮᠧᠷ ᠄ -6600 -ᠰᠢᠨᠵᠢ ᠴᠢᠨᠠᠷ -ᠬᠠᠪᠲᠠᠰᠤ  ᠶᠢᠨ ᠲᠡᠦᠬᠡ -ᠣᠨᠣᠰᠢᠯᠠᠭᠰᠠᠨ ᠰᠤᠷᠠᠭ -ᠰᠤᠷᠠᠭ -7100 -ᠮᠢᠨᠤ ᠺᠣᠮᠫᠢᠦ᠋ᠲ᠋ᠧᠷ -ᠰᠦᠯᠵᠢᠶᠡᠨ ‍ᠣ ᠬᠠᠨᠢ -ᠮᠢᠨᠤ ᠮᠠᠲ᠋ᠧᠷᠢᠶᠠᠯ -ᠰᠢᠰᠲ᠋ᠧᠮ -7200 -ᠨᠡᠮᠡᠬᠦ -ᠭᠠᠷᠭᠠᠨ ᠠᠪᠬᠤ -ᠰᠢᠯᠭᠠᠬᠤ -ᠬᠣᠣᠰᠯᠠᠬᠤ -ᠰᠢᠯᠵᠢᠭᠦᠯᠬᠦ -ᠤᠰᠠᠳᠬᠠᠬᠤ -ᠰᠤᠷᠠᠭ -7300 -ᠹᠠᠶᠢᠯ ᠰᠢᠯᠭᠠᠬᠤ -ᠹᠠᠶᠢᠯ  ᠢ (&S) ᠵᠦᠭ ᠰᠠᠯᠭᠠᠬᠤ᠄ -ᠡᠪᠬᠡᠮᠡᠯ ᠬᠤᠪᠢᠶᠠᠬᠤ ᠶᠡᠬᠡ ᠪᠠᠭ᠎ᠠ (&V): -ᠰᠠᠯᠭᠠᠵᠤ ᠪᠠᠶᠢᠨ᠎ᠠ ... -ᠰᠠᠯᠭᠠᠬᠤ ᠦᠦ -ᠲᠠ ᠹᠠᠶᠢᠯ  ᠢᠶᠠᠨ {0} ᠬᠡᠰᠡᠭ ᠬᠤᠪᠢᠶᠠᠬᠤ ᠦᠦ ︖ -ᠡᠪᠬᠡᠮᠡᠯ ᠬᠤᠪᠢᠶᠠᠭᠰᠠᠨ ᠶᠡᠬᠡ ᠪᠠᠭ᠎ᠠ ᠨᠢ ᠤᠭ ᠹᠠᠶᠢᠯ  ᠠᠴᠠ ᠪᠠᠭ᠎ᠠ ᠪᠠᠶᠢᠬᠤ ᠬᠡᠷᠡᠭᠲᠡᠢ -ᠡᠪᠬᠡᠮᠡᠯ ᠬᠤᠪᠢᠶᠠᠬᠤ ᠶᠡᠬᠡ ᠪᠠᠭ᠎ᠠ ᠨᠢ ᠪᠤᠷᠤᠭᠤ -ᠡᠪᠬᠡᠮᠡᠯ ᠬᠤᠪᠢᠶᠠᠬᠤ ᠶᠡᠬᠡ ᠪᠠᠭ᠎ᠠ  ᠶᠢ ᠲᠣᠭᠲᠠᠭᠠᠬᠤ {0} ᠦᠰᠦᠭ  ᠦᠨ ᠰᠢᠷᠬᠡᠭ \nᠲᠠ ᠳᠣᠣᠷᠠᠬᠢ ᠹᠠᠶᠢᠯ  ᠢ ᠬᠤᠪᠢᠶᠠᠬᠤ ᠦᠦ ? -7400 -ᠹᠠᠶᠢᠯ ᠨᠡᠶᠢᠯᠡᠭᠦᠯᠬᠦ -ᠹᠠᠶᠢᠯ  ᠢ (&S) ᠳ᠋ᠥ ᠨᠡᠶᠢᠯᠡᠭᠦᠯᠬᠦ -ᠨᠡᠶᠢᠯᠡᠭᠦᠯᠵᠦ ᠪᠠᠶᠢᠨ᠎ᠠ ... -ᠬᠤᠪᠢᠷᠢ ᠡᠪᠬᠡᠮᠡᠯ  ᠦᠨ ᠲᠦᠷᠦᠭᠦᠦ ᠹᠠᠶᠢᠯ  ᠢ ᠰᠣᠩᠭᠣᠭᠠᠷᠠᠢ -ᠬᠤᠪᠢᠷᠢ ᠡᠪᠬᠡᠮᠡᠯ  ᠢ ᠲᠠᠨᠢᠬᠤ ᠦᠭᠡᠢ -ᠪᠤᠰᠤᠳ ᠬᠤᠪᠢᠷᠢ ᠡᠪᠬᠡᠮᠡᠯ ᠬᠠᠶᠢᠵᠤ ᠣᠯᠣᠭᠰᠠᠨ ᠦᠭᠡᠢ -7500 -ᠰᠢᠯᠭᠠᠵᠤ ᠪᠠᠶᠢᠨ᠎ᠠ ... -ᠰᠢᠯᠭᠠᠭᠰᠠᠨ ᠰᠤᠷᠠᠭ -CRC ᠲᠣᠭ᠎ᠠ ᠪᠠᠷᠢᠮᠲᠠ ᠰᠢᠯᠭᠠᠬᠤ -CRC ᠲᠣᠭ᠎ᠠ ᠪᠠᠷᠢᠮᠲᠠ ᠪᠠ ᠹᠠᠶᠢᠯ  ᠤᠨ ᠨᠡᠷ᠎ᠡ  ᠶᠢ ᠰᠢᠯᠭᠠᠬᠤ : -7600 -ᠥᠭᠭᠦᠭᠳᠡᠯ ᠰᠢᠯᠭᠠᠯᠲᠠ -ᠷᠠᠮ ᠬᠡᠷᠡᠭᠯᠡᠯᠲᠡ ᠄ -ᠠᠪᠴᠢᠶᠠᠬᠤ -ᠵᠠᠳᠠᠯᠬᠤ -ᠣᠨᠣᠭ᠎ᠠ ᠥᠭᠬᠦ -ᠶᠡᠷᠤᠩᠬᠡᠢ ᠣᠨᠣᠭ᠎ᠠ -ᠣᠳᠣᠬᠢ -ᠦᠷ᠎ᠡ ᠳ᠋ᠦᠩ -CPUᠬᠡᠷᠡᠭᠯᠡᠭᠰᠡᠨ ᠬᠡᠮᠵᠢᠶ᠎ᠡ -ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢ  ᠶᠢᠨ ᠣᠨᠣᠭ᠎ᠠ -ᠪᠠᠲᠤᠯᠠᠭᠳᠠᠭᠰᠠᠨ ᠡ ᠄ diff --git a/Utils/7-Zip/Lang/mng2.txt b/Utils/7-Zip/Lang/mng2.txt deleted file mode 100644 index ad99c235e..000000000 --- a/Utils/7-Zip/Lang/mng2.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 7-Zip 9.20 -; Saqirilatu Mongolqileb -; QQ:136087084 Email:saqirilatu@126.com -; Mongol soft QQ bulug Ⅰ: 39338772 Ⅱ:38803882 -; Toli Mongolian IME -; http://hi.baidu.com/saqirilatuu/item/9438213716f316ebe7bb7a8d -;last updated: 2013-12-11 -; Update and Spelling corrected Bayarsaikhan -; -; -; -0 -7-Zip -Mongolian (MenkCode) -  -401 - - - - - - (&Y) - (&N) - (&C) - - - (&C) -440 -  (&A) -  (&L) - -  -  (&B) -  (&F) - (&P) -  -    ? -500 - (&F) - (&E) - (&V) - (&A) - (&T) - (&H) -540 - (&O) -    (&I) -    (&U) -  (&V) - (&E) -  (&M) - (&C) - (&M) - (&D) -  (&S)... -   (&B)... -  (&R) - (&N) -  -  -   -  - (&X) -600 -   (&A) -   -  (&I) - ... -   ... -      -      -700 -  (&G) -  (&M) - (&L) -  (&D) -730 -  -  -  (&2) -   (&T) -   - -   ... - (&R) -750 -     -    -  -    -800 -   (&A) - -900 - (&O) -  (&B) -960 -  (&C) -7-Zip   (&A) -1003 - - -  - -  -     -  -  -  -  - - - -   -   -     -CRC - -  -  -   -   - - -   - -  -    - - - - -   -  - -   -  - -64  -      -CPU -   -    -   - -  -ID -    -  -    -  - - -   -   -    -   -    - -2100 - - -  : - -  (&E): -    (&D): -2200 - -7-Zip       : -2301 -7-Zip      -    -       -2320 -< > -<  > -   -    ... -   ... -   -     -{0}  -{0}   -   ... - {0}   -2400 - -   (&W) - \  (&S) -   (&C) -  (&S) -      -         -2500 - - “..” (   ) -    -     -    (&F) -   (&G) -  -7-Zip     (&A) -      (&L) -2900 -7-Zip   -7-Zip           7-Zip        Ⅰ39338772 Ⅱ 38803882      QQ 136087084 Email: saqirilatu@126.com -3000 -       -  -{0}   -{0}”     -       -   “{0}” -     “{0}”    ? -     -{0}    - “{0}” \n       ? -     \n“{0}”,    -      -    (         )。 -     -     -       -   -3300 -    .... - - -   ... -  ... -3400 -  -(&X)   : -       -3410 -   -  -  -3420 -  -    -    -     -   -    -3500 -   -        -    - -{0}    -    (&U) -3700 -    “{0}”。 -  “{0}”  ,   -CRC  “{0}”,   -  “{0}”     ,    ? -  “{0}”CRC       ,    ? -3800 -    -    : -  : -   (&S) -    -           (!、#、$...) -    -  -3900 -  : -  : -   : - : -   : -  : - : -: -4000 -   - (&A): -  (&U): -   (&F): -  (&L): -  (&M): -    (&D): -     (&W): -     : -CPU  : -  (&P): - -    (&X) -    - -   : -    (&N) -    : -   : -4050 -  -   -  -  -   -  -4060 -   -    -    -     -4070 - ... -  - - -6000 - - -: -: -  ... -  ... -    ... -  -     -        -    -     -6100 -  -   -    -“{0}”  ? -“{0}”       ? - {0}  ? -  ... -       . -             -6300 -   -   -   : -  : -   -   .txt -    -     -6400 - - (&C): - -   -: -6600 -  -   -  - -7100 -  -   -  - -7200 - -  - - - - - -7300 -  -  (&S)   : -    (&V): -  ... -  -   {0}    ? -           -      -      :{0}    。\n      ? -7400 -  -  (&S)  : -  ... -       -     -      -7500 -  ... -  -CRC   : -CRC       : -7600 -  -  : - - -  -  - -  -CPU   -   -  : diff --git a/Utils/7-Zip/Lang/mr.txt b/Utils/7-Zip/Lang/mr.txt deleted file mode 100644 index 0a4e5eb9e..000000000 --- a/Utils/7-Zip/Lang/mr.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.42 : अनुवाद सुबोध गायकवाड (Subodh Gaikwad) -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Marathi -मराठी -401 -ठीक -रद्द - - - -&हो -&नाही -&बंद -मदत - -&सुरु -440 -&सर्व ला हो -&सर्व ला नाही -थांबा -पुन्हा सुरु करा -&मागे लपवा -&समोर आणा -&विश्राम -विश्राम -तुम्हाला रद्द करण्याबाबत खात्री आहे का? -500 -&फ़ाइल -&संपादन -&दर्शन -आ&वडते -&अवजार -&मदत -540 -&उघडा -&अंदर उघडा -&बाहेर उघडा -&दृश्य -&संपादक -नाव बदल -&प्रतिलिपी... -&हलवा... -&मिटवा -&फ़ाइल तुकडे करा... -फ़ाइल जोडा... -लक्षणं -प्रतिक्रिया - - -फ़ोल्डर तयार करा -फ़ाइल तयार करा -गमन -600 -सर्व निवडा -सर्वांना अनिवडित करा -&निवड उलटी करा -निवडा... -अनिवडा... -प्रकारेद्वारा निवडा -प्रकारेद्वारे अनिवडा -700 -मोठे Icons -लहान Icons -&सुची -&माहिती -730 -अव्यवस्थित -Flat दृश्य -&२ फ़लक -&अवजार कप्पाs -Root फ़ोल्डर उघडा -एक वरती चढा -फ़ोल्डर इतिहास... -&टवटवीत करा -750 -दफ़तर अवजार कप्पा -प्रमाण अवजार कप्पा -मोठे कळ -कळ शब्द दाखवा -800 -&फ़ोल्डर आवडते मध्ये टाका... -पृष्ठ -900 -&पर्याय... -&Benchmark -960 -&माहिती... -7-Zip बद्दल... -1003 -मार्ग -नाव -शेपुट -फ़ोल्डर -आकार -दबलेला आकार -गुणधर्म -तयार -वापर -बदल -ठोस -भाष्य -बंधिस्त -या पुर्व तुकडे करा -या नंतर तुकडे करा -शब्दावली -CRC -प्रकार -विरुद्ध -पद्धत -यजमान आज्ञावली -फ़ाइल प्रणाली -उपयोगकर्ता -गट -गठ्ठा -प्रतिक्रिया -स्थिती -मार्गाची सुरुवात - - - - - - - - - - - - - - - - - - - - - - - - -चुक -एकूण आकार -खाली जागा -क्लस्टर आकार -शिर्षक -लोकल नाव -देणारा -2100 -पर्याय -भाषा -भाषा: -संपादक -&संपादक: - -2200 -प्रणाली -7-Zip संबधित करा: -2301 -7-Zip ला shell context मेनुशी जोडा -Cascaded context menu -Context मेनु वस्तू: -2320 - - -दफ़तर उघडा -फ़ाइल्स बाहेर काढा... -दफ़तरात टाका... -दफ़तर तपासा -येथे बाहेर काढा -बाहेर {0} -{0} येथे टाका -दाबा आणि इमेल करा... -{0} येथे दाबा आणि इमेल करा -2400 -फ़ोल्डर -&चलित फ़ोल्डर -&प्रणालीचे तात्पुरते फ़ोल्डर -&सध्या -&नमुद: -फक्त काढता येणाय्रा ड्रॉईव्हकरता वापरा -तात्पुरत्या दफ़तर करिता मार्ग दर्शवा. -2500 -स्थिती -वस्तू ".." दाखवा -फ़ाइलचे खरे icon दाखवा -प्रणालीचे मेनु दाखवा -&सर्व ओळ निवडा -&grid रेघा दाखवा - -&अतिरिक्त निवड पद्धती -मोठे स्मरणशक्ती पृष्ठ वापरा -2900 -7-Zip बद्दल माहिती -7-Zip हे मोफ़त सॉफ़्टवेअर आहे. तरिही, तुम्ही नोंद करुन याच्या प्रगतीला सहाय्य करू शकता. -3000 - -येथे एकही चूक नाही -निवडलेल्या वस्तू{0} -'{0}' फ़ोल्डर तयार होऊ शकले नाही -या दफ़तरासाठी नुतनीकरण शक्य नाही. - - - - -'{0}' ही फ़ाइल बदलली आहे.\nतुम्हाला हे दफ़तरात नुतन करायचे आहे का? -फ़ाइल नुतन करता येत नाही\n'{0}' -संपादक सुरु होत नाही. - - - - -खूपच जास्त वस्तू -3300 -बाहेर -दाब -तपासणी -उघडत आहे... -बारकाईने पाहत आहे... -3400 -बाहेर -&बाहेर: -फ़ाइल बाहेर काढण्यासाठी मार्ग नमूद करा. -3410 -मार्ग रित -पूर्ण पत्ता -पत्ता नाही -3420 -Overwrite रीत -overwrite करण्यापुर्वी विचारा -Overwrite न विचारता करा -अस्तित्वात असलेल्या फ़ाइल सोडा -स्वयंचलित नाव बदलवा -अस्तित्वात असलेल्या फ़ाइलचे आपोआप नाव बदलवा -3500 -फ़ाइल बदलवीणे खात्री -त्या फ़ोल्डरमध्ये अगोदरच कार्यान्वीत फ़ाइल आहे. -अस्तित्वात असलेली फ़ाइल बदलवायची आहे का? -यानी? -{0} बाइट्स -स्वयंचलित नाव बदलवा -3700 -असहाय्यक दाब पद्धत'{0}'. -डेटा चूक'{0}'. फ़ाइल तुटलेली आहे. -CRC अयशस्वी '{0}'. फ़ाइल तुटलेली आहे. - - -3800 -परवलिचा शब्द टाका -परवलिचा शब्द टाका: - -परवलिचा शब्द दाखवा - - - -परवलिचा शब्द -3900 -झालेला वेळ: -निघुन गेलेला वॆळ: -आकार: -वेग: - - -चूक: - -4000 -दफ़तरात टाका -&दफ़तर: -&नुतनीकरन रित: -दफ़तर &प्रकार: -दाब &level: -दाब &पद्धत: -&शब्द्कोश आकार: -&शब्द आकार: - - -&Parameters: -पर्याय -SF&X दफ़तर तयार करा - - - -फ़ाइल &नाव बंधिस्त करा -दाबण्यासाठी स्मरणशक्तीचा वापर: -प्रसरण पावण्यासाठी स्मरणशक्तीचा वापर: -4050 -साठा -अतिशय वेगवान -वेगवान -साधारण -जास्तीत जास्त -एकदमच -4060 -फ़ाइल टाका आणि ठेवा -फ़ाइल टाका आणि नुतन करा -अस्तित्वातील फ़ाइल ताजे करा -Synchronize फ़ाइल -4070 -ब्राउझ -सर्व फ़ाइल - - -6000 -प्रतिलिपी -हलवा -प्रतिलिपी: -हलवा: -प्रतिलिपी... -हलवल्या जात आहे... -नविन नाव दिल्या जात आहे... - -क्रिया करता येणार नाही. -फ़ाइल किंवा फ़ोल्डरला नविन नाव देता येत नाही आहे -फ़ाइलची प्रतिलिपी करण्यास तुमची खात्री आहे का -दफ़्तरात फ़ाइलची प्रतिलिपी करण्यास तुमची खात्री आहे का -6100 -फ़ाइल मिटवायची खात्री -फ़ोल्डर मिटवायची खात्री -अनेक फ़ाइल मिटवायची खात्री -तुम्हाला '{0}' मिटवायची खात्री आहे का? -तुम्हाला '{0}' फ़ोल्डर आणि त्यातील सर्व वस्तु मिटवायची खात्री आहे का? -तुम्हाला {0} वस्तु मिटवायची खात्री आहे का? -मिटत आहे... -फ़ाइल किंवा फ़ोल्डर मिटवता येत नाही आहे - -6300 -फ़ॊल्डर तयार करा -फ़ाइल तयार करा -फ़ोल्डर नाव: -फ़ाइलचे नाव: -नविन फ़ॊल्डर -नविन फ़ाइल -फ़ोल्डर तयार करता येत नाही आहे -फ़ाइल तयार करता येत नाही आहे -6400 -प्रतिक्रिया -&प्रतिक्रिया: -निवडा -निवड रद्द -मुखवटा: -6600 - -फ़ोल्डरचा इतिहास -उपचार संदेश -संदेश -7100 -संगणक -नेटवर्क - -प्रणाली -7200 -टाका -बाहेर -तपासा -प्रतिलिपी -हलवा -मिटवा -माहिती -7300 -फ़ाइलचे तुकडे करा -&येथे तुकडे: -तुकडे, बाइट्स: -तुकडे होत आहे... - - - - - -7400 -फ़ाइल जोडा -&येथे फ़ाइल जोडा: -फ़ाइल जुडत आहे... - - - -7500 -Checksum मोजत आहे... -Checksum माहिती -डेटाकरिता CRC checksum : -नाव आणि डेटाकरिता CRC checksum : -7600 -Benchmark -स्मरणशक्ती वापर: -दाबत आहे -प्रसरण होत आहे -क्रमांकन -एकुण क्रमांकन -सध्या -परिणाम - - -Passes: diff --git a/Utils/7-Zip/Lang/ms.txt b/Utils/7-Zip/Lang/ms.txt deleted file mode 100644 index 19285ca43..000000000 --- a/Utils/7-Zip/Lang/ms.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.30 : Khairul Ridhwan Bin Omar -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Malay -Bahasa Melayu -401 -OK -Batal - - - -&Ya -&Tidak -&Tutup -Bantuan - -&Teruskan -440 -Ya untuk Semua -Tidak untuk Semua -Henti -Mula Semula -&Latar belakang -&Latar depan -&Berehat -Berehat -Anda yakin untuk membatalkannya? -500 -&Fail -&Edit -&Paparan -K&egemaran -&Alat -&Bantuan -540 -&Buka -Buka di D&alam -Buka di L&uar -&Paparan -&Edit -Nam&akan semula -&Salin ke... -&Pindahkan ke... -Hapus -&Bahagi/belah Fail... -Gab&ung Fail... -P&roperti -Kom&en - - -Buat Folder -Buat Fail -K&eluar -600 -Pilih &Semua -Jangan Pilih Semua -&Sonsangkan Pilihan -Pilih... -Tidak Memilih... -Pilih Berdasarkan Jenis -Tidak Memilih Berdasarkan Jenis -700 -Ikon B&esar -Ikon K&ecil -&Senarai -&Butiran -730 -Tidak Tersusun - -&2 Panel -&Toolbar -Buka Root Folder -Ke atas Satu Aras -Folder Sejarah... -&Segarkan Semula -750 -Toolbar Arkib -Toolbar Standard -Bebutang Besar -Perlihatkan Teks Bebutang -800 -&Tambah folder pada Kegemaran sebagai -Penanda Buku -900 -&Opsyen... -&Tanda Aras -960 -&Kandungan... -&Perihal 7-Zip... -1003 -Bahagian -Nama -Sambungan -Folder -Saiz -Saiz Paket -Atribut -Dibuat -Diakses -Diubah Suai -Solid -Komen -Terenkripsi -Terpisah Sebelum -Terpisah Selepas -Kamus -CRC -Jenis -Anti -Kaedah -Sistem Operasi -Sistem Fail -Pengguna -Kumpulan -Blok -Komen -Posisi - - - - - - - - - - - - - - - - - - - - - - - - - -Ralat -Saiz Keseluruhan -Ruang Kosong -Saiz Kluster -Label -Nama Tempatan -Penyedia -2100 -Opsyen -Bahasa -Bahasa: -Editor -&Editor: - -2200 -Sistem -Kongsikan 7-Zip dengan: -2301 -Integrasikan 7-Zip ke shell konteks menu -Cascaded konteks menu -Item pada konteks menu: -2320 - - -Buka arkib -Ekstrak fail... -Tambahkan ke arkib... -Uji arkib -Ekstrak di sini -Ekstrak ke {0} -Tambahkan ke {0} -Padatkan dan kirimkan melalui email... -Padatkan ke {0} dan kirimkan melalui email -2400 -Folder -&Folder kerja -&Folder sementara sistem -&Sekarang -&Ditentukan: -Hanya untuk pemacu mudah alih -Tentukan lokasi untuk arkib fail sementara. -2500 -Seting -Perlihatkan ".." item -Perlihatkan ikon asli dari fail -Perlihatkan menu sistem -&Pilih barisan penuh -Perlihatkan garisan grid - -&Mod Pilihan Alternatif -Gunakan muka surat memori yang &besar -2900 -Perihal 7-Zip -7-Zip adalah perisian percuma. Sokong pembangunan 7-Zip dengan melakukan pendaftaran. -3000 - -Tidak ada ralat -{0} buah objek telah terpilih -Tidak dapat membuat folder '{0}' -Tidak menyokong pengemaskinian untuk arkib ini. - - - - -Fail '{0}' telah terubah suai.\nApakah anda ingin mengemaskininya pada arkib? -Tidak dapat mengemaskini fail\n'{0}' -Tidak dapat membuka editor. - - - - -Terlalu banyak item -3300 -Sedang mengekstrak -Memampatkan -Pengujian -Membuka... - -3400 -Ekstrak -Ekstrak ke: -Tentukan lokasi untuk pengekstrakan fail. -3410 -Mod laluan -Laluan nama penuh -Tidak pakai nama laluan -3420 -Mod tulis semula -Tanya sebelum menulis semula -Tulis semula tanpa perlu diberitahu -Abaikan fail yang ada -Namakan semula automatik -Namakan automatik fail yang ada -3500 -Pastikan penggantian fail -Folder tujuan telah berisi fail yang telah terproses. -Mahukah anda menggantikan fail yang ada -dengan yang ini? -{0} baits -N&amakan semula Automatik -3700 -Kaedah pemampatan untuk '{0}' tidak disokong. -Data ralat di '{0}'. Fail ini rosak. -CRC gagal di '{0}'. Fail ini rosak. - - -3800 -Masukkan kata laluan -Masukkan kata laluan: - -&Perlihatkan kata laluan - - - -Kata laluan -3900 -Telah berlalu: -Selesai dalam: -Saiz: -Kecepatan: - - -Ralat: - -4000 -Tambahkan ke arkib -&Arkib: -&Mod kemaskini: -Format arkib: -Aras &mampatan: -Kaedah mampatan: -&Saiz kamus: -&Saiz perkataan: - - -&Parameter: -Opsyen -Buat arkib SF&X - - - -Enkripsi nama &fail -Penggunaan memori untuk Memampatkan: -Penggunaan memori untuk Menyah-mampatkan: -4050 -Untuk Penyimpanan -Lebih cepat -Cepat -Normal -Maksimum -Ultra -4060 -Tambah dan gantikan fail -Kemaskini dan tambahkan fail -Perbaharui fail yang ada -Menyesuaikan fail -4070 -Selusur... -Semua Fail - - -6000 -Salin -Pindah -Salin ke: -Pindah ke: -Sedang menyalin... -Sedang memindah... -Namakan semula... - -Operasi tidak disokong. -Ralat, ketika namakan semula Fail atau Folder -Pasti salinkan fail -Anda yakin untuk menyalinkan fail kepada arkib -6100 -Pasti penghapusan fail -Pasti penghapusan folder -Pasti penghapusan fail-fail -Anda yakin untuk menghapus '{0}'? -Anda yakin untuk menghapus folder '{0}' dan semua isi kandungannya? -Anda yakin untuk menghapus item {0}? -Penghapusan... -Ralat ketika menghapuskan Fail atau Folder - -6300 -Buat Folder -Buat Fail -Nama Folder: -Nama Fail: -Folder Baru -Fail Baru -Ralat, tidak dapat Membuat Folder -Ralat, tidak dapat Membuat Fail -6400 -Komen -&Komen: -Pilih -Tidak Memilih -Topeng: -6600 - -Folder Sejarah -Mesej diagnostik -Mesej -7100 -Komputer -Rangkaian - -Sistem -7200 -Tambah -Ekstrak -Uji -Salin -Pindah -Hapus -Maklumat -7300 -Pisahkan Fail -&Pisahkan ke: -Bahagi/belah ke &nilai, baits: -Pembelahan ... - - - - - -7400 -Gabungan Fail -&Gabung ke: -Penggabungan ... - - - -7500 - - - - -7600 -Tanda Aras -Penggunaan memori: -Pemampatan -Penyah-mampatan -Rating -Total Rating -Sekarang -Keputusan - - -Lulus: diff --git a/Utils/7-Zip/Lang/nb.txt b/Utils/7-Zip/Lang/nb.txt deleted file mode 100644 index c90522a41..000000000 --- a/Utils/7-Zip/Lang/nb.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.45 : Jostein Christoffer Andersen -; : Kjetil Hjartnes -; : Robert Grønning -; -; -; -; -; -; -; -; -0 -7-Zip -Norwegian Bokmal -Norsk Bokmål -401 -OK -Avbryt - - - -&Ja -&Nei -&Lukk -Hjelp - -&Fortsett -440 -Ja til &alt -Nei til a< -Stopp -Start på nytt -&Bakgrunn -&Forgrunn -&Stopp -Stoppet -Vil du avbryte? -500 -&Fil -&Rediger -&Vis -&Bokmerker -Verk&tøy -&Hjelp -540 -&Åpne -Åpne &internt -Åpne &eksternt -&Vis -&Rediger -Gi nytt &navn -&Kopier til … -&Flytt til … -S&lett -&Del opp arkiv … -&Sett sammen arkiv … -E&genskaper -&Kommentar … -Beregn sjekksum - -Ny &mappe … -Ny f&il … -&Avslutt -600 -Merk &alle -Merk i&ngen -Merk &omvendt -Merk … -Merk &ikke … -Merk &valgt type -Merk i&kke valgt type -700 -&Store ikoner -S&må ikoner -&Liste -&Detaljer -730 -Usortert -&Flat visning -&To felt -&Verktøylinjer -Rotmappe -Gå opp et nivå -Mappelogg … -&Oppdater -750 -Arkivverktøylinje -Standardverktøylinje -Store knapper -Knappetekst -800 -&Bokmerk denne mappen som -Bokmerke -900 -&Innstillinger … -&Yteprøve … -960 -&Innhold -&Om 7-Zip -1003 -Plassering -Navn -Filetternavn -Mappe -Størrelse -Komprimert størrelse -Attributter -Opprettet -Åpnet -Endret -Kompakt -Kommentert -Kryptert -Oppdeling før -Oppdeling etter -Ordbok -CRC -Type -Anti -Metode -Vert-OS -Filsystem -Bruker -Gruppe -Blokk -Kommentar -Posisjon -Stiprefiks - - - - - - - - - - - - - - - - - - - - - - - - -Feil -Total plass -Ledig plass -Sektorgruppestørrelse -Etikett -Lokalt navn -Forsyner -2100 -Innstillinger -Språk -Språk: -Redigering -&Redigeringsprogram: - -2200 -System -Assosier 7-Zip med: -2301 -Integrer 7-Zip i programmenyen -Forgrenet programmeny -Valg i programmenyen: -2320 - - -Åpne arkiv -Pakk ut … -Legg til arkiv … -Test arkiv -Pakk ut internt -Pakk ut til {0} -Legg til {0} -Komprimer og send med e-post … -Komprimer til {0} og send med e-post -2400 -Mapper -&Arbeidsmappe -Systemets &midlertidige mappe -&Nåværende -&Egendefinert: -Kun for flyttbare stasjoner -Angi plassering for midlertidige filer. -2500 -Innstillinger -Vis element for å gå opp et &nivå -Vis egentlige fil&ikoner -Vis system&meny -Merk &hele rader -Vis &rutenett - -&Alternativ merking -Bruk &store minnesider -2900 -Om 7-Zip -7-Zip er gratis programvare, men du kan støtte utviklingen av 7-Zip ved å registrere deg. -3000 - -Fant ingen feil. -{0} element(er) merket -Klarte ikke opprette mappen «{0}» -Oppdateringsfunksjoner støttes ikke for dette arkivet. -Kan ikke åpne filen «{0}» som arkiv -Kan ikke åpne det krypterte arkivet «{0}». Sjekk at du har riktig passord. - - -Filen «{0}» har blitt endret.\nVil du oppdatere den i arkivet? -Klarte ikke oppdatere filen\n«{0}» -Klarte ikke starte redigeringsprogram. - - - - -For mange elementer -3300 -Pakker ut -Komprimerer -Testing -Åpner … -Skanner … -3400 -Pakk ut -&Pakk ut til: -Angi plassering for filer som skal pakkes ut. -3410 -Filstier -Fullstendige filstier -Ingen filstier -3420 -Overskrivelse -Bekreft før overskrivelse -Overskriv uten bekreftelse -Hopp over filer som finnes allerede -Navngi nye filer automatisk -Navngi filer som finnes automatisk -3500 -Bekreft filoverskrivelse -Den behandlede filen finnes i målmappen allerede. -Vil du overskrive filen -med denne? -{0} byte -Navngi a&utomatisk -3700 -Komprimeringsmetoden støttes ikke for «{0}». -Datafeil i «{0}». Filen er ødelagt. -CRC-feil i «{0}». Filen er ødelagt. -Datafeil i den krypterte filen «{0}». Sjekk at du har riktig passord. -CRC feilet i den krypterte filen «{0}». Sjekk at du har riktig passord. -3800 -Angi passord -Angi passord: -Bekreft passord: -&Vis passord -Passordene er ikke like -Du kan bare bruke engelske bokstaver, tall eller spesialtegn (!, #, $, …) i passordet -Passordet er for langt -Passord -3900 -Tidsforbruk: -Gjenværende tid: -Størrelse: -Hastighet: - - -Feilet: - -4000 -Legg til arkiv -Filn&avn: -&Oppdateringsmetode: -&Format: -Komprimerings&nivå: -Komprimerings&metode: -Ord&bokstørrelse: -&Ordstørrelse: -Solid blokk størrelse: -Antall CPU tråder: -&Parametre: -&Innstillinger -Selvutpakkende arkiv («SF&X») - -Kryptering -Krypteringsmetode: -Kr&ypter filnavn -Minnebruk ved komprimering: -Minnebruk ved dekomprimering: -4050 -Ukomprimert -Raskest -Rask -Normal -Maksimum -Ultra -4060 -Legg til og overskriv filer -Oppdater og legg til filer -Oppdater filer -Synkroniser filer -4070 -Bla gjennom -Alle filer -Ikkje-solid -Solid -6000 -Kopier -Flytt -Kopier til: -Flytt til: -Kopierer … -Flytter … -Navngir … -Velg målmappe. -Operasjonen støttes ikke. -Det oppstod en feil da filen eller mappen skulle navngis -Bekreft at fil skal kopieres -Vil du kopiere filene til arkivet -6100 -Bekreft at fil skal slettes -Bekreft at mappe skal slettes -Bekreft at flere filer skal slettes -Vil du slette «{0}»? -Vil du slette mappen «{0}» med alt innhold? -Vil du slette disse {0} elementene? -Sletter … -Det oppstod en feil da filen eller mappen skulle slettes - -6300 -Ny mappe -Ny fil -Mappenavn: -Filnavn: -Ny mappe -Ny fil -Det oppstod en feil da mappen skulle opprettes -Det oppstod en feil da filen skulle opprettes -6400 -kommentar -&Kommentar: -Merk -Merk ikke -Filter: -6600 - -Mappelogg -Diagnosemeldinger -Melding -7100 -Datamaskin -Nettverk - -System -7200 -Legg til -Pakk ut -Prøv -Kopier -Flytt -Slett -Egenskaper -7300 -Del opp arkiv -&Del opp som: -&Del opp til flere delarkiv i størrelsen: -Deler opp … -Bekreft deling -Er du sikker på at du vil dele arkivet i {0} delarkiv? -Delarkivene må være mindre enn originalarkivet -Ugyldig delarkivstørrelse -Valgt delarkivstørrelse: {0} byte.\nEr du sikker på at du vil dele arkivet med denne størrelsen? -7400 -Sett sammen arkiv -&Sett sammen som: -Setter sammen … -Velg bare det første delarkivet - - -7500 -Beregner sjekksum … -Sjekksuminformasjon -CRC-sjekksum for data: -CRC-sjekksum for data og filnavn: -7600 -Yteprøve -Minnebruk: -Komprimering -Dekomprimering -Ytelse -Samlet ytelse -Nåværende -Resultat -CPU bruk -Ytelse / Bruk -Bestått: diff --git a/Utils/7-Zip/Lang/ne.txt b/Utils/7-Zip/Lang/ne.txt deleted file mode 100644 index 7c3f29cb8..000000000 --- a/Utils/7-Zip/Lang/ne.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.37 : Shiva Pokharel, Mahesh Subedi -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Nepali -नेपाली -401 -ठीक छ -रद्द गर्नुहोस् - - - -&हो -&होइन -&बन्द गर्नुहोस् -मद्दत - -&जारी राख्नुहोस् -440 -&सबैलाई हो -&कसैलाई होइन -रोक्नुहोस् -पुन: सुरु गर्नुहोस् -&पृष्ठभुमि -&अग्रभुमि -&पज गर्नुहोस् -पज गरिएको -तपाईँ रद्द गर्न यकिन हुनुहुन्छ ? -500 -&फाइल -&सम्पादन गर्नुहोस् -&हेर्नुहोस् -&रुचाइएको -&उपकरण -&मद्दत -540 -&खोल्नुहोस् -भित्रपट्टि खोल्नुहोस् -बाहरिपट्टि खोल्नुहोस् -&हेर्नुहोस् -&सम्पादन गर्नुहोस् -पुन: नामकरण गर्नुहोस् -&यसमा प्रतिलिपि बनाउनुहोस्... -&यसमा सार्नुहोस्... -&मेट्नुहोस् -&फाइल विभाजन गर्नुहोस्... -फाइलहरू संयोजन गर्नुहोस्... -&गुण -टिप्पणी -checksum गणना गर्नुहोस् - -फोल्डर सिर्जना गर्नुहोस् -फाइल सिर्जना गर्नुहोस् -निस्कनुहोस् -600 -सबै चयन गर्नुहोस् -सबै मेट्नुहोस् -&चयन उल्टाउनुहोस् -चयन गर्नुहोस्... -चयन हटाउनुहोस्... -प्रकार अनुसार चयन गर्नुहोस् -प्रकार अनुसार चयन हटाउनुहोस् -700 -ठूलो प्रतिमा -सानो प्रतिमा -&सूची -&वर्णन -730 -क्रमबद्ध नगरिएको -फ्ल्याट दृश्य -&२ प्यानल -&उपकरणपट्टी -प्रमूल फोल्डर खोल्नुहोस् -एक स्तर माथि -फोल्डरको इतिहार... -&ताजा गर्नुहोस् -750 -सङ्ग्रह उपकरणपट्टी -मानक उपकरणपट्टी -ठूलो बटन -बटनको पाठ देखाउनुहोस् -800 -&यस रूपमा रूचाइएकोमा फोल्डर थप्नुहोस् -पुस्तकचिनो -900 -&विकल्प... -&बेञ्चमार्क -960 -&सामग्री... -&7-जिपका बारेमा... -1003 -मार्ग -नाम -विस्तार -फोल्डर -साइज -प्याक गरिएको साइज -विशेषता -सिर्जित -पहुँच -परिमार्जित -ठोस -टिप्पणी -गुप्तिकृत -यस पहिले विभाजन गर्नुहोस् -यस पछि विभाजन गर्नुहोस् -शब्दकोश -CRC -प्रकार -बिरोधि -विधि -होस्ट OS -फाइल प्रणाली -प्रयोगकर्ता -समूह -रोक -टिप्पणी -स्थान -मार्ग प्रत्यय - - - - - - - - - - - - - - - - - - - - - - - - -त्रुटि -जम्मा साइज -स्वतन्त्र रिक्तस्थान -समूह साइज -लेबुल -स्थानिय नाम -प्रदायक -2100 -विकल्प -भाषा -भाषा: -सम्पादक -&सम्पादक: - -2200 -प्रणाली -यससँग 7-जिप सम्बन्धित: -2301 -शेल प्रसङ्ग मेनुमा 7-जिप लाई सम्मिलन गर्नुहोस् -सोपानी प्रसङ्ग मेनु -प्रसङ्ग मेनु वस्तु: -2320 - - -सङ्ग्रह खोल्नुहोस् -फाइलहरू निकाल्नुहोस्... -सङ्ग्रहमा थप्नुहोस्... -सङ्ग्रह जाँच्नुहोस् -यहाँ निकाल्नुहोस् -{0} मा निकाल्नुहोस् -{0} मा थप्नुहोस् -सङ्कुचन गरेर इमेल गर्नुहोस्... -{0} मा सङ्कुचन गर्नुहोस् र इमेल गर्नुहोस् -2400 -फोल्डर -&कार्य फोल्डर -&प्रणाली टेम्प(अस्थायी) फोल्डर -&चालू -&निर्दिष्ट: -हटाउन योग्य ड्राइभहरूका लागि मात्र प्रयोग गर्नुहोस् -अस्थायी सङ्ग्रह फाइलका लागि स्थान तोक्नुहोस् । -2500 -सेटिङ -".." वस्तु देखाउनुहोस् -वास्तविक फाइल प्रतिमा देखाउनुहोस् -प्रणाली मेनु देखाउनुहोस् -&पूरा पङ्क्ति चयन -ग्रिड रेखा देखाउनुहोस् - -&वैकल्पिक चयन मोड -ठूलो स्मृति पृष्ठ प्रयोग गर्नुहोस् -2900 -7-जिपका बारेमा -7-जिप निशुल्क सफ्टवेयर हो। यद्यपी,तपाईँले दर्ता गरेर 7-जिपलाई सहयोग गर्न सक्नुहुन्छ । -3000 - -त्यहाँ त्रुटि छैन -{0} वस्तु(हरू) चयन गरियो -'{0}'फोल्डर सिर्जना गर्न सकिदैन -यो सङ्ग्रहका लागि अद्यावधिक सञ्चालन समर्थन गर्दैन - - - - -'{0}'फाइल परिमार्जन गरिएको छ ।\nतपाईँले यसलाई सङ्ग्रहमा अद्यावधिक गर्न चाहनुहुन्छ ? -फाइल अद्यावधिक गर्न सकिदैन\n'{0}' -सम्पादक सुरु गर्न सकिदैन - - - - -धेरै वस्तु -3300 -निकाल्दैछ -सङ्कुचन -परीक्षण -खोल्दैछ... -स्क्यानिङ... -3400 -निकाल्नुहोस् -यसलाई निकाल्नुहोस्: -निकालिएको फाइलका लागि स्थान निर्दिष्ट गर्नुहोस् -3410 -मार्ग मोड -पूरा मार्गनाम -मार्गनामहरू छैन -3420 -अधिलेखन मोड -अधिलेखन गर्नु अगाडि सोध्नुहोस् -प्रोम्टबिना अधिलेखन गर्नुहोस् -अवस्थित फाइलहरू फड्काउनुहोस् -स्वचालित पुन: नामकरण -स्वचालित पुन: नामकरण अवस्थित फाइलहरू -3500 -फाइल प्रतिस्थापन यकिन गर्नुहोस् -गन्तव्य फोल्डरले पहिले नै प्रक्रिया गरिएको फाइल समावेश गर्दछ -अवस्थित फाइलमा प्रतिस्थापन गर्न चाहनुहुन्छ -योसँग? -{0} बाइट -स्वचालित पुन: नामकरण -3700 -'{0}'का लागि असमर्थित सङ्कुचन विधि -'{0}'लगत त्रुटि । फाइल बिग्रेको छ -'{0}' मा CRC असफल । फाइल बिग्रेको छ - - -3800 -पासवर्ड प्रविष्ट गर्नुहोस् -पासवर्ड प्रविष्ट गर्नुहोस्: - -&पासवर्ड देखाउनुहोस् - - - -पासवर्ड -3900 -व्यतीत समय: -पुन: नामकरण समय: -साइज: -गति: - - -त्रुटि: - -4000 -सङ्ग्रहमा थप्नुहोस् -&सङ्ग्रह: -&अद्यावधिक मोड: -सङ्ग्रह ढाँचा: -सङ्कुचन स्तर: -सङ्कुचन विधि: -&शब्दकोश साइज: -&शब्द साइज: - - -&परिमिति: -विकल्प -SF&X सङ्ग्रह सिर्जना गर्नुहोस् - - - -फाइलनाम गुप्तिकरण गर्नुहोस् -सङ्कुचनका लागि स्मृति प्रयोग: -असङ्कुचनका लागि स्मृति प्रयोग: -4050 -भण्डार गर्नुहोस् -सब भन्दा छिटो -छिटो -साधारण -अधिकतम -अत्यन्त -4060 -फाइल थपेर प्रतिस्थापन गर्नुहोस् -फाइलहरू अद्यावधिक गरेर थप्नुहोस् -अवस्थित फाइल ताजा गर्नुहोस् -फाइल समक्रमण गर्नुहोस् -4070 -ब्राउज गर्नुहोस् -सबै फाइल - - -6000 -प्रतिलिपि गर्नुहोस् -सार्नुहोस् -यसमा प्रतिलिपि गर्नुहोस्: -यसमा सार्नुहोस्: -प्रतिलिपि गर्दैछ... -सार्दैछ... -पुन: नामकरण... - -सञ्चालन समर्थन गर्दैन -फाइल वा फोल्डर पुन: नामकरण गर्दा त्रुटि -फाइल प्रतिलिपि गर्न यकिन गर्नुहोस् -तपाईँ फाइलहरू सङ्ग्रहमा प्रतिलिपि गर्न निश्चित हुनुहुन्छ -6100 -फाइल मेट्न यकिन गर्नुहोस् -फोल्ड मेट्न यकिन गर्नुहोस् -बहुविध फाइल मेट्न यकिन गर्नुहोस् -तपाईँ '{0}'मेट्न निश्चित हुनुहुन्छ ? -तपाईँ '{0}' फोल्डर यसको सबै सामग्री मेट्न निश्चित हुनुहुन्छ ? -तपाईँ {0} वस्तुहरू मेट्न निश्चित हुनुहुन्छ ? -मेट्दैछ... -फाइल वा फोल्डर मेट्दा त्रुटि - -6300 -फोल्डर सिर्जना गर्नुहोस् -फाइल सिर्जना गर्नुहोस् -फोल्डर नाम: -फाइल नाम: -नयाँ फोल्डर -नयाँ फाइल -फोल्डर सिर्जना गर्दा त्रुटि -फाइल सिर्जना गर्दा त्रुटि -6400 -टिप्पणी -&टिप्पणी: -चयन गर्नुहोस् -चयन हटाउनुहोस् -मास्क: -6600 - -फोल्डर इतिहार -निदानात्मक सन्देश -सन्देश -7100 -कम्प्युटर -सञ्जाल - -प्रणाली -7200 -थप्नुहोस् -निकाल्नुहोस् -परीक्षण गर्नुहोस् -प्रतिलिपि गर्नुहोस् -सार्नुहोस् -मेट्नुहोस् -सूचना -7300 -फाइल विभाजन गर्नुहोस् -&यसमा विभाजन गर्नुहोस्: -भोल्युम, बाइटमा विभाजन गर्नुहोस्: -विभाजन गर्दैछ... - - - - - -7400 -फाइल संयोजन गर्नुहोस् -&यसमा संयोजन गर्नुहोस्: -संयोजन गर्दैछ... - - - -7500 -Checksum गणना गर्दैछ... -Checksum सूचना -लगतका लागि CRC checksum: -लगत र नामहरूका लागि CRC checksum: -7600 -बेञ्चमार्क -स्मृति उपयोग: -सङ्कुचन -असङ्कुचन -दर -जम्मा दर -हालको -नतिजा - - -पास: diff --git a/Utils/7-Zip/Lang/nl.txt b/Utils/7-Zip/Lang/nl.txt deleted file mode 100644 index c91ecdffa..000000000 --- a/Utils/7-Zip/Lang/nl.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; : Bert van Velsen -; 4.26 : Jeroen van der Weijde. -; : Harm Hilvers -; 9.07 : Jeroen Tulp -; 15.00 : Jeroen Tulp -; -; -; -; -; -; -0 -7-Zip -Dutch -Nederlands -401 -OK -Annuleren - - - -&Ja -&Nee -A&fsluiten -Help - -&Hervatten -440 -Ja op &alles -Nee op a&lles -Stop -Herstarten -&Achtergrond -&Voorgrond -&Pauzeren -Gepauzeerd -Weet u zeker dat u wilt annuleren? -500 -&Bestand -Be&werken -Bee&ld -&Favorieten -E&xtra -&Help -540 -&Openen -Open B&innen -Open B&uiten -Bee&ld -&Bewerken -&Hernoemen -&Kopiëren naar... -&Verplaatsen naar... -Verwij&deren -Bestand &opsplitsen... -Bestanden &samenvoegen... -&Eigenschappen -O&pmerking -&Checksum berekenen -Ver&gelijken -Nieuwe &map -&Nieuw bestand -&Sluiten -Koppe&ling -&Alternate Streams -600 -&Alles selecteren -A&lles de-selecteren -Selectie &omkeren -&Selecteer... -&De-selecteer... -Selecteer op &type -De-selecteer op t&ype -700 -&Grote pictogrammen -&Kleine pictogrammen -&Lijst -&Details -730 -&Ongesorteerd -&Platte weergave -&2 Panelen -&Werkbalken -&Root map openen -Één &niveau omhoog -&Mappen Geschiedenis... -&Verversen -&Automatisch verversen -750 -&Archief werkbalk -&Standaard werkbalk -Grote kn&oppen -Knop&tekst weergeven -800 -&Map toevoegen aan Favorieten -Favoriet maken -900 -&Opties... -&Benchmark -960 -&Inhoud... -&Over 7-Zip... -1003 -Pad -Naam -Extensie -Map -Grootte -Ingepakte grootte -Kenmerken -Aangemaakt -Laatst geopend -Gewijzigd -Compact -Commentaar -Gecodeerd -Gesplitst voor -Gesplitst na -Woordenboek - -Type -Anti -Methode -Gastheer OS -Bestandssysteem -Gebruiker -Groep -Blok -Commentaar -Positie -Pad Prefix -Mappen -Bestanden -Versie -Volume -Multivolume -Offset -Koppelingen -Blokken -Volumes - -64-bit -Big-endian -CPU -Fysieke grootte -Kop grootte -Checksum -Karakteristieken -Virtueel Adres -ID -Korte Naam -Aanmaak Applicatie -Sector Grootte -Modus -Symbolische Kpoppeling -Fout -Capaciteit -Beschikbaar -Clustergrootte -Label -Lokale naam -Provider -NT Beveiliging -Alternate Stream -Aux -Verwijderd -Is Structuur - - -Error Type -Errors -Errors -Waarschuwingen -Waarschuwing -Streams -Alternate Streams -Alternate Streams Grootte -Virtuele Grootte -Uitgepakte Grootte -Totale Fysieke Grootte -Volume Index -SubType -Kort Commentaar -Tekstcodering - - - -Tail Grootte -Embedded Stub Grootte -Koppeling -Harde Koppeling -iNode - -Alleen-lezen -2100 -Opties -Taal -Taal: -Editor -&Editor: -&Vergelijken: -2200 -Systeem -Associeer 7-Zip met: -All users -2301 -7-Zip in het contextmenu integreren. -Trapsgewijs contextmenu -Contextmenu items: -Pictogrammen in contexmenu -2320 - - -Open archief -Bestanden uitpakken... -Toevoegen aan archief... -Testen archief -Uitpakken (hier) -Uitpakken naar {0} -Toevoegen aan {0} -Comprimeer en verstuur... -Comprimeer naar {0} en verstuur -2400 -Mappen -&Werkmap -&Tijdelijke systeemmap -&Huidige -&Gespecificeerd: -Alleen voor verwisselbare schijven gebruiken. -Specificeer een locatie voor tijdelijke archiefbestanden. -2500 -Instellingen -Toon ".." &item -Toon &echte bestandspictogrammen -Toon &systeem contextmenu -&Selecteer gehele rij -Toon &rasterlijnen -Enkele klik om een item te openen -&Alternatieve selectiemodus -&Gebruik grote geheugenpagina's -2900 -Over 7-Zip -7-Zip is gratis software. Echter, u kunt de ontwikkeling van 7-Zip ondersteunen door u te registreren. -3000 -Het systeem kan de benodigde hoeveelheid geheugen niet alloceren -Er zijn geen fouten. -{0} item(s) geselecteerd -Kan map '{0}' niet aanmaken. -Bijwerkfuncties niet ondersteund voor dit archief. -Kan bestand '{0}' niet openen als archief. -Kan het gecodeerde archief '{0}' niet openen. Verkeerd wachtwoord? -Niet ondersteund archief type -Bestand {0} bestaat reeds -Bestand '{0}' is gewijzigd.\nWilt u het bijwerken in het archief? -Kan bestand\n'{0}' niet bijwerken. -Kan de editor niet starten. -Het bestand lijkt op een virus (het bevat veel opeenvolgende spaties in de naam). -De actie kan niet worden uitgevoerd vanuit een folder met een dermate lang pad. -U moet 1 bestand selecteren -U moet 1 of meerdere bestanden selecteren -Te veel items -Kan het bestand niet openen als {0} archief -Het bestand is geopend als {0} archief -Het archiefis geopend met een offset -3300 -Uitpakken -Comprimeren -Testen -Openen... -Scannen... -Verwijderen -3320 -Toevoegen -Bijwerken -Analyseren -Repliceren -Opnieuw inpakken -Overslaan -Verwijderen -Kop aanmaken -3400 -&Uitpakken -U&itpakken naar: -Specificeer een locatie voor de uitgepakte bestanden. -3410 -Padmethode -Volledige padnamen -Geen padnamen -Absolute padnamen -Relatieve padnamen -3420 -Overschrijfmethode -Vraag voor overschrijven -Overschrijven zonder bevestiging -Bestaande bestanden overslaan -Automatisch hernoemen -Automatisch hernoemen van bestaande bestanden -3430 -Verwijder duplicaat van de hoofdmap -Herstellen bestandsbeveiliging -3500 -Bevestig vervangen bestand -Doelmap bevat reeds het verwerkte bestand. -Wilt u het bestaande bestand vervangen -door dit bestand? -{0} bytes -A&utomatisch hernoemen -3700 -Niet ondersteunde compressiemethode voor '{0}'. -Gegevensfout in '{0}'. Bestand is beschadigd. -CRC mislukt in '{0}'. Bestand is beschadigd. -Gegevensfout in het gecodeerde bestand '{0}'. Verkeerd wachtwoord? -CRC mislukt in het gecodeerde bestand '{0}'. Verkeerd wachtwoord? -3710 -Verkeerd wachtwoord? -3721 -Niet ondersteunde compresssiemethode -Gegevens fout -CRC mislukt -Data niet beschikbaar -Data eindigd onverwachts -Er is nog wat data na het einde van de payload data -Is geen archief -Kop Error -Verkeerd wachtwoord -3763 -Start van archief is niet beschikbaar -Start van archief is niet bevestigd - - - -Niet ondersteunde functie -3800 -Wachtwoord ingeven -Wachtwoord &ingeven: -Wachtwoord bevestigen: -Wachtwoord &tonen -Wachtwoorden komen niet overeen. -Gebruik alleen alfanumerieke en speciale karakters (!, #, $, ...) voor het wachtwoord -Wachtwoord is te lang. -&Wachtwoord -3900 -Verstreken tijd: -Overgebleven tijd: -Grootte: -Snelheid: -Verwerkt: -Compressie verhouding: -Fouten: -Archieven: -4000 -Toevoegen aan archief -&Archief: -&Bijwerkmethode: -Archief &formaat: -Compressie&niveau: -Compressie&methode: -&Woordenboekgrootte: -W&oordgrootte: -Compacte b&lokgrootte: -Aantal CP&U-threads: -&Parameters: -Opties -SF&X archief maken -Comprimeer &gedeelde bestanden -Codering -Cod&eermethode: -Codee&r bestandsnamen -Geheugengebruik bij het inpakken: -Geheugengebruik bij het uitpakken: -Verwijder bestanden na inpakken -4040 -Symboische koppelingen opslaan -Harde koppelingen opslaan -Alternate data streams opslaan -Bestandsbeveiliging opslaan -4050 -Opslaan -Snelst -Snel -Normaal -Maximum -Ultra -4060 -Bestanden toevoegen en vervangen -Bestanden bijwerken en toevoegen -Bestaande bestanden opfrissen -Bestanden synchroniseren -4070 -Bladeren -Alle bestanden -Niet compact -Compact -6000 -Kopiëren -Verplaatsen -Kopiëren naar: -Verplaatsen naar: -Bezig met kopiëren... -Bezig met verplaatsen... -Bezig met hernoemen... -Selecteer een doelmap. -Functie wordt niet ondersteund. -Fout bij het hernoemen van een bestand of map -Bevestig kopiëren van bestand -Weet u zeker dat u deze bestanden naar het archief wilt kopiëren -6100 -Verwijdering bestand bevestigen -Verwijdering map bevestigen -Verwijdering van meerdere bestanden bevestigen -Weet u zeker dat u '{0}' wilt verwijderen? -Weet u zeker dat u de map '{0}' en alle onderliggende items wilt verwijderen? -Weet u zeker dat u deze {0} items wilt verwijderen? -Bezig met verwijderen... -Fout bij het verwijderen van een bestand of map -Het systeem kan een bestand met een lang pad niet verplaatsen naar de Prullenbak -6300 -Map maken -Bestand maken -Naam van de map: -Bestandsnaam: -Nieuwe map -Nieuw bestand -Fout bij het maken van de map -Fout bij het maken van het bestand. -6400 -Opmerking -&Opmerking: -Selecteren -De-selecteren -Masker: -6600 -Eigenschappen -Mappen Geschiedenis -Diagnostische berichten -Bericht -7100 -Computer -Netwerk -Documenten -Systeem -7200 -Toevoegen -Uitpakken -Testen -Kopiëren -Verplaatsen -Verwijderen -Info -7300 -Opsplitsen bestand -&Opsplitsen naar: -Opsplitsen in &volumes (grootte in bytes): -Bezig met opsplitsen... -Bevestigen opsplitsen -Weet u zeker dat u het bestand wilt opsplitsen in {0} volumes? -De volumegrootte moet kleiner zijn dan de grootte van het oorspronkelijke bestand. -Verkeerde volumegrootte -Gespecificeerde volumegrootte: {0} bytes.\nWeet u zeker dat u het archief zo wilt splitsen? -7400 -Bestanden samenvoegen -&Samenvoegen naar: -Bezig met samenvoegen... -Selecteer alleen het eerste bestand. -Kan het bestand niet herkennen als onderdeel van een gesplitst bestand -Kan niet meer dan 1 deel van een gesplitst bestand -7500 -Bezig met checksum berekenen... -Checksum informatie -CRC checksum voor gegevens: -CRC checksum voor gegevens en namen: -7600 -Benchmark -Geheugengebruik: -Inpakken -Uitpakken -Waarde -Totale waarde -Huidig -Resultaat -CPU-gebruik -Waarde / gebruik -Doorgangen: -7700 -Koppeling -Koppeling -Koppeling van: -Koppeling naar: -7710 -Koppeling Type -Harde Koppeling -Bestand Symbolische Koppeling -Map Symbolische Koppeling -Mapsplitsing diff --git a/Utils/7-Zip/Lang/nn.txt b/Utils/7-Zip/Lang/nn.txt deleted file mode 100644 index bcd7fc8ab..000000000 --- a/Utils/7-Zip/Lang/nn.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.45 : Robert Grønning -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Norwegian Nynorsk -Norsk Nynorsk -401 -OK -Avbryt - - - -&Ja -&Nei -&Lukke -Hjelp - -&Hald fram -440 -Ja til &alt -N&ei til alt -Stopp -Start på nytt -&Bakgrunn -&Forgrunn -&Pause -Sett på pause -Er du sikker på du vil avbryte? -500 -&Fil -&Redigere -&Vis -F&avorittar -Verk&tøy -&Hjelp -540 -&Opna -Opna &Inni -Opna &Utanfor -&Vis -&Redigere -Endra &namn -&Kopiere til... -&Flytt til... -&Slett -&Del opp fil... -Set saman filer... -&Eigenskapar -Ko&mmentar -Rekna ut kontrollnummer - -Opprett mappe -Opprett fil -&Avslutta -600 -&Merk alle -Fjern alle markeringar -&Omvendt markering -Marker... -Fjern markering... -Merk etter type -Fjern markering etter type -700 -S&tore ikon -S&må ikon -&Lista -&Detaljar -730 -Assortert -Flat vising -&2 felt -&Verktøylinjer -Opna kjeldemappa -Opp eit nivå -Mappelogg... -&Oppdatere -750 -Arkiv verktøylinje -Standard verktøylinjer -Store knappar -Vis knappetekst -800 -&Legg mappe til i favorittar som -Bokmerke -900 -&Val... -&Yting test -960 -&Innhold... -&Om 7-Zip... -1003 -Bane -Namn -Fil etternamn -Mappe -Størrelse -Komprimert Størrelse -Eigenskapar -Oppretta -Opna -Endra -Solid -Kommentert -Kryptert -Delt før -Delt etter -Ordbok -CRC -Type -Anti -Metode -Vert OS -Filsystem -Brukar -Gruppe -Blokkering -Kommentar -Posisjon -Bane prefiks - - - - - - - - - - - - - - - - - - - - - - - - -Feil -Total størrelse -Ledig plass -Klyngje størrelse -Etikett -Lokalt namn -Leverandør -2100 -Val -Språk -Språk: -Redigeringsprogram -&Redigeringsprogram: - -2200 -System -Forbind 7-Zip med: -2301 -Legg inn 7-Zip i programmenyen -Forgreina programmeny -Programmeny val: -2320 - - -Opna arkiv -Pakk ut filer... -Legg til i arkiv... -Test arkiv -Pakk ut her -Pakk ut til {0} -Legg til i {0} -Komprimere og send som epost... -Komprimere til {0} og send som epost -2400 -Mapper -&Arbeidsmappe -&Midlertidig mappe -&Noverande -&Eigendefinert: -Berre for flyttbare stasjonar -Oppgje plassering for midlertidige arkiv filer. -2500 -Innstillingar -Vis ".." element -Vis dei ordentlege fil ikona -Vis system meny -&Merk heile rader -Vis &rutenett - -&Alternativ markerings modus -Bruk &store minnesider -2900 -Om 7-Zip -7-Zip er fri programvare. Du kan støtta utviklinga av 7-Zip ved å registrere deg. -3000 - -Ingen feil -{0} objekt(ar) valt -Kan ikkje oppretta mappe '{0}' -Dette arkivet manglar støtte for å kunne oppdaterast. -Kan ikkje opna fila '{0}' som eit arkiv -Kan ikkje opna det krypterte arkivet '{0}'. Feil passord? - - -Fila '{0}' blei endra.\nVil du oppdatere den i arkivet? -Kan ikkje oppdatere fil\n'{0}' -Kan ikkje starta redigeringsprogram. - - - - -For mange gonger -3300 -Pakkar ut -Komprimerer -Testing -Opnar... -Undersøkjer... -3400 -Pakk ut -Pakk ut &til: -Vel ei mappe for ut-pakka filer. -3410 -Bane modus -Fulstendig banenamn -Ingen banenamn -3420 -Overskriving modus -Bekrefta før overskriving -Skriv over utan bekrefting -Hopp over eksisterande filer -Endra filnamn automatisk -Endra filnamn automatisk for eksisterande filer -3500 -Bekrefta overskriving av fil -Målmappa inneheld allereie ei behandla fil. -Vil du overskriva den eksisterande fila -med denne? -{0} byte -&Skift filnamn automatisk -3700 -Kompresjonsmetoden er ikkje støtta for '{0}'. -Data feil i '{0}'. Fila er øydelagt. -CRC feila på '{0}'. Fila er øydelagt. -Data feil i den krypterte fila '{0}'. Feil passord? -CRC feila i den krypterte fila '{0}'. Feil passord? -3800 -Skriv inn passord -Skriv inn passord: -Skriv inn passordet på nytt: -&Vis passord -Passorda er ikkje like -Bruk berre Engelske bokstavar, tal og spesielle teikn (!, #, $, ...) i passordet -Passordet er for langt -Passord -3900 -Tid brukt: -Tid gjenstår: -Størrelse: -Fart: - - -Feil: - -4000 -Legg til i arkiv -&Arkiv: -&Oppdaterings modus: -Arkiv &format: -Kompresjons &nivå: -Kompresjons &metode: -O&rdbok størrelse: -Or&d størrelse: -Solid blokk størrelse: -Anntal CPU tråder: -&Parameter: -Val -Opprett SF&X arkiv - -Krypter -Krypter metode: -&Krypter filnamn -Minnebruk ved kompresjon: -Minnebruk ved ut-pakking: -4050 -Lagre -Raskast -Rask -Normal -Maksimum -Ekstrem -4060 -Legg til og skriv over filer -Oppdatere og legg til filer -Frisk opp eksisterande filer -Synkroniser filer -4070 -Bla igjennom -Alle filer -Ikkje-solid -Solid -6000 -Kopiere -Flytt -Kopiere til: -Flytt til: -Kopierer... -Flyttar... -Endrar namn... -Vel målmappe. -Støttar ikkje handlinga. -Feil ved endring av namn på fil eller mappe -Godkjenne filkopiering -Er du sikker på at du vil kopiere filer til arkiv -6100 -Godkjenne sletting av fil -Godkjenne sletting av mappe -Godkjenne sletting av fleire filer -Er du sikker på at du vil sletta '{0}'? -Er du sikker på at du vil sletta mappa '{0}' og alt innhold i den? -Er du sikker på at du vil sletta desse {0} elementa? -Slettar... -Feil ved sletting av fil eller mappe - -6300 -Opprett mappe -Opprett fil -Mappe namn: -Filnamn: -Ny mappe -Ny fil -Feil ved oppretting av mappe -Feil ved oppretting av fil -6400 -Kommentar -&Kommentar: -Marker -Fjern markering -Maske: -6600 - -Mappe logg -Diagnose meldingar -Melding -7100 -Datamaskin -Nettverk - -System -7200 -Legg til -Pakk ut -Test -Kopiere -Flytt -Slett -Informasjon -7300 -Del opp fil -&Del opp til: -Splitt opp i deler, byte: -Delar opp... -Godkjenne oppdeling -Er du sikker på at du vil dele opp fila i {0} delar? -Størrelsen på delane må vera mindre enn størrelsen på originalfila -Feil del-størrelse -Oppgitt del-størrelse: {0} byte.\nEr du sikker på du vil dele arkivet opp i slike deler? -7400 -Slå saman filer -&Slå saman til: -Slår saman... -Berre vel den første fila - - -7500 -Reknar ut kontrollnummer... -Informasjon om kontrollnummer -CRC kontrollnummer for data: -CRC kontrollnummer for data og namn: -7600 -Yting test -Minnebruk: -Kompresjon -Ut-pakking -Yting -Total yting -Noverande -Resultat -CPU bruk -Yting / Bruk -Gonger: diff --git a/Utils/7-Zip/Lang/pa-in.txt b/Utils/7-Zip/Lang/pa-in.txt deleted file mode 100644 index 8633ed4fb..000000000 --- a/Utils/7-Zip/Lang/pa-in.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.53 : Gurmeet Singh Kochar -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Punjabi, Indian -ਪੰਜਾਬੀ -401 -ਠੀਕ ਹੈ -ਰੱਦ ਕਰੋ - - - -ਹਾਂ (&Y) -ਨਹੀਂ (&N) -ਬੰਦ ਕਰੋ (&C) -ਮੱਦਦ - -ਜਾਰੀ ਕਰੋ (&C) -440 -ਸਾਰਿਆਂ ਲਈ ਹਾਂ (&A) -ਸਾਰਿਆਂ ਲਈ ਨਹੀਂ (&l) -ਰੁਕੋ -ਮੁੜ ਚਾਲੂ ਕਰੋ -ਬੈਕਗਰਾਉਂਡ (&B) -ਫੋਰਗਰਾਉਂਡ (&F) -ਪੋਜ਼ (&P) -ਪੋਜ਼ ਹੋਇਆ -ਕੀ ਤੁਸੀਂ ਨਿਸ਼ਚਿੱਤ ਹੀ ਰੱਦ ਕਰਨਾ ਚਾਹੁੰਦੇ ਹੋ? -500 -ਫਾਇਲ (&F) -ਸੋਧ (&E) -ਵੇਖੋ (&V) -ਪਸੰਦੀਦਾ (&a) -ਸੰਧ (&T) -ਮੱਦਦ (&H) -540 -ਖੋਲੋ (&O) -ਅੰਦਰ ਖੋਲੋ (&I) -ਬਾਹਰ ਖੋਲੋ (&u) -ਵਿਖਾਓ (&V) -ਸੋਧ ਕਰੋ (&E) -ਨਾਂ ਬਦਲੋ (&m) -ਨਵੇਂ ਟਿਕਾਣੇ ਤੇ ਨਕਲ ਉਤਾਰੋ (&C)... -ਨਵੇਂ ਟਿਕਾਣੇ ਤੇ ਭੇਜੋ (&M)... -ਹਟਾਓ (&D) -ਫਾਇਲ ਹਿੱਸਿਆਂ ਵਿੱਚ ਵੰਡੋ (&S)... -ਫਾਇਲ ਦੇ ਹਿੱਸੇ ਜੋੜੋ (&b)... -ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ (&r) -ਟਿੱਪਣੀ (&n) -ਚੈਕਸੱਮ ਗਣਨਾ ਕਰੋ - -ਫੋਲਡਰ ਬਣਾਓ -ਫਾਇਲ ਬਣਾਓ -ਬਾਹਰ ਨਿਕਲੋ (&x) -600 -ਸਭ ਚੁਣੋ (&A) -ਸਭ ਚੋਣ ਰੱਦ ਕਰੋ -ਉਲਟ ਚੋਣ ਕਰੋ (&I) -ਚੁਣੋ... -ਚੋਣ ਰੱਦ ਕਰੋ... -ਕਿਸਮ ਨਾਲ ਚੁਣੋ ਕਰੋ -ਕਿਸਮ ਨਾਲ ਚੋਣ ਰੱਦ ਕਰੋ -700 -ਵੱਡੇ ਆਈਕਾਨ (&g) -ਛੋਟੇ ਆਈਕਾਨ (&m) -ਸੂਚੀ (&L) -ਵੇਰਵੇ ਸਹਿਤ (&D) -730 -ਨਾ ਕ੍ਰਮ-ਬੱਧ -ਫਲੈਟ ਦ੍ਰਿਸ਼ -&2 ਪੈਨਲ -ਟੂਲਬਾਰ (&T) -ਰੂਟ ਫੋਲਡਰ ਖੋਲੋ -ਇੱਕ ਪੱਧਰ ਉੱਤੇ -ਫੋਲਡਰ ਅਤੀਤ... -ਤਾਜ਼ਾ ਕਰੋ(&R) -750 -ਆਕਾਈਵ ਟੂਲਬਾਰ -ਸਧਾਰਨ ਟੂਲਬਾਰ -ਵੱਡੇ ਬਟਨ -ਬਟਨ ਟੈਕਸਟ ਵਿਖਾਓ -800 -ਫੋਲਡਰ ਪਸੰਦੀਦਾ ਵਿੱਚ ਸ਼ਾਮਲ ਕਰੋ (&A) -ਬੁੱਕਮਾਰਕ -900 -ਚੋਣਾਂ (&O)... -ਬੈਂਚਮਾਰਕ (&B) -960 -ਵਿਸ਼ਾ ਸੂਚੀ (&C)... -7-ਜ਼ਿੱਪ ਬਾਰੇ (&A)... -1003 -ਮਾਰਗ -ਨਾਂ -ਐਕਸਟੈਂਸ਼ਨ -ਫੋਲਡਰ -ਸਾਈਜ਼ -ਪੈਕਡ ਸਾਈਜ਼ -ਲੱਛਨ -ਬਣਤਰ ਸਮਾਂ -ਪਹੁੰਚ ਸਮਾਂ -ਸੋਧ ਸਮਾਂ -ਠੋਸ -ਟਿੱਪਣੀ -ਐਨਕ੍ਰਿਪਟਡ -Split Before -Split After -ਡਿਕਸ਼ਨਰੀ -ਸੀ-ਆਰ-ਸੀ (CRC) -ਕਿਸਮ -ਐਂਟੀ (Anti) -ਢੰਗ -ਮੇਜ਼ਬਾਨ ਔ-ਐੱਸ -ਫਾਇਲ ਸਿਸਟਮ -ਯੂਜ਼ਰ -ਸਮੂਹ -ਬਲੋਕ -ਟਿੱਪਣੀ -ਸਥਿੱਤੀ -ਮਾਰਗ ਅਗੇਤਰ -ਫੋਲਡਰ -ਫਾਇਲਾਂ -ਵਰਜਨ -ਵੋਲੁੱਮ -ਮਲਟੀਵੋਲੁੱਮ -ਔਫ਼ਸੈਟ -ਲਿੰਕ -ਬਲੋਕ -ਵੋਲੁੱਮ - - - - - - - - - - - - - - - -ਸਮੱਸਿਆ -ਕੁੱਲ ਸਾਈਜ਼ -ਖ਼ਾਲੀ ਥਾਂ -ਕਲੱਸਟਰ ਸਾਈਜ਼ -ਲੇਬਲ -ਸਥਾਨਕ ਨਾਂ -ਉਪਲੱਬਧ ਕਰਤਾ -2100 -ਚੋਣਾਂ -ਭਾਸ਼ਾ -ਭਾਸ਼ਾ: -ਐਡੀਟਰ -ਟੈਕਸਟ ਐਡੀਟਰ (&E): - -2200 -ਸਿਸਟਮ -7-ਜ਼ਿੱਪ ਨਾਲ ਹੇਠਾਂ ਦਿੱਤੇ ਫਾਇਲ ਐਕਸਟੈਂਸ਼ਨ ਜੋੜੋ: -2301 -ਸ਼ੈੱਲ ਕੰਨਟੈਕਸਟ ਮੇਨੂੰ ਨਾਲ 7-ਜ਼ਿੱਪ ਨੂੰ ਏਕੀਕਿਰਤ ਕਰੋ -ਕੈਸਕੇਡਡ ਕੰਨਟੈਕਸਟ ਮੇਨੂੰ -ਕੰਨਟੈਕਸਟ ਮੇਨੂੰ ਆਈਟਮਾਂ: -2320 -<ਫੋਲਡਰ> -<ਆਕਾਈਵ> -ਆਕਾਈਵ ਖੋਲੋ -ਫਾਇਲਾਂ ਕੱਡੋ... -ਆਕਾਈਵ ਵਿੱਚ ਸ਼ਾਮਲ ਕਰੋ... -ਆਕਾਈਵ ਪਰਖੋ -ਫਾਇਲਾਂ ਇੱਥੇ ਕੱਡੋ -{0} ਵਿੱਚ ਕੱਡੋ -{0} ਵਿੱਚ ਸ਼ਾਮਲ ਕਰੋ -ਨਪੀੜੋ ਅਤੇ ਈਮੇਲ ਕਰੋ... -{0} ਵਿੱਚ ਨਪੀੜੋ ਅਤੇ ਈਮੇਲ ਕਰੋ -2400 -ਫੋਲਡਰ -ਵਰਕਿੰਗ ਫੋਲਡਰ (&W) -ਸਿਸਟਮ ਆਰਜ਼ੀ (temp) ਫੋਲਡਰ (&S) -ਇਸ ਸਮੇਂ ਚੁਣਿਆ (&C) -ਹੇਠਾਂ ਦਿੱਤਾ ਗਿਆ (&S): -ਸਿਰਫ਼ ਹਟਾਈ ਜਾ ਸੱਕਨ ਵਾਲੀਆਂ ਡਰਾਈਵ ਲਈ ਵਰਤੋਂ ਕਰੋ -ਆਰਜ਼ੀ ਆਕਾਈਵ ਫਾਇਲਾਂ ਲਈ ਟਿਕਾਣਾ ਦੱਸੋ। -2500 -ਸੈਟਿੰਗ -".." ਆਈਟਮ ਵਿਖਾਓ -ਅਸਲੀ ਫਾਇਲ ਆਈਕਾਨ ਵਿਖਾਓ -ਸਿਸਟਮ ਮੇਨੂੰ ਵਿਖਾਓ -ਪੂਰੀ ਕਤਾਰ ਚੁਣੋ (&F) -ਗ੍ਰਿਡ ਲਾਈਨਾਂ ਵਿਖਾਓ (&g) - -ਵਿਕਲਪਕ ਚੁਣਾਓ ਢੰਗ (&A) -ਵੱਡੇ ਮੈਮੋਰੀ ਪੇਜ ਵਰਤੋ (&l) -2900 -7-ਜ਼ਿੱਪ ਬਾਰੇ -7-ਜ਼ਿੱਪ ਇੱਕ ਮੁਫ਼ਤ ਸਾਫ਼ਟਵੇਅਰ ਹੈ। ਪਰ ਫੇਰ ਵੀ, ਤੁਸੀਂ ਰਜਿਸਟਰ ਕਰਕੇ 7-ਜ਼ਿੱਪ ਦੇ ਵਿਕਾਸ ਵਿੱਚ ਸਮਰਥਨ ਪਾ ਸੱਕਦੇ ਹੋ।\n\nਪੰਜਾਬੀ ਵਿੱਚ ਅਨੁਵਾਦ ਕੀਤਾ (Translation Done By):\nGurmeet Singh Kochar (ਗੁਰਮੀਤ ਸਿੰਘ ਕੋਚਰ)\n -3000 - -ਕੋਈ ਸਮੱਸਿਆਵਾਂ ਨਹੀਂ ਹਨ -ਚੁਣੇ ਪਦਾਰਥ: {0} -'{0}' ਫੋਲਡਰ ਨਹੀਂ ਬਣਾਇਆ ਜਾ ਸੱਕਿਆ -ਅੱਪਡੇਟ ਔਪਰੇਸ਼ਨ ਇਸ ਆਕਾਈਵ ਲਈ ਸਹਿਯੋਗੀ ਨਹੀਂ ਹਨ। -'{0}' ਫਾਇਲ ਨੂੰ ਆਕਾਈਵ ਤਰ੍ਹਾਂ ਨਹੀਂ ਖੋਲਿਆ ਜਾ ਸੱਕਿਆ -'{0}' ਐਨਕ੍ਰਿਪਟਡ ਆਕਾਈਵ ਨਹੀਂ ਖੋਲਿਆ ਜਾ ਸੱਕਿਆ। ਗਲ਼ਤ ਪਾਸਵਰਡ? - - -'{0}' ਫਾਇਲ ਸੋਧ ਦਿੱਤੀ ਗਈ ਹੈ।\nਕੀ ਤੁਸੀਂ ਉਸਨੂੰ ਆਕਾਈਵ ਵਿੱਚ ਅੱਪਡੇਟ ਕਰਨਾ ਚਾਹੁੰਦੇ ਹੋ? -ਫਾਇਲ ਅੱਪਡੇਟ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸੱਕੀ\n'{0}' -ਐਡੀਟਰ ਚਾਲੂ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸੱਕਿਆ। - - - - -ਬਹੁੱਤ ਸਾਰੀਆਂ ਆਈਟਮਾਂ -3300 -ਕੱਡੀਆਂ ਜਾ ਰਹੀਆਂ ਹਨ -ਨਪੀੜਨ ਕਾਰਜ ਚੱਲ ਰਿਹਾ ਹੈ -ਪਰਖ ਚੱਲ ਰਹੀ ਹੈ -ਖੋਲੀ ਜਾ ਰਹੀ ਹੈ... -ਸਕੈਨ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ... -3400 -ਕੱਡੋ -ਇੱਥੇ ਕੱਡੋ (&x): -ਕੱਡੀਆਂ ਜਾਉਣ ਵਾਲੀਆਂ ਫਾਇਲਾਂ ਲਈ ਟਿਕਾਣਾ ਦੱਸੋ। -3410 -ਮਾਰਗ ਢੰਗ -ਪੂਰੇ ਮਾਰਗ ਨਾਂ -ਕੋਈ ਮਾਰਗ ਨਾਂ ਨਹੀਂ -3420 -ਉਪਰੀਲੇਖਨ ਢੰਗ -ਉਪਰੀਲੇਖਨ ਤੋਂ ਪਹਿਲਾਂ ਤਸਦੀਕ -ਬਿਨ੍ਹਾਂ ਤਸਦੀਕ ਉਪਰੀਲੇਖਨ -ਮੌਜੂਦਾ ਫਾਇਲਾਂ ਨਾਂ ਕੱਡੋ -ਆਪੇ ਨਾਂ ਬਦਲ ਦਿਓ -ਮੌਜੂਦਾ ਫਾਇਲਾਂ ਦਾ ਆਪੇ ਨਾਂ ਬਦਲ ਦਿਓ -3500 -ਫਾਇਲ ਬਦਲਨ ਦੀ ਤਸਦੀਕ -ਕਾਰਵਾਈ ਕੀਤੀ ਜਾਉਂਦੀ ਫਾਇਲ ਨਿਯਤ ਫੋਲਡਰ ਵਿੱਚ ਪਹਿਲਾਂ ਹੀ ਮੌਜੂਦ ਹੈ। -ਕੀ ਤੁਸੀਂ ਮੌਜੂਦਾ ਫਾਇਲ ਨੂੰ -ਇਸ ਫਾਇਲ ਨਾਲ ਬਦਲਨਾ ਚਾਹੋਗੇ? -{0} ਬਾਈਟ -ਆਪੇ ਨਾਂ ਬਦਲੀ ਕਰੋ (&u) -3700 -'{0}' ਲਈ ਨਪੀੜਨ ਢੰਗ ਸਹਿਯੋਗੀ ਨਹੀਂ। -'{0}' ਵਿੱਚ ਡਾਟਾ ਸਮੱਸਿਆ। ਫਾਇਲ ਟੁੱਟੀ ਹੋਈ ਹੈ। -'{0}' ਵਿੱਚ ਸੀ-ਆਰ-ਸੀ ਅਸਫ਼ਲ ਰਿਹਾ। ਫਾਇਲ ਟੁੱਟੀ ਹੋਈ ਹੈ। -'{0}' ਐਨਕ੍ਰਿਪਟਡ ਫਾਇਲ ਵਿੱਚ ਡਾਟਾ ਸਮੱਸਿਆ। ਗਲ਼ਤ ਪਾਸਵਰਡ? -'{0}' ਐਨਕ੍ਰਿਪਟਡ ਫਾਇਲ ਵਿੱਚ ਸੀ-ਆਰ-ਸੀ ਅਸਫ਼ਲ ਰਿਹਾ। ਗਲ਼ਤ ਪਾਸਵਰਡ? -3800 -ਪਾਸਵਰਡ ਭਰੋ -ਪਾਸਵਰਡ ਭਰੋ: -ਪਾਸਵਰਡ ਮੁੜ ਭਰੋ: -ਪਾਸਵਰਡ ਵਿਖਾਓ (&S) -ਪਾਸਵਰਡ ਮੇਲ ਨਹੀਂ ਖਾਂਦੇ -ਪਾਸਵਰਡ ਲਈ ਸਿਰਫ਼ ਅੰਗ੍ਰੇਜ਼ੀ ਅੱਖਰ, ਅੰਕ, ਅਤੇ ਖ਼ਾਸ ਅੱਖਰਾਂ (!, #, $, ...) ਦੀ ਹੀ ਵਰਤੋਂ ਕਰੋ -ਪਾਸਵਰਡ ਬਹੁੱਤ ਲੰਬਾ ਹੈ -ਪਾਸਵਰਡ -3900 -ਬੀਤਿਆ ਸਮਾਂ: -ਰਹਿੰਦਾ ਸਮਾਂ: -ਕੁੱਲ ਸਾਈਜ਼: -ਗਤੀ: -ਨਿਬੇੜੀਆਂ ਬਾਈਟ: -ਨਪੀੜਨ ਅਨੁਪਾਤ: -ਸਮੱਸਿਆਵਾਂ: -ਆਕਾਈਵਾਂ: -4000 -ਆਕਾਈਵ ਵਿੱਚ ਸ਼ਾਮਲ ਕਰੋ -ਆਕਾਈਵ (&A): -ਅੱਪਡੇਟ ਢੰਗ (&U): -ਆਕਾਈਵ ਫੌਰਮੈਟ (&f): -ਨਪੀੜਨ ਪੱਧਰ (&l): -ਨਪੀੜਨ ਢੰਗ (&m): -ਡਿਕਸ਼ਨਰੀ ਸਾਈਜ਼ (&D): -ਵਰਡ ਸਾਈਜ਼(&W): -ਠੋਸ ਬਲੋਕ ਸਾਈਜ਼: -ਸੀ-ਪੀ-ਯੂ ਥਰੈੱਡ ਗਿਣਤੀ: -ਪੈਰਾਮੀਟਰ (&P): -ਚੋਣਾਂ -SF&X ਆਕਾਈਵ ਬਣਾਓ -ਵਰਤੀਆਂ ਜਾਉਂਦੀਆਂ ਫਾਇਲਾਂ ਨੂੰ ਵੀ ਨਪੀੜੋ -ਐਨਕ੍ਰਿਪਸ਼ਨ -ਐਨਕ੍ਰਿਪਸ਼ਨ ਢੰਗ: -ਫਾਇਲਾਂ ਦੇ ਨਾਂ ਐਨਕ੍ਰਿਪਟ ਕਰੋ (&n) -ਨਪੀੜਨ ਲਈ ਮੈਮੋਰੀ ਦੀ ਵਰਤੋਂ: -ਆਕਾਈਵ ਖੋਲਨ ਲਈ ਮੈਮੋਰੀ ਦੀ ਵਰਤੋਂ: -4050 -ਸਿਰਫ਼ ਇਕੱਤਰਤਾ -ਬਹੁੱਤ ਤੇਜ਼ -ਤੇਜ਼ -ਆਮ -ਵੱਧੋਂ ਵੱਧ -ਸਭ ਤੋਂ ਵੱਧ -4060 -ਫਾਇਲਾਂ ਸ਼ਾਮਲ ਕਰੋ ਅਤੇ ਬਦਲੋ -ਫਾਇਲਾਂ ਸ਼ਾਮਲ ਅਤੇ ਅੱਪਡੇਟ ਕਰੋ -ਮੌਜੂਦਾ ਫਾਇਲਾਂ ਤਾਜ਼ਾ ਕਰੋ -ਫਾਇਲਾਂ ਸਮਕਾਲਵਰਤੀ ਕਰੋ -4070 -ਬਰਾਊਜ਼ -ਸਾਰੀਆਂ ਫਾਇਲਾਂ -ਨਾ-ਠੋਸ -ਠੋਸ -6000 -ਨਵੇਂ ਟਿਕਾਣੇ ਤੇ ਨਕਲ ਉਤਾਰੋ -ਨਵੇਂ ਟਿਕਾਣੇ ਤੇ ਭੇਜੋ -ਹੇਠਾਂ ਦਿੱਤੇ ਟਿਕਾਣੇ ਤੇ ਨਕਲ ਉਤਾਰੋ: -ਹੇਠਾਂ ਦਿੱਤੇ ਟਿਕਾਣੇ ਤੇ ਭੇਜੋ: -ਨਕਲ ਉਤਾਰੀ ਜਾ ਰਹੀ ਹੈ... -ਭੇਜਿਆ ਜਾ ਰਿਹਾ ਹੈ... -ਨਾਂ ਬਦਲਿਆ ਜਾ ਰਿਹਾ ਹੈ... -ਨਿਯਤ ਫੋਲਡਰ ਚੁਣੋ -ਕਾਰਵਾਈ ਸਹਿਯੋਗੀ ਨਹੀਂ ਹੈ। -ਫਾਇਲ ਜਾਂ ਫੋਲਡਰ ਦਾ ਨਾਂ ਬਦਲਣ ਵਿੱਚ ਸਮੱਸਿਆ -ਫਾਇਲ ਦੀ ਨਕਲ ਉਤਾਰਣ ਦੀ ਤਸਦੀਕ -ਕੀ ਤੁਸੀਂ ਨਿਸ਼ਚਿੱਤ ਫਾਇਲਾਂ ਦੀ ਆਕਾਈਵ ਵਿੱਚ ਨਕਲ ਉਤਾਰਨਾ ਚਾਹੁੰਦੇ ਹੋ -6100 -ਫਾਇਲ ਹਟਾਉਣ ਦੀ ਤਸਦੀਕ -ਫੋਲਡਰ ਹਟਾਉਣ ਦੀ ਤਸਦੀਕ -ਬਹੁ-ਫਾਈਲਾਂ ਹਟਾਉਣ ਦੀ ਤਸਦੀਕ -'{0}' ਨੂੰ ਹਟਾਉਣਾ ਚਾਹੁੰਦੇ ਹੋ? -ਕੀ ਤੁਸੀਂ ਨਿਸ਼ਚਿੱਤ ਫੋਲਡਰ '{0}' ਅਤੇ ਉਸਦੇ ਵਿੱਚਲੀਆਂ ਆਈਟਮਾਂ ਨੂੰ ਹਟਾਉਣਾ ਚਾਹੁੰਦੇ ਹੋ? -ਕੀ ਤੁਸੀਂ ਨਿਸ਼ਚਿੱਤ ਇਨ੍ਹਾਂ {0} ਆਈਟਮਾਂ ਨੂੰ ਹਟਾਉਣਾ ਚਾਹੁੰਦੇ ਹੋ? -ਹਟਾਉਣ ਦੀ ਕਾਰਵਾਈ ਚੱਲ ਰਹੀ ਹੈ... -ਫਾਇਲ ਜਾਂ ਫੋਲਡਰ ਹਟਾਉਣ ਵਿੱਚ ਸਮੱਸਿਆ - -6300 -ਫੋਲਡਰ ਬਣਾਓ -ਫਾਇਲ ਬਣਾਓ -ਫੋਲਡਰ ਨਾਂ: -ਫਾਇਲ ਨਾਂ: -ਨਵਾਂ ਫੋਲਡਰ -ਨਵੀਂ ਫਾਇਲ -ਫੋਲਡਰ ਬਨਾਉਣ ਵਿੱਚ ਸਮੱਸਿਆ -ਫਾਇਲ ਬਨਾਉਣ ਵਿੱਚ ਸਮੱਸਿਆ -6400 -ਟਿੱਪਣੀ -ਟਿੱਪਣੀ (&C): -ਚੁਣੋ -ਚੋਣ ਰੱਦ ਕਰੋ -ਮਾਸਕ: -6600 -ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ -ਫੋਲਡਰ ਅਤੀਤ -ਡਾਈਗਨੋਸਟਿੱਕ ਸੰਦੇਸ਼ -ਸੰਦੇਸ਼ -7100 -ਕੰਪਿਊਟਰ -ਨੈੱਟਵਰਕ - -ਸਿਸਟਮ -7200 -ਸ਼ਾਮਲ ਕਰੋ -ਕੱਡੋ -ਪਰਖ ਕਰੋ -ਨਕਲ ਉਤਾਰੋ -ਨਵੇਂ ਟਿਕਾਣੇ ਤੇ ਭੇਜੋ -ਹਟਾਓ -ਜਾਣਕਾਰੀ -7300 -ਫਾਇਲ ਹਿੱਸਿਆਂ ਵਿੱਚ ਵੰਡੋ -ਹੇਠਾਂ ਦਿੱਤੇ ਟਿਕਾਣੇ ਉੱਤੇ ਹਿੱਸੇ ਕਰੋ (&S): -ਵੋਲੁੱਮਾਂ ਵਿੱਚ ਵੰਡੋ, ਬਾਈਟ (&v): -ਫਾਇਲ ਹਿੱਸਿਆਂ ਵਿੱਚ ਵੰਡੀ ਜਾ ਰਹੀ ਹੈ... -ਹਿੱਸੇ ਕਰਨ ਦੀ ਤਸਦੀਕ -ਕੀ ਤੁਸੀਂ ਨਿਸ਼ਚਿੱਤ ਫਾਇਲ ਦੇ {0} ਵੋਲੁੱਮਾਂ ਵਿੱਚ ਹਿੱਸੇ ਕਰਨਾ ਚਾਹੁੰਦੇ ਹੋ? -ਵੋਲੁੱਮ ਸਾਈਜ਼ ਅਸਲੀ ਫਾਇਲ ਦੇ ਸਾਈਜ਼ ਤੋਂ ਛੋਟਾ ਹੋਣਾ ਚਾਹੀਦਾ ਹੈ -ਵੋਲੁੱਮ ਸਾਈਜ਼ ਗਲ਼ਤ ਹੈ -ਦਿੱਤਾ ਗਿਆ ਵੋਲੁੱਮ ਸਾਈਜ਼: {0} ਬਾਈਟ।\nਕੀ ਤੁਸੀਂ ਨਿਸ਼ਚਿੱਤ ਆਕਾਈਵ ਨੂੰ ਦਿੱਤੇ ਗਏ ਵੋਲੁੱਮਾਂ ਵਿੱਚ ਵੰਡਣਾ ਚਾਹੁੰਦੇ ਹੋ? -7400 -ਫਾਇਲ ਦੇ ਹਿੱਸੇ ਜੋੜੋ -ਹੇਠਾਂ ਦਿੱਤੇ ਟਿਕਾਣੇ ਉੱਤੇ ਹਿੱਸੇ ਜੋੜੋ(&C): -ਹਿੱਸੇ ਜੋੜੇ ਜਾ ਰਹੇ ਹਨ... -ਸਿਰਫ਼ ਪਹਿਲੀ ਫਾਇਲ ਚੁਣੋ - - -7500 -ਚੈਕਸੱਮ ਗਣਨਾ ਕੀਤੀ ਜਾ ਰਹੀ ਹੈ... -ਚੈਕਸੱਮ ਜਾਣਕਾਰੀ -ਡਾਟਾ ਲਈ ਸੀ-ਆਰ-ਸੀ ਚੈਕਸੱਮ: -ਡਾਟਾ ਅਤੇ ਨਾਮਾਂ ਲਈ ਸੀ-ਆਰ-ਸੀ ਚੈਕਸੱਮ: -7600 -ਬੈਂਚਮਾਰਕ -ਮੈਮੋਰੀ ਵਰਤੋਂ: -ਨਪੀੜਨ ਕਾਰਜ -ਖੋਲਣ ਕਾਰਜ -ਦਰਜ਼ਾ -ਕੁੱਲ ਦਰਜ਼ਾ -ਇਸ ਸਮੇਂ -ਰੀਸੱਲਟਿੰਗ -ਸੀ-ਪੀ-ਯੂ ਵਰਤੋਂ -ਦਰਜ਼ਾ / ਵਰਤੋਂ -ਪਾਸ: diff --git a/Utils/7-Zip/Lang/pl.txt b/Utils/7-Zip/Lang/pl.txt deleted file mode 100644 index e8d20b880..000000000 --- a/Utils/7-Zip/Lang/pl.txt +++ /dev/null @@ -1,477 +0,0 @@ -;!@Lang2@!UTF-8! -; : cienislaw -; : pixel -; 9.07 : F1xat -; 9.33 : Łukasz Maria P. Pastuszczak -; -; -; -; -; -; -; -0 -7-Zip -Polish -Polski -401 -OK -Anuluj - - - -&Tak -&Nie -&Zamknij -Pomoc - -&Kontynuuj -440 -Ta&k na wszystkie -Ni&e na wszystkie -Zatrzymaj -Ponów -&Tło -&Pierwszy plan -&Wstrzymaj -Wstrzymano -Czy na pewno chcesz anulować? -500 -&Plik -&Edycja -&Widok -&Ulubione -&Narzędzia -Pomo&c -540 -&Otwórz -Otwórz &wewnątrz -Otwórz na &zewnątrz -Pod&gląd -&Edytuj -Zmień &nazwę -Kopiuj &do... -&Przenieś do... -&Usuń -Podzie&l plik... -Złą&cz pliki... -Wł&aściwości -Ko&mentarz -Oblicz sumę kontrolną -Diff -Utwórz &folder -U&twórz plik -Za&kończ -Dow&iązanie -600 -Z&aznacz wszystko -&Odznacz wszystko -Odwróć &zaznaczenie -Zaznacz... -Odznacz... -Zaznacz według typu -Odznacz według typu -700 -&Duże ikony -&Małe ikony -&Lista -&Szczegóły -730 -Nieposortowane -Widok płaski -&2 panele -&Paski narzędzi -Otwórz folder główny -Do góry o jeden poziom -Historia folderów... -&Odśwież -Automatyczne odświeżanie -750 -Pasek archiwum -Pasek standardowy -Duże przyciski -Pokaż etykiety tekstowe -800 -&Dodaj folder do ulubionych jako -Zakładka -900 -&Opcje... -&Test wydajności -960 -&Zawartość -7-Zip - i&nformacje -1003 -Ścieżka -Nazwa -Rozszerzenie -Folder -Rozmiar -Rozmiar po spakowaniu -Atrybuty -Utworzony -Ostatnio otwarty -Zmodyfikowany -Ciągły -Z komentarzem -Zaszyfrowany -Podzielony przed -Podzielony po -Słownik - -Typ -Anty -Metoda -Pochodzenie -System plików -Użytkownik -Grupa -Blok -Komentarz -Pozycja -Prefiks ścieżki -Foldery -Pliki -Wersja -Wolumin -Wielowoluminowy -Przesunięcie -Dowiązania -Bloki -Woluminy - -64-bitowy -Big-endian -Procesor -Rozmiar fizyczny -Rozmiar nagłówków -Suma kontrolna -Charakterystyki -Adres wirtualny -Numer seryjny woluminu -Krótka nazwa -Generator -Rozmiar sektora -Tryb -Dowiązanie symboliczne -Błąd -Całkowity rozmiar -Wolne miejsce -Rozmiar klastra -Etykieta -Nazwa lokalna -Dostawca -Zabezpieczenia NT -Alternatywny strumień - -Usunięty -Drzewo - - -Rodzaj błędu -Błędy -Błędy -Ostrzeżenia -Ostrzeżenie -Strumienie -Alternatywne strumienie -Rozmiar alternatywnych strumieni -Rozmiar wirtualny -Rozmiar po rozpakowaniu -Całkowity rozmiar fizyczny -Numer woluminu -Podtyp -Krótki komentarz -Strona kodowa - - - - - -Dowiązanie -Dowiązanie twarde -I-węzeł -2100 -Opcje -Język -Język: -Edytor -&Edytor: -&Diff: -2200 -System -Skojarz program 7-Zip z: -2301 -Zintegruj program 7-Zip z menu kontekstowym powłoki -Kaskadowe menu kontekstowe -Elementy menu kontekstowego: -Ikony w menu kontekstowym -2320 - - -Otwórz archiwum -Wypakuj pliki... -Dodaj do archiwum... -Testuj archiwum -Wypakuj tutaj -Wypakuj do {0} -Dodaj do {0} -Skompresuj i wyślij e-mailem... -Skompresuj do {0} i wyślij e-mailem -2400 -Foldery -Folder roboczy -&Systemowy folder tymczasowy -&Bieżący -&Wskazany: -Użyj tylko dla dysków wymiennych -Wskaż lokalizację dla tymczasowych plików archiwów. -2500 -Ustawienia -Pokaż element „..” -Pokaż prawdziwe ikony plików -Pokaż menu systemowe -Zaznaczaj &cały rząd -&Pokaż linie siatki -Pojedyncze kliknięcie otwiera element -&Alternatywny tryb zaznaczania -&Użyj dużych stron pamięci -2900 -7-Zip - informacje -7-Zip jest programem darmowym. -3000 -System nie może przydzielić wymaganej ilości pamięci -Nie wykryto błędów -Zaznaczono {0} obiekt(ów) -Nie można utworzyć folderu „{0}” -Operacje aktualizacji nie są obsługiwane dla tego archiwum. -Nie można otworzyć pliku „{0}” jako archiwum -Nie można otworzyć zaszyfrowanego archiwum „{0}”. Nieprawidłowe hasło? -Nieobsługiwany typ archiwum -Plik {0} już istnieje -Plik „{0}” został zmodyfikowany.\nCzy chcesz zaktualizować go w archiwum? -Nie można zaktualizować pliku\n„{0}” -Nie można uruchomić edytora. -Plik wygląda na wirusa (nazwa pliku zawiera długi ciąg spacji). -Operacja nie może być wywołana z folderu, który ma długą ścieżkę. -Musisz zaznaczyć jeden plik -Musisz zaznaczyć jeden lub więcej plików -Zbyt dużo elementów -3300 -Wypakowywanie -Kompresowanie -Testowanie -Otwieranie... -Skanowanie... -3400 -Wypakuj -&Wypakuj do: -Wskaż lokalizację dla wypakowanych plików. -3410 -Tryb ścieżek: -Pełne ścieżki -Bez ścieżek -Bezwzględne ścieżki -Względne ścieżki -3420 -Tryb nadpisywania: -Monituj przed nadpisaniem -Nadpisuj bez monitowania -Pomiń istniejące pliki -Automatycznie zmień nazwy -Automatycznie zmień nazwy istniejących plików -3430 -Wyeliminuj podwojenie folderu głównego -Przywróć zabezpieczenia plików -3500 -Potwierdź zamianę pliku -Folder docelowy zawiera już przetwarzany plik. -Czy chcesz zamienić istniejący plik -na następujący? -{0} bajtów -Automatycznie &zmień nazwy -3700 -Nieobsługiwana metoda kompresji pliku „{0}”. -Błąd danych w „{0}”. Plik jest uszkodzony. -CRC nie powiodła się dla „{0}”. Plik jest uszkodzony. -Błąd danych w zaszyfrowanym pliku „{0}”. Nieprawidłowe hasło? -CRC nie powiodła się dla zaszyfrowanego pliku „{0}”. Nieprawidłowe hasło? -3710 -Nieprawidłowe hasło? -3721 -Nieobsługiwana metoda kompresji -Błąd danych -CRC nie powiodła się -Niedostępne dane -Nieoczekiwany koniec danych -Pewne dane znajdują się za końcem bloku użytecznych danych -Nie rozpoznano archiwum -Błąd nagłówków -3763 -Niedostępny początek archiwum -Niepotwierdzony początek archiwum - - - -Nieobsługiwana funkcja -3800 -Wprowadź hasło -Wprowadź hasło: -Wprowadź ponownie hasło: -Pokaż &hasło -Hasła nie zgadzają się -W haśle używaj tylko liter alfabetu angielskiego, cyfr i znaków specjalnych (!, #, $, ...) -Hasło jest zbyt długie -Hasło -3900 -Upłynęło czasu: -Pozostało czasu: -Całkowity rozmiar: -Szybkość: -Przetworzono: -Współczynnik kompresji: -Błędy: -Archiwów: -4000 -Dodaj do archiwum -&Archiwum: -&Tryb aktualizacji: -&Format archiwum: -Stopień &kompresji: -&Metoda kompresji: -&Rozmiar słownika: -Rozmiar &słowa: -Rozmiar bloku ciągłego: -Liczba wątków: -&Parametry: -Opcje -&Utwórz archiwum SFX -Kompresuj pliki współdzielone -Szyfrowanie -Metoda szyfrowania: -&Zaszyfruj nazwy plików -Użycie pamięci dla kompresji: -Użycie pamięci dla dekompresji: -Usuń pliki po skompresowaniu -4040 -Zachowaj dowiązania symboliczne -Zachowaj dowiązania twarde -Zachowaj alternatywne strumienie danych -Zachowaj zabezpieczenia plików -4050 -Bez kompresji -Najszybsza -Szybka -Normalna -Maksymalna -Ultra -4060 -Dodaj i zamień pliki -Aktualizuj i dodaj pliki -Odśwież istniejące pliki -Synchronizuj pliki -4070 -Przeglądaj -Wszystkie pliki -Nieciągły -Ciągły -6000 -Kopiuj -Przenieś -Kopiuj do: -Przenieś do: -Kopiowanie... -Przenoszenie... -Zmienianie nazwy... -Wybierz folder docelowy. -Operacja nie jest obsługiwana dla tego folderu. -Błąd podczas zmiany nazwy pliku lub folderu -Potwierdź kopiowanie plików -Czy na pewno chcesz skopiować pliki do archiwum -6100 -Potwierdź usunięcie pliku -Potwierdź usunięcie folderu -Potwierdź usunięcie wielu plików -Czy na pewno chcesz usunąć plik „{0}”? -Czy na pewno chcesz usunąć folder „{0}” i całą zawartość? -Elementów: {0} - czy na pewno chcesz je usunąć? -Usuwanie... -Błąd podczas usuwania pliku lub folderu -System nie może przenieść pliku o długiej ścieżce do Kosza -6300 -Utwórz folder -Utwórz plik -Nazwa folderu: -Nazwa pliku: -Nowy folder -Nowy plik -Błąd podczas tworzenia folderu -Błąd podczas tworzenia pliku -6400 -- komentarz -&Komentarz: -Zaznacz -Odznacz -Maska: -6600 -Właściwości -Historia folderów -Komunikaty diagnostyczne -Komunikat -7100 -Komputer -Sieć -Dokumenty -System -7200 -Dodaj -Wypakuj -Testuj -Kopiuj -Przenieś -Usuń -Informacje -7300 -Podziel plik -&Podziel do: -Rozmiar &woluminów (bajty): -Dzielenie... -Potwierdź podział -Czy na pewno chcesz podzielić plik na {0} woluminów? -Rozmiar woluminu musi być mniejszy od rozmiaru oryginalnego pliku -Nieprawidłowy rozmiar woluminu -Określony rozmiar woluminu: {0} bajtów.\nCzy na pewno chcesz podzielić archiwum na takie woluminy? -7400 -Złącz pliki -&Złącz do: -Łączenie... -Zaznacz tylko pierwszą część podzielonego pliku -To nie jest poprawna część podzielonego pliku -Nie można odnaleźć co najmniej jednej części podzielonego pliku -7500 -Obliczanie sumy kontrolnej... -Informacja o sumie kontrolnej -Suma kontrolna CRC dla danych: -Suma kontrolna CRC dla danych i nazw: -7600 -Test wydajności -Użycie pamięci: -Kompresja -Dekompresja -Ocena -Całkowita ocena -Aktualnie -Wynik -Użycie CPU -Ocena / Użycie -Przebiegi: -7700 -Dowiązanie -Dowiąż -Element źródłowy: -Element docelowy: -7710 -Rodzaj dowiązania -Dowiązanie twarde -Dowiązanie symboliczne pliku -Dowiązanie symboliczne katalogu -Połączenie katalogów diff --git a/Utils/7-Zip/Lang/ps.txt b/Utils/7-Zip/Lang/ps.txt deleted file mode 100644 index baef904d0..000000000 --- a/Utils/7-Zip/Lang/ps.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.53 : 2007-12-26 : Pathanisation Project : pathanisation.pakhtosoft.com -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Pashto -پښتو -401 -هوکې -بندول - - - -هو& -نه& -بندول& -مرسته - -پرمختلل& -440 -ټولو ته هو& -ټ&ولو ته نه -تمول -بياپېلول -شاليد& -پاسليد& -ځنډول& -څنډېدلی -په ډاډمنه توګه غواړئ چې بند يې کړئ؟ -500 -دوتنه& -سمون& -ليد& -خ&واپوري -توکي& -مرسته& -540 -پرانيستل& -دننه& پرانيستل -بهر پ&رانيستل -ليد& -سمون& -بي&انومول -...ته لمېسل& -...ته خوځول& -ړنګول& -...دوتنه چول& -...دوتنې يوځ&ايول -ځانتياوې -څرګند&ون -چېکسم شمېرل - -پوښۍ جوړول -دوتنه جوړول -و&تون -600 -ټول ټاکل& -ټول ناټاکل -ټاکنه نسکورول& -...ټاکل -...ناټاکل -پر ډول ټاکل -پر ډول ناټاکل -700 -لو&ی انځورنونه -و&اړه انځورنونه -لړ& -خبرتياوې& -730 -ناڼلي -پوړ ليد -۲‏ چوکاټه& -توکپټې& -ولۍ پوښۍ پرانيستل -يو کچه برول -...پوښيو مخينه -تاندول& -750 -ارشيو توکپټه -کره توکپټه -لویې تڼۍ -د تڼيو ليکنې ښودل -800 -پوښۍ خواپورو ته زياتول لکه& -نښه -900 -...غوراوي& -بنچمارک& -960 -...منځپانګه& -...۷‏-زېپ په اړه& -1003 -يونلور -نوم -شاتاړی -پوښۍ -کچ -بنډل شوی کچ -څانتياوې -جوړشوی -رسی -بدلون -کلک -څرګندون -کوډييز -چول مخکښې -چول وروسته -ويېپانګه -CRC -ډول -مخالف -لېله -کوربه چغ -دوتنه غونډال -کارن -ډله -غونډ -څرګندون -ځای -يونلور مختاړی -پوښۍ -دوتنې -نسخه -ډکون -ګڼډکون -افسېټ -پېوندونه -غوڼدونه -ډکونونه - - - - - - - - - - - - - - - -تېروتنه -بشپړ کچ -پاتې تشه -ځومبک کچ -نښکه -ځایي نوم -برابروونى -2100 -غوراوي -ژبه -:ژبه -سمونګر -:سمونګر& - -2200 -غونډال -:له ۷‏-زېپ سره ملول -2301 -۷‏-زېپ سيپۍ تړاو غورنۍ کښې زياتول -ځړبهيزه تړاو غورنۍ -:تړاو غورنۍ توکي -2320 -<پوښۍ> -<ارشيو> -ارشيو پرانيستل -...دوتنې ويستل -...ارشيو ته زياتول -ارشيو ازمويل -دلته ويستل -ته ويستل {0}‏ -ته زياتول {0} -...زېرل او برېښل -ته زياتول او برېښل {0} -2400 -پوښۍ -&کارنه پوښۍ -&لنډمهاله غونډال پوښۍ -&اوسنۍ -&څانګړې -يوازې له لېرېدونکو چليځونو لپاره کارول -.د لنډمهاله ارشيو دوتنو لپاره ځای وټاکئ -2500 -امستنې -توکي ښودل ".." -د دوتنو ريښتيني انځورنونه ښودل -غونډال غورنۍ ښودل -ټول کيل ټاکل& -کرښې ښودل - -انډوليز ټاکنې اکر& -لوی ياد مخونه کارول& -2900 -۷‏-زېپ په اړه -.دا يو وړيا ساوتری دی. خو، په نومکښلو سره د ساوتري د پرمختګ ملاتړ کولی شئ -3000 - -هېڅ تېروتنه نشته -ټاکل شوي څيزونه {0} -پوښۍ جوړولی نه شي '{0}' -.اوسمهاله چلښتونه دې ارشيو لپاره منلي نه دي -'{0}' دوتنه لکه د ارشيو نه شي پرانيستلی -کوډييز ارشيو پرانيستلی نه شي '{0}'. ناسمه تېرنويې؟ - - -.'{0}' دوتنه کښې بدلون راغلی\nپه ارشيو کښې يې اوسمهالول غواړئ؟ -'{0}'\nدوتنه اوسمهالولی نه شي -سمونګر پېلولی نه شي - - - - -ډېر زيات توکي -3300 -وباسي -زېرل کيږي -ازموينه -...پرانيستل کيږي -...ځیريږي -3400 -ويستل -:ته و&يستل -.د ويستلو دوتنو لپاره يو ځای وټاکئ -3410 -يونلور اکر -بشپړ يونلورنومونه -هېڅ يونلورنومونه -3420 -سرليکلو اکر -سرليکلو نه مخکښې پوښتل -بې له پارليکې سرليکل -شته دوتنې پرېښودل -خپله بيانومول -شته دوتنې خپله بيانومول -3500 -دوتنه ځاېناستی باورييل -.موخه پوښۍ دمخه بهيرلې دوتنې لري -غواړئ چې شته دوتنه ځاېناستې کړئ -له دې سره؟ -باېټه {0} -خپله ب&يانومول -3700 -.لپاره نامنلې زېرنې لېله '{0}' -.کښې اومتوک ستونزه '{0}' دوتنه ماته ده -.کښې سرس پاتې راغی '{0}' دوتنه ماته ده -کوډييزې دوتنې '{0}' کښې اومتوک ستونزه. ناسمه تېرنويې؟ -په کوډييزې دوتنې '{0}' کښې سرس پاتې راغی. ناسمه تېرنويې؟ -3800 -تېرنويې وليکئ -:تېرنويې وليکئ -:تېرنويې بيا وليکئ -تېرنويې ښودل& -تېرنويې سمون نه خوري -تېرنويې لپاره يوازې انګريزي توري، شمېرې او ځانګړي لوښې (!, #, $, ...) وکاروئ -تېرنويې ډېره اوږده ده -تېرنويې -3900 -:تېر مهال -:پاتې مهال -:بشپړ کچ -:چټکتیا -:بهيرلی -:زېرلو نسبت -:تېروتنه -:ارشيونه -4000 -ارشيو ته زياتول -:ارشيو& -:اوسمهاليز اکر& -:ارشيو بڼه& -:زېرنې &کچه -:زېرنې &لېله -:ويېپانګې کچه& -:ويې کچ& -:کلک غونډ کچ -:د مبي مزيو شمېر -:ارزښتمني& -غوراوي -ارشيو جوړول SF&X -ونډولې دوتنې زېرل -کوډییزونه -:کوډییزونې لېله -دوتنه &نومونه کوډييزول -:زېرلو لپاره ياد کارونه -:نازېرلو لپاره ياد کارونه -4050 -زېرمل -ډېر چټک -چټک -ليوی -زيات -ډېر زيات چټک -4060 -دوتنې زياتول او ځاېناستول -دوتنې اوسمهالول او زياتول -شته دوتنې تاندول -دوتنې هممهالول -4070 -لټول -ټولې دوتنې -نا-کلک -کلک -6000 -لمېسل -خوځول -:ته لمېسل -:ته خوځول -...لميسل کيږي -...خوځيږي -بيانوميږي -.موخه پوښۍ وټاکئ -.چلښت منلی نه دی -دوتنې يا پوښۍ بيانومولو ستونزه -دوتنې لمېسل باورييل -په ډاډمنه توګه دوتنې ارشيو ته لمېسل غواړئ؟ -6100 -دوتنې ړنګونه باورييل -پوښۍ ړنګونه باورييل -ګڼو دوتنو ړنګونه باورييل -په ډاډمنه توګه '{0}' ړنګول غواړئ؟ -په ډاډمنه توګه '{0}' پوښۍ او د دې ټوله منځپانګه ړنګول غواړئ؟ -په ډاډمنه توګه دا {0} توکي ړنګول غواړئ؟ -...ړنګيږي -دوتنې يا پوښۍ ړنګولو ستونزه - -6300 -پوښۍ جوړول -دوتنه جوړول -:پوښۍ نوم -:دوتنه نوم -نوې پوښۍ -نوې دوتنه -پوښۍ جوړولو ستونزه -دوتنې جوړولو ستونزه -6400 -څرګندون -:څرګندون& -ټاکل -ناټاکل -:وربوزۍ -6600 -ځانتياوې -پوښيو مخينه -رنځ نومېرنې استوزه -استوزه -7100 -سولګر -جال - -غونډال -7200 -زياتول -ويستل -ازمويل -لمېسل -خوځول -ړنګول -خبرتياوې -7300 -دوتنه چول -:ته چول& -:ډکونونو، باېټونو ته چول& -...چول کيږي -چونه باورييل -په ډاډمنه توګه دوتنه په {0} ډکونونو وېشل غواړئ؟ -ډکون کچ بايد د دوتنې ار کچ نه وړوکی وي -ناسم ډکون کچ -.باېټه {0} :ټاکلی ډکون کچ\nپه ډاډمنه توګه غواړئ چې ارشيو په داسې ډکونونو وويشئ؟ -7400 -دوتنې يوځايول -:ته يوځايول& -...يوځايږي -يوازې لمړۍ دوتنه ټاکل - - -7500 -...چېکسم شمېريږي -چېکسم خبرتياوې -:چېکسم CRC اومتوک لپاره -:چېکسم CRC اومتوک او نومونو لپاره -7600 -بنچمارک -:ياد کارونه -زېريږي -نازېريږي -کچونه -بشپړه کچونه -اوسنی -پايليز -مبي کارونه -کچونه / کارونه -:تيريږي diff --git a/Utils/7-Zip/Lang/pt-br.txt b/Utils/7-Zip/Lang/pt-br.txt deleted file mode 100644 index a44134242..000000000 --- a/Utils/7-Zip/Lang/pt-br.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; : Francisco Jr -; 4.37 : Fabricio Biazzotto -; 15.07 : Atualizado por Felipe -; -; -; -; -; -; -; -; -0 -7-Zip -Portuguese Brazilian -Português Brasileiro -401 -OK -Cancelar - - - -&Sim -&Não -&Fechar -Ajuda - -&Continuar -440 -Sim pra &Todos -Não pra T&odos -Parar -Reiniciar -&Em 2º plano -&Em 1º plano -&Pausar -Pausado -Você tem certeza que você quer cancelar? -500 -&Arquivo -&Editar -&Visualizar -F&avoritos -&Ferramentas -&Ajuda -540 -&Abrir -Abrir &por Dentro -Abrir p&or Fora -&Visualizar -&Editar -Re&nomear -&Copiar Para... -&Mover Para... -&Apagar -&Dividir arquivo... -Com&binar arquivos... -P&ropriedades -Comen&tário -Calcular checksum -Diff -Criar Pasta -Criar Arquivo -S&air -Link -&Correntes Alternantes -600 -Selecionar &Tudo -Desmarcar Tudo -&Inverter Seleção -Selecionar... -Desmarcar... -Selecionar por Tipo -Desfazer seleção por Tipo -700 -Íco&nes Grandes -Íc&ones Pequenos -&Lista -&Detalhes -730 -Desorganizado -Visualização Plana -&2 Painéis -&Barra de Ferramentas -Abrir a Pasta Raiz -Um Nível Acima -Histórico das Pastas... -&Atualizar -Auto-Atualizar -750 -Barra de Ferramentas do Arquivo Compactado -Barra de Ferramentas Padrão -Botões Grandes -Mostrar o Texto dos Botões -800 -&Adicionar a pasta aos Favoritos como -Favorito -900 -&Opções... -&Benchmark -960 -&Conteúdo... -&Sobre o 7-Zip... -1003 -Caminho -Nome -Extensão -Pasta -Tamanho -Tamanho Compactado -Atributos -Criado -Acessado -Modificado -Sólido -Comentado -Criptografado -Dividir Antes -Dividir Depois -Dicionário - -Tipo -Anti -Método -Sistema Operacional Hospedeiro -Sistema de Arquivos -Usuário -Grupo -Bloco -Comentário -Posição -Prefixo do Caminho -Pastas -Arquivos -Versão -Volume -Multivolume -Offset -Links -Blocos -Volumes - -64 bits -Big-endian -CPU -Tamanho Físico -Tamanho dos Cabeçalhos -Checksum -Características -Endereço Virtual -ID -Nome Curto -Aplicativo Criador -Tamanho do Setor -Modo -Link Simbólico -Erro -Tamanho Total -Espaço Livre -Tamanho do Cluster -Rótulo -Nome Local -Provedor -Segurança da NT -Corrente Alternante -Aux -Apagado -É Árvore - - -Tipo de Erro -Erros -Erros -Avisos -Aviso -Correntes -Correntes Alternantes -Tamanho das Correntes Alternantes -Tamanho Virtual -Tempo Descompactado -Total do Tamanho Físico -Índice do Volume -Sub-Tipo -Comentário Curto -Página do Código - - - -Tamanho da Cauda -Tamanho do Toco Embutido -Link -Link Rígido -iNode - -Somente-Leitura -2100 -Opções -Idioma -Idioma: -Editor -&Editor: -&Diff: -2200 -Sistema -Associar o 7-Zip com: -Todos os usuários -2301 -Integrar o 7-Zip ao menu de contexto do shell -Menu de contexto em cascata -Itens do menu de contexto: -Ícones no menu de contexto -2320 - - -Abrir arquivo compactado -Extrair arquivos... -Adicionar ao arquivo compactado... -Testar arquivo compactado -Extrair Aqui -Extrair para {0} -Adicionar para {0} -Comprimir e enviar por email... -Comprimir para {0} e enviar por email -2400 -Pastas -&Pasta de trabalho -&Pasta temporária do sistema -&Atual -&Especificada: -Usar só pra drives removíveis -Especifique um local pros arquivos compactados temporários. -2500 -Configurações -Mostrar o item ".." -Mostrar os ícones reais dos arquivos -Mostrar o menu do sistema -&Selecionar a linha inteira -Mostrar as &linhas de grade -Clique único pra abrir um item -&Modo de seleção alternativo -Usar &grandes páginas de memória -2900 -Sobre o 7-Zip -7-Zip é um software grátis -3000 -O sistema não pôde alocar a quantia requerida de memória -Não há erros -{0} objeto(s) selecionado(s) -Não pôde criar a pasta '{0}' -Operações de atualização não são suportadas por este arquivo compactado. -Não pôde abrir o arquivo '{0}' como arquivo compactado -Não pôde abrir o arquivo compactado encriptado '{0}'. Senha errada? -Tipo de arquivo compactado não suportado -O arquivo {0} já existe -O arquivo '{0}' foi modificado.\nVocê quer atualizá-lo no arquivo compactado? -Não pôde atualizar o arquivo\n'{0}' -Não pôde iniciar o editor. -O arquivo parece um vírus (o nome do arquivo contém espaços longos no nome). -A operação não pode ser chamada de uma pasta que tem um caminho longo. -Você deve selecionar um arquivo -Você deve selecionar um ou mais arquivos -Itens demais -Não pôde abrir o arquivo como {0} arquivo compactado -O arquivo está aberto como {0} arquivo compactado -O arquivo compactado está aberto com o offset -3300 -Extraindo -Comprimindo -Testando -Abrindo... -Escaneando... -Removendo -3320 -Adicionando -Atualizando -Analisando -Replicando -Re-compactando -Ignorando -Apagando -Criando cabeçalho -3400 -Extrair -E&xtrair para: -Especifique um local pros arquivos extraídos. -3410 -Modo do caminho: -Nomes dos caminhos completos -Sem nomes de caminhos -Nomes dos caminhos absolutos -Nomes dos caminhos relativos -3420 -Modo de sobrescrição: -Perguntar antes de sobrescrever -Sobrescrever sem alertar -Ignorar os arquivos existentes -Auto-renomear -Auto-renomear os arquivos existentes -3430 -Eliminar duplicação da pasta raiz -Restaurar a segurança do arquivo -3500 -Confirmar a Substituição dos Arquivos -A pasta destino já contém o arquivo processado. -Você gostaria de substituir o arquivo existente -por este? -{0} bytes -A&uto-Renomear -3700 -Método de compressão não suportado por '{0}'. -Erro nos dados de '{0}'. O arquivo está danificado. -O CRC falhou em '{0}'. O arquivo está danificado. -Erros nos dados do arquivo encriptado '{0}'. Senha errada? -O CRC falhou no arquivo encriptado '{0}'. Senha errada? -3710 -Senha errada? -3721 -Método de compressão não suportado -Erro dos dados -O CRC falhou -Dados indisponíveis -Fim inesperado dos dados -Há alguns dados após o fim da carga dos dados -Não é arquivo compactado -Erro dos Cabeçalhos -Senha errada -3763 -Início indisponível do arquivo compactado -Início não confirmado do arquivo compactado - - - -Função não suportada -3800 -Inserir senha -Inserir senha: -Re-inserir a senha: -&Mostrar senha -As senhas não combinam -Usar apenas letras em Inglês, números e caracteres especiais (!, #, $, ...) para a senha -A senha é muito longa -Senha -3900 -Tempo decorrido: -Tempo restante: -Tamanho total: -Velocidade: -Processados: -Taxa de compressão: -Erros: -Arquivos: -4000 -Adicionar ao arquivo compactado -&Arquivo compactado: -&Modo de atualização: -Formato do &arquivo compactado: -Nível da &compressão: -Método de &compressão: -&Tamanho do dicionário: -&Tamanho da palavra: -Tamanho do bloco sólido: -Número de threads da CPU: -&Parâmetros: -Opções -Criar ar&quivo compactado SFX -Comprimir arquivos compartilhados -Encriptação -Método de encriptação: -Criptografar os &nomes dos arquivos -Uso de memória pra Compressão: -Uso de memória para Descompressão: -Apagar arquivos após a compressão -4040 -Armazenar links simbólicos -Armazenar links rígidos -Armazenar correntes de dados alternantes -Armazenar segurança do arquivo -4050 -Armazenar -Mais rápida -Rápida -Normal -Máximo -Ultra -4060 -Adicionar e substituir arquivos -Atualizar e adicionar arquivos -Atualizar arquivos existentes -Sincronizar arquivos -4070 -Navegar -Todos os Arquivos -Não-sólido -Sólido -6000 -Copiar -Mover -Copiar para: -Mover para: -Copiando... -Movendo... -Renomeando... -Selecionar a pasta destino. -A operação não é suportada por esta pasta. -Erro ao Renomear o Arquivo ou Pasta -Confirmar a Cópia do Arquivo -Você tem certeza que você quer copiar os arquivos pra dentro do arquivo compactado? -6100 -Confirmar a Exclusão do Arquivo -Confirmar a Exclusão da Pasta -Confirmar a Exclusão de Múltiplos Arquivos -Você tem certeza que você quer apagar '{0}'? -Você tem certeza que você quer apagar a pasta '{0}' e todo o conteúdo dela? -Você tem certeza que você quer apagar estes {0} itens? -Apagando... -Erro ao Apagar o Arquivo ou Pasta -O sistema não pode mover um arquivo com caminho longo para o Recycle Bin -6300 -Criar Pasta -Criar Arquivo -Nome da pasta: -Nome do Arquivo: -Nova Pasta -Novo Arquivo -Erro ao Criar a Pasta -Erro ao Criar o Arquivo -6400 -Comentário -&Comentário: -Selecionar -Desmarcar -Máscara: -6600 -Propriedades -Histórico das Pastas -Mensagens de diagnóstico -Mensagem -7100 -Computador -Rede -Documentos -Sistema -7200 -Adicionar -Extrair -Testar -Copiar -Mover -Apagar -Info -7300 -Dividir Arquivo -&Dividir para: -Dividir em &volumes, bytes: -Dividindo... -Confirmar a Divisão -Você tem certeza que você quer dividir o arquivo em {0} volumes? -O tamanho do volume deve ser menor do que o tamanho do arquivo original -Tamanho do volume incorreto -Tamanho do volume especificado: {0} bytes.\nVocê tem certeza que você quer dividir o arquivo compactado em tais volumes? -7400 -Combinar Arquivos -&Combinar em: -Combinando... -Selecionar só a primeira parte do arquivo dividido -Não pôde detectar o arquivo como parte do arquivo dividido -Não pôde achar mais do que uma parte do arquivo dividido -7500 -Calculando checksum... -Informação do checksum -Checksum do CRC pros dados: -Checksum do CRC pros dados e nomes: -7600 -Benchmark -Uso da memória: -Comprimindo -Descomprimindo -Avaliação -Total da Avaliação -Atual -Resultando -Uso da CPU -Avaliação / Uso -Passos: -7700 -Link -Link -Link de: -Link para: -7710 -Tipo de Link -Link Rígido -Link Simbólico do Arquivo -Link Simbólico do Diretório -Junção do Diretório diff --git a/Utils/7-Zip/Lang/pt.txt b/Utils/7-Zip/Lang/pt.txt deleted file mode 100644 index 6a378478b..000000000 --- a/Utils/7-Zip/Lang/pt.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; : Carlos Macao -; : João Alves -; : João Frade (100 NOME TR) -; 4.46 : Rui Costa -; 9.17 : Sérgio Marques -; 15.00 : Rui Aguiar -; -; -; -; -; -0 -7-Zip -Portuguese Portugal -Português -401 -OK -Cancelar - - - -&Sim -&Não -&Fechar -Ajuda - -&Continuar -440 -Sim p/ &Todos -Não p/ T&odos -Parar -Reiniciar -&Segundo plano -P&rimeiro plano -&Pausar -Em pausa -Quer mesmo cancelar? -500 -&Ficheiro -&Editar -&Ver -F&avoritos -Ferramen&tas -&Ajuda -540 -&Abrir -Abrir &dentro -Abrir &fora -&Ver -&Editar -Mudar& o nome -&Copiar para... -&Mover para... -&Eliminar -&Separar ficheiro... -Com&binar ficheiros... -P&ropriedades -Come&ntário -Calcular o checksum -Diff -Criar pasta -Criar ficheiro -&Sair -Link -&Alternar Fluxo -600 -Seleccionar &Tudo -Desmarcar tudo -&Inverter selecção -Seleccionar... -Desmarcar... -Seleccionar por tipo -Desmarcar por tipo -700 -Ícones &grandes -Ícones &pequenos -&Lista -&Detalhes -730 -Sem ordem -Vista plana -&2 painéis -&Barras de ferramentas -Abrir pasta root -Subir um nível -Histórico de pastas... -&Actualizar -Auto Actualizar -750 -Barra de ferramentas do arquivo -Barra de ferramentas pré-definida -Botões grandes -Mostrar a legenda dos botões -800 -&Adicionar a pasta aos favoritos como -Marcador -900 -&Opções... -&Desempenho -960 -&Conteúdo... -&Acerca do 7-Zip... -1003 -Caminho -Nome -Extensão -pasta -Tamanho -Tamanho comprimido -Atributos -Criado -Acedido -Modificado -sólido -Comentado -Encriptado -Separar antes -Separar depois -Dicionário - -Tipo -Anti -Método -SO anfitrião -Sistema de ficheiros -Utilizador -Grupo -Bloco -Comentário -Posição -Prefixo do destino -pastas -ficheiros -Versão -Volume -Multivolume -Não definido -Ligações -Blocos -Volumes - -64-bit -Big-endian -CPU -Tamanho físico -Tamanho dos cabeçalhos -Soma de verificação -Características -Endereço virtual -ID -Abreviatura -Criador da aplicação -Tamanho do sector -Modo -Ligação -Erro -Tamanho total -Espaço livre -Tamanho do sector -Etiqueta -Nome local -Fornecedor -Segurança NT -Alternar Fluxo -Aux -Excluído -É Árvore - - -Tipo de Erro -Erros -Erros -Avisos -Aviso -Fluxo -Alternar Fluxo -Alternate Tamanho de Fluxos -Tamanho Virtual -Tamanho Descompactado -Tamanho Físico Total -Índice de Volume -SubTipo -Breve Comentário -Página de Código - - - -Tamanho Tail -Tamanho Stub Incorporado -Link -Link do Disco Rígido -iNode - -Só de leitura -2100 -Opções -Idioma -Idioma: -Editor -&Editor: -&Diff: -2200 -Sistema -Associar o 7-Zip com: -Todos os utilizadores -2301 -Integrar o 7-Zip no menu de contexto -Menu de contexto em cascata -Itens do menu de contexto: -Icons no menu de contexto -2320 - - -Abrir arquivo -Extrair ficheiros... -Adicionar ao arquivo... -Testar arquivo -Extrair para aqui -Extrair para {0} -Adicionar a {0} -Comprimir e enviar por e-mail... -Comprimir para {0} e enviar por e-mail -2400 -pastas -&Pasta de trabalho -Pasta &temporária -&Actual -&Especificada: -Utilizar só para discos amovíveis -Especifique a pasta para os ficheiros temporários. -2500 -Definições -Mostrar item ".." -Mostrar os ícones reais dos ficheiros -Mostrar o menu do sistema -Selecção de linha &completa -Mostrar as linhas da &grelha -Clique uma vez para abrir um item -Modo de seleçção &alternativo -Utilizar páginas de &memória grandes -2900 -Acerca do 7-Zip -O 7-Zip é um programa gratuito.\n\nO 7-Zip foi traduzido por: Rui Aguiar\n\trui_a_aguiar@hotmail.com -3000 -O sistema não consegue alocar a memória necessária -Não existem erros -{0} objecto(s) seleccionado(s) -Não é possível criar a pasta '{0}' -Este tipo de arquivo não permite actualizações. -Não é possível abrir o ficheiro '{0}' como arquivo -Não é possível abrir o arquivo encriptado '{0}'. Palavra-passe errada? -O arquivo não é suportado -Já existe o ficheiro {0} -O ficheiro '{0}' foi modificado.\nQuer actualizá-lo no arquivo? -Não foi possível actualizar o ficheiro\n'{0}' -Não foi possível iniciar o editor. -O ficheiro parece ser um vírus (o nome do ficheiro contém muitos espaços em branco). -A operação não pode ser invocada a partir de uma pasta com uma longa localização. -Tem que seleccionar um ficheiro -Tem que seleccionar um ou mais ficheiros -Demasiados itens -Não é possível abrir o ficheiro como arquivo {0} -Ficheiro aberto como arquivo {0} -Arquivo aberto com offset -3300 -A extrair... -A comprimir -A testar... -A abrir... -A pesquisar... -Removendo -3320 -A adicionar... -A actualizar... -A analisar... -Replicando -A recomprimir... -A ignorar... -A eliminar -Criando cabeçalho -3400 -Extrair -E&xtrair para: -Especifique o destino para os ficheiros extraídos. -3410 -Modo de nome de pasta -Nome de pastas completo -Sem nome de pastas -Caminhos absolutos -Caminhos relativos -3420 -Modo de sobrescrever -Perguntar antes de substituir -Sem confirmação -Ignorar ficheiros existentes -Mudar o nome automaticamente. -Mudar o nome automomaticamente os ficheiros existentes -3430 -Eliminar a duplicação da pasta de raiz -Restaurar segurança de ficheiros -3500 -Confirmar substituição de ficheiro -A pasta já possui um ficheiro com o mesmo nome. -Deseja substituir o ficheiro existente -por este? -{0} bytes -Mudar o nome a&utomaticamente -3700 -O método de compressão é inválido para '{0}'. -Erro de dados em '{0}'. O arquivo está danificado. -CRC falhou em '{0}'. O arquivo está danificado. -Erro de dados no ficheiro encriptado '{0}'. Palavra-passe errada? -CRC falhou no ficheiro encriptado '{0}'. Palavra-passe errada? -3710 -Palavra-passe errada? -3721 -Método de compressão não suportado -Erro nos dados -O CRC falhou -Dados indisponíveis -Fim inesperado nos dados -Existem alguns dados após o final dos dados de carga útil -Não é um arquivo -Erro nos Cabeçalhos -Palavra-passe errada -3763 -Início de arquivo indisponível -Início de arquivo não confirmado - - - -Funcionalidade não suportada -3800 -Insira a palavra-passe -Introduza a palavra-passe: -Reintroduza a palavra-passe: -&Mostrar palavra-passe -As palavras-passe não coincidem -Para a palavra-passe, utilize apenas letras inglesas, números e os caracteres especiais (!, #, $, ...) -A palavra-passe é muito comprida -Palavra-passe -3900 -Tempo decorrido: -Tempo restante: -Tamanho: -Velocidade: -Processado: -Rácio de compressão: -Erros: -Arquivos: -4000 -Adicionar ao arquivo -&Arquivo: -&Modo de actualização: -&Formato do arquivo: -Níve&l de compressão: -Método de &compressão: -Tamanho do &dicionário: -&Tamanho da &palavra: -Tamanho dos blocos sólidos: -Nº de processos do CPU: -&Parâmetros: -Opções -Criar arquivo SF&X -Comprimir ficheiros partilhados -Encriptação -Método de encriptação: -Encriptar &nomes de ficheiros -Utilização de memória para compressão: -Utilização de memória para descompressão: -Excluir ficheiros após compressão -4040 -Armazenar links simbólicos -Armazenar links do disco rígido -Armazenar fluxo de dados alternados -Armazenar segurança de ficheiros -4050 -Guardar -Muito rápido -Rápido -Normal -Máxima -Ultra -4060 -Adicionar e substituir ficheiros -Actualizar e adicionar ficheiros -Actualizar ficheiros -Sincronizar ficheiros -4070 -Procurar -Todos os ficheiros -Não sólido -sólido -6000 -Copiar -Mover -Copiar para: -Mover para: -A copiar... -A mover... -A mudar o nome... -Seleccione a pasta de destino. -Operação não suportada. -Erro ao mudar o nome do ficheiro ou pasta -Confirmar a cópia dos ficheiros -Quer mesmo copiar os ficheiros para o arquivo? -6100 -Confirmar a eliminação do ficheiro -Confirmar a eliminação da pasta -Confirmar a eliminação de múltiplos ficheiros -Quer mesmo eliminar o '{0}'? -Quer mesmo eliminar a pasta '{0}' e todo o seu conteúdo? -Quer mesmo eliminar os itens {0}? -A eliminar... -Erro ao eliminar o ficheiro ou pasta -O sistema não consegue mover para a reciclagem um ficheiro com uma localização longa -6300 -Criar pasta -Criar ficheiro -Nome da pasta: -Nome do ficheiro: -Nova Pasta -Novo ficheiro -Erro ao criar a pasta -Erro ao criar ficheiro -6400 -Comentário -&Comentário: -Seleccionar -Desseleccionar -Máscara: -6600 -Propriedades -Histórico de pastas -Mensagens de diagnóstico -Mensagem -7100 -Computador -Rede -Documentos -Sistema -7200 -Adicionar -Extrair -Testar -Copiar -Mover -Eliminar -Info -7300 -Separar ficheiro -&Separar para: -Separar por &volumes, bytes: -A separar... -Confirmar separação -Quer mesmo separar o ficheiro em {0} volumes? -O tamanho do volume tem de ser inferior ao tamanho do ficheiro original -Tamanho do volume incorrecto -Tamanho do volume especificado: {0} bytes.\nQuer mesmo separar o arquivo nestes volumes? -7400 -Combinar ficheiros -&Combinar para: -A combinar... -Seleccione apenas o primeiro ficheiro -Não foi possivel apagar o ficheiro como parte do ficheiro dividido -Não foi possível encontrar mais do que uma parte do ficheiro dividido -7500 -A calcular o checksum... -Informações do checksum -CRC checksum para dados: -CRC checksum para dados e nome: -7600 -Desempenho -Utilização de Memória: -A comprimir -A descomprimir -Desempenho -Desempenho Total -Actual -Resultante -Utilização CPU -Desemp. / Utiliza. -Passagens: -7700 -Link -Link -Link de: -Link para: -7710 -Link Tipo -Link do Disco Rígido -Link do Ficheiro Simbólico -Link do Directório Simbólico -Directório de Junção \ No newline at end of file diff --git a/Utils/7-Zip/Lang/ro.txt b/Utils/7-Zip/Lang/ro.txt deleted file mode 100644 index 0498a8e95..000000000 --- a/Utils/7-Zip/Lang/ro.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.59 : Lucian Nan : http://www.prizeeinternational.com -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Romanian -Română -401 -Bine -Anulare - - - -&Da -&Nu -&Închide -Ajutor - -&Continuă -440 -Da, pe &toate -N&ici unul -Opreşte -Restartează -În &fundal -La &suprafaţă -&Pauză -În pauză -Eşti sigur că vrei să anulezi? -500 -&Fişier -&Editează -&Vizualizează -F&avorite -&Unelte -&Ajutor -540 -&Deschide -Deschide î&n -Deschide în &afară -&Vizualizeză -&Editează -&Redenumeşte -&Copiază la... -&Mută la... -Şter&ge -Împarte &fişierul... -&Uneşte fişierele... -&Proprietăţi -Comen&tariu -Calculează suma de verificare - -Crează director -Crează fişier -&Ieşire -600 -&Selectează tot -&Deselectează tot -&Inversează selecţia -Selectează... -Deselectează... -Selectează după tip -Deselectează după tip -700 -Iconiţe m&ari -Iconiţe m&ici -&Listă -&Detalii -730 -Nesortat -Vedere plană -&2 panouri -Bare de &unelte -Deschide directorul rădăcină -Un nivel mai sus -Istoria directoarelor... -&Împrospătează -750 -Bara de arhivare -Bara de unelte standard -Butoane mari -Arată textul butoanelor -800 -&Adaugă directorul în Favorite ca -Semn de carte -900 -&Opţiuni... -&Banc de încercare -960 -&Conţinut... -&Despre 7-Zip... -1003 -Calea -Nume -Extensie -Director -Mărime -Mărimea pachetului -Atribute -Creată -Accesată -Modificată -Solidă -Comentat -Criptat -Împarte înainte -Împarte după -Dicţionar -CRC -Tip -Anti -Metoda -SO gazdă -Fişier de sistem -Utilizator -Grup -Blochează -Comentariu -Poziţia -Prefixul destinaţiei -Directoare -Fişiere -Versiunea -Volum -Multivolume -Ofset -Legături -Blocuri -Volume - -64-bit -Big-endian -CPU -Mărime fizică -Mărimea antetelor -Checksum -Caracteristici -Adresa virtuală - - - - - - -Eroare -Mărimea totală -Spaţiu liber -Mărimea grupului -Etichetă -Nume local -Distribuitor -2100 -Opţiuni -Limba -Limba: -Editor -&Editor: - -2200 -Sistem -Asociază 7-Zip cu: -2301 -Integrează 7-Zip în contextul meniului shell -Contextul meniului în cascadă -Obiectele meniului: -2320 - - -Deschide arhiva -Dezarhivează fişierele... -Adaugă într-o arhivă... -Testează arhiva -Dezarhivează aici -Dezarhivează în {0} -Adaugă în {0} -Arhivează şi trimite email... -Arhivează în {0} şi trimite email -2400 -Directoare -&Directorul de lucru -Directorul &tempotar al sistemului -&Actual -&Specificat: -Utilizează numai pentru discurile detaşabile -Specifică o destinaţie pentru arhivele temporare. -2500 -Setări -Arată ".." obiect -Arată iconiţele reale ale fişierului -Arată meniul sistemului -Selectează &tot rândul -Arată liniile de ghidare - -Mod de selectare &alternativă -Utilizează pagini &mari de memorie -2900 -Despre 7-Zip -7-Zip este un program gratuit. Oricum, poţi contribui la dezvoltarea 7-Zip înregistrându-te. -3000 -Sistemul nu poate aloca memoria necesară -Nu sunt erori -{0} obiect(e) selectat(e) -Nu pot crea directorul '{0}' -Operaţiile de actualizare nu sunt suportate pentru această arhivă. -Nu pot deschide fişierul '{0}' ca arhivă -Nu pot deschide arhiva criptată '{0}'. Parola greşită? -Tip de arhivă nesuportat -Fișierul {0} există deja -Fişierul '{0}' a fost modificat.\nDoreşti să îl actualizez în arhivă? -Nu pot actualiza fişierul\n'{0}' -Nu pot porni editorul. -The file looks like a virus (the file name contains long spaces in name). -Operația nu poate fi apelată dintr-un director cu cale lungă. -Trebuie să alegi un fișier -Trebuie să alegi unul sau mai multe fișiere -Prea multe obiecte -3300 -Dezarhivez -Arhivare -Testez -Deschid... -Citesc... -3400 -Dezarhivează -Dezarhivează în: -Specifică o destinaţie pentru fişierele dezarhivate. -3410 -Modul destinaţie -Numele întreg al destinaţiei -Fără locaţie -3420 -Modul de înlocuire -Întreabă înainte de a înlocui -Înlocuieşte fară a întreba -Sări peste fişierele existente -Auto redenumire -Auto redenumeşte fişierele existente -3500 -Aprobă înlocuirea fişierului -Fişierul există deja în directorul destinaţie. -Doriţi să înlocuiţi fişierul existent -cu acesta? -{0} octeţi -A&uto redenumire -3700 -Metodă de arhivare nesuportată pentru '{0}'. -Eroare de date la '{0}'. Fişierul este corupt. -Verificarea CRC a eşuat pentru '{0}'. Fişierul este corupt. -Erori de date la fişierul criptat '{0}'. Parolă greşită? -Verificarea CRC a eşuat pentru fişierul criptat '{0}'. Parolă greşită? -3800 -Introdu parola -Introdu parola: -Reintrodu parola: -&Arată parola -Parolele nu sunt identice -Utilizaţi numai litere, cifre şi caracterele speciale (!, #, $, ...) pentru parolă -Parola este prea lungă -Parola -3900 -Timp trecut: -Timp rămas: -Mărimea: -Viteza: -Procesat: -Rata de comprimare: -Erori: -Arhive: -4000 -Adaugă într-o arhivă -&Arhivează: -Modul de a&ctualizare: -&Formatul arhivei: -&Nivel de arhivare: -&Metoda de arhivare: -Mărimea &dicţionarului: -Mărimea &cuvântului: -Mărimea blocului solid: -Numărul de procesoare utilizate: -&Parametri: -Opţiuni -Crează arhivă SF&X -Arhivează fişierele partajate -Criptare -Metoda de criptare: -Criptează &numele fişierului -Memorie utilizată pentru arhivare: -Memorie utilizată pentru dezarhivare: -4050 -Stochează -Imediată -Rapidă -Normală -Maximă -Ultra -4060 -Adaugă şi înlocuieşte fişierele -Actualizează şi adaugă fişierele -Actualizează fişierele existente -Sincronizează fişierele -4070 -Caută -Toate fişierele -NEsolid -Solid -6000 -Copiază -Mută -Copiază la: -Mută la: -Copiez... -Mut... -Redenumesc... -Alege directorul destinaţie. -Operaţia nu este suportată. -Eroare la redenumirea fişierului sau directorului -Aprobă copierea fişierului -Eşti sigur că vrei să copiezi fişierele în arhivă -6100 -Aprobă ştergerea fişierului -Aprobă ştergerea directorului -Aprobă ştergerea mai multor fişiere -Eşti sigur că vrei să ştergi '{0}'? -Eşti sigur că vrei să ştergi directorul '{0}' şi tot conţinutul lui? -Eşti sigur că vrei să ştergi aceste {0} obiecte? -Şterg... -Eroare la ştergerea fişierului sau directorului -Sistemul nu poate muta un fişier cu cale lungă la Coşul de gunoi -6300 -Crează director -Crează fişier -Numele directorului: -Numele fişierului: -Director nou -Fişier nou -Eroare la crearea directorului -Eroare la crearea fişierului -6400 -Comentariu -&Comentariu: -Selectează -Deselectează -Masca: -6600 -Proprietăţi -Istoria directoarelor -Mesaje de diagnosticare -Mesaj -7100 -Computer -Reţea -Documente -Sistem -7200 -Arhivează -Dezarhivează -Testează -Copiază -Mută -Şterge -Info -7300 -Împarte fişierul -Î&mparte în: -Împarte în &volume, octeţi: -Împart... -Confirmă împărţirea -Eşti sigur că vrei să imparţi arhiva în {0} volume (părţi)? -Dimensiunea volumului trebuie să fie mai mică decât dimensiunea fişierului original -Dimensiunea volumului este incorectă -Dimensiunea volumului specificat: {0} octeţi.\nEşti sigur că vrei să împarţi arhiva în mai multe volume (părţi)? -7400 -Uneşte fişierele -&Uneşte în: -Unesc... -Alege doar prima parte din fişierul împărțit -Nu pot detecta fișierul ca parte a fișierului împărțit -Nu găsesc mai mult de o parte din fișierul împărțit -7500 -Calculez suma de control... -Informaţii despre suma de control -Suma de control CRC pentru conţinut: -Suma de control CRC pentru conţinut şi nume: -7600 -Banc de încercare -Memorie utilizată: -Arhivez -Dezarhivez -Rata -Rata totală -Actual -Rezultate -Utilizarea procesorului -Rata / Utilizare -Trecute: diff --git a/Utils/7-Zip/Lang/ru.txt b/Utils/7-Zip/Lang/ru.txt deleted file mode 100644 index 7e5cf4960..000000000 --- a/Utils/7-Zip/Lang/ru.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; 15.10 : 2015-10-31 : Igor Pavlov -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Russian -Русский -401 -OK -Отмена - - - -&Да -&Нет -&Закрыть -Помощь - -&Продолжить -440 -Да для &всех -Нет для в&сех -Стоп -Перезапуск -&Фоном -&На передний план -&Пауза -На паузе -Вы действительно хотите прервать операцию? -500 -&Файл -&Правка -&Вид -&Избранное -С&ервис -&Справка -540 -&Открыть -Открыть &внутри -Открыть снару&жи -Просмотр -&Редактировать -Переи&меновать -&Копировать в... -&Переместить в... -&Удалить -Ра&збить файл... -О&бъединить файлы... -Сво&йства -Комме&нтарий... -Контрольная сумма -Сравнить -&Создать Папку -Созд&ать Файл -В&ыход -Ссылка -&Альтернативные Потоки -600 -Выделить в&се -Убрать выделение -&Обратить в&ыделение -Выделить... -Убрать выделение... -Выделить по типу -Убрать выделение по типу -700 -&Крупные значки -&Мелкие значки -Спис&ок -&Таблица -730 -Без сортировки -Плоский режим -&2 Панели -&Панели инструментов -Открыть корневую папку -Переход на один уровень вверх -История папок... -О&бновить -Автообновление -750 -Панель кнопок архиватора -Стандартная панель кнопок -Большие кнопки -Надписи на кнопках -800 -Добавить папку в &избранное как -Закладка -900 -Настройки... -Тестирование производительности -960 -&Оглавление... -О &программе... -1003 -Путь -Имя -Расширение -Папка -Размер -Сжатый -Атрибуты -Создан -Открыт -Изменен -Непрерывный -Комментарий -Зашифрован -Разбит До -Разбит После -Словарь - -Тип -Анти -Метод -Система -Файловая Система -Пользователь -Группа -Блок -Комментарий -Позиция -Путь -Папок -Файлов -Версия -Том -Многотомный -Смещение -Ссылок -Блоков -Томов - - - -Процессор -Физический Размер -Размер Заголовков -Контрольная Сумма -Характеристики -Виртуальный Адрес - -Короткое Имя -Создатель -Размер Сектора -Режим -Символьная Ссылка -Ошибка -Емкость -Свободно -Размер кластера -Метка -Локальное имя -Провайдер -NT Безопасность -Альтернативный Поток - -Удаленный -Дерево - - -Тип Ошибки -Ошибки -Ошибки -Предупреждения -Предупреждение -Потоки -Альтернативные Потоки -Размер Альтернативных потоков -Виртуальный Размер -Распакованный Размер -Общий Физический Размер -Номер Тома -Подтип -Короткий Комментарий -Кодовая Страница - - - -Размер Остатка -Размер Встроенного Блока -Ссылка -Жесткая Ссылка -iNode - -Только для чтения -2100 -Настройки -Язык -Язык: -Редактор -&Редактор: -&Программа сравнения: -2200 -Система -Ассоциировать 7-Zip с файлами: -Все пользователи -2301 -Встроить 7-Zip в контекстное меню оболочки -Каскадное контекстное меню -Элементы контекстного меню: -Иконки в контекстном меню -2320 -<Папка> -<Архив> -Открыть архив -Распаковать -Добавить к архиву... -Тестировать -Распаковать здесь -Распаковать в {0} -Добавить к {0} -Сжать и отправить по email... -Сжать в {0} и отправить по email -2400 -Папки -&Рабочая папка -&Системная временная папка -&Текущая -&Задать: -Использовать только для сменных носителей -Укажите положение для временных архивов. -2500 -Настройки -Показывать элемент ".." -Показывать реальные иконки файлов -Показывать системное меню -Курсор на всю строку -Показывать разделители -Открывать одним щелчком -Альтернативный режим пометки -Использовать большие страницы памяти -2900 -О программе 7-Zip -7-Zip является свободно распространяемой программой. -3000 -Недостаточно свободной памяти -Ошибок не найдено -Выделено объектов: {0} -Не удалось создать папку '{0}' -Операции изменения не поддерживаются для этого архива. -Не удалось открыть файл '{0}' как архив -Не удалось открыть зашифрованный архив '{0}'. Неверный пароль? -Неподдерживаемый тип архива -Файл {0} уже существует -Файл '{0}' был изменен.\nВы хотите обновить его в архиве? -Не удалось обновить файл\n'{0}' -Не удалось запустить редактор -Файл похож на вирус (имя файла содержит длинную последовательность пробелов). -Операция не может быть исполнена из папки, которая имеет длинный путь. -Вы должны выделить один файл -Вы должны выделить один или несколько файлов -Слишком много элементов -Не удалось открыть файл как {0} архив -Файл открыт как {0} архив -Архив открыт со смещением -3300 -Распаковка -Упаковка -Тестирование -Открытие... -Сканирование... -Удаление -3320 -Добавление -Обновление -Анализ -Копирование -Перепаковка -Пропуск -Удаление -Создание заголовков -3400 -Извлечь -&Распаковать в: -Укажите положение для извлекаемых файлов. -3410 -Пути к файлам: -Полные пути -Без путей -Абсолютные пути -Относительные пути -3420 -Перезапись: -С подтверждением -Без подтверждения -Пропускать -Переименовать автоматически -Переименовать существующие -3430 -Устранить дублирование корневой папки -Устанавливать права доступа -3500 -Подтверждение замены файла -Папка уже содержит обрабатываемый файл. -Заменить существующий файл -следующим файлом? -{0} байтов -Переименовать автом. -3700 -Неподдерживаемый метод сжатия для файла '{0}'. -Ошибка в данных в '{0}'. Файл испорчен. -Ошибка CRC в '{0}'. Файл испорчен. -Ошибка в данных зашифрованного файла '{0}'. Неверный пароль? -Ошибка CRC для зашифрованного файла '{0}'. Неверный пароль? -3710 -Неверный пароль? -3721 -Неподдерживаемый метод сжатия -Ошибка в данных -Ошибка CRC -Недоступные данные -Неожиданный конец данных -Есть данные после конца блока полезных данных -Не является архивом -Ошибка в заголовках -Неверный пароль -3763 -Недоступно начало архива -Неподтвержденное начало архива - - - -Неподдерживаемая функциональность -3800 -Ввод пароля -&Введите пароль: -Повторите пароль: -&Показать пароль -Пароли не совпадают -Для пароля используйте только символы латинского алфавита, цифры и специальные символы (!, #, $, ...) -Пароль слишком длинный -&Пароль -3900 -Прошло: -Осталось: -Всего: -Скорость: -Размер: -Степень сжатия: -Ошибок: -Архивов: -4000 -Добавить к архиву -&Архив: -&Режим изменения: -&Формат архива: -&Уровень сжатия: -&Метод сжатия: -Размер &словаря: -Размер с&лова: -Размер блока: -Число потоков: -&Параметры: -&Опции -Создать SF&X-архив -Сжимать открытые для записи файлы -Шифрование -Метод шифрования: -&Шифровать имена файлов -Объем памяти для упаковки: -Объем памяти для распаковки: -Удалять файлы после сжатия -4040 -Сохранять символьные ссылки -Сохранять жесткие ссылки -Сохранять альтернативные потоки -Сохранять права доступа -4050 -Без сжатия -Скоростной -Быстрый -Нормальный -Максимальный -Ультра -4060 -Добавить и заменить -Обновить и добавить -Обновить -Синхронизировать -4070 -Пролистать -Все файлы -По размеру файла -Непрерывный -6000 -Копировать -Переместить -Копировать в: -Переместить в: -Копирование... -Перемещение... -Переименование... -Укажите папку. -Операция не поддерживается для этой папки. -Ошибка при переименовании файла или папки -Подтверждение копирования файлов -Вы действительно хотите скопировать эти файлы в архив -6100 -Подтверждение удаления файла -Подтверждение удаления папки -Подтверждение удаления группы файлов -Вы действительно хотите удалить "{0}"? -Вы действительно хотите удалить папку "{0}" и все ее содержимое? -Вы действительно хотите удалить эти объекты ({0} шт.)? -Удаление... -Ошибка при удалении файла или папки -Система не поддерживает операцию удаления файлов с длинными путями в корзину -6300 -Создать папку -Создать файл -Имя папки: -Имя файла: -Новая папка -Новый файл -Ошибка при создании папки -Ошибка при создании файла -6400 -Комментарий -&Комментарий: -Выделить -Убрать выделение -Маска: -6600 -Свойства -История папок -Сообщения -Сообщение -7100 -Компьютер -Сеть -Документы -Система -7200 -Добавить -Извлечь -Тестировать -Копировать -Переместить -Удалить -Информация -7300 -Разбить файл -&Разбить в: -Разбить на &тома размером (в байтах): -Разбиение... -Подтверждение разбиения -Вы действительно хотите разбить файл на {0} частей? -Размер тома должен быть меньше размера исходного файла -Ошибка в поле для задания размера томов -Установленный размер тома: {0} байтов.\nВы действительно хотите разбить архив на такие тома? -7400 -Объединить файлы -&Объединить в: -Объединение... -Необходимо выделить только первую часть разбитого файла -Не удалось распознать разбитый файл -Не удалось найти более одной части разбитого файла -7500 -Вычисление контрольной суммы... -Контрольная сумма -Контрольная сумма CRC для данных: -Контрольная сумма CRC для данных и имен: -7600 -Тестирование производительности -Объем памяти: -Упаковка -Распаковка -Рейтинг -Общий рейтинг -Текущий -Итоговый -Нагрузка -Рейтинг / Нагр. -Проходов: -7700 -Ссылка -Связать -Источник: -Цель: -7710 -Тип ссылки -Жесткая ссылка -Символьная ссылка (Файл) -Символьная ссылка (Папка) -Точка соединения (Junction) diff --git a/Utils/7-Zip/Lang/sa.txt b/Utils/7-Zip/Lang/sa.txt deleted file mode 100644 index c919de2e0..000000000 --- a/Utils/7-Zip/Lang/sa.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 9.07 : Vinayy Sharrma, अनुवादं विनय शर्मा संस्कृतम् गर्व कुरु, जय हिन्दं ! जय संस्कृतम्! एतत् साधारण अनुवादं अस्ति -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Sanskrit, Indian, हिन्दुस्तानं -संस्कृत -401 -ठीक अस्ति -रद्द - - - -&हाँ -&ना -&बंद कुरु -मददं - -&जारी रखे -440 -&सर्वस्य हाँ -&सर्वस्य ना -रूको -पुनः शुरु कुरु -&पॄष्ठ्भूमि -&अग्रभूमि(डेस्क्टोप) -&विश्राम -विश्रामितं -त्वम रद्द करना चाहते हो. तुम्हें यकीन अस्ति क्या? -500 -&फ़ाइलम् -&संपादनम् -&दर्शनम् -&मनपसंदम् -&औजारम् -&मददम् -540 -&अनावृतं -&अंदर अनावृतं -&बहिः अनावृतं -&दृश्यम् -&संपादनम् -&पुन: नामकरणम् -&में नकल बनाये... -&में ले जायें... -&मिटायें -&फ़ाइलस्य विभाजनं कुरु... -&फ़ाइलस्य संयोजनं कुरु... -&संपत्तियाँ वा गुणं -&टिप्पणी -&जाँच योगस्य गणनां कुरु -&अन्तर -&फोल्डरं निर्माणम् कुरु -&फ़ाइलं निर्माणम् कुरु -&निर्गमन -600 -&सर्व चयनं कुरु -&सर्व अचयनितं कुरु -&चयन उलटा कुरु -चयनं कुरु... -अचयनं कुरु... -प्रकार द्वारा चयनम् -प्रकार द्वारा अचयनम् -700 -विशाल प्रतीकं -लघु प्रतीकं -&सूची -&वर्णनं -730 -अवितरितम् -चौड़ा दृश्य -&२ फ़लक -&औजार पट्टीयाँ -मूल फोल्डरं अनावृतं -एक स्तर उर्ध्व चढ़े -फ़ोल्डरो का इतिहास... -&ताजा कुरु -750 -संग्रहम् उपकरणपट्टी -मानक औजार पट्टी -विशाल खटके(बटन) -खटके(बटन) के शब्द दिखायें -800 -&फोल्डरं मनपसंद में ऎसे जोड़े... -पुस्तचिन्हम् -900 -&विकल्पम्... -&बेञ्चमार्कम्(प्रामाणिक तुलना) -960 -&सामग्री... -7-जिप विषय... -1003 -मार्ग -नाम -विस्तारं -फोल्डरं -आकारं -कुल आकारं -विशेषता वा गुणधर्म -सर्जितं -चालितम् -परिवर्धितं -ठोस -टिप्पणी -गुप्तिकृतम् -के पूर्व विभाजनं(टुकडे) कुरु -के पश्चात विभाजनं(टुकडे) कुरु -शब्दकोशं -सीआरसी -प्रकारं -विरोधी -पद्धति -ओपरेटिंग सिस्टम -फ़ाइलं प्रणाली -प्रयोगकर्ता -समूहम् -रोक वा टुकड़े -प्रतिक्रिया -स्थानं -मार्ग प्रत्ययं -फोल्डर्स -फाइल्स -संस्करणम् -जत्था -अनेक जत्थे -ओफसेट -कडियाँ -टुकड़े -जत्थे - -64-बिट -विशाल-एन्डियन -सीपीयू -भौतिक आकारं -शीर्षकाः आकारं -जाँचयोग -चरित्रताऎं -आभासी पता -आईडी -संक्षिप्तः नामं -सर्जक अनुप्रयोगं -सेक्टरस्य आकारं -स्थिति -कड़ी -त्रुटि -कुल आकारं -स्वतन्त्र रिक्तस्थानं(खाली जगह) -क्लस्टर(समूह) आकारं -ध्यानाकर्षकं(लेबलम्) -स्थानिय नामम् -प्रदायकम् -2100 -विकल्पम् -भाषा -भाषा: -संपादकम् -&संपादक: -&अन्तर: -2200 -प्रणाली वा तंत्रम् -संबधित कुरु 7-जिप के साथ: -2301 -7-जिपस्य शेल(कवच) प्रसंग मेनु में जोडें -सोपानीकृत(केस्केडेड) प्रसंग मेनु -प्रसंग(कोन्टेक्स्ट) मेनु वस्तुएँ: -2320 -<फोल्डरं> -<संग्रहम्(आर्चिव)> -संग्रहम् अनावृतं -फ़ाइल्स बहिः निकाले... -संग्रहम् में जोड़े... -संग्रहमस्य जाँच कुरु -यहीं बहिः निकाले -{0} में बहिः निकाले -{0} में जोड़े -संकुचनं एवम् ईमेलम् कुरु... -{0} में दबायें एवम् ईमेलं कुरु -2400 -फ़ोल्डर्स -&कार्यरत फोल्डरं -&प्रणालयास्य अस्थायी(टेम्पररी) फोल्डरं -&चालू -&निर्दिष्ट: -मात्र हटाने योग्य(रिमूवेबल) ड्राईवाय ही प्रयोगं कुरु -अस्थायी संग्रहम् फाइलाय स्थानं निर्दिष्टं कुरु(बतायें). -2500 -व्यवस्थाएँ -दिखाओ ".."वस्तु -वास्तविक फ़ाइल प्रतिमायें दिखाओ -तंत्रस्य मेनु दिखाओ -&पूर्ण पन्क्तिस्य चयनं -&ग्रिड(जाल) रेखा दिखाओ -वस्तु अनावृताय एकं ही(सिंगल)-क्लिकम् -&वैकल्पिक चयनं स्थिति -&विशाल् स्मृति पृष्ठस्य प्रयोगं कुरु -2900 -7-जिप विषय -7-जिपं एतत निःशुल्क सॉफ़्टवेयर अस्ति. तथापि, भवान् पंजीकृतं(रजिस्टर्ड) होकर७-ज़िपस्य विकास में सहयोग कर सकते अस्ति. -3000 -तंत्रम् आवश्यक मात्रा में मेमोरी(स्मृति) वितरितं ना कर सकता अस्ति -इनमे कोई भी त्रुटि ना अस्ति -{0} चयनित वस्तु(एँ) -'{0}' फोल्डरं सर्जित ना कर सकता -एतत् संग्रहमस्य अद्यतनीकृत संचालन समर्थित ना अस्ति. -'{0}' फाइल को संग्रहम् के रूप में ना खोल सकता -'{0}' गुप्तिकृतम् संग्रहम् को ना खोल सकता. मिथ्या कूटशब्दम्? -असमर्थित संग्रहम् प्रकारं -फाइलं {0} पहले से मौजूद अस्ति -'{0}' फ़ाइल परिवर्धितं हुई अस्ति.\nक्या तुम संग्रहम् में इसे अद्यतनीकृतं करना चाहते हो? -फ़ाइल को अद्यतनीकृतं ना कर सकता\n'{0}' -संपादक को शुरू ना कर सकता. -यह फाइलं एक विषाणु(वायरस) जैसी लगती अस्ति(फाइलं नाम लंबी खाली जगह नाम में रखता अस्ति). -जिस फोल्डरं का लंबा मार्ग अस्ति उससे सञ्चालनं क्रिया ना बुलाई जा सकती. -तुम्हे एक फाइलं का चयन तो करना ही होगा -तुम्हे एक वा अधिक फाइलों को चुनना ही होगा -अत्यधिक वस्तुएँ -3300 -बहिः निकाल रहा अस्ति -संकुचनं कर रहा अस्ति -परीक्षणम् -अनावृतं कर रहा अस्ति... -तलाशी(स्कैनिंग) कर रहा अस्ति... -3400 -बहिः निकाले -&बहिः निकाले: -बहिः निकाली हुई फ़ाइलों के लिये स्थानं निर्दिष्टं कुरु. -3410 -मार्ग स्थिति -पूर्ण मार्गनामं -कोई मार्ग नामं ना अस्ति -3420 -अधिलेखन रीत -अधिलेखन करने से पहले पृच्छाः -बिना पृच्छाः अधिलेखनं(पुराने को मिटाना) कुरु -पहले से मौजूद फ़ाइलस को छोड़े -स्वचालित पुन: नामकरणं -पहले से मौजूद फ़ाइलस का स्वचालितं(ओटोमेटिक) पुन: नामकरणं कुरु -3500 -फ़ाइलं प्रतिस्थापनं को पक्का कुरु -गन्तव्य फोल्डरं में पहले से ही प्रक्रिया हुई फ़ाइलं अस्ति. -क्या भवान् पहले से मौजूद फ़ाइल को बदलना पसंद करेंगे? -इसके साथ? -{0} बाइट्स -स्वचालित पुन: नामकरणम् -3700 -'{0}' के लिए असहायक दबाने की पद्धति. -डेटा त्रुटि'{0}' में. फ़ाइलं टूटी हुई अस्ति. -'{0}' में सीआरसी असफल. फ़ाइलं टूटी हुई अस्ति. -'{0}' गुप्तिकृतम्(एनक्रिप्टेड) फाइलं में डेटा त्रुटि. मिथ्या कूटशब्दम्? -'{0}'गुप्तिकृतम्(एनक्रिप्टेड) फाइलं में सीआरसी असफल. मिथ्या कूटशब्दम्? -3800 -कूटशब्दम्(पासवर्ड) डाले -कूटशब्दम्(पासवर्ड) डाले: -कूटशब्दम् पुनः डाले: -&कूटशब्दम्(पासवर्ड) दिखाओ -कूटशब्दम् सहेजे हुए से अलग अस्ति -कूटशब्दम् के लिये मात्र इंग्लिश वर्णमाला, अंकाः और विशेष अक्षरों (!, #, $, ...) का ही उपयोग कुरु -कूटशब्दम् अत्यधिक विशाल अस्ति -कूटशब्दम्(पासवर्ड) -3900 -व्यतीत समय: -शेष बचा समय: -कुल आकारं: -गति: -प्रक्रिया किया हुआ: -दबाने(आकारं छोटा करने) का अनुपातं: -त्रुटियाँ: -संग्रहम्: -4000 -संग्रहम् में जोड़े -&संग्रहम्: -&अद्यतनीकरणं स्थिति(मोड): -संग्रहम् &ढाँचा: -&संकुचनम् स्तर: -&संकुचनम् विधि: -&शब्दकोशम् आकारं: -&शब्द आकारं: -ठोस टुकडे का आकारं: -सीपीयू सूत्र संख्या: -&परिमाप: -विकल्प -&एसएफ़एक्स(SFX) संग्रहम् निर्माणम् कुरु -साझी फाइलें संकुचितं कुरु -गुप्तिकरणम् -गुप्तिकरणम् पद्धति: -फ़ाइल &नाम गुप्तिकरणम् कुरु -संकुचनस्य स्मृति प्रयोग: -प्रसारणस्य स्मृति प्रयोग: -4050 -भण्डारणम् -सर्वाधिक तेज -तेज -साधारणम् -अधिकतम -अत्यन्त -4060 -फ़ाइलें जोड़े एवम् प्रतिस्थापित कुरु -फ़ाइले अद्यतनीकृतं कुरु एवम् जोड़े -अवस्थितं फ़ाइलें ताजा कुरु -फाइलें समक्रमण(सिंक्रोनाईज़) कुरु -4070 -ब्राउजम् वा घूमे -सर्वाः फ़ाइलें -अ-ठोसं -ठोसं -6000 -नकल -ले जायें -में नकल: -में ले जायें: -नकल... -ले जा रहा अस्ति... -पुन: नामकरणं... -गन्तव्य फोल्डरं चयनित कुरु. -एतत् फोल्डरं के लिये यह सञ्चालनं क्रिया समर्थितं ना अस्ति. -फ़ाइल वा फोल्डरं के पुन: नामकरणं में त्रुटि -फ़ाइल की नकल करना पक्का कुरु -तुम संग्रहम् में फाइलं की प्रतिलिपि करना चाहते हो क्या तुम्हे यकीन अस्ति -6100 -फ़ाइल मिटाये यह पक्का कुरु -फोल्डरं मिटायें पक्का कुरु -अनेक फ़ाइल मिटायें पक्का कुरु -क्या तुम्हे यकीन अस्ति कि तुम मिटाना चाहते हो '{0}'? -क्या तुम्हे यकीन अस्ति कि तुम फोल्डरं मिटाना चाहते हो '{0}' और इसकी सर्वाः सामग्री भी? -क्या तुम्हे यकीन अस्ति कि तुम मिटाना चाहते हो इन {0} वस्तुओं को? -मिटा रहा अस्ति... -फ़ाइलं किंवा फोल्डरं मिटाने में त्रुटि -तंत्र लंबे मार्ग वाली फाइलं को पुनःचक्रण पेटी(रिसाईकल बिन) में ना ले जा सकता अस्ति. -6300 -फ़ॊल्डर निर्माणम् कुरु -फ़ाइल निर्माणम् कुरु -फोल्डरं नाम: -फ़ाइल नाम: -नवीन फ़ॊल्डर -नवीन फ़ाइलं -फोल्डरं निर्माणम् करने में त्रुटि -फ़ाइल निर्माणम् करने में त्रुटि -6400 -टिप्पणी -&टिप्पणी: -चयनम् -चयन रद्द -मुखौटा: -6600 -गुणम् वा संपत्तियाँ -फ़ोल्डरों का इतिहास -निदानात्मकं संदेश -संदेशं -7100 -संगणकम् -सञ्जालम् -दस्तावेजम् -प्रणाली -7200 -जोड़े -बहिः निकाले -परीक्षणम् -नकल -ले जायें -मिटायें -सूचना -7300 -फ़ाइलस्य विभाजनं कुरु -&में विभाजनं: -जत्थों में विभाजनं, बाइट्स: -विभाजनं कर रहा अस्ति... -विभाजनं करना पक्का कुरु -क्या तुम्हे यकीन अस्ति कि तुम फाइलं को {0} जत्थों में विभाजित करना चाहते हो? -मूल फाइलं के आकारं की तुलना में जत्थे का आकारं छोटा ही होना चाहिए -जत्थे का आकारं मिथ्या अस्ति -निर्देशित जत्था आकारं: {0} बाइटस.\n भवान् संग्रहम् को ऎसे जत्थों में विभाजितं करना चाहते अस्ति, क्या आपको यकीन अस्ति? -7400 -फ़ाइले संयोजितं कुरु -&में संयोजनं कुरु: -संयोजनं हो रहा अस्ति... -विभाजितं फाइल का मात्र प्रथम भागं ही चयनितं कुरु -फाइलं को विभाजित फाइलं के भाग के रूप में पहचान ना सकता -विभाजित फाइलं का एक से ज्यादा भाग ना ढूँढ सकता -7500 -जाँचयोगस्य(चेकसम) गणनां कर रहा अस्ति... -जाँचयोग(चेकसम) माहिती -सीआरसी जाँचयोग(चेकसम) आँकड़ों के लिये : -सीआरसी जाँचयोग(चेकसम) आँकड़ों और नामों के लिये : -7600 -(कसौटी चिन्हं)बेञ्चमार्कम् -स्मृति उपयोग: -संकुचनं कर रहा अस्ति -प्रसारणं हो रहा अस्ति -क्रमांकन -कुल क्रमांकन -वर्तमानम् -परिणामम् -सीपीयू उपयोग -क्रमांकन / उपयोग -पास: diff --git a/Utils/7-Zip/Lang/si.txt b/Utils/7-Zip/Lang/si.txt deleted file mode 100644 index 5a4900181..000000000 --- a/Utils/7-Zip/Lang/si.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.59 : සුපුන් බුධාජීව (Supun Budhajeewa) -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Sinhala -සිංහල -401 -හරි -එපා - - - -ඔවු (&Y) -නැහැ (&N) -වසන්න (&C) -උදව් - -නැවත අරඹන්න (&C) -440 -සියල්ලටම ඔවු (&A) -සියල්ලටම නැහැ(&L) -නවතන්න -ප්‍රත්‍යාරම්භ කරන්න -පසුබිමින් (&B) -පෙරබිමින් (&F) -මදකට නවතන්න (&P) -මදකට නවතා ඇත -ඉවත්වීමට අවශ්‍ය බව විශ්වාස ද ? -500 -ගොනුව (&F) -සැකසුම් (&E) -දසුන (&V) -කැමතිම (&A) -මෙවලම් (&T) -උදව් (&H) -540 -විවෘත කරන්න (&O) -මෙහිම විවෘත කරන්න (&I) -පිටතින් විවෘත කරන්න (&U) -දසුන (&V) -සංස්කරණය කරන්න (&E) -නැවත නම් කරන්න (&M) -වෙනත් තැනකට පිටපත් කරන්න (&C)... -වෙනත් තැනකට ගෙනය‍න්න (&M)... -මකන්න (&D) -ගොනුව බෙදන්න (&S)... -ගොනු එකතු කරන්න (&B)... -වත්කම් (&R) -ටීකා (&N) -checksum ගණනය කරන්න - -බහාලුමක් තනන්න -ගොනුවක් තනන්න -ඉවත් වන්න (&X) -600 -සියල්ල තෝරන්න (&A) -තෝරන ලද සියල්ල ඉන් ඉවත් කරන්න -අනෙක් පැත්තට තෝරන්න (&I) -තෝරන්න... -තේරීම ඉවත් කරන්න... -වර්ගයෙන් තෝරන්න -වර්ගයෙන් තේරීම ඉවත් කරන්න -700 -විශාල මූර්ති (&G) -කුඩා මූර්ති (&M) -ලයිස්තුව (&L) -සවිස්තර (&D) -730 -අසුරන නොලද -පැතලි දසුන -පැනල &2 -මෙවලම් තීරු (&T) -ප්‍රධාන බහාලුම විවෘත කරන්න -ඉහළට එක් ස්ථරයක් -බහාලුම් අතීතය... -ප්‍රතිපූරණය කරන්න(&R) -750 -හැකිළුම් මෙවලම් තීරුව -සම්මත මෙවලම් තීරුව -විශාල බොත්තම් -බොත්තම් පෙළ දක්වන්න -800 -බහාලුම කැමතිම අංග වලට එකතු කරන අයුර (&A) -පොත් සලකුණ - අංක -900 -විකල්ප (&O)... -&Benchmark -960 -අන්තර්ගතය (&C)... -7-Zip පිළිබඳව (&A)... -1003 -මංපෙත -නම -දිගුව -බහාලුම -විශාලත්වය -හැකිළුමෙන් පසු විශාලත්වය -ලක්ෂණ -නිර්මාණය කළ දිනය -ප්‍රවේශ වූ දිනය -අළුත් කළ දිනය -සවි -ටීකා කොට ඇත -සුරක්ෂිතය -Split Before -Split After -Dictionary -CRC -වර්ගය -Anti -ක්‍රමය -ධාරක මෙහෙයුම් පද්ධතිය -ගොනු පද්ධතිය -පරිශිලක -සමූහය -Block -ටීකාව -පිහිටීම -Path Prefix -බහාලුම් -ගොනු -සංස්කරණය -Volume -Multivolume -Offset -සබැඳීන් -Blocks -Volumes - -බිට්-64 -Big-endian -මධ්‍යම සැකසුම් පද්ධතිය (CPU) -භෞතික විශාලත්වය -ශීර්ෂ විශාලත්වය -Checksum -මුහුණුවර -Virtual Address - - - - - - -දෝෂයක් -සම්පූර්ණ විශාලත්වය -නිදහස් ඉඩ -Cluster විශාලත්වය -නම් පත -Local Name -සපයන්නා -2100 -විකල්ප -භාෂාව -භාෂාව: -සංස්කාරකය -සංස්කාරකය (&E): - -2200 -පද්ධතිය -7-Zip සමග හවුල් කරන්න: -2301 -Shell context මෙනුව වෙත 7-Zip අන්තර්ගත කරන්න -Context menu අංග එක් අංගයක් යටතේ සඳහන් කරන්න‍‍‍ -Context මෙනු අංග: -2320 -<බහාලුම> -<හැකිළුම> -හැකිළුම විවෘත කරන්න -ගොනු ලිහන්න... -හැකිළුමකට ඇතුල් කරන්න... -හැකිළුම පරීක්ෂා කරන්න -මෙතැනට ලිහන්න -{0} වෙත ලිහන්න -{0} වෙත එක් කරන්න -හකුළා විදුලි තැපැල් කරන්න... -{0} වෙත හකුළා විදුලි තැපැල් කරන්න -2400 -බහාලුම් -සක්‍රීය බහාලුම් (&W) -පද්ධති තාවකාලික දෑ (Temp) බහාලුම (&S) -වත්මන් (&C) -තෝරන්න (&S): -ඉවත් කළ හැකි ධාවක සඳහා පමණක් භාවිතා කරන්න -තාවකාලික හැකිළුම් ගොනු සඳහා ස්ථානයක් දෙන්න. -2500 -සෙටිංග්ස් -".." අංගය පෙන්වන්න -ගොනු වල සත්‍ය මූර්තිය පෙන්වන්න -පද්ධති මෙනුව පෙන්වන්න -සම්පූර්ණ තීරු තේරීම (&F) -වගු රේභා පෙන්වන්න (&G) - -වෛකල්පිත තේරීම් ස්වභාවය (&A) -විශාල මතක පිටු භාවිතා කරන්න (&L) -2900 -7-Zip පිළිබඳව -7-Zip නිදහස් මෘදුකාංගයක් වුවත්, ලියාපදිංචි වීම මගින් 7-Zip හි වැඩි දියුණුව සඳහා ඔබට දායක විය හැකිය.\n\nමෙම සිංහල භාෂා පරිවර්තනය G.S.N. සුපුන් බුධාජීව (budhajeewa@gmail.com) විසින් සිදු කරන ලදී. -3000 -අවශ්‍ය මතක ප්‍රමාණය පද්ධතියට වෙන් කර ගත නොහැක -දෝෂ නොමැත -වස්තු {0}ක් තෝරා ඇත -'{0}' බහාලුම තැනිය නොහැක -මෙම හැකිළුම සඳහා යාවත්කාල කිරීම් සහයෝගය නොදක්වයි. -'{0}' ගොනුව හැකිළුමක් ලෙස විවෘත කළ නොහැක -සුරක්ෂිත '{0}' හැකිළුම විවෘත කළ නොහැක. මුරපදය වැරදි ද ? -සහයෝගී නොවන හැකිළුම් ක්‍රමයක් -{0} ගොනුව දැනටමත් ඇත -'{0}' ගොනුව නව්‍ය කෙරිනි.\nහැකිළුමෙහි එය යාවත්කාල කිරීමට ඔබට අවශ්‍ය ද ? -ගොනුව යාවත්කාල කල නොහැක\n'{0}' -සංස්කාරකය විවෘත කළ නොහැක. -ගොනුව වෛරසයක් වැනිය (ගොනු නාමයේ දිගු හිස් තැන් ඇත). -දිගු මංපෙතක් ඇති බහාලුමකින් ක්‍රියාකාරීත්වය කැඳවිය නොහැක. -එක් ගොනුවක් පමණක් තේරිය යුතුය. -ගොනු එකක් හෝ වැඩි ගණනක් තේරිය යුතුය. -අංග ඉතා අධිකය -3300 -ලිහමින් පවතී‍ -හකුළමින් පවතී -පරීක්ෂා කිරීම -විවෘත කරමින් පවතී... -සුපිරික්සමින් පවතී... -3400 -ලිහන්න -ලිහීමට තැනක් (&X) : -ලිහන ලද ගොනු සඳහා ස්ථානයක් තෝරන්න. -3410 -මංපෙත් ස්වභාවය -සම්පූර්ණ මංපෙත් නම් -මංපෙත් නම් අවශ්‍ය නැත -3420 -උඩින් ලිවීමේ ස්වභාවය -උඩින් ලියන්නට පෙර විමසන්න -විමසීමෙන් තොරව උඩින් ලියන්න -දැනටමත් ඇති ගොනු මගහරින්න -ගොනු ස්වයංක්‍රියව ප්‍රතිනම් කරන්න -දැනටමත් ඇති ගොනු‍ ප්‍රතිනම් කරන්න -3500 -ගොනු ප්‍රතිස්ථාපනය තහවුරු කර ගැනීම -ගමනාන්ත බහාලුමේ දැනටමත් නිර්මිත ගොනුවක් ඇත. -දැනටම පවතින පහත ගොනුව, -මෙය සමග ප්‍රතිස්ථාපනය කරන්න ද ? -{0} බයිට (Bytes) -ස්වයංක්‍රියව ප්‍රතිනම් කරන්න (&U) -3700 -'{0}' සඳහා සහයෝගය නොදක්වන හැකිළුම් ක්‍රමයක්. -'{0}' හි දත්ත දෝෂයකි. ගොනුව බිඳී ඇත. -'{0}' හි CRC අසමත් විනි. ගොනුව බිඳී ඇත. -සුරක්ෂිත '{0}' ගොනුවේ දත්ත දෝෂයකි. වැරදි මුරපදයක් ද ? -සුරක්ෂිත '{0}' ගොනුවේ CRC අසමත් විනි. වැරදි මුරපදයක් ද ? -3800 -මුරපදය ඇතුල් කරන්න -මුරපදය ඇතුල් කරන්න: -මුරපදය නැවත ඇතුල් කරන්න: -මුරපදය පෙන්වන්න (&S) -මුරපද නොගැලපේ -මුරපද සඳහා ඉංග්‍රිසි අකුරු, ඉලක්කම් සහ විශේෂිත සංකේත පමණක් භාවිතා කරන්න (!, #, $, ...) -මුරපදය දිග වැඩිය -මුරපදය -3900 -ගතවූ කාලය: -ඉතිරි කාලය: -සම්පූර්ණ විශාලත්වය: -වේගය: -ක්‍රියාවලියට භාජනය වූ ප්‍රමාණය: -හැකිළුම් අනුපාතය: -දෝෂ: -හැකිළුම්: -4000 -හැකිළුමකට එක් කරන්න -හැකිළුම (&A): -යාවත්කාල කිරීමේ ස්වභාවය (&U): -හැකිළුම් රටාව (&F): -හැකිළුම් මට්ටම (&L): -හැකිළුම් ක්‍රමය (&M): -&Dictionary size: -&Word size: -Solid block size: -Number of CPU threads: -පරාමිති (&P): -විකල්ප -SF&X හැකිළුමක් තනන්න -හවුල්කාර ගොනු ද හකුළන්න -සුරැකුම් -සුරැකුම් ක්‍රමය: -ගොනු නාම සුරකින්න (&S) -හැකිලීම සඳහා මතක භාවිතය: -ලිහීම ක්‍රියාව සඳහා මතක භාවිතය: -4050 -තැන්පත් කරන්න -ඉතා වේගවත් -වේගවත් -සාමාන්‍ය -උපරිම -අධි හැකිළුම්‍ -4060 -ගොනු එක් කර ප්‍රතිස්ථාපනය කරන්න -ගොනු යාවත්කාල කර එක් කරන්න -දැනටමත් ඇති ගොනු නැවුම් කරන්න -ගොනු සමකාලී කරන්න -4070 -සොයන්න -සියළු ගොනු -සවි-නොමැති -සවි -6000 -පිටපත් කරන්න -ගෙනයන්න -වෙනත් තැනකට පිටපත් කරන්න: -වෙනත් තැනකට ගෙනයන්න: -පිටපත් කරමින් පවතී... -ගෙනයමින් පවතී... -ප්‍රතිනම් කරමින් පවතී... -ගමනාන්ත බහාලුම තෝරන්න. -ක්‍රියාව කල නොහැක. -ගොනුව හෝ බහාලුම මැකීමේදී දෝෂයක් මතු විය -ගොනු පිටපත් කිරීම තහවුරු කිරීම -ගො‍නුව හැකිළුම වෙත පිටපත් කළ යුතු බව ඔබට විශ්වාස ද -6100 -ගොනු මැකීම තහවුරු කිරීම -බහාලුම් මැකීම තහවුරු කිරීම -බහු ගොනු මැකීම තහවුරු කිරීම -ඔබට '{0}' මැකීමට අවශ්‍ය බව විශ්වාස ද ? -ඔබට '{0}' බහාලුම හා එහි අන්තර්ගතය මැකීමට අවශ්‍ය බව විශ්වාස ද ? -ඔබට {0} යන වස්තු මැකීමට අවශ්‍ය බව විශ්වාස ද ? -මකමින් පවතී... -ගොනුව හෝ බහාලුම මැකීමේ දී දෝෂයක් මතු විය -දිගු මංපෙතක් ඇති ගොනුවක් කුණු බඳුනට යැවීම පද්ධතියට කල නොහැක. -6300 -බහාලුමක් තනන්න -ගොනුවක් තනන්න -බහාලුම් නාමය: -ගොනු නාමය: -නව බහාලුමක් -නව ගොනුවක් -බහාලුම තැනීමේදී දෝෂයක් මතුවිය -ගොනුව තැනීමේදී දෝෂයක් මතුවිය -6400 -ටීකාව -ටීකාව (&C): -තෝරන්න -තේරීම ඉවත් කරන්න -ගොනුවේ හෝ බහාලුමේ නම හෝ කොටසක්: -6600 -වත්කම් -බහාලුම් අතීතය -විනිශ්චීය පණිවුඩ -පණිවිඩය -7100 -පරිගණකය -ජාලය -ලියකියවිලි -පද්ධතිය -7200 -හකුළන්න -ලිහන්න -පරීක්ෂා කරන්න -පිටපත් කරන්න -ගෙන යන්න -මකන්න -තොරතුරු -7300 -ගොනුව බෙදන්න -ගොනුව බෙදා කොටස් මෙහි තැන්පත් කරන්න (&S): -කොටස් වලට බෙදන්න, බයිට (bytes): -ගොනුව බෙදමින් පවතී... -ගොනුව බෙදීම තහවුරු කරන්න -ගොනුව කොටස් {0} කට බෙදීමට අවශ්‍ය බව ඔබට විශ්වාස ද ? -බෙදූ කොටසක විශාලත්වය, මුල් ගොනුවේ විශාලත්වයට වඩා අඩු විය යුතුය -වැරදි කොටස් විශාලත්වයකි -සඳහන් කරන ලද කොටස් විශාලත්වය බයිට {0} කි.\nහැකිළුම මෙවන් කොටස් වලට බෙදියයුතු බව විශ්වාස ද ? -7400 -බෙදූ ගොනු එක් කරන්න -බෙදූ ගොනු එක් කර මෙහි තැනපත් කරන්න (&C): -බෙදූ ගොන එක් කරමින් පවතී... -පළමු ගොනුව පමණක් තෝරන්න -ගොනුව, බෙදන ලද ගොනුවක කොටසක් ලෙස හඳුනාගත නොහැක. -බෙදන ලද ගොනුවේ කොටස් වලින් එකකට වඩා සොයාගත නොහැක. -7500 -Checksum calculating... -Checksum information -CRC checksum for data: -CRC checksum for data and names: -7600 -Benchmark -මතක භාවිතය: -හැකිළුම් -ලිහුම් -ඇගයුම -සම්පූර්ණ ඇගයුම -වත්මන් -ප්‍රතිඵලිත -CPU භාවිතාව -ඇගයුම / භාවිතාව‍ -Passes: diff --git a/Utils/7-Zip/Lang/sk.txt b/Utils/7-Zip/Lang/sk.txt deleted file mode 100644 index 9715a09c8..000000000 --- a/Utils/7-Zip/Lang/sk.txt +++ /dev/null @@ -1,477 +0,0 @@ -;!@Lang2@!UTF-8! -; : Tomas Tomasek -; 9.07 : Pavel Devečka -; 9.38 beta : 2015-01-11 : Roman Horváth -; -; -; -; -; -; -; -; -0 -7-Zip -Slovak -Slovenčina -401 -OK -Zrušiť - - - -&Áno -&Nie -&Zavrieť -Pomocník - -Po&kračovať -440 -Áno na &všetko -Nie na vš&etko -Zastaviť -Reštartovať -&Pozadie -P&opredie -Po&zastaviť -Pozastavené -Ste si istý, že chcete akciu zrušiť? -500 -&Súbor -&Upraviť -&Zobraziť -&Obľúbené -&Nástroje -&Pomocník -540 -&Otvoriť -O&tvoriť vnútri -Ot&voriť externe -&Zobraziť -&Upraviť -&Premenovať -&Kopírovať do... -P&resunúť do... -O&dstrániť -Ro&zdeliť súbor... -Zlúč&iť súbory... -V&lastnosti -Ko&mentár -Vypočítať kontrolný súčet -Rozdiel (Diff) -Vytvoriť priečinok -Vytvoriť súbor -Uko&nčiť -Odkaz... -600 -Označiť všetko -Odznačiť všetko -Invertovať označenie -Označiť... -Odznačiť... -Označiť podľa typu -Odznačiť podľa typu -700 -&Veľké ikony -&Malé ikony -&Zoznam -&Podrobnosti -730 -Netriediť -Plochý vzhľad -&2 Panely -P&anely nástrojov -Otvoriť koreňový priečinok -O úroveň vyššie -História priečinkov... -&Obnoviť -Automatické obnovenie -750 -Archív -Štandard -Veľké ikony -Textový popis pod ikonami -800 -Pridať priečinok medzi obľúbené ako -Záložka -900 -N&astavenia... -&Skúšobný test -960 -&Obsah pomocníka... -O p&rograme 7-Zip -1003 -Cesta -Meno -Prípona -Priečinok -Veľkosť -Veľkosť po kompresii -Atribúty -Vytvorený -Sprístupnený -Zmenený -Jednoliaty -Komentovaný -Zašifrovaný -Rozdelený predtým -Rozdelený potom -Slovník -CRC -Typ -Anti -Metóda -Hostiteľský OS -Súborový systém -Používateľ -Skupina -Blok -Komentár -Pozícia -Predpona cesty -Priečinky -Súbory -Verzia -Zväzok -Multizväzok -Ofset -Odkazy -Bloky -Zväzky - -64-bitov -Big-endian -CPU -Fyzická veľkosť -Veľkosť hlavičiek -Kontrolný súčet -Charakteristiky -Virtuálna adresa -ID -Skrátený názov -Aplikácia -Veľkosť sektora -Režim -Symbolický odkaz -Chyba -Celková veľkosť -Voľné miesto -Veľkosť klastra -Menovka -Lokálny názov -Prevádzkovateľ -Bezpečnosť NT -Alternatívny prúd -Aux -Vymazané -Je strom - - -Typ chyby -Chyby -Chyby -Varovania -Varovanie -Prúdy -Alternatívne prúdy -Veľkosť alternatívneho prúdu -Virtuálna veľkosť -Veľkosť po rozbalení -Celková fyzická veľkosť -Index zväzku -Podtyp -Krátky komentár -Kódová stránka - - - -Veľkosť zakončenia -Veľkosť vloženého ústrižku -Odkaz -Pevný odkaz -iNode -2100 -Nastavenia -Jazyk -Jazyk: -Editor -Editor: -Vyhľadávač rozdielov (Diff): -2200 -Systém -Asociovať 7-Zip s vybranými typmi súborov: -2301 -Integrovať 7-Zip do kontextovej ponuky -Kaskádová kontextová ponuka -Položky kontextovej ponuky: -Ikony v kontextovej ponuke -2320 - - -Otvoriť archív -Rozbaliť súbory... -Pridať do archívu... -Otestovať archív -Rozbaliť tu -Rozbaliť do {0} -Pridať do {0} -Skomprimovať a poslať emailom... -Skomprimovať do {0} a poslať emailom -2400 -Priečinky -&Pracovný priečinok -&Systémový priečinok pre dočasné súbory -&Aktuálny priečinok -&Manuálne vybraný priečinok: -Po&užiť len pre vymeniteľné jednotky -Vyberte priečinok pre dočasné súbory. -2500 -Nastavenia -Ukázať položku ".." -Ukázať skutočné ikony súborov -Ukázať systémovú ponuku -Označiť celý riadok -Zobraziť čiary mriežky -Otvoriť položku jednoduchým kliknutím -Alternatívny režim výberu -Použitie veľkých stránok pamäti -2900 -O programe 7-Zip -7-Zip je voľne šíriteľný softvér -3000 -Systém nemôže alokovať požadované množstvo pamäte -V archíve sa nenašli žiadne chyby -{0} vybraných objektov -Nie je možné vytvoriť priečinok '{0}'. -Operácie aktualizácie nie sú pre tento archív podporované. -Súbor '{0}' nie je možné otvoriť ako archív -Nie je možné otvoriť šifrovaný archív '{0}'. Nesprávne heslo? -Nepodporovaný typ archívu -Súbor {0} už existuje. -Súbor '{0}' bol zmenený.\nChcete ho aktualizovať v archíve? -Nie je možné aktualizovať súbor\n'{0}' -Nie je možné spustiť editor. -Súbor vyzerá ako vírus. (Meno súboru obsahuje veľa medzier.) -Operácia nemôže byť vykonaná v priečinku, ktorý má dlhú cestu. -Musíte vybrať jeden súbor -Musíte vybrať jeden alebo viac súborov -Priveľa položiek -3300 -Rozbaľovanie -Komprimovanie -Výsledok testovania -Otváranie... -Prehľadávanie... -3400 -Rozbaliť -Rozbaliť do: -Špecifikujte priečinok pre rozbalené súbory. -3410 -Nastavenie názvov ciest: -Plné názvy ciest -Žiadne názvy ciest -Absolútne názvy ciest -Relatívne názvy ciest -3420 -Nastavenie prepísania: -Spýtať sa pred prepísaním -Prepísať bez výzvy -Preskočiť existujúce súbory -Automaticky premenovať -Automaticky premenovať existujúce súbory -3430 -Eliminovať duplikáty koreňového priečinka -Obnoviť práva súboru -3500 -Potvrdenie nahradenia súboru -Cieľový priečinok už obsahuje rozbaľovaný súbor. -Chcete nahradiť existujúci súbor -týmto súborom? -{0} bajtov -&Automaticky premenovať -3700 -Nepodporovaná kompresná metóda pre '{0}'. -Chybné údaje v '{0}'. Súbor je poškodený. -CRC zlyhalo v '{0}'. Súbor je poškodený. -Chybné údaje v šifrovanom súbore '{0}'. Nesprávne heslo? -CRC zlyhalo v šifrovanom súbore '{0}'. Nesprávne heslo? -3710 -Nesprávne heslo? -3721 -Nepodporovaná kompresná metóda -Chybné údaje -CRC zlyhalo -Údaje sú nedostupné -Neočakávaný koniec údajov -Za zužitkovateľnými údajmi sa nachádzajú ďalšie údaje -Nie je to archív -Chybné hlavičky -3763 -Začiatok archívu je nedostupný -Začiatok archívu nie je potvrdený - - - -Nepodporovaná funkcia -3800 -Zadajte heslo -Zadajte heslo: -Zopakujte heslo: -Ukázať heslo -Heslá nie sú zhodné -Používajte len písmená bez diakritiky, čísla a špeciálne znaky (!, #, $, ...) -Heslo je príliš dlhé -Heslo -3900 -Uplynutý čas: -Zostávajúci čas: -Veľkosť: -Rýchlosť: -Spracované: -Úroveň kompresie: -Chyby: -Archívy: -4000 -Pridať do archívu -&Archív: -&Nastavenie aktualizácie súborov v existujúcich archívoch: -&Formát archívu: -Ú&roveň kompresie: -&Kompresná metóda: -&Veľkosť slovníka: -V&eľkosť slova: -Veľk&osť jednoliateho bloku: -Poče&t CPU vlákien: -&Parametre: -Možnosti -Vytvoriť samorozbaľovací archív -Komprimovať zdieľané súbory -Šifrovanie -Metóda šifrovania: -Zašifrovať mená súborov -Pamäť potrebná na kompresiu: -Pamäť potrebná na dekompresiu: -Vymazať súbory po kompresii -4040 -Uložiť symbolické odkazy -Uložiť pevné odkazy -Uložiť alternatívne údajové prúdy -Uložiť práva súborov -4050 -Bez kompresie -Najrýchlejšia -Rýchla -Normálna -Maximálna -Ultra -4060 -Pridať a nahradiť súbory -Aktualizovať a pridať súbory -Aktualizovať existujúce súbory -Synchronizovať súbory -4070 -Prehľadávať -Všetky súbory -Nejednoliaty -Jednoliaty -6000 -Kopírovať -Presunúť -Kopírovať do: -Presunúť do: -Kopírovanie... -Presúvanie... -Premenovanie... -Vyberte cieľový priečinok. -Operácia nie je podporovaná pre tento priečinok. -Chyba pri premenovaní súboru alebo priečinka -Potvrdiť kopírovanie súboru/súborov -Ste si istý, že chcete kopírovať súbor/súbory do archívu -6100 -Potvrdenie odstránenia súboru -Potvrdenie odstránenia priečinka -Potvrdenie odstránenia viacerých položiek -Ste si istý, že chcete odstrániť súbor '{0}'? -Ste si istý, že chcete odstrániť priečinok '{0}' a celý jeho obsah? -Ste si istý, že chcete odstrániť týchto {0} položiek? -Odstraňovanie... -Chyba pri odstraňovaní súboru alebo priečinka -Systém nemôže presunúť do koša súbor s dlhou cestou -6300 -Vytvoriť priečinok -Vytvoriť súbor -Meno priečinka: -Meno súboru: -Nový priečinok -Nový súbor -Chyba pri vytváraní priečinka -Chyba pri vytváraní súboru -6400 -Komentár -&Komentár: -Označiť -Odznačiť -Maska: -6600 -Vlastnosti -História priečinkov -Diagnostické správy -Správa -7100 -Počítač -Sieť -Dokumenty -Systém -7200 -Pridať -Rozbaliť -Otestovať -Kopírovať -Presunúť -Odstrániť -Informácie -7300 -Rozdeliť súbor -&Rozdeliť na: -Roz&deliť na zväzky bajtov: -Rozdeľovanie... -Potvrdiť rozdeľovanie. -Ste si istý, že chcete rozdeliť súbor na {0} zväzkov? -Veľkosť zväzku musí byť menšia než veľkosť pôvodného súboru. -Nesprávna veľkosť zväzku -Určená veľkosť zväzku: {0} bajtov.\nSte si istý, že chcete rozdeliť archív na také zväzky? -7400 -Zlúčiť súbory -&Zlúčiť do: -Zlučovanie... -Vyberte len prvý súbor. -Nie je možné rozlíšiť súbor ako súčasť rozdeleného súboru -Nie je možné nájsť viac než jednu časť rozdeleného súboru -7500 -Výpočet kontrolného súčtu... -Informácie o kontrolnom súčte -CRC súčet pre údaje: -CRC súčet pre údaje a názvy: -7600 -Skúšobný test -Použitá pamäť: -Komprimovanie -Rozbaľovanie -Hodnotenie -Celkové hodnotenie -Aktuálne -Výsledné -Využitie CPU -Hodn. / Využitie -Testov bez chýb: -7700 -Odkaz -Odkaz -Odkaz z: -Odkaz do: -7710 -Typ odkazu -Pevný odkaz -Súbor symbolického odkazu -Priečinok symbolického odkazu -Prekríženie priečinkov diff --git a/Utils/7-Zip/Lang/sl.txt b/Utils/7-Zip/Lang/sl.txt deleted file mode 100644 index 2c3214a86..000000000 --- a/Utils/7-Zip/Lang/sl.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; : tomazek -; 4.55 : miles -; -; -; -; -; -; -; -; -; -0 -7-Zip -Slovenian -Slovenski -401 -V redu -Prekliči - - - -&Da -&Ne -&Zapri -Pomoč - -&Nadaljuj -440 -Da za &vse -Ne za v&se -Zaustavi -Ponovno zaženi -&Ozadje -O&spredje -&Začasno zaustavi -Zaustavljen -Ste prepričani, da želite preklicati? -500 -&Datoteka -&Urejanje -&Pogled -Pr&iljubljene -O&rodja -Po&moč -540 -&Odpri -Odpri &znotraj -Odpri zu&naj -P&rikaz -&Urejanje -Prei&menuj -&Kopiraj ... -&Premakni ... -Iz&briši -&Razdeli datoteko ... -&Združi datoteke ... -L&astnosti -Opomb&e -Izračunaj preskusno vsoto - -Ustvari mapo -Ustvari datoteko -&Izhod -600 -Izberi &vse -Razveljavi izbiro vseh -&Preobrni izbor -Izberi ... -Razveljavi izbiro ... -Izberi glede na vrsto -Razveljavi izbiro glede na vrsto -700 -&Velike ikone -&Majhne ikone -&Seznam -&Podrobnosti -730 -Nerazvrščeno -Splošen pogled -&Dve podokni -&Orodne vrstice -Odpri korensko mapo -Nadrejena raven -Zgodovina mape ... -&Osveži -750 -Orodna vrstica arhiva -Navadna orodna vrstica -Veliki gumbi -Pokaži besedilo gumbov -800 -&Dodaj mapo med Priljubljene kot -Zaznamek -900 -&Možnosti ... -Me&ritev -960 -&Vsebina pomoči ... -&O programu 7-Zip ... -1003 -Pot -Ime -Pripona -Mapa -Velikost -Stisnjena velikost -Atributi -Izdelano -Uporabljeno -Spremenjeno -Trdno -Komentirano -Šifrirano -Razdeli pred -Razdeli po -Slovar -CRC -Vrsta -Anti -Metoda -Gostiteljski OS -Datotečni sistem -Uporabnik -Skupina -Blok -Opomba -Položaj -Predpona poti -Mape -Datoteke -Različica -Nosilec -Več nosilcev -Zamik -Povezave -Bloki -Nosilcev - - - - - - - - - - - - - - - -Napaka -Skupna velikost -Prostega prostora -Velikost gruče -Oznaka -Krajevno ime -Ponudnik -2100 -Možnosti -Jezik -Jezik: -Urejevalnik -&Urejevalnik: - -2200 -Sistem -Poveži 7-Zip z: -2301 -Integracija 7-Zip v kontekstni meni lupine -Kaskadni kontekstni meni -Izbire kontekstnega menija: -2320 - - -Odpri arhiv -Razširi datoteke ... -Stisni v arhiv ... -Preizkusi arhiv -Razširi semkaj -Razširi v {0} -Dodaj v {0} -Stisni in pošlji ... -Stisni v {0} in pošlji po e-pošti -2400 -Mape -&Delovna mapa -&Sistemska začasna mapa -&Trenutna mapa -&Navedeno: -Uporabi le za izmenljive pogone -Navedite mesto za začasne arhivske datoteke. -2500 -Nastavitve -Pokaži postavko ".." -Pokaži prave ikone datotek -Pokaži sistemski meni -&Izbor celotne vrstice -Pokaži &mrežne črte - -&Alternativni način izbiranja -Uporabi &velike spominske strani -2900 -O programu 7-Zip -7-Zip je brezplačen. Njegov razvoj podprete s tem, da se registrirate. -3000 - -Brez napak -Izbran(ih) {0} objekt(ov) -Mape '{0}' ni mogoče ustvariti -Za ta arhiv operacije osveževanja niso podprte. -Datoteke '{0}' ni mogoče odpreti kot arhiv -Šifriranega arhiva '{0}' ni mogoče odpreti. Je morda geslo napačno? - - -Datoteka '{0}' je bila spremenjena.\nJo želite osvežiti v arhivu? -Datoteke ni mogoče osvežiti\n'{0}' -Urejevalnika ni mogoče pognati. - - - - -Preveč izbir -3300 -Razširjanje -Stiskanje -Preizkušanje -Odpiranje ... -Pregledovanje ... -3400 -Razširi -R&azširi v: -Določite mesto razširjanja datotek. -3410 -Poti -Polne poti -Brez poti -3420 -Prepisovalni način -Zahtevaj potrditev -Prepiši brez potrditve -Preskoči obstoječe datoteke -Samodejno preimenuj -Samodejno preimenuj obstoječe datoteke -3500 -Potrditev zamenjave datoteke -Ciljna mapa že vsebuje obdelovano datoteko. -Želite zamenjati obstoječo datoteko -s to datoteko? -{0} bajtov -Samodejno &preimenuj -3700 -Nepodprta metoda stiskanja za '{0}'. -Podatkovna napaka v '{0}'. Datoteka je poškodovana. -Napaka CRC v '{0}'. Datoteka je poškodovana. -Podatkovna napaka v šifrirani datoteki '{0}'. Je geslo pravilno? -Napaka CRC v šifrirani datoteki '{0}'. Je geslo pravilno? -3800 -Vnos gesla -Vnesite geslo: -Ponovno vnesite geslo: -&Pokaži geslo -Gesli se ne ujemata -Za geslo uporabite le črke, številke in posebne znake angleške abecede (!, #, $, ...) -Geslo je predolgo -Geslo -3900 -Pretečeni čas: -Preostali čas: -Velikost: -Hitrost: -Obdelano: -Razmerje stiskanja: -Napake: -Arhivi: -4000 -Dodaj v arhiv -&Arhiv: -&Način osveževanja: -&Vrsta arhiva: -Raven &stiskanja: -&Metoda stiskanja: -&Velikost slovarja: -Velikost &besede: -Velikost trdnega bloka: -Število niti CPE: -&Parametri: -Možnosti -Izdelaj arhiv SF&X -Stisni skupne datoteke -Šifriranje -Metoda šifriranja: -Šifriraj &imena datotek -Poraba pomnilnika za stiskanje: -Poraba pomnilnika za razširjanje: -4050 -Brez stiskanja -Najhitrejše -Hitro -Običajno -Največje stiskanje -Ultra -4060 -Dodaj in zamenjaj datoteke -Osveži in dodaj datoteke -Osveži obstoječe datoteke -Sinhroniziraj datoteke -4070 -Prebrskaj -Vse datoteke -Ne-trdno -Trdno -6000 -Kopiraj -Premakni -Kopiraj v: -Premakni v: -Kopiranje ... -Premikanje ... -Preimenovanje ... -Izberite ciljno mapo. -Operacija ni podprta. -Napaka pri preimenovanju datoteke ali mape -Potrditev kopiranja datoteke -Ste prepričani, da želite kopirati datoteke v arhiv? -6100 -Potrditev brisanja datoteke -Potrditev brisanja mape -Potrditev brisanja več datotek -Ste prepričani, da želite zbrisati '{0}'? -Ste prepričani, da želite zbrisati mapo '{0}' in celotno njeno vsebino? -Ste prepričani, da želite zbrisati teh {0} postavk? -Brisanje ... -Napaka pri brisanju datoteke ali mape - -6300 -Izdelava mape -Ustvarjanje datoteke -Ime mape: -Ime datoteke: -Nova mapa -Nova datoteka -Napaka pri ustvarjanju mape -Napaka pri ustvarjanju datoteke -6400 -Opomba -&Opomba: -Izberi -Razveljavi izbiro -Maska: -6600 -Properties -Zgodovina map -Diagnostična sporočila -Sporočilo -7100 -Računalnik -Omrežje - -Sistem -7200 -Dodaj -Razširi -Preizkusi -Kopiraj -Premakni -Izbriši -Informacije -7300 -Razdeli datoteko -&Razdeli na: -Razdeli na &nosilce velikosti (v bajtih): -Razdeljevanje ... -Potrditev razdelitve -Ste prepričani, da želite razdeliti datoteko na {0} nosilcev? -Velikost nosilca mora biti manjša kot velikost izvorne datoteke -Neveljavna velikost nosilca -Navedena velikost nosilca: {0} bajtov.\nSte prepričani, da želite razdeliti arhiv na takšne nosilce? -7400 -Združi datoteke -&Združi v: -Združevanje ... -Izberite samo prvo datoteko - - -7500 -Izračun preskusne vsote ... -Podatki o preskusni vsoti -Preskusna vsota za podatke: -Preskusna vsota za podatke in imena: -7600 -Meritev -Poraba pomnilnika: -Stiskanje -Razširjanje -Ocena -Skupna ocena -Trenutno -Končno -Uporaba CPE -Ocena / uporaba -Prehodi: diff --git a/Utils/7-Zip/Lang/sq.txt b/Utils/7-Zip/Lang/sq.txt deleted file mode 100644 index 024a2b8f5..000000000 --- a/Utils/7-Zip/Lang/sq.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.37 : Mikel Hasko -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Albanian -Shqip -401 -Në rregull -Anulim - - - -&Po -&Jo -&Mbyll -Ndihmë - -&Vazhdim -440 -Po për të gjith&a -Jo për të gjit&ha -Ndalo -Rinis -Në &sfond -Në pla&n të parë -&Pushim -Në pushim -Jeni të sigurt se dëshironi ta anuloni? -500 -&Skedari -&Redaktimi -&Pamja -&Të parapëlqyerit -&Veglat -&Ndihma -540 -&Hap -Hap përbre&nda -Hap përjas&hta -&Pamja -&Redakto -Ri&emërto -&Kopjo tek... -&Zhvendos tek... -&Fshi -N&daj skedarin... -Kom&bino skedarët... -&Vetitë -Ko&menti -Llogarit shumën e verifikimit - -Krijo një dosje -Krijo një skedar -&Dil -600 -S&elekto të gjithë -Çse&lekto të gjithë -Anasill selekti&min -Selekto... -Çselekto... -Selekto sipas tipit -Çselekto sipas tipit -700 -Ikona të &mëdha -Ikona të &vogla -&Listë -&Detaje -730 -&Të parenditur -Pamje e rrafshtë -&2 panele -&Shiritat e veglave -Hap dosjen rrënjë -Një nivel më lartë -Historiku i dosjes... -&Rifresko -750 -Shiriti i veglave i arkivit -Shiriti standard i veglave -Butona të mëdhenj -Shfaq tekstin e butonave -800 -&Shto dosjen tek të parapëlqyerit si -Shënuesi -900 -&Opsionet... -&Etapa -960 -&Përmbajtjet... -&Për 7-Zip... -1003 -Shtegu -Emri -Prapashtesa -Dosja -Madhësia -Madhësia e mbërthimit -Atributet -Krijuar më -Hyrë së fundi më -Modifikuar më -I qëndrueshëm -I komentuar -I shifruar -Ndaj para -Ndaj pas -Fjalori -CRC -Tipi -Anti -Metoda -Pronari i sistemit -Sistemi i skedarit -Përdoruesi -Grupi -Blloku -Komenti -Pozicioni -Prefiksi i shtegut - - - - - - - - - - - - - - - - - - - - - - - - -Gabim -Madhësia totale -Hapësira e lirë -Madhësia e cluster-it -Etiketa -Emri lokal -Kujdestari -2100 -Opsionet -Gjuha -Gjuha: -Redaktuesi -&Redaktuesi: - -2200 -Sistemi -Lidh 7-Zip me: -2301 -Integro 7-Zip në kontekst meny -Kaskado kontekst menynë -Elementë të kontekst menysë: -2320 - - -Hap arkivin -Zbërthe skedarët... -Shto në arkiv... -Testo arkivin -Zbërthe këtu -Zbërthe në {0} -Shto tek {0} -Kompreso dhe dërgo me e-mail... -Kompreso në {0} dhe dërgo me e-mail -2400 -Dosje -&Dosja e punës -Dosja e përkohshme e &sistemit -Dosja &aktuale -I sp&ecifikuar: -Përdor vetëm për njësi të largueshme -Specifikoni një vendndodhje për skedarët e përkohshëm të arkivit. -2500 -Rregullimet -Shfaq &artikullin ".." -Shfaq &ikonat e vërteta të skedarëve -Shfaq &menynë e sistemit -Selekto të tërë &rreshtin -Shfaq &vijat e rrjetit - -Mënyrë alternative &selektimi -Përdor &faqe të mëdha të memories -2900 -Për 7-Zip -7-Zip është softuer falas. Megjithatë, ju mund të përkrahni në zhvillimin e 7-Zip duke e regjistruar atë. -3000 - -S'ka gabime -Selektuar {0} objekt(e) -S'mund të krijojë dosjen '{0}' -Operacionet e azhurnimit për këtë arkiv s'përkrahen. - - - - -Skedari '{0}' u modifikua.\nDoni ta azhurnoni atë edhe në arkiv? -S'mund të azhurnojë skedarin\n'{0}' -S'mund të hap redaktuesin. - - - - -Tepër shumë artikuj -3300 -Duke zbërthyer -Duke kompresuar -Duke testuar -Duke hapur... -Duke skanuar... -3400 -Zbërthe -Z&bërthe në: -Specifikoni një vendndodhje për skedarët e zbërthyer. -3410 -Mënyra e Shtegut -Emra të plotë Shtigjesh -Pa emra shtigjesh -3420 -Mënyra e mbishkrimit -Pyet para se të mbishkruaj -Mbishkruaj pa nxitje -Mbikalo skedarët ekzistues -Riemërto automatikisht -Riemërto auto. skedarët ekzistues -3500 -Konfirmo zëvendësimin e skedarëve -Dosja e destinacionit e përmban një herë skedarin e përpunuar. -Dëshironi ta zëvendësoni skedarin ekzistues -me këtë? -{0} bajt -R&iemërtim automatik -3700 -Metodë e papërkrahshme kompresimi për '{0}'. -Gabim të dhënash në '{0}'. Skedari është i prishur. -CRC dështoi '{0}'. Skedari është i prishur. - - -3800 -Fusni fjalëkalimin -Fusni fjalëkalimin: - -&Trego fjalëkalimin - - - -Fjalëkalimi -3900 -Koha e kaluar: -Koha e mbetur: -Madhësia: -Shpejtësia: - - -Gabime: - -4000 -Shto në arkiv -&Arkivi: -&Mënyra e azhurnimit: -&Formati i arkivit: -&Niveli i kompresimit: -Metoda e kompr&esimit: -Ma&dhësia e fjalorit: -Mad&hësia e fjalës: - - -&Parametrat: -Opsionet -Krijo një arkiv SF&X - - - -Shifro em&rat e skedarëve -Shfrytëzimi i memo. për kompresimin: -Shfrytëzimi i memo. për dekompresimin: -4050 -Ruaj -Më i shpejtë -I shpejtë -Normal -Maksimal -Ultra -4060 -Shto dhe zëvendëso skedarët -Azhurno dhe shto skedarët -Azhurno skedarët ekzistues -Sinkronizo skedarët -4070 -Shfleto -Të gjithë skedarët - - -6000 -Kopjo -Zhvendos -Kopjo tek: -Zhvendos tek: -Duke kopjuar... -Duke zhvendosur... -Duke riemërtuar... - -Operacioni s'përkrahet. -Gabim gjatë riemërtimit të skedarit apo dosjes -Konfirmim për kopjimin e skedarëve -Jeni të sigurt që doni të kopjoni skedarë në arkiv -6100 -Konfirmo fshirjen e skedarit -Konfirmo fshirjen e dosjes -Konfirmo fshirjen e shumëfishtë të skedarëve -Jeni të sigurt që doni të fshini '{0}'? -Jeni të sigurt që doni të fshini dosjen '{0}' dhe tërë përmbajtjen e saj? -Jeni të sigurt që doni t'i fshini këto {0} artikuj? -Duke fshirë... -Gabim gjatë fshirjes së skedarit apo dosjes - -6300 -Krijo një dosje -Krijo një skedar -Emri i dosjes: -Emri i skedarit: -Dosje e re -Skedar i ri -Gabim gjatë krijimit të dosjes -Gabim gjatë krijimit të skedarit -6400 -Komenti -&Komenti: -Selekto -Çselekto -Maska: -6600 - -Historiku i dosjes -Mesazhe diagnostikues -Mesazhi -7100 -Kompjuteri -Rrejti - -Sistemi -7200 -Shto -Zbërthe -Testo -Kopjo -Zhvendos -Fshi -Info -7300 -Ndaj skedarin -&Ndaj në: -Ndaj në &volume (madhësia jepet në bajt): -Duke ndarë... - - - - - -7400 -Kombino skedarët -&Kombino në: -Duke kombinuar... - - - -7500 -Duke llogaritur shumën e verifikimit... -Informacionet e shumës së verifikimit -Shuma e verifikimit CRC për të dhënat: -Shuma e verifikimit CRC për të dhënat dhe emrat: -7600 -Etapa -Shfrytëzimi i memories: -Kompresimi -Dekompresimi -Vlerësimi -Vlerësimi total -Aktualisht -Rezultati - - -Kalime: diff --git a/Utils/7-Zip/Lang/sr-spc.txt b/Utils/7-Zip/Lang/sr-spc.txt deleted file mode 100644 index 098317335..000000000 --- a/Utils/7-Zip/Lang/sr-spc.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; : Lazar -; 9.07 : Ozzii -; -; -; -; -; -; -; -; -; -0 -7-Zip -Serbian - Cyrillic -Српски - ћирилица -401 -У реду -Откажи - - - -Да -Не -Затвори -Помоћ - -Настави -440 -Да за све -Не за све -Стани -Поново -Позадина -На врху -Пауза -Пауза -Да ли сте сигурни да желите да прекинете? -500 -Датотека -Уређивање -Преглед -Омиљено -Алати -Помоћ -540 -Погледај -Отвори са 7-Zip-ом -Отвори са придруженом програмом -Прегледај -Промени -Преименуј -Копирај у... -Премести у... -Обриши -Подели фајл... -Спој делове... -Својства -Коментар -Израчунајте проверну величину -разлика -Нова фасцикла -Нова датотека -Излаз -600 -Изабери све -Поништи избор свега -Обрнути избор -Изабери... -Поништи избор... -Изабери по типу -Поништи избор по типу -700 -Иконе -Напоредно слагање -Списак -Детаљи -730 -Без сортирања -Раван преглед -2 Прозора -Траке са алаткама -Отвори почетну фасциклу -Горе за један ниво -Хронологија... -Освежавање -750 -Рад са архивама -Рад са датотекама -Велика дугмад -Прикажи текст испод дугмади -800 -Додај -Изабери -900 -Опције... -Benchmark -960 -Помоћ... -О програму... -1003 -Путања -Назив -Тип -Фасцикла -Величина -Величина у запакованом стању -Атрибути -Креирана -Приступано -Промењено -Солидно -Коментар -Шифровано -Подели пре -Подели после -Речник -ЦРЦ -Тип -Анти -Метод -Оперативни систем -Систем датотека -Корисник -Група -Блок -Коментар -Положај -Префикс путање -Фасцикле -Датотеке -Верзија -Волумен -ВишеВолумена -Офсет -Линкови -Блокови -Волумени - -64-бит -Big-endian -Процесор -Физичка величина -Величина заглавља -Провера резултата -Карактеристике -Виртуелна адреса -ИД -Кратко име -Креатор апликације -Величина сектора -Начин -Линк -Грешка -Укупни капацитет -Слободни простор -Величинa cluster-а -Назив -Локално име -Провајдер -2100 -Опције -Језик -Језик: -Промене у датотекама -Програм: -Разлика: -2200 -Систем -7-Zip отвара следеће типове датотека: -2301 -Убаци 7-Zip у системски мени -Каскадни системски мени -Ставке системског менија: -2320 - - -Отвори архиву -Издвој датотеке... -Додај у архиву... -Тестирај архиву -Издвој овде -Издвој у {0} -Додај у {0} -Додај и направи e-mail... -Додај у {0} и направи e-mail -2400 -Фасцикле -Радна фасцикла -Користи Windows-ову привремену фасциклу -Тренутна -Наведена: -Користи само за измењиве медије -Наведите локацију за смештање привремених датотека. -2500 -Подешавања -Прикажи ".." -Прикажи праве сличице датотека -Прикажи системски мени -Обележи цео ред -Прикажи линије мреже -Један клик за отварање ставке -Алтернативни начин за бирање -Користи велике меморијске блокове -2900 -О програму -7-Zip је бесплатан програм. -3000 -Систем не може да издвоји потребну количину меморије -Није било никаквих грешака -{0} објекат(а) изабрано -Не могу да креирам Фасциклу '{0}' -Операција освежавања није дозвољена за ову архиву. -Не могу да отворим датотеку '(0)' као архива -Не могу да отворим шифровану архиву '(0)'. Погрешна лозинка? -Неподржан тип архиве -Датотека {0} већ постоји -Датотека '{0}' је измјењена.\nДа ли желите ажурирати архиву? -Није могуће ажурирати датотеку\n'{0}' -Није могуће започети уређивање. -Датотека изгледа као вирус (име датотеке садржи пуно размака у имену). -Операција не може бити позвана из фасцикле која има дугу путању. -Морате да изаберете неку датотеку -Морате да изаберете једну или више датотека -Исувише ставки -3300 -Издвајање -Додајем -Тестирање -Отварање у току... -Скенирање... -3400 -Издвој -Издвој у: -Наведи локацију где ће се издвајати датотеке из архива. -3410 -Путање -Пуна путања -Без путање -3420 -Замена -Питај пре него што замениш -Замени без запиткивања -Прескочи постојеће датотеке -Аутоматска промена назива -Аутоматска промена назива постојећих датотека -3500 -Потврди замену датотеке -Циљна фасцикла већ садржи датотеку која се тренутно обрађује. -Да ли желите да замените постојећу датотеку -са овом? -{0} бајтова -Аутоматска промена назива -3700 -Неподржани метод компресије за '{0}'. -Грешка у '{0}'. Датотека је неисправана. -CRC грешка у '{0}'. Датотека је неисправана. -Грешке у кодирану датотеку '(0)' Погрешна лозинка. -ЦРЦ грешка у шифроване датотеке '(0)' Погрешна лозинка. -3800 -Унесите лозинку -Унесите лозинку: -Поново унесите лозинку: -Прикажи лозинку -Лозинке се не поклапају -Користи само енглеска слова, бројева и специјалних знакова (!, #, $, ...) За лозинке -Лозинка је предугачка -Шифра -3900 -Протекло време: -Преостало време: -Величина: -Брзина: -Обрађено: -Компресиони однос: -Грешке: -Архиве: -4000 -Додај у архиву -Архива: -Надоградња архива: -Формат архиве: -Ниво компресије: -Тип компресије: -Dictionary size: -Word size: -Величина чврстог блока: -Број низа процесора: -Параметри: -Опције -Креирај SFX архиву -Компресија дељене датотека -Шифровање -Метода шифровања: -Шифруј називе датотека -Потребна меморија - компресија: -Потребна меморија - декомпресија: -4050 -Без компресије -Брже -Брзо -Нормално -Максимално -Најбрже -4060 -Додај и замени датотеке -Освежи и додај датотеке -Озвежи постојеће датотеке -Синхронизуј датотеке -4070 -Прегледај -Све датотеке -Не-чврсте -Чврсто -6000 -Копирај -Исеци -Копирај у: -Премести у: -Копирање у току... -Премештање у току... -Преименовање у току... -Изаберите одредишну фасциклу. -Операција није подржана. -Грешка при преименовању датотеке или фасцикле -Потврди копирање датотеке -Да ли сте сигурни да желите да копирате датотеке у архиву -6100 -Потврдите брисање датотеке -Потврдите брисање фасцикле -Потврдите вишеструко брисање датотека -Јесте ли сигурни да желите да обришете '{0}'? -Јесте ли сигурни да желите да обришете фасциклу '{0}' и сав њен садржај? -Јесте ли сигурни да желите да обришете ове {0} податке? -Брисање у току... -Грешка при брисању датотеке или фасцикле -Систем не може да премести датотеку са дугом путу у корпу за отпатке -6300 -Креирај фасциклу -Креирај датотеку -Име фасцикле: -Име датотеке: -Нова фасцикла -Нова датотека -Грешка при креирању фасцикли -Грешка при креирању датотека -6400 -Коментар -Коментар: -Одабери -Поништи избор -Маска: -6600 -Особине -Хронологија -Дијагностичке поруке -Поруке -7100 -Рачунар -Мрежа -Документи -Систем -7200 -Додај -Издвој -Тестирај -Копирај -Премести -Избриши -Својства -7300 -Подели датотеку -Подели на: -Подели на делове, бајти: -Подела... -Потврда поделе -Да ли сте сигурни да желите да поделите датотеку на (0) дела? -Величине дела мора бити мањи од величине оригиналне датотеке -Неисправна величина волумена -Одређена величина волумена: {0} бајтова.\nДа ли сте сигурни да желите да поделите архиву у тих волумена? -7400 -Састави датотеке -Састави у: -Спајање... -Изаберите само први део поделе датотеке -Не могу да откријем датотеку као део поделе -Не може се наћи више од једног дела поделе -7500 -Израчунавање проверне величине... -Информација о проверне величине -ЦРЦ порвера за податак: -ЦРЦ провера за податак и имена: -7600 -Benchmark -Коришћење меморије: -Компресија -Декомпресија -Оцена -Потпуна оцена -Тренутно -Резултат -Употреба процесора -Рејтинг/Употреба -Пролази: diff --git a/Utils/7-Zip/Lang/sr-spl.txt b/Utils/7-Zip/Lang/sr-spl.txt deleted file mode 100644 index cf66e8dd8..000000000 --- a/Utils/7-Zip/Lang/sr-spl.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; : Lazar -; 9.07 : Ozzii -; -; -; -; -; -; -; -; -; -0 -7-Zip -Serbian - Latin -Srpski - latinica -401 -U redu -Otkaži - - - -Da -Ne -Zatvori -Pomoć - -Nastavi -440 -Da za sve -Ne za sve -Stani -Ponovo -Pozadina -Na vrhu -Pauza -Pauza -Da li ste sigurni da želite da prekinete? -500 -Datoteka -Uređivanje -Pregled -Omiljeno -Alati -Pomoć -540 -Pogledaj -Otvori sa 7-Zip-om -Otvori sa pridruženom programom -Pregledaj -Promeni -Preimenuj -Kopiraj u... -Premesti u... -Obriši -Podeli fajl... -Spoj delove... -Svojstva -Komentar -Izračunajte provernu veličinu -razlika -Nova fascikla -Nova datoteka -Izlaz -600 -Izaberi sve -Poništi izbor svega -Obrnuti izbor -Izaberi... -Poništi izbor... -Izaberi po tipu -Poništi izbor po tipu -700 -Ikone -Naporedno slaganje -Spisak -Detalji -730 -Bez sortiranja -Ravan pregled -2 Prozora -Trake sa alatkama -Otvori početnu fasciklu -Gore za jedan nivo -Hronologija... -Osvežavanje -750 -Rad sa arhivama -Rad sa datotekama -Velika dugmad -Prikaži tekst ispod dugmadi -800 -Dodaj -Izaberi -900 -Opcije... -Benchmark -960 -Pomoć... -O programu... -1003 -Putanja -Naziv -Tip -Fascikla -Veličina -Veličina u zapakovanom stanju -Atributi -Kreirana -Pristupano -Promenjeno -Solidno -Komentar -Šifrovano -Podeli pre -Podeli posle -Rečnik -CRC -Tip -Anti -Metod -Operativni sistem -Sistem datoteka -Korisnik -Grupa -Blok -Komentar -Položaj -Prefiks putanje -Fascikle -Datoteke -Verzija -Volumen -VišeVolumena -Ofset -Linkovi -Blokovi -Volumeni - -64-bit -Big-endian -Procesor -Fizička veličina -Veličina zaglavlja -Provera rezultata -Karakteristike -Virtuelna adresa -ID -Kratko ime -Kreator aplikacije -Veličina sektora -Način -Link -Greška -Ukupni kapacitet -Slobodni prostor -Veličina cluster-a -Naziv -Lokalno ime -Provajder -2100 -Opcije -Jezik -Jezik: -Promene u datotekama -Program: -Razlika: -2200 -Sistem -7-Zip otvara sledeće tipove datoteka: -2301 -Ubaci 7-Zip u sistemski meni -Kaskadni sistemski meni -Stavke sistemskog menija: -2320 - - -Otvori arhivu -Izdvoj datoteke... -Dodaj u arhivu... -Testiraj arhivu -Izdvoj ovde -Izdvoj u {0} -Dodaj u {0} -Dodaj i napravi e-mail... -Dodaj u {0} i napravi e-mail -2400 -Fascikle -Radna fascikla -Koristi Windows-ovu privremenu fasciklu -Trenutna -Navedena: -Koristi samo za izmenjive medije -Navedite lokaciju za smeštanje privremenih datoteka. -2500 -Podešavanja -Prikaži ".." -Prikaži prave sličice datoteka -Prikaži sistemski meni -Obeleži ceo red -Prikaži linije mreže -Jedan klik za otvaranje stavke -Alternativni način za biranje -Koristi velike memorijske blokove -2900 -O programu -7-Zip je besplatan program. -3000 -Sistem ne može da izdvoji potrebnu količinu memorije -Nije bilo nikakvih grešaka -{0} objekat(a) izabrano -Ne mogu da kreiram Fasciklu '{0}' -Operacija osvežavanja nije dozvoljena za ovu arhivu. -Ne mogu da otvorim datoteku '(0)' kao arhiva -Ne mogu da otvorim šifrovanu arhivu '(0)'. Pogrešna lozinka? -Nepodržan tip arhive -Datoteka {0} već postoji -Datoteka '{0}' je izmjenjena.\nDa li želite ažurirati arhivu? -Nije moguće ažurirati datoteku\n'{0}' -Nije moguće započeti uređivanje. -Datoteka izgleda kao virus (ime datoteke sadrži puno razmaka u imenu). -Operacija ne može biti pozvana iz fascikle koja ima dugu putanju. -Morate da izaberete neku datoteku -Morate da izaberete jednu ili više datoteka -Isuviše stavki -3300 -Izdvajanje -Dodajem -Testiranje -Otvaranje u toku... -Skeniranje... -3400 -Izdvoj -Izdvoj u: -Navedi lokaciju gde će se izdvajati datoteke iz arhiva. -3410 -Putanje -Puna putanja -Bez putanje -3420 -Zamena -Pitaj pre nego što zameniš -Zameni bez zapitkivanja -Preskoči postojeće datoteke -Automatska promena naziva -Automatska promena naziva postojećih datoteka -3500 -Potvrdi zamenu datoteke -Ciljna fascikla već sadrži datoteku koja se trenutno obrađuje. -Da li želite da zamenite postojeću datoteku -sa ovom? -{0} bajtova -Automatska promena naziva -3700 -Nepodržani metod kompresije za '{0}'. -Greška u '{0}'. Datoteka je neispravana. -CRC greška u '{0}'. Datoteka je neispravana. -Greške u kodiranu datoteku '(0)' Pogrešna lozinka. -CRC greška u šifrovane datoteke '(0)' Pogrešna lozinka. -3800 -Unesite lozinku -Unesite lozinku: -Ponovo unesite lozinku: -Prikaži lozinku -Lozinke se ne poklapaju -Koristi samo engleska slova, brojeva i specijalnih znakova (!, #, $, ...) Za lozinke -Lozinka je predugačka -Šifra -3900 -Proteklo vreme: -Preostalo vreme: -Veličina: -Brzina: -Obrađeno: -Kompresioni odnos: -Greške: -Arhive: -4000 -Dodaj u arhivu -Arhiva: -Nadogradnja arhiva: -Format arhive: -Nivo kompresije: -Tip kompresije: -Dictionary size: -Word size: -Veličina čvrstog bloka: -Broj niza procesora: -Parametri: -Opcije -Kreiraj SFX arhivu -Kompresija deljene datoteka -Šifrovanje -Metoda šifrovanja: -Šifruj nazive datoteka -Potrebna memorija - kompresija: -Potrebna memorija - dekompresija: -4050 -Bez kompresije -Brže -Brzo -Normalno -Maksimalno -Najbrže -4060 -Dodaj i zameni datoteke -Osveži i dodaj datoteke -Ozveži postojeće datoteke -Sinhronizuj datoteke -4070 -Pregledaj -Sve datoteke -Ne-čvrste -Čvrsto -6000 -Kopiraj -Iseci -Kopiraj u: -Premesti u: -Kopiranje u toku... -Premeštanje u toku... -Preimenovanje u toku... -Izaberite odredišnu fasciklu. -Operacija nije podržana. -Greška pri preimenovanju datoteke ili fascikle -Potvrdi kopiranje datoteke -Da li ste sigurni da želite da kopirate datoteke u arhivu -6100 -Potvrdite brisanje datoteke -Potvrdite brisanje fascikle -Potvrdite višestruko brisanje datoteka -Jeste li sigurni da želite da obrišete '{0}'? -Jeste li sigurni da želite da obrišete fasciklu '{0}' i sav njen sadržaj? -Jeste li sigurni da želite da obrišete ove {0} podatke? -Brisanje u toku... -Greška pri brisanju datoteke ili fascikle -Sistem ne može da premesti datoteku sa dugom putu u korpu za otpatke -6300 -Kreiraj fasciklu -Kreiraj datoteku -Ime fascikle: -Ime datoteke: -Nova fascikla -Nova datoteka -Greška pri kreiranju fascikli -Greška pri kreiranju datoteka -6400 -Komentar -Komentar: -Odaberi -Poništi izbor -Maska: -6600 -Osobine -Hronologija -Dijagnostičke poruke -Poruke -7100 -Računar -Mreža -Dokumenti -Sistem -7200 -Dodaj -Izdvoj -Testiraj -Kopiraj -Premesti -Izbriši -Svojstva -7300 -Podeli datoteku -Podeli na: -Podeli na delove, bajti: -Podela... -Potvrda podele -Da li ste sigurni da želite da podelite datoteku na (0) dela? -Veličine dela mora biti manji od veličine originalne datoteke -Neispravna veličina volumena -Određena veličina volumena: {0} bajtova.\nDa li ste sigurni da želite da podelite arhivu u tih volumena? -7400 -Sastavi datoteke -Sastavi u: -Spajanje... -Izaberite samo prvi deo podele datoteke -Ne mogu da otkrijem datoteku kao deo podele -Ne može se naći više od jednog dela podele -7500 -Izračunavanje proverne veličine... -Informacija o proverne veličine -CRC porvera za podatak: -CRC provera za podatak i imena: -7600 -Benchmark -Korišćenje memorije: -Kompresija -Dekompresija -Ocena -Potpuna ocena -Trenutno -Rezultat -Upotreba procesora -Rejting/Upotreba -Prolazi: diff --git a/Utils/7-Zip/Lang/sv.txt b/Utils/7-Zip/Lang/sv.txt deleted file mode 100644 index adaeeb966..000000000 --- a/Utils/7-Zip/Lang/sv.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; : Andreas M Nilsson, Christoffer Enqvist -; 4.59 : Bernhard Eriksson -; -; -; -; -; -; -; -; -; -0 -7-Zip -Swedish -Svenska -401 -OK -Avbryt - - - -&Ja -&Nej -&Stäng -Hjälp - -F&ortsätt -440 -Ja till &Alla -Nej till A&lla -Stopp -Starta om -&Bakgrunden -&Förgrunden -&Pausa -Pausad -Är du säker på att du vill avbryta? -500 -&Arkiv -&Redigera -&Visa -&Favoriter -Verkt&yg -&Hjälp -540 -&Öppna -Öppna &internt -Öppna &externt -&Visa -&Redigera -&Byt namn -&Kopiera till... -&Flytta till... -&Ta bort -&Dela upp fil... -&Sätt ihop filer... -E&genskaper -Komme&ntera -Beräkna checksumma - -Skapa mapp -Skapa fil -&Avsluta -600 -Markera &alla -Avmarkera alla -&Invertera markering -Markera... -Avmarkera... -Markera efter typ -Avmarkera efter typ -700 -St&ora ikoner -Sm&å ikoner -&Lista -&Detaljerad lista -730 -Osorterade -Platt vy -&2 Paneler -&Verktygsfält -Öppna rotmappen -Upp en nivå -Mapphistorik... -&Uppdatera -750 -Verktygsfältet Arkiv -Verktygsfältet Standard -Stora Knappar -Visa Knapptext -800 -&Lägg mappen till Favoriter som -Bokmärke -900 -&Alternativ... -&Benchmark -960 -&Innehåll... -&Om 7-Zip... -1003 -Sökväg -Namn -Filändelse -Mapp -Storlek -Storlek komprimerad -Attribut -Skapad -Använd -Ändrad -Sammanhängande (Solid) -Kommenterad -Krypterad -Delad före -Delad efter -Ordlista -CRC -Typ -Anti -Metod -Värd OS -Filsystem -Användare -Grupp -Block -Kommentar -Position -Sökvägs prefix -Kataloger -Filer -Version -Volym -Multivolym -Offset -Länkar -Block -Volymer - -64-bitars -Big-endian -CPU -Fysisk storlek -Storlek på header -Checksumma -Karakteristisk -Virtuell adress - - - - - - -Fel -Total Storlek -Ledigt utrymme -Kluster storlek -Etikett -Datornamn -Nätverkstyp -2100 -Alternativ -Språk -Språk: -Redigerare -&Redigerare: - -2200 -System -Associera med 7-Zip: -2301 -Lägg till 7-Zip som alternativ i Utforskarens högerklicksmenyn -Placera 7-Zip som en undermeny -Objekt i högerklicksmenyn: -2320 - - -Öppna -Packa upp filer... -Lägg till arkiv... -Kontrollera arkivet -Packa upp här -Packa upp till {0} -Lägg till {0} -Komprimera och skicka som e-post... -Komprimera till {0} och skicka som e-post -2400 -Mappar -&Arbetsmapp -&Systemets temp-mapp -A&ktuell -Spe&cificerad: -Använd enbart för &flyttbara enheter -Ange plats där temporära arkivfiler ska sparas. -2500 -Inställningar -Visa ".." objektet -Visa riktiga ikoner, för filer innehållande ikoner (el. länkade) -Visa system-menyn -Markera &hel rad -Visa &rutnät - -&Alternativt markeringsläge -Använd &stora minnessidor -2900 -Om 7-Zip -7-Zip är fri programvara. Du kan emellertid stödja den fortsatta utvecklingen av 7-Zip genom att donera. Den aktuella översättningen på svenska är gjord av Wermlandsdata, baserad på arbete utfört av Andreas M Nilsson och Christoffer Enqvist. -3000 -Systemet kan inte allokera den begärda minnesmängden -Inga fel påträffades -{0} objekt markerade -Kan inte skapa mapp '{0}' -Uppdatering stöds inte för det här arkivet. -Kan inte öppna filen '{0}' som ett arkiv -Kan inte öppna det krypterade arkivet '{0}'. Fel lösenord? -Arkiv typen stöds ej -Filen {0} existerar redan -Filen '{0}' har blivit ändrad.\nVill du uppdatera den i arkivet? -Kan inte uppdatera filen\n'{0}' -Kan inte starta redigeraren. -Filen verkar vara ett virus (filnamnet innehåller 'långa' mellanslag). -Operation kan inte utföras från en katalog med en så lång sökväg. -Du måste välja en fil -Du måste välja en eller flera filer -För många objekt -3300 -Packar upp -Komprimerar -Kontrollerar -Öppnar... -Skannar... -3400 -Packa upp -&Packa upp till: -Ange sökväg för uppackade filer. -3410 -&Sökvägstyp -Kompletta sökvägar -Inga sökvägar -3420 -&Överskrivning -Fråga före överskrivning -Skriv över befintliga filer -Hoppa över befintliga filer -Automatisk omdöpning -Automatisk omdöpning av befintliga filer -3500 -Bekräfta överskrivning av fil -Målmappen innehåller redan den behandlade filen. -Vill du skriva över den befintliga filen -med den här? -{0} bytes -A&utomatisk omdöpning -3700 -Komprimeringsmetoden stöds inte för '{0}'. -Datafel i '{0}'. Filen är korrupt. -CRC-fel i '{0}'. Filen är korrupt. -Datafel i den krypterade filen '{0}'. Fel lösenord? -CRC-fel i den krypterade filen '{0}'. Fel lösenord? -3800 -Ange lösenord -Ange lösenord: -Upprepa lösenord: -&Visa lösenord -Lösenorden stämmer inte överens. -Använd endast engelska tecken, siffror och special tecken (!, #, $, ...) till lösenord -Lösenordet är för långt. -&Lösenord -3900 -Förfluten tid: -Återstående tid: -Storlek: -Hastighet: -Bearbetat: -Komprimeringsgrad: -Fel: -Arkiv: -4000 -Lägg till arkiv -&Arkiv: -&Uppdateringsmetod: -Arkiv&format: -Komprimeringsniv&å: -&Komprimeringsmetod: -Storlek på &ordlista: -Storlek på o&rd: -Solit block storlek: -Antal trådar: -&Parametrar: -Alternativ -Skapa sj&älvuppackande arkiv -Komprimera delade filer -Kryptering -Krypteringsmetod: -Kryptera fil&namn -Minne behövt vid komprimering: -Minne behövt vid dekomprimering: -4050 -Okomprimerat -Snabbaste -Snabb -Normal -Maximal -Ultra -4060 -Lägg till och ersätt filer -Lägg till och uppdatera befintliga filer -Uppdatera enbart befintliga filer -Synkronisera filer -4070 -Bläddra -Alla filer -Icke-solit -Solit -6000 -Kopiera -Flytta -Kopiera till: -Flytta till: -Kopierar... -Flyttar... -Döper om... -Välj målmapp. -Funktionen stöds inte. -Ett fel uppstod under omdöpning av fil eller mapp -Bekräfta kopiering av fil -Är du säker på att du vill kopiera filerna till arkivet -6100 -Bekräfta borttagning av fil -Bekräfta borttagning av mapp -Bekräfta borttagning av flera filer -Är du säker på att du vill ta bort '{0}'? -Är du säker på att du vill ta bort mappen '{0}' och allt dess innehåll? -Är du säker på att du vill ta bort de här {0} objekten? -Tar bort... -Ett fel uppstod under borttagning av fil eller mapp -Systemet kan inte flytta en fil med s lng skvg till papperskorgen -6300 -Skapa mapp -Skapa fil -Mappnamn: -Filnamn: -Ny mapp -Ny fil -Fel vid skapande av mapp -Fel vid skapande av fil -6400 -Kommentar -&Kommentar: -Markera -Avmarkera -Filter: -6600 -Egenskaper -Mapphistorik -Diagnostiska meddelanden -Meddelande -7100 -Dator -Nätverk -Dokument -System -7200 -Lägg till -Packa upp -Testa -Kopiera -Flytta -Radera -Info -7300 -Dela Upp Fil -&Dela upp till: -Dela upp i &delar (volymer), bytes: -Delar upp... -Bekräfta uppdelning -Är det säkert du vill dela upp filen i {0} volymer? -Volymstorleken måste vara mindre än storleken på originalfilen. -Felaktig volymstorlek. -Specificerad volymstorlek: {0} byte.\nÄr du säker du vill dela arkivet i sådana delar? -7400 -Sätt Ihop Filer -&Sätt ihop till: -Sätter ihop... -Markera bara första filen -Kan inte upptäcka att filen är en del av en uppdelad fil -Kan inte hitta mer än en del av en uppdelad fil -7500 -Beräknar checksumma... -Checksumma information -CRC checksumma för data: -CRC checksumma för data och namn: -7600 -Benchmark -Minnesanvändning: -Komprimering -Dekomprimering -Prestanda -Total prestanda -Aktuellt -Resultat -CPU Användning -Rate / Användning -Omgångar: diff --git a/Utils/7-Zip/Lang/ta.txt b/Utils/7-Zip/Lang/ta.txt deleted file mode 100644 index a65c116df..000000000 --- a/Utils/7-Zip/Lang/ta.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 3.13 : Ve Elanjelian : ThamiZha! team : www.thamizha.com -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Tamil -தமிழ் -401 -சரி -இரத்து - - - -ஆம் -வேண்டாம் -மூடு -உதவி - -தொடரவும் -440 -அனைத்திற்கும் ஆம் -அனைத்திற்கும் இல்லை -நிறுத்து -மீள்துவங்கு -பின்புலம் -முன்புலம் -தற்காலிகமாக நிறுத்து -தற்காலிக நிறுத்தல் -உறுதியாகவே இரத்து செய்ய விரும்புகிறீர்களா? -500 -கோப்பு -பதிப்பு -பார்வை -விருப்பங்கள் -கருவிகள் -உதவி -540 -திற -உள்ளே திற -வெளியே திற -பார்வை -பதிப்பு -மாற்றுப்பெயரிடு -இங்கு நகலெடு... -இங்கு நகர்த்து... -அழி - - -தன்மைகள் -கருத்துரை - - -கோப்பை உருவாக்கு -கோப்பு உருவாக்கு -வெளியேறு -600 -அனைத்தும் தேர்ந்தெடு -அனைத்தும் நீக்கு -தெரிவை புரட்டு -தேர்ந்தெடு... -நீக்கு... -வகைப்படி தெரிவுசெய் -வகைப்படி நீக்கு -700 -பெரிய உருபிகள் -சிறிய உருபிகள் -பட்டியல் -தகவல்கள் -730 -வரிசைப்படுத்தப்படாதது - -2 பலகங்கள் -கருவிப்பட்டைகள் -வேர் அடைவைத் திற -ஒரு படி மேல் -அடைவுகளின் வரலாறு... -புதுக்கல் -750 -காப்பக கருவிப்பட்டை -பொதுவான கருவிப்பட்டை -பெரிய பொத்தான்கள் -பொத்தான்களின் உரையைக் காட்டு -800 -அடைவை விரும்பியவற்றுள் இப்படி இணை -புத்தகக்குறி -900 -விருப்பத்தேர்வு... -மதிப்பீட்டு அளவை -960 -பொருளடக்கம்... -7-ஜிப்பைப் பற்றி... -1003 -பாதை -பெயர் -நீட்டிப்பு -அடைவு -அளவு -கட்டப்பட்ட அளவு -பண்புக்கூறு -உருவாக்கப்பட்டது -அனுகப்பட்டது -மாற்றப்பட்டது -திண்மம் -கருத்துரைக்கப்பட்ட -மறைக்குறியீட்டப்பட்டது -முன் பிரி -பின் பிரி -அகராதி -CRC -வகை -தடுப்பு -வழி -புரவலரின் OS -கோப்பு மண்டலம் -பயனர் -குழு -கட்டம் -குறிப்பு - - - - - - - - - - - - - - - - - - - - - - - - - - -தவறு -மொத்த அளவு -காளி இடம் -கொத்தணியின் அளவு -வில்லை -இடத்துரி பெயர் -வழங்குபவர் -2100 -தேர்வுகள் -மொழி -மொழி: -பதிப்பாளன் -பதிப்பாளன்: - -2200 -மண்டலம் -7-ஜிப்பை இதனுடன் தொடர்புப்படுத்து: -2301 -7-ஜிப்பை வெற்று சூழல்பட்டியலுடன் ஒருங்கிணை -விழுதொடரும் சூழல் பட்டியல் -சூழல் பட்டியல் உருப்படிகள்: -2320 -<அடைவு> -<காப்பகம்> -காப்பகத்தைத் திற -கோப்புகளை வெளிக்கொணர்... -காப்பகத்தில் இணை... -காப்பகத்தைச் சோதனைசெய் -இங்கு வெளிக்கொணர் -{0}-ல் வெளிக்கொணர் -{0}-ல் இணை -இறுக்கி மின்னஞ்சலனுப்பு... -{0}-க்கு இறுக்கி அஞ்சலனுப்பு -2400 -அடைவுகள் -பணியிலுள்ள அடைவு -மண்டல தற்காலிக அடைவு -நடப்பு -குறிப்பிட்ட: -கழற்று இயக்கிகளை மட்டும் பயன்படுத்து -கோப்புகளைத் தற்காலிக காப்பகப்படுத்தும் இடத்தைக் குறிப்பிடுக. -2500 -அமைவுகள் -".." உருப்படியைக் காட்டு -கோப்பு உருபிகளைக் காட்டு -மண்டல பட்டியலைக் காட்டு - - - - - -2900 -7-ஜிப்பைப் பற்றி -தமிழாக்கம் (c) 2004 தமிழா! குழு - www.thamizha.com/\n\n7-ஜிப் ஒரு பரிநிரல் ஆகும். ஆனால், நீங்கள் 7-ஜிப்பின் மேம்பாட்டை ஆதரிக்க விரும்பினால், பதிவுபெற்றுங்கள். பதிவுபெற்ற பயனராக, நீங்கள் தொழில்நுட்ப உதவியும் பெறலாம். -3000 - -தவறுகளேதுமில்லை -{0} பொருள் தெரிவானது -'{0}' அடைவை உருவாக்க இயலவில்லை -இக்காப்பகத்தில் புதுப்பிக்கும் செயல்களுக்கு ஆதரவில்லை. - - - - -'{0}' கோப்பு மாற்றப்பட்டது.\nஇதனை காப்பகத்தில் புதுப்பிக்க வேண்டுமா? -பின்வரும் கோப்பை புதுப்பிக்க இயலவில்லை\n'{0}' -பதிப்பாளனைத் துவக்க இயலவில்லை. - - - - -மிகவும் அதிகமான உருப்படிகள் -3300 -வெளிக்கொணரப்படுகின்றது -இறுக்கப்படுகின்றது -சோதனை... -திறக்கப்படுகின்றது... - -3400 -வெளிக்கொணர் -இங்கு வெளிக்கொணர்: -வெளிக்கொணர்ந்த கோப்புகளுக்கான இடத்தைக் குறிப்பிடு. -3410 -பாதை முறைமை -முழு பாதைப்பெயர்கள் -பாதைப்பெயர்களில்லை -3420 -மேலெழுதல் முறைமை -மேலெழுதுவதற்கு முன் கேள் -கேட்காமல் மேலெழுது -தற்பொழுதுள்ள கோப்புகளைத் தவிர் -தானாக மாற்றுப்பெயரிடு - -3500 -கோப்பு மாற்றத்தை உறுதிசெய் -சேரிட அடைவு ஏற்கனவே செயல்படுத்தப்பட்ட கோப்பைக் கொண்டுள்ளது. -தற்பொழுதுள்ள கோப்பை -இதக்கொண்டு மாற்ற விரும்புகிறீர்களா? -{0} பைட்கள் -தானாக மாற்றுப்பெயரிடு -3700 -'{0}'-ல் ஆதரவில்லாத இறுக்கல் முறை. -'{0}'-ல் தரவுத் தவறு. கோப்பு முறிந்துள்ளது. -'{0}'-ல் CRC தோல்வியுற்றது. கோப்பு முறிந்துள்ளது. - - -3800 -கடவுச்சொல்லை உள்ளிடுக -கடவுச்சொல்லை உள்ளிடுக: - -கடவுச்சொல்லை காட்டு - - - -கடவுச்சொல் -3900 -மீதமுள்ள நேரம்: -மீதமுள்ள நேரம்: -அளவு: -வேகம்: - - -தவறுகள்: - -4000 -காப்பகத்திலிணை -காப்பகம்: -புதுபிக்கும் முறைமை: -காப்பக வடிவம்: -இறுக்க வகை: -இறுக்கும் வழி: -அகராதி அளவு: -வார்த்தை அளவு: - - -அளபுருகள்: -விருப்பத்தேர்வுகள் -SFX காப்பகம் உறுவாக்கு - - - -பெயரை மறைக்குறியீடாக்கு -இறுக்க நினைவக பயன்பாடு: -பெருக்க நினைவக பயன்பாடு: -4050 -தேக்கு -அதிவிரைவான -விரைவான -சாதாரண -அதிகமான -சிறப்பான -4060 -சேர்த்து கோப்புகளை மாற்று -புதிப்பித்து கோப்புகளை சேர் -உள்ள கோப்புகளைப் புதுப்பி -கோப்புகளை ஒத்தியக்கு -4070 -உலாவு -அனைத்து கோப்புகளும் - - -6000 -நகல் -நகர்த்து -இங்கு நகலெடு: -இங்கு நகர்த்து: -நகலெடுக்கப்படுகிறது... -நகர்த்தப்படுகிறது... -பெயர்மாற்றப்படுகிறது... - -அத்தகைய செயலுக்கு ஆதரவில்லை. -கோப்பையோ அடைவையோ பெயர்மாற்றும்போது தவறு - - -6100 -கோப்பு அழிப்பை உறுதிசெய் -அடைவு அழிப்பை உறுதிசெய் -பல கோப்பு அழிப்பை உறுதிசெய் -'{0}'-ஐ உறுதியாக அழிக்க விரும்புகிறீர்களா? -'{0}' அடைவையும் அதிலுள்ளவற்றயும் உறுதியாகவே அழிக்க விரும்புகிறீர்களா? -இந்த {0} உருப்படிகளை உறுதியாக அழிக்க விரும்புகிறீர்களா? -அழிக்கப்படுகிறது... -கோப்பையோ அடைவையோ அழிக்கும்போது தவறு - -6300 -அடைவு உருவாக்கு -கோப்பு உருவாக்கு -அடைவின் பெயர்: -கோப்பின் பெயர்: -புதிய அடைவு -புதிய கோப்பு -அடைவு உருவாக்கும்போது தவறு -கோப்பு உருவாக்கையில் தவறேற்பட்டது -6400 -கருத்துரை -கருத்துரை: -தெரிவுசெய் -நீக்கு -முகமுடி: -6600 - -அடைவுகளின் வரலாறு -அறிவழிச் செய்திகள் -செய்தி -7100 -கணினி -பிணையம் - -மண்டலம் -7200 -இணை -வெளிக்கொணர் -பரிசோதி -நகல் -நகர்த்து -அழி -தகவல் -7300 - - -கனவளவுகளுக்கு, பைட்களுக்குப் பிரி: - - - - - - -7400 - - - - - - -7500 - - - - -7600 -மதிப்பீட்டு அளவை -நினைவக பயன்: -இறுக்கப்படுகையில் -பெருக்கப்படுகையில் -புள்ளிகள் -மொத்த புள்ளிகள் -நடப்பு -முடிவில் - - -சரியானவை: diff --git a/Utils/7-Zip/Lang/th.txt b/Utils/7-Zip/Lang/th.txt deleted file mode 100644 index 96e06cc03..000000000 --- a/Utils/7-Zip/Lang/th.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.09 : Chayanon Ruamcharoen -; 4.10 : Zafire06 -; 9.13 : Kom10 -; -; -; -; -; -; -; -; -0 -7-Zip -Thai -ไทย -401 -ตกลง -ยกเลิก - - - -&ใช่ -&ไม่ -&ออก -ช่วยเหลือ - -&ดำเนินการต่อ -440 -ใช่ทั้งหมด -ไม่ทั้งหมด -หยุด -ฟื้นฟู -&ทำงานเป็นพื้นหลัง -&ทำงานเป็นพื้นหน้า -&หยุดชั่วคราว -หยุดชั่วคราว -คุณแน่ใจหรือว่าจะยกเลิก -500 -&แฟ้ม -&แก้ไข -&มุมมอง -&รายการโปรด -&เครื่องมือ -&ช่วยเหลือ -540 -&เปิด -เปิดในหน้าต่างเดิม -เปิดในหน้าต่างใหม่ -&มุมมอง -&แก้ไข -&เปลี่ยนชื่อ -&คัดลอกไปที่... -&วางที่... -&ลบ -&แยกไฟล์... -รวมไฟล์... -&คุณสมบัติ -&หมายเหตุ -คำนวณ checksum -Diff -สร้างโฟลเดอร์ -สร้างไฟล์ -ออก -600 -เลือกทั้งหมด -ยกเลิกการเลือกทั้งหมด -&สลับการเลือกให้เป็นตรงกันข้าม -เลือก... -ยกเลิกการเลือก... -เลือกด้วยแบบชนิด -ยกเลิกการเลือกด้วยแบบชนิด -700 -&ไอคอนขนาดใหญ่ -&ไอคอนขนาดเล็ก -&แสดงเป็นรายการ -&แสดงแบบละเอียด -730 -ไม่เลือก -แสดงไฟล์และโฟลด์เดอร์ทั้งหมด -&แสดง 2 แผง -&แถบเครื่องมือ -เปิดรากโฟลเดอร์ -เลื่อนขึ้นหนึ่งระดับ -ประวัติโฟลเดอร์... -&ฟื้นฟู -750 -แถบเครื่องมือเอกสาร -แถบเครื่องมือธรรมดา -ปุ่มขนาดใหญ่ -แสดงข้อความบนปุ่ม -800 -&เพิ่มโฟลเดอร์เข้ารายการโปรด -คั่นหน้าที่ -900 -&ตัวเลือก... -&เกณฑ์เปรียบเทียบสมรรถนะ -960 -&เนื้อหาและดัชนี... -&เกี่ยวกับ 7-Zip... -1003 -ที่ตั้ง -ชื่อ -ชนิด -โฟลเดอร์ -ขนาด -ขนาดเมื่อถูกจัดเก็บ -ลักษณะประจำ -สร้างเมื่อ -เข้าถึงเมื่อ -ดัดแปรเมื่อ -ต่อเนื่อง -หมายเหตุ -การเข้ารหัสลับ -ก่อนแบ่ง -หลังแบ่ง -ดิคชันนารี -ซีอาร์ซี -แบบชนิด -ต่อต้าน -วิธีการ -OS ที่ใช้ -ไฟล์ระบบ -ผู้ใช้ -กลุ่ม -บล็อก -หมายเหตุ -ตำแหน่ง -คำนำหน้าที่ตั้ง -โฟลเดอร์ -ไฟล์ -เวอร์ชั่น -วอลลุ่ม -มัลติวอลลุ่ม -ออฟเซ็ท -ลิ้งค์ -บล็อค -Volumes - -64-บิท -Big-endian -CPU -ขนาดทางกายภาพ -ขนาดเฮดเดอร์ -Checksum -คุณลักษณะ -Virtual Address -ID -ชื่อย่อ -ผู้สร้างโปรแกรม -ขนาด Sector -โหมด -ลิงค์ -เกิดข้อผิดพลาด -ขนาดทั้งหมด -ช่องว่างที่เหลืออยู่ -ขนาดกลุ่ม -ป้าย -ชื่อเฉพาะ -ผู้ให้บริการ -2100 -ตัวเลือก -ภาษา -ภาษา: -บรรณาธิกรณ์ -&บรรณาธิกรณ์: -&Diff: -2200 -ระบบ -ทำให้ 7-Zip ทำงานร่วมกับ: -2301 -รวบรวมคำสั่ง 7-Zip ไปที่แถบเมนูลัด -แยกเป็นแถบคำสั่ง 7-Zip -วัตถุที่ปรากฏบนเมนูลัด: -2320 -<โฟลเดอร์> -<เอกสาร> -เปิดเอกสาร -แยกไฟล์... -เพิ่มเข้าเอกสาร... -ทดสอบเอกสาร -แยกไฟล์ที่นี่ -แยกไฟล์ไปที่ {0} -เพิ่มเข้า {0} -บีบอัดแล้วส่งอีเมลล์... -บีบอัดเป็น {0} แล้วส่งอีเมลล์ -2400 -โฟลเดอร์ -&โฟลเดอร์ที่ทำงานอยู่ -&โฟลเดอร์ต่างๆของระบบ -&โฟลเดอร์ปัจจุบัน -&ระบุ: -ใช้สำหรับไดรฟ์แบบถอดได้เท่านั้น -ระบุที่ตั้งสำหรับไฟล์เอกสารชั่วคราว -2500 -กำหนด -แสดงวัตถุ ".." -แสดงไอคอนไฟล์ที่แท้จริง -แสดงเมนูระบบ -&เลือกเต็มแถว -แสดง &เส้นกริด -คลิกครั้งเดียวเพื่อเปิดไฟล์ -&โหมดการเลือกอื่น -ใช้ &เพจความจำขนาดใหญ่ -2900 -เกี่ยวกับ 7-Zip -7-Zip เป็นฟรีแวร์ อย่างไรก็ตาม คุณสามารถสนับสนุนการพัฒนาของ 7-Zip ได้โดยการลงทะเบียน เมื่อคุณเป็นผู้ใช้ที่ลงทะเบียนแล้ว คุณจะได้รับการสนับสนุนทางเทคนิคจากเรา -3000 -ระบบไม่สามารถใช้หน่วยความจำตามที่ระบุได้ -ไม่มีข้อผิดพลาด -{0} วัตถุที่เลือกไว้ -ไม่สามารถสร้างโฟลเดอร์ '{0}' -ปรับปรุงการทำงานไม่สนับสนุนสำหรับเอกสาร -ไม่สามารถเปิดไฟล์ '{0}' เป็นเอกสารได้ -ไม่สามารถเปิดไฟล์ที่เข้ารหัสได้ '{0}' พาสเวิร์ดผิดหรือไม่? -ชนิดของไฟล์บีบอัดไม่รองรับ -ไฟล์ {0} มีอยู่แล้ว -ไฟล์ '{0}' ได้ถูกดัดแปรแล้ว\nคุณต้องการจะปรับปรุงเอกสารหรือไม่ -ไม่สามารถปรับปรุงไฟล์\n'{0}' -ไม่สามารถเปิดตัวแก้ไขได้ -ไฟล์อาจเป็นไวรัส (ชื่อไฟล์มีช่องว่างยาว) -ไม่สามารถดำเเนินการได้จากโฟลเดอร์ที่มีที่ตั้งยาว -ท่านต้องเลือกไฟล์ -ท่านต้องเลือกไฟล์หนึ่งไฟล์หรือมากว่า -มีวัตถุมากเกินไป -3300 -กำลังแยกไฟล์ -กำลังบีบอัด -กำลังทดสอบ -กำลังเปิด... -กำลังสแกน... -3400 -แยกไฟล์ -แยกไฟล์ไปที่: -ระบุที่ตั้งสำหรับไฟล์ที่แยกออกมา -3410 -ที่ตั้ง -ชื่อที่ตั้งแบบเต็ม -ไม่มีชื่อที่ตั้ง -3420 -การบันทึกทับ -ถามก่อนมีการบันทึกทับ -บันทึกทับโดยไม่มีข้อความพร้อมรับ -ข้ามไฟล์ที่มีอยู่ -เปลี่ยนชื่ออัตโนมัติ -เปลี่ยนชื่อไฟล์ที่มีอยู่อัตโนมัติ -3500 -ยืนยันการแทนที่ไฟล์ -โฟลเดอร์ปลายทางมีไฟล์ที่ได้ประมวลผลแล้ว -คุณต้องการแทนที่ไฟล์ที่มีอยู่หรือไม่ -ด้วย -{0} ไบต์ -เปลี่ยนชื่ออัตโนมัติ -3700 -ไม่รองรับวิธีการบีบอัดนี้สำหรับ '{0}' -ข้อมูลใน '{0}' ผิดพลาด ไฟล์ชำรุด -ซีอาร์ซีใน '{0}' ไม่สามารถใช้การได้ ไฟล์ชำรุด -ข้อมูลในไฟล์บีบอัด '{0}' ผิดพลาด รหัสผ่านไม่ถูกต้อง? - -3800 -ใส่รหัสผ่าน -ใส่รหัสผ่าน: -ใส่รหัสผ่านอีกครั้ง: -&แสดงรหัสผ่าน -รหัสผผ่านไม่ตรง -ตั้งรหัสผ่านด้วยอักษรภาษาอังกฤษ หรืออักขระ (!, #, $, ...) -รห้สผ่านยาวเกินไป -รหัสผ่าน -3900 -ใช้เวลาไปแล้ว: -ต้องใช้เวลาอีก: -ขนาด: -ความเร็ว: -ดำเนินการแล้ว: -อัตราส่วนการบีบอัด: -ความผิดพลาด: -เอกสาร: -4000 -เพิ่มเข้าเอกสาร -&เอกสาร: -&การปรับปรุง: -รูปแบบการบีบอัดที่ต้องการใช้: -อัตราการบีบอัด: -&วิธีการบีบอัด: -&ขนาดดิคชันนารี: -&ขนาดอักษร: -ขนาด Solid block: -จำนวน CPU threads: -&พารามิเตอร์: -ตัวเลือก -สร้างเอกสาร SFX -บีบอัดแชร์ไฟล์ -การเข้ารหัส -วิธีการเข้ารหัส: -สร้างรหัสผ่าน -หน่วยความจำที่ใช้ในการบีบอัด: -หน่วยความจำที่ใช้ในการแตกออก: -4050 -เก็บเฉยๆ -เร็วที่สุด -เร็ว -ปกติ -ดี -ดีที่สุด -4060 -เพิ่มและแทนที่ไฟล์ -ปรับปรุงและเพิ่ม -ทำให้ไฟล์ที่มีอยู่ใช้การได้ดีขึ้น -ทำให้ไฟล์ประสานกัน -4070 -ค้นดู -ไฟล์ทั้งหมด -Non-solid -Solid -6000 -คัดลอก -ย้าย -คัดลอกไปที่: -ย้ายที่: -กำลังคัดลอก... -กำลังวาง... -กำลังเปลี่ยนชื่อ... -เลือกโฟลเดอร์ที่ตั้ง -การปฏิบัติการไม่สนับสนุน -เกิดข้อผิดพลาดในการเปลี่ยนชื่อไฟล์หรือโฟลเดอร์ -ยืนยันการคัดลอกไฟล์ -ท่านมั่นใจที่จะคัดลอกไฟล์ไปยังเอกสารหรือไม่ -6100 -ยืนยันการลบไฟล์ -ยืนยันการลบโฟลเดอร์ -ยืนยันการลบไฟล์แบบควบซ้อน -คุณแน่ใจหรือว่าคุณต้องการจะลบไฟล์ '{0}'? -คุณแน่ใจหรือว่าคุณต้องการจะลบโฟลเดอร์ '{0}' และข้อมูลของมันทั้งหมด -คุณแน่ใจหรือว่าจะลบวัตถุ {0} เหล่านี้ -กำลังลบ... -เกิดข้อผิดพลาดในการลบไฟล์หรือโฟลเดอร์ -ระบบไม่สามารถย้ายไฟล์ที่ชื่อที่ตั้งยาวไปยังถังขยะได้ -6300 -สร้างโฟลเดอร์ -สร้างไฟล์ -ชื่อโฟลเดอร์: -ชื่อไฟล์: -โฟลเดอร์ใหม่ -ไฟล์ใหม่ -เกิดข้อผิดพลาดในการสร้างโฟลเดอร์ -เหิดข้อผิดพลาดในการสร้างไฟล์ -6400 -หมายเหตุ -&หมายเหตุ: -เลือก -ยกเลิกการเลือก -ตัวพราง: -6600 -คุณสมบัติ -ประวัติโฟลเดอร์ -ข้อความวินิจฉัย -ข้อความ -7100 -คอมพิวเตอร์ -เครือข่าย -เอกสาร -ระบบ -7200 -เพิ่มเข้า -แยกไฟล์ -ทดสอบ -คัดลอก -ย้าย -ลบ -เกี่ยวกับ -7300 -แยกไฟล์ -&แยกไปยัง: -ขนาดไฟล์ที่ต้องการแบ่ง, ไบต์: -กำลังแยก... -ยืนยันการแยก -ท่านมั่นใจว่าต้องการแยกไฟล์เป็น {0} volumes? -ขนาด Volume ต้องเล็กกว่าขนาดไฟล์ต้นฉบับ -ขนาด volume ไม่ถูกต้อง -ระบุขนาด volume: {0} ไบท์.\nท่านมั่นใจว่าต้องการแบ่งไฟล์เป็น volumes ดังกล่าว? -7400 -รวมไฟล์ -&รวมไปยัง: -กำลังรวม... -เลือกเฉพาะส่วนแรกของไฟล์แยก -ไม่สามารถตรวจพบไฟล์ว่าเป็นส่วนหนึ่งของไฟล์แยก -ไม่สามารถหาไฟล์แยกได้มากหนึ่ง -7500 -กำลังคำนวณ Checksum... -ข้อมูล Checksum -CRC checksum ของข้อมูล: -CRC checksum ของข้อมูลและชื่อ: -7600 -เกณฑ์เปรียบเทียบสมรรถนะ -หน่วยความจำที่ใช้: -การบีบอัด -การยกเลิกบีบอัด -เกณฑ์ความสามารถ -เกณฑ์ความสามารถทั้งหมด -ปัจจุบัน -ผลการประเมิน -การใช้งาน CPU -ประสิทธิภาพ /การใช้งาน -ข้อความ: diff --git a/Utils/7-Zip/Lang/tr.txt b/Utils/7-Zip/Lang/tr.txt deleted file mode 100644 index c0f3ae379..000000000 --- a/Utils/7-Zip/Lang/tr.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 9.07 : 2009-09-22 : X-FoRcE -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Turkish -Türkçe -401 -Tamam -İptal - - - -&Evet -&Hayır -&Kapat -Yardım - -De&vam et -440 -Tümüne E&vet -Tümüne Ha&yır -Dur -Tekrar başlat -&Arka planda -Ö&nde -&Duraklat -Duraklatıldı - -İptal edilsin mi? -500 -&Dosya -Dü&zenle -Gö&rüntüle -Sı&k Kullanılanlar -&Araçlar -&Yardım -540 -&Aç -Pa&nelde Aç -Pence&rede Aç -&Görüntüle -Dü&zenle -Yeni a&d ver -K&opyala -&Taşı -&Sil -&Parçala... -&Birleştir... -Öz&ellikler -Açıkla&ma -Toplam checksum hesapla -Fark -Yeni k&lasör -Yeni dos&ya -Çı&k -600 -&Tümünü seç -Tüm seçimi ka&ldır -&Aksini seç -Seç... -Seçimi kaldır... -Bu uzantıyı seç -Uzantılı seçimi kaldır -700 -&Büyük Simgeler -&Küçük Simgeler -&Liste -&Detaylar -730 -Sırasız -Düz Görünüm -&2 Panel aç -&Araç çubukları -Kök Klasörü Aç -Bir Seviye Yukarı -Klasör Geçmişi... -&Yenile -750 -Arşiv çubuğu -Standart çubuk -Büyük düğmeler -Düğme metinleri görünsün -800 -Geçerli &klasörü ekle -Yer -900 -&Seçenekler... -&Performans ölçümü -960 -İç&indekiler... -7-Zip &Hakkında... -1003 -Yol -Ad -Uzantı -Klasör -Boyut -Arşivde boyutu -Öznitelikler -Oluşturma -Erişim -Değiştirme -Katı -Açıklanmış -Şifrelenmiş -Önceki parça -Sonraki parça -Sözlük -CRC -Tür -Anti -Sıkıştırma şekli -İşletim sistemi -Dosya Sistemi -Kullanıcı -Grup -Blok -Açıklama -Konum -Yol Öneki -Klasörler -Dosyalar -Sürüm -Cilt -Çoklu Cilt -Konum -Bağlantılar -Bloklar -Ciltler - -64-bit -Big-endian -İşlemci -Fiziksel Boyut -Başlık Boyutu -Checksum -Karakteristik -Sanal Adres -ID -Kısa İsim -Oluşturan Yazılım -Kesim Boyutu -Biçim -Bağlantı -Hata -Toplam Boyut -Boş Alan -Küme Boyutu -Etiket -Yerel Ad -Sağlayıcı -2100 -Seçenekler -Dil -Dil: -Düzenleyici -Metin &düzenleyici: -&Fark: -2200 -Sistem -7-Zip ile ilişkilendir: -2301 -İçerik menülerinde 7-Zip görünsün -Kademeli içerik menüsü -İçerik menü öğeleri: -2320 - - -Arşivi aç -Dosyaları çıkart... -Arşivle... -Arşivi sına -Burada çıkart -{0} klasörüne çıkart -{0} olarak arşivle -Sıkıştırıp postala... -{0} olarak sıkıştır ve postala -2400 -Klasörler -Ça&lışma klasörü -&Sistem TEMP klasörü -&Geçerli klasör -&Belirtilen klasör: -Sadece çıkarılabilen sürücüler için kullan -Geçici arşiv dosyaları için bir yer belirleyin. -2500 -Ayarlar -".." öğesi görünsün -Gerçek dosya simgeleri görünsün -Sistem menüsü görünsün -&Tüm satır seçilsin -Tabl&o çizgileri görünsün -Öğeyi açmak için tek tıkla -&Alternatif seçim kipi -Geniş &bellek sayfaları kullan -2900 -7-Zip hakkında -7-Zip özgür bir yazılımdır. Ancak, kayıt olarak 7-zip geliştirme faaliyetine destek olabilirsiniz. -3000 -Sistem gerekli belleği ayarlayamadı -Hata yok. -{0} adet öğe seçili -'{0}' klasörü oluşturulamıyor -Bu arşiv üzerinde güncelleme yapamazsınız. -'{0}' arşiv dosyası olarak açılamıyor. -'{0}' dosyası açılamıyor. Şifreniz yanlış olabilir mi? -Desteklenmeyen arşiv tipi -Dosya {0} zaten mevcut -'{0}' dosyası değişmiş.\nArşivde güncellensin mi? -'{0}' dosyası güncellenemedi -Metin düzenleyici başlatılamadı. -Bu dosya virüs gibi görünüyor.(Dosya ismi uzun boşluk içeriyor). -The operation cannot be called from a folder that has a long path. -Bir dosya seçmelisiniz -Bir veya daha fazla dosya seçmelisiniz -Çok fazla öğe -3300 -çıkartılıyor -sıkıştırılıyor -Sınanıyor -açılıyor... -Taranıyor... -3400 -Çıkart -&Çıkartılacak yer: -Çıkartılacak dosyalar için bir yer belirleyin. -3410 -Yol adları -Tam yol adları -Yol adları olmasın -3420 -Olan dosyalar -Üzerine yazmak için sor -Sormadan üzerine yaz -Çıkartma -Arşivdekilere yeni ad ver -Olanlara yeni ad ver -3500 -Üzerine Yazma Durumu -Hedef klasörde bu adla bir dosya var. Üzerine yazılsın mı? -Mevcut dosya: -Çıkartılan dosya: -{0} bayt -&Yeni ad ver -3700 -'{0}' için sıkıştırma şekli tanınamadı. -'{0}' bozuk. (Veri hatası) -'{0}' bozuk. (CRC hatası) -Şifrelenmiş '{0}' dosyası hatalı. Şifreniz yanlış olabilir mi? -'{0}' dosyasında CRC hatası. Şifreniz yanlış olabilir mi? -3800 -Parola Girişi -Parolayı girin: -Şifre tekrarı: -Par&ola görünsün -Şifreler birbiriyle uyuşmuyor. -Şifre için İngilizce harfler, sayılar ve özel karekterden (!, #, $, ...) kullanabilirsiniz. -Şifre çok uzun -Parola -3900 -Geçen süre: -Kalan süre: -Boyut: -Hız: -İşlenen: -Sıkıştırma oranı: -Hatalı: -Arşivler: -4000 -Arşivle -&Arşiv: -&Güncelleme şekli: -Arşiv &biçimi: -Sıkıştırma dü&zeyi: -Sı&kıştırma şekli: -&Sözlük boyutu: -Ke&lime boyutu: -Aralıksız blok boyutu: -İşlemci iş parçası sayısı: -&Parametreler: -Seçenekler -Ke&ndi çıkartsın (SFX) -Paylaşılan dosyaları sıkıştır -Şifreleme -Şifreleme metodu: -Dosya adlarını şi&frele -Bellek kullanımı (Sıkıştırma): -Bellek kullanımı (Çözme): -4050 -Sıkıştırmasız -En hızlı -Hızlı -Normal -Maksimum -Ultra -4060 -Dosyaları ekle, olanları çıkart -Dosyaları ekle, eskileri güncelle -Sadece eskileri güncelle -Dosyaları eşitle -4070 -Gözat -Tüm dosyalar -Aralıklı -Aralıksız -6000 -Kopyala -Taşı -Kopyalanacak yer: -Taşınacak yer: -Kopyalanıyor... -Taşınıyor... -Dosya Adı Değiştiriliyor... -Hedef klasörü seçiniz. -Bu klasör için istenen işlem desteklenmiyor. -Dosya veya Klasör Adlandırma Hatası -Kopyalama Onayı -Dosyalar arşive kopyalansın mı -6100 -Dosya Silme Onayı -Klasör Silme Onayı -Birden Fazla Dosya Silme Onayı -'{0}' silinsin mi? -'{0}' klasörü ve içindekiler silinsin mi? -{0} silinsin mi? -Siliniyor... -Dosya veya Klasör Silme Hatası -Dosya yolu uzun olduğundan Geri Dönüşüm Kutusuna taşınamıyor -6300 -Yeni klasör -Yeni dosya -Klasör adı: -Dosya Adı: -Yeni Klasör -Yeni Dosya -Klasör Oluşturma Hatası -Dosya Oluşturma Hatası -6400 -Açıklama -&Açıklama: -Seç -Seçimi kaldır -Seçim ifadesi: -6600 -Özellikler -Klasör Geçmişi -Tanılayıcı iletiler -İleti -7100 -Bilgisayar -Ağ -Belgeler -Sistem -7200 -Arşivle -Çıkart -Sına -Kopyala -Taşı -Sil -Bilgi -7300 -Parçala -Şu &klasörde parçala: -Bayt/&cilt olarak parçala: -Parçalanıyor... -Silmeyi onaylayın -Dosyayı {0} parçaya ayırmak istediğinizden emin misiniz? -Parça büyüklüğü, orjinal dosya boyutundan küçük olmalıdır -Yanlış cilt boyutu -Belirtilen cilt boyutu: {0} bayt.\nBu boyutta ciltlere ayırmak istediğinize emin misiniz? -7400 -Birleştir -Şu &klasörde birleştir: -Birleştiriliyor... -Sadece ilk parçayı seçiniz -Parçalanan dosya tespit edilemedi -Parçalanmış dosyanın bir parçadan fazlası bulunamadı -7500 -Checksum değeri hesaplanıyor... -Checksum bilgisi -Verinin CRC değeri: -Verinin CRC değeri ve isimler: -7600 -Bilgisayar performansı -Bellek kullanımı: -Sıkıştırılıyor -Çözülüyor -Puan -Toplam Puan -Mevcut -Sonuç -İşlemci kullanımı -Puan / Kullanım -Başarılı: diff --git a/Utils/7-Zip/Lang/tt.txt b/Utils/7-Zip/Lang/tt.txt deleted file mode 100644 index 878f6cec0..000000000 --- a/Utils/7-Zip/Lang/tt.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 9.16 : Amychok : (Ne laŭdiĝu ke vi scias multajn lingvojn hontu ke vi ne scias patran lingvon) -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Tatar -Татарча -401 -Ярый -Юкка чыгару - - - -&Әйе -Юк& -&Ябырга -Ярдәм - -&Бару -440 -&Барысынга әйе -Барысынга юк -Стоп -Яңадан -&Җирлектә -&Алга -&Тыныш -Тынышта -Сезгә чынлап киләме операцияне өзәргә? -500 -&Файл -&Төзәтү -&Кыяфәт -&Сайланма -&Кораллар -&Белешмә -540 -&Ачырга -&Ачырга эчендә -&Ачырга тышында -&Карау -&Редакцияләү -Исе&м үзгәрү -&Кабатларга монда... -&Күчәрергә монда... -&Бетерергә -&Ватырга файлны... -Берләштерергә &файлларны... -&Үзлекләр -&Аңлатма -Тикшерү җыелма -Diff -&Ясарга папканы... -&Ясарга файлны... -&Чыгу -600 -&Сайларга бөтенесене -Сайлануны алырга -&Сайлануны әйләндерергә -Сайларга -Сайлануны алырга -Сайларга төр буенча -Алырга сайлануны төр буенча -700 -&Зур галәмәтләр -&Вак галәмәтләр -&Исемлек -&Җәдвәл -730 -Сортлаусыз -Яссы тарыз -&2 тәрәзә -&Кораллар тактасы -Ачырга тамыр папканы -Бер дәрәҗәгә өскәрәк -Элеккеге папкалар... -&Яңартырга -750 -Архивчының кнопкалар тактасы -Кнопкаларның стандарт тактасы -Зур кнопкалар -Язмалар кнопкаларда -800 -&Өстәрге папканы сайланмага, көбәк: -Китап битбилге -900 -&Көйләр... -&Җитештерүчәнлекне cыналу -960 -&Эчтәлек... -7-Zip &турында... -1003 -Юл -Исем -Киңәеш -Папка -Зурлык -Кысык -Үзенчәлекләр -Ясалган -Ачылган -Үзгәртелгән -Бөтен -Аңлатма -Шифрланган -Ватылган моңа кадәр -Аннан соң ватылган -Сүзлек -CRC -Төр -Каршы -Ысул -Система -Файл система -Кулланучы -төркем -Блок -Тәфсир -Торыш -Юл -Папка -Файл -Сүрүм -Том -Күп томлы -Күченү -Сылтамалар -Блок -Том - -64-бит -Big-endian -Барыштыручы -Физик Зурлыгы -Сәрләүхәрнең зурлыгы -тикшерү җыелма -Сыйфатламалар -Санал Адресы -ID -Кыска Исеме -Ясаучы -Бүлемтекнең Зурлыгы -Тарыз -Сылтама -Ялгыш -Сыемлык -Буш -Күмәк зурлыгы -Тамга -Урындагы исеме -Җибәрүче -2100 -Көйләр -Тел -Тел: -Мөхәрир -&Мөхәрир: -&Diff: -2200 -Система -7-Zip бәйләргә: -2301 -Тыгарга 7-Zip'ны ярының контекст менюга -Каскадлы контекст меню -Баглам меню гонсырлар: -2320 -<Папка> -<Архив> -Архив ачу -Чишү -Архивка өстәрге -Сынарга -Чишенергә монда -Чишенергә: {0}' папкага -Өстәрге: {0}ка -Кысып җибәрергә e-mail аша... -Кысып {0}ка, җибәрергә e-mail аша -2400 -Папкалар -&Эш папка -&Системаның вакытлы папкасы -&Агымдагы -&Күрсәтергә: -Файдаланырга алмаш таратучылар өчен генә -Сайлагыз урыны вакытлы архивларга -2500 -Көйләр -Күрсәтергә гонсырны".." -Күрсәтергә чынбарлык файлларның сынчыкларны -Күрсәтергә систем меню -Күрсәткечне бөтен юлга -Күрсәтергә бүлгечләрне -Ачырга чиртү белән -Альтернатив билге тарызы -Файдаланырга иснең зур битләр белән -2900 -7-Zip программа турында -Программа 7-Zip тараттылыра бушлай -3000 -Буш исе җитми -Ялгышлар юк -{0} объект сайлаган -Архив ясап булмады: {0} -Бу архив өчен үзгәртү операцияләр эшләмилер. -Файл ачып булмады '{0}' архив кебек -Шифрлы архив ацып булмады '{0}'. Пароль туры килмәде? -Программа бу архив төрә белән эшләми -Файл {0} бар инде -Файл '{0}' үзгәргән иде.\nСезгә килә яңартырга аны архивта? -Файл яңартып булмады\n'{0}' -Мөхәрирне җибәреп булмады. -Файл вируска охшаган (файл исемендә озын аралар эзлеклелеге бар). -Операция башкарылганга булдыралмы папкадан озын юл бөлән. -Сез бер файл сайларга тиеш -Сез бер я берничә файл сайларга тиеш -Гонсырлар артык күп -3300 -Чишү -Кысу бара -Сынау -Ачу... -Тарау... -3400 -Чыгарырга -Чишенергә монда: -Күрсәтегәз чыгара торган файлларга урынны. -3410 -Юллар -&Тулы юллар -Юлларсыз -3420 -Алмаш -Раслау белән -Раслаусыз -Үткәрергә -Исем үзгәрү автом. -Исем. үзгәр. автом. -3500 -Файл алмаштыруга раслау -Эшкертү торган файл папкада бар инде. -Алмаштырырга бар файлны -бу файл белән? -{0} байт -Исем үзгәрү автом. -3700 -Бу кысу ысулы файл өчен кулланылмы '{0}'. -Ялгыш мәгълүмәтләрдә '{0}'. Файл бозылган. -Ялгыш CRC'да '{0}'. Файл бозылган. -Ялгыш шифрлы файл мәгълүмәтләрдә '{0}'. Пароль дөресме? -Ялгыш шифрлы файл CRC'да '{0}'. Пароль дөресме? -3800 -Пароль язу -&Языгыз пароль: -&Кабатлагыз парольны: -&Күрсәтергә пароль -Парольлар тиңсез -Парольга языгыз латин әлифбасын галәмәтләрне гына, саннар һәм махсус галәмәтләрне (!, #, $, ...) -Пароль бик озын -Пароль -3900 -Узган: -Калган: -Барлыгы: -Тизлек: -Зурлыгы: -Кысу катылыгы: -Ялгыш: -Архив: -4000 -Архивка өстәрге -&Архив: -&Үзгәртү тарызы: -Архив форматы: -&Кысу дәрәҗәсе: -&Кысу ысулы: -&Лөгать зурлыгы: -&Cүз зурлыгы: -Блок зурлыгы: -Агымнарның исәбе: -&Параметрлар: -Опцияләр -Ясарга SF&X-архив -Кысарга яздыруга ачкан файлларны -Шифрлау -Шифрлау ысулы: -&Шифрларга файллар исемнәрне -Иснең күләме урау өчен: -Иснең күләме Чишү өчен: -4050 -Кысмаска -Бик тиз -Тиз -Гадәти -Иң зур -Ультра -4060 -Өстәрге һәм алмаштырырга -Яңартырга һәм өстәрге -Яңартырга -Синхронлаштыру -4070 -Актарырга -Бөтен файллар -Файл зурлыгына сайларга -Өзлексез -6000 -Кабатларга -Күчәрергә -Кабатларга монда: -Күчәрергә монда: -Кабатлану... -Күчү... -Исем үзгәрү... -Күрсәтегәз папканы. -Бу папка өчен операция кулланылмы. -Ялгыш файлның\папканың исем үзгәрү чакта -Файлларны кабатларга раслау -Сезгә чын киләме кабатларга бу файлларны архивка -6100 -Файл бетерүгә раслау -Папка бетерүгә раслау -Файллар төркемне бетерүгә раслау -Сезгә чын киләме бетерергә "{0}"? -Сезгә чын киләме бетерергә папканы "{0}" һәм өчендәге файлларны? -Сезгә чын киләме бетерергә бу объектларны ({0} данә)? -Бетерү... -Ялгыш файлны/папканы бетерүдә -Файллар бетерүне озын юллар белән кәрзингә система кулланылмы -6300 -Ясарга папканы -Ясарга файл -Папка исеме: -Файл исеме: -Яңа папка -Яңа файл -Ялгыш папка ясаганда -Ялгыш файл ясаганда -6400 -Аңлатма -&Аңлатма: -Сайларга -Алырга сайлануны -Үрнәк: -6600 -Үзлекләр -Элеккеге папкалар -Игъланнар -Игълан -7100 -Санак -Челтәр -Кәгазләр -Система -7200 -Өстәрге -Чыгарырга -Сынарга -Кабатларга -Күчәрергә -Бетерергә -Хәбәр -7300 -Өзергә файлны -&Өзергә монда: -&Ватырга томларга, шундый зурлыгы бөлән, байт: -Өзелү... -Өзелүгә раслау -Сезгә чын киләме өзергә файл {0} бүләккә? -Том зурлыгы чыгыш файлдан азрак булырга тиеш -Ялгыш томлар зурлыкны күрсәтү кырда -Тәгаенле том зурлыгы: {0} байт.\nСезгә чын киләме архив өзергә шундый томларга? -7400 -Берләштерергә файлларны -&Берләштерергә монда: -Берләштерү... -Кирәк сайларга өзелгән файлның беренче бүләкне гына -Өзелгән файлны белеп булмады -Өзелгән файлның табылган бер бүләк гәне -7500 -Хисаплау тикшерү җыелманы... -Тикшерү җыелма -CRC'ның тикшерү җыелмасы мәгълүматлар өчән: -CRC'ның тикшерү җыелмасы мәгълүматлар һәм исемнәр өчән: -7600 -Җитештерүчәнлекне cыналу -Иснең күләме: -Урау -Чишү -Шөһрәтлелек -Гомуми шөһрәтлелек -Агымдагы -Нәтиҗәле -Куллану -Шөһрәтлелек / Куллану. -Узу: diff --git a/Utils/7-Zip/Lang/ug.txt b/Utils/7-Zip/Lang/ug.txt deleted file mode 100644 index 6257c0708..000000000 --- a/Utils/7-Zip/Lang/ug.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.59 : Sahran -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Uyghur -ئۇيغۇرچە -401 -جەزملە -ۋاز كەچ - - - -(&Y)ھەئە -ياق(&N) -ياپ(&C) -ياردەم - -داۋاملاشتۇر(&C) -440 -ھەممىسى ھەئە(&A) -ھەممىسى ياق(&L) -توختا -قايتا باشلا -ئارقا سۇپا(&B) -ئالدى سۇپا(&F) -ۋاقىتلىق توختا(&P) -ۋاقىتلىق توختىتىلدى -راستىنلا ۋاز كېچەمسىز؟ -500 -ھۆججەت(&F) -تەھرىر(&E) -كۆرۈنۈش(&V) -يىغقۇچ(&A) -قورال(&T) -ياردەم(&H) -540 -ئاچ(&O) -نۆۋەتتىكى كۆزنەكتە ئاچ(&I) -يېڭى كۆزنەكتە ئاچ(&U) -كۆرۈنۈش(&V) -تەھرىر(&E) -ئات ئۆزگەرت(&M) -كۆچۈرۈش ئورنى(&C)… -يۆتكەش ئورنى(&M)… -ئۆچۈر(&D) -ھۆججەت پارچىلا(&S)… -ھۆججەت بىرلەشتۈر(&B)… -خاسلىق(&R) -ئىزاھات(&N) -ھۆججەت دەلىللە - -يېڭى قىسقۇچ -يېڭى ھۆججەت -چېكىن(&X) -600 -ھەممىنى تاللا(&A) -ھەممىنى تاللىما -ئەكسىچە تاللا(&I) -تاللا… -ئەكسىچە تاللا… -ئوخشاش تۈردىكى ھۆججەتنى تاللا -ئوخشاش تۈردىكى ھۆججەتنى ئەكسىچە تاللا -700 -چوڭ سىنبەلگە(&G) -كىچىك سىنبەلگە(&M) -تىزىملىك(&L) -تەپسىلىي(&D) -730 -تەرتىپلەنمىگەن -تەكشىلىك كۆرۈنۈش -&2 يۈز -قورال ستونى(&T) -غول قىسقۇچنى ئاچ -يۇقىرىغا -قىسقۇچ تارىخى… -يېڭىلا(&R) -750 -پرىس قورال ستونى -ئۆلچەملىك قورال ستونى -چوڭ كۇنۇپكا -كۇنۇپكا خېتىنى كۆرسەت -800 -يىغقۇچقا قوش(&A) -خەتكۈچ -900 -تاللانما(&O)… -ئۆلچەملىك سىناش(&B) -960 -مۇندەرىجە(&C)… -7-Zip (&A)ھەققىدە -1003 -يول -ئاتى -كېڭەيتىلگەن ئاتى -قىسقۇچ -چوڭلۇقى -بوغچا چوڭلۇقى -خاسلىق -قۇرغان ۋاقىت -زىيارەت ۋاقتى -ئۆزگەرتكەن ۋاقىت -پۇختا -ئىزاھات -شىفىرلانغان -ئاۋال پارچىلا -كېيىن پارچىلا -لۇغەت -CRC -تىپى -قارشى -ئۇسۇل -ئاساسىي مەشغۇلات سىستېمىسى -ھۆججەت سىستېمىسى -ئىشلەتكۈچى -گۇرۇپپا -بۆلەك -ئىزاھات -ئورۇن -يول ئالدى قوشۇلغۇچى -قىسقۇچ -ھۆججەت -نەشرى -ئەن -كۆپ ئەن -ئورۇن ھالقىش -ئۇلانما -بۆلەك -ئەنلەش - -64-bit -Big-endian -CPU -فىزىكىلىق چوڭلۇقى -ھۆججەت باشى چوڭلۇقى -يىغىندا تەكشۈر -ئالاھىدىلىك -مەۋھۇم ئادرېس - - - - - - -خاتالىق -ئومۇمى سىغىمى -ئىشلىتىلىشچان بوشلۇق -توپلاشتۇرغۇچ چوڭلۇقى -ئەن -يەرلىك ئاتى -تەمىنلىگۈچى -2100 -تاللانما -تىل -تىل: -تەھرىرلىگۈچ -تەھرىرلىگۈچ(&E): - -2200 -سىستېما -7-Zip بىلەن باغلانغان ھۆججەت تىپى: -2301 -7-Zip نى ئوڭ كۇنۇپكا تىزىملىكىگە قوش -ئوڭ تىزىملىكنى دەستىلە -ئوڭ تىزىملىكتە كۆرۈنىدىغان تۈرنى تاللاش -2320 -<قىسقۇچ> -<پرىس> -پرىس ئاچ -ھۆججەت يەش… -پرىسقا قوش -پرىس سىنا -مۇشۇ يەرگە يەش -{0} غا يەش‪‬ -{0}‬ غا قوش ‪ -پرىس ۋە ئېلخەت… -‬ غا پرىسلاپ ئېلخەتتە يوللا -2400 -قىسقۇچ -خىزمەت مۇندەرىجىسى(&W) -(&S)سىستېما ۋاقىتلىق قىسقۇچ -(&C)نۆۋەتتىكى -(&S)بەلگىلەنگەن قىسقۇچ: -يان دىسكىغىلا ئىشلىتىلىدۇ -پرىس ھۆججىتىنى يېشىدىغان ۋاقىتلىق ئورۇندىن بىرنى بەلگىلەڭ. -2500 -تەڭشەك -كۆرسەت“..”تۈر -ھەقىقىي ھۆججەت سىنبەلگىسى كۆرسەت -سىستېما تىزىملىكىنى كۆرسەت -پۈتۈن قۇر تاللا(&F) -سېتكا كۆرسەت(&G) - -شەيئى تاللاش مودىلى(&A) -چوڭ ئەسلەك بېتى ئىشلەت(&L) -2900 -‎7-Zip‏ ھەققىدە -‏7-Zip ‏ھەقسىز دېتال. ئەمما تىزىملىتىش ئارقىلىق ئۇنى ئېچىشنى قوللىسىڭىز بولىدۇ. -3000 -سىستېما لازىملىق ئەسلەكنى تەقسىملىيەلمەيدۇ -خاتالىق يوق -{0} تۈر تاللاندى -“{0}” قىسقۇچ قۇرالمايدۇ -بۇ پرىس يېڭىلاش مەشغۇلاتىنى قوللىمايدۇ -'{0}' ھۆججەتنى پرىس سۈپىتىدە ئاچالمايدۇ -'{0}' شىفىرلانغان پرىسنى ئاچالمايدۇ. ئىم خاتا -قوللىمايدىغان پرىس تېپى -{0} ھۆججەت مەۋجۇد -“{0}”ئۆزگەرتىلدى\nپرىس ھۆججىتىدە يېڭىلامسىز؟ -“{0}”ھۆججەتنى يېڭىلىيالمىدى\n -تەھرىرلىگۈچنى قوزغىتالمىدى -بۇ ھۆججەت ۋىرۇستەك تۇرىدۇ (ھۆججەت ئاتىدا كۆپ بوشلۇق بار) -يولى ئۇزۇن قىسقۇچقا بۇ مەشغۇلاتنى ئېلىپ بارالمايدۇ. -چوقۇم ھۆججەتتىن بىرنى تاللاڭ -چوقۇم بىر ياكى بىر قانچە ھۆججەت تاللاڭ -تۈر بەك كۆپ -3300 -يېشىۋاتىدۇ -پرىسلاۋاتىدۇ -سىناۋاتىدۇ -ئېچىۋاتىدۇ… -ئىزدەۋاتىدۇ… -3400 -يەش -يېشىش ئورنى(&X): -ھۆججەت يېشىدىغان جايدىن بىرنى كۆرسىتىڭ -3410 -يول مودېلى -تولۇق يول ئاتى -يول ئاتى يوق -3420 -قاپلاش مودېلى -قاپلاشتىن بۇرۇن سورا -ئەسكەرتمەي قاپلا -مەۋجۇد ھۆججەتتىن ئاتلا -ئۆزلۈكىدىن ئاتىنى ئۆزگەرت -مەۋجۇد ھۆججەت ئاتىنى ئۆزگەرت -3500 -ھۆججەت ئالماشتۇرۇشنى جەزملە -بۇ قىسقۇچ ئوخشاش ئاتلىق ھۆججەتتىن بىرنى ئۆز ئىچىگە ئالغان -بۇنىڭغا مەۋجۇد ھۆججەتنى -ئالماشتۇرامسىز؟ -{0} بايت -ئۆزلۈكىدىن ئات ئۆزگەرت(&U) -3700 -{0} قوللىمايدىغان پرىسلاش مودېلى -“{0}” سانلىق مەلۇمات خاتا. ھۆججەت بۇزۇلغان -“{0}” ئورۇندىكى CRC تەكشۈرۈش مەغلۇپ بولدى، ھۆججەت بۇزۇلغان -»{0}« شىفىرلانغان ھۆججەت سانلىق مەلۇماتىدا خاتالىق بار، ئىم خاتا. -“{0}” شىفىرلانغان ھۆججەت CRC سانلىق مەلۇمات دەلىللەشتە خاتالىق بار، ئىم خاتا. -3800 -ئىم كىرگۈزۈڭ -ئىم كىرگۈزۈڭ: -ئىمنى قايتا كىرگۈزۈڭ -ئىم كۆرسەت(&S) -ئىم ماس كەلمىدى -(!、#、$...)ئىمغا ئىنگلىزچە ھەرپ، سان ۋە ئالاھىدە ھەرپ-بەلگىلەرلا ئىشلىتىلىدۇ -ئىم بەك ئۇزۇن -ئىم -3900 -كەتكەن ۋاقىت: -قالغان ۋاقىت: -ئومۇمىي چوڭلۇقى: -سۈرئىتى: -بىر تەرەپ قىلىندى: -پرىس نىسبىتى: -خاتالىق: -پرىس: -4000 -پرىسقا قوش -پرىس(&A): -يېڭىلاش مودېلى(&U): -پرىسلاش شەكلى(&F): -پرىسلاش دەرىجىسى(&L): -پرىسلاش مودېلى(&M): -لۇغەت چوڭلۇقى(&D): -سۆز چوڭلۇقى(&W): -مۇقىم سانلىق مەلۇمات چوڭلۇقى: -CPU ئېقىم سانى : -پارامېتىر(&P): -تاللانما -ئۆزى يېشىلىدىغان پرىس ياسا(&X) -ھەمبەھىر ھۆججەت پرىسلا -شىفىرلاش -شىفىرلاش ئۇسۇلى: -شىفىرلىق ھۆججەت ئاتى(&N) -پرىسلاشقا كېرەكلىك ئەسلەك: -يېشىشكە كېرەكلىك ئەسلەك: -4050 -ساقلا -ئەڭ تېز -تېز -نورمال -ئەڭ چوڭ -ئەڭ زور چەكتە -4060 -ھۆججەت قوش ۋە ئالماشتۇر -ھۆججەت يېڭىلا ۋە قوش -مەۋجۇد ھۆججەتنى يېڭىلا -ھۆججەت قەدەمداشلا -4070 -كۆز يۈگۈرت -ھەممە ھۆججەت -مۇقىمسىز -مۇقىم -6000 -كۆچۈر -يۆتكە -كۆچۈرۈش ئورنى: -يۆتكەش ئورنى: -كۆچۈرۈۋاتىدۇ… -يۆتكەۋاتىدۇ… -ئاتىنى ئۆزگەرتىۋاتىدۇ… -نىشان قىسقۇچ تاللاڭ -نۆۋەتتىكى مەشغۇلاتنى قوللىمايدۇ -ھۆججەت ياكى قىسقۇچ ئاتىنى ئۆزگەرتىش خاتالىقى -ھۆججەت كۆچۈرۈشنى جەزملە -ھۆججەتنى پرىسقا راستىنلا كۆچۈرەمسىز؟ -6100 -ھۆججەت ئۆچۈرۈشنى جەزملە -قىسقۇچ ئۆچۈرۈشنى جەزملە -كۆپ ھۆججەت ئۆچۈرۈشنى جەزملە -“{0}” راستىنلا ئۆچۈرەمسىز؟ -“{0}” قىسقۇچ ۋە مەزمۇننى راستىنلا ئۆچۈرەمسىز؟ -{0} تۈرنى راستىنلا ئۆچۈرەمسىز؟ -ئۆچۈرۈۋاتىدۇ… -قىسقۇچ ياكى ھۆججەت ئۆچۈرۈش خاتالىقى -سىستېما يولى ئۇزۇن بولغان ھۆججەتنى ئەخلەتخاناغا يۆتكىيەلمەيدۇ -6300 -قىسقۇچ قۇر -ھۆججەت قۇر -قىسقۇچ ئاتى -ھۆججەت ئاتى -يېڭى قىسقۇچ -يېڭى ھۆججەت -قىسقۇچ قۇرۇش خاتالىقى -ھۆججەت قۇرۇش خاتالىقى -6400 -ئىزاھات -ئىزاھات(&C) -تاللاش -ئەكسىچە تاللا -ماسكا: -6600 -خاسلىق -قىسقۇچ تارىخى -دىئاگنوز ئۇچۇرى -ئۇچۇر -7100 -كومپيۇتېر -تور قوشنا -پۈتۈكلەر -سىستېما -7200 -قوش -يەش -سىنا -كۆچۈر -يۆتكە -ئۆچۈر -ئۇچۇر -7300 -ھۆججەت پارچىلا -پارچىلاش سانى(&S): -پارچە چوڭلۇقى، بايت(&V): -پارچىلاۋاتىدۇ… -پارچىلاشنى جەزملە -ھۆججەتنى {0} پارچىغا بۆلەمسىز؟ -پارچە چوڭلۇقى چوقۇم ئەسلى ھۆججەتتىن كىچىك بولۇشى لازىم -پارچە چوڭلۇقى خاتا -بايت{0} بەلگىلەنگەن پارچە چوڭلۇقى\nنۆۋەتتىكى ھۆججەتنى پارچىلامسىز؟ -7400 -ھۆججەت بىرلەشتۈر -بىرلەشتۈرۈش(&C): -بىرلەشتۈرۈۋاتىدۇ… -بىرىنچى ھۆججەتنىلا تاللا -بۆلەكلەنگەن ھۆججەت پارچىسى ئىكەنلىكىنى بايقىيالمىدى -باشقا ھۆججەت پارچىسىنى بايقىيالمىدى -7500 -تەكشۈرۈۋاتىدۇ… -تەكشۈرۈش ئۇچۇرى -CRC سانلىق مەلۇمات تەكشۈرۈش: -CRC سانلىق مەلۇمات ۋە ھۆججەت ئاتى تەكشۈرۈش: -7600 -ئاساسىي تەكشۈرۈش -ئىشلىتىلگەن ئەسلەك: -پرىسلاۋاتىدۇ -يېشىۋاتىدۇ -سۈرئىتى -ئوتتۇرىچە سۈرئىتى -نۆۋەتتە -نەتىجە -CPU ئىشلىتىلىشى -ئىشلىتىش سۈرئىتى -يوللاش: diff --git a/Utils/7-Zip/Lang/uk.txt b/Utils/7-Zip/Lang/uk.txt deleted file mode 100644 index 885f30389..000000000 --- a/Utils/7-Zip/Lang/uk.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; : Andrij Ilechko -; : Mokiy Mazaylo -; : Sergiy Gontaruk -; : Misha Padalka -; 15.02 : 2015-05-19 : Yurii Petrashko -; -; -; -; -; -; -0 -7-Zip -Ukrainian -Українська -401 -OK -Скасувати - - - -&Так -&Ні -&Закрити -Довідка - -&Продовжити -440 -Так для &всіх -Ні для вс&іх -Зупинити -Перезапустити -&На задньому плані -&На передньому плані -&Пауза -Призупинено -Ви впевнені, що бажаєте скасувати операцію? -500 -&Файл -&Редагування -&Вигляд -&Уподобання -&Інструменти -&Допомога -540 -&Відкрити -Відкрити в&середині -Відкрити &зовні -&Переглянути -&Редагувати -Пере&йменувати -&Копіювати до... -Пере&містити до... -Ви&далити -Роз&бити файл... -Об'&єднати файли... -В&ластивості -Комент&ар -Обчислити контрольну суму -Порівнювач -Створити папку -Створити файл -Ви&хід -Посилання -Ал&ьтернативні потоки -600 -Ви&брати все -Зняти вибір -&Інвертувати вибір -Вибрати... -Зняти вибір... -Вибрати за типом -Зняти вибір за типом -700 -Вели&кі піктограми -&Дрібні піктограми -&Список -&Таблиця -730 -Без сортування -Плоский вигляд -&2 панелі -&Панелі інструментів -Відкрити кореневу папку -Вище на один рівень -Історія папок... -&Оновити -Автооновлення -750 -Панель архіву -Стандартна панель -Великі кнопки -Текст на кнопках -800 -&Додати папку до вподобань як -Закладка -900 -&Налаштування... -&Тестування продуктивності -960 -&Зміст... -&Про 7-Zip... -1003 -Шлях -Ім'я -Розширення -Папка -Розмір -Розмір в архіві -Атрибути -Створено -Відкрито -Змінено -Неперервний -З коментарем -Зашифровано -Розбито до -Розбито після -Словник - -Тип -Анти -Метод -Походження -Файлова система -Користувач -Група -Блок -Коментар -Позиція -Префікс шляху -Папок -Файлів -Версія -Том -Багатотомний -Зсув -Посилань -Блоків -Частин - - - -Процесор -Фізичний розмір -Розмір заголовків -Контрольна сума -Властивості -Віртуальна адреса - -Коротке ім'я -Створено програмою -Розмір сектора -Режим -Посилання -Помилка -Загальний обсяг -Вільний простір -Розмір кластеру -Мітка -Локальне ім'я -Провайдер -Безбека NT -Альтернативний потік - -Видалено -Дерево - - -Тип помилки -Помилки -Помилки -Попередження -Попередження -Потоки -Альтернативні потоки -Розмір альтернативних потоків -Віртуальний розмір -Розпакований розмір -Загальний фізичний розмір -Індекс тому -Підтип -Короткий коментар -Кодова сторінка - - - -Розмір залишку -Розмір вбудованої заглушки -Посилання -Жорстке посилання -iNode - -Лише для читання -2100 -Опції -Мова -Мова: -Редагування -&Редактор: -&Порівнювач: -2200 -Система -Асоціювати 7-Zip з: -Усі користувачі -2301 -Інтегрувати 7-Zip до контекстного меню оболонки -Каскадне контекстне меню -Пункти контекстного меню: -Піктограми в контекстному меню -2320 -<Папка> -<Архів> -Відкрити архів -Видобути файли... -Додати до архіву... -Тестувати архів -Видобути до поточної папки -Видобути до {0} -Додати до {0} -Стиснути та надіслати... -Стиснути до {0} та надіслати -2400 -Папки -&Робоча папка -&Системна тимчасова папка -&Поточна -&Задати: -Використовувати тільки для змінних носіїв -Вкажіть розташування тимчасових архівних файлів. -2500 -Налаштування -Відображати елемент ".." -Відображати справжні піктограми файлів -Відображати системне меню -Вибір &цілого рядка -Відображати лінії &сітки -Відкривати об'єкти одним кліком -&Альтернативний режим виділення -Використовувати &великі сторінки пам'яті -2900 -Про 7-Zip -7-Zip є вільним програмним забезпеченням -3000 -Система не може виділити необхідний обсяг пам'яті -Без помилок -Обрано об'єктів: {0} -Не вдається створити папку '{0}' -Операція оновлення не підтримується для даного архіву. -Не вдається відкрити файл '{0}' як архів -Не вдається відкрити зашифрований архів '{0}'. Хибний пароль? -Непідтримуватий тип архіву -Файл {0} вже існує -Файл '{0}' було змінено.\nБажаєте оновити його в архіві? -Неможливо оновити файл\n'{0}' -Не вдається запустити редактор. -Файл виглядає як вірус (ім'я файлу містить довгу послідовність пробілів). -Операцію не можна викликати з папки, яка має довгий шлях. -Ви повинні вибрати один файл -Ви повинні вибрати один або декілька файлів -Забагато елементів -Не вдалося відкрити файл як {0} архів -Файл відкрито як {0} архів -Архів відкрито зі зсувом -3300 -Видобування -Стиснення -Тестування -Відкриття... -Сканування... -Видалення -3320 -Додавання -Оновлення -Аналіз -Реплікація -Перепакування -Пропуск -Видалення -Створення заголовків -3400 -Видобути -В&идобути до: -Вкажіть розташування для видобутих файлів. -3410 -Обробка шляхів -Повні шляхи -Без шляхів -Абсолютні шляхи -Відносні шляхи -3420 -Режим перезапису -Запитувати перед перезаписом -Перезаписувати без запиту -Пропускати існуючі файли -Автоматично перейменовувати -Автоматично перейменовувати існуючі файли -3430 -Усувати дублювання кореневої папки -Відновляти дані безпеки файлу -3500 -Підтвердіть заміну файлу -Папка призначення вже містить оброблюваний файл. -Бажаєте замінити існуючий файл -на такий? -{0} байт -&Автоматично перейменовувати -3700 -Непідтривуваний метод стиснення для '{0}'. -Помилка даних у '{0}'. Файл пошкоджено. -Помилка CRC у '{0}'. Файл пошкоджено. -Помилка даних у зашифрованому файлі '{0}'. Хибний пароль? -Помилка CRC у зашифрованому файлі '{0}'. Хибний пароль? -3710 -Хибний пароль? -3721 -Непідтримуваний метод стиснення -Помилка даних -Помилка CRC -Недоступні дані -Неочікуваний кінець даних -Існують деякі дані після закінчення корисних даних -Не є архівом -Помилка заголовків -Неправильний пароль -3763 -Недоступний початок архіву -Непідтверджений початок архіву - - - -Непідтримувана функція -3800 -Уведіть пароль -Уведіть пароль: -Повторіть пароль: -&Відображати пароль -Паролі не співпадають -Для паролю використовуйте лише англійські літери, цифри та спеціальні символи (!, #, $, ...) -Пароль занадто довгий -Пароль -3900 -Минуло часу: -Залишилося: -Загалом: -Швидкість: -Оброблено: -Ступінь стиснення: -Помилок: -Архівів: -4000 -Додати до архіву -&Архів: -&Режим оновлення: -&Формат архіву: -С&тупінь стиснення: -&Метод стискання: -&Розмір словника: -Р&озмір слова: -Розмір блоку: -Кількість потоків: -&Параметри: -Налаштування -&Створити SFX архів -Стискати спільні файли -Шифрування -Метод шифрування: -Шифрувати &імена файлів -Необхідно пам'яті для стискання: -Необхідно пам'яті для видобування: -Видалити файли після стиснення -4040 -Зберігати символічні посилання -Зберігати жорсткі посилання -Зберігати альтернативні потоки даних -Зберігати дані безпеки файлу -4050 -Без стиснення -Найшвидше -Швидке -Нормальне -Максимальне -Ультра -4060 -Додати та замінити файли -Оновити та замінити файли -Оновити існуючі файли -Синхронізувати файли -4070 -Переглянути -Усі файли -За розміром файлу -Неперервний -6000 -Копіювати -Перемістити -Копіювати до: -Перемістити до: -Копіювання... -Переміщення... -Перейменування... -Виберіть папку призначення. -Операція не підтримується для цієї папки. -Помилка перейменування файлу або папки -Підтвердіть копіювання файлу -Ви впевнені, що хочете скопіювати файли до архіву -6100 -Підтвердіть видалення файлу -Підтвердіть видалення папки -Підтвердіть видалення декількох файлів -Ви впевнені, що хочете видалити '{0}'? -Ви впевнені, що хочете видалити папку '{0}' і весь її вміст? -Ви впевнені, що хочете видалити ці елементи ({0} шт.)? -Видалення... -Помилка при видаленні файлу або папки -Системі не вдалося перемістити файл із довгим шляхом до Кошика -6300 -Створити папку -Створити файл -Ім'я папки: -Ім'я файлу: -Нова папка -Новий файл -Помилка при створенні папки -Помилка при створенні файлу -6400 -Коментар -&Коментар: -Вибрати -Зняти вибір -Маска: -6600 -Властивості -Історія папок -Діагностичні повідомлення -Повідомлення -7100 -Комп'ютер -Мережа -Документи -Система -7200 -Додати -Видобути -Тестувати -Копіювати -Перемістити -Видалити -Інформація -7300 -Розбити файл -&Розбити до: -Розбити на &томи розміром, байт: -Розбиття... -Підтвердіть розбиття -Ви впевнені, що бажаєте розбити архів на {0} томів? -Розмір тому має бути меншим за розмір вихідного файлу -Неправильний розмір тому -Задано розмір тому: {0} байт.\nВи впевнені, що бажаєте розбити архів на такі томи? -7400 -Об'єднати файли -&Об'єднати до: -Об'єднання... -Виберіть тільки першу частину розбитого файлу -Не вдалося визначити файл, як частину розбитого файлу -Не вдалося знайти більше однієї частини розбитого файлу -7500 -Обчислення контрольної суми... -Інформація про контрольну суму -Контрольна сума CRC для даних: -Контрольна сума CRC для даних та імен: -7600 -Тестування продуктивності -Використано пам'яті: -Стискання -Видобування -Рейтинг -Загальний рейтинг -Поточні значення -Підсумкові значення -Завант. ЦП -Рейтинг/Завант. -Проходів: -7700 -Посилання -Пов'язати -Джерело: -Мета: -7710 -Тип посилання -Жорстке посилання -Символічне посилання (файл) -Символічне посилання (каталог) -Точка з'єднання (каталог) diff --git a/Utils/7-Zip/Lang/uz.txt b/Utils/7-Zip/Lang/uz.txt deleted file mode 100644 index 71762c0ad..000000000 --- a/Utils/7-Zip/Lang/uz.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 9.07 : Sherzod Mamatkulov -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Uzbek -O'zbek -401 -OK -Bekor - - - -&Ha -&Yo'q -&Yopish -Yordam - -&Davom et -440 -H&ammasiga ha -Hammasiga y&o'q -To'xta -Qayta boshla -&Orqa fon -Ol&di fon -&Pauza -Pauza qilingan -Haqiqatdan ham bekor qilishni istaysizmi? -500 -&Fayl -&Tahrir -&Ko'rinish -&Xatcho'plar -&Asboblar -&Yordam -540 -&Ochish -&Ichkarida ochish -&Tashqarida ochish -&Ko'rish -Ta&hrirlash -&Qayta nomlash -&Nusxalash... -Ko'chi&rish... -O'chirish -&Faylni bo'laklash... -Fayllarni &birlashtirish... -&Xossalari -&Sharh... -Nazorat summasini hisoblash -Farq -Papka yaratish -Fayl yaratish -&Chiqish -600 -H&ammasini tanla -Hammasini tashla -&Tanlanishni teskarila -Tanlash... -Tashlash... -Turi bo'yicha tanla -Turi bo'yicha tashla -700 -&Yirik ikonlar -&Mitti ikonlar -&Ro'yxat -&Tafsilotlar -730 -Saralanmagan -Tekis ko'rinish -&2 ta panel -&Uskunalar majmuasi -Ildiz papkasini och -Bir bosqich yuqoriga -Papkalar tarixi... -&Qayta och -750 -Arxiv toolbari -Standart toolbar -Yirik tugmalar -Tugmalar matnini ko'rsat -800 -&Papkani ushbu xatcho'pga qo'sh -Xatcho'p -900 -Tanl&ovlar... -&Baholash -960 -Yordam &tarkibi... -&7-Zip haqida... -1003 -Yo'lak -Nomi -Kengaytma -Papka -Hajmi -Siqilgan hajmi -Atributlari -Yaratilgan -Ochilgan -O'zgartirilgan -Yaxlit -Sharhlangan -Tilsimlangan -Bundan oldin bo'laklangan -Bundan keyin bo'laklangan -Lug'at -CRC -Turi -Anti -Uslub -Mezbon OS -Fayl tizimi -Foydalanuvchi -Guruh -Block -Sharh -Joylashuv -Yo'lak prefiksi -Papkalar soni -Fayllar soni -Versiya -Tom -Ko'p-tomli -Offset -Ulanmalar -Bloklar soni -Tomlar soni - -64-bit -Big-endian -Protsessor -Fizik hajmi -Header hajmi -Nazorat summasi -Tavsifi -Virtual adresi -ID -Qisqa nomi -Yaratgan dastur -Sektor hajmi -Uslubi -Ulanma -Xato -Umumiy hajmi -Bo'sh joy -Klaster hajmi -Yorliq -Lokal nomi -Provayder -2100 -Tanlovlar -Til -Til: -Muharrir -&Muharrir: -&Farq: -2200 -Tizim -Ushbu arxivlarni 7-Zip bilan biriktir: -2301 -7-Zipni qobiq kontekst menyusiga qo'sh -Kontekst menyusi pog'onali bo'lsin -Kontekst menyu bandlari: -2320 - - -Arxivni och -Fayllarni ajrat... -Arxivga qo'sh... -Arxivni sina -Shu joyga ajrat -{0}ga ajrat -{0}ga qo'sh -Siq va emailda jo'nat... -{0}ga siq va emailda jo'nat -2400 -Papkalar -&Ish papkasi -Tizim &vaqtinchalik (temp) papkasi -&Joriy papka -&Tayinlangan: -Faqat olinadigan drayvlar uchun ishlat -Vaqtinchalik arxiv fayllari uchun manzilni tayinlang. -2500 -Sharoit -".." qismini ko'rsat -Fayllarning haqiqiy ikonlarini ko'rsat -Tizim menyusini ko'rsat -&To'liq yo'lakni tanlash -&Panjara chiziqlarini ko'rsat -&Faylni ochish uchun bitta klik yetarli -&Muqobil tanlash uslubini qo'lla -&Yirik xotira pageini ishlat -2900 -7-Zip haqida -7-Zip - bepul dasturiy ta'minot. -3000 -Tizim kerakli miqdordagi xotirani band qila olmadi -Hechqanday xatolik aniqlanmadi -{0} ta qism tanlangan -'{0}' papkasini yarata olmadim -Bu arxivga nisbatan yangilash amallari bajarilmaydi. -'{0}' faylini arxiv sifatida ocha olmadim -Tilsimlangan '{0}' arxivni ocha olmadim. Noto'g'ri parol kiritildimi? -Noma'lum arxiv turi -{0} fayli oldindan mavjud -'{0}' fayli o'zgartirildi.\nUni arxiv ichida yangilashni xohlaysizmi? -Ushbu faylni yangilay olmadim\n'{0}' -Muharrirni ocha olmadim. -Bu fayl virusga o'xshaydi (fayl nomida uzun bo'shliq bor). -Bu amalni uzun yo'lakli papkada chaqirib bo'lmaydi. -Bitta faylni tanlashingiz lozim -Bitta yoki undan ortiq faylni tanlashingiz lozim -Qismlar o'ta ko'p -3300 -Ajratilmoqda -Siquv ketmoqda -sinaldi -Ochilmoqda... -Tekshirilmoqda... -3400 -Ajratish -&Buyerga ajrat: -Ajratilgan fayllar uchun manzil tayinlang. -3410 -Yo'lak uslubi -To'liq yo'lak nomlari -Yo'lak nomi yo'q -3420 -Ustidan yozish uslubi -Yozib yuborishdan oldin so'ra -So'ramasdan yozib yubor -Oldindan mavjud fayllarni tashlab ket -Avtomatik tarzda qayta nomla -Mavjud fayllarni avto qayta nomla -3500 -Fayl ustidan yozishni tasdiqlash -Manziliy papkada ishlangan fayl oldindan mavjud. -Mavjud faylni -bunisi bilan almashtirasizmi? -{0} bayt -A&vtomatik tarzda qayta nomla -3700 -'{0}'dagi siquv metodi notanish. -'{0}'da data xatosi yuz berdi. Fayl zararlangan. -'{0}'da CRC amalga oshmadi. Fayl zararlangan. -Tilsimlangan '{0}' faylida data xatosi yuz berdi. Parol noto'g'ri shekilli -Tilsimlangan '{0}' faylida CRC amalga oshmadi. Parol noto'g'ri shekilli -3800 -Parolni kiritish -Parolni kiriting: -Parolni qayta kiriting: -&Parolni ko'rsat -Parollar bir xil emas -Parol uchun faqat lotincha harflar, raqam va maxsus belgilar (!, #, $, ...) ishlating -Parol haddan tashqari uzun -Parol -3900 -O'tgan vaqt: -Qolgan vaqt: -Jami hajmi: -Tezlik: -Ishlandi: -Siquv nisbati: -Xatolar: -Arxivlar: -4000 -Arxivga qo'shish -&Arxiv: -&Yangilash uslubi: -Arxiv &formati: -Siq&uv bosqichi: -&Siquv metodi: -&Lug'at hajmi: -So'z haj&mi: -Yaxlit blok hajmi: -CPU oqimlari soni: -&Parametrlar: -Tanlovlar -SF&X arxiv yarat -Baham ko'rilgan fayllarni ham siq -Tilsimlash -Tilsimlash metodi: -Fayl &nomlarini tilsimla -Siquvda ishlatiladigan xotira: -Ajratuvda ishlatiladigan xotira: -4050 -Saqlash -Eng tez -Tez -O'rtacha -Eng zo'r -Ultra -4060 -Fayllarni qo'sh va almashtir -Fayllarni yangila va qo'sh -Mavjud fayllarni yangila -Fayllarni sinxronla -4070 -Belgila -Barcha fayllar -No-yaxlit -Yaxlit -6000 -Nusxalash -Ko'chirish -Ushbu katalogga nusxala: -Ushbu katalogga ko'chir: -Nusxalanmoqda... -Ko'chirilmoqda... -Qayta nomlanmoqda... -Manziliy papkani tanlang. -Ushbu papkaga nisbatan bu amalni qo'llab bo'lmaydi -Fayl yoki papkani qayta nomlashda xato yuz berdi -Faylni nusxalashni tasdiqlang -Haqiqatdan ham fayllarni arxivga nusxalashni xohlaysizmi -6100 -Faylni o'chirishni tasdiqlang -Papkani o'chirishni tasdiqlang -Ko'plab fayllarni o'chirishni tasdiqlang -Haqiqatdan ham '{0}'ni o'chirib tashlamoqchimisiz? -Haqiqatdan ham '{0}' papkasini butun tarkibi bilan o'chirib tashlamoqchimisiz? -Haqiqatdan ham ushbu {0} ta qismni o'chirib tashlamoqchimisiz? -O'chirilmoqda... -Fayl yoki papkani o'chirishda xato yuz berdi -Tizim uzun yo'lakli faylni Recycle Bin (Korzina)ga ko'chira olmaydi -6300 -Papka yaratish -Fayl yaratish -Papka nomi: -Fayl nomi: -Yangi papka -Yangi fayl -Papka yaratishda xato yuz berdi -Fayl yaratishda xatolik yuz berdi -6400 -sharhi -&Sharh: -Tanlash -Tashlash -Maska: -6600 -Xossalari -Papkalar tarixi -Diagnostik xabarlar -Xabar -7100 -Kompyuter -Tarmoq -Hujjatlar -Tizim -7200 -Qo'sh -Ajrat -Sina -Nusxala -Ko'chir -O'chir -Ma'lumot -7300 -Faylni bo'laklash -&Ushbu katalogga bo'lakla: -&Tomlarga bo'lakla, bayt: -Bo'laklanmoqda... -Bo'laklash tasdig'i -Haqiqatdan ham faylni {0} ta tomga bo'lmoqchimisiz? -Tom hajmi original fayl hajmidan kichikroq bo'lishi lozim -Tom hajmi noto'g'ri -Berilgan tom hajmi: {0} bayt.\nHaqiqatdan ham arxivni shunaqa bo'laklarga bo'lmoqchimisiz? -7400 -Fayllarni birlashtirish -&Ushbu katalogga birlashtir: -Birlashtirilmoqda... -Bo'lak faylning faqat birinchi qismini tanla -Bu fayl bo'lak faylning qismi emas -Bo'lak faylning bittadan ortiq qismi topilmadi -7500 -Nazorat summasi hisoblanmoqda... -Nazorat summasi ma'lumoti -Data uchun CRC checksum: -Data va nomlar uchun CRC checksum: -7600 -Baholash -Xotira ishlatilishi: -Siqish -Ajratish -Reyting -Umumiy reyting -Joriy -Natijaviy -CPU bandligi -Reyting / Ishlatish -O'tganlar: diff --git a/Utils/7-Zip/Lang/va.txt b/Utils/7-Zip/Lang/va.txt deleted file mode 100644 index b7ecf4bd0..000000000 --- a/Utils/7-Zip/Lang/va.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 4:26 : Tomas Miralles -; 4.44 : Fernando Verdú -; -; -; -; -; -; -; -; -; -0 -7-Zip -Valencian -Valencià -401 -Acceptar -Cancel·lar - - - -&Si -&No -Tan&car -Ajuda - -&Continuar -440 -Si a &tot -No a t&ot -Parar -Reiniciar -Segon pla -Primer pla -&Pausa -Parat -Està segur que vol cancel·lar? -500 -&Arxiu -&Editar -&Visualitzar -Favorits -Ferramentes -Ajuda -540 -&Obrir -Obrir d&ins -Obrir fora -&Visualitzar -&Editar -Renom&enar -&Copiar a... -&Moure a... -&Suprimir -&Separar fitxer... -Com&binar fitxers... -P&ropietats -Come&ntari -Calcular checksum - -Crear directori -Crear fitxer -Eixir -600 -Seleccion&ar-ho tot -Deseleccionar-ho tot -&Invertir selecció -Seleccionar... -No seleccionar... -Seleccionar per tipus -No seleccionar per tipus -700 -Icones g&rans -Icones menudes -&Llista -&Detalls -730 -No ordenat -Vista plana -&2 Taules -&Barres de ferramentes -Obrir directori arrel -Directori pare -Historial de carpetes... -Actualitza&r -750 -Arxiu -Estàndard -Botons grans -Mostrar text dels botons -800 -&Afegir el directori als Favorits com a -Personal -900 -&Opcions... -&Banc de proves -960 -&Contingut... -Sobre 7-Zip... -1003 -Adreça -Nom -Tipus d'arxiu -Directori -Tamany -Tamany comprimit -Atributs -Creat -ültim accés -Última modificació -Compacte -Comentari -Xifrat -Expandit abans -Expandit després -Diccionari -CRC -Tipus -Anti -Mètode -SO d'origen -Sistema de fitxers -Usuari -Grup -Bloc -Comentari -Posició -Prefix de ruta - - - - - - - - - - - - - - - - - - - - - - - - -Error -Tamany total -Espai lliure -Tamany sector -Etiqueta -Nom local -Proveïdor -2100 -Opcions -Idioma -Idioma: -Editor -&Editor: - -2200 -Sistema -Associar 7-Zip amb: -2301 -Integrar 7-Zip dins el menu contextual de Windows -Menu contextual en cascada -Objectes del menu contextual: -2320 - - -Obrir arxiu -Extraure fitxers... -Afegir a l'arxiu... -Comprovar arxiu -Extraure ací -Extraure a {0} -Afegir a {0} -Comprimir i enviar per correu electrònic... -Comprimir a {0} i enviar per correu electrònic -2400 -Directoris -Directori de &treball -Directori temporal del &sistema -Directori a&ctual -E&specificar directori: -Utilitzar només per a discs extraibles -Especificar un directori per als arxius temporals. -2500 -Ajusts -Mostrar l'objecte ".." -Mostrar icones reals dels fitxers -Mostrar el menú del sistema -Seleccionar &tota la la fila -Mostrar &línies de la taula - -Mode de selecció &alternatiu -Utilitzar pàgines de memòria &grans -2900 -Sobre 7-Zip -7-Zip és un programa lliure (GNU LGPL). Pot col·laborar en el desenvolupament del 7-zip registrant-lo, com a usuari registrat podrà rebre suport tècnic. -3000 - -No hi ha errors -{0} objecte(s) seleccionat(s) -No es pot crear el directori '{0}' -Les operacions d'actualització d'este arxiu no estan suportades. -No es pot obrir el fitxer '{0}' com arxiu -No es pot obrir l'arxiu xifrat '{0}'. contrasenya incorrecta? - - -El fitxer '{0}' ha sigut modificat.\nVol actualitzar-lo a l'arxiu? -No es pot actualitzar el fitxer\n'{0}' -No es pot executar l'editor. - - - - -Massa objectes -3300 -Extraent -Comprimint -Provant -Obrint... -Escanejant... -3400 -Extraure -E&xtraure a: -Seleccione destinació per als fitxers extrets. -3410 -Mode d'adreça -Adreça sencera -Sense adreça -3420 -Sobreescriu -Pregunta abans de sobreescriure -Sobreescriu sense confirmació -Conserva arxius ja existents -Reanomena automàticament -Reanomena automàticament arxius ja existents -3500 -Confirmar substitució de fitxers -El directori de destinació conté un fitxer amb el mateix nom. -Vol substituir el fitxer existent -per este altre? -{0} bytes -Renomenar a&utomàticament -3700 -Mètode de compressió no vàlid per a '{0}'. -Error de dades en '{0}'. L'arxiu està corrupte. -CRC ha fallat en '{0}'. L'arxiu està corrupte. -Errors de dades en l'arxiu xifrat '{0}'. Contrasenya incorrecta? -CRC incorrecte en l'arxiu xifrat '{0}'. Contrasenya incorrecta? -3800 -Introduir contrasenya -Introduir contrasenya: -Reintroduir contrasenya: -Mo&strar contrasenya -Les contrasenyes no coincideixen -Useu només lletres de l'alfabet anglès, números i caràcters especials (!, #, $, ...) per a la contrasenya -Contrasenya massa llarga -Contrasenya -3900 -Temps transcorregut: -Temps restant: -Mida: -Velocitat: - - -Errors: - -4000 -Afegir a l'arxiu -&Arxiu: -Mode d'act&ualització: -&Format de l'arxiu: -&Nivell de compressió: -Tipus de co&mpressió: -Tamany &diccionari: -Tamany ¶ula: - - -&Paràmetres: -Opcions -Crear arxiu SF&X - -Xifrat -Métode de xifrat: -Encriptar el nom dels fitxers -Us de memòria Comprimint: -Us de memòria Descomprimint: -4050 -Sense compressió -La més ràpida -Ràpida -Normal -Màxima -Ultra -4060 -Afegir i substituir fitxers -Actualitzar i afegir fitxers -Actualitzar fitxers existents -Sincronitzar fitxers -4070 -Visualitzar -Tots els fitxers - - -6000 -Copiar -Moure -Copiar a: -Moure a: -Copiant... -Movent... -Renomenant... -Seleccioneu carpeta de destinació. -Operació no permesa. -Error renomenant fitxer o carpeta -Confirmar copia de fitxer -Està segur que vol copiar els fitxers a l'arxiu -6100 -Confirmar supressió del fitxer -Confirmar supressió del directori -Confirmar supressió m�ltiple de fitxers -Està segur de voler suprimir '{0}'? -Està segur de voler suprimir la carpeta '{0}' i tot el seu contingut? -Està segur de voler esborrar estos {0} elements? -Suprimint... -Error esborrant fitxer o carpeta - -6300 -Crear carpeta -Crear fitxer -Nom de carpeta: -Nom de fitxer: -Carpeta nova -Fitxer nou -Error creant carpeta -Error creant el fitxer -6400 -Comentari -&Comentari: -Seleccionar -No seleccionar -Màscara: -6600 - -Historial de directoris -Missatges de diagnosi -Missatge -7100 -El meu ordinador -Entorn de xarxa - -Sistema -7200 -Afegir -Extraure -Provar -Copiar -Moure -Esborrar -Info -7300 -Separar fitxer -&Separar a: -Separar en &volums, bytes: -Separant... -Confirma divissió -Esteu segurs que voleu dividir el fitxer en {0} volums? -La mida del volum ha de ser menor que la mida original del fitxer -Mida incorrecta de volum -Mida del volum especificada: {0} bytes.\nEsteu segurs que voleu dividir l'arxiu en volums? -7400 -Combinar fitxers -&Combinar a: -Combinant... -Seleccioneu només el primer fitxer - - -7500 -Calculant checksum... -Informació checksum -CRC checksum per a les dades: -CRC checksum per a dades i noms: -7600 -Banc de proves -Us de memoria: -Comprimint -Descomprimint -Taxa -Taxa total -Actual -Resultant - - -Passades: diff --git a/Utils/7-Zip/Lang/vi.txt b/Utils/7-Zip/Lang/vi.txt deleted file mode 100644 index 05def96a0..000000000 --- a/Utils/7-Zip/Lang/vi.txt +++ /dev/null @@ -1,404 +0,0 @@ -;!@Lang2@!UTF-8! -; 2.30 : : Tran Hong Ha -; 4.42 : : Le Vu Hoang -; 4.48 : : Nguyen Hong Quan -; 9.07 : 2011-04-12 : Vietnamize Team -; -; -; -; -; -; -; -0 -7-Zip -Vietnamese -Tiếng Việt -401 -Đồng ý -Hủy bỏ - - - -Có -Không -Đóng -Giúp đỡ - -Tiếp tục -440 -Có tất cả -Không tất cả -Dừng -Làm lại -Chạy nền -Chế độ ưu tiên -Dừng -Đã dừng -Bạn chắc chắn muốn hủy bỏ? -500 -Tập tin -Biên tập -Xem -Ưa thích -Công cụ -Giúp đỡ -540 -Mở -Mở tại đây -Mở trong cửa sổ khác -Xem -Biên tập -Đổi tên -Sao chép đến... -Di chuyển đến... -Xoá -Chia cắt tệp nén... -Nối tệp nén... -Thuộc tính -Chú thích -Tính checksum (md5) -So sánh -Tạo thư mục -Tạo tệp nén -Thoát -600 -Chọn tất cả -Bỏ chọn tất cả -Đảo lựa chọn -Chọn... -Bỏ chọn... -Chọn theo loại -Bỏ chọn theo loại -700 -Biểu tượng lớn -Biểu tượng nhỏ -Danh sách -Chi tiết -730 -Không sắp xếp -Mọi tập tin và thư mục con -2 bảng -Thanh công cụ -Mở thư mục gốc -Lên một cấp -Lịch sử thư mục... -Nạp lại -750 -Thanh công cụ nén -Thanh công cụ chuẩn -Sử dụng nút lớn -Hiển thị chữ trên nút -800 -Thêm thư mục vào 'Ưa thích' như là -Đánh dấu -900 -Tùy chọn... -Đo tốc độ -960 -Nội dung... -Về 7-Zip... -1003 -Đường dẫn -Tên -Phần mở rộng -Thư mục -Kích cỡ thực -Kích cỡ nén -Thuộc tính -Thời điểm tạo -Thời điểm truy xuất -Thời điểm sửa đổi -Kiểu nén Solid -Ghi chú -Được mã hoá -Chia nhỏ trước -Chia nhỏ sau -Từ điển -CRC -Loại -Anti -Phương thức nén -Hệ điều hành -Tệp hệ thống -Người dùng -Tập đoàn -Số thứ tự -Chú thích -Vị trí -Đường dẫn đầu -Thư mục -Tập tin -Phiên bản -Kích cỡ -Đa kích cỡ -Offset -Liên kết -Tập tin -Kích cỡ - -64-bit -Big-endian -CPU -Kích cỡ lý thuyết -Kích cỡ hiện tại -Checksum -Đặc điểm -Địa chỉ ảo -ID -Tên ngắn -Trình tạo ứng dụng -Kích cỡ vùng -Chế độ -Liên kết -Lỗi -Tổng dung lượng -Dung lượng trống -Dung lượng cluster -Nhãn -Tên mạng cục bộ -Nhà cung cấp -2100 -Các tùy chọn -Ngôn ngữ hiển thị -Ngôn ngữ: -Biên tập -Trình biên tập: -Trình so sánh: -2200 -Hệ thống -Kết hợp 7-Zip với: -2301 -Tích hợp 7-Zip vào menu ngữ cảnh -Xếp tầng menu ngữ cảnh -Menu ngữ cảnh: -2320 - - -Mở tệp nén -Giải nén tệp... -Thêm vào tệp nén... -Kiểm tra tệp nén -Giải nén tại đây -Giải nén vào {0} -Thêm vào {0} -Nén và gởi qua email... -Nén thành {0} và gởi qua email -2400 -Thư mục -Thư mục hiện hành -Hệ thống thư mục tạm -Hiện tại -Đặc biệt: -Chỉ sử dụng cho ổ đĩa di động -Xác định vị trí cho các tệp lưu trữ tạm thời. -2500 -Thiết lập -Hiển thị mục ".." -Hiển thị biểu tượng thực của tệp -Hiển thị menu hệ thống -Chọn cả dòng -Hiển thị lưới -Nhắp chuột để mở -Chế độ chọn luân phiên -Sử dụng bộ nhớ lớn -2900 -Về 7-Zip -7-Zip là một phần mềm miễn phí. -3000 -Không thể cấp thêm dung lượng RAM yêu cầu -Không xuất hiện lỗi -{0} đối tượng đã chọn -Không thể tạo thư mục '{0}' -Tệp nén này không được hỗ trợ cập nhật. -Không thể mở '{0}' như là tệp nén -Không thể mở tập tin nén '{0}' bị mã hóa . Mật khẩu sai? -Không hỗ trợ tệp nén này -Tệp {0} đang tồn tại -Tệp '{0}' đã bị thay đổi.\nBạn có muốn cập nhật nó vào tập tin nén? -Không thể cập nhật tệp\n'{0}' -Không thể khởi động trình biên tập. -Tập tin này có thể là virus (tên tập tin có chứa khoảng cách dài). -Không thể thực hiện với một thư mục có đường dẫn quá dài. -Bạn phải chọn một tập tin -Bạn phải chọn một hoặc 2 tập tin -Quá nhiều tập tin -3300 -Đang giải nén... -Đang nén... -Đang kiểm tra... -Đang mở... -Đang quét... -3400 -Giải nén -Giải nén vào: -Chọn nơi để giải nén tệp. -3410 -Chọn đường dẫn -Đường dẫn đầy đủ -Không có đường dẫn -3420 -Chế độ ghi đè -Hỏi trước khi ghi đè -Ghi đè không cần hỏi -Bỏ qua tệp đã có -Tự động đổi tên -Tự động đổi tên tệp đã có -3500 -Xác nhận thay thế -Thư mục đích đã có tập tin đó. -Bạn có muốn thay thế tập tin đã có -bằng tập tin mới? -{0} bytes -Tự động đổi tên -3700 -Phương thức nén không hỗ trợ cho '{0}'. -Lỗi dữ liệu trong '{0}'. Tệp đã bị hỏng. -Lỗi chẵn/lẻ (CRC) trong '{0}'. Tệp đã bị hỏng. -Lỗi dữ liệu trong tệp nén bị mã hóa '{0}'. Mật khẩu sai? -Kiểm tra CRC thất bại trong tệp nén bị mã hóa '{0}'. Mật khẩu sai? -3800 -Vui lòng nhập mật khẩu -Nhập mật khẩu: -Nhập lại mật khẩu: -Xem mật khẩu -Mật khẩu không khớp nhau -Chỉ đặt mật khẩu bằng tiếng Anh, số và những kí tự đặc biệt (!, #, $, ...) cho mật khẩu -Mật khẩu quá dài -Mật khẩu -3900 -Thời gian đã qua: -Thời gian còn lại: -Tổng kích cỡ: -Tốc độ: -Đã nén: -Tỷ lệ nén: -Lỗi: -Tệp nén: -4000 -Thêm vào tệp nén -Tệp nén: -Chế độ cập nhật: -Dạng tệp nén: -Mức độ nén: -Phương thức nén: -Kích cỡ thư mục: -Kích cỡ văn bản: -Kích cỡ nén Solid: -Số luồng xử lý CPU: -Tham số: -Tùy chọn -Tạo trình tự giải nén tệp -Nén tập tin chia sẻ -Mã hóa -Phương thức mã hóa: -Mã hoá tên tệp -Bộ nhớ dùng cho việc nén: -Bộ nhớ dùng cho việc giải nén: -4050 -Lưu trữ -Nhanh nhất -Nhanh -Bình thường -Tối đa -Siêu nhanh -4060 -Thêm và thay thế -Thêm và cập nhật -Cập nhật tập tin đã có -Đồng bộ -4070 -Duyệt -Mọi tập tin -Không nén dạng Solid -Solid -6000 -Sao chép -Di chuyển -Sao chép đến: -Di chuyển đến: -Đang thêm... -Đang di chuyển... -Đang đổi tên... -Chọn thư mục đến. -Thao tác không được hỗ trợ cho tập tin này. -Lỗi khi đổi tên tệp hoặc thư mục -Xác nhận thêm -Bạn muốn thêm vào tệp nén? -6100 -Xác nhận xoá -Xác nhận xoá thư mục -Xác nhận xoá nhiều tệp -Bạn có chắc chắn muốn xoá '{0}'? -Bạn có chắc chắn muốn xoá thư mục '{0}' và mọi tập tin bên trong? -Bạn có chắc chắn muốn xoá {0} ? -Đang xóa... -Lỗi khi đang xóa tệp hoặc thư mục -Hệ thống không thể xóa tệp với đường dẫn dài vào Thùng rác -6300 -Tạo thư mục -Tạo tệp nén -Tên thư mục: -Tên tệp mới: -Thư mục mới -Tệp mới -Lỗi khi tạo thư mục -Lỗi khi tạo tệp -6400 -Chú thích -Chú thích: -Chọn -Bỏ chọn -Ẩn danh: -6600 -Thuộc tính -Lịch sử thư mục -Thông tin chẩn đoán -Thông tin -7100 -Máy tính -Mạng -Tài liệu -Hệ thống -7200 -Thêm -Giải nén -Kiểm tra -Sao chép -Di chuyển -Xoá -Thông tin -7300 -Chia nhỏ tệp -Chia nhỏ và lưu tại: -Chia thành nhiều phần, bytes: -Đang chia nhỏ... -Xác nhận việc chia nhỏ -Bạn có chắc muốn chia nhỏ tệp nén thành {0} phần? -Kích cỡ mỗi phần phải nhỏ hơn tệp gốc -Kích cỡ phần chia chưa đúng -Kích cỡ phần chia đã đặt: {0} bytes.\nBạn chắc chắn muốn chia tệp nén theo kích cỡ chia đã đặt? -7400 -Nối tệp -Nối thành: -Đang nối... -Chỉ chọn phần đầu của tệp bị chia nhỏ -Không thể xem tập tin như phần nối của tệp bị chia cắt -Không tìm thấy thêm phần nối nào của tệp chia cắt -7500 -Đang tính checksum... -Thông tin checksum -CRC checksum cho dữ liệu: -CRC checksum cho dữ liệu và tên: -7600 -Đo tốc độ -Bộ nhớ sử dụng: -Đang nén -Đang giải nén -Đánh giá -Tổng đánh giá -Hiện thời -Kết quả -Mức dùng CPU -Tốc độ / Mức dùng -Đã qua: diff --git a/Utils/7-Zip/Lang/yo.txt b/Utils/7-Zip/Lang/yo.txt deleted file mode 100644 index 3fa9560a5..000000000 --- a/Utils/7-Zip/Lang/yo.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; 15.00 : 2015-03-29 : Ibrahim Oyekan -; -; -; -; -; -; -; -; -; -; -0 -7-Zip -Yoruba -Yoruba -401 -O DAA -Pa re - - - -&Bẹẹni -&Bẹẹkọ -&Pádé -Ìrànlọwọ - -&Tẹ́-síwájú -440 -Bẹẹni fun &gbogbo ẹ -Bẹẹkọ fun &gbogbo ẹ -Dúró -Ṣàtúnbẹ̀rẹ̀ -&Ẹ̣̀hìn-ìgbéhìn -&Ojú-ìgbéhìn -&Dádúró -Ìdúró -Ṣe ẹ dájú pe ẹnyin fẹ́ paarẹ -500 -&Faíli -&Tunkọ -&Ìwò -&Aàyò -&Irinṣẹ́ -&Ìrànlọwọ -540 -&Ṣi -Ṣi &si ínú -Ṣi &si íta -&Ìwò -&Tunkọ -&Tun orukọ kọ -&Ṣẹ̀dà si... -&Gbé si... -&Paarẹ -&Pín faíli... -Ṣà àwọn faíli kópọ̀... -&Àbùdá -&Ọrọ ìwòye... -Ṣe iṣiro checksum -íyàtọ̀ -Dá àpò faíli silẹ́ -Dá faíli silẹ́ -&Pádé -Ìtọ́kasí -&Yiyan agbara détà -600 -Àṣàyàn &gbogbo faíli -Paa Àṣàyàn gbogbo faíli -&Yi Àṣàyàn Padà -Àṣàyàn... -Paa Àṣàyàn... -Àṣàyàn bi irú faíli -Paa Àṣàyàn bi irú faíli -700 -&Àmi ńlá -&Àmi Kékeré -&Akọjọ́ -&Awọn alaye -730 -Lai tọ lẹsẹsẹ -Iwò Ṣepẹtẹ -&Irinṣẹ́ méjì -&Pẹpẹ irinṣẹ́ -Ṣi pìlẹ̀ -Lọ sókè lẹẹkan -Ìtàn àpò faíli... -&Sọdọ̀tun -Isọdọ̀tun aládàáṣẹ́ -750 -Kó pẹpẹ irinṣẹ́ jọ́pọ -Ojúlówó pẹpẹ irinṣẹ́ -Onini ńlá -Fihàn Ìpilẹ̀sọ́ ọ̀rọ̀ Onini -800 -Fi àpò faíli si àpò faíli ayanfẹ -Àmì ìwé -900 -&Ìyàn... -&Ala -960na -&Àkóónú... -&Nípa 7-Zip... -1003 -Ọnà -Orukọ -Ìkọpọmó -Àpò faíli -Ìwọn -Ìwọn àkójọpọ̀ -Àwòmọ́ -Idásílẹ́ -Ìráyè sí -Atúnṣe -Alagbara -Ọrọ ìwòye -Ìwépọ̀ -Kọkọ pín -Pín lẹ́hìn -Ìwe itúmọ̀-èdè - -Irú -Egboogi -Ito lẹsẹsẹ -OS agbalejo -Ìlànà ètò fáìlì -Onilò -Ìwọ́pọ̀ -Dínà -Ọrọ ìwòye -Ipò -Ìpele ọ̀nà -Àpò faíli -Faíli -Ẹya -Ọ̀pọ̀ òǹlò -Ọ̀pọ̀ òǹlò ọpọlọpọ -Aiṣedeede -Awọn Ìtọ́kasí -Àkọsílẹ -Awọn ọ̀pọ̀ òǹlò - -Bíìtì-8 -Endian itóbi -CPU -Ìwọn gangan -Ìwọn àkọsórí -Checksum -Ti ìwà -Àdírẹ́ẹ̀sì àfojúunúṣe -ID -Orúkọ kuru -Ohun èlò eleda -Ìwọn apákàan -Móòdù -Ìtọ́kasí to ni aami -Ìṣiṣe -Ìwọn lapapọ -Aaye to ṣẹku -Ìwọn ìṣùpọ̀ -Aṣàmì -Agbègbè orúkọ -Olùpèsè -Ààbò NT -Yiyan agbara détà -Olurànlọwọ -Ààtàn -O jẹ igi - - -Irú -Awọn ìṣiṣe -Awọn ìṣiṣe -Awọn ìkìlọ̀ -Ìkìlọ̀ -Agbara détà -Yiyan agbara détà -Ìwọn Yiyan Agbara -Ìwọn àfojúunúṣe -Ìwọn ìtú erú -Ìwọn gangan lapapọ -Atọ́kà ọ̀pọ̀ òǹlò -ẹ̀ka-ìwọn -ọrọ ìwòye kuru -Ojú-ìwé kóòdù - - - -Ìwọn ìrú -Ìwọn àfibọ̀ ìyọkúrò -Ìtọ́kasí -Ìtọ́kasí lile -iNode - -Kàn kàá -2100 -Ìyàn -Èdè -Èdè: -Aṣàtúnṣe -&Aṣàtúnṣe: -&íyàtọ̀: -2200 -Ìlànà ètò -Da fáìlì pọ-mọ 7-Zip: -Gbogbo onilò -2301 -Sọ 7-Zip pọ̀ mọ mẹ́nù ọ̀gàngán ipò ṣẹ́ẹ̀lì -Mẹ́nù ọ̀gàngán ipò pérété -Ijẹri ninu mẹ́nù ọ̀gàngán ipò: -Àmì ninu mẹ́nù ọ̀gàngán ipò -2320 -<Àpò faíli> -<Àpò faíli àkójọ́pọ> -Ṣi àpò faíli àkójọ́pọ -Tú faíli silẹ... -Fi si àpò faíli àkójọ́pọ... -Dán àpò faíli àkójọ́pọ wò -Tú faíli si inú ibí -Tú faíli si inú {0} -Fi si {0} -Kó faíli jọ́pọ, ko rán í-meèlì... -Kó faíli jọ́pọ si {0} ko rán í-meèlì -2400 -Àpò faíli -&Àpò faíli iṣiṣẹ́ -&Ìlànà ètò àpò faíli ibùgbé -&Lọ́wọ́lọ́wọ́ -&Pàtó kan: -Lò fun àwo àká-ọ̀rọ̀ yiyọ nìkan -Yan ilé fun àpò faíli àkójọ́pọ ibùgbé -2500 -Ìtò -Fihàn ".." ijẹri -Fihàn àmì faíli gidi -Fihàn mẹ́nù ìlànà ètò -&Àṣàyàn gbogbo ìlà ìbú -Fihàn &àwọn ìlà gírìdì -Ìṣíra tẹ̀ lẹ́ẹ̀kan láti ṣí ijẹri -&Yiyan móòdù àṣàyàn -Lò &ojú-ìwé ti o nlò ibi ìpamọ́ ńlá -2900 -Nípa 7-Zip -Ẹ̀yà àìrídìmú ṣ'ofo ni 7-Zip -3000 -Ìlànà ètò ò le pín ibi ìpamọ́ ti o tó -Kò si iṣiṣe kankan -Iye àṣàyàn: {0} -Kò lé dá àpò faíli '{0}' -Kò lé ṣàfikùn àpò faíli àkójọ́pọ yí. -Kò lé ṣí àpò faíli '{0}' sí àpò faíli àkójọ́pọ -Kò lé ṣí àpò faíli àkójọ́pọ (ìpàrokò). ọrọ̀ aṣínà láìpé -Faíli yí o baamu -Faíli {0} ti wà níbẹ -Faíli '{0}' títúnṣe.\n ṣe ẹ fẹ̀ túnṣe si inú àpò faíli àkójọ́pọ? -Kò le ṣàfikún fun faíli yí \n'{0}' -Kò le ṣí Olótùú. -Faíli yí jọ àkóràn(Ààyè to wa ni àárín orukọ faíli ti poju). -Kò le pè ìmú iṣiṣẹ́ yí láti àpò faíli to ni ọ̀nà gígùn. -Ẹ gbọdọ ṣàyàn faíli kan. -Ẹ gbọdọ ṣàyàn faíli kan tàbí faíli pupọ -Ijẹri ti ẹ ṣà ti pọju -Kò le ṣí faíli yí bí {0} àpò faíli àkójọ́pọ -Faíli yí ti ṣí bí {0} àpò faíli àkójọ́pọ -Àpò faíli àkójọ́pọ yí ti ṣí pẹlu aiṣedeede -3300 -Ìtúsilẹ -Ìkójọ́pọ -Ìdánwò -Ìṣíṣí... -Ìṣẹ̀dà àwòrán ... -Ìyọkúrò -3320 -Ìfi-sí -Ìṣàfikùn -Ìtúpalẹ̀ -Ìfijọ -Ìṣatopọ -Mbẹ́ -Ìpaarẹ -Ìdá àkọsórí -3400 -Túsilẹ -&Tú faíli si inú: -Yan ibi ti awọn faíli ma tú si. -3410 -Móòdù ọ̀nà: -Gbogbo orukọ ọ̀nà -Kò si orukọ ọ̀nà -Orukọ ọ̀nà ọlọ́gangan -Orukọ ọ̀nà ìbátan -3420 -Móòdù ìkọsórí: -Béèrè kí ó tó kọ sórí faíli -Kọ sórí faíli lai béèrè -Mà wo faíli tó ti wà níbẹ -Tun orukọ kọ laládàáṣiṣẹ́ -Tun kọ orukọ faíli tó ti wà níbẹ laládàáṣiṣẹ́ -3430 -Mú ìfijọ àpò faíli ìpìlẹ̀ kúrò -Da ààbò faíli padà -3500 -Tẹnumọ́ àfirọ́pò faíli -Àpò fáìlì èbúté ti ní fáìlì ìgbésẹ́. -Ṣe ẹ fẹ̀ ṣàfirọ́pò fun fáìlì tó ti wà níbẹ -pẹlu fáìlì yí? -Báìtì {0} -&Tun orukọ kọ laládàáṣiṣẹ́ -3700 -Kọ si àtìlẹ́yìn fun ètò àkójọ́pọ yí '{0}'. -Ìṣiṣe détà ṣẹlẹ ní inú '{0}'. Fáìlì ti bajẹ. -Ìkùnà CRC ṣẹlẹ ní inú '{0}'. Fáìlì ti bajẹ. -Ìṣiṣe détà ṣẹlẹ ní inú fáìlì pàroko '{0}'. Tun wo ọ̀rọ̀ aṣínà -Ìkùnà CRC ṣẹlẹ ní inú fáìlì pàroko '{0}'. Tun wo ọ̀rọ̀ aṣínà -3710 -Tun wo ọ̀rọ̀ aṣínà -3721 -Ko si àtìlẹ́yìn fun ètò àkójọ́pọ yí -Ìṣiṣe détà ṣẹlẹ -Détà ò ṣeélò -Ìkùnà CRC -Détà ti parí lójijì -Détà ṣi wa lẹ̀hìn détà ọ̀gangan -Kò ṣe faíli akójọ́pọ -Ìṣiṣe àkọlé -Tun wo ọ̀rọ̀ aṣínà -3763 -Ìbẹ̀rẹ̀ faíli akójọ́pọ ò ṣeélò -Ìbẹ̀rẹ̀ faíli akójọ́pọ ò ṣe tẹnumọ́ - - - -Ko si àtìlẹ́yìn fun àfidámọ̀ yí -3800 -Tẹ̀ ọ̀rọ̀ aṣínà -Tẹ̀ ọ̀rọ̀ aṣínà: -ṣítẹ̀ ọ̀rọ̀ aṣínà: -&Fihàn ọ̀rọ̀ aṣínà -Awọn ọ̀rọ̀ aṣínà ò dọgba -Lò ábídí, iye tàbí aami Gẹ̀ẹ́sì nìkan (!, #, $, ...) fun ọ̀rọ̀ aṣínà -Ọ̀rọ̀ aṣínà ti gùn ju -Ọ̀rọ̀ aṣínà -3900 -Àsìkò ti okan: -Àsìkò ti o ku: -Ìwọn lapapọ: -Ìyára: -Ìṣètò: -Ìpín Ìkójọ́pọ: -Awọn ìṣiṣe: -Awọn faíli àkójọ́pọ: -4000 -Fi si àpò faíli àkójọ́pọ -&Faíli àkójọ́pọ: -&Móòdù ìṣàfikún: -&Ìgúnrégé faíli àkójọ́pọ: -&Ìpele àkójọ́pọ: -&Ọ̀nà àkójọ́pọ: -&Ìwọn àtúmọ̀-èdè: -&Ìwọn ó̩ró̩gbólóhùn: -Ìwọn sèdíwọ: -Iye èròjà atẹ̀lélànà CPU: -&Awọn afòdiwọ̀n: -Ìyàn -Dá àpò faíli àkójọ́pọ fun SF&X -Ko faíli alájọpín jọ́pọ -Ìpàrokò -Móòdù ìpàrokò: -&Ṣe ìpàrokò fun orúkọ faíli -ìlò ibi ìpamọ́ fun àkójọ́pọ: -ìlò ibi ìpamọ́ fun ìtúsilẹ: -Paarẹ faíli lẹ̀hìn àkójọ́pọ -4040 -Fi ìtọ́kasí to ni aami pamọ́ -Fi ìtọ́kasí lile pamọ́ -Fi agbara détà pamọ́ -Fi àfirọ́pò faíli pamọ́ -4050 -Ṣàfipamọ́ -Kíá ju -Kíákíá -Déédéé -Ki o pọju -Ki o púpọ̀ -4060 -Fi faíli si ki o tun fi rọ́pò -Ṣàfikùn faili ki o tun fi si -Sọ awọn faili lọ́wọ́ di ọ̀tun -Mú awọn faíli dọ́gba -4070 -Wáròyìn -Gbogbo faíli -Lai le -Lile -6000 -Ṣẹ̀dà -Gbé -Ṣẹ̀dà si: -Gbé si: -Ìṣẹ̀dà -Ìgbé... -Ìtunkọ... -Ṣàyàn èbúté àpò faíli. -Ìmú ṣiṣẹ́ o ni àtìlẹ́yìn fun àpò faíli. -Ìṣiṣe ṣẹlẹ ní ìtunkọ àpò faíli -Tẹnumọ́ ìṣẹ̀dà faíli -Ṣe ẹ́ dájú pe ẹ fẹ́ ṣẹ̀dà awọn faíli yí si àpò faíli àkójọ́pọ? -6100 -Tẹnumọ́ ìpaarẹ faíli -Tẹnumọ́ ìpaarẹ àpò faíli -Tẹnumọ́ ìpaarẹ àpò faíli ọ̀pọ̀ -Ṣe ẹ́ dájú pe ẹ fẹ́ paarẹ '{0}'? -Ṣe ẹ́ dájú pe ẹ fẹ́ paarẹ '{0}' a àti gbogbo àkóónú ẹ? -Ṣe ẹ́ dájú pe ẹ fẹ́ paarẹ iye ijẹri yí {0} ? -Ìpaarẹ... -Ìṣiṣe ṣẹlẹ ni ìpaarẹ faíli tàbí àpò faíli -Ìlànà ètò o le gbé faíli to ni orúkọ gígùn si inú Ààtàn -6300 -Dá àpò faíli -Dá faíli -Orúkọ àpò faíli: -Orúkọ faíli: -Àpò faíli -Faíli tuntun -Ìṣiṣe ṣẹlẹ ni ìdá àpò faíli -Ìṣiṣe ṣẹlẹ ni ìdá faíli -6400 -Ọrọ ìwòye -&Ọrọ ìwòye: -Ṣàyàn -Paa Àṣàyàn -Asẹ́ iye: -6600 -Àbùdá -Akọọ́lẹ̀ àpò faíli -Atọpinpin-Àìṣedédé iṣé -Iṣé -7100 -Kọ̀mpútà -Alásopọ̀ -Àkọsílẹ̀ -Ìlànà ètò -7200 -Fi-sí -Túsilẹ -Dán-wò -Ṣẹ̀dà -Gbé -Paarẹ -Ìròyìn -7300 -Pín faíli -&Pín si: -Pín si &ọ̀pọ̀ òǹlò, báìtì: -Ìpín... -Tẹnumọ́ Ìpín -Ṣe ẹ́ dájú pe ẹ fẹ́ pín faíli si ọ̀pọ̀ òǹlò {0}? -Ọ̀̀pọ̀ òǹlò láti kéré ju ìwọn faíli ojulowo lọ -ìwọn ọ̀pọ̀ òǹlò láìpé -Yan ìwọn ọ̀pọ̀ òǹlò: {0} báìtì.\nṢe ẹ́ dájú pe ẹ fẹ́ pín àpò faíli àkójọ́pọ si ọ̀pọ̀ òǹlò awọn yí? -7400 -Kó faíli pọ̀ -&Kó faíli pọ̀ si: -Ìkópọ̀... -Ṣàyàn akọkọ faíli ìpín nìkan -Ko lè rí faíli ni inu faíli ìpín -Ko lè rí ju apá faíli kan lọ -7500 -Ìkà checksum... -Ìròyìn Checksum -CRC checksum fun détà: -CRC checksum fun détà àti orúkọ: -7600 -Ala -Ìlò ibi ìpamọ́: -Akójọ́pọ -Ìtúsilẹ -Ìgbéléwọ̀n -Awọn ìgbéléwọ̀n lapapọ -Lọ́wọ́lọ́wọ́ -èsì -Ìlò CPU -Ìgbéléwọ̀n / Ìlò -Ìwé ìjáde: -7700 -Ìtọ́kasí -Ìtọ́kasí -Ìtọ́kasí láti: -Ìtọ́kasí: -7710 -Irú Ìtọ́kasí -Ìtọ́kasí lile -Faíli Ìtọ́kasí to ni aami -Iwé ilana Ìtọ́kasí to ni aami -Idapọ iwé ilana diff --git a/Utils/7-Zip/Lang/zh-cn.txt b/Utils/7-Zip/Lang/zh-cn.txt deleted file mode 100644 index 994abc726..000000000 --- a/Utils/7-Zip/Lang/zh-cn.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; 2.30 : 2002-09-07 : Modern Tiger, kaZek, Hutu Li -; 3.08 : 2003-08-29 : Tunghsiao Liu (aka. Sparanoid) -; 16.00 : 2016-05-16 : Tunghsiao Liu (aka. Sparanoid) -; -; -; -; -; -; -; -; -0 -7-Zip -Chinese Simplified -简体中文 -401 -确定 -取消 - - - -是(&Y) -否(&N) -关闭(&C) -帮助 - -继续(&C) -440 -全是(&A) -全否(&L) -停止 -重新开始 -后台(&B) -前台(&F) -暂停(&P) -已暂停 -您真的要取消吗? -500 -文件(&F) -编辑(&E) -查看(&V) -书签(&A) -工具(&T) -帮助(&H) -540 -打开(&O) -当前窗口打开(&I) -新建窗口打开(&U) -查看(&V) -编辑(&E) -重命名(&M) -复制到(&C)... -移动到(&M)... -删除(&D) -分割文件(&S)... -合并文件(&B)... -属性(&R) -注释(&N) -文件校验 -文件比较 -新建文件夹 -新建文件 -退出(&X) -链接 -交替数据流(&A) -600 -全选(&A) -全部取消 -反选(&I) -选择... -取消选择... -选择相同类型的文件 -取消选择相同类型的文件 -700 -大图标(&G) -小图标(&M) -列表(&L) -详细信息(&D) -730 -不排序 -平铺模式 -双版面(&2) -工具栏(&T) -打开根文件夹 -向上 -文件夹历史... -刷新(&R) -自动刷新 -750 -档案工具栏 -标准工具栏 -大按钮 -显示按钮文字 -800 -添加到书签(&A) -书签 -900 -选项(&O) -基准测试(&B) -960 -查看帮助(&C) -关于 7-Zip (&A) -1003 -路径 -名称 -扩展名 -文件夹 -大小 -压缩后大小 -属性 -创建时间 -访问时间 -修改时间 -固实 -注释 -加密 -之前分割 -之后分割 -字典大小 - -类型 -剔除项 -算法 -主操作系统 -文件系统 -用户 -组 -字块 -注释 -定位 -路径前缀 -文件夹 -文件 -版本 -卷 -多卷压缩 -偏移 -链接 -字块 -分卷 - -64 位 -大端序 -CPU -物理大小 -文件头大小 -校验和 -特征 -虚拟地址 -ID -短文件名 -创建程序 -扇区大小 -模式 -链接 -错误 -总大小 -可用空间 -簇大小 -卷标 -本地名称 -供应者 -NT 安全 -交替数据流 -Aux -已删除 -树状结构 - - -错误类型 -错误 -错误 -警告 -警告 -数据流 -交替数据流 -交替数据流大小 -虚拟大小 -释放大小 -完整物理大小 -卷索引 -SubType -短评论 -代码页 - - - -尾部大小 -嵌入尾部大小 -链接类型 -硬链接 -iNode - -只读 -2100 -选项 -语言 -选择语言: -编辑器 -指定编辑器(&E): -指定文件比较程序(&D): -2200 -系统 -使用 7-Zip 关联的文件类型: -所有用户 -2301 -添加 7-Zip 到右键菜单 -层叠右键菜单 -选择在右键菜单中显示的项目: -右键菜单显示图标 -2320 -<文件夹> -<档案> -打开压缩包 -提取文件... -添加到压缩包... -测试压缩包 -提取到当前位置 -提取到 {0} -添加到 {0} -压缩并邮寄... -压缩 {0} 并邮寄 -2400 -文件夹 -工作文件夹(&W) -系统临时文件夹(&S) -当前文件夹(&C) -指定位置(&S) -仅用于可移动设备 -指定一个存放临时压缩包的位置。 -2500 -显示 -显示「..」项 (双击向上) -显示真实图标 -显示系统菜单 -整行选择(&F) -显示网格线(&G) -单击打开项目 -7-Zip 传统选择模式(&A) -使用大内存页(&L) -2900 -关于 7-Zip -7-Zip 是一款自由软件。您可以通过捐赠的方式来支持 7-Zip 的开发。 -3000 -系统无法分配所需内存 -未发现错误 -选定 {0} 个项目 -无法创建文件夹「{0}」 -不支持此压缩包的更新操作。 -无法作为压缩包打开文件「{0}」 -无法打开加密压缩包「{0}」。密码错误? -不支持的压缩包格式 -文件 {0} 已存在 -文件「{0}」已修改。\n你想在压缩文件中更新它? -无法更新文件\n「{0}」。 -无法运行外部编辑。 -此文件似乎是病毒文件(文件名中包含多个空格)。 -无法为过长的路径完成该操作。 -您必须选择一个文件 -您至少要选择一个文件 -项目太多 -无法作为 {0} 压缩包打开该文件 -文件以 {0} 格式打开 -压缩包包含偏移 -3300 -正在提取 -正在压缩 -正在测试 -正在打开... -正在搜索... -正在移除 -3320 -正在添加 -正在更新 -正在分析 -正在复制 -正在打包 -正在跳过 -正在删除 -正在创建文件头 -3400 -提取 -提取到(&X): -指定一个提取文件的位置。 -3410 -路径模式 -完整路径 -无路径 -绝对路径 -相对路径 -3420 -覆盖模式 -在覆盖前询问 -不提示自动覆盖 -跳过已经存在的文件 -自动重命名 -重命名现有文件 -3430 -排除重复的根文件夹 -恢复文件安全设置 -3500 -确认文件替换 -此文件夹已包含一个相同名称的文件。 -是否将现有文件 -替换为 -{0} 字节 -自动重新命名(&U) -3700 -不支持的压缩算法「{0}」。 -数据「{0}」发生错误,文件已损坏。 -CRC 校验「{0}」失败,文件已损坏。 -加密文件「{0}」数据有误,密码错误? -加密文件「{0}」CRC 数据校验有误,密码错误? -3710 -密码错误? -3721 -不支持的压缩算法 -数据错误 -CRC 校验失败 -数据不可用 -文件末端错误 -有效数据外包含额外数据 -非压缩包 -头部错误 -密码错误 -3763 -档案起始位置不可用 -无法确认档案起始位置 - - - -不支持此功能 -3800 -输入密码 -输入密码: -重新输入: -显示密码(&S) -密码不匹配 -密码只允许英文字符,数字,以及特殊字符 (!、#、$...) -密码过长 -密码 -3900 -已用时间: -剩余时间: -总大小: -速度: -已处理: -压缩率: -发生错误: -压缩包: -4000 -添加到压缩包 -压缩包(&A): -更新方式(&U): -压缩格式(&F): -压缩等级(&L): -压缩方法(&M): -字典大小(&D): -单词大小(&W): -固实数据大小: -CPU 线程数: -参数(&P): -选项 -创建自释放程序(&X) -压缩共享文件 -加密 -加密算法: -加密文件名(&N) -压缩所需内存: -解压缩所需内存: -操作完成后删除源文件 -4040 -保存符号链接 -保存硬链接 -保存交替数据流 -保存文件安全设置 -4050 -仅存储 -极速压缩 -快速压缩 -标准压缩 -最大压缩 -极限压缩 -4060 -添加并替换文件 -更新并添加文件 -只刷新已存在的文件 -同步压缩包内容 -4070 -浏览 -所有文件 -非固实 -固实 -6000 -复制 -移动 -复制到: -移动到: -正在复制... -正在移动... -正在重新命名... -选择目标文件夹。 -不支持当前操作 -无法重命名文件或文件夹。 -确认文件复制 -您确定复制文件到压缩包 -6100 -确认文件删除 -确认文件夹删除 -确认删除多个文件 -确实要删除 「{0}」吗? -确实要删除文件夹「{0}」以及全部内容吗? -确实要删除这 {0} 项? -正在删除... -无法删除文件或文件夹. -系统无法将过长路径的文件移动到回收站 -6300 -新建文件夹 -新建文件 -文件夹名称: -文件名: -新建文件夹 -新建文件.txt -无法创建文件夹 -无法新建文件 -6400 -注释 -注释(&C): -选择 -取消选定 -掩码: -6600 -属性 -文件夹历史 -诊断信息 -信息 -7100 -我的电脑 -网络 -我的文档 -系统 -7200 -添加 -提取 -测试 -复制 -移动 -删除 -信息 -7300 -分割文件 -分割文件到(&S): -分卷大小,字节(&V): -正在分割... -确认分割 -您确认要将文件分割为 {0} 个分卷? -分卷大小必须小于原文件大小 -分卷大小错误 -指定分卷大小:{0} 字节。\n您确定要分割当前文件吗? -7400 -合并文件 -合并文件到(&S): -正在合并... -请选择分卷的首个文件 -无法识别文件为压缩分卷 -无法找到其他压缩分卷 -7500 -正在校验... -校验信息 -CRC 数据校验: -CRC 数据及文件名校验: -7600 -基准测试 -内存使用: -压缩 -解压缩 -评分 -总体评分 -当前 -结果 -CPU 使用率 -使用率评分 -已通过: -7700 -链接 -链接 -链接自: -链接到: -7710 -链接类型 -硬链接 -文件符号链接(Symbolic Link) -目录符号链接(Symbolic Link) -目录接合点(Directory Junction) diff --git a/Utils/7-Zip/Lang/zh-tw.txt b/Utils/7-Zip/Lang/zh-tw.txt deleted file mode 100644 index 8b89469d7..000000000 --- a/Utils/7-Zip/Lang/zh-tw.txt +++ /dev/null @@ -1,495 +0,0 @@ -;!@Lang2@!UTF-8! -; 4.59 : Leon Tseng, sec2, 琥珀 -; 9.07 - 15.00 : Jack Pang : http://www.developershome.com/7-zip/ -; -; -; -; -; -; -; -; -; -0 -7-Zip -Chinese Traditional -繁體中文 -401 -確定 -取消 - - - -是(&Y) -否(&N) -關閉(&C) -說明 - -繼續(&C) -440 -全部皆是(&A) -全部皆否(&L) -停止 -重新開始 -背景作業(&B) -前景作業(&F) -暫停(&P) -暫停 -您確定要取消嗎? -500 -檔案(&F) -編輯(&E) -檢視(&V) -我的最愛(&A) -工具(&T) -說明(&H) -540 -開啟(&O) -在內部開啟(&I) -在外部開啟(&U) -檢視(&V) -編輯(&E) -重新命名(&M) -複製到(&C)... -移動到(&M)... -刪除(&D) -分割檔案(&S)... -合併檔案(&B)... -內容(&R) -註解(&N) -計算驗證值 -比較檔案 -建立資料夾 -建立檔案 -結束(&X) -連結 -附加資料流(&A) -600 -全選(&A) -全不選 -反向選擇(&I) -選取... -取消選取... -依類型選取 -依類型不選取 -700 -大圖示(&G) -小圖示(&M) -清單(&L) -詳細資料(&D) -730 -不排序 -攤開檢視 -雙窗格(&2) -工具列(&T) -開啟根目錄 -上移一層 -資料夾歷程記錄... -重新整理(&R) -自動重新整理 -750 -壓縮檔工具列 -標準工具列 -大型按鈕 -顯示按鈕文字 -800 -將資料夾加入我的最愛為(&A) -書籤 -900 -選項(&O)... -效能測試(&B) -960 -內容(&C)... -關於 7-Zip(&A)... -1003 -路徑 -名稱 -副檔名 -資料夾 -大小 -封裝後大小 -屬性 -建立日期 -存取日期 -修改日期 -緊密 -註解 -加密 -分割前 -分割後 -字典大小 - -類型 -防護 -方式 -主機作業系統 -檔案系統 -使用者 -群組 -區塊 -註解 -位置 -路徑前綴 -資料夾 -檔案 -版本 -卷 -多卷 -偏移 -連結 -區塊 -分卷 - -64 位 -大端序 -CPU -物理大小 -標頭大小 -驗證值 -特徵 -虛擬地址 -ID -簡稱 -創建程式 -扇區大小 -模式 -符號連結 -錯誤 -全部大小 -可用空間 -叢集大小 -標籤 -本機名稱 -提供者 -NT 安全性 -附加資料流 -Aux -刪除日期 -是否樹狀結構 - - -錯誤類型 -錯誤 -錯誤 -警告 -警告 -資料流 -附加資料流 -附加資料流大小 -虛擬大小 -解封後大小 -總物理大小 -卷索引 -子類型 -簡短註解 -代碼頁 - - - -文件尾大小 -嵌入式殘端大小 -連結 -硬連結 -iNode - -唯讀 -2100 -選項 -語言 -介面語言: -編輯器 -編輯器(&E): -檔案比較程式(&D): -2200 -系統 -使 7-Zip 與之產生關聯: -所有使用者 -2301 -將 7-Zip 整合到快顯功能表中 -串聯式快顯功能表 -快顯功能表項目: -快顯功能表顯示圖示 -2320 -<資料夾> -<壓縮檔> -開啟壓縮檔 -解壓縮檔案... -加入壓縮檔... -測試壓縮檔 -解壓縮至此 -解壓縮至 {0} -加入 {0} -壓縮並郵寄... -壓縮成 {0} 並郵寄 -2400 -資料夾 -工作資料夾(&W) -系統暫存資料夾(&S) -目前的資料夾(&C) -指定的資料夾(&S): -僅用於卸除式磁碟機 -請指定存放暫存壓縮檔的位置。 -2500 -設定 -顯示 ".." 項目 -顯示實際檔案圖示 -顯示系統選單 -整列選取(&F) -顯示格線(&G) -單擊開啟項目 -使用替代選擇模式(&A) -使用大記憶體分頁(&L) -2900 -關於 7-Zip -7-Zip 為自由軟體 -3000 -系統未能提供所需記憶體空間 -沒有任何錯誤 -已選取 {0} 個物件 -無法建立資料夾 '{0}' -此壓縮檔未支援更新操作。 -無法開啟壓縮檔 '{0}' -無法開啟加密的壓縮檔 '{0}'。錯誤的密碼? -不支援的壓縮檔類型 -檔案 {0} 已存在 -檔案 '{0}' 已被修改過。\n您是否要在此壓縮檔內更新檔案? -無法更新檔案\n'{0}' -無法啟動編輯器。 -檔案似是病毒(檔案名稱含有很多空格)。 -不能完成操作,因資料夾路徑過長。 -您必須選擇一個檔案 -您必須選擇最少一個檔案 -項目過多 -無法開啟為 {0} 壓縮檔 -開啟為 {0} 壓縮檔 -壓縮檔以偏移值開啟 -3300 -正在解壓縮 -正在壓縮 -測試 -正在開啟... -正在掃瞄... -正在移除 -3320 -正在加入 -正在更新 -正在分析 -正在複製 -正在重新封裝 -正在略過 -正在刪除 -正在建立標頭 -3400 -解壓縮 -解壓縮至(&X): -請指定存放暫存壓縮檔的位置。 -3410 -路徑模式: -完整的路徑名稱 -不要路徑名稱 -絕對路徑 -相對路徑 -3420 -覆寫模式 -覆寫前先詢問我 -覆寫時不詢問 -略過現有的檔案 -自動重新命名 -自動重新命名現有的檔案 -3430 -刪除重複的根目錄 -恢復檔案安全設定 -3500 -確認取代檔案 -目的資料夾已包含要處理的檔案。 -您要取代現有的檔案 -而改用這個檔案嗎? -{0} 位元組 -自動重新命名(&U) -3700 -'{0}' 未支援此壓縮方式。 -'{0}' 中的資料含有錯誤。檔案已損壞。 -'{0}' 的 CRC 驗證失敗。檔案已損壞。 -加密檔 '{0}' 中的資料含有錯誤。錯誤的密碼? -加密檔 '{0}' 的 CRC 驗證失敗。錯誤的密碼? -3710 -錯誤的密碼? -3721 -不支援此壓縮方式 -資料含有錯誤 -CRC 驗證失敗 -資料不能使用 -資料異常終結 -有效負載盡頭外還有其他資料 -不是壓縮檔 -標頭錯誤 -密碼錯誤 -3763 -壓縮檔的開端不能使用 -未能確認壓縮檔的開端 - - - -不支援的功能 -3800 -輸入密碼 -輸入密碼: -重新輸入密碼: -顯示密碼(&S) -密碼不一致 -僅能使用英文字母、數字和特殊字元 (!, #, $, ...) 當作密碼 -密碼太長 -密碼 -3900 -經過時間: -剩餘時間: -大小: -速度: -已處理: -壓縮率: -錯誤數: -壓縮檔: -4000 -加入壓縮檔 -壓縮檔(&A): -更新模式(&U): -壓縮檔格式(&F): -壓縮層級(&L): -壓縮方式(&M): -字典大小(&D): -字組大小(&W): -結實區塊大小: -CPU 線程數: -參數(&P): -選項 -建立自解壓縮檔(&X) -壓縮共用檔案 -加密 -加密方法: -加密檔名(&N) -壓縮時記憶體使用: -解壓縮時記憶體使用: -壓縮後刪除檔案 -4040 -儲存符號連結 -儲存硬連結 -儲存附加資料流 -儲存檔案安全設定 -4050 -封存 -最快速壓縮 -快速壓縮 -一般壓縮 -最大壓縮 -極致壓縮 -4060 -加入並取代檔案 -更新並加入檔案 -更新現有的檔案 -同步處理檔案 -4070 -瀏覽 -所有檔案 -非結實 -結實 -6000 -複製 -移動 -複製到: -移動到: -正在複製... -正在移動... -正在重新命名... -選擇目標資料夾。 -未支援的操作。 -重新命名檔案或資料夾時發生錯誤 -確認複製檔案 -您確定要複製檔案至壓縮檔? -6100 -確認刪除檔案 -確認刪除資料夾 -確認刪除多個檔案 -您確定要刪除 '{0}' 嗎? -您確定要刪除資料夾 '{0}' 以及它所有的內容嗎? -您確定要刪除這 {0} 個項目嗎? -正在刪除... -刪除檔案或資料夾時發生錯誤 -系統不能移動路徑過長的檔案到資源回收筒 -6300 -建立資料夾 -建立檔案 -資料夾名稱: -檔案名稱: -新增資料夾 -新增檔案 -建立資料夾時發生錯誤 -建立檔案時發生錯誤 -6400 -註解 -註解(&C): -選取 -取消選取 -遮罩: -6600 -內容 -資料夾歷程記錄 -診斷訊息 -訊息 -7100 -電腦 -網路 -文件 -系統 -7200 -加入 -解壓縮 -測試 -複製 -移動 -刪除 -資訊 -7300 -分割檔案 -分割到(&S): -分割壓縮檔,位元組(&V): -正在分割... -確認分割 -您確定要分割檔案為 {0} 個? -分割大小必須小於原始檔案大小 -不正確的分割大小 -指定的分割大小: {0} 位元組。\n您確定要分割為這些壓縮檔嗎? -7400 -合併檔案 -合併到(&C): -正在合併... -僅選取第一個檔案 -未能確認此檔案為完整檔案分割出來的一部分 -找不到完整檔案的其他部分 -7500 -正在計算驗證值... -驗證值資訊 -資料的 CRC 驗證值: -資料及名稱的 CRC 驗證值: -7600 -效能測試 -記憶體使用: -壓縮 -解壓縮 -評等 -整體評等 -目前 -結果 -CPU 使用 -評等 / 使用 -通過數: -7700 -連結 -連結 -連結自: -連結到: -7710 -連結類型 -硬連結 -檔案符號連結 -目錄符號連結 -目錄連接點 diff --git a/Utils/7-Zip/License.txt b/Utils/7-Zip/License.txt deleted file mode 100644 index f1e7690ee..000000000 --- a/Utils/7-Zip/License.txt +++ /dev/null @@ -1,56 +0,0 @@ - 7-Zip - ~~~~~ - License for use and distribution - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - 7-Zip Copyright (C) 1999-2016 Igor Pavlov. - - Licenses for files are: - - 1) 7z.dll: GNU LGPL + unRAR restriction - 2) All other files: GNU LGPL - - The GNU LGPL + unRAR restriction means that you must follow both - GNU LGPL rules and unRAR restriction rules. - - - Note: - You can use 7-Zip on any computer, including a computer in a commercial - organization. You don't need to register or pay for 7-Zip. - - - GNU LGPL information - -------------------- - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You can receive a copy of the GNU Lesser General Public License from - http://www.gnu.org/ - - - unRAR restriction - ----------------- - - The decompression engine for RAR archives was developed using source - code of unRAR program. - All copyrights to original unRAR code are owned by Alexander Roshal. - - The license for original unRAR code has the following restriction: - - The unRAR sources cannot be used to re-create the RAR compression algorithm, - which is proprietary. Distribution of modified unRAR sources in separate form - or as a part of other software is permitted, provided that it is clearly - stated in the documentation and source comments that the code may - not be used to develop a RAR (WinRAR) compatible archiver. - - - -- - Igor Pavlov diff --git a/Utils/7-Zip/Uninstall.exe b/Utils/7-Zip/Uninstall.exe deleted file mode 100644 index dab4e4e8a..000000000 Binary files a/Utils/7-Zip/Uninstall.exe and /dev/null differ diff --git a/Utils/7-Zip/descript.ion b/Utils/7-Zip/descript.ion deleted file mode 100644 index 914077b90..000000000 --- a/Utils/7-Zip/descript.ion +++ /dev/null @@ -1,14 +0,0 @@ -7-zip.chm 7-Zip Help -7-Zip.dll 7-Zip Plugin -7-Zip32.dll 7-Zip Plugin 32-bit -7z.dll 7-Zip Engine -7z.exe 7-Zip Console -7z.sfx 7-Zip GUI SFX -7zCon.sfx 7-Zip Console SFX -7zFM.exe 7-Zip File Manager -7zg.exe 7-Zip GUI -descript.ion 7-Zip File Descriptions -history.txt 7-Zip History -Lang 7-Zip Translations -license.txt 7-Zip License -readme.txt 7-Zip Overview diff --git a/Utils/7-Zip/readme.txt b/Utils/7-Zip/readme.txt deleted file mode 100644 index 228e9a0ce..000000000 --- a/Utils/7-Zip/readme.txt +++ /dev/null @@ -1,51 +0,0 @@ -7-Zip 16.04 ------------ - -7-Zip is a file archiver for Windows NT / 2000 / 2003 / 2008 / 2012 / XP / Vista / 7 / 8 / 10. - -7-Zip Copyright (C) 1999-2016 Igor Pavlov. - -The main features of 7-Zip: - - - High compression ratio in the new 7z format - - Supported formats: - - Packing / unpacking: 7z, XZ, BZIP2, GZIP, TAR, ZIP and WIM. - - Unpacking only: AR, ARJ, CAB, CHM, CPIO, CramFS, DMG, EXT, FAT, GPT, HFS, - IHEX, ISO, LZH, LZMA, MBR, MSI, NSIS, NTFS, QCOW2, RAR, - RPM, SquashFS, UDF, UEFI, VDI, VHD, VMDK, WIM, XAR and Z. - - Fast compression and decompression - - Self-extracting capability for 7z format - - Strong AES-256 encryption in 7z and ZIP formats - - Integration with Windows Shell - - Powerful File Manager - - Powerful command line version - - Localizations for 85 languages - - -7-Zip is free software distributed under the GNU LGPL (except for unRar code). -Read License.txt for more information about license. - - - This distribution package contains the following files: - - 7zFM.exe - 7-Zip File Manager - 7-zip.dll - Plugin for Windows Shell - 7-zip32.dll - Plugin for Windows Shell (32-bit plugin for 64-bit system) - 7zg.exe - GUI module - 7z.exe - Command line version - 7z.dll - 7-Zip engine module - 7z.sfx - SFX module (Windows version) - 7zCon.sfx - SFX module (Console version) - - License.txt - License information - readme.txt - This file - History.txt - History of 7-Zip - 7-zip.chm - User's Manual in HTML Help format - descript.ion - Description for files - - Lang\en.ttt - English (base) localization file - Lang\*.txt - Localization files - - ---- -End of document diff --git a/Utils/DCS_ControlAPI.txt b/Utils/DCS_ControlAPI.txt deleted file mode 100644 index a0650d801..000000000 --- a/Utils/DCS_ControlAPI.txt +++ /dev/null @@ -1,565 +0,0 @@ -DCS Simulation Control User Scripts -==================================== - -The behaviour of the DCS can be altered using the *GameGUI.lua scripts. -You define the hooks to the DCS events, and then do what you want using the provided API. -=================================================================================================== - -When loading, DCS searches for Saved Games\DCS\Scripts\*GameGUI.lua files, -sorts them by name and then loads into the GUI Lua-state. -Each user script is loaded into an isolated environment, so the only -thing they share is the state of the simulator. - -Each script defines a set of callbacks to the DCS events and sets them with the call - DCS.setUserCallbacks(cb_table) -For each callback type the hooks of all user scripts will be called in order of loading. - -For callbacks which are supposed to returning a value, currently there are 3 of them: - onPlayerTryConnect - onPlayerTrySendChat - onPlayerTryChangeSlot -returning a value means breaking the hook call chain. -Returning nothing (or nil) means continuing the hook chain, which ends with the default allow-all handlers. - -The example user script 'testGameGUI.lua': ----------------------------------------------------------------------------------------------- -local test = {} - -function test.onPlayerTryConnect(ipaddr, name, ucid, playerID) - print('onPlayerTryConnect(%s, %s, %s, %d)', ipaddr, name, ucid, playerID) - -- if you want to gently intercept the call, allowing other user scripts to get it, - -- you better return nothing here - return true -- allow the player to connect -end - -function test.onSimulationStart() - print('Current mission is '..DCS.getMissionName()) -end - -DCS.setUserCallbacks(test) -- here we set our callbacks ----------------------------------------------------------------------------------------------- - - -The available API are documented below. -The full list of the callbacks is at the end of this document. - -In addition, all standard lua 5.1 libraries are available as well, namely: -base api, like print, etc, -math.* -table.* -string.* -io.* -os.* -debug.* - -=================================================================================================== - - - -Lua File System (lfs) API -------------------------------- -lfs.currentdir() -> string - Returns the path of the DCS install folder - -lfs.writedir() -> string - Returns the path of the current 'Saved Games\DCS' folder. - -lfs.tempdir() -> string - Returns the pat of the DCS Temp folder (AppData\Local\Temp\DCS). - -lfs.mkdir() -lfs.rmdir() -lfs.attributes() -lfs.dir() -lfs.normpath() -lfs.realpath() - - - -DCS Control API, table 'DCS.*' -------------------------------- - -DCS.setPause(bool) - Pauses/resumes the simulation. Server-side only. - -DCS.getPause() -> bool - true if simulation is paused - -DCS.stopMission() - stops current mission - -DCS.exitProcess() - Exits the DCS process. - -DCS.isMultiplayer() -> bool - True when running in the multiplayer mode. - -DCS.isServer() -> bool - True when running as a server or in the single-player mode. - -DCS.getModelTime() -> number - returns current DCS simulation time in seconds. - -DCS.getRealTime() -> number - returns current DCS real time in seconds relative to the DCS start time. - -DCS.getMissionOptions() -> table - Returns the value of 'mission.options' - -DCS.getMissionDescription() -> string - translated mission.descriptionText string - -DCS.getAvailableCoalitions() -> table { - [coalition_id] = { name = "coalition name", } - ... -} - Returns a list of coalitions which have available slots. - -DCS.getAvailableSlots(coalitionID) -> array of {unitId, type, role, callsign, groupName, country} - Returns the list of available slots. - NOTE: the returned unitID is actually a slotID, which for multi-seat units is 'unitID_seatID' - -DCS.getCurrentMission() -> table with the currently loaded mission - NOTE: to get valid mission.options use DCS.getMissionOptions() - -DCS.getMissionName() -> string - Returns the name of the current mission - -DCS.getMissionFilename() -> string - Returns the file name of the current mission (returns nil when acting as a multiplayer client). - -DCS.getMissionResult(string side) -> integer [0, 100] - Gets missin result for either 'red' or 'blue' - -DCS.getUnitProperty(missionId, propertyId) -> string - propertyId: - DCS.UNIT_RUNTIME_ID, // unique within runtime mission. int - DCS.UNIT_MISSION_ID, // unique within mission file. int>0 - DCS.UNIT_NAME, // unit name, as assigned by mission designer. - DCS.UNIT_TYPE, // unit type (Ural, ZU-23, etc) - DCS.UNIT_CATEGORY, - DCS.UNIT_GROUP_MISSION_ID, // group ID, unique within mission file. int>0 - DCS.UNIT_GROUPNAME, // group name, as assigned by mission designer. - DCS.UNIT_GROUPCATEGORY, - DCS.UNIT_CALLSIGN, - DCS.UNIT_HIDDEN,// ME hiding - DCS.UNIT_COALITION,// "blue", "red" or "unknown" - DCS.UNIT_COUNTRY_ID, - DCS.UNIT_TASK, //"unit.group.task" - DCS.UNIT_PLAYER_NAME, // valid for network "humanable" units - DCS.UNIT_ROLE,//"artillery_commander", "instructor", etc - DCS.UNIT_INVISIBLE_MAP_ICON,//ME invisible map icon - -DCS.getUnitType(missionId) -> typeId - a shortcut for DCS.getUnitProperty(missionId, DCS.UNIT_TYPE) - -DCS.getUnitTypeAttribute(typeId, attr) -> string - Returns a value from Database: Objects[typeId][attr], - for example DCS.getUnitTypeAttribute("Ural", "DisplayName") - -DCS.writeDebriefing(str) - Writes a custom string to the debriefing file - -DCS.setUserCallbacks(cb_table) - Hooks the callbacks using the handlers from the provided table. - See: "GameGUI scripts" section. - - - -Logging API 'log.*' ------------------------- -Logging works as follows: -a) each log message is accompanied with 2 attributes: a subsystem, and level. -b) after each messages gets into a logger it passes (asynchronously) through - a series of output filters which decide where the message will be written to. - -Writing to log is done by: - -log.write(SUBSYSTEM_NAME, LOG_LEVEL, message, ...) - if there are any arguments after 'message', - the actual string is formed as string.format(message, ...) - - SUBSYSTEM_NAME is a string - LOG_LEVEL is one of the values, listed below - see log.set_output() - -log.set_output(log_file_name_wo_ext, rule_subsystem_name, rule_level_mask, rule_output_mode) - - the args: - log_file_name_wo_ext: resulting log will be written to $WRITE_DIR/Logs/.log - - rule_subsytem_name: the name of the subsystem whose messages to write or empty string to match all subsystems - - rule_level_mask: a sum of log-level bit flags to match messages - valid flags are: - log.ALERT - log.ERROR - log.WARNING - log.INFO - log.DEBUG - log.ALL - includes all of the above - log.TRACE - a special level which is excluded from dcs.log file - - rule_output_mode: a sum of output flags: - log.MESSAGE - log.TIME - log.MODULE - this is a 'subsystem', not a dlc - log.LEVEL - log.FULL - all of the above - -So, in order to save net.trace(msg) messages to a file, you should issue a call: - log.set_output('lua-net', 'LuaNET', log.TRACE, log.MESSAGE + log.TIME) - - This will write to a Logs/lua-net.log file - -Or, to save everything lua-network-related: - log.set_output('lua-net', 'LuaNET', log.TRACE + log.ALL, log.MESSAGE + log.TIME + log.LEVEL) - -To close the log file, you must use - log.set_output('lua-net', '', 0, 0) - -log.* API is available in the 'Saved Games\DCS\Config\autoexec.cfg' file as well so you can control log output in you local machine. - - - -Network specific API, available through the table 'net.' ----------------------------------------------------------------- - -net.log(msg) -- equivalent to log.write('LuaNET', log.INFO, msg) -net.trace(msg) -- equivalent to log.write('LuaNET', log.TRACE, msg) - -What is the difference: log() always writes to dcs.log, but may lose messages if the output rate is too high. -trace() output never appears in the dcs.log file, it must be explicitly directed to a log file. -It never loses messages when there's an active output, but it may block if output rate is higher than writing to the log file. -To control logger output you can use $WRITE_DIR/Config/autoexec.cfg file, or call this from your network script -(log.* API, see above) - - -net.dostring_in(state, string) -> string - Executes a lua-string in a given internal lua-state and returns a string result - Valid state names are: - 'config': the state in which $INSTALL_DIR/Config/main.cfg is executed, as well as $WRITE_DIR/Config/autoexec.cfg - used for configuration settings - 'mission': holds current mission - 'export': runs $WRITE_DIR/Scripts/Export.lua and the relevant export API - -net.send_chat(string message, bool all) - Send chat message. If not all, then send to my coalition (side) only. - -net.send_chat_to(string message, playerID to) - Send direct chat message to a player - Server-side only: - net.send_chat_to(string message, playerID to[, playerID from]) - -net.recv_chat(message[, int from=0]) - Receive chat message locally[, pretending it was sent by another player]. - from = 0 means from the system - -net.load_mission(miz_filename) - Loads a specified mission, temporarily overriding the server mission list. - SERVER ONLY - -net.load_next_mission() -> bool - Load the next mission from the server mission list. Returns false if list end is reached - SERVER ONLY - -net.get_player_list() -> array of playerID - Returns the list of currently connected players - -net.get_my_player_id() -> playerID - Returns the playerID of the local player. Currently always 1 for the server. - -net.get_server_id() -> playerID - Returns playerID of the server. Currently, always 1. - -net.get_player_info(playerID) -> table - Returns a table of all player attributes or nil if playerID is invalid - -net.get_player_info(playerID, attrName) -> value - Returns a value of a given attribute for the playerID. - - Currently defined attributes are: - 'id': playerID - 'name': player name - 'side': 0 - spectators, 1 - red, 2 - blue - 'slot': slotID of the player or '' - 'ping': ping of the player in ms - 'ipaddr': IP address of the player, SERVER ONLY - 'ucid': Unique Client Identifier, SERVER ONLY - -net.kick(id, message) - Kick a player. - -net.get_stat(playerID, statID) -> integer - Get statistics for player. statIDs are: - net.PS_PING (0) - ping (in ms) - net.PS_CRASH (1) - number of crashes - net.PS_CAR (2) - number of destroyed vehicles - net.PS_PLANE (3) - ... planes/helicopters - net.PS_SHIP (4) - ... ships - net.PS_SCORE (5) - total score - net.PS_LAND (6) - number of landings - net.PS_EJECT (7) - of ejects - - -net.get_name(playerID) -> string - The same as net.get_player_info(playerID, 'name') - FIXME: implement in ServMan_compat.lua ? - -net.get_slot(playerID) -> sideID, slotID - The same as: - net.get_player_info(playerID, 'side'), net.get_player_info(playerID, 'slot') - FIXME: implement in ServMan_compat.lua ? - - - -net.set_slot(sideID, slotID) - Try to set the local player's slot. Empty slotID ('') puts the player into spectators. - -net.force_player_slot(playerID, sideID, slotID) -> boolean - Forces a player to occupy a set slot. Slot '' means no slot (moves player to spectators) - SideID: 0 - spectators, 1 - red, 2 - blue - -net.set_name(playerID, name) -- OBSOLETE, works only locally - - -net.lua2json(value) -> string - Convert a Lua value to JSON string - -net.json2lua(json_string) -> value - Convert JSON string to a Lua value - - -LuaExport API 'Export.Lo*' ----------------------------------------------------------------- -See Scripts/Export.lua for the documentation. Note that all export -API functions are available here in the Export. namespace, not the global one. -In multiplayer the availability of the API on clients depends on the server setting. - -The calls to check export capabilities: - Export.LoIsObjectExportAllowed() -- returns the value of server.advanced.allow_object_export - Export.LoIsSensorExportAllowed() -- returns the value of server.advanced.allow_sensor_export - Export.LoIsOwnshipExportAllowed() -- returns the value of server.advanced.allow_ownship_export - -These calls are only available on clients when LoIsObjectExportAllowed() is true: - Export.LoGetObjectById - Export.LoGetWorldObjects - -These calls are only available on clients when LoIsSensorExportAllowed() is true: - Export.LoGetTWSInfo - Export.LoGetTargetInformation - Export.LoGetLockedTargetInformation - Export.LoGetF15_TWS_Contacts - Export.LoGetSightingSystemInfo - Export.LoGetWingTargets - -These calls are only available on clients when LoIsOwnshipExportAllowed() is true: - Export.LoGetPlayerPlaneId - Export.LoGetIndicatedAirSpeed - Export.LoGetAngleOfAttack - Export.LoGetAngleOfSideSlip - Export.LoGetAccelerationUnits - Export.LoGetVerticalVelocity - Export.LoGetADIPitchBankYaw - Export.LoGetTrueAirSpeed - Export.LoGetAltitudeAboveSeaLevel - Export.LoGetAltitudeAboveGroundLevel - Export.LoGetMachNumber - Export.LoGetRadarAltimeter - Export.LoGetMagneticYaw - Export.LoGetGlideDeviation - Export.LoGetSideDeviation - Export.LoGetSlipBallPosition - Export.LoGetBasicAtmospherePressure - Export.LoGetControlPanel_HSI - Export.LoGetEngineInfo - Export.LoGetSelfData - Export.LoGetCameraPosition - Export.LoSetCameraPosition - Export.LoSetCommand - Export.LoGetMCPState - Export.LoGetRoute - Export.LoGetNavigationInfo - Export.LoGetPayloadInfo - Export.LoGetWingInfo - Export.LoGetMechInfo - Export.LoGetRadioBeaconsStatus - Export.LoGetVectorVelocity - Export.LoGetVectorWindVelocity - Export.LoGetSnares - Export.LoGetAngularVelocity - Export.LoGetHeightWithObjects - Export.LoGetFMData - -These functions are always available: - Export.LoGetPilotName - Export.LoGetAltitude - Export.LoGetNameByType - Export.LoGeoCoordinatesToLoCoordinates - Export.LoCoordinatesToGeoCoordinates - Export.LoGetVersionInfo - Export.LoGetWindAtPoint - Export.LoGetModelTime - Export.LoGetMissionStartTime - -These are not available in the *GameGUI state: --- Export.LoSetSharedTexture --- Export.LoRemoveSharedTexture --- Export.LoUpdateSharedTexture - - -------------------------------------------------------------------------------------------- ---- The Callbacks. -------------------------------------------------------------------------------------------- - -function onMissionLoadBegin() -end - -function onMissionLoadProgress(progress, message) -end - -function onMissionLoadEnd() -end - - -function onSimulationStart() -end - -function onSimulationStop() -end - -function onSimulationFrame() -end - -function onSimulationPause() -end - -function onSimulationResume() -end - - -function onGameEvent(eventName,arg1,arg2,arg3,arg4) ---"friendly_fire", playerID, weaponName, victimPlayerID ---"mission_end", winner, msg ---"kill", killerPlayerID, killerUnitType, killerSide, victimPlayerID, victimUnitType, victimSide, weaponName ---"self_kill", playerID ---"change_slot", playerID, slotID, prevSide ---"connect", playerID, name ---"disconnect", playerID, name, playerSide, reason_code ---"crash", playerID, unit_missionID ---"eject", playerID, unit_missionID ---"takeoff", playerID, unit_missionID, airdromeName ---"landing", playerID, unit_missionID, airdromeName ---"pilot_death", playerID, unit_missionID -end - -function onNetConnect(localPlayerID) -end - -function onNetMissionChanged(newMissionName) -end - -function onNetDisconnect(reason_msg, err_code) -end - --- disconnect reason codes: - net.ERR_INVALID_ADDRESS - net.ERR_CONNECT_FAILED - net.ERR_WRONG_VERSION - net.ERR_PROTOCOL_ERROR - net.ERR_TAINTED_CLIENT - net.ERR_INVALID_PASSWORD - net.ERR_BANNED - net.ERR_BAD_CALLSIGN - - net.ERR_TIMEOUT - net.ERR_KICKED - - -function onPlayerConnect(id) -end - -function onPlayerDisconnect(id, err_code) - -- this is never called for local playerID -end - -function onPlayerStart(id) - -- a player entered the simulation - -- this is never called for local playerID -end - -function onPlayerStop(id) - -- a player left the simulation (happens right before a disconnect, if player exited by desire) - -- this is never called for local playerID -end - -function onPlayerChangeSlot(id) - -- a player successfully changed the slot - -- this will also come as onGameEvent('change_slot', playerID, slotID), - -- if allowed by server.advanced.event_Connect setting -end - - ---- These 3 functions are different from the rest: ---- 1. they are called directly from the network code, so try to make them as fast as possible ---- 2. they return a result --- The code shows the default implementations. - -function onPlayerTryConnect(addr, name, ucid, playerID) --> true | false, "disconnect reason" - return true -end - -function onPlayerTrySendChat(playerID, msg, all) -- -> filteredMessage | "" - empty string drops the message - return msg -end - -function onPlayerTryChangeSlot(playerID, side, slotID) -- -> true | false - return true -end - - - --- GUI callbacks -function onChatMessage(message, from) - -- this one may be useful for chat archiving -end - -function onShowRadioMenu(a_h) -end - -function onShowPool() -end - -function onShowGameMenu() -end - -function onShowBriefing() -end - -function onShowChatAll() -end - -function onShowChatTeam() -end - -function onShowChatRead() -end - -function onShowMessage(a_text, a_duration) -end - -function onTriggerMessage(message, duration, clearView) -end - -function onRadioMessage(message, duration) -end - -function onRadioCommand(command_message) -end - -=================================================================================================== - -Happy hacking! - -Sincerely, -dsb at eagle dot ru diff --git a/Utils/Deploy.sh b/Utils/Deploy.sh deleted file mode 100644 index 5527631f0..000000000 --- a/Utils/Deploy.sh +++ /dev/null @@ -1,5 +0,0 @@ -cd slate -git add -A -git commit -a -m "Doc Update" -git push -./deploy.sh \ No newline at end of file diff --git a/Utils/GenerateDocumentations.bat b/Utils/GenerateDocumentations.bat deleted file mode 100644 index 144cc2a6f..000000000 --- a/Utils/GenerateDocumentations.bat +++ /dev/null @@ -1,13 +0,0 @@ -@echo off - -:: Generate Luadocumentor documentation -echo Generating LuaDocumentor Documentation -echo -------------------------------------- -call luadocumentor.bat - -rem :: Generate Slate documentation -rem echo Generating Slate Documentation -rem echo ------------------------------ -rem cd "Slate Documentation Generator" -rem call Generate.bat -rem cd .. \ No newline at end of file diff --git a/Utils/Generate_Moose.bat b/Utils/Generate_Moose.bat deleted file mode 100644 index ddac0d0a4..000000000 --- a/Utils/Generate_Moose.bat +++ /dev/null @@ -1,5 +0,0 @@ -%~dp0luarocks\lua5.1.exe %1 %2 %3 %4 %5 -call %~dp0LuaSrcDiet.bat --basic --opt-emptylines %5\Moose.lua -rem del %5\Moose.lua -rem copy %5\Moose_.lua %5\Moose.lua -rem del Moose_.lua diff --git a/Utils/Patterns.txt b/Utils/Patterns.txt deleted file mode 100644 index 30f87edaa..000000000 --- a/Utils/Patterns.txt +++ /dev/null @@ -1,19 +0,0 @@ -Replace hyperlinks from md to bb -\[(.*?)\]\((.*?)\) -[URL="$2"]$1[/URL] - -Replace bold from md to bb -\*\*(.*?)\*\* -[b]$1[/b] - -Replace heading 3 from md to bb -### (.*?)$ -[SIZE=5]$1[/SIZE] - -Replace heading 2 from md to bb -## (.*?)$ -[SIZE=6]$1[/SIZE] - -Replace heading 1 from md to bb -# (.*?)$ -[SIZE=7]$1[/SIZE] diff --git a/Utils/Slate Documentation Generator/Generate.bat b/Utils/Slate Documentation Generator/Generate.bat deleted file mode 100644 index bcd2fd145..000000000 --- a/Utils/Slate Documentation Generator/Generate.bat +++ /dev/null @@ -1,16 +0,0 @@ -@echo off -:: Generate the Markdown doc -"./bin/SlateDocGenerator2.exe" "../../../MOOSE/Moose Development/Moose" ../../../slate/source - -:: Do some cleanup -del /s /q "TreeHierarchySorted.csv" -del /s /q "FuctionList.txt" -rmdir /s /q "./bin/TEMP" - -:: Copy the Images that go with the documentation -robocopy ../../docs/Presentations ../../../slate/source/includes/Pictures /MIR /NJH /NJS - -:: Deploy the Slate documentation -echo A shell will open. To deploy the Slate website, please run the following command. Otherwise, simply close the shell. -echo $ Moose/Utils/Deploy.sh -%localappdata%\GitHub\GitHub.appref-ms --open-shell \ No newline at end of file diff --git a/Utils/Slate Documentation Generator/bin/SlateDocGenerator2.exe b/Utils/Slate Documentation Generator/bin/SlateDocGenerator2.exe deleted file mode 100644 index ad688e4b7..000000000 Binary files a/Utils/Slate Documentation Generator/bin/SlateDocGenerator2.exe and /dev/null differ diff --git a/Utils/Slate Documentation Generator/src/DataStorer.au3 b/Utils/Slate Documentation Generator/src/DataStorer.au3 deleted file mode 100644 index b5903009b..000000000 --- a/Utils/Slate Documentation Generator/src/DataStorer.au3 +++ /dev/null @@ -1,174 +0,0 @@ -; This file only constains function related to storing the hierarchy in a tree-like tructure - -Func AddNode($Kind, $Module ,$Node, $Parent, $File, $CarretPos) - FileSetPos($DataFile, 0, $FILE_END) - - If $Parent == "" And $Kind == "type" Then - $Parent = "ROOT" - ElseIf $Kind == "module" Then - $Module = " " - $Parent = " " - EndIf - FileWrite($DataFile, "@K="&$Kind&", @M="&$Module&", @N="&$Node&", @P="&$Parent&", @F="&$File&", @C="&$CarretPos&","&@CRLF) -EndFunc - -; Search node by name and returns one data -Func GetData($Node, $Data) - FileSetPos($DataFile, 0, $FILE_BEGIN) - Local $CurrentLine = "" - Local $CurrentData - Local $RegexResult - Local $Regex - Switch $Data - Case "kind" - $Regex = "\@K=(.+?)," - Case "parent" - $Regex = "\@P=(.+?)," - Case "file" - $Regex = "\@F=(.+?)," - Case "carretpos" - $Regex = "\@C=(.+?)," - EndSwitch - FileSetPos($DataFile, 0, $FILE_BEGIN) - Do - $CurrentLine = FileReadLine($DataFile) - If @error == -1 Then - Return "" - ExitLoop - EndIf - $CurrentData = StringRegExp($CurrentLine, "\@N=(.+?),", $STR_REGEXPARRAYMATCH) - - Until $Node == $CurrentData[0] - $CurrentData = StringRegExp($CurrentLine, $Regex, $STR_REGEXPARRAYMATCH) - Return $CurrentData[0] -EndFunc - - -; Returns an array of parent nodes, up to the root, starting with the root -Func GetParents($Node) - Local $CurrentParent = $Node - Local $ParentsArray[0] - Local $NbOfParents = 1 - - While $CurrentParent <> "ROOT" - ReDim $ParentsArray[$NbOfParents] - $ParentsArray[$NbOfParents-1] = $CurrentParent - - $CurrentParent = GetData($CurrentParent, "parent") - If $CurrentParent == "" Then - FileWrite($Log, "ERROR : Couldn't find "&$ParentsArray[$NbOfParents-1]&"'s parent !") - $CurrentParent = "ERROR !" - ReDim $ParentsArray[$NbOfParents] - $ParentsArray[$NbOfParents-1] = $CurrentParent - ExitLoop - EndIf - $NbOfParents += 1 - WEnd - - _ArrayReverse($ParentsArray) - _ArrayDelete($ParentsArray, $NbOfParents) - Return $ParentsArray -EndFunc - - - -Func DataSort() - Local $SortedDataFile = FileOpen(@ScriptDir & "\TreeHierarchySorted.csv", $FO_OVERWRITE) - Local $Line = "" - Local $LineNb = 1 - Local $RegexResults - Local $CurrentModule - Local $CurrentType - - FileSetPos($DataFile, 0, $FILE_BEGIN) - - While True - $Line = FileReadLine($DataFile) - If @error then ExitLoop - - $RegexResults = StringRegExp($Line, "\@K=(.+?),", $STR_REGEXPARRAYMATCH) - If $RegexResults[0] == "module" Then - ConsoleWrite(".") - $RegexResults = StringRegExp($Line, "\@N=(.+?),", $STR_REGEXPARRAYMATCH) - $CurrentModule = $RegexResults[0] - FileWriteLine($SortedDataFile, $Line) - FileClose($DataFile) - _FileWriteToLine(@ScriptDir & "\TreeHierarchy.csv", $LineNb, "", True) - $DataFile = FileOpen(@ScriptDir & "\TreeHierarchy.csv", 1) - FileSetPos($DataFile, 0, $FILE_BEGIN) - $LineNb = 1 - - While True - $Line = FileReadLine($DataFile) - If @error then ExitLoop - - $RegexResults = StringRegExp($Line, "\@K=(.+?),", $STR_REGEXPARRAYMATCH) - If $RegexResults[0] == "type" Then - $RegexResults = StringRegExp($Line, "\@M=(.+?),", $STR_REGEXPARRAYMATCH) - If $RegexResults[0] == $CurrentModule Then - $RegexResults = StringRegExp($Line, "\@N=(.+?),", $STR_REGEXPARRAYMATCH) - $CurrentType = $RegexResults[0] - FileWriteLine($SortedDataFile, $Line) - FileClose($DataFile) - _FileWriteToLine(@ScriptDir & "\TreeHierarchy.csv", $LineNb, "", True) - $DataFile = FileOpen(@ScriptDir & "\TreeHierarchy.csv", 1) - FileSetPos($DataFile, 0, $FILE_BEGIN) - $LineNb = 1 - - While True - $Line = FileReadLine($DataFile) - If @error then ExitLoop - - $RegexResults = StringRegExp($Line, "\@K=(.+?),", $STR_REGEXPARRAYMATCH) - If $RegexResults[0] == "function" Then - $RegexResults = StringRegExp($Line, "\@P=(.+?),", $STR_REGEXPARRAYMATCH) - If $RegexResults[0] == $CurrentType Then - FileWriteLine($SortedDataFile, $Line) - FileClose($DataFile) - _FileWriteToLine(@ScriptDir & "\TreeHierarchy.csv", $LineNb, "", True) - $DataFile = FileOpen(@ScriptDir & "\TreeHierarchy.csv", 1) - FileSetPos($DataFile, 0, $FILE_BEGIN) - $LineNb = 0 - EndIf - EndIf - $LineNb += 1 - WEnd - FileSetPos($DataFile, 0, $FILE_BEGIN) - $LineNb = 0 - EndIf - EndIf - $LineNb += 1 - WEnd - FileSetPos($DataFile, 0, $FILE_BEGIN) - $LineNb = 0 - EndIf - $LineNb += 1 - Wend - If FileGetSize(@ScriptDir & "\TreeHierarchy.csv") <> 0 Then - FileWrite($Log, "ERROR : Some items couldn't be sorted. Verify them in the file TreeHierarchy.csv"&@CRLF) - ConsoleWrite(@CRLF&"INFO : Some items couldn't be sorted. Verify them in the file TreeHierarchy.csv"&@CRLF) - EndIf - FileClose($DataFile) - $DataFile = $SortedDataFile -EndFunc - - -Func FindInFunctionList($String) - Local $Line = "" - Local $TempStringArray - FileSetPos($FunctionList, 0, $FILE_BEGIN) - ;FileWrite($Log, 'Trying to find the function prototype for : ' & $String & @CRLF) - While 1 - $Line = FileReadLine($FunctionList) - If @error = -1 Then - SetError(0) - FileWrite($Log, "ERROR : Couldn't find " & $String & " in file. Does this method exitsts ?" & @CRLF) - Return $String - EndIf - If StringInStr($Line, $String) Then - $TempStringArray = StringSplit($Line, "-") - $Line = "[" & $TempStringArray[1] & ":" & $TempStringArray[2] & "()]" & '(#' & StringLower($Line) & ')' - Return $Line - EndIf - WEnd -EndFunc \ No newline at end of file diff --git a/Utils/Slate Documentation Generator/src/Parser.au3 b/Utils/Slate Documentation Generator/src/Parser.au3 deleted file mode 100644 index 307b98d20..000000000 --- a/Utils/Slate Documentation Generator/src/Parser.au3 +++ /dev/null @@ -1,460 +0,0 @@ -; This file include every function strictly related to the parsing of data in .lua files - -; Get the first comment block after $CarretPos -; We will also grab function declaration if possible/applicable -; The return is a Array : CarretPosition|BlockContent|Declaration|CarretPositionStart -Func ReadNextBlock($File, $CarretPos) - local $CommentBlock = "" ; This is where we'll store the comment block - local $Declaration = "" ; This is the next line after the comment block : usually the declaration statement - local $CurrentLine = "" - local $CurrentCarretPos = 0 - - local $IsCommentBlock = False - - local $RegExResult - local $RegexPos - - ; Start reading from $CarretPos - FileSetPos($File, $CarretPos, $FILE_BEGIN) - - ; Read till we find a comment block - Do - $CurrentLine = FileReadLine($File) - If @error Then ; We probably reached the eof - Local $ReturnArray[3] = [$CurrentCarretPos, "", ""] - Return $ReturnArray - ElseIf StringInStr($CurrentLine, "---") Then - $IsCommentBlock = True - EndIf - Until $IsCommentBlock - - Local $CarretPosStart = FileGetPos($File) - StringLen($CurrentLine) - 2 - - ; Add the first line to our comment block - $RegExResult = StringRegExp($CurrentLine, "---(.*)", $STR_REGEXPARRAYMATCH) - If Not @error Then ; The first line of the comment could be empty ! - $CommentBlock &= $RegExResult[0]&@CRLF - EndIf - - ; Read the comment block - Do - $CurrentCarretPos = FileGetPos($File) - $CurrentLine = FileReadLine($File) - If StringInStr($CurrentLine, "--") Then ; If we can't find any "--" in the line, then it's not the comment block anymore - $RegExResult = StringRegExp($CurrentLine, "--(.*)", $STR_REGEXPARRAYMATCH) - If Not @error Then; The line of the comment could be empty ! - $CommentBlock &= $RegExResult[0]&@CRLF - EndIf - Else - $IsCommentBlock = False - EndIf - Until Not $IsCommentBlock - - ; Ok, so now this is strange. If the comment block is class', we're going to have to check the - ; next comment block. If this next comment block contains a field, that is the same name as the class, then this - ; new comment block contains the whole informtion for the class. This is very shitty, but it's a workaround to - ; make intellisense show classes info while programing - If ParseForOneTag($CommentBlock, "@type") Then - Local $CommentBlock2 = "" - Do - $CurrentLine = FileReadLine($File) - If @error Then - Local $ReturnArray[3] = [$CurrentCarretPos, "", ""] - Return $ReturnArray - ElseIf StringInStr($CurrentLine, "---") Then - $IsCommentBlock = True - EndIf - Until $IsCommentBlock - - $RegExResult = StringRegExp($CurrentLine, "---(.*)", $STR_REGEXPARRAYMATCH) - If Not @error Then - $CommentBlock2 &= $RegExResult[0]&@CRLF - EndIf - - ; Yep, the next comment is the description of the class, let's read on ! - If StringInStr($CurrentLine, ParseForOneTag($CommentBlock, "@type")) And StringInStr($CurrentLine, "extend") Then - - Do - $CurrentLine = FileReadLine($File) - If StringInStr($CurrentLine, "--") Then - $RegExResult = StringRegExp($CurrentLine, "--(.*)", $STR_REGEXPARRAYMATCH) - If Not @error Then - $CommentBlock2 &= $RegExResult[0]&@CRLF - EndIf - Else - $IsCommentBlock = False - EndIf - Until Not $IsCommentBlock - - ; remove the line(s) with "@field" in the comment block. They are only needed for the intellisense hack - While 1 - $RegexResult = StringRegExp($CommentBlock2, "(.*)@field(.*)", $STR_REGEXPARRAYMATCH, $RegexPos) - $RegexPos = @extended - If @extended == 0 Then ExitLoop - - $CommentBlock2 = StringRegExpReplace($CommentBlock2, "(.*)@field(.*)", "", 1) - WEnd - - ; We also don't need the first line of the first comment block anymore... - ; $CommentBlock = StringRegExpReplace($CommentBlock, "(.*)", "", 1) - - ; append the description at the start of the comment block - $CommentBlock = $CommentBlock2&$CommentBlock - EndIf - - - ; We also need to check if the type is a list or a map. If so, the comment block does not describe a class, but a simple list / map. - ; It will have the formatting of a class, though, because it's closer closer to the actual code, even though it is highly confusing. - ; But it will only have 1 field : the list or map. - If StringInStr($CommentBlock, "@list") Then - $RegExResult = StringRegExp($CommentBlock, "@list\h<(.*?)>\h(.*)", $STR_REGEXPARRAYMATCH) - if not @error Then - $CommentBlock &= "@field #table["&$RegExResult[0]&"] "&$RegExResult[1] - EndIf - EndIf - ; TODO : Add support for @map the same way... - EndIf - - - - - ; We'll take the next line, as it might be the declaration statement - $Declaration = $CurrentLine - - - - ; let's do some cleanup - $CommentBlock = StringRegExpReplace($CommentBlock, "(?m)^\h+", "") ;remove leading whitespaces - $CommentBlock = StringRegExpReplace($CommentBlock, "(?m)\h+$", "") ;remove trailing whitespaces - $CommentBlock = StringRegExpReplace($CommentBlock, "(?m)^[#]+", "##### ") - $CommentBlock = StringRegExpReplace($CommentBlock, "(?m)^\h+", "") ;remove leading whitespaces again now that we removed the "#"s - $CommentBlock = StringRegExpReplace($CommentBlock, "(?m)-{3,}", "") ;remove sequences of at least 3 "-" which will mess up markdown - $CommentBlock = StringRegExpReplace($CommentBlock, "(?m)={3,}", "") ; remove sequences of at least 3 "=" which will mess up markdown - - Local $ReturnArray[4] = [$CurrentCarretPos, $CommentBlock, $Declaration, $CarretPosStart] - Return $ReturnArray -EndFunc - -; Parses the block and returns the data for one tag -; don't use it to find the function tag ! -Func ParseForOneTag($Block, $Tag) - Local $i = 1 - Local $DataArray[1] - Local $RegexResult[1] - Local $RegexPos = 1 - Local $Regex - - ; If we look for @usage, then it's a multiline data, the regex is different - If $Tag == "@usage" Then - $Regex = "(?s)@usage(.*)" - $RegexResult = StringRegExp($Block, $Regex, $STR_REGEXPARRAYMATCH, $RegexPos) - Else - $Regex = $Tag&"\h(.*)\s" - $RegexResult = StringRegExp($Block, $Regex, $STR_REGEXPARRAYMATCH, $RegexPos) - Endif - - If @error Then - Return "" - Else - Return $RegexResult[0] - EndIf - -EndFunc ;==>ReadOneTag - -; Parses the block and returns the data for multiple tags in an array -; Don't use it for @param ! -Func ParseForTags($Block, $Tag) - Local $i = 1 - Local $DataArray[1] - Local $RegexResult[1] - Local $RegexPos = 1 - - Local $Regex = $Tag&"(?m)\h([^\s]*)(?:\h)?([^\s]*)?(?:\h)?(.*)?$" - ; For each tag - While True - $RegexResult = StringRegExp($Block, $Regex, $STR_REGEXPARRAYMATCH, $RegexPos) - $RegexPos = @extended - If $RegexPos == 0 Then ; We couldn't find any tag - If Not $DataArray[0] Then - Return "" - Else - Return $DataArray - EndIf - EndIf - - ; Add the tag to the array.The array looks like this : type1|param1|description1|type2... - ReDim $DataArray[$i * 3] - $DataArray[($i * 3) - 3] = $RegexResult[0] - If $RegexResult[1] == "" Then - $DataArray[($i * 3) - 2] = "self" ; if the first param doesn't have a name, then it's self - Else - $DataArray[($i * 3) - 2] = $RegexResult[1] - EndIf - $DataArray[($i * 3) - 1] = $RegexResult[2] - $i += 1 - WEnd -EndFunc - -; Parses both the comment block and the declaration to find the function name and it's type -; Compares both of them if possible, but will always return the one in the comment block if possible -Func ParseFunctionName($CommentBlock, $Declaration) - local $RegExResult - local $FunctionNameFromDec - local $FunctionNameFromComment - local $ReturnArray[2] - - ; Parse for function name in both the comment block and the desclaration - $RegExResult = StringRegExp($CommentBlock, "\@function\h(?:(\[.*\]\h))?(.*)", $STR_REGEXPARRAYMATCH) - If Not @error Then - $FunctionNameFromComment = $RegExResult[1] - EndIf - $RegExResult = StringRegExp($Declaration, "function\h(?:.*\:)?(.*)\(.*\)", $STR_REGEXPARRAYMATCH) - If Not @error Then - $FunctionNameFromDec = $RegExResult[0] - EndIf - - ; compare them to each other - If $FunctionNameFromComment Then - If $FunctionNameFromDec <> $FunctionNameFromComment Then - FileWrite($Log,"CAUTION : The commented function doesn't match its declaration : "&$FunctionNameFromComment& " -> "&$Declaration&@CRLF) - EndIf - $ReturnArray[0] = $FunctionNameFromComment - ElseIf $FunctionNameFromDec Then - ;FileWrite($Log, "CAUTION: No data matching @function found in block, inferring the function name from its declaration : "& $FunctionNameFromDec & @CRLF) - $ReturnArray[0] = $FunctionNameFromDec - Else - $ReturnArray[0] = "" - $ReturnArray[1] = "" - return $ReturnArray - EndIf - - ;parses for function type in both the comment block and the desclaration - local $TypeFromComment - local $TypeFromDec - - $RegExResult = StringRegExp($Declaration, "function\h(.*):", $STR_REGEXPARRAYMATCH) - If Not @error Then - $TypeFromDec = $RegExResult[0] - EndIf - $RegExResult = StringRegExp($CommentBlock, "function\h\[parent=#(.*)\]", $STR_REGEXPARRAYMATCH) - If Not @error Then - $TypeFromComment = $RegExResult[0] - EndIf - - ; compare them to each other - If $TypeFromComment Then - If $TypeFromDec <> $TypeFromComment Then - FileWrite($Log,"CAUTION : The commented function type doesn't match its declaration : "&$TypeFromComment& " -> "&$Declaration&@CRLF) - EndIf - $ReturnArray[1] = $TypeFromComment - ElseIf $TypeFromDec Then - ;FileWrite($Log, "CAUTION: No function type found in block, inferring the function type from its declaration : "& $TypeFromDec & @CRLF) - $ReturnArray[1] = $TypeFromDec - Else - $ReturnArray[0] = "" - $ReturnArray[1] = "" - return $ReturnArray - EndIf - - Return $ReturnArray -EndFunc - -; Specifically designed to parse for @param tags -; will verify the comment by matching with the declaration (theoretically, I'm pretty sure it's bugged) -Func ParseParams($CommentBlock, $Declaration) - Local $ParamsFromComment = ParseForTags($CommentBlock, "@param") - Local $RegExResult - Local $RegexPos = StringInStr($Declaration, "(") - Local $ParamsFromDec[0] - Local $NbParam = 0 - - If StringInStr($Declaration, ":") Then - $NbParam = 1 - ReDim $ParamsFromDec[1] - $ParamsFromDec[0] = "self" - EndIf - - ; extract params from function decaration - While True - $RegExResult = StringRegExp($Declaration, "([^,\(\)\h]+)", $STR_REGEXPARRAYMATCH, $RegexPos) - $RegexPos = @extended - If @extended == 0 Then ExitLoop - - $NbParam += 1 - Redim $ParamsFromDec[$NbParam] - $ParamsFromDec[$NbParam-1] = $RegExResult[0] - WEnd - - ; compare these parameters with those found in the comment block - If UBound($ParamsFromComment) <> UBound($ParamsFromDec)*3 Then - FileWrite($Log, "CAUTION: The number of parameters don't match between the comment block and declaration "& @CRLF) - Else - - For $i=0 To $NbParam-1 - If $ParamsFromDec[$i] <> $ParamsFromComment[($i*3)+1] Then - FileWrite($Log, "CAUTION: Parameters missmatch between the comment block and declaration "& @CRLF) - FileWrite($Log, $ParamsFromComment[($i*3)+1]& " -> " & $ParamsFromDec[$i]&@CRLF) - ExitLoop - EndIf - Next - EndIf - - Return $ParamsFromComment -EndFunc - -; This does 3 things : -; - Replace the hyperlinks with new ones -; - change the stuff starting with # (#nil -> Nil) -; - Replace pictures paths -Func ReplaceHyperlinks($TempFile) - Local $StringFile = "" - Local $RegexResult - Local $RegexPos = 1 - Local $NewURL = "" - Local $i = 0 - FileSetPos($TempFile, 0, $FILE_BEGIN) - - $StringFile = FileRead($TempFile) - - ; Replace HyperLinks Using Regexs - ; --------------------------------------------------------- - While 1 ; @{File.Module} - $RegexResult = StringRegExp($StringFile, "\@{([A-Z][^\.#}]+)\.([^\.#}]+)}", $STR_REGEXPARRAYMATCH, $RegexPos) ; - $RegexPos = @extended - If @extended == 0 Then ExitLoop - - $NewURL = "[" & $RegexResult[1] & "](#" & StringLower($RegexResult[1]) & "-module-)" - ;FileWrite($Log, "Module : " & $RegexPos & " : " & _ArrayToString($RegexResult) & " -> " & $NewURL & @CRLF) - $StringFile = StringRegExpReplace($StringFile, "\@{([A-Z][^\.#}]+)\.([^\.#}]+)}", $NewURL, 1) - WEnd - While 1 ; @{Module} - $RegexResult = StringRegExp($StringFile, "\@{([A-Z][^\.#}]+)}", $STR_REGEXPARRAYMATCH, $RegexPos) - $RegexPos = @extended - If @extended == 0 Then ExitLoop - - $NewURL = "[" & $RegexResult[0] & "](#" & StringLower($RegexResult[0]) & "-module-)" - ;FileWrite($Log, "Module : " & $RegexPos & " : " & _ArrayToString($RegexResult) & " -> " & $NewURL & @CRLF) - $StringFile = StringRegExpReplace($StringFile, "\@{([A-Z][^\.#}]+)}", $NewURL, 1) - WEnd - While 1 ; @{File.Module#TYPE} - $RegexResult = StringRegExp($StringFile, "\@{([A-Z][^\.#}]+)\.([A-Z][^\.#}]+)#([A-Z,_]+)}", $STR_REGEXPARRAYMATCH, $RegexPos) - $RegexPos = @extended - If @extended == 0 Then ExitLoop - - $NewURL = "[" & $RegexResult[2] & "](#" & StringLower($RegexResult[2]) & "-class-)" - ;FileWrite($Log, "Class : " & $RegexPos & " : " & _ArrayToString($RegexResult) & " -> " & $NewURL & @CRLF) - $StringFile = StringRegExpReplace($StringFile, "\@{([A-Z][^\.#}]+)\.([A-Z][^\.#}]+)#([A-Z,_]+)}", $NewURL, 1) - WEnd - While 1 ; @{Module#TYPE} - $RegexResult = StringRegExp($StringFile, "\@{([A-Z][^\.#}]+)#([A-Z,_]+)}", $STR_REGEXPARRAYMATCH, $RegexPos) - $RegexPos = @extended - If @extended == 0 Then ExitLoop - - $NewURL = "[" & $RegexResult[1] & "](#" & StringLower($RegexResult[1]) & "-class-)" - ;FileWrite($Log, "Class : " & $RegexPos & " : " & _ArrayToString($RegexResult) & " -> " & $NewURL & @CRLF) - $StringFile = StringRegExpReplace($StringFile, "\@{([A-Z][^\.#}]+)#([A-Z,_]+)}", $NewURL, 1) - WEnd - While 1 ; @{#TYPE} - $RegexResult = StringRegExp($StringFile, "\@{#([A-Z,_]+)}", $STR_REGEXPARRAYMATCH, $RegexPos) - $RegexPos = @extended - If @extended == 0 Then ExitLoop - - $NewURL = "[" & $RegexResult[0] & "](#" & StringLower($RegexResult[0]) & "-class-)" - ;FileWrite($Log, "Class : " & $RegexPos & " : " & _ArrayToString($RegexResult) & " -> " & $NewURL & @CRLF) - $StringFile = StringRegExpReplace($StringFile, "\@{#([A-Z,_]+)}", $NewURL, 1) - WEnd - While 1 ; #TYPE&@CR - $RegexResult = StringRegExp($StringFile, "\h#([A-Z,_]+)\s", $STR_REGEXPARRAYMATCH, $RegexPos) - $RegexPos = @extended - If @extended == 0 Then ExitLoop - - $NewURL = " [" & $RegexResult[0] & "](#" & StringLower($RegexResult[0]) & "-class-)"&@CRLF - ;FileWrite($Log, "Class : " & $RegexPos & " : " & _ArrayToString($RegexResult) & " -> " & $NewURL & @CRLF) - $StringFile = StringRegExpReplace($StringFile, "\h#([A-Z,_]+)\s", $NewURL, 1) - WEnd - While 1 ; @{File.Module#TYPE.Function}(), catches the parenthesis - $RegexResult = StringRegExp($StringFile, "\@{([A-Z][^#}\.]+)\.([A-Z][^#}\.]+)#([A-Z,_]+)\.([^#\.]+)}[\(]?[\)]?", $STR_REGEXPARRAYMATCH, $RegexPos) - $RegexPos = @extended - If @extended == 0 Then ExitLoop - - $NewURL = FindInFunctionList($RegexResult[2] & "-" & $RegexResult[3]&"-") - ;FileWrite($Log, "Class : " & $RegexPos & " : " & _ArrayToString($RegexResult) & " -> " & $NewURL & @CRLF) - $StringFile = StringRegExpReplace($StringFile, "\@{([A-Z][^#}\.]+)\.([A-Z][^#}\.]+)#([A-Z,_]+)\.([^#\.]+)}[\(]?[\)]?", $NewURL, 1) - WEnd - While 1 ; @{Module#TYPE.Function}(), catches the parenthesis - $RegexResult = StringRegExp($StringFile, "\@{([A-Z][^#}\.]+)#([A-Z,_]+)\.([^#}\.]+)}[\(]?[\)]?", $STR_REGEXPARRAYMATCH, $RegexPos) - $RegexPos = @extended - If @extended == 0 Then ExitLoop - - $NewURL = FindInFunctionList($RegexResult[1] & "-" & $RegexResult[2]&"-") - ;FileWrite($Log, "Class : " & $RegexPos & " : " & _ArrayToString($RegexResult) & " -> " & $NewURL & @CRLF) - $StringFile = StringRegExpReplace($StringFile, "\@{([A-Z][^#}\.]+)#([A-Z,_]+)\.([^#}\.]+)}[\(]?[\)]?", $NewURL, 1) - WEnd - While 1 ; @{#TYPE.Function}(), catches the parenthesis - $RegexResult = StringRegExp($StringFile, "\@{#([A-Z,_]+)\.([^#}\.]+)}[\(]?[\)]?", $STR_REGEXPARRAYMATCH, $RegexPos) - $RegexPos = @extended - If @extended == 0 Then ExitLoop - - $NewURL = FindInFunctionList($RegexResult[0] & "-" & $RegexResult[1]&"-") - ;FileWrite($Log, "Class : " & $RegexPos & " : " & _ArrayToString($RegexResult) & " -> " & $NewURL & @CRLF) - $StringFile = StringRegExpReplace($StringFile, "\@{#([A-Z,_]+)\.([^#}\.]+)}[\(]?[\)]?", $NewURL, 1) - WEnd - While 1 ; Module#TYPE - $RegexResult = StringRegExp($StringFile, "\h(\w+[^\h\_])#(.*?)\h", $STR_REGEXPARRAYMATCH, $RegexPos) - $RegexPos = @extended - If @extended == 0 Then ExitLoop - - $NewURL = " [" & $RegexResult[1] & "](#" & StringLower($RegexResult[1]) & "-class-) " - ;FileWrite($Log, "Class : " & $RegexPos & " : " & _ArrayToString($RegexResult) & " -> " & $NewURL & @CRLF) - $StringFile = StringRegExpReplace($StringFile, "\h(\w+[^\h\_])#(.*?)\h", $NewURL, 1) - WEnd - While 1 ; File.Module#TYPE - $RegexResult = StringRegExp($StringFile, "\h(\w+)\.(\w+)#(.*?)\h", $STR_REGEXPARRAYMATCH, $RegexPos) - $RegexPos = @extended - If @extended == 0 Then ExitLoop - - $NewURL = " [" & $RegexResult[2] & "](#" & StringLower($RegexResult[2]) & "-class-) " - ;FileWrite($Log, "Class : " & $RegexPos & " : " & _ArrayToString($RegexResult) & " -> " & $NewURL & @CRLF) - $StringFile = StringRegExpReplace($StringFile, "\h(\w+)\.(\w+)#(.*?)\h", $NewURL, 1) - WEnd - While 1 ; #TYPE.type (nested type... really annoying and confusing lua stuff) - $RegexResult = StringRegExp($StringFile, "\h#([A-Z,_]+)\.(\w+)\h", $STR_REGEXPARRAYMATCH, $RegexPos) - $RegexPos = @extended - If @extended == 0 Then ExitLoop - - $NewURL = " [" & $RegexResult[1] & "](#" &StringLower($RegexResult[0])& "-"& StringLower($RegexResult[1]) & "-class-)" - ;FileWrite($Log, "Class : " & $RegexPos & " : " & _ArrayToString($RegexResult) & " -> " & $NewURL & @CRLF) - $StringFile = StringRegExpReplace($StringFile, "\h#([A-Z,_]+)\.(\w+)\h", $NewURL, 1) - WEnd - - ; Clean stuff with # - ; --------------------------------------------------------- - $StringFile = StringReplace($StringFile, "#nil", "Nil") - $StringFile = StringReplace($StringFile, "#number", "Number") - $StringFile = StringReplace($StringFile, "#boolean", "Boolean") - $StringFile = StringReplace($StringFile, "#string", "String") - $StringFile = StringReplace($StringFile, "#table", "List[]") - $StringFile = StringReplace($StringFile, "#function", "Function()") - - ; And replace the pictures Path if any - ; --------------------------------------------------------- - While 1 - $RegexResult = StringRegExp($StringFile, "!\[(.*)\]\(.*\\(.*)\\(.*)\)", $STR_REGEXPARRAYMATCH, $RegexPos) - $RegexPos = @extended - If @extended == 0 Then ExitLoop - - $NewPic = "![" & $RegexResult[0] & "](/includes/Pictures/" & $RegexResult[1] & "/"& $RegexResult[2]&")" - $StringFile = StringRegExpReplace($StringFile, "!\[(.*)\]\(.*\\(.*)\\(.*)\)", $NewPic, 1) - WEnd - - While 1 - $RegexResult = StringRegExp($StringFile, "(?m)^(\d(?:(\.\d))*\)(.*))$", $STR_REGEXPARRAYMATCH, $RegexPos) - $RegexPos = @extended - If @extended == 0 Then ExitLoop - - ;$StringFile = StringRegExpReplace($StringFile, "(?m)^(\d(?:(\.\d))*\)(.*))$", "

"&$RegExResult[0]&"

", 1) - $StringFile = StringRegExpReplace($StringFile, "(?m)^(\d(?:(\.\d))*\)(.*))$", "##### "&$RegExResult[0], 1) - WEnd - - Return $StringFile -EndFunc \ No newline at end of file diff --git a/Utils/Slate Documentation Generator/src/SlateGenerator2.au3 b/Utils/Slate Documentation Generator/src/SlateGenerator2.au3 deleted file mode 100644 index 75f8ea703..000000000 --- a/Utils/Slate Documentation Generator/src/SlateGenerator2.au3 +++ /dev/null @@ -1,310 +0,0 @@ -#Region ;**** Directives created by AutoIt3Wrapper_GUI **** -#AutoIt3Wrapper_Outfile=..\bin\SlateDocGenerator2.exe -#AutoIt3Wrapper_Change2CUI=y -#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** -#cs -This is the main script - -The script goal is to read .lua file, extract the documentation in comment blocks, and write .md files to be converted to html by Slate : https://github.com/lord/slate -It works in 5 steps : - -First, it reads the .lua files one bt one, indentifying the comment blocks. for each comment block, it determines the kind of content the comment block describes (module, class/type or function), -find some usefull stuff (for exemple in the declaration...) and writes all of this info in the creatively named TreeHierarchy.csv, with this format : -@K=kind, @M=ParentModule, @N=Name, @P=Parent, @F=FileWhereTheCommentBlockIsLocated, @C=CarretPositionOfTheCommentBlock -The functions used to do this step are mostly found in Parser.au3 - -Then the second step is the longest : we sort the TreeHiearchy.csv, and put the result into TreeHierarchySorted.csv -The idea is to have the data in this order : -Module A -Class A (belongs to Module A) -Function A (belongs to Class A) -Function B (belongs to Class A) -Class B Class A (belongs to Module A) -Function C (belongs to Class B) -Function D (belongs to Class B) -Module B ... -The functions used to do this step are found in DataStorer.au3 - -Then, step 3 : We read each line of TreeHierarchySorted.csv, read the appropriate comment block in the .lua source files, -and write the appropriate Markdown documentation for it in a temporary folder -This is where the markdown documentation is actually written for the first time. -The functions used to do this step are found in Writer.au3 - -Step 4 ! We read the newly created Markdown files, trying to find hyperlinks/picture paths... and we replace them with the new ones. -We copy each processed file into it's final destination. -The functions used to do this step are mostly found in Parser.au3 - -And finally Step 5 : We add the new markdown files to Slate's index and delete temporary files and folder -#ce - -#include -#include -#include -#include - -; Those are the arguments that need to be passed at the start -Global $SourceFolder = $CmdLine[1] ;"./Results" -Global $OutputFolder = $CmdLine[2] ;"@ScriptDir&"/source/index.html.md" - -Global $Log = FileOpen(@ScriptDir & "\SlateGenerator2.log", 2) -Global $DataFile = FileOpen(@ScriptDir & "\TreeHierarchy.csv", 2) -Global $FunctionList = FileOpen(@ScriptDir & "\FuctionList.txt", 2) - -#include "Parser.au3" -#include "DataStorer.au3" -#include "Writer.au3" - - -Func ExitCleanly() - FileClose($DataFile) - FileClose($FunctionList) - FileWrite($Log, "SlateGenerator2 exited cleanly") - FileClose($Log) -EndFunc - - -; Small function to determine if a comment block is describing a module, a type or a function -Func IdentifyBlock($Block, $Declaration) - Local $Kind - Local $KindFunction - - $Kind = ParseForOneTag($Block, "@module") - If $Kind Then - Return "module" - EndIf - - $Kind = ParseForOneTag($Block, "@type") - If $Kind Then - Return "type" - EndIf - - - $KindFunction = ParseFunctionName($Block, $Declaration) - If $KindFunction[0] Then - Return "function" - EndIf - - Return "" -EndFunc - - - - -; ----------------------------------------------------------------- -; Main -; ----------------------------------------------------------------- - -; Step 1 ! -; ----------------------------------------------------------------- - -Local $SourceList = _FileListToArrayRec($SourceFolder, "*", $FLTAR_FILES, $FLTAR_RECUR, $FLTAR_NOSORT, $FLTAR_FULLPATH) -Local $CurrentFile -Local $CarretPos = 0 -Local $CommentBlock -Local $CommentKind -Local $CommentInfo[2] -Local $CurrentModule - -ConsoleWrite("1. Parsing Source Files... ") -FileWrite($Log, @CRLF&@CRLF&@TAB&"INFO : Building Hierarchy" & @CRLF) -For $i=1 To $SourceList[0] ; for each .lua source file - - - FileWrite($Log, "DEBUG : "&$SourceList[$i]) - - ; let's read the next .lua source file - $CurrentFile = FileOpen($SourceList[$i], $FO_READ) - FileWrite($Log, @CRLF&"INFO : Reading File "&$SourceList[$i] & @CRLF) - While True ; for each comment block in the current .lua source file - - ; We read the next comment block. If we could not, it's probably eof, time to open the next .lua file - $CommentBlock = ReadNextBlock($CurrentFile, $CarretPos) - If Not $CommentBlock[1] Then - ExitLoop - EndIf - - $CarretPos = $CommentBlock[0] - $CommentKind = IdentifyBlock($CommentBlock[1], $CommentBlock[2]) - ; Depending on the kind of comment block it is, we write the appropriate line in TreeHierarchy.csv - Switch $CommentKind - Case "function" - $CommentInfo = ParseFunctionName($CommentBlock[1], $CommentBlock[2]) - AddNode("function", $CurrentModule, $CommentInfo[0], $CommentInfo[1], $SourceList[$i], $CommentBlock[3]) - FileWrite($Log, "INFO : Added function "&$CommentInfo[0]&" to hierarchy" & @CRLF) - Case "type" - $CommentInfo[0] = ParseForOneTag($CommentBlock[1], "@type") - $CommentInfo[1] = ParseForOneTag($CommentBlock[1], "@extends") - $CommentInfo[1] = StringRegExpReplace($CommentInfo[1], "(.*#)", "") - AddNode("type", $CurrentModule, $CommentInfo[0], $CommentInfo[1], $SourceList[$i], $CommentBlock[3]) - FileWrite($Log, "INFO : Added type "&$CommentInfo[0]&" to hierarchy" & @CRLF) - Case "module" - $CurrentModule = ParseForOneTag($CommentBlock[1], "@module") - AddNode("module", "", $CurrentModule, "", $SourceList[$i], $CommentBlock[3]) - FileWrite($Log, "INFO : Added module "&$CurrentModule&" to hierarchy" & @CRLF) - EndSwitch - - WEnd - $CarretPos = 0 - FileClose($CurrentFile) - -Next -ConsoleWrite("Done"&@CRLF) - - -; Step 2 ! -; ----------------------------------------------------------------- -ConsoleWrite("2. Sorting Hierarchy") -FileWrite($Log, @CRLF&@CRLF&@TAB&"INFO : Sorting Hierarchy" & @CRLF) -; The magic happens in DataStorer.au3 -DataSort() -ConsoleWrite("Done"&@CRLF) - - - -; Step 3 ! -; ----------------------------------------------------------------- -ConsoleWrite("3. Writing Markdown Documentation") -FileWrite($Log, @CRLF&@CRLF&@TAB&"INFO : Writing Markdown Documentation" & @CRLF) - -Local $CurrentOutput -Local $CurrentFolder -Local $RegexResult -Local $Line -Local $CarretPos = 0 -Local $Results -Local $Output -Local $Declaration - -FileSetPos($DataFile, 0, $FILE_BEGIN) -While True ; For each line in TreeHierarchySorted.csv - - ; read the next line until eof - FileSetPos($DataFile, $CarretPos, $FILE_BEGIN) - $Line = FileReadLine($DataFile) - If @error Then ; eof - ExitLoop - Endif - - $CarretPos = FileGetPos($DataFile) - - ; find the file/position of the next comment block referenced in the line - $RegexResult = StringRegExp($Line, "\@F=(.+?),", $STR_REGEXPARRAYMATCH) - $CurrentFile = FileOpen($RegexResult[0], $FO_READ) - - $RegexResult = StringRegExp($Line, "\@C=(.+?),", $STR_REGEXPARRAYMATCH) - $DataPos = $RegexResult[0] - - ; get the comment block itself - $Results = ReadNextBlock($CurrentFile, $DataPos) - $Block = $Results[1] - $Declaration = $Results[2] - - - ; choose the right function to write mardown depending on the type of comment block - $RegexResult = StringRegExp($Line, "\@K=(.+?),", $STR_REGEXPARRAYMATCH) - - If $RegexResult[0] == "module" Then - ConsoleWrite(".") - ; We need the name of the folder containing this particular source file - $RegexResult = StringRegExp($Line, "\@F=(.+?),", $STR_REGEXPARRAYMATCH) - $RegexResult = StringRegExp($RegexResult[0], "\\(.*)\\.*\.lua", $STR_REGEXPARRAYMATCH) - If @error Then - $CurrentFolder = "" - Else - $CurrentFolder = $RegexResult[0] - Endif - - ; Now we can write the markdown for this module - $CurrentOutput = WriteModule($Block, $CurrentFolder) - EndIf - - If $RegexResult[0] == "type" Then - ; We need the name of the Module containing the type - $RegexResult = StringRegExp($Line, "\@M=(.+?),", $STR_REGEXPARRAYMATCH) - - ; Now we can write the markdown for this type - WriteType($Block, $RegexResult[0], $CurrentOutput) - EndIf - - If $RegexResult[0] == "function" Then - ; We can write the markdown for this function - WriteFunction($Block, $Declaration, $CurrentOutput) - EndIf - - FileClose($CurrentFile) -Wend -ConsoleWrite("Done"&@CRLF) - - -; Step 4 ! -; ----------------------------------------------------------------- -ConsoleWrite("4. Processing Hyperlinks...") -FileWrite($Log, @CRLF&@CRLF&@TAB&"INFO : Processing Hyperlinks" & @CRLF) -Local $i=1 -Local $TempFilesArray = _FileListToArray(@ScriptDir & "/TEMP") -Local $CurrentFile -Local $FinalFile -While $i <= $TempFilesArray[0] ; For each markdown file in the temporary folder - - ;read the file - $CurrentFile = FileOpen(@ScriptDir & "/TEMP/" & $TempFilesArray[$i], 0) - ; The magic happens in Parser.au3 - $FinalString = ReplaceHyperlinks($CurrentFile) - - ; copy the result to the final file location - $FinalFile = FileOpen($OutputFolder & "/includes/" & $TempFilesArray[$i], 2) - FileWrite($FinalFile, $FinalString) - - FileClose($FinalFile) - FileClose($CurrentFile) - $i += 1 -WEnd -ConsoleWrite("Done"&@CRLF) - - -; Step 5 ! -; ----------------------------------------------------------------- -ConsoleWrite("5. Adding new documentation to index...") -FileWrite($Log, @CRLF&@CRLF&@TAB&"INFO : Adding new documentation to index" & @CRLF) - -; Now this is a bit annoying : there is no way to insert a line in a document. -; So we need to read the first half of it, read the second half, and the wipe the whole document -; This way, in the new doc, we can write the first half, what we wanted to insert, and then the second half ! - -; Let's store the index file in $IndexString -Local $IndexFile = $OutputFolder&"/index.html.md" -Local $IndexFileHandle = FileOpen($IndexFile, 0) -Local $IndexString = FileRead($IndexFileHandle) -$IndexString = StringRegExpReplace($IndexString, "-\h[A-Z][a-z]+\.[A-Z][a-z]+\s", "") - -; Now we slpit it into and store the results in $BeforeString and $AfterString -Local $SearchPos = StringInStr($IndexString, "search:") -local $BeforeString = StringTrimRight($IndexString, StringLen($IndexString) - $SearchPos + 5) -local $AfterString = StringTrimLeft($IndexString, $SearchPos - 1) - -; reopening the index file wiping everything -FileClose($IndexFileHandle) -$IndexFileHandle = FileOpen($IndexFile, 2) - -; write the first half -FileWrite($IndexFileHandle, $BeforeString) -Local $IncludePos = StringInStr($IndexString, "includes:") -FileSetPos($IndexFileHandle, $IncludePos + 10, $FILE_BEGIN) - -; add the new markdown files to the index -$i = 1 -While $i <= $TempFilesArray[0] - FileWrite($Log, StringTrimRight($TempFilesArray[$i], 3)&@CRLF) - - FileWrite($IndexFileHandle, " - "&StringTrimRight($TempFilesArray[$i], 3)&@CRLF) - $i+=1 -WEnd -FileWrite($IndexFileHandle, @CRLF) - -; append the second half of the file -FileWrite($IndexFileHandle, $AfterString) -FileClose($IndexFileHandle) -ConsoleWrite("Done"&@CRLF) - -; WE ARE DONE ! -ExitCleanly() diff --git a/Utils/Slate Documentation Generator/src/Writer.au3 b/Utils/Slate Documentation Generator/src/Writer.au3 deleted file mode 100644 index b6a249540..000000000 --- a/Utils/Slate Documentation Generator/src/Writer.au3 +++ /dev/null @@ -1,209 +0,0 @@ -; Takes an array and returns it in a markdown flavored list -; If the list is a retun, then, there is no variable name... -Func ArrayToList($Array, $Return) - $String = "" - $i = 0 - do - $String &= "* " - $String &= $Array[$i] & " " - - If $Return Then - If $Array[$i + 2] == "" or $Array[$i + 2] == " " Then - $String &= @CRLF - Else - $String &= " " & $Array[$i + 1] & " " & $Array[$i + 2] & @CRLF - EndIf - Else - - $String &= $Array[$i + 1] - If $Array[$i + 2] == "" or $Array[$i + 2] == " " Then - $String &= @CRLF - Else - $String &= " : " & $Array[$i + 2] & @CRLF - EndIf - EndIf - $i += 3 - Until $i >= UBound($Array) - Return $String -EndFunc - - -Func WriteModule($Block, $Group) - Local $ModuleName = ParseForOneTag($Block, "@module") - DirCreate(@ScriptDir & "\TEMP") - Local $Output = FileOpen(@ScriptDir & "\TEMP\" & $Group & "." & $ModuleName & ".md", $FO_OVERWRITE) - Local $Data = "" - Local $DataPos = 1 - - FileWrite($Log, @CRLF&@TAB&"Writing "&$Group & "." & $ModuleName & ".md" &@CRLF) - FileWrite($Log, "Writing Module "&$ModuleName&@CRLF) - - ; Add title of Module - FileWrite($Output, "# " & $Group & "." & $ModuleName & " Module" & @CRLF) - - ; Copy the short description - While StringRight($Data, 1) <> @CRLF And StringRight($Data, 1) <> @CR - If StringRight($Data, 7) == "@module" Then ; If there is no comment in the module block - Return $Output - EndIf - $Data &= StringMid($Block, $DataPos, 1) - $DataPos += 1 - WEnd - $Data = StringTrimRight($Data, 1) - $Block = StringTrimLeft($Block, $DataPos) - FileWrite($Output, $Data & @CRLF) - - ; copy the long description - $DataPos = 1 - $Data = "" - $Omit = False - While StringRight($Data, 7) <> "@module" - $Data &= StringMid($Block, $DataPos, 1) - $DataPos += 1 - WEnd - $Data = StringTrimRight($Data, 8) - FileWrite($Output, $Data & @CRLF) - Return $Output -EndFunc - - -Func WriteType($Block, $ModuleName, $Output) - Local $TypeName = ParseForOneTag($Block, "@type") - Local $ParentClass = GetData($TypeName, "parent") - Local $Fields = ParseForTags($Block, "@field") - - FileWrite($Log, "Writing Type "&$TypeName&@CRLF) - - ; Add title of Type - FileWrite($Output, "## " & $TypeName & " Class" & @CRLF) - - ; Add hierearchy info if necessary. Some cool ASCII drawing is going on ! - If $ParentClass <> "ROOT" Then - FileWrite($Output, "
" & @CRLF)
-		FileWrite($Output, "Inheritance : The " & $TypeName & " Class inherits from the following parents :" & @CRLF)
-		Local $Hierarchy = GetParents($TypeName)
-		Local $String = ""
-		Local $TabBuffer = @TAB
-		$String &= $Hierarchy[0]&@CRLF
-		For $i=1 to UBound($Hierarchy)-1
-			$String &= $TabBuffer&"`-- "&$Hierarchy[$i]&@CRLF
-			$TabBuffer &= @TAB
-		Next
-		FileWrite($Output, $String)
-		FileWrite($Output, "
" & @CRLF) - Else - FileWrite($Output, "
" & @CRLF)
-		FileWrite($Output, "The " & $TypeName & " class does not inherit" & @CRLF)
-		FileWrite($Output, "
" & @CRLF) - EndIf - - ; Copy the long description - Local $DataPos = 1 - Local $Data = "" - Local $Omit = False - - While StringRight($Data, 1) <> @CR ; We discard the first line - $Data &= StringMid($Block, $DataPos, 1) - $DataPos += 1 - WEnd - ; If there is a tag in the first line, there is no description - if StringInStr($Data, "@type") == 0 and StringInStr($Data, "@extends") == 0 and StringInStr($Data, "@field") == 0 Then - $Data = "" - $DataPos += 1 - - While StringRight($Data, 5) <> "@type" - $Data &= StringMid($Block, $DataPos, 1) - $DataPos += 1 - WEnd - $Data = StringTrimRight($Data, 5) - FileWrite($Output, $Data & @CRLF) - EndIf - - ; Add the Attributes - If IsArray($Fields) Then - FileWrite($Output, "

Attributes

" & @CRLF & @CRLF) - FileWrite($Output, ArrayToList($Fields, False) & @CRLF) - EndIf - FileWrite($Output, @CRLF) - Return $TypeName -EndFunc - - - -Func WriteFunction($Block, $Declaration, $Output) - Local $RegexResult = ParseFunctionName($Block, $Declaration) - Local $FunctionName = $RegexResult[0] - Local $TypeName = $RegexResult[1] - Local $Parameters = ParseParams($Block, $Declaration) - Local $Returns = ParseForTags($Block, "@return") - Local $Usage = ParseForOneTag($Block, "@usage") - Local $RegexResult - - FileWrite($Log, "Writing Function "&$FunctionName&@CRLF) - - If StringLeft($FunctionName, 1) == "_" Then - _FileWriteLog($Log, @TAB&@Tab&"Function is private. Ignored." & @CRLF) - Return $FunctionName - EndIf - ; Add the class before the function name - If IsArray($Parameters) Then - If $Parameters[1] == "self" Then - $FunctionName = $TypeName & ":" & $FunctionName - EndIf - Else - $FunctionName = $TypeName & "." & $FunctionName - EndIf - - ; add the parameters in parenthesis - $FunctionName &= "(" - If IsArray($Parameters) Then - For $i = 3 To UBound($Parameters) - 3 Step 3 - $FunctionName &= $Parameters[$i + 1] & ", " - Next - If UBound($Parameters) > 3 Then - $FunctionName = StringTrimRight($FunctionName, 2) - EndIf - EndIf - $FunctionName &= ")" - - ;write the file name - FileWrite($Output, "### " & $FunctionName & @CRLF) - - ;Write the exemple if any - If $Usage <> "" Then - FileWrite($Output, "``` lua") - FileWrite($Output, $Usage) - FileWrite($Output, "```" & @CRLF) - EndIf - - ;Write the description - FileWrite($Log, $Block) - FileWrite($Log, StringTrimRight($Block, StringLen($Block) - StringInStr($Block, "@param") + 1) & @CRLF) - FileWrite($Output, StringTrimRight($Block, StringLen($Block) - StringInStr($Block, "@param") + 1) & @CRLF) - - ; Write the parameters - FileWrite($Output, "

Parameters

" & @CRLF) - If IsArray($Parameters) Then - FileWrite($Output, ArrayToList($Parameters, False) & @CRLF) - EndIf - - ; Write the returns - FileWrite($Output, "

Returns

" & @CRLF) - If IsArray($Returns) Then - FileWrite($Output, ArrayToList($Returns, True) & @CRLF) - EndIf - - FileWrite($Output, @CRLF) - - ; add to the list of function balises (useful for hyperlinks) - $RegexResult = ParseFunctionName($Block, $Declaration) - Local $URLBalise = $TypeName & "-" & $RegexResult[0] & "-" - If IsArray($Parameters) Then - For $i = 3 To UBound($Parameters) - 3 Step 3 - $URLBalise &= StringLower($Parameters[$i + 1]) & "-" - Next - EndIf - $URLBalise = StringTrimRight($URLBalise, 1) - FileWrite($FunctionList, $URLBalise & @CRLF) - return $FunctionName -EndFunc \ No newline at end of file diff --git a/Utils/luadocumentor.bat b/Utils/luadocumentor.bat deleted file mode 100644 index 8f28e39a8..000000000 --- a/Utils/luadocumentor.bat +++ /dev/null @@ -1,3 +0,0 @@ -@echo off -"./luarocks/lua5.1" -e "package.path=\"./luarocks/systree/share/lua/5.1/?.lua;./luarocks/systree/share/lua/5.1/?/init.lua;./luarocks/systree/share/lua/5.1/?.lua;./luarocks/systree/share/lua/5.1/?/init.lua;./luarocks/lua/?.lua;\"..package.path; package.cpath=\"./luarocks/lib/lua/5.1/?.dll;./luarocks/systree/lib/lua/5.1/?.dll;\"..package.cpath" -e "local k,l,_=pcall(require,\"luarocks.loader\") _=k and l.add_context(\"luadocumentor\",\"0.1.5-1\")" "./luarocks/systree/lib/luarocks/rocks/luadocumentor/0.1.5-1/bin/luadocumentor" -f doc -d "../docs/Documentation" -s "../docs/Stylesheet/stylesheet.css" "../Moose Development/Moose" %* -exit /b %ERRORLEVEL% \ No newline at end of file diff --git a/Utils/luarocks/Microsoft.VC80.CRT.manifest b/Utils/luarocks/Microsoft.VC80.CRT.manifest deleted file mode 100644 index 6a8a0e239..000000000 --- a/Utils/luarocks/Microsoft.VC80.CRT.manifest +++ /dev/null @@ -1,8 +0,0 @@ - - - - - n9On8FItNsK/DmT8UQxu6jYDtWQ= - 0KJ/VTwP4OUHx98HlIW2AdW1kuY= - YJuB+9Os2oxW4mY+2oC/r8lICZE= - \ No newline at end of file diff --git a/Utils/luarocks/bin2c5.1.exe b/Utils/luarocks/bin2c5.1.exe deleted file mode 100644 index ca81d4b61..000000000 Binary files a/Utils/luarocks/bin2c5.1.exe and /dev/null differ diff --git a/Utils/luarocks/config-5.1.lua b/Utils/luarocks/config-5.1.lua deleted file mode 100644 index cf02193f5..000000000 --- a/Utils/luarocks/config-5.1.lua +++ /dev/null @@ -1,14 +0,0 @@ -rocks_trees = { - home..[[/luarocks]], - { name = [[user]], - root = home..[[/luarocks]], - }, - { name = [[system]], - root = [[C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks\systree]], - }, -} -variables = { - MSVCRT = 'MSVCR80', - LUALIB = 'lua5.1.lib' -} -verbose = false -- set to 'true' to enable verbose output diff --git a/Utils/luarocks/include/lauxlib.h b/Utils/luarocks/include/lauxlib.h deleted file mode 100644 index 34258235d..000000000 --- a/Utils/luarocks/include/lauxlib.h +++ /dev/null @@ -1,174 +0,0 @@ -/* -** $Id: lauxlib.h,v 1.88.1.1 2007/12/27 13:02:25 roberto Exp $ -** Auxiliary functions for building Lua libraries -** See Copyright Notice in lua.h -*/ - - -#ifndef lauxlib_h -#define lauxlib_h - - -#include -#include - -#include "lua.h" - - -#if defined(LUA_COMPAT_GETN) -LUALIB_API int (luaL_getn) (lua_State *L, int t); -LUALIB_API void (luaL_setn) (lua_State *L, int t, int n); -#else -#define luaL_getn(L,i) ((int)lua_objlen(L, i)) -#define luaL_setn(L,i,j) ((void)0) /* no op! */ -#endif - -#if defined(LUA_COMPAT_OPENLIB) -#define luaI_openlib luaL_openlib -#endif - - -/* extra error code for `luaL_load' */ -#define LUA_ERRFILE (LUA_ERRERR+1) - - -typedef struct luaL_Reg { - const char *name; - lua_CFunction func; -} luaL_Reg; - - - -LUALIB_API void (luaI_openlib) (lua_State *L, const char *libname, - const luaL_Reg *l, int nup); -LUALIB_API void (luaL_register) (lua_State *L, const char *libname, - const luaL_Reg *l); -LUALIB_API int (luaL_getmetafield) (lua_State *L, int obj, const char *e); -LUALIB_API int (luaL_callmeta) (lua_State *L, int obj, const char *e); -LUALIB_API int (luaL_typerror) (lua_State *L, int narg, const char *tname); -LUALIB_API int (luaL_argerror) (lua_State *L, int numarg, const char *extramsg); -LUALIB_API const char *(luaL_checklstring) (lua_State *L, int numArg, - size_t *l); -LUALIB_API const char *(luaL_optlstring) (lua_State *L, int numArg, - const char *def, size_t *l); -LUALIB_API lua_Number (luaL_checknumber) (lua_State *L, int numArg); -LUALIB_API lua_Number (luaL_optnumber) (lua_State *L, int nArg, lua_Number def); - -LUALIB_API lua_Integer (luaL_checkinteger) (lua_State *L, int numArg); -LUALIB_API lua_Integer (luaL_optinteger) (lua_State *L, int nArg, - lua_Integer def); - -LUALIB_API void (luaL_checkstack) (lua_State *L, int sz, const char *msg); -LUALIB_API void (luaL_checktype) (lua_State *L, int narg, int t); -LUALIB_API void (luaL_checkany) (lua_State *L, int narg); - -LUALIB_API int (luaL_newmetatable) (lua_State *L, const char *tname); -LUALIB_API void *(luaL_checkudata) (lua_State *L, int ud, const char *tname); - -LUALIB_API void (luaL_where) (lua_State *L, int lvl); -LUALIB_API int (luaL_error) (lua_State *L, const char *fmt, ...); - -LUALIB_API int (luaL_checkoption) (lua_State *L, int narg, const char *def, - const char *const lst[]); - -LUALIB_API int (luaL_ref) (lua_State *L, int t); -LUALIB_API void (luaL_unref) (lua_State *L, int t, int ref); - -LUALIB_API int (luaL_loadfile) (lua_State *L, const char *filename); -LUALIB_API int (luaL_loadbuffer) (lua_State *L, const char *buff, size_t sz, - const char *name); -LUALIB_API int (luaL_loadstring) (lua_State *L, const char *s); - -LUALIB_API lua_State *(luaL_newstate) (void); - - -LUALIB_API const char *(luaL_gsub) (lua_State *L, const char *s, const char *p, - const char *r); - -LUALIB_API const char *(luaL_findtable) (lua_State *L, int idx, - const char *fname, int szhint); - - - - -/* -** =============================================================== -** some useful macros -** =============================================================== -*/ - -#define luaL_argcheck(L, cond,numarg,extramsg) \ - ((void)((cond) || luaL_argerror(L, (numarg), (extramsg)))) -#define luaL_checkstring(L,n) (luaL_checklstring(L, (n), NULL)) -#define luaL_optstring(L,n,d) (luaL_optlstring(L, (n), (d), NULL)) -#define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n))) -#define luaL_optint(L,n,d) ((int)luaL_optinteger(L, (n), (d))) -#define luaL_checklong(L,n) ((long)luaL_checkinteger(L, (n))) -#define luaL_optlong(L,n,d) ((long)luaL_optinteger(L, (n), (d))) - -#define luaL_typename(L,i) lua_typename(L, lua_type(L,(i))) - -#define luaL_dofile(L, fn) \ - (luaL_loadfile(L, fn) || lua_pcall(L, 0, LUA_MULTRET, 0)) - -#define luaL_dostring(L, s) \ - (luaL_loadstring(L, s) || lua_pcall(L, 0, LUA_MULTRET, 0)) - -#define luaL_getmetatable(L,n) (lua_getfield(L, LUA_REGISTRYINDEX, (n))) - -#define luaL_opt(L,f,n,d) (lua_isnoneornil(L,(n)) ? (d) : f(L,(n))) - -/* -** {====================================================== -** Generic Buffer manipulation -** ======================================================= -*/ - - - -typedef struct luaL_Buffer { - char *p; /* current position in buffer */ - int lvl; /* number of strings in the stack (level) */ - lua_State *L; - char buffer[LUAL_BUFFERSIZE]; -} luaL_Buffer; - -#define luaL_addchar(B,c) \ - ((void)((B)->p < ((B)->buffer+LUAL_BUFFERSIZE) || luaL_prepbuffer(B)), \ - (*(B)->p++ = (char)(c))) - -/* compatibility only */ -#define luaL_putchar(B,c) luaL_addchar(B,c) - -#define luaL_addsize(B,n) ((B)->p += (n)) - -LUALIB_API void (luaL_buffinit) (lua_State *L, luaL_Buffer *B); -LUALIB_API char *(luaL_prepbuffer) (luaL_Buffer *B); -LUALIB_API void (luaL_addlstring) (luaL_Buffer *B, const char *s, size_t l); -LUALIB_API void (luaL_addstring) (luaL_Buffer *B, const char *s); -LUALIB_API void (luaL_addvalue) (luaL_Buffer *B); -LUALIB_API void (luaL_pushresult) (luaL_Buffer *B); - - -/* }====================================================== */ - - -/* compatibility with ref system */ - -/* pre-defined references */ -#define LUA_NOREF (-2) -#define LUA_REFNIL (-1) - -#define lua_ref(L,lock) ((lock) ? luaL_ref(L, LUA_REGISTRYINDEX) : \ - (lua_pushstring(L, "unlocked references are obsolete"), lua_error(L), 0)) - -#define lua_unref(L,ref) luaL_unref(L, LUA_REGISTRYINDEX, (ref)) - -#define lua_getref(L,ref) lua_rawgeti(L, LUA_REGISTRYINDEX, (ref)) - - -#define luaL_reg luaL_Reg - -#endif - - diff --git a/Utils/luarocks/include/lua.h b/Utils/luarocks/include/lua.h deleted file mode 100644 index e4bdfd3b9..000000000 --- a/Utils/luarocks/include/lua.h +++ /dev/null @@ -1,388 +0,0 @@ -/* -** $Id: lua.h,v 1.218.1.5 2008/08/06 13:30:12 roberto Exp $ -** Lua - An Extensible Extension Language -** Lua.org, PUC-Rio, Brazil (http://www.lua.org) -** See Copyright Notice at the end of this file -*/ - - -#ifndef lua_h -#define lua_h - -#include -#include - - -#include "luaconf.h" - - -#define LUA_VERSION "Lua 5.1" -#define LUA_RELEASE "Lua 5.1.4" -#define LUA_VERSION_NUM 501 -#define LUA_COPYRIGHT "Copyright (C) 1994-2008 Lua.org, PUC-Rio" -#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo & W. Celes" - - -/* mark for precompiled code (`Lua') */ -#define LUA_SIGNATURE "\033Lua" - -/* option for multiple returns in `lua_pcall' and `lua_call' */ -#define LUA_MULTRET (-1) - - -/* -** pseudo-indices -*/ -#define LUA_REGISTRYINDEX (-10000) -#define LUA_ENVIRONINDEX (-10001) -#define LUA_GLOBALSINDEX (-10002) -#define lua_upvalueindex(i) (LUA_GLOBALSINDEX-(i)) - - -/* thread status; 0 is OK */ -#define LUA_YIELD 1 -#define LUA_ERRRUN 2 -#define LUA_ERRSYNTAX 3 -#define LUA_ERRMEM 4 -#define LUA_ERRERR 5 - - -typedef struct lua_State lua_State; - -typedef int (*lua_CFunction) (lua_State *L); - - -/* -** functions that read/write blocks when loading/dumping Lua chunks -*/ -typedef const char * (*lua_Reader) (lua_State *L, void *ud, size_t *sz); - -typedef int (*lua_Writer) (lua_State *L, const void* p, size_t sz, void* ud); - - -/* -** prototype for memory-allocation functions -*/ -typedef void * (*lua_Alloc) (void *ud, void *ptr, size_t osize, size_t nsize); - - -/* -** basic types -*/ -#define LUA_TNONE (-1) - -#define LUA_TNIL 0 -#define LUA_TBOOLEAN 1 -#define LUA_TLIGHTUSERDATA 2 -#define LUA_TNUMBER 3 -#define LUA_TSTRING 4 -#define LUA_TTABLE 5 -#define LUA_TFUNCTION 6 -#define LUA_TUSERDATA 7 -#define LUA_TTHREAD 8 - - - -/* minimum Lua stack available to a C function */ -#define LUA_MINSTACK 20 - - -/* -** generic extra include file -*/ -#if defined(LUA_USER_H) -#include LUA_USER_H -#endif - - -/* type of numbers in Lua */ -typedef LUA_NUMBER lua_Number; - - -/* type for integer functions */ -typedef LUA_INTEGER lua_Integer; - - - -/* -** state manipulation -*/ -LUA_API lua_State *(lua_newstate) (lua_Alloc f, void *ud); -LUA_API void (lua_close) (lua_State *L); -LUA_API lua_State *(lua_newthread) (lua_State *L); - -LUA_API lua_CFunction (lua_atpanic) (lua_State *L, lua_CFunction panicf); - - -/* -** basic stack manipulation -*/ -LUA_API int (lua_gettop) (lua_State *L); -LUA_API void (lua_settop) (lua_State *L, int idx); -LUA_API void (lua_pushvalue) (lua_State *L, int idx); -LUA_API void (lua_remove) (lua_State *L, int idx); -LUA_API void (lua_insert) (lua_State *L, int idx); -LUA_API void (lua_replace) (lua_State *L, int idx); -LUA_API int (lua_checkstack) (lua_State *L, int sz); - -LUA_API void (lua_xmove) (lua_State *from, lua_State *to, int n); - - -/* -** access functions (stack -> C) -*/ - -LUA_API int (lua_isnumber) (lua_State *L, int idx); -LUA_API int (lua_isstring) (lua_State *L, int idx); -LUA_API int (lua_iscfunction) (lua_State *L, int idx); -LUA_API int (lua_isuserdata) (lua_State *L, int idx); -LUA_API int (lua_type) (lua_State *L, int idx); -LUA_API const char *(lua_typename) (lua_State *L, int tp); - -LUA_API int (lua_equal) (lua_State *L, int idx1, int idx2); -LUA_API int (lua_rawequal) (lua_State *L, int idx1, int idx2); -LUA_API int (lua_lessthan) (lua_State *L, int idx1, int idx2); - -LUA_API lua_Number (lua_tonumber) (lua_State *L, int idx); -LUA_API lua_Integer (lua_tointeger) (lua_State *L, int idx); -LUA_API int (lua_toboolean) (lua_State *L, int idx); -LUA_API const char *(lua_tolstring) (lua_State *L, int idx, size_t *len); -LUA_API size_t (lua_objlen) (lua_State *L, int idx); -LUA_API lua_CFunction (lua_tocfunction) (lua_State *L, int idx); -LUA_API void *(lua_touserdata) (lua_State *L, int idx); -LUA_API lua_State *(lua_tothread) (lua_State *L, int idx); -LUA_API const void *(lua_topointer) (lua_State *L, int idx); - - -/* -** push functions (C -> stack) -*/ -LUA_API void (lua_pushnil) (lua_State *L); -LUA_API void (lua_pushnumber) (lua_State *L, lua_Number n); -LUA_API void (lua_pushinteger) (lua_State *L, lua_Integer n); -LUA_API void (lua_pushlstring) (lua_State *L, const char *s, size_t l); -LUA_API void (lua_pushstring) (lua_State *L, const char *s); -LUA_API const char *(lua_pushvfstring) (lua_State *L, const char *fmt, - va_list argp); -LUA_API const char *(lua_pushfstring) (lua_State *L, const char *fmt, ...); -LUA_API void (lua_pushcclosure) (lua_State *L, lua_CFunction fn, int n); -LUA_API void (lua_pushboolean) (lua_State *L, int b); -LUA_API void (lua_pushlightuserdata) (lua_State *L, void *p); -LUA_API int (lua_pushthread) (lua_State *L); - - -/* -** get functions (Lua -> stack) -*/ -LUA_API void (lua_gettable) (lua_State *L, int idx); -LUA_API void (lua_getfield) (lua_State *L, int idx, const char *k); -LUA_API void (lua_rawget) (lua_State *L, int idx); -LUA_API void (lua_rawgeti) (lua_State *L, int idx, int n); -LUA_API void (lua_createtable) (lua_State *L, int narr, int nrec); -LUA_API void *(lua_newuserdata) (lua_State *L, size_t sz); -LUA_API int (lua_getmetatable) (lua_State *L, int objindex); -LUA_API void (lua_getfenv) (lua_State *L, int idx); - - -/* -** set functions (stack -> Lua) -*/ -LUA_API void (lua_settable) (lua_State *L, int idx); -LUA_API void (lua_setfield) (lua_State *L, int idx, const char *k); -LUA_API void (lua_rawset) (lua_State *L, int idx); -LUA_API void (lua_rawseti) (lua_State *L, int idx, int n); -LUA_API int (lua_setmetatable) (lua_State *L, int objindex); -LUA_API int (lua_setfenv) (lua_State *L, int idx); - - -/* -** `load' and `call' functions (load and run Lua code) -*/ -LUA_API void (lua_call) (lua_State *L, int nargs, int nresults); -LUA_API int (lua_pcall) (lua_State *L, int nargs, int nresults, int errfunc); -LUA_API int (lua_cpcall) (lua_State *L, lua_CFunction func, void *ud); -LUA_API int (lua_load) (lua_State *L, lua_Reader reader, void *dt, - const char *chunkname); - -LUA_API int (lua_dump) (lua_State *L, lua_Writer writer, void *data); - - -/* -** coroutine functions -*/ -LUA_API int (lua_yield) (lua_State *L, int nresults); -LUA_API int (lua_resume) (lua_State *L, int narg); -LUA_API int (lua_status) (lua_State *L); - -/* -** garbage-collection function and options -*/ - -#define LUA_GCSTOP 0 -#define LUA_GCRESTART 1 -#define LUA_GCCOLLECT 2 -#define LUA_GCCOUNT 3 -#define LUA_GCCOUNTB 4 -#define LUA_GCSTEP 5 -#define LUA_GCSETPAUSE 6 -#define LUA_GCSETSTEPMUL 7 - -LUA_API int (lua_gc) (lua_State *L, int what, int data); - - -/* -** miscellaneous functions -*/ - -LUA_API int (lua_error) (lua_State *L); - -LUA_API int (lua_next) (lua_State *L, int idx); - -LUA_API void (lua_concat) (lua_State *L, int n); - -LUA_API lua_Alloc (lua_getallocf) (lua_State *L, void **ud); -LUA_API void lua_setallocf (lua_State *L, lua_Alloc f, void *ud); - - - -/* -** =============================================================== -** some useful macros -** =============================================================== -*/ - -#define lua_pop(L,n) lua_settop(L, -(n)-1) - -#define lua_newtable(L) lua_createtable(L, 0, 0) - -#define lua_register(L,n,f) (lua_pushcfunction(L, (f)), lua_setglobal(L, (n))) - -#define lua_pushcfunction(L,f) lua_pushcclosure(L, (f), 0) - -#define lua_strlen(L,i) lua_objlen(L, (i)) - -#define lua_isfunction(L,n) (lua_type(L, (n)) == LUA_TFUNCTION) -#define lua_istable(L,n) (lua_type(L, (n)) == LUA_TTABLE) -#define lua_islightuserdata(L,n) (lua_type(L, (n)) == LUA_TLIGHTUSERDATA) -#define lua_isnil(L,n) (lua_type(L, (n)) == LUA_TNIL) -#define lua_isboolean(L,n) (lua_type(L, (n)) == LUA_TBOOLEAN) -#define lua_isthread(L,n) (lua_type(L, (n)) == LUA_TTHREAD) -#define lua_isnone(L,n) (lua_type(L, (n)) == LUA_TNONE) -#define lua_isnoneornil(L, n) (lua_type(L, (n)) <= 0) - -#define lua_pushliteral(L, s) \ - lua_pushlstring(L, "" s, (sizeof(s)/sizeof(char))-1) - -#define lua_setglobal(L,s) lua_setfield(L, LUA_GLOBALSINDEX, (s)) -#define lua_getglobal(L,s) lua_getfield(L, LUA_GLOBALSINDEX, (s)) - -#define lua_tostring(L,i) lua_tolstring(L, (i), NULL) - - - -/* -** compatibility macros and functions -*/ - -#define lua_open() luaL_newstate() - -#define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX) - -#define lua_getgccount(L) lua_gc(L, LUA_GCCOUNT, 0) - -#define lua_Chunkreader lua_Reader -#define lua_Chunkwriter lua_Writer - - -/* hack */ -LUA_API void lua_setlevel (lua_State *from, lua_State *to); - - -/* -** {====================================================================== -** Debug API -** ======================================================================= -*/ - - -/* -** Event codes -*/ -#define LUA_HOOKCALL 0 -#define LUA_HOOKRET 1 -#define LUA_HOOKLINE 2 -#define LUA_HOOKCOUNT 3 -#define LUA_HOOKTAILRET 4 - - -/* -** Event masks -*/ -#define LUA_MASKCALL (1 << LUA_HOOKCALL) -#define LUA_MASKRET (1 << LUA_HOOKRET) -#define LUA_MASKLINE (1 << LUA_HOOKLINE) -#define LUA_MASKCOUNT (1 << LUA_HOOKCOUNT) - -typedef struct lua_Debug lua_Debug; /* activation record */ - - -/* Functions to be called by the debuger in specific events */ -typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar); - - -LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar); -LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar); -LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n); -LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n); -LUA_API const char *lua_getupvalue (lua_State *L, int funcindex, int n); -LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n); - -LUA_API int lua_sethook (lua_State *L, lua_Hook func, int mask, int count); -LUA_API lua_Hook lua_gethook (lua_State *L); -LUA_API int lua_gethookmask (lua_State *L); -LUA_API int lua_gethookcount (lua_State *L); - - -struct lua_Debug { - int event; - const char *name; /* (n) */ - const char *namewhat; /* (n) `global', `local', `field', `method' */ - const char *what; /* (S) `Lua', `C', `main', `tail' */ - const char *source; /* (S) */ - int currentline; /* (l) */ - int nups; /* (u) number of upvalues */ - int linedefined; /* (S) */ - int lastlinedefined; /* (S) */ - char short_src[LUA_IDSIZE]; /* (S) */ - /* private part */ - int i_ci; /* active function */ -}; - -/* }====================================================================== */ - - -/****************************************************************************** -* Copyright (C) 1994-2008 Lua.org, PUC-Rio. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining -* a copy of this software and associated documentation files (the -* "Software"), to deal in the Software without restriction, including -* without limitation the rights to use, copy, modify, merge, publish, -* distribute, sublicense, and/or sell copies of the Software, and to -* permit persons to whom the Software is furnished to do so, subject to -* the following conditions: -* -* The above copyright notice and this permission notice shall be -* included in all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -******************************************************************************/ - - -#endif diff --git a/Utils/luarocks/include/lua.hpp b/Utils/luarocks/include/lua.hpp deleted file mode 100644 index ec417f594..000000000 --- a/Utils/luarocks/include/lua.hpp +++ /dev/null @@ -1,9 +0,0 @@ -// lua.hpp -// Lua header files for C++ -// <> not supplied automatically because Lua also compiles as C++ - -extern "C" { -#include "lua.h" -#include "lualib.h" -#include "lauxlib.h" -} diff --git a/Utils/luarocks/include/luaconf.h b/Utils/luarocks/include/luaconf.h deleted file mode 100644 index 5e7b98be6..000000000 --- a/Utils/luarocks/include/luaconf.h +++ /dev/null @@ -1,763 +0,0 @@ -/* -** $Id: luaconf.h,v 1.82.1.7 2008/02/11 16:25:08 roberto Exp $ -** Configuration file for Lua -** See Copyright Notice in lua.h -*/ - - -#ifndef lconfig_h -#define lconfig_h - -#include -#include - - -/* -** ================================================================== -** Search for "@@" to find all configurable definitions. -** =================================================================== -*/ - - -/* -@@ LUA_ANSI controls the use of non-ansi features. -** CHANGE it (define it) if you want Lua to avoid the use of any -** non-ansi feature or library. -*/ -#if defined(__STRICT_ANSI__) -#define LUA_ANSI -#endif - - -#if !defined(LUA_ANSI) && defined(_WIN32) -#define LUA_WIN -#endif - -#if defined(LUA_USE_LINUX) -#define LUA_USE_POSIX -#define LUA_USE_DLOPEN /* needs an extra library: -ldl */ -#define LUA_USE_READLINE /* needs some extra libraries */ -#endif - -#if defined(LUA_USE_MACOSX) -#define LUA_USE_POSIX -#define LUA_DL_DYLD /* does not need extra library */ -#endif - - - -/* -@@ LUA_USE_POSIX includes all functionallity listed as X/Open System -@* Interfaces Extension (XSI). -** CHANGE it (define it) if your system is XSI compatible. -*/ -#if defined(LUA_USE_POSIX) -#define LUA_USE_MKSTEMP -#define LUA_USE_ISATTY -#define LUA_USE_POPEN -#define LUA_USE_ULONGJMP -#endif - - -/* -@@ LUA_PATH and LUA_CPATH are the names of the environment variables that -@* Lua check to set its paths. -@@ LUA_INIT is the name of the environment variable that Lua -@* checks for initialization code. -** CHANGE them if you want different names. -*/ -#define LUA_PATH "LUA_PATH" -#define LUA_CPATH "LUA_CPATH" -#define LUA_INIT "LUA_INIT" - - -/* -@@ LUA_PATH_DEFAULT is the default path that Lua uses to look for -@* Lua libraries. -@@ LUA_CPATH_DEFAULT is the default path that Lua uses to look for -@* C libraries. -** CHANGE them if your machine has a non-conventional directory -** hierarchy or if you want to install your libraries in -** non-conventional directories. -*/ -#if defined(_WIN32) -/* -** In Windows, any exclamation mark ('!') in the path is replaced by the -** path of the directory of the executable file of the current process. -*/ -#define LUA_LDIR "!\\lua\\" -#define LUA_CDIR "!\\" -#define LUA_PATH_DEFAULT \ - ".\\?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?\\init.lua;" \ - LUA_CDIR"?.lua;" LUA_CDIR"?\\init.lua" -#define LUA_CPATH_DEFAULT \ - ".\\?.dll;" ".\\?51.dll;" LUA_CDIR"?.dll;" LUA_CDIR"?51.dll;" LUA_CDIR"clibs\\?.dll;" LUA_CDIR"clibs\\?51.dll;" LUA_CDIR"loadall.dll;" LUA_CDIR"clibs\\loadall.dll" - -#else -#define LUA_ROOT "/usr/local/" -#define LUA_LDIR LUA_ROOT "share/lua/5.1/" -#define LUA_CDIR LUA_ROOT "lib/lua/5.1/" -#define LUA_PATH_DEFAULT \ - "./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \ - LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua" -#define LUA_CPATH_DEFAULT \ - "./?.so;" "./lib?51.so;" LUA_CDIR"?.so;" LUA_CDIR"lib?51.so;" LUA_CDIR"loadall.so" -#endif - - -/* -@@ LUA_DIRSEP is the directory separator (for submodules). -** CHANGE it if your machine does not use "/" as the directory separator -** and is not Windows. (On Windows Lua automatically uses "\".) -*/ -#if defined(_WIN32) -#define LUA_DIRSEP "\\" -#else -#define LUA_DIRSEP "/" -#endif - - -/* -@@ LUA_PATHSEP is the character that separates templates in a path. -@@ LUA_PATH_MARK is the string that marks the substitution points in a -@* template. -@@ LUA_EXECDIR in a Windows path is replaced by the executable's -@* directory. -@@ LUA_IGMARK is a mark to ignore all before it when bulding the -@* luaopen_ function name. -** CHANGE them if for some reason your system cannot use those -** characters. (E.g., if one of those characters is a common character -** in file/directory names.) Probably you do not need to change them. -*/ -#define LUA_PATHSEP ";" -#define LUA_PATH_MARK "?" -#define LUA_EXECDIR "!" -#define LUA_IGMARK "-" - - -/* -@@ LUA_INTEGER is the integral type used by lua_pushinteger/lua_tointeger. -** CHANGE that if ptrdiff_t is not adequate on your machine. (On most -** machines, ptrdiff_t gives a good choice between int or long.) -*/ -#define LUA_INTEGER ptrdiff_t - - -/* -@@ LUA_API is a mark for all core API functions. -@@ LUALIB_API is a mark for all standard library functions. -** CHANGE them if you need to define those functions in some special way. -** For instance, if you want to create one Windows DLL with the core and -** the libraries, you may want to use the following definition (define -** LUA_BUILD_AS_DLL to get it). -*/ -#if defined(LUA_BUILD_AS_DLL) - -#if defined(LUA_CORE) || defined(LUA_LIB) -#define LUA_API __declspec(dllexport) -#else -#define LUA_API __declspec(dllimport) -#endif - -#else - -#define LUA_API extern - -#endif - -/* more often than not the libs go together with the core */ -#define LUALIB_API LUA_API - - -/* -@@ LUAI_FUNC is a mark for all extern functions that are not to be -@* exported to outside modules. -@@ LUAI_DATA is a mark for all extern (const) variables that are not to -@* be exported to outside modules. -** CHANGE them if you need to mark them in some special way. Elf/gcc -** (versions 3.2 and later) mark them as "hidden" to optimize access -** when Lua is compiled as a shared library. -*/ -#if defined(luaall_c) -#define LUAI_FUNC static -#define LUAI_DATA /* empty */ - -#elif defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \ - defined(__ELF__) -#define LUAI_FUNC __attribute__((visibility("hidden"))) extern -#define LUAI_DATA LUAI_FUNC - -#else -#define LUAI_FUNC extern -#define LUAI_DATA extern -#endif - - - -/* -@@ LUA_QL describes how error messages quote program elements. -** CHANGE it if you want a different appearance. -*/ -#define LUA_QL(x) "'" x "'" -#define LUA_QS LUA_QL("%s") - - -/* -@@ LUA_IDSIZE gives the maximum size for the description of the source -@* of a function in debug information. -** CHANGE it if you want a different size. -*/ -#define LUA_IDSIZE 60 - - -/* -** {================================================================== -** Stand-alone configuration -** =================================================================== -*/ - -#if defined(lua_c) || defined(luaall_c) - -/* -@@ lua_stdin_is_tty detects whether the standard input is a 'tty' (that -@* is, whether we're running lua interactively). -** CHANGE it if you have a better definition for non-POSIX/non-Windows -** systems. -*/ -#if defined(LUA_USE_ISATTY) -#include -#define lua_stdin_is_tty() isatty(0) -#elif defined(LUA_WIN) -#include -#include -#define lua_stdin_is_tty() _isatty(_fileno(stdin)) -#else -#define lua_stdin_is_tty() 1 /* assume stdin is a tty */ -#endif - - -/* -@@ LUA_PROMPT is the default prompt used by stand-alone Lua. -@@ LUA_PROMPT2 is the default continuation prompt used by stand-alone Lua. -** CHANGE them if you want different prompts. (You can also change the -** prompts dynamically, assigning to globals _PROMPT/_PROMPT2.) -*/ -#define LUA_PROMPT "> " -#define LUA_PROMPT2 ">> " - - -/* -@@ LUA_PROGNAME is the default name for the stand-alone Lua program. -** CHANGE it if your stand-alone interpreter has a different name and -** your system is not able to detect that name automatically. -*/ -#define LUA_PROGNAME "lua" - - -/* -@@ LUA_MAXINPUT is the maximum length for an input line in the -@* stand-alone interpreter. -** CHANGE it if you need longer lines. -*/ -#define LUA_MAXINPUT 512 - - -/* -@@ lua_readline defines how to show a prompt and then read a line from -@* the standard input. -@@ lua_saveline defines how to "save" a read line in a "history". -@@ lua_freeline defines how to free a line read by lua_readline. -** CHANGE them if you want to improve this functionality (e.g., by using -** GNU readline and history facilities). -*/ -#if defined(LUA_USE_READLINE) -#include -#include -#include -#define lua_readline(L,b,p) ((void)L, ((b)=readline(p)) != NULL) -#define lua_saveline(L,idx) \ - if (lua_strlen(L,idx) > 0) /* non-empty line? */ \ - add_history(lua_tostring(L, idx)); /* add it to history */ -#define lua_freeline(L,b) ((void)L, free(b)) -#else -#define lua_readline(L,b,p) \ - ((void)L, fputs(p, stdout), fflush(stdout), /* show prompt */ \ - fgets(b, LUA_MAXINPUT, stdin) != NULL) /* get line */ -#define lua_saveline(L,idx) { (void)L; (void)idx; } -#define lua_freeline(L,b) { (void)L; (void)b; } -#endif - -#endif - -/* }================================================================== */ - - -/* -@@ LUAI_GCPAUSE defines the default pause between garbage-collector cycles -@* as a percentage. -** CHANGE it if you want the GC to run faster or slower (higher values -** mean larger pauses which mean slower collection.) You can also change -** this value dynamically. -*/ -#define LUAI_GCPAUSE 200 /* 200% (wait memory to double before next GC) */ - - -/* -@@ LUAI_GCMUL defines the default speed of garbage collection relative to -@* memory allocation as a percentage. -** CHANGE it if you want to change the granularity of the garbage -** collection. (Higher values mean coarser collections. 0 represents -** infinity, where each step performs a full collection.) You can also -** change this value dynamically. -*/ -#define LUAI_GCMUL 200 /* GC runs 'twice the speed' of memory allocation */ - - - -/* -@@ LUA_COMPAT_GETN controls compatibility with old getn behavior. -** CHANGE it (define it) if you want exact compatibility with the -** behavior of setn/getn in Lua 5.0. -*/ -#undef LUA_COMPAT_GETN - -/* -@@ LUA_COMPAT_LOADLIB controls compatibility about global loadlib. -** CHANGE it to undefined as soon as you do not need a global 'loadlib' -** function (the function is still available as 'package.loadlib'). -*/ -#undef LUA_COMPAT_LOADLIB - -/* -@@ LUA_COMPAT_VARARG controls compatibility with old vararg feature. -** CHANGE it to undefined as soon as your programs use only '...' to -** access vararg parameters (instead of the old 'arg' table). -*/ -#define LUA_COMPAT_VARARG - -/* -@@ LUA_COMPAT_MOD controls compatibility with old math.mod function. -** CHANGE it to undefined as soon as your programs use 'math.fmod' or -** the new '%' operator instead of 'math.mod'. -*/ -#define LUA_COMPAT_MOD - -/* -@@ LUA_COMPAT_LSTR controls compatibility with old long string nesting -@* facility. -** CHANGE it to 2 if you want the old behaviour, or undefine it to turn -** off the advisory error when nesting [[...]]. -*/ -#define LUA_COMPAT_LSTR 1 - -/* -@@ LUA_COMPAT_GFIND controls compatibility with old 'string.gfind' name. -** CHANGE it to undefined as soon as you rename 'string.gfind' to -** 'string.gmatch'. -*/ -#define LUA_COMPAT_GFIND - -/* -@@ LUA_COMPAT_OPENLIB controls compatibility with old 'luaL_openlib' -@* behavior. -** CHANGE it to undefined as soon as you replace to 'luaL_register' -** your uses of 'luaL_openlib' -*/ -#define LUA_COMPAT_OPENLIB - - - -/* -@@ luai_apicheck is the assert macro used by the Lua-C API. -** CHANGE luai_apicheck if you want Lua to perform some checks in the -** parameters it gets from API calls. This may slow down the interpreter -** a bit, but may be quite useful when debugging C code that interfaces -** with Lua. A useful redefinition is to use assert.h. -*/ -#if defined(LUA_USE_APICHECK) -#include -#define luai_apicheck(L,o) { (void)L; assert(o); } -#else -#define luai_apicheck(L,o) { (void)L; } -#endif - - -/* -@@ LUAI_BITSINT defines the number of bits in an int. -** CHANGE here if Lua cannot automatically detect the number of bits of -** your machine. Probably you do not need to change this. -*/ -/* avoid overflows in comparison */ -#if INT_MAX-20 < 32760 -#define LUAI_BITSINT 16 -#elif INT_MAX > 2147483640L -/* int has at least 32 bits */ -#define LUAI_BITSINT 32 -#else -#error "you must define LUA_BITSINT with number of bits in an integer" -#endif - - -/* -@@ LUAI_UINT32 is an unsigned integer with at least 32 bits. -@@ LUAI_INT32 is an signed integer with at least 32 bits. -@@ LUAI_UMEM is an unsigned integer big enough to count the total -@* memory used by Lua. -@@ LUAI_MEM is a signed integer big enough to count the total memory -@* used by Lua. -** CHANGE here if for some weird reason the default definitions are not -** good enough for your machine. (The definitions in the 'else' -** part always works, but may waste space on machines with 64-bit -** longs.) Probably you do not need to change this. -*/ -#if LUAI_BITSINT >= 32 -#define LUAI_UINT32 unsigned int -#define LUAI_INT32 int -#define LUAI_MAXINT32 INT_MAX -#define LUAI_UMEM size_t -#define LUAI_MEM ptrdiff_t -#else -/* 16-bit ints */ -#define LUAI_UINT32 unsigned long -#define LUAI_INT32 long -#define LUAI_MAXINT32 LONG_MAX -#define LUAI_UMEM unsigned long -#define LUAI_MEM long -#endif - - -/* -@@ LUAI_MAXCALLS limits the number of nested calls. -** CHANGE it if you need really deep recursive calls. This limit is -** arbitrary; its only purpose is to stop infinite recursion before -** exhausting memory. -*/ -#define LUAI_MAXCALLS 20000 - - -/* -@@ LUAI_MAXCSTACK limits the number of Lua stack slots that a C function -@* can use. -** CHANGE it if you need lots of (Lua) stack space for your C -** functions. This limit is arbitrary; its only purpose is to stop C -** functions to consume unlimited stack space. (must be smaller than -** -LUA_REGISTRYINDEX) -*/ -#define LUAI_MAXCSTACK 8000 - - - -/* -** {================================================================== -** CHANGE (to smaller values) the following definitions if your system -** has a small C stack. (Or you may want to change them to larger -** values if your system has a large C stack and these limits are -** too rigid for you.) Some of these constants control the size of -** stack-allocated arrays used by the compiler or the interpreter, while -** others limit the maximum number of recursive calls that the compiler -** or the interpreter can perform. Values too large may cause a C stack -** overflow for some forms of deep constructs. -** =================================================================== -*/ - - -/* -@@ LUAI_MAXCCALLS is the maximum depth for nested C calls (short) and -@* syntactical nested non-terminals in a program. -*/ -#define LUAI_MAXCCALLS 200 - - -/* -@@ LUAI_MAXVARS is the maximum number of local variables per function -@* (must be smaller than 250). -*/ -#define LUAI_MAXVARS 200 - - -/* -@@ LUAI_MAXUPVALUES is the maximum number of upvalues per function -@* (must be smaller than 250). -*/ -#define LUAI_MAXUPVALUES 60 - - -/* -@@ LUAL_BUFFERSIZE is the buffer size used by the lauxlib buffer system. -*/ -#define LUAL_BUFFERSIZE BUFSIZ - -/* }================================================================== */ - - - - -/* -** {================================================================== -@@ LUA_NUMBER is the type of numbers in Lua. -** CHANGE the following definitions only if you want to build Lua -** with a number type different from double. You may also need to -** change lua_number2int & lua_number2integer. -** =================================================================== -*/ - -#define LUA_NUMBER_DOUBLE -#define LUA_NUMBER double - -/* -@@ LUAI_UACNUMBER is the result of an 'usual argument conversion' -@* over a number. -*/ -#define LUAI_UACNUMBER double - - -/* -@@ LUA_NUMBER_SCAN is the format for reading numbers. -@@ LUA_NUMBER_FMT is the format for writing numbers. -@@ lua_number2str converts a number to a string. -@@ LUAI_MAXNUMBER2STR is maximum size of previous conversion. -@@ lua_str2number converts a string to a number. -*/ -#define LUA_NUMBER_SCAN "%lf" -#define LUA_NUMBER_FMT "%.14g" -#define lua_number2str(s,n) sprintf((s), LUA_NUMBER_FMT, (n)) -#define LUAI_MAXNUMBER2STR 32 /* 16 digits, sign, point, and \0 */ -#define lua_str2number(s,p) strtod((s), (p)) - - -/* -@@ The luai_num* macros define the primitive operations over numbers. -*/ -#if defined(LUA_CORE) -#include -#define luai_numadd(a,b) ((a)+(b)) -#define luai_numsub(a,b) ((a)-(b)) -#define luai_nummul(a,b) ((a)*(b)) -#define luai_numdiv(a,b) ((a)/(b)) -#define luai_nummod(a,b) ((a) - floor((a)/(b))*(b)) -#define luai_numpow(a,b) (pow(a,b)) -#define luai_numunm(a) (-(a)) -#define luai_numeq(a,b) ((a)==(b)) -#define luai_numlt(a,b) ((a)<(b)) -#define luai_numle(a,b) ((a)<=(b)) -#define luai_numisnan(a) (!luai_numeq((a), (a))) -#endif - - -/* -@@ lua_number2int is a macro to convert lua_Number to int. -@@ lua_number2integer is a macro to convert lua_Number to lua_Integer. -** CHANGE them if you know a faster way to convert a lua_Number to -** int (with any rounding method and without throwing errors) in your -** system. In Pentium machines, a naive typecast from double to int -** in C is extremely slow, so any alternative is worth trying. -*/ - -/* On a Pentium, resort to a trick */ -#if defined(LUA_NUMBER_DOUBLE) && !defined(LUA_ANSI) && !defined(__SSE2__) && \ - (defined(__i386) || defined (_M_IX86) || defined(__i386__)) - -/* On a Microsoft compiler, use assembler */ -#if defined(_MSC_VER) - -#define lua_number2int(i,d) __asm fld d __asm fistp i -#define lua_number2integer(i,n) lua_number2int(i, n) - -/* the next trick should work on any Pentium, but sometimes clashes - with a DirectX idiosyncrasy */ -#else - -union luai_Cast { double l_d; long l_l; }; -#define lua_number2int(i,d) \ - { volatile union luai_Cast u; u.l_d = (d) + 6755399441055744.0; (i) = u.l_l; } -#define lua_number2integer(i,n) lua_number2int(i, n) - -#endif - - -/* this option always works, but may be slow */ -#else -#define lua_number2int(i,d) ((i)=(int)(d)) -#define lua_number2integer(i,d) ((i)=(lua_Integer)(d)) - -#endif - -/* }================================================================== */ - - -/* -@@ LUAI_USER_ALIGNMENT_T is a type that requires maximum alignment. -** CHANGE it if your system requires alignments larger than double. (For -** instance, if your system supports long doubles and they must be -** aligned in 16-byte boundaries, then you should add long double in the -** union.) Probably you do not need to change this. -*/ -#define LUAI_USER_ALIGNMENT_T union { double u; void *s; long l; } - - -/* -@@ LUAI_THROW/LUAI_TRY define how Lua does exception handling. -** CHANGE them if you prefer to use longjmp/setjmp even with C++ -** or if want/don't to use _longjmp/_setjmp instead of regular -** longjmp/setjmp. By default, Lua handles errors with exceptions when -** compiling as C++ code, with _longjmp/_setjmp when asked to use them, -** and with longjmp/setjmp otherwise. -*/ -#if defined(__cplusplus) -/* C++ exceptions */ -#define LUAI_THROW(L,c) throw(c) -#define LUAI_TRY(L,c,a) try { a } catch(...) \ - { if ((c)->status == 0) (c)->status = -1; } -#define luai_jmpbuf int /* dummy variable */ - -#elif defined(LUA_USE_ULONGJMP) -/* in Unix, try _longjmp/_setjmp (more efficient) */ -#define LUAI_THROW(L,c) _longjmp((c)->b, 1) -#define LUAI_TRY(L,c,a) if (_setjmp((c)->b) == 0) { a } -#define luai_jmpbuf jmp_buf - -#else -/* default handling with long jumps */ -#define LUAI_THROW(L,c) longjmp((c)->b, 1) -#define LUAI_TRY(L,c,a) if (setjmp((c)->b) == 0) { a } -#define luai_jmpbuf jmp_buf - -#endif - - -/* -@@ LUA_MAXCAPTURES is the maximum number of captures that a pattern -@* can do during pattern-matching. -** CHANGE it if you need more captures. This limit is arbitrary. -*/ -#define LUA_MAXCAPTURES 32 - - -/* -@@ lua_tmpnam is the function that the OS library uses to create a -@* temporary name. -@@ LUA_TMPNAMBUFSIZE is the maximum size of a name created by lua_tmpnam. -** CHANGE them if you have an alternative to tmpnam (which is considered -** insecure) or if you want the original tmpnam anyway. By default, Lua -** uses tmpnam except when POSIX is available, where it uses mkstemp. -*/ -#if defined(loslib_c) || defined(luaall_c) - -#if defined(LUA_USE_MKSTEMP) -#include -#define LUA_TMPNAMBUFSIZE 32 -#define lua_tmpnam(b,e) { \ - strcpy(b, "/tmp/lua_XXXXXX"); \ - e = mkstemp(b); \ - if (e != -1) close(e); \ - e = (e == -1); } - -#else -#define LUA_TMPNAMBUFSIZE L_tmpnam -#define lua_tmpnam(b,e) { e = (tmpnam(b) == NULL); } -#endif - -#endif - - -/* -@@ lua_popen spawns a new process connected to the current one through -@* the file streams. -** CHANGE it if you have a way to implement it in your system. -*/ -#if defined(LUA_USE_POPEN) - -#define lua_popen(L,c,m) ((void)L, fflush(NULL), popen(c,m)) -#define lua_pclose(L,file) ((void)L, (pclose(file) != -1)) - -#elif defined(LUA_WIN) - -#define lua_popen(L,c,m) ((void)L, _popen(c,m)) -#define lua_pclose(L,file) ((void)L, (_pclose(file) != -1)) - -#else - -#define lua_popen(L,c,m) ((void)((void)c, m), \ - luaL_error(L, LUA_QL("popen") " not supported"), (FILE*)0) -#define lua_pclose(L,file) ((void)((void)L, file), 0) - -#endif - -/* -@@ LUA_DL_* define which dynamic-library system Lua should use. -** CHANGE here if Lua has problems choosing the appropriate -** dynamic-library system for your platform (either Windows' DLL, Mac's -** dyld, or Unix's dlopen). If your system is some kind of Unix, there -** is a good chance that it has dlopen, so LUA_DL_DLOPEN will work for -** it. To use dlopen you also need to adapt the src/Makefile (probably -** adding -ldl to the linker options), so Lua does not select it -** automatically. (When you change the makefile to add -ldl, you must -** also add -DLUA_USE_DLOPEN.) -** If you do not want any kind of dynamic library, undefine all these -** options. -** By default, _WIN32 gets LUA_DL_DLL and MAC OS X gets LUA_DL_DYLD. -*/ -#if defined(LUA_USE_DLOPEN) -#define LUA_DL_DLOPEN -#endif - -#if defined(LUA_WIN) -#define LUA_DL_DLL -#endif - - -/* -@@ LUAI_EXTRASPACE allows you to add user-specific data in a lua_State -@* (the data goes just *before* the lua_State pointer). -** CHANGE (define) this if you really need that. This value must be -** a multiple of the maximum alignment required for your machine. -*/ -#define LUAI_EXTRASPACE 0 - - -/* -@@ luai_userstate* allow user-specific actions on threads. -** CHANGE them if you defined LUAI_EXTRASPACE and need to do something -** extra when a thread is created/deleted/resumed/yielded. -*/ -#define luai_userstateopen(L) ((void)L) -#define luai_userstateclose(L) ((void)L) -#define luai_userstatethread(L,L1) ((void)L) -#define luai_userstatefree(L) ((void)L) -#define luai_userstateresume(L,n) ((void)L) -#define luai_userstateyield(L,n) ((void)L) - - -/* -@@ LUA_INTFRMLEN is the length modifier for integer conversions -@* in 'string.format'. -@@ LUA_INTFRM_T is the integer type correspoding to the previous length -@* modifier. -** CHANGE them if your system supports long long or does not support long. -*/ - -#if defined(LUA_USELONGLONG) - -#define LUA_INTFRMLEN "ll" -#define LUA_INTFRM_T long long - -#else - -#define LUA_INTFRMLEN "l" -#define LUA_INTFRM_T long - -#endif - - - -/* =================================================================== */ - -/* -** Local configuration. You can use this space to add your redefinitions -** without modifying the main part of the file. -*/ - - - -#endif - diff --git a/Utils/luarocks/include/lualib.h b/Utils/luarocks/include/lualib.h deleted file mode 100644 index 469417f67..000000000 --- a/Utils/luarocks/include/lualib.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -** $Id: lualib.h,v 1.36.1.1 2007/12/27 13:02:25 roberto Exp $ -** Lua standard libraries -** See Copyright Notice in lua.h -*/ - - -#ifndef lualib_h -#define lualib_h - -#include "lua.h" - - -/* Key to file-handle type */ -#define LUA_FILEHANDLE "FILE*" - - -#define LUA_COLIBNAME "coroutine" -LUALIB_API int (luaopen_base) (lua_State *L); - -#define LUA_TABLIBNAME "table" -LUALIB_API int (luaopen_table) (lua_State *L); - -#define LUA_IOLIBNAME "io" -LUALIB_API int (luaopen_io) (lua_State *L); - -#define LUA_OSLIBNAME "os" -LUALIB_API int (luaopen_os) (lua_State *L); - -#define LUA_STRLIBNAME "string" -LUALIB_API int (luaopen_string) (lua_State *L); - -#define LUA_MATHLIBNAME "math" -LUALIB_API int (luaopen_math) (lua_State *L); - -#define LUA_DBLIBNAME "debug" -LUALIB_API int (luaopen_debug) (lua_State *L); - -#define LUA_LOADLIBNAME "package" -LUALIB_API int (luaopen_package) (lua_State *L); - - -/* open all previous libraries */ -LUALIB_API void (luaL_openlibs) (lua_State *L); - - - -#ifndef lua_assert -#define lua_assert(x) ((void)0) -#endif - - -#endif diff --git a/Utils/luarocks/lib/lua/5.1/lfs.dll b/Utils/luarocks/lib/lua/5.1/lfs.dll deleted file mode 100644 index 2de5164d2..000000000 Binary files a/Utils/luarocks/lib/lua/5.1/lfs.dll and /dev/null differ diff --git a/Utils/luarocks/lib/luarocks/rocks/luadocumentor/0.1.5-1/bin/luadocumentor b/Utils/luarocks/lib/luarocks/rocks/luadocumentor/0.1.5-1/bin/luadocumentor deleted file mode 100644 index dccc8df18..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/luadocumentor/0.1.5-1/bin/luadocumentor +++ /dev/null @@ -1,178 +0,0 @@ -#!/usr/bin/lua --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- - --- Check interpreter version -if _VERSION ~= "Lua 5.1" then - print("Luadocumentor is only compatible with Lua 5.1") - return -end - --- --- Defining help message. --- - --- This message is compliant to 'lapp', which will match options and arguments --- from command line. -local help = [[luadocumentor v0.1.4: tool for Lua Documentation Language - -f, --format (default doc) Define output format : - * doc: Will produce HTML documentation from specified file(s) or directories. - * api: Will produce API file(s) from specified file(s) or directories. - -d, --dir (default docs) Define an output directory. If the given directory doesn't exist, it will be created. - -h, --help Display the help. - -n, --noheuristic Do not use code analysis, use only comments to generate documentation. - -s, --style (default !) The path of your own css file, if you don't want to use the default one. (usefull only for the doc format) - [directories|files] Define the paths or the directories of inputs files. Only Lua or C files containing a @module tag will be considered. -]] -local docgenerator = require 'docgenerator' -local lddextractor = require 'lddextractor' -local lapp = require 'pl.lapp' -local args = lapp( help ) - -if not args or #args < 1 then - print('No directory provided') - return -elseif args.help then - -- Just print help - print( help ) - return -end - --- --- define css file name --- -local cssfilename = "stylesheet.css" - --- --- Parse files from given folders --- - --- Check if all folders exist -local fs = require 'fs.lfs' -local allpresent, missing = fs.checkdirectory(args) - --- Some of given directories are absent -if missing then - -- List missing directories - print 'Unable to open' - for _, file in ipairs( missing ) do - print('\t'.. file) - end - return -end - --- Get files from given directories -local filestoparse, error = fs.filelist( args ) -if not filestoparse then - print ( error ) - return -end - --- --- Generate documentation only files --- -if args.format == 'api' then - for _, filename in ipairs( filestoparse ) do - - -- Loading file content - print('Dealing with "'..filename..'".') - local file, error = io.open(filename, 'r') - if not file then - print ('Unable to open "'..filename.."'.\n"..error) - else - local code = file:read('*all') - file:close() - - -- - -- Creating comment file - -- - local commentfile, error = lddextractor.generatecommentfile(filename, code) - - -- Getting module name - -- Optimize me - local module, moduleerror = lddextractor.generateapimodule(filename, code) - if not commentfile then - print('Unable to create documentation file for "'..filename..'"\n'..error) - elseif not module or not module.name then - local error = moduleerror and '\n'..moduleerror or '' - print('Unable to compute module name for "'..filename..'".'..error) - else - -- - -- Flush documentation file on disk - -- - local path = args.dir..fs.separator..module.name..'.lua' - local status, err = fs.fill(path, commentfile) - if not status then - print(err) - end - end - end - end - print('Done') - return -end - --- Deal only supported output types -if args.format ~= 'doc' then - print ('"'..args.format..'" format is not handled.') - return -end --- Generate html form files -local parsedfiles, unparsed = docgenerator.generatedocforfiles(filestoparse, cssfilename,args.noheuristic) - --- Show warnings on unparsed files -if #unparsed > 0 then - for _, faultyfile in ipairs( unparsed ) do - print( faultyfile ) - end -end --- This loop is just for counting parsed files --- TODO: Find a more elegant way to do it -local parsedfilescount = 0 -for _, p in pairs(parsedfiles) do - parsedfilescount = parsedfilescount + 1 -end -print (parsedfilescount .. ' file(s) parsed.') - --- Create html files -local generated = 0 -for _, apifile in pairs ( parsedfiles ) do - local status, err = fs.fill(args.dir..fs.separator..apifile.name..'.html', apifile.body) - if status then - generated = generated + 1 - else - print( 'Unable to create '..apifile.name..'.html on disk.') - end -end -print (generated .. ' file(s) generated.') - --- Copying css -local csscontent -if args.style == '!' then - csscontent = require 'defaultcss' -else - local css, error = io.open(args.style, 'r') - if not css then - print('Unable to open "'..args.style .. '".\n'..error) - return - end - csscontent = css:read("*all") - css:close() -end - -local status, error = fs.fill(args.dir..fs.separator..cssfilename, csscontent) -if not status then - print(error) - return -end -print('Adding css') -print('Done') diff --git a/Utils/luarocks/lib/luarocks/rocks/luadocumentor/0.1.5-1/doc/LICENSE b/Utils/luarocks/lib/luarocks/rocks/luadocumentor/0.1.5-1/doc/LICENSE deleted file mode 100644 index 11ecb7958..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/luadocumentor/0.1.5-1/doc/LICENSE +++ /dev/null @@ -1,198 +0,0 @@ -Eclipse Public License - v 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC -LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM -CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation - distributed under this Agreement, and -b) in the case of each subsequent Contributor: - i) changes to the Program, and - ii) additions to the Program; - - where such changes and/or additions to the Program originate from and are - distributed by that particular Contributor. A Contribution 'originates' from - a Contributor if it was added to the Program by such Contributor itself or - anyone acting on such Contributor's behalf. Contributions do not include - additions to the Program which: (i) are separate modules of software - distributed in conjunction with the Program under their own license - agreement, and (ii) are not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents" mean patent claims licensable by a Contributor which are -necessarily infringed by the use or sale of its Contribution alone or when -combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, -including all Contributors. - -2. GRANT OF RIGHTS - a) Subject to the terms of this Agreement, each Contributor hereby grants - Recipient a non-exclusive, worldwide, royalty-free copyright license to - reproduce, prepare derivative works of, publicly display, publicly perform, - distribute and sublicense the Contribution of such Contributor, if any, and - such derivative works, in source code and object code form. - b) Subject to the terms of this Agreement, each Contributor hereby grants - Recipient a non-exclusive, worldwide, royalty-free patent license under - Licensed Patents to make, use, sell, offer to sell, import and otherwise - transfer the Contribution of such Contributor, if any, in source code and - object code form. This patent license shall apply to the combination of the - Contribution and the Program if, at the time the Contribution is added by - the Contributor, such addition of the Contribution causes such combination - to be covered by the Licensed Patents. The patent license shall not apply - to any other combinations which include the Contribution. No hardware per - se is licensed hereunder. - c) Recipient understands that although each Contributor grants the licenses to - its Contributions set forth herein, no assurances are provided by any - Contributor that the Program does not infringe the patent or other - intellectual property rights of any other entity. Each Contributor - disclaims any liability to Recipient for claims brought by any other entity - based on infringement of intellectual property rights or otherwise. As a - condition to exercising the rights and licenses granted hereunder, each - Recipient hereby assumes sole responsibility to secure any other - intellectual property rights needed, if any. For example, if a third party - patent license is required to allow Recipient to distribute the Program, it - is Recipient's responsibility to acquire that license before distributing - the Program. - d) Each Contributor represents that to its knowledge it has sufficient - copyright rights in its Contribution, if any, to grant the copyright - license set forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its -own license agreement, provided that: - - a) it complies with the terms and conditions of this Agreement; and - b) its license agreement: - i) effectively disclaims on behalf of all Contributors all warranties and - conditions, express and implied, including warranties or conditions of - title and non-infringement, and implied warranties or conditions of - merchantability and fitness for a particular purpose; - ii) effectively excludes on behalf of all Contributors all liability for - damages, including direct, indirect, special, incidental and - consequential damages, such as lost profits; - iii) states that any provisions which differ from this Agreement are offered - by that Contributor alone and not by any other party; and - iv) states that source code for the Program is available from such - Contributor, and informs licensees how to obtain it in a reasonable - manner on or through a medium customarily used for software exchange. - -When the Program is made available in source code form: - - a) it must be made available under this Agreement; and - b) a copy of this Agreement must be included with each copy of the Program. - Contributors may not remove or alter any copyright notices contained within - the Program. - -Each Contributor must identify itself as the originator of its Contribution, if -any, in a manner that reasonably allows subsequent Recipients to identify the -originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with -respect to end users, business partners and the like. While this license is -intended to facilitate the commercial use of the Program, the Contributor who -includes the Program in a commercial product offering should do so in a manner -which does not create potential liability for other Contributors. Therefore, if -a Contributor includes the Program in a commercial product offering, such -Contributor ("Commercial Contributor") hereby agrees to defend and indemnify -every other Contributor ("Indemnified Contributor") against any losses, damages -and costs (collectively "Losses") arising from claims, lawsuits and other legal -actions brought by a third party against the Indemnified Contributor to the -extent caused by the acts or omissions of such Commercial Contributor in -connection with its distribution of the Program in a commercial product -offering. The obligations in this section do not apply to any claims or Losses -relating to any actual or alleged intellectual property infringement. In order -to qualify, an Indemnified Contributor must: a) promptly notify the Commercial -Contributor in writing of such claim, and b) allow the Commercial Contributor to -control, and cooperate with the Commercial Contributor in, the defense and any -related settlement negotiations. The Indemnified Contributor may participate in -any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product -offering, Product X. That Contributor is then a Commercial Contributor. If that -Commercial Contributor then makes performance claims, or offers warranties -related to Product X, those performance claims and warranties are such -Commercial Contributor's responsibility alone. Under this section, the -Commercial Contributor would have to defend claims against the other -Contributors related to those performance claims and warranties, and if a court -requires any other Contributor to pay any damages as a result, the Commercial -Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR -IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each -Recipient is solely responsible for determining the appropriateness of using and -distributing the Program and assumes all risks associated with its exercise of -rights under this Agreement , including but not limited to the risks and costs -of program errors, compliance with applicable laws, damage to or loss of data, -programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY -CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST -PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS -GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of the -terms of this Agreement, and without further action by the parties hereto, such -provision shall be reformed to the minimum extent necessary to make such -provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Program itself -(excluding combinations of the Program with other software or hardware) -infringes such Recipient's patent(s), then such Recipient's rights granted under -Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails to -comply with any of the material terms or conditions of this Agreement and does -not cure such failure in a reasonable period of time after becoming aware of -such noncompliance. If all Recipient's rights under this Agreement terminate, -Recipient agrees to cease use and distribution of the Program as soon as -reasonably practicable. However, Recipient's obligations under this Agreement -and any licenses granted by Recipient relating to the Program shall continue and -survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in -order to avoid inconsistency the Agreement is copyrighted and may only be -modified in the following manner. The Agreement Steward reserves the right to -publish new versions (including revisions) of this Agreement from time to time. -No one other than the Agreement Steward has the right to modify this Agreement. -The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation -may assign the responsibility to serve as the Agreement Steward to a suitable -separate entity. Each new version of the Agreement will be given a -distinguishing version number. The Program (including Contributions) may always -be distributed subject to the version of the Agreement under which it was -received. In addition, after a new version of the Agreement is published, -Contributor may elect to distribute the Program (including its Contributions) -under the new version. Except as expressly stated in Sections 2(a) and 2(b) -above, Recipient receives no rights or licenses to the intellectual property of -any Contributor under this Agreement, whether expressly, by implication, -estoppel or otherwise. All rights in the Program not expressly granted under -this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the -intellectual property laws of the United States of America. No party to this -Agreement will bring a legal action under this Agreement more than one year -after the cause of action arose. Each party waives its rights to a jury trial in -any resulting litigation. diff --git a/Utils/luarocks/lib/luarocks/rocks/luadocumentor/0.1.5-1/doc/README.md b/Utils/luarocks/lib/luarocks/rocks/luadocumentor/0.1.5-1/doc/README.md deleted file mode 100644 index 03611d630..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/luadocumentor/0.1.5-1/doc/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Lua Documentor - -LuaDocumentor allow users to generate HTML and API files from code documented -using Lua documentation language. - -Documentation is -[available here](http://wiki.eclipse.org/Koneki/LDT/User_Area/LuaDocumentor). diff --git a/Utils/luarocks/lib/luarocks/rocks/luadocumentor/0.1.5-1/luadocumentor-0.1.5-1.rockspec b/Utils/luarocks/lib/luarocks/rocks/luadocumentor/0.1.5-1/luadocumentor-0.1.5-1.rockspec deleted file mode 100644 index 9ed686c3f..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/luadocumentor/0.1.5-1/luadocumentor-0.1.5-1.rockspec +++ /dev/null @@ -1,57 +0,0 @@ -package = 'LuaDocumentor' -version = '0.1.5-1' -description = { - summary = 'LuaDocumentor allow users to generate HTML and API files from code documented using Lua documentation language.', - detailed = [[ - This is an example for the LuaRocks tutorial. - Here we would put a detailed, typically - paragraph-long description. - ]], - homepage = 'http://wiki.eclipse.org/Koneki/LDT/User_Area/LuaDocumentor', - license = 'EPL' -} -source = { - url = 'git://github.com/LuaDevelopmentTools/luadocumentor.git', - tag = 'v0.1.5-1' -} -dependencies = { - 'lua ~> 5.1', - 'luafilesystem ~> 1.6', - 'markdown ~> 0.32', - 'metalua-compiler ~> 0.7', - 'penlight ~> 0.9' -} -build = { - type = 'builtin', - install = { - bin = { - luadocumentor = 'luadocumentor.lua' - }, - lua = { - ['models.internalmodelbuilder'] = 'models/internalmodelbuilder.mlua' - } - }, - modules = { - defaultcss = 'defaultcss.lua', - docgenerator = 'docgenerator.lua', - extractors = 'extractors.lua', - lddextractor = 'lddextractor.lua', - templateengine = 'templateengine.lua', - - ['fs.lfs'] = 'fs/lfs.lua', - - ['models.apimodel'] = 'models/apimodel.lua', - ['models.apimodelbuilder'] = 'models/apimodelbuilder.lua', - ['models.internalmodel'] = 'models/internalmodel.lua', - ['models.ldparser'] = 'models/ldparser.lua', - - ['template.file'] = 'template/file.lua', - ['template.index'] = 'template/index.lua', - ['template.index.recordtypedef'] = 'template/index/recordtypedef.lua', - ['template.item'] = 'template/item.lua', - ['template.page'] = 'template/page.lua', - ['template.recordtypedef'] = 'template/recordtypedef.lua', - ['template.usage'] = 'template/usage.lua', - ['template.utils'] = 'template/utils.lua', - } -} diff --git a/Utils/luarocks/lib/luarocks/rocks/luadocumentor/0.1.5-1/rock_manifest b/Utils/luarocks/lib/luarocks/rocks/luadocumentor/0.1.5-1/rock_manifest deleted file mode 100644 index c286d43bd..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/luadocumentor/0.1.5-1/rock_manifest +++ /dev/null @@ -1,39 +0,0 @@ -rock_manifest = { - bin = { - luadocumentor = "bc5cc07f56db2cf1dbe80f0827332873" - }, - doc = { - LICENSE = "52a21f73ac77fd790dc40dc5acda0fc2", - ["README.md"] = "fcef1f43c69f3559b347d854b2626deb" - }, - lua = { - ["defaultcss.lua"] = "dd9b2b89e5080972bbb52056247c0c65", - ["docgenerator.lua"] = "92d0a3947d88226340014d2f033be37f", - ["extractors.lua"] = "74191695e5217706ee355925e5ca40fa", - fs = { - ["lfs.lua"] = "4d00f9bc942b02a86ccea16544d3e85d" - }, - ["lddextractor.lua"] = "56edde775a5d57818aa0a07b4f723536", - models = { - ["apimodel.lua"] = "3c401de18691b1222b0ad253958260ee", - ["apimodelbuilder.lua"] = "4c4a3c0b48b404973542dd99f994eb2c", - ["internalmodel.lua"] = "a1a21e50af8db0f0a0b9d164ccc08853", - ["internalmodelbuilder.mlua"] = "ff95dfca573ccc1c19a79434e96a492d", - ["ldparser.lua"] = "538904a3adbfff4ff83deda029847323" - }, - template = { - ["file.lua"] = "41f095bc049ef161060d8e3b4ac9de63", - index = { - ["recordtypedef.lua"] = "0977ff0048a837389c2ac10285eb1ce1" - }, - ["index.lua"] = "5a3b3cface3b1fd9cb2d56f1edd5487b", - ["item.lua"] = "5d5a6d9bffd8935c4ed283105ede331b", - ["page.lua"] = "351f4a7215272f7e448faeece4945bc0", - ["recordtypedef.lua"] = "69938e1d60e94eed7f95b0999f1386ca", - ["usage.lua"] = "979503deb84877cb221130a5be7c1535", - ["utils.lua"] = "ad97fb4e3de9fb6480b25cdd877b50d9" - }, - ["templateengine.lua"] = "09bfc6350e14f4ab509d14fb0fb295c0" - }, - ["luadocumentor-0.1.5-1.rockspec"] = "4ba1b88898dce89e7fd8fb6a700496a4" -} diff --git a/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/doc.css b/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/doc.css deleted file mode 100644 index e816a7e2c..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/doc.css +++ /dev/null @@ -1,212 +0,0 @@ -body { - margin-left: 1em; - margin-right: 1em; - font-family: arial, helvetica, geneva, sans-serif; - background-color:#ffffff; margin:0px; -} - -code { - font-family: "Andale Mono", monospace; -} - -tt { - font-family: "Andale Mono", monospace; -} - -body, td, th { font-size: 11pt; } - -h1, h2, h3, h4 { margin-left: 0em; } - -textarea, pre, tt { font-size:10pt; } -body, td, th { color:#000000; } -small { font-size:0.85em; } -h1 { font-size:1.5em; } -h2 { font-size:1.25em; } -h3 { font-size:1.15em; } -h4 { font-size:1.06em; } - -a:link { font-weight:bold; color: #004080; text-decoration: none; } -a:visited { font-weight:bold; color: #006699; text-decoration: none; } -a:link:hover { text-decoration:underline; } -hr { color:#cccccc } -img { border-width: 0px; } - -h3 { padding-top: 1em; } - -p { margin-left: 1em; } - -p.name { - font-family: "Andale Mono", monospace; - padding-top: 1em; - margin-left: 0em; -} - -blockquote { margin-left: 3em; } - -.example { - background-color: rgb(245, 245, 245); - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-style: solid; - border-right-style: solid; - border-bottom-style: solid; - border-left-style: solid; - border-top-color: silver; - border-right-color: silver; - border-bottom-color: silver; - border-left-color: silver; - padding: 1em; - margin-left: 1em; - margin-right: 1em; - font-family: "Andale Mono", monospace; - font-size: smaller; -} - -hr { - margin-left: 0em; - background: #00007f; - border: 0px; - height: 1px; -} - -ul { list-style-type: disc; } - -table.index { border: 1px #00007f; } -table.index td { text-align: left; vertical-align: top; } -table.index ul { padding-top: 0em; margin-top: 0em; } - -table { - border: 1px solid black; - border-collapse: collapse; - margin-left: auto; - margin-right: auto; -} - -th { - border: 1px solid black; - padding: 0.5em; -} - -td { - border: 1px solid black; - padding: 0.5em; -} -div.header, div.footer { margin-left: 0em; } - -#container { - margin-left: 1em; - margin-right: 1em; - background-color: #f0f0f0; -} - -#product { - text-align: center; - border-bottom: 1px solid #cccccc; - background-color: #ffffff; -} - -#product big { - font-size: 2em; -} - -#product_logo { -} - -#product_name { -} - -#product_description { -} - -#main { - background-color: #f0f0f0; - border-left: 2px solid #cccccc; -} - -#navigation { - float: left; - width: 12em; - margin: 0; - vertical-align: top; - background-color: #f0f0f0; - overflow:visible; -} - -#navigation h1 { - background-color:#e7e7e7; - font-size:1.1em; - color:#000000; - text-align:left; - margin:0px; - padding:0.2em; - border-top:1px solid #dddddd; - border-bottom:1px solid #dddddd; -} - -#navigation ul { - font-size:1em; - list-style-type: none; - padding: 0; - margin: 1px; -} - -#navigation li { - text-indent: -1em; - margin: 0em 0em 0em 0.5em; - display: block; - padding: 3px 0px 0px 12px; -} - -#navigation li li a { - padding: 0px 3px 0px -1em; -} - -#content { - margin-left: 12em; - padding: 1em; - border-left: 2px solid #cccccc; - border-right: 2px solid #cccccc; - background-color: #ffffff; -} - -#about { - clear: both; - margin: 0; - padding: 5px; - border-top: 2px solid #cccccc; - background-color: #ffffff; -} - -@media print { - body { - font: 10pt "Times New Roman", "TimeNR", Times, serif; - } - a { - font-weight:bold; color: #004080; text-decoration: underline; - } - #main { - background-color: #ffffff; border-left: 0px; - } - #container { - margin-left: 2%; margin-right: 2%; background-color: #ffffff; - } - #content { - margin-left: 0px; padding: 1em; border-left: 0px; border-right: 0px; background-color: #ffffff; - } - #navigation { - display: none; - } - #product_logo { - display: none; - } - #about img { - display: none; - } - .example { - font-family: "Andale Mono", monospace; - font-size: 8pt; - page-break-inside: avoid; - } -} diff --git a/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/examples.html b/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/examples.html deleted file mode 100644 index 34fee6977..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/examples.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - LuaFileSystem - - - - - - -
- -
- -
LuaFileSystem
-
File System Library for the Lua Programming Language
-
- -
- - - -
- -

Examples

- -

Directory iterator

- -

The following example iterates over a directory and recursively lists the -attributes for each file inside it.

- -
-local lfs = require"lfs"
-
-function attrdir (path)
-    for file in lfs.dir(path) do
-        if file ~= "." and file ~= ".." then
-            local f = path..'/'..file
-            print ("\t "..f)
-            local attr = lfs.attributes (f)
-            assert (type(attr) == "table")
-            if attr.mode == "directory" then
-                attrdir (f)
-            else
-                for name, value in pairs(attr) do
-                    print (name, value)
-                end
-            end
-        end
-    end
-end
-
-attrdir (".")
-
- -
- -
- -
-

Valid XHTML 1.0!

-

$Id: examples.html,v 1.8 2007/12/14 15:28:04 carregal Exp $

-
- -
- - - diff --git a/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/index.html b/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/index.html deleted file mode 100644 index a551a6a22..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/index.html +++ /dev/null @@ -1,218 +0,0 @@ - - - - LuaFileSystem - - - - - - -
- -
- -
LuaFileSystem
-
File System Library for the Lua Programming Language
-
- -
- - - -
- -

Overview

- -

LuaFileSystem is a Lua library -developed to complement the set of functions related to file -systems offered by the standard Lua distribution.

- -

LuaFileSystem offers a portable way to access -the underlying directory structure and file attributes.

- -

LuaFileSystem is free software and uses the same -license as Lua 5.1.

- -

Status

- -

Current version is 1.6.3. It works with Lua 5.1, 5.2 and 5.3.

- -

Download

- -

LuaFileSystem source can be downloaded from its -Github -page.

- -

History

- -
-
Version 1.6.3 [15/Jan/2015]
-
    -
  • Lua 5.3 support.
  • -
  • Assorted bugfixes.
  • -
- -
Version 1.6.2 [??/Oct/2012]
-
    -
  • Full Lua 5.2 compatibility (with Lua 5.1 fallbacks)
  • -
- -
Version 1.6.1 [01/Oct/2012]
-
    -
  • fix build for Lua 5.2
  • -
- -
Version 1.6.0 [26/Sep/2012]
-
    -
  • getcwd fix for Android
  • -
  • support for Lua 5.2
  • -
  • add lfs.link
  • -
  • other bug fixes
  • -
- -
Version 1.5.0 [20/Oct/2009]
-
    -
  • Added explicit next and close methods to second return value of lfs.dir -(the directory object), for explicit iteration or explicit closing.
  • -
  • Added directory locking via lfs.lock_dir function (see the manual).
  • -
-
Version 1.4.2 [03/Feb/2009]
-
-
    -
  • fixed bug [#13198] - lfs.attributes(filename, 'size') overflow on files > 2 Gb again (bug report and patch by KUBO Takehiro).
  • -
  • fixed bug [#39794] - Compile error on Solaris 10 (bug report and patch by Aaron B).
  • -
  • fixed compilation problems with Borland C.
  • -
-
- -
Version 1.4.1 [07/May/2008]
-
-
    -
  • documentation review
  • -
  • fixed Windows compilation issues
  • -
  • fixed bug in the Windows tests (patch by Shmuel Zeigerman)
  • -
  • fixed bug [#2185] - lfs.attributes(filename, 'size') overflow on files > 2 Gb -
  • -
-
- -
Version 1.4.0 [13/Feb/2008]
-
-
    -
  • added function - lfs.setmode - (works only in Windows systems).
  • -
  • lfs.attributes - raises an error if attribute does not exist
  • -
-
- -
Version 1.3.0 [26/Oct/2007]
-
- -
- -
Version 1.2.1 [08/May/2007]
-
-
    -
  • compatible only with Lua 5.1 (Lua 5.0 support was dropped)
  • -
-
- -
Version 1.2 [15/Mar/2006]
-
- -
- -
Version 1.1 [30/May/2005]
-
- -
- -
Version 1.0 [21/Jan/2005]
-
- -
Version 1.0 Beta [10/Nov/2004]
-
-
- -

Credits

- -

LuaFileSystem was designed by Roberto Ierusalimschy, -André Carregal and Tomás Guisasola as part of the -Kepler Project, -which holds its copyright. LuaFileSystem is currently maintained by Fábio Mascarenhas.

- -

Contact us

- -

For more information please -contact us. -Comments are welcome!

- -

You can also reach other Kepler developers and users on the Kepler Project -mailing list.

- -
- -
- -
-

Valid XHTML 1.0!

-

$Id: index.html,v 1.44 2009/02/04 21:21:33 carregal Exp $

-
- -
- - - diff --git a/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/license.html b/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/license.html deleted file mode 100644 index 1325e128e..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/license.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - LuaFileSystem - - - - - - -
- -
- -
LuaFileSystem
-
File System Library for the Lua Programming Language
-
- -
- - - -
- -

License

- -

-LuaFileSystem is free software: it can be used for both academic -and commercial purposes at absolutely no cost. There are no -royalties or GNU-like "copyleft" restrictions. LuaFileSystem -qualifies as -Open Source -software. -Its licenses are compatible with -GPL. -LuaFileSystem is not in the public domain and the -Kepler Project -keep its copyright. -The legal details are below. -

- -

The spirit of the license is that you are free to use -LuaFileSystem for any purpose at no cost without having to ask us. -The only requirement is that if you do use LuaFileSystem, then you -should give us credit by including the appropriate copyright notice -somewhere in your product or its documentation.

- -

The LuaFileSystem library is designed and implemented by Roberto -Ierusalimschy, André Carregal and Tomás Guisasola. -The implementation is not derived from licensed software.

- -
-

Copyright © 2003 Kepler Project.

- -

Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, copy, -modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions:

- -

The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software.

- -

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE.

- -
- -
- -
-

Valid XHTML 1.0!

-

$Id: license.html,v 1.13 2008/02/11 22:42:21 carregal Exp $

-
- -
- - - diff --git a/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/luafilesystem.png b/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/luafilesystem.png deleted file mode 100644 index e1dd8c65b..000000000 Binary files a/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/luafilesystem.png and /dev/null differ diff --git a/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/manual.html b/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/manual.html deleted file mode 100644 index a13d2001c..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/manual.html +++ /dev/null @@ -1,280 +0,0 @@ - - - - LuaFileSystem - - - - - - -
- -
- -
LuaFileSystem
-
File System Library for the Lua Programming Language
-
- -
- - - -
- -

Introduction

- -

LuaFileSystem is a Lua library -developed to complement the set of functions related to file -systems offered by the standard Lua distribution.

- -

LuaFileSystem offers a portable way to access -the underlying directory structure and file attributes.

- -

Building

- -

-LuaFileSystem should be built with Lua 5.1 so the language library -and header files for the target version must be installed properly. -

- -

-LuaFileSystem offers a Makefile and a separate configuration file, -config, -which should be edited to suit your installation before running -make. -The file has some definitions like paths to the external libraries, -compiler options and the like. -

- -

On Windows, the C runtime used to compile LuaFileSystem must be the same -runtime that Lua uses, or some LuaFileSystem functions will not work.

- -

Installation

- -

The easiest way to install LuaFileSystem is to use LuaRocks:

- -
-luarocks install luafilesystem
-
- -

If you prefer to install LuaFileSystem manually, the compiled binary should be copied to a directory in your -C path.

- -

Reference

- -

-LuaFileSystem offers the following functions: -

- -
-
lfs.attributes (filepath [, aname])
-
Returns a table with the file attributes corresponding to - filepath (or nil followed by an error message - in case of error). - If the second optional argument is given, then only the value of the - named attribute is returned (this use is equivalent to - lfs.attributes(filepath).aname, but the table is not created - and only one attribute is retrieved from the O.S.). - The attributes are described as follows; - attribute mode is a string, all the others are numbers, - and the time related attributes use the same time reference of - os.time: -
-
dev
-
on Unix systems, this represents the device that the inode resides on. On Windows systems, - represents the drive number of the disk containing the file
- -
ino
-
on Unix systems, this represents the inode number. On Windows systems this has no meaning
- -
mode
-
string representing the associated protection mode (the values could be - file, directory, link, socket, - named pipe, char device, block device or - other)
- -
nlink
-
number of hard links to the file
- -
uid
-
user-id of owner (Unix only, always 0 on Windows)
- -
gid
-
group-id of owner (Unix only, always 0 on Windows)
- -
rdev
-
on Unix systems, represents the device type, for special file inodes. - On Windows systems represents the same as dev
- -
access
-
time of last access
- -
modification
-
time of last data modification
- -
change
-
time of last file status change
- -
size
-
file size, in bytes
- -
blocks
-
block allocated for file; (Unix only)
- -
blksize
-
optimal file system I/O blocksize; (Unix only)
-
- This function uses stat internally thus if the given - filepath is a symbolic link, it is followed (if it points to - another link the chain is followed recursively) and the information - is about the file it refers to. - To obtain information about the link itself, see function - lfs.symlinkattributes. -
- -
lfs.chdir (path)
-
Changes the current working directory to the given - path.
- Returns true in case of success or nil plus an - error string.
- -
lfs.lock_dir(path, [seconds_stale])
-
Creates a lockfile (called lockfile.lfs) in path if it does not - exist and returns the lock. If the lock already exists checks if - it's stale, using the second parameter (default for the second - parameter is INT_MAX, which in practice means the lock will never - be stale. To free the the lock call lock:free().
- In case of any errors it returns nil and the error message. In - particular, if the lock exists and is not stale it returns the - "File exists" message.
- -
lfs.currentdir ()
-
Returns a string with the current working directory or nil - plus an error string.
- -
iter, dir_obj = lfs.dir (path)
-
- Lua iterator over the entries of a given directory. - Each time the iterator is called with dir_obj it returns a directory entry's name as a string, or - nil if there are no more entries. You can also iterate by calling dir_obj:next(), and - explicitly close the directory before the iteration finished with dir_obj:close(). - Raises an error if path is not a directory. -
- -
lfs.lock (filehandle, mode[, start[, length]])
-
Locks a file or a part of it. This function works on open files; the - file handle should be specified as the first argument. - The string mode could be either - r (for a read/shared lock) or w (for a - write/exclusive lock). The optional arguments start - and length can be used to specify a starting point and - its length; both should be numbers.
- Returns true if the operation was successful; in - case of error, it returns nil plus an error string. -
- -
lfs.link (old, new[, symlink])
-
Creates a link. The first argument is the object to link to - and the second is the name of the link. If the optional third - argument is true, the link will by a symbolic link (by default, a - hard link is created). -
- -
lfs.mkdir (dirname)
-
Creates a new directory. The argument is the name of the new - directory.
- Returns true if the operation was successful; - in case of error, it returns nil plus an error string. -
- -
lfs.rmdir (dirname)
-
Removes an existing directory. The argument is the name of the directory.
- Returns true if the operation was successful; - in case of error, it returns nil plus an error string.
- -
lfs.setmode (file, mode)
-
Sets the writing mode for a file. The mode string can be either "binary" or "text". - Returns true followed the previous mode string for the file, or - nil followed by an error string in case of errors. - On non-Windows platforms, where the two modes are identical, - setting the mode has no effect, and the mode is always returned as binary. -
- -
lfs.symlinkattributes (filepath [, aname])
-
Identical to lfs.attributes except that - it obtains information about the link itself (not the file it refers to). - On Windows this function does not yet support links, and is identical to - lfs.attributes. -
- -
lfs.touch (filepath [, atime [, mtime]])
-
Set access and modification times of a file. This function is - a bind to utime function. The first argument is the - filename, the second argument (atime) is the access time, - and the third argument (mtime) is the modification time. - Both times are provided in seconds (which should be generated with - Lua standard function os.time). - If the modification time is omitted, the access time provided is used; - if both times are omitted, the current time is used.
- Returns true if the operation was successful; - in case of error, it returns nil plus an error string. -
- -
lfs.unlock (filehandle[, start[, length]])
-
Unlocks a file or a part of it. This function works on - open files; the file handle should be specified as the first - argument. The optional arguments start and - length can be used to specify a starting point and its - length; both should be numbers.
- Returns true if the operation was successful; - in case of error, it returns nil plus an error string. -
-
- -
- -
- -
-

Valid XHTML 1.0!

-

$Id: manual.html,v 1.45 2009/06/03 20:53:55 mascarenhas Exp $

-
- -
- - - diff --git a/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/luafilesystem-1.6.3-2.rockspec b/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/luafilesystem-1.6.3-2.rockspec deleted file mode 100644 index c27e2b711..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/luafilesystem-1.6.3-2.rockspec +++ /dev/null @@ -1,29 +0,0 @@ -package = "LuaFileSystem" -version = "1.6.3-2" -source = { - url = "git://github.com/keplerproject/luafilesystem", - tag = "v_1_6_3" -} -description = { - summary = "File System Library for the Lua Programming Language", - detailed = [[ - LuaFileSystem is a Lua library developed to complement the set of - functions related to file systems offered by the standard Lua - distribution. LuaFileSystem offers a portable way to access the - underlying directory structure and file attributes. - ]], - homepage = "http://keplerproject.github.io/luafilesystem", - license = "MIT/X11" -} -dependencies = { - "lua >= 5.1" -} -build = { - type = "builtin", - modules = { - lfs = "src/lfs.c" - }, - copy_directories = { - "doc", "tests" - } -} diff --git a/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/rock_manifest b/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/rock_manifest deleted file mode 100644 index 0730f11cb..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/rock_manifest +++ /dev/null @@ -1,19 +0,0 @@ -rock_manifest = { - doc = { - us = { - ["doc.css"] = "d0a913514fb190240b3b4033d105cbc0", - ["examples.html"] = "5832f72021728374cf57b621d62ce0ff", - ["index.html"] = "96885bdda963939f0a363b5fa6b16b59", - ["license.html"] = "e3a756835cb7c8ae277d5e513c8e32ee", - ["luafilesystem.png"] = "81e923e976e99f894ea0aa8b52baff29", - ["manual.html"] = "d6473799b73ce486c3ea436586cb3b34" - } - }, - lib = { - ["lfs.dll"] = "c0e2145e1ef2815ae5fae01454291b66" - }, - ["luafilesystem-1.6.3-2.rockspec"] = "eb0ef7c190516892eb8357af799eea5f", - tests = { - ["test.lua"] = "7b4ddb5bdb7e0b1b1ed0150d473535c9" - } -} diff --git a/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/tests/test.lua b/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/tests/test.lua deleted file mode 100644 index abfbd4d96..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/luafilesystem/1.6.3-2/tests/test.lua +++ /dev/null @@ -1,175 +0,0 @@ -#!/usr/bin/env lua5.1 - -local tmp = "/tmp" -local sep = string.match (package.config, "[^\n]+") -local upper = ".." - -local lfs = require"lfs" -print (lfs._VERSION) - -io.write(".") -io.flush() - -function attrdir (path) - for file in lfs.dir(path) do - if file ~= "." and file ~= ".." then - local f = path..sep..file - print ("\t=> "..f.." <=") - local attr = lfs.attributes (f) - assert (type(attr) == "table") - if attr.mode == "directory" then - attrdir (f) - else - for name, value in pairs(attr) do - print (name, value) - end - end - end - end -end - --- Checking changing directories -local current = assert (lfs.currentdir()) -local reldir = string.gsub (current, "^.*%"..sep.."([^"..sep.."])$", "%1") -assert (lfs.chdir (upper), "could not change to upper directory") -assert (lfs.chdir (reldir), "could not change back to current directory") -assert (lfs.currentdir() == current, "error trying to change directories") -assert (lfs.chdir ("this couldn't be an actual directory") == nil, "could change to a non-existent directory") - -io.write(".") -io.flush() - --- Changing creating and removing directories -local tmpdir = current..sep.."lfs_tmp_dir" -local tmpfile = tmpdir..sep.."tmp_file" --- Test for existence of a previous lfs_tmp_dir --- that may have resulted from an interrupted test execution and remove it -if lfs.chdir (tmpdir) then - assert (lfs.chdir (upper), "could not change to upper directory") - assert (os.remove (tmpfile), "could not remove file from previous test") - assert (lfs.rmdir (tmpdir), "could not remove directory from previous test") -end - -io.write(".") -io.flush() - --- tries to create a directory -assert (lfs.mkdir (tmpdir), "could not make a new directory") -local attrib, errmsg = lfs.attributes (tmpdir) -if not attrib then - error ("could not get attributes of file `"..tmpdir.."':\n"..errmsg) -end -local f = io.open(tmpfile, "w") -f:close() - -io.write(".") -io.flush() - --- Change access time -local testdate = os.time({ year = 2007, day = 10, month = 2, hour=0}) -assert (lfs.touch (tmpfile, testdate)) -local new_att = assert (lfs.attributes (tmpfile)) -assert (new_att.access == testdate, "could not set access time") -assert (new_att.modification == testdate, "could not set modification time") - -io.write(".") -io.flush() - --- Change access and modification time -local testdate1 = os.time({ year = 2007, day = 10, month = 2, hour=0}) -local testdate2 = os.time({ year = 2007, day = 11, month = 2, hour=0}) - -assert (lfs.touch (tmpfile, testdate2, testdate1)) -local new_att = assert (lfs.attributes (tmpfile)) -assert (new_att.access == testdate2, "could not set access time") -assert (new_att.modification == testdate1, "could not set modification time") - -io.write(".") -io.flush() - --- Checking link (does not work on Windows) -if lfs.link (tmpfile, "_a_link_for_test_", true) then - assert (lfs.attributes"_a_link_for_test_".mode == "file") - assert (lfs.symlinkattributes"_a_link_for_test_".mode == "link") - assert (lfs.link (tmpfile, "_a_hard_link_for_test_")) - assert (lfs.attributes (tmpfile, "nlink") == 2) - assert (os.remove"_a_link_for_test_") - assert (os.remove"_a_hard_link_for_test_") -end - -io.write(".") -io.flush() - --- Checking text/binary modes (only has an effect in Windows) -local f = io.open(tmpfile, "w") -local result, mode = lfs.setmode(f, "binary") -assert(result) -- on non-Windows platforms, mode is always returned as "binary" -result, mode = lfs.setmode(f, "text") -assert(result and mode == "binary") -f:close() - -io.write(".") -io.flush() - --- Restore access time to current value -assert (lfs.touch (tmpfile, attrib.access, attrib.modification)) -new_att = assert (lfs.attributes (tmpfile)) -assert (new_att.access == attrib.access) -assert (new_att.modification == attrib.modification) - -io.write(".") -io.flush() - --- Check consistency of lfs.attributes values -local attr = lfs.attributes (tmpfile) -for key, value in pairs(attr) do - assert (value == lfs.attributes (tmpfile, key), - "lfs.attributes values not consistent") -end - --- Remove new file and directory -assert (os.remove (tmpfile), "could not remove new file") -assert (lfs.rmdir (tmpdir), "could not remove new directory") -assert (lfs.mkdir (tmpdir..sep.."lfs_tmp_dir") == nil, "could create a directory inside a non-existent one") - -io.write(".") -io.flush() - --- Trying to get attributes of a non-existent file -assert (lfs.attributes ("this couldn't be an actual file") == nil, "could get attributes of a non-existent file") -assert (type(lfs.attributes (upper)) == "table", "couldn't get attributes of upper directory") - -io.write(".") -io.flush() - --- Stressing directory iterator -count = 0 -for i = 1, 4000 do - for file in lfs.dir (tmp) do - count = count + 1 - end -end - -io.write(".") -io.flush() - --- Stressing directory iterator, explicit version -count = 0 -for i = 1, 4000 do - local iter, dir = lfs.dir(tmp) - local file = dir:next() - while file do - count = count + 1 - file = dir:next() - end - assert(not pcall(dir.next, dir)) -end - -io.write(".") -io.flush() - --- directory explicit close -local iter, dir = lfs.dir(tmp) -dir:close() -assert(not pcall(dir.next, dir)) -print"Ok!" diff --git a/Utils/luarocks/lib/luarocks/rocks/luasrcdiet/0.3.0-2/bin/luasrcdiet b/Utils/luarocks/lib/luarocks/rocks/luasrcdiet/0.3.0-2/bin/luasrcdiet deleted file mode 100644 index 28e62894a..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/luasrcdiet/0.3.0-2/bin/luasrcdiet +++ /dev/null @@ -1,653 +0,0 @@ -#!/usr/bin/env lua ---------- --- LuaSrcDiet --- --- Compresses Lua source code by removing unnecessary characters. --- For Lua 5.1+ source code. --- --- **Notes:** --- --- * Remember to update version and date information below (MSG_TITLE). --- * TODO: passing data tables around is a horrific mess. --- * TODO: to implement pcall() to properly handle lexer etc. errors. --- * TODO: need some automatic testing for a semblance of sanity. --- * TODO: the plugin module is highly experimental and unstable. ----- -local equiv = require "luasrcdiet.equiv" -local fs = require "luasrcdiet.fs" -local llex = require "luasrcdiet.llex" -local lparser = require "luasrcdiet.lparser" -local luasrcdiet = require "luasrcdiet.init" -local optlex = require "luasrcdiet.optlex" -local optparser = require "luasrcdiet.optparser" - -local byte = string.byte -local concat = table.concat -local find = string.find -local fmt = string.format -local gmatch = string.gmatch -local match = string.match -local print = print -local rep = string.rep -local sub = string.sub - -local plugin - -local LUA_VERSION = match(_VERSION, " (5%.[123])$") or "5.1" - --- Is --opt-binequiv available for this Lua version? -local BIN_EQUIV_AVAIL = LUA_VERSION == "5.1" and not package.loaded.jit - - ----------------------- Messages and textual data ---------------------- - -local MSG_TITLE = fmt([[ -LuaSrcDiet: Puts your Lua 5.1+ source code on a diet -Version %s <%s> -]], luasrcdiet._VERSION, luasrcdiet._HOMEPAGE) - -local MSG_USAGE = [[ -usage: luasrcdiet [options] [filenames] - -example: - >luasrcdiet myscript.lua -o myscript_.lua - -options: - -v, --version prints version information - -h, --help prints usage information - -o specify file name to write output - -s suffix for output files (default '_') - --keep keep block comment with inside - --plugin run in plugin/ directory - - stop handling arguments - - (optimization levels) - --none all optimizations off (normalizes EOLs only) - --basic lexer-based optimizations only - --maximum maximize reduction of source - - (informational) - --quiet process files quietly - --read-only read file and print token stats only - --dump-lexer dump raw tokens from lexer to stdout - --dump-parser dump variable tracking tables from parser - --details extra info (strings, numbers, locals) - -features (to disable, insert 'no' prefix like --noopt-comments): -%s -default settings: -%s]] - --- Optimization options, for ease of switching on and off. --- --- * Positive to enable optimization, negative (no) to disable. --- * These options should follow --opt-* and --noopt-* style for now. -local OPTION = [[ ---opt-comments,'remove comments and block comments' ---opt-whitespace,'remove whitespace excluding EOLs' ---opt-emptylines,'remove empty lines' ---opt-eols,'all above, plus remove unnecessary EOLs' ---opt-strings,'optimize strings and long strings' ---opt-numbers,'optimize numbers' ---opt-locals,'optimize local variable names' ---opt-entropy,'tries to reduce symbol entropy of locals' ---opt-srcequiv,'insist on source (lexer stream) equivalence' ---opt-binequiv,'insist on binary chunk equivalence (only for PUC Lua 5.1)' ---opt-experimental,'apply experimental optimizations' -]] - --- Preset configuration. -local DEFAULT_CONFIG = [[ - --opt-comments --opt-whitespace --opt-emptylines - --opt-numbers --opt-locals - --opt-srcequiv --noopt-binequiv -]] --- Override configurations: MUST explicitly enable/disable everything. -local BASIC_CONFIG = [[ - --opt-comments --opt-whitespace --opt-emptylines - --noopt-eols --noopt-strings --noopt-numbers - --noopt-locals --noopt-entropy - --opt-srcequiv --noopt-binequiv -]] -local MAXIMUM_CONFIG = [[ - --opt-comments --opt-whitespace --opt-emptylines - --opt-eols --opt-strings --opt-numbers - --opt-locals --opt-entropy - --opt-srcequiv -]] .. (BIN_EQUIV_AVAIL and ' --opt-binequiv' or ' --noopt-binequiv') - -local NONE_CONFIG = [[ - --noopt-comments --noopt-whitespace --noopt-emptylines - --noopt-eols --noopt-strings --noopt-numbers - --noopt-locals --noopt-entropy - --opt-srcequiv --noopt-binequiv -]] - -local DEFAULT_SUFFIX = "_" -- default suffix for file renaming -local PLUGIN_SUFFIX = "luasrcdiet.plugin." -- relative location of plugins - - -------------- Startup and initialize option list handling ------------- - ---- Simple error message handler; change to error if traceback wanted. --- --- @tparam string msg The message to print. -local function die(msg) - print("LuaSrcDiet (error): "..msg); os.exit(1) -end ---die = error--DEBUG - --- Prepare text for list of optimizations, prepare lookup table. -local MSG_OPTIONS = "" -do - local WIDTH = 24 - local o = {} - for op, desc in gmatch(OPTION, "%s*([^,]+),'([^']+)'") do - local msg = " "..op - msg = msg..rep(" ", WIDTH - #msg)..desc.."\n" - MSG_OPTIONS = MSG_OPTIONS..msg - o[op] = true - o["--no"..sub(op, 3)] = true - end - OPTION = o -- replace OPTION with lookup table -end - -MSG_USAGE = fmt(MSG_USAGE, MSG_OPTIONS, DEFAULT_CONFIG) - - ---------- Global variable initialization, option set handling --------- - -local suffix = DEFAULT_SUFFIX -- file suffix -local option = {} -- program options -local stat_c, stat_l -- statistics tables - ---- Sets option lookup table based on a text list of options. --- --- Note: additional forced settings for --opt-eols is done in optlex.lua. --- --- @tparam string CONFIG -local function set_options(CONFIG) - for op in gmatch(CONFIG, "(%-%-%S+)") do - if sub(op, 3, 4) == "no" and -- handle negative options - OPTION["--"..sub(op, 5)] then - option[sub(op, 5)] = false - else - option[sub(op, 3)] = true - end - end -end - - --------------------------- Support functions -------------------------- - --- List of token types, parser-significant types are up to TTYPE_GRAMMAR --- while the rest are not used by parsers; arranged for stats display. -local TTYPES = { - "TK_KEYWORD", "TK_NAME", "TK_NUMBER", -- grammar - "TK_STRING", "TK_LSTRING", "TK_OP", - "TK_EOS", - "TK_COMMENT", "TK_LCOMMENT", -- non-grammar - "TK_EOL", "TK_SPACE", -} -local TTYPE_GRAMMAR = 7 - -local EOLTYPES = { -- EOL names for token dump - ["\n"] = "LF", ["\r"] = "CR", - ["\n\r"] = "LFCR", ["\r\n"] = "CRLF", -} - ---- Reads source code from the file. --- --- @tparam string fname Path of the file to read. --- @treturn string Content of the file. -local function load_file(fname) - local data, err = fs.read_file(fname, "rb") - if not data then die(err) end - return data -end - ---- Saves source code to the file. --- --- @tparam string fname Path of the destination file. --- @tparam string dat The data to write into the file. -local function save_file(fname, dat) - local ok, err = fs.write_file(fname, dat, "wb") - if not ok then die(err) end -end - - ------------------- Functions to deal with statistics ------------------ - ---- Initializes the statistics table. -local function stat_init() - stat_c, stat_l = {}, {} - for i = 1, #TTYPES do - local ttype = TTYPES[i] - stat_c[ttype], stat_l[ttype] = 0, 0 - end -end - ---- Adds a token to the statistics table. --- --- @tparam string tok The token. --- @param seminfo -local function stat_add(tok, seminfo) - stat_c[tok] = stat_c[tok] + 1 - stat_l[tok] = stat_l[tok] + #seminfo -end - ---- Computes totals for the statistics table, returns average table. --- --- @treturn table -local function stat_calc() - local function avg(c, l) -- safe average function - if c == 0 then return 0 end - return l / c - end - local stat_a = {} - local c, l = 0, 0 - for i = 1, TTYPE_GRAMMAR do -- total grammar tokens - local ttype = TTYPES[i] - c = c + stat_c[ttype]; l = l + stat_l[ttype] - end - stat_c.TOTAL_TOK, stat_l.TOTAL_TOK = c, l - stat_a.TOTAL_TOK = avg(c, l) - c, l = 0, 0 - for i = 1, #TTYPES do -- total all tokens - local ttype = TTYPES[i] - c = c + stat_c[ttype]; l = l + stat_l[ttype] - stat_a[ttype] = avg(stat_c[ttype], stat_l[ttype]) - end - stat_c.TOTAL_ALL, stat_l.TOTAL_ALL = c, l - stat_a.TOTAL_ALL = avg(c, l) - return stat_a -end - - ------------------------------ Main tasks ----------------------------- - ---- A simple token dumper, minimal translation of seminfo data. --- --- @tparam string srcfl Path of the source file. -local function dump_tokens(srcfl) - -- Load file and process source input into tokens. - local z = load_file(srcfl) - local toklist, seminfolist = llex.lex(z) - - -- Display output. - for i = 1, #toklist do - local tok, seminfo = toklist[i], seminfolist[i] - if tok == "TK_OP" and byte(seminfo) < 32 then - seminfo = "("..byte(seminfo)..")" - elseif tok == "TK_EOL" then - seminfo = EOLTYPES[seminfo] - else - seminfo = "'"..seminfo.."'" - end - print(tok.." "..seminfo) - end--for -end - ---- Dumps globalinfo and localinfo tables. --- --- @tparam string srcfl Path of the source file. -local function dump_parser(srcfl) - -- Load file and process source input into tokens, - local z = load_file(srcfl) - local toklist, seminfolist, toklnlist = llex.lex(z) - - -- Do parser optimization here. - local xinfo = lparser.parse(toklist, seminfolist, toklnlist) - local globalinfo, localinfo = xinfo.globalinfo, xinfo.localinfo - - -- Display output. - local hl = rep("-", 72) - print("*** Local/Global Variable Tracker Tables ***") - print(hl.."\n GLOBALS\n"..hl) - -- global tables have a list of xref numbers only - for i = 1, #globalinfo do - local obj = globalinfo[i] - local msg = "("..i..") '"..obj.name.."' -> " - local xref = obj.xref - for j = 1, #xref do msg = msg..xref[j].." " end - print(msg) - end - -- Local tables have xref numbers and a few other special - -- numbers that are specially named: decl (declaration xref), - -- act (activation xref), rem (removal xref). - print(hl.."\n LOCALS (decl=declared act=activated rem=removed)\n"..hl) - for i = 1, #localinfo do - local obj = localinfo[i] - local msg = "("..i..") '"..obj.name.."' decl:"..obj.decl.. - " act:"..obj.act.." rem:"..obj.rem - if obj.is_special then - msg = msg.." is_special" - end - msg = msg.." -> " - local xref = obj.xref - for j = 1, #xref do msg = msg..xref[j].." " end - print(msg) - end - print(hl.."\n") -end - ---- Reads source file(s) and reports some statistics. --- --- @tparam string srcfl Path of the source file. -local function read_only(srcfl) - -- Load file and process source input into tokens. - local z = load_file(srcfl) - local toklist, seminfolist = llex.lex(z) - print(MSG_TITLE) - print("Statistics for: "..srcfl.."\n") - - -- Collect statistics. - stat_init() - for i = 1, #toklist do - local tok, seminfo = toklist[i], seminfolist[i] - stat_add(tok, seminfo) - end--for - local stat_a = stat_calc() - - -- Display output. - local function figures(tt) - return stat_c[tt], stat_l[tt], stat_a[tt] - end - local tabf1, tabf2 = "%-16s%8s%8s%10s", "%-16s%8d%8d%10.2f" - local hl = rep("-", 42) - print(fmt(tabf1, "Lexical", "Input", "Input", "Input")) - print(fmt(tabf1, "Elements", "Count", "Bytes", "Average")) - print(hl) - for i = 1, #TTYPES do - local ttype = TTYPES[i] - print(fmt(tabf2, ttype, figures(ttype))) - if ttype == "TK_EOS" then print(hl) end - end - print(hl) - print(fmt(tabf2, "Total Elements", figures("TOTAL_ALL"))) - print(hl) - print(fmt(tabf2, "Total Tokens", figures("TOTAL_TOK"))) - print(hl.."\n") -end - ---- Processes source file(s), writes output and reports some statistics. --- --- @tparam string srcfl Path of the source file. --- @tparam string destfl Path of the destination file where to write optimized source. -local function process_file(srcfl, destfl) - -- handle quiet option - local function print(...) --luacheck: ignore 431 - if option.QUIET then return end - _G.print(...) - end - if plugin and plugin.init then -- plugin init - option.EXIT = false - plugin.init(option, srcfl, destfl) - if option.EXIT then return end - end - print(MSG_TITLE) -- title message - - -- Load file and process source input into tokens. - local z = load_file(srcfl) - if plugin and plugin.post_load then -- plugin post-load - z = plugin.post_load(z) or z - if option.EXIT then return end - end - local toklist, seminfolist, toklnlist = llex.lex(z) - if plugin and plugin.post_lex then -- plugin post-lex - plugin.post_lex(toklist, seminfolist, toklnlist) - if option.EXIT then return end - end - - -- Collect 'before' statistics. - stat_init() - for i = 1, #toklist do - local tok, seminfo = toklist[i], seminfolist[i] - stat_add(tok, seminfo) - end--for - local stat1_a = stat_calc() - local stat1_c, stat1_l = stat_c, stat_l - - -- Do parser optimization here. - optparser.print = print -- hack - local xinfo = lparser.parse(toklist, seminfolist, toklnlist) - if plugin and plugin.post_parse then -- plugin post-parse - plugin.post_parse(xinfo.globalinfo, xinfo.localinfo) - if option.EXIT then return end - end - optparser.optimize(option, toklist, seminfolist, xinfo) - if plugin and plugin.post_optparse then -- plugin post-optparse - plugin.post_optparse() - if option.EXIT then return end - end - - -- Do lexer optimization here, save output file. - local warn = optlex.warn -- use this as a general warning lookup - optlex.print = print -- hack - toklist, seminfolist, toklnlist - = optlex.optimize(option, toklist, seminfolist, toklnlist) - if plugin and plugin.post_optlex then -- plugin post-optlex - plugin.post_optlex(toklist, seminfolist, toklnlist) - if option.EXIT then return end - end - local dat = concat(seminfolist) - -- Depending on options selected, embedded EOLs in long strings and - -- long comments may not have been translated to \n, tack a warning. - if find(dat, "\r\n", 1, 1) or - find(dat, "\n\r", 1, 1) then - warn.MIXEDEOL = true - end - - -- Test source and binary chunk equivalence. - equiv.init(option, llex, warn) - equiv.source(z, dat) - if BIN_EQUIV_AVAIL then - equiv.binary(z, dat) - end - local smsg = "before and after lexer streams are NOT equivalent!" - local bmsg = "before and after binary chunks are NOT equivalent!" - -- for reporting, die if option was selected, else just warn - if warn.SRC_EQUIV then - if option["opt-srcequiv"] then die(smsg) end - else - print("*** SRCEQUIV: token streams are sort of equivalent") - if option["opt-locals"] then - print("(but no identifier comparisons since --opt-locals enabled)") - end - print() - end - if warn.BIN_EQUIV then - if option["opt-binequiv"] then die(bmsg) end - elseif BIN_EQUIV_AVAIL then - print("*** BINEQUIV: binary chunks are sort of equivalent") - print() - end - - -- Save optimized source stream to output file. - save_file(destfl, dat) - - -- Collect 'after' statistics. - stat_init() - for i = 1, #toklist do - local tok, seminfo = toklist[i], seminfolist[i] - stat_add(tok, seminfo) - end--for - local stat_a = stat_calc() - - -- Display output. - print("Statistics for: "..srcfl.." -> "..destfl.."\n") - local function figures(tt) - return stat1_c[tt], stat1_l[tt], stat1_a[tt], - stat_c[tt], stat_l[tt], stat_a[tt] - end - local tabf1, tabf2 = "%-16s%8s%8s%10s%8s%8s%10s", - "%-16s%8d%8d%10.2f%8d%8d%10.2f" - local hl = rep("-", 68) - print("*** lexer-based optimizations summary ***\n"..hl) - print(fmt(tabf1, "Lexical", - "Input", "Input", "Input", - "Output", "Output", "Output")) - print(fmt(tabf1, "Elements", - "Count", "Bytes", "Average", - "Count", "Bytes", "Average")) - print(hl) - for i = 1, #TTYPES do - local ttype = TTYPES[i] - print(fmt(tabf2, ttype, figures(ttype))) - if ttype == "TK_EOS" then print(hl) end - end - print(hl) - print(fmt(tabf2, "Total Elements", figures("TOTAL_ALL"))) - print(hl) - print(fmt(tabf2, "Total Tokens", figures("TOTAL_TOK"))) - print(hl) - - -- Report warning flags from optimizing process. - if warn.LSTRING then - print("* WARNING: "..warn.LSTRING) - elseif warn.MIXEDEOL then - print("* WARNING: ".."output still contains some CRLF or LFCR line endings") - elseif warn.SRC_EQUIV then - print("* WARNING: "..smsg) - elseif warn.BIN_EQUIV then - print("* WARNING: "..bmsg) - end - print() -end - - ----------------------------- Main functions --------------------------- - -local arg = {...} -- program arguments -set_options(DEFAULT_CONFIG) -- set to default options at beginning - ---- Does per-file handling, ship off to tasks. --- --- @tparam {string,...} fspec List of source files. -local function do_files(fspec) - for i = 1, #fspec do - local srcfl = fspec[i] - local destfl - - -- Find and replace extension for filenames. - local extb, exte = find(srcfl, "%.[^%.%\\%/]*$") - local basename, extension = srcfl, "" - if extb and extb > 1 then - basename = sub(srcfl, 1, extb - 1) - extension = sub(srcfl, extb, exte) - end - destfl = basename..suffix..extension - if #fspec == 1 and option.OUTPUT_FILE then - destfl = option.OUTPUT_FILE - end - if srcfl == destfl then - die("output filename identical to input filename") - end - - -- Perform requested operations. - if option.DUMP_LEXER then - dump_tokens(srcfl) - elseif option.DUMP_PARSER then - dump_parser(srcfl) - elseif option.READ_ONLY then - read_only(srcfl) - else - process_file(srcfl, destfl) - end - end--for -end - ---- The main function. -local function main() - local fspec = {} - local argn, i = #arg, 1 - if argn == 0 then - option.HELP = true - end - - -- Handle arguments. - while i <= argn do - local o, p = arg[i], arg[i + 1] - local dash = match(o, "^%-%-?") - if dash == "-" then -- single-dash options - if o == "-h" then - option.HELP = true; break - elseif o == "-v" then - option.VERSION = true; break - elseif o == "-s" then - if not p then die("-s option needs suffix specification") end - suffix = p - i = i + 1 - elseif o == "-o" then - if not p then die("-o option needs a file name") end - option.OUTPUT_FILE = p - i = i + 1 - elseif o == "-" then - break -- ignore rest of args - else - die("unrecognized option "..o) - end - elseif dash == "--" then -- double-dash options - if o == "--help" then - option.HELP = true; break - elseif o == "--version" then - option.VERSION = true; break - elseif o == "--keep" then - if not p then die("--keep option needs a string to match for") end - option.KEEP = p - i = i + 1 - elseif o == "--plugin" then - if not p then die("--plugin option needs a module name") end - if option.PLUGIN then die("only one plugin can be specified") end - option.PLUGIN = p - plugin = require(PLUGIN_SUFFIX..p) - i = i + 1 - elseif o == "--quiet" then - option.QUIET = true - elseif o == "--read-only" then - option.READ_ONLY = true - elseif o == "--basic" then - set_options(BASIC_CONFIG) - elseif o == "--maximum" then - set_options(MAXIMUM_CONFIG) - elseif o == "--none" then - set_options(NONE_CONFIG) - elseif o == "--dump-lexer" then - option.DUMP_LEXER = true - elseif o == "--dump-parser" then - option.DUMP_PARSER = true - elseif o == "--details" then - option.DETAILS = true - elseif OPTION[o] then -- lookup optimization options - set_options(o) - else - die("unrecognized option "..o) - end - else - fspec[#fspec + 1] = o -- potential filename - end - i = i + 1 - end--while - if option.HELP then - print(MSG_TITLE..MSG_USAGE); return true - elseif option.VERSION then - print(MSG_TITLE); return true - end - if option["opt-binequiv"] and not BIN_EQUIV_AVAIL then - die("--opt-binequiv is available only for PUC Lua 5.1!") - end - if #fspec > 0 then - if #fspec > 1 and option.OUTPUT_FILE then - die("with -o, only one source file can be specified") - end - do_files(fspec) - return true - else - die("nothing to do!") - end -end - --- entry point -> main() -> do_files() -if not main() then - die("Please run with option -h or --help for usage information") -end diff --git a/Utils/luarocks/lib/luarocks/rocks/luasrcdiet/0.3.0-2/doc/features-and-usage.adoc b/Utils/luarocks/lib/luarocks/rocks/luasrcdiet/0.3.0-2/doc/features-and-usage.adoc deleted file mode 100644 index 345d581b5..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/luasrcdiet/0.3.0-2/doc/features-and-usage.adoc +++ /dev/null @@ -1,300 +0,0 @@ -= Features and Usage -Kein-Hong Man -2011-09-13 - - -== Features - -LuaSrcDiet features include the following: - -* Predefined default, _--basic_ (token-only) and _--maximum_ settings. -* Avoid deleting a block comment with a certain message with _--keep_; this is for copyright or license texts. -* Special handling for `#!` (shbang) lines and in functions, `self` implicit parameters. -* Dumping of raw information using _--dump-lexer_ and _--dump-parser_. - See the `samples` directory. -* A HTML plugin: outputs files that highlights globals and locals, useful for eliminating globals. See the `samples` directory. -* An SLOC plugin: counts significant lines of Lua code, like SLOCCount. -* Source and binary equivalence testing with _--opt-srcequiv_ and _--opt-binequiv_. - -List of optimizations: - - * Line endings are always normalized to LF, except those embedded in comments or strings. - * _--opt-comments_: Removal of comments and comment blocks. - * _--opt-whitespace_: Removal of whitespace, excluding end-of-line characters. - * _--opt-emptylines_: Removal of empty lines. - * _--opt-eols_: Removal of unnecessary end-of-line characters. - * _--opt-strings_: Rewrite strings and long strings. See the `samples` directory. - * _--opt-numbers_: Rewrite numbers. See the `samples` directory. - * _--opt-locals_: Rename local variable names. Does not rename field or method names. - * _--opt-entropy_: Tries to improve symbol entropy when renaming locals by calculating actual letter frequencies. - * _--opt-experimental_: Apply experimental optimizations. - -LuaSrcDiet tries to allow each option to be enabled or disabled separately, but they are not completely orthogonal. - -If comment removal is disabled, LuaSrcDiet only removes trailing whitespace. -Trailing whitespace is not removed in long strings, a warning is generated instead. -If empty line removal is disabled, LuaSrcDiet keeps all significant code on the same lines. -Thus, a user is able to debug using the original sources as a reference since the line numbering is unchanged. - -String optimization deals mainly with optimizing escape sequences, but delimiters can be switched between single quotes and double quotes if the source size of the string can be reduced. -For long strings and long comments, LuaSrcDiet also tries to reduce the `=` separators in the -delimiters if possible. -For number optimization, LuaSrcDiet saves space by trying to generate the shortest possible sequence, and in the process it does not produce “proper” scientific notation (e.g. 1.23e5) but does away with the decimal point (e.g. 123e3) instead. - -The local variable name optimizer uses a full parser of Lua 5.1 source code, thus it can rename all local variables, including upvalues and function parameters. -It should handle the implicit `self` parameter gracefully. -In addition, local variable names are either renamed into the shortest possible names following English frequent letter usage or are arranged by calculating entropy with the _--opt-entropy_ option. -Variable names are reused whenever possible, reducing the number of unique variable names. -For example, for `LuaSrcDiet.lua` (version 0.11.0), 683 local identifiers representing 88 unique names were optimized into 32 unique names, all which are one character in length, saving over 2600 bytes. - -If you need some kind of reassurance that your app will still work at reduced size, see the section on verification below. - - -== Usage - -LuaSrcDiet needs a Lua 5.1.x (preferably Lua 5.1.4) binary to run. -On Unix machines, one can use the following command line: - -[source, sh] -LuaSrcDiet myscript.lua -o myscript_.lua - -On Windows machines, the above command line can be used on Cygwin, or you can run Lua with the LuaSrcDiet script like this: - -[source, sh] -lua LuaSrcDiet.lua myscript.lua -o myscript_.lua - -When run without arguments, LuaSrcDiet prints a list of options. -Also, you can check the `Makefile` for some examples of command lines to use. -For example, for maximum code size reduction and maximum verbosity, use: - -[source, sh] -LuaSrcDiet --maximum --details myscript.lua -o myscript_.lua - - -=== Output Example - -A sample output of LuaSrcDiet 0.11.0 for processing `llex.lua` at _--maximum_ settings is as follows: - ----- -Statistics for: LuaSrcDiet.lua -> sample/LuaSrcDiet.lua - -*** local variable optimization summary *** ----------------------------------------------------------- -Variable Unique Decl. Token Size Average -Types Names Count Count Bytes Bytes ----------------------------------------------------------- -Global 10 0 19 95 5.00 ----------------------------------------------------------- -Local (in) 88 153 683 3340 4.89 -TOTAL (in) 98 153 702 3435 4.89 ----------------------------------------------------------- -Local (out) 32 153 683 683 1.00 -TOTAL (out) 42 153 702 778 1.11 ----------------------------------------------------------- - -*** lexer-based optimizations summary *** --------------------------------------------------------------------- -Lexical Input Input Input Output Output Output -Elements Count Bytes Average Count Bytes Average --------------------------------------------------------------------- -TK_KEYWORD 374 1531 4.09 374 1531 4.09 -TK_NAME 795 3963 4.98 795 1306 1.64 -TK_NUMBER 54 59 1.09 54 59 1.09 -TK_STRING 152 1725 11.35 152 1717 11.30 -TK_LSTRING 7 1976 282.29 7 1976 282.29 -TK_OP 997 1092 1.10 997 1092 1.10 -TK_EOS 1 0 0.00 1 0 0.00 --------------------------------------------------------------------- -TK_COMMENT 140 6884 49.17 1 18 18.00 -TK_LCOMMENT 7 1723 246.14 0 0 0.00 -TK_EOL 543 543 1.00 197 197 1.00 -TK_SPACE 1270 2465 1.94 263 263 1.00 --------------------------------------------------------------------- -Total Elements 4340 21961 5.06 2841 8159 2.87 --------------------------------------------------------------------- -Total Tokens 2380 10346 4.35 2380 7681 3.23 --------------------------------------------------------------------- ----- - -Overall, the file size is reduced by more than 9 kiB. -Tokens in the above report can be classified into “real” or actual tokens, and “fake” or whitespace tokens. -The number of “real” tokens remained the same. -Short comments and long comments were completely eliminated. -The number of line endings was reduced by 59, while all but 152 whitespace characters were optimized away. -So, token separators (whitespace, including line endings) now takes up just 10 % of the total file size. -No optimization of number tokens was possible, while 2 bytes were saved for string tokens. - -For local variable name optimization, the report shows that 38 unique local variable names were reduced to 20 unique names. -The number of identifier tokens should stay the same (there is currently no optimization option to optimize away non-essential or unused “real” tokens). -Since there can be at most 53 single-character identifiers, all local variables are now one character in length. -Over 600 bytes was saved. -_--details_ will give a longer report and much more information. - -A sample output of LuaSrcDiet 0.12.0 for processing the one-file `LuaSrcDiet.lua` program itself at _--maximum_ and _--opt-experimental_ settings is as follows: - ----- -*** local variable optimization summary *** ----------------------------------------------------------- -Variable Unique Decl. Token Size Average -Types Names Count Count Bytes Bytes ----------------------------------------------------------- -Global 27 0 51 280 5.49 ----------------------------------------------------------- -Local (in) 482 1063 4889 21466 4.39 -TOTAL (in) 509 1063 4940 21746 4.40 ----------------------------------------------------------- -Local (out) 55 1063 4889 4897 1.00 -TOTAL (out) 82 1063 4940 5177 1.05 ----------------------------------------------------------- - -*** BINEQUIV: binary chunks are sort of equivalent - -Statistics for: LuaSrcDiet.lua -> app_experimental.lua - -*** lexer-based optimizations summary *** --------------------------------------------------------------------- -Lexical Input Input Input Output Output Output -Elements Count Bytes Average Count Bytes Average --------------------------------------------------------------------- -TK_KEYWORD 3083 12247 3.97 3083 12247 3.97 -TK_NAME 5401 24121 4.47 5401 7552 1.40 -TK_NUMBER 467 494 1.06 467 494 1.06 -TK_STRING 787 7983 10.14 787 7974 10.13 -TK_LSTRING 14 3453 246.64 14 3453 246.64 -TK_OP 6381 6861 1.08 6171 6651 1.08 -TK_EOS 1 0 0.00 1 0 0.00 --------------------------------------------------------------------- -TK_COMMENT 1611 72339 44.90 1 18 18.00 -TK_LCOMMENT 18 4404 244.67 0 0 0.00 -TK_EOL 4419 4419 1.00 1778 1778 1.00 -TK_SPACE 10439 24475 2.34 2081 2081 1.00 --------------------------------------------------------------------- -Total Elements 32621 160796 4.93 19784 42248 2.14 --------------------------------------------------------------------- -Total Tokens 16134 55159 3.42 15924 38371 2.41 --------------------------------------------------------------------- -* WARNING: before and after lexer streams are NOT equivalent! ----- - -The command line was: - -[source, sh] -lua LuaSrcDiet.lua LuaSrcDiet.lua -o app_experimental.lua --maximum --opt-experimental --noopt-srcequiv - -The important thing to note is that while the binary chunks are equivalent, the source lexer streams are not equivalent. -Hence, the _--noopt-srcequiv_ makes LuaSrcDiet report a warning for failing the source equivalence test. - -`LuaSrcDiet.lua` was reduced from 157 kiB to about 41.3 kiB. -The _--opt-experimental_ option saves an extra 205 bytes over standard _--maximum_. -Note the reduction in `TK_OP` count due to a reduction in semicolons and parentheses. -`TK_SPACE` has actually increased a bit due to semicolons that are changed into single spaces; some of these spaces could not be removed. - -For more performance numbers, see the <> page. - - -== Verification - -Code size reduction can be quite a hairy thing (even I peer at the results in suspicion), so some kind of verification is desirable for users who expect processed files to _not_ blow up. -Since LuaSrcDiet has been talked about as a tool to reduce code size in projects such as WoW add-ons, `eLua` and `nspire`, adding a verification step will reduce risk for all users of LuaSrcDiet. - -LuaSrcDiet performs two kinds of equivalence testing as of version 0.12.0. -The two tests can be very, very loosely termed as _source equivalence testing_ and _binary equivalence testing_. -They are controlled by the _--opt-srcequiv_ and _--opt-binequiv_ options and are enabled by default. - -Testing behaviour can be summarized as follows: - -* Both tests are always executed. - The options control the resulting actions taken. -* Both options are normally enabled. - This will make any failing test to throw an error. -* When an option is disabled, LuaSrcDiet will at most print a warning. -* For passing results, see the following subsections that describe what the tests actually does. - -You only need to disable a testing option for experimental optimizations (see the following section for more information on this). -For anything up to and including _--maximum_, both tests should pass. -If any test fail under these conditions, then something has gone wrong with LuaSrcDiet, and I would be interested to know what has blown up. - - -=== _--opt-srcequiv_ Source Equivalence - -The source equivalence test uses LuaSrcDiet’s lexer to read and compare the _before_ and _after_ lexer token streams. -Numbers and strings are dumped as binary chunks using `loadstring()` and `string.dump()` and the results compared. - -If your file passes this test, it means that a Lua 5.1.x binary should see the exact same token streams for both _before_ and _after_ files. -That is, the parser in Lua will see the same lexer sequence coming from the source for both files and thus they _should_ be equivalent. -Touch wood. -Heh. - -However, if you are _cross-compiling_, it may be possible for this test to fail. -Experienced Lua developers can modify `equiv.lua` to handle such cases. - - -=== _--opt-binequiv_ Binary Equivalence - -The binary equivalence test uses `loadstring()` and `string.dump()` to generate binary chunks of the entire _before_ and _after_ files. -Also, any shbang (`#!`) lines are removed prior to generation of the binary chunks. - -The binary chunks are then run through a fake `undump` routine to verify the integrity of the binary chunks and to compare all parts that ought to be identical. - -On a per-function prototype basis (where _ignored_ means that any difference between the two binary chunks is ignored): - -* All debug information is ignored. -* The source name is ignored. -* Any line number data is ignored. - For example, `linedefined` and `lastlinedefined`. - -The rest of the two binary chunks must be identical. -So, while the two are not binary-exact, they can be loosely termed as “equivalent” and should run in exactly the same manner. -Sort of. -You get the idea. - -This test may also cause problems if you are _cross-compiling_. - - -== Experimental Stuff - -The _--opt-experimental_ option applies experimental optimizations that generally, makes changes to “real” tokens. -Such changes may or may not lead to the result failing binary chunk equivalence testing. -They would likely fail source lexer stream equivalence testing, so the _--noopt-srcequiv_ option needs to be applied so that LuaSrcDiet just gives a warning instead of an error. - -For sample files, see the `samples` directory. - -Currently implemented experimental optimizations are as follows: - - -=== Semicolon Operator Removal - -The semicolon (`;`) operator is an optional operator that is used to separate statements. -The optimization turns all of these operators into single spaces, which are then run through whitespace removal. -At worst, there will be no change to file size. - -* _Fails_ source lexer stream equivalence. -* _Passes_ binary chunk equivalence. - - -=== Function Call Syntax Sugar Optimization - -This optimization turns function calls that takes a single string or long string parameter into its syntax-sugar representation, which leaves out the parentheses. -Since strings can abut anything, each instance saves 2 bytes. - -For example, the following: - -[source, lua] -fish("cow")fish('cow')fish([[cow]]) - -is turned into: - -[source, lua] -fish"cow"fish'cow'fish[[cow]] - -* _Fails_ source lexer stream equivalence. -* _Passes_ binary chunk equivalence. - - -=== Other Experimental Optimizations - -There are two more of these optimizations planned, before focus is turned to the Lua 5.2.x series: - -* Simple `local` keyword removal. - Planned to work for a few kinds of patterns only. -* User directed name replacement, which will need user input to modify names or identifiers used in table keys and function methods or fields. diff --git a/Utils/luarocks/lib/luarocks/rocks/luasrcdiet/0.3.0-2/doc/performance-stats.adoc b/Utils/luarocks/lib/luarocks/rocks/luasrcdiet/0.3.0-2/doc/performance-stats.adoc deleted file mode 100644 index 3ee744e7d..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/luasrcdiet/0.3.0-2/doc/performance-stats.adoc +++ /dev/null @@ -1,128 +0,0 @@ -= Performance Statistics -Kein-Hong Man -2011-09-13 - - -== Size Comparisons - -The following is the result of processing `llex.lua` from LuaSrcDiet 0.11.0 using various optimization options: - -|=== -| LuaSrcDiet Option | Size (bytes) - -| Original | 12,421 -| Empty lines only | 12,395 -| Whitespace only | 9,372 -| Local rename only | 11,794 -| _--basic_ setting | 3,835 -| Program default | 3,208 -| _--maximum_ setting | 3,130 -|=== - -The program’s default settings does not remove all unnecessary EOLs. -The _--basic_ setting is more conservative than the default settings, it disables optimization of strings and numbers and renaming of locals. - -For version 0.12.0, the following is the result of processing `LuaSrcDiet.lua` using various optimization options: - -|=== -| LuaSrcDiet Option | Size (bytes) - -| Original | 160,796 -| _--basic_ setting | 60,219 -| Program default | 43,650 -| _--maximum_ setting | 42,453 -| max + experimental | 42,248 -|=== - -The above best size can go a lot lower with simple `local` keyword removal and user directed name replacement, which will be the subject of the next release of LuaSrcDiet. - - -== Compression and luac - -File sizes of LuaSrcDiet 0.11.0 main files in various forms: - -[cols="m,5*d", options="header,footer"] -|=== -| Source File | Original Size (bytes) | `luac` normal (bytes) | `luac` stripped (bytes) | LuaSrcDiet _--basic_ (bytes) | LuaSrcDiet _--maximum_ (bytes) - -| LuaSrcDiet.lua | 21,961 | 20,952 | 11,000 | 11,005 | 8,159 -| llex.lua | 12,421 | 8,613 | 4,247 | 3,835 | 3,130 -| lparser.lua | 41,757 | 27,215 | 12,506 | 11,755 | 7,666 -| optlex.lua | 31,009 | 16,992 | 8,021 | 9,129 | 6,858 -| optparser.lua | 16,511 | 9,021 | 3,520 | 5,087 | 2,999 - -| Total | 123,659 | 82,793 | 39,294 | 40,811 | 28,812 -|=== - -* “LuaSrcDiet --maximum” has the smallest total file size. -* The ratio of “Original Size” to “LuaSrcDiet --maximum” is *4.3*. -* The ratio of “Original Size” to “luac stripped” is *3.1*. -* The ratio of “luac stripped” to “LuaSrcDiet --maximum” is *1.4*. - -Compressibility of LuaSrcDiet 0.11.0 main files in various forms: - -|=== -| Compression Method | Original Size | `luac` normal | `luac` stripped | LuaSrcDiet _--basic_ | LuaSrcDiet _--maximum_ - -| Uncompressed originals | 123,659 | 82,793 | 39,294 | 40,811 | 28,812 -| gzip -9 | 28,288 | 29,210 | 17,732 | 12,041 | 10,451 -| bzip2 -9 | 24,407 | 27,232 | 16,856 | 11,480 | 9,815 -| lzma (7-zip max) | 25,530 | 23,908 | 15,741 | 11,241 | 9,685 -|=== - -* “LuaSrcDiet --maximum” has the smallest total file size (but a binary chunk loads faster and works with a smaller Lua executable). -* The ratio of “Original size” to “Original size + bzip2” is *5.1*. -* The ratio of “Original size” to “LuaSrcDiet --maximum + bzip2” is *12.6*. -* The ratio of “LuaSrcDiet --maximum” to “LuaSrcDiet --maximum + bzip2” is *2.9*. -* The ratio of “Original size” to “luac stripped + bzip2” is *7.3*. -* The ratio of “luac stripped” to “luac stripped + bzip2” is *2.3*. -* The ratio of “luac stripped + bzip2” to “LuaSrcDiet --maximum + bzip2” is *1.7*. - -So, squeezed source code are smaller than stripped binary chunks and compresses better than stripped binary chunks, at a ratio of 2.9 for squeezed source code versus 2.3 for stripped binary chunks. -Compressed binary chunks is still a very efficient way of storing Lua scripts, because using only binary chunks allow for the parts of Lua needed to compile from sources to be omitted (`llex.o`, `lparser.o`, `lcode.o`, `ldump.o`), saving over 24KB in the process. - -Note that LuaSrcDiet _does not_ answer the question of whether embedding source code is better or embedding binary chunks is better. -It is simply a utility for producing smaller source code files and an exercise in processing Lua source code using a Lua-based lexer and parser skeleton. - - -== Compile Speed - -The following is a primitive attempt to analyze in-memory Lua script loading performance (using the `loadstring` function in Lua). - -The LuaSrcDiet 0.11.0 files (original, squeezed with _--maximum_ and stripped binary chunks versions) are loaded into memory first before a loop runs to repeatedly load the script files for 10 seconds. -A null loop is also performed (processing empty strings) and the time taken per null iteration is subtracted as a form of null adjustment. -Then, various performance parameters are calculated. -Note that `LuaSrcDiet.lua` was slightly modified (`#!` line removed) to let the `loadstring` function run. -The results below were obtained with a Lua 5.1.3 executable compiled using `make generic` on Cygwin/Windows XP SP2 on a Sempron 3000+ (1.8GHz). -The LuaSrcDiet 0.11.0 source files have 11,180 “real” tokens in total. - -[cols=" dump_llex.dat - - -== Lexer Optimizations - -We aim to keep lexer-based optimizations free of parser considerations, i.e. we allow for generalized optimization of token sequences. -The table below considers the requirements for all combinations of significant tokens (except `TK_EOS`). -Other tokens are whitespace-like. -Comments can be considered to be a special kind of whitespace, e.g. a short comment needs to have a following EOL token, if we do not want to optimize away short comments. - -[cols="h,6*m", options="header"] -|=== -| _1st \ 2nd Token_ | Keyword | Name | Number | String | LString | Oper - -| Keyword | [S] | [S] | [S] | – | – | – -| Name | [S] | [S] | [S] | – | – | – -| Number | [S] | [S] | [S] | – | – | [1] -| String | – | – | – | – | – | – -| LString | – | – | – | – | – | – -| Oper | – | – | [1] | – | – | [2] -|=== - -A dash (`-`) in the above means that the first token can abut the second token. - -`*[S]*`:: Need at least one whitespace, set as either a space or kept as an EOL. - -`*[1]*`:: - Need a space if operator is a `.`, all others okay. - A `+` or `-` is used as part of a floating-point spec, but there does not appear to be any way of creating a float by joining with number with a `+` or `-` plus another number. - Since an `e` has to be somewhere in the first token, this can’t be done. - -`*[2]*`:: - Normally there cannot be consecutive operators, but we plan to allow for generalized optimization of token sequences, i.e. even sequences that are grammatically illegal; so disallow adjacent operators if: - * the first is in `[=<>]` and the second is `=` - * disallow dot sequences to be adjacent, but `...` first okay - * disallow `[` followed by `=` or `[` (not optimal) - -Also, a minus `-` cannot preceed a Comment or LComment, because comments start with a `--` prefix. -Apart from that, all Comment or LComment tokens can be set abut with a real token. - - -== Local Variable Renaming - -The following discusses the problem of local variable optimization, specifically _local variable renaming_ in order to reduce source code size. - - -=== TK_NAME Token Considerations - -A `TK_NAME` token means a number of things, and some of these cannot be renamed without analyzing the source code. -We are interested in the use of `TK_NAME` in the following: - -[loweralpha] -. global variable access, -. local variable declaration, including `local` statements, `local` functions, function parameters, implicit `self` locals, -. local variable access, including upvalue access. - -`TK_NAME` is also used in parts of the grammar as constant strings – these tokens cannot be optimized without user assistance. -These include usage as: - -[loweralpha, start=4] -. keys in `key=value` pairs in table construction, -. field or method names in `a:b` or `a.b` syntax forms. - -For the local variable name optimization scheme used, we do not consider (d) and (e), and while global variables cannot be renamed without some kind of user assistance, they need to be considered or tracked as part of Lua’s variable access scheme. - - -=== Lifetime of a Local Variable - -Consider the following example: - -[source, lua] -local string, table = string, table - -In the example, the two locals are assigned the values of the globals with the same names. -When Lua encounters the declaration portion: - -[source, lua] -local string, table - -the parser cannot immediately make the two local variable available to following code. -In the parser and code generator, locals are inactive when entries are created. -They are activated only when the function `adjustlocalvars()` is called to activate the appropriate local variables. - -NOTE: The terminology used here may not be identical to the ones used in the Dragon Book – they merely follow the LuaSrcDiet code as it was written before I have read the Dragon Book. - -In the example, the two local variables are activated only after the whole statement has been parsed, that is, after the last `table` token. -Hence, the statement works as expected. -Also, once the two local variables goes out of scope, `removevars()` is called to deactivate them, allowing other variables of the same name to become visible again. - -Another example worth mentioning is: - -[source, lua] -local a, a, a, = 1, 2, 3 - -The above will assign 3 to `a`. - -Thus, when optimizing local variable names, (1) we need to consider accesses of global variable names affecting the namespace, (2) for the local variable names themselves, we need to consider when they are declared, activated and removed, and (3) within the “live” time of locals, we need to know when they are accessed (since locals that are never accessed don’t really matter.) - - -=== Local Variable Tracking - -Every local variable declaration is considered an object to be renamed. - -From the parser, we have the original name of the local variable, the token positions for declaration, activation and removal, and the token position for all the `TK_NAME` tokens which references this local. -All instances of the implicit `self` local variable are also flagged as such. - -In addition to local variable information, all global variable accesses are tabled, one object entry for one name, and each object has a corresponding list of token positions for the `TK_NAME` tokens, which is where the global variables were accessed. - -The key criteria is: *Our act of renaming cannot change the visibility of any of these locals and globals at the time they are accessed*. -However, _their scope of visibility may be changed during which they are not accessed_, so someone who tries to insert a variable reference somewhere into a program that has its locals renamed may find that it now refers to a different variable. - -Of course, if every variable has a unique name, then there is no need for a name allocation algorithm, as there will be no conflict. -But, in order to maximize utilization of short identifier names to reduce the final code size, we want to reuse the names as much as possible. -In addition, fewer names will likely reduce symbol entropy and may slightly improve compressibility of the source code. -LuaSrcDiet avoids the use of non-ASCII letters, so there are only 53 single-character variable names. - - -=== Name Allocation Theory - -To understand the renaming algorithm, first we need to establish how different local and global variables can operate happily without interfering with each other. - -Consider three objects, local object A, local object B and global object G. -A and B involve declaration, activation and removal, and within the period it is active, there may be zero or more accesses of the local. -For G, there are only global variable accesses to look into. - -Assume that we have assigned a new name to A and we wish to consider its effects on other locals and globals, for which we choose B and G as examples. -We assume local B has not been assigned a new name as we expect our algorithm to take care of collisions. - -A’s lifetime is something like this: - ----- - Decl Act Rem - + +-------------------------------+ - ------------------------------------------------- ----- - -where “Decl” is the time of declaration, “Act” is the time of activation, and “Rem” is the time of removal. -Between “Act” and “Rem”, the local is alive or “live” and Lua can see it if its corresponding `TK_NAME` identifier comes up. - ----- - Decl Act Rem - + +-------------------------------+ - ------------------------------------------------- - * * * * - (1) (2) (3) (4) ----- - -Recall that the key criteria is to not change the visibility of globals and locals during when they are accessed. -Consider local and global accesses at (1), (2), (3) and (4). - -A global G of the same name as A will only collide at (3), where Lua will see A and not G. -Since G must be accessed at (3) according to what the parser says, and we cannot modify the positions of “Decl”, “Act” and “Rem”, it follows that A cannot have the same name as G. - ----- - Decl Act Rem - + +-----------------------+ - --------------------------------- - (1)+ +---+ (2)+ +---+ (3)+ +---+ (4)+ +---+ - --------- --------- --------- --------- ----- - -For the case of A and B having the same names and colliding, consider the cases for which B is at (1), (2), (3) or (4) in the above. - -(1) and (4) means that A and B are completely isolated from each other, hence in the two cases, A and B can safely use the same variable names. -To be specific, since we have assigned A, B is considered completely isolated from A if B’s activation-to-removal period is isolated from the time of A’s first access to last access, meaning B’s active time will never affect any of A’s accesses. - -For (2) and (3), we have two cases where we need to consider which one has been activated first. -For (2), B is active before A, so A cannot impose on B. -But A’s accesses are valid while B is active, since A can override B. -For no collision in the case of (2), we simply need to ensure that the last access of B occurs before A is activated. - -For (3), B is activated before A, hence B can override A’s accesses. -For no collision, all of A’s accesses cannot happen while B is active. -Thus position (3) follows the “A is never accessed when B is active” rule in a general way. -Local variables of a child function are in the position of (3). -To illustrate, the local B can use the same name as local A and live in a child function or block scope if each time A is accessed, Lua sees A and not B. -So we have to check all accesses of A and see whether they collide with the active period of B. -If A is not accessed during that period, then B can be active with the same name. - -The above appears to resolve all sorts of cases where the active times of A and B overlap. -Note that in the above, the allocator does not need to know how locals are separated according to function prototypes. -Perhaps the allocator can be simplified if knowledge of function structure is utilized. -This scheme was implemented in a hurry in 2008 — it could probably be simpler if Lua grammar is considered, but LuaSrcDiet mainly processes various index values in tables. - - -=== Name Allocation Algorithm - -To begin with, the name generator is mostly separate from the name allocation algorithm. -The name generator returns the next shortest name for the algorithm to apply to local variables. -To attempt to reduce symbol entropy (which benefit compression algorithms), the name generator follows English frequent letter usage. -There is also an option to calculate an actual symbol entropy table from the input data. - -Since there are 53 one-character identifiers and (53 * 63 - 4) two-character identifiers (minus a few keywords), there isn’t a pressing need to optimally maximize name reuse. -The single-file version of LuaSrcDiet 0.12.0, at just over 3000 SLOC and 156 kiB in size, currently allocates around 55 unique local variable names. - -In theory, we should need no more than 260 local identifiers by default. -Why? -Since `LUAI_MAXVARS` is 200 and `LUAI_MAXUPVALUES` is 60, at any block scope, there can be at most `(LUAI_MAXVARS + LUAI_MAXUPVALUES)` locals referenced, or 260. -Also, those from outer scopes not referenced in inner scopes can reuse identifiers. -The net effect of this is that a local variable name allocation method should not allocate more than 260 identifier names for locals. - -The current algorithm is a simple first-come first-served scheme: - -[loweralpha] -. One local object that use the most tokens is named first. -. Any other non-conflicting locals with respect to the first object are assigned the same name. -. Assigned locals are removed from consideration and the procedure is repeated for objects that have not been assigned new names. -. Steps (a) to (c) repeats until no local objects are left. - -In addition, there are a few extra issues to take care of: - -[loweralpha, start=5] -. Implicit `self` locals that have been flagged as such are already “assigned to” and so they are left unmodified. -. The name generator skips `self` to avoid conflicts. - This is not optimal but it is unlikely a script will use so many local variables as to reach `self`. -. Keywords are also skipped for the name generator. -. Global name conflict resolution. - -For (h), global name conflict resolution is handled just after the new name is generated. -The name can still be used for some locals even if it conflicts with other locals. -To remove conflicts, global variable accesses for the particular identifier name is checked. -Any local variables that are active when a global access is made is marked to be skipped. -The rest of the local objects can then use that name. - -The algorithm has additional code for handling locals that use the same name in the same scope. -This extends the basic algorithm that was discussed earlier. -For example: - -[source, lua] ----- -local foo = 10 -- <1> -... -local foo = 20 -- <2> -... -print(e) ----- - -Since we are considering name visibility, the first `foo` does not really cease to exist when the second `foo` is declared, because if we were to make that assumption, and the first `foo` is removed before (2), then I should be able to use `e` as the name for the first `foo` and after (2), it should not conflict with variables in the outer scope with the same name. -To illustrate: - -[source, lua] ----- -local e = 10 -- 'foo' renamed to 'e' -... -local t = 20 -- error if we assumed 'e' removed here -... -print(e) ----- - -Since `e` is a global in the example, we now have an error as the name as been taken over by a local. -Thus, the first `foo` local must have its active time extend to the end of the current scope. -If there is no conflict between the first and second `foo`, the algorithm may still assign the same names to them. - -The current fix to deal with the above chains local objects in order to find the removal position. -It may be possible to handle this in a clean manner – LuaSrcDiet handles it as a fix to the basic algorithm. - - -== Ideas - -The following is a list of optimization ideas that do not require heavy-duty source code parsing and comprehension. - - -=== Lexer-Based Optimization Ideas - -* Convert long strings to normal strings, vice versa. + - _A little desperate for a few bytes, can be done, but not real keen on implementing it._ - -* Special number forms to take advantage of constant number folding. + - _For example, 65536 can be represented using 2^16^, and so on. - An expression must be evaluated in the same way, otherwise this seems unsafe._ - -* Warn if a number has too many digits. + - _Should we warn or “test and truncate”? - Not really an optimization that will see much use._ - -* Warn of opportunity for using a `local` to zap a bunch of globals. + - _Current recommendation is to use the HTML plugin to display globals in red. - The developer can then visually analyze the source code and make the appropriate fixes. - I think this is better than having the program guess the intentions of the developer._ - -* Spaces to tabs in comments, long comments, or long strings. + - _For long strings, need to know user’s intention. - Would rather not implement._ - - -=== Parser-Based Optimization Ideas - -Heavy-duty optimizations will need more data to be generated by the parser. -A full AST may eventually be needed. -The most attractive idea that can be quickly implemented with a significant code size “win” is to reduce the number of `local` keywords. - -* Remove unused ``local``s that can be removed in the source. + - _Need to consider unused ``local``s in multiple assignments._ - -* Simplify declaration of ``local``s that can be merged. + -_From:_ -+ -[source, lua] ----- --- separate locals -local foo -local bar --- separate locals with assignments -local foo = 123 -local bar = "pqr" ----- -+ -_To:_ -+ -[source, lua] ----- --- merged locals -local foo,bar --- merged locals with assignments -local foo,bar=123,"pqr" ----- - -* Simplify declarations using `nil`. + -_From:_ -[source, lua] -local foo, bar = nil, nil -+ -_To:_ -[source, lua] -local foo,bar - -* Simplify ``return``s using `nil`. + - _How desirable is this? From Lua list discussions, it seems to be potentially unsafe unless all return locations are known and checked._ - -* Removal of optional semicolons in statements and removal of commas or semicolons in table constructors. + - _Yeah, this might save a few bytes._ - -* Remove table constructor elements using `nil`. + - _Not sure if this is safe to do._ - -* Simplify logical or relational operator expressions. + - _This is more suitable for an optimizing compiler project._ diff --git a/Utils/luarocks/lib/luarocks/rocks/luasrcdiet/0.3.0-2/luasrcdiet-0.3.0-2.rockspec b/Utils/luarocks/lib/luarocks/rocks/luasrcdiet/0.3.0-2/luasrcdiet-0.3.0-2.rockspec deleted file mode 100644 index eb77bef49..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/luasrcdiet/0.3.0-2/luasrcdiet-0.3.0-2.rockspec +++ /dev/null @@ -1,41 +0,0 @@ --- vim: set ft=lua: - -package = 'LuaSrcDiet' -version = '0.3.0-2' - - source = { url = 'https://github.com/jirutka/luasrcdiet/archive/v0.3.0/luasrcdiet-0.3.0.tar.gz', md5 = 'c0ff36ef66cd0568c96bc54e9253a8fa' } - -description = { - summary = 'Compresses Lua source code by removing unnecessary characters', - detailed = [[ -This is revival of LuaSrcDiet originally written by Kein-Hong Man.]], - homepage = 'https://github.com/jirutka/luasrcdiet', - maintainer = 'Jakub Jirutka ', - license = 'MIT', -} - -dependencies = { - 'lua >= 5.1', -} - -build = { - type = 'builtin', - modules = { - ['luasrcdiet'] = 'luasrcdiet/init.lua', - ['luasrcdiet.equiv'] = 'luasrcdiet/equiv.lua', - ['luasrcdiet.fs'] = 'luasrcdiet/fs.lua', - ['luasrcdiet.llex'] = 'luasrcdiet/llex.lua', - ['luasrcdiet.lparser'] = 'luasrcdiet/lparser.lua', - ['luasrcdiet.optlex'] = 'luasrcdiet/optlex.lua', - ['luasrcdiet.optparser'] = 'luasrcdiet/optparser.lua', - ['luasrcdiet.plugin.example'] = 'luasrcdiet/plugin/example.lua', - ['luasrcdiet.plugin.html'] = 'luasrcdiet/plugin/html.lua', - ['luasrcdiet.plugin.sloc'] = 'luasrcdiet/plugin/sloc.lua', - ['luasrcdiet.utils'] = 'luasrcdiet/utils.lua', - }, - install = { - bin = { - luasrcdiet = 'bin/luasrcdiet', - } - } -} diff --git a/Utils/luarocks/lib/luarocks/rocks/luasrcdiet/0.3.0-2/rock_manifest b/Utils/luarocks/lib/luarocks/rocks/luasrcdiet/0.3.0-2/rock_manifest deleted file mode 100644 index 2e7628412..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/luasrcdiet/0.3.0-2/rock_manifest +++ /dev/null @@ -1,28 +0,0 @@ -rock_manifest = { - bin = { - luasrcdiet = "6c318685d57f827cf5baf7037a5d6072" - }, - doc = { - ["features-and-usage.adoc"] = "157587c27a0c340d9d1dd06af9b339b5", - ["performance-stats.adoc"] = "cf5f96a86e021a3a584089fafcabd056", - ["tech-notes.adoc"] = "075bc34e667a0055e659e656baa2365a" - }, - lua = { - luasrcdiet = { - ["equiv.lua"] = "967a6b17573d229e326dbb740ad7fe8c", - ["fs.lua"] = "53db7dfc50d026b683fad68ed70ead0f", - ["init.lua"] = "c6f368e6cf311f3257067fed0fbcd06a", - ["llex.lua"] = "ede897af261fc362a82d87fbad91ea2b", - ["lparser.lua"] = "c1e1f04d412b79a040fd1c2b74112953", - ["optlex.lua"] = "7c986da991a338494c36770b4a30fa9f", - ["optparser.lua"] = "b125a271ac1c691dec68b63019b1b5da", - plugin = { - ["example.lua"] = "86b5c1e9dc7959db6b221d6d5a0db3d1", - ["html.lua"] = "c0d3336a133f0c8663f395ee98d54f6a", - ["sloc.lua"] = "fb1a91b18b701ab83f21c87733be470a" - }, - ["utils.lua"] = "bd6c1e85c6a9bf3383d336a4797fb292" - } - }, - ["luasrcdiet-0.3.0-2.rockspec"] = "da70047e1b0cbdc1ff08d060327fa110" -} diff --git a/Utils/luarocks/lib/luarocks/rocks/manifest b/Utils/luarocks/lib/luarocks/rocks/manifest deleted file mode 100644 index 82d24f64b..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/manifest +++ /dev/null @@ -1,650 +0,0 @@ -commands = { - luadocumentor = { - "luadocumentor/0.1.5-1" - }, - luasrcdiet = { - "luasrcdiet/0.3.0-2" - } -} -dependencies = { - luadocumentor = { - ["0.1.5-1"] = { - { - constraints = { - { - op = "~>", - version = { - 5, 1, string = "5.1" - } - } - }, - name = "lua" - }, - { - constraints = { - { - op = "~>", - version = { - 1, 6, string = "1.6" - } - } - }, - name = "luafilesystem" - }, - { - constraints = { - { - op = "~>", - version = { - 0, 32, string = "0.32" - } - } - }, - name = "markdown" - }, - { - constraints = { - { - op = "~>", - version = { - 0, 7, string = "0.7" - } - } - }, - name = "metalua-compiler" - }, - { - constraints = { - { - op = "~>", - version = { - 0, 9, string = "0.9" - } - } - }, - name = "penlight" - } - } - }, - luafilesystem = { - ["1.6.3-2"] = { - { - constraints = { - { - op = ">=", - version = { - 5, 1, string = "5.1" - } - } - }, - name = "lua" - } - } - }, - luasrcdiet = { - ["0.3.0-2"] = { - { - constraints = { - { - op = ">=", - version = { - 5, 1, string = "5.1" - } - } - }, - name = "lua" - } - } - }, - markdown = { - ["0.32-2"] = { - { - constraints = { - { - op = ">=", - version = { - 5, 1, string = "5.1" - } - } - }, - name = "lua" - } - } - }, - ["metalua-compiler"] = { - ["0.7.3-1"] = { - { - constraints = { - { - op = "~>", - version = { - 5, 1, string = "5.1" - } - } - }, - name = "lua" - }, - { - constraints = { - { - op = "~>", - version = { - 1, 6, string = "1.6" - } - } - }, - name = "luafilesystem" - }, - { - constraints = { - { - op = ">=", - version = { - 0, 7, 3, string = "0.7.3" - } - } - }, - name = "metalua-parser" - } - } - }, - ["metalua-parser"] = { - ["0.7.3-2"] = { - { - constraints = { - { - op = ">=", - version = { - 5, 1, string = "5.1" - } - } - }, - name = "lua" - } - } - }, - penlight = { - ["0.9.8-1"] = { - { - constraints = {}, - name = "luafilesystem" - } - } - } -} -modules = { - defaultcss = { - "luadocumentor/0.1.5-1" - }, - docgenerator = { - "luadocumentor/0.1.5-1" - }, - extractors = { - "luadocumentor/0.1.5-1" - }, - ["fs.lfs"] = { - "luadocumentor/0.1.5-1" - }, - lddextractor = { - "luadocumentor/0.1.5-1" - }, - lfs = { - "luafilesystem/1.6.3-2" - }, - luasrcdiet = { - "luasrcdiet/0.3.0-2" - }, - ["luasrcdiet.equiv"] = { - "luasrcdiet/0.3.0-2" - }, - ["luasrcdiet.fs"] = { - "luasrcdiet/0.3.0-2" - }, - ["luasrcdiet.llex"] = { - "luasrcdiet/0.3.0-2" - }, - ["luasrcdiet.lparser"] = { - "luasrcdiet/0.3.0-2" - }, - ["luasrcdiet.optlex"] = { - "luasrcdiet/0.3.0-2" - }, - ["luasrcdiet.optparser"] = { - "luasrcdiet/0.3.0-2" - }, - ["luasrcdiet.plugin.example"] = { - "luasrcdiet/0.3.0-2" - }, - ["luasrcdiet.plugin.html"] = { - "luasrcdiet/0.3.0-2" - }, - ["luasrcdiet.plugin.sloc"] = { - "luasrcdiet/0.3.0-2" - }, - ["luasrcdiet.utils"] = { - "luasrcdiet/0.3.0-2" - }, - markdown = { - "markdown/0.32-2" - }, - ["metalua.compiler"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.compiler.bytecode"] = { - "metalua-compiler/0.7.3-1" - }, - ["metalua.compiler.bytecode.compile"] = { - "metalua-compiler/0.7.3-1" - }, - ["metalua.compiler.bytecode.lcode"] = { - "metalua-compiler/0.7.3-1" - }, - ["metalua.compiler.bytecode.ldump"] = { - "metalua-compiler/0.7.3-1" - }, - ["metalua.compiler.bytecode.lopcodes"] = { - "metalua-compiler/0.7.3-1" - }, - ["metalua.compiler.globals"] = { - "metalua-compiler/0.7.3-1" - }, - ["metalua.compiler.parser"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.compiler.parser.annot.generator"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.compiler.parser.annot.grammar"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.compiler.parser.expr"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.compiler.parser.ext"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.compiler.parser.lexer"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.compiler.parser.meta"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.compiler.parser.misc"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.compiler.parser.stat"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.compiler.parser.table"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.grammar.generator"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.grammar.lexer"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.loader"] = { - "metalua-compiler/0.7.3-1" - }, - ["metalua.pprint"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua/compiler/ast_to_src.mlua"] = { - "metalua-compiler/0.7.3-1" - }, - ["metalua/extension/comprehension.mlua"] = { - "metalua-compiler/0.7.3-1" - }, - ["metalua/extension/match.mlua"] = { - "metalua-compiler/0.7.3-1" - }, - ["metalua/repl.mlua"] = { - "metalua-compiler/0.7.3-1" - }, - ["metalua/treequery.mlua"] = { - "metalua-compiler/0.7.3-1" - }, - ["metalua/treequery/walk.mlua"] = { - "metalua-compiler/0.7.3-1" - }, - ["models.apimodel"] = { - "luadocumentor/0.1.5-1" - }, - ["models.apimodelbuilder"] = { - "luadocumentor/0.1.5-1" - }, - ["models.internalmodel"] = { - "luadocumentor/0.1.5-1" - }, - ["models.ldparser"] = { - "luadocumentor/0.1.5-1" - }, - ["models/internalmodelbuilder.mlua"] = { - "luadocumentor/0.1.5-1" - }, - pl = { - "penlight/0.9.8-1" - }, - ["pl.Date"] = { - "penlight/0.9.8-1" - }, - ["pl.List"] = { - "penlight/0.9.8-1" - }, - ["pl.Map"] = { - "penlight/0.9.8-1" - }, - ["pl.MultiMap"] = { - "penlight/0.9.8-1" - }, - ["pl.OrderedMap"] = { - "penlight/0.9.8-1" - }, - ["pl.Set"] = { - "penlight/0.9.8-1" - }, - ["pl.app"] = { - "penlight/0.9.8-1" - }, - ["pl.array2d"] = { - "penlight/0.9.8-1" - }, - ["pl.class"] = { - "penlight/0.9.8-1" - }, - ["pl.comprehension"] = { - "penlight/0.9.8-1" - }, - ["pl.config"] = { - "penlight/0.9.8-1" - }, - ["pl.data"] = { - "penlight/0.9.8-1" - }, - ["pl.dir"] = { - "penlight/0.9.8-1" - }, - ["pl.file"] = { - "penlight/0.9.8-1" - }, - ["pl.func"] = { - "penlight/0.9.8-1" - }, - ["pl.input"] = { - "penlight/0.9.8-1" - }, - ["pl.lapp"] = { - "penlight/0.9.8-1" - }, - ["pl.lexer"] = { - "penlight/0.9.8-1" - }, - ["pl.luabalanced"] = { - "penlight/0.9.8-1" - }, - ["pl.operator"] = { - "penlight/0.9.8-1" - }, - ["pl.path"] = { - "penlight/0.9.8-1" - }, - ["pl.permute"] = { - "penlight/0.9.8-1" - }, - ["pl.platf.luajava"] = { - "penlight/0.9.8-1" - }, - ["pl.pretty"] = { - "penlight/0.9.8-1" - }, - ["pl.seq"] = { - "penlight/0.9.8-1" - }, - ["pl.sip"] = { - "penlight/0.9.8-1" - }, - ["pl.strict"] = { - "penlight/0.9.8-1" - }, - ["pl.stringio"] = { - "penlight/0.9.8-1" - }, - ["pl.stringx"] = { - "penlight/0.9.8-1" - }, - ["pl.tablex"] = { - "penlight/0.9.8-1" - }, - ["pl.template"] = { - "penlight/0.9.8-1" - }, - ["pl.test"] = { - "penlight/0.9.8-1" - }, - ["pl.text"] = { - "penlight/0.9.8-1" - }, - ["pl.utils"] = { - "penlight/0.9.8-1" - }, - ["pl.xml"] = { - "penlight/0.9.8-1" - }, - ["template.file"] = { - "luadocumentor/0.1.5-1" - }, - ["template.index"] = { - "luadocumentor/0.1.5-1" - }, - ["template.index.recordtypedef"] = { - "luadocumentor/0.1.5-1" - }, - ["template.item"] = { - "luadocumentor/0.1.5-1" - }, - ["template.page"] = { - "luadocumentor/0.1.5-1" - }, - ["template.recordtypedef"] = { - "luadocumentor/0.1.5-1" - }, - ["template.usage"] = { - "luadocumentor/0.1.5-1" - }, - ["template.utils"] = { - "luadocumentor/0.1.5-1" - }, - templateengine = { - "luadocumentor/0.1.5-1" - } -} -repository = { - luadocumentor = { - ["0.1.5-1"] = { - { - arch = "installed", - commands = { - luadocumentor = "luadocumentor" - }, - dependencies = { - luafilesystem = "1.6.3-2", - markdown = "0.32-2", - ["metalua-compiler"] = "0.7.3-1", - ["metalua-parser"] = "0.7.3-2", - penlight = "0.9.8-1" - }, - modules = { - defaultcss = "defaultcss.lua", - docgenerator = "docgenerator.lua", - extractors = "extractors.lua", - ["fs.lfs"] = "fs/lfs.lua", - lddextractor = "lddextractor.lua", - ["models.apimodel"] = "models/apimodel.lua", - ["models.apimodelbuilder"] = "models/apimodelbuilder.lua", - ["models.internalmodel"] = "models/internalmodel.lua", - ["models.ldparser"] = "models/ldparser.lua", - ["models/internalmodelbuilder.mlua"] = "models/internalmodelbuilder.mlua", - ["template.file"] = "template/file.lua", - ["template.index"] = "template/index.lua", - ["template.index.recordtypedef"] = "template/index/recordtypedef.lua", - ["template.item"] = "template/item.lua", - ["template.page"] = "template/page.lua", - ["template.recordtypedef"] = "template/recordtypedef.lua", - ["template.usage"] = "template/usage.lua", - ["template.utils"] = "template/utils.lua", - templateengine = "templateengine.lua" - } - } - } - }, - luafilesystem = { - ["1.6.3-2"] = { - { - arch = "installed", - commands = {}, - dependencies = {}, - modules = { - lfs = "lfs.dll" - } - } - } - }, - luasrcdiet = { - ["0.3.0-2"] = { - { - arch = "installed", - commands = { - luasrcdiet = "luasrcdiet" - }, - dependencies = {}, - modules = { - luasrcdiet = "luasrcdiet/init.lua", - ["luasrcdiet.equiv"] = "luasrcdiet/equiv.lua", - ["luasrcdiet.fs"] = "luasrcdiet/fs.lua", - ["luasrcdiet.llex"] = "luasrcdiet/llex.lua", - ["luasrcdiet.lparser"] = "luasrcdiet/lparser.lua", - ["luasrcdiet.optlex"] = "luasrcdiet/optlex.lua", - ["luasrcdiet.optparser"] = "luasrcdiet/optparser.lua", - ["luasrcdiet.plugin.example"] = "luasrcdiet/plugin/example.lua", - ["luasrcdiet.plugin.html"] = "luasrcdiet/plugin/html.lua", - ["luasrcdiet.plugin.sloc"] = "luasrcdiet/plugin/sloc.lua", - ["luasrcdiet.utils"] = "luasrcdiet/utils.lua" - } - } - } - }, - markdown = { - ["0.32-2"] = { - { - arch = "installed", - commands = {}, - dependencies = {}, - modules = { - markdown = "markdown.lua" - } - } - } - }, - ["metalua-compiler"] = { - ["0.7.3-1"] = { - { - arch = "installed", - commands = {}, - dependencies = { - luafilesystem = "1.6.3-2", - ["metalua-parser"] = "0.7.3-2" - }, - modules = { - ["metalua.compiler.bytecode"] = "metalua/compiler/bytecode.lua", - ["metalua.compiler.bytecode.compile"] = "metalua/compiler/bytecode/compile.lua", - ["metalua.compiler.bytecode.lcode"] = "metalua/compiler/bytecode/lcode.lua", - ["metalua.compiler.bytecode.ldump"] = "metalua/compiler/bytecode/ldump.lua", - ["metalua.compiler.bytecode.lopcodes"] = "metalua/compiler/bytecode/lopcodes.lua", - ["metalua.compiler.globals"] = "metalua/compiler/globals.lua", - ["metalua.loader"] = "metalua/loader.lua", - ["metalua/compiler/ast_to_src.mlua"] = "metalua/compiler/ast_to_src.mlua", - ["metalua/extension/comprehension.mlua"] = "metalua/extension/comprehension.mlua", - ["metalua/extension/match.mlua"] = "metalua/extension/match.mlua", - ["metalua/repl.mlua"] = "metalua/repl.mlua", - ["metalua/treequery.mlua"] = "metalua/treequery.mlua", - ["metalua/treequery/walk.mlua"] = "metalua/treequery/walk.mlua" - } - } - } - }, - ["metalua-parser"] = { - ["0.7.3-2"] = { - { - arch = "installed", - commands = {}, - dependencies = {}, - modules = { - ["metalua.compiler"] = "metalua/compiler.lua", - ["metalua.compiler.parser"] = "metalua/compiler/parser.lua", - ["metalua.compiler.parser.annot.generator"] = "metalua/compiler/parser/annot/generator.lua", - ["metalua.compiler.parser.annot.grammar"] = "metalua/compiler/parser/annot/grammar.lua", - ["metalua.compiler.parser.expr"] = "metalua/compiler/parser/expr.lua", - ["metalua.compiler.parser.ext"] = "metalua/compiler/parser/ext.lua", - ["metalua.compiler.parser.lexer"] = "metalua/compiler/parser/lexer.lua", - ["metalua.compiler.parser.meta"] = "metalua/compiler/parser/meta.lua", - ["metalua.compiler.parser.misc"] = "metalua/compiler/parser/misc.lua", - ["metalua.compiler.parser.stat"] = "metalua/compiler/parser/stat.lua", - ["metalua.compiler.parser.table"] = "metalua/compiler/parser/table.lua", - ["metalua.grammar.generator"] = "metalua/grammar/generator.lua", - ["metalua.grammar.lexer"] = "metalua/grammar/lexer.lua", - ["metalua.pprint"] = "metalua/pprint.lua" - } - } - } - }, - penlight = { - ["0.9.8-1"] = { - { - arch = "installed", - commands = {}, - dependencies = { - luafilesystem = "1.6.3-2" - }, - modules = { - pl = "pl/init.lua", - ["pl.Date"] = "pl/Date.lua", - ["pl.List"] = "pl/List.lua", - ["pl.Map"] = "pl/Map.lua", - ["pl.MultiMap"] = "pl/MultiMap.lua", - ["pl.OrderedMap"] = "pl/OrderedMap.lua", - ["pl.Set"] = "pl/Set.lua", - ["pl.app"] = "pl/app.lua", - ["pl.array2d"] = "pl/array2d.lua", - ["pl.class"] = "pl/class.lua", - ["pl.comprehension"] = "pl/comprehension.lua", - ["pl.config"] = "pl/config.lua", - ["pl.data"] = "pl/data.lua", - ["pl.dir"] = "pl/dir.lua", - ["pl.file"] = "pl/file.lua", - ["pl.func"] = "pl/func.lua", - ["pl.input"] = "pl/input.lua", - ["pl.lapp"] = "pl/lapp.lua", - ["pl.lexer"] = "pl/lexer.lua", - ["pl.luabalanced"] = "pl/luabalanced.lua", - ["pl.operator"] = "pl/operator.lua", - ["pl.path"] = "pl/path.lua", - ["pl.permute"] = "pl/permute.lua", - ["pl.platf.luajava"] = "pl/platf/luajava.lua", - ["pl.pretty"] = "pl/pretty.lua", - ["pl.seq"] = "pl/seq.lua", - ["pl.sip"] = "pl/sip.lua", - ["pl.strict"] = "pl/strict.lua", - ["pl.stringio"] = "pl/stringio.lua", - ["pl.stringx"] = "pl/stringx.lua", - ["pl.tablex"] = "pl/tablex.lua", - ["pl.template"] = "pl/template.lua", - ["pl.test"] = "pl/test.lua", - ["pl.text"] = "pl/text.lua", - ["pl.utils"] = "pl/utils.lua", - ["pl.xml"] = "pl/xml.lua" - } - } - } - } -} diff --git a/Utils/luarocks/lib/luarocks/rocks/markdown/0.32-2/markdown-0.32-2.rockspec b/Utils/luarocks/lib/luarocks/rocks/markdown/0.32-2/markdown-0.32-2.rockspec deleted file mode 100644 index abbfc89e1..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/markdown/0.32-2/markdown-0.32-2.rockspec +++ /dev/null @@ -1,23 +0,0 @@ -package = "Markdown" -version = "0.32-2" -source = { - url = "http://www.frykholm.se/files/markdown-0.32.tar.gz", - dir = "." -} -description = { - summary = "Markdown text-to-html markup system.", - detailed = [[ - A pure-lua implementation of the Markdown text-to-html markup system. - ]], - license = "MIT", - homepage = "http://www.frykholm.se/files/markdown.lua" -} -dependencies = { - "lua >= 5.1", -} -build = { - type = "none", - install = { - lua = { "markdown.lua" }, - } -} diff --git a/Utils/luarocks/lib/luarocks/rocks/markdown/0.32-2/rock_manifest b/Utils/luarocks/lib/luarocks/rocks/markdown/0.32-2/rock_manifest deleted file mode 100644 index 8f3d633ca..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/markdown/0.32-2/rock_manifest +++ /dev/null @@ -1,6 +0,0 @@ -rock_manifest = { - lua = { - ["markdown.lua"] = "0ea5f9d6d22a6c9aa4fdf63cf1d7d066" - }, - ["markdown-0.32-2.rockspec"] = "83f0335058d8fbd078d4f2c1ce941df0" -} diff --git a/Utils/luarocks/lib/luarocks/rocks/metalua-compiler/0.7.3-1/doc/README-compiler.md b/Utils/luarocks/lib/luarocks/rocks/metalua-compiler/0.7.3-1/doc/README-compiler.md deleted file mode 100644 index b2679cdb5..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/metalua-compiler/0.7.3-1/doc/README-compiler.md +++ /dev/null @@ -1,104 +0,0 @@ -Metalua Compiler -================ - -## Metalua compiler - -This module `metalua-compiler` depends on `metalua-parser`. Its main -feature is to compile ASTs into Lua 5.1 bytecode, allowing to convert -them into bytecode files and executable functions. This opens the -following possibilities: - -* compiler objects generated with `require 'metalua.compiler'.new()` - support methods `:xxx_to_function()` and `:xxx_to_bytecode()`; - -* Compile-time meta-programming: use of `-{...}` splices in source - code, to generate code during compilation; - -* Some syntax extensions, such as structural pattern matching and - lists by comprehension; - -* Some AST manipulation facilities such as `treequery`, which are - implemented with Metalua syntax extensions. - -## What's new in Metalua 0.7 - -This is a major overhaul of the compiler's architecture. Some of the -most noteworthy changes are: - -* No more installation or bootstrap script. Some Metalua source files - have been rewritten in plain Lua, and module sources have been - refactored, so that if you just drop the `metalua` folder somewhere - in your `LUA_PATH`, it works. - -* The compiler can be cut in two parts: - - * a parser which generates ASTs out of Lua sources, and should be - either portable or easily ported to Lua 5.2; - - * a compiler, which can turn sources and AST into executable - Lua 5.1 bytecode and run it. It also supports compile-time - meta-programming, i.e. code included between `-{ ... }` is - executed during compilation, and the ASTs it produces are - included in the resulting bytecode. - -* Both parts are packaged as separate LuaRocks, `metalua-parser` and - `metalua-compiler` respectively, so that you can install the former - without the latter. - -* The parser is not a unique object anymore. Instead, - `require "metalua.compiler".new()` returns a different compiler - instance every time it's called. Compiler instances can be reused on - as many source files as wanted, but extending one instance's grammar - doesn't affect other compiler instances. - -* Included standard library has been shed. There are too many standard - libs in Lua, and none of them is standard enough, offering - yet-another-one, coupled with a specific compiler can only add to - confusion. - -* Many syntax extensions, which either were arguably more code samples - than actual production-ready tools, or relied too heavily on the - removed runtime standard libraries, have been removed. - -* The remaining libraries and samples are: - - * `metalua.compiler` converts sources into ASTs, bytecode, - functions, and ASTs back into sources. - - * `metalua` compiles and/or executes files from the command line, - can start an interactive REPL session. - - * `metalua.loader` adds a package loader which allows to use modules - written in Metalua, even from a plain Lua program. - - * `metalua.treequery` is an advanced DSL allowing to search ASTs in - a smart way, e.g. "_search `return` statements which return a - `local` variable but aren't in a nested `function`_". - - * `metalua.extension.comprehension` is a language extension which - supports lists by comprehension - (`even = { i for i=1, 100 if i%2==0 }`) and improved loops - (`for i=1, 10 for j=1,10 if i~=j do print(i,j) end`). - - * `metalua.extension.match` is a language extension which offers - Haskell/ML structural pattern matching - (``match AST with `Function{ args, body } -> ... | `Number{ 0 } -> ...end``) - - * **TODO Move basic extensions in a separate module.** - -* To remove the compilation speed penalty associated with - metaprogramming, when environment variable `LUA_MCACHE` or Lua - variable `package.mcache` is defined and LuaFileSystem is available, - the results of Metalua source compilations is cached. Unless the - source file is more recent than the latest cached bytecode file, the - latter is loaded instead of the former. - -* The Luarock install for the full compiler lists dependencies towards - Readline, LuaFileSytem, and Alt-Getopts. Those projects are - optional, but having them automatically installed by LuaRocks offers - a better user experience. - -* The license has changed from MIT to double license MIT + EPL. This - has been done in order to provide the IP guarantees expected by the - Eclipse Foundation, to include Metalua in Eclipse's - [Lua Development Tools](http://www.eclipse.org/koneki/ldt/). diff --git a/Utils/luarocks/lib/luarocks/rocks/metalua-compiler/0.7.3-1/doc/README-parser.md b/Utils/luarocks/lib/luarocks/rocks/metalua-compiler/0.7.3-1/doc/README-parser.md deleted file mode 100644 index 98e34ee43..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/metalua-compiler/0.7.3-1/doc/README-parser.md +++ /dev/null @@ -1,177 +0,0 @@ -Metalua Parser -============== - -`metalua-parser` is a subset of the Metalua compiler, which turns -valid Lua source files and strings into abstract syntax trees -(AST). This README includes a description of this AST format. People -interested by Lua code analysis and generation are encouraged to -produce and/or consume this format to represent ASTs. - -It has been designed for Lua 5.1. It hasn't been tested against -Lua 5.2, but should be easily ported. - -## Usage - -Module `metalua.compiler` has a `new()` function, which returns a -compiler instance. This instance has a set of methods of the form -`:xxx_to_yyy(input)`, where `xxx` and `yyy` must be one of the -following: - -* `srcfile` the name of a Lua source file; -* `src` a string containing the Lua sources of a list of statements; -* `lexstream` a lexical tokens stream; -* `ast` an abstract syntax tree; -* `bytecode` a chunk of Lua bytecode that can be loaded in a Lua 5.1 - VM (not available if you only installed the parser); -* `function` an executable Lua function. - -Compiling into bytecode or executable functions requires the whole -Metalua compiler, not only the parser. The most frequently used -functions are `:src_to_ast(source_string)` and -`:srcfile_to_ast("path/to/source/file.lua")`. - - mlc = require 'metalua.compiler'.new() - ast = mlc :src_to_ast[[ return 123 ]] - -A compiler instance can be reused as much as you want; it's only -interesting to work with more than one compiler instance when you -start extending their grammars. - -## Abstract Syntax Trees definition - -### Notation - -Trees are written below with some Metalua syntax sugar, which -increases their readability. the backquote symbol introduces a `tag`, -i.e. a string stored in the `"tag"` field of a table: - -* `` `Foo{ 1, 2, 3 }`` is a shortcut for `{tag="Foo", 1, 2, 3}`; -* `` `Foo`` is a shortcut for `{tag="Foo"}`; -* `` `Foo 123`` is a shortcut for `` `Foo{ 123 }``, and therefore - `{tag="Foo", 123 }`; the expression after the tag must be a literal - number or string. - -When using a Metalua interpreter or compiler, the backtick syntax is -supported and can be used directly. Metalua's pretty-printing helpers -also try to use backtick syntax whenever applicable. - -### Tree elements - -Tree elements are mainly categorized into statements `stat`, -expressions `expr` and lists of statements `block`. Auxiliary -definitions include function applications/method invocation `apply`, -are both valid statements and expressions, expressions admissible on -the left-hand-side of an assignment statement `lhs`. - - block: { stat* } - - stat: - `Do{ stat* } - | `Set{ {lhs+} {expr+} } -- lhs1, lhs2... = e1, e2... - | `While{ expr block } -- while e do b end - | `Repeat{ block expr } -- repeat b until e - | `If{ (expr block)+ block? } -- if e1 then b1 [elseif e2 then b2] ... [else bn] end - | `Fornum{ ident expr expr expr? block } -- for ident = e, e[, e] do b end - | `Forin{ {ident+} {expr+} block } -- for i1, i2... in e1, e2... do b end - | `Local{ {ident+} {expr+}? } -- local i1, i2... = e1, e2... - | `Localrec{ ident expr } -- only used for 'local function' - | `Goto{ } -- goto str - | `Label{ } -- ::str:: - | `Return{ } -- return e1, e2... - | `Break -- break - | apply - - expr: - `Nil | `Dots | `True | `False - | `Number{ } - | `String{ } - | `Function{ { ident* `Dots? } block } - | `Table{ ( `Pair{ expr expr } | expr )* } - | `Op{ opid expr expr? } - | `Paren{ expr } -- significant to cut multiple values returns - | apply - | lhs - - apply: - `Call{ expr expr* } - | `Invoke{ expr `String{ } expr* } - - ident: `Id{ } - - lhs: ident | `Index{ expr expr } - - opid: 'add' | 'sub' | 'mul' | 'div' - | 'mod' | 'pow' | 'concat'| 'eq' - | 'lt' | 'le' | 'and' | 'or' - | 'not' | 'len' - -### Meta-data (lineinfo) - - -ASTs also embed some metadata, allowing to map them to their source -representation. Those informations are stored in a `"lineinfo"` field -in each tree node, which points to the range of characters in the -source string which represents it, and to the content of any comment -that would appear immediately before or after that node. - -Lineinfo objects have two fields, `"first"` and `"last"`, describing -respectively the beginning and the end of the subtree in the -sources. For instance, the sub-node ``Number{123}` produced by parsing -`[[return 123]]` will have `lineinfo.first` describing offset 8, and -`lineinfo.last` describing offset 10: - - - > mlc = require 'metalua.compiler'.new() - > ast = mlc :src_to_ast "return 123 -- comment" - > print(ast[1][1].lineinfo) - - > - -A lineinfo keeps track of character offsets relative to the beginning -of the source string/file ("K8-10" above), line numbers (L1 above; a -lineinfo spanning on several lines would read something like "L1-10"), -columns i.e. offset within the line ("C8-10" above), and a filename if -available (the "?" mark above indicating that we have no file name, as -the AST comes from a string). The final "|C>" indicates that there's a -comment immediately after the node; an initial " 5.1", -- Lua 5.2 bytecode not supported - "luafilesystem ~> 1.6", -- Cached compilation based on file timestamps - "metalua-parser >= 0.7.3", -- AST production -} - -build = { - type="builtin", - modules={ - ["metalua.compiler.bytecode"] = "metalua/compiler/bytecode.lua", - ["metalua.compiler.globals"] = "metalua/compiler/globals.lua", - ["metalua.compiler.bytecode.compile"] = "metalua/compiler/bytecode/compile.lua", - ["metalua.compiler.bytecode.lcode"] = "metalua/compiler/bytecode/lcode.lua", - ["metalua.compiler.bytecode.lopcodes"] = "metalua/compiler/bytecode/lopcodes.lua", - ["metalua.compiler.bytecode.ldump"] = "metalua/compiler/bytecode/ldump.lua", - ["metalua.loader"] = "metalua/loader.lua", - }, - install={ - lua={ - ["metalua.treequery"] = "metalua/treequery.mlua", - ["metalua.compiler.ast_to_src"] = "metalua/compiler/ast_to_src.mlua", - ["metalua.treequery.walk"] = "metalua/treequery/walk.mlua", - ["metalua.extension.match"] = "metalua/extension/match.mlua", - ["metalua.extension.comprehension"] = "metalua/extension/comprehension.mlua", - ["metalua.repl"] = "metalua/repl.mlua", - } - } -} diff --git a/Utils/luarocks/lib/luarocks/rocks/metalua-compiler/0.7.3-1/rock_manifest b/Utils/luarocks/lib/luarocks/rocks/metalua-compiler/0.7.3-1/rock_manifest deleted file mode 100644 index 7452a8f94..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/metalua-compiler/0.7.3-1/rock_manifest +++ /dev/null @@ -1,33 +0,0 @@ -rock_manifest = { - doc = { - ["README-compiler.md"] = "292523d759247d210d32fb2f6153e0f4", - ["README-parser.md"] = "b44e3673d96dd296f2c0e92a6c87ee18", - ["README.md"] = "20bfb490cddef9e101e44688791abcda" - }, - lua = { - metalua = { - compiler = { - ["ast_to_src.mlua"] = "1309f76df37585ef8e1f67f748b07b22", - bytecode = { - ["compile.lua"] = "430e4a6fac8b64b5ebb3ae585ebae75a", - ["lcode.lua"] = "3ad8755ebe8ea8eca6b1d2846eec92c4", - ["ldump.lua"] = "295e1d9657fb0126ce3471b3366da694", - ["lopcodes.lua"] = "a0f15cfc93b026b0a868466d066f1d21" - }, - ["bytecode.lua"] = "1032e5233455fd4e504daf5d2893527b", - ["globals.lua"] = "80ae19c6e640de0746348c91633c4c55" - }, - extension = { - ["comprehension.mlua"] = "426f5856896bda4c3763bd5f61410685", - ["match.mlua"] = "79960265331e8b2f46199c2411a103de" - }, - ["loader.lua"] = "1cdbf6cdf6ca97c55540d068474f1d8a", - ["repl.mlua"] = "729456f3a8cc073788acee564a0495f0", - treequery = { - ["walk.mlua"] = "5159aaddbec55936f91ea4236f6451d3" - }, - ["treequery.mlua"] = "97ffcee0825ac3bc776d01566767b2e8" - } - }, - ["metalua-compiler-0.7.3-1.rockspec"] = "b3883b25641d862db6828300bb755d51" -} diff --git a/Utils/luarocks/lib/luarocks/rocks/metalua-parser/0.7.3-2/doc/README-compiler.md b/Utils/luarocks/lib/luarocks/rocks/metalua-parser/0.7.3-2/doc/README-compiler.md deleted file mode 100644 index b2679cdb5..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/metalua-parser/0.7.3-2/doc/README-compiler.md +++ /dev/null @@ -1,104 +0,0 @@ -Metalua Compiler -================ - -## Metalua compiler - -This module `metalua-compiler` depends on `metalua-parser`. Its main -feature is to compile ASTs into Lua 5.1 bytecode, allowing to convert -them into bytecode files and executable functions. This opens the -following possibilities: - -* compiler objects generated with `require 'metalua.compiler'.new()` - support methods `:xxx_to_function()` and `:xxx_to_bytecode()`; - -* Compile-time meta-programming: use of `-{...}` splices in source - code, to generate code during compilation; - -* Some syntax extensions, such as structural pattern matching and - lists by comprehension; - -* Some AST manipulation facilities such as `treequery`, which are - implemented with Metalua syntax extensions. - -## What's new in Metalua 0.7 - -This is a major overhaul of the compiler's architecture. Some of the -most noteworthy changes are: - -* No more installation or bootstrap script. Some Metalua source files - have been rewritten in plain Lua, and module sources have been - refactored, so that if you just drop the `metalua` folder somewhere - in your `LUA_PATH`, it works. - -* The compiler can be cut in two parts: - - * a parser which generates ASTs out of Lua sources, and should be - either portable or easily ported to Lua 5.2; - - * a compiler, which can turn sources and AST into executable - Lua 5.1 bytecode and run it. It also supports compile-time - meta-programming, i.e. code included between `-{ ... }` is - executed during compilation, and the ASTs it produces are - included in the resulting bytecode. - -* Both parts are packaged as separate LuaRocks, `metalua-parser` and - `metalua-compiler` respectively, so that you can install the former - without the latter. - -* The parser is not a unique object anymore. Instead, - `require "metalua.compiler".new()` returns a different compiler - instance every time it's called. Compiler instances can be reused on - as many source files as wanted, but extending one instance's grammar - doesn't affect other compiler instances. - -* Included standard library has been shed. There are too many standard - libs in Lua, and none of them is standard enough, offering - yet-another-one, coupled with a specific compiler can only add to - confusion. - -* Many syntax extensions, which either were arguably more code samples - than actual production-ready tools, or relied too heavily on the - removed runtime standard libraries, have been removed. - -* The remaining libraries and samples are: - - * `metalua.compiler` converts sources into ASTs, bytecode, - functions, and ASTs back into sources. - - * `metalua` compiles and/or executes files from the command line, - can start an interactive REPL session. - - * `metalua.loader` adds a package loader which allows to use modules - written in Metalua, even from a plain Lua program. - - * `metalua.treequery` is an advanced DSL allowing to search ASTs in - a smart way, e.g. "_search `return` statements which return a - `local` variable but aren't in a nested `function`_". - - * `metalua.extension.comprehension` is a language extension which - supports lists by comprehension - (`even = { i for i=1, 100 if i%2==0 }`) and improved loops - (`for i=1, 10 for j=1,10 if i~=j do print(i,j) end`). - - * `metalua.extension.match` is a language extension which offers - Haskell/ML structural pattern matching - (``match AST with `Function{ args, body } -> ... | `Number{ 0 } -> ...end``) - - * **TODO Move basic extensions in a separate module.** - -* To remove the compilation speed penalty associated with - metaprogramming, when environment variable `LUA_MCACHE` or Lua - variable `package.mcache` is defined and LuaFileSystem is available, - the results of Metalua source compilations is cached. Unless the - source file is more recent than the latest cached bytecode file, the - latter is loaded instead of the former. - -* The Luarock install for the full compiler lists dependencies towards - Readline, LuaFileSytem, and Alt-Getopts. Those projects are - optional, but having them automatically installed by LuaRocks offers - a better user experience. - -* The license has changed from MIT to double license MIT + EPL. This - has been done in order to provide the IP guarantees expected by the - Eclipse Foundation, to include Metalua in Eclipse's - [Lua Development Tools](http://www.eclipse.org/koneki/ldt/). diff --git a/Utils/luarocks/lib/luarocks/rocks/metalua-parser/0.7.3-2/doc/README-parser.md b/Utils/luarocks/lib/luarocks/rocks/metalua-parser/0.7.3-2/doc/README-parser.md deleted file mode 100644 index 98e34ee43..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/metalua-parser/0.7.3-2/doc/README-parser.md +++ /dev/null @@ -1,177 +0,0 @@ -Metalua Parser -============== - -`metalua-parser` is a subset of the Metalua compiler, which turns -valid Lua source files and strings into abstract syntax trees -(AST). This README includes a description of this AST format. People -interested by Lua code analysis and generation are encouraged to -produce and/or consume this format to represent ASTs. - -It has been designed for Lua 5.1. It hasn't been tested against -Lua 5.2, but should be easily ported. - -## Usage - -Module `metalua.compiler` has a `new()` function, which returns a -compiler instance. This instance has a set of methods of the form -`:xxx_to_yyy(input)`, where `xxx` and `yyy` must be one of the -following: - -* `srcfile` the name of a Lua source file; -* `src` a string containing the Lua sources of a list of statements; -* `lexstream` a lexical tokens stream; -* `ast` an abstract syntax tree; -* `bytecode` a chunk of Lua bytecode that can be loaded in a Lua 5.1 - VM (not available if you only installed the parser); -* `function` an executable Lua function. - -Compiling into bytecode or executable functions requires the whole -Metalua compiler, not only the parser. The most frequently used -functions are `:src_to_ast(source_string)` and -`:srcfile_to_ast("path/to/source/file.lua")`. - - mlc = require 'metalua.compiler'.new() - ast = mlc :src_to_ast[[ return 123 ]] - -A compiler instance can be reused as much as you want; it's only -interesting to work with more than one compiler instance when you -start extending their grammars. - -## Abstract Syntax Trees definition - -### Notation - -Trees are written below with some Metalua syntax sugar, which -increases their readability. the backquote symbol introduces a `tag`, -i.e. a string stored in the `"tag"` field of a table: - -* `` `Foo{ 1, 2, 3 }`` is a shortcut for `{tag="Foo", 1, 2, 3}`; -* `` `Foo`` is a shortcut for `{tag="Foo"}`; -* `` `Foo 123`` is a shortcut for `` `Foo{ 123 }``, and therefore - `{tag="Foo", 123 }`; the expression after the tag must be a literal - number or string. - -When using a Metalua interpreter or compiler, the backtick syntax is -supported and can be used directly. Metalua's pretty-printing helpers -also try to use backtick syntax whenever applicable. - -### Tree elements - -Tree elements are mainly categorized into statements `stat`, -expressions `expr` and lists of statements `block`. Auxiliary -definitions include function applications/method invocation `apply`, -are both valid statements and expressions, expressions admissible on -the left-hand-side of an assignment statement `lhs`. - - block: { stat* } - - stat: - `Do{ stat* } - | `Set{ {lhs+} {expr+} } -- lhs1, lhs2... = e1, e2... - | `While{ expr block } -- while e do b end - | `Repeat{ block expr } -- repeat b until e - | `If{ (expr block)+ block? } -- if e1 then b1 [elseif e2 then b2] ... [else bn] end - | `Fornum{ ident expr expr expr? block } -- for ident = e, e[, e] do b end - | `Forin{ {ident+} {expr+} block } -- for i1, i2... in e1, e2... do b end - | `Local{ {ident+} {expr+}? } -- local i1, i2... = e1, e2... - | `Localrec{ ident expr } -- only used for 'local function' - | `Goto{ } -- goto str - | `Label{ } -- ::str:: - | `Return{ } -- return e1, e2... - | `Break -- break - | apply - - expr: - `Nil | `Dots | `True | `False - | `Number{ } - | `String{ } - | `Function{ { ident* `Dots? } block } - | `Table{ ( `Pair{ expr expr } | expr )* } - | `Op{ opid expr expr? } - | `Paren{ expr } -- significant to cut multiple values returns - | apply - | lhs - - apply: - `Call{ expr expr* } - | `Invoke{ expr `String{ } expr* } - - ident: `Id{ } - - lhs: ident | `Index{ expr expr } - - opid: 'add' | 'sub' | 'mul' | 'div' - | 'mod' | 'pow' | 'concat'| 'eq' - | 'lt' | 'le' | 'and' | 'or' - | 'not' | 'len' - -### Meta-data (lineinfo) - - -ASTs also embed some metadata, allowing to map them to their source -representation. Those informations are stored in a `"lineinfo"` field -in each tree node, which points to the range of characters in the -source string which represents it, and to the content of any comment -that would appear immediately before or after that node. - -Lineinfo objects have two fields, `"first"` and `"last"`, describing -respectively the beginning and the end of the subtree in the -sources. For instance, the sub-node ``Number{123}` produced by parsing -`[[return 123]]` will have `lineinfo.first` describing offset 8, and -`lineinfo.last` describing offset 10: - - - > mlc = require 'metalua.compiler'.new() - > ast = mlc :src_to_ast "return 123 -- comment" - > print(ast[1][1].lineinfo) - - > - -A lineinfo keeps track of character offsets relative to the beginning -of the source string/file ("K8-10" above), line numbers (L1 above; a -lineinfo spanning on several lines would read something like "L1-10"), -columns i.e. offset within the line ("C8-10" above), and a filename if -available (the "?" mark above indicating that we have no file name, as -the AST comes from a string). The final "|C>" indicates that there's a -comment immediately after the node; an initial "= 5.1" -} -build = { - type="builtin", - modules={ - ["metalua.grammar.generator"] = "metalua/grammar/generator.lua", - ["metalua.grammar.lexer"] = "metalua/grammar/lexer.lua", - ["metalua.compiler.parser"] = "metalua/compiler/parser.lua", - ["metalua.compiler.parser.table"] = "metalua/compiler/parser/table.lua", - ["metalua.compiler.parser.ext"] = "metalua/compiler/parser/ext.lua", - ["metalua.compiler.parser.annot.generator"] = "metalua/compiler/parser/annot/generator.lua", - ["metalua.compiler.parser.annot.grammar"] = "metalua/compiler/parser/annot/grammar.lua", - ["metalua.compiler.parser.stat"] = "metalua/compiler/parser/stat.lua", - ["metalua.compiler.parser.misc"] = "metalua/compiler/parser/misc.lua", - ["metalua.compiler.parser.lexer"] = "metalua/compiler/parser/lexer.lua", - ["metalua.compiler.parser.meta"] = "metalua/compiler/parser/meta.lua", - ["metalua.compiler.parser.expr"] = "metalua/compiler/parser/expr.lua", - ["metalua.compiler"] = "metalua/compiler.lua", - ["metalua.pprint"] = "metalua/pprint.lua", - } -} diff --git a/Utils/luarocks/lib/luarocks/rocks/metalua-parser/0.7.3-2/rock_manifest b/Utils/luarocks/lib/luarocks/rocks/metalua-parser/0.7.3-2/rock_manifest deleted file mode 100644 index 4640e3d33..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/metalua-parser/0.7.3-2/rock_manifest +++ /dev/null @@ -1,34 +0,0 @@ -rock_manifest = { - doc = { - ["README-compiler.md"] = "292523d759247d210d32fb2f6153e0f4", - ["README-parser.md"] = "b44e3673d96dd296f2c0e92a6c87ee18", - ["README.md"] = "20bfb490cddef9e101e44688791abcda" - }, - lua = { - metalua = { - compiler = { - parser = { - annot = { - ["generator.lua"] = "d86f7507d66ba6a3692a6f8611e9939b", - ["grammar.lua"] = "7d195bde7992efd9923771751b67b18f" - }, - ["expr.lua"] = "3a0b1984a6f92280e2e63b074fdcec10", - ["ext.lua"] = "a99e31a07bc390b826f6653bcc47d89b", - ["lexer.lua"] = "eac0f9d475d9dae4ea5a2724014cebec", - ["meta.lua"] = "12870bceda6395695020b739196e2a92", - ["misc.lua"] = "49d59f4fc1bfb77b36f78d4f87ae258f", - ["stat.lua"] = "83f10ac899be12ca4df58bbe8645299f", - ["table.lua"] = "5d2389e89603b7f78c731e6918aa1a9b" - }, - ["parser.lua"] = "e6ae68ce200de8071bb0fefad97f9b79" - }, - ["compiler.lua"] = "ca65ee9a3053581f4315821a31d0c1fd", - grammar = { - ["generator.lua"] = "b8a29e817d6798c12f40a230a0f6d0af", - ["lexer.lua"] = "7cb7c835479a9be884130eaacb9be60a" - }, - ["pprint.lua"] = "0b9bd8757b45c2d4be30106abcbd45b2" - } - }, - ["metalua-parser-0.7.3-2.rockspec"] = "a56680900b0b51701db7cd7abf49af92" -} diff --git a/Utils/luarocks/lib/luarocks/rocks/penlight/0.9.8-1/penlight-0.9.8-1.rockspec b/Utils/luarocks/lib/luarocks/rocks/penlight/0.9.8-1/penlight-0.9.8-1.rockspec deleted file mode 100644 index d1d8b0f85..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/penlight/0.9.8-1/penlight-0.9.8-1.rockspec +++ /dev/null @@ -1,66 +0,0 @@ -package = "penlight" -version = "0.9.8-1" - -source = { - dir = "penlight-0.9.8", - url = "http://stevedonovan.github.com/files/penlight-0.9.8-core.zip", -} - -description = { - summary = "Lua utility libraries loosely based on the Python standard libraries", - homepage = "http://stevedonovan.github.com/Penlight", - license = "MIT/X11", - maintainer = "steve.j.donovan@gmail.com", - detailed = [[ -Penlight is a set of pure Lua libraries for making it easier to work with common tasks like -iterating over directories, reading configuration files and the like. Provides functional operations -on tables and sequences. -]] -} - -dependencies = { - "luafilesystem", -} - -build = { - type = "builtin", - modules = { - ["pl.strict"] = "lua/pl/strict.lua", - ["pl.dir"] = "lua/pl/dir.lua", - ["pl.operator"] = "lua/pl/operator.lua", - ["pl.input"] = "lua/pl/input.lua", - ["pl.config"] = "lua/pl/config.lua", - ["pl.seq"] = "lua/pl/seq.lua", - ["pl.stringio"] = "lua/pl/stringio.lua", - ["pl.text"] = "lua/pl/text.lua", - ["pl.test"] = "lua/pl/test.lua", - ["pl.tablex"] = "lua/pl/tablex.lua", - ["pl.app"] = "lua/pl/app.lua", - ["pl.stringx"] = "lua/pl/stringx.lua", - ["pl.lexer"] = "lua/pl/lexer.lua", - ["pl.utils"] = "lua/pl/utils.lua", - ["pl.sip"] = "lua/pl/sip.lua", - ["pl.permute"] = "lua/pl/permute.lua", - ["pl.pretty"] = "lua/pl/pretty.lua", - ["pl.class"] = "lua/pl/class.lua", - ["pl.List"] = "lua/pl/List.lua", - ["pl.data"] = "lua/pl/data.lua", - ["pl.Date"] = "lua/pl/Date.lua", - ["pl"] = "lua/pl/init.lua", - ["pl.luabalanced"] = "lua/pl/luabalanced.lua", - ["pl.comprehension"] = "lua/pl/comprehension.lua", - ["pl.path"] = "lua/pl/path.lua", - ["pl.array2d"] = "lua/pl/array2d.lua", - ["pl.func"] = "lua/pl/func.lua", - ["pl.lapp"] = "lua/pl/lapp.lua", - ["pl.file"] = "lua/pl/file.lua", - ['pl.template'] = "lua/pl/template.lua", - ["pl.Map"] = "lua/pl/Map.lua", - ["pl.MultiMap"] = "lua/pl/MultiMap.lua", - ["pl.OrderedMap"] = "lua/pl/OrderedMap.lua", - ["pl.Set"] = "lua/pl/Set.lua", - ["pl.xml"] = "lua/pl/xml.lua", - ["pl.platf.luajava"] = "lua/pl/platf/luajava.lua" - }, -} - diff --git a/Utils/luarocks/lib/luarocks/rocks/penlight/0.9.8-1/rock_manifest b/Utils/luarocks/lib/luarocks/rocks/penlight/0.9.8-1/rock_manifest deleted file mode 100644 index 8565ebbd3..000000000 --- a/Utils/luarocks/lib/luarocks/rocks/penlight/0.9.8-1/rock_manifest +++ /dev/null @@ -1,45 +0,0 @@ -rock_manifest = { - lua = { - pl = { - ["Date.lua"] = "d2131d59151ce978c4db6a648fcd275a", - ["List.lua"] = "1236c5eb08956619daacd25a462a9682", - ["Map.lua"] = "0297a536ac0595ac59e8828f8c867f53", - ["MultiMap.lua"] = "e5f898fe2443e51c38825e9bc3d1aee5", - ["OrderedMap.lua"] = "bd8e39c59e22c582a33e2f025d3ae914", - ["Set.lua"] = "346ff7392fd4aeda418fb832e8da7a7f", - ["app.lua"] = "23ffb79e69a3fd679013cf82d95ed792", - ["array2d.lua"] = "77618ec2e2de4d6d237484dfd742cd73", - ["class.lua"] = "6f58bf39e7f90711b6840ad6955d258e", - ["comprehension.lua"] = "f8600ba945dde5d959194500a687c69f", - ["config.lua"] = "9ea3ce0ac3cdf2ce0e17f1353f32abb6", - ["data.lua"] = "be446ff813b5bcf30b4063601165df6a", - ["dir.lua"] = "3d60d4c1caeaabe199fe361e4e9b14a4", - ["file.lua"] = "f5c9527ea14b511d2cb9af80b219c562", - ["func.lua"] = "cc50d73512b6d0518f6587b82844de8c", - ["init.lua"] = "9232be7d8790d4f907972a00dec7949d", - ["input.lua"] = "bab7c64ca9a740df5e9fb9909610bbc4", - ["lapp.lua"] = "1cc81f048bc3fcd775c40cd9a2d601a7", - ["lexer.lua"] = "da0db5e323a2d37545ccb02592d0d3c8", - ["luabalanced.lua"] = "00b94a997a9ea4d73f54c10893f3b35f", - ["operator.lua"] = "e606629c738966cf497bb938457adebd", - ["path.lua"] = "b0714bc337c068b7252f64250fe59604", - ["permute.lua"] = "b0ed9ba2787119ef99468329a54ea16a", - platf = { - ["luajava.lua"] = "9c2898667281ad9501cc05a8e31a6f53" - }, - ["pretty.lua"] = "3ece64317ce05916eaba91fa96d9e7c0", - ["seq.lua"] = "e99e420345ab11120a7b741d8184920a", - ["sip.lua"] = "bde74f65e7246017d3ef034d178100ea", - ["strict.lua"] = "720e939931dbbe42fad8fd4e7736435e", - ["stringio.lua"] = "a8f4c786ea1b62f16ed05e6b09840044", - ["stringx.lua"] = "43f57755969c6b4001316226506a3744", - ["tablex.lua"] = "dec027cc3a3901766bd933c5fc0f3e93", - ["template.lua"] = "f358175bbb84c401c6213c953ce295a4", - ["test.lua"] = "1c45f7b1c438673f1eb668e2ca592f1c", - ["text.lua"] = "c30f90cab2d00186a6432e408ba1fe14", - ["utils.lua"] = "68cd38638a29b4ab5f1cc0eae38dce77", - ["xml.lua"] = "e13ed468c450fccb9a8e858a0f787eef" - } - }, - ["penlight-0.9.8-1.rockspec"] = "96edac3ff1d0ac57cb45d6551a56a775" -} diff --git a/Utils/luarocks/lua.ico b/Utils/luarocks/lua.ico deleted file mode 100644 index 56dc4fe15..000000000 Binary files a/Utils/luarocks/lua.ico and /dev/null differ diff --git a/Utils/luarocks/lua/luarocks/add.lua b/Utils/luarocks/lua/luarocks/add.lua deleted file mode 100644 index f37d334d3..000000000 --- a/Utils/luarocks/lua/luarocks/add.lua +++ /dev/null @@ -1,122 +0,0 @@ - ---- Module implementing the luarocks-admin "add" command. --- Adds a rock or rockspec to a rocks server. -local add = {} -package.loaded["luarocks.add"] = add - -local cfg = require("luarocks.cfg") -local util = require("luarocks.util") -local dir = require("luarocks.dir") -local manif = require("luarocks.manif") -local index = require("luarocks.index") -local fs = require("luarocks.fs") -local cache = require("luarocks.cache") - -util.add_run_function(add) -add.help_summary = "Add a rock or rockspec to a rocks server." -add.help_arguments = "[--server=] [--no-refresh] {|...}" -add.help = [[ -Arguments are local files, which may be rockspecs or rocks. -The flag --server indicates which server to use. -If not given, the default server set in the upload_server variable -from the configuration file is used instead. -The flag --no-refresh indicates the local cache should not be refreshed -prior to generation of the updated manifest. -]] - -local function add_files_to_server(refresh, rockfiles, server, upload_server) - assert(type(refresh) == "boolean" or not refresh) - assert(type(rockfiles) == "table") - assert(type(server) == "string") - assert(type(upload_server) == "table" or not upload_server) - - local download_url, login_url = cache.get_server_urls(server, upload_server) - local at = fs.current_dir() - local refresh_fn = refresh and cache.refresh_local_cache or cache.split_server_url - - local local_cache, protocol, server_path, user, password = refresh_fn(server, download_url, cfg.upload_user, cfg.upload_password) - if not local_cache then - return nil, protocol - end - if protocol == "file" then - return nil, "Server "..server.." is not recognized, check your configuration." - end - - if not login_url then - login_url = protocol.."://"..server_path - end - - local ok, err = fs.change_dir(at) - if not ok then return nil, err end - - local files = {} - for _, rockfile in ipairs(rockfiles) do - if fs.exists(rockfile) then - util.printout("Copying file "..rockfile.." to "..local_cache.."...") - local absolute = fs.absolute_name(rockfile) - fs.copy(absolute, local_cache, cfg.perm_read) - table.insert(files, dir.base_name(absolute)) - else - util.printerr("File "..rockfile.." not found") - end - end - if #files == 0 then - return nil, "No files found" - end - - local ok, err = fs.change_dir(local_cache) - if not ok then return nil, err end - - util.printout("Updating manifest...") - manif.make_manifest(local_cache, "one", true) - - manif.zip_manifests() - - util.printout("Updating index.html...") - index.make_index(local_cache) - - local login_info = "" - if user then login_info = " -u "..user end - if password then login_info = login_info..":"..password end - if not login_url:match("/$") then - login_url = login_url .. "/" - end - - table.insert(files, "index.html") - table.insert(files, "manifest") - for ver in util.lua_versions() do - table.insert(files, "manifest-"..ver) - table.insert(files, "manifest-"..ver..".zip") - end - - -- TODO abstract away explicit 'curl' call - - local cmd - if protocol == "rsync" then - local srv, path = server_path:match("([^/]+)(/.+)") - cmd = cfg.variables.RSYNC.." "..cfg.variables.RSYNCFLAGS.." -e ssh "..local_cache.."/ "..user.."@"..srv..":"..path.."/" - elseif upload_server and upload_server.sftp then - local part1, part2 = upload_server.sftp:match("^([^/]*)/(.*)$") - cmd = cfg.variables.SCP.." "..table.concat(files, " ").." "..user.."@"..part1..":/"..part2 - else - cmd = cfg.variables.CURL.." "..login_info.." -T '{"..table.concat(files, ",").."}' "..login_url - end - - util.printout(cmd) - fs.execute(cmd) - - return true -end - -function add.command(flags, ...) - local files = {...} - if #files < 1 then - return nil, "Argument missing. "..util.see_help("add", "luarocks-admin") - end - local server, server_table = cache.get_upload_server(flags["server"]) - if not server then return nil, server_table end - return add_files_to_server(not flags["no-refresh"], files, server, server_table) -end - - -return add diff --git a/Utils/luarocks/lua/luarocks/admin_remove.lua b/Utils/luarocks/lua/luarocks/admin_remove.lua deleted file mode 100644 index 621f13178..000000000 --- a/Utils/luarocks/lua/luarocks/admin_remove.lua +++ /dev/null @@ -1,92 +0,0 @@ - ---- Module implementing the luarocks-admin "remove" command. --- Removes a rock or rockspec from a rocks server. -local admin_remove = {} -package.loaded["luarocks.admin_remove"] = admin_remove - -local cfg = require("luarocks.cfg") -local util = require("luarocks.util") -local dir = require("luarocks.dir") -local manif = require("luarocks.manif") -local index = require("luarocks.index") -local fs = require("luarocks.fs") -local cache = require("luarocks.cache") - -util.add_run_function(admin_remove) -admin_remove.help_summary = "Remove a rock or rockspec from a rocks server." -admin_remove.help_arguments = "[--server=] [--no-refresh] {|...}" -admin_remove.help = [[ -Arguments are local files, which may be rockspecs or rocks. -The flag --server indicates which server to use. -If not given, the default server set in the upload_server variable -from the configuration file is used instead. -The flag --no-refresh indicates the local cache should not be refreshed -prior to generation of the updated manifest. -]] - -local function remove_files_from_server(refresh, rockfiles, server, upload_server) - assert(type(refresh) == "boolean" or not refresh) - assert(type(rockfiles) == "table") - assert(type(server) == "string") - assert(type(upload_server) == "table" or not upload_server) - - local download_url, login_url = cache.get_server_urls(server, upload_server) - local at = fs.current_dir() - local refresh_fn = refresh and cache.refresh_local_cache or cache.split_server_url - - local local_cache, protocol, server_path, user, password = refresh_fn(server, download_url, cfg.upload_user, cfg.upload_password) - if not local_cache then - return nil, protocol - end - if protocol ~= "rsync" then - return nil, "This command requires 'rsync', check your configuration." - end - - local ok, err = fs.change_dir(at) - if not ok then return nil, err end - - local nr_files = 0 - for _, rockfile in ipairs(rockfiles) do - local basename = dir.base_name(rockfile) - local file = dir.path(local_cache, basename) - util.printout("Removing file "..file.."...") - fs.delete(file) - if not fs.exists(file) then - nr_files = nr_files + 1 - else - util.printerr("Failed removing "..file) - end - end - if nr_files == 0 then - return nil, "No files removed." - end - - local ok, err = fs.change_dir(local_cache) - if not ok then return nil, err end - - util.printout("Updating manifest...") - manif.make_manifest(local_cache, "one", true) - util.printout("Updating index.html...") - index.make_index(local_cache) - - local srv, path = server_path:match("([^/]+)(/.+)") - local cmd = cfg.variables.RSYNC.." "..cfg.variables.RSYNCFLAGS.." --delete -e ssh "..local_cache.."/ "..user.."@"..srv..":"..path.."/" - - util.printout(cmd) - fs.execute(cmd) - - return true -end - -function admin_remove.command(flags, ...) - local files = {...} - if #files < 1 then - return nil, "Argument missing. "..util.see_help("remove", "luarocks-admin") - end - local server, server_table = cache.get_upload_server(flags["server"]) - if not server then return nil, server_table end - return remove_files_from_server(not flags["no-refresh"], files, server, server_table) -end - - -return admin_remove diff --git a/Utils/luarocks/lua/luarocks/build.lua b/Utils/luarocks/lua/luarocks/build.lua deleted file mode 100644 index 96b232ffb..000000000 --- a/Utils/luarocks/lua/luarocks/build.lua +++ /dev/null @@ -1,415 +0,0 @@ - ---- Module implementing the LuaRocks "build" command. --- Builds a rock, compiling its C parts if any. -local build = {} -package.loaded["luarocks.build"] = build - -local pack = require("luarocks.pack") -local path = require("luarocks.path") -local util = require("luarocks.util") -local repos = require("luarocks.repos") -local fetch = require("luarocks.fetch") -local fs = require("luarocks.fs") -local dir = require("luarocks.dir") -local deps = require("luarocks.deps") -local manif = require("luarocks.manif") -local remove = require("luarocks.remove") -local cfg = require("luarocks.cfg") - -util.add_run_function(build) -build.help_summary = "Build/compile a rock." -build.help_arguments = "[--pack-binary-rock] [--keep] {|| []}" -build.help = [[ -Build and install a rock, compiling its C parts if any. -Argument may be a rockspec file, a source rock file -or the name of a rock to be fetched from a repository. - ---pack-binary-rock Do not install rock. Instead, produce a .rock file - with the contents of compilation in the current - directory. - ---keep Do not remove previously installed versions of the - rock after building a new one. This behavior can - be made permanent by setting keep_other_versions=true - in the configuration file. - ---branch= Override the `source.branch` field in the loaded - rockspec. Allows to specify a different branch to - fetch. Particularly for SCM rocks. - ---only-deps Installs only the dependencies of the rock. - -]]..util.deps_mode_help() - ---- Install files to a given location. --- Takes a table where the array part is a list of filenames to be copied. --- In the hash part, other keys, if is_module_path is set, are identifiers --- in Lua module format, to indicate which subdirectory the file should be --- copied to. For example, install_files({["foo.bar"] = "src/bar.lua"}, "boo") --- will copy src/bar.lua to boo/foo. --- @param files table or nil: A table containing a list of files to copy in --- the format described above. If nil is passed, this function is a no-op. --- Directories should be delimited by forward slashes as in internet URLs. --- @param location string: The base directory files should be copied to. --- @param is_module_path boolean: True if string keys in files should be --- interpreted as dotted module paths. --- @param perms string: Permissions of the newly created files installed. --- Directories are always created with the default permissions. --- @return boolean or (nil, string): True if succeeded or --- nil and an error message. -local function install_files(files, location, is_module_path, perms) - assert(type(files) == "table" or not files) - assert(type(location) == "string") - if files then - for k, file in pairs(files) do - local dest = location - local filename = dir.base_name(file) - if type(k) == "string" then - local modname = k - if is_module_path then - dest = dir.path(location, path.module_to_path(modname)) - local ok, err = fs.make_dir(dest) - if not ok then return nil, err end - if filename:match("%.lua$") then - local basename = modname:match("([^.]+)$") - filename = basename..".lua" - end - else - dest = dir.path(location, dir.dir_name(modname)) - local ok, err = fs.make_dir(dest) - if not ok then return nil, err end - filename = dir.base_name(modname) - end - else - local ok, err = fs.make_dir(dest) - if not ok then return nil, err end - end - local ok = fs.copy(dir.path(file), dir.path(dest, filename), perms) - if not ok then - return nil, "Failed copying "..file - end - end - end - return true -end - ---- Write to the current directory the contents of a table, --- where each key is a file name and its value is the file content. --- @param files table: The table of files to be written. -local function extract_from_rockspec(files) - for name, content in pairs(files) do - local fd = io.open(dir.path(fs.current_dir(), name), "w+") - fd:write(content) - fd:close() - end -end - ---- Applies patches inlined in the build.patches section --- and extracts files inlined in the build.extra_files section --- of a rockspec. --- @param rockspec table: A rockspec table. --- @return boolean or (nil, string): True if succeeded or --- nil and an error message. -function build.apply_patches(rockspec) - assert(type(rockspec) == "table") - - local build_spec = rockspec.build - if build_spec.extra_files then - extract_from_rockspec(build_spec.extra_files) - end - if build_spec.patches then - extract_from_rockspec(build_spec.patches) - for patch, patchdata in util.sortedpairs(build_spec.patches) do - util.printout("Applying patch "..patch.."...") - local ok, err = fs.apply_patch(tostring(patch), patchdata) - if not ok then - return nil, "Failed applying patch "..patch - end - end - end - return true -end - -local function install_default_docs(name, version) - local patterns = { "readme", "license", "copying", ".*%.md" } - local dest = dir.path(path.install_dir(name, version), "doc") - local has_dir = false - for file in fs.dir() do - for _, pattern in ipairs(patterns) do - if file:lower():match("^"..pattern) then - if not has_dir then - fs.make_dir(dest) - has_dir = true - end - fs.copy(file, dest, cfg.perm_read) - break - end - end - end -end - ---- Build and install a rock given a rockspec. --- @param rockspec_file string: local or remote filename of a rockspec. --- @param need_to_fetch boolean: true if sources need to be fetched, --- false if the rockspec was obtained from inside a source rock. --- @param minimal_mode boolean: true if there's no need to fetch, --- unpack or change dir (this is used by "luarocks make"). Implies --- need_to_fetch = false. --- @param deps_mode string: Dependency mode: "one" for the current default tree, --- "all" for all trees, "order" for all trees with priority >= the current default, --- "none" for no trees. --- @param build_only_deps boolean: true to build the listed dependencies only. --- @return (string, string) or (nil, string, [string]): Name and version of --- installed rock if succeeded or nil and an error message followed by an error code. -function build.build_rockspec(rockspec_file, need_to_fetch, minimal_mode, deps_mode, build_only_deps) - assert(type(rockspec_file) == "string") - assert(type(need_to_fetch) == "boolean") - - local rockspec, err, errcode = fetch.load_rockspec(rockspec_file) - if err then - return nil, err, errcode - elseif not rockspec.build then - return nil, "Rockspec error: build table not specified" - elseif not rockspec.build.type then - return nil, "Rockspec error: build type not specified" - end - - local ok - if not build_only_deps then - ok, err, errcode = deps.check_external_deps(rockspec, "build") - if err then - return nil, err, errcode - end - end - - if deps_mode == "none" then - util.printerr("Warning: skipping dependency checks.") - else - local ok, err, errcode = deps.fulfill_dependencies(rockspec, deps_mode) - if err then - return nil, err, errcode - end - end - - local name, version = rockspec.name, rockspec.version - if build_only_deps then - util.printout("Stopping after installing dependencies for " ..name.." "..version) - util.printout() - return name, version - end - - if repos.is_installed(name, version) then - repos.delete_version(name, version, deps_mode) - end - - if not minimal_mode then - local source_dir - if need_to_fetch then - ok, source_dir, errcode = fetch.fetch_sources(rockspec, true) - if not ok then - return nil, source_dir, errcode - end - local ok, err = fs.change_dir(source_dir) - if not ok then return nil, err end - elseif rockspec.source.file then - local ok, err = fs.unpack_archive(rockspec.source.file) - if not ok then - return nil, err - end - end - fs.change_dir(rockspec.source.dir) - end - - local dirs = { - lua = { name = path.lua_dir(name, version), is_module_path = true, perms = cfg.perm_read }, - lib = { name = path.lib_dir(name, version), is_module_path = true, perms = cfg.perm_exec }, - conf = { name = path.conf_dir(name, version), is_module_path = false, perms = cfg.perm_read }, - bin = { name = path.bin_dir(name, version), is_module_path = false, perms = cfg.perm_exec }, - } - - for _, d in pairs(dirs) do - local ok, err = fs.make_dir(d.name) - if not ok then return nil, err end - end - local rollback = util.schedule_function(function() - fs.delete(path.install_dir(name, version)) - fs.remove_dir_if_empty(path.versions_dir(name)) - end) - - local build_spec = rockspec.build - - if not minimal_mode then - ok, err = build.apply_patches(rockspec) - if err then - return nil, err - end - end - - if build_spec.type ~= "none" then - - -- Temporary compatibility - if build_spec.type == "module" then - util.printout("Do not use 'module' as a build type. Use 'builtin' instead.") - build_spec.type = "builtin" - end - - if cfg.accepted_build_types and util.array_contains(cfg.accepted_build_types, build_spec.type) then - return nil, "This rockspec uses the '"..build_spec.type.."' build type, which is blocked by the 'accepted_build_types' setting in your LuaRocks configuration." - end - - local build_type - ok, build_type = pcall(require, "luarocks.build." .. build_spec.type) - if not ok or not type(build_type) == "table" then - return nil, "Failed initializing build back-end for build type '"..build_spec.type.."': "..build_type - end - - ok, err = build_type.run(rockspec) - if not ok then - return nil, "Build error: " .. err - end - end - - if build_spec.install then - for id, install_dir in pairs(dirs) do - ok, err = install_files(build_spec.install[id], install_dir.name, install_dir.is_module_path, install_dir.perms) - if not ok then - return nil, err - end - end - end - - local copy_directories = build_spec.copy_directories - local copying_default = false - if not copy_directories then - copy_directories = {"doc"} - copying_default = true - end - - local any_docs = false - for _, copy_dir in pairs(copy_directories) do - if fs.is_dir(copy_dir) then - local dest = dir.path(path.install_dir(name, version), copy_dir) - fs.make_dir(dest) - fs.copy_contents(copy_dir, dest) - any_docs = true - else - if not copying_default then - return nil, "Directory '"..copy_dir.."' not found" - end - end - end - - if not any_docs then - install_default_docs(name, version) - end - - for _, d in pairs(dirs) do - fs.remove_dir_if_empty(d.name) - end - - fs.pop_dir() - - fs.copy(rockspec.local_filename, path.rockspec_file(name, version), cfg.perm_read) - if need_to_fetch then - fs.pop_dir() - end - - ok, err = manif.make_rock_manifest(name, version) - if err then return nil, err end - - ok, err = repos.deploy_files(name, version, repos.should_wrap_bin_scripts(rockspec), deps_mode) - if err then return nil, err end - - util.remove_scheduled_function(rollback) - rollback = util.schedule_function(function() - repos.delete_version(name, version, deps_mode) - end) - - ok, err = repos.run_hook(rockspec, "post_install") - if err then return nil, err end - - util.announce_install(rockspec) - util.remove_scheduled_function(rollback) - return name, version -end - ---- Build and install a rock. --- @param rock_file string: local or remote filename of a rock. --- @param need_to_fetch boolean: true if sources need to be fetched, --- false if the rockspec was obtained from inside a source rock. --- @param deps_mode: string: Which trees to check dependencies for: --- "one" for the current default tree, "all" for all trees, --- "order" for all trees with priority >= the current default, "none" for no trees. --- @param build_only_deps boolean: true to build the listed dependencies only. --- @return boolean or (nil, string, [string]): True if build was successful, --- or false and an error message and an optional error code. -function build.build_rock(rock_file, need_to_fetch, deps_mode, build_only_deps) - assert(type(rock_file) == "string") - assert(type(need_to_fetch) == "boolean") - - local ok, err, errcode - local unpack_dir - unpack_dir, err, errcode = fetch.fetch_and_unpack_rock(rock_file) - if not unpack_dir then - return nil, err, errcode - end - local rockspec_file = path.rockspec_name_from_rock(rock_file) - ok, err = fs.change_dir(unpack_dir) - if not ok then return nil, err end - ok, err, errcode = build.build_rockspec(rockspec_file, need_to_fetch, false, deps_mode, build_only_deps) - fs.pop_dir() - return ok, err, errcode -end - -local function do_build(name, version, deps_mode, build_only_deps) - if name:match("%.rockspec$") then - return build.build_rockspec(name, true, false, deps_mode, build_only_deps) - elseif name:match("%.src%.rock$") then - return build.build_rock(name, false, deps_mode, build_only_deps) - elseif name:match("%.all%.rock$") then - local install = require("luarocks.install") - local install_fun = build_only_deps and install.install_binary_rock_deps or install.install_binary_rock - return install_fun(name, deps_mode) - elseif name:match("%.rock$") then - return build.build_rock(name, true, deps_mode, build_only_deps) - elseif not name:match(dir.separator) then - local search = require("luarocks.search") - return search.act_on_src_or_rockspec(do_build, name:lower(), version, nil, deps_mode, build_only_deps) - end - return nil, "Don't know what to do with "..name -end - ---- Driver function for "build" command. --- @param name string: A local or remote rockspec or rock file. --- If a package name is given, forwards the request to "search" and, --- if returned a result, installs the matching rock. --- @param version string: When passing a package name, a version number may --- also be given. --- @return boolean or (nil, string, exitcode): True if build was successful; nil and an --- error message otherwise. exitcode is optionally returned. -function build.command(flags, name, version) - if type(name) ~= "string" then - return nil, "Argument missing. "..util.see_help("build") - end - assert(type(version) == "string" or not version) - - if flags["pack-binary-rock"] then - return pack.pack_binary_rock(name, version, do_build, name, version, deps.get_deps_mode(flags)) - else - local ok, err = fs.check_command_permissions(flags) - if not ok then return nil, err, cfg.errorcodes.PERMISSIONDENIED end - ok, err = do_build(name, version, deps.get_deps_mode(flags), flags["only-deps"]) - if not ok then return nil, err end - name, version = ok, err - - if (not flags["only-deps"]) and (not flags["keep"]) and not cfg.keep_other_versions then - local ok, err = remove.remove_other_versions(name, version, flags["force"], flags["force-fast"]) - if not ok then util.printerr(err) end - end - - manif.check_dependencies(nil, deps.get_deps_mode(flags)) - return name, version - end -end - -return build diff --git a/Utils/luarocks/lua/luarocks/cache.lua b/Utils/luarocks/lua/luarocks/cache.lua deleted file mode 100644 index 4a95f70e3..000000000 --- a/Utils/luarocks/lua/luarocks/cache.lua +++ /dev/null @@ -1,78 +0,0 @@ - ---- Module handling the LuaRocks local cache. --- Adds a rock or rockspec to a rocks server. -local cache = {} -package.loaded["luarocks.cache"] = cache - -local fs = require("luarocks.fs") -local cfg = require("luarocks.cfg") -local dir = require("luarocks.dir") -local util = require("luarocks.util") - -function cache.get_upload_server(server) - if not server then server = cfg.upload_server end - if not server then - return nil, "No server specified and no default configured with upload_server." - end - return server, cfg.upload_servers and cfg.upload_servers[server] -end - -function cache.get_server_urls(server, upload_server) - local download_url = server - local login_url = nil - if upload_server then - if upload_server.rsync then download_url = "rsync://"..upload_server.rsync - elseif upload_server.http then download_url = "http://"..upload_server.http - elseif upload_server.ftp then download_url = "ftp://"..upload_server.ftp - end - - if upload_server.ftp then login_url = "ftp://"..upload_server.ftp - elseif upload_server.sftp then login_url = "sftp://"..upload_server.sftp - end - end - return download_url, login_url -end - -function cache.split_server_url(server, url, user, password) - local protocol, server_path = dir.split_url(url) - if server_path:match("@") then - local credentials - credentials, server_path = server_path:match("([^@]*)@(.*)") - if credentials:match(":") then - user, password = credentials:match("([^:]*):(.*)") - else - user = credentials - end - end - local local_cache = cfg.local_cache .. "/" .. server - return local_cache, protocol, server_path, user, password -end - -function cache.refresh_local_cache(server, url, user, password) - local local_cache, protocol, server_path, user, password = cache.split_server_url(server, url, user, password) - local ok, err = fs.make_dir(local_cache) - if not ok then - return nil, "Failed creating local cache dir: "..err - end - fs.change_dir(local_cache) - if not ok then return nil, err end - util.printout("Refreshing cache "..local_cache.."...") - - -- TODO abstract away explicit 'wget' call - local ok = false - if protocol == "rsync" then - local srv, path = server_path:match("([^/]+)(/.+)") - ok = fs.execute(cfg.variables.RSYNC.." "..cfg.variables.RSYNCFLAGS.." -e ssh "..user.."@"..srv..":"..path.."/ "..local_cache.."/") - else - local login_info = "" - if user then login_info = " --user="..user end - if password then login_info = login_info .. " --password="..password end - ok = fs.execute(cfg.variables.WGET.." --no-cache -q -m -np -nd "..protocol.."://"..server_path..login_info) - end - if not ok then - return nil, "Failed downloading cache." - end - return local_cache, protocol, server_path, user, password -end - -return cache diff --git a/Utils/luarocks/lua/luarocks/cfg.lua b/Utils/luarocks/lua/luarocks/cfg.lua deleted file mode 100644 index c997c1240..000000000 --- a/Utils/luarocks/lua/luarocks/cfg.lua +++ /dev/null @@ -1,760 +0,0 @@ ---- Configuration for LuaRocks. --- Tries to load the user's configuration file and --- defines defaults for unset values. See the --- config --- file format documentation for details. --- --- End-users shouldn't edit this file. They can override any defaults --- set in this file using their system-wide or user-specific configuration --- files. Run `luarocks` with no arguments to see the locations of --- these files in your platform. - -local rawset, next, table, pairs, require, io, os, setmetatable, pcall, ipairs, package, tonumber, type, assert, _VERSION = - rawset, next, table, pairs, require, io, os, setmetatable, pcall, ipairs, package, tonumber, type, assert, _VERSION - ---module("luarocks.cfg") -local cfg = {} -package.loaded["luarocks.cfg"] = cfg - -local util = require("luarocks.util") - -cfg.lua_version = _VERSION:match(" (5%.[123])$") or "5.1" -local version_suffix = cfg.lua_version:gsub("%.", "_") - --- Load site-local global configurations -local ok, site_config = pcall(require, "luarocks.site_config_"..version_suffix) -if not ok then - ok, site_config = pcall(require, "luarocks.site_config") -end -if not ok then - io.stderr:write("Site-local luarocks/site_config.lua file not found. Incomplete installation?\n") - site_config = {} -end - -cfg.program_version = "2.4.2" -cfg.program_series = "2.4" -cfg.major_version = (cfg.program_version:match("([^.]%.[^.])")) or cfg.program_series -cfg.variables = {} -cfg.rocks_trees = {} -cfg.platforms = {} - -local persist = require("luarocks.persist") - -cfg.errorcodes = setmetatable({ - OK = 0, - UNSPECIFIED = 1, - PERMISSIONDENIED = 2, - CONFIGFILE = 3, - CRASH = 99 -},{ - __index = function(t, key) - local val = rawget(t, key) - if not val then - error("'"..tostring(key).."' is not a valid errorcode", 2) - end - return val - end -}) - - -local popen_ok, popen_result = pcall(io.popen, "") -if popen_ok then - if popen_result then - popen_result:close() - end -else - io.stderr:write("Your version of Lua does not support io.popen,\n") - io.stderr:write("which is required by LuaRocks. Please check your Lua installation.\n") - os.exit(cfg.errorcodes.UNSPECIFIED) -end - --- System detection: - --- A proper installation of LuaRocks will hardcode the system --- and proc values with site_config.LUAROCKS_UNAME_S and site_config.LUAROCKS_UNAME_M, --- so that this detection does not run every time. When it is --- performed, we use the Unix way to identify the system, --- even on Windows (assuming UnxUtils or Cygwin). -local system = site_config.LUAROCKS_UNAME_S or io.popen("uname -s"):read("*l") -local proc = site_config.LUAROCKS_UNAME_M or io.popen("uname -m"):read("*l") -if proc:match("i[%d]86") then - cfg.target_cpu = "x86" -elseif proc:match("amd64") or proc:match("x86_64") then - cfg.target_cpu = "x86_64" -elseif proc:match("Power Macintosh") then - cfg.target_cpu = "powerpc" - else - cfg.target_cpu = proc -end - -if system == "FreeBSD" then - cfg.platforms.unix = true - cfg.platforms.freebsd = true - cfg.platforms.bsd = true -elseif system == "OpenBSD" then - cfg.platforms.unix = true - cfg.platforms.openbsd = true - cfg.platforms.bsd = true -elseif system == "NetBSD" then - cfg.platforms.unix = true - cfg.platforms.netbsd = true - cfg.platforms.bsd = true -elseif system == "Darwin" then - cfg.platforms.unix = true - cfg.platforms.macosx = true - cfg.platforms.bsd = true -elseif system == "Linux" then - cfg.platforms.unix = true - cfg.platforms.linux = true -elseif system == "SunOS" then - cfg.platforms.unix = true - cfg.platforms.solaris = true -elseif system and system:match("^CYGWIN") then - cfg.platforms.unix = true - cfg.platforms.cygwin = true -elseif system and system:match("^MSYS") then - cfg.platforms.unix = true - cfg.platforms.msys = true - cfg.platforms.cygwin = true -elseif system and system:match("^Windows") then - cfg.platforms.windows = true - cfg.platforms.win32 = true -elseif system and system:match("^MINGW") then - cfg.platforms.windows = true - cfg.platforms.mingw32 = true - cfg.platforms.win32 = true -elseif system == "Haiku" then - cfg.platforms.unix = true - cfg.platforms.haiku = true -else - cfg.platforms.unix = true - -- Fall back to Unix in unknown systems. -end - --- Set order for platform overrides. --- More general platform identifiers should be listed first, --- more specific ones later. -local platform_order = { - -- Unixes - "unix", - "bsd", - "solaris", - "netbsd", - "openbsd", - "freebsd", - "linux", - "macosx", - "cygwin", - "msys", - "haiku", - -- Windows - "win32", - "mingw32", - "windows", -} - --- Path configuration: -local sys_config_file, home_config_file -local sys_config_file_default, home_config_file_default -local sys_config_dir, home_config_dir -local sys_config_ok, home_config_ok = false, false -local extra_luarocks_module_dir -sys_config_dir = site_config.LUAROCKS_SYSCONFDIR or site_config.LUAROCKS_PREFIX -if cfg.platforms.windows then - cfg.home = os.getenv("APPDATA") or "c:" - sys_config_dir = sys_config_dir or "c:/luarocks" - home_config_dir = cfg.home.."/luarocks" - cfg.home_tree = cfg.home.."/luarocks/" -else - cfg.home = os.getenv("HOME") or "" - sys_config_dir = sys_config_dir or "/etc/luarocks" - home_config_dir = cfg.home.."/.luarocks" - cfg.home_tree = (os.getenv("USER") ~= "root") and cfg.home.."/.luarocks/" -end - --- Create global environment for the config files; -local env_for_config_file = function() - local e - e = { - home = cfg.home, - lua_version = cfg.lua_version, - platforms = util.make_shallow_copy(cfg.platforms), - processor = cfg.target_cpu, -- remains for compat reasons - target_cpu = cfg.target_cpu, -- replaces `processor` - os_getenv = os.getenv, - dump_env = function() - -- debug function, calling it from a config file will show all - -- available globals to that config file - print(util.show_table(e, "global environment")) - end, - } - return e -end - --- Merge values from config files read into the `cfg` table -local merge_overrides = function(overrides) - -- remove some stuff we do not want to integrate - overrides.os_getenv = nil - overrides.dump_env = nil - -- remove tables to be copied verbatim instead of deeply merged - if overrides.rocks_trees then cfg.rocks_trees = nil end - if overrides.rocks_servers then cfg.rocks_servers = nil end - -- perform actual merge - util.deep_merge(cfg, overrides) -end - --- load config file from a list until first succesful one. Info is --- added to `cfg` module table, returns filepath of succesfully loaded --- file or nil if it failed -local load_config_file = function(list) - for _, filepath in ipairs(list) do - local result, err, errcode = persist.load_into_table(filepath, env_for_config_file()) - if (not result) and errcode ~= "open" then - -- errcode is either "load" or "run"; bad config file, so error out - io.stderr:write(err.."\n") - os.exit(cfg.errorcodes.CONFIGFILE) - end - if result then - -- succes in loading and running, merge contents and exit - merge_overrides(result) - return filepath - end - end - return nil -- nothing was loaded -end - - --- Load system configuration file -do - sys_config_file_default = sys_config_dir.."/config-"..cfg.lua_version..".lua" - sys_config_file = load_config_file({ - site_config.LUAROCKS_SYSCONFIG or sys_config_file_default, - sys_config_dir.."/config.lua", - }) - sys_config_ok = (sys_config_file ~= nil) -end - --- Load user configuration file (if allowed) -if not site_config.LUAROCKS_FORCE_CONFIG then - - home_config_file_default = home_config_dir.."/config-"..cfg.lua_version..".lua" - - local config_env_var = "LUAROCKS_CONFIG_" .. version_suffix - local config_env_value = os.getenv(config_env_var) - if not config_env_value then - config_env_var = "LUAROCKS_CONFIG" - config_env_value = os.getenv(config_env_var) - end - - -- first try environment provided file, so we can explicitly warn when it is missing - if config_env_value then - local list = { config_env_value } - home_config_file = load_config_file(list) - home_config_ok = (home_config_file ~= nil) - if not home_config_ok then - io.stderr:write("Warning: could not load configuration file `"..config_env_value.."` given in environment variable "..config_env_var.."\n") - end - end - - -- try the alternative defaults if there was no environment specified file or it didn't work - if not home_config_ok then - local list = { - home_config_file_default, - home_config_dir.."/config.lua", - } - home_config_file = load_config_file(list) - home_config_ok = (home_config_file ~= nil) - end -end - - -if not next(cfg.rocks_trees) then - if cfg.home_tree then - table.insert(cfg.rocks_trees, { name = "user", root = cfg.home_tree } ) - end - if site_config.LUAROCKS_ROCKS_TREE then - table.insert(cfg.rocks_trees, { name = "system", root = site_config.LUAROCKS_ROCKS_TREE } ) - end -end - --- update platforms list; keyed -> array -do - -- if explicitly given by user, - if cfg.platforms[1] then - local is_windows = cfg.platforms.windows - -- Clear auto-detected values - for k, _ in pairs(cfg.platforms) do - if type(k) == "string" then - cfg.platforms[k] = nil - end - end - -- and set the ones given by the user. - for _, plat in ipairs(cfg.platforms) do - cfg.platforms[plat] = true - end - -- If no major platform family was set by the user, - if not (cfg.platforms.unix or cfg.platforms.windows) then - -- set some fallback defaults in case the user provides an incomplete configuration. - -- LuaRocks expects a set of defaults to be available. - -- This is used for setting defaults here only; the platform overrides - -- will use only the user's list. - if is_windows then - cfg.platforms.windows = true - table.insert(cfg.platforms, "windows") - else - cfg.platforms.unix = true - table.insert(cfg.platforms, "unix") - end - end - else - -- Sort detected platform defaults - local order = {} - for i, v in ipairs(platform_order) do - order[v] = i - end - local entries = {} - for k, v in pairs(cfg.platforms) do - if type(k) == "string" and v == true then - table.insert(entries, k) - end - end - table.sort(entries, function(a, b) return order[a] < order[b] end) - util.deep_merge(cfg.platforms, entries) - end -end - --- Configure defaults: -local defaults = { - - local_by_default = false, - accept_unknown_fields = false, - fs_use_modules = true, - hooks_enabled = true, - deps_mode = "one", - check_certificates = false, - perm_read = "0644", - perm_exec = "0755", - - lua_modules_path = "/share/lua/"..cfg.lua_version, - lib_modules_path = "/lib/lua/"..cfg.lua_version, - rocks_subdir = site_config.LUAROCKS_ROCKS_SUBDIR or "/lib/luarocks/rocks", - - arch = "unknown", - lib_extension = "unknown", - obj_extension = "unknown", - link_lua_explicitly = false, - - rocks_servers = { - { - "https://luarocks.org", - "https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/", - "http://luafr.org/moonrocks/", - "http://luarocks.logiceditor.com/rocks", - } - }, - disabled_servers = {}, - - upload = { - server = "https://luarocks.org", - tool_version = "1.0.0", - api_version = "1", - }, - - lua_extension = "lua", - lua_interpreter = site_config.LUA_INTERPRETER or "lua", - downloader = site_config.LUAROCKS_DOWNLOADER or "wget", - md5checker = site_config.LUAROCKS_MD5CHECKER or "md5sum", - connection_timeout = 30, -- 0 = no timeout - - variables = { - MAKE = "make", - CC = "cc", - LD = "ld", - - CVS = "cvs", - GIT = "git", - SSCM = "sscm", - SVN = "svn", - HG = "hg", - - RSYNC = "rsync", - WGET = "wget", - SCP = "scp", - CURL = "curl", - - PWD = "pwd", - MKDIR = "mkdir", - RMDIR = "rmdir", - CP = "cp", - LS = "ls", - RM = "rm", - FIND = "find", - TEST = "test", - CHMOD = "chmod", - MKTEMP = "mktemp", - - ZIP = "zip", - UNZIP = "unzip -n", - GUNZIP = "gunzip", - BUNZIP2 = "bunzip2", - TAR = "tar", - - MD5SUM = "md5sum", - OPENSSL = "openssl", - MD5 = "md5", - STAT = "stat", - TOUCH = "touch", - - CMAKE = "cmake", - SEVENZ = "7z", - - RSYNCFLAGS = "--exclude=.git -Oavz", - STATFLAG = "-c '%a'", - CURLNOCERTFLAG = "", - WGETNOCERTFLAG = "", - }, - - external_deps_subdirs = site_config.LUAROCKS_EXTERNAL_DEPS_SUBDIRS or { - bin = "bin", - lib = "lib", - include = "include" - }, - runtime_external_deps_subdirs = site_config.LUAROCKS_RUNTIME_EXTERNAL_DEPS_SUBDIRS or { - bin = "bin", - lib = "lib", - include = "include" - }, - - rocks_provided = {} -} - -if cfg.platforms.windows then - local full_prefix = (site_config.LUAROCKS_PREFIX or (os.getenv("PROGRAMFILES")..[[\LuaRocks]])) - extra_luarocks_module_dir = full_prefix.."/lua/?.lua" - - home_config_file = home_config_file and home_config_file:gsub("\\","/") - defaults.fs_use_modules = false - defaults.arch = "win32-"..cfg.target_cpu - defaults.lib_extension = "dll" - defaults.external_lib_extension = "dll" - defaults.obj_extension = "obj" - defaults.external_deps_dirs = { "c:/external/" } - defaults.variables.LUA_BINDIR = site_config.LUA_BINDIR and site_config.LUA_BINDIR:gsub("\\", "/") or "c:/lua"..cfg.lua_version.."/bin" - defaults.variables.LUA_INCDIR = site_config.LUA_INCDIR and site_config.LUA_INCDIR:gsub("\\", "/") or "c:/lua"..cfg.lua_version.."/include" - defaults.variables.LUA_LIBDIR = site_config.LUA_LIBDIR and site_config.LUA_LIBDIR:gsub("\\", "/") or "c:/lua"..cfg.lua_version.."/lib" - - defaults.makefile = "Makefile.win" - defaults.variables.MAKE = "nmake" - defaults.variables.CC = "cl" - defaults.variables.RC = "rc" - defaults.variables.WRAPPER = full_prefix.."\\rclauncher.c" - defaults.variables.LD = "link" - defaults.variables.MT = "mt" - defaults.variables.LUALIB = "lua"..cfg.lua_version..".lib" - defaults.variables.CFLAGS = "/nologo /MD /O2" - defaults.variables.LIBFLAG = "/nologo /dll" - - local bins = { "SEVENZ", "CP", "FIND", "LS", "MD5SUM", - "MKDIR", "MV", "PWD", "RMDIR", "TEST", "UNAME", "WGET" } - for _, var in ipairs(bins) do - if defaults.variables[var] then - defaults.variables[var] = full_prefix.."\\tools\\"..defaults.variables[var] - end - end - - defaults.external_deps_patterns = { - bin = { "?.exe", "?.bat" }, - lib = { "?.lib", "?.dll", "lib?.dll" }, - include = { "?.h" } - } - defaults.runtime_external_deps_patterns = { - bin = { "?.exe", "?.bat" }, - lib = { "?.dll", "lib?.dll" }, - include = { "?.h" } - } - defaults.export_path = "SET PATH=%s" - defaults.export_path_separator = ";" - defaults.export_lua_path = "SET LUA_PATH=%s" - defaults.export_lua_cpath = "SET LUA_CPATH=%s" - defaults.wrapper_suffix = ".bat" - - local localappdata = os.getenv("LOCALAPPDATA") - if not localappdata then - -- for Windows versions below Vista - localappdata = os.getenv("USERPROFILE").."/Local Settings/Application Data" - end - defaults.local_cache = localappdata.."/LuaRocks/Cache" - defaults.web_browser = "start" -end - -if cfg.platforms.mingw32 then - defaults.obj_extension = "o" - defaults.cmake_generator = "MinGW Makefiles" - defaults.variables.MAKE = "mingw32-make" - defaults.variables.CC = "mingw32-gcc" - defaults.variables.RC = "windres" - defaults.variables.LD = "mingw32-gcc" - defaults.variables.CFLAGS = "-O2" - defaults.variables.LIBFLAG = "-shared" - defaults.makefile = "Makefile" - defaults.external_deps_patterns = { - bin = { "?.exe", "?.bat" }, - -- mingw lookup list from http://stackoverflow.com/a/15853231/1793220 - -- ...should we keep ?.lib at the end? It's not in the above list. - lib = { "lib?.dll.a", "?.dll.a", "lib?.a", "cyg?.dll", "lib?.dll", "?.dll", "?.lib" }, - include = { "?.h" } - } - defaults.runtime_external_deps_patterns = { - bin = { "?.exe", "?.bat" }, - lib = { "cyg?.dll", "?.dll", "lib?.dll" }, - include = { "?.h" } - } - -end - -if cfg.platforms.unix then - defaults.lib_extension = "so" - defaults.external_lib_extension = "so" - defaults.obj_extension = "o" - defaults.external_deps_dirs = { "/usr/local", "/usr" } - defaults.variables.LUA_BINDIR = site_config.LUA_BINDIR or "/usr/local/bin" - defaults.variables.LUA_INCDIR = site_config.LUA_INCDIR or "/usr/local/include" - defaults.variables.LUA_LIBDIR = site_config.LUA_LIBDIR or "/usr/local/lib" - defaults.variables.CFLAGS = "-O2" - defaults.cmake_generator = "Unix Makefiles" - defaults.variables.CC = "gcc" - defaults.variables.LD = "gcc" - defaults.gcc_rpath = true - defaults.variables.LIBFLAG = "-shared" - defaults.external_deps_patterns = { - bin = { "?" }, - lib = { "lib?.a", "lib?.so", "lib?.so.*" }, - include = { "?.h" } - } - defaults.runtime_external_deps_patterns = { - bin = { "?" }, - lib = { "lib?.so", "lib?.so.*" }, - include = { "?.h" } - } - defaults.export_path = "export PATH='%s'" - defaults.export_path_separator = ":" - defaults.export_lua_path = "export LUA_PATH='%s'" - defaults.export_lua_cpath = "export LUA_CPATH='%s'" - defaults.wrapper_suffix = "" - defaults.local_cache = cfg.home.."/.cache/luarocks" - if not defaults.variables.CFLAGS:match("-fPIC") then - defaults.variables.CFLAGS = defaults.variables.CFLAGS.." -fPIC" - end - defaults.web_browser = "xdg-open" -end - -if cfg.platforms.cygwin then - defaults.lib_extension = "so" -- can be overridden in the config file for mingw builds - defaults.arch = "cygwin-"..cfg.target_cpu - defaults.cmake_generator = "Unix Makefiles" - defaults.variables.CC = "echo -llua | xargs gcc" - defaults.variables.LD = "echo -llua | xargs gcc" - defaults.variables.LIBFLAG = "-shared" - defaults.link_lua_explicitly = true -end - -if cfg.platforms.msys then - -- msys is basically cygwin made out of mingw, meaning the subsytem is unixish - -- enough, yet we can freely mix with native win32 - defaults.external_deps_patterns = { - bin = { "?.exe", "?.bat", "?" }, - lib = { "lib?.so", "lib?.so.*", "lib?.dll.a", "?.dll.a", - "lib?.a", "lib?.dll", "?.dll", "?.lib" }, - include = { "?.h" } - } - defaults.runtime_external_deps_patterns = { - bin = { "?.exe", "?.bat" }, - lib = { "lib?.so", "?.dll", "lib?.dll" }, - include = { "?.h" } - } -end - - -if cfg.platforms.bsd then - defaults.variables.MAKE = "gmake" - defaults.variables.STATFLAG = "-f '%OLp'" -end - -if cfg.platforms.macosx then - defaults.variables.MAKE = "make" - defaults.external_lib_extension = "dylib" - defaults.arch = "macosx-"..cfg.target_cpu - defaults.variables.LIBFLAG = "-bundle -undefined dynamic_lookup -all_load" - defaults.variables.STAT = "/usr/bin/stat" - defaults.variables.STATFLAG = "-f '%A'" - local version = io.popen("sw_vers -productVersion"):read("*l") - version = tonumber(version and version:match("^[^.]+%.([^.]+)")) or 3 - if version >= 10 then - version = 8 - elseif version >= 5 then - version = 5 - else - defaults.gcc_rpath = false - end - defaults.variables.CC = "env MACOSX_DEPLOYMENT_TARGET=10."..version.." gcc" - defaults.variables.LD = "env MACOSX_DEPLOYMENT_TARGET=10."..version.." gcc" - defaults.web_browser = "open" -end - -if cfg.platforms.linux then - defaults.arch = "linux-"..cfg.target_cpu -end - -if cfg.platforms.freebsd then - defaults.arch = "freebsd-"..cfg.target_cpu - defaults.gcc_rpath = false - defaults.variables.CC = "cc" - defaults.variables.LD = "cc" -end - -if cfg.platforms.openbsd then - defaults.arch = "openbsd-"..cfg.target_cpu -end - -if cfg.platforms.netbsd then - defaults.arch = "netbsd-"..cfg.target_cpu -end - -if cfg.platforms.solaris then - defaults.arch = "solaris-"..cfg.target_cpu - --defaults.platforms = {"unix", "solaris"} - defaults.variables.MAKE = "gmake" -end - --- Expose some more values detected by LuaRocks for use by rockspec authors. -defaults.variables.LIB_EXTENSION = defaults.lib_extension -defaults.variables.OBJ_EXTENSION = defaults.obj_extension -defaults.variables.LUAROCKS_PREFIX = site_config.LUAROCKS_PREFIX -defaults.variables.LUA = site_config.LUA_DIR_SET and (defaults.variables.LUA_BINDIR.."/"..defaults.lua_interpreter) or defaults.lua_interpreter - --- Add built-in modules to rocks_provided -defaults.rocks_provided["lua"] = cfg.lua_version.."-1" - -if bit32 then -- Lua 5.2+ - defaults.rocks_provided["bit32"] = cfg.lua_version.."-1" -end - -if utf8 then -- Lua 5.3+ - defaults.rocks_provided["utf8"] = cfg.lua_version.."-1" -end - -if package.loaded.jit then - -- LuaJIT - local lj_version = package.loaded.jit.version:match("LuaJIT (.*)"):gsub("%-","") - --defaults.rocks_provided["luajit"] = lj_version.."-1" - defaults.rocks_provided["luabitop"] = lj_version.."-1" -end - --- Use defaults: - --- Populate some arrays with values from their 'defaults' counterparts --- if they were not already set by user. -for _, entry in ipairs({"variables", "rocks_provided"}) do - if not cfg[entry] then - cfg[entry] = {} - end - for k,v in pairs(defaults[entry]) do - if not cfg[entry][k] then - cfg[entry][k] = v - end - end -end - --- For values not set in the config file, use values from the 'defaults' table. -local cfg_mt = { - __index = function(t, k) - local default = defaults[k] - if default then - rawset(t, k, default) - end - return default - end -} -setmetatable(cfg, cfg_mt) - -if not cfg.check_certificates then - cfg.variables.CURLNOCERTFLAG = "-k" - cfg.variables.WGETNOCERTFLAG = "--no-check-certificate" -end - -function cfg.make_paths_from_tree(tree) - local lua_path, lib_path, bin_path - if type(tree) == "string" then - lua_path = tree..cfg.lua_modules_path - lib_path = tree..cfg.lib_modules_path - bin_path = tree.."/bin" - else - lua_path = tree.lua_dir or tree.root..cfg.lua_modules_path - lib_path = tree.lib_dir or tree.root..cfg.lib_modules_path - bin_path = tree.bin_dir or tree.root.."/bin" - end - return lua_path, lib_path, bin_path -end - -function cfg.package_paths(current) - local new_path, new_cpath, new_bin = {}, {}, {} - local function add_tree_to_paths(tree) - local lua_path, lib_path, bin_path = cfg.make_paths_from_tree(tree) - table.insert(new_path, lua_path.."/?.lua") - table.insert(new_path, lua_path.."/?/init.lua") - table.insert(new_cpath, lib_path.."/?."..cfg.lib_extension) - table.insert(new_bin, bin_path) - end - if current then - add_tree_to_paths(current) - end - for _,tree in ipairs(cfg.rocks_trees) do - add_tree_to_paths(tree) - end - if extra_luarocks_module_dir then - table.insert(new_path, extra_luarocks_module_dir) - end - return table.concat(new_path, ";"), table.concat(new_cpath, ";"), table.concat(new_bin, cfg.export_path_separator) -end - -function cfg.init_package_paths() - local lr_path, lr_cpath, lr_bin = cfg.package_paths() - package.path = util.remove_path_dupes(package.path .. ";" .. lr_path, ";") - package.cpath = util.remove_path_dupes(package.cpath .. ";" .. lr_cpath, ";") -end - -function cfg.which_config() - local ret = { - system = { - file = sys_config_file or sys_config_file_default, - ok = sys_config_ok, - }, - user = { - file = home_config_file or home_config_file_default, - ok = home_config_ok, - } - } - ret.nearest = (ret.user.ok and ret.user.file) or ret.system.file - return ret -end - -cfg.user_agent = "LuaRocks/"..cfg.program_version.." "..cfg.arch - -cfg.http_proxy = os.getenv("http_proxy") -cfg.https_proxy = os.getenv("https_proxy") -cfg.no_proxy = os.getenv("no_proxy") - ---- Check if platform was detected --- @param query string: The platform name to check. --- @return boolean: true if LuaRocks is currently running on queried platform. -function cfg.is_platform(query) - assert(type(query) == "string") - - for _, platform in ipairs(cfg.platforms) do - if platform == query then - return true - end - end -end - -return cfg diff --git a/Utils/luarocks/lua/luarocks/command_line.lua b/Utils/luarocks/lua/luarocks/command_line.lua deleted file mode 100644 index ecf3a61b1..000000000 --- a/Utils/luarocks/lua/luarocks/command_line.lua +++ /dev/null @@ -1,199 +0,0 @@ - ---- Functions for command-line scripts. -local command_line = {} - -local unpack = unpack or table.unpack - -local util = require("luarocks.util") -local cfg = require("luarocks.cfg") -local path = require("luarocks.path") -local dir = require("luarocks.dir") -local deps = require("luarocks.deps") -local fs = require("luarocks.fs") - -local program = util.this_program("luarocks") - -local function error_handler(err) - return debug.traceback("LuaRocks "..cfg.program_version.. - " bug (please report at https://github.com/keplerproject/luarocks/issues).\n"..err, 2) -end - ---- Display an error message and exit. --- @param message string: The error message. --- @param exitcode number: the exitcode to use -local function die(message, exitcode) - assert(type(message) == "string") - util.printerr("\nError: "..message) - - local ok, err = xpcall(util.run_scheduled_functions, error_handler) - if not ok then - util.printerr("\nError: "..err) - exitcode = cfg.errorcodes.CRASH - end - - os.exit(exitcode or cfg.errorcodes.UNSPECIFIED) -end - -local function replace_tree(flags, tree) - tree = dir.normalize(tree) - flags["tree"] = tree - path.use_tree(tree) -end - ---- Main command-line processor. --- Parses input arguments and calls the appropriate driver function --- to execute the action requested on the command-line, forwarding --- to it any additional arguments passed by the user. --- Uses the global table "commands", which contains --- the loaded modules representing commands. --- @param ... string: Arguments given on the command-line. -function command_line.run_command(...) - local args = {...} - local cmdline_vars = {} - for i = #args, 1, -1 do - local arg = args[i] - if arg:match("^[^-][^=]*=") then - local var, val = arg:match("^([A-Z_][A-Z0-9_]*)=(.*)") - if val then - cmdline_vars[var] = val - table.remove(args, i) - else - die("Invalid assignment: "..arg) - end - end - end - local nonflags = { util.parse_flags(unpack(args)) } - local flags = table.remove(nonflags, 1) - if flags.ERROR then - die(flags.ERROR.." See --help.") - end - - if flags["from"] then flags["server"] = flags["from"] end - if flags["only-from"] then flags["only-server"] = flags["only-from"] end - if flags["only-sources-from"] then flags["only-sources"] = flags["only-sources-from"] end - if flags["to"] then flags["tree"] = flags["to"] end - if flags["nodeps"] then - flags["deps-mode"] = "none" - end - - cfg.flags = flags - - local command - - if flags["verbose"] then -- setting it in the config file will kick-in earlier in the process - cfg.verbose = true - fs.verbose() - end - - if flags["timeout"] then -- setting it in the config file will kick-in earlier in the process - local timeout = tonumber(flags["timeout"]) - if timeout then - cfg.connection_timeout = timeout - else - die "Argument error: --timeout expects a numeric argument." - end - end - - if flags["version"] then - util.printout(program.." "..cfg.program_version) - util.printout(program_description) - util.printout() - os.exit(cfg.errorcodes.OK) - elseif flags["help"] or #nonflags == 0 then - command = "help" - else - command = table.remove(nonflags, 1) - end - command = command:gsub("-", "_") - - if cfg.local_by_default then - flags["local"] = true - end - - if flags["deps-mode"] and not deps.check_deps_mode_flag(flags["deps-mode"]) then - die("Invalid entry for --deps-mode.") - end - - if flags["branch"] then - cfg.branch = flags["branch"] - end - - if flags["tree"] then - local named = false - for _, tree in ipairs(cfg.rocks_trees) do - if type(tree) == "table" and flags["tree"] == tree.name then - if not tree.root then - die("Configuration error: tree '"..tree.name.."' has no 'root' field.") - end - replace_tree(flags, tree.root) - named = true - break - end - end - if not named then - local root_dir = fs.absolute_name(flags["tree"]) - replace_tree(flags, root_dir) - end - elseif flags["local"] then - if not cfg.home_tree then - die("The --local flag is meant for operating in a user's home directory.\n".. - "You are running as a superuser, which is intended for system-wide operation.\n".. - "To force using the superuser's home, use --tree explicitly.") - end - replace_tree(flags, cfg.home_tree) - else - local trees = cfg.rocks_trees - path.use_tree(trees[#trees]) - end - - if type(cfg.root_dir) == "string" then - cfg.root_dir = cfg.root_dir:gsub("/+$", "") - else - cfg.root_dir.root = cfg.root_dir.root:gsub("/+$", "") - end - cfg.rocks_dir = cfg.rocks_dir:gsub("/+$", "") - cfg.deploy_bin_dir = cfg.deploy_bin_dir:gsub("/+$", "") - cfg.deploy_lua_dir = cfg.deploy_lua_dir:gsub("/+$", "") - cfg.deploy_lib_dir = cfg.deploy_lib_dir:gsub("/+$", "") - - cfg.variables.ROCKS_TREE = cfg.rocks_dir - cfg.variables.SCRIPTS_DIR = cfg.deploy_bin_dir - - if flags["server"] then - local protocol, path = dir.split_url(flags["server"]) - table.insert(cfg.rocks_servers, 1, protocol.."://"..path) - end - - if flags["only-server"] then - cfg.rocks_servers = { flags["only-server"] } - end - - if flags["only-sources"] then - cfg.only_sources_from = flags["only-sources"] - end - - if command ~= "help" then - for k, v in pairs(cmdline_vars) do - cfg.variables[k] = v - end - end - - if not fs.current_dir() or fs.current_dir() == "" then - die("Current directory does not exist. Please run LuaRocks from an existing directory.") - end - - if commands[command] then - local cmd = require(commands[command]) - local call_ok, ok, err, exitcode = xpcall(function() return cmd.command(flags, unpack(nonflags)) end, error_handler) - if not call_ok then - die(ok, cfg.errorcodes.CRASH) - elseif not ok then - die(err, exitcode) - end - else - die("Unknown command: "..command) - end - util.run_scheduled_functions() -end - -return command_line diff --git a/Utils/luarocks/lua/luarocks/config_cmd.lua b/Utils/luarocks/lua/luarocks/config_cmd.lua deleted file mode 100644 index fe3cc637d..000000000 --- a/Utils/luarocks/lua/luarocks/config_cmd.lua +++ /dev/null @@ -1,72 +0,0 @@ ---- Module implementing the LuaRocks "config" command. --- Queries information about the LuaRocks configuration. -local config_cmd = {} - -local cfg = require("luarocks.cfg") -local util = require("luarocks.util") -local dir = require("luarocks.dir") - -util.add_run_function(config_cmd) -config_cmd.help_summary = "Query information about the LuaRocks configuration." -config_cmd.help_arguments = "" -config_cmd.help = [[ ---lua-incdir Path to Lua header files. - ---lua-libdir Path to Lua library files. - ---lua-ver Lua version (in major.minor format). e.g. 5.1 - ---system-config Location of the system config file. - ---user-config Location of the user config file. - ---rock-trees Rocks trees in use. First the user tree, then the system tree. -]] - -local function config_file(conf) - print(dir.normalize(conf.file)) - if conf.ok then - return true - else - return nil, "file not found" - end -end - ---- Driver function for "config" command. --- @return boolean: True if succeeded, nil on errors. -function config_cmd.command(flags) - if flags["lua-incdir"] then - print(cfg.variables.LUA_INCDIR) - return true - end - if flags["lua-libdir"] then - print(cfg.variables.LUA_LIBDIR) - return true - end - if flags["lua-ver"] then - print(cfg.lua_version) - return true - end - local conf = cfg.which_config() - if flags["system-config"] then - return config_file(conf.system) - end - if flags["user-config"] then - return config_file(conf.user) - end - if flags["rock-trees"] then - for _, tree in ipairs(cfg.rocks_trees) do - if type(tree) == "string" then - util.printout(dir.normalize(tree)) - else - local name = tree.name and "\t"..tree.name or "" - util.printout(dir.normalize(tree.root)..name) - end - end - return true - end - - return nil, "Please provide a flag for querying configuration values. "..util.see_help("config") -end - -return config_cmd diff --git a/Utils/luarocks/lua/luarocks/deps.lua b/Utils/luarocks/lua/luarocks/deps.lua deleted file mode 100644 index dcebec9b2..000000000 --- a/Utils/luarocks/lua/luarocks/deps.lua +++ /dev/null @@ -1,752 +0,0 @@ - ---- Dependency handling functions. --- Dependencies are represented in LuaRocks through strings with --- a package name followed by a comma-separated list of constraints. --- Each constraint consists of an operator and a version number. --- In this string format, version numbers are represented as --- naturally as possible, like they are used by upstream projects --- (e.g. "2.0beta3"). Internally, LuaRocks converts them to a purely --- numeric representation, allowing comparison following some --- "common sense" heuristics. The precise specification of the --- comparison criteria is the source code of this module, but the --- test/test_deps.lua file included with LuaRocks provides some --- insights on what these criteria are. -local deps = {} -package.loaded["luarocks.deps"] = deps - -local cfg = require("luarocks.cfg") -local manif_core = require("luarocks.manif_core") -local path = require("luarocks.path") -local dir = require("luarocks.dir") -local util = require("luarocks.util") - -local operators = { - ["=="] = "==", - ["~="] = "~=", - [">"] = ">", - ["<"] = "<", - [">="] = ">=", - ["<="] = "<=", - ["~>"] = "~>", - -- plus some convenience translations - [""] = "==", - ["="] = "==", - ["!="] = "~=" -} - -local deltas = { - scm = 1100, - cvs = 1000, - rc = -1000, - pre = -10000, - beta = -100000, - alpha = -1000000 -} - -local version_mt = { - --- Equality comparison for versions. - -- All version numbers must be equal. - -- If both versions have revision numbers, they must be equal; - -- otherwise the revision number is ignored. - -- @param v1 table: version table to compare. - -- @param v2 table: version table to compare. - -- @return boolean: true if they are considered equivalent. - __eq = function(v1, v2) - if #v1 ~= #v2 then - return false - end - for i = 1, #v1 do - if v1[i] ~= v2[i] then - return false - end - end - if v1.revision and v2.revision then - return (v1.revision == v2.revision) - end - return true - end, - --- Size comparison for versions. - -- All version numbers are compared. - -- If both versions have revision numbers, they are compared; - -- otherwise the revision number is ignored. - -- @param v1 table: version table to compare. - -- @param v2 table: version table to compare. - -- @return boolean: true if v1 is considered lower than v2. - __lt = function(v1, v2) - for i = 1, math.max(#v1, #v2) do - local v1i, v2i = v1[i] or 0, v2[i] or 0 - if v1i ~= v2i then - return (v1i < v2i) - end - end - if v1.revision and v2.revision then - return (v1.revision < v2.revision) - end - return false - end -} - -local version_cache = {} -setmetatable(version_cache, { - __mode = "kv" -}) - ---- Parse a version string, converting to table format. --- A version table contains all components of the version string --- converted to numeric format, stored in the array part of the table. --- If the version contains a revision, it is stored numerically --- in the 'revision' field. The original string representation of --- the string is preserved in the 'string' field. --- Returned version tables use a metatable --- allowing later comparison through relational operators. --- @param vstring string: A version number in string format. --- @return table or nil: A version table or nil --- if the input string contains invalid characters. -function deps.parse_version(vstring) - if not vstring then return nil end - assert(type(vstring) == "string") - - local cached = version_cache[vstring] - if cached then - return cached - end - - local version = {} - local i = 1 - - local function add_token(number) - version[i] = version[i] and version[i] + number/100000 or number - i = i + 1 - end - - -- trim leading and trailing spaces - vstring = vstring:match("^%s*(.*)%s*$") - version.string = vstring - -- store revision separately if any - local main, revision = vstring:match("(.*)%-(%d+)$") - if revision then - vstring = main - version.revision = tonumber(revision) - end - while #vstring > 0 do - -- extract a number - local token, rest = vstring:match("^(%d+)[%.%-%_]*(.*)") - if token then - add_token(tonumber(token)) - else - -- extract a word - token, rest = vstring:match("^(%a+)[%.%-%_]*(.*)") - if not token then - util.printerr("Warning: version number '"..vstring.."' could not be parsed.") - version[i] = 0 - break - end - version[i] = deltas[token] or (token:byte() / 1000) - end - vstring = rest - end - setmetatable(version, version_mt) - version_cache[vstring] = version - return version -end - ---- Utility function to compare version numbers given as strings. --- @param a string: one version. --- @param b string: another version. --- @return boolean: True if a > b. -function deps.compare_versions(a, b) - return deps.parse_version(a) > deps.parse_version(b) -end - ---- Consumes a constraint from a string, converting it to table format. --- For example, a string ">= 1.0, > 2.0" is converted to a table in the --- format {op = ">=", version={1,0}} and the rest, "> 2.0", is returned --- back to the caller. --- @param input string: A list of constraints in string format. --- @return (table, string) or nil: A table representing the same --- constraints and the string with the unused input, or nil if the --- input string is invalid. -local function parse_constraint(input) - assert(type(input) == "string") - - local no_upgrade, op, version, rest = input:match("^(@?)([<>=~!]*)%s*([%w%.%_%-]+)[%s,]*(.*)") - local _op = operators[op] - version = deps.parse_version(version) - if not _op then - return nil, "Encountered bad constraint operator: '"..tostring(op).."' in '"..input.."'" - end - if not version then - return nil, "Could not parse version from constraint: '"..input.."'" - end - return { op = _op, version = version, no_upgrade = no_upgrade=="@" and true or nil }, rest -end - ---- Convert a list of constraints from string to table format. --- For example, a string ">= 1.0, < 2.0" is converted to a table in the format --- {{op = ">=", version={1,0}}, {op = "<", version={2,0}}}. --- Version tables use a metatable allowing later comparison through --- relational operators. --- @param input string: A list of constraints in string format. --- @return table or nil: A table representing the same constraints, --- or nil if the input string is invalid. -function deps.parse_constraints(input) - assert(type(input) == "string") - - local constraints, constraint, oinput = {}, nil, input - while #input > 0 do - constraint, input = parse_constraint(input) - if constraint then - table.insert(constraints, constraint) - else - return nil, "Failed to parse constraint '"..tostring(oinput).."' with error: ".. input - end - end - return constraints -end - ---- Convert a dependency from string to table format. --- For example, a string "foo >= 1.0, < 2.0" --- is converted to a table in the format --- {name = "foo", constraints = {{op = ">=", version={1,0}}, --- {op = "<", version={2,0}}}}. Version tables use a metatable --- allowing later comparison through relational operators. --- @param dep string: A dependency in string format --- as entered in rockspec files. --- @return table or nil: A table representing the same dependency relation, --- or nil if the input string is invalid. -function deps.parse_dep(dep) - assert(type(dep) == "string") - - local name, rest = dep:match("^%s*([a-zA-Z0-9][a-zA-Z0-9%.%-%_]*)%s*(.*)") - if not name then return nil, "failed to extract dependency name from '"..tostring(dep).."'" end - local constraints, err = deps.parse_constraints(rest) - if not constraints then return nil, err end - return { name = name, constraints = constraints } -end - ---- Convert a version table to a string. --- @param v table: The version table --- @param internal boolean or nil: Whether to display versions in their --- internal representation format or how they were specified. --- @return string: The dependency information pretty-printed as a string. -function deps.show_version(v, internal) - assert(type(v) == "table") - assert(type(internal) == "boolean" or not internal) - - return (internal - and table.concat(v, ":")..(v.revision and tostring(v.revision) or "") - or v.string) -end - ---- Convert a dependency in table format to a string. --- @param dep table: The dependency in table format --- @param internal boolean or nil: Whether to display versions in their --- internal representation format or how they were specified. --- @return string: The dependency information pretty-printed as a string. -function deps.show_dep(dep, internal) - assert(type(dep) == "table") - assert(type(internal) == "boolean" or not internal) - - if #dep.constraints > 0 then - local pretty = {} - for _, c in ipairs(dep.constraints) do - table.insert(pretty, c.op .. " " .. deps.show_version(c.version, internal)) - end - return dep.name.." "..table.concat(pretty, ", ") - else - return dep.name - end -end - ---- A more lenient check for equivalence between versions. --- This returns true if the requested components of a version --- match and ignore the ones that were not given. For example, --- when requesting "2", then "2", "2.1", "2.3.5-9"... all match. --- When requesting "2.1", then "2.1", "2.1.3" match, but "2.2" --- doesn't. --- @param version string or table: Version to be tested; may be --- in string format or already parsed into a table. --- @param requested string or table: Version requested; may be --- in string format or already parsed into a table. --- @return boolean: True if the tested version matches the requested --- version, false otherwise. -local function partial_match(version, requested) - assert(type(version) == "string" or type(version) == "table") - assert(type(requested) == "string" or type(version) == "table") - - if type(version) ~= "table" then version = deps.parse_version(version) end - if type(requested) ~= "table" then requested = deps.parse_version(requested) end - if not version or not requested then return false end - - for i, ri in ipairs(requested) do - local vi = version[i] or 0 - if ri ~= vi then return false end - end - if requested.revision then - return requested.revision == version.revision - end - return true -end - ---- Check if a version satisfies a set of constraints. --- @param version table: A version in table format --- @param constraints table: An array of constraints in table format. --- @return boolean: True if version satisfies all constraints, --- false otherwise. -function deps.match_constraints(version, constraints) - assert(type(version) == "table") - assert(type(constraints) == "table") - local ok = true - setmetatable(version, version_mt) - for _, constr in pairs(constraints) do - if type(constr.version) == "string" then - constr.version = deps.parse_version(constr.version) - end - local constr_version, constr_op = constr.version, constr.op - setmetatable(constr_version, version_mt) - if constr_op == "==" then ok = version == constr_version - elseif constr_op == "~=" then ok = version ~= constr_version - elseif constr_op == ">" then ok = version > constr_version - elseif constr_op == "<" then ok = version < constr_version - elseif constr_op == ">=" then ok = version >= constr_version - elseif constr_op == "<=" then ok = version <= constr_version - elseif constr_op == "~>" then ok = partial_match(version, constr_version) - end - if not ok then break end - end - return ok -end - ---- Attempt to match a dependency to an installed rock. --- @param dep table: A dependency parsed in table format. --- @param blacklist table: Versions that can't be accepted. Table where keys --- are program versions and values are 'true'. --- @return string or nil: latest installed version of the rock matching the dependency --- or nil if it could not be matched. -local function match_dep(dep, blacklist, deps_mode) - assert(type(dep) == "table") - - local versions - if cfg.rocks_provided[dep.name] then - -- provided rocks have higher priority than manifest's rocks - versions = { cfg.rocks_provided[dep.name] } - else - versions = manif_core.get_versions(dep.name, deps_mode) - end - - local latest_version - for _, vstring in ipairs(versions) do - if not blacklist or not blacklist[vstring] then - local version = deps.parse_version(vstring) - if deps.match_constraints(version, dep.constraints) then - if not latest_version or version > latest_version then - latest_version = version - end - end - end - end - - return latest_version and latest_version.string -end - ---- Attempt to match dependencies of a rockspec to installed rocks. --- @param rockspec table: The rockspec loaded as a table. --- @param blacklist table or nil: Program versions to not use as valid matches. --- Table where keys are program names and values are tables where keys --- are program versions and values are 'true'. --- @return table, table, table: A table where keys are dependencies parsed --- in table format and values are tables containing fields 'name' and --- version' representing matches; a table of missing dependencies --- parsed as tables; and a table of "no-upgrade" missing dependencies --- (to be used in plugin modules so that a plugin does not force upgrade of --- its parent application). -function deps.match_deps(rockspec, blacklist, deps_mode) - assert(type(rockspec) == "table") - assert(type(blacklist) == "table" or not blacklist) - local matched, missing, no_upgrade = {}, {}, {} - - for _, dep in ipairs(rockspec.dependencies) do - local found = match_dep(dep, blacklist and blacklist[dep.name] or nil, deps_mode) - if found then - if not cfg.rocks_provided[dep.name] then - matched[dep] = {name = dep.name, version = found} - end - else - if dep.constraints[1] and dep.constraints[1].no_upgrade then - no_upgrade[dep.name] = dep - else - missing[dep.name] = dep - end - end - end - return matched, missing, no_upgrade -end - ---- Return a set of values of a table. --- @param tbl table: The input table. --- @return table: The array of keys. -local function values_set(tbl) - local set = {} - for _, v in pairs(tbl) do - set[v] = true - end - return set -end - -local function rock_status(name, deps_mode) - local search = require("luarocks.search") - local installed = match_dep(search.make_query(name), nil, deps_mode) - local installation_type = cfg.rocks_provided[name] and "provided by VM" or "installed" - return installed and installed.." "..installation_type or "not installed" -end - ---- Check depenendencies of a package and report any missing ones. --- @param name string: package name. --- @param version string: package version. --- @param dependencies table: array of dependencies. --- @param deps_mode string: Which trees to check dependencies for: --- "one" for the current default tree, "all" for all trees, --- "order" for all trees with priority >= the current default, "none" for no trees. -function deps.report_missing_dependencies(name, version, dependencies, deps_mode) - local first_missing_dep = true - - for _, dep in ipairs(dependencies) do - if not match_dep(dep, nil, deps_mode) then - if first_missing_dep then - util.printout(("Missing dependencies for %s %s:"):format(name, version)) - first_missing_dep = false - end - - util.printout((" %s (%s)"):format(deps.show_dep(dep), rock_status(dep.name, deps_mode))) - end - end -end - ---- Check dependencies of a rock and attempt to install any missing ones. --- Packages are installed using the LuaRocks "install" command. --- Aborts the program if a dependency could not be fulfilled. --- @param rockspec table: A rockspec in table format. --- @return boolean or (nil, string, [string]): True if no errors occurred, or --- nil and an error message if any test failed, followed by an optional --- error code. -function deps.fulfill_dependencies(rockspec, deps_mode) - - local search = require("luarocks.search") - local install = require("luarocks.install") - - if rockspec.supported_platforms then - if not deps.platforms_set then - deps.platforms_set = values_set(cfg.platforms) - end - local supported = nil - for _, plat in pairs(rockspec.supported_platforms) do - local neg, plat = plat:match("^(!?)(.*)") - if neg == "!" then - if deps.platforms_set[plat] then - return nil, "This rockspec for "..rockspec.package.." does not support "..plat.." platforms." - end - else - if deps.platforms_set[plat] then - supported = true - else - if supported == nil then - supported = false - end - end - end - end - if supported == false then - local plats = table.concat(cfg.platforms, ", ") - return nil, "This rockspec for "..rockspec.package.." does not support "..plats.." platforms." - end - end - - deps.report_missing_dependencies(rockspec.name, rockspec.version, rockspec.dependencies, deps_mode) - - local first_missing_dep = true - - for _, dep in ipairs(rockspec.dependencies) do - if not match_dep(dep, nil, deps_mode) then - if first_missing_dep then - util.printout() - first_missing_dep = false - end - - util.printout(("%s %s depends on %s (%s)"):format( - rockspec.name, rockspec.version, deps.show_dep(dep), rock_status(dep.name, deps_mode))) - - if dep.constraints[1] and dep.constraints[1].no_upgrade then - util.printerr("This version of "..rockspec.name.." is designed for use with") - util.printerr(deps.show_dep(dep)..", but is configured to avoid upgrading it") - util.printerr("automatically. Please upgrade "..dep.name.." with") - util.printerr(" luarocks install "..dep.name) - util.printerr("or choose an older version of "..rockspec.name.." with") - util.printerr(" luarocks search "..rockspec.name) - return nil, "Failed matching dependencies" - end - - local url, search_err = search.find_suitable_rock(dep) - if not url then - return nil, "Could not satisfy dependency "..deps.show_dep(dep)..": "..search_err - end - util.printout("Installing "..url) - local ok, install_err, errcode = install.command({deps_mode = deps_mode}, url) - if not ok then - return nil, "Failed installing dependency: "..url.." - "..install_err, errcode - end - end - end - - return true -end - ---- If filename matches a pattern, return the capture. --- For example, given "libfoo.so" and "lib?.so" is a pattern, --- returns "foo" (which can then be used to build names --- based on other patterns. --- @param file string: a filename --- @param pattern string: a pattern, where ? is to be matched by the filename. --- @return string The pattern, if found, or nil. -local function deconstruct_pattern(file, pattern) - local depattern = "^"..(pattern:gsub("%.", "%%."):gsub("%*", ".*"):gsub("?", "(.*)")).."$" - return (file:match(depattern)) -end - ---- Construct all possible patterns for a name and add to the files array. --- Run through the patterns array replacing all occurrences of "?" --- with the given file name and store them in the files array. --- @param file string A raw name (e.g. "foo") --- @param array of string An array of patterns with "?" as the wildcard --- (e.g. {"?.so", "lib?.so"}) --- @param files The array of constructed names -local function add_all_patterns(file, patterns, files) - for _, pattern in ipairs(patterns) do - table.insert(files, (pattern:gsub("?", file))) - end -end - ---- Set up path-related variables for external dependencies. --- For each key in the external_dependencies table in the --- rockspec file, four variables are created: _DIR, _BINDIR, --- _INCDIR and _LIBDIR. These are not overwritten --- if already set (e.g. by the LuaRocks config file or through the --- command-line). Values in the external_dependencies table --- are tables that may contain a "header" or a "library" field, --- with filenames to be tested for existence. --- @param rockspec table: The rockspec table. --- @param mode string: if "build" is given, checks all files; --- if "install" is given, do not scan for headers. --- @return boolean or (nil, string): True if no errors occurred, or --- nil and an error message if any test failed. -function deps.check_external_deps(rockspec, mode) - assert(type(rockspec) == "table") - - local fs = require("luarocks.fs") - - local vars = rockspec.variables - local patterns = cfg.external_deps_patterns - local subdirs = cfg.external_deps_subdirs - if mode == "install" then - patterns = cfg.runtime_external_deps_patterns - subdirs = cfg.runtime_external_deps_subdirs - end - if rockspec.external_dependencies then - for name, ext_files in util.sortedpairs(rockspec.external_dependencies) do - local ok = true - local failed_files = {program = {}, header = {}, library = {}} - local failed_dirname - local failed_testfile - for _, extdir in ipairs(cfg.external_deps_dirs) do - ok = true - local prefix = vars[name.."_DIR"] - local dirs = { - BINDIR = { subdir = subdirs.bin, testfile = "program", pattern = patterns.bin }, - INCDIR = { subdir = subdirs.include, testfile = "header", pattern = patterns.include }, - LIBDIR = { subdir = subdirs.lib, testfile = "library", pattern = patterns.lib } - } - if mode == "install" then - dirs.INCDIR = nil - end - if not prefix then - prefix = extdir - end - if type(prefix) == "table" then - if prefix.bin then - dirs.BINDIR.subdir = prefix.bin - end - if prefix.include then - if dirs.INCDIR then - dirs.INCDIR.subdir = prefix.include - end - end - if prefix.lib then - dirs.LIBDIR.subdir = prefix.lib - end - prefix = prefix.prefix - end - for dirname, dirdata in util.sortedpairs(dirs) do - local paths - local path_var_value = vars[name.."_"..dirname] - if path_var_value then - paths = { path_var_value } - elseif type(dirdata.subdir) == "table" then - paths = {} - for i,v in ipairs(dirdata.subdir) do - paths[i] = dir.path(prefix, v) - end - else - paths = { dir.path(prefix, dirdata.subdir) } - end - dirdata.dir = paths[1] - local file = ext_files[dirdata.testfile] - if file then - local files = {} - if not file:match("%.") then - add_all_patterns(file, dirdata.pattern, files) - else - for _, pattern in ipairs(dirdata.pattern) do - local matched = deconstruct_pattern(file, pattern) - if matched then - add_all_patterns(matched, dirdata.pattern, files) - end - end - table.insert(files, file) - end - local found = false - for _, f in ipairs(files) do - - -- small convenience hack - if f:match("%.so$") or f:match("%.dylib$") or f:match("%.dll$") then - f = f:gsub("%.[^.]+$", "."..cfg.external_lib_extension) - end - - local pattern - if f:match("%*") then - pattern = f:gsub("%.", "%%."):gsub("%*", ".*") - f = "matching "..f - end - - for _, d in ipairs(paths) do - if pattern then - for entry in fs.dir(d) do - if entry:match(pattern) then - found = true - break - end - end - else - found = fs.is_file(dir.path(d, f)) - end - if found then - dirdata.dir = d - break - else - table.insert(failed_files[dirdata.testfile], f.." in "..d) - end - end - if found then - break - end - end - if not found then - ok = false - failed_dirname = dirname - failed_testfile = dirdata.testfile - break - end - end - end - if ok then - for dirname, dirdata in pairs(dirs) do - vars[name.."_"..dirname] = dirdata.dir - end - vars[name.."_DIR"] = prefix - break - end - end - if not ok then - local lines = {"Could not find "..failed_testfile.." file for "..name} - - local failed_paths = {} - for _, failed_file in ipairs(failed_files[failed_testfile]) do - if not failed_paths[failed_file] then - failed_paths[failed_file] = true - table.insert(lines, " No file "..failed_file) - end - end - - table.insert(lines, "You may have to install "..name.." in your system and/or pass "..name.."_DIR or "..name.."_"..failed_dirname.." to the luarocks command.") - table.insert(lines, "Example: luarocks install "..rockspec.name.." "..name.."_DIR=/usr/local") - - return nil, table.concat(lines, "\n"), "dependency" - end - end - end - return true -end - ---- Recursively add satisfied dependencies of a package to a table, --- to build a transitive closure of all dependent packages. --- Additionally ensures that `dependencies` table of the manifest is up-to-date. --- @param results table: The results table being built, maps package names to versions. --- @param manifest table: The manifest table containing dependencies. --- @param name string: Package name. --- @param version string: Package version. -function deps.scan_deps(results, manifest, name, version, deps_mode) - assert(type(results) == "table") - assert(type(manifest) == "table") - assert(type(name) == "string") - assert(type(version) == "string") - - local fetch = require("luarocks.fetch") - - if results[name] then - return - end - if not manifest.dependencies then manifest.dependencies = {} end - local dependencies = manifest.dependencies - if not dependencies[name] then dependencies[name] = {} end - local dependencies_name = dependencies[name] - local deplist = dependencies_name[version] - local rockspec, err - if not deplist then - rockspec, err = fetch.load_local_rockspec(path.rockspec_file(name, version), false) - if not rockspec then - util.printerr("Couldn't load rockspec for "..name.." "..version..": "..err) - return - end - dependencies_name[version] = rockspec.dependencies - else - rockspec = { dependencies = deplist } - end - local matched = deps.match_deps(rockspec, nil, deps_mode) - results[name] = version - for _, match in pairs(matched) do - deps.scan_deps(results, manifest, match.name, match.version, deps_mode) - end -end - -local valid_deps_modes = { - one = true, - order = true, - all = true, - none = true, -} - -function deps.check_deps_mode_flag(flag) - return valid_deps_modes[flag] -end - -function deps.get_deps_mode(flags) - if flags["deps-mode"] then - return flags["deps-mode"] - else - return cfg.deps_mode - end -end - -function deps.deps_mode_to_flag(deps_mode) - return "--deps-mode="..deps_mode -end - -return deps diff --git a/Utils/luarocks/lua/luarocks/dir.lua b/Utils/luarocks/lua/luarocks/dir.lua deleted file mode 100644 index f72ebd6c1..000000000 --- a/Utils/luarocks/lua/luarocks/dir.lua +++ /dev/null @@ -1,74 +0,0 @@ - ---- Generic utilities for handling pathnames. -local dir = {} -package.loaded["luarocks.dir"] = dir - -dir.separator = "/" - ---- Strip the path off a path+filename. --- @param pathname string: A path+name, such as "/a/b/c" --- or "\a\b\c". --- @return string: The filename without its path, such as "c". -function dir.base_name(pathname) - assert(type(pathname) == "string") - - local base = pathname:gsub("[/\\]*$", ""):match(".*[/\\]([^/\\]*)") - return base or pathname -end - ---- Strip the name off a path+filename. --- @param pathname string: A path+name, such as "/a/b/c". --- @return string: The filename without its path, such as "/a/b". --- For entries such as "/a/b/", "/a" is returned. If there are --- no directory separators in input, "" is returned. -function dir.dir_name(pathname) - assert(type(pathname) == "string") - return (pathname:gsub("/*$", ""):match("(.*)[/]+[^/]*")) or "" -end - ---- Describe a path in a cross-platform way. --- Use this function to avoid platform-specific directory --- separators in other modules. Removes trailing slashes from --- each component given, to avoid repeated separators. --- Separators inside strings are kept, to handle URLs containing --- protocols. --- @param ... strings representing directories --- @return string: a string with a platform-specific representation --- of the path. -function dir.path(...) - local t = {...} - while t[1] == "" do - table.remove(t, 1) - end - return (table.concat(t, "/"):gsub("([^:])/+", "%1/"):gsub("^/+", "/"):gsub("/*$", "")) -end - ---- Split protocol and path from an URL or local pathname. --- URLs should be in the "protocol://path" format. --- For local pathnames, "file" is returned as the protocol. --- @param url string: an URL or a local pathname. --- @return string, string: the protocol, and the pathname without the protocol. -function dir.split_url(url) - assert(type(url) == "string") - - local protocol, pathname = url:match("^([^:]*)://(.*)") - if not protocol then - protocol = "file" - pathname = url - end - return protocol, pathname -end - ---- Normalize a url or local path. --- URLs should be in the "protocol://path" format. System independent --- forward slashes are used, removing trailing and double slashes --- @param url string: an URL or a local pathname. --- @return string: Normalized result. -function dir.normalize(name) - local protocol, pathname = dir.split_url(name) - pathname = pathname:gsub("\\", "/"):gsub("(.)/*$", "%1"):gsub("//", "/") - if protocol ~= "file" then pathname = protocol .."://"..pathname end - return pathname -end - -return dir diff --git a/Utils/luarocks/lua/luarocks/doc.lua b/Utils/luarocks/lua/luarocks/doc.lua deleted file mode 100644 index 423ebe027..000000000 --- a/Utils/luarocks/lua/luarocks/doc.lua +++ /dev/null @@ -1,157 +0,0 @@ - ---- Module implementing the LuaRocks "doc" command. --- Shows documentation for an installed rock. -local doc = {} -package.loaded["luarocks.doc"] = doc - -local util = require("luarocks.util") -local search = require("luarocks.search") -local path = require("luarocks.path") -local dir = require("luarocks.dir") -local fetch = require("luarocks.fetch") -local fs = require("luarocks.fs") -local download = require("luarocks.download") - -util.add_run_function(doc) -doc.help_summary = "Show documentation for an installed rock." - -doc.help = [[ - is an existing package name. -Without any flags, tries to load the documentation -using a series of heuristics. -With these flags, return only the desired information: - ---home Open the home page of project. ---list List documentation files only. - -For more information about a rock, see the 'show' command. -]] - -local function show_homepage(homepage, name, version) - if not homepage then - return nil, "No 'homepage' field in rockspec for "..name.." "..version - end - util.printout("Opening "..homepage.." ...") - fs.browser(homepage) - return true -end - -local function try_to_open_homepage(name, version) - local temp_dir, err = fs.make_temp_dir("doc-"..name.."-"..(version or "")) - if not temp_dir then - return nil, "Failed creating temporary directory: "..err - end - util.schedule_function(fs.delete, temp_dir) - local ok, err = fs.change_dir(temp_dir) - if not ok then return nil, err end - local filename, err = download.download("rockspec", name, version) - if not filename then return nil, err end - local rockspec, err = fetch.load_local_rockspec(filename) - if not rockspec then return nil, err end - fs.pop_dir() - local descript = rockspec.description or {} - if not descript.homepage then return nil, "No homepage defined for "..name end - return show_homepage(descript.homepage, name, version) -end - ---- Driver function for "doc" command. --- @param name or nil: an existing package name. --- @param version string or nil: a version may also be passed. --- @return boolean: True if succeeded, nil on errors. -function doc.command(flags, name, version) - if not name then - return nil, "Argument missing. "..util.see_help("doc") - end - - name = name:lower() - - local iname, iversion, repo = search.pick_installed_rock(name, version, flags["tree"]) - if not iname then - util.printout(name..(version and " "..version or "").." is not installed. Looking for it in the rocks servers...") - return try_to_open_homepage(name, version) - end - name, version = iname, iversion - - local rockspec, err = fetch.load_local_rockspec(path.rockspec_file(name, version, repo)) - if not rockspec then return nil,err end - local descript = rockspec.description or {} - - if flags["home"] then - return show_homepage(descript.homepage, name, version) - end - - local directory = path.install_dir(name,version,repo) - - local docdir - local directories = { "doc", "docs" } - for _, d in ipairs(directories) do - local dirname = dir.path(directory, d) - if fs.is_dir(dirname) then - docdir = dirname - break - end - end - if not docdir then - if descript.homepage and not flags["list"] then - util.printout("Local documentation directory not found -- opening "..descript.homepage.." ...") - fs.browser(descript.homepage) - return true - end - return nil, "Documentation directory not found for "..name.." "..version - end - - docdir = dir.normalize(docdir):gsub("/+", "/") - local files = fs.find(docdir) - local htmlpatt = "%.html?$" - local extensions = { htmlpatt, "%.md$", "%.txt$", "%.textile$", "" } - local basenames = { "index", "readme", "manual" } - - local porcelain = flags["porcelain"] - if #files > 0 then - util.title("Documentation files for "..name.." "..version, porcelain) - if porcelain then - for _, file in ipairs(files) do - util.printout(docdir.."/"..file) - end - else - util.printout(docdir.."/") - for _, file in ipairs(files) do - util.printout("\t"..file) - end - end - end - - if flags["list"] then - return true - end - - for _, extension in ipairs(extensions) do - for _, basename in ipairs(basenames) do - local filename = basename..extension - local found - for _, file in ipairs(files) do - if file:lower():match(filename) and ((not found) or #file < #found) then - found = file - end - end - if found then - local pathname = dir.path(docdir, found) - util.printout() - util.printout("Opening "..pathname.." ...") - util.printout() - local ok = fs.browser(pathname) - if not ok and not pathname:match(htmlpatt) then - local fd = io.open(pathname, "r") - util.printout(fd:read("*a")) - fd:close() - end - return true - end - end - end - - return true -end - - -return doc diff --git a/Utils/luarocks/lua/luarocks/download.lua b/Utils/luarocks/lua/luarocks/download.lua deleted file mode 100644 index e434cdbb2..000000000 --- a/Utils/luarocks/lua/luarocks/download.lua +++ /dev/null @@ -1,109 +0,0 @@ - ---- Module implementing the luarocks "download" command. --- Download a rock from the repository. -local download = {} -package.loaded["luarocks.download"] = download - -local util = require("luarocks.util") -local path = require("luarocks.path") -local fetch = require("luarocks.fetch") -local search = require("luarocks.search") -local fs = require("luarocks.fs") -local dir = require("luarocks.dir") -local cfg = require("luarocks.cfg") - -util.add_run_function(download) -download.help_summary = "Download a specific rock file from a rocks server." -download.help_arguments = "[--all] [--arch= | --source | --rockspec] [ []]" - -download.help = [[ ---all Download all files if there are multiple matches. ---source Download .src.rock if available. ---rockspec Download .rockspec if available. ---arch= Download rock for a specific architecture. -]] - -local function get_file(filename) - local protocol, pathname = dir.split_url(filename) - if protocol == "file" then - local ok, err = fs.copy(pathname, fs.current_dir(), cfg.perm_read) - if ok then - return pathname - else - return nil, err - end - else - return fetch.fetch_url(filename) - end -end - -function download.download(arch, name, version, all) - local query = search.make_query(name, version) - if arch then query.arch = arch end - local search_err - - if all then - if name == "" then query.exact_name = false end - local results = search.search_repos(query) - local has_result = false - local all_ok = true - local any_err = "" - for name, result in pairs(results) do - for version, items in pairs(result) do - for _, item in ipairs(items) do - -- Ignore provided rocks. - if item.arch ~= "installed" then - has_result = true - local filename = path.make_url(item.repo, name, version, item.arch) - local ok, err = get_file(filename) - if not ok then - all_ok = false - any_err = any_err .. "\n" .. err - end - end - end - end - end - - if has_result then - return all_ok, any_err - end - else - local url - url, search_err = search.find_suitable_rock(query) - if url then - return get_file(url) - end - end - return nil, "Could not find a result named "..name..(version and " "..version or "").. - (search_err and ": "..search_err or ".") -end - ---- Driver function for the "download" command. --- @param name string: a rock name. --- @param version string or nil: if the name of a package is given, a --- version may also be passed. --- @return boolean or (nil, string): true if successful or nil followed --- by an error message. -function download.command(flags, name, version) - assert(type(version) == "string" or not version) - if type(name) ~= "string" and not flags["all"] then - return nil, "Argument missing. "..util.see_help("download") - end - if not name then name, version = "", "" end - - local arch - - if flags["source"] then - arch = "src" - elseif flags["rockspec"] then - arch = "rockspec" - elseif flags["arch"] then - arch = flags["arch"] - end - - local dl, err = download.download(arch, name:lower(), version, flags["all"]) - return dl and true, err -end - -return download diff --git a/Utils/luarocks/lua/luarocks/fetch.lua b/Utils/luarocks/lua/luarocks/fetch.lua deleted file mode 100644 index 76f366cd2..000000000 --- a/Utils/luarocks/lua/luarocks/fetch.lua +++ /dev/null @@ -1,394 +0,0 @@ - ---- Functions related to fetching and loading local and remote files. -local fetch = {} -package.loaded["luarocks.fetch"] = fetch - -local fs = require("luarocks.fs") -local dir = require("luarocks.dir") -local type_check = require("luarocks.type_check") -local path = require("luarocks.path") -local deps = require("luarocks.deps") -local persist = require("luarocks.persist") -local util = require("luarocks.util") -local cfg = require("luarocks.cfg") - -function fetch.is_basic_protocol(protocol, remote) - return protocol == "http" or protocol == "https" or protocol == "ftp" or (not remote and protocol == "file") -end - ---- Fetch a local or remote file. --- Make a remote or local URL/pathname local, fetching the file if necessary. --- Other "fetch" and "load" functions use this function to obtain files. --- If a local pathname is given, it is returned as a result. --- @param url string: a local pathname or a remote URL. --- @param filename string or nil: this function attempts to detect the --- resulting local filename of the remote file as the basename of the URL; --- if that is not correct (due to a redirection, for example), the local --- filename can be given explicitly as this second argument. --- @return string or (nil, string, [string]): the absolute local pathname for the --- fetched file, or nil and a message in case of errors, followed by --- an optional error code. -function fetch.fetch_url(url, filename, cache) - assert(type(url) == "string") - assert(type(filename) == "string" or not filename) - - local protocol, pathname = dir.split_url(url) - if protocol == "file" then - return fs.absolute_name(pathname) - elseif fetch.is_basic_protocol(protocol, true) then - local ok, name = fs.download(url, filename, cache) - if not ok then - return nil, "Failed downloading "..url..(filename and " - "..filename or ""), "network" - end - return name - else - return nil, "Unsupported protocol "..protocol - end -end - ---- For remote URLs, create a temporary directory and download URL inside it. --- This temporary directory will be deleted on program termination. --- For local URLs, just return the local pathname and its directory. --- @param url string: URL to be downloaded --- @param tmpname string: name pattern to use for avoiding conflicts --- when creating temporary directory. --- @param filename string or nil: local filename of URL to be downloaded, --- in case it can't be inferred from the URL. --- @return (string, string) or (nil, string, [string]): absolute local pathname of --- the fetched file and temporary directory name; or nil and an error message --- followed by an optional error code -function fetch.fetch_url_at_temp_dir(url, tmpname, filename) - assert(type(url) == "string") - assert(type(tmpname) == "string") - assert(type(filename) == "string" or not filename) - filename = filename or dir.base_name(url) - - local protocol, pathname = dir.split_url(url) - if protocol == "file" then - if fs.exists(pathname) then - return pathname, dir.dir_name(fs.absolute_name(pathname)) - else - return nil, "File not found: "..pathname - end - else - local temp_dir, err = fs.make_temp_dir(tmpname) - if not temp_dir then - return nil, "Failed creating temporary directory "..tmpname..": "..err - end - util.schedule_function(fs.delete, temp_dir) - local ok, err = fs.change_dir(temp_dir) - if not ok then return nil, err end - local file, err, errcode = fetch.fetch_url(url, filename) - fs.pop_dir() - if not file then - return nil, "Error fetching file: "..err, errcode - end - return file, temp_dir - end -end - --- Determine base directory of a fetched URL by extracting its --- archive and looking for a directory in the root. --- @param file string: absolute local pathname of the fetched file --- @param temp_dir string: temporary directory in which URL was fetched. --- @param src_url string: URL to use when inferring base directory. --- @param src_dir string or nil: expected base directory (inferred --- from src_url if not given). --- @return (string, string) or (string, nil) or (nil, string): --- The inferred base directory and the one actually found (which may --- be nil if not found), or nil followed by an error message. --- The inferred dir is returned first to avoid confusion with errors, --- because it is never nil. -function fetch.find_base_dir(file, temp_dir, src_url, src_dir) - local ok, err = fs.change_dir(temp_dir) - if not ok then return nil, err end - fs.unpack_archive(file) - local inferred_dir = src_dir or fetch.url_to_base_dir(src_url) - local found_dir = nil - if fs.exists(inferred_dir) then - found_dir = inferred_dir - else - util.printerr("Directory "..inferred_dir.." not found") - local files = fs.list_dir() - if files then - table.sort(files) - for i,filename in ipairs(files) do - if fs.is_dir(filename) then - util.printerr("Found "..filename) - found_dir = filename - break - end - end - end - end - fs.pop_dir() - return inferred_dir, found_dir -end - ---- Obtain a rock and unpack it. --- If a directory is not given, a temporary directory will be created, --- which will be deleted on program termination. --- @param rock_file string: URL or filename of the rock. --- @param dest string or nil: if given, directory will be used as --- a permanent destination. --- @return string or (nil, string, [string]): the directory containing the contents --- of the unpacked rock. -function fetch.fetch_and_unpack_rock(rock_file, dest) - assert(type(rock_file) == "string") - assert(type(dest) == "string" or not dest) - - local name = dir.base_name(rock_file):match("(.*)%.[^.]*%.rock") - - local rock_file, err, errcode = fetch.fetch_url_at_temp_dir(rock_file,"luarocks-rock-"..name) - if not rock_file then - return nil, "Could not fetch rock file: " .. err, errcode - end - - rock_file = fs.absolute_name(rock_file) - local unpack_dir - if dest then - unpack_dir = dest - local ok, err = fs.make_dir(unpack_dir) - if not ok then - return nil, "Failed unpacking rock file: " .. err - end - else - unpack_dir = fs.make_temp_dir(name) - end - if not dest then - util.schedule_function(fs.delete, unpack_dir) - end - local ok, err = fs.change_dir(unpack_dir) - if not ok then return nil, err end - ok = fs.unzip(rock_file) - if not ok then - return nil, "Failed unpacking rock file: " .. rock_file - end - fs.pop_dir() - return unpack_dir -end - -function fetch.url_to_base_dir(url) - -- for extensions like foo.tar.gz, "gz" is stripped first - local known_exts = {} - for _, ext in ipairs{"zip", "git", "tgz", "tar", "gz", "bz2"} do - known_exts[ext] = "" - end - local base = dir.base_name(url) - return (base:gsub("%.([^.]*)$", known_exts):gsub("%.tar", "")) -end - ---- Back-end function that actually loads the local rockspec. --- Performs some validation and postprocessing of the rockspec contents. --- @param filename string: The local filename of the rockspec file. --- @param quick boolean: if true, skips some steps when loading --- rockspec. --- @return table or (nil, string): A table representing the rockspec --- or nil followed by an error message. -function fetch.load_local_rockspec(filename, quick) - assert(type(filename) == "string") - filename = fs.absolute_name(filename) - local rockspec, err = persist.load_into_table(filename) - if not rockspec then - return nil, "Could not load rockspec file "..filename.." ("..err..")" - end - if cfg.branch and (type(rockspec.source) == "table") then - rockspec.source.branch = cfg.branch - end - local globals = err - - if rockspec.rockspec_format then - if deps.compare_versions(rockspec.rockspec_format, type_check.rockspec_format) then - return nil, "Rockspec format "..rockspec.rockspec_format.." is not supported, please upgrade LuaRocks." - end - end - - if not quick then - local ok, err = type_check.type_check_rockspec(rockspec, globals) - if not ok then - return nil, filename..": "..err - end - end - - util.platform_overrides(rockspec.build) - util.platform_overrides(rockspec.dependencies) - util.platform_overrides(rockspec.external_dependencies) - util.platform_overrides(rockspec.source) - util.platform_overrides(rockspec.hooks) - - local basename = dir.base_name(filename) - if basename == "rockspec" then - rockspec.name = rockspec.package:lower() - else - rockspec.name = basename:match("(.*)-[^-]*-[0-9]*") - if not rockspec.name then - return nil, "Expected filename in format 'name-version-revision.rockspec'." - end - end - - local protocol, pathname = dir.split_url(rockspec.source.url) - if fetch.is_basic_protocol(protocol) then - rockspec.source.file = rockspec.source.file or dir.base_name(rockspec.source.url) - end - rockspec.source.protocol, rockspec.source.pathname = protocol, pathname - - -- Temporary compatibility - if rockspec.source.cvs_module then rockspec.source.module = rockspec.source.cvs_module end - if rockspec.source.cvs_tag then rockspec.source.tag = rockspec.source.cvs_tag end - - local name_version = rockspec.package:lower() .. "-" .. rockspec.version - if basename ~= "rockspec" and basename ~= name_version .. ".rockspec" then - return nil, "Inconsistency between rockspec filename ("..basename..") and its contents ("..name_version..".rockspec)." - end - - rockspec.local_filename = filename - local filebase = rockspec.source.file or rockspec.source.url - local base = fetch.url_to_base_dir(filebase) - rockspec.source.dir = rockspec.source.dir - or rockspec.source.module - or ((filebase:match("%.lua$") or filebase:match("%.c$")) and ".") - or base - if rockspec.dependencies then - for i = 1, #rockspec.dependencies do - local parsed, err = deps.parse_dep(rockspec.dependencies[i]) - if not parsed then - return nil, "Parse error processing dependency '"..rockspec.dependencies[i].."': "..tostring(err) - end - rockspec.dependencies[i] = parsed - end - else - rockspec.dependencies = {} - end - if not quick then - path.configure_paths(rockspec) - end - - return rockspec -end - ---- Load a local or remote rockspec into a table. --- This is the entry point for the LuaRocks tools. --- Only the LuaRocks runtime loader should use --- load_local_rockspec directly. --- @param filename string: Local or remote filename of a rockspec. --- @param location string or nil: Where to download. If not given, --- a temporary dir is created. --- @return table or (nil, string, [string]): A table representing the rockspec --- or nil followed by an error message and optional error code. -function fetch.load_rockspec(filename, location) - assert(type(filename) == "string") - - local name - local basename = dir.base_name(filename) - if basename == "rockspec" then - name = "rockspec" - else - name = basename:match("(.*)%.rockspec") - if not name then - return nil, "Filename '"..filename.."' does not look like a rockspec." - end - end - - local err, errcode - if location then - local ok, err = fs.change_dir(location) - if not ok then return nil, err end - filename, err = fetch.fetch_url(filename) - fs.pop_dir() - else - filename, err, errcode = fetch.fetch_url_at_temp_dir(filename,"luarocks-rockspec-"..name) - end - if not filename then - return nil, err, errcode - end - - return fetch.load_local_rockspec(filename) -end - ---- Download sources for building a rock using the basic URL downloader. --- @param rockspec table: The rockspec table --- @param extract boolean: Whether to extract the sources from --- the fetched source tarball or not. --- @param dest_dir string or nil: If set, will extract to the given directory; --- if not given, will extract to a temporary directory. --- @return (string, string) or (nil, string, [string]): The absolute pathname of --- the fetched source tarball and the temporary directory created to --- store it; or nil and an error message and optional error code. -function fetch.get_sources(rockspec, extract, dest_dir) - assert(type(rockspec) == "table") - assert(type(extract) == "boolean") - assert(type(dest_dir) == "string" or not dest_dir) - - local url = rockspec.source.url - local name = rockspec.name.."-"..rockspec.version - local filename = rockspec.source.file - local source_file, store_dir - local ok, err, errcode - if dest_dir then - ok, err = fs.change_dir(dest_dir) - if not ok then return nil, err, "dest_dir" end - source_file, err, errcode = fetch.fetch_url(url, filename) - fs.pop_dir() - store_dir = dest_dir - else - source_file, store_dir, errcode = fetch.fetch_url_at_temp_dir(url, "luarocks-source-"..name, filename) - end - if not source_file then - return nil, err or store_dir, errcode - end - if rockspec.source.md5 then - if not fs.check_md5(source_file, rockspec.source.md5) then - return nil, "MD5 check for "..filename.." has failed.", "md5" - end - end - if extract then - local ok, err = fs.change_dir(store_dir) - if not ok then return nil, err end - ok, err = fs.unpack_archive(rockspec.source.file) - if not ok then return nil, err end - if not fs.exists(rockspec.source.dir) then - return nil, "Directory "..rockspec.source.dir.." not found inside archive "..rockspec.source.file, "source.dir", source_file, store_dir - end - fs.pop_dir() - end - return source_file, store_dir -end - ---- Download sources for building a rock, calling the appropriate protocol method. --- @param rockspec table: The rockspec table --- @param extract boolean: When downloading compressed formats, whether to extract --- the sources from the fetched archive or not. --- @param dest_dir string or nil: If set, will extract to the given directory. --- if not given, will extract to a temporary directory. --- @return (string, string) or (nil, string): The absolute pathname of --- the fetched source tarball and the temporary directory created to --- store it; or nil and an error message. -function fetch.fetch_sources(rockspec, extract, dest_dir) - assert(type(rockspec) == "table") - assert(type(extract) == "boolean") - assert(type(dest_dir) == "string" or not dest_dir) - - local protocol = rockspec.source.protocol - local ok, proto - if fetch.is_basic_protocol(protocol) then - proto = fetch - else - ok, proto = pcall(require, "luarocks.fetch."..protocol:gsub("[+-]", "_")) - if not ok then - return nil, "Unknown protocol "..protocol - end - end - - if cfg.only_sources_from - and rockspec.source.pathname - and #rockspec.source.pathname > 0 then - if #cfg.only_sources_from == 0 then - return nil, "Can't download "..rockspec.source.url.." -- download from remote servers disabled" - elseif rockspec.source.pathname:find(cfg.only_sources_from, 1, true) ~= 1 then - return nil, "Can't download "..rockspec.source.url.." -- only downloading from "..cfg.only_sources_from - end - end - return proto.get_sources(rockspec, extract, dest_dir) -end - -return fetch diff --git a/Utils/luarocks/lua/luarocks/fetch/cvs.lua b/Utils/luarocks/lua/luarocks/fetch/cvs.lua deleted file mode 100644 index ece711b6f..000000000 --- a/Utils/luarocks/lua/luarocks/fetch/cvs.lua +++ /dev/null @@ -1,55 +0,0 @@ - ---- Fetch back-end for retrieving sources from CVS. -local cvs = {} - -local unpack = unpack or table.unpack - -local fs = require("luarocks.fs") -local dir = require("luarocks.dir") -local util = require("luarocks.util") - ---- Download sources for building a rock, using CVS. --- @param rockspec table: The rockspec table --- @param extract boolean: Unused in this module (required for API purposes.) --- @param dest_dir string or nil: If set, will extract to the given directory. --- @return (string, string) or (nil, string): The absolute pathname of --- the fetched source tarball and the temporary directory created to --- store it; or nil and an error message. -function cvs.get_sources(rockspec, extract, dest_dir) - assert(type(rockspec) == "table") - assert(type(dest_dir) == "string" or not dest_dir) - - local cvs_cmd = rockspec.variables.CVS - local ok, err_msg = fs.is_tool_available(cvs_cmd, "CVS") - if not ok then - return nil, err_msg - end - - local name_version = rockspec.name .. "-" .. rockspec.version - local module = rockspec.source.module or dir.base_name(rockspec.source.url) - local command = {cvs_cmd, "-d"..rockspec.source.pathname, "export", module} - if rockspec.source.tag then - table.insert(command, 4, "-r") - table.insert(command, 5, rockspec.source.tag) - end - local store_dir - if not dest_dir then - store_dir = fs.make_temp_dir(name_version) - if not store_dir then - return nil, "Failed creating temporary directory." - end - util.schedule_function(fs.delete, store_dir) - else - store_dir = dest_dir - end - local ok, err = fs.change_dir(store_dir) - if not ok then return nil, err end - if not fs.execute(unpack(command)) then - return nil, "Failed fetching files from CVS." - end - fs.pop_dir() - return module, store_dir -end - - -return cvs diff --git a/Utils/luarocks/lua/luarocks/fetch/git.lua b/Utils/luarocks/lua/luarocks/fetch/git.lua deleted file mode 100644 index f61d89e9c..000000000 --- a/Utils/luarocks/lua/luarocks/fetch/git.lua +++ /dev/null @@ -1,92 +0,0 @@ - ---- Fetch back-end for retrieving sources from GIT. -local git = {} - -local unpack = unpack or table.unpack - -local fs = require("luarocks.fs") -local dir = require("luarocks.dir") -local util = require("luarocks.util") - ---- Git >= 1.7.10 can clone a branch **or tag**, < 1.7.10 by branch only. We --- need to know this in order to build the appropriate command; if we can't --- clone by tag then we'll have to issue a subsequent command to check out the --- given tag. --- @return boolean: Whether Git can clone by tag. -local function git_can_clone_by_tag(git_cmd) - local version_string = io.popen(fs.Q(git_cmd)..' --version'):read() - local major, minor, tiny = version_string:match('(%d-)%.(%d+)%.?(%d*)') - major, minor, tiny = tonumber(major), tonumber(minor), tonumber(tiny) or 0 - local value = major > 1 or (major == 1 and (minor > 7 or (minor == 7 and tiny >= 10))) - git_can_clone_by_tag = function() return value end - return value -end - ---- Download sources for building a rock, using git. --- @param rockspec table: The rockspec table --- @param extract boolean: Unused in this module (required for API purposes.) --- @param dest_dir string or nil: If set, will extract to the given directory. --- @return (string, string) or (nil, string): The absolute pathname of --- the fetched source tarball and the temporary directory created to --- store it; or nil and an error message. -function git.get_sources(rockspec, extract, dest_dir, depth) - assert(type(rockspec) == "table") - assert(type(dest_dir) == "string" or not dest_dir) - - local git_cmd = rockspec.variables.GIT - local name_version = rockspec.name .. "-" .. rockspec.version - local module = dir.base_name(rockspec.source.url) - -- Strip off .git from base name if present - module = module:gsub("%.git$", "") - - local ok, err_msg = fs.is_tool_available(git_cmd, "Git") - if not ok then - return nil, err_msg - end - - local store_dir - if not dest_dir then - store_dir = fs.make_temp_dir(name_version) - if not store_dir then - return nil, "Failed creating temporary directory." - end - util.schedule_function(fs.delete, store_dir) - else - store_dir = dest_dir - end - store_dir = fs.absolute_name(store_dir) - local ok, err = fs.change_dir(store_dir) - if not ok then return nil, err end - - local command = {fs.Q(git_cmd), "clone", depth or "--depth=1", rockspec.source.url, module} - local tag_or_branch = rockspec.source.tag or rockspec.source.branch - -- If the tag or branch is explicitly set to "master" in the rockspec, then - -- we can avoid passing it to Git since it's the default. - if tag_or_branch == "master" then tag_or_branch = nil end - if tag_or_branch then - if git_can_clone_by_tag(git_cmd) then - -- The argument to `--branch` can actually be a branch or a tag as of - -- Git 1.7.10. - table.insert(command, 3, "--branch=" .. tag_or_branch) - end - end - if not fs.execute(unpack(command)) then - return nil, "Failed cloning git repository." - end - ok, err = fs.change_dir(module) - if not ok then return nil, err end - if tag_or_branch and not git_can_clone_by_tag() then - local checkout_command = {fs.Q(git_cmd), "checkout", tag_or_branch} - if not fs.execute(unpack(checkout_command)) then - return nil, 'Failed to check out the "' .. tag_or_branch ..'" tag or branch.' - end - end - - fs.delete(dir.path(store_dir, module, ".git")) - fs.delete(dir.path(store_dir, module, ".gitignore")) - fs.pop_dir() - fs.pop_dir() - return module, store_dir -end - -return git diff --git a/Utils/luarocks/lua/luarocks/fetch/git_file.lua b/Utils/luarocks/lua/luarocks/fetch/git_file.lua deleted file mode 100644 index 8d46bbca3..000000000 --- a/Utils/luarocks/lua/luarocks/fetch/git_file.lua +++ /dev/null @@ -1,19 +0,0 @@ - ---- Fetch back-end for retrieving sources from local Git repositories. -local git_file = {} - -local git = require("luarocks.fetch.git") - ---- Fetch sources for building a rock from a local Git repository. --- @param rockspec table: The rockspec table --- @param extract boolean: Unused in this module (required for API purposes.) --- @param dest_dir string or nil: If set, will extract to the given directory. --- @return (string, string) or (nil, string): The absolute pathname of --- the fetched source tarball and the temporary directory created to --- store it; or nil and an error message. -function git_file.get_sources(rockspec, extract, dest_dir) - rockspec.source.url = rockspec.source.url:gsub("^git.file://", "") - return git.get_sources(rockspec, extract, dest_dir) -end - -return git_file diff --git a/Utils/luarocks/lua/luarocks/fetch/git_http.lua b/Utils/luarocks/lua/luarocks/fetch/git_http.lua deleted file mode 100644 index d85e2572d..000000000 --- a/Utils/luarocks/lua/luarocks/fetch/git_http.lua +++ /dev/null @@ -1,26 +0,0 @@ - ---- Fetch back-end for retrieving sources from Git repositories --- that use http:// transport. For example, for fetching a repository --- that requires the following command line: --- `git clone http://example.com/foo.git` --- you can use this in the rockspec: --- source = { url = "git+http://example.com/foo.git" } --- Prefer using the normal git:// fetch mode as it is more widely --- available in older versions of LuaRocks. -local git_http = {} - -local git = require("luarocks.fetch.git") - ---- Fetch sources for building a rock from a local Git repository. --- @param rockspec table: The rockspec table --- @param extract boolean: Unused in this module (required for API purposes.) --- @param dest_dir string or nil: If set, will extract to the given directory. --- @return (string, string) or (nil, string): The absolute pathname of --- the fetched source tarball and the temporary directory created to --- store it; or nil and an error message. -function git_http.get_sources(rockspec, extract, dest_dir) - rockspec.source.url = rockspec.source.url:gsub("^git.", "") - return git.get_sources(rockspec, extract, dest_dir, "--") -end - -return git_http diff --git a/Utils/luarocks/lua/luarocks/fetch/git_https.lua b/Utils/luarocks/lua/luarocks/fetch/git_https.lua deleted file mode 100644 index 67f8ad6cc..000000000 --- a/Utils/luarocks/lua/luarocks/fetch/git_https.lua +++ /dev/null @@ -1,7 +0,0 @@ ---- Fetch back-end for retrieving sources from Git repositories --- that use https:// transport. For example, for fetching a repository --- that requires the following command line: --- `git clone https://example.com/foo.git` --- you can use this in the rockspec: --- source = { url = "git+https://example.com/foo.git" } -return require "luarocks.fetch.git_http" diff --git a/Utils/luarocks/lua/luarocks/fetch/git_ssh.lua b/Utils/luarocks/lua/luarocks/fetch/git_ssh.lua deleted file mode 100644 index 0c2c0750f..000000000 --- a/Utils/luarocks/lua/luarocks/fetch/git_ssh.lua +++ /dev/null @@ -1,32 +0,0 @@ ---- Fetch back-end for retrieving sources from Git repositories --- that use ssh:// transport. For example, for fetching a repository --- that requires the following command line: --- `git clone ssh://git@example.com/path/foo.git --- you can use this in the rockspec: --- source = { url = "git+ssh://git@example.com/path/foo.git" } --- It also handles scp-style ssh urls: git@example.com:path/foo.git, --- but you have to prepend the "git+ssh://" and why not use the "newer" --- style anyway? -local git_ssh = {} - -local git = require("luarocks.fetch.git") - ---- Fetch sources for building a rock from a local Git repository. --- @param rockspec table: The rockspec table --- @param extract boolean: Unused in this module (required for API purposes.) --- @param dest_dir string or nil: If set, will extract to the given directory. --- @return (string, string) or (nil, string): The absolute pathname of --- the fetched source tarball and the temporary directory created to --- store it; or nil and an error message. -function git_ssh.get_sources(rockspec, extract, dest_dir) - rockspec.source.url = rockspec.source.url:gsub("^git.", "") - - -- Handle old-style scp-like git ssh urls - if rockspec.source.url:match("^ssh://[^/]+:[^%d]") then - rockspec.source.url = rockspec.source.url:gsub("^ssh://", "") - end - - return git.get_sources(rockspec, extract, dest_dir, "--") -end - -return git_ssh diff --git a/Utils/luarocks/lua/luarocks/fetch/hg.lua b/Utils/luarocks/lua/luarocks/fetch/hg.lua deleted file mode 100644 index 4cf8d0280..000000000 --- a/Utils/luarocks/lua/luarocks/fetch/hg.lua +++ /dev/null @@ -1,65 +0,0 @@ - ---- Fetch back-end for retrieving sources from HG. -local hg = {} - -local unpack = unpack or table.unpack - -local fs = require("luarocks.fs") -local dir = require("luarocks.dir") -local util = require("luarocks.util") - ---- Download sources for building a rock, using hg. --- @param rockspec table: The rockspec table --- @param extract boolean: Unused in this module (required for API purposes.) --- @param dest_dir string or nil: If set, will extract to the given directory. --- @return (string, string) or (nil, string): The absolute pathname of --- the fetched source tarball and the temporary directory created to --- store it; or nil and an error message. -function hg.get_sources(rockspec, extract, dest_dir) - assert(type(rockspec) == "table") - assert(type(dest_dir) == "string" or not dest_dir) - - local hg_cmd = rockspec.variables.HG - local ok, err_msg = fs.is_tool_available(hg_cmd, "Mercurial") - if not ok then - return nil, err_msg - end - - local name_version = rockspec.name .. "-" .. rockspec.version - -- Strip off special hg:// protocol type - local url = rockspec.source.url:gsub("^hg://", "") - - local module = dir.base_name(url) - - local command = {hg_cmd, "clone", url, module} - local tag_or_branch = rockspec.source.tag or rockspec.source.branch - if tag_or_branch then - command = {hg_cmd, "clone", "--rev", tag_or_branch, url, module} - end - local store_dir - if not dest_dir then - store_dir = fs.make_temp_dir(name_version) - if not store_dir then - return nil, "Failed creating temporary directory." - end - util.schedule_function(fs.delete, store_dir) - else - store_dir = dest_dir - end - local ok, err = fs.change_dir(store_dir) - if not ok then return nil, err end - if not fs.execute(unpack(command)) then - return nil, "Failed cloning hg repository." - end - ok, err = fs.change_dir(module) - if not ok then return nil, err end - - fs.delete(dir.path(store_dir, module, ".hg")) - fs.delete(dir.path(store_dir, module, ".hgignore")) - fs.pop_dir() - fs.pop_dir() - return module, store_dir -end - - -return hg diff --git a/Utils/luarocks/lua/luarocks/fetch/hg_http.lua b/Utils/luarocks/lua/luarocks/fetch/hg_http.lua deleted file mode 100644 index 8f506daff..000000000 --- a/Utils/luarocks/lua/luarocks/fetch/hg_http.lua +++ /dev/null @@ -1,24 +0,0 @@ - ---- Fetch back-end for retrieving sources from hg repositories --- that use http:// transport. For example, for fetching a repository --- that requires the following command line: --- `hg clone http://example.com/foo` --- you can use this in the rockspec: --- source = { url = "hg+http://example.com/foo" } -local hg_http = {} - -local hg = require("luarocks.fetch.hg") - ---- Download sources for building a rock, using hg over http. --- @param rockspec table: The rockspec table --- @param extract boolean: Unused in this module (required for API purposes.) --- @param dest_dir string or nil: If set, will extract to the given directory. --- @return (string, string) or (nil, string): The absolute pathname of --- the fetched source tarball and the temporary directory created to --- store it; or nil and an error message. -function hg_http.get_sources(rockspec, extract, dest_dir) - rockspec.source.url = rockspec.source.url:gsub("^hg.", "") - return hg.get_sources(rockspec, extract, dest_dir) -end - -return hg_http diff --git a/Utils/luarocks/lua/luarocks/fetch/hg_https.lua b/Utils/luarocks/lua/luarocks/fetch/hg_https.lua deleted file mode 100644 index e67417fe8..000000000 --- a/Utils/luarocks/lua/luarocks/fetch/hg_https.lua +++ /dev/null @@ -1,8 +0,0 @@ - ---- Fetch back-end for retrieving sources from hg repositories --- that use https:// transport. For example, for fetching a repository --- that requires the following command line: --- `hg clone https://example.com/foo` --- you can use this in the rockspec: --- source = { url = "hg+https://example.com/foo" } -return require "luarocks.fetch.hg_http" diff --git a/Utils/luarocks/lua/luarocks/fetch/hg_ssh.lua b/Utils/luarocks/lua/luarocks/fetch/hg_ssh.lua deleted file mode 100644 index 0c365fabe..000000000 --- a/Utils/luarocks/lua/luarocks/fetch/hg_ssh.lua +++ /dev/null @@ -1,8 +0,0 @@ - ---- Fetch back-end for retrieving sources from hg repositories --- that use ssh:// transport. For example, for fetching a repository --- that requires the following command line: --- `hg clone ssh://example.com/foo` --- you can use this in the rockspec: --- source = { url = "hg+ssh://example.com/foo" } -return require "luarocks.fetch.hg_http" diff --git a/Utils/luarocks/lua/luarocks/fetch/sscm.lua b/Utils/luarocks/lua/luarocks/fetch/sscm.lua deleted file mode 100644 index 5add10dba..000000000 --- a/Utils/luarocks/lua/luarocks/fetch/sscm.lua +++ /dev/null @@ -1,44 +0,0 @@ - ---- Fetch back-end for retrieving sources from Surround SCM Server -local sscm = {} - -local fs = require("luarocks.fs") -local dir = require("luarocks.dir") - ---- Download sources via Surround SCM Server for building a rock. --- @param rockspec table: The rockspec table --- @param extract boolean: Unused in this module (required for API purposes.) --- @param dest_dir string or nil: If set, will extract to the given directory. --- @return (string, string) or (nil, string): The absolute pathname of --- the fetched source tarball and the temporary directory created to --- store it; or nil and an error message. -function sscm.get_sources(rockspec, extract, dest_dir) - assert(type(rockspec) == "table") - assert(type(dest_dir) == "string" or not dest_dir) - - local sscm_cmd = rockspec.variables.SSCM - local module = rockspec.source.module or dir.base_name(rockspec.source.url) - local branch, repository = string.match(rockspec.source.pathname, "^([^/]*)/(.*)") - if not branch or not repository then - return nil, "Error retrieving branch and repository from rockspec." - end - -- Search for working directory. - local working_dir - local tmp = io.popen(string.format(sscm_cmd..[[ property "/" -d -b%s -p%s]], branch, repository)) - for line in tmp:lines() do - --%c because a chr(13) comes in the end. - working_dir = string.match(line, "Working directory:[%s]*(.*)%c$") - if working_dir then break end - end - tmp:close() - if not working_dir then - return nil, "Error retrieving working directory from SSCM." - end - if not fs.execute(sscm_cmd, "get", "*", "-e" , "-r", "-b"..branch, "-p"..repository, "-tmodify", "-wreplace") then - return nil, "Failed fetching files from SSCM." - end - -- FIXME: This function does not honor the dest_dir parameter. - return module, working_dir -end - -return sscm diff --git a/Utils/luarocks/lua/luarocks/fetch/svn.lua b/Utils/luarocks/lua/luarocks/fetch/svn.lua deleted file mode 100644 index 29bce1b5f..000000000 --- a/Utils/luarocks/lua/luarocks/fetch/svn.lua +++ /dev/null @@ -1,64 +0,0 @@ - ---- Fetch back-end for retrieving sources from Subversion. -local svn = {} - -local unpack = unpack or table.unpack - -local fs = require("luarocks.fs") -local dir = require("luarocks.dir") -local util = require("luarocks.util") - ---- Download sources for building a rock, using Subversion. --- @param rockspec table: The rockspec table --- @param extract boolean: Unused in this module (required for API purposes.) --- @param dest_dir string or nil: If set, will extract to the given directory. --- @return (string, string) or (nil, string): The absolute pathname of --- the fetched source tarball and the temporary directory created to --- store it; or nil and an error message. -function svn.get_sources(rockspec, extract, dest_dir) - assert(type(rockspec) == "table") - assert(type(dest_dir) == "string" or not dest_dir) - - local svn_cmd = rockspec.variables.SVN - local ok, err_msg = fs.is_tool_available(svn_cmd, "--version", "Subversion") - if not ok then - return nil, err_msg - end - - local name_version = rockspec.name .. "-" .. rockspec.version - local module = rockspec.source.module or dir.base_name(rockspec.source.url) - local url = rockspec.source.url:gsub("^svn://", "") - local command = {svn_cmd, "checkout", url, module} - if rockspec.source.tag then - table.insert(command, 5, "-r") - table.insert(command, 6, rockspec.source.tag) - end - local store_dir - if not dest_dir then - store_dir = fs.make_temp_dir(name_version) - if not store_dir then - return nil, "Failed creating temporary directory." - end - util.schedule_function(fs.delete, store_dir) - else - store_dir = dest_dir - end - local ok, err = fs.change_dir(store_dir) - if not ok then return nil, err end - if not fs.execute(unpack(command)) then - return nil, "Failed fetching files from Subversion." - end - ok, err = fs.change_dir(module) - if not ok then return nil, err end - for _, d in ipairs(fs.find(".")) do - if dir.base_name(d) == ".svn" then - fs.delete(dir.path(store_dir, module, d)) - end - end - fs.pop_dir() - fs.pop_dir() - return module, store_dir -end - - -return svn diff --git a/Utils/luarocks/lua/luarocks/fs.lua b/Utils/luarocks/lua/luarocks/fs.lua deleted file mode 100644 index 54cc7d73d..000000000 --- a/Utils/luarocks/lua/luarocks/fs.lua +++ /dev/null @@ -1,76 +0,0 @@ - ---- Proxy module for filesystem and platform abstractions. --- All code using "fs" code should require "luarocks.fs", --- and not the various platform-specific implementations. --- However, see the documentation of the implementation --- for the API reference. - -local pairs = pairs - -local fs = {} -package.loaded["luarocks.fs"] = fs - -local cfg = require("luarocks.cfg") - -local pack = table.pack or function(...) return { n = select("#", ...), ... } end -local unpack = table.unpack or unpack - -local old_popen, old_exec -fs.verbose = function() -- patch io.popen and os.execute to display commands in verbose mode - if old_popen or old_exec then return end - old_popen = io.popen - io.popen = function(one, two) - if two == nil then - print("\nio.popen: ", one) - else - print("\nio.popen: ", one, "Mode:", two) - end - return old_popen(one, two) - end - - old_exec = os.execute - os.execute = function(cmd) - -- redact api keys if present - print("\nos.execute: ", (cmd:gsub("(/api/[^/]+/)([^/]+)/", function(cap, key) return cap.."/" end)) ) - local code = pack(old_exec(cmd)) - print("Results: "..tostring(code.n)) - for i = 1,code.n do - print(" "..tostring(i).." ("..type(code[i]).."): "..tostring(code[i])) - end - return unpack(code, 1, code.n) - end -end -if cfg.verbose then fs.verbose() end - -local function load_fns(fs_table) - for name, fn in pairs(fs_table) do - if not fs[name] then - fs[name] = fn - end - end -end - --- Load platform-specific functions -local loaded_platform = nil -for _, platform in ipairs(cfg.platforms) do - local ok, fs_plat = pcall(require, "luarocks.fs."..platform) - if ok and fs_plat then - loaded_platform = platform - load_fns(fs_plat) - break - end -end - --- Load platform-independent pure-Lua functionality -local fs_lua = require("luarocks.fs.lua") -load_fns(fs_lua) - --- Load platform-specific fallbacks for missing Lua modules -local ok, fs_plat_tools = pcall(require, "luarocks.fs."..loaded_platform..".tools") -if ok and fs_plat_tools then - load_fns(fs_plat_tools) - load_fns(require("luarocks.fs.tools")) -end - - -return fs diff --git a/Utils/luarocks/lua/luarocks/fs/lua.lua b/Utils/luarocks/lua/luarocks/fs/lua.lua deleted file mode 100644 index 41711eab6..000000000 --- a/Utils/luarocks/lua/luarocks/fs/lua.lua +++ /dev/null @@ -1,873 +0,0 @@ - ---- Native Lua implementation of filesystem and platform abstractions, --- using LuaFileSystem, LZLib, MD5 and LuaCurl. --- module("luarocks.fs.lua") -local fs_lua = {} - -local fs = require("luarocks.fs") - -local cfg = require("luarocks.cfg") -local dir = require("luarocks.dir") -local util = require("luarocks.util") -local path = require("luarocks.path") - -local socket_ok, zip_ok, unzip_ok, lfs_ok, md5_ok, posix_ok, _ -local http, ftp, lrzip, luazip, lfs, md5, posix - -if cfg.fs_use_modules then - socket_ok, http = pcall(require, "socket.http") - _, ftp = pcall(require, "socket.ftp") - zip_ok, lrzip = pcall(require, "luarocks.tools.zip") - unzip_ok, luazip = pcall(require, "zip"); _G.zip = nil - lfs_ok, lfs = pcall(require, "lfs") - md5_ok, md5 = pcall(require, "md5") - posix_ok, posix = pcall(require, "posix") -end - -local patch = require("luarocks.tools.patch") - -local dir_stack = {} - -local dir_separator = "/" - ---- Test is file/dir is writable. --- Warning: testing if a file/dir is writable does not guarantee --- that it will remain writable and therefore it is no replacement --- for checking the result of subsequent operations. --- @param file string: filename to test --- @return boolean: true if file exists, false otherwise. -function fs_lua.is_writable(file) - assert(file) - file = dir.normalize(file) - local result - if fs.is_dir(file) then - local file2 = dir.path(file, '.tmpluarockstestwritable') - local fh = io.open(file2, 'wb') - result = fh ~= nil - if fh then fh:close() end - os.remove(file2) - else - local fh = io.open(file, 'r+b') - result = fh ~= nil - if fh then fh:close() end - end - return result -end - -local function quote_args(command, ...) - local out = { command } - for _, arg in ipairs({...}) do - assert(type(arg) == "string") - out[#out+1] = fs.Q(arg) - end - return table.concat(out, " ") -end - ---- Run the given command, quoting its arguments. --- The command is executed in the current directory in the dir stack. --- @param command string: The command to be executed. No quoting/escaping --- is applied. --- @param ... Strings containing additional arguments, which are quoted. --- @return boolean: true if command succeeds (status code 0), false --- otherwise. -function fs_lua.execute(command, ...) - assert(type(command) == "string") - return fs.execute_string(quote_args(command, ...)) -end - ---- Run the given command, quoting its arguments, silencing its output. --- The command is executed in the current directory in the dir stack. --- Silencing is omitted if 'verbose' mode is enabled. --- @param command string: The command to be executed. No quoting/escaping --- is applied. --- @param ... Strings containing additional arguments, which will be quoted. --- @return boolean: true if command succeeds (status code 0), false --- otherwise. -function fs_lua.execute_quiet(command, ...) - assert(type(command) == "string") - if cfg.verbose then -- omit silencing output - return fs.execute_string(quote_args(command, ...)) - else - return fs.execute_string(fs.quiet(quote_args(command, ...))) - end -end - ---- Checks if the given tool is available. --- The tool is executed using a flag, usually just to ask its version. --- @param tool_cmd string: The command to be used to check the tool's presence (e.g. hg in case of Mercurial) --- @param tool_name string: The actual name of the tool (e.g. Mercurial) --- @param arg string: The flag to pass to the tool. '--version' by default. -function fs_lua.is_tool_available(tool_cmd, tool_name, arg) - assert(type(tool_cmd) == "string") - assert(type(tool_name) == "string") - - arg = arg or "--version" - assert(type(arg) == "string") - - if not fs.execute_quiet(fs.Q(tool_cmd), arg) then - local msg = "'%s' program not found. Make sure %s is installed and is available in your PATH " .. - "(or you may want to edit the 'variables.%s' value in file '%s')" - return nil, msg:format(tool_cmd, tool_name, tool_name:upper(), cfg.which_config().nearest) - else - return true - end -end - ---- Check the MD5 checksum for a file. --- @param file string: The file to be checked. --- @param md5sum string: The string with the expected MD5 checksum. --- @return boolean: true if the MD5 checksum for 'file' equals 'md5sum', false + msg if not --- or if it could not perform the check for any reason. -function fs_lua.check_md5(file, md5sum) - file = dir.normalize(file) - local computed, msg = fs.get_md5(file) - if not computed then - return false, msg - end - if computed:match("^"..md5sum) then - return true - else - return false, "Mismatch MD5 hash for file "..file - end -end - ---- List the contents of a directory. --- @param at string or nil: directory to list (will be the current --- directory if none is given). --- @return table: an array of strings with the filenames representing --- the contents of a directory. -function fs_lua.list_dir(at) - local result = {} - for file in fs.dir(at) do - result[#result+1] = file - end - return result -end - ---- Iterate over the contents of a directory. --- @param at string or nil: directory to list (will be the current --- directory if none is given). --- @return function: an iterator function suitable for use with --- the for statement. -function fs_lua.dir(at) - if not at then - at = fs.current_dir() - end - at = dir.normalize(at) - if not fs.is_dir(at) then - return function() end - end - return coroutine.wrap(function() fs.dir_iterator(at) end) -end - ---------------------------------------------------------------------- --- LuaFileSystem functions ---------------------------------------------------------------------- - -if lfs_ok then - ---- Run the given command. --- The command is executed in the current directory in the dir stack. --- @param cmd string: No quoting/escaping is applied to the command. --- @return boolean: true if command succeeds (status code 0), false --- otherwise. -function fs_lua.execute_string(cmd) - local code = os.execute(cmd) - return (code == 0 or code == true) -end - ---- Obtain current directory. --- Uses the module's internal dir stack. --- @return string: the absolute pathname of the current directory. -function fs_lua.current_dir() - return lfs.currentdir() -end - ---- Change the current directory. --- Uses the module's internal dir stack. This does not have exact --- semantics of chdir, as it does not handle errors the same way, --- but works well for our purposes for now. --- @param d string: The directory to switch to. -function fs_lua.change_dir(d) - table.insert(dir_stack, lfs.currentdir()) - d = dir.normalize(d) - return lfs.chdir(d) -end - ---- Change directory to root. --- Allows leaving a directory (e.g. for deleting it) in --- a crossplatform way. -function fs_lua.change_dir_to_root() - local current = lfs.currentdir() - if not current or current == "" then - return false - end - table.insert(dir_stack, current) - lfs.chdir("/") -- works on Windows too - return true -end - ---- Change working directory to the previous in the dir stack. --- @return true if a pop ocurred, false if the stack was empty. -function fs_lua.pop_dir() - local d = table.remove(dir_stack) - if d then - lfs.chdir(d) - return true - else - return false - end -end - ---- Create a directory if it does not already exist. --- If any of the higher levels in the path name do not exist --- too, they are created as well. --- @param directory string: pathname of directory to create. --- @return boolean or (boolean, string): true on success or (false, error message) on failure. -function fs_lua.make_dir(directory) - assert(type(directory) == "string") - directory = dir.normalize(directory) - local path = nil - if directory:sub(2, 2) == ":" then - path = directory:sub(1, 2) - directory = directory:sub(4) - else - if directory:match("^/") then - path = "" - end - end - for d in directory:gmatch("([^"..dir.separator.."]+)"..dir.separator.."*") do - path = path and path .. dir.separator .. d or d - local mode = lfs.attributes(path, "mode") - if not mode then - local ok, err = lfs.mkdir(path) - if not ok then - return false, err - end - ok, err = fs.chmod(path, cfg.perm_exec) - if not ok then - return false, err - end - elseif mode ~= "directory" then - return false, path.." is not a directory" - end - end - return true -end - ---- Remove a directory if it is empty. --- Does not return errors (for example, if directory is not empty or --- if already does not exist) --- @param d string: pathname of directory to remove. -function fs_lua.remove_dir_if_empty(d) - assert(d) - d = dir.normalize(d) - lfs.rmdir(d) -end - ---- Remove a directory if it is empty. --- Does not return errors (for example, if directory is not empty or --- if already does not exist) --- @param d string: pathname of directory to remove. -function fs_lua.remove_dir_tree_if_empty(d) - assert(d) - d = dir.normalize(d) - for i=1,10 do - lfs.rmdir(d) - d = dir.dir_name(d) - end -end - ---- Copy a file. --- @param src string: Pathname of source --- @param dest string: Pathname of destination --- @param perms string or nil: Permissions for destination file, --- or nil to use the source filename permissions --- @return boolean or (boolean, string): true on success, false on failure, --- plus an error message. -function fs_lua.copy(src, dest, perms) - assert(src and dest) - src = dir.normalize(src) - dest = dir.normalize(dest) - local destmode = lfs.attributes(dest, "mode") - if destmode == "directory" then - dest = dir.path(dest, dir.base_name(src)) - end - if not perms then perms = fs.get_permissions(src) end - local src_h, err = io.open(src, "rb") - if not src_h then return nil, err end - local dest_h, err = io.open(dest, "w+b") - if not dest_h then src_h:close() return nil, err end - while true do - local block = src_h:read(8192) - if not block then break end - dest_h:write(block) - end - src_h:close() - dest_h:close() - fs.chmod(dest, perms) - return true -end - ---- Implementation function for recursive copy of directory contents. --- Assumes paths are normalized. --- @param src string: Pathname of source --- @param dest string: Pathname of destination --- @param perms string or nil: Optional permissions. --- If not given, permissions of the source are copied over to the destination. --- @return boolean or (boolean, string): true on success, false on failure -local function recursive_copy(src, dest, perms) - local srcmode = lfs.attributes(src, "mode") - - if srcmode == "file" then - local ok = fs.copy(src, dest, perms) - if not ok then return false end - elseif srcmode == "directory" then - local subdir = dir.path(dest, dir.base_name(src)) - local ok, err = fs.make_dir(subdir) - if not ok then return nil, err end - for file in lfs.dir(src) do - if file ~= "." and file ~= ".." then - local ok = recursive_copy(dir.path(src, file), subdir, perms) - if not ok then return false end - end - end - end - return true -end - ---- Recursively copy the contents of a directory. --- @param src string: Pathname of source --- @param dest string: Pathname of destination --- @param perms string or nil: Optional permissions. --- @return boolean or (boolean, string): true on success, false on failure, --- plus an error message. -function fs_lua.copy_contents(src, dest, perms) - assert(src and dest) - src = dir.normalize(src) - dest = dir.normalize(dest) - assert(lfs.attributes(src, "mode") == "directory") - - for file in lfs.dir(src) do - if file ~= "." and file ~= ".." then - local ok = recursive_copy(dir.path(src, file), dest, perms) - if not ok then - return false, "Failed copying "..src.." to "..dest - end - end - end - return true -end - ---- Implementation function for recursive removal of directories. --- Assumes paths are normalized. --- @param name string: Pathname of file --- @return boolean or (boolean, string): true on success, --- or nil and an error message on failure. -local function recursive_delete(name) - local ok = os.remove(name) - if ok then return true end - local pok, ok, err = pcall(function() - for file in lfs.dir(name) do - if file ~= "." and file ~= ".." then - local ok, err = recursive_delete(dir.path(name, file)) - if not ok then return nil, err end - end - end - local ok, err = lfs.rmdir(name) - return ok, (not ok) and err - end) - if pok then - return ok, err - else - return pok, ok - end -end - ---- Delete a file or a directory and all its contents. --- @param name string: Pathname of source --- @return nil -function fs_lua.delete(name) - name = dir.normalize(name) - recursive_delete(name) -end - ---- Internal implementation function for fs.dir. --- Yields a filename on each iteration. --- @param at string: directory to list --- @return nil -function fs_lua.dir_iterator(at) - for file in lfs.dir(at) do - if file ~= "." and file ~= ".." then - coroutine.yield(file) - end - end -end - ---- Implementation function for recursive find. --- Assumes paths are normalized. --- @param cwd string: Current working directory in recursion. --- @param prefix string: Auxiliary prefix string to form pathname. --- @param result table: Array of strings where results are collected. -local function recursive_find(cwd, prefix, result) - for file in lfs.dir(cwd) do - if file ~= "." and file ~= ".." then - local item = prefix .. file - table.insert(result, item) - local pathname = dir.path(cwd, file) - if lfs.attributes(pathname, "mode") == "directory" then - recursive_find(pathname, item..dir_separator, result) - end - end - end -end - ---- Recursively scan the contents of a directory. --- @param at string or nil: directory to scan (will be the current --- directory if none is given). --- @return table: an array of strings with the filenames representing --- the contents of a directory. -function fs_lua.find(at) - assert(type(at) == "string" or not at) - if not at then - at = fs.current_dir() - end - at = dir.normalize(at) - if not fs.is_dir(at) then - return {} - end - local result = {} - recursive_find(at, "", result) - return result -end - ---- Test for existance of a file. --- @param file string: filename to test --- @return boolean: true if file exists, false otherwise. -function fs_lua.exists(file) - assert(file) - file = dir.normalize(file) - return type(lfs.attributes(file)) == "table" -end - ---- Test is pathname is a directory. --- @param file string: pathname to test --- @return boolean: true if it is a directory, false otherwise. -function fs_lua.is_dir(file) - assert(file) - file = dir.normalize(file) - return lfs.attributes(file, "mode") == "directory" -end - ---- Test is pathname is a regular file. --- @param file string: pathname to test --- @return boolean: true if it is a file, false otherwise. -function fs_lua.is_file(file) - assert(file) - file = dir.normalize(file) - return lfs.attributes(file, "mode") == "file" -end - -function fs_lua.set_time(file, time) - file = dir.normalize(file) - return lfs.touch(file, time) -end - -end - ---------------------------------------------------------------------- --- LuaZip functions ---------------------------------------------------------------------- - -if zip_ok then - -function fs_lua.zip(zipfile, ...) - return lrzip.zip(zipfile, ...) -end - -end - -if unzip_ok then ---- Uncompress files from a .zip archive. --- @param zipfile string: pathname of .zip archive to be extracted. --- @return boolean: true on success, false on failure. -function fs_lua.unzip(zipfile) - local zipfile, err = luazip.open(zipfile) - if not zipfile then return nil, err end - local files = zipfile:files() - local file = files() - repeat - if file.filename:sub(#file.filename) == "/" then - local ok, err = fs.make_dir(dir.path(fs.current_dir(), file.filename)) - if not ok then return nil, err end - else - local base = dir.dir_name(file.filename) - if base ~= "" then - base = dir.path(fs.current_dir(), base) - if not fs.is_dir(base) then - local ok, err = fs.make_dir(base) - if not ok then return nil, err end - end - end - local rf, err = zipfile:open(file.filename) - if not rf then zipfile:close(); return nil, err end - local contents = rf:read("*a") - rf:close() - local wf, err = io.open(dir.path(fs.current_dir(), file.filename), "wb") - if not wf then zipfile:close(); return nil, err end - wf:write(contents) - wf:close() - end - file = files() - until not file - zipfile:close() - return true -end - -end - ---------------------------------------------------------------------- --- LuaSocket functions ---------------------------------------------------------------------- - -if socket_ok then - -local ltn12 = require("ltn12") -local luasec_ok, https = pcall(require, "ssl.https") - -local redirect_protocols = { - http = http, - https = luasec_ok and https, -} - -local function request(url, method, http, loop_control) - local result = {} - - local proxy = cfg.http_proxy - if type(proxy) ~= "string" then proxy = nil end - -- LuaSocket's http.request crashes when given URLs missing the scheme part. - if proxy and not proxy:find("://") then - proxy = "http://" .. proxy - end - - if cfg.show_downloads then - io.write(method.." "..url.." ...\n") - end - local dots = 0 - if cfg.connection_timeout and cfg.connection_timeout > 0 then - http.TIMEOUT = cfg.connection_timeout - end - local res, status, headers, err = http.request { - url = url, - proxy = proxy, - method = method, - redirect = false, - sink = ltn12.sink.table(result), - step = cfg.show_downloads and function(...) - io.write(".") - io.flush() - dots = dots + 1 - if dots == 70 then - io.write("\n") - dots = 0 - end - return ltn12.pump.step(...) - end, - headers = { - ["user-agent"] = cfg.user_agent.." via LuaSocket" - }, - } - if cfg.show_downloads then - io.write("\n") - end - if not res then - return nil, status - elseif status == 301 or status == 302 then - local location = headers.location - if location then - local protocol, rest = dir.split_url(location) - if redirect_protocols[protocol] then - if not loop_control then - loop_control = {} - elseif loop_control[location] then - return nil, "Redirection loop -- broken URL?" - end - loop_control[url] = true - return request(location, method, redirect_protocols[protocol], loop_control) - else - return nil, "URL redirected to unsupported protocol - install luasec to get HTTPS support.", "https" - end - end - return nil, err - elseif status ~= 200 then - return nil, err - else - return result, status, headers, err - end -end - -local function http_request(url, http, cached) - if cached then - local tsfd = io.open(cached..".timestamp", "r") - if tsfd then - local timestamp = tsfd:read("*a") - tsfd:close() - local result, status, headers, err = request(url, "HEAD", http) - if status == 200 and headers["last-modified"] == timestamp then - return true - end - if not result then - return nil, status, headers - end - end - end - local result, status, headers, err = request(url, "GET", http) - if result then - if cached and headers["last-modified"] then - local tsfd = io.open(cached..".timestamp", "w") - if tsfd then - tsfd:write(headers["last-modified"]) - tsfd:close() - end - end - return table.concat(result) - else - return nil, status, headers - end -end - -local downloader_warning = false - ---- Download a remote file. --- @param url string: URL to be fetched. --- @param filename string or nil: this function attempts to detect the --- resulting local filename of the remote file as the basename of the URL; --- if that is not correct (due to a redirection, for example), the local --- filename can be given explicitly as this second argument. --- @return (boolean, string): true and the filename on success, --- false and the error message on failure. -function fs_lua.download(url, filename, cache) - assert(type(url) == "string") - assert(type(filename) == "string" or not filename) - - filename = fs.absolute_name(filename or dir.base_name(url)) - - -- delegate to the configured downloader so we don't have to deal with whitelists - if cfg.no_proxy then - return fs.use_downloader(url, filename, cache) - end - - local content, err, https_err - if util.starts_with(url, "http:") then - content, err, https_err = http_request(url, http, cache and filename) - elseif util.starts_with(url, "ftp:") then - content, err = ftp.get(url) - elseif util.starts_with(url, "https:") then - -- skip LuaSec when proxy is enabled since it is not supported - if luasec_ok and not cfg.https_proxy then - content, err = http_request(url, https, cache and filename) - else - https_err = true - end - else - err = "Unsupported protocol" - end - if https_err then - if not downloader_warning then - util.printerr("Warning: falling back to "..cfg.downloader.." - install luasec to get native HTTPS support") - downloader_warning = true - end - return fs.use_downloader(url, filename, cache) - end - if cache and content == true then - return true, filename - end - if not content then - return false, tostring(err) - end - local file = io.open(filename, "wb") - if not file then return false end - file:write(content) - file:close() - return true, filename -end - -else --...if socket_ok == false then - -function fs_lua.download(url, filename, cache) - return fs.use_downloader(url, filename, cache) -end - -end ---------------------------------------------------------------------- --- MD5 functions ---------------------------------------------------------------------- - -if md5_ok then - --- Support the interface of lmd5 by lhf in addition to md5 by Roberto --- and the keplerproject. -if not md5.sumhexa and md5.digest then - md5.sumhexa = function(msg) - return md5.digest(msg) - end -end - ---- Get the MD5 checksum for a file. --- @param file string: The file to be computed. --- @return string: The MD5 checksum or nil + error -function fs_lua.get_md5(file) - file = fs.absolute_name(file) - local file_handler = io.open(file, "rb") - if not file_handler then return nil, "Failed to open file for reading: "..file end - local computed = md5.sumhexa(file_handler:read("*a")) - file_handler:close() - if computed then return computed end - return nil, "Failed to compute MD5 hash for file "..file -end - -end - ---------------------------------------------------------------------- --- POSIX functions ---------------------------------------------------------------------- - -if posix_ok then - -local octal_to_rwx = { - ["0"] = "---", - ["1"] = "--x", - ["2"] = "-w-", - ["3"] = "-wx", - ["4"] = "r--", - ["5"] = "r-x", - ["6"] = "rw-", - ["7"] = "rwx", -} - -function fs_lua.chmod(file, mode) - -- LuaPosix (as of 5.1.15) does not support octal notation... - if mode:sub(1,1) == "0" then - local new_mode = {} - for c in mode:sub(-3):gmatch(".") do - table.insert(new_mode, octal_to_rwx[c]) - end - mode = table.concat(new_mode) - end - local err = posix.chmod(file, mode) - return err == 0 -end - -function fs_lua.get_permissions(file) - return posix.stat(file, "mode") -end - ---- Create a temporary directory. --- @param name string: name pattern to use for avoiding conflicts --- when creating temporary directory. --- @return string or (nil, string): name of temporary directory or (nil, error message) on failure. -function fs_lua.make_temp_dir(name) - assert(type(name) == "string") - name = dir.normalize(name) - - return posix.mkdtemp((os.getenv("TMPDIR") or "/tmp") .. "/luarocks_" .. name:gsub(dir.separator, "_") .. "-XXXXXX") -end - -end - ---------------------------------------------------------------------- --- Other functions ---------------------------------------------------------------------- - ---- Apply a patch. --- @param patchname string: The filename of the patch. --- @param patchdata string or nil: The actual patch as a string. -function fs_lua.apply_patch(patchname, patchdata) - local p, all_ok = patch.read_patch(patchname, patchdata) - if not all_ok then - return nil, "Failed reading patch "..patchname - end - if p then - return patch.apply_patch(p, 1) - end -end - ---- Move a file. --- @param src string: Pathname of source --- @param dest string: Pathname of destination --- @param perms string or nil: Permissions for destination file, --- or nil to use the source filename permissions. --- @return boolean or (boolean, string): true on success, false on failure, --- plus an error message. -function fs_lua.move(src, dest, perms) - assert(src and dest) - if fs.exists(dest) and not fs.is_dir(dest) then - return false, "File already exists: "..dest - end - local ok, err = fs.copy(src, dest, perms) - if not ok then - return false, err - end - fs.delete(src) - if fs.exists(src) then - return false, "Failed move: could not delete "..src.." after copy." - end - return true -end - ---- Check if user has write permissions for the command. --- Assumes the configuration variables under cfg have been previously set up. --- @param flags table: the flags table passed to run() drivers. --- @return boolean or (boolean, string): true on success, false on failure, --- plus an error message. -function fs_lua.check_command_permissions(flags) - local root_dir = path.root_dir(cfg.rocks_dir) - local ok = true - local err = "" - for _, dir in ipairs { cfg.rocks_dir, root_dir } do - if fs.exists(dir) and not fs.is_writable(dir) then - ok = false - err = "Your user does not have write permissions in " .. dir - break - end - end - if ok and not fs.exists(root_dir) then - local root = fs.root_of(root_dir) - local parent = root_dir - repeat - parent = dir.dir_name(parent) - if parent == "" then - parent = root - end - until parent == root or fs.exists(parent) - if not fs.is_writable(parent) then - ok = false - err = root_dir.." does not exist and your user does not have write permissions in " .. parent - end - end - if ok then - return true - else - if flags["local"] then - err = err .. " \n-- please check your permissions." - else - err = err .. " \n-- you may want to run as a privileged user or use your local tree with --local." - end - return nil, err - end -end - ---- Check whether a file is a Lua script --- When the file can be succesfully compiled by the configured --- Lua interpreter, it's considered to be a valid Lua file. --- @param name filename of file to check --- @return boolean true, if it is a Lua script, false otherwise -function fs_lua.is_lua(name) - name = name:gsub([[%\]],"/") -- normalize on fw slash to prevent escaping issues - local lua = fs.Q(dir.path(cfg.variables["LUA_BINDIR"], cfg.lua_interpreter)) -- get lua interpreter configured - -- execute on configured interpreter, might not be the same as the interpreter LR is run on - local result = fs.execute_string(lua..[[ -e "if loadfile(']]..name..[[') then os.exit() else os.exit(1) end"]]) - return (result == true) -end - -return fs_lua diff --git a/Utils/luarocks/lua/luarocks/fs/tools.lua b/Utils/luarocks/lua/luarocks/fs/tools.lua deleted file mode 100644 index ed51b5458..000000000 --- a/Utils/luarocks/lua/luarocks/fs/tools.lua +++ /dev/null @@ -1,156 +0,0 @@ - ---- Common fs operations implemented with third-party tools. -local tools = {} - -local fs = require("luarocks.fs") -local dir = require("luarocks.dir") -local cfg = require("luarocks.cfg") - -local vars = cfg.variables - -local dir_stack = {} - ---- Obtain current directory. --- Uses the module's internal directory stack. --- @return string: the absolute pathname of the current directory. -function tools.current_dir() - local current = cfg.cache_pwd - if not current then - local pipe = io.popen(fs.quiet_stderr(fs.Q(vars.PWD))) - current = pipe:read("*l") - pipe:close() - cfg.cache_pwd = current - end - for _, directory in ipairs(dir_stack) do - current = fs.absolute_name(directory, current) - end - return current -end - ---- Change the current directory. --- Uses the module's internal directory stack. This does not have exact --- semantics of chdir, as it does not handle errors the same way, --- but works well for our purposes for now. --- @param directory string: The directory to switch to. --- @return boolean or (nil, string): true if successful, (nil, error message) if failed. -function tools.change_dir(directory) - assert(type(directory) == "string") - if fs.is_dir(directory) then - table.insert(dir_stack, directory) - return true - end - return nil, "directory not found: "..directory -end - ---- Change directory to root. --- Allows leaving a directory (e.g. for deleting it) in --- a crossplatform way. -function tools.change_dir_to_root() - table.insert(dir_stack, "/") -end - ---- Change working directory to the previous in the directory stack. -function tools.pop_dir() - local directory = table.remove(dir_stack) - return directory ~= nil -end - ---- Run the given command. --- The command is executed in the current directory in the directory stack. --- @param cmd string: No quoting/escaping is applied to the command. --- @return boolean: true if command succeeds (status code 0), false --- otherwise. -function tools.execute_string(cmd) - local current = fs.current_dir() - if not current then return false end - cmd = fs.command_at(current, cmd) - local code = os.execute(cmd) - if code == 0 or code == true then - return true - else - return false - end -end - ---- Internal implementation function for fs.dir. --- Yields a filename on each iteration. --- @param at string: directory to list --- @return nil -function tools.dir_iterator(at) - local pipe = io.popen(fs.command_at(at, fs.Q(vars.LS))) - for file in pipe:lines() do - if file ~= "." and file ~= ".." then - coroutine.yield(file) - end - end - pipe:close() -end - ---- Download a remote file. --- @param url string: URL to be fetched. --- @param filename string or nil: this function attempts to detect the --- resulting local filename of the remote file as the basename of the URL; --- if that is not correct (due to a redirection, for example), the local --- filename can be given explicitly as this second argument. --- @return (boolean, string): true and the filename on success, --- false and the error message on failure. -function tools.use_downloader(url, filename, cache) - assert(type(url) == "string") - assert(type(filename) == "string" or not filename) - - filename = fs.absolute_name(filename or dir.base_name(url)) - - local ok - if cfg.downloader == "wget" then - local wget_cmd = fs.Q(vars.WGET).." "..vars.WGETNOCERTFLAG.." --no-cache --user-agent=\""..cfg.user_agent.." via wget\" --quiet " - if cfg.connection_timeout and cfg.connection_timeout > 0 then - wget_cmd = wget_cmd .. "--timeout="..tonumber(cfg.connection_timeout).." --tries=1 " - end - if cache then - -- --timestamping is incompatible with --output-document, - -- but that's not a problem for our use cases. - fs.change_dir(dir.dir_name(filename)) - ok = fs.execute_quiet(wget_cmd.." --timestamping ", url) - fs.pop_dir() - elseif filename then - ok = fs.execute_quiet(wget_cmd.." --output-document ", filename, url) - else - ok = fs.execute_quiet(wget_cmd, url) - end - elseif cfg.downloader == "curl" then - local curl_cmd = fs.Q(vars.CURL).." "..vars.CURLNOCERTFLAG.." -f -L --user-agent \""..cfg.user_agent.." via curl\" " - if cfg.connection_timeout and cfg.connection_timeout > 0 then - curl_cmd = curl_cmd .. "--connect-timeout "..tonumber(cfg.connection_timeout).." " - end - ok = fs.execute_string(fs.quiet_stderr(curl_cmd..fs.Q(url).." > "..fs.Q(filename))) - end - if ok then - return true, filename - else - return false - end -end - -local md5_cmd = { - md5sum = fs.Q(vars.MD5SUM), - openssl = fs.Q(vars.OPENSSL).." md5", - md5 = fs.Q(vars.MD5), -} - ---- Get the MD5 checksum for a file. --- @param file string: The file to be computed. --- @return string: The MD5 checksum or nil + message -function tools.get_md5(file) - local cmd = md5_cmd[cfg.md5checker] - if not cmd then return nil, "no MD5 checker command configured" end - local pipe = io.popen(cmd.." "..fs.Q(fs.absolute_name(file))) - local computed = pipe:read("*a") - pipe:close() - if computed then - computed = computed:match("("..("%x"):rep(32)..")") - end - if computed then return computed end - return nil, "Failed to compute MD5 hash for file "..tostring(fs.absolute_name(file)) -end - -return tools diff --git a/Utils/luarocks/lua/luarocks/fs/unix.lua b/Utils/luarocks/lua/luarocks/fs/unix.lua deleted file mode 100644 index e2bdc7b8f..000000000 --- a/Utils/luarocks/lua/luarocks/fs/unix.lua +++ /dev/null @@ -1,135 +0,0 @@ - ---- Unix implementation of filesystem and platform abstractions. -local unix = {} - -local fs = require("luarocks.fs") - -local cfg = require("luarocks.cfg") -local dir = require("luarocks.dir") -local util = require("luarocks.util") - ---- Annotate command string for quiet execution. --- @param cmd string: A command-line string. --- @return string: The command-line, with silencing annotation. -function unix.quiet(cmd) - return cmd.." 1> /dev/null 2> /dev/null" -end - ---- Annotate command string for execution with quiet stderr. --- @param cmd string: A command-line string. --- @return string: The command-line, with stderr silencing annotation. -function unix.quiet_stderr(cmd) - return cmd.." 2> /dev/null" -end - ---- Quote argument for shell processing. --- Adds single quotes and escapes. --- @param arg string: Unquoted argument. --- @return string: Quoted argument. -function unix.Q(arg) - assert(type(arg) == "string") - return "'" .. arg:gsub("'", "'\\''") .. "'" -end - ---- Return an absolute pathname from a potentially relative one. --- @param pathname string: pathname to convert. --- @param relative_to string or nil: path to prepend when making --- pathname absolute, or the current dir in the dir stack if --- not given. --- @return string: The pathname converted to absolute. -function unix.absolute_name(pathname, relative_to) - assert(type(pathname) == "string") - assert(type(relative_to) == "string" or not relative_to) - - relative_to = relative_to or fs.current_dir() - if pathname:sub(1,1) == "/" then - return pathname - else - return relative_to .. "/" .. pathname - end -end - ---- Return the root directory for the given path. --- In Unix, root is always "/". --- @param pathname string: pathname to use. --- @return string: The root of the given pathname. -function unix.root_of(_) - return "/" -end - ---- Create a wrapper to make a script executable from the command-line. --- @param file string: Pathname of script to be made executable. --- @param dest string: Directory where to put the wrapper. --- @param name string: rock name to be used in loader context. --- @param version string: rock version to be used in loader context. --- @return boolean or (nil, string): True if succeeded, or nil and --- an error message. -function unix.wrap_script(file, dest, name, version) - assert(type(file) == "string") - assert(type(dest) == "string") - - local base = dir.base_name(file) - local wrapname = fs.is_dir(dest) and dest.."/"..base or dest - local lpath, lcpath = cfg.package_paths() - local wrapper = io.open(wrapname, "w") - if not wrapper then - return nil, "Could not open "..wrapname.." for writing." - end - wrapper:write("#!/bin/sh\n\n") - local lua = dir.path(cfg.variables["LUA_BINDIR"], cfg.lua_interpreter) - local ppaths = "package.path="..util.LQ(lpath..";").."..package.path; package.cpath="..util.LQ(lcpath..";").."..package.cpath" - local addctx = "local k,l,_=pcall(require,"..util.LQ("luarocks.loader")..") _=k and l.add_context("..util.LQ(name)..","..util.LQ(version)..")" - wrapper:write('exec '..fs.Q(lua)..' -e '..fs.Q(ppaths)..' -e '..fs.Q(addctx)..' '..fs.Q(file)..' "$@"\n') - wrapper:close() - if fs.chmod(wrapname, cfg.perm_exec) then - return true - else - return nil, "Could not make "..wrapname.." executable." - end -end - ---- Check if a file (typically inside path.bin_dir) is an actual binary --- or a Lua wrapper. --- @param filename string: the file name with full path. --- @return boolean: returns true if file is an actual binary --- (or if it couldn't check) or false if it is a Lua wrapper. -function unix.is_actual_binary(filename) - if filename:match("%.lua$") then - return false - end - local file = io.open(filename) - if not file then - return true - end - local first = file:read(2) - file:close() - if not first then - util.printerr("Warning: could not read "..filename) - return true - end - return first ~= "#!" -end - -function unix.copy_binary(filename, dest) - return fs.copy(filename, dest, cfg.perm_exec) -end - ---- Move a file on top of the other. --- The new file ceases to exist under its original name, --- and takes over the name of the old file. --- On Unix this is done through a single rename operation. --- @param old_file The name of the original file, --- which will be the new name of new_file. --- @param new_file The name of the new file, --- which will replace old_file. --- @return boolean or (nil, string): True if succeeded, or nil and --- an error message. -function unix.replace_file(old_file, new_file) - return os.rename(new_file, old_file) -end - -function unix.tmpname() - return os.tmpname() -end - -return unix diff --git a/Utils/luarocks/lua/luarocks/fs/unix/tools.lua b/Utils/luarocks/lua/luarocks/fs/unix/tools.lua deleted file mode 100644 index d0802725a..000000000 --- a/Utils/luarocks/lua/luarocks/fs/unix/tools.lua +++ /dev/null @@ -1,237 +0,0 @@ - ---- fs operations implemented with third-party tools for Unix platform abstractions. -local tools = {} - -local fs = require("luarocks.fs") -local dir = require("luarocks.dir") -local cfg = require("luarocks.cfg") - -local vars = cfg.variables - ---- Adds prefix to command to make it run from a directory. --- @param directory string: Path to a directory. --- @param cmd string: A command-line string. --- @return string: The command-line with prefix. -function tools.command_at(directory, cmd) - return "cd " .. fs.Q(fs.absolute_name(directory)) .. " && " .. cmd -end - ---- Create a directory if it does not already exist. --- If any of the higher levels in the path name does not exist --- too, they are created as well. --- @param directory string: pathname of directory to create. --- @return boolean: true on success, false on failure. -function tools.make_dir(directory) - assert(directory) - local ok, err = fs.execute(vars.MKDIR.." -p", directory) - if not ok then - err = "failed making directory "..directory - end - return ok, err -end - ---- Remove a directory if it is empty. --- Does not return errors (for example, if directory is not empty or --- if already does not exist) --- @param directory string: pathname of directory to remove. -function tools.remove_dir_if_empty(directory) - assert(directory) - fs.execute_quiet(vars.RMDIR, directory) -end - ---- Remove a directory if it is empty. --- Does not return errors (for example, if directory is not empty or --- if already does not exist) --- @param directory string: pathname of directory to remove. -function tools.remove_dir_tree_if_empty(directory) - assert(directory) - fs.execute_quiet(vars.RMDIR, "-p", directory) -end - ---- Copy a file. --- @param src string: Pathname of source --- @param dest string: Pathname of destination --- @param perm string or nil: Permissions for destination file, --- @return boolean or (boolean, string): true on success, false on failure, --- plus an error message. -function tools.copy(src, dest, perm) - assert(src and dest) - if fs.execute(vars.CP, src, dest) then - if perm then - if fs.is_dir(dest) then - dest = dir.path(dest, dir.base_name(src)) - end - if fs.chmod(dest, perm) then - return true - else - return false, "Failed setting permissions of "..dest - end - end - return true - else - return false, "Failed copying "..src.." to "..dest - end -end - ---- Recursively copy the contents of a directory. --- @param src string: Pathname of source --- @param dest string: Pathname of destination --- @return boolean or (boolean, string): true on success, false on failure, --- plus an error message. -function tools.copy_contents(src, dest) - assert(src and dest) - if fs.execute_quiet(vars.CP.." -pPR "..fs.Q(src).."/* "..fs.Q(dest)) then - return true - else - return false, "Failed copying "..src.." to "..dest - end -end ---- Delete a file or a directory and all its contents. --- For safety, this only accepts absolute paths. --- @param arg string: Pathname of source --- @return nil -function tools.delete(arg) - assert(arg) - assert(arg:sub(1,1) == "/") - fs.execute_quiet(vars.RM, "-rf", arg) -end - ---- Recursively scan the contents of a directory. --- @param at string or nil: directory to scan (will be the current --- directory if none is given). --- @return table: an array of strings with the filenames representing --- the contents of a directory. -function tools.find(at) - assert(type(at) == "string" or not at) - if not at then - at = fs.current_dir() - end - if not fs.is_dir(at) then - return {} - end - local result = {} - local pipe = io.popen(fs.command_at(at, fs.quiet_stderr(vars.FIND.." *"))) - for file in pipe:lines() do - table.insert(result, file) - end - pipe:close() - return result -end - ---- Compress files in a .zip archive. --- @param zipfile string: pathname of .zip archive to be created. --- @param ... Filenames to be stored in the archive are given as --- additional arguments. --- @return boolean: true on success, false on failure. -function tools.zip(zipfile, ...) - return fs.execute(vars.ZIP.." -r", zipfile, ...) -end - ---- Uncompress files from a .zip archive. --- @param zipfile string: pathname of .zip archive to be extracted. --- @return boolean: true on success, false on failure. -function tools.unzip(zipfile) - assert(zipfile) - return fs.execute_quiet(vars.UNZIP, zipfile) -end - ---- Test is file/directory exists --- @param file string: filename to test --- @return boolean: true if file exists, false otherwise. -function tools.exists(file) - assert(file) - return fs.execute(vars.TEST, "-e", file) -end - ---- Test is pathname is a directory. --- @param file string: pathname to test --- @return boolean: true if it is a directory, false otherwise. -function tools.is_dir(file) - assert(file) - return fs.execute(vars.TEST, "-d", file) -end - ---- Test is pathname is a regular file. --- @param file string: pathname to test --- @return boolean: true if it is a regular file, false otherwise. -function tools.is_file(file) - assert(file) - return fs.execute(vars.TEST, "-f", file) -end - -function tools.chmod(pathname, mode) - if mode then - return fs.execute(vars.CHMOD, mode, pathname) - else - return false - end -end - ---- Unpack an archive. --- Extract the contents of an archive, detecting its format by --- filename extension. --- @param archive string: Filename of archive. --- @return boolean or (boolean, string): true on success, false and an error message on failure. -function tools.unpack_archive(archive) - assert(type(archive) == "string") - - local pipe_to_tar = " | "..vars.TAR.." -xf -" - - if not cfg.verbose then - pipe_to_tar = " 2> /dev/null"..fs.quiet(pipe_to_tar) - end - - local ok - if archive:match("%.tar%.gz$") or archive:match("%.tgz$") then - ok = fs.execute_string(vars.GUNZIP.." -c "..fs.Q(archive)..pipe_to_tar) - elseif archive:match("%.tar%.bz2$") then - ok = fs.execute_string(vars.BUNZIP2.." -c "..fs.Q(archive)..pipe_to_tar) - elseif archive:match("%.zip$") then - ok = fs.execute_quiet(vars.UNZIP, archive) - elseif archive:match("%.lua$") or archive:match("%.c$") then - -- Ignore .lua and .c files; they don't need to be extracted. - return true - else - return false, "Couldn't extract archive "..archive..": unrecognized filename extension" - end - if not ok then - return false, "Failed extracting "..archive - end - return true -end - -function tools.get_permissions(filename) - local pipe = io.popen(vars.STAT.." "..vars.STATFLAG.." "..fs.Q(filename)) - local ret = pipe:read("*l") - pipe:close() - return ret -end - -function tools.browser(url) - return fs.execute(cfg.web_browser, url) -end - -function tools.set_time(file, time) - file = dir.normalize(file) - return fs.execute(vars.TOUCH, "-d", "@"..tostring(time), file) -end - ---- Create a temporary directory. --- @param name string: name pattern to use for avoiding conflicts --- when creating temporary directory. --- @return string or (nil, string): name of temporary directory or (nil, error message) on failure. -function tools.make_temp_dir(name) - assert(type(name) == "string") - name = dir.normalize(name) - - local template = (os.getenv("TMPDIR") or "/tmp") .. "/luarocks_" .. name:gsub(dir.separator, "_") .. "-XXXXXX" - local pipe = io.popen(vars.MKTEMP.." -d "..fs.Q(template)) - local dirname = pipe:read("*l") - pipe:close() - if dirname and dirname:match("^/") then - return dirname - end - return nil, "Failed to create temporary directory "..tostring(dirname) -end - -return tools diff --git a/Utils/luarocks/lua/luarocks/fs/win32.lua b/Utils/luarocks/lua/luarocks/fs/win32.lua deleted file mode 100644 index cfc28d35f..000000000 --- a/Utils/luarocks/lua/luarocks/fs/win32.lua +++ /dev/null @@ -1,266 +0,0 @@ ---- Windows implementation of filesystem and platform abstractions. --- Download http://unxutils.sourceforge.net/ for Windows GNU utilities --- used by this module. -local win32 = {} - -local fs = require("luarocks.fs") - -local cfg = require("luarocks.cfg") -local dir = require("luarocks.dir") -local util = require("luarocks.util") - -math.randomseed(os.time()) - --- Monkey patch io.popen and os.execute to make sure quoting --- works as expected. --- See http://lua-users.org/lists/lua-l/2013-11/msg00367.html -local _prefix = "type NUL && " -local _popen, _execute = io.popen, os.execute -io.popen = function(cmd, ...) return _popen(_prefix..cmd, ...) end -os.execute = function(cmd, ...) return _execute(_prefix..cmd, ...) end - ---- Annotate command string for quiet execution. --- @param cmd string: A command-line string. --- @return string: The command-line, with silencing annotation. -function win32.quiet(cmd) - return cmd.." 2> NUL 1> NUL" -end - ---- Annotate command string for execution with quiet stderr. --- @param cmd string: A command-line string. --- @return string: The command-line, with stderr silencing annotation. -function win32.quiet_stderr(cmd) - return cmd.." 2> NUL" -end - --- Split path into root and the rest. --- Root part consists of an optional drive letter (e.g. "C:") --- and an optional directory separator. -local function split_root(path) - local root = "" - - if path:match("^.:") then - root = path:sub(1, 2) - path = path:sub(3) - end - - if path:match("^[\\/]") then - root = path:sub(1, 1) - path = path:sub(2) - end - - return root, path -end - ---- Quote argument for shell processing. Fixes paths on Windows. --- Adds double quotes and escapes. --- @param arg string: Unquoted argument. --- @return string: Quoted argument. -function win32.Q(arg) - assert(type(arg) == "string") - -- Use Windows-specific directory separator for paths. - -- Paths should be converted to absolute by now. - if split_root(arg) ~= "" then - arg = arg:gsub("/", "\\") - end - if arg == "\\" then - return '\\' -- CHDIR needs special handling for root dir - end - -- URLs and anything else - arg = arg:gsub('\\(\\*)"', '\\%1%1"') - arg = arg:gsub('\\+$', '%0%0') - arg = arg:gsub('"', '\\"') - arg = arg:gsub('(\\*)%%', '%1%1"%%"') - return '"' .. arg .. '"' -end - ---- Quote argument for shell processing in batch files. --- Adds double quotes and escapes. --- @param arg string: Unquoted argument. --- @return string: Quoted argument. -function win32.Qb(arg) - assert(type(arg) == "string") - -- Use Windows-specific directory separator for paths. - -- Paths should be converted to absolute by now. - if split_root(arg) ~= "" then - arg = arg:gsub("/", "\\") - end - if arg == "\\" then - return '\\' -- CHDIR needs special handling for root dir - end - -- URLs and anything else - arg = arg:gsub('\\(\\*)"', '\\%1%1"') - arg = arg:gsub('\\+$', '%0%0') - arg = arg:gsub('"', '\\"') - arg = arg:gsub('%%', '%%%%') - return '"' .. arg .. '"' -end - ---- Return an absolute pathname from a potentially relative one. --- @param pathname string: pathname to convert. --- @param relative_to string or nil: path to prepend when making --- pathname absolute, or the current dir in the dir stack if --- not given. --- @return string: The pathname converted to absolute. -function win32.absolute_name(pathname, relative_to) - assert(type(pathname) == "string") - assert(type(relative_to) == "string" or not relative_to) - - relative_to = relative_to or fs.current_dir() - local root, rest = split_root(pathname) - if root:match("[\\/]$") then - -- It's an absolute path already. - return pathname - else - -- It's a relative path, join it with base path. - -- This drops drive letter from paths like "C:foo". - return relative_to .. "/" .. rest - end -end - ---- Return the root directory for the given path. --- For example, for "c:\hello", returns "c:\" --- @param pathname string: pathname to use. --- @return string: The root of the given pathname. -function win32.root_of(pathname) - return (split_root(fs.absolute_name(pathname))) -end - ---- Create a wrapper to make a script executable from the command-line. --- @param file string: Pathname of script to be made executable. --- @param dest string: Directory where to put the wrapper. --- @param name string: rock name to be used in loader context. --- @param version string: rock version to be used in loader context. --- @return boolean or (nil, string): True if succeeded, or nil and --- an error message. -function win32.wrap_script(file, dest, name, version) - assert(type(file) == "string") - assert(type(dest) == "string") - - local base = dir.base_name(file) - local wrapname = fs.is_dir(dest) and dest.."/"..base or dest - wrapname = wrapname..".bat" - local lpath, lcpath = cfg.package_paths() - lpath = util.remove_path_dupes(lpath, ";") - lcpath = util.remove_path_dupes(lcpath, ";") - local wrapper = io.open(wrapname, "w") - if not wrapper then - return nil, "Could not open "..wrapname.." for writing." - end - wrapper:write("@echo off\n") - local lua = dir.path(cfg.variables["LUA_BINDIR"], cfg.lua_interpreter) - local ppaths = "package.path="..util.LQ(lpath..";").."..package.path; package.cpath="..util.LQ(lcpath..";").."..package.cpath" - local addctx = "local k,l,_=pcall(require,"..util.LQ("luarocks.loader")..") _=k and l.add_context("..util.LQ(name)..","..util.LQ(version)..")" - wrapper:write(fs.Qb(lua)..' -e '..fs.Qb(ppaths)..' -e '..fs.Qb(addctx)..' '..fs.Qb(file)..' %*\n') - wrapper:write("exit /b %ERRORLEVEL%\n") - wrapper:close() - return true -end - -function win32.is_actual_binary(name) - name = name:lower() - if name:match("%.bat$") or name:match("%.exe$") then - return true - end - return false -end - -function win32.copy_binary(filename, dest) - local ok, err = fs.copy(filename, dest) - if not ok then - return nil, err - end - local exe_pattern = "%.[Ee][Xx][Ee]$" - local base = dir.base_name(filename) - dest = dir.dir_name(dest) - if base:match(exe_pattern) then - base = base:gsub(exe_pattern, ".lua") - local helpname = dest.."/"..base - local helper = io.open(helpname, "w") - if not helper then - return nil, "Could not open "..helpname.." for writing." - end - helper:write('package.path=\"'..package.path:gsub("\\","\\\\")..';\"..package.path\n') - helper:write('package.cpath=\"'..package.path:gsub("\\","\\\\")..';\"..package.cpath\n') - helper:close() - end - return true -end - -function win32.chmod(filename, mode) - return true -end - -function win32.get_permissions(filename) - return "" -end - ---- Move a file on top of the other. --- The new file ceases to exist under its original name, --- and takes over the name of the old file. --- On Windows this is done by removing the original file and --- renaming the new file to its original name. --- @param old_file The name of the original file, --- which will be the new name of new_file. --- @param new_file The name of the new file, --- which will replace old_file. --- @return boolean or (nil, string): True if succeeded, or nil and --- an error message. -function win32.replace_file(old_file, new_file) - os.remove(old_file) - return os.rename(new_file, old_file) -end - ---- Test is file/dir is writable. --- Warning: testing if a file/dir is writable does not guarantee --- that it will remain writable and therefore it is no replacement --- for checking the result of subsequent operations. --- @param file string: filename to test --- @return boolean: true if file exists, false otherwise. -function win32.is_writable(file) - assert(file) - file = dir.normalize(file) - local result - local tmpname = 'tmpluarockstestwritable.deleteme' - if fs.is_dir(file) then - local file2 = dir.path(file, tmpname) - local fh = io.open(file2, 'wb') - result = fh ~= nil - if fh then fh:close() end - if result then - -- the above test might give a false positive when writing to - -- c:\program files\ because of VirtualStore redirection on Vista and up - -- So check whether it's really there - result = fs.exists(file2) - end - os.remove(file2) - else - local fh = io.open(file, 'r+b') - result = fh ~= nil - if fh then fh:close() end - end - return result -end - ---- Create a temporary directory. --- @param name string: name pattern to use for avoiding conflicts --- when creating temporary directory. --- @return string or (nil, string): name of temporary directory or (nil, error message) on failure. -function win32.make_temp_dir(name) - assert(type(name) == "string") - name = dir.normalize(name) - - local temp_dir = os.getenv("TMP") .. "/luarocks_" .. name:gsub(dir.separator, "_") .. "-" .. tostring(math.floor(math.random() * 10000)) - local ok, err = fs.make_dir(temp_dir) - if ok then - return temp_dir - else - return nil, err - end -end - -function win32.tmpname() - return os.getenv("TMP")..os.tmpname() -end - -return win32 diff --git a/Utils/luarocks/lua/luarocks/fs/win32/tools.lua b/Utils/luarocks/lua/luarocks/fs/win32/tools.lua deleted file mode 100644 index 4adc78d1e..000000000 --- a/Utils/luarocks/lua/luarocks/fs/win32/tools.lua +++ /dev/null @@ -1,227 +0,0 @@ - ---- fs operations implemented with third-party tools for Windows platform abstractions. --- Download http://unxutils.sourceforge.net/ for Windows GNU utilities --- used by this module. -local tools = {} - -local fs = require("luarocks.fs") -local dir = require("luarocks.dir") -local cfg = require("luarocks.cfg") - -local vars = cfg.variables - ---- Adds prefix to command to make it run from a directory. --- @param directory string: Path to a directory. --- @param cmd string: A command-line string. --- @return string: The command-line with prefix. -function tools.command_at(directory, cmd) - local drive = directory:match("^([A-Za-z]:)") - cmd = "cd " .. fs.Q(directory) .. " & " .. cmd - if drive then - cmd = drive .. " & " .. cmd - end - return cmd -end - ---- Create a directory if it does not already exist. --- If any of the higher levels in the path name does not exist --- too, they are created as well. --- @param directory string: pathname of directory to create. --- @return boolean: true on success, false on failure. -function tools.make_dir(directory) - assert(directory) - directory = dir.normalize(directory) - fs.execute_quiet(fs.Q(vars.MKDIR).." -p ", directory) - if not fs.is_dir(directory) then - return false, "failed making directory "..directory - end - return true -end - ---- Remove a directory if it is empty. --- Does not return errors (for example, if directory is not empty or --- if already does not exist) --- @param directory string: pathname of directory to remove. -function tools.remove_dir_if_empty(directory) - assert(directory) - fs.execute_quiet(fs.Q(vars.RMDIR), directory) -end - ---- Remove a directory if it is empty. --- Does not return errors (for example, if directory is not empty or --- if already does not exist) --- @param directory string: pathname of directory to remove. -function tools.remove_dir_tree_if_empty(directory) - assert(directory) - fs.execute_quiet(fs.Q(vars.RMDIR), directory) -end - ---- Copy a file. --- @param src string: Pathname of source --- @param dest string: Pathname of destination --- @return boolean or (boolean, string): true on success, false on failure, --- plus an error message. -function tools.copy(src, dest) - assert(src and dest) - if dest:match("[/\\]$") then dest = dest:sub(1, -2) end - local ok = fs.execute(fs.Q(vars.CP), src, dest) - if ok then - return true - else - return false, "Failed copying "..src.." to "..dest - end -end - ---- Recursively copy the contents of a directory. --- @param src string: Pathname of source --- @param dest string: Pathname of destination --- @return boolean or (boolean, string): true on success, false on failure, --- plus an error message. -function tools.copy_contents(src, dest) - assert(src and dest) - if fs.execute_quiet(fs.Q(vars.CP), "-dR", src.."\\*.*", dest) then - return true - else - return false, "Failed copying "..src.." to "..dest - end -end - ---- Delete a file or a directory and all its contents. --- For safety, this only accepts absolute paths. --- @param arg string: Pathname of source --- @return nil -function tools.delete(arg) - assert(arg) - assert(arg:match("^[a-zA-Z]?:?[\\/]")) - fs.execute_quiet("if exist "..fs.Q(arg.."\\").." ( RMDIR /S /Q "..fs.Q(arg).." ) else ( DEL /Q /F "..fs.Q(arg).." )") -end - ---- Recursively scan the contents of a directory. --- @param at string or nil: directory to scan (will be the current --- directory if none is given). --- @return table: an array of strings with the filenames representing --- the contents of a directory. Paths are returned with forward slashes. -function tools.find(at) - assert(type(at) == "string" or not at) - if not at then - at = fs.current_dir() - end - if not fs.is_dir(at) then - return {} - end - local result = {} - local pipe = io.popen(fs.command_at(at, fs.quiet_stderr(fs.Q(vars.FIND)))) - for file in pipe:lines() do - -- Windows find is a bit different - local first_two = file:sub(1,2) - if first_two == ".\\" or first_two == "./" then file=file:sub(3) end - if file ~= "." then - table.insert(result, (file:gsub("\\", "/"))) - end - end - pipe:close() - return result -end - ---- Compress files in a .zip archive. --- @param zipfile string: pathname of .zip archive to be created. --- @param ... Filenames to be stored in the archive are given as --- additional arguments. --- @return boolean: true on success, false on failure. -function tools.zip(zipfile, ...) - return fs.execute_quiet(fs.Q(vars.SEVENZ).." -aoa a -tzip", zipfile, ...) -end - ---- Uncompress files from a .zip archive. --- @param zipfile string: pathname of .zip archive to be extracted. --- @return boolean: true on success, false on failure. -function tools.unzip(zipfile) - assert(zipfile) - return fs.execute_quiet(fs.Q(vars.SEVENZ).." -aoa x", zipfile) -end - ---- Test is pathname is a directory. --- @param file string: pathname to test --- @return boolean: true if it is a directory, false otherwise. -function tools.is_dir(file) - assert(file) - return fs.execute_quiet("if not exist " .. fs.Q(file.."\\").." invalidcommandname") -end - ---- Test is pathname is a regular file. --- @param file string: pathname to test --- @return boolean: true if it is a regular file, false otherwise. -function tools.is_file(file) - assert(file) - return fs.execute(fs.Q(vars.TEST).." -f", file) -end - ---- Strip the last extension of a filename. --- Example: "foo.tar.gz" becomes "foo.tar". --- If filename has no dots, returns it unchanged. --- @param filename string: The file name to strip. --- @return string: The stripped name. -local function strip_extension(filename) - assert(type(filename) == "string") - return (filename:gsub("%.[^.]+$", "")) or filename -end - ---- Uncompress gzip file. --- @param archive string: Filename of archive. --- @return boolean : success status -local function gunzip(archive) - return fs.execute_quiet(fs.Q(vars.SEVENZ).." -aoa x", archive) -end - ---- Unpack an archive. --- Extract the contents of an archive, detecting its format by --- filename extension. --- @param archive string: Filename of archive. --- @return boolean or (boolean, string): true on success, false and an error message on failure. -function tools.unpack_archive(archive) - assert(type(archive) == "string") - - local ok - local sevenzx = fs.Q(vars.SEVENZ).." -aoa x" - if archive:match("%.tar%.gz$") then - ok = gunzip(archive) - if ok then - ok = fs.execute_quiet(sevenzx, strip_extension(archive)) - end - elseif archive:match("%.tgz$") then - ok = gunzip(archive) - if ok then - ok = fs.execute_quiet(sevenzx, strip_extension(archive)..".tar") - end - elseif archive:match("%.tar%.bz2$") then - ok = fs.execute_quiet(sevenzx, archive) - if ok then - ok = fs.execute_quiet(sevenzx, strip_extension(archive)) - end - elseif archive:match("%.zip$") then - ok = fs.execute_quiet(sevenzx, archive) - elseif archive:match("%.lua$") or archive:match("%.c$") then - -- Ignore .lua and .c files; they don't need to be extracted. - return true - else - return false, "Couldn't extract archive "..archive..": unrecognized filename extension" - end - if not ok then - return false, "Failed extracting "..archive - end - return true -end - ---- Test for existance of a file. --- @param file string: filename to test --- @return boolean: true if file exists, false otherwise. -function tools.exists(file) - assert(file) - return fs.execute_quiet("if not exist " .. fs.Q(file) .. " invalidcommandname") -end - -function tools.browser(url) - return fs.execute(cfg.web_browser..' "Starting docs..." '..fs.Q(url)) -end - -return tools diff --git a/Utils/luarocks/lua/luarocks/help.lua b/Utils/luarocks/lua/luarocks/help.lua deleted file mode 100644 index 871e97e99..000000000 --- a/Utils/luarocks/lua/luarocks/help.lua +++ /dev/null @@ -1,118 +0,0 @@ - ---- Module implementing the LuaRocks "help" command. --- This is a generic help display module, which --- uses a global table called "commands" to find commands --- to show help for; each command should be represented by a --- table containing "help" and "help_summary" fields. -local help = {} - -local util = require("luarocks.util") -local cfg = require("luarocks.cfg") -local dir = require("luarocks.dir") - -local program = util.this_program("luarocks") - -util.add_run_function(help) -help.help_summary = "Help on commands. Type '"..program.." help ' for more." - -help.help_arguments = "[]" -help.help = [[ - is the command to show help for. -]] - -local function print_banner() - util.printout("\nLuaRocks "..cfg.program_version..", a module deployment system for Lua") -end - -local function print_section(section) - util.printout("\n"..section) -end - -local function get_status(status) - if status then - return "ok" - else - return "not found" - end -end - ---- Driver function for the "help" command. --- @param command string or nil: command to show help for; if not --- given, help summaries for all commands are shown. --- @return boolean or (nil, string): true if there were no errors --- or nil and an error message if an invalid command was requested. -function help.command(flags, command) - if not command then - local conf = cfg.which_config() - print_banner() - print_section("NAME") - util.printout("\t"..program..[[ - ]]..program_description) - print_section("SYNOPSIS") - util.printout("\t"..program..[[ [--from= | --only-from=] [--to=] [VAR=VALUE]... [] ]]) - print_section("GENERAL OPTIONS") - util.printout([[ - These apply to all commands, as appropriate: - - --server= Fetch rocks/rockspecs from this server - (takes priority over config file) - --only-server= Fetch rocks/rockspecs from this server only - (overrides any entries in the config file) - --only-sources= Restrict downloads to paths matching the - given URL. - --tree= Which tree to operate on. - --local Use the tree in the user's home directory. - To enable it, see ']]..program..[[ help path'. - --verbose Display verbose output of commands executed. - --timeout= Timeout on network operations, in seconds. - 0 means no timeout (wait forever). - Default is ]]..tostring(cfg.connection_timeout)..[[.]]) - print_section("VARIABLES") - util.printout([[ - Variables from the "variables" table of the configuration file - can be overriden with VAR=VALUE assignments.]]) - print_section("COMMANDS") - for name, command in util.sortedpairs(commands) do - local cmd = require(command) - util.printout("", name) - util.printout("\t", cmd.help_summary) - end - print_section("CONFIGURATION") - util.printout("\tLua version: " .. cfg.lua_version) - util.printout("\tConfiguration files:") - util.printout("\t\tSystem: ".. dir.normalize(conf.system.file) .. " (" .. get_status(conf.system.ok) ..")") - if conf.user.file then - util.printout("\t\tUser : ".. dir.normalize(conf.user.file) .. " (" .. get_status(conf.user.ok) ..")\n") - else - util.printout("\t\tUser : disabled in this LuaRocks installation.\n") - end - util.printout("\tRocks trees in use: ") - for _, tree in ipairs(cfg.rocks_trees) do - if type(tree) == "string" then - util.printout("\t\t"..dir.normalize(tree)) - else - local name = tree.name and " (\""..tree.name.."\")" or "" - util.printout("\t\t"..dir.normalize(tree.root)..name) - end - end - else - command = command:gsub("-", "_") - local cmd = commands[command] and require(commands[command]) - if cmd then - local arguments = cmd.help_arguments or "" - print_banner() - print_section("NAME") - util.printout("\t"..program.." "..command.." - "..cmd.help_summary) - print_section("SYNOPSIS") - util.printout("\t"..program.." "..command.." "..arguments) - print_section("DESCRIPTION") - util.printout("",(cmd.help:gsub("\n","\n\t"):gsub("\n\t$",""))) - print_section("SEE ALSO") - util.printout("","'"..program.." help' for general options and configuration.\n") - else - return nil, "Unknown command: "..command - end - end - return true -end - -return help diff --git a/Utils/luarocks/lua/luarocks/index.lua b/Utils/luarocks/lua/luarocks/index.lua deleted file mode 100644 index e1f563ef2..000000000 --- a/Utils/luarocks/lua/luarocks/index.lua +++ /dev/null @@ -1,186 +0,0 @@ - ---- Module which builds the index.html page to be used in rocks servers. -local index = {} -package.loaded["luarocks.index"] = index - -local util = require("luarocks.util") -local fs = require("luarocks.fs") -local deps = require("luarocks.deps") -local persist = require("luarocks.persist") -local dir = require("luarocks.dir") -local manif = require("luarocks.manif") - -local ext_url_target = ' target="_blank"' - -local index_header = [[ - - - -Available rocks - - - - -

Available rocks

-

-Lua modules available from this location for use with LuaRocks: -

- -]] - -local index_package_begin = [[ - - - -]] - -local index_footer_begin = [[ -
-

$package - $summary
-

$detailed
-$externaldependencies -latest sources $homepage | License: $license

-
-]] - -local index_package_end = [[ -
-

-manifest file -]] -local index_manifest_ver = [[ -• Lua $VER manifest file (zip) -]] -local index_footer_end = [[ -

- - -]] - -function index.format_external_dependencies(rockspec) - if rockspec.external_dependencies then - local deplist = {} - local listed_set = {} - local plats = nil - for name, desc in util.sortedpairs(rockspec.external_dependencies) do - if name ~= "platforms" then - table.insert(deplist, name:lower()) - listed_set[name] = true - else - plats = desc - end - end - if plats then - for plat, entries in util.sortedpairs(plats) do - for name, desc in util.sortedpairs(entries) do - if not listed_set[name] then - table.insert(deplist, name:lower() .. " (on "..plat..")") - end - end - end - end - return '

External dependencies: ' .. table.concat(deplist, ', ').. '

' - else - return "" - end -end - -function index.make_index(repo) - if not fs.is_dir(repo) then - return nil, "Cannot access repository at "..repo - end - local manifest = manif.load_manifest(repo) - local out = io.open(dir.path(repo, "index.html"), "w") - - out:write(index_header) - for package, version_list in util.sortedpairs(manifest.repository) do - local latest_rockspec = nil - local output = index_package_begin - for version, data in util.sortedpairs(version_list, deps.compare_versions) do - local versions = {} - output = output..version..': ' - table.sort(data, function(a,b) return a.arch < b.arch end) - for _, item in ipairs(data) do - local file - if item.arch == 'rockspec' then - file = ("%s-%s.rockspec"):format(package, version) - if not latest_rockspec then latest_rockspec = file end - else - file = ("%s-%s.%s.rock"):format(package, version, item.arch) - end - table.insert(versions, ''..item.arch..'') - end - output = output .. table.concat(versions, ', ') .. '
' - end - output = output .. index_package_end - if latest_rockspec then - local rockspec = persist.load_into_table(dir.path(repo, latest_rockspec)) - local descript = rockspec.description or {} - local vars = { - anchor = package, - package = rockspec.package, - original = rockspec.source.url, - summary = descript.summary or "", - detailed = descript.detailed or "", - license = descript.license or "N/A", - homepage = descript.homepage and ('| project homepage') or "", - externaldependencies = index.format_external_dependencies(rockspec) - } - vars.detailed = vars.detailed:gsub("\n\n", "

"):gsub("%s+", " ") - vars.detailed = vars.detailed:gsub("(https?://[a-zA-Z0-9%.%%-_%+%[%]=%?&/$@;:]+)", '%1') - output = output:gsub("$(%w+)", vars) - else - output = output:gsub("$anchor", package) - output = output:gsub("$package", package) - output = output:gsub("$(%w+)", "") - end - out:write(output) - end - out:write(index_footer_begin) - for ver in util.lua_versions() do - out:write((index_manifest_ver:gsub("$VER", ver))) - end - out:write(index_footer_end) - out:close() -end - -return index diff --git a/Utils/luarocks/lua/luarocks/install.lua b/Utils/luarocks/lua/luarocks/install.lua deleted file mode 100644 index e28c24f08..000000000 --- a/Utils/luarocks/lua/luarocks/install.lua +++ /dev/null @@ -1,188 +0,0 @@ ---- Module implementing the LuaRocks "install" command. --- Installs binary rocks. -local install = {} -package.loaded["luarocks.install"] = install - -local path = require("luarocks.path") -local repos = require("luarocks.repos") -local fetch = require("luarocks.fetch") -local util = require("luarocks.util") -local fs = require("luarocks.fs") -local deps = require("luarocks.deps") -local manif = require("luarocks.manif") -local remove = require("luarocks.remove") -local cfg = require("luarocks.cfg") - -util.add_run_function(install) -install.help_summary = "Install a rock." - -install.help_arguments = "{| []}" - -install.help = [[ -Argument may be the name of a rock to be fetched from a repository -or a filename of a locally available rock. - ---keep Do not remove previously installed versions of the - rock after installing a new one. This behavior can - be made permanent by setting keep_other_versions=true - in the configuration file. - ---only-deps Installs only the dependencies of the rock. -]]..util.deps_mode_help() - - ---- Install a binary rock. --- @param rock_file string: local or remote filename of a rock. --- @param deps_mode: string: Which trees to check dependencies for: --- "one" for the current default tree, "all" for all trees, --- "order" for all trees with priority >= the current default, "none" for no trees. --- @return (string, string) or (nil, string, [string]): Name and version of --- installed rock if succeeded or nil and an error message followed by an error code. -function install.install_binary_rock(rock_file, deps_mode) - assert(type(rock_file) == "string") - - local name, version, arch = path.parse_name(rock_file) - if not name then - return nil, "Filename "..rock_file.." does not match format 'name-version-revision.arch.rock'." - end - - if arch ~= "all" and arch ~= cfg.arch then - return nil, "Incompatible architecture "..arch, "arch" - end - if repos.is_installed(name, version) then - repos.delete_version(name, version, deps_mode) - end - - local rollback = util.schedule_function(function() - fs.delete(path.install_dir(name, version)) - fs.remove_dir_if_empty(path.versions_dir(name)) - end) - - local ok, err, errcode = fetch.fetch_and_unpack_rock(rock_file, path.install_dir(name, version)) - if not ok then return nil, err, errcode end - - local rockspec, err, errcode = fetch.load_rockspec(path.rockspec_file(name, version)) - if err then - return nil, "Failed loading rockspec for installed package: "..err, errcode - end - - if deps_mode == "none" then - util.printerr("Warning: skipping dependency checks.") - else - ok, err, errcode = deps.check_external_deps(rockspec, "install") - if err then return nil, err, errcode end - end - - -- For compatibility with .rock files built with LuaRocks 1 - if not fs.exists(path.rock_manifest_file(name, version)) then - ok, err = manif.make_rock_manifest(name, version) - if err then return nil, err end - end - - if deps_mode ~= "none" then - ok, err, errcode = deps.fulfill_dependencies(rockspec, deps_mode) - if err then return nil, err, errcode end - end - - ok, err = repos.deploy_files(name, version, repos.should_wrap_bin_scripts(rockspec), deps_mode) - if err then return nil, err end - - util.remove_scheduled_function(rollback) - rollback = util.schedule_function(function() - repos.delete_version(name, version, deps_mode) - end) - - ok, err = repos.run_hook(rockspec, "post_install") - if err then return nil, err end - - util.announce_install(rockspec) - util.remove_scheduled_function(rollback) - return name, version -end - ---- Installs the dependencies of a binary rock. --- @param rock_file string: local or remote filename of a rock. --- @param deps_mode: string: Which trees to check dependencies for: --- "one" for the current default tree, "all" for all trees, --- "order" for all trees with priority >= the current default, "none" for no trees. --- @return (string, string) or (nil, string, [string]): Name and version of --- the rock whose dependencies were installed if succeeded or nil and an error message --- followed by an error code. -function install.install_binary_rock_deps(rock_file, deps_mode) - assert(type(rock_file) == "string") - - local name, version, arch = path.parse_name(rock_file) - if not name then - return nil, "Filename "..rock_file.." does not match format 'name-version-revision.arch.rock'." - end - - if arch ~= "all" and arch ~= cfg.arch then - return nil, "Incompatible architecture "..arch, "arch" - end - - local ok, err, errcode = fetch.fetch_and_unpack_rock(rock_file, path.install_dir(name, version)) - if not ok then return nil, err, errcode end - - local rockspec, err, errcode = fetch.load_rockspec(path.rockspec_file(name, version)) - if err then - return nil, "Failed loading rockspec for installed package: "..err, errcode - end - - ok, err, errcode = deps.fulfill_dependencies(rockspec, deps_mode) - if err then return nil, err, errcode end - - util.printout() - util.printout("Successfully installed dependencies for " ..name.." "..version) - - return name, version -end - ---- Driver function for the "install" command. --- @param name string: name of a binary rock. If an URL or pathname --- to a binary rock is given, fetches and installs it. If a rockspec or a --- source rock is given, forwards the request to the "build" command. --- If a package name is given, forwards the request to "search" and, --- if returned a result, installs the matching rock. --- @param version string: When passing a package name, a version number --- may also be given. --- @return boolean or (nil, string, exitcode): True if installation was --- successful, nil and an error message otherwise. exitcode is optionally returned. -function install.command(flags, name, version) - if type(name) ~= "string" then - return nil, "Argument missing. "..util.see_help("install") - end - - local ok, err = fs.check_command_permissions(flags) - if not ok then return nil, err, cfg.errorcodes.PERMISSIONDENIED end - - if name:match("%.rockspec$") or name:match("%.src%.rock$") then - local build = require("luarocks.build") - return build.command(flags, name) - elseif name:match("%.rock$") then - if flags["only-deps"] then - ok, err = install.install_binary_rock_deps(name, deps.get_deps_mode(flags)) - else - ok, err = install.install_binary_rock(name, deps.get_deps_mode(flags)) - end - if not ok then return nil, err end - name, version = ok, err - - if (not flags["only-deps"]) and (not flags["keep"]) and not cfg.keep_other_versions then - local ok, err = remove.remove_other_versions(name, version, flags["force"], flags["force-fast"]) - if not ok then util.printerr(err) end - end - - manif.check_dependencies(nil, deps.get_deps_mode(flags)) - return name, version - else - local search = require("luarocks.search") - local url, err = search.find_suitable_rock(search.make_query(name:lower(), version)) - if not url then - return nil, err - end - util.printout("Installing "..url) - return install.command(flags, url) - end -end - -return install diff --git a/Utils/luarocks/lua/luarocks/lint.lua b/Utils/luarocks/lua/luarocks/lint.lua deleted file mode 100644 index 0fd81a203..000000000 --- a/Utils/luarocks/lua/luarocks/lint.lua +++ /dev/null @@ -1,55 +0,0 @@ - ---- Module implementing the LuaRocks "lint" command. --- Utility function that checks syntax of the rockspec. -local lint = {} -package.loaded["luarocks.lint"] = lint - -local util = require("luarocks.util") -local download = require("luarocks.download") -local fetch = require("luarocks.fetch") - -util.add_run_function(lint) -lint.help_summary = "Check syntax of a rockspec." -lint.help_arguments = "" -lint.help = [[ -This is a utility function that checks the syntax of a rockspec. - -It returns success or failure if the text of a rockspec is -syntactically correct. -]] - -function lint.command(flags, input) - if not input then - return nil, "Argument missing. "..util.see_help("lint") - end - - local filename = input - if not input:match(".rockspec$") then - local err - filename, err = download.download("rockspec", input:lower()) - if not filename then - return nil, err - end - end - - local rs, err = fetch.load_local_rockspec(filename) - if not rs then - return nil, "Failed loading rockspec: "..err - end - - local ok = true - - -- This should have been done in the type checker, - -- but it would break compatibility of other commands. - -- Making 'lint' alone be stricter shouldn't be a problem, - -- because extra-strict checks is what lint-type commands - -- are all about. - if not rs.description.license then - util.printerr("Rockspec has no license field.") - ok = false - end - - return ok, ok or filename.." failed consistency checks." -end - -return lint diff --git a/Utils/luarocks/lua/luarocks/list.lua b/Utils/luarocks/lua/luarocks/list.lua deleted file mode 100644 index c65e058f9..000000000 --- a/Utils/luarocks/lua/luarocks/list.lua +++ /dev/null @@ -1,97 +0,0 @@ - ---- Module implementing the LuaRocks "list" command. --- Lists currently installed rocks. -local list = {} -package.loaded["luarocks.list"] = list - -local search = require("luarocks.search") -local deps = require("luarocks.deps") -local cfg = require("luarocks.cfg") -local util = require("luarocks.util") -local path = require("luarocks.path") - -util.add_run_function(list) -list.help_summary = "List currently installed rocks." -list.help_arguments = "[--porcelain] " -list.help = [[ - is a substring of a rock name to filter by. - ---outdated List only rocks for which there is a - higher version available in the rocks server. - ---porcelain Produce machine-friendly output. -]] - -local function check_outdated(trees, query) - local results_installed = {} - for _, tree in ipairs(trees) do - search.manifest_search(results_installed, path.rocks_dir(tree), query) - end - local outdated = {} - for name, versions in util.sortedpairs(results_installed) do - versions = util.keys(versions) - table.sort(versions, deps.compare_versions) - local latest_installed = versions[1] - - local query_available = search.make_query(name:lower()) - query.exact_name = true - local results_available, err = search.search_repos(query_available) - - if results_available[name] then - local available_versions = util.keys(results_available[name]) - table.sort(available_versions, deps.compare_versions) - local latest_available = available_versions[1] - local latest_available_repo = results_available[name][latest_available][1].repo - - if deps.compare_versions(latest_available, latest_installed) then - table.insert(outdated, { name = name, installed = latest_installed, available = latest_available, repo = latest_available_repo }) - end - end - end - return outdated -end - -local function list_outdated(trees, query, porcelain) - util.title("Outdated rocks:", porcelain) - local outdated = check_outdated(trees, query) - for _, item in ipairs(outdated) do - if porcelain then - util.printout(item.name, item.installed, item.available, item.repo) - else - util.printout(item.name) - util.printout(" "..item.installed.." < "..item.available.." at "..item.repo) - util.printout() - end - end - return true -end - ---- Driver function for "list" command. --- @param filter string or nil: A substring of a rock name to filter by. --- @param version string or nil: a version may also be passed. --- @return boolean: True if succeeded, nil on errors. -function list.command(flags, filter, version) - local query = search.make_query(filter and filter:lower() or "", version) - query.exact_name = false - local trees = cfg.rocks_trees - if flags["tree"] then - trees = { flags["tree"] } - end - - if flags["outdated"] then - return list_outdated(trees, query, flags["porcelain"]) - end - - local results = {} - for _, tree in ipairs(trees) do - local ok, err, errcode = search.manifest_search(results, path.rocks_dir(tree), query) - if not ok and errcode ~= "open" then - util.warning(err) - end - end - util.title("Installed rocks:", flags["porcelain"]) - search.print_results(results, flags["porcelain"]) - return true -end - -return list diff --git a/Utils/luarocks/lua/luarocks/loader.lua b/Utils/luarocks/lua/luarocks/loader.lua deleted file mode 100644 index 874bc10c3..000000000 --- a/Utils/luarocks/lua/luarocks/loader.lua +++ /dev/null @@ -1,249 +0,0 @@ - ---- A module which installs a Lua package loader that is LuaRocks-aware. --- This loader uses dependency information from the LuaRocks tree to load --- correct versions of modules. It does this by constructing a "context" --- table in the environment, which records which versions of packages were --- used to load previous modules, so that the loader chooses versions --- that are declared to be compatible with the ones loaded earlier. -local loaders = package.loaders or package.searchers -local package, require, ipairs, table, type, next, tostring, error = - package, require, ipairs, table, type, next, tostring, error -local unpack = unpack or table.unpack - ---module("luarocks.loader") -local loader = {} -package.loaded["luarocks.loader"] = loader - -local cfg = require("luarocks.cfg") -cfg.init_package_paths() - -local path = require("luarocks.path") -local manif_core = require("luarocks.manif_core") -local deps = require("luarocks.deps") -local util = require("luarocks.util") - --- Workaround for wrappers produced by older versions of LuaRocks -local temporary_global = false -if luarocks then - -- The site_config.lua file generated by old versions uses module(), - -- so it produces a global `luarocks` table. Since we have the table, - -- add the `loader` field to make the old wrappers happy. - luarocks.loader = loader -else - -- When a new version is installed on top of an old version, - -- site_config.lua may be replaced, and then it no longer creates - -- a global. - -- Detect when being called via -lluarocks.loader; this is - -- most likely a wrapper. - local info = debug.getinfo(2, "nS") - if info.what == "C" and not info.name then - luarocks = { loader = loader } - temporary_global = true - -- For the other half of this hack, - -- see the next use of `temporary_global` below. - end -end - -loader.context = {} - --- Contains a table when rocks trees are loaded, --- or 'false' to indicate rocks trees failed to load. --- 'nil' indicates rocks trees were not attempted to be loaded yet. -loader.rocks_trees = nil - -local function load_rocks_trees() - local any_ok = false - local trees = {} - for _, tree in ipairs(cfg.rocks_trees) do - local manifest, err = manif_core.load_local_manifest(path.rocks_dir(tree)) - if manifest then - any_ok = true - table.insert(trees, {tree=tree, manifest=manifest}) - end - end - if not any_ok then - loader.rocks_trees = false - return false - end - loader.rocks_trees = trees - return true -end - ---- Process the dependencies of a package to determine its dependency --- chain for loading modules. --- @param name string: The name of an installed rock. --- @param version string: The version of the rock, in string format -function loader.add_context(name, version) - -- assert(type(name) == "string") - -- assert(type(version) == "string") - - if temporary_global then - -- The first thing a wrapper does is to call add_context. - -- From here on, it's safe to clean the global environment. - luarocks = nil - temporary_global = false - end - - if loader.context[name] then - return - end - loader.context[name] = version - - if not loader.rocks_trees and not load_rocks_trees() then - return nil - end - - for _, tree in ipairs(loader.rocks_trees) do - local manifest = tree.manifest - - local pkgdeps - if manifest.dependencies and manifest.dependencies[name] then - pkgdeps = manifest.dependencies[name][version] - end - if not pkgdeps then - return nil - end - for _, dep in ipairs(pkgdeps) do - local pkg, constraints = dep.name, dep.constraints - - for _, tree in ipairs(loader.rocks_trees) do - local entries = tree.manifest.repository[pkg] - if entries then - for version, pkgs in util.sortedpairs(entries, deps.compare_versions) do - if (not constraints) or deps.match_constraints(deps.parse_version(version), constraints) then - loader.add_context(pkg, version) - end - end - end - end - end - end -end - ---- Internal sorting function. --- @param a table: A provider table. --- @param b table: Another provider table. --- @return boolean: True if the version of a is greater than that of b. -local function sort_versions(a,b) - return a.version > b.version -end - ---- Request module to be loaded through other loaders, --- once the proper name of the module has been determined. --- For example, in case the module "socket.core" has been requested --- to the LuaRocks loader and it determined based on context that --- the version 2.0.2 needs to be loaded and it is not the current --- version, the module requested for the other loaders will be --- "socket.core_2_0_2". --- @param module The module name requested by the user, such as "socket.core" --- @param name The rock name, such as "luasocket" --- @param version The rock version, such as "2.0.2-1" --- @param module_name The actual module name, such as "socket.core" or "socket.core_2_0_2". --- @return table or (nil, string): The module table as returned by some other loader, --- or nil followed by an error message if no other loader managed to load the module. -local function call_other_loaders(module, name, version, module_name) - for i, a_loader in ipairs(loaders) do - if a_loader ~= loader.luarocks_loader then - local results = { a_loader(module_name) } - if type(results[1]) == "function" then - return unpack(results) - end - end - end - return "Failed loading module "..module.." in LuaRocks rock "..name.." "..version -end - ---- Search for a module in the rocks trees --- @param module string: module name (eg. "socket.core") --- @param filter_file_name function(string, string, string, string, number): --- a function that takes the module file name (eg "socket/core.so"), the rock name --- (eg "luasocket"), the version (eg "2.0.2-1"), the path of the rocks tree --- (eg "/usr/local"), and the numeric index of the matching entry, so the --- filter function can know if the matching module was the first entry or not. --- @return string, string, string, (string or table): --- * name of the rock containing the module (eg. "luasocket") --- * version of the rock (eg. "2.0.2-1") --- * return value of filter_file_name --- * tree of the module (string or table in `rocks_trees` format) -local function select_module(module, filter_file_name) - --assert(type(module) == "string") - --assert(type(filter_module_name) == "function") - - if not loader.rocks_trees and not load_rocks_trees() then - return nil - end - - local providers = {} - for _, tree in ipairs(loader.rocks_trees) do - local entries = tree.manifest.modules[module] - if entries then - for i, entry in ipairs(entries) do - local name, version = entry:match("^([^/]*)/(.*)$") - local file_name = tree.manifest.repository[name][version][1].modules[module] - if type(file_name) ~= "string" then - error("Invalid data in manifest file for module "..tostring(module).." (invalid data for "..tostring(name).." "..tostring(version)..")") - end - file_name = filter_file_name(file_name, name, version, tree.tree, i) - if loader.context[name] == version then - return name, version, file_name - end - version = deps.parse_version(version) - table.insert(providers, {name = name, version = version, module_name = file_name, tree = tree}) - end - end - end - - if next(providers) then - table.sort(providers, sort_versions) - local first = providers[1] - return first.name, first.version.string, first.module_name, first.tree - end -end - ---- Search for a module --- @param module string: module name (eg. "socket.core") --- @return string, string, string, (string or table): --- * name of the rock containing the module (eg. "luasocket") --- * version of the rock (eg. "2.0.2-1") --- * name of the module (eg. "socket.core", or "socket.core_2_0_2" if file is stored versioned). --- * tree of the module (string or table in `rocks_trees` format) -local function pick_module(module) - return - select_module(module, function(file_name, name, version, tree, i) - if i > 1 then - file_name = path.versioned_name(file_name, "", name, version) - end - return path.path_to_module(file_name) - end) -end - ---- Return the pathname of the file that would be loaded for a module. --- @param module string: module name (eg. "socket.core") --- @return string: filename of the module (eg. "/usr/local/lib/lua/5.1/socket/core.so") -function loader.which(module) - local _, _, file_name = select_module(module, path.which_i) - return file_name -end - ---- Package loader for LuaRocks support. --- A module is searched in installed rocks that match the --- current LuaRocks context. If module is not part of the --- context, or if a context has not yet been set, the module --- in the package with the highest version is used. --- @param module string: The module name, like in plain require(). --- @return table: The module table (typically), like in plain --- require(). See require() --- in the Lua reference manual for details. -function loader.luarocks_loader(module) - local name, version, module_name = pick_module(module) - if not name then - return "No LuaRocks module found for "..module - else - loader.add_context(name, version) - return call_other_loaders(module, name, version, module_name) - end -end - -table.insert(loaders, 1, loader.luarocks_loader) - -return loader diff --git a/Utils/luarocks/lua/luarocks/make.lua b/Utils/luarocks/lua/luarocks/make.lua deleted file mode 100644 index 15167c1eb..000000000 --- a/Utils/luarocks/lua/luarocks/make.lua +++ /dev/null @@ -1,92 +0,0 @@ - ---- Module implementing the LuaRocks "make" command. --- Builds sources in the current directory, but unlike "build", --- it does not fetch sources, etc., assuming everything is --- available in the current directory. -local make = {} -package.loaded["luarocks.make"] = make - -local build = require("luarocks.build") -local fs = require("luarocks.fs") -local util = require("luarocks.util") -local cfg = require("luarocks.cfg") -local fetch = require("luarocks.fetch") -local pack = require("luarocks.pack") -local remove = require("luarocks.remove") -local deps = require("luarocks.deps") -local manif = require("luarocks.manif") - -util.add_run_function(make) -make.help_summary = "Compile package in current directory using a rockspec." -make.help_arguments = "[--pack-binary-rock] []" -make.help = [[ -Builds sources in the current directory, but unlike "build", -it does not fetch sources, etc., assuming everything is -available in the current directory. If no argument is given, -it looks for a rockspec in the current directory and in "rockspec/" -and "rockspecs/" subdirectories, picking the rockspec with newest version -or without version name. If rockspecs for different rocks are found -or there are several rockspecs without version, you must specify which to use, -through the command-line. - -This command is useful as a tool for debugging rockspecs. -To install rocks, you'll normally want to use the "install" and -"build" commands. See the help on those for details. - ---pack-binary-rock Do not install rock. Instead, produce a .rock file - with the contents of compilation in the current - directory. - ---keep Do not remove previously installed versions of the - rock after installing a new one. This behavior can - be made permanent by setting keep_other_versions=true - in the configuration file. - ---branch= Override the `source.branch` field in the loaded - rockspec. Allows to specify a different branch to - fetch. Particularly for SCM rocks. - -]] - ---- Driver function for "make" command. --- @param name string: A local rockspec. --- @return boolean or (nil, string, exitcode): True if build was successful; nil and an --- error message otherwise. exitcode is optionally returned. -function make.command(flags, rockspec) - assert(type(rockspec) == "string" or not rockspec) - - if not rockspec then - local err - rockspec, err = util.get_default_rockspec() - if not rockspec then - return nil, err - end - end - if not rockspec:match("rockspec$") then - return nil, "Invalid argument: 'make' takes a rockspec as a parameter. "..util.see_help("make") - end - - if flags["pack-binary-rock"] then - local rspec, err, errcode = fetch.load_rockspec(rockspec) - if not rspec then - return nil, err - end - return pack.pack_binary_rock(rspec.name, rspec.version, build.build_rockspec, rockspec, false, true, deps.get_deps_mode(flags)) - else - local ok, err = fs.check_command_permissions(flags) - if not ok then return nil, err, cfg.errorcodes.PERMISSIONDENIED end - ok, err = build.build_rockspec(rockspec, false, true, deps.get_deps_mode(flags)) - if not ok then return nil, err end - local name, version = ok, err - - if (not flags["keep"]) and not cfg.keep_other_versions then - local ok, err = remove.remove_other_versions(name, version, flags["force"], flags["force-fast"]) - if not ok then util.printerr(err) end - end - - manif.check_dependencies(nil, deps.get_deps_mode(flags)) - return name, version - end -end - -return make diff --git a/Utils/luarocks/lua/luarocks/make_manifest.lua b/Utils/luarocks/lua/luarocks/make_manifest.lua deleted file mode 100644 index c39c2939f..000000000 --- a/Utils/luarocks/lua/luarocks/make_manifest.lua +++ /dev/null @@ -1,53 +0,0 @@ - ---- Module implementing the luarocks-admin "make_manifest" command. --- Compile a manifest file for a repository. -local make_manifest = {} -package.loaded["luarocks.make_manifest"] = make_manifest - -local manif = require("luarocks.manif") -local index = require("luarocks.index") -local cfg = require("luarocks.cfg") -local util = require("luarocks.util") -local deps = require("luarocks.deps") -local fs = require("luarocks.fs") -local dir = require("luarocks.dir") - -util.add_run_function(make_manifest) -make_manifest.help_summary = "Compile a manifest file for a repository." - -make_manifest.help = [[ -, if given, is a local repository pathname. - ---local-tree If given, do not write versioned versions of the manifest file. - Use this when rebuilding the manifest of a local rocks tree. -]] - ---- Driver function for "make_manifest" command. --- @param repo string or nil: Pathname of a local repository. If not given, --- the default local repository configured as cfg.rocks_dir is used. --- @return boolean or (nil, string): True if manifest was generated, --- or nil and an error message. -function make_manifest.command(flags, repo) - assert(type(repo) == "string" or not repo) - repo = repo or cfg.rocks_dir - - util.printout("Making manifest for "..repo) - - if repo:match("/lib/luarocks") and not flags["local-tree"] then - util.warning("This looks like a local rocks tree, but you did not pass --local-tree.") - end - - local ok, err = manif.make_manifest(repo, deps.get_deps_mode(flags), not flags["local-tree"]) - if ok and not flags["local-tree"] then - util.printout("Generating index.html for "..repo) - index.make_index(repo) - end - if flags["local-tree"] then - for luaver in util.lua_versions() do - fs.delete(dir.path(repo, "manifest-"..luaver)) - end - end - return ok, err -end - -return make_manifest diff --git a/Utils/luarocks/lua/luarocks/manif.lua b/Utils/luarocks/lua/luarocks/manif.lua deleted file mode 100644 index 88a13f107..000000000 --- a/Utils/luarocks/lua/luarocks/manif.lua +++ /dev/null @@ -1,628 +0,0 @@ ---- Module for handling manifest files and tables. --- Manifest files describe the contents of a LuaRocks tree or server. --- They are loaded into manifest tables, which are then used for --- performing searches, matching dependencies, etc. -local manif = {} -package.loaded["luarocks.manif"] = manif - -local manif_core = require("luarocks.manif_core") -local persist = require("luarocks.persist") -local fetch = require("luarocks.fetch") -local dir = require("luarocks.dir") -local fs = require("luarocks.fs") -local search = require("luarocks.search") -local util = require("luarocks.util") -local cfg = require("luarocks.cfg") -local path = require("luarocks.path") -local repos = require("luarocks.repos") -local deps = require("luarocks.deps") - -manif.rock_manifest_cache = {} - ---- Commit a table to disk in given local path. --- @param where string: The directory where the table should be saved. --- @param name string: The filename. --- @param tbl table: The table to be saved. --- @return boolean or (nil, string): true if successful, or nil and a --- message in case of errors. -local function save_table(where, name, tbl) - assert(type(where) == "string") - assert(type(name) == "string") - assert(type(tbl) == "table") - - local filename = dir.path(where, name) - local ok, err = persist.save_from_table(filename..".tmp", tbl) - if ok then - ok, err = fs.replace_file(filename, filename..".tmp") - end - return ok, err -end - -function manif.load_rock_manifest(name, version, root) - assert(type(name) == "string") - assert(type(version) == "string") - - local name_version = name.."/"..version - if manif.rock_manifest_cache[name_version] then - return manif.rock_manifest_cache[name_version].rock_manifest - end - local pathname = path.rock_manifest_file(name, version, root) - local rock_manifest = persist.load_into_table(pathname) - if not rock_manifest then return nil end - manif.rock_manifest_cache[name_version] = rock_manifest - return rock_manifest.rock_manifest -end - -function manif.make_rock_manifest(name, version) - local install_dir = path.install_dir(name, version) - local tree = {} - for _, file in ipairs(fs.find(install_dir)) do - local full_path = dir.path(install_dir, file) - local walk = tree - local last - local last_name - for name in file:gmatch("[^/]+") do - local next = walk[name] - if not next then - next = {} - walk[name] = next - end - last = walk - last_name = name - walk = next - end - if fs.is_file(full_path) then - local sum, err = fs.get_md5(full_path) - if not sum then - return nil, "Failed producing checksum: "..tostring(err) - end - last[last_name] = sum - end - end - local rock_manifest = { rock_manifest=tree } - manif.rock_manifest_cache[name.."/"..version] = rock_manifest - save_table(install_dir, "rock_manifest", rock_manifest ) -end - -local function fetch_manifest_from(repo_url, filename) - local url = dir.path(repo_url, filename) - local name = repo_url:gsub("[/:]","_") - local cache_dir = dir.path(cfg.local_cache, name) - local ok = fs.make_dir(cache_dir) - if not ok then - return nil, "Failed creating temporary cache directory "..cache_dir - end - local file, err, errcode = fetch.fetch_url(url, dir.path(cache_dir, filename), true) - if not file then - return nil, "Failed fetching manifest for "..repo_url..(err and " - "..err or ""), errcode - end - return file -end - ---- Load a local or remote manifest describing a repository. --- All functions that use manifest tables assume they were obtained --- through either this function or load_local_manifest. --- @param repo_url string: URL or pathname for the repository. --- @param lua_version string: Lua version in "5.x" format, defaults to installed version. --- @return table or (nil, string, [string]): A table representing the manifest, --- or nil followed by an error message and an optional error code. -function manif.load_manifest(repo_url, lua_version) - assert(type(repo_url) == "string") - assert(type(lua_version) == "string" or not lua_version) - lua_version = lua_version or cfg.lua_version - - local cached_manifest = manif_core.get_cached_manifest(repo_url, lua_version) - if cached_manifest then - return cached_manifest - end - - local filenames = { - "manifest-"..lua_version..".zip", - "manifest-"..lua_version, - "manifest", - } - - local protocol, repodir = dir.split_url(repo_url) - local pathname - if protocol == "file" then - for _, filename in ipairs(filenames) do - pathname = dir.path(repodir, filename) - if fs.exists(pathname) then - break - end - end - else - local err, errcode - for _, filename in ipairs(filenames) do - pathname, err, errcode = fetch_manifest_from(repo_url, filename) - if pathname then - break - end - end - if not pathname then - return nil, err, errcode - end - end - if pathname:match(".*%.zip$") then - pathname = fs.absolute_name(pathname) - local dir = dir.dir_name(pathname) - fs.change_dir(dir) - local nozip = pathname:match("(.*)%.zip$") - fs.delete(nozip) - local ok = fs.unzip(pathname) - fs.pop_dir() - if not ok then - fs.delete(pathname) - fs.delete(pathname..".timestamp") - return nil, "Failed extracting manifest file" - end - pathname = nozip - end - return manif_core.manifest_loader(pathname, repo_url, lua_version) -end - ---- Update storage table to account for items provided by a package. --- @param storage table: a table storing items in the following format: --- keys are item names and values are arrays of packages providing each item, --- where a package is specified as string `name/version`. --- @param items table: a table mapping item names to paths. --- @param name string: package name. --- @param version string: package version. -local function store_package_items(storage, name, version, items) - assert(type(storage) == "table") - assert(type(items) == "table") - assert(type(name) == "string") - assert(type(version) == "string") - - local package_identifier = name.."/"..version - - for item_name, path in pairs(items) do - if not storage[item_name] then - storage[item_name] = {} - end - - table.insert(storage[item_name], package_identifier) - end -end - ---- Update storage table removing items provided by a package. --- @param storage table: a table storing items in the following format: --- keys are item names and values are arrays of packages providing each item, --- where a package is specified as string `name/version`. --- @param items table: a table mapping item names to paths. --- @param name string: package name. --- @param version string: package version. -local function remove_package_items(storage, name, version, items) - assert(type(storage) == "table") - assert(type(items) == "table") - assert(type(name) == "string") - assert(type(version) == "string") - - local package_identifier = name.."/"..version - - for item_name, path in pairs(items) do - local all_identifiers = storage[item_name] - - for i, identifier in ipairs(all_identifiers) do - if identifier == package_identifier then - table.remove(all_identifiers, i) - break - end - end - - if #all_identifiers == 0 then - storage[item_name] = nil - end - end -end - ---- Sort function for ordering rock identifiers in a manifest's --- modules table. Rocks are ordered alphabetically by name, and then --- by version which greater first. --- @param a string: Version to compare. --- @param b string: Version to compare. --- @return boolean: The comparison result, according to the --- rule outlined above. -local function sort_pkgs(a, b) - assert(type(a) == "string") - assert(type(b) == "string") - - local na, va = a:match("(.*)/(.*)$") - local nb, vb = b:match("(.*)/(.*)$") - - return (na == nb) and deps.compare_versions(va, vb) or na < nb -end - ---- Sort items of a package matching table by version number (higher versions first). --- @param tbl table: the package matching table: keys should be strings --- and values arrays of strings with packages names in "name/version" format. -local function sort_package_matching_table(tbl) - assert(type(tbl) == "table") - - if next(tbl) then - for item, pkgs in pairs(tbl) do - if #pkgs > 1 then - table.sort(pkgs, sort_pkgs) - -- Remove duplicates from the sorted array. - local prev = nil - local i = 1 - while pkgs[i] do - local curr = pkgs[i] - if curr == prev then - table.remove(pkgs, i) - else - prev = curr - i = i + 1 - end - end - end - end - end -end - ---- Process the dependencies of a manifest table to determine its dependency --- chains for loading modules. The manifest dependencies information is filled --- and any dependency inconsistencies or missing dependencies are reported to --- standard error. --- @param manifest table: a manifest table. --- @param deps_mode string: Dependency mode: "one" for the current default tree, --- "all" for all trees, "order" for all trees with priority >= the current default, --- "none" for no trees. -local function update_dependencies(manifest, deps_mode) - assert(type(manifest) == "table") - assert(type(deps_mode) == "string") - - for pkg, versions in pairs(manifest.repository) do - for version, repositories in pairs(versions) do - for _, repo in ipairs(repositories) do - if repo.arch == "installed" then - repo.dependencies = {} - deps.scan_deps(repo.dependencies, manifest, pkg, version, deps_mode) - repo.dependencies[pkg] = nil - end - end - end - end -end - ---- Filter manifest table by Lua version, removing rockspecs whose Lua version --- does not match. --- @param manifest table: a manifest table. --- @param lua_version string or nil: filter by Lua version --- @param repodir string: directory of repository being scanned --- @param cache table: temporary rockspec cache table -local function filter_by_lua_version(manifest, lua_version, repodir, cache) - assert(type(manifest) == "table") - assert(type(repodir) == "string") - assert((not cache) or type(cache) == "table") - - cache = cache or {} - lua_version = deps.parse_version(lua_version) - for pkg, versions in pairs(manifest.repository) do - local to_remove = {} - for version, repositories in pairs(versions) do - for _, repo in ipairs(repositories) do - if repo.arch == "rockspec" then - local pathname = dir.path(repodir, pkg.."-"..version..".rockspec") - local rockspec, err = cache[pathname] - if not rockspec then - rockspec, err = fetch.load_local_rockspec(pathname, true) - end - if rockspec then - cache[pathname] = rockspec - for _, dep in ipairs(rockspec.dependencies) do - if dep.name == "lua" then - if not deps.match_constraints(lua_version, dep.constraints) then - table.insert(to_remove, version) - end - break - end - end - else - util.printerr("Error loading rockspec for "..pkg.." "..version..": "..err) - end - end - end - end - if next(to_remove) then - for _, incompat in ipairs(to_remove) do - versions[incompat] = nil - end - if not next(versions) then - manifest.repository[pkg] = nil - end - end - end -end - ---- Store search results in a manifest table. --- @param results table: The search results as returned by search.disk_search. --- @param manifest table: A manifest table (must contain repository, modules, commands tables). --- It will be altered to include the search results. --- @return boolean or (nil, string): true in case of success, or nil followed by an error message. -local function store_results(results, manifest) - assert(type(results) == "table") - assert(type(manifest) == "table") - - for name, versions in pairs(results) do - local pkgtable = manifest.repository[name] or {} - for version, entries in pairs(versions) do - local versiontable = {} - for _, entry in ipairs(entries) do - local entrytable = {} - entrytable.arch = entry.arch - if entry.arch == "installed" then - local rock_manifest = manif.load_rock_manifest(name, version) - if not rock_manifest then - return nil, "rock_manifest file not found for "..name.." "..version.." - not a LuaRocks 2 tree?" - end - - entrytable.modules = repos.package_modules(name, version) - store_package_items(manifest.modules, name, version, entrytable.modules) - entrytable.commands = repos.package_commands(name, version) - store_package_items(manifest.commands, name, version, entrytable.commands) - end - table.insert(versiontable, entrytable) - end - pkgtable[version] = versiontable - end - manifest.repository[name] = pkgtable - end - sort_package_matching_table(manifest.modules) - sort_package_matching_table(manifest.commands) - return true -end - ---- Scan a LuaRocks repository and output a manifest file. --- A file called 'manifest' will be written in the root of the given --- repository directory. --- @param repo A local repository directory. --- @param deps_mode string: Dependency mode: "one" for the current default tree, --- "all" for all trees, "order" for all trees with priority >= the current default, --- "none" for the default dependency mode from the configuration. --- @param remote boolean: 'true' if making a manifest for a rocks server. --- @return boolean or (nil, string): True if manifest was generated, --- or nil and an error message. -function manif.make_manifest(repo, deps_mode, remote) - assert(type(repo) == "string") - assert(type(deps_mode) == "string") - - if deps_mode == "none" then deps_mode = cfg.deps_mode end - - if not fs.is_dir(repo) then - return nil, "Cannot access repository at "..repo - end - - local query = search.make_query("") - query.exact_name = false - query.arch = "any" - local results = search.disk_search(repo, query) - local manifest = { repository = {}, modules = {}, commands = {} } - - manif_core.cache_manifest(repo, nil, manifest) - - local ok, err = store_results(results, manifest) - if not ok then return nil, err end - - if remote then - local cache = {} - for luaver in util.lua_versions() do - local vmanifest = { repository = {}, modules = {}, commands = {} } - local ok, err = store_results(results, vmanifest) - filter_by_lua_version(vmanifest, luaver, repo, cache) - save_table(repo, "manifest-"..luaver, vmanifest) - end - else - update_dependencies(manifest, deps_mode) - end - - return save_table(repo, "manifest", manifest) -end - ---- Update manifest file for a local repository --- adding information about a version of a package installed in that repository. --- @param name string: Name of a package from the repository. --- @param version string: Version of a package from the repository. --- @param repo string or nil: Pathname of a local repository. If not given, --- the default local repository is used. --- @param deps_mode string: Dependency mode: "one" for the current default tree, --- "all" for all trees, "order" for all trees with priority >= the current default, --- "none" for using the default dependency mode from the configuration. --- @return boolean or (nil, string): True if manifest was updated successfully, --- or nil and an error message. -function manif.add_to_manifest(name, version, repo, deps_mode) - assert(type(name) == "string") - assert(type(version) == "string") - local rocks_dir = path.rocks_dir(repo or cfg.root_dir) - assert(type(deps_mode) == "string") - - if deps_mode == "none" then deps_mode = cfg.deps_mode end - - local manifest, err = manif_core.load_local_manifest(rocks_dir) - if not manifest then - util.printerr("No existing manifest. Attempting to rebuild...") - -- Manifest built by `manif.make_manifest` should already - -- include information about given name and version, - -- no need to update it. - return manif.make_manifest(rocks_dir, deps_mode) - end - - local results = {[name] = {[version] = {{arch = "installed", repo = rocks_dir}}}} - - local ok, err = store_results(results, manifest) - if not ok then return nil, err end - - update_dependencies(manifest, deps_mode) - return save_table(rocks_dir, "manifest", manifest) -end - ---- Update manifest file for a local repository --- removing information about a version of a package. --- @param name string: Name of a package removed from the repository. --- @param version string: Version of a package removed from the repository. --- @param repo string or nil: Pathname of a local repository. If not given, --- the default local repository is used. --- @param deps_mode string: Dependency mode: "one" for the current default tree, --- "all" for all trees, "order" for all trees with priority >= the current default, --- "none" for using the default dependency mode from the configuration. --- @return boolean or (nil, string): True if manifest was updated successfully, --- or nil and an error message. -function manif.remove_from_manifest(name, version, repo, deps_mode) - assert(type(name) == "string") - assert(type(version) == "string") - local rocks_dir = path.rocks_dir(repo or cfg.root_dir) - assert(type(deps_mode) == "string") - - if deps_mode == "none" then deps_mode = cfg.deps_mode end - - local manifest, err = manif_core.load_local_manifest(rocks_dir) - if not manifest then - util.printerr("No existing manifest. Attempting to rebuild...") - -- Manifest built by `manif.make_manifest` should already - -- include up-to-date information, no need to update it. - return manif.make_manifest(rocks_dir, deps_mode) - end - - local package_entry = manifest.repository[name] - - local version_entry = package_entry[version][1] - remove_package_items(manifest.modules, name, version, version_entry.modules) - remove_package_items(manifest.commands, name, version, version_entry.commands) - - package_entry[version] = nil - manifest.dependencies[name][version] = nil - - if not next(package_entry) then - -- No more versions of this package. - manifest.repository[name] = nil - manifest.dependencies[name] = nil - end - - update_dependencies(manifest, deps_mode) - return save_table(rocks_dir, "manifest", manifest) -end - ---- Report missing dependencies for all rocks installed in a repository. --- @param repo string or nil: Pathname of a local repository. If not given, --- the default local repository is used. --- @param deps_mode string: Dependency mode: "one" for the current default tree, --- "all" for all trees, "order" for all trees with priority >= the current default, --- "none" for using the default dependency mode from the configuration. -function manif.check_dependencies(repo, deps_mode) - local rocks_dir = path.rocks_dir(repo or cfg.root_dir) - assert(type(deps_mode) == "string") - if deps_mode == "none" then deps_mode = cfg.deps_mode end - - local manifest = manif_core.load_local_manifest(rocks_dir) - if not manifest then - return - end - - for name, versions in util.sortedpairs(manifest.repository) do - for version, version_entries in util.sortedpairs(versions, deps.compare_versions) do - for _, entry in ipairs(version_entries) do - if entry.arch == "installed" then - if manifest.dependencies[name] and manifest.dependencies[name][version] then - deps.report_missing_dependencies(name, version, manifest.dependencies[name][version], deps_mode) - end - end - end - end - end -end - -function manif.zip_manifests() - for ver in util.lua_versions() do - local file = "manifest-"..ver - local zip = file..".zip" - fs.delete(dir.path(fs.current_dir(), zip)) - fs.zip(zip, file) - end -end - ---- Get type and name of an item (a module or a command) provided by a file. --- @param deploy_type string: rock manifest subtree the file comes from ("bin", "lua", or "lib"). --- @param file_path string: path to the file relatively to deploy_type subdirectory. --- @return (string, string): item type ("module" or "command") and name. -function manif.get_provided_item(deploy_type, file_path) - assert(type(deploy_type) == "string") - assert(type(file_path) == "string") - local item_type = deploy_type == "bin" and "command" or "module" - local item_name = item_type == "command" and file_path or path.path_to_module(file_path) - return item_type, item_name -end - -local function get_providers(item_type, item_name, repo) - assert(type(item_type) == "string") - assert(type(item_name) == "string") - local rocks_dir = path.rocks_dir(repo or cfg.root_dir) - local manifest = manif_core.load_local_manifest(rocks_dir) - return manifest and manifest[item_type .. "s"][item_name] -end - ---- Given a name of a module or a command, figure out which rock name and version --- correspond to it in the rock tree manifest. --- @param item_type string: "module" or "command". --- @param item_name string: module or command name. --- @param root string or nil: A local root dir for a rocks tree. If not given, the default is used. --- @return (string, string) or nil: name and version of the provider rock or nil if there --- is no provider. -function manif.get_current_provider(item_type, item_name, repo) - local providers = get_providers(item_type, item_name, repo) - if providers then - return providers[1]:match("([^/]*)/([^/]*)") - end -end - -function manif.get_next_provider(item_type, item_name, repo) - local providers = get_providers(item_type, item_name, repo) - if providers and providers[2] then - return providers[2]:match("([^/]*)/([^/]*)") - end -end - ---- Given a name of a module or a command provided by a package, figure out --- which file provides it. --- @param name string: package name. --- @param version string: package version. --- @param item_type string: "module" or "command". --- @param item_name string: module or command name. --- @param root string or nil: A local root dir for a rocks tree. If not given, the default is used. --- @return (string, string): rock manifest subtree the file comes from ("bin", "lua", or "lib") --- and path to the providing file relatively to that subtree. -function manif.get_providing_file(name, version, item_type, item_name, repo) - local rocks_dir = path.rocks_dir(repo or cfg.root_dir) - local manifest = manif_core.load_local_manifest(rocks_dir) - - local entry_table = manifest.repository[name][version][1] - local file_path = entry_table[item_type .. "s"][item_name] - - if item_type == "command" then - return "bin", file_path - end - - -- A module can be in "lua" or "lib". Decide based on extension first: - -- most likely Lua modules are in "lua/" and C modules are in "lib/". - if file_path:match("%." .. cfg.lua_extension .. "$") then - return "lua", file_path - elseif file_path:match("%." .. cfg.lib_extension .. "$") then - return "lib", file_path - end - - -- Fallback to rock manifest scanning. - local rock_manifest = manif.load_rock_manifest(name, version) - local subtree = rock_manifest.lib - - for path_part in file_path:gmatch("[^/]+") do - if type(subtree) == "table" then - subtree = subtree[path_part] - else - -- Assume it's in "lua/" if it's not in "lib/". - return "lua", file_path - end - end - - return type(subtree) == "string" and "lib" or "lua", file_path -end - -return manif diff --git a/Utils/luarocks/lua/luarocks/manif_core.lua b/Utils/luarocks/lua/luarocks/manif_core.lua deleted file mode 100644 index 82e7ea4de..000000000 --- a/Utils/luarocks/lua/luarocks/manif_core.lua +++ /dev/null @@ -1,106 +0,0 @@ - ---- Core functions for querying manifest files. --- This module requires no specific 'fs' functionality. -local manif_core = {} -package.loaded["luarocks.manif_core"] = manif_core - -local persist = require("luarocks.persist") -local type_check = require("luarocks.type_check") -local cfg = require("luarocks.cfg") -local dir = require("luarocks.dir") -local util = require("luarocks.util") -local path = require("luarocks.path") - --- Table with repository identifiers as keys and tables mapping --- Lua versions to cached loaded manifests as values. -local manifest_cache = {} - ---- Cache a loaded manifest. --- @param repo_url string: The repository identifier. --- @param lua_version string: Lua version in "5.x" format, defaults to installed version. --- @param manifest table: the manifest to be cached. -function manif_core.cache_manifest(repo_url, lua_version, manifest) - lua_version = lua_version or cfg.lua_version - manifest_cache[repo_url] = manifest_cache[repo_url] or {} - manifest_cache[repo_url][lua_version] = manifest -end - ---- Attempt to get cached loaded manifest. --- @param repo_url string: The repository identifier. --- @param lua_version string: Lua version in "5.x" format, defaults to installed version. --- @return table or nil: loaded manifest or nil if cache is empty. -function manif_core.get_cached_manifest(repo_url, lua_version) - lua_version = lua_version or cfg.lua_version - return manifest_cache[repo_url] and manifest_cache[repo_url][lua_version] -end - ---- Back-end function that actually loads the manifest --- and stores it in the manifest cache. --- @param file string: The local filename of the manifest file. --- @param repo_url string: The repository identifier. --- @param lua_version string: Lua version in "5.x" format, defaults to installed version. --- @param quick boolean: If given, skips type checking. --- @return table or (nil, string, string): the manifest or nil, --- error message and error code ("open", "load", "run" or "type"). -function manif_core.manifest_loader(file, repo_url, lua_version, quick) - local manifest, err, errcode = persist.load_into_table(file) - if not manifest then - return nil, "Failed loading manifest for "..repo_url..": "..err, errcode - end - local globals = err - if not quick then - local ok, err = type_check.type_check_manifest(manifest, globals) - if not ok then - return nil, "Error checking manifest: "..err, "type" - end - end - - manif_core.cache_manifest(repo_url, lua_version, manifest) - return manifest -end - ---- Load a local manifest describing a repository. --- All functions that use manifest tables assume they were obtained --- through either this function or load_manifest. --- @param repo_url string: URL or pathname for the repository. --- @return table or (nil, string, string): A table representing the manifest, --- or nil followed by an error message and an error code, see manifest_loader. -function manif_core.load_local_manifest(repo_url) - assert(type(repo_url) == "string") - - local cached_manifest = manif_core.get_cached_manifest(repo_url) - if cached_manifest then - return cached_manifest - end - - local pathname = dir.path(repo_url, "manifest") - return manif_core.manifest_loader(pathname, repo_url, nil, true) -end - ---- Get all versions of a package listed in a manifest file. --- @param name string: a package name. --- @param deps_mode string: "one", to use only the currently --- configured tree; "order" to select trees based on order --- (use the current tree and all trees below it on the list) --- or "all", to use all trees. --- @return table: An array of strings listing installed --- versions of a package. -function manif_core.get_versions(name, deps_mode) - assert(type(name) == "string") - assert(type(deps_mode) == "string") - - local version_set = {} - path.map_trees(deps_mode, function(tree) - local manifest = manif_core.load_local_manifest(path.rocks_dir(tree)) - - if manifest and manifest.repository[name] then - for version in pairs(manifest.repository[name]) do - version_set[version] = true - end - end - end) - - return util.keys(version_set) -end - -return manif_core diff --git a/Utils/luarocks/lua/luarocks/new_version.lua b/Utils/luarocks/lua/luarocks/new_version.lua deleted file mode 100644 index 91f7607c3..000000000 --- a/Utils/luarocks/lua/luarocks/new_version.lua +++ /dev/null @@ -1,200 +0,0 @@ - ---- Module implementing the LuaRocks "new_version" command. --- Utility function that writes a new rockspec, updating data from a previous one. -local new_version = {} - -local util = require("luarocks.util") -local download = require("luarocks.download") -local fetch = require("luarocks.fetch") -local persist = require("luarocks.persist") -local fs = require("luarocks.fs") -local type_check = require("luarocks.type_check") - -util.add_run_function(new_version) -new_version.help_summary = "Auto-write a rockspec for a new version of a rock." -new_version.help_arguments = "[--tag=] [|] [] []" -new_version.help = [[ -This is a utility function that writes a new rockspec, updating data -from a previous one. - -If a package name is given, it downloads the latest rockspec from the -default server. If a rockspec is given, it uses it instead. If no argument -is given, it looks for a rockspec same way 'luarocks make' does. - -If the version number is not given and tag is passed using --tag, -it is used as the version, with 'v' removed from beginning. -Otherwise, it only increments the revision number of the given -(or downloaded) rockspec. - -If a URL is given, it replaces the one from the old rockspec with the -given URL. If a URL is not given and a new version is given, it tries -to guess the new URL by replacing occurrences of the version number -in the URL or tag. It also tries to download the new URL to determine -the new MD5 checksum. - -If a tag is given, it replaces the one from the old rockspec. If there is -an old tag but no new one passed, it is guessed in the same way URL is. - -WARNING: it writes the new rockspec to the current directory, -overwriting the file if it already exists. -]] - -local function try_replace(tbl, field, old, new) - if not tbl[field] then - return false - end - local old_field = tbl[field] - local new_field = tbl[field]:gsub(old, new) - if new_field ~= old_field then - util.printout("Guessing new '"..field.."' field as "..new_field) - tbl[field] = new_field - return true - end - return false -end - --- Try to download source file using URL from a rockspec. --- If it specified MD5, update it. --- @return (true, false) if MD5 was not specified or it stayed same, --- (true, true) if MD5 changed, (nil, string) on error. -local function check_url_and_update_md5(out_rs) - local file, temp_dir = fetch.fetch_url_at_temp_dir(out_rs.source.url, "luarocks-new-version-"..out_rs.package) - if not file then - util.printerr("Warning: invalid URL - "..temp_dir) - return true, false - end - - local inferred_dir, found_dir = fetch.find_base_dir(file, temp_dir, out_rs.source.url, out_rs.source.dir) - if not inferred_dir then - return nil, found_dir - end - - if found_dir and found_dir ~= inferred_dir then - out_rs.source.dir = found_dir - end - - if file then - if out_rs.source.md5 then - util.printout("File successfully downloaded. Updating MD5 checksum...") - local new_md5, err = fs.get_md5(file) - if not new_md5 then - return nil, err - end - local old_md5 = out_rs.source.md5 - out_rs.source.md5 = new_md5 - return true, new_md5 ~= old_md5 - else - util.printout("File successfully downloaded.") - return true, false - end - end -end - -local function update_source_section(out_rs, url, tag, old_ver, new_ver) - if tag then - out_rs.source.tag = tag - end - if url then - out_rs.source.url = url - return check_url_and_update_md5(out_rs) - end - if new_ver == old_ver then - return true - end - if out_rs.source.dir then - try_replace(out_rs.source, "dir", old_ver, new_ver) - end - if out_rs.source.file then - try_replace(out_rs.source, "file", old_ver, new_ver) - end - if try_replace(out_rs.source, "url", old_ver, new_ver) then - return check_url_and_update_md5(out_rs) - end - if tag or try_replace(out_rs.source, "tag", old_ver, new_ver) then - return true - end - -- Couldn't replace anything significant, use the old URL. - local ok, md5_changed = check_url_and_update_md5(out_rs) - if not ok then - return nil, md5_changed - end - if md5_changed then - util.printerr("Warning: URL is the same, but MD5 has changed. Old rockspec is broken.") - end - return true -end - -function new_version.command(flags, input, version, url) - if not input then - local err - input, err = util.get_default_rockspec() - if not input then - return nil, err - end - end - assert(type(input) == "string") - - local filename, err - if input:match("rockspec$") then - filename, err = fetch.fetch_url(input) - if not filename then - return nil, err - end - else - filename, err = download.download("rockspec", input:lower()) - if not filename then - return nil, err - end - end - - local valid_rs, err = fetch.load_rockspec(filename) - if not valid_rs then - return nil, err - end - - local old_ver, old_rev = valid_rs.version:match("(.*)%-(%d+)$") - local new_ver, new_rev - - if flags.tag and not version then - version = flags.tag:gsub("^v", "") - end - - if version then - new_ver, new_rev = version:match("(.*)%-(%d+)$") - new_rev = tonumber(new_rev) - if not new_rev then - new_ver = version - new_rev = 1 - end - else - new_ver = old_ver - new_rev = tonumber(old_rev) + 1 - end - local new_rockver = new_ver:gsub("-", "") - - local out_rs, err = persist.load_into_table(filename) - local out_name = out_rs.package:lower() - out_rs.version = new_rockver.."-"..new_rev - - local ok, err = update_source_section(out_rs, url, flags.tag, old_ver, new_ver) - if not ok then return nil, err end - - if out_rs.build and out_rs.build.type == "module" then - out_rs.build.type = "builtin" - end - - local out_filename = out_name.."-"..new_rockver.."-"..new_rev..".rockspec" - - persist.save_from_table(out_filename, out_rs, type_check.rockspec_order) - - util.printout("Wrote "..out_filename) - - local valid_out_rs, err = fetch.load_local_rockspec(out_filename) - if not valid_out_rs then - return nil, "Failed loading generated rockspec: "..err - end - - return true -end - -return new_version diff --git a/Utils/luarocks/lua/luarocks/pack.lua b/Utils/luarocks/lua/luarocks/pack.lua deleted file mode 100644 index 35bbe8380..000000000 --- a/Utils/luarocks/lua/luarocks/pack.lua +++ /dev/null @@ -1,197 +0,0 @@ - ---- Module implementing the LuaRocks "pack" command. --- Creates a rock, packing sources or binaries. -local pack = {} -package.loaded["luarocks.pack"] = pack - -local unpack = unpack or table.unpack - -local path = require("luarocks.path") -local repos = require("luarocks.repos") -local fetch = require("luarocks.fetch") -local fs = require("luarocks.fs") -local cfg = require("luarocks.cfg") -local util = require("luarocks.util") -local dir = require("luarocks.dir") -local manif = require("luarocks.manif") -local search = require("luarocks.search") - -util.add_run_function(pack) -pack.help_summary = "Create a rock, packing sources or binaries." -pack.help_arguments = "{| []}" -pack.help = [[ -Argument may be a rockspec file, for creating a source rock, -or the name of an installed package, for creating a binary rock. -In the latter case, the app version may be given as a second -argument. -]] - ---- Create a source rock. --- Packages a rockspec and its required source files in a rock --- file with the .src.rock extension, which can later be built and --- installed with the "build" command. --- @param rockspec_file string: An URL or pathname for a rockspec file. --- @return string or (nil, string): The filename of the resulting --- .src.rock file; or nil and an error message. -function pack.pack_source_rock(rockspec_file) - assert(type(rockspec_file) == "string") - - local rockspec, err = fetch.load_rockspec(rockspec_file) - if err then - return nil, "Error loading rockspec: "..err - end - rockspec_file = rockspec.local_filename - - local name_version = rockspec.name .. "-" .. rockspec.version - local rock_file = fs.absolute_name(name_version .. ".src.rock") - - local source_file, source_dir = fetch.fetch_sources(rockspec, false) - if not source_file then - return nil, source_dir - end - local ok, err = fs.change_dir(source_dir) - if not ok then return nil, err end - - fs.delete(rock_file) - fs.copy(rockspec_file, source_dir, cfg.perm_read) - if not fs.zip(rock_file, dir.base_name(rockspec_file), dir.base_name(source_file)) then - return nil, "Failed packing "..rock_file - end - fs.pop_dir() - - return rock_file -end - -local function copy_back_files(name, version, file_tree, deploy_dir, pack_dir, perms) - local ok, err = fs.make_dir(pack_dir) - if not ok then return nil, err end - for file, sub in pairs(file_tree) do - local source = dir.path(deploy_dir, file) - local target = dir.path(pack_dir, file) - if type(sub) == "table" then - local ok, err = copy_back_files(name, version, sub, source, target) - if not ok then return nil, err end - else - local versioned = path.versioned_name(source, deploy_dir, name, version) - if fs.exists(versioned) then - fs.copy(versioned, target, perms) - else - fs.copy(source, target, perms) - end - end - end - return true -end - --- @param name string: Name of package to pack. --- @param version string or nil: A version number may also be passed. --- @param tree string or nil: An optional tree to pick the package from. --- @return string or (nil, string): The filename of the resulting --- .src.rock file; or nil and an error message. -local function do_pack_binary_rock(name, version, tree) - assert(type(name) == "string") - assert(type(version) == "string" or not version) - - local repo, repo_url - name, version, repo, repo_url = search.pick_installed_rock(name, version, tree) - if not name then - return nil, version - end - - local root = path.root_dir(repo_url) - local prefix = path.install_dir(name, version, root) - if not fs.exists(prefix) then - return nil, "'"..name.." "..version.."' does not seem to be an installed rock." - end - - local rock_manifest = manif.load_rock_manifest(name, version, root) - if not rock_manifest then - return nil, "rock_manifest file not found for "..name.." "..version.." - not a LuaRocks 2 tree?" - end - - local name_version = name .. "-" .. version - local rock_file = fs.absolute_name(name_version .. "."..cfg.arch..".rock") - - local temp_dir = fs.make_temp_dir("pack") - fs.copy_contents(prefix, temp_dir) - - local is_binary = false - if rock_manifest.lib then - local ok, err = copy_back_files(name, version, rock_manifest.lib, path.deploy_lib_dir(root), dir.path(temp_dir, "lib"), cfg.perm_exec) - if not ok then return nil, "Failed copying back files: " .. err end - is_binary = true - end - if rock_manifest.lua then - local ok, err = copy_back_files(name, version, rock_manifest.lua, path.deploy_lua_dir(root), dir.path(temp_dir, "lua"), cfg.perm_read) - if not ok then return nil, "Failed copying back files: " .. err end - end - - local ok, err = fs.change_dir(temp_dir) - if not ok then return nil, err end - if not is_binary and not repos.has_binaries(name, version) then - rock_file = rock_file:gsub("%."..cfg.arch:gsub("%-","%%-").."%.", ".all.") - end - fs.delete(rock_file) - if not fs.zip(rock_file, unpack(fs.list_dir())) then - return nil, "Failed packing "..rock_file - end - fs.pop_dir() - fs.delete(temp_dir) - return rock_file -end - -function pack.pack_binary_rock(name, version, cmd, ...) - - -- The --pack-binary-rock option for "luarocks build" basically performs - -- "luarocks build" on a temporary tree and then "luarocks pack". The - -- alternative would require refactoring parts of luarocks.build and - -- luarocks.pack, which would save a few file operations: the idea would be - -- to shave off the final deploy steps from the build phase and the initial - -- collect steps from the pack phase. - - local temp_dir, err = fs.make_temp_dir("luarocks-build-pack-"..dir.base_name(name)) - if not temp_dir then - return nil, "Failed creating temporary directory: "..err - end - util.schedule_function(fs.delete, temp_dir) - - path.use_tree(temp_dir) - local ok, err = cmd(...) - if not ok then - return nil, err - end - local rname, rversion = path.parse_name(name) - if not rname then - rname, rversion = name, version - end - return do_pack_binary_rock(rname, rversion, temp_dir) -end - ---- Driver function for the "pack" command. --- @param arg string: may be a rockspec file, for creating a source rock, --- or the name of an installed package, for creating a binary rock. --- @param version string or nil: if the name of a package is given, a --- version may also be passed. --- @return boolean or (nil, string): true if successful or nil followed --- by an error message. -function pack.command(flags, arg, version) - assert(type(version) == "string" or not version) - if type(arg) ~= "string" then - return nil, "Argument missing. "..util.see_help("pack") - end - - local file, err - if arg:match(".*%.rockspec") then - file, err = pack.pack_source_rock(arg) - else - file, err = do_pack_binary_rock(arg:lower(), version, flags["tree"]) - end - if err then - return nil, err - else - util.printout("Packed: "..file) - return true - end -end - -return pack diff --git a/Utils/luarocks/lua/luarocks/path.lua b/Utils/luarocks/lua/luarocks/path.lua deleted file mode 100644 index dafc64e7c..000000000 --- a/Utils/luarocks/lua/luarocks/path.lua +++ /dev/null @@ -1,388 +0,0 @@ - ---- LuaRocks-specific path handling functions. --- All paths are configured in this module, making it a single --- point where the layout of the local installation is defined in LuaRocks. -local path = {} - -local dir = require("luarocks.dir") -local cfg = require("luarocks.cfg") -local util = require("luarocks.util") - ---- Infer rockspec filename from a rock filename. --- @param rock_name string: Pathname of a rock file. --- @return string: Filename of the rockspec, without path. -function path.rockspec_name_from_rock(rock_name) - assert(type(rock_name) == "string") - local base_name = dir.base_name(rock_name) - return base_name:match("(.*)%.[^.]*.rock") .. ".rockspec" -end - -function path.rocks_dir(tree) - if type(tree) == "string" then - return dir.path(tree, cfg.rocks_subdir) - else - assert(type(tree) == "table") - return tree.rocks_dir or dir.path(tree.root, cfg.rocks_subdir) - end -end - -function path.root_dir(rocks_dir) - assert(type(rocks_dir) == "string") - return rocks_dir:match("(.*)" .. util.matchquote(cfg.rocks_subdir) .. ".*$") -end - -function path.rocks_tree_to_string(tree) - if type(tree) == "string" then - return tree - else - assert(type(tree) == "table") - return tree.root - end -end - -function path.deploy_bin_dir(tree) - if type(tree) == "string" then - return dir.path(tree, "bin") - else - assert(type(tree) == "table") - return tree.bin_dir or dir.path(tree.root, "bin") - end -end - -function path.deploy_lua_dir(tree) - if type(tree) == "string" then - return dir.path(tree, cfg.lua_modules_path) - else - assert(type(tree) == "table") - return tree.lua_dir or dir.path(tree.root, cfg.lua_modules_path) - end -end - -function path.deploy_lib_dir(tree) - if type(tree) == "string" then - return dir.path(tree, cfg.lib_modules_path) - else - assert(type(tree) == "table") - return tree.lib_dir or dir.path(tree.root, cfg.lib_modules_path) - end -end - -function path.manifest_file(tree) - if type(tree) == "string" then - return dir.path(tree, cfg.rocks_subdir, "manifest") - else - assert(type(tree) == "table") - return (tree.rocks_dir and dir.path(tree.rocks_dir, "manifest")) or dir.path(tree.root, cfg.rocks_subdir, "manifest") - end -end - ---- Get the directory for all versions of a package in a tree. --- @param name string: The package name. --- @return string: The resulting path -- does not guarantee that --- @param tree string or nil: If given, specifies the local tree to use. --- the package (and by extension, the path) exists. -function path.versions_dir(name, tree) - assert(type(name) == "string") - tree = tree or cfg.root_dir - return dir.path(path.rocks_dir(tree), name) -end - ---- Get the local installation directory (prefix) for a package. --- @param name string: The package name. --- @param version string: The package version. --- @param tree string or nil: If given, specifies the local tree to use. --- @return string: The resulting path -- does not guarantee that --- the package (and by extension, the path) exists. -function path.install_dir(name, version, tree) - assert(type(name) == "string") - assert(type(version) == "string") - tree = tree or cfg.root_dir - return dir.path(path.rocks_dir(tree), name, version) -end - ---- Get the local filename of the rockspec of an installed rock. --- @param name string: The package name. --- @param version string: The package version. --- @param tree string or nil: If given, specifies the local tree to use. --- @return string: The resulting path -- does not guarantee that --- the package (and by extension, the file) exists. -function path.rockspec_file(name, version, tree) - assert(type(name) == "string") - assert(type(version) == "string") - tree = tree or cfg.root_dir - return dir.path(path.rocks_dir(tree), name, version, name.."-"..version..".rockspec") -end - ---- Get the local filename of the rock_manifest file of an installed rock. --- @param name string: The package name. --- @param version string: The package version. --- @param tree string or nil: If given, specifies the local tree to use. --- @return string: The resulting path -- does not guarantee that --- the package (and by extension, the file) exists. -function path.rock_manifest_file(name, version, tree) - assert(type(name) == "string") - assert(type(version) == "string") - tree = tree or cfg.root_dir - return dir.path(path.rocks_dir(tree), name, version, "rock_manifest") -end - ---- Get the local installation directory for C libraries of a package. --- @param name string: The package name. --- @param version string: The package version. --- @param tree string or nil: If given, specifies the local tree to use. --- @return string: The resulting path -- does not guarantee that --- the package (and by extension, the path) exists. -function path.lib_dir(name, version, tree) - assert(type(name) == "string") - assert(type(version) == "string") - tree = tree or cfg.root_dir - return dir.path(path.rocks_dir(tree), name, version, "lib") -end - ---- Get the local installation directory for Lua modules of a package. --- @param name string: The package name. --- @param version string: The package version. --- @param tree string or nil: If given, specifies the local tree to use. --- @return string: The resulting path -- does not guarantee that --- the package (and by extension, the path) exists. -function path.lua_dir(name, version, tree) - assert(type(name) == "string") - assert(type(version) == "string") - tree = tree or cfg.root_dir - return dir.path(path.rocks_dir(tree), name, version, "lua") -end - ---- Get the local installation directory for documentation of a package. --- @param name string: The package name. --- @param version string: The package version. --- @param tree string or nil: If given, specifies the local tree to use. --- @return string: The resulting path -- does not guarantee that --- the package (and by extension, the path) exists. -function path.doc_dir(name, version, tree) - assert(type(name) == "string") - assert(type(version) == "string") - tree = tree or cfg.root_dir - return dir.path(path.rocks_dir(tree), name, version, "doc") -end - ---- Get the local installation directory for configuration files of a package. --- @param name string: The package name. --- @param version string: The package version. --- @param tree string or nil: If given, specifies the local tree to use. --- @return string: The resulting path -- does not guarantee that --- the package (and by extension, the path) exists. -function path.conf_dir(name, version, tree) - assert(type(name) == "string") - assert(type(version) == "string") - tree = tree or cfg.root_dir - return dir.path(path.rocks_dir(tree), name, version, "conf") -end - ---- Get the local installation directory for command-line scripts --- of a package. --- @param name string: The package name. --- @param version string: The package version. --- @param tree string or nil: If given, specifies the local tree to use. --- @return string: The resulting path -- does not guarantee that --- the package (and by extension, the path) exists. -function path.bin_dir(name, version, tree) - assert(type(name) == "string") - assert(type(version) == "string") - tree = tree or cfg.root_dir - return dir.path(path.rocks_dir(tree), name, version, "bin") -end - ---- Extract name, version and arch of a rock filename, --- or name, version and "rockspec" from a rockspec name. --- @param file_name string: pathname of a rock or rockspec --- @return (string, string, string) or nil: name, version and arch --- or nil if name could not be parsed -function path.parse_name(file_name) - assert(type(file_name) == "string") - if file_name:match("%.rock$") then - return dir.base_name(file_name):match("(.*)-([^-]+-%d+)%.([^.]+)%.rock$") - else - return dir.base_name(file_name):match("(.*)-([^-]+-%d+)%.(rockspec)") - end -end - ---- Make a rockspec or rock URL. --- @param pathname string: Base URL or pathname. --- @param name string: Package name. --- @param version string: Package version. --- @param arch string: Architecture identifier, or "rockspec" or "installed". --- @return string: A URL or pathname following LuaRocks naming conventions. -function path.make_url(pathname, name, version, arch) - assert(type(pathname) == "string") - assert(type(name) == "string") - assert(type(version) == "string") - assert(type(arch) == "string") - - local filename = name.."-"..version - if arch == "installed" then - filename = dir.path(name, version, filename..".rockspec") - elseif arch == "rockspec" then - filename = filename..".rockspec" - else - filename = filename.."."..arch..".rock" - end - return dir.path(pathname, filename) -end - ---- Convert a pathname to a module identifier. --- In Unix, for example, a path "foo/bar/baz.lua" is converted to --- "foo.bar.baz"; "bla/init.lua" returns "bla"; "foo.so" returns "foo". --- @param file string: Pathname of module --- @return string: The module identifier, or nil if given path is --- not a conformant module path (the function does not check if the --- path actually exists). -function path.path_to_module(file) - assert(type(file) == "string") - - local name = file:match("(.*)%."..cfg.lua_extension.."$") - if name then - name = name:gsub(dir.separator, ".") - local init = name:match("(.*)%.init$") - if init then - name = init - end - else - name = file:match("(.*)%."..cfg.lib_extension.."$") - if name then - name = name:gsub(dir.separator, ".") - end - end - if not name then name = file end - name = name:gsub("^%.+", ""):gsub("%.+$", "") - return name -end - ---- Obtain the directory name where a module should be stored. --- For example, on Unix, "foo.bar.baz" will return "foo/bar". --- @param mod string: A module name in Lua dot-separated format. --- @return string: A directory name using the platform's separator. -function path.module_to_path(mod) - assert(type(mod) == "string") - return (mod:gsub("[^.]*$", ""):gsub("%.", dir.separator)) -end - ---- Set up path-related variables for a given rock. --- Create a "variables" table in the rockspec table, containing --- adjusted variables according to the configuration file. --- @param rockspec table: The rockspec table. -function path.configure_paths(rockspec) - assert(type(rockspec) == "table") - local vars = {} - for k,v in pairs(cfg.variables) do - vars[k] = v - end - local name, version = rockspec.name, rockspec.version - vars.PREFIX = path.install_dir(name, version) - vars.LUADIR = path.lua_dir(name, version) - vars.LIBDIR = path.lib_dir(name, version) - vars.CONFDIR = path.conf_dir(name, version) - vars.BINDIR = path.bin_dir(name, version) - vars.DOCDIR = path.doc_dir(name, version) - rockspec.variables = vars -end - ---- Produce a versioned version of a filename. --- @param file string: filename (must start with prefix) --- @param prefix string: Path prefix for file --- @param name string: Rock name --- @param version string: Rock version --- @return string: a pathname with the same directory parts and a versioned basename. -function path.versioned_name(file, prefix, name, version) - assert(type(file) == "string") - assert(type(name) == "string") - assert(type(version) == "string") - - local rest = file:sub(#prefix+1):gsub("^/*", "") - local name_version = (name.."_"..version):gsub("%-", "_"):gsub("%.", "_") - return dir.path(prefix, name_version.."-"..rest) -end - -function path.use_tree(tree) - cfg.root_dir = tree - cfg.rocks_dir = path.rocks_dir(tree) - cfg.deploy_bin_dir = path.deploy_bin_dir(tree) - cfg.deploy_lua_dir = path.deploy_lua_dir(tree) - cfg.deploy_lib_dir = path.deploy_lib_dir(tree) -end - ---- Apply a given function to the active rocks trees based on chosen dependency mode. --- @param deps_mode string: Dependency mode: "one" for the current default tree, --- "all" for all trees, "order" for all trees with priority >= the current default, --- "none" for no trees (this function becomes a nop). --- @param fn function: function to be applied, with the tree dir (string) as the first --- argument and the remaining varargs of map_trees as the following arguments. --- @return a table with all results of invocations of fn collected. -function path.map_trees(deps_mode, fn, ...) - local result = {} - if deps_mode == "one" then - table.insert(result, (fn(cfg.root_dir, ...)) or 0) - elseif deps_mode == "all" or deps_mode == "order" then - local use = false - if deps_mode == "all" then - use = true - end - for _, tree in ipairs(cfg.rocks_trees) do - if dir.normalize(path.rocks_tree_to_string(tree)) == dir.normalize(path.rocks_tree_to_string(cfg.root_dir)) then - use = true - end - if use then - table.insert(result, (fn(tree, ...)) or 0) - end - end - end - return result -end - -local is_src_extension = { [".lua"] = true, [".tl"] = true, [".tld"] = true, [".moon"] = true } - ---- Return the pathname of the file that would be loaded for a module, indexed. --- @param file_name string: module file name as in manifest (eg. "socket/core.so") --- @param name string: name of the package (eg. "luasocket") --- @param version string: version number (eg. "2.0.2-1") --- @param tree string: repository path (eg. "/usr/local") --- @param i number: the index, 1 if version is the current default, > 1 otherwise. --- This is done this way for use by select_module in luarocks.loader. --- @return string: filename of the module (eg. "/usr/local/lib/lua/5.1/socket/core.so") -function path.which_i(file_name, name, version, tree, i) - local deploy_dir - local extension = file_name:match("%.[a-z]+$") - if is_src_extension[extension] then - deploy_dir = path.deploy_lua_dir(tree) - file_name = dir.path(deploy_dir, file_name) - else - deploy_dir = path.deploy_lib_dir(tree) - file_name = dir.path(deploy_dir, file_name) - end - if i > 1 then - file_name = path.versioned_name(file_name, deploy_dir, name, version) - end - return file_name -end - ---- Return the pathname of the file that would be loaded for a module, --- returning the versioned pathname if given version is not the default version --- in the given manifest. --- @param module_name string: module name (eg. "socket.core") --- @param file_name string: module file name as in manifest (eg. "socket/core.so") --- @param name string: name of the package (eg. "luasocket") --- @param version string: version number (eg. "2.0.2-1") --- @param tree string: repository path (eg. "/usr/local") --- @param manifest table: the manifest table for the tree. --- @return string: filename of the module (eg. "/usr/local/lib/lua/5.1/socket/core.so") -function path.which(module_name, file_name, name, version, tree, manifest) - local versions = manifest.modules[module_name] - assert(versions) - for i, name_version in ipairs(versions) do - if name_version == name.."/"..version then - return path.which_i(file_name, name, version, tree, i):gsub("//", "/") - end - end - assert(false) -end - -return path diff --git a/Utils/luarocks/lua/luarocks/path_cmd.lua b/Utils/luarocks/lua/luarocks/path_cmd.lua deleted file mode 100644 index eba85d46d..000000000 --- a/Utils/luarocks/lua/luarocks/path_cmd.lua +++ /dev/null @@ -1,69 +0,0 @@ - ---- @module luarocks.path_cmd --- Driver for the `luarocks path` command. -local path_cmd = {} - -local util = require("luarocks.util") -local cfg = require("luarocks.cfg") - -util.add_run_function(path_cmd) -path_cmd.help_summary = "Return the currently configured package path." -path_cmd.help_arguments = "" -path_cmd.help = [[ -Returns the package path currently configured for this installation -of LuaRocks, formatted as shell commands to update LUA_PATH and LUA_CPATH. - ---bin Adds the system path to the output - ---append Appends the paths to the existing paths. Default is to prefix - the LR paths to the existing paths. - ---lr-path Exports the Lua path (not formatted as shell command) - ---lr-cpath Exports the Lua cpath (not formatted as shell command) - ---lr-bin Exports the system path (not formatted as shell command) - - -On Unix systems, you may run: - eval `luarocks path` -And on Windows: - luarocks path > "%temp%\_lrp.bat" && call "%temp%\_lrp.bat" && del "%temp%\_lrp.bat" -]] - ---- Driver function for "path" command. --- @return boolean This function always succeeds. -function path_cmd.command(flags) - local lr_path, lr_cpath, lr_bin = cfg.package_paths(flags["tree"]) - local path_sep = cfg.export_path_separator - - if flags["lr-path"] then - util.printout(util.remove_path_dupes(lr_path, ';')) - return true - elseif flags["lr-cpath"] then - util.printout(util.remove_path_dupes(lr_cpath, ';')) - return true - elseif flags["lr-bin"] then - util.printout(util.remove_path_dupes(lr_bin, path_sep)) - return true - end - - if flags["append"] then - lr_path = package.path .. ";" .. lr_path - lr_cpath = package.cpath .. ";" .. lr_cpath - lr_bin = os.getenv("PATH") .. path_sep .. lr_bin - else - lr_path = lr_path.. ";" .. package.path - lr_cpath = lr_cpath .. ";" .. package.cpath - lr_bin = lr_bin .. path_sep .. os.getenv("PATH") - end - - util.printout(cfg.export_lua_path:format(util.remove_path_dupes(lr_path, ';'))) - util.printout(cfg.export_lua_cpath:format(util.remove_path_dupes(lr_cpath, ';'))) - if flags["bin"] then - util.printout(cfg.export_path:format(util.remove_path_dupes(lr_bin, path_sep))) - end - return true -end - -return path_cmd diff --git a/Utils/luarocks/lua/luarocks/persist.lua b/Utils/luarocks/lua/luarocks/persist.lua deleted file mode 100644 index 708f07bed..000000000 --- a/Utils/luarocks/lua/luarocks/persist.lua +++ /dev/null @@ -1,210 +0,0 @@ - ---- Utility module for loading files into tables and --- saving tables into files. --- Implemented separately to avoid interdependencies, --- as it is used in the bootstrapping stage of the cfg module. -local persist = {} -package.loaded["luarocks.persist"] = persist - -local util = require("luarocks.util") - ---- Load and run a Lua file in an environment. --- @param filename string: the name of the file. --- @param env table: the environment table. --- @return (true, any) or (nil, string, string): true and the return value --- of the file, or nil, an error message and an error code ("open", "load" --- or "run") in case of errors. -local function run_file(filename, env) - local fd, err = io.open(filename) - if not fd then - return nil, err, "open" - end - local str, err = fd:read("*a") - fd:close() - if not str then - return nil, err, "open" - end - str = str:gsub("^#![^\n]*\n", "") - local chunk, ran - if _VERSION == "Lua 5.1" then -- Lua 5.1 - chunk, err = loadstring(str, filename) - if chunk then - setfenv(chunk, env) - ran, err = pcall(chunk) - end - else -- Lua 5.2 - chunk, err = load(str, filename, "t", env) - if chunk then - ran, err = pcall(chunk) - end - end - if not chunk then - return nil, "Error loading file: "..err, "load" - end - if not ran then - return nil, "Error running file: "..err, "run" - end - return true, err -end - ---- Load a Lua file containing assignments, storing them in a table. --- The global environment is not propagated to the loaded file. --- @param filename string: the name of the file. --- @param tbl table or nil: if given, this table is used to store --- loaded values. --- @return (table, table) or (nil, string, string): a table with the file's assignments --- as fields and set of undefined globals accessed in file, --- or nil, an error message and an error code ("open"; couldn't open the file, --- "load"; compile-time error, or "run"; run-time error) --- in case of errors. -function persist.load_into_table(filename, tbl) - assert(type(filename) == "string") - assert(type(tbl) == "table" or not tbl) - - local result = tbl or {} - local globals = {} - local globals_mt = { - __index = function(t, k) - globals[k] = true - end - } - local save_mt = getmetatable(result) - setmetatable(result, globals_mt) - - local ok, err, errcode = run_file(filename, result) - - setmetatable(result, save_mt) - - if not ok then - return nil, err, errcode - end - return result, globals -end - -local write_table - ---- Write a value as Lua code. --- This function handles only numbers and strings, invoking write_table --- to write tables. --- @param out table or userdata: a writer object supporting :write() method. --- @param v: the value to be written. --- @param level number: the indentation level --- @param sub_order table: optional prioritization table --- @see write_table -local function write_value(out, v, level, sub_order) - if type(v) == "table" then - write_table(out, v, level + 1, sub_order) - elseif type(v) == "string" then - if v:match("[\r\n]") then - local open, close = "[[", "]]" - local equals = 0 - local v_with_bracket = v.."]" - while v_with_bracket:find(close, 1, true) do - equals = equals + 1 - local eqs = ("="):rep(equals) - open, close = "["..eqs.."[", "]"..eqs.."]" - end - out:write(open.."\n"..v..close) - else - out:write(("%q"):format(v)) - end - else - out:write(tostring(v)) - end -end - ---- Write a table as Lua code in curly brackets notation to a writer object. --- Only numbers, strings and tables (containing numbers, strings --- or other recursively processed tables) are supported. --- @param out table or userdata: a writer object supporting :write() method. --- @param tbl table: the table to be written. --- @param level number: the indentation level --- @param field_order table: optional prioritization table -write_table = function(out, tbl, level, field_order) - out:write("{") - local sep = "\n" - local indentation = " " - local indent = true - local i = 1 - for k, v, sub_order in util.sortedpairs(tbl, field_order) do - out:write(sep) - if indent then - for n = 1,level do out:write(indentation) end - end - - if k == i then - i = i + 1 - else - if type(k) == "string" and k:match("^[a-zA-Z_][a-zA-Z0-9_]*$") then - out:write(k) - else - out:write("[") - write_value(out, k, level) - out:write("]") - end - - out:write(" = ") - end - - write_value(out, v, level, sub_order) - if type(v) == "number" then - sep = ", " - indent = false - else - sep = ",\n" - indent = true - end - end - if sep ~= "\n" then - out:write("\n") - for n = 1,level-1 do out:write(indentation) end - end - out:write("}") -end - ---- Write a table as series of assignments to a writer object. --- @param out table or userdata: a writer object supporting :write() method. --- @param tbl table: the table to be written. --- @param field_order table: optional prioritization table -local function write_table_as_assignments(out, tbl, field_order) - for k, v, sub_order in util.sortedpairs(tbl, field_order) do - out:write(k.." = ") - write_value(out, v, 0, sub_order) - out:write("\n") - end -end - ---- Save the contents of a table to a string. --- Each element of the table is saved as a global assignment. --- Only numbers, strings and tables (containing numbers, strings --- or other recursively processed tables) are supported. --- @param tbl table: the table containing the data to be written --- @param field_order table: an optional array indicating the order of top-level fields. --- @return string -function persist.save_from_table_to_string(tbl, field_order) - local out = {buffer = {}} - function out:write(data) table.insert(self.buffer, data) end - write_table_as_assignments(out, tbl, field_order) - return table.concat(out.buffer) -end - ---- Save the contents of a table in a file. --- Each element of the table is saved as a global assignment. --- Only numbers, strings and tables (containing numbers, strings --- or other recursively processed tables) are supported. --- @param filename string: the output filename --- @param tbl table: the table containing the data to be written --- @param field_order table: an optional array indicating the order of top-level fields. --- @return boolean or (nil, string): true if successful, or nil and a --- message in case of errors. -function persist.save_from_table(filename, tbl, field_order) - local out = io.open(filename, "w") - if not out then - return nil, "Cannot create file at "..filename - end - write_table_as_assignments(out, tbl, field_order) - out:close() - return true -end - -return persist diff --git a/Utils/luarocks/lua/luarocks/purge.lua b/Utils/luarocks/lua/luarocks/purge.lua deleted file mode 100644 index 17724e847..000000000 --- a/Utils/luarocks/lua/luarocks/purge.lua +++ /dev/null @@ -1,79 +0,0 @@ - ---- Module implementing the LuaRocks "purge" command. --- Remove all rocks from a given tree. -local purge = {} -package.loaded["luarocks.purge"] = purge - -local util = require("luarocks.util") -local fs = require("luarocks.fs") -local path = require("luarocks.path") -local search = require("luarocks.search") -local deps = require("luarocks.deps") -local repos = require("luarocks.repos") -local manif = require("luarocks.manif") -local cfg = require("luarocks.cfg") -local remove = require("luarocks.remove") - -util.add_run_function(purge) -purge.help_summary = "Remove all installed rocks from a tree." -purge.help_arguments = "--tree= [--old-versions]" -purge.help = [[ -This command removes rocks en masse from a given tree. -By default, it removes all rocks from a tree. - -The --tree argument is mandatory: luarocks purge does not -assume a default tree. - ---old-versions Keep the highest-numbered version of each - rock and remove the other ones. By default - it only removes old versions if they are - not needed as dependencies. This can be - overridden with the flag --force. -]] - -function purge.command(flags) - local tree = flags["tree"] - - if type(tree) ~= "string" then - return nil, "The --tree argument is mandatory. "..util.see_help("purge") - end - - local results = {} - local query = search.make_query("") - query.exact_name = false - if not fs.is_dir(tree) then - return nil, "Directory not found: "..tree - end - - local ok, err = fs.check_command_permissions(flags) - if not ok then return nil, err, cfg.errorcodes.PERMISSIONDENIED end - - search.manifest_search(results, path.rocks_dir(tree), query) - - local sort = function(a,b) return deps.compare_versions(b,a) end - if flags["old-versions"] then - sort = deps.compare_versions - end - - for package, versions in util.sortedpairs(results) do - for version, repositories in util.sortedpairs(versions, sort) do - if flags["old-versions"] then - util.printout("Keeping "..package.." "..version.."...") - local ok, err = remove.remove_other_versions(package, version, flags["force"], flags["force-fast"]) - if not ok then - util.printerr(err) - end - break - else - util.printout("Removing "..package.." "..version.."...") - local ok, err = repos.delete_version(package, version, "none", true) - if not ok then - util.printerr(err) - end - end - end - end - return manif.make_manifest(cfg.rocks_dir, "one") -end - -return purge diff --git a/Utils/luarocks/lua/luarocks/refresh_cache.lua b/Utils/luarocks/lua/luarocks/refresh_cache.lua deleted file mode 100644 index bbfd1f4d8..000000000 --- a/Utils/luarocks/lua/luarocks/refresh_cache.lua +++ /dev/null @@ -1,33 +0,0 @@ - ---- Module implementing the luarocks-admin "refresh_cache" command. -local refresh_cache = {} -package.loaded["luarocks.refresh_cache"] = refresh_cache - -local util = require("luarocks.util") -local cfg = require("luarocks.cfg") -local cache = require("luarocks.cache") - -util.add_run_function(refresh_cache) -refresh_cache.help_summary = "Refresh local cache of a remote rocks server." -refresh_cache.help_arguments = "[--from=]" -refresh_cache.help = [[ -The flag --from indicates which server to use. -If not given, the default server set in the upload_server variable -from the configuration file is used instead. -]] - -function refresh_cache.command(flags) - local server, upload_server = cache.get_upload_server(flags["server"]) - if not server then return nil, upload_server end - local download_url = cache.get_server_urls(server, upload_server) - - local ok, err = cache.refresh_local_cache(server, download_url, cfg.upload_user, cfg.upload_password) - if not ok then - return nil, err - else - return true - end -end - - -return refresh_cache diff --git a/Utils/luarocks/lua/luarocks/remove.lua b/Utils/luarocks/lua/luarocks/remove.lua deleted file mode 100644 index 514c6dfa1..000000000 --- a/Utils/luarocks/lua/luarocks/remove.lua +++ /dev/null @@ -1,174 +0,0 @@ - ---- Module implementing the LuaRocks "remove" command. --- Uninstalls rocks. -local remove = {} -package.loaded["luarocks.remove"] = remove - -local search = require("luarocks.search") -local deps = require("luarocks.deps") -local fetch = require("luarocks.fetch") -local repos = require("luarocks.repos") -local path = require("luarocks.path") -local util = require("luarocks.util") -local cfg = require("luarocks.cfg") -local fs = require("luarocks.fs") -local manif = require("luarocks.manif") - -util.add_run_function(remove) -remove.help_summary = "Uninstall a rock." -remove.help_arguments = "[--force|--force-fast] []" -remove.help = [[ -Argument is the name of a rock to be uninstalled. -If a version is not given, try to remove all versions at once. -Will only perform the removal if it does not break dependencies. -To override this check and force the removal, use --force. -To perform a forced removal without reporting dependency issues, -use --force-fast. - -]]..util.deps_mode_help() - ---- Obtain a list of packages that depend on the given set of packages --- (where all packages of the set are versions of one program). --- @param name string: the name of a program --- @param versions array of string: the versions to be deleted. --- @return array of string: an empty table if no packages depend on any --- of the given list, or an array of strings in "name/version" format. -local function check_dependents(name, versions, deps_mode) - local dependents = {} - local blacklist = {} - blacklist[name] = {} - for version, _ in pairs(versions) do - blacklist[name][version] = true - end - local local_rocks = {} - local query_all = search.make_query("") - query_all.exact_name = false - search.manifest_search(local_rocks, cfg.rocks_dir, query_all) - local_rocks[name] = nil - for rock_name, rock_versions in pairs(local_rocks) do - for rock_version, _ in pairs(rock_versions) do - local rockspec, err = fetch.load_rockspec(path.rockspec_file(rock_name, rock_version)) - if rockspec then - local _, missing = deps.match_deps(rockspec, blacklist, deps_mode) - if missing[name] then - table.insert(dependents, { name = rock_name, version = rock_version }) - end - end - end - end - return dependents -end - ---- Delete given versions of a program. --- @param name string: the name of a program --- @param versions array of string: the versions to be deleted. --- @param deps_mode: string: Which trees to check dependencies for: --- "one" for the current default tree, "all" for all trees, --- "order" for all trees with priority >= the current default, "none" for no trees. --- @return boolean or (nil, string): true on success or nil and an error message. -local function delete_versions(name, versions, deps_mode) - - for version, _ in pairs(versions) do - util.printout("Removing "..name.." "..version.."...") - local ok, err = repos.delete_version(name, version, deps_mode) - if not ok then return nil, err end - end - - return true -end - -function remove.remove_search_results(results, name, deps_mode, force, fast) - local versions = results[name] - - local version = next(versions) - local second = next(versions, version) - - local dependents = {} - if not fast then - util.printout("Checking stability of dependencies in the absence of") - util.printout(name.." "..table.concat(util.keys(versions), ", ").."...") - util.printout() - dependents = check_dependents(name, versions, deps_mode) - end - - if #dependents > 0 then - if force or fast then - util.printerr("The following packages may be broken by this forced removal:") - for _, dependent in ipairs(dependents) do - util.printerr(dependent.name.." "..dependent.version) - end - util.printerr() - else - if not second then - util.printerr("Will not remove "..name.." "..version..".") - util.printerr("Removing it would break dependencies for: ") - else - util.printerr("Will not remove installed versions of "..name..".") - util.printerr("Removing them would break dependencies for: ") - end - for _, dependent in ipairs(dependents) do - util.printerr(dependent.name.." "..dependent.version) - end - util.printerr() - util.printerr("Use --force to force removal (warning: this may break modules).") - return nil, "Failed removing." - end - end - - local ok, err = delete_versions(name, versions, deps_mode) - if not ok then return nil, err end - - util.printout("Removal successful.") - return true -end - -function remove.remove_other_versions(name, version, force, fast) - local results = {} - search.manifest_search(results, cfg.rocks_dir, { name = name, exact_name = true, constraints = {{ op = "~=", version = version}} }) - if results[name] then - return remove.remove_search_results(results, name, cfg.deps_mode, force, fast) - end - return true -end - ---- Driver function for the "remove" command. --- @param name string: name of a rock. If a version is given, refer to --- a specific version; otherwise, try to remove all versions. --- @param version string: When passing a package name, a version number --- may also be given. --- @return boolean or (nil, string, exitcode): True if removal was --- successful, nil and an error message otherwise. exitcode is optionally returned. -function remove.command(flags, name, version) - if type(name) ~= "string" then - return nil, "Argument missing. "..util.see_help("remove") - end - - local deps_mode = flags["deps-mode"] or cfg.deps_mode - - local ok, err = fs.check_command_permissions(flags) - if not ok then return nil, err, cfg.errorcodes.PERMISSIONDENIED end - - local rock_type = name:match("%.(rock)$") or name:match("%.(rockspec)$") - local filename = name - if rock_type then - name, version = path.parse_name(filename) - if not name then return nil, "Invalid "..rock_type.." filename: "..filename end - end - - local results = {} - name = name:lower() - search.manifest_search(results, cfg.rocks_dir, search.make_query(name, version)) - if not results[name] then - return nil, "Could not find rock '"..name..(version and " "..version or "").."' in "..path.rocks_tree_to_string(cfg.root_dir) - end - - local ok, err = remove.remove_search_results(results, name, deps_mode, flags["force"], flags["force-fast"]) - if not ok then - return nil, err - end - - manif.check_dependencies(nil, deps.get_deps_mode(flags)) - return true -end - -return remove diff --git a/Utils/luarocks/lua/luarocks/repos.lua b/Utils/luarocks/lua/luarocks/repos.lua deleted file mode 100644 index 5d5eac708..000000000 --- a/Utils/luarocks/lua/luarocks/repos.lua +++ /dev/null @@ -1,422 +0,0 @@ - ---- Functions for managing the repository on disk. -local repos = {} -package.loaded["luarocks.repos"] = repos - -local fs = require("luarocks.fs") -local path = require("luarocks.path") -local cfg = require("luarocks.cfg") -local util = require("luarocks.util") -local dir = require("luarocks.dir") -local manif = require("luarocks.manif") -local deps = require("luarocks.deps") - --- Tree of files installed by a package are stored --- in its rock manifest. Some of these files have to --- be deployed to locations where Lua can load them as --- modules or where they can be used as commands. --- These files are characterised by pair --- (deploy_type, file_path), where deploy_type is the first --- component of the file path and file_path is the rest of the --- path. Only files with deploy_type in {"lua", "lib", "bin"} --- are deployed somewhere. --- Each deployed file provides an "item". An item is --- characterised by pair (item_type, item_name). --- item_type is "command" for files with deploy_type --- "bin" and "module" for deploy_type in {"lua", "lib"}. --- item_name is same as file_path for commands --- and is produced using path.path_to_module(file_path) --- for modules. - ---- Get all installed versions of a package. --- @param name string: a package name. --- @return table or nil: An array of strings listing installed --- versions of a package, or nil if none is available. -local function get_installed_versions(name) - assert(type(name) == "string") - - local dirs = fs.list_dir(path.versions_dir(name)) - return (dirs and #dirs > 0) and dirs or nil -end - ---- Check if a package exists in a local repository. --- Version numbers are compared as exact string comparison. --- @param name string: name of package --- @param version string: package version in string format --- @return boolean: true if a package is installed, --- false otherwise. -function repos.is_installed(name, version) - assert(type(name) == "string") - assert(type(version) == "string") - - return fs.is_dir(path.install_dir(name, version)) -end - -local function recurse_rock_manifest_tree(file_tree, action) - assert(type(file_tree) == "table") - assert(type(action) == "function") - local function do_recurse_rock_manifest_tree(tree, parent_path, parent_module) - - for file, sub in pairs(tree) do - if type(sub) == "table" then - local ok, err = do_recurse_rock_manifest_tree(sub, parent_path..file.."/", parent_module..file..".") - if not ok then return nil, err end - else - local ok, err = action(parent_path, parent_module, file) - if not ok then return nil, err end - end - end - return true - end - return do_recurse_rock_manifest_tree(file_tree, "", "") -end - -local function store_package_data(result, name, file_tree) - if not file_tree then return end - return recurse_rock_manifest_tree(file_tree, - function(parent_path, parent_module, file) - local pathname = parent_path..file - result[path.path_to_module(pathname)] = pathname - return true - end - ) -end - ---- Obtain a list of modules within an installed package. --- @param package string: The package name; for example "luasocket" --- @param version string: The exact version number including revision; --- for example "2.0.1-1". --- @return table: A table of modules where keys are module identifiers --- in "foo.bar" format and values are pathnames in architecture-dependent --- "foo/bar.so" format. If no modules are found or if package or version --- are invalid, an empty table is returned. -function repos.package_modules(package, version) - assert(type(package) == "string") - assert(type(version) == "string") - - local result = {} - local rock_manifest = manif.load_rock_manifest(package, version) - store_package_data(result, package, rock_manifest.lib) - store_package_data(result, package, rock_manifest.lua) - return result -end - ---- Obtain a list of command-line scripts within an installed package. --- @param package string: The package name; for example "luasocket" --- @param version string: The exact version number including revision; --- for example "2.0.1-1". --- @return table: A table of items where keys are command names --- as strings and values are pathnames in architecture-dependent --- ".../bin/foo" format. If no modules are found or if package or version --- are invalid, an empty table is returned. -function repos.package_commands(package, version) - assert(type(package) == "string") - assert(type(version) == "string") - - local result = {} - local rock_manifest = manif.load_rock_manifest(package, version) - store_package_data(result, package, rock_manifest.bin) - return result -end - - ---- Check if a rock contains binary executables. --- @param name string: name of an installed rock --- @param version string: version of an installed rock --- @return boolean: returns true if rock contains platform-specific --- binary executables, or false if it is a pure-Lua rock. -function repos.has_binaries(name, version) - assert(type(name) == "string") - assert(type(version) == "string") - - local rock_manifest = manif.load_rock_manifest(name, version) - if rock_manifest.bin then - for name, md5 in pairs(rock_manifest.bin) do - -- TODO verify that it is the same file. If it isn't, find the actual command. - if fs.is_actual_binary(dir.path(cfg.deploy_bin_dir, name)) then - return true - end - end - end - return false -end - -function repos.run_hook(rockspec, hook_name) - assert(type(rockspec) == "table") - assert(type(hook_name) == "string") - - local hooks = rockspec.hooks - if not hooks then - return true - end - - if cfg.hooks_enabled == false then - return nil, "This rockspec contains hooks, which are blocked by the 'hooks_enabled' setting in your LuaRocks configuration." - end - - if not hooks.substituted_variables then - util.variable_substitutions(hooks, rockspec.variables) - hooks.substituted_variables = true - end - local hook = hooks[hook_name] - if hook then - util.printout(hook) - if not fs.execute(hook) then - return nil, "Failed running "..hook_name.." hook." - end - end - return true -end - -function repos.should_wrap_bin_scripts(rockspec) - assert(type(rockspec) == "table") - - if cfg.wrap_bin_scripts ~= nil then - return cfg.wrap_bin_scripts - end - if rockspec.deploy and rockspec.deploy.wrap_bin_scripts == false then - return false - end - return true -end - -local function find_suffixed(file, suffix) - local filenames = {file} - if suffix and suffix ~= "" then - table.insert(filenames, 1, file .. suffix) - end - - for _, filename in ipairs(filenames) do - if fs.exists(filename) then - return filename - end - end - - return nil, table.concat(filenames, ", ") .. " not found" -end - -local function move_suffixed(from_file, to_file, suffix) - local suffixed_from_file, err = find_suffixed(from_file, suffix) - if not suffixed_from_file then - return nil, "Could not move " .. from_file .. " to " .. to_file .. ": " .. err - end - - suffix = suffixed_from_file:sub(#from_file + 1) - local suffixed_to_file = to_file .. suffix - return fs.move(suffixed_from_file, suffixed_to_file) -end - -local function delete_suffixed(file, suffix) - local suffixed_file, err = find_suffixed(file, suffix) - if not suffixed_file then - return nil, "Could not remove " .. file .. ": " .. err - end - - fs.delete(suffixed_file) - if fs.exists(suffixed_file) then - return nil, "Failed deleting " .. suffixed_file .. ": file still exists" - end - - return true -end - --- Files can be deployed using versioned and non-versioned names. --- Several items with same type and name can exist if they are --- provided by different packages or versions. In any case --- item from the newest version of lexicographically smallest package --- is deployed using non-versioned name and others use versioned names. - -local function get_deploy_paths(name, version, deploy_type, file_path) - local deploy_dir = cfg["deploy_" .. deploy_type .. "_dir"] - local non_versioned = dir.path(deploy_dir, file_path) - local versioned = path.versioned_name(non_versioned, deploy_dir, name, version) - return non_versioned, versioned -end - -local function prepare_target(name, version, deploy_type, file_path, suffix) - local non_versioned, versioned = get_deploy_paths(name, version, deploy_type, file_path) - local item_type, item_name = manif.get_provided_item(deploy_type, file_path) - local cur_name, cur_version = manif.get_current_provider(item_type, item_name) - - if not cur_name then - return non_versioned - elseif name < cur_name or (name == cur_name and deps.compare_versions(version, cur_version)) then - -- New version has priority. Move currently provided version back using versioned name. - local cur_deploy_type, cur_file_path = manif.get_providing_file(cur_name, cur_version, item_type, item_name) - local cur_non_versioned, cur_versioned = get_deploy_paths(cur_name, cur_version, cur_deploy_type, cur_file_path) - - local dir_ok, dir_err = fs.make_dir(dir.dir_name(cur_versioned)) - if not dir_ok then return nil, dir_err end - - local move_ok, move_err = move_suffixed(cur_non_versioned, cur_versioned, suffix) - if not move_ok then return nil, move_err end - - return non_versioned - else - -- Current version has priority, deploy new version using versioned name. - return versioned - end -end - ---- Deploy a package from the rocks subdirectory. --- @param name string: name of package --- @param version string: exact package version in string format --- @param wrap_bin_scripts bool: whether commands written in Lua should be wrapped. --- @param deps_mode: string: Which trees to check dependencies for: --- "one" for the current default tree, "all" for all trees, --- "order" for all trees with priority >= the current default, "none" for no trees. -function repos.deploy_files(name, version, wrap_bin_scripts, deps_mode) - assert(type(name) == "string") - assert(type(version) == "string") - assert(type(wrap_bin_scripts) == "boolean") - - local rock_manifest = manif.load_rock_manifest(name, version) - - local function deploy_file_tree(deploy_type, source_dir, move_fn, suffix) - if not rock_manifest[deploy_type] then - return true - end - - return recurse_rock_manifest_tree(rock_manifest[deploy_type], function(parent_path, parent_module, file) - local file_path = parent_path .. file - local source = dir.path(source_dir, file_path) - - local target, prepare_err = prepare_target(name, version, deploy_type, file_path, suffix) - if not target then return nil, prepare_err end - - local dir_ok, dir_err = fs.make_dir(dir.dir_name(target)) - if not dir_ok then return nil, dir_err end - - local suffixed_target, mover = move_fn(source, target) - if fs.exists(suffixed_target) then - local backup = suffixed_target - repeat - backup = backup.."~" - until not fs.exists(backup) -- Slight race condition here, but shouldn't be a problem. - - util.printerr("Warning: "..suffixed_target.." is not tracked by this installation of LuaRocks. Moving it to "..backup) - local move_ok, move_err = fs.move(suffixed_target, backup) - if not move_ok then return nil, move_err end - end - - local move_ok, move_err = mover() - if not move_ok then return nil, move_err end - - fs.remove_dir_tree_if_empty(dir.dir_name(source)) - return true - end) - end - - local function install_binary(source, target) - if wrap_bin_scripts and fs.is_lua(source) then - return target .. (cfg.wrapper_suffix or ""), function() return fs.wrap_script(source, target, name, version) end - else - return target, function() return fs.copy_binary(source, target) end - end - end - - local function make_mover(perms) - return function(source, target) - return target, function() return fs.move(source, target, perms) end - end - end - - local ok, err = deploy_file_tree("bin", path.bin_dir(name, version), install_binary, cfg.wrapper_suffix) - if not ok then return nil, err end - - ok, err = deploy_file_tree("lua", path.lua_dir(name, version), make_mover(cfg.perm_read)) - if not ok then return nil, err end - - ok, err = deploy_file_tree("lib", path.lib_dir(name, version), make_mover(cfg.perm_exec)) - if not ok then return nil, err end - - return manif.add_to_manifest(name, version, nil, deps_mode) -end - ---- Delete a package from the local repository. --- @param name string: name of package --- @param version string: exact package version in string format --- @param deps_mode: string: Which trees to check dependencies for: --- "one" for the current default tree, "all" for all trees, --- "order" for all trees with priority >= the current default, "none" for no trees. --- @param quick boolean: do not try to fix the versioned name --- of another version that provides the same module that --- was deleted. This is used during 'purge', as every module --- will be eventually deleted. -function repos.delete_version(name, version, deps_mode, quick) - assert(type(name) == "string") - assert(type(version) == "string") - assert(type(deps_mode) == "string") - - local rock_manifest = manif.load_rock_manifest(name, version) - if not rock_manifest then - return nil, "rock_manifest file not found for "..name.." "..version.." - not a LuaRocks 2 tree?" - end - - local function delete_deployed_file_tree(deploy_type, suffix) - if not rock_manifest[deploy_type] then - return true - end - - return recurse_rock_manifest_tree(rock_manifest[deploy_type], function(parent_path, parent_module, file) - local file_path = parent_path .. file - local non_versioned, versioned = get_deploy_paths(name, version, deploy_type, file_path) - - -- Figure out if the file is deployed using versioned or non-versioned name. - local target - local item_type, item_name = manif.get_provided_item(deploy_type, file_path) - local cur_name, cur_version = manif.get_current_provider(item_type, item_name) - - if cur_name == name and cur_version == version then - -- This package has highest priority, should be in non-versioned location. - target = non_versioned - else - target = versioned - end - - local ok, err = delete_suffixed(target, suffix) - if not ok then return nil, err end - - if not quick and target == non_versioned then - -- If another package provides this file, move its version - -- into non-versioned location instead. - local next_name, next_version = manif.get_next_provider(item_type, item_name) - - if next_name then - local next_deploy_type, next_file_path = manif.get_providing_file(next_name, next_version, item_type, item_name) - local next_non_versioned, next_versioned = get_deploy_paths(next_name, next_version, next_deploy_type, next_file_path) - - local move_ok, move_err = move_suffixed(next_versioned, next_non_versioned, suffix) - if not move_ok then return nil, move_err end - - fs.remove_dir_tree_if_empty(dir.dir_name(next_versioned)) - end - end - - fs.remove_dir_tree_if_empty(dir.dir_name(target)) - return true - end) - end - - local ok, err = delete_deployed_file_tree("bin", cfg.wrapper_suffix) - if not ok then return nil, err end - - ok, err = delete_deployed_file_tree("lua") - if not ok then return nil, err end - - ok, err = delete_deployed_file_tree("lib") - if not ok then return nil, err end - - fs.delete(path.install_dir(name, version)) - if not get_installed_versions(name) then - fs.delete(dir.path(cfg.rocks_dir, name)) - end - - if quick then - return true - end - - return manif.remove_from_manifest(name, version, nil, deps_mode) -end - -return repos diff --git a/Utils/luarocks/lua/luarocks/require.lua b/Utils/luarocks/lua/luarocks/require.lua deleted file mode 100644 index 902bd1a3c..000000000 --- a/Utils/luarocks/lua/luarocks/require.lua +++ /dev/null @@ -1,2 +0,0 @@ ---- Retained for compatibility reasons only. Use luarocks.loader instead. -return require("luarocks.loader") diff --git a/Utils/luarocks/lua/luarocks/search.lua b/Utils/luarocks/lua/luarocks/search.lua deleted file mode 100644 index d22c2a185..000000000 --- a/Utils/luarocks/lua/luarocks/search.lua +++ /dev/null @@ -1,483 +0,0 @@ - ---- Module implementing the LuaRocks "search" command. --- Queries LuaRocks servers. -local search = {} -package.loaded["luarocks.search"] = search - -local dir = require("luarocks.dir") -local path = require("luarocks.path") -local manif = require("luarocks.manif") -local deps = require("luarocks.deps") -local cfg = require("luarocks.cfg") -local util = require("luarocks.util") - -util.add_run_function(search) -search.help_summary = "Query the LuaRocks servers." -search.help_arguments = "[--source] [--binary] { [] | --all }" -search.help = [[ ---source Return only rockspecs and source rocks, - to be used with the "build" command. ---binary Return only pure Lua and binary rocks (rocks that can be used - with the "install" command without requiring a C toolchain). ---all List all contents of the server that are suitable to - this platform, do not filter by name. -]] - ---- Convert the arch field of a query table to table format. --- @param query table: A query table. -local function query_arch_as_table(query) - local format = type(query.arch) - if format == "table" then - return - elseif format == "nil" then - local accept = {} - accept["src"] = true - accept["all"] = true - accept["rockspec"] = true - accept["installed"] = true - accept[cfg.arch] = true - query.arch = accept - elseif format == "string" then - local accept = {} - for a in query.arch:gmatch("[%w_-]+") do - accept[a] = true - end - query.arch = accept - end -end - ---- Store a search result (a rock or rockspec) in the results table. --- @param results table: The results table, where keys are package names and --- values are tables matching version strings to arrays of --- tables with fields "arch" and "repo". --- @param name string: Package name. --- @param version string: Package version. --- @param arch string: Architecture of rock ("all", "src" or platform --- identifier), "rockspec" or "installed" --- @param repo string: Pathname of a local repository of URL of --- rocks server. -local function store_result(results, name, version, arch, repo) - assert(type(results) == "table") - assert(type(name) == "string") - assert(type(version) == "string") - assert(type(arch) == "string") - assert(type(repo) == "string") - - if not results[name] then results[name] = {} end - if not results[name][version] then results[name][version] = {} end - table.insert(results[name][version], { - arch = arch, - repo = repo - }) -end - ---- Test the name field of a query. --- If query has a boolean field exact_name set to false, --- then substring match is performed; otherwise, exact string --- comparison is done. --- @param query table: A query in dependency table format. --- @param name string: A package name. --- @return boolean: True if names match, false otherwise. -local function match_name(query, name) - assert(type(query) == "table") - assert(type(name) == "string") - if query.exact_name == false then - return name:find(query.name, 0, true) and true or false - else - return name == query.name - end -end - ---- Store a match in a results table if version matches query. --- Name, version, arch and repository path are stored in a given --- table, optionally checking if version and arch (if given) match --- a query. --- @param results table: The results table, where keys are package names and --- values are tables matching version strings to arrays of --- tables with fields "arch" and "repo". --- @param repo string: URL or pathname of the repository. --- @param name string: The name of the package being tested. --- @param version string: The version of the package being tested. --- @param arch string: The arch of the package being tested. --- @param query table: A table describing the query in dependency --- format (for example, {name = "filesystem", exact_name = false, --- constraints = {op = "~>", version = {1,0}}}, arch = "rockspec"). --- If the arch field is omitted, the local architecture (cfg.arch) --- is used. The special value "any" is also recognized, returning all --- matches regardless of architecture. -local function store_if_match(results, repo, name, version, arch, query) - if match_name(query, name) then - if query.arch[arch] or query.arch["any"] then - if deps.match_constraints(deps.parse_version(version), query.constraints) then - store_result(results, name, version, arch, repo) - end - end - end -end - ---- Perform search on a local repository. --- @param repo string: The pathname of the local repository. --- @param query table: A table describing the query in dependency --- format (for example, {name = "filesystem", exact_name = false, --- constraints = {op = "~>", version = {1,0}}}, arch = "rockspec"). --- If the arch field is omitted, the local architecture (cfg.arch) --- is used. The special value "any" is also recognized, returning all --- matches regardless of architecture. --- @param results table or nil: If given, this table will store the --- results; if not given, a new table will be created. --- @return table: The results table, where keys are package names and --- values are tables matching version strings to arrays of --- tables with fields "arch" and "repo". --- If a table was given in the "results" parameter, that is the result value. -function search.disk_search(repo, query, results) - assert(type(repo) == "string") - assert(type(query) == "table") - assert(type(results) == "table" or not results) - - local fs = require("luarocks.fs") - - if not results then - results = {} - end - query_arch_as_table(query) - - for name in fs.dir(repo) do - local pathname = dir.path(repo, name) - local rname, rversion, rarch = path.parse_name(name) - - if rname and (pathname:match(".rockspec$") or pathname:match(".rock$")) then - store_if_match(results, repo, rname, rversion, rarch, query) - elseif fs.is_dir(pathname) then - for version in fs.dir(pathname) do - if version:match("-%d+$") then - store_if_match(results, repo, name, version, "installed", query) - end - end - end - end - return results -end - ---- Perform search on a rocks server or tree. --- @param results table: The results table, where keys are package names and --- values are tables matching version strings to arrays of --- tables with fields "arch" and "repo". --- @param repo string: The URL of a rocks server or --- the pathname of a rocks tree (as returned by path.rocks_dir()). --- @param query table: A table describing the query in dependency --- format (for example, {name = "filesystem", exact_name = false, --- constraints = {op = "~>", version = {1,0}}}, arch = "rockspec"). --- If the arch field is omitted, the local architecture (cfg.arch) --- is used. The special value "any" is also recognized, returning all --- matches regardless of architecture. --- @param lua_version string: Lua version in "5.x" format, defaults to installed version. --- @return true or, in case of errors, nil, an error message and an optional error code. -function search.manifest_search(results, repo, query, lua_version) - assert(type(results) == "table") - assert(type(repo) == "string") - assert(type(query) == "table") - - query_arch_as_table(query) - local manifest, err, errcode = manif.load_manifest(repo, lua_version) - if not manifest then - return nil, err, errcode - end - for name, versions in pairs(manifest.repository) do - for version, items in pairs(versions) do - for _, item in ipairs(items) do - store_if_match(results, repo, name, version, item.arch, query) - end - end - end - return true -end - ---- Search on all configured rocks servers. --- @param query table: A dependency query. --- @param lua_version string: Lua version in "5.x" format, defaults to installed version. --- @return table: A table where keys are package names --- and values are tables matching version strings to arrays of --- tables with fields "arch" and "repo". -function search.search_repos(query, lua_version) - assert(type(query) == "table") - - local results = {} - for _, repo in ipairs(cfg.rocks_servers) do - if not cfg.disabled_servers[repo] then - if type(repo) == "string" then - repo = { repo } - end - for _, mirror in ipairs(repo) do - local protocol, pathname = dir.split_url(mirror) - if protocol == "file" then - mirror = pathname - end - local ok, err, errcode = search.manifest_search(results, mirror, query, lua_version) - if errcode == "network" then - cfg.disabled_servers[repo] = true - end - if ok then - break - else - util.warning("Failed searching manifest: "..err) - end - end - end - end - -- search through rocks in cfg.rocks_provided - local provided_repo = "provided by VM or rocks_provided" - for name, versions in pairs(cfg.rocks_provided) do - store_if_match(results, provided_repo, name, versions, "installed", query) - end - return results -end - ---- Prepare a query in dependency table format. --- @param name string: The query name. --- @param version string or nil: --- @return table: A query in table format -function search.make_query(name, version) - assert(type(name) == "string") - assert(type(version) == "string" or not version) - - local query = { - name = name, - constraints = {} - } - if version then - table.insert(query.constraints, { op = "==", version = deps.parse_version(version)}) - end - return query -end - ---- Get the URL for the latest in a set of versions. --- @param name string: The package name to be used in the URL. --- @param versions table: An array of version informations, as stored --- in search results tables. --- @return string or nil: the URL for the latest version if one could --- be picked, or nil. -local function pick_latest_version(name, versions) - assert(type(name) == "string") - assert(type(versions) == "table") - - local vtables = {} - for v, _ in pairs(versions) do - table.insert(vtables, deps.parse_version(v)) - end - table.sort(vtables) - local version = vtables[#vtables].string - local items = versions[version] - if items then - local pick = 1 - for i, item in ipairs(items) do - if (item.arch == 'src' and items[pick].arch == 'rockspec') - or (item.arch ~= 'src' and item.arch ~= 'rockspec') then - pick = i - end - end - return path.make_url(items[pick].repo, name, version, items[pick].arch) - end - return nil -end - --- Find out which other Lua versions provide rock versions matching a query, --- @param query table: A dependency query matching a single rock. --- @return table: array of Lua versions supported, in "5.x" format. -local function supported_lua_versions(query) - local results = {} - - for lua_version in util.lua_versions() do - if lua_version ~= cfg.lua_version then - if search.search_repos(query, lua_version)[query.name] then - table.insert(results, lua_version) - end - end - end - - return results -end - ---- Attempt to get a single URL for a given search for a rock. --- @param query table: A dependency query matching a single rock. --- @return string or (nil, string): URL for latest matching version --- of the rock if it was found, or nil followed by an error message. -function search.find_suitable_rock(query) - assert(type(query) == "table") - - local results = search.search_repos(query) - local first_rock = next(results) - if not first_rock then - if cfg.rocks_provided[query.name] == nil then - -- Check if constraints are satisfiable with other Lua versions. - local lua_versions = supported_lua_versions(query) - - if #lua_versions ~= 0 then - -- Build a nice message in "only Lua 5.x and 5.y but not 5.z." format - for i, lua_version in ipairs(lua_versions) do - lua_versions[i] = "Lua "..lua_version - end - - local versions_message = "only "..table.concat(lua_versions, " and ").. - " but not Lua "..cfg.lua_version.."." - - if #query.constraints == 0 then - return nil, query.name.." supports "..versions_message - elseif #query.constraints == 1 and query.constraints[1].op == "==" then - return nil, query.name.." "..query.constraints[1].version.string.." supports "..versions_message - else - return nil, "Matching "..query.name.." versions support "..versions_message - end - end - end - - return nil, "No results matching query were found." - elseif next(results, first_rock) then - -- Shouldn't happen as query must match only one package. - return nil, "Several rocks matched query." - elseif cfg.rocks_provided[query.name] ~= nil then - -- Do not install versions listed in cfg.rocks_provided. - return nil, "Rock "..query.name.." "..cfg.rocks_provided[query.name].. - " was found but it is provided by VM or 'rocks_provided' in the config file." - else - return pick_latest_version(query.name, results[first_rock]) - end -end - ---- Print a list of rocks/rockspecs on standard output. --- @param results table: A table where keys are package names and versions --- are tables matching version strings to an array of rocks servers. --- @param porcelain boolean or nil: A flag to force machine-friendly output. -function search.print_results(results, porcelain) - assert(type(results) == "table") - assert(type(porcelain) == "boolean" or not porcelain) - - for package, versions in util.sortedpairs(results) do - if not porcelain then - util.printout(package) - end - for version, repos in util.sortedpairs(versions, deps.compare_versions) do - for _, repo in ipairs(repos) do - repo.repo = dir.normalize(repo.repo) - if porcelain then - util.printout(package, version, repo.arch, repo.repo) - else - util.printout(" "..version.." ("..repo.arch..") - "..repo.repo) - end - end - end - if not porcelain then - util.printout() - end - end -end - ---- Splits a list of search results into two lists, one for "source" results --- to be used with the "build" command, and one for "binary" results to be --- used with the "install" command. --- @param results table: A search results table. --- @return (table, table): Two tables, one for source and one for binary --- results. -local function split_source_and_binary_results(results) - local sources, binaries = {}, {} - for name, versions in pairs(results) do - for version, repositories in pairs(versions) do - for _, repo in ipairs(repositories) do - local where = sources - if repo.arch == "all" or repo.arch == cfg.arch then - where = binaries - end - store_result(where, name, version, repo.arch, repo.repo) - end - end - end - return sources, binaries -end - ---- Given a name and optionally a version, try to find in the rocks --- servers a single .src.rock or .rockspec file that satisfies --- the request, and run the given function on it; or display to the --- user possibilities if it couldn't narrow down a single match. --- @param action function: A function that takes a .src.rock or --- .rockspec URL as a parameter. --- @param name string: A rock name --- @param version string or nil: A version number may also be given. --- @return The result of the action function, or nil and an error message. -function search.act_on_src_or_rockspec(action, name, version, ...) - assert(type(action) == "function") - assert(type(name) == "string") - assert(type(version) == "string" or not version) - - local query = search.make_query(name, version) - query.arch = "src|rockspec" - local url, err = search.find_suitable_rock(query) - if not url then - return nil, "Could not find a result named "..name..(version and " "..version or "")..": "..err - end - return action(url, ...) -end - -function search.pick_installed_rock(name, version, given_tree) - local results = {} - local query = search.make_query(name, version) - query.exact_name = true - local tree_map = {} - local trees = cfg.rocks_trees - if given_tree then - trees = { given_tree } - end - for _, tree in ipairs(trees) do - local rocks_dir = path.rocks_dir(tree) - tree_map[rocks_dir] = tree - search.manifest_search(results, rocks_dir, query) - end - - if not next(results) then -- - return nil,"cannot find package "..name.." "..(version or "").."\nUse 'list' to find installed rocks." - end - - version = nil - local repo_url - local package, versions = util.sortedpairs(results)() - --question: what do we do about multiple versions? This should - --give us the latest version on the last repo (which is usually the global one) - for vs, repositories in util.sortedpairs(versions, deps.compare_versions) do - if not version then version = vs end - for _, rp in ipairs(repositories) do repo_url = rp.repo end - end - - local repo = tree_map[repo_url] - return name, version, repo, repo_url -end - ---- Driver function for "search" command. --- @param name string: A substring of a rock name to search. --- @param version string or nil: a version may also be passed. --- @return boolean or (nil, string): True if build was successful; nil and an --- error message otherwise. -function search.command(flags, name, version) - if flags["all"] then - name, version = "", nil - end - - if type(name) ~= "string" and not flags["all"] then - return nil, "Enter name and version or use --all. "..util.see_help("search") - end - - local query = search.make_query(name:lower(), version) - query.exact_name = false - local results, err = search.search_repos(query) - local porcelain = flags["porcelain"] - util.title("Search results:", porcelain, "=") - local sources, binaries = split_source_and_binary_results(results) - if next(sources) and not flags["binary"] then - util.title("Rockspecs and source rocks:", porcelain) - search.print_results(sources, porcelain) - end - if next(binaries) and not flags["source"] then - util.title("Binary and pure-Lua rocks:", porcelain) - search.print_results(binaries, porcelain) - end - return true -end - -return search diff --git a/Utils/luarocks/lua/luarocks/show.lua b/Utils/luarocks/lua/luarocks/show.lua deleted file mode 100644 index 85c7edcbd..000000000 --- a/Utils/luarocks/lua/luarocks/show.lua +++ /dev/null @@ -1,152 +0,0 @@ ---- Module implementing the LuaRocks "show" command. --- Shows information about an installed rock. -local show = {} -package.loaded["luarocks.show"] = show - -local search = require("luarocks.search") -local cfg = require("luarocks.cfg") -local util = require("luarocks.util") -local path = require("luarocks.path") -local deps = require("luarocks.deps") -local fetch = require("luarocks.fetch") -local manif = require("luarocks.manif") - -util.add_run_function(show) -show.help_summary = "Show information about an installed rock." - -show.help = [[ - is an existing package name. -Without any flags, show all module information. -With these flags, return only the desired information: - ---home home page of project ---modules all modules provided by this package as used by require() ---deps packages this package depends on ---rockspec the full path of the rockspec file ---mversion the package version ---rock-tree local tree where rock is installed ---rock-dir data directory of the installed rock -]] - -local function keys_as_string(t, sep) - local keys = util.keys(t) - table.sort(keys) - return table.concat(keys, sep or " ") -end - -local function word_wrap(line) - local width = tonumber(os.getenv("COLUMNS")) or 80 - if width > 80 then width = 80 end - if #line > width then - local brk = width - while brk > 0 and line:sub(brk, brk) ~= " " do - brk = brk - 1 - end - if brk > 0 then - return line:sub(1, brk-1) .. "\n" .. word_wrap(line:sub(brk+1)) - end - end - return line -end - -local function format_text(text) - text = text:gsub("^%s*",""):gsub("%s$", ""):gsub("\n[ \t]+","\n"):gsub("([^\n])\n([^\n])","%1 %2") - local paragraphs = util.split_string(text, "\n\n") - for n, line in ipairs(paragraphs) do - paragraphs[n] = word_wrap(line) - end - return (table.concat(paragraphs, "\n\n"):gsub("%s$", "")) -end - -local function installed_rock_label(name, tree) - local installed, version - if cfg.rocks_provided[name] then - installed, version = true, cfg.rocks_provided[name] - else - installed, version = search.pick_installed_rock(name, nil, tree) - end - return installed and "(using "..version..")" or "(missing)" -end - ---- Driver function for "show" command. --- @param name or nil: an existing package name. --- @param version string or nil: a version may also be passed. --- @return boolean: True if succeeded, nil on errors. -function show.command(flags, name, version) - if not name then - return nil, "Argument missing. "..util.see_help("show") - end - - local repo, repo_url - name, version, repo, repo_url = search.pick_installed_rock(name:lower(), version, flags["tree"]) - if not name then - return nil, version - end - - local directory = path.install_dir(name,version,repo) - local rockspec_file = path.rockspec_file(name, version, repo) - local rockspec, err = fetch.load_local_rockspec(rockspec_file) - if not rockspec then return nil,err end - - local descript = rockspec.description or {} - local manifest, err = manif.load_manifest(repo_url) - if not manifest then return nil,err end - local minfo = manifest.repository[name][version][1] - - if flags["rock-tree"] then util.printout(path.rocks_tree_to_string(repo)) - elseif flags["rock-dir"] then util.printout(directory) - elseif flags["home"] then util.printout(descript.homepage) - elseif flags["modules"] then util.printout(keys_as_string(minfo.modules, "\n")) - elseif flags["deps"] then util.printout(keys_as_string(minfo.dependencies)) - elseif flags["rockspec"] then util.printout(rockspec_file) - elseif flags["mversion"] then util.printout(version) - else - util.printout() - util.printout(rockspec.package.." "..rockspec.version.." - "..(descript.summary or "")) - util.printout() - if descript.detailed then - util.printout(format_text(descript.detailed)) - util.printout() - end - if descript.license then - util.printout("License: ", descript.license) - end - if descript.homepage then - util.printout("Homepage: ", descript.homepage) - end - util.printout("Installed in: ", path.rocks_tree_to_string(repo)) - if next(minfo.modules) then - util.printout() - util.printout("Modules:") - for mod, filename in util.sortedpairs(minfo.modules) do - util.printout("\t"..mod.." ("..path.which(mod, filename, name, version, repo, manifest)..")") - end - end - local direct_deps = {} - if #rockspec.dependencies > 0 then - util.printout() - util.printout("Depends on:") - for _, dep in ipairs(rockspec.dependencies) do - direct_deps[dep.name] = true - util.printout("\t"..deps.show_dep(dep).." "..installed_rock_label(dep.name, flags["tree"])) - end - end - local has_indirect_deps - for dep_name in util.sortedpairs(minfo.dependencies) do - if not direct_deps[dep_name] then - if not has_indirect_deps then - util.printout() - util.printout("Indirectly pulling:") - has_indirect_deps = true - end - - util.printout("\t"..dep_name.." "..installed_rock_label(dep_name, flags["tree"])) - end - end - util.printout() - end - return true -end - - -return show diff --git a/Utils/luarocks/lua/luarocks/site_config_5_1.lua b/Utils/luarocks/lua/luarocks/site_config_5_1.lua deleted file mode 100644 index 85ab3ddf4..000000000 --- a/Utils/luarocks/lua/luarocks/site_config_5_1.lua +++ /dev/null @@ -1,14 +0,0 @@ -local site_config = {} -site_config.LUA_INCDIR=[[C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks\include]] -site_config.LUA_LIBDIR=[[C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks]] -site_config.LUA_BINDIR=[[C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks]] -site_config.LUA_INTERPRETER=[[lua5.1]] -site_config.LUAROCKS_UNAME_S=[[MINGW]] -site_config.LUAROCKS_UNAME_M=[[x86]] -site_config.LUAROCKS_ROCKS_TREE=[[C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks\systree]] -site_config.LUAROCKS_PREFIX=[[C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks]] -site_config.LUAROCKS_DOWNLOADER=[[wget]] -site_config.LUAROCKS_MD5CHECKER=[[md5sum]] -site_config.LUAROCKS_FORCE_CONFIG=true -site_config.LUAROCKS_SYSCONFDIR=[[C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks]] -return site_config diff --git a/Utils/luarocks/lua/luarocks/tools/patch.lua b/Utils/luarocks/lua/luarocks/tools/patch.lua deleted file mode 100644 index 44d00ef89..000000000 --- a/Utils/luarocks/lua/luarocks/tools/patch.lua +++ /dev/null @@ -1,700 +0,0 @@ ---- Patch utility to apply unified diffs. --- --- http://lua-users.org/wiki/LuaPatch --- --- (c) 2008 David Manura, Licensed under the same terms as Lua (MIT license). --- Code is heavilly based on the Python-based patch.py version 8.06-1 --- Copyright (c) 2008 rainforce.org, MIT License --- Project home: http://code.google.com/p/python-patch/ . --- Version 0.1 - -local patch = {} - -local fs = require("luarocks.fs") -local util = require("luarocks.util") - -local io = io -local os = os -local string = string -local table = table -local format = string.format - --- logging -local debugmode = false -local function debug(_) end -local function info(_) end -local function warning(s) io.stderr:write(s .. '\n') end - --- Returns boolean whether string s2 starts with string s. -local function startswith(s, s2) - return s:sub(1, #s2) == s2 -end - --- Returns boolean whether string s2 ends with string s. -local function endswith(s, s2) - return #s >= #s2 and s:sub(#s-#s2+1) == s2 -end - --- Returns string s after filtering out any new-line characters from end. -local function endlstrip(s) - return s:gsub('[\r\n]+$', '') -end - --- Returns shallow copy of table t. -local function table_copy(t) - local t2 = {} - for k,v in pairs(t) do t2[k] = v end - return t2 -end - -local function exists(filename) - local fh = io.open(filename) - local result = fh ~= nil - if fh then fh:close() end - return result -end -local function isfile() return true end --FIX? - -local function read_file(filename) - local fh, data, err, oserr - fh, err, oserr = io.open(filename, 'rb') - if not fh then return fh, err, oserr end - data, err, oserr = fh:read'*a' - fh:close() - if not data then return nil, err, oserr end - return data -end - -local function write_file(filename, data) - local fh, status, err, oserr - fh, err, oserr = io.open(filename 'wb') - if not fh then return fh, err, oserr end - status, err, oserr = fh:write(data) - fh:close() - if not status then return nil, err, oserr end - return true -end - -local function file_copy(src, dest) - local data, status, err, oserr - data, err, oserr = read_file(src) - if not data then return data, err, oserr end - status, err, oserr = write_file(dest) - if not status then return status, err, oserr end - return true -end - -local function string_as_file(s) - return { - at = 0, - str = s, - len = #s, - eof = false, - read = function(self, n) - if self.eof then return nil end - local chunk = self.str:sub(self.at, self.at + n - 1) - self.at = self.at + n - if self.at > self.len then - self.eof = true - end - return chunk - end, - close = function(self) - self.eof = true - end, - } -end - --- --- file_lines(f) is similar to f:lines() for file f. --- The main difference is that read_lines includes --- new-line character sequences ("\n", "\r\n", "\r"), --- if any, at the end of each line. Embedded "\0" are also handled. --- Caution: The newline behavior can depend on whether f is opened --- in binary or ASCII mode. --- (file_lines - version 20080913) --- -local function file_lines(f) - local CHUNK_SIZE = 1024 - local buffer = "" - local pos_beg = 1 - return function() - local pos, chars - while 1 do - pos, chars = buffer:match('()([\r\n].)', pos_beg) - if pos or not f then - break - elseif f then - local chunk = f:read(CHUNK_SIZE) - if chunk then - buffer = buffer:sub(pos_beg) .. chunk - pos_beg = 1 - else - f = nil - end - end - end - if not pos then - pos = #buffer - elseif chars == '\r\n' then - pos = pos + 1 - end - local line = buffer:sub(pos_beg, pos) - pos_beg = pos + 1 - if #line > 0 then - return line - end - end -end - -local function match_linerange(line) - local m1, m2, m3, m4 = line:match("^@@ %-(%d+),(%d+) %+(%d+),(%d+)") - if not m1 then m1, m3, m4 = line:match("^@@ %-(%d+) %+(%d+),(%d+)") end - if not m1 then m1, m2, m3 = line:match("^@@ %-(%d+),(%d+) %+(%d+)") end - if not m1 then m1, m3 = line:match("^@@ %-(%d+) %+(%d+)") end - return m1, m2, m3, m4 -end - -function patch.read_patch(filename, data) - -- define possible file regions that will direct the parser flow - local state = 'header' - -- 'header' - comments before the patch body - -- 'filenames' - lines starting with --- and +++ - -- 'hunkhead' - @@ -R +R @@ sequence - -- 'hunkbody' - -- 'hunkskip' - skipping invalid hunk mode - - local all_ok = true - local lineends = {lf=0, crlf=0, cr=0} - local files = {source={}, target={}, hunks={}, fileends={}, hunkends={}} - local nextfileno = 0 - local nexthunkno = 0 --: even if index starts with 0 user messages - -- number hunks from 1 - - -- hunkinfo holds parsed values, hunkactual - calculated - local hunkinfo = { - startsrc=nil, linessrc=nil, starttgt=nil, linestgt=nil, - invalid=false, text={} - } - local hunkactual = {linessrc=nil, linestgt=nil} - - info(format("reading patch %s", filename)) - - local fp - if data then - fp = string_as_file(data) - else - fp = filename == '-' and io.stdin or assert(io.open(filename, "rb")) - end - local lineno = 0 - - for line in file_lines(fp) do - lineno = lineno + 1 - if state == 'header' then - if startswith(line, "--- ") then - state = 'filenames' - end - -- state is 'header' or 'filenames' - end - if state == 'hunkbody' then - -- skip hunkskip and hunkbody code until definition of hunkhead read - - if line:match"^[\r\n]*$" then - -- prepend space to empty lines to interpret them as context properly - line = " " .. line - end - - -- process line first - if line:match"^[- +\\]" then - -- gather stats about line endings - local he = files.hunkends[nextfileno] - if endswith(line, "\r\n") then - he.crlf = he.crlf + 1 - elseif endswith(line, "\n") then - he.lf = he.lf + 1 - elseif endswith(line, "\r") then - he.cr = he.cr + 1 - end - if startswith(line, "-") then - hunkactual.linessrc = hunkactual.linessrc + 1 - elseif startswith(line, "+") then - hunkactual.linestgt = hunkactual.linestgt + 1 - elseif startswith(line, "\\") then - -- nothing - else - hunkactual.linessrc = hunkactual.linessrc + 1 - hunkactual.linestgt = hunkactual.linestgt + 1 - end - table.insert(hunkinfo.text, line) - -- todo: handle \ No newline cases - else - warning(format("invalid hunk no.%d at %d for target file %s", - nexthunkno, lineno, files.target[nextfileno])) - -- add hunk status node - table.insert(files.hunks[nextfileno], table_copy(hunkinfo)) - files.hunks[nextfileno][nexthunkno].invalid = true - all_ok = false - state = 'hunkskip' - end - - -- check exit conditions - if hunkactual.linessrc > hunkinfo.linessrc or - hunkactual.linestgt > hunkinfo.linestgt - then - warning(format("extra hunk no.%d lines at %d for target %s", - nexthunkno, lineno, files.target[nextfileno])) - -- add hunk status node - table.insert(files.hunks[nextfileno], table_copy(hunkinfo)) - files.hunks[nextfileno][nexthunkno].invalid = true - state = 'hunkskip' - elseif hunkinfo.linessrc == hunkactual.linessrc and - hunkinfo.linestgt == hunkactual.linestgt - then - table.insert(files.hunks[nextfileno], table_copy(hunkinfo)) - state = 'hunkskip' - - -- detect mixed window/unix line ends - local ends = files.hunkends[nextfileno] - if (ends.cr~=0 and 1 or 0) + (ends.crlf~=0 and 1 or 0) + - (ends.lf~=0 and 1 or 0) > 1 - then - warning(format("inconsistent line ends in patch hunks for %s", - files.source[nextfileno])) - end - if debugmode then - local debuglines = {crlf=ends.crlf, lf=ends.lf, cr=ends.cr, - file=files.target[nextfileno], hunk=nexthunkno} - debug(format("crlf: %(crlf)d lf: %(lf)d cr: %(cr)d\t " .. - "- file: %(file)s hunk: %(hunk)d", debuglines)) - end - end - -- state is 'hunkbody' or 'hunkskip' - end - - if state == 'hunkskip' then - if match_linerange(line) then - state = 'hunkhead' - elseif startswith(line, "--- ") then - state = 'filenames' - if debugmode and #files.source > 0 then - debug(format("- %2d hunks for %s", #files.hunks[nextfileno], - files.source[nextfileno])) - end - end - -- state is 'hunkskip', 'hunkhead', or 'filenames' - end - local advance - if state == 'filenames' then - if startswith(line, "--- ") then - if util.array_contains(files.source, nextfileno) then - all_ok = false - warning(format("skipping invalid patch for %s", - files.source[nextfileno+1])) - table.remove(files.source, nextfileno+1) - -- double source filename line is encountered - -- attempt to restart from this second line - end - -- Accept a space as a terminator, like GNU patch does. - -- Breaks patches containing filenames with spaces... - -- FIXME Figure out what does GNU patch do in those cases. - local match = line:match("^%-%-%- ([^ \t\r\n]+)") - if not match then - all_ok = false - warning(format("skipping invalid filename at line %d", lineno+1)) - state = 'header' - else - table.insert(files.source, match) - end - elseif not startswith(line, "+++ ") then - if util.array_contains(files.source, nextfileno) then - all_ok = false - warning(format("skipping invalid patch with no target for %s", - files.source[nextfileno+1])) - table.remove(files.source, nextfileno+1) - else - -- this should be unreachable - warning("skipping invalid target patch") - end - state = 'header' - else - if util.array_contains(files.target, nextfileno) then - all_ok = false - warning(format("skipping invalid patch - double target at line %d", - lineno+1)) - table.remove(files.source, nextfileno+1) - table.remove(files.target, nextfileno+1) - nextfileno = nextfileno - 1 - -- double target filename line is encountered - -- switch back to header state - state = 'header' - else - -- Accept a space as a terminator, like GNU patch does. - -- Breaks patches containing filenames with spaces... - -- FIXME Figure out what does GNU patch do in those cases. - local re_filename = "^%+%+%+ ([^ \t\r\n]+)" - local match = line:match(re_filename) - if not match then - all_ok = false - warning(format( - "skipping invalid patch - no target filename at line %d", - lineno+1)) - state = 'header' - else - table.insert(files.target, match) - nextfileno = nextfileno + 1 - nexthunkno = 0 - table.insert(files.hunks, {}) - table.insert(files.hunkends, table_copy(lineends)) - table.insert(files.fileends, table_copy(lineends)) - state = 'hunkhead' - advance = true - end - end - end - -- state is 'filenames', 'header', or ('hunkhead' with advance) - end - if not advance and state == 'hunkhead' then - local m1, m2, m3, m4 = match_linerange(line) - if not m1 then - if not util.array_contains(files.hunks, nextfileno-1) then - all_ok = false - warning(format("skipping invalid patch with no hunks for file %s", - files.target[nextfileno])) - end - state = 'header' - else - hunkinfo.startsrc = tonumber(m1) - hunkinfo.linessrc = tonumber(m2 or 1) - hunkinfo.starttgt = tonumber(m3) - hunkinfo.linestgt = tonumber(m4 or 1) - hunkinfo.invalid = false - hunkinfo.text = {} - - hunkactual.linessrc = 0 - hunkactual.linestgt = 0 - - state = 'hunkbody' - nexthunkno = nexthunkno + 1 - end - -- state is 'header' or 'hunkbody' - end - end - if state ~= 'hunkskip' then - warning(format("patch file incomplete - %s", filename)) - all_ok = false - -- os.exit(?) - else - -- duplicated message when an eof is reached - if debugmode and #files.source > 0 then - debug(format("- %2d hunks for %s", #files.hunks[nextfileno], - files.source[nextfileno])) - end - end - - local sum = 0; for _,hset in ipairs(files.hunks) do sum = sum + #hset end - info(format("total files: %d total hunks: %d", #files.source, sum)) - fp:close() - return files, all_ok -end - -local function find_hunk(file, h, hno) - for fuzz=0,2 do - local lineno = h.startsrc - for i=0,#file do - local found = true - local location = lineno - for l, hline in ipairs(h.text) do - if l > fuzz then - -- todo: \ No newline at the end of file - if startswith(hline, " ") or startswith(hline, "-") then - local line = file[lineno] - lineno = lineno + 1 - if not line or #line == 0 then - found = false - break - end - if endlstrip(line) ~= endlstrip(hline:sub(2)) then - found = false - break - end - end - end - end - if found then - local offset = location - h.startsrc - fuzz - if offset ~= 0 then - warning(format("Hunk %d found at offset %d%s...", hno, offset, fuzz == 0 and "" or format(" (fuzz %d)", fuzz))) - end - h.startsrc = location - h.starttgt = h.starttgt + offset - for _=1,fuzz do - table.remove(h.text, 1) - table.remove(h.text, #h.text) - end - return true - end - lineno = i - end - end - return false -end - -local function load_file(filename) - local fp = assert(io.open(filename)) - local file = {} - local readline = file_lines(fp) - while true do - local line = readline() - if not line then break end - table.insert(file, line) - end - fp:close() - return file -end - -local function find_hunks(file, hunks) - for hno, h in ipairs(hunks) do - find_hunk(file, h, hno) - end -end - -local function check_patched(file, hunks) - local lineno = 1 - local ok, err = pcall(function() - if #file == 0 then - error('nomatch', 0) - end - for hno, h in ipairs(hunks) do - -- skip to line just before hunk starts - if #file < h.starttgt then - error('nomatch', 0) - end - lineno = h.starttgt - for _, hline in ipairs(h.text) do - -- todo: \ No newline at the end of file - if not startswith(hline, "-") and not startswith(hline, "\\") then - local line = file[lineno] - lineno = lineno + 1 - if #line == 0 then - error('nomatch', 0) - end - if endlstrip(line) ~= endlstrip(hline:sub(2)) then - warning(format("file is not patched - failed hunk: %d", hno)) - error('nomatch', 0) - end - end - end - end - end) - -- todo: display failed hunk, i.e. expected/found - return err ~= 'nomatch' -end - -local function patch_hunks(srcname, tgtname, hunks) - local src = assert(io.open(srcname, "rb")) - local tgt = assert(io.open(tgtname, "wb")) - - local src_readline = file_lines(src) - - -- todo: detect linefeeds early - in apply_files routine - -- to handle cases when patch starts right from the first - -- line and no lines are processed. At the moment substituted - -- lineends may not be the same at the start and at the end - -- of patching. Also issue a warning about mixed lineends - - local srclineno = 1 - local lineends = {['\n']=0, ['\r\n']=0, ['\r']=0} - for hno, h in ipairs(hunks) do - debug(format("processing hunk %d for file %s", hno, tgtname)) - -- skip to line just before hunk starts - while srclineno < h.startsrc do - local line = src_readline() - -- Python 'U' mode works only with text files - if endswith(line, "\r\n") then - lineends["\r\n"] = lineends["\r\n"] + 1 - elseif endswith(line, "\n") then - lineends["\n"] = lineends["\n"] + 1 - elseif endswith(line, "\r") then - lineends["\r"] = lineends["\r"] + 1 - end - tgt:write(line) - srclineno = srclineno + 1 - end - - for _,hline in ipairs(h.text) do - -- todo: check \ No newline at the end of file - if startswith(hline, "-") or startswith(hline, "\\") then - src_readline() - srclineno = srclineno + 1 - else - if not startswith(hline, "+") then - src_readline() - srclineno = srclineno + 1 - end - local line2write = hline:sub(2) - -- detect if line ends are consistent in source file - local sum = 0 - for _,v in pairs(lineends) do if v > 0 then sum=sum+1 end end - if sum == 1 then - local newline - for k,v in pairs(lineends) do if v ~= 0 then newline = k end end - tgt:write(endlstrip(line2write) .. newline) - else -- newlines are mixed or unknown - tgt:write(line2write) - end - end - end - end - for line in src_readline do - tgt:write(line) - end - tgt:close() - src:close() - return true -end - -local function strip_dirs(filename, strip) - if strip == nil then return filename end - for _=1,strip do - filename=filename:gsub("^[^/]*/", "") - end - return filename -end - -function patch.apply_patch(the_patch, strip) - local all_ok = true - local total = #the_patch.source - for fileno, filename in ipairs(the_patch.source) do - filename = strip_dirs(filename, strip) - local continue - local f2patch = filename - if not exists(f2patch) then - f2patch = strip_dirs(the_patch.target[fileno], strip) - f2patch = fs.absolute_name(f2patch) - if not exists(f2patch) then --FIX:if f2patch nil - warning(format("source/target file does not exist\n--- %s\n+++ %s", - filename, f2patch)) - all_ok = false - continue = true - end - end - if not continue and not isfile(f2patch) then - warning(format("not a file - %s", f2patch)) - all_ok = false - continue = true - end - if not continue then - - filename = f2patch - - info(format("processing %d/%d:\t %s", fileno, total, filename)) - - -- validate before patching - local hunks = the_patch.hunks[fileno] - local file = load_file(filename) - local hunkno = 1 - local hunk = hunks[hunkno] - local hunkfind = {} - local validhunks = 0 - local canpatch = false - local hunklineno - local isbreak - local lineno = 0 - - find_hunks(file, hunks) - - for _, line in ipairs(file) do - lineno = lineno + 1 - local continue - if not hunk or lineno < hunk.startsrc then - continue = true - elseif lineno == hunk.startsrc then - hunkfind = {} - for _,x in ipairs(hunk.text) do - if x:sub(1,1) == ' ' or x:sub(1,1) == '-' then - hunkfind[#hunkfind+1] = endlstrip(x:sub(2)) - end - end - hunklineno = 1 - - -- todo \ No newline at end of file - end - -- check hunks in source file - if not continue and lineno < hunk.startsrc + #hunkfind - 1 then - if endlstrip(line) == hunkfind[hunklineno] then - hunklineno = hunklineno + 1 - else - debug(format("hunk no.%d doesn't match source file %s", - hunkno, filename)) - -- file may be already patched, but check other hunks anyway - hunkno = hunkno + 1 - if hunkno <= #hunks then - hunk = hunks[hunkno] - continue = true - else - isbreak = true; break - end - end - end - -- check if processed line is the last line - if not continue and lineno == hunk.startsrc + #hunkfind - 1 then - debug(format("file %s hunk no.%d -- is ready to be patched", - filename, hunkno)) - hunkno = hunkno + 1 - validhunks = validhunks + 1 - if hunkno <= #hunks then - hunk = hunks[hunkno] - else - if validhunks == #hunks then - -- patch file - canpatch = true - isbreak = true; break - end - end - end - end - if not isbreak then - if hunkno <= #hunks then - warning(format("premature end of source file %s at hunk %d", - filename, hunkno)) - all_ok = false - end - end - if validhunks < #hunks then - if check_patched(file, hunks) then - warning(format("already patched %s", filename)) - else - warning(format("source file is different - %s", filename)) - all_ok = false - end - end - if canpatch then - local backupname = filename .. ".orig" - if exists(backupname) then - warning(format("can't backup original file to %s - aborting", - backupname)) - all_ok = false - else - assert(os.rename(filename, backupname)) - if patch_hunks(backupname, filename, hunks) then - warning(format("successfully patched %s", filename)) - assert(os.remove(backupname)) - else - warning(format("error patching file %s", filename)) - assert(file_copy(filename, filename .. ".invalid")) - warning(format("invalid version is saved to %s", - filename .. ".invalid")) - -- todo: proper rejects - assert(os.rename(backupname, filename)) - all_ok = false - end - end - end - - end -- if not continue - end -- for - -- todo: check for premature eof - return all_ok -end - -return patch diff --git a/Utils/luarocks/lua/luarocks/tools/tar.lua b/Utils/luarocks/lua/luarocks/tools/tar.lua deleted file mode 100644 index 637a6c953..000000000 --- a/Utils/luarocks/lua/luarocks/tools/tar.lua +++ /dev/null @@ -1,150 +0,0 @@ - ---- A pure-Lua implementation of untar (unpacking .tar archives) -local tar = {} - -local fs = require("luarocks.fs") -local dir = require("luarocks.dir") -local util = require("luarocks.util") - -local blocksize = 512 - -local function get_typeflag(flag) - if flag == "0" or flag == "\0" then return "file" - elseif flag == "1" then return "link" - elseif flag == "2" then return "symlink" -- "reserved" in POSIX, "symlink" in GNU - elseif flag == "3" then return "character" - elseif flag == "4" then return "block" - elseif flag == "5" then return "directory" - elseif flag == "6" then return "fifo" - elseif flag == "7" then return "contiguous" -- "reserved" in POSIX, "contiguous" in GNU - elseif flag == "x" then return "next file" - elseif flag == "g" then return "global extended header" - elseif flag == "L" then return "long name" - elseif flag == "K" then return "long link name" - end - return "unknown" -end - -local function octal_to_number(octal) - local exp = 0 - local number = 0 - for i = #octal,1,-1 do - local digit = tonumber(octal:sub(i,i)) - if digit then - number = number + (digit * 8^exp) - exp = exp + 1 - end - end - return number -end - -local function checksum_header(block) - local sum = 256 - for i = 1,148 do - sum = sum + block:byte(i) - end - for i = 157,500 do - sum = sum + block:byte(i) - end - return sum -end - -local function nullterm(s) - return s:match("^[^%z]*") -end - -local function read_header_block(block) - local header = {} - header.name = nullterm(block:sub(1,100)) - header.mode = nullterm(block:sub(101,108)) - header.uid = octal_to_number(nullterm(block:sub(109,116))) - header.gid = octal_to_number(nullterm(block:sub(117,124))) - header.size = octal_to_number(nullterm(block:sub(125,136))) - header.mtime = octal_to_number(nullterm(block:sub(137,148))) - header.chksum = octal_to_number(nullterm(block:sub(149,156))) - header.typeflag = get_typeflag(block:sub(157,157)) - header.linkname = nullterm(block:sub(158,257)) - header.magic = block:sub(258,263) - header.version = block:sub(264,265) - header.uname = nullterm(block:sub(266,297)) - header.gname = nullterm(block:sub(298,329)) - header.devmajor = octal_to_number(nullterm(block:sub(330,337))) - header.devminor = octal_to_number(nullterm(block:sub(338,345))) - header.prefix = block:sub(346,500) - if header.magic ~= "ustar " and header.magic ~= "ustar\0" then - return false, "Invalid header magic "..header.magic - end - if header.version ~= "00" and header.version ~= " \0" then - return false, "Unknown version "..header.version - end - if not checksum_header(block) == header.chksum then - return false, "Failed header checksum" - end - return header -end - -function tar.untar(filename, destdir) - assert(type(filename) == "string") - assert(type(destdir) == "string") - - local tar_handle = io.open(filename, "r") - if not tar_handle then return nil, "Error opening file "..filename end - - local long_name, long_link_name - while true do - local block - repeat - block = tar_handle:read(blocksize) - until (not block) or checksum_header(block) > 256 - if not block then break end - local header, err = read_header_block(block) - if not header then - util.printerr(err) - end - - local file_data = tar_handle:read(math.ceil(header.size / blocksize) * blocksize):sub(1,header.size) - - if header.typeflag == "long name" then - long_name = nullterm(file_data) - elseif header.typeflag == "long link name" then - long_link_name = nullterm(file_data) - else - if long_name then - header.name = long_name - long_name = nil - end - if long_link_name then - header.name = long_link_name - long_link_name = nil - end - end - local pathname = dir.path(destdir, header.name) - if header.typeflag == "directory" then - local ok, err = fs.make_dir(pathname) - if not ok then return nil, err end - elseif header.typeflag == "file" then - local dirname = dir.dir_name(pathname) - if dirname ~= "" then - local ok, err = fs.make_dir(dirname) - if not ok then return nil, err end - end - local file_handle = io.open(pathname, "wb") - file_handle:write(file_data) - file_handle:close() - fs.set_time(pathname, header.mtime) - if fs.chmod then - fs.chmod(pathname, header.mode) - end - end - --[[ - for k,v in pairs(header) do - util.printout("[\""..tostring(k).."\"] = "..(type(v)=="number" and v or "\""..v:gsub("%z", "\\0").."\"")) - end - util.printout() - --]] - end - tar_handle:close() - return true -end - -return tar diff --git a/Utils/luarocks/lua/luarocks/tools/zip.lua b/Utils/luarocks/lua/luarocks/tools/zip.lua deleted file mode 100644 index e6d9e36ae..000000000 --- a/Utils/luarocks/lua/luarocks/tools/zip.lua +++ /dev/null @@ -1,264 +0,0 @@ - ---- A Lua implementation of .zip file archiving (used for creating .rock files), --- using only lzlib or lua-lzib. -local zip = {} - -local zlib = require("zlib") -local fs = require("luarocks.fs") -local dir = require("luarocks.dir") - --- zlib module can be provided by both lzlib and lua-lzib packages. --- Create a compatibility layer. -local zlib_compress, zlib_crc32 -if zlib._VERSION:match "^lua%-zlib" then - function zlib_compress(data) - return (zlib.deflate()(data, "finish")) - end - - function zlib_crc32(data) - return zlib.crc32()(data) - end -elseif zlib._VERSION:match "^lzlib" then - function zlib_compress(data) - return zlib.compress(data) - end - - function zlib_crc32(data) - return zlib.crc32(zlib.crc32(), data) - end -else - error("unknown zlib library", 0) -end - -local function number_to_bytestring(number, nbytes) - local out = {} - for _ = 1, nbytes do - local byte = number % 256 - table.insert(out, string.char(byte)) - number = (number - byte) / 256 - end - return table.concat(out) -end - ---- Begin a new file to be stored inside the zipfile. --- @param self handle of the zipfile being written. --- @param filename filenome of the file to be added to the zipfile. --- @return true if succeeded, nil in case of failure. -local function zipwriter_open_new_file_in_zip(self, filename) - if self.in_open_file then - self:close_file_in_zip() - return nil - end - local lfh = {} - self.local_file_header = lfh - lfh.last_mod_file_time = 0 -- TODO - lfh.last_mod_file_date = 0 -- TODO - lfh.file_name_length = #filename - lfh.extra_field_length = 0 - lfh.file_name = filename:gsub("\\", "/") - lfh.external_attr = 0 -- TODO properly store permissions - self.in_open_file = true - return true -end - ---- Write data to the file currently being stored in the zipfile. --- @param self handle of the zipfile being written. --- @param data string containing full contents of the file. --- @return true if succeeded, nil in case of failure. -local function zipwriter_write_file_in_zip(self, data) - if not self.in_open_file then - return nil - end - local lfh = self.local_file_header - local compressed = zlib_compress(data):sub(3, -5) - lfh.crc32 = zlib_crc32(data) - lfh.compressed_size = #compressed - lfh.uncompressed_size = #data - self.data = compressed - return true -end - ---- Complete the writing of a file stored in the zipfile. --- @param self handle of the zipfile being written. --- @return true if succeeded, nil in case of failure. -local function zipwriter_close_file_in_zip(self) - local zh = self.ziphandle - - if not self.in_open_file then - return nil - end - - -- Local file header - local lfh = self.local_file_header - lfh.offset = zh:seek() - zh:write(number_to_bytestring(0x04034b50, 4)) -- signature - zh:write(number_to_bytestring(20, 2)) -- version needed to extract: 2.0 - zh:write(number_to_bytestring(0, 2)) -- general purpose bit flag - zh:write(number_to_bytestring(8, 2)) -- compression method: deflate - zh:write(number_to_bytestring(lfh.last_mod_file_time, 2)) - zh:write(number_to_bytestring(lfh.last_mod_file_date, 2)) - zh:write(number_to_bytestring(lfh.crc32, 4)) - zh:write(number_to_bytestring(lfh.compressed_size, 4)) - zh:write(number_to_bytestring(lfh.uncompressed_size, 4)) - zh:write(number_to_bytestring(lfh.file_name_length, 2)) - zh:write(number_to_bytestring(lfh.extra_field_length, 2)) - zh:write(lfh.file_name) - - -- File data - zh:write(self.data) - - -- Data descriptor - zh:write(number_to_bytestring(lfh.crc32, 4)) - zh:write(number_to_bytestring(lfh.compressed_size, 4)) - zh:write(number_to_bytestring(lfh.uncompressed_size, 4)) - - table.insert(self.files, lfh) - self.in_open_file = false - - return true -end - --- @return boolean or (boolean, string): true on success, --- false and an error message on failure. -local function zipwriter_add(self, file) - local fin - local ok, err = self:open_new_file_in_zip(file) - if not ok then - err = "error in opening "..file.." in zipfile" - else - fin = io.open(fs.absolute_name(file), "rb") - if not fin then - ok = false - err = "error opening "..file.." for reading" - end - end - if ok then - local data = fin:read("*a") - if not data then - err = "error reading "..file - ok = false - else - ok = self:write_file_in_zip(data) - if not ok then - err = "error in writing "..file.." in the zipfile" - end - end - end - if fin then - fin:close() - end - if ok then - ok = self:close_file_in_zip() - if not ok then - err = "error in writing "..file.." in the zipfile" - end - end - return ok == true, err -end - ---- Complete the writing of the zipfile. --- @param self handle of the zipfile being written. --- @return true if succeeded, nil in case of failure. -local function zipwriter_close(self) - local zh = self.ziphandle - - local central_directory_offset = zh:seek() - - local size_of_central_directory = 0 - -- Central directory structure - for _, lfh in ipairs(self.files) do - zh:write(number_to_bytestring(0x02014b50, 4)) -- signature - zh:write(number_to_bytestring(3, 2)) -- version made by: UNIX - zh:write(number_to_bytestring(20, 2)) -- version needed to extract: 2.0 - zh:write(number_to_bytestring(0, 2)) -- general purpose bit flag - zh:write(number_to_bytestring(8, 2)) -- compression method: deflate - zh:write(number_to_bytestring(lfh.last_mod_file_time, 2)) - zh:write(number_to_bytestring(lfh.last_mod_file_date, 2)) - zh:write(number_to_bytestring(lfh.crc32, 4)) - zh:write(number_to_bytestring(lfh.compressed_size, 4)) - zh:write(number_to_bytestring(lfh.uncompressed_size, 4)) - zh:write(number_to_bytestring(lfh.file_name_length, 2)) - zh:write(number_to_bytestring(lfh.extra_field_length, 2)) - zh:write(number_to_bytestring(0, 2)) -- file comment length - zh:write(number_to_bytestring(0, 2)) -- disk number start - zh:write(number_to_bytestring(0, 2)) -- internal file attributes - zh:write(number_to_bytestring(lfh.external_attr, 4)) -- external file attributes - zh:write(number_to_bytestring(lfh.offset, 4)) -- relative offset of local header - zh:write(lfh.file_name) - size_of_central_directory = size_of_central_directory + 46 + lfh.file_name_length - end - - -- End of central directory record - zh:write(number_to_bytestring(0x06054b50, 4)) -- signature - zh:write(number_to_bytestring(0, 2)) -- number of this disk - zh:write(number_to_bytestring(0, 2)) -- number of disk with start of central directory - zh:write(number_to_bytestring(#self.files, 2)) -- total number of entries in the central dir on this disk - zh:write(number_to_bytestring(#self.files, 2)) -- total number of entries in the central dir - zh:write(number_to_bytestring(size_of_central_directory, 4)) - zh:write(number_to_bytestring(central_directory_offset, 4)) - zh:write(number_to_bytestring(0, 2)) -- zip file comment length - zh:close() - - return true -end - ---- Return a zip handle open for writing. --- @param name filename of the zipfile to be created. --- @return a zip handle, or nil in case of error. -function zip.new_zipwriter(name) - - local zw = {} - - zw.ziphandle = io.open(fs.absolute_name(name), "wb") - if not zw.ziphandle then - return nil - end - zw.files = {} - zw.in_open_file = false - - zw.add = zipwriter_add - zw.close = zipwriter_close - zw.open_new_file_in_zip = zipwriter_open_new_file_in_zip - zw.write_file_in_zip = zipwriter_write_file_in_zip - zw.close_file_in_zip = zipwriter_close_file_in_zip - - return zw -end - ---- Compress files in a .zip archive. --- @param zipfile string: pathname of .zip archive to be created. --- @param ... Filenames to be stored in the archive are given as --- additional arguments. --- @return boolean or (boolean, string): true on success, --- false and an error message on failure. -function zip.zip(zipfile, ...) - local zw = zip.new_zipwriter(zipfile) - if not zw then - return nil, "error opening "..zipfile - end - - local ok, err - for _, file in pairs({...}) do - if fs.is_dir(file) then - for _, entry in pairs(fs.find(file)) do - local fullname = dir.path(file, entry) - if fs.is_file(fullname) then - ok, err = zw:add(fullname) - if not ok then break end - end - end - else - ok, err = zw:add(file) - if not ok then break end - end - end - - ok = zw:close() - if not ok then - return false, "error closing "..zipfile - end - return ok, err -end - - -return zip diff --git a/Utils/luarocks/lua/luarocks/type_check.lua b/Utils/luarocks/lua/luarocks/type_check.lua deleted file mode 100644 index 63c59ca21..000000000 --- a/Utils/luarocks/lua/luarocks/type_check.lua +++ /dev/null @@ -1,344 +0,0 @@ ---- Type-checking functions. --- Functions and definitions for doing a basic lint check on files --- loaded by LuaRocks. -local type_check = {} -package.loaded["luarocks.type_check"] = type_check - -local cfg = require("luarocks.cfg") -local deps = require("luarocks.deps") - -type_check.rockspec_format = "1.1" - -local string_1 = { _type = "string" } -local number_1 = { _type = "number" } -local mandatory_string_1 = { _type = "string", _mandatory = true } - --- Syntax for type-checking tables: --- --- A type-checking table describes typing data for a value. --- Any key starting with an underscore has a special meaning: --- _type (string) is the Lua type of the value. Default is "table". --- _version (string) is the minimum rockspec_version that supports this value. Default is "1.0". --- _mandatory (boolean) indicates if the value is a mandatory key in its container table. Default is false. --- For "string" types only: --- _pattern (string) is the string-matching pattern, valid for string types only. Default is ".*". --- For "table" types only: --- _any (table) is the type-checking table for unspecified keys, recursively checked. --- _more (boolean) indicates that the table accepts unspecified keys and does not type-check them. --- Any other string keys that don't start with an underscore represent known keys and are type-checking tables, recursively checked. - -local rockspec_types = { - rockspec_format = string_1, - package = mandatory_string_1, - version = { _type = "string", _pattern = "[%w.]+-[%d]+", _mandatory = true }, - description = { - summary = string_1, - detailed = string_1, - homepage = string_1, - license = string_1, - maintainer = string_1, - }, - dependencies = { - platforms = {}, -- recursively defined below - _any = string_1, - }, - supported_platforms = { - _any = string_1, - }, - external_dependencies = { - platforms = {}, -- recursively defined below - _any = { - program = string_1, - header = string_1, - library = string_1, - } - }, - source = { - _mandatory = true, - platforms = {}, -- recursively defined below - url = mandatory_string_1, - md5 = string_1, - file = string_1, - dir = string_1, - tag = string_1, - branch = string_1, - module = string_1, - cvs_tag = string_1, - cvs_module = string_1, - }, - build = { - platforms = {}, -- recursively defined below - type = string_1, - install = { - lua = { - _more = true - }, - lib = { - _more = true - }, - conf = { - _more = true - }, - bin = { - _more = true - } - }, - copy_directories = { - _any = string_1, - }, - _more = true, - _mandatory = true - }, - hooks = { - platforms = {}, -- recursively defined below - post_install = string_1, - }, - deploy = { - _version = "1.1", - wrap_bin_scripts = { _type = "boolean", _version = "1.1" }, - } -} - -type_check.rockspec_order = {"rockspec_format", "package", "version", - { "source", { "url", "tag", "branch", "md5" } }, - { "description", {"summary", "detailed", "homepage", "license" } }, - "supported_platforms", "dependencies", "external_dependencies", - { "build", {"type", "modules", "copy_directories", "platforms"} }, - "hooks"} - -rockspec_types.build.platforms._any = rockspec_types.build -rockspec_types.dependencies.platforms._any = rockspec_types.dependencies -rockspec_types.external_dependencies.platforms._any = rockspec_types.external_dependencies -rockspec_types.source.platforms._any = rockspec_types.source -rockspec_types.hooks.platforms._any = rockspec_types.hooks - -local manifest_types = { - repository = { - _mandatory = true, - -- packages - _any = { - -- versions - _any = { - -- items - _any = { - arch = mandatory_string_1, - modules = { _any = string_1 }, - commands = { _any = string_1 }, - dependencies = { _any = string_1 }, - -- TODO: to be extended with more metadata. - } - } - } - }, - modules = { - _mandatory = true, - -- modules - _any = { - -- providers - _any = string_1 - } - }, - commands = { - _mandatory = true, - -- modules - _any = { - -- commands - _any = string_1 - } - }, - dependencies = { - -- each module - _any = { - -- each version - _any = { - -- each dependency - _any = { - name = string_1, - constraints = { - _any = { - no_upgrade = { _type = "boolean" }, - op = string_1, - version = { - string = string_1, - _any = number_1, - } - } - } - } - } - } - } -} - -local function check_version(version, typetbl, context) - local typetbl_version = typetbl._version or "1.0" - if deps.compare_versions(typetbl_version, version) then - if context == "" then - return nil, "Invalid rockspec_format version number in rockspec? Please fix rockspec accordingly." - else - return nil, context.." is not supported in rockspec format "..version.." (requires version "..typetbl_version.."), please fix the rockspec_format field accordingly." - end - end - return true -end - -local type_check_table - ---- Type check an object. --- The object is compared against an archetypical value --- matching the expected type -- the actual values don't matter, --- only their types. Tables are type checked recursively. --- @param version string: The version of the item. --- @param item any: The object being checked. --- @param typetbl any: The type-checking table for the object. --- @param context string: A string indicating the "context" where the --- error occurred (the full table path), for error messages. --- @return boolean or (nil, string): true if type checking --- succeeded, or nil and an error message if it failed. --- @see type_check_table -local function type_check_item(version, item, typetbl, context) - assert(type(version) == "string") - - local ok, err = check_version(version, typetbl, context) - if not ok then - return nil, err - end - - local item_type = type(item) or "nil" - local expected_type = typetbl._type or "table" - - if expected_type == "number" then - if not tonumber(item) then - return nil, "Type mismatch on field "..context..": expected a number" - end - elseif expected_type == "string" then - if item_type ~= "string" then - return nil, "Type mismatch on field "..context..": expected a string, got "..item_type - end - if typetbl._pattern then - if not item:match("^"..typetbl._pattern.."$") then - return nil, "Type mismatch on field "..context..": invalid value "..item.." does not match '"..typetbl._pattern.."'" - end - end - elseif expected_type == "table" then - if item_type ~= expected_type then - return nil, "Type mismatch on field "..context..": expected a table" - else - return type_check_table(version, item, typetbl, context) - end - elseif item_type ~= expected_type then - return nil, "Type mismatch on field "..context..": expected "..expected_type - end - return true -end - -local function mkfield(context, field) - if context == "" then - return tostring(field) - elseif type(field) == "string" then - return context.."."..field - else - return context.."["..tostring(field).."]" - end -end - ---- Type check the contents of a table. --- The table's contents are compared against a reference table, --- which contains the recognized fields, with archetypical values --- matching the expected types -- the actual values of items in the --- reference table don't matter, only their types (ie, for field x --- in tbl that is correctly typed, type(tbl.x) == type(types.x)). --- If the reference table contains a field called MORE, then --- unknown fields in the checked table are accepted. --- If it contains a field called ANY, then its type will be --- used to check any unknown fields. If a field is prefixed --- with MUST_, it is mandatory; its absence from the table is --- a type error. --- Tables are type checked recursively. --- @param version string: The version of tbl. --- @param tbl table: The table to be type checked. --- @param typetbl table: The type-checking table, containing --- values for recognized fields in the checked table. --- @param context string: A string indicating the "context" where the --- error occurred (such as the name of the table the item is a part of), --- to be used by error messages. --- @return boolean or (nil, string): true if type checking --- succeeded, or nil and an error message if it failed. -type_check_table = function(version, tbl, typetbl, context) - assert(type(version) == "string") - assert(type(tbl) == "table") - assert(type(typetbl) == "table") - - local ok, err = check_version(version, typetbl, context) - if not ok then - return nil, err - end - - for k, v in pairs(tbl) do - local t = typetbl[k] or typetbl._any - if t then - local ok, err = type_check_item(version, v, t, mkfield(context, k)) - if not ok then return nil, err end - elseif typetbl._more then - -- Accept unknown field - else - if not cfg.accept_unknown_fields then - return nil, "Unknown field "..k - end - end - end - for k, v in pairs(typetbl) do - if k:sub(1,1) ~= "_" and v._mandatory then - if not tbl[k] then - return nil, "Mandatory field "..mkfield(context, k).." is missing." - end - end - end - return true -end - -local function check_undeclared_globals(globals, typetbl) - local undeclared = {} - for glob, _ in pairs(globals) do - if not (typetbl[glob] or typetbl["MUST_"..glob]) then - table.insert(undeclared, glob) - end - end - if #undeclared == 1 then - return nil, "Unknown variable: "..undeclared[1] - elseif #undeclared > 1 then - return nil, "Unknown variables: "..table.concat(undeclared, ", ") - end - return true -end - ---- Type check a rockspec table. --- Verify the correctness of elements from a --- rockspec table, reporting on unknown fields and type --- mismatches. --- @return boolean or (nil, string): true if type checking --- succeeded, or nil and an error message if it failed. -function type_check.type_check_rockspec(rockspec, globals) - assert(type(rockspec) == "table") - if not rockspec.rockspec_format then - rockspec.rockspec_format = "1.0" - end - local ok, err = check_undeclared_globals(globals, rockspec_types) - if not ok then return nil, err end - return type_check_table(rockspec.rockspec_format, rockspec, rockspec_types, "") -end - ---- Type check a manifest table. --- Verify the correctness of elements from a --- manifest table, reporting on unknown fields and type --- mismatches. --- @return boolean or (nil, string): true if type checking --- succeeded, or nil and an error message if it failed. -function type_check.type_check_manifest(manifest, globals) - assert(type(manifest) == "table") - local ok, err = check_undeclared_globals(globals, manifest_types) - if not ok then return nil, err end - return type_check_table("1.0", manifest, manifest_types, "") -end - -return type_check diff --git a/Utils/luarocks/lua/luarocks/unpack.lua b/Utils/luarocks/lua/luarocks/unpack.lua deleted file mode 100644 index 0922f9b90..000000000 --- a/Utils/luarocks/lua/luarocks/unpack.lua +++ /dev/null @@ -1,166 +0,0 @@ - ---- Module implementing the LuaRocks "unpack" command. --- Unpack the contents of a rock. -local unpack = {} -package.loaded["luarocks.unpack"] = unpack - -local fetch = require("luarocks.fetch") -local fs = require("luarocks.fs") -local util = require("luarocks.util") -local build = require("luarocks.build") -local dir = require("luarocks.dir") -local cfg = require("luarocks.cfg") - -util.add_run_function(unpack) -unpack.help_summary = "Unpack the contents of a rock." -unpack.help_arguments = "[--force] {| []}" -unpack.help = [[ -Unpacks the contents of a rock in a newly created directory. -Argument may be a rock file, or the name of a rock in a rocks server. -In the latter case, the app version may be given as a second argument. - ---force Unpack files even if the output directory already exists. -]] - ---- Load a rockspec file to the given directory, fetches the source --- files specified in the rockspec, and unpack them inside the directory. --- @param rockspec_file string: The URL for a rockspec file. --- @param dir_name string: The directory where to store and unpack files. --- @return table or (nil, string): the loaded rockspec table or --- nil and an error message. -local function unpack_rockspec(rockspec_file, dir_name) - assert(type(rockspec_file) == "string") - assert(type(dir_name) == "string") - - local rockspec, err = fetch.load_rockspec(rockspec_file) - if not rockspec then - return nil, "Failed loading rockspec "..rockspec_file..": "..err - end - local ok, err = fs.change_dir(dir_name) - if not ok then return nil, err end - local ok, sources_dir = fetch.fetch_sources(rockspec, true, ".") - if not ok then - return nil, sources_dir - end - ok, err = fs.change_dir(sources_dir) - if not ok then return nil, err end - ok, err = build.apply_patches(rockspec) - fs.pop_dir() - if not ok then return nil, err end - return rockspec -end - ---- Load a .rock file to the given directory and unpack it inside it. --- @param rock_file string: The URL for a .rock file. --- @param dir_name string: The directory where to unpack. --- @param kind string: the kind of rock file, as in the second-level --- extension in the rock filename (eg. "src", "all", "linux-x86") --- @return table or (nil, string): the loaded rockspec table or --- nil and an error message. -local function unpack_rock(rock_file, dir_name, kind) - assert(type(rock_file) == "string") - assert(type(dir_name) == "string") - - local ok, err, errcode = fetch.fetch_and_unpack_rock(rock_file, dir_name) - if not ok then - return nil, "Failed unzipping rock "..rock_file, errcode - end - ok, err = fs.change_dir(dir_name) - if not ok then return nil, err end - local rockspec_file = dir_name..".rockspec" - local rockspec, err = fetch.load_rockspec(rockspec_file) - if not rockspec then - return nil, "Failed loading rockspec "..rockspec_file..": "..err - end - if kind == "src" then - if rockspec.source.file then - local ok, err = fs.unpack_archive(rockspec.source.file) - if not ok then - return nil, err - end - ok, err = fs.change_dir(rockspec.source.dir) - if not ok then return nil, err end - ok, err = build.apply_patches(rockspec) - fs.pop_dir() - if not ok then return nil, err end - end - end - return rockspec -end - ---- Create a directory and perform the necessary actions so that --- the sources for the rock and its rockspec are unpacked inside it, --- laid out properly so that the 'make' command is able to build the module. --- @param file string: A rockspec or .rock URL. --- @return boolean or (nil, string): true if successful or nil followed --- by an error message. -local function run_unpacker(file, force) - assert(type(file) == "string") - - local base_name = dir.base_name(file) - local dir_name, kind, extension = base_name:match("(.*)%.([^.]+)%.(rock)$") - if not extension then - dir_name, extension = base_name:match("(.*)%.(rockspec)$") - kind = "rockspec" - end - if not extension then - return nil, file.." does not seem to be a valid filename." - end - - local exists = fs.exists(dir_name) - if exists and not force then - return nil, "Directory "..dir_name.." already exists." - end - if not exists then - local ok, err = fs.make_dir(dir_name) - if not ok then return nil, err end - end - local rollback = util.schedule_function(fs.delete, fs.absolute_name(dir_name)) - - local rockspec, err - if extension == "rock" then - rockspec, err = unpack_rock(file, dir_name, kind) - elseif extension == "rockspec" then - rockspec, err = unpack_rockspec(file, dir_name) - end - if not rockspec then - return nil, err - end - if kind == "src" or kind == "rockspec" then - if rockspec.source.dir ~= "." then - local ok = fs.copy(rockspec.local_filename, rockspec.source.dir, cfg.perm_read) - if not ok then - return nil, "Failed copying unpacked rockspec into unpacked source directory." - end - end - util.printout() - util.printout("Done. You may now enter directory ") - util.printout(dir.path(dir_name, rockspec.source.dir)) - util.printout("and type 'luarocks make' to build.") - end - util.remove_scheduled_function(rollback) - return true -end - ---- Driver function for the "unpack" command. --- @param name string: may be a rock filename, for unpacking a --- rock file or the name of a rock to be fetched and unpacked. --- @param version string or nil: if the name of a package is given, a --- version may also be passed. --- @return boolean or (nil, string): true if successful or nil followed --- by an error message. -function unpack.command(flags, name, version) - assert(type(version) == "string" or not version) - if type(name) ~= "string" then - return nil, "Argument missing. "..util.see_help("unpack") - end - - if name:match(".*%.rock") or name:match(".*%.rockspec") then - return run_unpacker(name, flags["force"]) - else - local search = require("luarocks.search") - return search.act_on_src_or_rockspec(run_unpacker, name:lower(), version) - end -end - -return unpack diff --git a/Utils/luarocks/lua/luarocks/upload.lua b/Utils/luarocks/lua/luarocks/upload.lua deleted file mode 100644 index 7c0c416ce..000000000 --- a/Utils/luarocks/lua/luarocks/upload.lua +++ /dev/null @@ -1,95 +0,0 @@ - -local upload = {} - -local util = require("luarocks.util") -local fetch = require("luarocks.fetch") -local pack = require("luarocks.pack") -local cfg = require("luarocks.cfg") -local Api = require("luarocks.upload.api") - -util.add_run_function(upload) -upload.help_summary = "Upload a rockspec to the public rocks repository." -upload.help_arguments = "[--skip-pack] [--api-key=] [--force] " -upload.help = [[ - Pack a source rock file (.src.rock extension), - upload rockspec and source rock to server. ---skip-pack Do not pack and send source rock. ---api-key= Give it an API key. It will be stored for subsequent uses. ---force Replace existing rockspec if the same revision of - a module already exists. This should be used only - in case of upload mistakes: when updating a rockspec, - increment the revision number instead. -]] - -function upload.command(flags, fname) - if not fname then - return nil, "Missing rockspec. "..util.see_help("upload") - end - - local api, err = Api.new(flags) - if not api then - return nil, err - end - if cfg.verbose then - api.debug = true - end - - local rockspec, err, errcode = fetch.load_rockspec(fname) - if err then - return nil, err, errcode - end - - util.printout("Sending " .. tostring(fname) .. " ...") - local res, err = api:method("check_rockspec", { - package = rockspec.package, - version = rockspec.version - }) - if not res then return nil, err end - - if not res.module then - util.printout("Will create new module (" .. tostring(rockspec.package) .. ")") - end - if res.version and not flags["force"] then - return nil, "Revision "..rockspec.version.." already exists on the server. "..util.see_help("upload") - end - - local rock_fname - if not flags["skip-pack"] and not rockspec.version:match("^scm") then - util.printout("Packing " .. tostring(rockspec.package)) - rock_fname, err = pack.pack_source_rock(fname) - if not rock_fname then - return nil, err - end - end - - local multipart = require("luarocks.upload.multipart") - - res, err = api:method("upload", nil, { - rockspec_file = multipart.new_file(fname) - }) - if not res then return nil, err end - - if res.is_new and #res.manifests == 0 then - util.printerr("Warning: module not added to root manifest due to name taken.") - end - - local module_url = res.module_url - - if rock_fname then - if (not res.version) or (not res.version.id) then - return nil, "Invalid response from server." - end - util.printout(("Sending " .. tostring(rock_fname) .. " ...")) - res, err = api:method("upload_rock/" .. ("%d"):format(res.version.id), nil, { - rock_file = multipart.new_file(rock_fname) - }) - if not res then return nil, err end - end - - util.printout() - util.printout("Done: " .. tostring(module_url)) - util.printout() - return true -end - -return upload diff --git a/Utils/luarocks/lua/luarocks/upload/api.lua b/Utils/luarocks/lua/luarocks/upload/api.lua deleted file mode 100644 index ba657186a..000000000 --- a/Utils/luarocks/lua/luarocks/upload/api.lua +++ /dev/null @@ -1,284 +0,0 @@ - -local api = {} - -local cfg = require("luarocks.cfg") -local fs = require("luarocks.fs") -local util = require("luarocks.util") -local persist = require("luarocks.persist") -local multipart = require("luarocks.upload.multipart") - -local Api = {} - -local function upload_config_file() - local conf = cfg.which_config() - if not conf.user.file then - return nil - end - return (conf.user.file:gsub("/[^/]+$", "/upload_config.lua")) -end - -function Api:load_config() - local upload_conf = upload_config_file() - if not upload_conf then return nil end - local cfg, err = persist.load_into_table(upload_conf) - return cfg -end - -function Api:save_config() - -- Test configuration before saving it. - local res, err = self:raw_method("status") - if not res then - return nil, err - end - if res.errors then - util.printerr("Server says: " .. tostring(res.errors[1])) - return - end - local upload_conf = upload_config_file() - if not upload_conf then return nil end - persist.save_from_table(upload_conf, self.config) - fs.chmod(upload_conf, "0600") -end - -function Api:check_version() - if not self._server_tool_version then - local tool_version = cfg.upload.tool_version - local res, err = self:request(tostring(self.config.server) .. "/api/tool_version", { - current = tool_version - }) - if not res then - return nil, err - end - if not res.version then - return nil, "failed to fetch tool version" - end - self._server_tool_version = res.version - if res.force_update then - return nil, "Your upload client is too out of date to continue, please upgrade LuaRocks." - end - if res.version ~= tool_version then - util.printerr("Warning: Your LuaRocks is out of date, consider upgrading.") - end - end - return true -end - -function Api:method(...) - local res, err = self:raw_method(...) - if not res then - return nil, err - end - if res.errors then - if res.errors[1] == "Invalid key" then - return nil, res.errors[1] .. " (use the --api-key flag to change)" - end - local msg = table.concat(res.errors, ", ") - return nil, "API Failed: " .. msg - end - return res -end - -function Api:raw_method(path, ...) - self:check_version() - local url = tostring(self.config.server) .. "/api/" .. tostring(cfg.upload.api_version) .. "/" .. tostring(self.config.key) .. "/" .. tostring(path) - return self:request(url, ...) -end - -local function encode_query_string(t, sep) - if sep == nil then - sep = "&" - end - local i = 0 - local buf = { } - for k, v in pairs(t) do - if type(k) == "number" and type(v) == "table" then - k, v = v[1], v[2] - end - buf[i + 1] = multipart.url_escape(k) - buf[i + 2] = "=" - buf[i + 3] = multipart.url_escape(v) - buf[i + 4] = sep - i = i + 4 - end - buf[i] = nil - return table.concat(buf) -end - --- An ode to the multitude of JSON libraries out there... -local function require_json() - local list = { "cjson", "dkjson", "json" } - for _, lib in ipairs(list) do - local json_ok, json = pcall(require, lib) - if json_ok then - pcall(json.use_lpeg) -- optional feature in dkjson - return json_ok, json - end - end - local errmsg = "Failed loading " - for i, name in ipairs(list) do - if i == #list then - errmsg = errmsg .."and '"..name.."'. Use 'luarocks search ' to search for a library and 'luarocks install ' to install one." - else - errmsg = errmsg .."'"..name.."', " - end - end - return nil, errmsg -end - -local function redact_api_url(url) - url = tostring(url) - return (url:gsub(".*/api/[^/]+/[^/]+", "")) or "" -end - -local ltn12_ok, ltn12 = pcall(require, "ltn12") -if not ltn12_ok then -- If not using LuaSocket and/or LuaSec... - -function Api:request(url, params, post_params) - local vars = cfg.variables - local json_ok, json = require_json() - if not json_ok then return nil, "A JSON library is required for this command. "..json end - - if cfg.downloader == "wget" then - local curl_ok, err = fs.is_tool_available(vars.CURL, "curl") - if not curl_ok then - return nil, err - end - end - - if not self.config.key then - return nil, "Must have API key before performing any actions." - end - if params and next(params) then - url = url .. ("?" .. encode_query_string(params)) - end - local method = "GET" - local out - local tmpfile = fs.tmpname() - if post_params then - method = "POST" - local curl_cmd = fs.Q(vars.CURL).." -f -k -L --silent --user-agent \""..cfg.user_agent.." via curl\" " - for k,v in pairs(post_params) do - local var = v - if type(v) == "table" then - var = "@"..v.fname - end - curl_cmd = curl_cmd .. "--form \""..k.."="..var.."\" " - end - if cfg.connection_timeout and cfg.connection_timeout > 0 then - curl_cmd = curl_cmd .. "--connect-timeout "..tonumber(cfg.connection_timeout).." " - end - local ok = fs.execute_string(curl_cmd..fs.Q(url).." -o "..fs.Q(tmpfile)) - if not ok then - return nil, "API failure: " .. redact_api_url(url) - end - else - local ok, err = fs.download(url, tmpfile) - if not ok then - return nil, "API failure: " .. tostring(err) .. " - " .. redact_api_url(url) - end - end - - local tmpfd = io.open(tmpfile) - if not tmpfd then - os.remove(tmpfile) - return nil, "API failure reading temporary file - " .. redact_api_url(url) - end - out = tmpfd:read("*a") - tmpfd:close() - os.remove(tmpfile) - - if self.debug then - util.printout("[" .. tostring(method) .. " via curl] " .. redact_api_url(url) .. " ... ") - end - - return json.decode(out) -end - -else -- use LuaSocket and LuaSec - -local warned_luasec = false - -function Api:request(url, params, post_params) - local json_ok, json = require_json() - if not json_ok then return nil, "A JSON library is required for this command. "..json end - local server = tostring(self.config.server) - local http_ok, http - local via = "luasocket" - if server:match("^https://") then - http_ok, http = pcall(require, "ssl.https") - if http_ok then - via = "luasec" - else - if not warned_luasec then - util.printerr("LuaSec is not available; using plain HTTP. Install 'luasec' to enable HTTPS.") - warned_luasec = true - end - http_ok, http = pcall(require, "socket.http") - url = url:gsub("^https", "http") - via = "luasocket" - end - else - http_ok, http = pcall(require, "socket.http") - end - if not http_ok then - return nil, "Failed loading socket library!" - end - - if not self.config.key then - return nil, "Must have API key before performing any actions." - end - local body - local headers = {} - if params and next(params) then - url = url .. ("?" .. encode_query_string(params)) - end - if post_params then - local boundary - body, boundary = multipart.encode(post_params) - headers["Content-length"] = #body - headers["Content-type"] = "multipart/form-data; boundary=" .. tostring(boundary) - end - local method = post_params and "POST" or "GET" - if self.debug then - util.printout("[" .. tostring(method) .. " via "..via.."] " .. redact_api_url(url) .. " ... ") - end - local out = {} - local _, status = http.request({ - url = url, - headers = headers, - method = method, - sink = ltn12.sink.table(out), - source = body and ltn12.source.string(body) - }) - if self.debug then - util.printout(tostring(status)) - end - if status ~= 200 then - return nil, "API returned " .. tostring(status) .. " - " .. redact_api_url(url) - end - return json.decode(table.concat(out)) -end - -end - -function api.new(flags) - local self = {} - setmetatable(self, { __index = Api }) - self.config = self:load_config() or {} - self.config.server = flags["server"] or self.config.server or cfg.upload.server - self.config.version = self.config.version or cfg.upload.version - self.config.key = flags["api-key"] or self.config.key - self.debug = flags["debug"] - if not self.config.key then - return nil, "You need an API key to upload rocks.\n" .. - "Navigate to "..self.config.server.."/settings to get a key\n" .. - "and then pass it through the --api-key= flag." - end - if flags["api-key"] then - self:save_config() - end - return self -end - -return api - diff --git a/Utils/luarocks/lua/luarocks/upload/multipart.lua b/Utils/luarocks/lua/luarocks/upload/multipart.lua deleted file mode 100644 index aad2e4398..000000000 --- a/Utils/luarocks/lua/luarocks/upload/multipart.lua +++ /dev/null @@ -1,111 +0,0 @@ - -local multipart = {} - -local File = {} - -local unpack = unpack or table.unpack - -math.randomseed(os.time()) - --- socket.url.escape(s) from LuaSocket 3.0rc1 -function multipart.url_escape(s) - return (string.gsub(s, "([^A-Za-z0-9_])", function(c) - return string.format("%%%02x", string.byte(c)) - end)) -end - -function File:mime() - if not self.mimetype then - local mimetypes_ok, mimetypes = pcall(require, "mimetypes") - if mimetypes_ok then - self.mimetype = mimetypes.guess(self.fname) - end - self.mimetype = self.mimetype or "application/octet-stream" - end - return self.mimetype -end - -function File:content() - local fd = io.open(self.fname, "rb") - if not fd then - return nil, "Failed to open file: "..self.fname - end - local data = fd:read("*a") - fd:close() - return data -end - -local function rand_string(len) - local shuffled = {} - for i = 1, len do - local r = math.random(97, 122) - if math.random() >= 0.5 then - r = r - 32 - end - shuffled[i] = r - end - return string.char(unpack(shuffled)) -end - --- multipart encodes params --- returns encoded string,boundary --- params is an a table of tuple tables: --- params = { --- {key1, value2}, --- {key2, value2}, --- key3: value3 --- } -function multipart.encode(params) - local tuples = { } - for i = 1, #params do - tuples[i] = params[i] - end - for k,v in pairs(params) do - if type(k) == "string" then - table.insert(tuples, {k, v}) - end - end - local chunks = {} - for _, tuple in ipairs(tuples) do - local k,v = unpack(tuple) - k = multipart.url_escape(k) - local buffer = { 'Content-Disposition: form-data; name="' .. k .. '"' } - local content - if type(v) == "table" and v.__class == File then - buffer[1] = buffer[1] .. ('; filename="' .. v.fname:gsub(".*/", "") .. '"') - table.insert(buffer, "Content-type: " .. v:mime()) - content = v:content() - else - content = v - end - table.insert(buffer, "") - table.insert(buffer, content) - table.insert(chunks, table.concat(buffer, "\r\n")) - end - local boundary - while not boundary do - boundary = "Boundary" .. rand_string(16) - for _, chunk in ipairs(chunks) do - if chunk:find(boundary) then - boundary = nil - break - end - end - end - local inner = "\r\n--" .. boundary .. "\r\n" - return table.concat({ "--", boundary, "\r\n", - table.concat(chunks, inner), - "\r\n", "--", boundary, "--", "\r\n" }), boundary -end - -function multipart.new_file(fname, mime) - local self = {} - setmetatable(self, { __index = File }) - self.__class = File - self.fname = fname - self.mimetype = mime - return self -end - -return multipart - diff --git a/Utils/luarocks/lua/luarocks/util.lua b/Utils/luarocks/lua/luarocks/util.lua deleted file mode 100644 index c9fb7d637..000000000 --- a/Utils/luarocks/lua/luarocks/util.lua +++ /dev/null @@ -1,714 +0,0 @@ - ---- Assorted utilities for managing tables, plus a scheduler for rollback functions. --- Does not requires modules directly (only as locals --- inside specific functions) to avoid interdependencies, --- as this is used in the bootstrapping stage of luarocks.cfg. - -local util = {} - -local unpack = unpack or table.unpack - -local scheduled_functions = {} -local debug = require("debug") - ---- Schedule a function to be executed upon program termination. --- This is useful for actions such as deleting temporary directories --- or failure rollbacks. --- @param f function: Function to be executed. --- @param ... arguments to be passed to function. --- @return table: A token representing the scheduled execution, --- which can be used to remove the item later from the list. -function util.schedule_function(f, ...) - assert(type(f) == "function") - - local item = { fn = f, args = {...} } - table.insert(scheduled_functions, item) - return item -end - ---- Unschedule a function. --- This is useful for cancelling a rollback of a completed operation. --- @param item table: The token representing the scheduled function that was --- returned from the schedule_function call. -function util.remove_scheduled_function(item) - for k, v in pairs(scheduled_functions) do - if v == item then - table.remove(scheduled_functions, k) - return - end - end -end - ---- Execute scheduled functions. --- Some calls create temporary files and/or directories and register --- corresponding cleanup functions. Calling this function will run --- these function, erasing temporaries. --- Functions are executed in the inverse order they were scheduled. -function util.run_scheduled_functions() - local fs = require("luarocks.fs") - fs.change_dir_to_root() - for i = #scheduled_functions, 1, -1 do - local item = scheduled_functions[i] - item.fn(unpack(item.args)) - end -end - ---- Produce a Lua pattern that matches precisely the given string --- (this is suitable to be concatenating to other patterns, --- so it does not include beginning- and end-of-string markers (^$) --- @param s string: The input string --- @return string: The equivalent pattern -function util.matchquote(s) - return (s:gsub("[?%-+*%[%].%%()$^]","%%%1")) -end - ---- List of supported arguments. --- Arguments that take no parameters are marked with the boolean true. --- Arguments that take a parameter are marked with a descriptive string. --- Arguments that may take an empty string are described in quotes, --- (as in the value for --detailed=""). --- For all other string values, it means the parameter is mandatory. -local supported_flags = { - ["all"] = true, - ["api-key"] = "", - ["append"] = true, - ["arch"] = "", - ["bin"] = true, - ["binary"] = true, - ["branch"] = "", - ["debug"] = true, - ["deps"] = true, - ["deps-mode"] = "", - ["detailed"] = "\"\"", - ["force"] = true, - ["force-fast"] = true, - ["from"] = "", - ["help"] = true, - ["home"] = true, - ["homepage"] = "\"\"", - ["keep"] = true, - ["lib"] = "", - ["license"] = "\"\"", - ["list"] = true, - ["local"] = true, - ["local-tree"] = true, - ["lr-bin"] = true, - ["lr-cpath"] = true, - ["lr-path"] = true, - ["lua-version"] = "", - ["lua-ver"] = true, - ["lua-incdir"] = true, - ["lua-libdir"] = true, - ["modules"] = true, - ["mversion"] = true, - ["no-refresh"] = true, - ["nodeps"] = true, - ["old-versions"] = true, - ["only-deps"] = true, - ["only-from"] = "", - ["only-server"] = "", - ["only-sources"] = "", - ["only-sources-from"] = "", - ["outdated"] = true, - ["output"] = "", - ["pack-binary-rock"] = true, - ["porcelain"] = true, - ["quick"] = true, - ["rock-dir"] = true, - ["rock-tree"] = true, - ["rock-trees"] = true, - ["rockspec"] = true, - ["rockspec-format"] = "", - ["server"] = "", - ["skip-pack"] = true, - ["source"] = true, - ["summary"] = "\"\"", - ["system-config"] = true, - ["tag"] = "", - ["timeout"] = "", - ["to"] = "", - ["tree"] = "", - ["user-config"] = true, - ["verbose"] = true, - ["version"] = true, -} - ---- Extract flags from an arguments list. --- Given string arguments, extract flag arguments into a flags set. --- For example, given "foo", "--tux=beep", "--bla", "bar", "--baz", --- it would return the following: --- {["bla"] = true, ["tux"] = "beep", ["baz"] = true}, "foo", "bar". -function util.parse_flags(...) - local args = {...} - local flags = {} - local i = 1 - local out = {} - local ignore_flags = false - while i <= #args do - local flag = args[i]:match("^%-%-(.*)") - if flag == "--" then - ignore_flags = true - end - if flag and not ignore_flags then - local var,val = flag:match("([a-z_%-]*)=(.*)") - if val then - local vartype = supported_flags[var] - if type(vartype) == "string" then - if val == "" and vartype:sub(1,1) ~= '"' then - return { ERROR = "Invalid argument: parameter to flag --"..var.."="..vartype.." cannot be empty." } - end - flags[var] = val - else - if vartype then - return { ERROR = "Invalid argument: flag --"..var.." does not take an parameter." } - else - return { ERROR = "Invalid argument: unknown flag --"..var.."." } - end - end - else - local var = flag - local vartype = supported_flags[var] - if type(vartype) == "string" then - i = i + 1 - local val = args[i] - if not val then - return { ERROR = "Invalid argument: flag --"..var.."="..vartype.." expects a parameter." } - end - if val:match("^%-%-.*") then - return { ERROR = "Invalid argument: flag --"..var.."="..vartype.." expects a parameter (if you really want to pass "..val.." as an argument to --"..var..", use --"..var.."="..val..")." } - else - if val == "" and vartype:sub(1,1) ~= '"' then - return { ERROR = "Invalid argument: parameter to flag --"..var.."="..vartype.." cannot be empty." } - end - flags[var] = val - end - elseif vartype == true then - flags[var] = true - else - return { ERROR = "Invalid argument: unknown flag --"..var.."." } - end - end - else - table.insert(out, args[i]) - end - i = i + 1 - end - return flags, unpack(out) -end - --- Adds legacy 'run' function to a command module. --- @param command table: command module with 'command' function, --- the added 'run' function calls it after parseing command-line arguments. -function util.add_run_function(command) - command.run = function(...) return command.command(util.parse_flags(...)) end -end - ---- Merges contents of src on top of dst's contents. --- @param dst Destination table, which will receive src's contents. --- @param src Table which provides new contents to dst. --- @see platform_overrides -function util.deep_merge(dst, src) - for k, v in pairs(src) do - if type(v) == "table" then - if not dst[k] then - dst[k] = {} - end - if type(dst[k]) == "table" then - util.deep_merge(dst[k], v) - else - dst[k] = v - end - else - dst[k] = v - end - end -end - ---- Perform platform-specific overrides on a table. --- Overrides values of table with the contents of the appropriate --- subset of its "platforms" field. The "platforms" field should --- be a table containing subtables keyed with strings representing --- platform names. Names that match the contents of the global --- cfg.platforms setting are used. For example, if --- cfg.platforms= {"foo"}, then the fields of --- tbl.platforms.foo will overwrite those of tbl with the same --- names. For table values, the operation is performed recursively --- (tbl.platforms.foo.x.y.z overrides tbl.x.y.z; other contents of --- tbl.x are preserved). --- @param tbl table or nil: Table which may contain a "platforms" field; --- if it doesn't (or if nil is passed), this function does nothing. -function util.platform_overrides(tbl) - assert(type(tbl) == "table" or not tbl) - - local cfg = require("luarocks.cfg") - - if not tbl then return end - - if tbl.platforms then - for _, platform in ipairs(cfg.platforms) do - local platform_tbl = tbl.platforms[platform] - if platform_tbl then - util.deep_merge(tbl, platform_tbl) - end - end - end - tbl.platforms = nil -end - -local var_format_pattern = "%$%((%a[%a%d_]+)%)" - ---- Create a new shallow copy of a table: a new table with --- the same keys and values. Keys point to the same objects as --- the original table (ie, does not copy recursively). --- @param tbl table: the input table --- @return table: a new table with the same contents. -function util.make_shallow_copy(tbl) - local copy = {} - for k,v in pairs(tbl) do - copy[k] = v - end - return copy -end - --- Check if a set of needed variables are referenced --- somewhere in a list of definitions, warning the user --- about any unused ones. Each key in needed_set should --- appear as a $(XYZ) variable at least once as a --- substring of some value of var_defs. --- @param var_defs: a table with string keys and string --- values, containing variable definitions. --- @param needed_set: a set where keys are the names of --- needed variables. --- @param msg string: the warning message to display. -function util.warn_if_not_used(var_defs, needed_set, msg) - needed_set = util.make_shallow_copy(needed_set) - for _, val in pairs(var_defs) do - for used in val:gmatch(var_format_pattern) do - needed_set[used] = nil - end - end - for var, _ in pairs(needed_set) do - util.warning(msg:format(var)) - end -end - --- Output any entries that might remain in $(XYZ) format, --- warning the user that substitutions have failed. --- @param line string: the input string -local function warn_failed_matches(line) - local any_failed = false - if line:match(var_format_pattern) then - for unmatched in line:gmatch(var_format_pattern) do - util.warning("unmatched variable " .. unmatched) - any_failed = true - end - end - return any_failed -end - ---- Perform make-style variable substitutions on string values of a table. --- For every string value tbl.x which contains a substring of the format --- "$(XYZ)" will have this substring replaced by vars["XYZ"], if that field --- exists in vars. Only string values are processed; this function --- does not scan subtables recursively. --- @param tbl table: Table to have its string values modified. --- @param vars table: Table containing string-string key-value pairs --- representing variables to replace in the strings values of tbl. -function util.variable_substitutions(tbl, vars) - assert(type(tbl) == "table") - assert(type(vars) == "table") - - local updated = {} - for k, v in pairs(tbl) do - if type(v) == "string" then - updated[k] = v:gsub(var_format_pattern, vars) - if warn_failed_matches(updated[k]) then - updated[k] = updated[k]:gsub(var_format_pattern, "") - end - end - end - for k, v in pairs(updated) do - tbl[k] = v - end -end - ---- Return an array of keys of a table. --- @param tbl table: The input table. --- @return table: The array of keys. -function util.keys(tbl) - local ks = {} - for k,_ in pairs(tbl) do - table.insert(ks, k) - end - return ks -end - -local function default_sort(a, b) - local ta = type(a) - local tb = type(b) - if ta == "number" and tb == "number" then - return a < b - elseif ta == "number" then - return true - elseif tb == "number" then - return false - else - return tostring(a) < tostring(b) - end -end - ---- A table iterator generator that returns elements sorted by key, --- to be used in "for" loops. --- @param tbl table: The table to be iterated. --- @param sort_function function or table or nil: An optional comparison function --- to be used by table.sort when sorting keys, or an array listing an explicit order --- for keys. If a value itself is an array, it is taken so that the first element --- is a string representing the field name, and the second element is a priority table --- for that key, which is returned by the iterator as the third value after the key --- and the value. --- @return function: the iterator function. -function util.sortedpairs(tbl, sort_function) - sort_function = sort_function or default_sort - local keys = util.keys(tbl) - local sub_orders = {} - - if type(sort_function) == "function" then - table.sort(keys, sort_function) - else - local order = sort_function - local ordered_keys = {} - local all_keys = keys - keys = {} - - for _, order_entry in ipairs(order) do - local key, sub_order - if type(order_entry) == "table" then - key = order_entry[1] - sub_order = order_entry[2] - else - key = order_entry - end - - if tbl[key] then - ordered_keys[key] = true - sub_orders[key] = sub_order - table.insert(keys, key) - end - end - - table.sort(all_keys, default_sort) - for _, key in ipairs(all_keys) do - if not ordered_keys[key] then - table.insert(keys, key) - end - end - end - - local i = 1 - return function() - local key = keys[i] - i = i + 1 - return key, tbl[key], sub_orders[key] - end -end - -function util.lua_versions() - local versions = { "5.1", "5.2", "5.3" } - local i = 0 - return function() - i = i + 1 - return versions[i] - end -end - -function util.starts_with(s, prefix) - return s:sub(1,#prefix) == prefix -end - ---- Print a line to standard output -function util.printout(...) - io.stdout:write(table.concat({...},"\t")) - io.stdout:write("\n") -end - ---- Print a line to standard error -function util.printerr(...) - io.stderr:write(table.concat({...},"\t")) - io.stderr:write("\n") -end - ---- Display a warning message. --- @param msg string: the warning message -function util.warning(msg) - util.printerr("Warning: "..msg) -end - -function util.title(msg, porcelain, underline) - if porcelain then return end - util.printout() - util.printout(msg) - util.printout((underline or "-"):rep(#msg)) - util.printout() -end - -function util.this_program(default) - local i = 1 - local last, cur = default, default - while i do - local dbg = debug.getinfo(i,"S") - if not dbg then break end - last = cur - cur = dbg.source - i=i+1 - end - return last:sub(2) -end - -function util.deps_mode_help(program) - local cfg = require("luarocks.cfg") - return [[ ---deps-mode= How to handle dependencies. Four modes are supported: - * all - use all trees from the rocks_trees list - for finding dependencies - * one - use only the current tree (possibly set - with --tree) - * order - use trees based on order (use the current - tree and all trees below it on the rocks_trees list) - * none - ignore dependencies altogether. - The default mode may be set with the deps_mode entry - in the configuration file. - The current default is "]]..cfg.deps_mode..[[". - Type ']]..util.this_program(program or "luarocks")..[[' with no arguments to see - your list of rocks trees. -]] -end - -function util.see_help(command, program) - return "See '"..util.this_program(program or "luarocks")..' help'..(command and " "..command or "").."'." -end - -function util.announce_install(rockspec) - local cfg = require("luarocks.cfg") - local path = require("luarocks.path") - - local suffix = "" - if rockspec.description and rockspec.description.license then - suffix = " (license: "..rockspec.description.license..")" - end - - local root_dir = path.root_dir(cfg.rocks_dir) - util.printout(rockspec.name.." "..rockspec.version.." is now installed in "..root_dir..suffix) - util.printout() -end - ---- Collect rockspecs located in a subdirectory. --- @param versions table: A table mapping rock names to newest rockspec versions. --- @param paths table: A table mapping rock names to newest rockspec paths. --- @param unnamed_paths table: An array of rockspec paths that don't contain rock --- name and version in regular format. --- @param subdir string: path to subdirectory. -local function collect_rockspecs(versions, paths, unnamed_paths, subdir) - local fs = require("luarocks.fs") - local dir = require("luarocks.dir") - local path = require("luarocks.path") - local deps = require("luarocks.deps") - - if fs.is_dir(subdir) then - for file in fs.dir(subdir) do - file = dir.path(subdir, file) - - if file:match("rockspec$") and fs.is_file(file) then - local rock, version = path.parse_name(file) - - if rock then - if not versions[rock] or deps.compare_versions(version, versions[rock]) then - versions[rock] = version - paths[rock] = file - end - else - table.insert(unnamed_paths, file) - end - end - end - end -end - ---- Get default rockspec name for commands that take optional rockspec name. --- @return string or (nil, string): path to the rockspec or nil and error message. -function util.get_default_rockspec() - local versions, paths, unnamed_paths = {}, {}, {} - -- Look for rockspecs in some common locations. - collect_rockspecs(versions, paths, unnamed_paths, ".") - collect_rockspecs(versions, paths, unnamed_paths, "rockspec") - collect_rockspecs(versions, paths, unnamed_paths, "rockspecs") - - if #unnamed_paths > 0 then - -- There are rockspecs not following "name-version.rockspec" format. - -- More than one are ambiguous. - if #unnamed_paths > 1 then - return nil, "Please specify which rockspec file to use." - else - return unnamed_paths[1] - end - else - local rock = next(versions) - - if rock then - -- If there are rockspecs for multiple rocks it's ambiguous. - if next(versions, rock) then - return nil, "Please specify which rockspec file to use." - else - return paths[rock] - end - else - return nil, "Argument missing: please specify a rockspec to use on current directory." - end - end -end - --- from http://lua-users.org/wiki/SplitJoin --- by PhilippeLhoste -function util.split_string(str, delim, maxNb) - -- Eliminate bad cases... - if string.find(str, delim) == nil then - return { str } - end - if maxNb == nil or maxNb < 1 then - maxNb = 0 -- No limit - end - local result = {} - local pat = "(.-)" .. delim .. "()" - local nb = 0 - local lastPos - for part, pos in string.gmatch(str, pat) do - nb = nb + 1 - result[nb] = part - lastPos = pos - if nb == maxNb then break end - end - -- Handle the last field - if nb ~= maxNb then - result[nb + 1] = string.sub(str, lastPos) - end - return result -end - ---- Remove repeated entries from a path-style string. --- Example: given ("a;b;c;a;b;d", ";"), returns "a;b;c;d". --- @param list string: A path string (from $PATH or package.path) --- @param sep string: The separator -function util.remove_path_dupes(list, sep) - assert(type(list) == "string") - assert(type(sep) == "string") - local parts = util.split_string(list, sep) - local final, entries = {}, {} - for _, part in ipairs(parts) do - part = part:gsub("//", "/") - if not entries[part] then - table.insert(final, part) - entries[part] = true - end - end - return table.concat(final, sep) -end - ---- --- Formats tables with cycles recursively to any depth. --- References to other tables are shown as values. --- Self references are indicated. --- The string returned is "Lua code", which can be procesed --- (in the case in which indent is composed by spaces or "--"). --- Userdata and function keys and values are shown as strings, --- which logically are exactly not equivalent to the original code. --- This routine can serve for pretty formating tables with --- proper indentations, apart from printing them: --- io.write(table.show(t, "t")) -- a typical use --- Written by Julio Manuel Fernandez-Diaz, --- Heavily based on "Saving tables with cycles", PIL2, p. 113. --- @param t table: is the table. --- @param name string: is the name of the table (optional) --- @param indent string: is a first indentation (optional). --- @return string: the pretty-printed table -function util.show_table(t, name, indent) - local cart -- a container - local autoref -- for self references - - local function isemptytable(t) return next(t) == nil end - - local function basicSerialize (o) - local so = tostring(o) - if type(o) == "function" then - local info = debug.getinfo(o, "S") - -- info.name is nil because o is not a calling level - if info.what == "C" then - return ("%q"):format(so .. ", C function") - else - -- the information is defined through lines - return ("%q"):format(so .. ", defined in (" .. info.linedefined .. "-" .. info.lastlinedefined .. ")" .. info.source) - end - elseif type(o) == "number" then - return so - else - return ("%q"):format(so) - end - end - - local function addtocart (value, name, indent, saved, field) - indent = indent or "" - saved = saved or {} - field = field or name - - cart = cart .. indent .. field - - if type(value) ~= "table" then - cart = cart .. " = " .. basicSerialize(value) .. ";\n" - else - if saved[value] then - cart = cart .. " = {}; -- " .. saved[value] .. " (self reference)\n" - autoref = autoref .. name .. " = " .. saved[value] .. ";\n" - else - saved[value] = name - --if tablecount(value) == 0 then - if isemptytable(value) then - cart = cart .. " = {};\n" - else - cart = cart .. " = {\n" - for k, v in pairs(value) do - k = basicSerialize(k) - local fname = ("%s[%s]"):format(name, k) - field = ("[%s]"):format(k) - -- three spaces between levels - addtocart(v, fname, indent .. " ", saved, field) - end - cart = cart .. indent .. "};\n" - end - end - end - end - - name = name or "__unnamed__" - if type(t) ~= "table" then - return name .. " = " .. basicSerialize(t) - end - cart, autoref = "", "" - addtocart(t, name, indent) - return cart .. autoref -end - -function util.array_contains(tbl, value) - for _, v in ipairs(tbl) do - if v == value then - return true - end - end - return false -end - --- Quote Lua string, analogous to fs.Q. --- @param s A string, such as "hello" --- @return string: A quoted string, such as '"hello"' -function util.LQ(s) - return ("%q"):format(s) -end - -return util diff --git a/Utils/luarocks/lua/luarocks/validate.lua b/Utils/luarocks/lua/luarocks/validate.lua deleted file mode 100644 index c4570aa4b..000000000 --- a/Utils/luarocks/lua/luarocks/validate.lua +++ /dev/null @@ -1,159 +0,0 @@ - ---- Sandboxed test of build/install of all packages in a repository (unfinished and disabled). -local validate = {} -package.loaded["luarocks.validate"] = validate - -local fs = require("luarocks.fs") -local dir = require("luarocks.dir") -local path = require("luarocks.path") -local cfg = require("luarocks.cfg") -local build = require("luarocks.build") -local install = require("luarocks.install") -local util = require("luarocks.util") - -util.add_run_function(validate) -validate.help_summary = "Sandboxed test of build/install of all packages in a repository." - -validate.help = [[ -, if given, is a local repository pathname. -]] - -local function save_settings(repo) - local protocol, path = dir.split_url(repo) - table.insert(cfg.rocks_servers, 1, protocol.."://"..path) - return { - root_dir = cfg.root_dir, - rocks_dir = cfg.rocks_dir, - deploy_bin_dir = cfg.deploy_bin_dir, - deploy_lua_dir = cfg.deploy_lua_dir, - deploy_lib_dir = cfg.deploy_lib_dir, - } -end - -local function restore_settings(settings) - cfg.root_dir = settings.root_dir - cfg.rocks_dir = settings.rocks_dir - cfg.deploy_bin_dir = settings.deploy_bin_dir - cfg.deploy_lua_dir = settings.deploy_lua_dir - cfg.deploy_lib_dir = settings.deploy_lib_dir - cfg.variables.ROCKS_TREE = settings.rocks_dir - cfg.variables.SCRIPTS_DIR = settings.deploy_bin_dir - table.remove(cfg.rocks_servers, 1) -end - -local function prepare_sandbox(file) - local root_dir = fs.make_temp_dir(file):gsub("/+$", "") - cfg.root_dir = root_dir - cfg.rocks_dir = path.rocks_dir(root_dir) - cfg.deploy_bin_dir = path.deploy_bin_dir(root_dir) - cfg.variables.ROCKS_TREE = cfg.rocks_dir - cfg.variables.SCRIPTS_DIR = cfg.deploy_bin_dir - return root_dir -end - -local function validate_rockspec(file) - local ok, err, errcode = build.build_rockspec(file, true, "one") - if not ok then - util.printerr(err) - end - return ok, err, errcode -end - -local function validate_src_rock(file) - local ok, err, errcode = build.build_rock(file, false, "one") - if not ok then - util.printerr(err) - end - return ok, err, errcode -end - -local function validate_rock(file) - local ok, err, errcode = install.install_binary_rock(file, "one") - if not ok then - util.printerr(err) - end - return ok, err, errcode -end - -function validate.command(flags, repo) - repo = repo or cfg.rocks_dir - - util.printout("Verifying contents of "..repo) - - local results = { - ok = {} - } - local settings = save_settings(repo) - local sandbox - if flags["quick"] then - sandbox = prepare_sandbox("luarocks_validate") - end - if not fs.exists(repo) then - return nil, repo.." is not a local repository." - end - for file in fs.dir(repo) do for _=1,1 do - if file == "manifest" or file == "index.html" then - break -- continue for - end - local pathname = fs.absolute_name(dir.path(repo, file)) - if not flags["quick"] then - sandbox = prepare_sandbox(file) - end - local ok, err, errcode - util.printout() - util.printout("Verifying "..pathname) - if file:match("%.rockspec$") then - ok, err, errcode = validate_rockspec(pathname, "one") - elseif file:match("%.src%.rock$") then - ok, err, errcode = validate_src_rock(pathname) - elseif file:match("%.rock$") then - ok, err, errcode = validate_rock(pathname) - end - if ok then - table.insert(results.ok, {file=file} ) - else - if not errcode then - errcode = "misc" - end - if not results[errcode] then - results[errcode] = {} - end - table.insert(results[errcode], {file=file, err=err} ) - end - util.run_scheduled_functions() - if not flags["quick"] then - fs.delete(sandbox) - end - repeat until not fs.pop_dir() - end end - if flags["quick"] then - fs.delete(sandbox) - end - restore_settings(settings) - util.title("Results:") - util.printout("OK: "..tostring(#results.ok)) - for _, entry in ipairs(results.ok) do - util.printout(entry.file) - end - for errcode, errors in pairs(results) do - if errcode ~= "ok" then - util.printout() - util.printout(errcode.." errors: "..tostring(#errors)) - for _, entry in ipairs(errors) do - util.printout(entry.file, entry.err) - end - end - end - - util.title("Summary:") - local total = 0 - for errcode, errors in pairs(results) do - util.printout(errcode..": "..tostring(#errors)) - total = total + #errors - end - util.printout("Total: "..total) - return true -end - - -return validate diff --git a/Utils/luarocks/lua/luarocks/write_rockspec.lua b/Utils/luarocks/lua/luarocks/write_rockspec.lua deleted file mode 100644 index 33edeb1b4..000000000 --- a/Utils/luarocks/lua/luarocks/write_rockspec.lua +++ /dev/null @@ -1,375 +0,0 @@ - -local write_rockspec = {} -package.loaded["luarocks.write_rockspec"] = write_rockspec - -local cfg = require("luarocks.cfg") -local dir = require("luarocks.dir") -local fetch = require("luarocks.fetch") -local fs = require("luarocks.fs") -local path = require("luarocks.path") -local persist = require("luarocks.persist") -local type_check = require("luarocks.type_check") -local util = require("luarocks.util") - -util.add_run_function(write_rockspec) -write_rockspec.help_summary = "Write a template for a rockspec file." -write_rockspec.help_arguments = "[--output= ...] [] [] [|]" -write_rockspec.help = [[ -This command writes an initial version of a rockspec file, -based on a name, a version, and a location (an URL or a local path). -If only two arguments are given, the first one is considered the name and the -second one is the location. -If only one argument is given, it must be the location. -If no arguments are given, current directory is used as location. -LuaRocks will attempt to infer name and version if not given, -using 'scm' as default version. - -Note that the generated file is a _starting point_ for writing a -rockspec, and is not guaranteed to be complete or correct. - ---output= Write the rockspec with the given filename. - If not given, a file is written in the current - directory with a filename based on given name and version. ---license="" A license string, such as "MIT/X11" or "GNU GPL v3". ---summary="" A short one-line description summary. ---detailed="" A longer description string. ---homepage= Project homepage. ---lua-version= Supported Lua versions. Accepted values are "5.1", "5.2", - "5.3", "5.1,5.2", "5.2,5.3", or "5.1,5.2,5.3". ---rockspec-format= Rockspec format version, such as "1.0" or "1.1". ---tag= Tag to use. Will attempt to extract version number from it. ---lib=[,] A comma-separated list of libraries that C files need to - link to. -]] - -local function open_file(name) - return io.open(dir.path(fs.current_dir(), name), "r") -end - -local function get_url(rockspec) - local file, temp_dir, err_code, err_file, err_temp_dir = fetch.fetch_sources(rockspec, false) - if err_code == "source.dir" then - file, temp_dir = err_file, err_temp_dir - elseif not file then - util.warning("Could not fetch sources - "..temp_dir) - return false - end - util.printout("File successfully downloaded. Making checksum and checking base dir...") - if fetch.is_basic_protocol(rockspec.source.protocol) then - rockspec.source.md5 = fs.get_md5(file) - end - local inferred_dir, found_dir = fetch.find_base_dir(file, temp_dir, rockspec.source.url) - return true, found_dir or inferred_dir, temp_dir -end - -local function configure_lua_version(rockspec, luaver) - if luaver == "5.1" then - table.insert(rockspec.dependencies, "lua ~> 5.1") - elseif luaver == "5.2" then - table.insert(rockspec.dependencies, "lua ~> 5.2") - elseif luaver == "5.3" then - table.insert(rockspec.dependencies, "lua ~> 5.3") - elseif luaver == "5.1,5.2" then - table.insert(rockspec.dependencies, "lua >= 5.1, < 5.3") - elseif luaver == "5.2,5.3" then - table.insert(rockspec.dependencies, "lua >= 5.2, < 5.4") - elseif luaver == "5.1,5.2,5.3" then - table.insert(rockspec.dependencies, "lua >= 5.1, < 5.4") - else - util.warning("Please specify supported Lua version with --lua-version=. "..util.see_help("write_rockspec")) - end -end - -local function detect_description() - local fd = open_file("README.md") or open_file("README") - if not fd then return end - local data = fd:read("*a") - fd:close() - local paragraph = data:match("\n\n([^%[].-)\n\n") - if not paragraph then paragraph = data:match("\n\n(.*)") end - local summary, detailed - if paragraph then - detailed = paragraph - - if #paragraph < 80 then - summary = paragraph:gsub("\n", "") - else - summary = paragraph:gsub("\n", " "):match("([^.]*%.) ") - end - end - return summary, detailed -end - -local function detect_mit_license(data) - local strip_copyright = (data:gsub("Copyright [^\n]*\n", "")) - local sum = 0 - for i = 1, #strip_copyright do - local num = string.byte(strip_copyright:sub(i,i)) - if num > 32 and num <= 128 then - sum = sum + num - end - end - return sum == 78656 -end - -local simple_scm_protocols = { - git = true, ["git+http"] = true, ["git+https"] = true, - hg = true, ["hg+http"] = true, ["hg+https"] = true -} - -local function detect_url_from_command(program, args, directory) - local command = fs.Q(cfg.variables[program:upper()]).. " "..args - local pipe = io.popen(fs.command_at(directory, fs.quiet_stderr(command))) - if not pipe then return nil end - local url = pipe:read("*a"):match("^([^\r\n]+)") - pipe:close() - if not url then return nil end - if not util.starts_with(url, program.."://") then - url = program.."+"..url - end - - if simple_scm_protocols[dir.split_url(url)] then - return url - end -end - -local function detect_scm_url(directory) - return detect_url_from_command("git", "config --get remote.origin.url", directory) or - detect_url_from_command("hg", "paths default", directory) -end - -local function show_license(rockspec) - local fd = open_file("COPYING") or open_file("LICENSE") or open_file("MIT-LICENSE.txt") - if not fd then return nil end - local data = fd:read("*a") - fd:close() - local is_mit = detect_mit_license(data) - util.title("License for "..rockspec.package..":") - util.printout(data) - util.printout() - return is_mit -end - -local function get_cmod_name(file) - local fd = open_file(file) - if not fd then return nil end - local data = fd:read("*a") - fd:close() - return (data:match("int%s+luaopen_([a-zA-Z0-9_]+)")) -end - -local luamod_blacklist = { - test = true, - tests = true, -} - -local function fill_as_builtin(rockspec, libs) - rockspec.build.type = "builtin" - rockspec.build.modules = {} - local prefix = "" - - for _, parent in ipairs({"src", "lua"}) do - if fs.is_dir(parent) then - fs.change_dir(parent) - prefix = parent.."/" - break - end - end - - local incdirs, libdirs - if libs then - incdirs, libdirs = {}, {} - for _, lib in ipairs(libs) do - local upper = lib:upper() - incdirs[#incdirs+1] = "$("..upper.."_INCDIR)" - libdirs[#libdirs+1] = "$("..upper.."_LIBDIR)" - end - end - - for _, file in ipairs(fs.find()) do - local luamod = file:match("(.*)%.lua$") - if luamod and not luamod_blacklist[luamod] then - rockspec.build.modules[path.path_to_module(file)] = prefix..file - else - local cmod = file:match("(.*)%.c$") - if cmod then - local modname = get_cmod_name(file) or path.path_to_module(file:gsub("%.c$", ".lua")) - rockspec.build.modules[modname] = { - sources = prefix..file, - libraries = libs, - incdirs = incdirs, - libdirs = libdirs, - } - end - end - end - - for _, directory in ipairs({ "doc", "docs", "samples", "tests" }) do - if fs.is_dir(directory) then - if not rockspec.build.copy_directories then - rockspec.build.copy_directories = {} - end - table.insert(rockspec.build.copy_directories, directory) - end - end - - if prefix ~= "" then - fs.pop_dir() - end -end - -local function rockspec_cleanup(rockspec) - rockspec.source.file = nil - rockspec.source.protocol = nil - rockspec.variables = nil - rockspec.name = nil -end - -function write_rockspec.command(flags, name, version, url_or_dir) - if not name then - url_or_dir = "." - elseif not version then - url_or_dir = name - name = nil - elseif not url_or_dir then - url_or_dir = version - version = nil - end - - if flags["tag"] then - if not version then - version = flags["tag"]:gsub("^v", "") - end - end - - local protocol, pathname = dir.split_url(url_or_dir) - if protocol == "file" then - if pathname == "." then - name = name or dir.base_name(fs.current_dir()) - end - elseif fetch.is_basic_protocol(protocol) then - local filename = dir.base_name(url_or_dir) - local newname, newversion = filename:match("(.*)-([^-]+)") - if newname then - name = name or newname - version = version or newversion:gsub("%.[a-z]+$", ""):gsub("%.tar$", "") - end - else - name = name or dir.base_name(url_or_dir):gsub("%.[^.]+$", "") - end - - if not name then - return nil, "Could not infer rock name. "..util.see_help("write_rockspec") - end - version = version or "scm" - - local filename = flags["output"] or dir.path(fs.current_dir(), name:lower().."-"..version.."-1.rockspec") - - local rockspec = { - rockspec_format = flags["rockspec-format"], - package = name, - name = name:lower(), - version = version.."-1", - source = { - url = "*** please add URL for source tarball, zip or repository here ***", - tag = flags["tag"], - }, - description = { - summary = flags["summary"] or "*** please specify description summary ***", - detailed = flags["detailed"] or "*** please enter a detailed description ***", - homepage = flags["homepage"] or "*** please enter a project homepage ***", - license = flags["license"] or "*** please specify a license ***", - }, - dependencies = {}, - build = {}, - } - path.configure_paths(rockspec) - rockspec.source.protocol = protocol - - configure_lua_version(rockspec, flags["lua-version"]) - - local local_dir = url_or_dir - - if url_or_dir:match("://") then - rockspec.source.url = url_or_dir - rockspec.source.file = dir.base_name(url_or_dir) - rockspec.source.dir = "dummy" - if not fetch.is_basic_protocol(rockspec.source.protocol) then - if version ~= "scm" then - rockspec.source.tag = flags["tag"] or "v" .. version - end - end - rockspec.source.dir = nil - local ok, base_dir, temp_dir = get_url(rockspec) - if ok then - if base_dir ~= dir.base_name(url_or_dir) then - rockspec.source.dir = base_dir - end - end - if base_dir then - local_dir = dir.path(temp_dir, base_dir) - else - local_dir = nil - end - else - rockspec.source.url = detect_scm_url(local_dir) or rockspec.source.url - end - - if not local_dir then - local_dir = "." - end - - if not flags["homepage"] then - local url_protocol, url_path = dir.split_url(rockspec.source.url) - - if simple_scm_protocols[url_protocol] then - for _, domain in ipairs({"github.com", "bitbucket.org", "gitlab.com"}) do - if util.starts_with(url_path, domain) then - rockspec.description.homepage = "https://"..url_path:gsub("%.git$", "") - break - end - end - end - end - - local libs = nil - if flags["lib"] then - libs = {} - rockspec.external_dependencies = {} - for lib in flags["lib"]:gmatch("([^,]+)") do - table.insert(libs, lib) - rockspec.external_dependencies[lib:upper()] = { - library = lib - } - end - end - - local ok, err = fs.change_dir(local_dir) - if not ok then return nil, "Failed reaching files from project - error entering directory "..local_dir end - - if (not flags["summary"]) or (not flags["detailed"]) then - local summary, detailed = detect_description() - rockspec.description.summary = flags["summary"] or summary - rockspec.description.detailed = flags["detailed"] or detailed - end - - local is_mit = show_license(rockspec) - - if is_mit and not flags["license"] then - rockspec.description.license = "MIT" - end - - fill_as_builtin(rockspec, libs) - - rockspec_cleanup(rockspec) - - persist.save_from_table(filename, rockspec, type_check.rockspec_order) - - util.printout() - util.printout("Wrote template at "..filename.." -- you should now edit and finish it.") - util.printout() - - return true -end - -return write_rockspec diff --git a/Utils/luarocks/lua5.1.dll b/Utils/luarocks/lua5.1.dll deleted file mode 100644 index b87f3b661..000000000 Binary files a/Utils/luarocks/lua5.1.dll and /dev/null differ diff --git a/Utils/luarocks/lua5.1.exe b/Utils/luarocks/lua5.1.exe deleted file mode 100644 index dc1c2c35c..000000000 Binary files a/Utils/luarocks/lua5.1.exe and /dev/null differ diff --git a/Utils/luarocks/lua5.1.lib b/Utils/luarocks/lua5.1.lib deleted file mode 100644 index df9882765..000000000 Binary files a/Utils/luarocks/lua5.1.lib and /dev/null differ diff --git a/Utils/luarocks/lua51.dll b/Utils/luarocks/lua51.dll deleted file mode 100644 index 27ab26542..000000000 Binary files a/Utils/luarocks/lua51.dll and /dev/null differ diff --git a/Utils/luarocks/lua51.lib b/Utils/luarocks/lua51.lib deleted file mode 100644 index 74bcf3fb4..000000000 Binary files a/Utils/luarocks/lua51.lib and /dev/null differ diff --git a/Utils/luarocks/luac5.1.exe b/Utils/luarocks/luac5.1.exe deleted file mode 100644 index 6f87524e2..000000000 Binary files a/Utils/luarocks/luac5.1.exe and /dev/null differ diff --git a/Utils/luarocks/luarocks-admin.bat b/Utils/luarocks/luarocks-admin.bat deleted file mode 100644 index e7bd4d12b..000000000 --- a/Utils/luarocks/luarocks-admin.bat +++ /dev/null @@ -1,43 +0,0 @@ -@ECHO OFF -SETLOCAL ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS - -SET "LUA_PATH=C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks\lua\?.lua;C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks\lua\?\init.lua;%LUA_PATH%" -IF NOT "%LUA_PATH_5_2%"=="" ( - SET "LUA_PATH_5_2=C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks\lua\?.lua;C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks\lua\?\init.lua;%LUA_PATH_5_2%" -) -IF NOT "%LUA_PATH_5_3%"=="" ( - SET "LUA_PATH_5_3=C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks\lua\?.lua;C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks\lua\?\init.lua;%LUA_PATH_5_3%" -) -SET "PATH=C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks;%PATH%" -"C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks\lua5.1" "C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks\luarocks-admin.lua" %* -SET EXITCODE=%ERRORLEVEL% -IF NOT "%EXITCODE%"=="2" GOTO EXITLR - -REM Permission denied error, try and auto elevate... -REM already an admin? (checking to prevent loops) -NET SESSION >NUL 2>&1 -IF "%ERRORLEVEL%"=="0" GOTO EXITLR - -REM Do we have PowerShell available? -PowerShell /? >NUL 2>&1 -IF NOT "%ERRORLEVEL%"=="0" GOTO EXITLR - -:GETTEMPNAME -SET TMPFILE=%TEMP%\LuaRocks-Elevator-%RANDOM%.bat -IF EXIST "%TMPFILE%" GOTO :GETTEMPNAME - -ECHO @ECHO OFF > "%TMPFILE%" -ECHO CHDIR /D %CD% >> "%TMPFILE%" -ECHO ECHO %0 %* >> "%TMPFILE%" -ECHO ECHO. >> "%TMPFILE%" -ECHO CALL %0 %* >> "%TMPFILE%" -ECHO ECHO. >> "%TMPFILE%" -ECHO ECHO Press any key to close this window... >> "%TMPFILE%" -ECHO PAUSE ^> NUL >> "%TMPFILE%" -ECHO DEL "%TMPFILE%" >> "%TMPFILE%" - -ECHO Now retrying as a privileged user... -PowerShell -Command (New-Object -com 'Shell.Application').ShellExecute('%TMPFILE%', '', '', 'runas') - -:EXITLR -exit /b %EXITCODE% diff --git a/Utils/luarocks/luarocks-admin.lua b/Utils/luarocks/luarocks-admin.lua deleted file mode 100644 index 2890d1f19..000000000 --- a/Utils/luarocks/luarocks-admin.lua +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env lua - --- this should be loaded first. -local cfg = require("luarocks.cfg") - -local loader = require("luarocks.loader") -local command_line = require("luarocks.command_line") - -program_description = "LuaRocks repository administration interface" - -commands = { - help = "luarocks.help", - make_manifest = "luarocks.make_manifest", - add = "luarocks.add", - remove = "luarocks.admin_remove", - refresh_cache = "luarocks.refresh_cache", -} - -command_line.run_command(...) diff --git a/Utils/luarocks/luarocks.bat b/Utils/luarocks/luarocks.bat deleted file mode 100644 index 373068966..000000000 --- a/Utils/luarocks/luarocks.bat +++ /dev/null @@ -1,43 +0,0 @@ -@ECHO OFF -SETLOCAL ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS - -SET "LUA_PATH=C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks\lua\?.lua;C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks\lua\?\init.lua;%LUA_PATH%" -IF NOT "%LUA_PATH_5_2%"=="" ( - SET "LUA_PATH_5_2=C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks\lua\?.lua;C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks\lua\?\init.lua;%LUA_PATH_5_2%" -) -IF NOT "%LUA_PATH_5_3%"=="" ( - SET "LUA_PATH_5_3=C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks\lua\?.lua;C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks\lua\?\init.lua;%LUA_PATH_5_3%" -) -SET "PATH=C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks;%PATH%" -"C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks\lua5.1" "C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks\luarocks.lua" %* -SET EXITCODE=%ERRORLEVEL% -IF NOT "%EXITCODE%"=="2" GOTO EXITLR - -REM Permission denied error, try and auto elevate... -REM already an admin? (checking to prevent loops) -NET SESSION >NUL 2>&1 -IF "%ERRORLEVEL%"=="0" GOTO EXITLR - -REM Do we have PowerShell available? -PowerShell /? >NUL 2>&1 -IF NOT "%ERRORLEVEL%"=="0" GOTO EXITLR - -:GETTEMPNAME -SET TMPFILE=%TEMP%\LuaRocks-Elevator-%RANDOM%.bat -IF EXIST "%TMPFILE%" GOTO :GETTEMPNAME - -ECHO @ECHO OFF > "%TMPFILE%" -ECHO CHDIR /D %CD% >> "%TMPFILE%" -ECHO ECHO %0 %* >> "%TMPFILE%" -ECHO ECHO. >> "%TMPFILE%" -ECHO CALL %0 %* >> "%TMPFILE%" -ECHO ECHO. >> "%TMPFILE%" -ECHO ECHO Press any key to close this window... >> "%TMPFILE%" -ECHO PAUSE ^> NUL >> "%TMPFILE%" -ECHO DEL "%TMPFILE%" >> "%TMPFILE%" - -ECHO Now retrying as a privileged user... -PowerShell -Command (New-Object -com 'Shell.Application').ShellExecute('%TMPFILE%', '', '', 'runas') - -:EXITLR -exit /b %EXITCODE% diff --git a/Utils/luarocks/luarocks.lua b/Utils/luarocks/luarocks.lua deleted file mode 100644 index be6c2b811..000000000 --- a/Utils/luarocks/luarocks.lua +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env lua - --- this should be loaded first. -local cfg = require("luarocks.cfg") - -local loader = require("luarocks.loader") -local command_line = require("luarocks.command_line") - -program_description = "LuaRocks main command-line interface" - -commands = { - help = "luarocks.help", - pack = "luarocks.pack", - unpack = "luarocks.unpack", - build = "luarocks.build", - install = "luarocks.install", - search = "luarocks.search", - list = "luarocks.list", - remove = "luarocks.remove", - make = "luarocks.make", - download = "luarocks.download", - path = "luarocks.path_cmd", - show = "luarocks.show", - new_version = "luarocks.new_version", - lint = "luarocks.lint", - write_rockspec = "luarocks.write_rockspec", - purge = "luarocks.purge", - doc = "luarocks.doc", - upload = "luarocks.upload", - config = "luarocks.config_cmd", -} - -command_line.run_command(...) diff --git a/Utils/luarocks/luarocksw.bat b/Utils/luarocks/luarocksw.bat deleted file mode 100644 index 8ac029209..000000000 --- a/Utils/luarocks/luarocksw.bat +++ /dev/null @@ -1,49 +0,0 @@ -@echo off -setlocal -SET MYPATH=%~dp0 - -IF NOT [%1]==[] GOTO LETSGO -ECHO Same as 'luarocks' command, except this -ECHO command will pause after completion, allowing for -ECHO examination of output. -ECHO. -ECHO For LuaRocks help use: -ECHO LUAROCKS HELP -ECHO. -ECHO OPTIONS specific for LUAROCKSW: -ECHO REMOVEALL is a command specific to this batch file -ECHO the option takes a FULL ROCKSPEC filename and then -ECHO it will strip path, version and extension info from -ECHO it before executing the LUAROCKS REMOVE command -ECHO Example: -ECHO luarocksw remove "c:\somedir\modulename-1.0-1.rockspec" -ECHO will execute: -ECHO luarocks remove "c:\somedir\modulename-1.0-1.rockspec" -ECHO and will only remove the specific version 1.0 from the -ECHO system. -ECHO luarocksw removeall "c:\somedir\modulename-1.0-1.rockspec" -ECHO will execute: -ECHO luarocks remove modulename -ECHO and will remove all versions of this package -ECHO. -GOTO END - -:LETSGO -REM if REMOVEALL command then info must be stripped from the parameter -if [%1]==[removeall] goto REMOVEALL - -REM execute LuaRocks and wait for results -echo executing: luarocks %* -call "%MYPATH%luarocks" %* -pause -goto END - -:REMOVEALL -for /f "delims=-" %%a in ("%~n2") do ( - echo executing: luarocks remove %%a - "%MYPATH%luarocks" remove "%%a" - pause - goto END -) - -:END \ No newline at end of file diff --git a/Utils/luarocks/luasrcdiet/0.3.0-2/bin/luasrcdiet b/Utils/luarocks/luasrcdiet/0.3.0-2/bin/luasrcdiet deleted file mode 100644 index 28e62894a..000000000 --- a/Utils/luarocks/luasrcdiet/0.3.0-2/bin/luasrcdiet +++ /dev/null @@ -1,653 +0,0 @@ -#!/usr/bin/env lua ---------- --- LuaSrcDiet --- --- Compresses Lua source code by removing unnecessary characters. --- For Lua 5.1+ source code. --- --- **Notes:** --- --- * Remember to update version and date information below (MSG_TITLE). --- * TODO: passing data tables around is a horrific mess. --- * TODO: to implement pcall() to properly handle lexer etc. errors. --- * TODO: need some automatic testing for a semblance of sanity. --- * TODO: the plugin module is highly experimental and unstable. ----- -local equiv = require "luasrcdiet.equiv" -local fs = require "luasrcdiet.fs" -local llex = require "luasrcdiet.llex" -local lparser = require "luasrcdiet.lparser" -local luasrcdiet = require "luasrcdiet.init" -local optlex = require "luasrcdiet.optlex" -local optparser = require "luasrcdiet.optparser" - -local byte = string.byte -local concat = table.concat -local find = string.find -local fmt = string.format -local gmatch = string.gmatch -local match = string.match -local print = print -local rep = string.rep -local sub = string.sub - -local plugin - -local LUA_VERSION = match(_VERSION, " (5%.[123])$") or "5.1" - --- Is --opt-binequiv available for this Lua version? -local BIN_EQUIV_AVAIL = LUA_VERSION == "5.1" and not package.loaded.jit - - ----------------------- Messages and textual data ---------------------- - -local MSG_TITLE = fmt([[ -LuaSrcDiet: Puts your Lua 5.1+ source code on a diet -Version %s <%s> -]], luasrcdiet._VERSION, luasrcdiet._HOMEPAGE) - -local MSG_USAGE = [[ -usage: luasrcdiet [options] [filenames] - -example: - >luasrcdiet myscript.lua -o myscript_.lua - -options: - -v, --version prints version information - -h, --help prints usage information - -o specify file name to write output - -s suffix for output files (default '_') - --keep keep block comment with inside - --plugin run in plugin/ directory - - stop handling arguments - - (optimization levels) - --none all optimizations off (normalizes EOLs only) - --basic lexer-based optimizations only - --maximum maximize reduction of source - - (informational) - --quiet process files quietly - --read-only read file and print token stats only - --dump-lexer dump raw tokens from lexer to stdout - --dump-parser dump variable tracking tables from parser - --details extra info (strings, numbers, locals) - -features (to disable, insert 'no' prefix like --noopt-comments): -%s -default settings: -%s]] - --- Optimization options, for ease of switching on and off. --- --- * Positive to enable optimization, negative (no) to disable. --- * These options should follow --opt-* and --noopt-* style for now. -local OPTION = [[ ---opt-comments,'remove comments and block comments' ---opt-whitespace,'remove whitespace excluding EOLs' ---opt-emptylines,'remove empty lines' ---opt-eols,'all above, plus remove unnecessary EOLs' ---opt-strings,'optimize strings and long strings' ---opt-numbers,'optimize numbers' ---opt-locals,'optimize local variable names' ---opt-entropy,'tries to reduce symbol entropy of locals' ---opt-srcequiv,'insist on source (lexer stream) equivalence' ---opt-binequiv,'insist on binary chunk equivalence (only for PUC Lua 5.1)' ---opt-experimental,'apply experimental optimizations' -]] - --- Preset configuration. -local DEFAULT_CONFIG = [[ - --opt-comments --opt-whitespace --opt-emptylines - --opt-numbers --opt-locals - --opt-srcequiv --noopt-binequiv -]] --- Override configurations: MUST explicitly enable/disable everything. -local BASIC_CONFIG = [[ - --opt-comments --opt-whitespace --opt-emptylines - --noopt-eols --noopt-strings --noopt-numbers - --noopt-locals --noopt-entropy - --opt-srcequiv --noopt-binequiv -]] -local MAXIMUM_CONFIG = [[ - --opt-comments --opt-whitespace --opt-emptylines - --opt-eols --opt-strings --opt-numbers - --opt-locals --opt-entropy - --opt-srcequiv -]] .. (BIN_EQUIV_AVAIL and ' --opt-binequiv' or ' --noopt-binequiv') - -local NONE_CONFIG = [[ - --noopt-comments --noopt-whitespace --noopt-emptylines - --noopt-eols --noopt-strings --noopt-numbers - --noopt-locals --noopt-entropy - --opt-srcequiv --noopt-binequiv -]] - -local DEFAULT_SUFFIX = "_" -- default suffix for file renaming -local PLUGIN_SUFFIX = "luasrcdiet.plugin." -- relative location of plugins - - -------------- Startup and initialize option list handling ------------- - ---- Simple error message handler; change to error if traceback wanted. --- --- @tparam string msg The message to print. -local function die(msg) - print("LuaSrcDiet (error): "..msg); os.exit(1) -end ---die = error--DEBUG - --- Prepare text for list of optimizations, prepare lookup table. -local MSG_OPTIONS = "" -do - local WIDTH = 24 - local o = {} - for op, desc in gmatch(OPTION, "%s*([^,]+),'([^']+)'") do - local msg = " "..op - msg = msg..rep(" ", WIDTH - #msg)..desc.."\n" - MSG_OPTIONS = MSG_OPTIONS..msg - o[op] = true - o["--no"..sub(op, 3)] = true - end - OPTION = o -- replace OPTION with lookup table -end - -MSG_USAGE = fmt(MSG_USAGE, MSG_OPTIONS, DEFAULT_CONFIG) - - ---------- Global variable initialization, option set handling --------- - -local suffix = DEFAULT_SUFFIX -- file suffix -local option = {} -- program options -local stat_c, stat_l -- statistics tables - ---- Sets option lookup table based on a text list of options. --- --- Note: additional forced settings for --opt-eols is done in optlex.lua. --- --- @tparam string CONFIG -local function set_options(CONFIG) - for op in gmatch(CONFIG, "(%-%-%S+)") do - if sub(op, 3, 4) == "no" and -- handle negative options - OPTION["--"..sub(op, 5)] then - option[sub(op, 5)] = false - else - option[sub(op, 3)] = true - end - end -end - - --------------------------- Support functions -------------------------- - --- List of token types, parser-significant types are up to TTYPE_GRAMMAR --- while the rest are not used by parsers; arranged for stats display. -local TTYPES = { - "TK_KEYWORD", "TK_NAME", "TK_NUMBER", -- grammar - "TK_STRING", "TK_LSTRING", "TK_OP", - "TK_EOS", - "TK_COMMENT", "TK_LCOMMENT", -- non-grammar - "TK_EOL", "TK_SPACE", -} -local TTYPE_GRAMMAR = 7 - -local EOLTYPES = { -- EOL names for token dump - ["\n"] = "LF", ["\r"] = "CR", - ["\n\r"] = "LFCR", ["\r\n"] = "CRLF", -} - ---- Reads source code from the file. --- --- @tparam string fname Path of the file to read. --- @treturn string Content of the file. -local function load_file(fname) - local data, err = fs.read_file(fname, "rb") - if not data then die(err) end - return data -end - ---- Saves source code to the file. --- --- @tparam string fname Path of the destination file. --- @tparam string dat The data to write into the file. -local function save_file(fname, dat) - local ok, err = fs.write_file(fname, dat, "wb") - if not ok then die(err) end -end - - ------------------- Functions to deal with statistics ------------------ - ---- Initializes the statistics table. -local function stat_init() - stat_c, stat_l = {}, {} - for i = 1, #TTYPES do - local ttype = TTYPES[i] - stat_c[ttype], stat_l[ttype] = 0, 0 - end -end - ---- Adds a token to the statistics table. --- --- @tparam string tok The token. --- @param seminfo -local function stat_add(tok, seminfo) - stat_c[tok] = stat_c[tok] + 1 - stat_l[tok] = stat_l[tok] + #seminfo -end - ---- Computes totals for the statistics table, returns average table. --- --- @treturn table -local function stat_calc() - local function avg(c, l) -- safe average function - if c == 0 then return 0 end - return l / c - end - local stat_a = {} - local c, l = 0, 0 - for i = 1, TTYPE_GRAMMAR do -- total grammar tokens - local ttype = TTYPES[i] - c = c + stat_c[ttype]; l = l + stat_l[ttype] - end - stat_c.TOTAL_TOK, stat_l.TOTAL_TOK = c, l - stat_a.TOTAL_TOK = avg(c, l) - c, l = 0, 0 - for i = 1, #TTYPES do -- total all tokens - local ttype = TTYPES[i] - c = c + stat_c[ttype]; l = l + stat_l[ttype] - stat_a[ttype] = avg(stat_c[ttype], stat_l[ttype]) - end - stat_c.TOTAL_ALL, stat_l.TOTAL_ALL = c, l - stat_a.TOTAL_ALL = avg(c, l) - return stat_a -end - - ------------------------------ Main tasks ----------------------------- - ---- A simple token dumper, minimal translation of seminfo data. --- --- @tparam string srcfl Path of the source file. -local function dump_tokens(srcfl) - -- Load file and process source input into tokens. - local z = load_file(srcfl) - local toklist, seminfolist = llex.lex(z) - - -- Display output. - for i = 1, #toklist do - local tok, seminfo = toklist[i], seminfolist[i] - if tok == "TK_OP" and byte(seminfo) < 32 then - seminfo = "("..byte(seminfo)..")" - elseif tok == "TK_EOL" then - seminfo = EOLTYPES[seminfo] - else - seminfo = "'"..seminfo.."'" - end - print(tok.." "..seminfo) - end--for -end - ---- Dumps globalinfo and localinfo tables. --- --- @tparam string srcfl Path of the source file. -local function dump_parser(srcfl) - -- Load file and process source input into tokens, - local z = load_file(srcfl) - local toklist, seminfolist, toklnlist = llex.lex(z) - - -- Do parser optimization here. - local xinfo = lparser.parse(toklist, seminfolist, toklnlist) - local globalinfo, localinfo = xinfo.globalinfo, xinfo.localinfo - - -- Display output. - local hl = rep("-", 72) - print("*** Local/Global Variable Tracker Tables ***") - print(hl.."\n GLOBALS\n"..hl) - -- global tables have a list of xref numbers only - for i = 1, #globalinfo do - local obj = globalinfo[i] - local msg = "("..i..") '"..obj.name.."' -> " - local xref = obj.xref - for j = 1, #xref do msg = msg..xref[j].." " end - print(msg) - end - -- Local tables have xref numbers and a few other special - -- numbers that are specially named: decl (declaration xref), - -- act (activation xref), rem (removal xref). - print(hl.."\n LOCALS (decl=declared act=activated rem=removed)\n"..hl) - for i = 1, #localinfo do - local obj = localinfo[i] - local msg = "("..i..") '"..obj.name.."' decl:"..obj.decl.. - " act:"..obj.act.." rem:"..obj.rem - if obj.is_special then - msg = msg.." is_special" - end - msg = msg.." -> " - local xref = obj.xref - for j = 1, #xref do msg = msg..xref[j].." " end - print(msg) - end - print(hl.."\n") -end - ---- Reads source file(s) and reports some statistics. --- --- @tparam string srcfl Path of the source file. -local function read_only(srcfl) - -- Load file and process source input into tokens. - local z = load_file(srcfl) - local toklist, seminfolist = llex.lex(z) - print(MSG_TITLE) - print("Statistics for: "..srcfl.."\n") - - -- Collect statistics. - stat_init() - for i = 1, #toklist do - local tok, seminfo = toklist[i], seminfolist[i] - stat_add(tok, seminfo) - end--for - local stat_a = stat_calc() - - -- Display output. - local function figures(tt) - return stat_c[tt], stat_l[tt], stat_a[tt] - end - local tabf1, tabf2 = "%-16s%8s%8s%10s", "%-16s%8d%8d%10.2f" - local hl = rep("-", 42) - print(fmt(tabf1, "Lexical", "Input", "Input", "Input")) - print(fmt(tabf1, "Elements", "Count", "Bytes", "Average")) - print(hl) - for i = 1, #TTYPES do - local ttype = TTYPES[i] - print(fmt(tabf2, ttype, figures(ttype))) - if ttype == "TK_EOS" then print(hl) end - end - print(hl) - print(fmt(tabf2, "Total Elements", figures("TOTAL_ALL"))) - print(hl) - print(fmt(tabf2, "Total Tokens", figures("TOTAL_TOK"))) - print(hl.."\n") -end - ---- Processes source file(s), writes output and reports some statistics. --- --- @tparam string srcfl Path of the source file. --- @tparam string destfl Path of the destination file where to write optimized source. -local function process_file(srcfl, destfl) - -- handle quiet option - local function print(...) --luacheck: ignore 431 - if option.QUIET then return end - _G.print(...) - end - if plugin and plugin.init then -- plugin init - option.EXIT = false - plugin.init(option, srcfl, destfl) - if option.EXIT then return end - end - print(MSG_TITLE) -- title message - - -- Load file and process source input into tokens. - local z = load_file(srcfl) - if plugin and plugin.post_load then -- plugin post-load - z = plugin.post_load(z) or z - if option.EXIT then return end - end - local toklist, seminfolist, toklnlist = llex.lex(z) - if plugin and plugin.post_lex then -- plugin post-lex - plugin.post_lex(toklist, seminfolist, toklnlist) - if option.EXIT then return end - end - - -- Collect 'before' statistics. - stat_init() - for i = 1, #toklist do - local tok, seminfo = toklist[i], seminfolist[i] - stat_add(tok, seminfo) - end--for - local stat1_a = stat_calc() - local stat1_c, stat1_l = stat_c, stat_l - - -- Do parser optimization here. - optparser.print = print -- hack - local xinfo = lparser.parse(toklist, seminfolist, toklnlist) - if plugin and plugin.post_parse then -- plugin post-parse - plugin.post_parse(xinfo.globalinfo, xinfo.localinfo) - if option.EXIT then return end - end - optparser.optimize(option, toklist, seminfolist, xinfo) - if plugin and plugin.post_optparse then -- plugin post-optparse - plugin.post_optparse() - if option.EXIT then return end - end - - -- Do lexer optimization here, save output file. - local warn = optlex.warn -- use this as a general warning lookup - optlex.print = print -- hack - toklist, seminfolist, toklnlist - = optlex.optimize(option, toklist, seminfolist, toklnlist) - if plugin and plugin.post_optlex then -- plugin post-optlex - plugin.post_optlex(toklist, seminfolist, toklnlist) - if option.EXIT then return end - end - local dat = concat(seminfolist) - -- Depending on options selected, embedded EOLs in long strings and - -- long comments may not have been translated to \n, tack a warning. - if find(dat, "\r\n", 1, 1) or - find(dat, "\n\r", 1, 1) then - warn.MIXEDEOL = true - end - - -- Test source and binary chunk equivalence. - equiv.init(option, llex, warn) - equiv.source(z, dat) - if BIN_EQUIV_AVAIL then - equiv.binary(z, dat) - end - local smsg = "before and after lexer streams are NOT equivalent!" - local bmsg = "before and after binary chunks are NOT equivalent!" - -- for reporting, die if option was selected, else just warn - if warn.SRC_EQUIV then - if option["opt-srcequiv"] then die(smsg) end - else - print("*** SRCEQUIV: token streams are sort of equivalent") - if option["opt-locals"] then - print("(but no identifier comparisons since --opt-locals enabled)") - end - print() - end - if warn.BIN_EQUIV then - if option["opt-binequiv"] then die(bmsg) end - elseif BIN_EQUIV_AVAIL then - print("*** BINEQUIV: binary chunks are sort of equivalent") - print() - end - - -- Save optimized source stream to output file. - save_file(destfl, dat) - - -- Collect 'after' statistics. - stat_init() - for i = 1, #toklist do - local tok, seminfo = toklist[i], seminfolist[i] - stat_add(tok, seminfo) - end--for - local stat_a = stat_calc() - - -- Display output. - print("Statistics for: "..srcfl.." -> "..destfl.."\n") - local function figures(tt) - return stat1_c[tt], stat1_l[tt], stat1_a[tt], - stat_c[tt], stat_l[tt], stat_a[tt] - end - local tabf1, tabf2 = "%-16s%8s%8s%10s%8s%8s%10s", - "%-16s%8d%8d%10.2f%8d%8d%10.2f" - local hl = rep("-", 68) - print("*** lexer-based optimizations summary ***\n"..hl) - print(fmt(tabf1, "Lexical", - "Input", "Input", "Input", - "Output", "Output", "Output")) - print(fmt(tabf1, "Elements", - "Count", "Bytes", "Average", - "Count", "Bytes", "Average")) - print(hl) - for i = 1, #TTYPES do - local ttype = TTYPES[i] - print(fmt(tabf2, ttype, figures(ttype))) - if ttype == "TK_EOS" then print(hl) end - end - print(hl) - print(fmt(tabf2, "Total Elements", figures("TOTAL_ALL"))) - print(hl) - print(fmt(tabf2, "Total Tokens", figures("TOTAL_TOK"))) - print(hl) - - -- Report warning flags from optimizing process. - if warn.LSTRING then - print("* WARNING: "..warn.LSTRING) - elseif warn.MIXEDEOL then - print("* WARNING: ".."output still contains some CRLF or LFCR line endings") - elseif warn.SRC_EQUIV then - print("* WARNING: "..smsg) - elseif warn.BIN_EQUIV then - print("* WARNING: "..bmsg) - end - print() -end - - ----------------------------- Main functions --------------------------- - -local arg = {...} -- program arguments -set_options(DEFAULT_CONFIG) -- set to default options at beginning - ---- Does per-file handling, ship off to tasks. --- --- @tparam {string,...} fspec List of source files. -local function do_files(fspec) - for i = 1, #fspec do - local srcfl = fspec[i] - local destfl - - -- Find and replace extension for filenames. - local extb, exte = find(srcfl, "%.[^%.%\\%/]*$") - local basename, extension = srcfl, "" - if extb and extb > 1 then - basename = sub(srcfl, 1, extb - 1) - extension = sub(srcfl, extb, exte) - end - destfl = basename..suffix..extension - if #fspec == 1 and option.OUTPUT_FILE then - destfl = option.OUTPUT_FILE - end - if srcfl == destfl then - die("output filename identical to input filename") - end - - -- Perform requested operations. - if option.DUMP_LEXER then - dump_tokens(srcfl) - elseif option.DUMP_PARSER then - dump_parser(srcfl) - elseif option.READ_ONLY then - read_only(srcfl) - else - process_file(srcfl, destfl) - end - end--for -end - ---- The main function. -local function main() - local fspec = {} - local argn, i = #arg, 1 - if argn == 0 then - option.HELP = true - end - - -- Handle arguments. - while i <= argn do - local o, p = arg[i], arg[i + 1] - local dash = match(o, "^%-%-?") - if dash == "-" then -- single-dash options - if o == "-h" then - option.HELP = true; break - elseif o == "-v" then - option.VERSION = true; break - elseif o == "-s" then - if not p then die("-s option needs suffix specification") end - suffix = p - i = i + 1 - elseif o == "-o" then - if not p then die("-o option needs a file name") end - option.OUTPUT_FILE = p - i = i + 1 - elseif o == "-" then - break -- ignore rest of args - else - die("unrecognized option "..o) - end - elseif dash == "--" then -- double-dash options - if o == "--help" then - option.HELP = true; break - elseif o == "--version" then - option.VERSION = true; break - elseif o == "--keep" then - if not p then die("--keep option needs a string to match for") end - option.KEEP = p - i = i + 1 - elseif o == "--plugin" then - if not p then die("--plugin option needs a module name") end - if option.PLUGIN then die("only one plugin can be specified") end - option.PLUGIN = p - plugin = require(PLUGIN_SUFFIX..p) - i = i + 1 - elseif o == "--quiet" then - option.QUIET = true - elseif o == "--read-only" then - option.READ_ONLY = true - elseif o == "--basic" then - set_options(BASIC_CONFIG) - elseif o == "--maximum" then - set_options(MAXIMUM_CONFIG) - elseif o == "--none" then - set_options(NONE_CONFIG) - elseif o == "--dump-lexer" then - option.DUMP_LEXER = true - elseif o == "--dump-parser" then - option.DUMP_PARSER = true - elseif o == "--details" then - option.DETAILS = true - elseif OPTION[o] then -- lookup optimization options - set_options(o) - else - die("unrecognized option "..o) - end - else - fspec[#fspec + 1] = o -- potential filename - end - i = i + 1 - end--while - if option.HELP then - print(MSG_TITLE..MSG_USAGE); return true - elseif option.VERSION then - print(MSG_TITLE); return true - end - if option["opt-binequiv"] and not BIN_EQUIV_AVAIL then - die("--opt-binequiv is available only for PUC Lua 5.1!") - end - if #fspec > 0 then - if #fspec > 1 and option.OUTPUT_FILE then - die("with -o, only one source file can be specified") - end - do_files(fspec) - return true - else - die("nothing to do!") - end -end - --- entry point -> main() -> do_files() -if not main() then - die("Please run with option -h or --help for usage information") -end diff --git a/Utils/luarocks/luasrcdiet/0.3.0-2/doc/features-and-usage.adoc b/Utils/luarocks/luasrcdiet/0.3.0-2/doc/features-and-usage.adoc deleted file mode 100644 index 345d581b5..000000000 --- a/Utils/luarocks/luasrcdiet/0.3.0-2/doc/features-and-usage.adoc +++ /dev/null @@ -1,300 +0,0 @@ -= Features and Usage -Kein-Hong Man -2011-09-13 - - -== Features - -LuaSrcDiet features include the following: - -* Predefined default, _--basic_ (token-only) and _--maximum_ settings. -* Avoid deleting a block comment with a certain message with _--keep_; this is for copyright or license texts. -* Special handling for `#!` (shbang) lines and in functions, `self` implicit parameters. -* Dumping of raw information using _--dump-lexer_ and _--dump-parser_. - See the `samples` directory. -* A HTML plugin: outputs files that highlights globals and locals, useful for eliminating globals. See the `samples` directory. -* An SLOC plugin: counts significant lines of Lua code, like SLOCCount. -* Source and binary equivalence testing with _--opt-srcequiv_ and _--opt-binequiv_. - -List of optimizations: - - * Line endings are always normalized to LF, except those embedded in comments or strings. - * _--opt-comments_: Removal of comments and comment blocks. - * _--opt-whitespace_: Removal of whitespace, excluding end-of-line characters. - * _--opt-emptylines_: Removal of empty lines. - * _--opt-eols_: Removal of unnecessary end-of-line characters. - * _--opt-strings_: Rewrite strings and long strings. See the `samples` directory. - * _--opt-numbers_: Rewrite numbers. See the `samples` directory. - * _--opt-locals_: Rename local variable names. Does not rename field or method names. - * _--opt-entropy_: Tries to improve symbol entropy when renaming locals by calculating actual letter frequencies. - * _--opt-experimental_: Apply experimental optimizations. - -LuaSrcDiet tries to allow each option to be enabled or disabled separately, but they are not completely orthogonal. - -If comment removal is disabled, LuaSrcDiet only removes trailing whitespace. -Trailing whitespace is not removed in long strings, a warning is generated instead. -If empty line removal is disabled, LuaSrcDiet keeps all significant code on the same lines. -Thus, a user is able to debug using the original sources as a reference since the line numbering is unchanged. - -String optimization deals mainly with optimizing escape sequences, but delimiters can be switched between single quotes and double quotes if the source size of the string can be reduced. -For long strings and long comments, LuaSrcDiet also tries to reduce the `=` separators in the -delimiters if possible. -For number optimization, LuaSrcDiet saves space by trying to generate the shortest possible sequence, and in the process it does not produce “proper” scientific notation (e.g. 1.23e5) but does away with the decimal point (e.g. 123e3) instead. - -The local variable name optimizer uses a full parser of Lua 5.1 source code, thus it can rename all local variables, including upvalues and function parameters. -It should handle the implicit `self` parameter gracefully. -In addition, local variable names are either renamed into the shortest possible names following English frequent letter usage or are arranged by calculating entropy with the _--opt-entropy_ option. -Variable names are reused whenever possible, reducing the number of unique variable names. -For example, for `LuaSrcDiet.lua` (version 0.11.0), 683 local identifiers representing 88 unique names were optimized into 32 unique names, all which are one character in length, saving over 2600 bytes. - -If you need some kind of reassurance that your app will still work at reduced size, see the section on verification below. - - -== Usage - -LuaSrcDiet needs a Lua 5.1.x (preferably Lua 5.1.4) binary to run. -On Unix machines, one can use the following command line: - -[source, sh] -LuaSrcDiet myscript.lua -o myscript_.lua - -On Windows machines, the above command line can be used on Cygwin, or you can run Lua with the LuaSrcDiet script like this: - -[source, sh] -lua LuaSrcDiet.lua myscript.lua -o myscript_.lua - -When run without arguments, LuaSrcDiet prints a list of options. -Also, you can check the `Makefile` for some examples of command lines to use. -For example, for maximum code size reduction and maximum verbosity, use: - -[source, sh] -LuaSrcDiet --maximum --details myscript.lua -o myscript_.lua - - -=== Output Example - -A sample output of LuaSrcDiet 0.11.0 for processing `llex.lua` at _--maximum_ settings is as follows: - ----- -Statistics for: LuaSrcDiet.lua -> sample/LuaSrcDiet.lua - -*** local variable optimization summary *** ----------------------------------------------------------- -Variable Unique Decl. Token Size Average -Types Names Count Count Bytes Bytes ----------------------------------------------------------- -Global 10 0 19 95 5.00 ----------------------------------------------------------- -Local (in) 88 153 683 3340 4.89 -TOTAL (in) 98 153 702 3435 4.89 ----------------------------------------------------------- -Local (out) 32 153 683 683 1.00 -TOTAL (out) 42 153 702 778 1.11 ----------------------------------------------------------- - -*** lexer-based optimizations summary *** --------------------------------------------------------------------- -Lexical Input Input Input Output Output Output -Elements Count Bytes Average Count Bytes Average --------------------------------------------------------------------- -TK_KEYWORD 374 1531 4.09 374 1531 4.09 -TK_NAME 795 3963 4.98 795 1306 1.64 -TK_NUMBER 54 59 1.09 54 59 1.09 -TK_STRING 152 1725 11.35 152 1717 11.30 -TK_LSTRING 7 1976 282.29 7 1976 282.29 -TK_OP 997 1092 1.10 997 1092 1.10 -TK_EOS 1 0 0.00 1 0 0.00 --------------------------------------------------------------------- -TK_COMMENT 140 6884 49.17 1 18 18.00 -TK_LCOMMENT 7 1723 246.14 0 0 0.00 -TK_EOL 543 543 1.00 197 197 1.00 -TK_SPACE 1270 2465 1.94 263 263 1.00 --------------------------------------------------------------------- -Total Elements 4340 21961 5.06 2841 8159 2.87 --------------------------------------------------------------------- -Total Tokens 2380 10346 4.35 2380 7681 3.23 --------------------------------------------------------------------- ----- - -Overall, the file size is reduced by more than 9 kiB. -Tokens in the above report can be classified into “real” or actual tokens, and “fake” or whitespace tokens. -The number of “real” tokens remained the same. -Short comments and long comments were completely eliminated. -The number of line endings was reduced by 59, while all but 152 whitespace characters were optimized away. -So, token separators (whitespace, including line endings) now takes up just 10 % of the total file size. -No optimization of number tokens was possible, while 2 bytes were saved for string tokens. - -For local variable name optimization, the report shows that 38 unique local variable names were reduced to 20 unique names. -The number of identifier tokens should stay the same (there is currently no optimization option to optimize away non-essential or unused “real” tokens). -Since there can be at most 53 single-character identifiers, all local variables are now one character in length. -Over 600 bytes was saved. -_--details_ will give a longer report and much more information. - -A sample output of LuaSrcDiet 0.12.0 for processing the one-file `LuaSrcDiet.lua` program itself at _--maximum_ and _--opt-experimental_ settings is as follows: - ----- -*** local variable optimization summary *** ----------------------------------------------------------- -Variable Unique Decl. Token Size Average -Types Names Count Count Bytes Bytes ----------------------------------------------------------- -Global 27 0 51 280 5.49 ----------------------------------------------------------- -Local (in) 482 1063 4889 21466 4.39 -TOTAL (in) 509 1063 4940 21746 4.40 ----------------------------------------------------------- -Local (out) 55 1063 4889 4897 1.00 -TOTAL (out) 82 1063 4940 5177 1.05 ----------------------------------------------------------- - -*** BINEQUIV: binary chunks are sort of equivalent - -Statistics for: LuaSrcDiet.lua -> app_experimental.lua - -*** lexer-based optimizations summary *** --------------------------------------------------------------------- -Lexical Input Input Input Output Output Output -Elements Count Bytes Average Count Bytes Average --------------------------------------------------------------------- -TK_KEYWORD 3083 12247 3.97 3083 12247 3.97 -TK_NAME 5401 24121 4.47 5401 7552 1.40 -TK_NUMBER 467 494 1.06 467 494 1.06 -TK_STRING 787 7983 10.14 787 7974 10.13 -TK_LSTRING 14 3453 246.64 14 3453 246.64 -TK_OP 6381 6861 1.08 6171 6651 1.08 -TK_EOS 1 0 0.00 1 0 0.00 --------------------------------------------------------------------- -TK_COMMENT 1611 72339 44.90 1 18 18.00 -TK_LCOMMENT 18 4404 244.67 0 0 0.00 -TK_EOL 4419 4419 1.00 1778 1778 1.00 -TK_SPACE 10439 24475 2.34 2081 2081 1.00 --------------------------------------------------------------------- -Total Elements 32621 160796 4.93 19784 42248 2.14 --------------------------------------------------------------------- -Total Tokens 16134 55159 3.42 15924 38371 2.41 --------------------------------------------------------------------- -* WARNING: before and after lexer streams are NOT equivalent! ----- - -The command line was: - -[source, sh] -lua LuaSrcDiet.lua LuaSrcDiet.lua -o app_experimental.lua --maximum --opt-experimental --noopt-srcequiv - -The important thing to note is that while the binary chunks are equivalent, the source lexer streams are not equivalent. -Hence, the _--noopt-srcequiv_ makes LuaSrcDiet report a warning for failing the source equivalence test. - -`LuaSrcDiet.lua` was reduced from 157 kiB to about 41.3 kiB. -The _--opt-experimental_ option saves an extra 205 bytes over standard _--maximum_. -Note the reduction in `TK_OP` count due to a reduction in semicolons and parentheses. -`TK_SPACE` has actually increased a bit due to semicolons that are changed into single spaces; some of these spaces could not be removed. - -For more performance numbers, see the <> page. - - -== Verification - -Code size reduction can be quite a hairy thing (even I peer at the results in suspicion), so some kind of verification is desirable for users who expect processed files to _not_ blow up. -Since LuaSrcDiet has been talked about as a tool to reduce code size in projects such as WoW add-ons, `eLua` and `nspire`, adding a verification step will reduce risk for all users of LuaSrcDiet. - -LuaSrcDiet performs two kinds of equivalence testing as of version 0.12.0. -The two tests can be very, very loosely termed as _source equivalence testing_ and _binary equivalence testing_. -They are controlled by the _--opt-srcequiv_ and _--opt-binequiv_ options and are enabled by default. - -Testing behaviour can be summarized as follows: - -* Both tests are always executed. - The options control the resulting actions taken. -* Both options are normally enabled. - This will make any failing test to throw an error. -* When an option is disabled, LuaSrcDiet will at most print a warning. -* For passing results, see the following subsections that describe what the tests actually does. - -You only need to disable a testing option for experimental optimizations (see the following section for more information on this). -For anything up to and including _--maximum_, both tests should pass. -If any test fail under these conditions, then something has gone wrong with LuaSrcDiet, and I would be interested to know what has blown up. - - -=== _--opt-srcequiv_ Source Equivalence - -The source equivalence test uses LuaSrcDiet’s lexer to read and compare the _before_ and _after_ lexer token streams. -Numbers and strings are dumped as binary chunks using `loadstring()` and `string.dump()` and the results compared. - -If your file passes this test, it means that a Lua 5.1.x binary should see the exact same token streams for both _before_ and _after_ files. -That is, the parser in Lua will see the same lexer sequence coming from the source for both files and thus they _should_ be equivalent. -Touch wood. -Heh. - -However, if you are _cross-compiling_, it may be possible for this test to fail. -Experienced Lua developers can modify `equiv.lua` to handle such cases. - - -=== _--opt-binequiv_ Binary Equivalence - -The binary equivalence test uses `loadstring()` and `string.dump()` to generate binary chunks of the entire _before_ and _after_ files. -Also, any shbang (`#!`) lines are removed prior to generation of the binary chunks. - -The binary chunks are then run through a fake `undump` routine to verify the integrity of the binary chunks and to compare all parts that ought to be identical. - -On a per-function prototype basis (where _ignored_ means that any difference between the two binary chunks is ignored): - -* All debug information is ignored. -* The source name is ignored. -* Any line number data is ignored. - For example, `linedefined` and `lastlinedefined`. - -The rest of the two binary chunks must be identical. -So, while the two are not binary-exact, they can be loosely termed as “equivalent” and should run in exactly the same manner. -Sort of. -You get the idea. - -This test may also cause problems if you are _cross-compiling_. - - -== Experimental Stuff - -The _--opt-experimental_ option applies experimental optimizations that generally, makes changes to “real” tokens. -Such changes may or may not lead to the result failing binary chunk equivalence testing. -They would likely fail source lexer stream equivalence testing, so the _--noopt-srcequiv_ option needs to be applied so that LuaSrcDiet just gives a warning instead of an error. - -For sample files, see the `samples` directory. - -Currently implemented experimental optimizations are as follows: - - -=== Semicolon Operator Removal - -The semicolon (`;`) operator is an optional operator that is used to separate statements. -The optimization turns all of these operators into single spaces, which are then run through whitespace removal. -At worst, there will be no change to file size. - -* _Fails_ source lexer stream equivalence. -* _Passes_ binary chunk equivalence. - - -=== Function Call Syntax Sugar Optimization - -This optimization turns function calls that takes a single string or long string parameter into its syntax-sugar representation, which leaves out the parentheses. -Since strings can abut anything, each instance saves 2 bytes. - -For example, the following: - -[source, lua] -fish("cow")fish('cow')fish([[cow]]) - -is turned into: - -[source, lua] -fish"cow"fish'cow'fish[[cow]] - -* _Fails_ source lexer stream equivalence. -* _Passes_ binary chunk equivalence. - - -=== Other Experimental Optimizations - -There are two more of these optimizations planned, before focus is turned to the Lua 5.2.x series: - -* Simple `local` keyword removal. - Planned to work for a few kinds of patterns only. -* User directed name replacement, which will need user input to modify names or identifiers used in table keys and function methods or fields. diff --git a/Utils/luarocks/luasrcdiet/0.3.0-2/doc/performance-stats.adoc b/Utils/luarocks/luasrcdiet/0.3.0-2/doc/performance-stats.adoc deleted file mode 100644 index 3ee744e7d..000000000 --- a/Utils/luarocks/luasrcdiet/0.3.0-2/doc/performance-stats.adoc +++ /dev/null @@ -1,128 +0,0 @@ -= Performance Statistics -Kein-Hong Man -2011-09-13 - - -== Size Comparisons - -The following is the result of processing `llex.lua` from LuaSrcDiet 0.11.0 using various optimization options: - -|=== -| LuaSrcDiet Option | Size (bytes) - -| Original | 12,421 -| Empty lines only | 12,395 -| Whitespace only | 9,372 -| Local rename only | 11,794 -| _--basic_ setting | 3,835 -| Program default | 3,208 -| _--maximum_ setting | 3,130 -|=== - -The program’s default settings does not remove all unnecessary EOLs. -The _--basic_ setting is more conservative than the default settings, it disables optimization of strings and numbers and renaming of locals. - -For version 0.12.0, the following is the result of processing `LuaSrcDiet.lua` using various optimization options: - -|=== -| LuaSrcDiet Option | Size (bytes) - -| Original | 160,796 -| _--basic_ setting | 60,219 -| Program default | 43,650 -| _--maximum_ setting | 42,453 -| max + experimental | 42,248 -|=== - -The above best size can go a lot lower with simple `local` keyword removal and user directed name replacement, which will be the subject of the next release of LuaSrcDiet. - - -== Compression and luac - -File sizes of LuaSrcDiet 0.11.0 main files in various forms: - -[cols="m,5*d", options="header,footer"] -|=== -| Source File | Original Size (bytes) | `luac` normal (bytes) | `luac` stripped (bytes) | LuaSrcDiet _--basic_ (bytes) | LuaSrcDiet _--maximum_ (bytes) - -| LuaSrcDiet.lua | 21,961 | 20,952 | 11,000 | 11,005 | 8,159 -| llex.lua | 12,421 | 8,613 | 4,247 | 3,835 | 3,130 -| lparser.lua | 41,757 | 27,215 | 12,506 | 11,755 | 7,666 -| optlex.lua | 31,009 | 16,992 | 8,021 | 9,129 | 6,858 -| optparser.lua | 16,511 | 9,021 | 3,520 | 5,087 | 2,999 - -| Total | 123,659 | 82,793 | 39,294 | 40,811 | 28,812 -|=== - -* “LuaSrcDiet --maximum” has the smallest total file size. -* The ratio of “Original Size” to “LuaSrcDiet --maximum” is *4.3*. -* The ratio of “Original Size” to “luac stripped” is *3.1*. -* The ratio of “luac stripped” to “LuaSrcDiet --maximum” is *1.4*. - -Compressibility of LuaSrcDiet 0.11.0 main files in various forms: - -|=== -| Compression Method | Original Size | `luac` normal | `luac` stripped | LuaSrcDiet _--basic_ | LuaSrcDiet _--maximum_ - -| Uncompressed originals | 123,659 | 82,793 | 39,294 | 40,811 | 28,812 -| gzip -9 | 28,288 | 29,210 | 17,732 | 12,041 | 10,451 -| bzip2 -9 | 24,407 | 27,232 | 16,856 | 11,480 | 9,815 -| lzma (7-zip max) | 25,530 | 23,908 | 15,741 | 11,241 | 9,685 -|=== - -* “LuaSrcDiet --maximum” has the smallest total file size (but a binary chunk loads faster and works with a smaller Lua executable). -* The ratio of “Original size” to “Original size + bzip2” is *5.1*. -* The ratio of “Original size” to “LuaSrcDiet --maximum + bzip2” is *12.6*. -* The ratio of “LuaSrcDiet --maximum” to “LuaSrcDiet --maximum + bzip2” is *2.9*. -* The ratio of “Original size” to “luac stripped + bzip2” is *7.3*. -* The ratio of “luac stripped” to “luac stripped + bzip2” is *2.3*. -* The ratio of “luac stripped + bzip2” to “LuaSrcDiet --maximum + bzip2” is *1.7*. - -So, squeezed source code are smaller than stripped binary chunks and compresses better than stripped binary chunks, at a ratio of 2.9 for squeezed source code versus 2.3 for stripped binary chunks. -Compressed binary chunks is still a very efficient way of storing Lua scripts, because using only binary chunks allow for the parts of Lua needed to compile from sources to be omitted (`llex.o`, `lparser.o`, `lcode.o`, `ldump.o`), saving over 24KB in the process. - -Note that LuaSrcDiet _does not_ answer the question of whether embedding source code is better or embedding binary chunks is better. -It is simply a utility for producing smaller source code files and an exercise in processing Lua source code using a Lua-based lexer and parser skeleton. - - -== Compile Speed - -The following is a primitive attempt to analyze in-memory Lua script loading performance (using the `loadstring` function in Lua). - -The LuaSrcDiet 0.11.0 files (original, squeezed with _--maximum_ and stripped binary chunks versions) are loaded into memory first before a loop runs to repeatedly load the script files for 10 seconds. -A null loop is also performed (processing empty strings) and the time taken per null iteration is subtracted as a form of null adjustment. -Then, various performance parameters are calculated. -Note that `LuaSrcDiet.lua` was slightly modified (`#!` line removed) to let the `loadstring` function run. -The results below were obtained with a Lua 5.1.3 executable compiled using `make generic` on Cygwin/Windows XP SP2 on a Sempron 3000+ (1.8GHz). -The LuaSrcDiet 0.11.0 source files have 11,180 “real” tokens in total. - -[cols=" dump_llex.dat - - -== Lexer Optimizations - -We aim to keep lexer-based optimizations free of parser considerations, i.e. we allow for generalized optimization of token sequences. -The table below considers the requirements for all combinations of significant tokens (except `TK_EOS`). -Other tokens are whitespace-like. -Comments can be considered to be a special kind of whitespace, e.g. a short comment needs to have a following EOL token, if we do not want to optimize away short comments. - -[cols="h,6*m", options="header"] -|=== -| _1st \ 2nd Token_ | Keyword | Name | Number | String | LString | Oper - -| Keyword | [S] | [S] | [S] | – | – | – -| Name | [S] | [S] | [S] | – | – | – -| Number | [S] | [S] | [S] | – | – | [1] -| String | – | – | – | – | – | – -| LString | – | – | – | – | – | – -| Oper | – | – | [1] | – | – | [2] -|=== - -A dash (`-`) in the above means that the first token can abut the second token. - -`*[S]*`:: Need at least one whitespace, set as either a space or kept as an EOL. - -`*[1]*`:: - Need a space if operator is a `.`, all others okay. - A `+` or `-` is used as part of a floating-point spec, but there does not appear to be any way of creating a float by joining with number with a `+` or `-` plus another number. - Since an `e` has to be somewhere in the first token, this can’t be done. - -`*[2]*`:: - Normally there cannot be consecutive operators, but we plan to allow for generalized optimization of token sequences, i.e. even sequences that are grammatically illegal; so disallow adjacent operators if: - * the first is in `[=<>]` and the second is `=` - * disallow dot sequences to be adjacent, but `...` first okay - * disallow `[` followed by `=` or `[` (not optimal) - -Also, a minus `-` cannot preceed a Comment or LComment, because comments start with a `--` prefix. -Apart from that, all Comment or LComment tokens can be set abut with a real token. - - -== Local Variable Renaming - -The following discusses the problem of local variable optimization, specifically _local variable renaming_ in order to reduce source code size. - - -=== TK_NAME Token Considerations - -A `TK_NAME` token means a number of things, and some of these cannot be renamed without analyzing the source code. -We are interested in the use of `TK_NAME` in the following: - -[loweralpha] -. global variable access, -. local variable declaration, including `local` statements, `local` functions, function parameters, implicit `self` locals, -. local variable access, including upvalue access. - -`TK_NAME` is also used in parts of the grammar as constant strings – these tokens cannot be optimized without user assistance. -These include usage as: - -[loweralpha, start=4] -. keys in `key=value` pairs in table construction, -. field or method names in `a:b` or `a.b` syntax forms. - -For the local variable name optimization scheme used, we do not consider (d) and (e), and while global variables cannot be renamed without some kind of user assistance, they need to be considered or tracked as part of Lua’s variable access scheme. - - -=== Lifetime of a Local Variable - -Consider the following example: - -[source, lua] -local string, table = string, table - -In the example, the two locals are assigned the values of the globals with the same names. -When Lua encounters the declaration portion: - -[source, lua] -local string, table - -the parser cannot immediately make the two local variable available to following code. -In the parser and code generator, locals are inactive when entries are created. -They are activated only when the function `adjustlocalvars()` is called to activate the appropriate local variables. - -NOTE: The terminology used here may not be identical to the ones used in the Dragon Book – they merely follow the LuaSrcDiet code as it was written before I have read the Dragon Book. - -In the example, the two local variables are activated only after the whole statement has been parsed, that is, after the last `table` token. -Hence, the statement works as expected. -Also, once the two local variables goes out of scope, `removevars()` is called to deactivate them, allowing other variables of the same name to become visible again. - -Another example worth mentioning is: - -[source, lua] -local a, a, a, = 1, 2, 3 - -The above will assign 3 to `a`. - -Thus, when optimizing local variable names, (1) we need to consider accesses of global variable names affecting the namespace, (2) for the local variable names themselves, we need to consider when they are declared, activated and removed, and (3) within the “live” time of locals, we need to know when they are accessed (since locals that are never accessed don’t really matter.) - - -=== Local Variable Tracking - -Every local variable declaration is considered an object to be renamed. - -From the parser, we have the original name of the local variable, the token positions for declaration, activation and removal, and the token position for all the `TK_NAME` tokens which references this local. -All instances of the implicit `self` local variable are also flagged as such. - -In addition to local variable information, all global variable accesses are tabled, one object entry for one name, and each object has a corresponding list of token positions for the `TK_NAME` tokens, which is where the global variables were accessed. - -The key criteria is: *Our act of renaming cannot change the visibility of any of these locals and globals at the time they are accessed*. -However, _their scope of visibility may be changed during which they are not accessed_, so someone who tries to insert a variable reference somewhere into a program that has its locals renamed may find that it now refers to a different variable. - -Of course, if every variable has a unique name, then there is no need for a name allocation algorithm, as there will be no conflict. -But, in order to maximize utilization of short identifier names to reduce the final code size, we want to reuse the names as much as possible. -In addition, fewer names will likely reduce symbol entropy and may slightly improve compressibility of the source code. -LuaSrcDiet avoids the use of non-ASCII letters, so there are only 53 single-character variable names. - - -=== Name Allocation Theory - -To understand the renaming algorithm, first we need to establish how different local and global variables can operate happily without interfering with each other. - -Consider three objects, local object A, local object B and global object G. -A and B involve declaration, activation and removal, and within the period it is active, there may be zero or more accesses of the local. -For G, there are only global variable accesses to look into. - -Assume that we have assigned a new name to A and we wish to consider its effects on other locals and globals, for which we choose B and G as examples. -We assume local B has not been assigned a new name as we expect our algorithm to take care of collisions. - -A’s lifetime is something like this: - ----- - Decl Act Rem - + +-------------------------------+ - ------------------------------------------------- ----- - -where “Decl” is the time of declaration, “Act” is the time of activation, and “Rem” is the time of removal. -Between “Act” and “Rem”, the local is alive or “live” and Lua can see it if its corresponding `TK_NAME` identifier comes up. - ----- - Decl Act Rem - + +-------------------------------+ - ------------------------------------------------- - * * * * - (1) (2) (3) (4) ----- - -Recall that the key criteria is to not change the visibility of globals and locals during when they are accessed. -Consider local and global accesses at (1), (2), (3) and (4). - -A global G of the same name as A will only collide at (3), where Lua will see A and not G. -Since G must be accessed at (3) according to what the parser says, and we cannot modify the positions of “Decl”, “Act” and “Rem”, it follows that A cannot have the same name as G. - ----- - Decl Act Rem - + +-----------------------+ - --------------------------------- - (1)+ +---+ (2)+ +---+ (3)+ +---+ (4)+ +---+ - --------- --------- --------- --------- ----- - -For the case of A and B having the same names and colliding, consider the cases for which B is at (1), (2), (3) or (4) in the above. - -(1) and (4) means that A and B are completely isolated from each other, hence in the two cases, A and B can safely use the same variable names. -To be specific, since we have assigned A, B is considered completely isolated from A if B’s activation-to-removal period is isolated from the time of A’s first access to last access, meaning B’s active time will never affect any of A’s accesses. - -For (2) and (3), we have two cases where we need to consider which one has been activated first. -For (2), B is active before A, so A cannot impose on B. -But A’s accesses are valid while B is active, since A can override B. -For no collision in the case of (2), we simply need to ensure that the last access of B occurs before A is activated. - -For (3), B is activated before A, hence B can override A’s accesses. -For no collision, all of A’s accesses cannot happen while B is active. -Thus position (3) follows the “A is never accessed when B is active” rule in a general way. -Local variables of a child function are in the position of (3). -To illustrate, the local B can use the same name as local A and live in a child function or block scope if each time A is accessed, Lua sees A and not B. -So we have to check all accesses of A and see whether they collide with the active period of B. -If A is not accessed during that period, then B can be active with the same name. - -The above appears to resolve all sorts of cases where the active times of A and B overlap. -Note that in the above, the allocator does not need to know how locals are separated according to function prototypes. -Perhaps the allocator can be simplified if knowledge of function structure is utilized. -This scheme was implemented in a hurry in 2008 — it could probably be simpler if Lua grammar is considered, but LuaSrcDiet mainly processes various index values in tables. - - -=== Name Allocation Algorithm - -To begin with, the name generator is mostly separate from the name allocation algorithm. -The name generator returns the next shortest name for the algorithm to apply to local variables. -To attempt to reduce symbol entropy (which benefit compression algorithms), the name generator follows English frequent letter usage. -There is also an option to calculate an actual symbol entropy table from the input data. - -Since there are 53 one-character identifiers and (53 * 63 - 4) two-character identifiers (minus a few keywords), there isn’t a pressing need to optimally maximize name reuse. -The single-file version of LuaSrcDiet 0.12.0, at just over 3000 SLOC and 156 kiB in size, currently allocates around 55 unique local variable names. - -In theory, we should need no more than 260 local identifiers by default. -Why? -Since `LUAI_MAXVARS` is 200 and `LUAI_MAXUPVALUES` is 60, at any block scope, there can be at most `(LUAI_MAXVARS + LUAI_MAXUPVALUES)` locals referenced, or 260. -Also, those from outer scopes not referenced in inner scopes can reuse identifiers. -The net effect of this is that a local variable name allocation method should not allocate more than 260 identifier names for locals. - -The current algorithm is a simple first-come first-served scheme: - -[loweralpha] -. One local object that use the most tokens is named first. -. Any other non-conflicting locals with respect to the first object are assigned the same name. -. Assigned locals are removed from consideration and the procedure is repeated for objects that have not been assigned new names. -. Steps (a) to (c) repeats until no local objects are left. - -In addition, there are a few extra issues to take care of: - -[loweralpha, start=5] -. Implicit `self` locals that have been flagged as such are already “assigned to” and so they are left unmodified. -. The name generator skips `self` to avoid conflicts. - This is not optimal but it is unlikely a script will use so many local variables as to reach `self`. -. Keywords are also skipped for the name generator. -. Global name conflict resolution. - -For (h), global name conflict resolution is handled just after the new name is generated. -The name can still be used for some locals even if it conflicts with other locals. -To remove conflicts, global variable accesses for the particular identifier name is checked. -Any local variables that are active when a global access is made is marked to be skipped. -The rest of the local objects can then use that name. - -The algorithm has additional code for handling locals that use the same name in the same scope. -This extends the basic algorithm that was discussed earlier. -For example: - -[source, lua] ----- -local foo = 10 -- <1> -... -local foo = 20 -- <2> -... -print(e) ----- - -Since we are considering name visibility, the first `foo` does not really cease to exist when the second `foo` is declared, because if we were to make that assumption, and the first `foo` is removed before (2), then I should be able to use `e` as the name for the first `foo` and after (2), it should not conflict with variables in the outer scope with the same name. -To illustrate: - -[source, lua] ----- -local e = 10 -- 'foo' renamed to 'e' -... -local t = 20 -- error if we assumed 'e' removed here -... -print(e) ----- - -Since `e` is a global in the example, we now have an error as the name as been taken over by a local. -Thus, the first `foo` local must have its active time extend to the end of the current scope. -If there is no conflict between the first and second `foo`, the algorithm may still assign the same names to them. - -The current fix to deal with the above chains local objects in order to find the removal position. -It may be possible to handle this in a clean manner – LuaSrcDiet handles it as a fix to the basic algorithm. - - -== Ideas - -The following is a list of optimization ideas that do not require heavy-duty source code parsing and comprehension. - - -=== Lexer-Based Optimization Ideas - -* Convert long strings to normal strings, vice versa. + - _A little desperate for a few bytes, can be done, but not real keen on implementing it._ - -* Special number forms to take advantage of constant number folding. + - _For example, 65536 can be represented using 2^16^, and so on. - An expression must be evaluated in the same way, otherwise this seems unsafe._ - -* Warn if a number has too many digits. + - _Should we warn or “test and truncate”? - Not really an optimization that will see much use._ - -* Warn of opportunity for using a `local` to zap a bunch of globals. + - _Current recommendation is to use the HTML plugin to display globals in red. - The developer can then visually analyze the source code and make the appropriate fixes. - I think this is better than having the program guess the intentions of the developer._ - -* Spaces to tabs in comments, long comments, or long strings. + - _For long strings, need to know user’s intention. - Would rather not implement._ - - -=== Parser-Based Optimization Ideas - -Heavy-duty optimizations will need more data to be generated by the parser. -A full AST may eventually be needed. -The most attractive idea that can be quickly implemented with a significant code size “win” is to reduce the number of `local` keywords. - -* Remove unused ``local``s that can be removed in the source. + - _Need to consider unused ``local``s in multiple assignments._ - -* Simplify declaration of ``local``s that can be merged. + -_From:_ -+ -[source, lua] ----- --- separate locals -local foo -local bar --- separate locals with assignments -local foo = 123 -local bar = "pqr" ----- -+ -_To:_ -+ -[source, lua] ----- --- merged locals -local foo,bar --- merged locals with assignments -local foo,bar=123,"pqr" ----- - -* Simplify declarations using `nil`. + -_From:_ -[source, lua] -local foo, bar = nil, nil -+ -_To:_ -[source, lua] -local foo,bar - -* Simplify ``return``s using `nil`. + - _How desirable is this? From Lua list discussions, it seems to be potentially unsafe unless all return locations are known and checked._ - -* Removal of optional semicolons in statements and removal of commas or semicolons in table constructors. + - _Yeah, this might save a few bytes._ - -* Remove table constructor elements using `nil`. + - _Not sure if this is safe to do._ - -* Simplify logical or relational operator expressions. + - _This is more suitable for an optimizing compiler project._ diff --git a/Utils/luarocks/luasrcdiet/0.3.0-2/luasrcdiet-0.3.0-2.rockspec b/Utils/luarocks/luasrcdiet/0.3.0-2/luasrcdiet-0.3.0-2.rockspec deleted file mode 100644 index eb77bef49..000000000 --- a/Utils/luarocks/luasrcdiet/0.3.0-2/luasrcdiet-0.3.0-2.rockspec +++ /dev/null @@ -1,41 +0,0 @@ --- vim: set ft=lua: - -package = 'LuaSrcDiet' -version = '0.3.0-2' - - source = { url = 'https://github.com/jirutka/luasrcdiet/archive/v0.3.0/luasrcdiet-0.3.0.tar.gz', md5 = 'c0ff36ef66cd0568c96bc54e9253a8fa' } - -description = { - summary = 'Compresses Lua source code by removing unnecessary characters', - detailed = [[ -This is revival of LuaSrcDiet originally written by Kein-Hong Man.]], - homepage = 'https://github.com/jirutka/luasrcdiet', - maintainer = 'Jakub Jirutka ', - license = 'MIT', -} - -dependencies = { - 'lua >= 5.1', -} - -build = { - type = 'builtin', - modules = { - ['luasrcdiet'] = 'luasrcdiet/init.lua', - ['luasrcdiet.equiv'] = 'luasrcdiet/equiv.lua', - ['luasrcdiet.fs'] = 'luasrcdiet/fs.lua', - ['luasrcdiet.llex'] = 'luasrcdiet/llex.lua', - ['luasrcdiet.lparser'] = 'luasrcdiet/lparser.lua', - ['luasrcdiet.optlex'] = 'luasrcdiet/optlex.lua', - ['luasrcdiet.optparser'] = 'luasrcdiet/optparser.lua', - ['luasrcdiet.plugin.example'] = 'luasrcdiet/plugin/example.lua', - ['luasrcdiet.plugin.html'] = 'luasrcdiet/plugin/html.lua', - ['luasrcdiet.plugin.sloc'] = 'luasrcdiet/plugin/sloc.lua', - ['luasrcdiet.utils'] = 'luasrcdiet/utils.lua', - }, - install = { - bin = { - luasrcdiet = 'bin/luasrcdiet', - } - } -} diff --git a/Utils/luarocks/luasrcdiet/0.3.0-2/rock_manifest b/Utils/luarocks/luasrcdiet/0.3.0-2/rock_manifest deleted file mode 100644 index 2e7628412..000000000 --- a/Utils/luarocks/luasrcdiet/0.3.0-2/rock_manifest +++ /dev/null @@ -1,28 +0,0 @@ -rock_manifest = { - bin = { - luasrcdiet = "6c318685d57f827cf5baf7037a5d6072" - }, - doc = { - ["features-and-usage.adoc"] = "157587c27a0c340d9d1dd06af9b339b5", - ["performance-stats.adoc"] = "cf5f96a86e021a3a584089fafcabd056", - ["tech-notes.adoc"] = "075bc34e667a0055e659e656baa2365a" - }, - lua = { - luasrcdiet = { - ["equiv.lua"] = "967a6b17573d229e326dbb740ad7fe8c", - ["fs.lua"] = "53db7dfc50d026b683fad68ed70ead0f", - ["init.lua"] = "c6f368e6cf311f3257067fed0fbcd06a", - ["llex.lua"] = "ede897af261fc362a82d87fbad91ea2b", - ["lparser.lua"] = "c1e1f04d412b79a040fd1c2b74112953", - ["optlex.lua"] = "7c986da991a338494c36770b4a30fa9f", - ["optparser.lua"] = "b125a271ac1c691dec68b63019b1b5da", - plugin = { - ["example.lua"] = "86b5c1e9dc7959db6b221d6d5a0db3d1", - ["html.lua"] = "c0d3336a133f0c8663f395ee98d54f6a", - ["sloc.lua"] = "fb1a91b18b701ab83f21c87733be470a" - }, - ["utils.lua"] = "bd6c1e85c6a9bf3383d336a4797fb292" - } - }, - ["luasrcdiet-0.3.0-2.rockspec"] = "da70047e1b0cbdc1ff08d060327fa110" -} diff --git a/Utils/luarocks/msvcm80.dll b/Utils/luarocks/msvcm80.dll deleted file mode 100644 index c751385bd..000000000 Binary files a/Utils/luarocks/msvcm80.dll and /dev/null differ diff --git a/Utils/luarocks/msvcp80.dll b/Utils/luarocks/msvcp80.dll deleted file mode 100644 index f0b52ebf1..000000000 Binary files a/Utils/luarocks/msvcp80.dll and /dev/null differ diff --git a/Utils/luarocks/msvcr80.dll b/Utils/luarocks/msvcr80.dll deleted file mode 100644 index 53c005efc..000000000 Binary files a/Utils/luarocks/msvcr80.dll and /dev/null differ diff --git a/Utils/luarocks/rclauncher.c b/Utils/luarocks/rclauncher.c deleted file mode 100644 index 77459f464..000000000 --- a/Utils/luarocks/rclauncher.c +++ /dev/null @@ -1,139 +0,0 @@ - -/* -** Simple Lua interpreter. -** This program is used to run a Lua file embedded as a resource. -** It creates a Lua state, opens all its standard libraries, and run -** the Lua file in a protected environment just to redirect the error -** messages to stdout and stderr. -** -** $Id: rclauncher.c,v 1.1 2008/06/30 14:29:59 carregal Exp $ -*/ - -#include -#include - -#include "lua.h" -#include "lauxlib.h" -#include "lualib.h" -#include -#include -#include - -/* -** Report error message. -** Assumes that the error message is on top of the stack. -*/ -static int report (lua_State *L) { - fprintf (stderr, "lua: fatal error: `%s'\n", lua_tostring (L, -1)); - fflush (stderr); - printf ("Content-type: text/plain\n\nConfiguration fatal error: see error log!\n"); - printf ("%s", lua_tostring(L, -1)); - return 1; -} - -static int runlua (lua_State *L, const char *lua_string, int argc, char *argv[]) { - int err_func; - int err; - - lua_getglobal(L, "debug"); - lua_pushliteral(L, "traceback"); - lua_gettable(L, -2); - err_func = lua_gettop (L); - err = luaL_loadstring (L, lua_string); - if(!err) { - int i; - // fill global arg table - lua_getglobal(L, "arg"); - for(i = 1; i < argc; i++) - { - lua_pushstring(L, argv[i]); - lua_rawseti(L, -2, i); - } - lua_pop(L, 1); - // fill parameters (in vararg '...') - for(i = 1; i < argc; i++) - lua_pushstring(L, argv[i]); - return lua_pcall (L, argc - 1, LUA_MULTRET, err_func); - } else return err; -} - -static DWORD GetModulePath( HINSTANCE hInst, LPTSTR pszBuffer, DWORD dwSize ) -// -// Return the size of the path in bytes. -{ - DWORD dwLength = GetModuleFileName( hInst, pszBuffer, dwSize ); - if( dwLength ) - { - while( dwLength && pszBuffer[ dwLength ] != '.' ) - { - dwLength--; - } - - if( dwLength ) - pszBuffer[ dwLength ] = '\000'; - } - return dwLength; -} - - -/* -** MAIN -*/ -int main (int argc, char *argv[]) { - char name[ MAX_PATH ]; - DWORD dwLength; - int size; - luaL_Buffer b; - int i; -#ifdef UNICODE - TCHAR lua_wstring[4098]; -#endif - char lua_string[4098]; - lua_State *L = luaL_newstate(); - (void)argc; /* avoid "unused parameter" warning */ - luaL_openlibs(L); - lua_newtable(L); // create arg table - lua_pushstring(L, argv[0]); // add interpreter to arg table - lua_rawseti(L, -2, -1); - dwLength = GetModulePath( NULL, name, MAX_PATH ); - if(dwLength) { /* Optional bootstrap */ - strcat(name, ".lua"); - lua_pushstring(L, name); // add lua script to arg table - lua_rawseti(L, -2, 0); - lua_setglobal(L,"arg"); // set global arg table - if(!luaL_loadfile (L, name)) { - if(lua_pcall (L, 0, LUA_MULTRET, 0)) { - report (L); - lua_close (L); - return EXIT_FAILURE; - } - } - } - else - { - lua_pushstring(L, argv[0]); // no lua script, so add interpreter again, now as lua script - lua_rawseti(L, -2, 0); - lua_setglobal(L,"arg"); // set global arg table - } - - luaL_buffinit(L, &b); - for(i = 1; ; i++) { -#ifdef UNICODE - size = LoadString(GetModuleHandle(NULL), i, lua_wstring, - sizeof(lua_string)/sizeof(TCHAR)); - if(size > 0) wcstombs(lua_string, lua_wstring, size + 1); -#else - size = LoadString(GetModuleHandle(NULL), i, lua_string, - sizeof(lua_string)/sizeof(char)); -#endif - if(size) luaL_addlstring(&b, lua_string, size); else break; - } - luaL_pushresult(&b); - if (runlua (L, lua_tostring(L, -1), argc, argv)) { - report (L); - lua_close (L); - return EXIT_FAILURE; - } - lua_close (L); - return EXIT_SUCCESS; -} diff --git a/Utils/luarocks/share/lua/5.1/defaultcss.lua b/Utils/luarocks/share/lua/5.1/defaultcss.lua deleted file mode 100644 index 2c2b331cc..000000000 --- a/Utils/luarocks/share/lua/5.1/defaultcss.lua +++ /dev/null @@ -1,270 +0,0 @@ -return [[html { - color: #000; - background: #FFF; -} -body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td { - margin: 0; - padding: 0; -} -table { - border-collapse: collapse; - border-spacing: 0; -} -fieldset,img { - border: 0; -} -address,caption,cite,code,dfn,em,strong,th,var,optgroup { - font-style: inherit; - font-weight: inherit; -} -del,ins { - text-decoration: none; -} -li { - list-style: bullet; - margin-left: 20px; -} -caption,th { - text-align: left; -} -h1,h2,h3,h4,h5,h6 { - font-size: 100%; - font-weight: bold; -} -q:before,q:after { - content: ''; -} -abbr,acronym { - border: 0; - font-variant: normal; -} -sup { - vertical-align: baseline; -} -sub { - vertical-align: baseline; -} -legend { - color: #000; -} -input,button,textarea,select,optgroup,option { - font-family: inherit; - font-size: inherit; - font-style: inherit; - font-weight: inherit; -} -input,button,textarea,select {*font-size:100%; -} -/* END RESET */ - -body { - margin-left: 1em; - margin-right: 1em; - font-family: arial, helvetica, geneva, sans-serif; - background-color: #ffffff; margin: 0px; -} - -code, tt { font-family: monospace; } - -body, p, td, th { font-size: .95em; line-height: 1.2em;} - -p, ul { margin: 10px 0 0 10px;} - -strong { font-weight: bold;} - -em { font-style: italic;} - -h1 { - font-size: 1.5em; - margin: 25px 0 20px 0; -} -h2, h3, h4 { margin: 15px 0 10px 0; } -h2 { font-size: 1.25em; } -h3 { font-size: 1.15em; } -h4 { font-size: 1.06em; } - -a:link { font-weight: bold; color: #004080; text-decoration: none; } -a:visited { font-weight: bold; color: #006699; text-decoration: none; } -a:link:hover { text-decoration: underline; } - -hr { - color:#cccccc; - background: #00007f; - height: 1px; -} - -blockquote { margin-left: 3em; } - -ul { list-style-type: disc; } - -p.name { - font-family: "Andale Mono", monospace; - padding-top: 1em; -} - -p:first-child { - margin-top: 0px; -} - -pre.example { - background-color: rgb(245, 245, 245); - border: 1px solid silver; - padding: 10px; - margin: 10px 0 10px 0; - font-family: "Andale Mono", monospace; - font-size: .85em; -} - -pre { - background-color: rgb(245, 245, 245); - border: 1px solid silver; - padding: 10px; - margin: 10px 0 10px 0; - font-family: "Andale Mono", monospace; -} - - -table.index { border: 1px #00007f; } -table.index td { text-align: left; vertical-align: top; } - -#container { - margin-left: 1em; - margin-right: 1em; - background-color: #f0f0f0; -} - -#product { - text-align: center; - border-bottom: 1px solid #cccccc; - background-color: #ffffff; -} - -#product big { - font-size: 2em; -} - -#main { - background-color: #f0f0f0; - border-left: 2px solid #cccccc; -} - -#navigation { - float: left; - width: 18em; - vertical-align: top; - background-color: #f0f0f0; - overflow: scroll; - position: fixed; - height:100%; -} - -#navigation h2 { - background-color:#e7e7e7; - font-size:1.1em; - color:#000000; - text-align: left; - padding:0.2em; - border-top:1px solid #dddddd; - border-bottom:1px solid #dddddd; -} - -#navigation ul -{ - font-size:1em; - list-style-type: none; - margin: 1px 1px 10px 1px; -} - -#navigation li { - text-indent: -1em; - display: block; - margin: 3px 0px 0px 22px; -} - -#navigation li li a { - margin: 0px 3px 0px -1em; -} - -#content { - margin-left: 18em; - padding: 1em; - border-left: 2px solid #cccccc; - border-right: 2px solid #cccccc; - background-color: #ffffff; -} - -#about { - clear: both; - padding: 5px; - border-top: 2px solid #cccccc; - background-color: #ffffff; -} - -@media print { - body { - font: 12pt "Times New Roman", "TimeNR", Times, serif; - } - a { font-weight: bold; color: #004080; text-decoration: underline; } - - #main { - background-color: #ffffff; - border-left: 0px; - } - - #container { - margin-left: 2%; - margin-right: 2%; - background-color: #ffffff; - } - - #content { - padding: 1em; - background-color: #ffffff; - } - - #navigation { - display: none; - } - pre.example { - font-family: "Andale Mono", monospace; - font-size: 10pt; - page-break-inside: avoid; - } -} - -table.module_list { - border-width: 1px; - border-style: solid; - border-color: #cccccc; - border-collapse: collapse; -} -table.module_list td { - border-width: 1px; - padding: 3px; - border-style: solid; - border-color: #cccccc; -} -table.module_list td.name { background-color: #f0f0f0; } -table.module_list td.summary { width: 100%; } - - -table.function_list { - border-width: 1px; - border-style: solid; - border-color: #cccccc; - border-collapse: collapse; -} -table.function_list td { - border-width: 1px; - padding: 3px; - border-style: solid; - border-color: #cccccc; -} -table.function_list td.name { background-color: #f0f0f0; } -table.function_list td.summary { width: 100%; } - -dl.table dt, dl.function dt {border-top: 1px solid #ccc; padding-top: 1em;} -dl.table dd, dl.function dd {padding-bottom: 1em; margin: 10px 0 0 20px;} -dl.table h3, dl.function h3 {font-size: .95em;} - -]] diff --git a/Utils/luarocks/share/lua/5.1/docgenerator.lua b/Utils/luarocks/share/lua/5.1/docgenerator.lua deleted file mode 100644 index 2a4d88812..000000000 --- a/Utils/luarocks/share/lua/5.1/docgenerator.lua +++ /dev/null @@ -1,87 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- - --- --- Load documentation generator and update its path --- -local templateengine = require 'templateengine' -for name, def in pairs( require 'template.utils' ) do - templateengine.env [ name ] = def -end - --- Load documentation extractor and set handled languages -local lddextractor = require 'lddextractor' - -local M = {} -M.defaultsitemainpagename = 'index' - -function M.generatedocforfiles(filenames, cssname,noheuristic) - if not filenames then return nil, 'No files provided.' end - -- - -- Generate API model elements for all files - -- - local generatedfiles = {} - local wrongfiles = {} - for _, filename in pairs( filenames ) do - -- Load file content - local file, error = io.open(filename, 'r') - if not file then return nil, 'Unable to read "'..filename..'"\n'..err end - local code = file:read('*all') - file:close() - -- Get module for current file - local apimodule, err = lddextractor.generateapimodule(filename, code,noheuristic) - - -- Handle modules with module name - if apimodule and apimodule.name then - generatedfiles[ apimodule.name ] = apimodule - elseif not apimodule then - -- Track faulty files - table.insert(wrongfiles, 'Unable to extract comments from "'..filename..'".\n'..err) - elseif not apimodule.name then - -- Do not generate documentation for unnamed modules - table.insert(wrongfiles, 'Unable to create documentation for "'..filename..'", no module name provided.') - end - end - -- - -- Defining index, which will summarize all modules - -- - local index = { - modules = generatedfiles, - name = M.defaultsitemainpagename, - tag='index' - } - generatedfiles[ M.defaultsitemainpagename ] = index - - -- - -- Define page cursor - -- - local page = { - currentmodule = nil, - headers = { [[]] }, - modules = generatedfiles, - tag = 'page' - } - - -- - -- Iterate over modules, generating complete doc pages - -- - for _, module in pairs( generatedfiles ) do - -- Update current cursor page - page.currentmodule = module - -- Generate page - local content, error = templateengine.applytemplate(page) - if not content then return nil, error end - module.body = content - end - return generatedfiles, wrongfiles -end -return M diff --git a/Utils/luarocks/share/lua/5.1/extractors.lua b/Utils/luarocks/share/lua/5.1/extractors.lua deleted file mode 100644 index aa5235ea9..000000000 --- a/Utils/luarocks/share/lua/5.1/extractors.lua +++ /dev/null @@ -1,102 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -local M = {} -require 'metalua.loader' -local compiler = require 'metalua.compiler' -local mlc = compiler.new() -local Q = require 'metalua.treequery' - --- Enable to retrieve all Javadoc-like comments from C code -function M.c(code) - if not code then return nil, 'No code provided' end - local comments = {} - -- Loop over comments stripping cosmetic '*' - for comment in code:gmatch('%s*/%*%*+(.-)%*+/') do - -- All Lua special comment are prefixed with an '-', - -- so we also comment C comment to make them compliant - table.insert(comments, '-'..comment) - end - return comments -end - --- Enable to retrieve "---" comments from Lua code -function M.lua( code ) - if not code then return nil, 'No code provided' end - - -- manage shebang - if code then code = code:gsub("^(#.-\n)", function (s) return string.rep(' ',string.len(s)) end) end - - -- check for errors - local f, err = loadstring(code,'source_to_check') - if not f then - return nil, 'Syntax error.\n' .. err - end - - -- Get ast from file - local status, ast = pcall(mlc.src_to_ast, mlc, code) - -- - -- Detect parsing errors - -- - if not status then - return nil, 'There might be a syntax error.\n' .. ast - end - - -- - -- Extract commented nodes from AST - -- - - -- Function enabling commented node selection - local function acceptcommentednode(node) - return node.lineinfo and ( node.lineinfo.last.comments or node.lineinfo.first.comments ) - end - - -- Fetch commented node from AST - local commentednodes = Q(ast):filter( acceptcommentednode ):list() - - -- Comment cache to avoid selecting same comment twice - local commentcache = {} - -- Will contain selected comments - local comments = {} - - -- Loop over commented nodes - for _, node in ipairs( commentednodes ) do - - -- A node can is relateds to comment before and after itself, - -- the following gathers them. - local commentlists = {} - if node.lineinfo and node.lineinfo.first.comments then - table.insert(commentlists, node.lineinfo.first.comments) - end - if node.lineinfo and node.lineinfo.last.comments then - table.insert(commentlists, node.lineinfo.last.comments) - end - -- Now that we have comments before and fater the node, - -- collect them in a single table - for _, list in ipairs( commentlists ) do - for _, commenttable in ipairs(list) do - -- Only select special comments - local firstcomment = #commenttable > 0 and #commenttable[1] > 0 and commenttable[1] - if firstcomment:sub(1, 1) == '-' then - for _, comment in ipairs( commenttable ) do - -- Only comments which were not already collected - if not commentcache[comment] then - commentcache[comment] = true - table.insert(comments, comment) - end - end - end - end - end - end - return comments -end -return M diff --git a/Utils/luarocks/share/lua/5.1/fs/lfs.lua b/Utils/luarocks/share/lua/5.1/fs/lfs.lua deleted file mode 100644 index 3fc513542..000000000 --- a/Utils/luarocks/share/lua/5.1/fs/lfs.lua +++ /dev/null @@ -1,130 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -local lfs = require 'lfs' -local M = {} -local function iswindows() - local p = io.popen("echo %os%") - if not p then - return false - end - local result =p:read("*l") - p:close() - return result == "Windows_NT" -end -M.separator = iswindows() and [[\]] or [[/]] ---- --- Will recursively browse given directories and list files encountered --- @param tab Table, list where files will be added --- @param dirorfiles list of path to browse in order to build list. --- Files from this list will be added to tab list. --- @return tab list, table containing all files from directories --- and files contained in dirorfile -local function appendfiles(tab, dirorfile) - - -- Nothing to process - if #dirorfile < 1 then return tab end - - -- Append all files to list - local dirs = {} - for _, path in ipairs( dirorfile ) do - -- Determine element nature - local elementnature = lfs.attributes (path, "mode") - - -- Handle files - if elementnature == 'file' then - table.insert(tab, path) - else if elementnature == 'directory' then - - -- Check if folder is accessible - local status, error = pcall(lfs.dir, path) - if not status then return nil, error end - - -- - -- Handle folders - -- - for diskelement in lfs.dir(path) do - - -- Format current file name - local currentfilename - if path:sub(#path) == M.separator then - currentfilename = path .. diskelement - else - currentfilename = path .. M.separator .. diskelement - end - - -- Handle folder elements - local nature, err = lfs.attributes (currentfilename, "mode") - -- Append file to current list - if nature == 'file' then - table.insert(tab, currentfilename) - elseif nature == 'directory' then - -- Avoid current and parent directory in order to avoid - -- endless recursion - if diskelement ~= '.' and diskelement ~= '..' then - -- Handle subfolders - table.insert(dirs, currentfilename) - end - end - end - end - end - end - -- If we only encountered files, going deeper is useless - if #dirs == 0 then return tab end - -- Append files from encountered directories - return appendfiles(tab, dirs) -end ---- --- Provide a list of files from a directory --- @param list Table of directories to browse --- @return table of string, path to files contained in given directories -function M.filelist(list) - if not list then return nil, 'No directory list provided' end - return appendfiles({}, list) -end -function M.checkdirectory( dirlist ) - if not dirlist then return false end - local missingdirs = {} - for _, filename in ipairs( dirlist ) do - if not lfs.attributes(filename, 'mode') then - table.insert(missingdirs, filename) - end - end - if #missingdirs > 0 then - return false, missingdirs - end - return true -end -function M.fill(filename, content) - -- - -- Ensure parent directory exists - -- - local parent = filename:gmatch([[(.*)]] .. M.separator ..[[(.+)]])() - local parentnature = lfs.attributes(parent, 'mode') - -- Create parent directory while absent - if not parentnature then - lfs.mkdir( parent ) - elseif parentnature ~= 'directory' then - -- Notify that disk element already exists - return nil, parent..' is a '..parentnature..'.' - end - - -- Create actual file - local file, error = io.open(filename, 'w') - if not file then - return nil, error - end - file:write( content ) - file:close() - return true -end -return M diff --git a/Utils/luarocks/share/lua/5.1/lddextractor.lua b/Utils/luarocks/share/lua/5.1/lddextractor.lua deleted file mode 100644 index b2cea2ea3..000000000 --- a/Utils/luarocks/share/lua/5.1/lddextractor.lua +++ /dev/null @@ -1,113 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -require 'metalua.loader' -local compiler = require 'metalua.compiler' -local mlc = compiler.new() -local M = {} - --- --- Define default supported languages --- -M.supportedlanguages = {} -local extractors = require 'extractors' - --- Support Lua comment extracting -M.supportedlanguages['lua'] = extractors.lua - --- Support C comment extracting -for _,c in ipairs({'c', 'cpp', 'c++'}) do - M.supportedlanguages[c] = extractors.c -end - --- Extract comment from code, --- type of code is deduced from filename extension -function M.extract(filename, code) - -- Check parameters - if not code then return nil, 'No code provided' end - if type(filename) ~= "string" then - return nil, 'No string for file name provided' - end - - -- Extract file extension - local fileextension = filename:gmatch('.*%.(.*)')() - if not fileextension then - return nil, 'File '..filename..' has no extension, could not determine how to extract documentation.' - end - - -- Check if it is possible to extract documentation from these files - local extractor = M.supportedlanguages[ fileextension ] - if not extractor then - return nil, 'Unable to extract documentation from '.. fileextension .. ' file.' - end - return extractor( code ) -end --- Generate a file gathering only comments from given code -function M.generatecommentfile(filename, code) - local comments, error = M.extract(filename, code) - if not comments then - return nil, 'Unable to generate comment file.\n'..error - end - local filecontent = {} - for _, comment in ipairs( comments ) do - table.insert(filecontent, "--[[") - table.insert(filecontent, comment) - table.insert(filecontent, "\n]]\n\n") - end - return table.concat(filecontent)..'return nil\n' -end --- Create API Model module from a 'comment only' lua file -function M.generateapimodule(filename, code,noheuristic) - if not filename then return nil, 'No file name given.' end - if not code then return nil, 'No code provided.' end - if type(filename) ~= "string" then return nil, 'No string for file name provided' end - - -- for non lua file get comment file - if filename:gmatch('.*%.(.*)')() ~= 'lua' then - local err - code, err = M.generatecommentfile(filename, code) - if not code then - return nil, 'Unable to create api module for "'..filename..'".\n'..err - end - else - - -- manage shebang - if code then code = code:gsub("^(#.-\n)", function (s) return string.rep(' ',string.len(s)) end) end - - -- check for errors - local f, err = loadstring(code,'source_to_check') - if not f then - return nil, 'File'..filename..'contains syntax error.\n' .. err - end - end - - local status, ast = pcall(mlc.src_to_ast, mlc, code) - if not status then - return nil, 'Unable to compute ast for "'..filename..'".\n'..ast - end - - -- Extract module name as the filename without extension - local modulename - local matcher = string.gmatch(filename,'.*/(.*)%..*$') - if matcher then modulename = matcher() end - - -- Create api model - local apimodelbuilder = require 'models.apimodelbuilder' - local _file, comment2apiobj = apimodelbuilder.createmoduleapi(ast, modulename) - - -- Create internal model - if not noheuristic then - local internalmodelbuilder = require "models.internalmodelbuilder" - local _internalcontent = internalmodelbuilder.createinternalcontent(ast,_file,comment2apiobj, modulename) - end - return _file -end -return M diff --git a/Utils/luarocks/share/lua/5.1/luasrcdiet/equiv.lua b/Utils/luarocks/share/lua/5.1/luasrcdiet/equiv.lua deleted file mode 100644 index 3efa4efe7..000000000 --- a/Utils/luarocks/share/lua/5.1/luasrcdiet/equiv.lua +++ /dev/null @@ -1,465 +0,0 @@ ---------- --- Source and binary equivalency comparisons --- --- **Notes:** --- --- * Intended as an extra safety check for mission-critical code, --- should give affirmative results if everything works. --- * Heavy on load() and string.dump(), which may be slowish, --- and may cause problems for cross-compiled applications. --- * Optional detailed information dump is mainly for debugging, --- reason being, if the two are not equivalent when they should be, --- then some form of optimization has failed. --- * source: IMPORTANT: TK_NAME not compared if opt-locals enabled. --- * binary: IMPORTANT: Some shortcuts are taken with int and size_t --- value reading -- if the functions break, then the binary chunk --- is very large indeed. --- * binary: There is a lack of diagnostic information when a compare --- fails; you can use ChunkSpy and compare using visual diff. ----- -local byte = string.byte -local dump = string.dump -local load = loadstring or load --luacheck: ignore 113 -local sub = string.sub - -local M = {} - -local is_realtoken = { -- significant (grammar) tokens - TK_KEYWORD = true, - TK_NAME = true, - TK_NUMBER = true, - TK_STRING = true, - TK_LSTRING = true, - TK_OP = true, - TK_EOS = true, -} - -local option, llex, warn - - ---- The initialization function. --- --- @tparam {[string]=bool,...} _option --- @tparam luasrcdiet.llex _llex --- @tparam table _warn -function M.init(_option, _llex, _warn) - option = _option - llex = _llex - warn = _warn -end - ---- Builds lists containing a 'normal' lexer stream. --- --- @tparam string s The source code. --- @treturn table --- @treturn table -local function build_stream(s) - local stok, sseminfo = llex.lex(s) -- source list (with whitespace elements) - local tok, seminfo -- processed list (real elements only) - = {}, {} - for i = 1, #stok do - local t = stok[i] - if is_realtoken[t] then - tok[#tok + 1] = t - seminfo[#seminfo + 1] = sseminfo[i] - end - end--for - return tok, seminfo -end - --- Tests source (lexer stream) equivalence. --- --- @tparam string z --- @tparam string dat -function M.source(z, dat) - - -- Returns a dumped string for seminfo compares. - local function dumpsem(s) - local sf = load("return "..s, "z") - if sf then - return dump(sf) - end - end - - -- Marks and optionally reports non-equivalence. - local function bork(msg) - if option.DETAILS then print("SRCEQUIV: "..msg) end - warn.SRC_EQUIV = true - end - - -- Get lexer streams for both source strings, compare. - local tok1, seminfo1 = build_stream(z) -- original - local tok2, seminfo2 = build_stream(dat) -- compressed - - -- Compare shbang lines ignoring EOL. - local sh1 = z:match("^(#[^\r\n]*)") - local sh2 = dat:match("^(#[^\r\n]*)") - if sh1 or sh2 then - if not sh1 or not sh2 or sh1 ~= sh2 then - bork("shbang lines different") - end - end - - -- Compare by simple count. - if #tok1 ~= #tok2 then - bork("count "..#tok1.." "..#tok2) - return - end - - -- Compare each element the best we can. - for i = 1, #tok1 do - local t1, t2 = tok1[i], tok2[i] - local s1, s2 = seminfo1[i], seminfo2[i] - if t1 ~= t2 then -- by type - bork("type ["..i.."] "..t1.." "..t2) - break - end - if t1 == "TK_KEYWORD" or t1 == "TK_NAME" or t1 == "TK_OP" then - if t1 == "TK_NAME" and option["opt-locals"] then - -- can't compare identifiers of locals that are optimized - elseif s1 ~= s2 then -- by semantic info (simple) - bork("seminfo ["..i.."] "..t1.." "..s1.." "..s2) - break - end - elseif t1 == "TK_EOS" then - -- no seminfo to compare - else-- "TK_NUMBER" or "TK_STRING" or "TK_LSTRING" - -- compare 'binary' form, so dump a function - local s1b,s2b = dumpsem(s1), dumpsem(s2) - if not s1b or not s2b or s1b ~= s2b then - bork("seminfo ["..i.."] "..t1.." "..s1.." "..s2) - break - end - end - end--for - - -- Successful comparison if end is reached with no borks. -end - ---- Tests binary chunk equivalence (only for PUC Lua 5.1). --- --- @tparam string z --- @tparam string dat -function M.binary(z, dat) - local TNIL = 0 --luacheck: ignore 211 - local TBOOLEAN = 1 - local TNUMBER = 3 - local TSTRING = 4 - - -- sizes of data types - local endian - local sz_int - local sz_sizet - local sz_inst - local sz_number - local getint - local getsizet - - -- Marks and optionally reports non-equivalence. - local function bork(msg) - if option.DETAILS then print("BINEQUIV: "..msg) end - warn.BIN_EQUIV = true - end - - -- Checks if bytes exist. - local function ensure(c, sz) - if c.i + sz - 1 > c.len then return end - return true - end - - -- Skips some bytes. - local function skip(c, sz) - if not sz then sz = 1 end - c.i = c.i + sz - end - - -- Returns a byte value. - local function getbyte(c) - local i = c.i - if i > c.len then return end - local d = sub(c.dat, i, i) - c.i = i + 1 - return byte(d) - end - - -- Return an int value (little-endian). - local function getint_l(c) - local n, scale = 0, 1 - if not ensure(c, sz_int) then return end - for _ = 1, sz_int do - n = n + scale * getbyte(c) - scale = scale * 256 - end - return n - end - - -- Returns an int value (big-endian). - local function getint_b(c) - local n = 0 - if not ensure(c, sz_int) then return end - for _ = 1, sz_int do - n = n * 256 + getbyte(c) - end - return n - end - - -- Returns a size_t value (little-endian). - local function getsizet_l(c) - local n, scale = 0, 1 - if not ensure(c, sz_sizet) then return end - for _ = 1, sz_sizet do - n = n + scale * getbyte(c) - scale = scale * 256 - end - return n - end - - -- Returns a size_t value (big-endian). - local function getsizet_b(c) - local n = 0 - if not ensure(c, sz_sizet) then return end - for _ = 1, sz_sizet do - n = n * 256 + getbyte(c) - end - return n - end - - -- Returns a block (as a string). - local function getblock(c, sz) - local i = c.i - local j = i + sz - 1 - if j > c.len then return end - local d = sub(c.dat, i, j) - c.i = i + sz - return d - end - - -- Returns a string. - local function getstring(c) - local n = getsizet(c) - if not n then return end - if n == 0 then return "" end - return getblock(c, n) - end - - -- Compares byte value. - local function goodbyte(c1, c2) - local b1, b2 = getbyte(c1), getbyte(c2) - if not b1 or not b2 or b1 ~= b2 then - return - end - return b1 - end - - -- Compares byte value. - local function badbyte(c1, c2) - local b = goodbyte(c1, c2) - if not b then return true end - end - - -- Compares int value. - local function goodint(c1, c2) - local i1, i2 = getint(c1), getint(c2) - if not i1 or not i2 or i1 ~= i2 then - return - end - return i1 - end - - -- Recursively-called function to compare function prototypes. - local function getfunc(c1, c2) - -- source name (ignored) - if not getstring(c1) or not getstring(c2) then - bork("bad source name"); return - end - -- linedefined (ignored) - if not getint(c1) or not getint(c2) then - bork("bad linedefined"); return - end - -- lastlinedefined (ignored) - if not getint(c1) or not getint(c2) then - bork("bad lastlinedefined"); return - end - if not (ensure(c1, 4) and ensure(c2, 4)) then - bork("prototype header broken") - end - -- nups (compared) - if badbyte(c1, c2) then - bork("bad nups"); return - end - -- numparams (compared) - if badbyte(c1, c2) then - bork("bad numparams"); return - end - -- is_vararg (compared) - if badbyte(c1, c2) then - bork("bad is_vararg"); return - end - -- maxstacksize (compared) - if badbyte(c1, c2) then - bork("bad maxstacksize"); return - end - -- code (compared) - local ncode = goodint(c1, c2) - if not ncode then - bork("bad ncode"); return - end - local code1 = getblock(c1, ncode * sz_inst) - local code2 = getblock(c2, ncode * sz_inst) - if not code1 or not code2 or code1 ~= code2 then - bork("bad code block"); return - end - -- constants (compared) - local nconst = goodint(c1, c2) - if not nconst then - bork("bad nconst"); return - end - for _ = 1, nconst do - local ctype = goodbyte(c1, c2) - if not ctype then - bork("bad const type"); return - end - if ctype == TBOOLEAN then - if badbyte(c1, c2) then - bork("bad boolean value"); return - end - elseif ctype == TNUMBER then - local num1 = getblock(c1, sz_number) - local num2 = getblock(c2, sz_number) - if not num1 or not num2 or num1 ~= num2 then - bork("bad number value"); return - end - elseif ctype == TSTRING then - local str1 = getstring(c1) - local str2 = getstring(c2) - if not str1 or not str2 or str1 ~= str2 then - bork("bad string value"); return - end - end - end - -- prototypes (compared recursively) - local nproto = goodint(c1, c2) - if not nproto then - bork("bad nproto"); return - end - for _ = 1, nproto do - if not getfunc(c1, c2) then - bork("bad function prototype"); return - end - end - -- debug information (ignored) - -- lineinfo (ignored) - local sizelineinfo1 = getint(c1) - if not sizelineinfo1 then - bork("bad sizelineinfo1"); return - end - local sizelineinfo2 = getint(c2) - if not sizelineinfo2 then - bork("bad sizelineinfo2"); return - end - if not getblock(c1, sizelineinfo1 * sz_int) then - bork("bad lineinfo1"); return - end - if not getblock(c2, sizelineinfo2 * sz_int) then - bork("bad lineinfo2"); return - end - -- locvars (ignored) - local sizelocvars1 = getint(c1) - if not sizelocvars1 then - bork("bad sizelocvars1"); return - end - local sizelocvars2 = getint(c2) - if not sizelocvars2 then - bork("bad sizelocvars2"); return - end - for _ = 1, sizelocvars1 do - if not getstring(c1) or not getint(c1) or not getint(c1) then - bork("bad locvars1"); return - end - end - for _ = 1, sizelocvars2 do - if not getstring(c2) or not getint(c2) or not getint(c2) then - bork("bad locvars2"); return - end - end - -- upvalues (ignored) - local sizeupvalues1 = getint(c1) - if not sizeupvalues1 then - bork("bad sizeupvalues1"); return - end - local sizeupvalues2 = getint(c2) - if not sizeupvalues2 then - bork("bad sizeupvalues2"); return - end - for _ = 1, sizeupvalues1 do - if not getstring(c1) then bork("bad upvalues1"); return end - end - for _ = 1, sizeupvalues2 do - if not getstring(c2) then bork("bad upvalues2"); return end - end - return true - end - - -- Removes shbang line so that load runs. - local function zap_shbang(s) - local shbang = s:match("^(#[^\r\n]*\r?\n?)") - if shbang then -- cut out shbang - s = sub(s, #shbang + 1) - end - return s - end - - -- Attempt to compile, then dump to get binary chunk string. - local cz = load(zap_shbang(z), "z") - if not cz then - bork("failed to compile original sources for binary chunk comparison") - return - end - - local cdat = load(zap_shbang(dat), "z") - if not cdat then - bork("failed to compile compressed result for binary chunk comparison") - end - - -- if load() works, dump assuming string.dump() is error-free - local c1 = { i = 1, dat = dump(cz) } - c1.len = #c1.dat - - local c2 = { i = 1, dat = dump(cdat) } - c2.len = #c2.dat - - -- Parse binary chunks to verify equivalence. - -- * For headers, handle sizes to allow a degree of flexibility. - -- * Assume a valid binary chunk is generated, since it was not - -- generated via external means. - if not (ensure(c1, 12) and ensure(c2, 12)) then - bork("header broken") - end - skip(c1, 6) -- skip signature(4), version, format - endian = getbyte(c1) -- 1 = little endian - sz_int = getbyte(c1) -- get data type sizes - sz_sizet = getbyte(c1) - sz_inst = getbyte(c1) - sz_number = getbyte(c1) - skip(c1) -- skip integral flag - skip(c2, 12) -- skip other header (assume similar) - - if endian == 1 then -- set for endian sensitive data we need - getint = getint_l - getsizet = getsizet_l - else - getint = getint_b - getsizet = getsizet_b - end - getfunc(c1, c2) -- get prototype at root - - if c1.i ~= c1.len + 1 then - bork("inconsistent binary chunk1"); return - elseif c2.i ~= c2.len + 1 then - bork("inconsistent binary chunk2"); return - end - - -- Successful comparison if end is reached with no borks. -end - -return M diff --git a/Utils/luarocks/share/lua/5.1/luasrcdiet/fs.lua b/Utils/luarocks/share/lua/5.1/luasrcdiet/fs.lua deleted file mode 100644 index 00baa113c..000000000 --- a/Utils/luarocks/share/lua/5.1/luasrcdiet/fs.lua +++ /dev/null @@ -1,74 +0,0 @@ ---------- --- Utility functions for operations on a file system. --- --- **Note: This module is not part of public API!** ----- -local fmt = string.format -local open = io.open - -local UTF8_BOM = '\239\187\191' - -local function normalize_io_error (name, err) - if err:sub(1, #name + 2) == name..': ' then - err = err:sub(#name + 3) - end - return err -end - -local M = {} - ---- Reads the specified file and returns its content as string. --- --- @tparam string filename Path of the file to read. --- @tparam string mode The mode in which to open the file, see @{io.open} (default: "r"). --- @treturn[1] string A content of the file. --- @treturn[2] nil --- @treturn[2] string An error message. -function M.read_file (filename, mode) - local handler, err = open(filename, mode or 'r') - if not handler then - return nil, fmt('Could not open %s for reading: %s', - filename, normalize_io_error(filename, err)) - end - - local content, err = handler:read('*a') --luacheck: ignore 411 - if not content then - return nil, fmt('Could not read %s: %s', filename, normalize_io_error(filename, err)) - end - - handler:close() - - if content:sub(1, #UTF8_BOM) == UTF8_BOM then - content = content:sub(#UTF8_BOM + 1) - end - - return content -end - ---- Writes the given data to the specified file. --- --- @tparam string filename Path of the file to write. --- @tparam string data The data to write. --- @tparam ?string mode The mode in which to open the file, see @{io.open} (default: "w"). --- @treturn[1] true --- @treturn[2] nil --- @treturn[2] string An error message. -function M.write_file (filename, data, mode) - local handler, err = open(filename, mode or 'w') - if not handler then - return nil, fmt('Could not open %s for writing: %s', - filename, normalize_io_error(filename, err)) - end - - local _, err = handler:write(data) --luacheck: ignore 411 - if err then - return nil, fmt('Could not write %s: %s', filename, normalize_io_error(filename, err)) - end - - handler:flush() - handler:close() - - return true -end - -return M diff --git a/Utils/luarocks/share/lua/5.1/luasrcdiet/init.lua b/Utils/luarocks/share/lua/5.1/luasrcdiet/init.lua deleted file mode 100644 index 8b47eed72..000000000 --- a/Utils/luarocks/share/lua/5.1/luasrcdiet/init.lua +++ /dev/null @@ -1,117 +0,0 @@ ---------- --- LuaSrcDiet API ----- -local equiv = require 'luasrcdiet.equiv' -local llex = require 'luasrcdiet.llex' -local lparser = require 'luasrcdiet.lparser' -local optlex = require 'luasrcdiet.optlex' -local optparser = require 'luasrcdiet.optparser' -local utils = require 'luasrcdiet.utils' - -local concat = table.concat -local merge = utils.merge - -local _ -- placeholder - - -local function noop () - return -end - -local function opts_to_legacy (opts) - local res = {} - for key, val in pairs(opts) do - res['opt-'..key] = val - end - return res -end - - -local M = {} - ---- The module's name. -M._NAME = 'luasrcdiet' - ---- The module's version number. -M._VERSION = '0.3.0' - ---- The module's homepage. -M._HOMEPAGE = 'https://github.com/jirutka/luasrcdiet' - ---- All optimizations disabled. -M.NONE_OPTS = { - binequiv = false, - comments = false, - emptylines = false, - entropy = false, - eols = false, - experimental = false, - locals = false, - numbers = false, - srcequiv = false, - strings = false, - whitespace = false, -} - ---- Basic optimizations enabled. --- @table BASIC_OPTS -M.BASIC_OPTS = merge(M.NONE_OPTS, { - comments = true, - emptylines = true, - srcequiv = true, - whitespace = true, -}) - ---- Defaults. --- @table DEFAULT_OPTS -M.DEFAULT_OPTS = merge(M.BASIC_OPTS, { - locals = true, - numbers = true, -}) - ---- Maximum optimizations enabled (all except experimental). --- @table MAXIMUM_OPTS -M.MAXIMUM_OPTS = merge(M.DEFAULT_OPTS, { - entropy = true, - eols = true, - strings = true, -}) - ---- Optimizes the given Lua source code. --- --- @tparam ?{[string]=bool,...} opts Optimizations to do (default is @{DEFAULT_OPTS}). --- @tparam string source The Lua source code to optimize. --- @treturn string Optimized source. --- @raise if the source is malformed, source equivalence test failed, or some --- other error occured. -function M.optimize (opts, source) - assert(source and type(source) == 'string', - 'bad argument #2: expected string, got a '..type(source)) - - opts = opts and merge(M.NONE_OPTS, opts) or M.DEFAULT_OPTS - local legacy_opts = opts_to_legacy(opts) - - local toklist, seminfolist, toklnlist = llex.lex(source) - local xinfo = lparser.parse(toklist, seminfolist, toklnlist) - - optparser.print = noop - optparser.optimize(legacy_opts, toklist, seminfolist, xinfo) - - local warn = optlex.warn -- use this as a general warning lookup - optlex.print = noop - _, seminfolist = optlex.optimize(legacy_opts, toklist, seminfolist, toklnlist) - local optim_source = concat(seminfolist) - - if opts.srcequiv and not opts.experimental then - equiv.init(legacy_opts, llex, warn) - equiv.source(source, optim_source) - - if warn.SRC_EQUIV then - error('Source equivalence test failed!') - end - end - - return optim_source -end - -return M diff --git a/Utils/luarocks/share/lua/5.1/luasrcdiet/llex.lua b/Utils/luarocks/share/lua/5.1/luasrcdiet/llex.lua deleted file mode 100644 index c9d5a0e8c..000000000 --- a/Utils/luarocks/share/lua/5.1/luasrcdiet/llex.lua +++ /dev/null @@ -1,350 +0,0 @@ ---------- --- Lua 5.1+ lexical analyzer written in Lua. --- --- This file is part of LuaSrcDiet, based on Yueliang material. --- --- **Notes:** --- --- * This is a version of the native 5.1.x lexer from Yueliang 0.4.0, --- with significant modifications to handle LuaSrcDiet's needs: --- (1) llex.error is an optional error function handler, --- (2) seminfo for strings include their delimiters and no --- translation operations are performed on them. --- * ADDED shbang handling has been added to support executable scripts. --- * NO localized decimal point replacement magic. --- * NO limit to number of lines. --- * NO support for compatible long strings (LUA\_COMPAT_LSTR). --- * Added goto keyword and double-colon operator (Lua 5.2+). ----- -local find = string.find -local fmt = string.format -local match = string.match -local sub = string.sub -local tonumber = tonumber - -local M = {} - -local kw = {} -for v in ([[ -and break do else elseif end false for function goto if in -local nil not or repeat return then true until while]]):gmatch("%S+") do - kw[v] = true -end - -local z, -- source stream - sourceid, -- name of source - I, -- position of lexer - buff, -- buffer for strings - ln, -- line number - tok, -- lexed token list - seminfo, -- lexed semantic information list - tokln -- line numbers for messages - - ---- Adds information to token listing. --- --- @tparam string token --- @tparam string info -local function addtoken(token, info) - local i = #tok + 1 - tok[i] = token - seminfo[i] = info - tokln[i] = ln -end - ---- Handles line number incrementation and end-of-line characters. --- --- @tparam int i Position of lexer in the source stream. --- @tparam bool is_tok --- @treturn int -local function inclinenumber(i, is_tok) - local old = sub(z, i, i) - i = i + 1 -- skip '\n' or '\r' - local c = sub(z, i, i) - if (c == "\n" or c == "\r") and (c ~= old) then - i = i + 1 -- skip '\n\r' or '\r\n' - old = old..c - end - if is_tok then addtoken("TK_EOL", old) end - ln = ln + 1 - I = i - return i -end - ---- Returns a chunk name or id, no truncation for long names. --- --- @treturn string -local function chunkid() - if sourceid and match(sourceid, "^[=@]") then - return sub(sourceid, 2) -- remove first char - end - return "[string]" -end - ---- Formats error message and throws error. --- --- A simplified version, does not report what token was responsible. --- --- @tparam string s --- @tparam int line The line number. --- @raise -local function errorline(s, line) - local e = M.error or error - e(fmt("%s:%d: %s", chunkid(), line or ln, s)) -end - ---- Counts separators (`="` in a long string delimiter. --- --- @tparam int i Position of lexer in the source stream. --- @treturn int -local function skip_sep(i) - local s = sub(z, i, i) - i = i + 1 - local count = #match(z, "=*", i) - i = i + count - I = i - return (sub(z, i, i) == s) and count or (-count) - 1 -end - ---- Reads a long string or long comment. --- --- @tparam bool is_str --- @tparam string sep --- @treturn string --- @raise if unfinished long string or comment. -local function read_long_string(is_str, sep) - local i = I + 1 -- skip 2nd '[' - local c = sub(z, i, i) - if c == "\r" or c == "\n" then -- string starts with a newline? - i = inclinenumber(i) -- skip it - end - while true do - local p, _, r = find(z, "([\r\n%]])", i) -- (long range match) - if not p then - errorline(is_str and "unfinished long string" or - "unfinished long comment") - end - i = p - if r == "]" then -- delimiter test - if skip_sep(i) == sep then - buff = sub(z, buff, I) - I = I + 1 -- skip 2nd ']' - return buff - end - i = I - else -- newline - buff = buff.."\n" - i = inclinenumber(i) - end - end--while -end - ---- Reads a string. --- --- @tparam string del The delimiter. --- @treturn string --- @raise if unfinished string or too large escape sequence. -local function read_string(del) - local i = I - while true do - local p, _, r = find(z, "([\n\r\\\"\'])", i) -- (long range match) - if p then - if r == "\n" or r == "\r" then - errorline("unfinished string") - end - i = p - if r == "\\" then -- handle escapes - i = i + 1 - r = sub(z, i, i) - if r == "" then break end -- (EOZ error) - p = find("abfnrtv\n\r", r, 1, true) - - if p then -- special escapes - if p > 7 then - i = inclinenumber(i) - else - i = i + 1 - end - - elseif find(r, "%D") then -- other non-digits - i = i + 1 - - else -- \xxx sequence - local _, q, s = find(z, "^(%d%d?%d?)", i) - i = q + 1 - if s + 1 > 256 then -- UCHAR_MAX - errorline("escape sequence too large") - end - - end--if p - else - i = i + 1 - if r == del then -- ending delimiter - I = i - return sub(z, buff, i - 1) -- return string - end - end--if r - else - break -- (error) - end--if p - end--while - errorline("unfinished string") -end - - ---- Initializes lexer for given source _z and source name _sourceid. --- --- @tparam string _z The source code. --- @tparam string _sourceid Name of the source. -local function init(_z, _sourceid) - z = _z -- source - sourceid = _sourceid -- name of source - I = 1 -- lexer's position in source - ln = 1 -- line number - tok = {} -- lexed token list* - seminfo = {} -- lexed semantic information list* - tokln = {} -- line numbers for messages* - - -- Initial processing (shbang handling). - local p, _, q, r = find(z, "^(#[^\r\n]*)(\r?\n?)") - if p then -- skip first line - I = I + #q - addtoken("TK_COMMENT", q) - if #r > 0 then inclinenumber(I, true) end - end -end - ---- Runs lexer on the given source code. --- --- @tparam string source The Lua source to scan. --- @tparam ?string source_name Name of the source (optional). --- @treturn {string,...} A list of lexed tokens. --- @treturn {string,...} A list of semantic information (lexed strings). --- @treturn {int,...} A list of line numbers. -function M.lex(source, source_name) - init(source, source_name) - - while true do--outer - local i = I - -- inner loop allows break to be used to nicely section tests - while true do --luacheck: ignore 512 - - local p, _, r = find(z, "^([_%a][_%w]*)", i) - if p then - I = i + #r - if kw[r] then - addtoken("TK_KEYWORD", r) -- reserved word (keyword) - else - addtoken("TK_NAME", r) -- identifier - end - break -- (continue) - end - - local p, _, r = find(z, "^(%.?)%d", i) - if p then -- numeral - if r == "." then i = i + 1 end - local _, q, r = find(z, "^%d*[%.%d]*([eE]?)", i) --luacheck: ignore 421 - i = q + 1 - if #r == 1 then -- optional exponent - if match(z, "^[%+%-]", i) then -- optional sign - i = i + 1 - end - end - local _, q = find(z, "^[_%w]*", i) - I = q + 1 - local v = sub(z, p, q) -- string equivalent - if not tonumber(v) then -- handles hex test also - errorline("malformed number") - end - addtoken("TK_NUMBER", v) - break -- (continue) - end - - local p, q, r, t = find(z, "^((%s)[ \t\v\f]*)", i) - if p then - if t == "\n" or t == "\r" then -- newline - inclinenumber(i, true) - else - I = q + 1 -- whitespace - addtoken("TK_SPACE", r) - end - break -- (continue) - end - - local _, q = find(z, "^::", i) - if q then - I = q + 1 - addtoken("TK_OP", "::") - break -- (continue) - end - - local r = match(z, "^%p", i) - if r then - buff = i - local p = find("-[\"\'.=<>~", r, 1, true) --luacheck: ignore 421 - if p then - - -- two-level if block for punctuation/symbols - if p <= 2 then - if p == 1 then -- minus - local c = match(z, "^%-%-(%[?)", i) - if c then - i = i + 2 - local sep = -1 - if c == "[" then - sep = skip_sep(i) - end - if sep >= 0 then -- long comment - addtoken("TK_LCOMMENT", read_long_string(false, sep)) - else -- short comment - I = find(z, "[\n\r]", i) or (#z + 1) - addtoken("TK_COMMENT", sub(z, buff, I - 1)) - end - break -- (continue) - end - -- (fall through for "-") - else -- [ or long string - local sep = skip_sep(i) - if sep >= 0 then - addtoken("TK_LSTRING", read_long_string(true, sep)) - elseif sep == -1 then - addtoken("TK_OP", "[") - else - errorline("invalid long string delimiter") - end - break -- (continue) - end - - elseif p <= 5 then - if p < 5 then -- strings - I = i + 1 - addtoken("TK_STRING", read_string(r)) - break -- (continue) - end - r = match(z, "^%.%.?%.?", i) -- .|..|... dots - -- (fall through) - - else -- relational - r = match(z, "^%p=?", i) - -- (fall through) - end - end - I = i + #r - addtoken("TK_OP", r) -- for other symbols, fall through - break -- (continue) - end - - local r = sub(z, i, i) - if r ~= "" then - I = i + 1 - addtoken("TK_OP", r) -- other single-char tokens - break - end - addtoken("TK_EOS", "") -- end of stream, - return tok, seminfo, tokln -- exit here - - end--while inner - end--while outer -end - -return M diff --git a/Utils/luarocks/share/lua/5.1/luasrcdiet/lparser.lua b/Utils/luarocks/share/lua/5.1/luasrcdiet/lparser.lua deleted file mode 100644 index 334243ea1..000000000 --- a/Utils/luarocks/share/lua/5.1/luasrcdiet/lparser.lua +++ /dev/null @@ -1,1286 +0,0 @@ ---------- --- Lua 5.1+ parser written in Lua. --- --- This file is part of LuaSrcDiet, based on Yueliang material. --- --- **Notes:** --- --- * This is a version of the native 5.1.x parser from Yueliang 0.4.0, --- with significant modifications to handle LuaSrcDiet's needs: --- (1) needs pre-built token tables instead of a module.method, --- (2) lparser.error is an optional error handler (from llex), --- (3) not full parsing, currently fakes raw/unlexed constants, --- (4) parser() returns globalinfo, localinfo tables. --- * NO support for 'arg' vararg functions (LUA_COMPAT_VARARG). --- * A lot of the parser is unused, but might later be useful for --- full-on parsing and analysis. --- * Relaxed parsing of statement to not require "break" to be the --- last statement of block (Lua 5.2+). --- * Added basic support for goto and label statements, i.e. parser --- does not crash on them (Lua 5.2+). ----- -local fmt = string.format -local gmatch = string.gmatch -local pairs = pairs - -local M = {} - ---[[-------------------------------------------------------------------- --- variable and data structure initialization -----------------------------------------------------------------------]] - ----------------------------------------------------------------------- --- initialization: main variables ----------------------------------------------------------------------- - -local toklist, -- grammar-only token tables (token table, - seminfolist, -- semantic information table, line number - toklnlist, -- table, cross-reference table) - xreflist, - tpos, -- token position - - line, -- start line # for error messages - lastln, -- last line # for ambiguous syntax chk - tok, seminfo, ln, xref, -- token, semantic info, line - nameref, -- proper position of token - fs, -- current function state - top_fs, -- top-level function state - - globalinfo, -- global variable information table - globallookup, -- global variable name lookup table - localinfo, -- local variable information table - ilocalinfo, -- inactive locals (prior to activation) - ilocalrefs, -- corresponding references to activate - statinfo -- statements labeled by type - --- forward references for local functions -local explist1, expr, block, exp1, body, chunk - ----------------------------------------------------------------------- --- initialization: data structures ----------------------------------------------------------------------- - -local block_follow = {} -- lookahead check in chunk(), returnstat() -for v in gmatch("else elseif end until ", "%S+") do - block_follow[v] = true -end - -local binopr_left = {} -- binary operators, left priority -local binopr_right = {} -- binary operators, right priority -for op, lt, rt in gmatch([[ -{+ 6 6}{- 6 6}{* 7 7}{/ 7 7}{% 7 7} -{^ 10 9}{.. 5 4} -{~= 3 3}{== 3 3} -{< 3 3}{<= 3 3}{> 3 3}{>= 3 3} -{and 2 2}{or 1 1} -]], "{(%S+)%s(%d+)%s(%d+)}") do - binopr_left[op] = lt + 0 - binopr_right[op] = rt + 0 -end - -local unopr = { ["not"] = true, ["-"] = true, - ["#"] = true, } -- unary operators -local UNARY_PRIORITY = 8 -- priority for unary operators - ---[[-------------------------------------------------------------------- --- support functions -----------------------------------------------------------------------]] - ----------------------------------------------------------------------- --- formats error message and throws error (duplicated from llex) --- * a simplified version, does not report what token was responsible ----------------------------------------------------------------------- - -local function errorline(s, line) - local e = M.error or error - e(fmt("(source):%d: %s", line or ln, s)) -end - ----------------------------------------------------------------------- --- handles incoming token, semantic information pairs --- * NOTE: 'nextt' is named 'next' originally ----------------------------------------------------------------------- - --- reads in next token -local function nextt() - lastln = toklnlist[tpos] - tok, seminfo, ln, xref - = toklist[tpos], seminfolist[tpos], toklnlist[tpos], xreflist[tpos] - tpos = tpos + 1 -end - --- peek at next token (single lookahead for table constructor) -local function lookahead() - return toklist[tpos] -end - ----------------------------------------------------------------------- --- throws a syntax error, or if token expected is not there ----------------------------------------------------------------------- - -local function syntaxerror(msg) - if tok ~= "" and tok ~= "" then - if tok == "" then tok = seminfo end - tok = "'"..tok.."'" - end - errorline(msg.." near "..tok) -end - -local function error_expected(token) - syntaxerror("'"..token.."' expected") -end - ----------------------------------------------------------------------- --- tests for a token, returns outcome --- * return value changed to boolean ----------------------------------------------------------------------- - -local function testnext(c) - if tok == c then nextt(); return true end -end - ----------------------------------------------------------------------- --- check for existence of a token, throws error if not found ----------------------------------------------------------------------- - -local function check(c) - if tok ~= c then error_expected(c) end -end - ----------------------------------------------------------------------- --- verify existence of a token, then skip it ----------------------------------------------------------------------- - -local function checknext(c) - check(c); nextt() -end - ----------------------------------------------------------------------- --- throws error if condition not matched ----------------------------------------------------------------------- - -local function check_condition(c, msg) - if not c then syntaxerror(msg) end -end - ----------------------------------------------------------------------- --- verifies token conditions are met or else throw error ----------------------------------------------------------------------- - -local function check_match(what, who, where) - if not testnext(what) then - if where == ln then - error_expected(what) - else - syntaxerror("'"..what.."' expected (to close '"..who.."' at line "..where..")") - end - end -end - ----------------------------------------------------------------------- --- expect that token is a name, consume it and return the name ----------------------------------------------------------------------- - -local function str_checkname() - check("") - local ts = seminfo - nameref = xref - nextt() - return ts -end - ---[[-------------------------------------------------------------------- --- variable (global|local|upvalue) handling --- * to track locals and globals, variable management code needed --- * entry point is singlevar() for variable lookups --- * lookup tables (bl.locallist) are maintained awkwardly in the basic --- block data structures, PLUS the function data structure (this is --- an inelegant hack, since bl is nil for the top level of a function) -----------------------------------------------------------------------]] - ----------------------------------------------------------------------- --- register a local variable, create local variable object, set in --- to-activate variable list --- * used in new_localvarliteral(), parlist(), fornum(), forlist(), --- localfunc(), localstat() ----------------------------------------------------------------------- - -local function new_localvar(name, special) - local bl = fs.bl - local locallist - -- locate locallist in current block object or function root object - if bl then - locallist = bl.locallist - else - locallist = fs.locallist - end - -- build local variable information object and set localinfo - local id = #localinfo + 1 - localinfo[id] = { -- new local variable object - name = name, -- local variable name - xref = { nameref }, -- xref, first value is declaration - decl = nameref, -- location of declaration, = xref[1] - } - if special or name == "_ENV" then -- "self" and "_ENV" must be not be changed - localinfo[id].is_special = true - end - -- this can override a local with the same name in the same scope - -- but first, keep it inactive until it gets activated - local i = #ilocalinfo + 1 - ilocalinfo[i] = id - ilocalrefs[i] = locallist -end - ----------------------------------------------------------------------- --- actually activate the variables so that they are visible --- * remember Lua semantics, e.g. RHS is evaluated first, then LHS --- * used in parlist(), forbody(), localfunc(), localstat(), body() ----------------------------------------------------------------------- - -local function adjustlocalvars(nvars) - local sz = #ilocalinfo - -- i goes from left to right, in order of local allocation, because - -- of something like: local a,a,a = 1,2,3 which gives a = 3 - while nvars > 0 do - nvars = nvars - 1 - local i = sz - nvars - local id = ilocalinfo[i] -- local's id - local obj = localinfo[id] - local name = obj.name -- name of local - obj.act = xref -- set activation location - ilocalinfo[i] = nil - local locallist = ilocalrefs[i] -- ref to lookup table to update - ilocalrefs[i] = nil - local existing = locallist[name] -- if existing, remove old first! - if existing then -- do not overlap, set special - obj = localinfo[existing] -- form of rem, as -id - obj.rem = -id - end - locallist[name] = id -- activate, now visible to Lua - end -end - ----------------------------------------------------------------------- --- remove (deactivate) variables in current scope (before scope exits) --- * zap entire locallist tables since we are not allocating registers --- * used in leaveblock(), close_func() ----------------------------------------------------------------------- - -local function removevars() - local bl = fs.bl - local locallist - -- locate locallist in current block object or function root object - if bl then - locallist = bl.locallist - else - locallist = fs.locallist - end - -- enumerate the local list at current scope and deactivate 'em - for _, id in pairs(locallist) do - local obj = localinfo[id] - obj.rem = xref -- set deactivation location - end -end - ----------------------------------------------------------------------- --- creates a new local variable given a name --- * skips internal locals (those starting with '('), so internal --- locals never needs a corresponding adjustlocalvars() call --- * special is true for "self" which must not be optimized --- * used in fornum(), forlist(), parlist(), body() ----------------------------------------------------------------------- - -local function new_localvarliteral(name, special) - if name:sub(1, 1) == "(" then -- can skip internal locals - return - end - new_localvar(name, special) -end - ----------------------------------------------------------------------- --- search the local variable namespace of the given fs for a match --- * returns localinfo index --- * used only in singlevaraux() ----------------------------------------------------------------------- - -local function searchvar(fs, n) - local bl = fs.bl - local locallist - if bl then - locallist = bl.locallist - while locallist do - if locallist[n] then return locallist[n] end -- found - bl = bl.prev - locallist = bl and bl.locallist - end - end - locallist = fs.locallist - return locallist[n] or -1 -- found or not found (-1) -end - ----------------------------------------------------------------------- --- handle locals, globals and upvalues and related processing --- * search mechanism is recursive, calls itself to search parents --- * used only in singlevar() ----------------------------------------------------------------------- - -local function singlevaraux(fs, n, var) - if fs == nil then -- no more levels? - var.k = "VGLOBAL" -- default is global variable - return "VGLOBAL" - else - local v = searchvar(fs, n) -- look up at current level - if v >= 0 then - var.k = "VLOCAL" - var.id = v - -- codegen may need to deal with upvalue here - return "VLOCAL" - else -- not found at current level; try upper one - if singlevaraux(fs.prev, n, var) == "VGLOBAL" then - return "VGLOBAL" - end - -- else was LOCAL or UPVAL, handle here - var.k = "VUPVAL" -- upvalue in this level - return "VUPVAL" - end--if v - end--if fs -end - ----------------------------------------------------------------------- --- consume a name token, creates a variable (global|local|upvalue) --- * used in prefixexp(), funcname() ----------------------------------------------------------------------- - -local function singlevar(v) - local name = str_checkname() - singlevaraux(fs, name, v) - ------------------------------------------------------------------ - -- variable tracking - ------------------------------------------------------------------ - if v.k == "VGLOBAL" then - -- if global being accessed, keep track of it by creating an object - local id = globallookup[name] - if not id then - id = #globalinfo + 1 - globalinfo[id] = { -- new global variable object - name = name, -- global variable name - xref = { nameref }, -- xref, first value is declaration - } - globallookup[name] = id -- remember it - else - local obj = globalinfo[id].xref - obj[#obj + 1] = nameref -- add xref - end - else - -- local/upvalue is being accessed, keep track of it - local obj = localinfo[v.id].xref - obj[#obj + 1] = nameref -- add xref - end -end - ---[[-------------------------------------------------------------------- --- state management functions with open/close pairs -----------------------------------------------------------------------]] - ----------------------------------------------------------------------- --- enters a code unit, initializes elements ----------------------------------------------------------------------- - -local function enterblock(isbreakable) - local bl = {} -- per-block state - bl.isbreakable = isbreakable - bl.prev = fs.bl - bl.locallist = {} - fs.bl = bl -end - ----------------------------------------------------------------------- --- leaves a code unit, close any upvalues ----------------------------------------------------------------------- - -local function leaveblock() - local bl = fs.bl - removevars() - fs.bl = bl.prev -end - ----------------------------------------------------------------------- --- opening of a function --- * top_fs is only for anchoring the top fs, so that parser() can --- return it to the caller function along with useful output --- * used in parser() and body() ----------------------------------------------------------------------- - -local function open_func() - local new_fs -- per-function state - if not fs then -- top_fs is created early - new_fs = top_fs - else - new_fs = {} - end - new_fs.prev = fs -- linked list of function states - new_fs.bl = nil - new_fs.locallist = {} - fs = new_fs -end - ----------------------------------------------------------------------- --- closing of a function --- * used in parser() and body() ----------------------------------------------------------------------- - -local function close_func() - removevars() - fs = fs.prev -end - ---[[-------------------------------------------------------------------- --- other parsing functions --- * for table constructor, parameter list, argument list -----------------------------------------------------------------------]] - ----------------------------------------------------------------------- --- parse a function name suffix, for function call specifications --- * used in primaryexp(), funcname() ----------------------------------------------------------------------- - -local function field(v) - -- field -> ['.' | ':'] NAME - nextt() -- skip the dot or colon - str_checkname() - v.k = "VINDEXED" -end - ----------------------------------------------------------------------- --- parse a table indexing suffix, for constructors, expressions --- * used in recfield(), primaryexp() ----------------------------------------------------------------------- - -local function yindex() - -- index -> '[' expr ']' - nextt() -- skip the '[' - expr({}) - checknext("]") -end - ----------------------------------------------------------------------- --- parse a table record (hash) field --- * used in constructor() ----------------------------------------------------------------------- - -local function recfield() - -- recfield -> (NAME | '['exp1']') = exp1 - if tok == "" then - str_checkname() - else-- tok == '[' - yindex() - end - checknext("=") - expr({}) -end - ----------------------------------------------------------------------- --- parse a table list (array) field --- * used in constructor() ----------------------------------------------------------------------- - -local function listfield(cc) - expr(cc.v) -end - ----------------------------------------------------------------------- --- parse a table constructor --- * used in funcargs(), simpleexp() ----------------------------------------------------------------------- - -local function constructor(t) - -- constructor -> '{' [ field { fieldsep field } [ fieldsep ] ] '}' - -- field -> recfield | listfield - -- fieldsep -> ',' | ';' - local line = ln - local cc = { - v = { k = "VVOID" }, - } - t.k = "VRELOCABLE" - checknext("{") - repeat - if tok == "}" then break end - -- closelistfield(cc) here - local c = tok - if c == "" then -- may be listfields or recfields - if lookahead() ~= "=" then -- look ahead: expression? - listfield(cc) - else - recfield() - end - elseif c == "[" then -- constructor_item -> recfield - recfield() - else -- constructor_part -> listfield - listfield(cc) - end - until not testnext(",") and not testnext(";") - check_match("}", "{", line) - -- lastlistfield(cc) here -end - ----------------------------------------------------------------------- --- parse the arguments (parameters) of a function declaration --- * used in body() ----------------------------------------------------------------------- - -local function parlist() - -- parlist -> [ param { ',' param } ] - local nparams = 0 - if tok ~= ")" then -- is 'parlist' not empty? - repeat - local c = tok - if c == "" then -- param -> NAME - new_localvar(str_checkname()) - nparams = nparams + 1 - elseif c == "..." then - nextt() - fs.is_vararg = true - else - syntaxerror(" or '...' expected") - end - until fs.is_vararg or not testnext(",") - end--if - adjustlocalvars(nparams) -end - ----------------------------------------------------------------------- --- parse the parameters of a function call --- * contrast with parlist(), used in function declarations --- * used in primaryexp() ----------------------------------------------------------------------- - -local function funcargs(f) - local line = ln - local c = tok - if c == "(" then -- funcargs -> '(' [ explist1 ] ')' - if line ~= lastln then - syntaxerror("ambiguous syntax (function call x new statement)") - end - nextt() - if tok ~= ")" then -- arg list is not empty? - explist1() - end - check_match(")", "(", line) - elseif c == "{" then -- funcargs -> constructor - constructor({}) - elseif c == "" then -- funcargs -> STRING - nextt() -- must use 'seminfo' before 'next' - else - syntaxerror("function arguments expected") - return - end--if c - f.k = "VCALL" -end - ---[[-------------------------------------------------------------------- --- mostly expression functions -----------------------------------------------------------------------]] - ----------------------------------------------------------------------- --- parses an expression in parentheses or a single variable --- * used in primaryexp() ----------------------------------------------------------------------- - -local function prefixexp(v) - -- prefixexp -> NAME | '(' expr ')' - local c = tok - if c == "(" then - local line = ln - nextt() - expr(v) - check_match(")", "(", line) - elseif c == "" then - singlevar(v) - else - syntaxerror("unexpected symbol") - end--if c -end - ----------------------------------------------------------------------- --- parses a prefixexp (an expression in parentheses or a single --- variable) or a function call specification --- * used in simpleexp(), assignment(), expr_stat() ----------------------------------------------------------------------- - -local function primaryexp(v) - -- primaryexp -> - -- prefixexp { '.' NAME | '[' exp ']' | ':' NAME funcargs | funcargs } - prefixexp(v) - while true do - local c = tok - if c == "." then -- field - field(v) - elseif c == "[" then -- '[' exp1 ']' - yindex() - elseif c == ":" then -- ':' NAME funcargs - nextt() - str_checkname() - funcargs(v) - elseif c == "(" or c == "" or c == "{" then -- funcargs - funcargs(v) - else - return - end--if c - end--while -end - ----------------------------------------------------------------------- --- parses general expression types, constants handled here --- * used in subexpr() ----------------------------------------------------------------------- - -local function simpleexp(v) - -- simpleexp -> NUMBER | STRING | NIL | TRUE | FALSE | ... | - -- constructor | FUNCTION body | primaryexp - local c = tok - if c == "" then - v.k = "VKNUM" - elseif c == "" then - v.k = "VK" - elseif c == "nil" then - v.k = "VNIL" - elseif c == "true" then - v.k = "VTRUE" - elseif c == "false" then - v.k = "VFALSE" - elseif c == "..." then -- vararg - check_condition(fs.is_vararg == true, - "cannot use '...' outside a vararg function"); - v.k = "VVARARG" - elseif c == "{" then -- constructor - constructor(v) - return - elseif c == "function" then - nextt() - body(false, ln) - return - else - primaryexp(v) - return - end--if c - nextt() -end - ------------------------------------------------------------------------- --- Parse subexpressions. Includes handling of unary operators and binary --- operators. A subexpr is given the rhs priority level of the operator --- immediately left of it, if any (limit is -1 if none,) and if a binop --- is found, limit is compared with the lhs priority level of the binop --- in order to determine which executes first. --- * recursively called --- * used in expr() ------------------------------------------------------------------------- - -local function subexpr(v, limit) - -- subexpr -> (simpleexp | unop subexpr) { binop subexpr } - -- * where 'binop' is any binary operator with a priority - -- higher than 'limit' - local op = tok - local uop = unopr[op] - if uop then - nextt() - subexpr(v, UNARY_PRIORITY) - else - simpleexp(v) - end - -- expand while operators have priorities higher than 'limit' - op = tok - local binop = binopr_left[op] - while binop and binop > limit do - nextt() - -- read sub-expression with higher priority - op = subexpr({}, binopr_right[op]) -- next operator - binop = binopr_left[op] - end - return op -- return first untreated operator -end - ----------------------------------------------------------------------- --- Expression parsing starts here. Function subexpr is entered with the --- left operator (which is non-existent) priority of -1, which is lower --- than all actual operators. Expr information is returned in parm v. --- * used in cond(), explist1(), index(), recfield(), listfield(), --- prefixexp(), while_stat(), exp1() ----------------------------------------------------------------------- - --- this is a forward-referenced local -function expr(v) - -- expr -> subexpr - subexpr(v, 0) -end - ---[[-------------------------------------------------------------------- --- third level parsing functions -----------------------------------------------------------------------]] - ------------------------------------------------------------------------- --- parse a variable assignment sequence --- * recursively called --- * used in expr_stat() ------------------------------------------------------------------------- - -local function assignment(v) - local c = v.v.k - check_condition(c == "VLOCAL" or c == "VUPVAL" or c == "VGLOBAL" - or c == "VINDEXED", "syntax error") - if testnext(",") then -- assignment -> ',' primaryexp assignment - local nv = {} -- expdesc - nv.v = {} - primaryexp(nv.v) - -- lparser.c deals with some register usage conflict here - assignment(nv) - else -- assignment -> '=' explist1 - checknext("=") - explist1() - return -- avoid default - end -end - ----------------------------------------------------------------------- --- parse a for loop body for both versions of the for loop --- * used in fornum(), forlist() ----------------------------------------------------------------------- - -local function forbody(nvars) - -- forbody -> DO block - checknext("do") - enterblock(false) -- scope for declared variables - adjustlocalvars(nvars) - block() - leaveblock() -- end of scope for declared variables -end - ----------------------------------------------------------------------- --- parse a numerical for loop, calls forbody() --- * used in for_stat() ----------------------------------------------------------------------- - -local function fornum(varname) - -- fornum -> NAME = exp1, exp1 [, exp1] DO body - new_localvarliteral("(for index)") - new_localvarliteral("(for limit)") - new_localvarliteral("(for step)") - new_localvar(varname) - checknext("=") - exp1() -- initial value - checknext(",") - exp1() -- limit - if testnext(",") then - exp1() -- optional step - else - -- default step = 1 - end - forbody(1) -end - ----------------------------------------------------------------------- --- parse a generic for loop, calls forbody() --- * used in for_stat() ----------------------------------------------------------------------- - -local function forlist(indexname) - -- forlist -> NAME {, NAME} IN explist1 DO body - -- create control variables - new_localvarliteral("(for generator)") - new_localvarliteral("(for state)") - new_localvarliteral("(for control)") - -- create declared variables - new_localvar(indexname) - local nvars = 1 - while testnext(",") do - new_localvar(str_checkname()) - nvars = nvars + 1 - end - checknext("in") - explist1() - forbody(nvars) -end - ----------------------------------------------------------------------- --- parse a function name specification --- * used in func_stat() ----------------------------------------------------------------------- - -local function funcname(v) - -- funcname -> NAME {field} [':' NAME] - local needself = false - singlevar(v) - while tok == "." do - field(v) - end - if tok == ":" then - needself = true - field(v) - end - return needself -end - ----------------------------------------------------------------------- --- parse the single expressions needed in numerical for loops --- * used in fornum() ----------------------------------------------------------------------- - --- this is a forward-referenced local -function exp1() - -- exp1 -> expr - expr({}) -end - ----------------------------------------------------------------------- --- parse condition in a repeat statement or an if control structure --- * used in repeat_stat(), test_then_block() ----------------------------------------------------------------------- - -local function cond() - -- cond -> expr - expr({}) -- read condition -end - ----------------------------------------------------------------------- --- parse part of an if control structure, including the condition --- * used in if_stat() ----------------------------------------------------------------------- - -local function test_then_block() - -- test_then_block -> [IF | ELSEIF] cond THEN block - nextt() -- skip IF or ELSEIF - cond() - checknext("then") - block() -- 'then' part -end - ----------------------------------------------------------------------- --- parse a local function statement --- * used in local_stat() ----------------------------------------------------------------------- - -local function localfunc() - -- localfunc -> NAME body - new_localvar(str_checkname()) - adjustlocalvars(1) - body(false, ln) -end - ----------------------------------------------------------------------- --- parse a local variable declaration statement --- * used in local_stat() ----------------------------------------------------------------------- - -local function localstat() - -- localstat -> NAME {',' NAME} ['=' explist1] - local nvars = 0 - repeat - new_localvar(str_checkname()) - nvars = nvars + 1 - until not testnext(",") - if testnext("=") then - explist1() - else - -- VVOID - end - adjustlocalvars(nvars) -end - ----------------------------------------------------------------------- --- parse a list of comma-separated expressions --- * used in return_stat(), localstat(), funcargs(), assignment(), --- forlist() ----------------------------------------------------------------------- - --- this is a forward-referenced local -function explist1() - -- explist1 -> expr { ',' expr } - local e = {} - expr(e) - while testnext(",") do - expr(e) - end -end - ----------------------------------------------------------------------- --- parse function declaration body --- * used in simpleexp(), localfunc(), func_stat() ----------------------------------------------------------------------- - --- this is a forward-referenced local -function body(needself, line) - -- body -> '(' parlist ')' chunk END - open_func() - checknext("(") - if needself then - new_localvarliteral("self", true) - adjustlocalvars(1) - end - parlist() - checknext(")") - chunk() - check_match("end", "function", line) - close_func() -end - ----------------------------------------------------------------------- --- parse a code block or unit --- * used in do_stat(), while_stat(), forbody(), test_then_block(), --- if_stat() ----------------------------------------------------------------------- - --- this is a forward-referenced local -function block() - -- block -> chunk - enterblock(false) - chunk() - leaveblock() -end - ---[[-------------------------------------------------------------------- --- second level parsing functions, all with '_stat' suffix --- * since they are called via a table lookup, they cannot be local --- functions (a lookup table of local functions might be smaller...) --- * stat() -> *_stat() -----------------------------------------------------------------------]] - ----------------------------------------------------------------------- --- initial parsing for a for loop, calls fornum() or forlist() --- * removed 'line' parameter (used to set debug information only) --- * used in stat() ----------------------------------------------------------------------- - -local function for_stat() - -- stat -> for_stat -> FOR (fornum | forlist) END - local line = line - enterblock(true) -- scope for loop and control variables - nextt() -- skip 'for' - local varname = str_checkname() -- first variable name - local c = tok - if c == "=" then - fornum(varname) - elseif c == "," or c == "in" then - forlist(varname) - else - syntaxerror("'=' or 'in' expected") - end - check_match("end", "for", line) - leaveblock() -- loop scope (`break' jumps to this point) -end - ----------------------------------------------------------------------- --- parse a while-do control structure, body processed by block() --- * used in stat() ----------------------------------------------------------------------- - -local function while_stat() - -- stat -> while_stat -> WHILE cond DO block END - local line = line - nextt() -- skip WHILE - cond() -- parse condition - enterblock(true) - checknext("do") - block() - check_match("end", "while", line) - leaveblock() -end - ----------------------------------------------------------------------- --- parse a repeat-until control structure, body parsed by chunk() --- * originally, repeatstat() calls breakstat() too if there is an --- upvalue in the scope block; nothing is actually lexed, it is --- actually the common code in breakstat() for closing of upvalues --- * used in stat() ----------------------------------------------------------------------- - -local function repeat_stat() - -- stat -> repeat_stat -> REPEAT block UNTIL cond - local line = line - enterblock(true) -- loop block - enterblock(false) -- scope block - nextt() -- skip REPEAT - chunk() - check_match("until", "repeat", line) - cond() - -- close upvalues at scope level below - leaveblock() -- finish scope - leaveblock() -- finish loop -end - ----------------------------------------------------------------------- --- parse an if control structure --- * used in stat() ----------------------------------------------------------------------- - -local function if_stat() - -- stat -> if_stat -> IF cond THEN block - -- {ELSEIF cond THEN block} [ELSE block] END - local line = line - test_then_block() -- IF cond THEN block - while tok == "elseif" do - test_then_block() -- ELSEIF cond THEN block - end - if tok == "else" then - nextt() -- skip ELSE - block() -- 'else' part - end - check_match("end", "if", line) -end - ----------------------------------------------------------------------- --- parse a return statement --- * used in stat() ----------------------------------------------------------------------- - -local function return_stat() - -- stat -> return_stat -> RETURN explist - nextt() -- skip RETURN - local c = tok - if block_follow[c] or c == ";" then - -- return no values - else - explist1() -- optional return values - end -end - ----------------------------------------------------------------------- --- parse a break statement --- * used in stat() ----------------------------------------------------------------------- - -local function break_stat() - -- stat -> break_stat -> BREAK - local bl = fs.bl - nextt() -- skip BREAK - while bl and not bl.isbreakable do -- find a breakable block - bl = bl.prev - end - if not bl then - syntaxerror("no loop to break") - end -end - ----------------------------------------------------------------------- --- parse a label statement --- * this function has been added later, it just parses label statement --- without any validation! --- * used in stat() ----------------------------------------------------------------------- - -local function label_stat() - -- stat -> label_stat -> '::' NAME '::' - nextt() -- skip '::' - str_checkname() - checknext("::") -end - ----------------------------------------------------------------------- --- parse a goto statement --- * this function has been added later, it just parses goto statement --- without any validation! --- * used in stat() ----------------------------------------------------------------------- - -local function goto_stat() - -- stat -> goto_stat -> GOTO NAME - nextt() -- skip GOTO - str_checkname() -end - ----------------------------------------------------------------------- --- parse a function call with no returns or an assignment statement --- * the struct with .prev is used for name searching in lparse.c, --- so it is retained for now; present in assignment() also --- * used in stat() ----------------------------------------------------------------------- - -local function expr_stat() - local id = tpos - 1 - -- stat -> expr_stat -> func | assignment - local v = { v = {} } - primaryexp(v.v) - if v.v.k == "VCALL" then -- stat -> func - -- call statement uses no results - statinfo[id] = "call" - else -- stat -> assignment - v.prev = nil - assignment(v) - statinfo[id] = "assign" - end -end - ----------------------------------------------------------------------- --- parse a function statement --- * used in stat() ----------------------------------------------------------------------- - -local function function_stat() - -- stat -> function_stat -> FUNCTION funcname body - local line = line - nextt() -- skip FUNCTION - local needself = funcname({}) - body(needself, line) -end - ----------------------------------------------------------------------- --- parse a simple block enclosed by a DO..END pair --- * used in stat() ----------------------------------------------------------------------- - -local function do_stat() - -- stat -> do_stat -> DO block END - local line = line - nextt() -- skip DO - block() - check_match("end", "do", line) -end - ----------------------------------------------------------------------- --- parse a statement starting with LOCAL --- * used in stat() ----------------------------------------------------------------------- - -local function local_stat() - -- stat -> local_stat -> LOCAL FUNCTION localfunc - -- -> LOCAL localstat - nextt() -- skip LOCAL - if testnext("function") then -- local function? - localfunc() - else - localstat() - end -end - ---[[-------------------------------------------------------------------- --- main functions, top level parsing functions --- * accessible functions are: init(lexer), parser() --- * [entry] -> parser() -> chunk() -> stat() -----------------------------------------------------------------------]] - ----------------------------------------------------------------------- --- initial parsing for statements, calls '_stat' suffixed functions --- * used in chunk() ----------------------------------------------------------------------- - -local stat_call = { -- lookup for calls in stat() - ["if"] = if_stat, - ["while"] = while_stat, - ["do"] = do_stat, - ["for"] = for_stat, - ["repeat"] = repeat_stat, - ["function"] = function_stat, - ["local"] = local_stat, - ["return"] = return_stat, - ["break"] = break_stat, - ["goto"] = goto_stat, - ["::"] = label_stat, -} - -local function stat() - -- stat -> if_stat while_stat do_stat for_stat repeat_stat - -- function_stat local_stat return_stat break_stat - -- expr_stat - line = ln -- may be needed for error messages - local c = tok - local fn = stat_call[c] - -- handles: if while do for repeat function local return break - if fn then - statinfo[tpos - 1] = c - fn() - -- return must be last statement - if c == "return" then return true end - else - expr_stat() - end - return false -end - ----------------------------------------------------------------------- --- parse a chunk, which consists of a bunch of statements --- * used in parser(), body(), block(), repeat_stat() ----------------------------------------------------------------------- - --- this is a forward-referenced local -function chunk() - -- chunk -> { stat [';'] } - local islast = false - while not islast and not block_follow[tok] do - islast = stat() - testnext(";") - end -end - ----------------------------------------------------------------------- --- initialization function ----------------------------------------------------------------------- - -local function init(tokorig, seminfoorig, toklnorig) - tpos = 1 -- token position - top_fs = {} -- reset top level function state - ------------------------------------------------------------------ - -- set up grammar-only token tables; impedance-matching... - -- note that constants returned by the lexer is source-level, so - -- for now, fake(!) constant tokens (TK_NUMBER|TK_STRING|TK_LSTRING) - ------------------------------------------------------------------ - local j = 1 - toklist, seminfolist, toklnlist, xreflist = {}, {}, {}, {} - for i = 1, #tokorig do - local tok = tokorig[i] - local yep = true - if tok == "TK_KEYWORD" or tok == "TK_OP" then - tok = seminfoorig[i] - elseif tok == "TK_NAME" then - tok = "" - seminfolist[j] = seminfoorig[i] - elseif tok == "TK_NUMBER" then - tok = "" - seminfolist[j] = 0 -- fake! - elseif tok == "TK_STRING" or tok == "TK_LSTRING" then - tok = "" - seminfolist[j] = "" -- fake! - elseif tok == "TK_EOS" then - tok = "" - else - -- non-grammar tokens; ignore them - yep = false - end - if yep then -- set rest of the information - toklist[j] = tok - toklnlist[j] = toklnorig[i] - xreflist[j] = i - j = j + 1 - end - end--for - ------------------------------------------------------------------ - -- initialize data structures for variable tracking - ------------------------------------------------------------------ - globalinfo, globallookup, localinfo = {}, {}, {} - ilocalinfo, ilocalrefs = {}, {} - statinfo = {} -- experimental -end - ----------------------------------------------------------------------- --- performs parsing, returns parsed data structure ----------------------------------------------------------------------- - -function M.parse(tokens, seminfo, tokens_ln) - init(tokens, seminfo, tokens_ln) - - open_func() - fs.is_vararg = true -- main func. is always vararg - nextt() -- read first token - chunk() - check("") - close_func() - return { -- return everything - globalinfo = globalinfo, - localinfo = localinfo, - statinfo = statinfo, - toklist = toklist, - seminfolist = seminfolist, - toklnlist = toklnlist, - xreflist = xreflist, - } -end - -return M diff --git a/Utils/luarocks/share/lua/5.1/luasrcdiet/optlex.lua b/Utils/luarocks/share/lua/5.1/luasrcdiet/optlex.lua deleted file mode 100644 index 70c06bb44..000000000 --- a/Utils/luarocks/share/lua/5.1/luasrcdiet/optlex.lua +++ /dev/null @@ -1,852 +0,0 @@ ---------- --- This module does lexer-based optimizations. --- --- **Notes:** --- --- * TODO: General string delimiter conversion optimizer. --- * TODO: (numbers) warn if overly significant digit. ----- -local char = string.char -local find = string.find -local match = string.match -local rep = string.rep -local sub = string.sub -local tonumber = tonumber -local tostring = tostring - -local print -- set in optimize() - -local M = {} - --- error function, can override by setting own function into module -M.error = error - -M.warn = {} -- table for warning flags - -local stoks, sinfos, stoklns -- source lists - -local is_realtoken = { -- significant (grammar) tokens - TK_KEYWORD = true, - TK_NAME = true, - TK_NUMBER = true, - TK_STRING = true, - TK_LSTRING = true, - TK_OP = true, - TK_EOS = true, -} -local is_faketoken = { -- whitespace (non-grammar) tokens - TK_COMMENT = true, - TK_LCOMMENT = true, - TK_EOL = true, - TK_SPACE = true, -} - -local opt_details -- for extra information - ---- Returns true if current token is at the start of a line. --- --- It skips over deleted tokens via recursion. --- --- @tparam int i --- @treturn bool -local function atlinestart(i) - local tok = stoks[i - 1] - if i <= 1 or tok == "TK_EOL" then - return true - elseif tok == "" then - return atlinestart(i - 1) - end - return false -end - ---- Returns true if current token is at the end of a line. --- --- It skips over deleted tokens via recursion. --- --- @tparam int i --- @treturn bool -local function atlineend(i) - local tok = stoks[i + 1] - if i >= #stoks or tok == "TK_EOL" or tok == "TK_EOS" then - return true - elseif tok == "" then - return atlineend(i + 1) - end - return false -end - ---- Counts comment EOLs inside a long comment. --- --- In order to keep line numbering, EOLs need to be reinserted. --- --- @tparam string lcomment --- @treturn int -local function commenteols(lcomment) - local sep = #match(lcomment, "^%-%-%[=*%[") - local z = sub(lcomment, sep + 1, -(sep - 1)) -- remove delims - local i, c = 1, 0 - while true do - local p, _, r, s = find(z, "([\r\n])([\r\n]?)", i) - if not p then break end -- if no matches, done - i = p + 1 - c = c + 1 - if #s > 0 and r ~= s then -- skip CRLF or LFCR - i = i + 1 - end - end - return c -end - ---- Compares two tokens (i, j) and returns the whitespace required. --- --- See documentation for a reference table of interactions. --- --- Only two grammar/real tokens are being considered: --- --- * if `""`, no separation is needed, --- * if `" "`, then at least one whitespace (or EOL) is required. --- --- Note: This doesn't work at the start or the end or for EOS! --- --- @tparam int i --- @tparam int j --- @treturn string -local function checkpair(i, j) - local t1, t2 = stoks[i], stoks[j] - - if t1 == "TK_STRING" or t1 == "TK_LSTRING" or - t2 == "TK_STRING" or t2 == "TK_LSTRING" then - return "" - - elseif t1 == "TK_OP" or t2 == "TK_OP" then - if (t1 == "TK_OP" and (t2 == "TK_KEYWORD" or t2 == "TK_NAME")) or - (t2 == "TK_OP" and (t1 == "TK_KEYWORD" or t1 == "TK_NAME")) then - return "" - end - if t1 == "TK_OP" and t2 == "TK_OP" then - -- for TK_OP/TK_OP pairs, see notes in technotes.txt - local op, op2 = sinfos[i], sinfos[j] - if (match(op, "^%.%.?$") and match(op2, "^%.")) or - (match(op, "^[~=<>]$") and op2 == "=") or - (op == "[" and (op2 == "[" or op2 == "=")) then - return " " - end - return "" - end - -- "TK_OP" + "TK_NUMBER" case - local op = sinfos[i] - if t2 == "TK_OP" then op = sinfos[j] end - if match(op, "^%.%.?%.?$") then - return " " - end - return "" - - else-- "TK_KEYWORD" | "TK_NAME" | "TK_NUMBER" then - return " " - - end -end - ---- Repack tokens, removing deletions caused by optimization process. -local function repack_tokens() - local dtoks, dinfos, dtoklns = {}, {}, {} - local j = 1 - for i = 1, #stoks do - local tok = stoks[i] - if tok ~= "" then - dtoks[j], dinfos[j], dtoklns[j] = tok, sinfos[i], stoklns[i] - j = j + 1 - end - end - stoks, sinfos, stoklns = dtoks, dinfos, dtoklns -end - ---- Does number optimization. --- --- Optimization using string formatting functions is one way of doing this, --- but here, we consider all cases and handle them separately (possibly an --- idiotic approach...). --- --- Scientific notation being generated is not in canonical form, this may or --- may not be a bad thing. --- --- Note: Intermediate portions need to fit into a normal number range. --- --- Optimizations can be divided based on number patterns: --- --- * hexadecimal: --- (1) no need to remove leading zeros, just skip to (2) --- (2) convert to integer if size equal or smaller --- * change if equal size -> lose the 'x' to reduce entropy --- (3) number is then processed as an integer --- (4) note: does not make 0[xX] consistent --- * integer: --- (1) reduce useless fractional part, if present, e.g. 123.000 -> 123. --- (2) remove leading zeros, e.g. 000123 --- * float: --- (1) split into digits dot digits --- (2) if no integer portion, take as zero (can omit later) --- (3) handle degenerate .000 case, after which the fractional part --- must be non-zero (if zero, it's matched as float .0) --- (4) remove trailing zeros for fractional portion --- (5) p.q where p > 0 and q > 0 cannot be shortened any more --- (6) otherwise p == 0 and the form is .q, e.g. .000123 --- (7) if scientific shorter, convert, e.g. .000123 -> 123e-6 --- * scientific: --- (1) split into (digits dot digits) [eE] ([+-] digits) --- (2) if significand is zero, just use .0 --- (3) remove leading zeros for significand --- (4) shift out trailing zeros for significand --- (5) examine exponent and determine which format is best: --- number with fraction, or scientific --- --- Note: Number with fraction and scientific number is never converted --- to integer, because Lua 5.3 distinguishes between integers and floats. --- --- --- @tparam int i -local function do_number(i) - local before = sinfos[i] -- 'before' - local z = before -- working representation - local y -- 'after', if better - -------------------------------------------------------------------- - if match(z, "^0[xX]") then -- hexadecimal number - local v = tostring(tonumber(z)) - if #v <= #z then - z = v -- change to integer, AND continue - else - return -- no change; stick to hex - end - end - - if match(z, "^%d+$") then -- integer - if tonumber(z) > 0 then - y = match(z, "^0*([1-9]%d*)$") -- remove leading zeros - else - y = "0" -- basic zero - end - - elseif not match(z, "[eE]") then -- float - local p, q = match(z, "^(%d*)%.(%d*)$") -- split - if p == "" then p = 0 end -- int part zero - if q == "" then q = "0" end -- fraction part zero - if tonumber(q) == 0 and p == 0 then - y = ".0" -- degenerate .000 to .0 - else - -- now, q > 0 holds and p is a number - local zeros_cnt = #match(q, "0*$") -- remove trailing zeros - if zeros_cnt > 0 then - q = sub(q, 1, #q - zeros_cnt) - end - -- if p > 0, nothing else we can do to simplify p.q case - if tonumber(p) > 0 then - y = p.."."..q - else - y = "."..q -- tentative, e.g. .000123 - local v = #match(q, "^0*") -- # leading spaces - local w = #q - v -- # significant digits - local nv = tostring(#q) - -- e.g. compare 123e-6 versus .000123 - if w + 2 + #nv < 1 + #q then - y = sub(q, -w).."e-"..nv - end - end - end - - else -- scientific number - local sig, ex = match(z, "^([^eE]+)[eE]([%+%-]?%d+)$") - ex = tonumber(ex) - -- if got ".", shift out fractional portion of significand - local p, q = match(sig, "^(%d*)%.(%d*)$") - if p then - ex = ex - #q - sig = p..q - end - if tonumber(sig) == 0 then - y = ".0" -- basic float zero - else - local v = #match(sig, "^0*") -- remove leading zeros - sig = sub(sig, v + 1) - v = #match(sig, "0*$") -- shift out trailing zeros - if v > 0 then - sig = sub(sig, 1, #sig - v) - ex = ex + v - end - -- examine exponent and determine which format is best - local nex = tostring(ex) - if ex >= 0 and (ex <= 1 + #nex) then -- a float - y = sig..rep("0", ex).."." - elseif ex < 0 and (ex >= -#sig) then -- fraction, e.g. .123 - v = #sig + ex - y = sub(sig, 1, v).."."..sub(sig, v + 1) - elseif ex < 0 and (#nex >= -ex - #sig) then - -- e.g. compare 1234e-5 versus .01234 - -- gives: #sig + 1 + #nex >= 1 + (-ex - #sig) + #sig - -- -> #nex >= -ex - #sig - v = -ex - #sig - y = "."..rep("0", v)..sig - else -- non-canonical scientific representation - y = sig.."e"..ex - end - end--if sig - end - - if y and y ~= sinfos[i] then - if opt_details then - print(" (line "..stoklns[i]..") "..sinfos[i].." -> "..y) - opt_details = opt_details + 1 - end - sinfos[i] = y - end -end - ---- Does string optimization. --- --- Note: It works on well-formed strings only! --- --- Optimizations on characters can be summarized as follows: --- --- \a\b\f\n\r\t\v -- no change --- \\ -- no change --- \"\' -- depends on delim, other can remove \ --- \[\] -- remove \ --- \ -- general escape, remove \ (Lua 5.1 only) --- \ -- normalize the EOL only --- \ddd -- if \a\b\f\n\r\t\v, change to latter --- if other < ascii 32, keep ddd but zap leading zeros --- but cannot have following digits --- if >= ascii 32, translate it into the literal, then also --- do escapes for \\,\",\' cases --- -- no change --- --- Switch delimiters if string becomes shorter. --- --- @tparam int I -local function do_string(I) - local info = sinfos[I] - local delim = sub(info, 1, 1) -- delimiter used - local ndelim = (delim == "'") and '"' or "'" -- opposite " <-> ' - local z = sub(info, 2, -2) -- actual string - local i = 1 - local c_delim, c_ndelim = 0, 0 -- "/' counts - - while i <= #z do - local c = sub(z, i, i) - - if c == "\\" then -- escaped stuff - local j = i + 1 - local d = sub(z, j, j) - local p = find("abfnrtv\\\n\r\"\'0123456789", d, 1, true) - - if not p then -- \ -- remove \ (Lua 5.1 only) - z = sub(z, 1, i - 1)..sub(z, j) - i = i + 1 - - elseif p <= 8 then -- \a\b\f\n\r\t\v\\ - i = i + 2 -- no change - - elseif p <= 10 then -- \ -- normalize EOL - local eol = sub(z, j, j + 1) - if eol == "\r\n" or eol == "\n\r" then - z = sub(z, 1, i).."\n"..sub(z, j + 2) - elseif p == 10 then -- \r case - z = sub(z, 1, i).."\n"..sub(z, j + 1) - end - i = i + 2 - - elseif p <= 12 then -- \"\' -- remove \ for ndelim - if d == delim then - c_delim = c_delim + 1 - i = i + 2 - else - c_ndelim = c_ndelim + 1 - z = sub(z, 1, i - 1)..sub(z, j) - i = i + 1 - end - - else -- \ddd -- various steps - local s = match(z, "^(%d%d?%d?)", j) - j = i + 1 + #s -- skip to location - local cv = tonumber(s) - local cc = char(cv) - p = find("\a\b\f\n\r\t\v", cc, 1, true) - if p then -- special escapes - s = "\\"..sub("abfnrtv", p, p) - elseif cv < 32 then -- normalized \ddd - if match(sub(z, j, j), "%d") then - -- if a digit follows, \ddd cannot be shortened - s = "\\"..s - else - s = "\\"..cv - end - elseif cc == delim then -- \ - s = "\\"..cc - c_delim = c_delim + 1 - elseif cc == "\\" then -- \\ - s = "\\\\" - else -- literal character - s = cc - if cc == ndelim then - c_ndelim = c_ndelim + 1 - end - end - z = sub(z, 1, i - 1)..s..sub(z, j) - i = i + #s - - end--if p - - else-- c ~= "\\" -- -- no change - i = i + 1 - if c == ndelim then -- count ndelim, for switching delimiters - c_ndelim = c_ndelim + 1 - end - - end--if c - end--while - - -- Switching delimiters, a long-winded derivation: - -- (1) delim takes 2+2*c_delim bytes, ndelim takes c_ndelim bytes - -- (2) delim becomes c_delim bytes, ndelim becomes 2+2*c_ndelim bytes - -- simplifying the condition (1)>(2) --> c_delim > c_ndelim - if c_delim > c_ndelim then - i = 1 - while i <= #z do - local p, _, r = find(z, "([\'\"])", i) - if not p then break end - if r == delim then -- \ -> - z = sub(z, 1, p - 2)..sub(z, p) - i = p - else-- r == ndelim -- -> \ - z = sub(z, 1, p - 1).."\\"..sub(z, p) - i = p + 2 - end - end--while - delim = ndelim -- actually change delimiters - end - - z = delim..z..delim - if z ~= sinfos[I] then - if opt_details then - print(" (line "..stoklns[I]..") "..sinfos[I].." -> "..z) - opt_details = opt_details + 1 - end - sinfos[I] = z - end -end - ---- Does long string optimization. --- --- * remove first optional newline --- * normalize embedded newlines --- * reduce '=' separators in delimiters if possible --- --- Note: warning flagged if trailing whitespace found, not trimmed. --- --- @tparam int I -local function do_lstring(I) - local info = sinfos[I] - local delim1 = match(info, "^%[=*%[") -- cut out delimiters - local sep = #delim1 - local delim2 = sub(info, -sep, -1) - local z = sub(info, sep + 1, -(sep + 1)) -- lstring without delims - local y = "" - local i = 1 - - while true do - local p, _, r, s = find(z, "([\r\n])([\r\n]?)", i) - -- deal with a single line - local ln - if not p then - ln = sub(z, i) - elseif p >= i then - ln = sub(z, i, p - 1) - end - if ln ~= "" then - -- flag a warning if there are trailing spaces, won't optimize! - if match(ln, "%s+$") then - M.warn.LSTRING = "trailing whitespace in long string near line "..stoklns[I] - end - y = y..ln - end - if not p then -- done if no more EOLs - break - end - -- deal with line endings, normalize them - i = p + 1 - if p then - if #s > 0 and r ~= s then -- skip CRLF or LFCR - i = i + 1 - end - -- skip first newline, which can be safely deleted - if not(i == 1 and i == p) then - y = y.."\n" - end - end - end--while - - -- handle possible deletion of one or more '=' separators - if sep >= 3 then - local chk, okay = sep - 1 - -- loop to test ending delimiter with less of '=' down to zero - while chk >= 2 do - local delim = "%]"..rep("=", chk - 2).."%]" - if not match(y, delim) then okay = chk end - chk = chk - 1 - end - if okay then -- change delimiters - sep = rep("=", okay - 2) - delim1, delim2 = "["..sep.."[", "]"..sep.."]" - end - end - - sinfos[I] = delim1..y..delim2 -end - ---- Does long comment optimization. --- --- * trim trailing whitespace --- * normalize embedded newlines --- * reduce '=' separators in delimiters if possible --- --- Note: It does not remove first optional newline. --- --- @tparam int I -local function do_lcomment(I) - local info = sinfos[I] - local delim1 = match(info, "^%-%-%[=*%[") -- cut out delimiters - local sep = #delim1 - local delim2 = sub(info, -(sep - 2), -1) - local z = sub(info, sep + 1, -(sep - 1)) -- comment without delims - local y = "" - local i = 1 - - while true do - local p, _, r, s = find(z, "([\r\n])([\r\n]?)", i) - -- deal with a single line, extract and check trailing whitespace - local ln - if not p then - ln = sub(z, i) - elseif p >= i then - ln = sub(z, i, p - 1) - end - if ln ~= "" then - -- trim trailing whitespace if non-empty line - local ws = match(ln, "%s*$") - if #ws > 0 then ln = sub(ln, 1, -(ws + 1)) end - y = y..ln - end - if not p then -- done if no more EOLs - break - end - -- deal with line endings, normalize them - i = p + 1 - if p then - if #s > 0 and r ~= s then -- skip CRLF or LFCR - i = i + 1 - end - y = y.."\n" - end - end--while - - -- handle possible deletion of one or more '=' separators - sep = sep - 2 - if sep >= 3 then - local chk, okay = sep - 1 - -- loop to test ending delimiter with less of '=' down to zero - while chk >= 2 do - local delim = "%]"..rep("=", chk - 2).."%]" - if not match(y, delim) then okay = chk end - chk = chk - 1 - end - if okay then -- change delimiters - sep = rep("=", okay - 2) - delim1, delim2 = "--["..sep.."[", "]"..sep.."]" - end - end - - sinfos[I] = delim1..y..delim2 -end - ---- Does short comment optimization. --- --- * trim trailing whitespace --- --- @tparam int i -local function do_comment(i) - local info = sinfos[i] - local ws = match(info, "%s*$") -- just look from end of string - if #ws > 0 then - info = sub(info, 1, -(ws + 1)) -- trim trailing whitespace - end - sinfos[i] = info -end - ---- Returns true if string found in long comment. --- --- This is a feature to keep copyright or license texts. --- --- @tparam bool opt_keep --- @tparam string info --- @treturn bool -local function keep_lcomment(opt_keep, info) - if not opt_keep then return false end -- option not set - local delim1 = match(info, "^%-%-%[=*%[") -- cut out delimiters - local sep = #delim1 - local z = sub(info, sep + 1, -(sep - 1)) -- comment without delims - if find(z, opt_keep, 1, true) then -- try to match - return true - end -end - ---- The main entry point. --- --- * currently, lexer processing has 2 passes --- * processing is done on a line-oriented basis, which is easier to --- grok due to the next point... --- * since there are various options that can be enabled or disabled, --- processing is a little messy or convoluted --- --- @tparam {[string]=bool,...} option --- @tparam {string,...} toklist --- @tparam {string,...} semlist --- @tparam {int,...} toklnlist --- @treturn {string,...} toklist --- @treturn {string,...} semlist --- @treturn {int,...} toklnlist -function M.optimize(option, toklist, semlist, toklnlist) - -- Set option flags. - local opt_comments = option["opt-comments"] - local opt_whitespace = option["opt-whitespace"] - local opt_emptylines = option["opt-emptylines"] - local opt_eols = option["opt-eols"] - local opt_strings = option["opt-strings"] - local opt_numbers = option["opt-numbers"] - local opt_x = option["opt-experimental"] - local opt_keep = option.KEEP - opt_details = option.DETAILS and 0 -- upvalues for details display - print = M.print or _G.print - if opt_eols then -- forced settings, otherwise won't work properly - opt_comments = true - opt_whitespace = true - opt_emptylines = true - elseif opt_x then - opt_whitespace = true - end - - -- Variable initialization. - stoks, sinfos, stoklns -- set source lists - = toklist, semlist, toklnlist - local i = 1 -- token position - local tok, info -- current token - local prev -- position of last grammar token - -- on same line (for TK_SPACE stuff) - - -- Changes a token, info pair. - local function settoken(tok, info, I) --luacheck: ignore 431 - I = I or i - stoks[I] = tok or "" - sinfos[I] = info or "" - end - - -- Experimental optimization for ';' operator. - if opt_x then - while true do - tok, info = stoks[i], sinfos[i] - if tok == "TK_EOS" then -- end of stream/pass - break - elseif tok == "TK_OP" and info == ";" then - -- ';' operator found, since it is entirely optional, set it - -- as a space to let whitespace optimization do the rest - settoken("TK_SPACE", " ") - end - i = i + 1 - end - repack_tokens() - end - - -- Processing loop (PASS 1) - i = 1 - while true do - tok, info = stoks[i], sinfos[i] - - local atstart = atlinestart(i) -- set line begin flag - if atstart then prev = nil end - - if tok == "TK_EOS" then -- end of stream/pass - break - - elseif tok == "TK_KEYWORD" or -- keywords, identifiers, - tok == "TK_NAME" or -- operators - tok == "TK_OP" then - -- TK_KEYWORD and TK_OP can't be optimized without a big - -- optimization framework; it would be more of an optimizing - -- compiler, not a source code compressor - -- TK_NAME that are locals needs parser to analyze/optimize - prev = i - - elseif tok == "TK_NUMBER" then -- numbers - if opt_numbers then - do_number(i) -- optimize - end - prev = i - - elseif tok == "TK_STRING" or -- strings, long strings - tok == "TK_LSTRING" then - if opt_strings then - if tok == "TK_STRING" then - do_string(i) -- optimize - else - do_lstring(i) -- optimize - end - end - prev = i - - elseif tok == "TK_COMMENT" then -- short comments - if opt_comments then - if i == 1 and sub(info, 1, 1) == "#" then - -- keep shbang comment, trim whitespace - do_comment(i) - else - -- safe to delete, as a TK_EOL (or TK_EOS) always follows - settoken() -- remove entirely - end - elseif opt_whitespace then -- trim whitespace only - do_comment(i) - end - - elseif tok == "TK_LCOMMENT" then -- long comments - if keep_lcomment(opt_keep, info) then - -- if --keep, we keep a long comment if is found; - -- this is a feature to keep copyright or license texts - if opt_whitespace then -- trim whitespace only - do_lcomment(i) - end - prev = i - elseif opt_comments then - local eols = commenteols(info) - - -- prepare opt_emptylines case first, if a disposable token - -- follows, current one is safe to dump, else keep a space; - -- it is implied that the operation is safe for '-', because - -- current is a TK_LCOMMENT, and must be separate from a '-' - if is_faketoken[stoks[i + 1]] then - settoken() -- remove entirely - tok = "" - else - settoken("TK_SPACE", " ") - end - - -- if there are embedded EOLs to keep and opt_emptylines is - -- disabled, then switch the token into one or more EOLs - if not opt_emptylines and eols > 0 then - settoken("TK_EOL", rep("\n", eols)) - end - - -- if optimizing whitespaces, force reinterpretation of the - -- token to give a chance for the space to be optimized away - if opt_whitespace and tok ~= "" then - i = i - 1 -- to reinterpret - end - else -- disabled case - if opt_whitespace then -- trim whitespace only - do_lcomment(i) - end - prev = i - end - - elseif tok == "TK_EOL" then -- line endings - if atstart and opt_emptylines then - settoken() -- remove entirely - elseif info == "\r\n" or info == "\n\r" then - -- normalize the rest of the EOLs for CRLF/LFCR only - -- (note that TK_LCOMMENT can change into several EOLs) - settoken("TK_EOL", "\n") - end - - elseif tok == "TK_SPACE" then -- whitespace - if opt_whitespace then - if atstart or atlineend(i) then - -- delete leading and trailing whitespace - settoken() -- remove entirely - else - - -- at this point, since leading whitespace have been removed, - -- there should be a either a real token or a TK_LCOMMENT - -- prior to hitting this whitespace; the TK_LCOMMENT case - -- only happens if opt_comments is disabled; so prev ~= nil - local ptok = stoks[prev] - if ptok == "TK_LCOMMENT" then - -- previous TK_LCOMMENT can abut with anything - settoken() -- remove entirely - else - -- prev must be a grammar token; consecutive TK_SPACE - -- tokens is impossible when optimizing whitespace - local ntok = stoks[i + 1] - if is_faketoken[ntok] then - -- handle special case where a '-' cannot abut with - -- either a short comment or a long comment - if (ntok == "TK_COMMENT" or ntok == "TK_LCOMMENT") and - ptok == "TK_OP" and sinfos[prev] == "-" then - -- keep token - else - settoken() -- remove entirely - end - else--is_realtoken - -- check a pair of grammar tokens, if can abut, then - -- delete space token entirely, otherwise keep one space - local s = checkpair(prev, i + 1) - if s == "" then - settoken() -- remove entirely - else - settoken("TK_SPACE", " ") - end - end - end - - end - end - - else - error("unidentified token encountered") - end - - i = i + 1 - end--while - repack_tokens() - - -- Processing loop (PASS 2) - if opt_eols then - i = 1 - -- Aggressive EOL removal only works with most non-grammar tokens - -- optimized away because it is a rather simple scheme -- basically - -- it just checks 'real' token pairs around EOLs. - if stoks[1] == "TK_COMMENT" then - -- first comment still existing must be shbang, skip whole line - i = 3 - end - while true do - tok = stoks[i] - - if tok == "TK_EOS" then -- end of stream/pass - break - - elseif tok == "TK_EOL" then -- consider each TK_EOL - local t1, t2 = stoks[i - 1], stoks[i + 1] - if is_realtoken[t1] and is_realtoken[t2] then -- sanity check - local s = checkpair(i - 1, i + 1) - if s == "" or t2 == "TK_EOS" then - settoken() -- remove entirely - end - end - end--if tok - - i = i + 1 - end--while - repack_tokens() - end - - if opt_details and opt_details > 0 then print() end -- spacing - return stoks, sinfos, stoklns -end - -return M diff --git a/Utils/luarocks/share/lua/5.1/luasrcdiet/optparser.lua b/Utils/luarocks/share/lua/5.1/luasrcdiet/optparser.lua deleted file mode 100644 index 162b8818e..000000000 --- a/Utils/luarocks/share/lua/5.1/luasrcdiet/optparser.lua +++ /dev/null @@ -1,644 +0,0 @@ ---------- --- This module does parser-based optimizations. --- --- **Notes:** --- --- * The processing load is quite significant, but since this is an --- off-line text processor, I believe we can wait a few seconds. --- * TODO: Might process "local a,a,a" wrongly... need tests! --- * TODO: Remove position handling if overlapped locals (rem < 0) --- needs more study, to check behaviour. --- * TODO: There are probably better ways to do allocation, e.g. by --- choosing better methods to sort and pick locals... --- * TODO: We don't need 53*63 two-letter identifiers; we can make --- do with significantly less depending on how many that are really --- needed and improve entropy; e.g. 13 needed -> choose 4*4 instead. ----- -local byte = string.byte -local char = string.char -local concat = table.concat -local fmt = string.format -local pairs = pairs -local rep = string.rep -local sort = table.sort -local sub = string.sub - - -local M = {} - --- Letter frequencies for reducing symbol entropy (fixed version) --- * Might help a wee bit when the output file is compressed --- * See Wikipedia: http://en.wikipedia.org/wiki/Letter_frequencies --- * We use letter frequencies according to a Linotype keyboard, plus --- the underscore, and both lower case and upper case letters. --- * The arrangement below (LC, underscore, %d, UC) is arbitrary. --- * This is certainly not optimal, but is quick-and-dirty and the --- process has no significant overhead -local LETTERS = "etaoinshrdlucmfwypvbgkqjxz_ETAOINSHRDLUCMFWYPVBGKQJXZ" -local ALPHANUM = "etaoinshrdlucmfwypvbgkqjxz_0123456789ETAOINSHRDLUCMFWYPVBGKQJXZ" - --- Names or identifiers that must be skipped. --- (The first two lines are for keywords.) -local SKIP_NAME = {} -for v in ([[ -and break do else elseif end false for function if in -local nil not or repeat return then true until while -self _ENV]]):gmatch("%S+") do - SKIP_NAME[v] = true -end - - -local toklist, seminfolist, -- token lists (lexer output) - tokpar, seminfopar, xrefpar, -- token lists (parser output) - globalinfo, localinfo, -- variable information tables - statinfo, -- statment type table - globaluniq, localuniq, -- unique name tables - var_new, -- index of new variable names - varlist -- list of output variables - ---- Preprocesses information table to get lists of unique names. --- --- @tparam {table,...} infotable --- @treturn table -local function preprocess(infotable) - local uniqtable = {} - for i = 1, #infotable do -- enumerate info table - local obj = infotable[i] - local name = obj.name - - if not uniqtable[name] then -- not found, start an entry - uniqtable[name] = { - decl = 0, token = 0, size = 0, - } - end - - local uniq = uniqtable[name] -- count declarations, tokens, size - uniq.decl = uniq.decl + 1 - local xref = obj.xref - local xcount = #xref - uniq.token = uniq.token + xcount - uniq.size = uniq.size + xcount * #name - - if obj.decl then -- if local table, create first,last pairs - obj.id = i - obj.xcount = xcount - if xcount > 1 then -- if ==1, means local never accessed - obj.first = xref[2] - obj.last = xref[xcount] - end - - else -- if global table, add a back ref - uniq.id = i - end - - end--for - return uniqtable -end - ---- Calculates actual symbol frequencies, in order to reduce entropy. --- --- * This may help further reduce the size of compressed sources. --- * Note that since parsing optimizations is put before lexing --- optimizations, the frequency table is not exact! --- * Yes, this will miss --keep block comments too... --- --- @tparam table option -local function recalc_for_entropy(option) - -- table of token classes to accept in calculating symbol frequency - local ACCEPT = { - TK_KEYWORD = true, TK_NAME = true, TK_NUMBER = true, - TK_STRING = true, TK_LSTRING = true, - } - if not option["opt-comments"] then - ACCEPT.TK_COMMENT = true - ACCEPT.TK_LCOMMENT = true - end - - -- Create a new table and remove any original locals by filtering. - local filtered = {} - for i = 1, #toklist do - filtered[i] = seminfolist[i] - end - for i = 1, #localinfo do -- enumerate local info table - local obj = localinfo[i] - local xref = obj.xref - for j = 1, obj.xcount do - local p = xref[j] - filtered[p] = "" -- remove locals - end - end - - local freq = {} -- reset symbol frequency table - for i = 0, 255 do freq[i] = 0 end - for i = 1, #toklist do -- gather symbol frequency - local tok, info = toklist[i], filtered[i] - if ACCEPT[tok] then - for j = 1, #info do - local c = byte(info, j) - freq[c] = freq[c] + 1 - end - end--if - end--for - - -- Re-sorts symbols according to actual frequencies. - -- - -- @tparam string symbols - -- @treturn string - local function resort(symbols) - local symlist = {} - for i = 1, #symbols do -- prepare table to sort - local c = byte(symbols, i) - symlist[i] = { c = c, freq = freq[c], } - end - sort(symlist, function(v1, v2) -- sort selected symbols - return v1.freq > v2.freq - end) - local charlist = {} -- reconstitute the string - for i = 1, #symlist do - charlist[i] = char(symlist[i].c) - end - return concat(charlist) - end - - LETTERS = resort(LETTERS) -- change letter arrangement - ALPHANUM = resort(ALPHANUM) -end - ---- Returns a string containing a new local variable name to use, and --- a flag indicating whether it collides with a global variable. --- --- Trapping keywords and other names like 'self' is done elsewhere. --- --- @treturn string A new local variable name. --- @treturn bool Whether the name collides with a global variable. -local function new_var_name() - local var - local cletters, calphanum = #LETTERS, #ALPHANUM - local v = var_new - if v < cletters then -- single char - v = v + 1 - var = sub(LETTERS, v, v) - else -- longer names - local range, sz = cletters, 1 -- calculate # chars fit - repeat - v = v - range - range = range * calphanum - sz = sz + 1 - until range > v - local n = v % cletters -- left side cycles faster - v = (v - n) / cletters -- do first char first - n = n + 1 - var = sub(LETTERS, n, n) - while sz > 1 do - local m = v % calphanum - v = (v - m) / calphanum - m = m + 1 - var = var..sub(ALPHANUM, m, m) - sz = sz - 1 - end - end - var_new = var_new + 1 - return var, globaluniq[var] ~= nil -end - ---- Calculates and prints some statistics. --- --- Note: probably better in main source, put here for now. --- --- @tparam table globaluniq --- @tparam table localuniq --- @tparam table afteruniq --- @tparam table option -local function stats_summary(globaluniq, localuniq, afteruniq, option) --luacheck: ignore 431 - local print = M.print or print - local opt_details = option.DETAILS - if option.QUIET then return end - - local uniq_g , uniq_li, uniq_lo = 0, 0, 0 - local decl_g, decl_li, decl_lo = 0, 0, 0 - local token_g, token_li, token_lo = 0, 0, 0 - local size_g, size_li, size_lo = 0, 0, 0 - - local function avg(c, l) -- safe average function - if c == 0 then return 0 end - return l / c - end - - -- Collect statistics (Note: globals do not have declarations!) - for _, uniq in pairs(globaluniq) do - uniq_g = uniq_g + 1 - token_g = token_g + uniq.token - size_g = size_g + uniq.size - end - for _, uniq in pairs(localuniq) do - uniq_li = uniq_li + 1 - decl_li = decl_li + uniq.decl - token_li = token_li + uniq.token - size_li = size_li + uniq.size - end - for _, uniq in pairs(afteruniq) do - uniq_lo = uniq_lo + 1 - decl_lo = decl_lo + uniq.decl - token_lo = token_lo + uniq.token - size_lo = size_lo + uniq.size - end - local uniq_ti = uniq_g + uniq_li - local decl_ti = decl_g + decl_li - local token_ti = token_g + token_li - local size_ti = size_g + size_li - local uniq_to = uniq_g + uniq_lo - local decl_to = decl_g + decl_lo - local token_to = token_g + token_lo - local size_to = size_g + size_lo - - -- Detailed stats: global list - if opt_details then - local sorted = {} -- sort table of unique global names by size - for name, uniq in pairs(globaluniq) do - uniq.name = name - sorted[#sorted + 1] = uniq - end - sort(sorted, function(v1, v2) - return v1.size > v2.size - end) - - do - local tabf1, tabf2 = "%8s%8s%10s %s", "%8d%8d%10.2f %s" - local hl = rep("-", 44) - print("*** global variable list (sorted by size) ***\n"..hl) - print(fmt(tabf1, "Token", "Input", "Input", "Global")) - print(fmt(tabf1, "Count", "Bytes", "Average", "Name")) - print(hl) - for i = 1, #sorted do - local uniq = sorted[i] - print(fmt(tabf2, uniq.token, uniq.size, avg(uniq.token, uniq.size), uniq.name)) - end - print(hl) - print(fmt(tabf2, token_g, size_g, avg(token_g, size_g), "TOTAL")) - print(hl.."\n") - end - - -- Detailed stats: local list - do - local tabf1, tabf2 = "%8s%8s%8s%10s%8s%10s %s", "%8d%8d%8d%10.2f%8d%10.2f %s" - local hl = rep("-", 70) - print("*** local variable list (sorted by allocation order) ***\n"..hl) - print(fmt(tabf1, "Decl.", "Token", "Input", "Input", "Output", "Output", "Global")) - print(fmt(tabf1, "Count", "Count", "Bytes", "Average", "Bytes", "Average", "Name")) - print(hl) - for i = 1, #varlist do -- iterate according to order assigned - local name = varlist[i] - local uniq = afteruniq[name] - local old_t, old_s = 0, 0 - for j = 1, #localinfo do -- find corresponding old names and calculate - local obj = localinfo[j] - if obj.name == name then - old_t = old_t + obj.xcount - old_s = old_s + obj.xcount * #obj.oldname - end - end - print(fmt(tabf2, uniq.decl, uniq.token, old_s, avg(old_t, old_s), - uniq.size, avg(uniq.token, uniq.size), name)) - end - print(hl) - print(fmt(tabf2, decl_lo, token_lo, size_li, avg(token_li, size_li), - size_lo, avg(token_lo, size_lo), "TOTAL")) - print(hl.."\n") - end - end--if opt_details - - -- Display output - do - local tabf1, tabf2 = "%-16s%8s%8s%8s%8s%10s", "%-16s%8d%8d%8d%8d%10.2f" - local hl = rep("-", 58) - print("*** local variable optimization summary ***\n"..hl) - print(fmt(tabf1, "Variable", "Unique", "Decl.", "Token", "Size", "Average")) - print(fmt(tabf1, "Types", "Names", "Count", "Count", "Bytes", "Bytes")) - print(hl) - print(fmt(tabf2, "Global", uniq_g, decl_g, token_g, size_g, avg(token_g, size_g))) - print(hl) - print(fmt(tabf2, "Local (in)", uniq_li, decl_li, token_li, size_li, avg(token_li, size_li))) - print(fmt(tabf2, "TOTAL (in)", uniq_ti, decl_ti, token_ti, size_ti, avg(token_ti, size_ti))) - print(hl) - print(fmt(tabf2, "Local (out)", uniq_lo, decl_lo, token_lo, size_lo, avg(token_lo, size_lo))) - print(fmt(tabf2, "TOTAL (out)", uniq_to, decl_to, token_to, size_to, avg(token_to, size_to))) - print(hl.."\n") - end -end - ---- Does experimental optimization for f("string") statements. --- --- It's safe to delete parentheses without adding whitespace, as both --- kinds of strings can abut with anything else. -local function optimize_func1() - - local function is_strcall(j) -- find f("string") pattern - local t1 = tokpar[j + 1] or "" - local t2 = tokpar[j + 2] or "" - local t3 = tokpar[j + 3] or "" - if t1 == "(" and t2 == "" and t3 == ")" then - return true - end - end - - local del_list = {} -- scan for function pattern, - local i = 1 -- tokens to be deleted are marked - while i <= #tokpar do - local id = statinfo[i] - if id == "call" and is_strcall(i) then -- found & mark () - del_list[i + 1] = true -- '(' - del_list[i + 3] = true -- ')' - i = i + 3 - end - i = i + 1 - end - - -- Delete a token and adjust all relevant tables. - -- * Currently invalidates globalinfo and localinfo (not updated), - -- so any other optimization is done after processing locals - -- (of course, we can also lex the source data again...). - -- * Faster one-pass token deletion. - local del_list2 = {} - do - local i, dst, idend = 1, 1, #tokpar - while dst <= idend do -- process parser tables - if del_list[i] then -- found a token to delete? - del_list2[xrefpar[i]] = true - i = i + 1 - end - if i > dst then - if i <= idend then -- shift table items lower - tokpar[dst] = tokpar[i] - seminfopar[dst] = seminfopar[i] - xrefpar[dst] = xrefpar[i] - (i - dst) - statinfo[dst] = statinfo[i] - else -- nil out excess entries - tokpar[dst] = nil - seminfopar[dst] = nil - xrefpar[dst] = nil - statinfo[dst] = nil - end - end - i = i + 1 - dst = dst + 1 - end - end - - do - local i, dst, idend = 1, 1, #toklist - while dst <= idend do -- process lexer tables - if del_list2[i] then -- found a token to delete? - i = i + 1 - end - if i > dst then - if i <= idend then -- shift table items lower - toklist[dst] = toklist[i] - seminfolist[dst] = seminfolist[i] - else -- nil out excess entries - toklist[dst] = nil - seminfolist[dst] = nil - end - end - i = i + 1 - dst = dst + 1 - end - end -end - ---- Does local variable optimization. --- --- @tparam {[string]=bool,...} option -local function optimize_locals(option) - var_new = 0 -- reset variable name allocator - varlist = {} - - -- Preprocess global/local tables, handle entropy reduction. - globaluniq = preprocess(globalinfo) - localuniq = preprocess(localinfo) - if option["opt-entropy"] then -- for entropy improvement - recalc_for_entropy(option) - end - - -- Build initial declared object table, then sort according to - -- token count, this might help assign more tokens to more common - -- variable names such as 'e' thus possibly reducing entropy. - -- * An object knows its localinfo index via its 'id' field. - -- * Special handling for "self" and "_ENV" special local (parameter) here. - local object = {} - for i = 1, #localinfo do - object[i] = localinfo[i] - end - sort(object, function(v1, v2) -- sort largest first - return v1.xcount > v2.xcount - end) - - -- The special "self" and "_ENV" function parameters must be preserved. - -- * The allocator below will never use "self", so it is safe to - -- keep those implicit declarations as-is. - local temp, j, used_specials = {}, 1, {} - for i = 1, #object do - local obj = object[i] - if not obj.is_special then - temp[j] = obj - j = j + 1 - else - used_specials[#used_specials + 1] = obj.name - end - end - object = temp - - -- A simple first-come first-served heuristic name allocator, - -- note that this is in no way optimal... - -- * Each object is a local variable declaration plus existence. - -- * The aim is to assign short names to as many tokens as possible, - -- so the following tries to maximize name reuse. - -- * Note that we preserve sort order. - local nobject = #object - while nobject > 0 do - local varname, gcollide - repeat - varname, gcollide = new_var_name() -- collect a variable name - until not SKIP_NAME[varname] -- skip all special names - varlist[#varlist + 1] = varname -- keep a list - local oleft = nobject - - -- If variable name collides with an existing global, the name - -- cannot be used by a local when the name is accessed as a global - -- during which the local is alive (between 'act' to 'rem'), so - -- we drop objects that collides with the corresponding global. - if gcollide then - -- find the xref table of the global - local gref = globalinfo[globaluniq[varname].id].xref - local ngref = #gref - -- enumerate for all current objects; all are valid at this point - for i = 1, nobject do - local obj = object[i] - local act, rem = obj.act, obj.rem -- 'live' range of local - -- if rem < 0, it is a -id to a local that had the same name - -- so follow rem to extend it; does this make sense? - while rem < 0 do - rem = localinfo[-rem].rem - end - local drop - for j = 1, ngref do - local p = gref[j] - if p >= act and p <= rem then drop = true end -- in range? - end - if drop then - obj.skip = true - oleft = oleft - 1 - end - end--for - end--if gcollide - - -- Now the first unassigned local (since it's sorted) will be the - -- one with the most tokens to rename, so we set this one and then - -- eliminate all others that collides, then any locals that left - -- can then reuse the same variable name; this is repeated until - -- all local declaration that can use this name is assigned. - -- - -- The criteria for local-local reuse/collision is: - -- A is the local with a name already assigned - -- B is the unassigned local under consideration - -- => anytime A is accessed, it cannot be when B is 'live' - -- => to speed up things, we have first/last accesses noted - while oleft > 0 do - local i = 1 - while object[i].skip do -- scan for first object - i = i + 1 - end - - -- First object is free for assignment of the variable name - -- [first,last] gives the access range for collision checking. - oleft = oleft - 1 - local obja = object[i] - i = i + 1 - obja.newname = varname - obja.skip = true - obja.done = true - local first, last = obja.first, obja.last - local xref = obja.xref - - -- Then, scan all the rest and drop those colliding. - -- If A was never accessed then it'll never collide with anything - -- otherwise trivial skip if: - -- * B was activated after A's last access (last < act), - -- * B was removed before A's first access (first > rem), - -- if not, see detailed skip below... - if first and oleft > 0 then -- must have at least 1 access - local scanleft = oleft - while scanleft > 0 do - while object[i].skip do -- next valid object - i = i + 1 - end - scanleft = scanleft - 1 - local objb = object[i] - i = i + 1 - local act, rem = objb.act, objb.rem -- live range of B - -- if rem < 0, extend range of rem thru' following local - while rem < 0 do - rem = localinfo[-rem].rem - end - - if not(last < act or first > rem) then -- possible collision - - -- B is activated later than A or at the same statement, - -- this means for no collision, A cannot be accessed when B - -- is alive, since B overrides A (or is a peer). - if act >= obja.act then - for j = 1, obja.xcount do -- ... then check every access - local p = xref[j] - if p >= act and p <= rem then -- A accessed when B live! - oleft = oleft - 1 - objb.skip = true - break - end - end--for - - -- A is activated later than B, this means for no collision, - -- A's access is okay since it overrides B, but B's last - -- access need to be earlier than A's activation time. - else - if objb.last and objb.last >= obja.act then - oleft = oleft - 1 - objb.skip = true - end - end - end - - if oleft == 0 then break end - end - end--if first - - end--while - - -- After assigning all possible locals to one variable name, the - -- unassigned locals/objects have the skip field reset and the table - -- is compacted, to hopefully reduce iteration time. - local temp, j = {}, 1 - for i = 1, nobject do - local obj = object[i] - if not obj.done then - obj.skip = false - temp[j] = obj - j = j + 1 - end - end - object = temp -- new compacted object table - nobject = #object -- objects left to process - - end--while - - -- After assigning all locals with new variable names, we can - -- patch in the new names, and reprocess to get 'after' stats. - for i = 1, #localinfo do -- enumerate all locals - local obj = localinfo[i] - local xref = obj.xref - if obj.newname then -- if got new name, patch it in - for j = 1, obj.xcount do - local p = xref[j] -- xrefs indexes the token list - seminfolist[p] = obj.newname - end - obj.name, obj.oldname -- adjust names - = obj.newname, obj.name - else - obj.oldname = obj.name -- for cases like 'self' - end - end - - -- Deal with statistics output. - for _, name in ipairs(used_specials) do - varlist[#varlist + 1] = name - end - local afteruniq = preprocess(localinfo) - stats_summary(globaluniq, localuniq, afteruniq, option) -end - ---- The main entry point. --- --- @tparam table option --- @tparam {string,...} _toklist --- @tparam {string,...} _seminfolist --- @tparam table xinfo -function M.optimize(option, _toklist, _seminfolist, xinfo) - -- set tables - toklist, seminfolist -- from lexer - = _toklist, _seminfolist - tokpar, seminfopar, xrefpar -- from parser - = xinfo.toklist, xinfo.seminfolist, xinfo.xreflist - globalinfo, localinfo, statinfo -- from parser - = xinfo.globalinfo, xinfo.localinfo, xinfo.statinfo - - -- Optimize locals. - if option["opt-locals"] then - optimize_locals(option) - end - - -- Other optimizations. - if option["opt-experimental"] then -- experimental - optimize_func1() - -- WARNING globalinfo and localinfo now invalidated! - end -end - -return M diff --git a/Utils/luarocks/share/lua/5.1/luasrcdiet/plugin/example.lua b/Utils/luarocks/share/lua/5.1/luasrcdiet/plugin/example.lua deleted file mode 100644 index 6a04e33a4..000000000 --- a/Utils/luarocks/share/lua/5.1/luasrcdiet/plugin/example.lua +++ /dev/null @@ -1,90 +0,0 @@ ---------- --- Example of a plugin for LuaSrcDiet. --- --- WARNING: highly experimental! interface liable to change --- --- **Notes:** --- --- * Any function can be omitted and LuaSrcDiet won't call it. --- * The functions are: --- (1) init(_option, _srcfl, _destfl) --- (2) post_load(z) can return z --- (3) post_lex(toklist, seminfolist, toklnlist) --- (4) post_parse(globalinfo, localinfo) --- (5) post_optparse() --- (6) post_optlex(toklist, seminfolist, toklnlist) --- * Older tables can be copied and kept in the plugin and used later. --- * If you modify 'option', remember that LuaSrcDiet might be --- processing more than one file. --- * Arrangement of the functions is not final! --- * TODO: can't process additional options from command line yet ----- - -local M = {} - -local option -- local reference to list of options -local srcfl, destfl -- filenames -local old_quiet - -local function print(...) -- handle quiet option - if option.QUIET then return end - _G.print(...) -end - ---- Initialization. --- --- @tparam {[string]=bool,...} _option --- @tparam string _srcfl Path of the source file. --- @tparam string _destfl Path of the destination file. -function M.init(_option, _srcfl, _destfl) - option = _option - srcfl, destfl = _srcfl, _destfl - -- plugin can impose its own option starting from here -end - ---- Message display, post-load processing, can return z. -function M.post_load(z) - -- this message will print after the LuaSrcDiet title message - print([[ -Example plugin module for LuaSrcDiet -]]) - print("Example: source file name is '"..srcfl.."'") - print("Example: destination file name is '"..destfl.."'") - print("Example: the size of the source file is "..#z.." bytes") - -- returning z is optional; this allows optional replacement of - -- the source data prior to lexing - return z -end - ---- Post-lexing processing, can work on lexer table output. -function M.post_lex(toklist, seminfolist, toklnlist) --luacheck: ignore - print("Example: the number of lexed elements is "..#toklist) -end - ---- Post-parsing processing, gives globalinfo, localinfo. -function M.post_parse(globalinfo, localinfo) - print("Example: size of globalinfo is "..#globalinfo) - print("Example: size of localinfo is "..#localinfo) - old_quiet = option.QUIET - option.QUIET = true -end - ---- Post-parser optimization processing, can get tables from elsewhere. -function M.post_optparse() - option.QUIET = old_quiet - print("Example: pretend to do post-optparse") -end - ---- Post-lexer optimization processing, can get tables from elsewhere. -function M.post_optlex(toklist, seminfolist, toklnlist) --luacheck: ignore - print("Example: pretend to do post-optlex") - -- restore old settings, other file might need original settings - option.QUIET = old_quiet - -- option.EXIT can be set at the end of any post_* function to stop - -- further processing and exit for the current file being worked on - -- in this case, final stats printout is disabled and the output will - -- not be written to the destination file - option.EXIT = true -end - -return M diff --git a/Utils/luarocks/share/lua/5.1/luasrcdiet/plugin/html.lua b/Utils/luarocks/share/lua/5.1/luasrcdiet/plugin/html.lua deleted file mode 100644 index 2305ee710..000000000 --- a/Utils/luarocks/share/lua/5.1/luasrcdiet/plugin/html.lua +++ /dev/null @@ -1,177 +0,0 @@ ---------- --- Turns Lua 5.1 source code into HTML files. --- --- WARNING: highly experimental! interface liable to change --- --- **Notes:** --- --- * This HTML highlighter marks globals brightly so that their usage --- can be manually optimized. --- * Either uses a .html extension for output files or it follows the --- -o option. --- * The HTML style tries to follow that of the Lua wiki. ----- -local fs = require "luasrcdiet.fs" - -local concat = table.concat -local find = string.find -local fmt = string.format -local sub = string.sub - -local M = {} - -local HTML_EXT = ".html" -local ENTITIES = { - ["&"] = "&", ["<"] = "<", [">"] = ">", - ["'"] = "'", ["\""] = """, -} - --- simple headers and footers -local HEADER = [[ - - - -%s - - - - -

-]]
-local FOOTER = [[
-
- - -]] --- for more, please see wikimain.css from the Lua wiki site -local STYLESHEET = [[ -BODY { - background: white; - color: navy; -} -pre.code { color: black; } -span.comment { color: #00a000; } -span.string { color: #009090; } -span.keyword { color: black; font-weight: bold; } -span.number { color: #993399; } -span.operator { } -span.name { } -span.global { color: #ff0000; font-weight: bold; } -span.local { color: #0000ff; font-weight: bold; } -]] - -local option -- local reference to list of options -local srcfl, destfl -- filenames -local toklist, seminfolist -- token data - -local function print(...) -- handle quiet option - if option.QUIET then return end - _G.print(...) -end - ---- Initialization. -function M.init(_option, _srcfl) - option = _option - srcfl = _srcfl - local extb, _ = find(srcfl, "%.[^%.%\\%/]*$") - local basename = srcfl - if extb and extb > 1 then - basename = sub(srcfl, 1, extb - 1) - end - destfl = basename..HTML_EXT - if option.OUTPUT_FILE then - destfl = option.OUTPUT_FILE - end - if srcfl == destfl then - error("output filename identical to input filename") - end -end - ---- Message display, post-load processing. -function M.post_load() - print([[ -HTML plugin module for LuaSrcDiet -]]) - print("Exporting: "..srcfl.." -> "..destfl.."\n") -end - ---- Post-lexing processing, can work on lexer table output. -function M.post_lex(_toklist, _seminfolist) - toklist, seminfolist = _toklist, _seminfolist -end - ---- Escapes the usual suspects for HTML/XML. -local function do_entities(z) - local i = 1 - while i <= #z do - local c = sub(z, i, i) - local d = ENTITIES[c] - if d then - c = d - z = sub(z, 1, i - 1)..c..sub(z, i + 1) - end - i = i + #c - end--while - return z -end - ---- Post-parsing processing, gives globalinfo, localinfo. -function M.post_parse(globalinfo, localinfo) - local html = {} - local function add(s) -- html helpers - html[#html + 1] = s - end - local function span(class, s) - add(''..s..'') - end - - for i = 1, #globalinfo do -- mark global identifiers as TK_GLOBAL - local obj = globalinfo[i] - local xref = obj.xref - for j = 1, #xref do - local p = xref[j] - toklist[p] = "TK_GLOBAL" - end - end--for - - for i = 1, #localinfo do -- mark local identifiers as TK_LOCAL - local obj = localinfo[i] - local xref = obj.xref - for j = 1, #xref do - local p = xref[j] - toklist[p] = "TK_LOCAL" - end - end--for - - add(fmt(HEADER, -- header and leading stuff - do_entities(srcfl), - STYLESHEET)) - for i = 1, #toklist do -- enumerate token list - local tok, info = toklist[i], seminfolist[i] - if tok == "TK_KEYWORD" then - span("keyword", info) - elseif tok == "TK_STRING" or tok == "TK_LSTRING" then - span("string", do_entities(info)) - elseif tok == "TK_COMMENT" or tok == "TK_LCOMMENT" then - span("comment", do_entities(info)) - elseif tok == "TK_GLOBAL" then - span("global", info) - elseif tok == "TK_LOCAL" then - span("local", info) - elseif tok == "TK_NAME" then - span("name", info) - elseif tok == "TK_NUMBER" then - span("number", info) - elseif tok == "TK_OP" then - span("operator", do_entities(info)) - elseif tok ~= "TK_EOS" then -- TK_EOL, TK_SPACE - add(info) - end - end--for - add(FOOTER) - assert(fs.write_file(destfl, concat(html), "wb")) - option.EXIT = true -end - -return M diff --git a/Utils/luarocks/share/lua/5.1/luasrcdiet/plugin/sloc.lua b/Utils/luarocks/share/lua/5.1/luasrcdiet/plugin/sloc.lua deleted file mode 100644 index 50b811f8f..000000000 --- a/Utils/luarocks/share/lua/5.1/luasrcdiet/plugin/sloc.lua +++ /dev/null @@ -1,89 +0,0 @@ ---------- --- Calculates SLOC for Lua 5.1 scripts --- --- WARNING: highly experimental! interface liable to change --- --- **Notes:** --- --- * SLOC's behaviour is based on David Wheeler's SLOCCount. --- * Empty lines and comment don't count as significant. --- * Empty lines in long strings are also insignificant. This is --- debatable. In SLOCCount, this allows counting of invalid multi- --- line strings for C. But an empty line is still an empty line. --- * Ignores the --quiet option, print own result line. ----- - -local M = {} - -local option -- local reference to list of options -local srcfl -- source file name - -function M.init(_option, _srcfl) - option = _option - option.QUIET = true - srcfl = _srcfl -end - ---- Splits a block into a table of lines (minus EOLs). --- --- @tparam string blk --- @treturn {string,...} lines -local function split(blk) - local lines = {} - local i, nblk = 1, #blk - while i <= nblk do - local p, q, r, s = blk:find("([\r\n])([\r\n]?)", i) - if not p then - p = nblk + 1 - end - lines[#lines + 1] = blk:sub(i, p - 1) - i = p + 1 - if p < nblk and q > p and r ~= s then -- handle Lua-style CRLF, LFCR - i = i + 1 - end - end - return lines -end - ---- Post-lexing processing, can work on lexer table output. -function M.post_lex(toklist, seminfolist, toklnlist) - local lnow, sloc = 0, 0 - local function chk(ln) -- if a new line, count it as an SLOC - if ln > lnow then -- new line # must be > old line # - sloc = sloc + 1; lnow = ln - end - end - for i = 1, #toklist do -- enumerate over all tokens - local tok, info, ln - = toklist[i], seminfolist[i], toklnlist[i] - - if tok == "TK_KEYWORD" or tok == "TK_NAME" or -- significant - tok == "TK_NUMBER" or tok == "TK_OP" then - chk(ln) - - -- Both TK_STRING and TK_LSTRING may be multi-line, hence, a loop - -- is needed in order to mark off lines one-by-one. Since llex.lua - -- currently returns the line number of the last part of the string, - -- we must subtract in order to get the starting line number. - elseif tok == "TK_STRING" then -- possible multi-line - local t = split(info) - ln = ln - #t + 1 - for _ = 1, #t do - chk(ln); ln = ln + 1 - end - - elseif tok == "TK_LSTRING" then -- possible multi-line - local t = split(info) - ln = ln - #t + 1 - for j = 1, #t do - if t[j] ~= "" then chk(ln) end - ln = ln + 1 - end - -- Other tokens are comments or whitespace and are ignored. - end - end--for - print(srcfl..": "..sloc) -- display result - option.EXIT = true -end - -return M diff --git a/Utils/luarocks/share/lua/5.1/luasrcdiet/utils.lua b/Utils/luarocks/share/lua/5.1/luasrcdiet/utils.lua deleted file mode 100644 index 611e9de8b..000000000 --- a/Utils/luarocks/share/lua/5.1/luasrcdiet/utils.lua +++ /dev/null @@ -1,30 +0,0 @@ ---------- --- General utility functions. --- --- **Note: This module is not part of public API!** ----- -local ipairs = ipairs -local pairs = pairs - -local M = {} - ---- Returns a new table containing the contents of all the given tables. --- Tables are iterated using @{pairs}, so this function is intended for tables --- that represent *associative arrays*. Entries with duplicate keys are --- overwritten with the values from a later table. --- --- @tparam {table,...} ... The tables to merge. --- @treturn table A new table. -function M.merge (...) - local result = {} - - for _, tab in ipairs{...} do - for key, val in pairs(tab) do - result[key] = val - end - end - - return result -end - -return M diff --git a/Utils/luarocks/share/lua/5.1/markdown.lua b/Utils/luarocks/share/lua/5.1/markdown.lua deleted file mode 100644 index b16d43b3d..000000000 --- a/Utils/luarocks/share/lua/5.1/markdown.lua +++ /dev/null @@ -1,1359 +0,0 @@ -#!/usr/bin/env lua - ---[[ -# markdown.lua -- version 0.32 - - - -**Author:** Niklas Frykholm, -**Date:** 31 May 2008 - -This is an implementation of the popular text markup language Markdown in pure Lua. -Markdown can convert documents written in a simple and easy to read text format -to well-formatted HTML. For a more thourough description of Markdown and the Markdown -syntax, see . - -The original Markdown source is written in Perl and makes heavy use of advanced -regular expression techniques (such as negative look-ahead, etc) which are not available -in Lua's simple regex engine. Therefore this Lua port has been rewritten from the ground -up. It is probably not completely bug free. If you notice any bugs, please report them to -me. A unit test that exposes the error is helpful. - -## Usage - - require "markdown" - markdown(source) - -``markdown.lua`` exposes a single global function named ``markdown(s)`` which applies the -Markdown transformation to the specified string. - -``markdown.lua`` can also be used directly from the command line: - - lua markdown.lua test.md - -Creates a file ``test.html`` with the converted content of ``test.md``. Run: - - lua markdown.lua -h - -For a description of the command-line options. - -``markdown.lua`` uses the same license as Lua, the MIT license. - -## License - -Copyright © 2008 Niklas Frykholm. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this -software and associated documentation files (the "Software"), to deal in the Software -without restriction, including without limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons -to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies -or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -## Version history - -- **0.32** -- 31 May 2008 - - Fix for links containing brackets -- **0.31** -- 1 Mar 2008 - - Fix for link definitions followed by spaces -- **0.30** -- 25 Feb 2008 - - Consistent behavior with Markdown when the same link reference is reused -- **0.29** -- 24 Feb 2008 - - Fix for
 blocks with spaces in them
--	**0.28** -- 18 Feb 2008
-	-	Fix for link encoding
--	**0.27** -- 14 Feb 2008
-	-	Fix for link database links with ()
--	**0.26** -- 06 Feb 2008
-	-	Fix for nested italic and bold markers
--	**0.25** -- 24 Jan 2008
-	-	Fix for encoding of naked <
--	**0.24** -- 21 Jan 2008
-	-	Fix for link behavior.
--	**0.23** -- 10 Jan 2008
-	-	Fix for a regression bug in longer expressions in italic or bold.
--	**0.22** -- 27 Dec 2007
-	-	Fix for crash when processing blocks with a percent sign in them.
--	**0.21** -- 27 Dec 2007
-	- 	Fix for combined strong and emphasis tags
--	**0.20** -- 13 Oct 2007
-	-	Fix for < as well in image titles, now matches Dingus behavior
--	**0.19** -- 28 Sep 2007
-	-	Fix for quotation marks " and ampersands & in link and image titles.
--	**0.18** -- 28 Jul 2007
-	-	Does not crash on unmatched tags (behaves like standard markdown)
--	**0.17** -- 12 Apr 2007
-	-	Fix for links with %20 in them.
--	**0.16** -- 12 Apr 2007
-	-	Do not require arg global to exist.
--	**0.15** -- 28 Aug 2006
-	-	Better handling of links with underscores in them.
--	**0.14** -- 22 Aug 2006
-	-	Bug for *`foo()`*
--	**0.13** -- 12 Aug 2006
-	-	Added -l option for including stylesheet inline in document.
-	-	Fixed bug in -s flag.
-	-	Fixed emphasis bug.
--	**0.12** -- 15 May 2006
-	-	Fixed several bugs to comply with MarkdownTest 1.0 
--	**0.11** -- 12 May 2006
-	-	Fixed bug for escaping `*` and `_` inside code spans.
-	-	Added license terms.
-	-	Changed join() to table.concat().
--	**0.10** -- 3 May 2006
-	-	Initial public release.
-
-// Niklas
-]]
-
-
--- Set up a table for holding local functions to avoid polluting the global namespace
-local M = {}
-local MT = {__index = _G}
-setmetatable(M, MT)
-setfenv(1, M)
-
-----------------------------------------------------------------------
--- Utility functions
-----------------------------------------------------------------------
-
--- Locks table t from changes, writes an error if someone attempts to change the table.
--- This is useful for detecting variables that have "accidently" been made global. Something
--- I tend to do all too much.
-function lock(t)
-	function lock_new_index(t, k, v)
-		error("module has been locked -- " .. k .. " must be declared local", 2)
-	end
-
-	local mt = {__newindex = lock_new_index}
-	if getmetatable(t) then mt.__index = getmetatable(t).__index end
-	setmetatable(t, mt)
-end
-
--- Returns the result of mapping the values in table t through the function f
-function map(t, f)
-	local out = {}
-	for k,v in pairs(t) do out[k] = f(v,k) end
-	return out
-end
-
--- The identity function, useful as a placeholder.
-function identity(text) return text end
-
--- Functional style if statement. (NOTE: no short circuit evaluation)
-function iff(t, a, b) if t then return a else return b end end
-
--- Splits the text into an array of separate lines.
-function split(text, sep)
-	sep = sep or "\n"
-	local lines = {}
-	local pos = 1
-	while true do
-		local b,e = text:find(sep, pos)
-		if not b then table.insert(lines, text:sub(pos)) break end
-		table.insert(lines, text:sub(pos, b-1))
-		pos = e + 1
-	end
-	return lines
-end
-
--- Converts tabs to spaces
-function detab(text)
-	local tab_width = 4
-	local function rep(match)
-		local spaces = -match:len()
-		while spaces<1 do spaces = spaces + tab_width end
-		return match .. string.rep(" ", spaces)
-	end
-	text = text:gsub("([^\n]-)\t", rep)
-	return text
-end
-
--- Applies string.find for every pattern in the list and returns the first match
-function find_first(s, patterns, index)
-	local res = {}
-	for _,p in ipairs(patterns) do
-		local match = {s:find(p, index)}
-		if #match>0 and (#res==0 or match[1] < res[1]) then res = match end
-	end
-	return unpack(res)
-end
-
--- If a replacement array is specified, the range [start, stop] in the array is replaced
--- with the replacement array and the resulting array is returned. Without a replacement
--- array the section of the array between start and stop is returned.
-function splice(array, start, stop, replacement)
-	if replacement then
-		local n = stop - start + 1
-		while n > 0 do
-			table.remove(array, start)
-			n = n - 1
-		end
-		for i,v in ipairs(replacement) do
-			table.insert(array, start, v)
-		end
-		return array
-	else
-		local res = {}
-		for i = start,stop do
-			table.insert(res, array[i])
-		end
-		return res
-	end
-end
-
--- Outdents the text one step.
-function outdent(text)
-	text = "\n" .. text
-	text = text:gsub("\n  ? ? ?", "\n")
-	text = text:sub(2)
-	return text
-end
-
--- Indents the text one step.
-function indent(text)
-	text = text:gsub("\n", "\n    ")
-	return text
-end
-
--- Does a simple tokenization of html data. Returns the data as a list of tokens. 
--- Each token is a table with a type field (which is either "tag" or "text") and
--- a text field (which contains the original token data).
-function tokenize_html(html)
-	local tokens = {}
-	local pos = 1
-	while true do
-		local start = find_first(html, {"", start)
-		elseif html:match("^<%?", start) then
-			_,stop = html:find("?>", start)
-		else
-			_,stop = html:find("%b<>", start)
-		end
-		if not stop then
-			-- error("Could not match html tag " .. html:sub(start,start+30)) 
-		 	table.insert(tokens, {type="text", text=html:sub(start, start)})
-			pos = start + 1
-		else
-			table.insert(tokens, {type="tag", text=html:sub(start, stop)})
-			pos = stop + 1
-		end
-	end
-	return tokens
-end
-
-----------------------------------------------------------------------
--- Hash
-----------------------------------------------------------------------
-
--- This is used to "hash" data into alphanumeric strings that are unique
--- in the document. (Note that this is not cryptographic hash, the hash
--- function is not one-way.) The hash procedure is used to protect parts
--- of the document from further processing.
-
-local HASH = {
-	-- Has the hash been inited.
-	inited = false,
-	
-	-- The unique string prepended to all hash values. This is to ensure
-	-- that hash values do not accidently coincide with an actual existing
-	-- string in the document.
-	identifier = "",
-	
-	-- Counter that counts up for each new hash instance.
-	counter = 0,
-	
-	-- Hash table.
-	table = {}
-}
-
--- Inits hashing. Creates a hash_identifier that doesn't occur anywhere
--- in the text.
-function init_hash(text)
-	HASH.inited = true
-	HASH.identifier = ""
-	HASH.counter = 0
-	HASH.table = {}
-	
-	local s = "HASH"
-	local counter = 0
-	local id
-	while true do
-		id  = s .. counter
-		if not text:find(id, 1, true) then break end
-		counter = counter + 1
-	end
-	HASH.identifier = id
-end
-
--- Returns the hashed value for s.
-function hash(s)
-	assert(HASH.inited)
-	if not HASH.table[s] then
-		HASH.counter = HASH.counter + 1
-		local id = HASH.identifier .. HASH.counter .. "X"
-		HASH.table[s] = id
-	end
-	return HASH.table[s]
-end
-
-----------------------------------------------------------------------
--- Protection
-----------------------------------------------------------------------
-
--- The protection module is used to "protect" parts of a document
--- so that they are not modified by subsequent processing steps. 
--- Protected parts are saved in a table for later unprotection
-
--- Protection data
-local PD = {
-	-- Saved blocks that have been converted
-	blocks = {},
-
-	-- Block level tags that will be protected
-	tags = {"p", "div", "h1", "h2", "h3", "h4", "h5", "h6", "blockquote",
-	"pre", "table", "dl", "ol", "ul", "script", "noscript", "form", "fieldset",
-	"iframe", "math", "ins", "del"}
-}
-
--- Pattern for matching a block tag that begins and ends in the leftmost
--- column and may contain indented subtags, i.e.
--- 
--- A nested block. ---
--- Nested data. ---
---
-function block_pattern(tag) - return "\n<" .. tag .. ".-\n[ \t]*\n" -end - --- Pattern for matching a block tag that begins and ends with a newline -function line_pattern(tag) - return "\n<" .. tag .. ".-[ \t]*\n" -end - --- Protects the range of characters from start to stop in the text and --- returns the protected string. -function protect_range(text, start, stop) - local s = text:sub(start, stop) - local h = hash(s) - PD.blocks[h] = s - text = text:sub(1,start) .. h .. text:sub(stop) - return text -end - --- Protect every part of the text that matches any of the patterns. The first --- matching pattern is protected first, etc. -function protect_matches(text, patterns) - while true do - local start, stop = find_first(text, patterns) - if not start then break end - text = protect_range(text, start, stop) - end - return text -end - --- Protects blocklevel tags in the specified text -function protect(text) - -- First protect potentially nested block tags - text = protect_matches(text, map(PD.tags, block_pattern)) - -- Then protect block tags at the line level. - text = protect_matches(text, map(PD.tags, line_pattern)) - -- Protect
and comment tags - text = protect_matches(text, {"\n]->[ \t]*\n"}) - text = protect_matches(text, {"\n[ \t]*\n"}) - return text -end - --- Returns true if the string s is a hash resulting from protection -function is_protected(s) - return PD.blocks[s] -end - --- Unprotects the specified text by expanding all the nonces -function unprotect(text) - for k,v in pairs(PD.blocks) do - v = v:gsub("%%", "%%%%") - text = text:gsub(k, v) - end - return text -end - - ----------------------------------------------------------------------- --- Block transform ----------------------------------------------------------------------- - --- The block transform functions transform the text on the block level. --- They work with the text as an array of lines rather than as individual --- characters. - --- Returns true if the line is a ruler of (char) characters. --- The line must contain at least three char characters and contain only spaces and --- char characters. -function is_ruler_of(line, char) - if not line:match("^[ %" .. char .. "]*$") then return false end - if not line:match("%" .. char .. ".*%" .. char .. ".*%" .. char) then return false end - return true -end - --- Identifies the block level formatting present in the line -function classify(line) - local info = {line = line, text = line} - - if line:match("^ ") then - info.type = "indented" - info.outdented = line:sub(5) - return info - end - - for _,c in ipairs({'*', '-', '_', '='}) do - if is_ruler_of(line, c) then - info.type = "ruler" - info.ruler_char = c - return info - end - end - - if line == "" then - info.type = "blank" - return info - end - - if line:match("^(#+)[ \t]*(.-)[ \t]*#*[ \t]*$") then - local m1, m2 = line:match("^(#+)[ \t]*(.-)[ \t]*#*[ \t]*$") - info.type = "header" - info.level = m1:len() - info.text = m2 - return info - end - - if line:match("^ ? ? ?(%d+)%.[ \t]+(.+)") then - local number, text = line:match("^ ? ? ?(%d+)%.[ \t]+(.+)") - info.type = "list_item" - info.list_type = "numeric" - info.number = 0 + number - info.text = text - return info - end - - if line:match("^ ? ? ?([%*%+%-])[ \t]+(.+)") then - local bullet, text = line:match("^ ? ? ?([%*%+%-])[ \t]+(.+)") - info.type = "list_item" - info.list_type = "bullet" - info.bullet = bullet - info.text= text - return info - end - - if line:match("^>[ \t]?(.*)") then - info.type = "blockquote" - info.text = line:match("^>[ \t]?(.*)") - return info - end - - if is_protected(line) then - info.type = "raw" - info.html = unprotect(line) - return info - end - - info.type = "normal" - return info -end - --- Find headers constisting of a normal line followed by a ruler and converts them to --- header entries. -function headers(array) - local i = 1 - while i <= #array - 1 do - if array[i].type == "normal" and array[i+1].type == "ruler" and - (array[i+1].ruler_char == "-" or array[i+1].ruler_char == "=") then - local info = {line = array[i].line} - info.text = info.line - info.type = "header" - info.level = iff(array[i+1].ruler_char == "=", 1, 2) - table.remove(array, i+1) - array[i] = info - end - i = i + 1 - end - return array -end - --- Find list blocks and convert them to protected data blocks -function lists(array, sublist) - local function process_list(arr) - local function any_blanks(arr) - for i = 1, #arr do - if arr[i].type == "blank" then return true end - end - return false - end - - local function split_list_items(arr) - local acc = {arr[1]} - local res = {} - for i=2,#arr do - if arr[i].type == "list_item" then - table.insert(res, acc) - acc = {arr[i]} - else - table.insert(acc, arr[i]) - end - end - table.insert(res, acc) - return res - end - - local function process_list_item(lines, block) - while lines[#lines].type == "blank" do - table.remove(lines) - end - - local itemtext = lines[1].text - for i=2,#lines do - itemtext = itemtext .. "\n" .. outdent(lines[i].line) - end - if block then - itemtext = block_transform(itemtext, true) - if not itemtext:find("
") then itemtext = indent(itemtext) end
-				return "    
  • " .. itemtext .. "
  • " - else - local lines = split(itemtext) - lines = map(lines, classify) - lines = lists(lines, true) - lines = blocks_to_html(lines, true) - itemtext = table.concat(lines, "\n") - if not itemtext:find("
    ") then itemtext = indent(itemtext) end
    -				return "    
  • " .. itemtext .. "
  • " - end - end - - local block_list = any_blanks(arr) - local items = split_list_items(arr) - local out = "" - for _, item in ipairs(items) do - out = out .. process_list_item(item, block_list) .. "\n" - end - if arr[1].list_type == "numeric" then - return "
      \n" .. out .. "
    " - else - return "
      \n" .. out .. "
    " - end - end - - -- Finds the range of lines composing the first list in the array. A list - -- starts with (^ list_item) or (blank list_item) and ends with - -- (blank* $) or (blank normal). - -- - -- A sublist can start with just (list_item) does not need a blank... - local function find_list(array, sublist) - local function find_list_start(array, sublist) - if array[1].type == "list_item" then return 1 end - if sublist then - for i = 1,#array do - if array[i].type == "list_item" then return i end - end - else - for i = 1, #array-1 do - if array[i].type == "blank" and array[i+1].type == "list_item" then - return i+1 - end - end - end - return nil - end - local function find_list_end(array, start) - local pos = #array - for i = start, #array-1 do - if array[i].type == "blank" and array[i+1].type ~= "list_item" - and array[i+1].type ~= "indented" and array[i+1].type ~= "blank" then - pos = i-1 - break - end - end - while pos > start and array[pos].type == "blank" do - pos = pos - 1 - end - return pos - end - - local start = find_list_start(array, sublist) - if not start then return nil end - return start, find_list_end(array, start) - end - - while true do - local start, stop = find_list(array, sublist) - if not start then break end - local text = process_list(splice(array, start, stop)) - local info = { - line = text, - type = "raw", - html = text - } - array = splice(array, start, stop, {info}) - end - - -- Convert any remaining list items to normal - for _,line in ipairs(array) do - if line.type == "list_item" then line.type = "normal" end - end - - return array -end - --- Find and convert blockquote markers. -function blockquotes(lines) - local function find_blockquote(lines) - local start - for i,line in ipairs(lines) do - if line.type == "blockquote" then - start = i - break - end - end - if not start then return nil end - - local stop = #lines - for i = start+1, #lines do - if lines[i].type == "blank" or lines[i].type == "blockquote" then - elseif lines[i].type == "normal" then - if lines[i-1].type == "blank" then stop = i-1 break end - else - stop = i-1 break - end - end - while lines[stop].type == "blank" do stop = stop - 1 end - return start, stop - end - - local function process_blockquote(lines) - local raw = lines[1].text - for i = 2,#lines do - raw = raw .. "\n" .. lines[i].text - end - local bt = block_transform(raw) - if not bt:find("
    ") then bt = indent(bt) end
    -		return "
    \n " .. bt .. - "\n
    " - end - - while true do - local start, stop = find_blockquote(lines) - if not start then break end - local text = process_blockquote(splice(lines, start, stop)) - local info = { - line = text, - type = "raw", - html = text - } - lines = splice(lines, start, stop, {info}) - end - return lines -end - --- Find and convert codeblocks. -function codeblocks(lines) - local function find_codeblock(lines) - local start - for i,line in ipairs(lines) do - if line.type == "indented" then start = i break end - end - if not start then return nil end - - local stop = #lines - for i = start+1, #lines do - if lines[i].type ~= "indented" and lines[i].type ~= "blank" then - stop = i-1 - break - end - end - while lines[stop].type == "blank" do stop = stop - 1 end - return start, stop - end - - local function process_codeblock(lines) - local raw = detab(encode_code(outdent(lines[1].line))) - for i = 2,#lines do - raw = raw .. "\n" .. detab(encode_code(outdent(lines[i].line))) - end - return "
    " .. raw .. "\n
    " - end - - while true do - local start, stop = find_codeblock(lines) - if not start then break end - local text = process_codeblock(splice(lines, start, stop)) - local info = { - line = text, - type = "raw", - html = text - } - lines = splice(lines, start, stop, {info}) - end - return lines -end - --- Convert lines to html code -function blocks_to_html(lines, no_paragraphs) - local out = {} - local i = 1 - while i <= #lines do - local line = lines[i] - if line.type == "ruler" then - table.insert(out, "
    ") - elseif line.type == "raw" then - table.insert(out, line.html) - elseif line.type == "normal" then - local s = line.line - - while i+1 <= #lines and lines[i+1].type == "normal" do - i = i + 1 - s = s .. "\n" .. lines[i].line - end - - if no_paragraphs then - table.insert(out, span_transform(s)) - else - table.insert(out, "

    " .. span_transform(s) .. "

    ") - end - elseif line.type == "header" then - local s = "" .. span_transform(line.text) .. "" - table.insert(out, s) - else - table.insert(out, line.line) - end - i = i + 1 - end - return out -end - --- Perform all the block level transforms -function block_transform(text, sublist) - local lines = split(text) - lines = map(lines, classify) - lines = headers(lines) - lines = lists(lines, sublist) - lines = codeblocks(lines) - lines = blockquotes(lines) - lines = blocks_to_html(lines) - local text = table.concat(lines, "\n") - return text -end - --- Debug function for printing a line array to see the result --- of partial transforms. -function print_lines(lines) - for i, line in ipairs(lines) do - print(i, line.type, line.text or line.line) - end -end - ----------------------------------------------------------------------- --- Span transform ----------------------------------------------------------------------- - --- Functions for transforming the text at the span level. - --- These characters may need to be escaped because they have a special --- meaning in markdown. -escape_chars = "'\\`*_{}[]()>#+-.!'" -escape_table = {} - -function init_escape_table() - escape_table = {} - for i = 1,#escape_chars do - local c = escape_chars:sub(i,i) - escape_table[c] = hash(c) - end -end - --- Adds a new escape to the escape table. -function add_escape(text) - if not escape_table[text] then - escape_table[text] = hash(text) - end - return escape_table[text] -end - --- Escape characters that should not be disturbed by markdown. -function escape_special_chars(text) - local tokens = tokenize_html(text) - - local out = "" - for _, token in ipairs(tokens) do - local t = token.text - if token.type == "tag" then - -- In tags, encode * and _ so they don't conflict with their use in markdown. - t = t:gsub("%*", escape_table["*"]) - t = t:gsub("%_", escape_table["_"]) - else - t = encode_backslash_escapes(t) - end - out = out .. t - end - return out -end - --- Encode backspace-escaped characters in the markdown source. -function encode_backslash_escapes(t) - for i=1,escape_chars:len() do - local c = escape_chars:sub(i,i) - t = t:gsub("\\%" .. c, escape_table[c]) - end - return t -end - --- Unescape characters that have been encoded. -function unescape_special_chars(t) - local tin = t - for k,v in pairs(escape_table) do - k = k:gsub("%%", "%%%%") - t = t:gsub(v,k) - end - if t ~= tin then t = unescape_special_chars(t) end - return t -end - --- Encode/escape certain characters inside Markdown code runs. --- The point is that in code, these characters are literals, --- and lose their special Markdown meanings. -function encode_code(s) - s = s:gsub("%&", "&") - s = s:gsub("<", "<") - s = s:gsub(">", ">") - for k,v in pairs(escape_table) do - s = s:gsub("%"..k, v) - end - return s -end - --- Handle backtick blocks. -function code_spans(s) - s = s:gsub("\\\\", escape_table["\\"]) - s = s:gsub("\\`", escape_table["`"]) - - local pos = 1 - while true do - local start, stop = s:find("`+", pos) - if not start then return s end - local count = stop - start + 1 - -- Find a matching numbert of backticks - local estart, estop = s:find(string.rep("`", count), stop+1) - local brstart = s:find("\n", stop+1) - if estart and (not brstart or estart < brstart) then - local code = s:sub(stop+1, estart-1) - code = code:gsub("^[ \t]+", "") - code = code:gsub("[ \t]+$", "") - code = code:gsub(escape_table["\\"], escape_table["\\"] .. escape_table["\\"]) - code = code:gsub(escape_table["`"], escape_table["\\"] .. escape_table["`"]) - code = "" .. encode_code(code) .. "" - code = add_escape(code) - s = s:sub(1, start-1) .. code .. s:sub(estop+1) - pos = start + code:len() - else - pos = stop + 1 - end - end - return s -end - --- Encode alt text... enodes &, and ". -function encode_alt(s) - if not s then return s end - s = s:gsub('&', '&') - s = s:gsub('"', '"') - s = s:gsub('<', '<') - return s -end - --- Handle image references -function images(text) - local function reference_link(alt, id) - alt = encode_alt(alt:match("%b[]"):sub(2,-2)) - id = id:match("%[(.*)%]"):lower() - if id == "" then id = text:lower() end - link_database[id] = link_database[id] or {} - if not link_database[id].url then return nil end - local url = link_database[id].url or id - url = encode_alt(url) - local title = encode_alt(link_database[id].title) - if title then title = " title=\"" .. title .. "\"" else title = "" end - return add_escape ('' .. alt .. '") - end - - local function inline_link(alt, link) - alt = encode_alt(alt:match("%b[]"):sub(2,-2)) - local url, title = link:match("%(?[ \t]*['\"](.+)['\"]") - url = url or link:match("%(?%)") - url = encode_alt(url) - title = encode_alt(title) - if title then - return add_escape('' .. alt .. '') - else - return add_escape('' .. alt .. '') - end - end - - text = text:gsub("!(%b[])[ \t]*\n?[ \t]*(%b[])", reference_link) - text = text:gsub("!(%b[])(%b())", inline_link) - return text -end - --- Handle anchor references -function anchors(text) - local function reference_link(text, id) - text = text:match("%b[]"):sub(2,-2) - id = id:match("%b[]"):sub(2,-2):lower() - if id == "" then id = text:lower() end - link_database[id] = link_database[id] or {} - if not link_database[id].url then return nil end - local url = link_database[id].url or id - url = encode_alt(url) - local title = encode_alt(link_database[id].title) - if title then title = " title=\"" .. title .. "\"" else title = "" end - return add_escape("") .. text .. add_escape("") - end - - local function inline_link(text, link) - text = text:match("%b[]"):sub(2,-2) - local url, title = link:match("%(?[ \t]*['\"](.+)['\"]") - title = encode_alt(title) - url = url or link:match("%(?%)") or "" - url = encode_alt(url) - if title then - return add_escape("") .. text .. "" - else - return add_escape("") .. text .. add_escape("") - end - end - - text = text:gsub("(%b[])[ \t]*\n?[ \t]*(%b[])", reference_link) - text = text:gsub("(%b[])(%b())", inline_link) - return text -end - --- Handle auto links, i.e. . -function auto_links(text) - local function link(s) - return add_escape("") .. s .. "" - end - -- Encode chars as a mix of dec and hex entitites to (perhaps) fool - -- spambots. - local function encode_email_address(s) - -- Use a deterministic encoding to make unit testing possible. - -- Code 45% hex, 45% dec, 10% plain. - local hex = {code = function(c) return "&#x" .. string.format("%x", c:byte()) .. ";" end, count = 1, rate = 0.45} - local dec = {code = function(c) return "&#" .. c:byte() .. ";" end, count = 0, rate = 0.45} - local plain = {code = function(c) return c end, count = 0, rate = 0.1} - local codes = {hex, dec, plain} - local function swap(t,k1,k2) local temp = t[k2] t[k2] = t[k1] t[k1] = temp end - - local out = "" - for i = 1,s:len() do - for _,code in ipairs(codes) do code.count = code.count + code.rate end - if codes[1].count < codes[2].count then swap(codes,1,2) end - if codes[2].count < codes[3].count then swap(codes,2,3) end - if codes[1].count < codes[2].count then swap(codes,1,2) end - - local code = codes[1] - local c = s:sub(i,i) - -- Force encoding of "@" to make email address more invisible. - if c == "@" and code == plain then code = codes[2] end - out = out .. code.code(c) - code.count = code.count - 1 - end - return out - end - local function mail(s) - s = unescape_special_chars(s) - local address = encode_email_address("mailto:" .. s) - local text = encode_email_address(s) - return add_escape("") .. text .. "" - end - -- links - text = text:gsub("<(https?:[^'\">%s]+)>", link) - text = text:gsub("<(ftp:[^'\">%s]+)>", link) - - -- mail - text = text:gsub("%s]+)>", mail) - text = text:gsub("<([-.%w]+%@[-.%w]+)>", mail) - return text -end - --- Encode free standing amps (&) and angles (<)... note that this does not --- encode free >. -function amps_and_angles(s) - -- encode amps not part of &..; expression - local pos = 1 - while true do - local amp = s:find("&", pos) - if not amp then break end - local semi = s:find(";", amp+1) - local stop = s:find("[ \t\n&]", amp+1) - if not semi or (stop and stop < semi) or (semi - amp) > 15 then - s = s:sub(1,amp-1) .. "&" .. s:sub(amp+1) - pos = amp+1 - else - pos = amp+1 - end - end - - -- encode naked <'s - s = s:gsub("<([^a-zA-Z/?$!])", "<%1") - s = s:gsub("<$", "<") - - -- what about >, nothing done in the original markdown source to handle them - return s -end - --- Handles emphasis markers (* and _) in the text. -function emphasis(text) - for _, s in ipairs {"%*%*", "%_%_"} do - text = text:gsub(s .. "([^%s][%*%_]?)" .. s, "%1") - text = text:gsub(s .. "([^%s][^<>]-[^%s][%*%_]?)" .. s, "%1") - end - for _, s in ipairs {"%*", "%_"} do - text = text:gsub(s .. "([^%s_])" .. s, "%1") - text = text:gsub(s .. "([^%s_])" .. s, "%1") - text = text:gsub(s .. "([^%s_][^<>_]-[^%s_])" .. s, "%1") - text = text:gsub(s .. "([^<>_]-[^<>_]-[^<>_]-)" .. s, "%1") - end - return text -end - --- Handles line break markers in the text. -function line_breaks(text) - return text:gsub(" +\n", "
    \n") -end - --- Perform all span level transforms. -function span_transform(text) - text = code_spans(text) - text = escape_special_chars(text) - text = images(text) - text = anchors(text) - text = auto_links(text) - text = amps_and_angles(text) - text = emphasis(text) - text = line_breaks(text) - return text -end - ----------------------------------------------------------------------- --- Markdown ----------------------------------------------------------------------- - --- Cleanup the text by normalizing some possible variations to make further --- processing easier. -function cleanup(text) - -- Standardize line endings - text = text:gsub("\r\n", "\n") -- DOS to UNIX - text = text:gsub("\r", "\n") -- Mac to UNIX - - -- Convert all tabs to spaces - text = detab(text) - - -- Strip lines with only spaces and tabs - while true do - local subs - text, subs = text:gsub("\n[ \t]+\n", "\n\n") - if subs == 0 then break end - end - - return "\n" .. text .. "\n" -end - --- Strips link definitions from the text and stores the data in a lookup table. -function strip_link_definitions(text) - local linkdb = {} - - local function link_def(id, url, title) - id = id:match("%[(.+)%]"):lower() - linkdb[id] = linkdb[id] or {} - linkdb[id].url = url or linkdb[id].url - linkdb[id].title = title or linkdb[id].title - return "" - end - - local def_no_title = "\n ? ? ?(%b[]):[ \t]*\n?[ \t]*]+)>?[ \t]*" - local def_title1 = def_no_title .. "[ \t]+\n?[ \t]*[\"'(]([^\n]+)[\"')][ \t]*" - local def_title2 = def_no_title .. "[ \t]*\n[ \t]*[\"'(]([^\n]+)[\"')][ \t]*" - local def_title3 = def_no_title .. "[ \t]*\n?[ \t]+[\"'(]([^\n]+)[\"')][ \t]*" - - text = text:gsub(def_title1, link_def) - text = text:gsub(def_title2, link_def) - text = text:gsub(def_title3, link_def) - text = text:gsub(def_no_title, link_def) - return text, linkdb -end - -link_database = {} - --- Main markdown processing function -function markdown(text) - init_hash(text) - init_escape_table() - - text = cleanup(text) - text = protect(text) - text, link_database = strip_link_definitions(text) - text = block_transform(text) - text = unescape_special_chars(text) - return text -end - ----------------------------------------------------------------------- --- End of module ----------------------------------------------------------------------- - -setfenv(1, _G) -M.lock(M) - --- Expose markdown function to the world -markdown = M.markdown - --- Class for parsing command-line options -local OptionParser = {} -OptionParser.__index = OptionParser - --- Creates a new option parser -function OptionParser:new() - local o = {short = {}, long = {}} - setmetatable(o, self) - return o -end - --- Calls f() whenever a flag with specified short and long name is encountered -function OptionParser:flag(short, long, f) - local info = {type = "flag", f = f} - if short then self.short[short] = info end - if long then self.long[long] = info end -end - --- Calls f(param) whenever a parameter flag with specified short and long name is encountered -function OptionParser:param(short, long, f) - local info = {type = "param", f = f} - if short then self.short[short] = info end - if long then self.long[long] = info end -end - --- Calls f(v) for each non-flag argument -function OptionParser:arg(f) - self.arg = f -end - --- Runs the option parser for the specified set of arguments. Returns true if all arguments --- where successfully parsed and false otherwise. -function OptionParser:run(args) - local pos = 1 - while pos <= #args do - local arg = args[pos] - if arg == "--" then - for i=pos+1,#args do - if self.arg then self.arg(args[i]) end - return true - end - end - if arg:match("^%-%-") then - local info = self.long[arg:sub(3)] - if not info then print("Unknown flag: " .. arg) return false end - if info.type == "flag" then - info.f() - pos = pos + 1 - else - param = args[pos+1] - if not param then print("No parameter for flag: " .. arg) return false end - info.f(param) - pos = pos+2 - end - elseif arg:match("^%-") then - for i=2,arg:len() do - local c = arg:sub(i,i) - local info = self.short[c] - if not info then print("Unknown flag: -" .. c) return false end - if info.type == "flag" then - info.f() - else - if i == arg:len() then - param = args[pos+1] - if not param then print("No parameter for flag: -" .. c) return false end - info.f(param) - pos = pos + 1 - else - param = arg:sub(i+1) - info.f(param) - end - break - end - end - pos = pos + 1 - else - if self.arg then self.arg(arg) end - pos = pos + 1 - end - end - return true -end - --- Handles the case when markdown is run from the command line -local function run_command_line(arg) - -- Generate output for input s given options - local function run(s, options) - s = markdown(s) - if not options.wrap_header then return s end - local header = "" - if options.header then - local f = io.open(options.header) or error("Could not open file: " .. options.header) - header = f:read("*a") - f:close() - else - header = [[ - - - - - TITLE - - - -]] - local title = options.title or s:match("

    (.-)

    ") or s:match("

    (.-)

    ") or - s:match("

    (.-)

    ") or "Untitled" - header = header:gsub("TITLE", title) - if options.inline_style then - local style = "" - local f = io.open(options.stylesheet) - if f then - style = f:read("*a") f:close() - else - error("Could not include style sheet " .. options.stylesheet .. ": File not found") - end - header = header:gsub('', - "") - else - header = header:gsub("STYLESHEET", options.stylesheet) - end - header = header:gsub("CHARSET", options.charset) - end - local footer = "" - if options.footer then - local f = io.open(options.footer) or error("Could not open file: " .. options.footer) - footer = f:read("*a") - f:close() - end - return header .. s .. footer - end - - -- Generate output path name from input path name given options. - local function outpath(path, options) - if options.append then return path .. ".html" end - local m = path:match("^(.+%.html)[^/\\]+$") if m then return m end - m = path:match("^(.+%.)[^/\\]*$") if m and path ~= m .. "html" then return m .. "html" end - return path .. ".html" - end - - -- Default commandline options - local options = { - wrap_header = true, - header = nil, - footer = nil, - charset = "utf-8", - title = nil, - stylesheet = "default.css", - inline_style = false - } - local help = [[ -Usage: markdown.lua [OPTION] [FILE] -Runs the markdown text markup to HTML converter on each file specified on the -command line. If no files are specified, runs on standard input. - -No header: - -n, --no-wrap Don't wrap the output in ... tags. -Custom header: - -e, --header FILE Use content of FILE for header. - -f, --footer FILE Use content of FILE for footer. -Generated header: - -c, --charset SET Specifies charset (default utf-8). - -i, --title TITLE Specifies title (default from first

    tag). - -s, --style STYLE Specifies style sheet file (default default.css). - -l, --inline-style Include the style sheet file inline in the header. -Generated files: - -a, --append Append .html extension (instead of replacing). -Other options: - -h, --help Print this help text. - -t, --test Run the unit tests. -]] - - local run_stdin = true - local op = OptionParser:new() - op:flag("n", "no-wrap", function () options.wrap_header = false end) - op:param("e", "header", function (x) options.header = x end) - op:param("f", "footer", function (x) options.footer = x end) - op:param("c", "charset", function (x) options.charset = x end) - op:param("i", "title", function(x) options.title = x end) - op:param("s", "style", function(x) options.stylesheet = x end) - op:flag("l", "inline-style", function(x) options.inline_style = true end) - op:flag("a", "append", function() options.append = true end) - op:flag("t", "test", function() - local n = arg[0]:gsub("markdown.lua", "markdown-tests.lua") - local f = io.open(n) - if f then - f:close() dofile(n) - else - error("Cannot find markdown-tests.lua") - end - run_stdin = false - end) - op:flag("h", "help", function() print(help) run_stdin = false end) - op:arg(function(path) - local file = io.open(path) or error("Could not open file: " .. path) - local s = file:read("*a") - file:close() - s = run(s, options) - file = io.open(outpath(path, options), "w") or error("Could not open output file: " .. outpath(path, options)) - file:write(s) - file:close() - run_stdin = false - end - ) - - if not op:run(arg) then - print(help) - run_stdin = false - end - - if run_stdin then - local s = io.read("*a") - s = run(s, options) - io.write(s) - end -end - --- If we are being run from the command-line, act accordingly -if arg and arg[0]:find("markdown%.lua$") then - run_command_line(arg) -else - return markdown -end \ No newline at end of file diff --git a/Utils/luarocks/share/lua/5.1/metalua/compiler.lua b/Utils/luarocks/share/lua/5.1/metalua/compiler.lua deleted file mode 100644 index 202b254fd..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/compiler.lua +++ /dev/null @@ -1,181 +0,0 @@ ---------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- --------------------------------------------------------------------------------- - --------------------------------------------------------------------------------- --- --- Convert between various code representation formats. Atomic --- converters are written in extenso, others are composed automatically --- by chaining the atomic ones together in a closure. --- --- Supported formats are: --- --- * srcfile: the name of a file containing sources. --- * src: these sources as a single string. --- * lexstream: a stream of lexemes. --- * ast: an abstract syntax tree. --- * proto: a (Yueliang) struture containing a high level --- representation of bytecode. Largely based on the --- Proto structure in Lua's VM --- * bytecode: a string dump of the function, as taken by --- loadstring() and produced by string.dump(). --- * function: an executable lua function in RAM. --- --------------------------------------------------------------------------------- - -local checks = require 'checks' - -local M = { } - --------------------------------------------------------------------------------- --- Order of the transformations. if 'a' is on the left of 'b', then a 'a' can --- be transformed into a 'b' (but not the other way around). --- M.sequence goes for numbers to format names, M.order goes from format --- names to numbers. --------------------------------------------------------------------------------- -M.sequence = { - 'srcfile', 'src', 'lexstream', 'ast', 'proto', 'bytecode', 'function' } - -local arg_types = { - srcfile = { 'string', '?string' }, - src = { 'string', '?string' }, - lexstream = { 'lexer.stream', '?string' }, - ast = { 'table', '?string' }, - proto = { 'table', '?string' }, - bytecode = { 'string', '?string' }, -} - -if false then - -- if defined, runs on every newly-generated AST - function M.check_ast(ast) - local function rec(x, n, parent) - if not x.lineinfo and parent.lineinfo then - local pp = require 'metalua.pprint' - pp.printf("WARNING: Missing lineinfo in child #%s `%s{...} of node at %s", - n, x.tag or '', tostring(parent.lineinfo)) - end - for i, child in ipairs(x) do - if type(child)=='table' then rec(child, i, x) end - end - end - rec(ast, -1, { }) - end -end - - -M.order= { }; for a,b in pairs(M.sequence) do M.order[b]=a end - -local CONV = { } -- conversion metatable __index - -function CONV :srcfile_to_src(x, name) - checks('metalua.compiler', 'string', '?string') - name = name or '@'..x - local f, msg = io.open (x, 'rb') - if not f then error(msg) end - local r, msg = f :read '*a' - if not r then error("Cannot read file '"..x.."': "..msg) end - f :close() - return r, name -end - -function CONV :src_to_lexstream(src, name) - checks('metalua.compiler', 'string', '?string') - local r = self.parser.lexer :newstream (src, name) - return r, name -end - -function CONV :lexstream_to_ast(lx, name) - checks('metalua.compiler', 'lexer.stream', '?string') - local r = self.parser.chunk(lx) - r.source = name - if M.check_ast then M.check_ast (r) end - return r, name -end - -local bytecode_compiler = nil -- cache to avoid repeated `pcall(require(...))` -local function get_bytecode_compiler() - if bytecode_compiler then return bytecode_compiler else - local status, result = pcall(require, 'metalua.compiler.bytecode') - if status then - bytecode_compiler = result - return result - elseif string.match(result, "not found") then - error "Compilation only available with full Metalua" - else error (result) end - end -end - -function CONV :ast_to_proto(ast, name) - checks('metalua.compiler', 'table', '?string') - return get_bytecode_compiler().ast_to_proto(ast, name), name -end - -function CONV :proto_to_bytecode(proto, name) - return get_bytecode_compiler().proto_to_bytecode(proto), name -end - -function CONV :bytecode_to_function(bc, name) - checks('metalua.compiler', 'string', '?string') - return loadstring(bc, name) -end - --- Create all sensible combinations -for i=1,#M.sequence do - local src = M.sequence[i] - for j=i+2, #M.sequence do - local dst = M.sequence[j] - local dst_name = src.."_to_"..dst - local my_arg_types = arg_types[src] - local functions = { } - for k=i, j-1 do - local name = M.sequence[k].."_to_"..M.sequence[k+1] - local f = assert(CONV[name], name) - table.insert (functions, f) - end - CONV[dst_name] = function(self, a, b) - checks('metalua.compiler', unpack(my_arg_types)) - for _, f in ipairs(functions) do - a, b = f(self, a, b) - end - return a, b - end - --printf("Created M.%s out of %s", dst_name, table.concat(n, ', ')) - end -end - - --------------------------------------------------------------------------------- --- This one goes in the "wrong" direction, cannot be composed. --------------------------------------------------------------------------------- -function CONV :function_to_bytecode(...) return string.dump(...) end - -function CONV :ast_to_src(...) - require 'metalua.loader' -- ast_to_string isn't written in plain lua - return require 'metalua.compiler.ast_to_src' (...) -end - -local MT = { __index=CONV, __type='metalua.compiler' } - -function M.new() - local parser = require 'metalua.compiler.parser' .new() - local self = { parser = parser } - setmetatable(self, MT) - return self -end - -return M \ No newline at end of file diff --git a/Utils/luarocks/share/lua/5.1/metalua/compiler/ast_to_src.mlua b/Utils/luarocks/share/lua/5.1/metalua/compiler/ast_to_src.mlua deleted file mode 100644 index ca80a12d2..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/compiler/ast_to_src.mlua +++ /dev/null @@ -1,682 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- -------------------------------------------------------------------------------- - --{ extension ('match', ...) } - -local M = { } -M.__index = M -M.__call = |self, ...| self:run(...) - -local pp=require 'metalua.pprint' - --------------------------------------------------------------------------------- --- Instanciate a new AST->source synthetizer --------------------------------------------------------------------------------- -function M.new () - local self = { - _acc = { }, -- Accumulates pieces of source as strings - current_indent = 0, -- Current level of line indentation - indent_step = " " -- Indentation symbol, normally spaces or '\t' - } - return setmetatable (self, M) -end - --------------------------------------------------------------------------------- --- Run a synthetizer on the `ast' arg and return the source as a string. --- Can also be used as a static method `M.run (ast)'; in this case, --- a temporary Metizer is instanciated on the fly. --------------------------------------------------------------------------------- -function M:run (ast) - if not ast then - self, ast = M.new(), self - end - self._acc = { } - self:node (ast) - return table.concat (self._acc) -end - --------------------------------------------------------------------------------- --- Accumulate a piece of source file in the synthetizer. --------------------------------------------------------------------------------- -function M:acc (x) - if x then table.insert (self._acc, x) end -end - --------------------------------------------------------------------------------- --- Accumulate an indented newline. --- Jumps an extra line if indentation is 0, so that --- toplevel definitions are separated by an extra empty line. --------------------------------------------------------------------------------- -function M:nl () - if self.current_indent == 0 then self:acc "\n" end - self:acc ("\n" .. self.indent_step:rep (self.current_indent)) -end - --------------------------------------------------------------------------------- --- Increase indentation and accumulate a new line. --------------------------------------------------------------------------------- -function M:nlindent () - self.current_indent = self.current_indent + 1 - self:nl () -end - --------------------------------------------------------------------------------- --- Decrease indentation and accumulate a new line. --------------------------------------------------------------------------------- -function M:nldedent () - self.current_indent = self.current_indent - 1 - self:acc ("\n" .. self.indent_step:rep (self.current_indent)) -end - --------------------------------------------------------------------------------- --- Keywords, which are illegal as identifiers. --------------------------------------------------------------------------------- -local keywords_list = { - "and", "break", "do", "else", "elseif", - "end", "false", "for", "function", "if", - "in", "local", "nil", "not", "or", - "repeat", "return", "then", "true", "until", - "while" } -local keywords = { } -for _, kw in pairs(keywords_list) do keywords[kw]=true end - --------------------------------------------------------------------------------- --- Return true iff string `id' is a legal identifier name. --------------------------------------------------------------------------------- -local function is_ident (id) - return string['match'](id, "^[%a_][%w_]*$") and not keywords[id] -end - --------------------------------------------------------------------------------- --- Return true iff ast represents a legal function name for --- syntax sugar ``function foo.bar.gnat() ... end'': --- a series of nested string indexes, with an identifier as --- the innermost node. --------------------------------------------------------------------------------- -local function is_idx_stack (ast) - match ast with - | `Id{ _ } -> return true - | `Index{ left, `String{ _ } } -> return is_idx_stack (left) - | _ -> return false - end -end - --------------------------------------------------------------------------------- --- Operator precedences, in increasing order. --- This is not directly used, it's used to generate op_prec below. --------------------------------------------------------------------------------- -local op_preprec = { - { "or", "and" }, - { "lt", "le", "eq", "ne" }, - { "concat" }, - { "add", "sub" }, - { "mul", "div", "mod" }, - { "unary", "not", "len" }, - { "pow" }, - { "index" } } - --------------------------------------------------------------------------------- --- operator --> precedence table, generated from op_preprec. --------------------------------------------------------------------------------- -local op_prec = { } - -for prec, ops in ipairs (op_preprec) do - for _, op in ipairs (ops) do - op_prec[op] = prec - end -end - --------------------------------------------------------------------------------- --- operator --> source representation. --------------------------------------------------------------------------------- -local op_symbol = { - add = " + ", sub = " - ", mul = " * ", - div = " / ", mod = " % ", pow = " ^ ", - concat = " .. ", eq = " == ", ne = " ~= ", - lt = " < ", le = " <= ", ["and"] = " and ", - ["or"] = " or ", ["not"] = "not ", len = "# " } - --------------------------------------------------------------------------------- --- Accumulate the source representation of AST `node' in --- the synthetizer. Most of the work is done by delegating to --- the method having the name of the AST tag. --- If something can't be converted to normal sources, it's --- instead dumped as a `-{ ... }' splice in the source accumulator. --------------------------------------------------------------------------------- -function M:node (node) - assert (self~=M and self._acc) - if node==nil then self:acc'<>' - elseif not self.custom_printer or not self.custom_printer (self, node) then - if not node.tag then -- tagless (henceunindented) block. - self:list (node, self.nl) - else - local f = M[node.tag] - if type (f) == "function" then -- Delegate to tag method. - f (self, node, unpack (node)) - elseif type (f) == "string" then -- tag string. - self:acc (f) - else -- No appropriate method, fall back to splice dumping. - -- This cannot happen in a plain Lua AST. - self:acc " -{ " - self:acc (pp.tostring (node, {metalua_tag=1, hide_hash=1}), 80) - self:acc " }" - end - end - end -end - -function M:block(body) - if not self.custom_printer or not self.custom_printer (self, body) then - self:nlindent () - self:list (body, self.nl) - self:nldedent () - end -end - --------------------------------------------------------------------------------- --- Convert every node in the AST list `list' passed as 1st arg. --- `sep' is an optional separator to be accumulated between each list element, --- it can be a string or a synth method. --- `start' is an optional number (default == 1), indicating which is the --- first element of list to be converted, so that we can skip the begining --- of a list. --------------------------------------------------------------------------------- -function M:list (list, sep, start) - for i = start or 1, # list do - self:node (list[i]) - if list[i + 1] then - if not sep then - elseif type (sep) == "function" then sep (self) - elseif type (sep) == "string" then self:acc (sep) - else error "Invalid list separator" end - end - end -end - --------------------------------------------------------------------------------- --- --- Tag methods. --- ------------ --- --- Specific AST node dumping methods, associated to their node kinds --- by their name, which is the corresponding AST tag. --- synth:node() is in charge of delegating a node's treatment to the --- appropriate tag method. --- --- Such tag methods are called with the AST node as 1st arg. --- As a convenience, the n node's children are passed as args #2 ... n+1. --- --- There are several things that could be refactored into common subroutines --- here: statement blocks dumping, function dumping... --- However, given their small size and linear execution --- (they basically perform series of :acc(), :node(), :list(), --- :nl(), :nlindent() and :nldedent() calls), it seems more readable --- to avoid multiplication of such tiny functions. --- --- To make sense out of these, you need to know metalua's AST syntax, as --- found in the reference manual or in metalua/doc/ast.txt. --- --------------------------------------------------------------------------------- - -function M:Do (node) - self:acc "do" - self:block (node) - self:acc "end" -end - -function M:Set (node) - match node with - | `Set{ { `Index{ lhs, `String{ method } } }, - { `Function{ { `Id "self", ... } == params, body } } } - if is_idx_stack (lhs) and is_ident (method) -> - -- ``function foo:bar(...) ... end'' -- - self:acc "function " - self:node (lhs) - self:acc ":" - self:acc (method) - self:acc " (" - self:list (params, ", ", 2) - self:acc ")" - self:block (body) - self:acc "end" - - | `Set{ { lhs }, { `Function{ params, body } } } if is_idx_stack (lhs) -> - -- ``function foo(...) ... end'' -- - self:acc "function " - self:node (lhs) - self:acc " (" - self:list (params, ", ") - self:acc ")" - self:block (body) - self:acc "end" - - | `Set{ { `Id{ lhs1name } == lhs1, ... } == lhs, rhs } - if not is_ident (lhs1name) -> - -- ``foo, ... = ...'' when foo is *not* a valid identifier. - -- In that case, the spliced 1st variable must get parentheses, - -- to be distinguished from a statement splice. - -- This cannot happen in a plain Lua AST. - self:acc "(" - self:node (lhs1) - self:acc ")" - if lhs[2] then -- more than one lhs variable - self:acc ", " - self:list (lhs, ", ", 2) - end - self:acc " = " - self:list (rhs, ", ") - - | `Set{ lhs, rhs } -> - -- ``... = ...'', no syntax sugar -- - self:list (lhs, ", ") - self:acc " = " - self:list (rhs, ", ") - | `Set{ lhs, rhs, annot } -> - -- ``... = ...'', no syntax sugar, annotation -- - local n = #lhs - for i=1,n do - local ell, a = lhs[i], annot[i] - self:node (ell) - if a then - self:acc ' #' - self:node(a) - end - if i~=n then self:acc ', ' end - end - self:acc " = " - self:list (rhs, ", ") - end -end - -function M:While (node, cond, body) - self:acc "while " - self:node (cond) - self:acc " do" - self:block (body) - self:acc "end" -end - -function M:Repeat (node, body, cond) - self:acc "repeat" - self:block (body) - self:acc "until " - self:node (cond) -end - -function M:If (node) - for i = 1, #node-1, 2 do - -- for each ``if/then'' and ``elseif/then'' pair -- - local cond, body = node[i], node[i+1] - self:acc (i==1 and "if " or "elseif ") - self:node (cond) - self:acc " then" - self:block (body) - end - -- odd number of children --> last one is an `else' clause -- - if #node%2 == 1 then - self:acc "else" - self:block (node[#node]) - end - self:acc "end" -end - -function M:Fornum (node, var, first, last) - local body = node[#node] - self:acc "for " - self:node (var) - self:acc " = " - self:node (first) - self:acc ", " - self:node (last) - if #node==5 then -- 5 children --> child #4 is a step increment. - self:acc ", " - self:node (node[4]) - end - self:acc " do" - self:block (body) - self:acc "end" -end - -function M:Forin (node, vars, generators, body) - self:acc "for " - self:list (vars, ", ") - self:acc " in " - self:list (generators, ", ") - self:acc " do" - self:block (body) - self:acc "end" -end - -function M:Local (node, lhs, rhs, annots) - if next (lhs) then - self:acc "local " - if annots then - local n = #lhs - for i=1, n do - self:node (lhs) - local a = annots[i] - if a then - self:acc ' #' - self:node (a) - end - if i~=n then self:acc ', ' end - end - else - self:list (lhs, ", ") - end - if rhs[1] then - self:acc " = " - self:list (rhs, ", ") - end - else -- Can't create a local statement with 0 variables in plain Lua - self:acc (pp.tostring (node, {metalua_tag=1, hide_hash=1, fix_indent=2})) - end -end - -function M:Localrec (node, lhs, rhs) - match node with - | `Localrec{ { `Id{name} }, { `Function{ params, body } } } - if is_ident (name) -> - -- ``local function name() ... end'' -- - self:acc "local function " - self:acc (name) - self:acc " (" - self:list (params, ", ") - self:acc ")" - self:block (body) - self:acc "end" - - | _ -> - -- Other localrec are unprintable ==> splice them -- - -- This cannot happen in a plain Lua AST. -- - self:acc "-{ " - self:acc (pp.tostring (node, {metalua_tag=1, hide_hash=1, fix_indent=2})) - self:acc " }" - end -end - -function M:Call (node, f) - -- single string or table literal arg ==> no need for parentheses. -- - local parens - match node with - | `Call{ _, `String{_} } - | `Call{ _, `Table{...}} -> parens = false - | _ -> parens = true - end - self:node (f) - self:acc (parens and " (" or " ") - self:list (node, ", ", 2) -- skip `f'. - self:acc (parens and ")") -end - -function M:Invoke (node, f, method) - -- single string or table literal arg ==> no need for parentheses. -- - local parens - match node with - | `Invoke{ _, _, `String{_} } - | `Invoke{ _, _, `Table{...}} -> parens = false - | _ -> parens = true - end - self:node (f) - self:acc ":" - self:acc (method[1]) - self:acc (parens and " (" or " ") - self:list (node, ", ", 3) -- Skip args #1 and #2, object and method name. - self:acc (parens and ")") -end - -function M:Return (node) - self:acc "return " - self:list (node, ", ") -end - -M.Break = "break" -M.Nil = "nil" -M.False = "false" -M.True = "true" -M.Dots = "..." - -function M:Number (node, n) - self:acc (tostring (n)) -end - -function M:String (node, str) - -- format "%q" prints '\n' in an umpractical way IMO, - -- so this is fixed with the :gsub( ) call. - self:acc (string.format ("%q", str):gsub ("\\\n", "\\n")) -end - -function M:Function (node, params, body, annots) - self:acc "function (" - if annots then - local n = #params - for i=1,n do - local p, a = params[i], annots[i] - self:node(p) - if annots then - self:acc " #" - self:node(a) - end - if i~=n then self:acc ', ' end - end - else - self:list (params, ", ") - end - self:acc ")" - self:block (body) - self:acc "end" -end - -function M:Table (node) - if not node[1] then self:acc "{ }" else - self:acc "{" - if #node > 1 then self:nlindent () else self:acc " " end - for i, elem in ipairs (node) do - match elem with - | `Pair{ `String{ key }, value } if is_ident (key) -> - -- ``key = value''. -- - self:acc (key) - self:acc " = " - self:node (value) - - | `Pair{ key, value } -> - -- ``[key] = value''. -- - self:acc "[" - self:node (key) - self:acc "] = " - self:node (value) - - | _ -> - -- ``value''. -- - self:node (elem) - end - if node [i+1] then - self:acc "," - self:nl () - end - end - if #node > 1 then self:nldedent () else self:acc " " end - self:acc "}" - end -end - -function M:Op (node, op, a, b) - -- Transform ``not (a == b)'' into ``a ~= b''. -- - match node with - | `Op{ "not", `Op{ "eq", _a, _b } } - | `Op{ "not", `Paren{ `Op{ "eq", _a, _b } } } -> - op, a, b = "ne", _a, _b - | _ -> - end - - if b then -- binary operator. - local left_paren, right_paren - match a with - | `Op{ op_a, ...} if op_prec[op] >= op_prec[op_a] -> left_paren = true - | _ -> left_paren = false - end - - match b with -- FIXME: might not work with right assoc operators ^ and .. - | `Op{ op_b, ...} if op_prec[op] >= op_prec[op_b] -> right_paren = true - | _ -> right_paren = false - end - - self:acc (left_paren and "(") - self:node (a) - self:acc (left_paren and ")") - - self:acc (op_symbol [op]) - - self:acc (right_paren and "(") - self:node (b) - self:acc (right_paren and ")") - - else -- unary operator. - local paren - match a with - | `Op{ op_a, ... } if op_prec[op] >= op_prec[op_a] -> paren = true - | _ -> paren = false - end - self:acc (op_symbol[op]) - self:acc (paren and "(") - self:node (a) - self:acc (paren and ")") - end -end - -function M:Paren (node, content) - self:acc "(" - self:node (content) - self:acc ")" -end - -function M:Index (node, table, key) - local paren_table - -- Check precedence, see if parens are needed around the table -- - match table with - | `Op{ op, ... } if op_prec[op] < op_prec.index -> paren_table = true - | _ -> paren_table = false - end - - self:acc (paren_table and "(") - self:node (table) - self:acc (paren_table and ")") - - match key with - | `String{ field } if is_ident (field) -> - -- ``table.key''. -- - self:acc "." - self:acc (field) - | _ -> - -- ``table [key]''. -- - self:acc "[" - self:node (key) - self:acc "]" - end -end - -function M:Id (node, name) - if is_ident (name) then - self:acc (name) - else -- Unprintable identifier, fall back to splice representation. - -- This cannot happen in a plain Lua AST. - self:acc "-{`Id " - self:String (node, name) - self:acc "}" - end -end - - -M.TDyn = '*' -M.TDynbar = '**' -M.TPass = 'pass' -M.TField = 'field' -M.TIdbar = M.TId -M.TReturn = M.Return - - -function M:TId (node, name) self:acc(name) end - - -function M:TCatbar(node, te, tebar) - self:acc'(' - self:node(te) - self:acc'|' - self:tebar(tebar) - self:acc')' -end - -function M:TFunction(node, p, r) - self:tebar(p) - self:acc '->' - self:tebar(r) -end - -function M:TTable (node, default, pairs) - self:acc '[' - self:list (pairs, ', ') - if default.tag~='TField' then - self:acc '|' - self:node (default) - end - self:acc ']' -end - -function M:TPair (node, k, v) - self:node (k) - self:acc '=' - self:node (v) -end - -function M:TIdbar (node, name) - self :acc (name) -end - -function M:TCatbar (node, a, b) - self:node(a) - self:acc ' ++ ' - self:node(b) -end - -function M:tebar(node) - if node.tag then self:node(node) else - self:acc '(' - self:list(node, ', ') - self:acc ')' - end -end - -function M:TUnkbar(node, name) - self:acc '~~' - self:acc (name) -end - -function M:TUnk(node, name) - self:acc '~' - self:acc (name) -end - -for name, tag in pairs{ const='TConst', var='TVar', currently='TCurrently', just='TJust' } do - M[tag] = function(self, node, te) - self:acc (name..' ') - self:node(te) - end -end - -return M diff --git a/Utils/luarocks/share/lua/5.1/metalua/compiler/bytecode.lua b/Utils/luarocks/share/lua/5.1/metalua/compiler/bytecode.lua deleted file mode 100644 index b3afbdb73..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/compiler/bytecode.lua +++ /dev/null @@ -1,29 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- --------------------------------------------------------------------------------- - -local compile = require 'metalua.compiler.bytecode.compile' -local ldump = require 'metalua.compiler.bytecode.ldump' - -local M = { } - -M.ast_to_proto = compile.ast_to_proto -M.proto_to_bytecode = ldump.dump_string -M.proto_to_file = ldump.dump_file - -return M \ No newline at end of file diff --git a/Utils/luarocks/share/lua/5.1/metalua/compiler/bytecode/compile.lua b/Utils/luarocks/share/lua/5.1/metalua/compiler/bytecode/compile.lua deleted file mode 100644 index 011517f3d..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/compiler/bytecode/compile.lua +++ /dev/null @@ -1,1263 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Kein-Hong Man, Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Kein-Hong Man - Initial implementation for Lua 5.0, part of Yueliang --- Fabien Fleutot - Port to Lua 5.1, integration with Metalua --- -------------------------------------------------------------------------------- - ----------------------------------------------------------------------- --- --- This code mainly results from the borrowing, then ruthless abuse, of --- Yueliang's implementation of Lua 5.0 compiler. --- ---------------------------------------------------------------------- - -local pp = require 'metalua.pprint' - -local luaK = require 'metalua.compiler.bytecode.lcode' -local luaP = require 'metalua.compiler.bytecode.lopcodes' - -local debugf = function() end ---local debugf=printf - -local stat = { } -local expr = { } - -local M = { } - -M.MAX_INT = 2147483645 -- INT_MAX-2 for 32-bit systems (llimits.h) -M.MAXVARS = 200 -- (llimits.h) -M.MAXUPVALUES = 32 -- (llimits.h) -M.MAXPARAMS = 100 -- (llimits.h) -M.LUA_MAXPARSERLEVEL = 200 -- (llimits.h) - --- from lobject.h -M.VARARG_HASARG = 1 -M.VARARG_ISVARARG = 2 -M.VARARG_NEEDSARG = 4 - -local function hasmultret (k) - return k=="VCALL" or k=="VVARARG" -end - ------------------------------------------------------------------------ --- Some ASTs take expression lists as children; it should be --- acceptible to give an expression instead, and to automatically --- interpret it as a single element list. That's what does this --- function, adding a surrounding list iff needed. --- --- WARNING: "Do" is the tag for chunks, which are essentially lists. --- Therefore, we don't listify stuffs with a "Do" tag. ------------------------------------------------------------------------ -local function ensure_list (ast) - return ast.tag and ast.tag ~= "Do" and {ast} or ast end - ------------------------------------------------------------------------ --- Get a localvar structure { varname, startpc, endpc } from a --- (zero-based) index of active variable. The catch is: don't get --- confused between local index and active index. --- --- locvars[x] contains { varname, startpc, endpc }; --- actvar[i] contains the index of the variable in locvars ------------------------------------------------------------------------ -local function getlocvar (fs, i) - return fs.f.locvars[fs.actvar[i]] -end - -local function removevars (fs, tolevel) - while fs.nactvar > tolevel do - fs.nactvar = fs.nactvar - 1 - -- There may be dummy locvars due to expr.Stat - -- FIXME: strange that they didn't disappear?! - local locvar = getlocvar (fs, fs.nactvar) - --printf("[REMOVEVARS] removing var #%i = %s", fs.nactvar, - -- locvar and tostringv(locvar) or "") - if locvar then locvar.endpc = fs.pc end - end -end - ------------------------------------------------------------------------ --- [f] has a list of all its local variables, active and inactive. --- Some local vars can correspond to the same register, if they exist --- in different scopes. --- [fs.nlocvars] is the total number of local variables, not to be --- confused with [fs.nactvar] the numebr of variables active at the --- current PC. --- At this stage, the existence of the variable is not yet aknowledged, --- since [fs.nactvar] and [fs.freereg] aren't updated. ------------------------------------------------------------------------ -local function registerlocalvar (fs, varname) - --debugf("[locvar: %s = reg %i]", varname, fs.nlocvars) - local f = fs.f - f.locvars[fs.nlocvars] = { } -- LocVar - f.locvars[fs.nlocvars].varname = varname - local nlocvars = fs.nlocvars - fs.nlocvars = fs.nlocvars + 1 - return nlocvars -end - ------------------------------------------------------------------------ --- update the active vars counter in [fs] by adding [nvars] of them, --- and sets those variables' [startpc] to the current [fs.pc]. --- These variables were allready created, but not yet counted, by --- new_localvar. ------------------------------------------------------------------------ -local function adjustlocalvars (fs, nvars) - --debugf("adjustlocalvars, nvars=%i, previous fs.nactvar=%i,".. - -- " #locvars=%i, #actvar=%i", - -- nvars, fs.nactvar, #fs.f.locvars, #fs.actvar) - - fs.nactvar = fs.nactvar + nvars - for i = nvars, 1, -1 do - --printf ("adjusting actvar #%i", fs.nactvar - i) - getlocvar (fs, fs.nactvar - i).startpc = fs.pc - end -end - ------------------------------------------------------------------------- --- check whether, in an assignment to a local variable, the local variable --- is needed in a previous assignment (to a table). If so, save original --- local value in a safe place and use this safe copy in the previous --- assignment. ------------------------------------------------------------------------- -local function check_conflict (fs, lh, v) - local extra = fs.freereg -- eventual position to save local variable - local conflict = false - while lh do - if lh.v.k == "VINDEXED" then - if lh.v.info == v.info then -- conflict? - conflict = true - lh.v.info = extra -- previous assignment will use safe copy - end - if lh.v.aux == v.info then -- conflict? - conflict = true - lh.v.aux = extra -- previous assignment will use safe copy - end - end - lh = lh.prev - end - if conflict then - luaK:codeABC (fs, "OP_MOVE", fs.freereg, v.info, 0) -- make copy - luaK:reserveregs (fs, 1) - end -end - ------------------------------------------------------------------------ --- Create an expdesc. To be updated when expdesc is lua-ified. ------------------------------------------------------------------------ -local function init_exp (e, k, i) - e.f, e.t, e.k, e.info = luaK.NO_JUMP, luaK.NO_JUMP, k, i end - ------------------------------------------------------------------------ --- Reserve the string in tthe constant pool, and return an expdesc --- referring to it. ------------------------------------------------------------------------ -local function codestring (fs, e, str) - --printf( "codestring(%s)", disp.ast(str)) - init_exp (e, "VK", luaK:stringK (fs, str)) -end - ------------------------------------------------------------------------ --- search for a local variable named [name] in the function being --- built by [fs]. Doesn't try to visit upvalues. ------------------------------------------------------------------------ -local function searchvar (fs, name) - for i = fs.nactvar - 1, 0, -1 do - -- Because of expr.Stat, there can be some actvars which don't - -- correspond to any locvar. Hence the checking for locvar's - -- nonnilness before getting the varname. - local locvar = getlocvar(fs, i) - if locvar and name == locvar.varname then - --printf("Found local var: %s; i = %i", tostringv(locvar), i) - return i - end - end - return -1 -- not found -end - ------------------------------------------------------------------------ --- create and return a new proto [f] ------------------------------------------------------------------------ -local function newproto () - local f = {} - f.k = {} - f.sizek = 0 - f.p = {} - f.sizep = 0 - f.code = {} - f.sizecode = 0 - f.sizelineinfo = 0 - f.sizeupvalues = 0 - f.nups = 0 - f.upvalues = {} - f.numparams = 0 - f.is_vararg = 0 - f.maxstacksize = 0 - f.lineinfo = {} - f.sizelocvars = 0 - f.locvars = {} - f.lineDefined = 0 - f.source = nil - return f -end - ------------------------------------------------------------------------- --- create and return a function state [new_fs] as a sub-funcstate of [fs]. ------------------------------------------------------------------------- -local function open_func (old_fs) - local new_fs = { } - new_fs.upvalues = { } - new_fs.actvar = { } - local f = newproto () - new_fs.f = f - new_fs.prev = old_fs -- linked list of funcstates - new_fs.pc = 0 - new_fs.lasttarget = -1 - new_fs.jpc = luaK.NO_JUMP - new_fs.freereg = 0 - new_fs.nk = 0 - new_fs.h = {} -- constant table; was luaH_new call - new_fs.np = 0 - new_fs.nlocvars = 0 - new_fs.nactvar = 0 - new_fs.bl = nil - new_fs.nestlevel = old_fs and old_fs.nestlevel or 0 - f.maxstacksize = 2 -- registers 0/1 are always valid - new_fs.lastline = 0 - new_fs.forward_gotos = { } - new_fs.labels = { } - return new_fs -end - ------------------------------------------------------------------------- --- Finish to set up [f] according to final state of [fs] ------------------------------------------------------------------------- -local function close_func (fs) - local f = fs.f - --printf("[CLOSE_FUNC] remove any remaining var") - removevars (fs, 0) - luaK:ret (fs, 0, 0) - f.sizecode = fs.pc - f.sizelineinfo = fs.pc - f.sizek = fs.nk - f.sizep = fs.np - f.sizelocvars = fs.nlocvars - f.sizeupvalues = f.nups - assert (fs.bl == nil) - if next(fs.forward_gotos) then - local x = pp.tostring(fs.forward_gotos) - error ("Unresolved goto: "..x) - end -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function pushclosure(fs, func, v) - local f = fs.f - f.p [fs.np] = func.f - fs.np = fs.np + 1 - init_exp (v, "VRELOCABLE", luaK:codeABx (fs, "OP_CLOSURE", 0, fs.np - 1)) - for i = 0, func.f.nups - 1 do - local o = (func.upvalues[i].k == "VLOCAL") and "OP_MOVE" or "OP_GETUPVAL" - luaK:codeABC (fs, o, 0, func.upvalues[i].info, 0) - end -end - ------------------------------------------------------------------------- --- FIXME: is there a need for f=fs.f? if yes, why not always using it? ------------------------------------------------------------------------- -local function indexupvalue(fs, name, v) - local f = fs.f - for i = 0, f.nups - 1 do - if fs.upvalues[i].k == v.k and fs.upvalues[i].info == v.info then - assert(fs.f.upvalues[i] == name) - return i - end - end - -- new one - f.upvalues[f.nups] = name - assert (v.k == "VLOCAL" or v.k == "VUPVAL") - fs.upvalues[f.nups] = { k = v.k; info = v.info } - local nups = f.nups - f.nups = f.nups + 1 - return nups -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function markupval(fs, level) - local bl = fs.bl - while bl and bl.nactvar > level do bl = bl.previous end - if bl then bl.upval = true end -end - - ---for debug only ---[[ -local function bldepth(fs) - local i, x= 1, fs.bl - while x do i=i+1; x=x.previous end - return i -end ---]] - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function enterblock (fs, bl, isbreakable) - bl.breaklist = luaK.NO_JUMP - bl.isbreakable = isbreakable - bl.nactvar = fs.nactvar - bl.upval = false - bl.previous = fs.bl - fs.bl = bl - assert (fs.freereg == fs.nactvar) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function leaveblock (fs) - local bl = fs.bl - fs.bl = bl.previous - --printf("[LEAVEBLOCK] Removing vars...") - removevars (fs, bl.nactvar) - --printf("[LEAVEBLOCK] ...Vars removed") - if bl.upval then - luaK:codeABC (fs, "OP_CLOSE", bl.nactvar, 0, 0) - end - -- a block either controls scope or breaks (never both) - assert (not bl.isbreakable or not bl.upval) - assert (bl.nactvar == fs.nactvar) - fs.freereg = fs.nactvar -- free registers - luaK:patchtohere (fs, bl.breaklist) -end - - ------------------------------------------------------------------------- --- read a list of expressions from a list of ast [astlist] --- starts at the [offset]th element of the list (defaults to 1) ------------------------------------------------------------------------- -local function explist(fs, astlist, v, offset) - offset = offset or 1 - if #astlist < offset then error "I don't handle empty expr lists yet" end - --printf("[EXPLIST] about to precompile 1st element %s", disp.ast(astlist[offset])) - expr.expr (fs, astlist[offset], v) - --printf("[EXPLIST] precompiled first element v=%s", tostringv(v)) - for i = offset+1, #astlist do - luaK:exp2nextreg (fs, v) - --printf("[EXPLIST] flushed v=%s", tostringv(v)) - expr.expr (fs, astlist[i], v) - --printf("[EXPLIST] precompiled element v=%s", tostringv(v)) - end - return #astlist - offset + 1 -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function funcargs (fs, ast, v, idx_from) - local args = { } -- expdesc - local nparams - if #ast < idx_from then args.k = "VVOID" else - explist(fs, ast, args, idx_from) - luaK:setmultret(fs, args) - end - assert(v.k == "VNONRELOC") - local base = v.info -- base register for call - if hasmultret(args.k) then nparams = luaK.LUA_MULTRET else -- open call - if args.k ~= "VVOID" then - luaK:exp2nextreg(fs, args) end -- close last argument - nparams = fs.freereg - (base + 1) - end - init_exp(v, "VCALL", luaK:codeABC(fs, "OP_CALL", base, nparams + 1, 2)) - if ast.lineinfo then - luaK:fixline(fs, ast.lineinfo.first.line) - else - luaK:fixline(fs, ast.line) - end - fs.freereg = base + 1 -- call remove function and arguments and leaves - -- (unless changed) one result -end - ------------------------------------------------------------------------- --- calculates log value for encoding the hash portion's size ------------------------------------------------------------------------- -local function log2(x) - -- math result is always one more than lua0_log2() - local mn, ex = math.frexp(x) - return ex - 1 -end - ------------------------------------------------------------------------- --- converts an integer to a "floating point byte", represented as --- (mmmmmxxx), where the real value is (xxx) * 2^(mmmmm) ------------------------------------------------------------------------- - --- local function int2fb(x) --- local m = 0 -- mantissa --- while x >= 8 do x = math.floor((x + 1) / 2); m = m + 1 end --- return m * 8 + x --- end - -local function int2fb(x) - local e = 0 - while x >= 16 do - x = math.floor ( (x+1) / 2) - e = e+1 - end - if x<8 then return x - else return (e+1) * 8 + x - 8 end -end - - ------------------------------------------------------------------------- --- FIXME: to be unified with singlevar ------------------------------------------------------------------------- -local function singlevaraux(fs, n, var, base) ---[[ -print("\n\nsinglevaraux: fs, n, var, base") -printv(fs) -printv(n) -printv(var) -printv(base) -print("\n") ---]] - if fs == nil then -- no more levels? - init_exp(var, "VGLOBAL", luaP.NO_REG) -- default is global variable - return "VGLOBAL" - else - local v = searchvar(fs, n) -- look up at current level - if v >= 0 then - init_exp(var, "VLOCAL", v) - if not base then - markupval(fs, v) -- local will be used as an upval - end - else -- not found at current level; try upper one - if singlevaraux(fs.prev, n, var, false) == "VGLOBAL" then - return "VGLOBAL" end - var.info = indexupvalue (fs, n, var) - var.k = "VUPVAL" - return "VUPVAL" - end - end -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function singlevar(fs, varname, var) - if singlevaraux(fs, varname, var, true) == "VGLOBAL" then - var.info = luaK:stringK (fs, varname) end -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function new_localvar (fs, name, n) - assert (type (name) == "string") - if fs.nactvar + n > M.MAXVARS then error ("too many local vars") end - fs.actvar[fs.nactvar + n] = registerlocalvar (fs, name) - --printf("[NEW_LOCVAR] %i = %s", fs.nactvar+n, name) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function parlist (fs, ast_params) - local dots = (#ast_params > 0 and ast_params[#ast_params].tag == "Dots") - local nparams = dots and #ast_params - 1 or #ast_params - for i = 1, nparams do - assert (ast_params[i].tag == "Id", "Function parameters must be Ids") - new_localvar (fs, ast_params[i][1], i-1) - end - -- from [code_param]: - --checklimit (fs, fs.nactvar, self.M.MAXPARAMS, "parameters") - fs.f.numparams = fs.nactvar - fs.f.is_vararg = dots and M.VARARG_ISVARARG or 0 - adjustlocalvars (fs, nparams) - fs.f.numparams = fs.nactvar --FIXME vararg must be taken in account - luaK:reserveregs (fs, fs.nactvar) -- reserve register for parameters -end - ------------------------------------------------------------------------- --- if there's more variables than expressions in an assignment, --- some assignations to nil are made for extraneous vars. --- Also handles multiret functions ------------------------------------------------------------------------- -local function adjust_assign (fs, nvars, nexps, e) - local extra = nvars - nexps - if hasmultret (e.k) then - extra = extra+1 -- includes call itself - if extra <= 0 then extra = 0 end - luaK:setreturns(fs, e, extra) -- call provides the difference - if extra > 1 then luaK:reserveregs(fs, extra-1) end - else - if e.k ~= "VVOID" then - luaK:exp2nextreg(fs, e) end -- close last expression - if extra > 0 then - local reg = fs.freereg - luaK:reserveregs(fs, extra) - luaK:_nil(fs, reg, extra) - end - end -end - - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function enterlevel (fs) - fs.nestlevel = fs.nestlevel + 1 - assert (fs.nestlevel <= M.LUA_MAXPARSERLEVEL, "too many syntax levels") -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function leavelevel (fs) - fs.nestlevel = fs.nestlevel - 1 -end - ------------------------------------------------------------------------- --- Parse conditions in if/then/else, while, repeat ------------------------------------------------------------------------- -local function cond (fs, ast) - local v = { } - expr.expr(fs, ast, v) -- read condition - if v.k == "VNIL" then v.k = "VFALSE" end -- 'falses' are all equal here - luaK:goiftrue (fs, v) - return v.f -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function chunk (fs, ast) - enterlevel (fs) - assert (not ast.tag) - for i=1, #ast do - stat.stat (fs, ast[i]); - fs.freereg = fs.nactvar - end - leavelevel (fs) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function block (fs, ast) - local bl = {} - enterblock (fs, bl, false) - for i=1, #ast do - stat.stat (fs, ast[i]) - fs.freereg = fs.nactvar - end - assert (bl.breaklist == luaK.NO_JUMP) - leaveblock (fs) -end - ------------------------------------------------------------------------- --- Forin / Fornum body parser --- [fs] --- [body] --- [base] --- [nvars] --- [isnum] ------------------------------------------------------------------------- -local function forbody (fs, ast_body, base, nvars, isnum) - local bl = {} -- BlockCnt - adjustlocalvars (fs, 3) -- control variables - local prep = - isnum and luaK:codeAsBx (fs, "OP_FORPREP", base, luaK.NO_JUMP) - or luaK:jump (fs) - enterblock (fs, bl, false) -- loop block - adjustlocalvars (fs, nvars) -- scope for declared variables - luaK:reserveregs (fs, nvars) - block (fs, ast_body) - leaveblock (fs) - --luaK:patchtohere (fs, prep-1) - luaK:patchtohere (fs, prep) - local endfor = - isnum and luaK:codeAsBx (fs, "OP_FORLOOP", base, luaK.NO_JUMP) - or luaK:codeABC (fs, "OP_TFORLOOP", base, 0, nvars) - luaK:fixline (fs, ast_body.line) -- pretend that 'OP_FOR' starts the loop - luaK:patchlist (fs, isnum and endfor or luaK:jump(fs), prep + 1) -end - - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function recfield (fs, ast, cc) - local reg = fs.freereg - local key, val = {}, {} -- expdesc - --FIXME: expr + exp2val = index --> - -- check reduncancy between exp2val and exp2rk - cc.nh = cc.nh + 1 - expr.expr(fs, ast[1], key); - luaK:exp2val (fs, key) - local keyreg = luaK:exp2RK (fs, key) - expr.expr(fs, ast[2], val) - local valreg = luaK:exp2RK (fs, val) - luaK:codeABC(fs, "OP_SETTABLE", cc.t.info, keyreg, valreg) - fs.freereg = reg -- free registers -end - - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function listfield(fs, ast, cc) - expr.expr(fs, ast, cc.v) - assert (cc.na <= luaP.MAXARG_Bx) -- FIXME check <= or < - cc.na = cc.na + 1 - cc.tostore = cc.tostore + 1 -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function closelistfield(fs, cc) - if cc.v.k == "VVOID" then return end -- there is no list item - luaK:exp2nextreg(fs, cc.v) - cc.v.k = "VVOID" - if cc.tostore == luaP.LFIELDS_PER_FLUSH then - luaK:setlist (fs, cc.t.info, cc.na, cc.tostore) - cc.tostore = 0 - end -end - ------------------------------------------------------------------------- --- The last field might be a call to a multireturn function. In that --- case, we must unfold all of its results into the list. ------------------------------------------------------------------------- -local function lastlistfield(fs, cc) - if cc.tostore == 0 then return end - if hasmultret (cc.v.k) then - luaK:setmultret(fs, cc.v) - luaK:setlist (fs, cc.t.info, cc.na, luaK.LUA_MULTRET) - cc.na = cc.na - 1 - else - if cc.v.k ~= "VVOID" then luaK:exp2nextreg(fs, cc.v) end - luaK:setlist (fs, cc.t.info, cc.na, cc.tostore) - end -end ------------------------------------------------------------------------- ------------------------------------------------------------------------- --- --- Statement parsers table --- ------------------------------------------------------------------------- ------------------------------------------------------------------------- - -function stat.stat (fs, ast) - if ast.lineinfo then fs.lastline = ast.lineinfo.last.line end - --debugf (" - Statement %s", table.tostring (ast) ) - - if not ast.tag then chunk (fs, ast) else - - local parser = stat [ast.tag] - if not parser then - error ("A statement cannot have tag `"..ast.tag) end - parser (fs, ast) - end - --debugf (" - /Statement `%s", ast.tag) -end - ------------------------------------------------------------------------- - -stat.Do = block - ------------------------------------------------------------------------- - -function stat.Break (fs, ast) - -- if ast.lineinfo then fs.lastline = ast.lineinfo.last.line - local bl, upval = fs.bl, false - while bl and not bl.isbreakable do - if bl.upval then upval = true end - bl = bl.previous - end - assert (bl, "no loop to break") - if upval then luaK:codeABC(fs, "OP_CLOSE", bl.nactvar, 0, 0) end - bl.breaklist = luaK:concat(fs, bl.breaklist, luaK:jump(fs)) -end - ------------------------------------------------------------------------- - -function stat.Return (fs, ast) - local e = {} -- expdesc - local first -- registers with returned values - local nret = #ast - - if nret == 0 then first = 0 - else - --printf("[RETURN] compiling explist") - explist (fs, ast, e) - --printf("[RETURN] explist e=%s", tostringv(e)) - if hasmultret (e.k) then - luaK:setmultret(fs, e) - if e.k == "VCALL" and nret == 1 then - luaP:SET_OPCODE(luaK:getcode(fs, e), "OP_TAILCALL") - assert(luaP:GETARG_A(luaK:getcode(fs, e)) == fs.nactvar) - end - first = fs.nactvar - nret = luaK.LUA_MULTRET -- return all values - elseif nret == 1 then - first = luaK:exp2anyreg(fs, e) - else - --printf("* Return multiple vals in nextreg %i", fs.freereg) - luaK:exp2nextreg(fs, e) -- values must go to the 'stack' - first = fs.nactvar -- return all 'active' values - assert(nret == fs.freereg - first) - end - end - luaK:ret(fs, first, nret) -end ------------------------------------------------------------------------- - -function stat.Local (fs, ast) - local names, values = ast[1], ast[2] or { } - for i = 1, #names do new_localvar (fs, names[i][1], i-1) end - local e = { } - if #values == 0 then e.k = "VVOID" else explist (fs, values, e) end - adjust_assign (fs, #names, #values, e) - adjustlocalvars (fs, #names) -end - ------------------------------------------------------------------------- - -function stat.Localrec (fs, ast) - assert(#ast[1]==1 and #ast[2]==1, "Multiple letrecs not implemented yet") - local ast_var, ast_val, e_var, e_val = ast[1][1], ast[2][1], { }, { } - new_localvar (fs, ast_var[1], 0) - init_exp (e_var, "VLOCAL", fs.freereg) - luaK:reserveregs (fs, 1) - adjustlocalvars (fs, 1) - expr.expr (fs, ast_val, e_val) - luaK:storevar (fs, e_var, e_val) - getlocvar (fs, fs.nactvar-1).startpc = fs.pc -end - ------------------------------------------------------------------------- - -function stat.If (fs, ast) - local astlen = #ast - -- Degenerate case #1: no statement - if astlen==0 then return block(fs, { }) end - -- Degenerate case #2: only an else statement - if astlen==1 then return block(fs, ast[1]) end - - local function test_then_block (fs, test, body) - local condexit = cond (fs, test); - block (fs, body) - return condexit - end - - local escapelist = luaK.NO_JUMP - - local flist = test_then_block (fs, ast[1], ast[2]) -- 'then' statement - for i = 3, #ast - 1, 2 do -- 'elseif' statement - escapelist = luaK:concat( fs, escapelist, luaK:jump(fs)) - luaK:patchtohere (fs, flist) - flist = test_then_block (fs, ast[i], ast[i+1]) - end - if #ast % 2 == 1 then -- 'else' statement - escapelist = luaK:concat(fs, escapelist, luaK:jump(fs)) - luaK:patchtohere(fs, flist) - block (fs, ast[#ast]) - else - escapelist = luaK:concat(fs, escapelist, flist) - end - luaK:patchtohere(fs, escapelist) -end - ------------------------------------------------------------------------- - -function stat.Forin (fs, ast) - local vars, vals, body = ast[1], ast[2], ast[3] - -- imitating forstat: - local bl = { } - enterblock (fs, bl, true) - -- imitating forlist: - local e, base = { }, fs.freereg - new_localvar (fs, "(for generator)", 0) - new_localvar (fs, "(for state)", 1) - new_localvar (fs, "(for control)", 2) - for i = 1, #vars do new_localvar (fs, vars[i][1], i+2) end - explist (fs, vals, e) - adjust_assign (fs, 3, #vals, e) - luaK:checkstack (fs, 3) - forbody (fs, body, base, #vars, false) - -- back to forstat: - leaveblock (fs) -end - ------------------------------------------------------------------------- - -function stat.Fornum (fs, ast) - - local function exp1 (ast_e) - local e = { } - expr.expr (fs, ast_e, e) - luaK:exp2nextreg (fs, e) - end - -- imitating forstat: - local bl = { } - enterblock (fs, bl, true) - -- imitating fornum: - local base = fs.freereg - new_localvar (fs, "(for index)", 0) - new_localvar (fs, "(for limit)", 1) - new_localvar (fs, "(for step)", 2) - new_localvar (fs, ast[1][1], 3) - exp1 (ast[2]) -- initial value - exp1 (ast[3]) -- limit - if #ast == 5 then exp1 (ast[4]) else -- default step = 1 - luaK:codeABx(fs, "OP_LOADK", fs.freereg, luaK:numberK(fs, 1)) - luaK:reserveregs(fs, 1) - end - forbody (fs, ast[#ast], base, 1, true) - -- back to forstat: - leaveblock (fs) -end - ------------------------------------------------------------------------- -function stat.Repeat (fs, ast) - local repeat_init = luaK:getlabel (fs) - local bl1, bl2 = { }, { } - enterblock (fs, bl1, true) - enterblock (fs, bl2, false) - chunk (fs, ast[1]) - local condexit = cond (fs, ast[2]) - if not bl2.upval then - leaveblock (fs) - luaK:patchlist (fs, condexit, repeat_init) - else - stat.Break (fs) - luaK:patchtohere (fs, condexit) - leaveblock (fs) - luaK:patchlist (fs, luaK:jump (fs), repeat_init) - end - leaveblock (fs) -end - ------------------------------------------------------------------------- - -function stat.While (fs, ast) - local whileinit = luaK:getlabel (fs) - local condexit = cond (fs, ast[1]) - local bl = { } - enterblock (fs, bl, true) - block (fs, ast[2]) - luaK:patchlist (fs, luaK:jump (fs), whileinit) - leaveblock (fs) - luaK:patchtohere (fs, condexit); -end - ------------------------------------------------------------------------- - --- FIXME: it's cumbersome to write this in this semi-recursive way. -function stat.Set (fs, ast) - local ast_lhs, ast_vals, e = ast[1], ast[2], { } - - --print "\n\nSet ast_lhs ast_vals:" - --print(disp.ast(ast_lhs)) - --print(disp.ast(ast_vals)) - - local function let_aux (lhs, nvars) - local legal = { VLOCAL=1, VUPVAL=1, VGLOBAL=1, VINDEXED=1 } - --printv(lhs) - if not legal [lhs.v.k] then - error ("Bad lhs expr: "..pp.tostring(ast_lhs)) - end - if nvars < #ast_lhs then -- this is not the last lhs - local nv = { v = { }, prev = lhs } - expr.expr (fs, ast_lhs [nvars+1], nv.v) - if nv.v.k == "VLOCAL" then check_conflict (fs, lhs, nv.v) end - let_aux (nv, nvars+1) - else -- this IS the last lhs - explist (fs, ast_vals, e) - if #ast_vals < nvars then - adjust_assign (fs, nvars, #ast_vals, e) - elseif #ast_vals > nvars then - adjust_assign (fs, nvars, #ast_vals, e) - fs.freereg = fs.freereg - #ast_vals + nvars - else -- #ast_vals == nvars (and we're at last lhs) - luaK:setoneret (fs, e) -- close last expression - luaK:storevar (fs, lhs.v, e) - return -- avoid default - end - end - init_exp (e, "VNONRELOC", fs.freereg - 1) -- default assignment - luaK:storevar (fs, lhs.v, e) - end - - local lhs = { v = { }, prev = nil } - expr.expr (fs, ast_lhs[1], lhs.v) - let_aux( lhs, 1) -end - ------------------------------------------------------------------------- - -function stat.Call (fs, ast) - local v = { } - expr.Call (fs, ast, v) - luaP:SETARG_C (luaK:getcode(fs, v), 1) -end - ------------------------------------------------------------------------- - -function stat.Invoke (fs, ast) - local v = { } - expr.Invoke (fs, ast, v) - --FIXME: didn't check that, just copied from stat.Call - luaP:SETARG_C (luaK:getcode(fs, v), 1) -end - - -local function patch_goto (fs, src, dst) - -end - - ------------------------------------------------------------------------- --- Goto/Label data: --- fs.labels :: string => { nactvar :: int; pc :: int } --- fs.forward_gotos :: string => list(int) --- --- fs.labels goes from label ids to the number of active variables at --- the label's PC, and that PC --- --- fs.forward_gotos goes from label ids to the list of the PC where --- some goto wants to jump to this label. Since gotos are actually made --- up of two instructions OP_CLOSE and OP_JMP, it's the first instruction's --- PC that's stored in fs.forward_gotos --- --- Note that backward gotos aren't stored: since their destination is knowns --- when they're compiled, their target is directly set. ------------------------------------------------------------------------- - ------------------------------------------------------------------------- --- Set a Label to jump to with Goto ------------------------------------------------------------------------- -function stat.Label (fs, ast) - local label_id = ast[1] - if type(label_id)=='table' then label_id=label_id[1] end - -- printf("Label %s at PC %i", label_id, fs.pc) - ------------------------------------------------------------------- - -- Register the label, so that future gotos can use it. - ------------------------------------------------------------------- - if fs.labels [label_id] then error "Duplicate label in function" - else fs.labels [label_id] = { pc = fs.pc; nactvar = fs.nactvar } end - local gotos = fs.forward_gotos [label_id] - if gotos then - ---------------------------------------------------------------- - -- Patch forward gotos which were targetting this label. - ---------------------------------------------------------------- - for _, goto_pc in ipairs(gotos) do - local close_instr = fs.f.code[goto_pc] - local jmp_instr = fs.f.code[goto_pc+1] - local goto_nactvar = luaP:GETARG_A (close_instr) - if fs.nactvar < goto_nactvar then - luaP:SETARG_A (close_instr, fs.nactvar) end - luaP:SETARG_sBx (jmp_instr, fs.pc - goto_pc - 2) - end - ---------------------------------------------------------------- - -- Gotos are patched, they can be forgotten about (when the - -- function will be finished, it will be checked that all gotos - -- have been patched, by checking that forward_goto is empty). - ---------------------------------------------------------------- - fs.forward_gotos[label_id] = nil - end -end - ------------------------------------------------------------------------- --- jumps to a label set with stat.Label. --- Argument must be a String or an Id --- FIXME/optim: get rid of useless OP_CLOSE when nactvar doesn't change. --- Thsi must be done both here for backward gotos, and in --- stat.Label for forward gotos. ------------------------------------------------------------------------- -function stat.Goto (fs, ast) - local label_id = ast[1] - if type(label_id)=='table' then label_id=label_id[1] end - -- printf("Goto %s at PC %i", label_id, fs.pc) - local label = fs.labels[label_id] - if label then - ---------------------------------------------------------------- - -- Backward goto: the label already exists, so I can get its - -- nactvar and address directly. nactvar is used to close - -- upvalues if we get out of scoping blocks by jumping. - ---------------------------------------------------------------- - if fs.nactvar > label.nactvar then - luaK:codeABC (fs, "OP_CLOSE", label.nactvar, 0, 0) end - local offset = label.pc - fs.pc - 1 - luaK:codeAsBx (fs, "OP_JMP", 0, offset) - else - ---------------------------------------------------------------- - -- Forward goto: will be patched when the matching label is - -- found, forward_gotos[label_id] keeps the PC of the CLOSE - -- instruction just before the JMP. [stat.Label] will use it to - -- patch the OP_CLOSE and the OP_JMP. - ---------------------------------------------------------------- - if not fs.forward_gotos[label_id] then - fs.forward_gotos[label_id] = { } end - table.insert (fs.forward_gotos[label_id], fs.pc) - luaK:codeABC (fs, "OP_CLOSE", fs.nactvar, 0, 0) - luaK:codeAsBx (fs, "OP_JMP", 0, luaK.NO_JUMP) - end -end - ------------------------------------------------------------------------- ------------------------------------------------------------------------- --- --- Expression parsers table --- ------------------------------------------------------------------------- ------------------------------------------------------------------------- - -function expr.expr (fs, ast, v) - if type(ast) ~= "table" then - error ("Expr AST expected, got "..pp.tostring(ast)) end - - if ast.lineinfo then fs.lastline = ast.lineinfo.last.line end - - --debugf (" - Expression %s", table.tostring (ast)) - local parser = expr[ast.tag] - if parser then parser (fs, ast, v) - elseif not ast.tag then - error ("No tag in expression ".. - pp.tostring(ast, {line_max=80, hide_hash=1, metalua_tag=1})) - else - error ("No parser for node `"..ast.tag) end - --debugf (" - /Expression `%s", ast.tag) -end - ------------------------------------------------------------------------- - -function expr.Nil (fs, ast, v) init_exp (v, "VNIL", 0) end -function expr.True (fs, ast, v) init_exp (v, "VTRUE", 0) end -function expr.False (fs, ast, v) init_exp (v, "VFALSE", 0) end -function expr.String (fs, ast, v) codestring (fs, v, ast[1]) end -function expr.Number (fs, ast, v) - init_exp (v, "VKNUM", 0) - v.nval = ast[1] -end - -function expr.Paren (fs, ast, v) - expr.expr (fs, ast[1], v) - luaK:setoneret (fs, v) -end - -function expr.Dots (fs, ast, v) - assert (fs.f.is_vararg ~= 0, "No vararg in this function") - -- NEEDSARG flag is set if and only if the function is a vararg, - -- but no vararg has been used yet in its code. - if fs.f.is_vararg < M.VARARG_NEEDSARG then - fs.f.is_varag = fs.f.is_vararg - M.VARARG_NEEDSARG end - init_exp (v, "VVARARG", luaK:codeABC (fs, "OP_VARARG", 0, 1, 0)) -end - ------------------------------------------------------------------------- - -function expr.Table (fs, ast, v) - local pc = luaK:codeABC(fs, "OP_NEWTABLE", 0, 0, 0) - local cc = { v = { } , na = 0, nh = 0, tostore = 0, t = v } -- ConsControl - init_exp (v, "VRELOCABLE", pc) - init_exp (cc.v, "VVOID", 0) -- no value (yet) - luaK:exp2nextreg (fs, v) -- fix it at stack top (for gc) - for i = 1, #ast do - assert(cc.v.k == "VVOID" or cc.tostore > 0) - closelistfield(fs, cc); - (ast[i].tag == "Pair" and recfield or listfield) (fs, ast[i], cc) - end - lastlistfield(fs, cc) - - -- Configure [OP_NEWTABLE] dimensions - luaP:SETARG_B(fs.f.code[pc], int2fb(cc.na)) -- set initial array size - luaP:SETARG_C(fs.f.code[pc], int2fb(cc.nh)) -- set initial table size - --printv(fs.f.code[pc]) -end - - ------------------------------------------------------------------------- - -function expr.Function (fs, ast, v) - if ast.lineinfo then fs.lastline = ast.lineinfo.last.line end - - local new_fs = open_func(fs) - if ast.lineinfo then - new_fs.f.lineDefined, new_fs.f.lastLineDefined = - ast.lineinfo.first.line, ast.lineinfo.last.line - end - parlist (new_fs, ast[1]) - chunk (new_fs, ast[2]) - close_func (new_fs) - pushclosure(fs, new_fs, v) -end - ------------------------------------------------------------------------- - -function expr.Op (fs, ast, v) - if ast.lineinfo then fs.lastline = ast.lineinfo.last.line end - local op = ast[1] - - if #ast == 2 then - expr.expr (fs, ast[2], v) - luaK:prefix (fs, op, v) - elseif #ast == 3 then - local v2 = { } - expr.expr (fs, ast[2], v) - luaK:infix (fs, op, v) - expr.expr (fs, ast[3], v2) - luaK:posfix (fs, op, v, v2) - else - error "Wrong arg number" - end -end - ------------------------------------------------------------------------- - -function expr.Call (fs, ast, v) - expr.expr (fs, ast[1], v) - luaK:exp2nextreg (fs, v) - funcargs(fs, ast, v, 2) - --debugf("after expr.Call: %s, %s", v.k, luaP.opnames[luaK:getcode(fs, v).OP]) -end - ------------------------------------------------------------------------- --- `Invoke{ table key args } -function expr.Invoke (fs, ast, v) - expr.expr (fs, ast[1], v) - luaK:dischargevars (fs, v) - local key = { } - codestring (fs, key, ast[2][1]) - luaK:_self (fs, v, key) - funcargs (fs, ast, v, 3) -end - ------------------------------------------------------------------------- - -function expr.Index (fs, ast, v) - if #ast ~= 2 then - print"\n\nBAD INDEX AST:" - pp.print(ast) - error "generalized indexes not implemented" end - - if ast.lineinfo then fs.lastline = ast.lineinfo.last.line end - - --assert(fs.lastline ~= 0, ast.tag) - - expr.expr (fs, ast[1], v) - luaK:exp2anyreg (fs, v) - - local k = { } - expr.expr (fs, ast[2], k) - luaK:exp2val (fs, k) - luaK:indexed (fs, v, k) -end - ------------------------------------------------------------------------- - -function expr.Id (fs, ast, v) - assert (ast.tag == "Id") - singlevar (fs, ast[1], v) -end - ------------------------------------------------------------------------- - -function expr.Stat (fs, ast, v) - --printf(" * Stat: %i actvars, first freereg is %i", fs.nactvar, fs.freereg) - --printf(" actvars: %s", table.tostring(fs.actvar)) - - -- Protect temporary stack values by pretending they are local - -- variables. Local vars are in registers 0 ... fs.nactvar-1, - -- and temporary unnamed variables in fs.nactvar ... fs.freereg-1 - local save_nactvar = fs.nactvar - - -- Eventually, the result should go on top of stack *after all - -- `Stat{ } related computation and string usage is over. The index - -- of this destination register is kept here: - local dest_reg = fs.freereg - - -- There might be variables in actvar whose register is > nactvar, - -- and therefore will not be protected by the "nactvar := freereg" - -- trick. Indeed, `Local only increases nactvar after the variable - -- content has been computed. Therefore, in - -- "local foo = -{`Stat{...}}", variable foo will be messed up by - -- the compilation of `Stat. - -- FIX: save the active variables at indices >= nactvar in - -- save_actvar, and restore them after `Stat has been computed. - -- - -- I use a while rather than for loops and length operators because - -- fs.actvar is a 0-based array... - local save_actvar = { } do - local i = fs.nactvar - while true do - local v = fs.actvar[i] - if not v then break end - --printf("save hald-baked actvar %s at index %i", table.tostring(v), i) - save_actvar[i] = v - i=i+1 - end - end - - fs.nactvar = fs.freereg -- Now temp unnamed registers are protected - enterblock (fs, { }, false) - chunk (fs, ast[1]) - expr.expr (fs, ast[2], v) - luaK:exp2nextreg (fs, v) - leaveblock (fs) - luaK:exp2reg (fs, v, dest_reg) - - -- Reserve the newly allocated stack level - -- Puzzled note: here was written "fs.freereg = fs.freereg+1". - -- I'm pretty sure it should rather be dest_reg+1, but maybe - -- both are equivalent? - fs.freereg = dest_reg+1 - - -- Restore nactvar, so that intermediate stacked value stop - -- being protected. - --printf(" nactvar back from %i to %i", fs.nactvar, save_nactvar) - fs.nactvar = save_nactvar - - -- restore messed-up unregistered local vars - for i, j in pairs(save_actvar) do - --printf(" Restoring actvar %i", i) - fs.actvar[i] = j - end - --printf(" * End of Stat") -end - ------------------------------------------------------------------------- --- Main function: ast --> proto ------------------------------------------------------------------------- -function M.ast_to_proto (ast, source) - local fs = open_func (nil) - fs.f.is_vararg = M.VARARG_ISVARARG - chunk (fs, ast) - close_func (fs) - assert (fs.prev == nil) - assert (fs.f.nups == 0) - assert (fs.nestlevel == 0) - if source then fs.f.source = source end - return fs.f, source -end - -return M \ No newline at end of file diff --git a/Utils/luarocks/share/lua/5.1/metalua/compiler/bytecode/lcode.lua b/Utils/luarocks/share/lua/5.1/metalua/compiler/bytecode/lcode.lua deleted file mode 100644 index ede1a1c45..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/compiler/bytecode/lcode.lua +++ /dev/null @@ -1,1038 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2005-2013 Kein-Hong Man, Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Kein-Hong Man - Initial implementation for Lua 5.0, part of Yueliang --- Fabien Fleutot - Port to Lua 5.1, integration with Metalua --- -------------------------------------------------------------------------------- - ---[[-------------------------------------------------------------------- - - $Id$ - - lcode.lua - Lua 5 code generator in Lua - This file is part of Yueliang. - - Copyright (c) 2005 Kein-Hong Man - The COPYRIGHT file describes the conditions - under which this software may be distributed. - - See the ChangeLog for more information. - ------------------------------------------------------------------------- - - [FF] Slightly modified, mainly to produce Lua 5.1 bytecode. - -----------------------------------------------------------------------]] - ---[[-------------------------------------------------------------------- --- Notes: --- * one function manipulate a pointer argument with a simple data type --- (can't be emulated by a table, ambiguous), now returns that value: --- luaK:concat(fs, l1, l2) --- * some function parameters changed to boolean, additional code --- translates boolean back to 1/0 for instruction fields --- * Added: --- luaK:ttisnumber(o) (from lobject.h) --- luaK:nvalue(o) (from lobject.h) --- luaK:setnilvalue(o) (from lobject.h) --- luaK:setsvalue(o) (from lobject.h) --- luaK:setnvalue(o) (from lobject.h) --- luaK:sethvalue(o) (from lobject.h) -----------------------------------------------------------------------]] - -local luaP = require 'metalua.compiler.bytecode.lopcodes' - -local function debugf() end - -local luaK = { } - -luaK.MAXSTACK = 250 -- (llimits.h, used in lcode.lua) -luaK.LUA_MULTRET = -1 -- (lua.h) - ------------------------------------------------------------------------- --- Marks the end of a patch list. It is an invalid value both as an absolute --- address, and as a list link (would link an element to itself). ------------------------------------------------------------------------- -luaK.NO_JUMP = -1 - ---FF 5.1 -function luaK:isnumeral(e) - return e.k=="VKNUM" and e.t==self.NO_JUMP and e.t==self.NO_JUMP -end - ------------------------------------------------------------------------- --- emulation of TObject macros (these are from lobject.h) --- * TObject is a table since lcode passes references around --- * tt member field removed, using Lua's type() instead ------------------------------------------------------------------------- -function luaK:ttisnumber(o) - if o then return type(o.value) == "number" else return false end -end -function luaK:nvalue(o) return o.value end -function luaK:setnilvalue(o) o.value = nil end -function luaK:setsvalue(o, s) o.value = s end -luaK.setnvalue = luaK.setsvalue -luaK.sethvalue = luaK.setsvalue - ------------------------------------------------------------------------- --- returns the instruction object for given e (expdesc) ------------------------------------------------------------------------- -function luaK:getcode(fs, e) - return fs.f.code[e.info] -end - ------------------------------------------------------------------------- --- codes an instruction with a signed Bx (sBx) field ------------------------------------------------------------------------- -function luaK:codeAsBx(fs, o, A, sBx) - return self:codeABx(fs, o, A, sBx + luaP.MAXARG_sBx) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:hasjumps(e) - return e.t ~= e.f -end - ------------------------------------------------------------------------- --- FF updated 5.1 ------------------------------------------------------------------------- -function luaK:_nil(fs, from, n) - if fs.pc > fs.lasttarget then -- no jumps to current position? - if fs.pc == 0 then return end --function start, positions are already clean - local previous = fs.f.code[fs.pc - 1] - if luaP:GET_OPCODE(previous) == "OP_LOADNIL" then - local pfrom = luaP:GETARG_A(previous) - local pto = luaP:GETARG_B(previous) - if pfrom <= from and from <= pto + 1 then -- can connect both? - if from + n - 1 > pto then - luaP:SETARG_B(previous, from + n - 1) - end - return - end - end - end - self:codeABC(fs, "OP_LOADNIL", from, from + n - 1, 0) -- else no optimization -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:jump(fs) - local jpc = fs.jpc -- save list of jumps to here - fs.jpc = self.NO_JUMP - local j = self:codeAsBx(fs, "OP_JMP", 0, self.NO_JUMP) - return self:concat(fs, j, jpc) -- keep them on hold -end - ---FF 5.1 -function luaK:ret (fs, first, nret) - luaK:codeABC (fs, "OP_RETURN", first, nret+1, 0) -end - - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:condjump(fs, op, A, B, C) - self:codeABC(fs, op, A, B, C) - return self:jump(fs) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:fixjump(fs, pc, dest) - local jmp = fs.f.code[pc] - local offset = dest - (pc + 1) - assert(dest ~= self.NO_JUMP) - if math.abs(offset) > luaP.MAXARG_sBx then - error("control structure too long") - end - luaP:SETARG_sBx(jmp, offset) -end - ------------------------------------------------------------------------- --- returns current 'pc' and marks it as a jump target (to avoid wrong --- optimizations with consecutive instructions not in the same basic block). ------------------------------------------------------------------------- -function luaK:getlabel(fs) - fs.lasttarget = fs.pc - return fs.pc -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:getjump(fs, pc) - local offset = luaP:GETARG_sBx(fs.f.code[pc]) - if offset == self.NO_JUMP then -- point to itself represents end of list - return self.NO_JUMP -- end of list - else - return (pc + 1) + offset -- turn offset into absolute position - end -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:getjumpcontrol(fs, pc) - local pi = fs.f.code[pc] - local ppi = fs.f.code[pc - 1] - if pc >= 1 and luaP:testOpMode(luaP:GET_OPCODE(ppi), "OpModeT") then - return ppi - else - return pi - end -end - ------------------------------------------------------------------------- --- check whether list has any jump that do not produce a value --- (or produce an inverted value) ------------------------------------------------------------------------- ---FF updated 5.1 -function luaK:need_value(fs, list, cond) - while list ~= self.NO_JUMP do - local i = self:getjumpcontrol(fs, list) - if luaP:GET_OPCODE(i) ~= "OP_TESTSET" or - luaP:GETARG_A(i) ~= luaP.NO_REG or - luaP:GETARG_C(i) ~= cond then - return true - end - list = self:getjump(fs, list) - end - return false -- not found -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- ---FF updated 5.1 -function luaK:patchtestreg(fs, node, reg) - assert(reg) -- pour assurer, vu que j'ai ajoute un parametre p/r a 5.0 - local i = self:getjumpcontrol(fs, node) - if luaP:GET_OPCODE(i) ~= "OP_TESTSET" then - return false end -- cannot patch other instructions - if reg ~= luaP.NO_REG and reg ~= luaP:GETARG_B(i) then - luaP:SETARG_A(i, reg) - else - -- no register to put value or register already has the value - luaP:SET_OPCODE(i, "OP_TEST") - luaP:SETARG_A(i, luaP:GETARG_B(i)) - luaP:SETARG_B(i, 0) - luaP:SETARG_C(i, luaP:GETARG_C(i)) - end - return true -end - ---FF added 5.1 -function luaK:removevalues (fs, list) - while list ~= self.NO_JUMP do - self:patchtestreg (fs, list, luaP.NO_REG) - list = self:getjump (fs, list) - end -end - ------------------------------------------------------------------------- --- FF updated 5.1 ------------------------------------------------------------------------- -function luaK:patchlistaux(fs, list, vtarget, reg, dtarget) - while list ~= self.NO_JUMP do - local _next = self:getjump(fs, list) - if self:patchtestreg (fs, list, reg) then - self:fixjump(fs, list, vtarget) - else - self:fixjump (fs, list, dtarget) - end - list = _next - end -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:dischargejpc(fs) - self:patchlistaux(fs, fs.jpc, fs.pc, luaP.NO_REG, fs.pc) - fs.jpc = self.NO_JUMP -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:patchlist(fs, list, target) - if target == fs.pc then - self:patchtohere(fs, list) - else - assert(target < fs.pc) - self:patchlistaux(fs, list, target, luaP.NO_REG, target) - end -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:patchtohere(fs, list) - self:getlabel(fs) - fs.jpc = self:concat(fs, fs.jpc, list) -end - ------------------------------------------------------------------------- --- * l1 was a pointer, now l1 is returned and callee assigns the value ------------------------------------------------------------------------- -function luaK:concat(fs, l1, l2) - if l2 == self.NO_JUMP then return l1 -- unchanged - elseif l1 == self.NO_JUMP then - return l2 -- changed - else - local list = l1 - local _next = self:getjump(fs, list) - while _next ~= self.NO_JUMP do -- find last element - list = _next - _next = self:getjump(fs, list) - end - self:fixjump(fs, list, l2) - end - return l1 -- unchanged -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:checkstack(fs, n) - local newstack = fs.freereg + n - if newstack > fs.f.maxstacksize then - if newstack >= luaK.MAXSTACK then - error("function or expression too complex") - end - fs.f.maxstacksize = newstack - end -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:reserveregs(fs, n) - self:checkstack(fs, n) - fs.freereg = fs.freereg + n -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:freereg(fs, reg) - if not luaP:ISK (reg) and reg >= fs.nactvar then - fs.freereg = fs.freereg - 1 - assert(reg == fs.freereg, - string.format("reg=%i, fs.freereg=%i", reg, fs.freereg)) - end -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:freeexp(fs, e) - if e.k == "VNONRELOC" then - self:freereg(fs, e.info) - end -end - ------------------------------------------------------------------------- --- k is a constant, v is... what? --- fs.h is a hash value --> index in f.k ------------------------------------------------------------------------- --- * luaH_get, luaH_set deleted; direct table access used instead --- * luaO_rawequalObj deleted in first assert --- * setobj2n deleted in assignment of v to f.k table ------------------------------------------------------------------------- ---FF radically updated, not completely understood -function luaK:addk(fs, k, v) - local idx = fs.h[k.value] - local f = fs.f --- local oldsize = f.sizek - if self:ttisnumber (idx) then - --TODO this assert currently FAILS - --assert(fs.f.k[self:nvalue(idx)] == v) - return self:nvalue(idx) - else -- constant not found; create a new entry - do - local t = type (v.value) - assert(t=="nil" or t=="string" or t=="number" or t=="boolean") - end - --debugf("[const: k[%i] = %s ]", fs.nk, tostringv(v.value)) - fs.f.k[fs.nk] = v - fs.h[k.value] = { } - self:setnvalue(fs.h[k.value], fs.nk) - local nk = fs.nk - fs.nk = fs.nk+1 - return nk - end -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:stringK(fs, s) - assert (type(s)=="string") - local o = {} -- TObject - self:setsvalue(o, s) - return self:addk(fs, o, o) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:numberK(fs, r) - assert (type(r)=="number") - local o = {} -- TObject - self:setnvalue(o, r) - return self:addk(fs, o, o) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:boolK(fs, r) - assert (type(r)=="boolean") - local o = {} -- TObject - self:setnvalue(o, r) - return self:addk(fs, o, o) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:nilK(fs) - local k, v = {}, {} -- TObject - self:setnilvalue(v) - self:sethvalue(k, fs.h) -- cannot use nil as key; instead use table itself - return self:addk(fs, k, v) -end - - ---FF 5.1 -function luaK:setreturns (fs, e, nresults) - if e.k == "VCALL" then -- expression is an open function call? - luaP:SETARG_C(self:getcode(fs, e), nresults + 1) - elseif e.k == "VVARARG" then - luaP:SETARG_B (self:getcode (fs, e), nresults + 1) - luaP:SETARG_A (self:getcode (fs, e), fs.freereg) - self:reserveregs (fs, 1) - end -end - ---FF 5.1 -function luaK:setmultret (fs, e) - self:setreturns (fs, e, self.LUA_MULTRET) -end - ---FF 5.1 -function luaK:setoneret (fs, e) - if e.k == "VCALL" then -- expression is an open function call? - e.k = "VNONRELOC" - e.info = luaP:GETARG_A(self:getcode(fs, e)) - elseif e.k == "VVARARG" then - luaP:SETARG_B (self:getcode (fs, e), 2) - e.k = "VRELOCABLE" - end -end - - ------------------------------------------------------------------------- ---FF deprecated in 5.1 ------------------------------------------------------------------------- -function luaK:setcallreturns(fs, e, nresults) - assert (false, "setcallreturns deprecated") - --print "SCR:" - --printv(e) - --printv(self:getcode(fs, e)) - if e.k == "VCALL" then -- expression is an open function call? - luaP:SETARG_C(self:getcode(fs, e), nresults + 1) - if nresults == 1 then -- 'regular' expression? - e.k = "VNONRELOC" - e.info = luaP:GETARG_A(self:getcode(fs, e)) - end - elseif e.k == "VVARARG" then - --printf("Handle vararg return on expr %s, whose code is %s", - -- tostringv(e), tostringv(self:getcode(fs, e))) - if nresults == 1 then - luaP:SETARG_B (self:getcode (fs, e), 2) - e.k = "VRELOCABLE" ---FIXME: why no SETARG_A??? - else - luaP:SETARG_B (self:getcode (fs, e), nresults + 1) - luaP:SETARG_A (self:getcode (fs, e), fs.freereg) - self:reserveregs (fs, 1) - --printf("Now code is %s", tostringv(self:getcode(fs, e))) - end - end -end - ------------------------------------------------------------------------- --- Ajoute le code pour effectuer l'extraction de la locvar/upval/globvar --- /idx, sachant ------------------------------------------------------------------------- -function luaK:dischargevars(fs, e) ---printf("\ndischargevars\n") - local k = e.k - if k == "VLOCAL" then - e.k = "VNONRELOC" - elseif k == "VUPVAL" then - e.info = self:codeABC(fs, "OP_GETUPVAL", 0, e.info, 0) - e.k = "VRELOCABLE" - elseif k == "VGLOBAL" then - e.info = self:codeABx(fs, "OP_GETGLOBAL", 0, e.info) - e.k = "VRELOCABLE" - elseif k == "VINDEXED" then - self:freereg(fs, e.aux) - self:freereg(fs, e.info) - e.info = self:codeABC(fs, "OP_GETTABLE", 0, e.info, e.aux) - e.k = "VRELOCABLE" - elseif k == "VCALL" or k == "VVARARG" then - self:setoneret(fs, e) - else - -- there is one value available (somewhere) - end ---printf("\n/dischargevars\n") -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:code_label(fs, A, b, jump) - self:getlabel(fs) -- those instructions may be jump targets - return self:codeABC(fs, "OP_LOADBOOL", A, b, jump) -end - ------------------------------------------------------------------------- --- FF updated 5.1 ------------------------------------------------------------------------- -function luaK:discharge2reg(fs, e, reg) - self:dischargevars(fs, e) - local k = e.k - if k == "VNIL" then - self:_nil(fs, reg, 1) - elseif k == "VFALSE" or k == "VTRUE" then - self:codeABC(fs, "OP_LOADBOOL", reg, (e.k == "VTRUE") and 1 or 0, 0) - elseif k == "VKNUM" then - self:codeABx (fs, "OP_LOADK", reg, self:numberK(fs, e.nval)) - elseif k == "VK" then - self:codeABx(fs, "OP_LOADK", reg, e.info) - elseif k == "VRELOCABLE" then - local pc = self:getcode(fs, e) - luaP:SETARG_A(pc, reg) - elseif k == "VNONRELOC" then - if reg ~= e.info then - self:codeABC(fs, "OP_MOVE", reg, e.info, 0) - end - else - assert(e.k == "VVOID" or e.k == "VJMP") - return -- nothing to do... - end - e.info = reg - e.k = "VNONRELOC" -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:discharge2anyreg(fs, e) - if e.k ~= "VNONRELOC" then - self:reserveregs(fs, 1) - self:discharge2reg(fs, e, fs.freereg - 1) - end -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:exp2reg(fs, e, reg) - self:discharge2reg(fs, e, reg) - if e.k == "VJMP" then - e.t = self:concat(fs, e.t, e.info) -- put this jump in 't' list - end - if self:hasjumps(e) then - local final -- position after whole expression - local p_f = self.NO_JUMP -- position of an eventual LOAD false - local p_t = self.NO_JUMP -- position of an eventual LOAD true - if self:need_value(fs, e.t, 1) or self:need_value(fs, e.f, 0) then - local fj = self.NO_JUMP -- first jump (over LOAD ops.) - if e.k ~= "VJMP" then fj = self:jump(fs) end - p_f = self:code_label(fs, reg, 0, 1) - p_t = self:code_label(fs, reg, 1, 0) - self:patchtohere(fs, fj) - end - final = self:getlabel(fs) - self:patchlistaux(fs, e.f, final, reg, p_f) - self:patchlistaux(fs, e.t, final, reg, p_t) - end - e.f, e.t = self.NO_JUMP, self.NO_JUMP - e.info = reg - e.k = "VNONRELOC" -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:exp2nextreg(fs, e) - self:dischargevars(fs, e) - --[FF] Allready in place (added for expr.Stat) - if e.k == "VNONRELOC" and e.info == fs.freereg then - --printf("Expression already in next reg %i: %s", fs.freereg, tostringv(e)) - return end - self:freeexp(fs, e) - self:reserveregs(fs, 1) - self:exp2reg(fs, e, fs.freereg - 1) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:exp2anyreg(fs, e) - --printf("exp2anyregs(e=%s)", tostringv(e)) - self:dischargevars(fs, e) - if e.k == "VNONRELOC" then - if not self:hasjumps(e) then -- exp is already in a register - return e.info - end - if e.info >= fs.nactvar then -- reg. is not a local? - self:exp2reg(fs, e, e.info) -- put value on it - return e.info - end - end - self:exp2nextreg(fs, e) -- default - return e.info -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:exp2val(fs, e) - if self:hasjumps(e) then - self:exp2anyreg(fs, e) - else - self:dischargevars(fs, e) - end -end - ------------------------------------------------------------------------- --- FF updated 5.1 ------------------------------------------------------------------------- -function luaK:exp2RK(fs, e) - self:exp2val(fs, e) - local k = e.k - if k=="VNIL" or k=="VTRUE" or k=="VFALSE" or k=="VKNUM" then - if fs.nk <= luaP.MAXINDEXRK then - if k=="VNIL" then e.info = self:nilK(fs) - elseif k=="VKNUM" then e.info = self:numberK (fs, e.nval) - else e.info = self:boolK(fs, e.k=="VTRUE") end - e.k = "VK" - return luaP:RKASK(e.info) - end - elseif k == "VK" then - if e.info <= luaP.MAXINDEXRK then -- constant fit in argC? - return luaP:RKASK (e.info) - end - end - -- not a constant in the right range: put it in a register - return self:exp2anyreg(fs, e) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:storevar(fs, var, exp) - --print("STOREVAR") - --printf("var=%s", tostringv(var)) - --printf("exp=%s", tostringv(exp)) - - local k = var.k - if k == "VLOCAL" then - self:freeexp(fs, exp) - self:exp2reg(fs, exp, var.info) - return - elseif k == "VUPVAL" then - local e = self:exp2anyreg(fs, exp) - self:codeABC(fs, "OP_SETUPVAL", e, var.info, 0) - elseif k == "VGLOBAL" then - --printf("store global, exp=%s", tostringv(exp)) - local e = self:exp2anyreg(fs, exp) - self:codeABx(fs, "OP_SETGLOBAL", e, var.info) - elseif k == "VINDEXED" then - local e = self:exp2RK(fs, exp) - self:codeABC(fs, "OP_SETTABLE", var.info, var.aux, e) - else - assert(0) -- invalid var kind to store - end - self:freeexp(fs, exp) - --print("/STOREVAR") -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:_self(fs, e, key) - self:exp2anyreg(fs, e) - self:freeexp(fs, e) - local func = fs.freereg - self:reserveregs(fs, 2) - self:codeABC(fs, "OP_SELF", func, e.info, self:exp2RK(fs, key)) - self:freeexp(fs, key) - e.info = func - e.k = "VNONRELOC" -end - ------------------------------------------------------------------------- --- FF updated 5.1 ------------------------------------------------------------------------- -function luaK:invertjump(fs, e) - --printf("invertjump on jump instruction #%i", e.info) - --printv(self:getcode(fs, e)) - local pc = self:getjumpcontrol(fs, e.info) - assert(luaP:testOpMode(luaP:GET_OPCODE(pc), "OpModeT") and - luaP:GET_OPCODE(pc) ~= "OP_TESTSET" and - luaP:GET_OPCODE(pc) ~= "OP_TEST") - --printf("Before invert:") - --printv(pc) - luaP:SETARG_A(pc, (luaP:GETARG_A(pc) == 0) and 1 or 0) - --printf("After invert:") - --printv(pc) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:jumponcond(fs, e, cond) - if e.k == "VRELOCABLE" then - local ie = self:getcode(fs, e) - if luaP:GET_OPCODE(ie) == "OP_NOT" then - fs.pc = fs.pc - 1 -- remove previous OP_NOT - return self:condjump(fs, "OP_TEST", luaP:GETARG_B(ie), 0, - cond and 0 or 1) - end - -- else go through - end - self:discharge2anyreg(fs, e) - self:freeexp(fs, e) - return self:condjump(fs, "OP_TESTSET", luaP.NO_REG, e.info, cond and 1 or 0) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:goiftrue(fs, e) - local pc -- pc of last jump - self:dischargevars(fs, e) - local k = e.k - if k == "VK" or k == "VTRUE" or k == "VKNUM" then - pc = self.NO_JUMP -- always true; do nothing - elseif k == "VFALSE" then - pc = self:jump(fs) -- always jump - elseif k == "VJMP" then - self:invertjump(fs, e) - pc = e.info - else - pc = self:jumponcond(fs, e, false) - end - e.f = self:concat(fs, e.f, pc) -- insert last jump in 'f' list - self:patchtohere(fs, e.t) - e.t = self.NO_JUMP -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:goiffalse(fs, e) - local pc -- pc of last jump - self:dischargevars(fs, e) - local k = e.k - if k == "VNIL" or k == "VFALSE"then - pc = self.NO_JUMP -- always false; do nothing - elseif k == "VTRUE" then - pc = self:jump(fs) -- always jump - elseif k == "VJMP" then - pc = e.info - else - pc = self:jumponcond(fs, e, true) - end - e.t = self:concat(fs, e.t, pc) -- insert last jump in 't' list - self:patchtohere(fs, e.f) - e.f = self.NO_JUMP -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:codenot(fs, e) - self:dischargevars(fs, e) - local k = e.k - if k == "VNIL" or k == "VFALSE" then - e.k = "VTRUE" - elseif k == "VK" or k == "VKNUM" or k == "VTRUE" then - e.k = "VFALSE" - elseif k == "VJMP" then - self:invertjump(fs, e) - elseif k == "VRELOCABLE" or k == "VNONRELOC" then - self:discharge2anyreg(fs, e) - self:freeexp(fs, e) - e.info = self:codeABC(fs, "OP_NOT", 0, e.info, 0) - e.k = "VRELOCABLE" - else - assert(0) -- cannot happen - end - -- interchange true and false lists - e.f, e.t = e.t, e.f - self:removevalues(fs, e.f) - self:removevalues(fs, e.t) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:indexed(fs, t, k) - t.aux = self:exp2RK(fs, k) - t.k = "VINDEXED" -end - ---FF 5.1 -function luaK:constfolding (op, e1, e2) - if not self:isnumeral(e1) or not self:isnumeral(e2) then return false end - local v1, v2, e, r = e1.nval, e2 and e2.nval, nil - if op == "OP_ADD" then r = v1+v2 - elseif op == "OP_SUB" then r = v1-v2 - elseif op == "OP_MUL" then r = v1*v2 - elseif op == "OP_DIV" then if v2==0 then return false end r = v1/v2 - elseif op == "OP_MOD" then if v2==0 then return false end r = v1%v2 - elseif op == "OP_POW" then r = v1^v2 - elseif op == "OP_UNM" then r = -v1 - elseif op == "OP_LEN" then return false - else assert (false, "Unknown numeric value") end - e1.nval = r - return true -end - ---FF 5.1 -function luaK:codearith (fs, op, e1, e2) - if self:constfolding (op, e1, e2) then return else - local o1 = self:exp2RK (fs, e1) - local o2 = 0 - if op ~= "OP_UNM" and op ~= "OP_LEN" then - o2 = self:exp2RK (fs, e2) end - self:freeexp(fs, e2) - self:freeexp(fs, e1) - e1.info = self:codeABC (fs, op, 0, o1, o2) - e1.k = "VRELOCABLE" - end -end - ---FF 5.1 -function luaK:codecomp (fs, op, cond, e1, e2) - assert (type (cond) == "boolean") - local o1 = self:exp2RK (fs, e1) - local o2 = self:exp2RK (fs, e2) - self:freeexp (fs, e2) - self:freeexp (fs, e1) - if not cond and op ~= "OP_EQ" then - local temp = o1; o1=o2; o2=temp cond = true end - e1.info = self:condjump (fs, op, cond and 1 or 0, o1, o2) - e1.k = "VJMP" -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:prefix (fs, op, e) - local e2 = { t = self.NO_JUMP; f = self.NO_JUMP; - k = "VKNUM"; nval = 0 } - if op == "unm" then - if e.k == "VK" then - self:exp2anyreg (fs, e) end - self:codearith (fs, "OP_UNM", e, e2) - elseif op == "not" then - self:codenot (fs, e) - elseif op == "len" then - self:exp2anyreg (fs, e) - self:codearith (fs, "OP_LEN", e, e2) - else - assert (false, "Unknown unary operator") - end -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:infix (fs, op, v) - if op == "and" then - self:goiftrue(fs, v) - elseif op == "or" then - self:goiffalse(fs, v) - elseif op == "concat" then - self:exp2nextreg(fs, v) -- operand must be on the 'stack' - else - if not self:isnumeral (v) then self:exp2RK(fs, v) end - end -end - ------------------------------------------------------------------------- --- --- grep "ORDER OPR" if you change these enums ------------------------------------------------------------------------- -luaK.arith_opc = { -- done as a table lookup instead of a calc - add = "OP_ADD", - sub = "OP_SUB", - mul = "OP_MUL", - mod = "OP_MOD", - div = "OP_DIV", - pow = "OP_POW", - len = "OP_LEN", - ["not"] = "OP_NOT" -} -luaK.test_opc = { -- was ops[] in the codebinop function - eq = {opc="OP_EQ", cond=true}, - lt = {opc="OP_LT", cond=true}, - le = {opc="OP_LE", cond=true}, - - -- Pseudo-ops, with no metatable equivalent: - ne = {opc="OP_EQ", cond=false}, - gt = {opc="OP_LT", cond=false}, - ge = {opc="OP_LE", cond=false} -} - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:posfix(fs, op, e1, e2) - if op == "and" then - assert(e1.t == self.NO_JUMP) -- list must be closed - self:dischargevars(fs, e2) - e2.f = self:concat(fs, e2.f, e1.f) - for k,v in pairs(e2) do e1[k]=v end -- *e1 = *e2 - elseif op == "or" then - assert(e1.f == self.NO_JUMP) -- list must be closed - self:dischargevars(fs, e2) - e2.t = self:concat(fs, e2.t, e1.t) - for k,v in pairs(e2) do e1[k]=v end -- *e1 = *e2 - elseif op == "concat" then - self:exp2val(fs, e2) - if e2.k == "VRELOCABLE" - and luaP:GET_OPCODE(self:getcode(fs, e2)) == "OP_CONCAT" then - assert(e1.info == luaP:GETARG_B(self:getcode(fs, e2)) - 1) - self:freeexp(fs, e1) - luaP:SETARG_B(self:getcode(fs, e2), e1.info) - e1.k = "VRELOCABLE"; e1.info = e2.info - else - self:exp2nextreg(fs, e2) - self:codearith (fs, "OP_CONCAT", e1, e2) - end - else - local opc = self.arith_opc[op] - if opc then self:codearith (fs, opc, e1, e2) else - opc = self.test_opc[op] or error ("Unknown operator "..op) - self:codecomp (fs, opc.opc, opc.cond, e1, e2) - end - end -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:fixline(fs, line) - --assert (line) - if not line then - --print(debug.traceback "fixline (line == nil)") - end - fs.f.lineinfo[fs.pc - 1] = line or 0 -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:code(fs, i, line) - if not line then - line = 0 - --print(debug.traceback "line == nil") - end - local f = fs.f - - do -- print it - local params = { } - for _,x in ipairs{"A","B","Bx", "sBx", "C"} do - if i[x] then table.insert (params, string.format ("%s=%i", x, i[x])) end - end - debugf ("[code:\t%s\t%s]", luaP.opnames[i.OP], table.concat (params, ", ")) - end - - self:dischargejpc(fs) -- 'pc' will change - - f.code[fs.pc] = i - f.lineinfo[fs.pc] = line - - if line == 0 then - f.lineinfo[fs.pc] = fs.lastline - if fs.lastline == 0 then - --print(debug.traceback()) - end - end - - if f.lineinfo[fs.pc] == 0 then - f.lineinfo[fs.pc] = 42 - end - - local pc = fs.pc - fs.pc = fs.pc + 1 - return pc -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:codeABC(fs, o, a, b, c) - assert(luaP:getOpMode(o) == "iABC", o.." is not an ABC operation") - --assert getbmode(o) ~= opargn or b == 0 - --assert getcmode(o) ~= opargn or c == 0 - --FF - --return self:code(fs, luaP:CREATE_ABC(o, a, b, c), fs.ls.lastline) - return self:code(fs, luaP:CREATE_ABC(o, a, b, c), fs.lastline) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:codeABx(fs, o, a, bc) - assert(luaP:getOpMode(o) == "iABx" or luaP:getOpMode(o) == "iAsBx") - --assert getcmode(o) == opargn - --FF - --return self:code(fs, luaP:CREATE_ABx(o, a, bc), fs.ls.lastline) - return self:code(fs, luaP:CREATE_ABx(o, a, bc), fs.lastline) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:setlist (fs, base, nelems, tostore) - local c = math.floor ((nelems-1) / luaP.LFIELDS_PER_FLUSH + 1) - local b = tostore == self.LUA_MULTRET and 0 or tostore - assert (tostore ~= 0) - if c <= luaP.MAXARG_C then self:codeABC (fs, "OP_SETLIST", base, b, c) - else - self:codeABC (fs, "OP_SETLIST", base, b, 0) - self:code (fs, c, fs.lastline)--FIXME - end - fs.freereg = base + 1 -end - -return luaK \ No newline at end of file diff --git a/Utils/luarocks/share/lua/5.1/metalua/compiler/bytecode/ldump.lua b/Utils/luarocks/share/lua/5.1/metalua/compiler/bytecode/ldump.lua deleted file mode 100644 index 6ac76179f..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/compiler/bytecode/ldump.lua +++ /dev/null @@ -1,448 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2005-2013 Kein-Hong Man, Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Kein-Hong Man - Initial implementation for Lua 5.0, part of Yueliang --- Fabien Fleutot - Port to Lua 5.1, integration with Metalua --- -------------------------------------------------------------------------------- - ---[[-------------------------------------------------------------------- - - ldump.lua - Save bytecodes in Lua - This file is part of Yueliang. - - Copyright (c) 2005 Kein-Hong Man - The COPYRIGHT file describes the conditions - under which this software may be distributed. - ------------------------------------------------------------------------- - - [FF] Slightly modified, mainly to produce Lua 5.1 bytecode. - -----------------------------------------------------------------------]] - ---[[-------------------------------------------------------------------- --- Notes: --- * LUA_NUMBER (double), byte order (little endian) and some other --- header values hard-coded; see other notes below... --- * One significant difference is that instructions are still in table --- form (with OP/A/B/C/Bx fields) and luaP:Instruction() is needed to --- convert them into 4-char strings --- * Deleted: --- luaU:DumpVector: folded into DumpLines, DumpCode --- * Added: --- luaU:endianness() (from lundump.c) --- luaU:make_setS: create a chunk writer that writes to a string --- luaU:make_setF: create a chunk writer that writes to a file --- (lua.h contains a typedef for a Chunkwriter pointer, and --- a Lua-based implementation exists, writer() in lstrlib.c) --- luaU:from_double(x): encode double value for writing --- luaU:from_int(x): encode integer value for writing --- (error checking is limited for these conversion functions) --- (double conversion does not support denormals or NaNs) --- luaU:ttype(o) (from lobject.h) -----------------------------------------------------------------------]] - -local luaP = require 'metalua.compiler.bytecode.lopcodes' - -local M = { } - -local format = { } -format.header = string.dump(function()end):sub(1, 12) -format.little_endian, format.int_size, -format.size_t_size, format.instr_size, -format.number_size, format.integral = format.header:byte(7, 12) -format.little_endian = format.little_endian~=0 -format.integral = format.integral ~=0 - -assert(format.integral or format.number_size==8, "Number format not supported by dumper") -assert(format.little_endian, "Big endian architectures not supported by dumper") - ---requires luaP -local luaU = { } -M.luaU = luaU - -luaU.format = format - --- constants used by dumper -luaU.LUA_TNIL = 0 -luaU.LUA_TBOOLEAN = 1 -luaU.LUA_TNUMBER = 3 -- (all in lua.h) -luaU.LUA_TSTRING = 4 -luaU.LUA_TNONE = -1 - --- definitions for headers of binary files ---luaU.LUA_SIGNATURE = "\27Lua" -- binary files start with "Lua" ---luaU.VERSION = 81 -- 0x50; last format change was in 5.0 ---luaU.FORMAT_VERSION = 0 -- 0 is official version. yeah I know I'm a liar. - --- a multiple of PI for testing native format --- multiplying by 1E7 gives non-trivial integer values ---luaU.TEST_NUMBER = 3.14159265358979323846E7 - ---[[-------------------------------------------------------------------- --- Additional functions to handle chunk writing --- * to use make_setS and make_setF, see test_ldump.lua elsewhere -----------------------------------------------------------------------]] - ------------------------------------------------------------------------- --- works like the lobject.h version except that TObject used in these --- scripts only has a 'value' field, no 'tt' field (native types used) ------------------------------------------------------------------------- -function luaU:ttype(o) - local tt = type(o.value) - if tt == "number" then return self.LUA_TNUMBER - elseif tt == "string" then return self.LUA_TSTRING - elseif tt == "nil" then return self.LUA_TNIL - elseif tt == "boolean" then return self.LUA_TBOOLEAN - else - return self.LUA_TNONE -- the rest should not appear - end -end - ------------------------------------------------------------------------- --- create a chunk writer that writes to a string --- * returns the writer function and a table containing the string --- * to get the final result, look in buff.data ------------------------------------------------------------------------- -function luaU:make_setS() - local buff = {} - buff.data = "" - local writer = - function(s, buff) -- chunk writer - if not s then return end - buff.data = buff.data..s - end - return writer, buff -end - ------------------------------------------------------------------------- --- create a chunk writer that writes to a file --- * returns the writer function and a table containing the file handle --- * if a nil is passed, then writer should close the open file ------------------------------------------------------------------------- -function luaU:make_setF(filename) - local buff = {} - buff.h = io.open(filename, "wb") - if not buff.h then return nil end - local writer = - function(s, buff) -- chunk writer - if not buff.h then return end - if not s then buff.h:close(); return end - buff.h:write(s) - end - return writer, buff -end - ------------------------------------------------------------------------ --- converts a IEEE754 double number to an 8-byte little-endian string --- * luaU:from_double() and luaU:from_int() are from ChunkBake project --- * supports +/- Infinity, but not denormals or NaNs ------------------------------------------------------------------------ -function luaU:from_double(x) - local function grab_byte(v) - return math.floor(v / 256), - string.char(math.mod(math.floor(v), 256)) - end - local sign = 0 - if x < 0 then sign = 1; x = -x end - local mantissa, exponent = math.frexp(x) - if x == 0 then -- zero - mantissa, exponent = 0, 0 - elseif x == 1/0 then - mantissa, exponent = 0, 2047 - else - mantissa = (mantissa * 2 - 1) * math.ldexp(0.5, 53) - exponent = exponent + 1022 - end - local v, byte = "" -- convert to bytes - x = mantissa - for i = 1,6 do - x, byte = grab_byte(x); v = v..byte -- 47:0 - end - x, byte = grab_byte(exponent * 16 + x); v = v..byte -- 55:48 - x, byte = grab_byte(sign * 128 + x); v = v..byte -- 63:56 - return v -end - ------------------------------------------------------------------------ --- converts a number to a little-endian 32-bit integer string --- * input value assumed to not overflow, can be signed/unsigned ------------------------------------------------------------------------ -function luaU:from_int(x, size) - local v = "" - x = math.floor(x) - if x >= 0 then - for i = 1, size do - v = v..string.char(math.mod(x, 256)); x = math.floor(x / 256) - end - else -- x < 0 - x = -x - local carry = 1 - for i = 1, size do - local c = 255 - math.mod(x, 256) + carry - if c == 256 then c = 0; carry = 1 else carry = 0 end - v = v..string.char(c); x = math.floor(x / 256) - end - end - return v -end - ---[[-------------------------------------------------------------------- --- Functions to make a binary chunk --- * many functions have the size parameter removed, since output is --- in the form of a string and some sizes are implicit or hard-coded --- * luaU:DumpVector has been deleted (used in DumpCode & DumpLines) -----------------------------------------------------------------------]] - ------------------------------------------------------------------------- --- dump a block of literal bytes ------------------------------------------------------------------------- -function luaU:DumpLiteral(s, D) self:DumpBlock(s, D) end - ---[[-------------------------------------------------------------------- --- struct DumpState: --- L -- lua_State (not used in this script) --- write -- lua_Chunkwriter (chunk writer function) --- data -- void* (chunk writer context or data already written) -----------------------------------------------------------------------]] - ------------------------------------------------------------------------- --- dumps a block of bytes --- * lua_unlock(D.L), lua_lock(D.L) deleted ------------------------------------------------------------------------- -function luaU:DumpBlock(b, D) D.write(b, D.data) end - ------------------------------------------------------------------------- --- dumps a single byte ------------------------------------------------------------------------- -function luaU:DumpByte(y, D) - self:DumpBlock(string.char(y), D) -end - ------------------------------------------------------------------------- --- dumps a signed integer of size `format.int_size` (for int) ------------------------------------------------------------------------- -function luaU:DumpInt(x, D) - self:DumpBlock(self:from_int(x, format.int_size), D) -end - ------------------------------------------------------------------------- --- dumps an unsigned integer of size `format.size_t_size` (for size_t) ------------------------------------------------------------------------- -function luaU:DumpSize(x, D) - self:DumpBlock(self:from_int(x, format.size_t_size), D) -end - ------------------------------------------------------------------------- --- dumps a LUA_NUMBER; can be an int or double depending on the VM. ------------------------------------------------------------------------- -function luaU:DumpNumber(x, D) - if format.integral then - self:DumpBlock(self:from_int(x, format.number_size), D) - else - self:DumpBlock(self:from_double(x), D) - end -end - ------------------------------------------------------------------------- --- dumps a Lua string ------------------------------------------------------------------------- -function luaU:DumpString(s, D) - if s == nil then - self:DumpSize(0, D) - else - s = s.."\0" -- include trailing '\0' - self:DumpSize(string.len(s), D) - self:DumpBlock(s, D) - end -end - ------------------------------------------------------------------------- --- dumps instruction block from function prototype ------------------------------------------------------------------------- -function luaU:DumpCode(f, D) - local n = f.sizecode - self:DumpInt(n, D) - --was DumpVector - for i = 0, n - 1 do - self:DumpBlock(luaP:Instruction(f.code[i]), D) - end -end - ------------------------------------------------------------------------- --- dumps local variable names from function prototype ------------------------------------------------------------------------- -function luaU:DumpLocals(f, D) - local n = f.sizelocvars - self:DumpInt(n, D) - for i = 0, n - 1 do - -- Dirty temporary fix: - -- `Stat{ } keeps properly count of the number of local vars, - -- but fails to keep score of their debug info (names). - -- It therefore might happen that #f.localvars < f.sizelocvars, or - -- that a variable's startpc and endpc fields are left unset. - -- FIXME: This might not be needed anymore, check the bug report - -- by J. Belmonte. - local var = f.locvars[i] - if not var then break end - -- printf("[DUMPLOCALS] dumping local var #%i = %s", i, table.tostring(var)) - self:DumpString(var.varname, D) - self:DumpInt(var.startpc or 0, D) - self:DumpInt(var.endpc or 0, D) - end -end - ------------------------------------------------------------------------- --- dumps line information from function prototype ------------------------------------------------------------------------- -function luaU:DumpLines(f, D) - local n = f.sizelineinfo - self:DumpInt(n, D) - --was DumpVector - for i = 0, n - 1 do - self:DumpInt(f.lineinfo[i], D) -- was DumpBlock - --print(i, f.lineinfo[i]) - end -end - ------------------------------------------------------------------------- --- dump upvalue names from function prototype ------------------------------------------------------------------------- -function luaU:DumpUpvalues(f, D) - local n = f.sizeupvalues - self:DumpInt(n, D) - for i = 0, n - 1 do - self:DumpString(f.upvalues[i], D) - end -end - ------------------------------------------------------------------------- --- dump constant pool from function prototype --- * nvalue(o) and tsvalue(o) macros removed ------------------------------------------------------------------------- -function luaU:DumpConstants(f, D) - local n = f.sizek - self:DumpInt(n, D) - for i = 0, n - 1 do - local o = f.k[i] -- TObject - local tt = self:ttype(o) - assert (tt >= 0) - self:DumpByte(tt, D) - if tt == self.LUA_TNUMBER then - self:DumpNumber(o.value, D) - elseif tt == self.LUA_TSTRING then - self:DumpString(o.value, D) - elseif tt == self.LUA_TBOOLEAN then - self:DumpByte (o.value and 1 or 0, D) - elseif tt == self.LUA_TNIL then - else - assert(false) -- cannot happen - end - end -end - - -function luaU:DumpProtos (f, D) - local n = f.sizep - assert (n) - self:DumpInt(n, D) - for i = 0, n - 1 do - self:DumpFunction(f.p[i], f.source, D) - end -end - -function luaU:DumpDebug(f, D) - self:DumpLines(f, D) - self:DumpLocals(f, D) - self:DumpUpvalues(f, D) -end - - ------------------------------------------------------------------------- --- dump child function prototypes from function prototype ---FF completely reworked for 5.1 format ------------------------------------------------------------------------- -function luaU:DumpFunction(f, p, D) - -- print "Dumping function:" - -- table.print(f, 60) - - local source = f.source - if source == p then source = nil end - self:DumpString(source, D) - self:DumpInt(f.lineDefined, D) - self:DumpInt(f.lastLineDefined or 42, D) - self:DumpByte(f.nups, D) - self:DumpByte(f.numparams, D) - self:DumpByte(f.is_vararg, D) - self:DumpByte(f.maxstacksize, D) - self:DumpCode(f, D) - self:DumpConstants(f, D) - self:DumpProtos( f, D) - self:DumpDebug(f, D) -end - ------------------------------------------------------------------------- --- dump Lua header section (some sizes hard-coded) ---FF: updated for version 5.1 ------------------------------------------------------------------------- -function luaU:DumpHeader(D) - self:DumpLiteral(format.header, D) -end - ------------------------------------------------------------------------- --- dump function as precompiled chunk --- * w, data are created from make_setS, make_setF ---FF: suppressed extraneous [L] param ------------------------------------------------------------------------- -function luaU:dump (Main, w, data) - local D = {} -- DumpState - D.write = w - D.data = data - self:DumpHeader(D) - self:DumpFunction(Main, nil, D) - -- added: for a chunk writer writing to a file, this final call with - -- nil data is to indicate to the writer to close the file - D.write(nil, D.data) -end - ------------------------------------------------------------------------- --- find byte order (from lundump.c) --- * hard-coded to little-endian ------------------------------------------------------------------------- -function luaU:endianness() - return 1 -end - --- FIXME: ugly concat-base generation in [make_setS], bufferize properly! -function M.dump_string (proto) - local writer, buff = luaU:make_setS() - luaU:dump (proto, writer, buff) - return buff.data -end - --- FIXME: [make_setS] sucks, perform synchronous file writing --- Now unused -function M.dump_file (proto, filename) - local writer, buff = luaU:make_setS() - luaU:dump (proto, writer, buff) - local file = io.open (filename, "wb") - file:write (buff.data) - io.close(file) - --if UNIX_SHARPBANG then os.execute ("chmod a+x "..filename) end -end - -return M diff --git a/Utils/luarocks/share/lua/5.1/metalua/compiler/bytecode/lopcodes.lua b/Utils/luarocks/share/lua/5.1/metalua/compiler/bytecode/lopcodes.lua deleted file mode 100644 index e49285e6f..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/compiler/bytecode/lopcodes.lua +++ /dev/null @@ -1,442 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2005-2013 Kein-Hong Man, Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Kein-Hong Man - Initial implementation for Lua 5.0, part of Yueliang --- Fabien Fleutot - Port to Lua 5.1, integration with Metalua --- -------------------------------------------------------------------------------- - ---[[-------------------------------------------------------------------- - - $Id$ - - lopcodes.lua - Lua 5 virtual machine opcodes in Lua - This file is part of Yueliang. - - Copyright (c) 2005 Kein-Hong Man - The COPYRIGHT file describes the conditions - under which this software may be distributed. - - See the ChangeLog for more information. - ------------------------------------------------------------------------- - - [FF] Slightly modified, mainly to produce Lua 5.1 bytecode. - -----------------------------------------------------------------------]] - ---[[-------------------------------------------------------------------- --- Notes: --- * an Instruction is a table with OP, A, B, C, Bx elements; this --- should allow instruction handling to work with doubles and ints --- * Added: --- luaP:Instruction(i): convert field elements to a 4-char string --- luaP:DecodeInst(x): convert 4-char string into field elements --- * WARNING luaP:Instruction outputs instructions encoded in little- --- endian form and field size and positions are hard-coded -----------------------------------------------------------------------]] - -local function debugf() end - -local luaP = { } - ---[[ -=========================================================================== - We assume that instructions are unsigned numbers. - All instructions have an opcode in the first 6 bits. - Instructions can have the following fields: - 'A' : 8 bits - 'B' : 9 bits - 'C' : 9 bits - 'Bx' : 18 bits ('B' and 'C' together) - 'sBx' : signed Bx - - A signed argument is represented in excess K; that is, the number - value is the unsigned value minus K. K is exactly the maximum value - for that argument (so that -max is represented by 0, and +max is - represented by 2*max), which is half the maximum for the corresponding - unsigned argument. -=========================================================================== ---]] - -luaP.OpMode = {"iABC", "iABx", "iAsBx"} -- basic instruction format - ------------------------------------------------------------------------- --- size and position of opcode arguments. --- * WARNING size and position is hard-coded elsewhere in this script ------------------------------------------------------------------------- -luaP.SIZE_C = 9 -luaP.SIZE_B = 9 -luaP.SIZE_Bx = luaP.SIZE_C + luaP.SIZE_B -luaP.SIZE_A = 8 - -luaP.SIZE_OP = 6 - -luaP.POS_C = luaP.SIZE_OP -luaP.POS_B = luaP.POS_C + luaP.SIZE_C -luaP.POS_Bx = luaP.POS_C -luaP.POS_A = luaP.POS_B + luaP.SIZE_B - ---FF from 5.1 -luaP.BITRK = 2^(luaP.SIZE_B - 1) -function luaP:ISK(x) return x >= self.BITRK end -luaP.MAXINDEXRK = luaP.BITRK - 1 -function luaP:RKASK(x) - if x < self.BITRK then return x+self.BITRK else return x end -end - - - ------------------------------------------------------------------------- --- limits for opcode arguments. --- we use (signed) int to manipulate most arguments, --- so they must fit in BITS_INT-1 bits (-1 for sign) ------------------------------------------------------------------------- --- removed "#if SIZE_Bx < BITS_INT-1" test, assume this script is --- running on a Lua VM with double or int as LUA_NUMBER - -luaP.MAXARG_Bx = math.ldexp(1, luaP.SIZE_Bx) - 1 -luaP.MAXARG_sBx = math.floor(luaP.MAXARG_Bx / 2) -- 'sBx' is signed - -luaP.MAXARG_A = math.ldexp(1, luaP.SIZE_A) - 1 -luaP.MAXARG_B = math.ldexp(1, luaP.SIZE_B) - 1 -luaP.MAXARG_C = math.ldexp(1, luaP.SIZE_C) - 1 - --- creates a mask with 'n' 1 bits at position 'p' --- MASK1(n,p) deleted --- creates a mask with 'n' 0 bits at position 'p' --- MASK0(n,p) deleted - ---[[-------------------------------------------------------------------- - Visual representation for reference: - - 31 | | | 0 bit position - +-----+-----+-----+----------+ - | B | C | A | Opcode | iABC format - +-----+-----+-----+----------+ - - 9 - 9 - 8 - 6 - field sizes - +-----+-----+-----+----------+ - | [s]Bx | A | Opcode | iABx | iAsBx format - +-----+-----+-----+----------+ -----------------------------------------------------------------------]] - ------------------------------------------------------------------------- --- the following macros help to manipulate instructions --- * changed to a table object representation, very clean compared to --- the [nightmare] alternatives of using a number or a string ------------------------------------------------------------------------- - --- these accept or return opcodes in the form of string names -function luaP:GET_OPCODE(i) return self.ROpCode[i.OP] end -function luaP:SET_OPCODE(i, o) i.OP = self.OpCode[o] end - -function luaP:GETARG_A(i) return i.A end -function luaP:SETARG_A(i, u) i.A = u end - -function luaP:GETARG_B(i) return i.B end -function luaP:SETARG_B(i, b) i.B = b end - -function luaP:GETARG_C(i) return i.C end -function luaP:SETARG_C(i, b) i.C = b end - -function luaP:GETARG_Bx(i) return i.Bx end -function luaP:SETARG_Bx(i, b) i.Bx = b end - -function luaP:GETARG_sBx(i) return i.Bx - self.MAXARG_sBx end -function luaP:SETARG_sBx(i, b) i.Bx = b + self.MAXARG_sBx end - -function luaP:CREATE_ABC(o,a,b,c) - return {OP = self.OpCode[o], A = a, B = b, C = c} -end - -function luaP:CREATE_ABx(o,a,bc) - return {OP = self.OpCode[o], A = a, Bx = bc} -end - ------------------------------------------------------------------------- --- Bit shuffling stuffs ------------------------------------------------------------------------- - -if false and pcall (require, 'bit') then - ------------------------------------------------------------------------ - -- Return a 4-char string little-endian encoded form of an instruction - ------------------------------------------------------------------------ - function luaP:Instruction(i) - --FIXME - end -else - ------------------------------------------------------------------------ - -- Version without bit manipulation library. - ------------------------------------------------------------------------ - local p2 = {1,2,4,8,16,32,64,128,256, 512, 1024, 2048, 4096} - -- keeps [n] bits from [x] - local function keep (x, n) return x % p2[n+1] end - -- shifts bits of [x] [n] places to the right - local function srb (x,n) return math.floor (x / p2[n+1]) end - -- shifts bits of [x] [n] places to the left - local function slb (x,n) return x * p2[n+1] end - - ------------------------------------------------------------------------ - -- Return a 4-char string little-endian encoded form of an instruction - ------------------------------------------------------------------------ - function luaP:Instruction(i) - -- printf("Instr->string: %s %s", self.opnames[i.OP], table.tostring(i)) - local c0, c1, c2, c3 - -- change to OP/A/B/C format if needed - if i.Bx then i.C = keep (i.Bx, 9); i.B = srb (i.Bx, 9) end - -- c0 = 6B from opcode + 2LSB from A (flushed to MSB) - c0 = i.OP + slb (keep (i.A, 2), 6) - -- c1 = 6MSB from A + 2LSB from C (flushed to MSB) - c1 = srb (i.A, 2) + slb (keep (i.C, 2), 6) - -- c2 = 7MSB from C + 1LSB from B (flushed to MSB) - c2 = srb (i.C, 2) + slb (keep (i.B, 1), 7) - -- c3 = 8MSB from B - c3 = srb (i.B, 1) - --printf ("Instruction: %s %s", self.opnames[i.OP], tostringv (i)) - --printf ("Bin encoding: %x %x %x %x", c0, c1, c2, c3) - return string.char(c0, c1, c2, c3) - end -end ------------------------------------------------------------------------- --- decodes a 4-char little-endian string into an instruction struct ------------------------------------------------------------------------- -function luaP:DecodeInst(x) - error "Not implemented" -end - ------------------------------------------------------------------------- --- invalid register that fits in 8 bits ------------------------------------------------------------------------- -luaP.NO_REG = luaP.MAXARG_A - ------------------------------------------------------------------------- --- R(x) - register --- Kst(x) - constant (in constant table) --- RK(x) == if x < MAXSTACK then R(x) else Kst(x-MAXSTACK) ------------------------------------------------------------------------- - ------------------------------------------------------------------------- --- grep "ORDER OP" if you change these enums ------------------------------------------------------------------------- - ---[[-------------------------------------------------------------------- -Lua virtual machine opcodes (enum OpCode): ------------------------------------------------------------------------- -name args description ------------------------------------------------------------------------- -OP_MOVE A B R(A) := R(B) -OP_LOADK A Bx R(A) := Kst(Bx) -OP_LOADBOOL A B C R(A) := (Bool)B; if (C) PC++ -OP_LOADNIL A B R(A) := ... := R(B) := nil -OP_GETUPVAL A B R(A) := UpValue[B] -OP_GETGLOBAL A Bx R(A) := Gbl[Kst(Bx)] -OP_GETTABLE A B C R(A) := R(B)[RK(C)] -OP_SETGLOBAL A Bx Gbl[Kst(Bx)] := R(A) -OP_SETUPVAL A B UpValue[B] := R(A) -OP_SETTABLE A B C R(A)[RK(B)] := RK(C) -OP_NEWTABLE A B C R(A) := {} (size = B,C) -OP_SELF A B C R(A+1) := R(B); R(A) := R(B)[RK(C)] -OP_ADD A B C R(A) := RK(B) + RK(C) -OP_SUB A B C R(A) := RK(B) - RK(C) -OP_MUL A B C R(A) := RK(B) * RK(C) -OP_DIV A B C R(A) := RK(B) / RK(C) -OP_POW A B C R(A) := RK(B) ^ RK(C) -OP_UNM A B R(A) := -R(B) -OP_NOT A B R(A) := not R(B) -OP_CONCAT A B C R(A) := R(B).. ... ..R(C) -OP_JMP sBx PC += sBx -OP_EQ A B C if ((RK(B) == RK(C)) ~= A) then pc++ -OP_LT A B C if ((RK(B) < RK(C)) ~= A) then pc++ -OP_LE A B C if ((RK(B) <= RK(C)) ~= A) then pc++ -OP_TEST A B C if (R(B) <=> C) then R(A) := R(B) else pc++ -OP_CALL A B C R(A), ... ,R(A+C-2) := R(A)(R(A+1), ... ,R(A+B-1)) -OP_TAILCALL A B C return R(A)(R(A+1), ... ,R(A+B-1)) -OP_RETURN A B return R(A), ... ,R(A+B-2) (see note) -OP_FORLOOP A sBx R(A)+=R(A+2); if R(A) =) R(A) -OP_CLOSURE A Bx R(A) := closure(KPROTO[Bx], R(A), ... ,R(A+n)) -----------------------------------------------------------------------]] - -luaP.opnames = {} -- opcode names -luaP.OpCode = {} -- lookup name -> number -luaP.ROpCode = {} -- lookup number -> name - -local i = 0 -for v in string.gfind([[ -MOVE -- 0 -LOADK -LOADBOOL -LOADNIL -GETUPVAL -GETGLOBAL -- 5 -GETTABLE -SETGLOBAL -SETUPVAL -SETTABLE -NEWTABLE -- 10 -SELF -ADD -SUB -MUL -DIV -- 15 -MOD -POW -UNM -NOT -LEN -- 20 -CONCAT -JMP -EQ -LT -LE -- 25 -TEST -TESTSET -CALL -TAILCALL -RETURN -- 30 -FORLOOP -FORPREP -TFORLOOP -SETLIST -CLOSE -- 35 -CLOSURE -VARARG -]], "[%a]+") do - local n = "OP_"..v - luaP.opnames[i] = v - luaP.OpCode[n] = i - luaP.ROpCode[i] = n - i = i + 1 -end -luaP.NUM_OPCODES = i - ---[[ -=========================================================================== - Notes: - (1) In OP_CALL, if (B == 0) then B = top. C is the number of returns - 1, - and can be 0: OP_CALL then sets 'top' to last_result+1, so - next open instruction (OP_CALL, OP_RETURN, OP_SETLIST) may use 'top'. - - (2) In OP_RETURN, if (B == 0) then return up to 'top' - - (3) For comparisons, B specifies what conditions the test should accept. - - (4) All 'skips' (pc++) assume that next instruction is a jump - - (5) OP_SETLISTO is used when the last item in a table constructor is a - function, so the number of elements set is up to top of stack -=========================================================================== ---]] - ------------------------------------------------------------------------- --- masks for instruction properties ------------------------------------------------------------------------- --- was enum OpModeMask: -luaP.OpModeBreg = 2 -- B is a register -luaP.OpModeBrk = 3 -- B is a register/constant -luaP.OpModeCrk = 4 -- C is a register/constant -luaP.OpModesetA = 5 -- instruction set register A -luaP.OpModeK = 6 -- Bx is a constant -luaP.OpModeT = 1 -- operator is a test - ------------------------------------------------------------------------- --- get opcode mode, e.g. "iABC" ------------------------------------------------------------------------- -function luaP:getOpMode(m) - --printv(m) - --printv(self.OpCode[m]) - --printv(self.opmodes [self.OpCode[m]+1]) - return self.OpMode[tonumber(string.sub(self.opmodes[self.OpCode[m] + 1], 7, 7))] -end - ------------------------------------------------------------------------- --- test an instruction property flag --- * b is a string, e.g. "OpModeBreg" ------------------------------------------------------------------------- -function luaP:testOpMode(m, b) - return (string.sub(self.opmodes[self.OpCode[m] + 1], self[b], self[b]) == "1") -end - --- number of list items to accumulate before a SETLIST instruction --- (must be a power of 2) --- * used in lparser, lvm, ldebug, ltests -luaP.LFIELDS_PER_FLUSH = 50 --FF updated to match 5.1 - --- luaP_opnames[] is set above, as the luaP.opnames table --- opmode(t,b,bk,ck,sa,k,m) deleted - ---[[-------------------------------------------------------------------- - Legend for luaP:opmodes: - 1 T -> T (is a test?) - 2 B -> B is a register - 3 b -> B is an RK register/constant combination - 4 C -> C is an RK register/constant combination - 5 A -> register A is set by the opcode - 6 K -> Bx is a constant - 7 m -> 1 if iABC layout, - 2 if iABx layout, - 3 if iAsBx layout -----------------------------------------------------------------------]] - -luaP.opmodes = { --- TBbCAKm opcode - "0100101", -- OP_MOVE 0 - "0000112", -- OP_LOADK - "0000101", -- OP_LOADBOOL - "0100101", -- OP_LOADNIL - "0000101", -- OP_GETUPVAL - "0000112", -- OP_GETGLOBAL 5 - "0101101", -- OP_GETTABLE - "0000012", -- OP_SETGLOBAL - "0000001", -- OP_SETUPVAL - "0011001", -- OP_SETTABLE - "0000101", -- OP_NEWTABLE 10 - "0101101", -- OP_SELF - "0011101", -- OP_ADD - "0011101", -- OP_SUB - "0011101", -- OP_MUL - "0011101", -- OP_DIV 15 - "0011101", -- OP_MOD - "0011101", -- OP_POW - "0100101", -- OP_UNM - "0100101", -- OP_NOT - "0100101", -- OP_LEN 20 - "0101101", -- OP_CONCAT - "0000003", -- OP_JMP - "1011001", -- OP_EQ - "1011001", -- OP_LT - "1011001", -- OP_LE 25 - "1000101", -- OP_TEST - "1100101", -- OP_TESTSET - "0000001", -- OP_CALL - "0000001", -- OP_TAILCALL - "0000001", -- OP_RETURN 30 - "0000003", -- OP_FORLOOP - "0000103", -- OP_FORPREP - "1000101", -- OP_TFORLOOP - "0000001", -- OP_SETLIST - "0000001", -- OP_CLOSE 35 - "0000102", -- OP_CLOSURE - "0000101" -- OP_VARARG -} - -return luaP \ No newline at end of file diff --git a/Utils/luarocks/share/lua/5.1/metalua/compiler/globals.lua b/Utils/luarocks/share/lua/5.1/metalua/compiler/globals.lua deleted file mode 100644 index d5f7459e9..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/compiler/globals.lua +++ /dev/null @@ -1,86 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- --------------------------------------------------------------------------------- - ---*-lua-*----------------------------------------------------------------------- --- Override Lua's default compilation functions, so that they support Metalua --- rather than only plain Lua --------------------------------------------------------------------------------- - -local mlc = require 'metalua.compiler' - -local M = { } - --- Original versions -local original_lua_versions = { - load = load, - loadfile = loadfile, - loadstring = loadstring, - dofile = dofile } - -local lua_loadstring = loadstring -local lua_loadfile = loadfile - -function M.loadstring(str, name) - if type(str) ~= 'string' then error 'string expected' end - if str:match '^\027LuaQ' then return lua_loadstring(str) end - local n = str:match '^#![^\n]*\n()' - if n then str=str:sub(n, -1) end - -- FIXME: handle erroneous returns (return nil + error msg) - return mlc.new():src_to_function(str, name) -end - -function M.loadfile(filename) - local f, err_msg = io.open(filename, 'rb') - if not f then return nil, err_msg end - local success, src = pcall( f.read, f, '*a') - pcall(f.close, f) - if success then return M.loadstring (src, '@'..filename) - else return nil, src end -end - -function M.load(f, name) - local acc = { } - while true do - local x = f() - if not x then break end - assert(type(x)=='string', "function passed to load() must return strings") - table.insert(acc, x) - end - return M.loadstring(table.concat(acc)) -end - -function M.dostring(src) - local f, msg = M.loadstring(src) - if not f then error(msg) end - return f() -end - -function M.dofile(name) - local f, msg = M.loadfile(name) - if not f then error(msg) end - return f() -end - --- Export replacement functions as globals -for name, f in pairs(M) do _G[name] = f end - --- To be done *after* exportation -M.lua = original_lua_versions - -return M \ No newline at end of file diff --git a/Utils/luarocks/share/lua/5.1/metalua/compiler/parser.lua b/Utils/luarocks/share/lua/5.1/metalua/compiler/parser.lua deleted file mode 100644 index 74997aef2..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/compiler/parser.lua +++ /dev/null @@ -1,42 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- --------------------------------------------------------------------------------- - --- Export all public APIs from sub-modules, squashed into a flat spacename - -local MT = { __type='metalua.compiler.parser' } - -local MODULE_REL_NAMES = { "annot.grammar", "expr", "meta", "misc", - "stat", "table", "ext" } - -local function new() - local M = { - lexer = require "metalua.compiler.parser.lexer" (); - extensions = { } } - for _, rel_name in ipairs(MODULE_REL_NAMES) do - local abs_name = "metalua.compiler.parser."..rel_name - local extender = require (abs_name) - if not M.extensions[abs_name] then - if type (extender) == 'function' then extender(M) end - M.extensions[abs_name] = extender - end - end - return setmetatable(M, MT) -end - -return { new = new } diff --git a/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/annot/generator.lua b/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/annot/generator.lua deleted file mode 100644 index 3a805ad42..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/annot/generator.lua +++ /dev/null @@ -1,48 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- --------------------------------------------------------------------------------- - -local checks = require 'checks' -local gg = require 'metalua.grammar.generator' -local M = { } - -function M.opt(mlc, primary, a_type) - checks('table', 'table|function', 'string') - return gg.sequence{ - primary, - gg.onkeyword{ "#", function() return assert(mlc.annot[a_type]) end }, - builder = function(x) - local t, annot = unpack(x) - return annot and { tag='Annot', t, annot } or t - end } -end - --- split a list of "foo" and "`Annot{foo, annot}" into a list of "foo" --- and a list of "annot". --- No annot list is returned if none of the elements were annotated. -function M.split(lst) - local x, a, some = { }, { }, false - for i, p in ipairs(lst) do - if p.tag=='Annot' then - some, x[i], a[i] = true, unpack(p) - else x[i] = p end - end - if some then return x, a else return lst end -end - -return M diff --git a/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/annot/grammar.lua b/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/annot/grammar.lua deleted file mode 100644 index 7ce3ec41b..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/annot/grammar.lua +++ /dev/null @@ -1,112 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- --------------------------------------------------------------------------------- - -local gg = require 'metalua.grammar.generator' - -return function(M) - local _M = gg.future(M) - M.lexer :add '->' - local A = { } - local _A = gg.future(A) - M.annot = A - - -- Type identifier: Lua keywords such as `"nil"` allowed. - function M.annot.tid(lx) - local w = lx :next() - local t = w.tag - if t=='Keyword' and w[1] :match '^[%a_][%w_]*$' or w.tag=='Id' - then return {tag='TId'; lineinfo=w.lineinfo; w[1]} - else return gg.parse_error (lx, 'tid expected') end - end - - local field_types = { var='TVar'; const='TConst'; - currently='TCurrently'; field='TField' } - - -- TODO check lineinfo - function M.annot.tf(lx) - local tk = lx:next() - local w = tk[1] - local tag = field_types[w] - if not tag then error ('Invalid field type '..w) - elseif tag=='TField' then return {tag='TField'} else - local te = M.te(lx) - return {tag=tag; te} - end - end - - M.annot.tebar_content = gg.list{ - name = 'tebar content', - primary = _A.te, - separators = { ",", ";" }, - terminators = ")" } - - M.annot.tebar = gg.multisequence{ - name = 'annot.tebar', - --{ '*', builder = 'TDynbar' }, -- maybe not user-available - { '(', _A.tebar_content, ')', - builder = function(x) return x[1] end }, - { _A.te } - } - - M.annot.te = gg.multisequence{ - name = 'annot.te', - { _A.tid, builder=function(x) return x[1] end }, - { '*', builder = 'TDyn' }, - { "[", - gg.list{ - primary = gg.sequence{ - _M.expr, "=", _A.tf, - builder = 'TPair' - }, - separators = { ",", ";" }, - terminators = { "]", "|" } }, - gg.onkeyword{ "|", _A.tf }, - "]", - builder = function(x) - local fields, other = unpack(x) - return { tag='TTable', other or {tag='TField'}, fields } - end }, -- "[ ... ]" - { '(', _A.tebar_content, ')', '->', '(', _A.tebar_content, ')', - builder = function(x) - local p, r = unpack(x) - return {tag='TFunction', p, r } - end } } - - M.annot.ts = gg.multisequence{ - name = 'annot.ts', - { 'return', _A.tebar_content, builder='TReturn' }, - { _A.tid, builder = function(x) - if x[1][1]=='pass' then return {tag='TPass'} - else error "Bad statement type" end - end } } - --- TODO: add parsers for statements: --- #return tebar --- #alias = te --- #ell = tf ---[[ - M.annot.stat_annot = gg.sequence{ - gg.list{ primary=_A.tid, separators='.' }, - '=', - XXX??, - builder = 'Annot' } ---]] - - return M.annot -end \ No newline at end of file diff --git a/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/expr.lua b/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/expr.lua deleted file mode 100644 index 8ce4677a5..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/expr.lua +++ /dev/null @@ -1,206 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- -------------------------------------------------------------------------------- - -------------------------------------------------------------------------------- --- --- Exported API: --- * [mlp.expr()] --- * [mlp.expr_list()] --- * [mlp.func_val()] --- -------------------------------------------------------------------------------- - -local pp = require 'metalua.pprint' -local gg = require 'metalua.grammar.generator' -local annot = require 'metalua.compiler.parser.annot.generator' - -return function(M) - local _M = gg.future(M) - local _table = gg.future(M, 'table') - local _meta = gg.future(M, 'meta') -- TODO move to ext? - local _annot = gg.future(M, 'annot') -- TODO move to annot - - -------------------------------------------------------------------------------- - -- Non-empty expression list. Actually, this isn't used here, but that's - -- handy to give to users. - -------------------------------------------------------------------------------- - M.expr_list = gg.list{ primary=_M.expr, separators="," } - - -------------------------------------------------------------------------------- - -- Helpers for function applications / method applications - -------------------------------------------------------------------------------- - M.func_args_content = gg.list{ - name = "function arguments", - primary = _M.expr, - separators = ",", - terminators = ")" } - - -- Used to parse methods - M.method_args = gg.multisequence{ - name = "function argument(s)", - { "{", _table.content, "}" }, - { "(", _M.func_args_content, ")", builder = unpack }, - { "+{", _meta.quote_content, "}" }, - -- TODO lineinfo? - function(lx) local r = M.opt_string(lx); return r and {r} or { } end } - - -------------------------------------------------------------------------------- - -- [func_val] parses a function, from opening parameters parenthese to - -- "end" keyword included. Used for anonymous functions as well as - -- function declaration statements (both local and global). - -- - -- It's wrapped in a [_func_val] eta expansion, so that when expr - -- parser uses the latter, they will notice updates of [func_val] - -- definitions. - -------------------------------------------------------------------------------- - M.func_params_content = gg.list{ - name="function parameters", - gg.multisequence{ { "...", builder = "Dots" }, annot.opt(M, _M.id, 'te') }, - separators = ",", terminators = {")", "|"} } - - -- TODO move to annot - M.func_val = gg.sequence{ - name = "function body", - "(", _M.func_params_content, ")", _M.block, "end", - builder = function(x) - local params, body = unpack(x) - local annots, some = { }, false - for i, p in ipairs(params) do - if p.tag=='Annot' then - params[i], annots[i], some = p[1], p[2], true - else annots[i] = false end - end - if some then return { tag='Function', params, body, annots } - else return { tag='Function', params, body } end - end } - - local func_val = function(lx) return M.func_val(lx) end - - -------------------------------------------------------------------------------- - -- Default parser for primary expressions - -------------------------------------------------------------------------------- - function M.id_or_literal (lx) - local a = lx:next() - if a.tag~="Id" and a.tag~="String" and a.tag~="Number" then - local msg - if a.tag=='Eof' then - msg = "End of file reached when an expression was expected" - elseif a.tag=='Keyword' then - msg = "An expression was expected, and `"..a[1].. - "' can't start an expression" - else - msg = "Unexpected expr token " .. pp.tostring (a) - end - gg.parse_error (lx, msg) - end - return a - end - - - -------------------------------------------------------------------------------- - -- Builder generator for operators. Wouldn't be worth it if "|x|" notation - -- were allowed, but then lua 5.1 wouldn't compile it - -------------------------------------------------------------------------------- - - -- opf1 = |op| |_,a| `Op{ op, a } - local function opf1 (op) return - function (_,a) return { tag="Op", op, a } end end - - -- opf2 = |op| |a,_,b| `Op{ op, a, b } - local function opf2 (op) return - function (a,_,b) return { tag="Op", op, a, b } end end - - -- opf2r = |op| |a,_,b| `Op{ op, b, a } -- (args reversed) - local function opf2r (op) return - function (a,_,b) return { tag="Op", op, b, a } end end - - local function op_ne(a, _, b) - -- This version allows to remove the "ne" operator from the AST definition. - -- However, it doesn't always produce the exact same bytecode as Lua 5.1. - return { tag="Op", "not", - { tag="Op", "eq", a, b, lineinfo= { - first = a.lineinfo.first, last = b.lineinfo.last } } } - end - - - -------------------------------------------------------------------------------- - -- - -- complete expression - -- - -------------------------------------------------------------------------------- - - -- FIXME: set line number. In [expr] transformers probably - M.expr = gg.expr { - name = "expression", - primary = gg.multisequence{ - name = "expr primary", - { "(", _M.expr, ")", builder = "Paren" }, - { "function", _M.func_val, builder = unpack }, - { "-{", _meta.splice_content, "}", builder = unpack }, - { "+{", _meta.quote_content, "}", builder = unpack }, - { "nil", builder = "Nil" }, - { "true", builder = "True" }, - { "false", builder = "False" }, - { "...", builder = "Dots" }, - { "{", _table.content, "}", builder = unpack }, - _M.id_or_literal }, - - infix = { - name = "expr infix op", - { "+", prec = 60, builder = opf2 "add" }, - { "-", prec = 60, builder = opf2 "sub" }, - { "*", prec = 70, builder = opf2 "mul" }, - { "/", prec = 70, builder = opf2 "div" }, - { "%", prec = 70, builder = opf2 "mod" }, - { "^", prec = 90, builder = opf2 "pow", assoc = "right" }, - { "..", prec = 40, builder = opf2 "concat", assoc = "right" }, - { "==", prec = 30, builder = opf2 "eq" }, - { "~=", prec = 30, builder = op_ne }, - { "<", prec = 30, builder = opf2 "lt" }, - { "<=", prec = 30, builder = opf2 "le" }, - { ">", prec = 30, builder = opf2r "lt" }, - { ">=", prec = 30, builder = opf2r "le" }, - { "and",prec = 20, builder = opf2 "and" }, - { "or", prec = 10, builder = opf2 "or" } }, - - prefix = { - name = "expr prefix op", - { "not", prec = 80, builder = opf1 "not" }, - { "#", prec = 80, builder = opf1 "len" }, - { "-", prec = 80, builder = opf1 "unm" } }, - - suffix = { - name = "expr suffix op", - { "[", _M.expr, "]", builder = function (tab, idx) - return {tag="Index", tab, idx[1]} end}, - { ".", _M.id, builder = function (tab, field) - return {tag="Index", tab, _M.id2string(field[1])} end }, - { "(", _M.func_args_content, ")", builder = function(f, args) - return {tag="Call", f, unpack(args[1])} end }, - { "{", _table.content, "}", builder = function (f, arg) - return {tag="Call", f, arg[1]} end}, - { ":", _M.id, _M.method_args, builder = function (obj, post) - local m_name, args = unpack(post) - return {tag="Invoke", obj, _M.id2string(m_name), unpack(args)} end}, - { "+{", _meta.quote_content, "}", builder = function (f, arg) - return {tag="Call", f, arg[1] } end }, - default = { name="opt_string_arg", parse = _M.opt_string, builder = function(f, arg) - return {tag="Call", f, arg } end } } } - return M -end \ No newline at end of file diff --git a/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/ext.lua b/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/ext.lua deleted file mode 100644 index 4e9d3950f..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/ext.lua +++ /dev/null @@ -1,96 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- -------------------------------------------------------------------------------- - --------------------------------------------------------------------------------- --- --- Non-Lua syntax extensions --- --------------------------------------------------------------------------------- - -local gg = require 'metalua.grammar.generator' - -return function(M) - - local _M = gg.future(M) - - --------------------------------------------------------------------------- - -- Algebraic Datatypes - ---------------------------------------------------------------------------- - local function adt (lx) - local node = _M.id (lx) - local tagval = node[1] - -- tagkey = `Pair{ `String "key", `String{ -{tagval} } } - local tagkey = { tag="Pair", {tag="String", "tag"}, {tag="String", tagval} } - if lx:peek().tag == "String" or lx:peek().tag == "Number" then - -- TODO support boolean litterals - return { tag="Table", tagkey, lx:next() } - elseif lx:is_keyword (lx:peek(), "{") then - local x = M.table.table (lx) - table.insert (x, 1, tagkey) - return x - else return { tag="Table", tagkey } end - end - - M.adt = gg.sequence{ "`", adt, builder = unpack } - - M.expr.primary :add(M.adt) - - ---------------------------------------------------------------------------- - -- Anonymous lambda - ---------------------------------------------------------------------------- - M.lambda_expr = gg.sequence{ - "|", _M.func_params_content, "|", _M.expr, - builder = function (x) - local li = x[2].lineinfo - return { tag="Function", x[1], - { {tag="Return", x[2], lineinfo=li }, lineinfo=li } } - end } - - M.expr.primary :add (M.lambda_expr) - - -------------------------------------------------------------------------------- - -- Allows to write "a `f` b" instead of "f(a, b)". Taken from Haskell. - -------------------------------------------------------------------------------- - function M.expr_in_backquotes (lx) return M.expr(lx, 35) end -- 35=limited precedence - M.expr.infix :add{ name = "infix function", - "`", _M.expr_in_backquotes, "`", prec = 35, assoc="left", - builder = function(a, op, b) return {tag="Call", op[1], a, b} end } - - -------------------------------------------------------------------------------- - -- C-style op+assignments - -- TODO: no protection against side-effects in LHS vars. - -------------------------------------------------------------------------------- - local function op_assign(kw, op) - local function rhs(a, b) return { tag="Op", op, a, b } end - local function f(a,b) - if #a ~= #b then gg.parse_error "assymetric operator+assignment" end - local right = { } - local r = { tag="Set", a, right } - for i=1, #a do right[i] = { tag="Op", op, a[i], b[i] } end - return r - end - M.lexer :add (kw) - M.assignments[kw] = f - end - - local ops = { add='+='; sub='-='; mul='*='; div='/=' } - for ast_op_name, keyword in pairs(ops) do op_assign(keyword, ast_op_name) end - - return M -end \ No newline at end of file diff --git a/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/lexer.lua b/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/lexer.lua deleted file mode 100644 index 2b5ff7e9d..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/lexer.lua +++ /dev/null @@ -1,43 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2006-2014 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- --------------------------------------------------------------------------------- - ----------------------------------------------------------------------- --- Generate a new lua-specific lexer, derived from the generic lexer. ----------------------------------------------------------------------- - -local generic_lexer = require 'metalua.grammar.lexer' - -return function() - local lexer = generic_lexer.lexer :clone() - - local keywords = { - "and", "break", "do", "else", "elseif", - "end", "false", "for", "function", - "goto", -- Lua5.2 - "if", - "in", "local", "nil", "not", "or", "repeat", - "return", "then", "true", "until", "while", - "...", "..", "==", ">=", "<=", "~=", - "::", -- Lua5,2 - "+{", "-{" } -- Metalua - - for _, w in ipairs(keywords) do lexer :add (w) end - - return lexer -end \ No newline at end of file diff --git a/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/meta.lua b/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/meta.lua deleted file mode 100644 index 71eb3c358..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/meta.lua +++ /dev/null @@ -1,138 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2014 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- -------------------------------------------------------------------------------- - --- Compile-time metaprogramming features: splicing ASTs generated during compilation, --- AST quasi-quoting helpers. - -local gg = require 'metalua.grammar.generator' - -return function(M) - local _M = gg.future(M) - M.meta={ } - local _MM = gg.future(M.meta) - - -------------------------------------------------------------------------------- - -- External splicing: compile an AST into a chunk, load and evaluate - -- that chunk, and replace the chunk by its result (which must also be - -- an AST). - -------------------------------------------------------------------------------- - - -- TODO: that's not part of the parser - function M.meta.eval (ast) - -- TODO: should there be one mlc per splice, or per parser instance? - local mlc = require 'metalua.compiler'.new() - local f = mlc :ast_to_function (ast, '=splice') - local result=f(M) -- splices act on the current parser - return result - end - - ---------------------------------------------------------------------------- - -- Going from an AST to an AST representing that AST - -- the only hash-part key being lifted is `"tag"`. - -- Doesn't lift subtrees protected inside a `Splice{ ... }. - -- e.g. change `Foo{ 123 } into - -- `Table{ `Pair{ `String "tag", `String "foo" }, `Number 123 } - ---------------------------------------------------------------------------- - local function lift (t) - --print("QUOTING:", table.tostring(t, 60,'nohash')) - local cases = { } - function cases.table (t) - local mt = { tag = "Table" } - --table.insert (mt, { tag = "Pair", quote "quote", { tag = "True" } }) - if t.tag == "Splice" then - assert (#t==1, "Invalid splice") - local sp = t[1] - return sp - elseif t.tag then - table.insert (mt, { tag="Pair", lift "tag", lift(t.tag) }) - end - for _, v in ipairs (t) do - table.insert (mt, lift(v)) - end - return mt - end - function cases.number (t) return { tag = "Number", t, quote = true } end - function cases.string (t) return { tag = "String", t, quote = true } end - function cases.boolean (t) return { tag = t and "True" or "False", t, quote = true } end - local f = cases [type(t)] - if f then return f(t) else error ("Cannot quote an AST containing "..tostring(t)) end - end - M.meta.lift = lift - - -------------------------------------------------------------------------------- - -- when this variable is false, code inside [-{...}] is compiled and - -- avaluated immediately. When it's true (supposedly when we're - -- parsing data inside a quasiquote), [-{foo}] is replaced by - -- [`Splice{foo}], which will be unpacked by [quote()]. - -------------------------------------------------------------------------------- - local in_a_quote = false - - -------------------------------------------------------------------------------- - -- Parse the inside of a "-{ ... }" - -------------------------------------------------------------------------------- - function M.meta.splice_content (lx) - local parser_name = "expr" - if lx:is_keyword (lx:peek(2), ":") then - local a = lx:next() - lx:next() -- skip ":" - assert (a.tag=="Id", "Invalid splice parser name") - parser_name = a[1] - end - -- TODO FIXME running a new parser with the old lexer?! - local parser = require 'metalua.compiler.parser'.new() - local ast = parser [parser_name](lx) - if in_a_quote then -- only prevent quotation in this subtree - --printf("SPLICE_IN_QUOTE:\n%s", _G.table.tostring(ast, "nohash", 60)) - return { tag="Splice", ast } - else -- convert in a block, eval, replace with result - if parser_name == "expr" then ast = { { tag="Return", ast } } - elseif parser_name == "stat" then ast = { ast } - elseif parser_name ~= "block" then - error ("splice content must be an expr, stat or block") end - --printf("EXEC THIS SPLICE:\n%s", _G.table.tostring(ast, "nohash", 60)) - return M.meta.eval (ast) - end - end - - M.meta.splice = gg.sequence{ "-{", _MM.splice_content, "}", builder=unpack } - - -------------------------------------------------------------------------------- - -- Parse the inside of a "+{ ... }" - -------------------------------------------------------------------------------- - function M.meta.quote_content (lx) - local parser - if lx:is_keyword (lx:peek(2), ":") then -- +{parser: content } - local parser_name = M.id(lx)[1] - parser = M[parser_name] - lx:next() -- skip ":" - else -- +{ content } - parser = M.expr - end - - local prev_iq = in_a_quote - in_a_quote = true - --print("IN_A_QUOTE") - local content = parser (lx) - local q_content = M.meta.lift (content) - in_a_quote = prev_iq - return q_content - end - - return M -end \ No newline at end of file diff --git a/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/misc.lua b/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/misc.lua deleted file mode 100644 index f7dde0923..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/misc.lua +++ /dev/null @@ -1,176 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- -------------------------------------------------------------------------------- - -------------------------------------------------------------------------------- --- --- Summary: metalua parser, miscellaneous utility functions. --- -------------------------------------------------------------------------------- - --------------------------------------------------------------------------------- --- --- Exported API: --- * [mlp.fget()] --- * [mlp.id()] --- * [mlp.opt_id()] --- * [mlp.id_list()] --- * [mlp.string()] --- * [mlp.opt_string()] --- * [mlp.id2string()] --- --------------------------------------------------------------------------------- - -local pp = require 'metalua.pprint' -local gg = require 'metalua.grammar.generator' - --- TODO: replace splice-aware versions with naive ones, move etensions in ./meta - -return function(M) - local _M = gg.future(M) - ---[[ metaprog-free versions: - function M.id(lx) - if lx:peek().tag~='Id' then gg.parse_error(lx, "Identifier expected") - else return lx:next() end - end - - function M.opt_id(lx) - if lx:peek().tag~='Id' then return lx:next() else return false end - end - - function M.string(lx) - if lx:peek().tag~='String' then gg.parse_error(lx, "String expected") - else return lx:next() end - end - - function M.opt_string(lx) - if lx:peek().tag~='String' then return lx:next() else return false end - end - - -------------------------------------------------------------------------------- - -- Converts an identifier into a string. Hopefully one day it'll handle - -- splices gracefully, but that proves quite tricky. - -------------------------------------------------------------------------------- - function M.id2string (id) - if id.tag == "Id" then id.tag = "String"; return id - else error ("Identifier expected: "..table.tostring(id, 'nohash')) end - end ---]] - - -------------------------------------------------------------------------------- - -- Try to read an identifier (possibly as a splice), or return [false] if no - -- id is found. - -------------------------------------------------------------------------------- - function M.opt_id (lx) - local a = lx:peek(); - if lx:is_keyword (a, "-{") then - local v = M.meta.splice(lx) - if v.tag ~= "Id" and v.tag ~= "Splice" then - gg.parse_error(lx, "Bad id splice") - end - return v - elseif a.tag == "Id" then return lx:next() - else return false end - end - - -------------------------------------------------------------------------------- - -- Mandatory reading of an id: causes an error if it can't read one. - -------------------------------------------------------------------------------- - function M.id (lx) - return M.opt_id (lx) or gg.parse_error(lx,"Identifier expected") - end - - -------------------------------------------------------------------------------- - -- Common helper function - -------------------------------------------------------------------------------- - M.id_list = gg.list { primary = _M.id, separators = "," } - - -------------------------------------------------------------------------------- - -- Converts an identifier into a string. Hopefully one day it'll handle - -- splices gracefully, but that proves quite tricky. - -------------------------------------------------------------------------------- - function M.id2string (id) - --print("id2string:", disp.ast(id)) - if id.tag == "Id" then id.tag = "String"; return id - elseif id.tag == "Splice" then - error ("id2string on splice not implemented") - -- Evaluating id[1] will produce `Id{ xxx }, - -- and we want it to produce `String{ xxx }. - -- The following is the plain notation of: - -- +{ `String{ `Index{ `Splice{ -{id[1]} }, `Number 1 } } } - return { tag="String", { tag="Index", { tag="Splice", id[1] }, - { tag="Number", 1 } } } - else error ("Identifier expected: "..pp.tostring (id, {metalua_tag=1, hide_hash=1})) end - end - - -------------------------------------------------------------------------------- - -- Read a string, possibly spliced, or return an error if it can't - -------------------------------------------------------------------------------- - function M.string (lx) - local a = lx:peek() - if lx:is_keyword (a, "-{") then - local v = M.meta.splice(lx) - if v.tag ~= "String" and v.tag ~= "Splice" then - gg.parse_error(lx,"Bad string splice") - end - return v - elseif a.tag == "String" then return lx:next() - else error "String expected" end - end - - -------------------------------------------------------------------------------- - -- Try to read a string, or return false if it can't. No splice allowed. - -------------------------------------------------------------------------------- - function M.opt_string (lx) - return lx:peek().tag == "String" and lx:next() - end - - -------------------------------------------------------------------------------- - -- Chunk reader: block + Eof - -------------------------------------------------------------------------------- - function M.skip_initial_sharp_comment (lx) - -- Dirty hack: I'm happily fondling lexer's private parts - -- FIXME: redundant with lexer:newstream() - lx :sync() - local i = lx.src:match ("^#.-\n()", lx.i) - if i then - lx.i = i - lx.column_offset = i - lx.line = lx.line and lx.line + 1 or 1 - end - end - - local function chunk (lx) - if lx:peek().tag == 'Eof' then - return { } -- handle empty files - else - M.skip_initial_sharp_comment (lx) - local chunk = M.block (lx) - if lx:peek().tag ~= "Eof" then - gg.parse_error(lx, "End-of-file expected") - end - return chunk - end - end - - -- chunk is wrapped in a sequence so that it has a "transformer" field. - M.chunk = gg.sequence { chunk, builder = unpack } - - return M -end \ No newline at end of file diff --git a/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/stat.lua b/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/stat.lua deleted file mode 100644 index 5d5e3a91d..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/stat.lua +++ /dev/null @@ -1,279 +0,0 @@ ------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- -------------------------------------------------------------------------------- - -------------------------------------------------------------------------------- --- --- Summary: metalua parser, statement/block parser. This is part of the --- definition of module [mlp]. --- -------------------------------------------------------------------------------- - -------------------------------------------------------------------------------- --- --- Exports API: --- * [mlp.stat()] --- * [mlp.block()] --- * [mlp.for_header()] --- -------------------------------------------------------------------------------- - -local lexer = require 'metalua.grammar.lexer' -local gg = require 'metalua.grammar.generator' - -local annot = require 'metalua.compiler.parser.annot.generator' - --------------------------------------------------------------------------------- --- List of all keywords that indicate the end of a statement block. Users are --- likely to extend this list when designing extensions. --------------------------------------------------------------------------------- - - -return function(M) - local _M = gg.future(M) - - M.block_terminators = { "else", "elseif", "end", "until", ")", "}", "]" } - - -- FIXME: this must be handled from within GG!!! - -- FIXME: there's no :add method in the list anyway. Added by gg.list?! - function M.block_terminators :add(x) - if type (x) == "table" then for _, y in ipairs(x) do self :add (y) end - else table.insert (self, x) end - end - - ---------------------------------------------------------------------------- - -- list of statements, possibly followed by semicolons - ---------------------------------------------------------------------------- - M.block = gg.list { - name = "statements block", - terminators = M.block_terminators, - primary = function (lx) - -- FIXME use gg.optkeyword() - local x = M.stat (lx) - if lx:is_keyword (lx:peek(), ";") then lx:next() end - return x - end } - - ---------------------------------------------------------------------------- - -- Helper function for "return " parsing. - -- Called when parsing return statements. - -- The specific test for initial ";" is because it's not a block terminator, - -- so without it gg.list would choke on "return ;" statements. - -- We don't make a modified copy of block_terminators because this list - -- is sometimes modified at runtime, and the return parser would get out of - -- sync if it was relying on a copy. - ---------------------------------------------------------------------------- - local return_expr_list_parser = gg.multisequence{ - { ";" , builder = function() return { } end }, - default = gg.list { - _M.expr, separators = ",", terminators = M.block_terminators } } - - - local for_vars_list = gg.list{ - name = "for variables list", - primary = _M.id, - separators = ",", - terminators = "in" } - - ---------------------------------------------------------------------------- - -- for header, between [for] and [do] (exclusive). - -- Return the `Forxxx{...} AST, without the body element (the last one). - ---------------------------------------------------------------------------- - function M.for_header (lx) - local vars = M.id_list(lx) - if lx :is_keyword (lx:peek(), "=") then - if #vars ~= 1 then - gg.parse_error (lx, "numeric for only accepts one variable") - end - lx:next() -- skip "=" - local exprs = M.expr_list (lx) - if #exprs < 2 or #exprs > 3 then - gg.parse_error (lx, "numeric for requires 2 or 3 boundaries") - end - return { tag="Fornum", vars[1], unpack (exprs) } - else - if not lx :is_keyword (lx :next(), "in") then - gg.parse_error (lx, '"=" or "in" expected in for loop') - end - local exprs = M.expr_list (lx) - return { tag="Forin", vars, exprs } - end - end - - ---------------------------------------------------------------------------- - -- Function def parser helper: id ( . id ) * - ---------------------------------------------------------------------------- - local function fn_builder (list) - local acc = list[1] - local first = acc.lineinfo.first - for i = 2, #list do - local index = M.id2string(list[i]) - local li = lexer.new_lineinfo(first, index.lineinfo.last) - acc = { tag="Index", acc, index, lineinfo=li } - end - return acc - end - local func_name = gg.list{ _M.id, separators = ".", builder = fn_builder } - - ---------------------------------------------------------------------------- - -- Function def parser helper: ( : id )? - ---------------------------------------------------------------------------- - local method_name = gg.onkeyword{ name = "method invocation", ":", _M.id, - transformers = { function(x) return x and x.tag=='Id' and M.id2string(x) end } } - - ---------------------------------------------------------------------------- - -- Function def builder - ---------------------------------------------------------------------------- - local function funcdef_builder(x) - local name, method, func = unpack(x) - if method then - name = { tag="Index", name, method, - lineinfo = { - first = name.lineinfo.first, - last = method.lineinfo.last } } - table.insert (func[1], 1, {tag="Id", "self"}) - end - local r = { tag="Set", {name}, {func} } - r[1].lineinfo = name.lineinfo - r[2].lineinfo = func.lineinfo - return r - end - - - ---------------------------------------------------------------------------- - -- if statement builder - ---------------------------------------------------------------------------- - local function if_builder (x) - local cond_block_pairs, else_block, r = x[1], x[2], {tag="If"} - local n_pairs = #cond_block_pairs - for i = 1, n_pairs do - local cond, block = unpack(cond_block_pairs[i]) - r[2*i-1], r[2*i] = cond, block - end - if else_block then table.insert(r, #r+1, else_block) end - return r - end - - -------------------------------------------------------------------------------- - -- produce a list of (expr,block) pairs - -------------------------------------------------------------------------------- - local elseifs_parser = gg.list { - gg.sequence { _M.expr, "then", _M.block , name='elseif parser' }, - separators = "elseif", - terminators = { "else", "end" } - } - - local annot_expr = gg.sequence { - _M.expr, - gg.onkeyword{ "#", gg.future(M, 'annot').tf }, - builder = function(x) - local e, a = unpack(x) - if a then return { tag='Annot', e, a } - else return e end - end } - - local annot_expr_list = gg.list { - primary = annot.opt(M, _M.expr, 'tf'), separators = ',' } - - ------------------------------------------------------------------------ - -- assignments and calls: statements that don't start with a keyword - ------------------------------------------------------------------------ - local function assign_or_call_stat_parser (lx) - local e = annot_expr_list (lx) - local a = lx:is_keyword(lx:peek()) - local op = a and M.assignments[a] - -- TODO: refactor annotations - if op then - --FIXME: check that [e] is a LHS - lx :next() - local annots - e, annots = annot.split(e) - local v = M.expr_list (lx) - if type(op)=="string" then return { tag=op, e, v, annots } - else return op (e, v) end - else - assert (#e > 0) - if #e > 1 then - gg.parse_error (lx, - "comma is not a valid statement separator; statement can be ".. - "separated by semicolons, or not separated at all") - elseif e[1].tag ~= "Call" and e[1].tag ~= "Invoke" then - local typename - if e[1].tag == 'Id' then - typename = '("'..e[1][1]..'") is an identifier' - elseif e[1].tag == 'Op' then - typename = "is an arithmetic operation" - else typename = "is of type '"..(e[1].tag or "").."'" end - gg.parse_error (lx, - "This expression %s; ".. - "a statement was expected, and only function and method call ".. - "expressions can be used as statements", typename); - end - return e[1] - end - end - - M.local_stat_parser = gg.multisequence{ - -- local function - { "function", _M.id, _M.func_val, builder = - function(x) - local vars = { x[1], lineinfo = x[1].lineinfo } - local vals = { x[2], lineinfo = x[2].lineinfo } - return { tag="Localrec", vars, vals } - end }, - -- local ( = )? - default = gg.sequence{ - gg.list{ - primary = annot.opt(M, _M.id, 'tf'), - separators = ',' }, - gg.onkeyword{ "=", _M.expr_list }, - builder = function(x) - local annotated_left, right = unpack(x) - local left, annotations = annot.split(annotated_left) - return {tag="Local", left, right or { }, annotations } - end } } - - ------------------------------------------------------------------------ - -- statement - ------------------------------------------------------------------------ - M.stat = gg.multisequence { - name = "statement", - { "do", _M.block, "end", builder = - function (x) return { tag="Do", unpack (x[1]) } end }, - { "for", _M.for_header, "do", _M.block, "end", builder = - function (x) x[1][#x[1]+1] = x[2]; return x[1] end }, - { "function", func_name, method_name, _M.func_val, builder=funcdef_builder }, - { "while", _M.expr, "do", _M.block, "end", builder = "While" }, - { "repeat", _M.block, "until", _M.expr, builder = "Repeat" }, - { "local", _M.local_stat_parser, builder = unpack }, - { "return", return_expr_list_parser, builder = - function(x) x[1].tag='Return'; return x[1] end }, - { "break", builder = function() return { tag="Break" } end }, - { "-{", gg.future(M, 'meta').splice_content, "}", builder = unpack }, - { "if", gg.nonempty(elseifs_parser), gg.onkeyword{ "else", M.block }, "end", - builder = if_builder }, - default = assign_or_call_stat_parser } - - M.assignments = { - ["="] = "Set" - } - - function M.assignments:add(k, v) self[k] = v end - - return M -end \ No newline at end of file diff --git a/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/table.lua b/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/table.lua deleted file mode 100644 index 11102d9ec..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/compiler/parser/table.lua +++ /dev/null @@ -1,77 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- --------------------------------------------------------------------------------- - --------------------------------------------------------------------------------- --- --- Exported API: --- * [M.table_bracket_field()] --- * [M.table_field()] --- * [M.table_content()] --- * [M.table()] --- --- KNOWN BUG: doesn't handle final ";" or "," before final "}" --- --------------------------------------------------------------------------------- - -local gg = require 'metalua.grammar.generator' - -return function(M) - - M.table = { } - local _table = gg.future(M.table) - local _expr = gg.future(M).expr - - -------------------------------------------------------------------------------- - -- `[key] = value` table field definition - -------------------------------------------------------------------------------- - M.table.bracket_pair = gg.sequence{ "[", _expr, "]", "=", _expr, builder = "Pair" } - - -------------------------------------------------------------------------------- - -- table element parser: list value, `id = value` pair or `[value] = value` pair. - -------------------------------------------------------------------------------- - function M.table.element (lx) - if lx :is_keyword (lx :peek(), "[") then return M.table.bracket_pair(lx) end - local e = M.expr (lx) - if not lx :is_keyword (lx :peek(), "=") then return e end - lx :next(); -- skip the "=" - local key = M.id2string(e) -- will fail on non-identifiers - local val = M.expr(lx) - local r = { tag="Pair", key, val } - r.lineinfo = { first = key.lineinfo.first, last = val.lineinfo.last } - return r - end - - ----------------------------------------------------------------------------- - -- table constructor, without enclosing braces; returns a full table object - ----------------------------------------------------------------------------- - M.table.content = gg.list { - -- eta expansion to allow patching the element definition - primary = _table.element, - separators = { ",", ";" }, - terminators = "}", - builder = "Table" } - - -------------------------------------------------------------------------------- - -- complete table constructor including [{...}] - -------------------------------------------------------------------------------- - -- TODO beware, stat and expr use only table.content, this can't be patched. - M.table.table = gg.sequence{ "{", _table.content, "}", builder = unpack } - - return M -end \ No newline at end of file diff --git a/Utils/luarocks/share/lua/5.1/metalua/extension/comprehension.mlua b/Utils/luarocks/share/lua/5.1/metalua/extension/comprehension.mlua deleted file mode 100644 index 8917b9a92..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/extension/comprehension.mlua +++ /dev/null @@ -1,282 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- -------------------------------------------------------------------------------- --- --- This extension implements list comprehensions, similar to Haskell and --- Python syntax, to easily describe lists. --- --- * x[a ... b] is the list { x[a], x[a+1], ..., x[b] } --- * { f()..., b } contains all the elements returned by f(), then b --- (allows to expand list fields other than the last one) --- * list comprehensions a la python, with "for" and "if" suffixes: --- {i+10*j for i=1,3 for j=1,3 if i~=j} is { 21, 31, 12, 32, 13, 23 } --- -------------------------------------------------------------------------------- - --{ extension ("match", ...) } - -local SUPPORT_IMPROVED_LOOPS = true -local SUPPORT_IMPROVED_INDEXES = false -- depends on deprecated table.isub -local SUPPORT_CONTINUE = true -local SUPPORT_COMP_LISTS = true - -assert (SUPPORT_IMPROVED_LOOPS or not SUPPORT_CONTINUE, - "Can't support 'continue' without improved loop headers") - -local gg = require 'metalua.grammar.generator' -local Q = require 'metalua.treequery' - -local function dots_list_suffix_builder (x) return `DotsSuffix{ x } end - -local function for_list_suffix_builder (list_element, suffix) - local new_header = suffix[1] - match list_element with - | `Comp{ _, acc } -> table.insert (acc, new_header); return list_element - | _ -> return `Comp{ list_element, { new_header } } - end -end - -local function if_list_suffix_builder (list_element, suffix) - local new_header = `If{ suffix[1] } - match list_element with - | `Comp{ _, acc } -> table.insert (acc, new_header); return list_element - | _ -> return `Comp{ list_element, { new_header } } - end -end - --- Builds a statement from a table element, which adds this element to --- a table `t`, potentially thanks to an alias `tinsert` to --- `table.insert`. --- @param core the part around which the loops are built. --- either `DotsSuffix{expr}, `Pair{ expr } or a plain expression --- @param list comprehension suffixes, in the order in which they appear --- either `Forin{ ... } or `Fornum{ ...} or `If{ ... }. In each case, --- it misses a last child node as its body. --- @param t a variable containing the table to fill --- @param tinsert a variable containing `table.insert`. --- --- @return fill a statement which fills empty table `t` with the denoted element -local function comp_list_builder(core, list, t, tinsert) - local filler - -- 1 - Build the loop's core: if it has suffix "...", every elements of the - -- multi-return must be inserted, hence the extra [for] loop. - match core with - | `DotsSuffix{ element } -> - local x = gg.gensym() - filler = +{stat: for _, -{x} in pairs{ -{element} } do (-{tinsert})(-{t}, -{x}) end } - | `Pair{ key, value } -> - --filler = +{ -{t}[-{key}] = -{value} } - filler = `Set{ { `Index{ t, key } }, { value } } - | _ -> filler = +{ (-{tinsert})(-{t}, -{core}) } - end - - -- 2 - Stack the `if` and `for` control structures, from outside to inside. - -- This is done in a destructive way for the elements of [list]. - for i = #list, 1, -1 do - table.insert (list[i], {filler}) - filler = list[i] - end - - return filler -end - -local function table_content_builder (list) - local special = false -- Does the table need a special builder? - for _, element in ipairs(list) do - local etag = element.tag - if etag=='Comp' or etag=='DotsSuffix' then special=true; break end - end - if not special then list.tag='Table'; return list end - - local t, tinsert = gg.gensym 'table', gg.gensym 'table_insert' - local filler_block = { +{stat: local -{t}, -{tinsert} = { }, table.insert } } - for _, element in ipairs(list) do - local filler - match element with - | `Comp{ core, comp } -> filler = comp_list_builder(core, comp, t, tinsert) - | _ -> filler = comp_list_builder(element, { }, t, tinsert) - end - table.insert(filler_block, filler) - end - return `Stat{ filler_block, t } -end - - --------------------------------------------------------------------------------- --- Back-end for improved index operator. -local function index_builder(a, suffix) - match suffix[1] with - -- Single index, no range: keep the native semantics - | { { e, false } } -> return `Index{ a, e } - -- Either a range, or multiple indexes, or both - | ranges -> - local r = `Call{ +{table.isub}, a } - local function acc (x,y) table.insert (r,x); table.insert (r,y) end - for _, seq in ipairs (ranges) do - match seq with - | { e, false } -> acc(e,e) - | { e, f } -> acc(e,f) - end - end - return r - end -end - -------------------------------------------------------------------- --- Find continue statements in a loop body, change them into goto --- end-of-body. -local function transform_continue_statements(body) - local continue_statements = Q(body) - :if_unknown() -- tolerate unknown 'Continue' statements - :not_under ('Forin', 'Fornum', 'While', 'Repeat') - :filter ('Continue') - :list() - if next(continue_statements) then - local continue_label = gg.gensym 'continue' [1] - table.insert(body, `Label{ continue_label }) - for _, statement in ipairs(continue_statements) do - statement.tag = 'Goto' - statement[1] = continue_label - end - return true - else return false end -end - -------------------------------------------------------------------------------- --- Back-end for loops with a multi-element header -local function loop_builder(x) - local first, elements, body = unpack(x) - - -- Change continue statements into gotos. - if SUPPORT_CONTINUE then transform_continue_statements(body) end - - ------------------------------------------------------------------- - -- If it's a regular loop, don't bloat the code - if not next(elements) then - table.insert(first, body) - return first - end - - ------------------------------------------------------------------- - -- There's no reason to treat the first element in a special way - table.insert(elements, 1, first) - - ------------------------------------------------------------------- - -- Change breaks into gotos that escape all loops at once. - local exit_label = nil - local function break_to_goto(break_node) - if not exit_label then exit_label = gg.gensym 'break' [1] end - break_node = break_node or { } - break_node.tag = 'Goto' - break_node[1] = exit_label - return break_node - end - Q(body) - :not_under('Function', 'Forin', 'Fornum', 'While', 'Repeat') - :filter('Break') - :foreach (break_to_goto) - - ------------------------------------------------------------------- - -- Compile all headers elements, from last to first. - -- invariant: `body` is a block (not a statement) - local result = body - for i = #elements, 1, -1 do - local e = elements[i] - match e with - | `If{ cond } -> - result = { `If{ cond, result } } - | `Until{ cond } -> - result = +{block: if -{cond} then -{break_to_goto()} else -{result} end } - | `While{ cond } -> - if i==1 then result = { `While{ cond, result } } -- top-level while - else result = +{block: if -{cond} then -{result} else -{break_to_goto()} end } end - | `Forin{ ... } | `Fornum{ ... } -> - table.insert (e, result); result={e} - | _-> require'metalua.pprint'.printf("Bad loop header element %s", e) - end - end - - - ------------------------------------------------------------------- - -- If some breaks had to be changed into gotos, insert the label - if exit_label then result = { result, `Label{ exit_label } } end - - return result -end - - --------------------------------------------------------------------------------- --- Improved "[...]" index operator: --- * support for multi-indexes ("foo[bar, gnat]") --- * support for ranges ("foo[bar ... gnat]") --------------------------------------------------------------------------------- -local function extend(M) - - local _M = gg.future(M) - - if SUPPORT_COMP_LISTS then - -- support for "for" / "if" comprehension suffixes in literal tables - local original_table_element = M.table.element - M.table.element = gg.expr{ name="table cell", - primary = original_table_element, - suffix = { name="table cell suffix", - { "...", builder = dots_list_suffix_builder }, - { "for", _M.for_header, builder = for_list_suffix_builder }, - { "if", _M.expr, builder = if_list_suffix_builder } } } - M.table.content.builder = table_content_builder - end - - if SUPPORT_IMPROVED_INDEXES then - -- Support for ranges and multiple indices in bracket suffixes - M.expr.suffix:del '[' - M.expr.suffix:add{ name="table index/range", - "[", gg.list{ - gg.sequence { _M.expr, gg.onkeyword{ "...", _M.expr } } , - separators = { ",", ";" } }, - "]", builder = index_builder } - end - - if SUPPORT_IMPROVED_LOOPS then - local original_for_header = M.for_header - M.stat :del 'for' - M.stat :del 'while' - - M.loop_suffix = gg.multisequence{ - { 'while', _M.expr, builder = |x| `Until{ `Op{ 'not', x[1] } } }, - { 'until', _M.expr, builder = |x| `Until{ x[1] } }, - { 'if', _M.expr, builder = |x| `If{ x[1] } }, - { 'for', original_for_header, builder = |x| x[1] } } - - M.loop_suffix_list = gg.list{ _M.loop_suffix, terminators='do' } - - M.stat :add{ - 'for', original_for_header, _M.loop_suffix_list, 'do', _M.block, 'end', - builder = loop_builder } - - M.stat :add{ - 'while', _M.expr, _M.loop_suffix_list, 'do', _M.block, 'end', - builder = |x| loop_builder{ `While{x[1]}, x[2], x[3] } } - end - - if SUPPORT_CONTINUE then - M.lexer :add 'continue' - M.stat :add{ 'continue', builder='Continue' } - end -end - -return extend diff --git a/Utils/luarocks/share/lua/5.1/metalua/extension/match.mlua b/Utils/luarocks/share/lua/5.1/metalua/extension/match.mlua deleted file mode 100644 index f55ff4140..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/extension/match.mlua +++ /dev/null @@ -1,400 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- -------------------------------------------------------------------------------- - -------------------------------------------------------------------------------- --- --- Glossary: --- --- * term_seq: the tested stuff, a sequence of terms --- * pattern_element: might match one term of a term seq. Represented --- as expression ASTs. --- * pattern_seq: might match a term_seq --- * pattern_group: several pattern seqs, one of them might match --- the term seq. --- * case: pattern_group * guard option * block --- * match_statement: tested term_seq * case list --- --- Hence a complete match statement is a: --- --- { list(expr), list{ list(list(expr)), expr or false, block } } --- --- Implementation hints --- ==================== --- --- The implementation is made as modular as possible, so that parts --- can be reused in other extensions. The priviledged way to share --- contextual information across functions is through the 'cfg' table --- argument. Its fields include: --- --- * code: code generated from pattern. A pattern_(element|seq|group) --- is compiled as a sequence of instructions which will jump to --- label [cfg.on_failure] if the tested term doesn't match. --- --- * on_failure: name of the label where the code will jump if the --- pattern doesn't match --- --- * locals: names of local variables used by the pattern. This --- includes bound variables, and temporary variables used to --- destructure tables. Names are stored as keys of the table, --- values are meaningless. --- --- * after_success: label where the code must jump after a pattern --- succeeded to capture a term, and the guard suceeded if there is --- any, and the conditional block has run. --- --- * ntmp: number of temporary variables used to destructurate table --- in the current case. --- --- Code generation is performed by acc_xxx() functions, which accumulate --- code in cfg.code: --- --- * acc_test(test, cfg) will generate a jump to cfg.on_failure --- *when the test returns TRUE* --- --- * acc_stat accumulates a statement --- --- * acc_assign accumulate an assignment statement, and makes sure that --- the LHS variable the registered as local in cfg.locals. --- -------------------------------------------------------------------------------- - --- TODO: hygiene wrt type() --- TODO: cfg.ntmp isn't reset as often as it could. I'm not even sure --- the corresponding locals are declared. - -local checks = require 'checks' -local gg = require 'metalua.grammar.generator' -local pp = require 'metalua.pprint' - ----------------------------------------------------------------------- --- This would have been best done through library 'metalua.walk', --- but walk depends on match, so we have to break the dependency. --- It replaces all instances of `...' in `ast' with `term', unless --- it appears in a function. ----------------------------------------------------------------------- -local function replace_dots (ast, term) - local function rec (node) - for i, child in ipairs(node) do - if type(child)~="table" then -- pass - elseif child.tag=='Dots' then - if term=='ambiguous' then - error ("You can't use `...' on the right of a match case when it appears ".. - "more than once on the left") - else node[i] = term end - elseif child.tag=='Function' then return nil - else rec(child) end - end - end - return rec(ast) -end - -local tmpvar_base = gg.gensym 'submatch.' [1] - -local function next_tmpvar(cfg) - assert (cfg.ntmp, "No cfg.ntmp imbrication level in the match compiler") - cfg.ntmp = cfg.ntmp+1 - return `Id{ tmpvar_base .. cfg.ntmp } -end - --- Code accumulators -local acc_stat = |x,cfg| table.insert (cfg.code, x) -local acc_test = |x,cfg| acc_stat(+{stat: if -{x} then -{`Goto{cfg.on_failure}} end}, cfg) --- lhs :: `Id{ string } --- rhs :: expr -local function acc_assign (lhs, rhs, cfg) - assert(lhs.tag=='Id') - cfg.locals[lhs[1]] = true - acc_stat (`Set{ {lhs}, {rhs} }, cfg) -end - -local literal_tags = { String=1, Number=1, True=1, False=1, Nil=1 } - --- pattern :: `Id{ string } --- term :: expr -local function id_pattern_element_builder (pattern, term, cfg) - assert (pattern.tag == "Id") - if pattern[1] == "_" then - -- "_" is used as a dummy var ==> no assignment, no == checking - cfg.locals._ = true - elseif cfg.locals[pattern[1]] then - -- This var is already bound ==> test for equality - acc_test (+{ -{term} ~= -{pattern} }, cfg) - else - -- Free var ==> bind it, and remember it for latter linearity checking - acc_assign (pattern, term, cfg) - cfg.locals[pattern[1]] = true - end -end - --- mutually recursive with table_pattern_element_builder -local pattern_element_builder - --- pattern :: pattern and `Table{ } --- term :: expr -local function table_pattern_element_builder (pattern, term, cfg) - local seen_dots, len = false, 0 - acc_test (+{ type( -{term} ) ~= "table" }, cfg) - for i = 1, #pattern do - local key, sub_pattern - if pattern[i].tag=="Pair" then -- Explicit key/value pair - key, sub_pattern = unpack (pattern[i]) - assert (literal_tags[key.tag], "Invalid key") - else -- Implicit key - len, key, sub_pattern = len+1, `Number{ len+1 }, pattern[i] - end - - -- '...' can only appear in final position - -- Could be fixed actually... - assert (not seen_dots, "Wrongly placed `...' ") - - if sub_pattern.tag == "Id" then - -- Optimization: save a useless [ v(n+1)=v(n).key ] - id_pattern_element_builder (sub_pattern, `Index{ term, key }, cfg) - if sub_pattern[1] ~= "_" then - acc_test (+{ -{sub_pattern} == nil }, cfg) - end - elseif sub_pattern.tag == "Dots" then - -- Remember where the capture is, and thatt arity checking shouldn't occur - seen_dots = true - else - -- Business as usual: - local v2 = next_tmpvar(cfg) - acc_assign (v2, `Index{ term, key }, cfg) - pattern_element_builder (sub_pattern, v2, cfg) - -- TODO: restore ntmp? - end - end - if seen_dots then -- remember how to retrieve `...' - -- FIXME: check, but there might be cases where the variable -{term} - -- will be overridden in contrieved tables. - -- ==> save it now, and clean the setting statement if unused - if cfg.dots_replacement then cfg.dots_replacement = 'ambiguous' - else cfg.dots_replacement = +{ select (-{`Number{len}}, unpack(-{term})) } end - else -- Check arity - acc_test (+{ #-{term} ~= -{`Number{len}} }, cfg) - end -end - --- mutually recursive with pattern_element_builder -local eq_pattern_element_builder, regexp_pattern_element_builder - --- Concatenate code in [cfg.code], that will jump to label --- [cfg.on_failure] if [pattern] doesn't match [term]. [pattern] --- should be an identifier, or at least cheap to compute and --- side-effects free. --- --- pattern :: pattern_element --- term :: expr -function pattern_element_builder (pattern, term, cfg) - if literal_tags[pattern.tag] then - acc_test (+{ -{term} ~= -{pattern} }, cfg) - elseif "Id" == pattern.tag then - id_pattern_element_builder (pattern, term, cfg) - elseif "Op" == pattern.tag and "div" == pattern[1] then - regexp_pattern_element_builder (pattern, term, cfg) - elseif "Op" == pattern.tag and "eq" == pattern[1] then - eq_pattern_element_builder (pattern, term, cfg) - elseif "Table" == pattern.tag then - table_pattern_element_builder (pattern, term, cfg) - else - error ("Invalid pattern at ".. - tostring(pattern.lineinfo).. - ": "..pp.tostring(pattern, {hide_hash=true})) - end -end - -function eq_pattern_element_builder (pattern, term, cfg) - local _, pat1, pat2 = unpack (pattern) - local ntmp_save = cfg.ntmp - pattern_element_builder (pat1, term, cfg) - cfg.ntmp = ntmp_save - pattern_element_builder (pat2, term, cfg) -end - --- pattern :: `Op{ 'div', string, list{`Id string} or `Id{ string }} --- term :: expr -local function regexp_pattern_element_builder (pattern, term, cfg) - local op, regexp, sub_pattern = unpack(pattern) - - -- Sanity checks -- - assert (op=='div', "Don't know what to do with that op in a pattern") - assert (regexp.tag=="String", - "Left hand side operand for '/' in a pattern must be ".. - "a literal string representing a regular expression") - if sub_pattern.tag=="Table" then - for _, x in ipairs(sub_pattern) do - assert (x.tag=="Id" or x.tag=='Dots', - "Right hand side operand for '/' in a pattern must be ".. - "a list of identifiers") - end - else - assert (sub_pattern.tag=="Id", - "Right hand side operand for '/' in a pattern must be ".. - "an identifier or a list of identifiers") - end - - -- Regexp patterns can only match strings - acc_test (+{ type(-{term}) ~= 'string' }, cfg) - -- put all captures in a list - local capt_list = +{ { string.strmatch(-{term}, -{regexp}) } } - -- save them in a var_n for recursive decomposition - local v2 = next_tmpvar(cfg) - acc_stat (+{stat: local -{v2} = -{capt_list} }, cfg) - -- was capture successful? - acc_test (+{ not next (-{v2}) }, cfg) - pattern_element_builder (sub_pattern, v2, cfg) -end - - --- Jumps to [cfg.on_faliure] if pattern_seq doesn't match --- term_seq. -local function pattern_seq_builder (pattern_seq, term_seq, cfg) - if #pattern_seq ~= #term_seq then error ("Bad seq arity") end - cfg.locals = { } -- reset bound variables between alternatives - for i=1, #pattern_seq do - cfg.ntmp = 1 -- reset the tmp var generator - pattern_element_builder(pattern_seq[i], term_seq[i], cfg) - end -end - --------------------------------------------------- --- for each case i: --- pattern_seq_builder_i: --- * on failure, go to on_failure_i --- * on success, go to on_success --- label on_success: --- block --- goto after_success --- label on_failure_i --------------------------------------------------- -local function case_builder (case, term_seq, cfg) - local patterns_group, guard, block = unpack(case) - local on_success = gg.gensym 'on_success' [1] - for i = 1, #patterns_group do - local pattern_seq = patterns_group[i] - cfg.on_failure = gg.gensym 'match_fail' [1] - cfg.dots_replacement = false - pattern_seq_builder (pattern_seq, term_seq, cfg) - if i<#patterns_group then - acc_stat (`Goto{on_success}, cfg) - acc_stat (`Label{cfg.on_failure}, cfg) - end - end - acc_stat (`Label{on_success}, cfg) - if guard then acc_test (+{not -{guard}}, cfg) end - if cfg.dots_replacement then - replace_dots (block, cfg.dots_replacement) - end - block.tag = 'Do' - acc_stat (block, cfg) - acc_stat (`Goto{cfg.after_success}, cfg) - acc_stat (`Label{cfg.on_failure}, cfg) -end - -local function match_builder (x) - local term_seq, cases = unpack(x) - local cfg = { - code = `Do{ }, - after_success = gg.gensym "_after_success" } - - - -- Some sharing issues occur when modifying term_seq, - -- so it's replaced by a copy new_term_seq. - -- TODO: clean that up, and re-suppress the useless copies - -- (cf. remarks about capture bug below). - local new_term_seq = { } - - local match_locals - - -- Make sure that all tested terms are variables or literals - for i=1, #term_seq do - local t = term_seq[i] - -- Capture problem: the following would compile wrongly: - -- `match x with x -> end' - -- Temporary workaround: suppress the condition, so that - -- all external variables are copied into unique names. - --if t.tag ~= 'Id' and not literal_tags[t.tag] then - local v = gg.gensym 'v' - if not match_locals then match_locals = `Local{ {v}, {t} } else - table.insert(match_locals[1], v) - table.insert(match_locals[2], t) - end - new_term_seq[i] = v - --end - end - term_seq = new_term_seq - - if match_locals then acc_stat(match_locals, cfg) end - - for i=1, #cases do - local case_cfg = { - after_success = cfg.after_success, - code = `Do{ } - -- locals = { } -- unnecessary, done by pattern_seq_builder - } - case_builder (cases[i], term_seq, case_cfg) - if next (case_cfg.locals) then - local case_locals = { } - table.insert (case_cfg.code, 1, `Local{ case_locals, { } }) - for v, _ in pairs (case_cfg.locals) do - table.insert (case_locals, `Id{ v }) - end - end - acc_stat(case_cfg.code, cfg) - end - local li = `String{tostring(cases.lineinfo)} - acc_stat(+{error('mismatch at '..-{li})}, cfg) - acc_stat(`Label{cfg.after_success}, cfg) - return cfg.code -end - ----------------------------------------------------------------------- --- Syntactical front-end ----------------------------------------------------------------------- - -local function extend(M) - - local _M = gg.future(M) - - checks('metalua.compiler.parser') - M.lexer:add{ "match", "with", "->" } - M.block.terminators:add "|" - - local match_cases_list_parser = gg.list{ name = "match cases list", - gg.sequence{ name = "match case", - gg.list{ name = "match case patterns list", - primary = _M.expr_list, - separators = "|", - terminators = { "->", "if" } }, - gg.onkeyword{ "if", _M.expr, consume = true }, - "->", - _M.block }, - separators = "|", - terminators = "end" } - - M.stat:add{ name = "match statement", - "match", - _M.expr_list, - "with", gg.optkeyword "|", - match_cases_list_parser, - "end", - builder = |x| match_builder{ x[1], x[3] } } -end - -return extend \ No newline at end of file diff --git a/Utils/luarocks/share/lua/5.1/metalua/grammar/generator.lua b/Utils/luarocks/share/lua/5.1/metalua/grammar/generator.lua deleted file mode 100644 index 2680d8a53..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/grammar/generator.lua +++ /dev/null @@ -1,834 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- --------------------------------------------------------------------------------- - --------------------------------------------------------------------------------- --- --- Summary: parser generator. Collection of higher order functors, --- which allow to build and combine parsers. Relies on a lexer --- that supports the same API as the one exposed in mll.lua. --- --------------------------------------------------------------------------------- - --------------------------------------------------------------------------------- --- --- Exported API: --- --- Parser generators: --- * [gg.sequence()] --- * [gg.multisequence()] --- * [gg.expr()] --- * [gg.list()] --- * [gg.onkeyword()] --- * [gg.optkeyword()] --- --- Other functions: --- * [gg.parse_error()] --- * [gg.make_parser()] --- * [gg.is_parser()] --- --------------------------------------------------------------------------------- - -local M = { } - -local checks = require 'checks' -local lexer = require 'metalua.grammar.lexer' -local pp = require 'metalua.pprint' - --------------------------------------------------------------------------------- --- Symbol generator: [gensym()] returns a guaranteed-to-be-unique identifier. --- The main purpose is to avoid variable capture in macros. --- --- If a string is passed as an argument, theis string will be part of the --- id name (helpful for macro debugging) --------------------------------------------------------------------------------- -local gensymidx = 0 - -function M.gensym (arg) - gensymidx = gensymidx + 1 - return { tag="Id", string.format(".%i.%s", gensymidx, arg or "")} -end - - -------------------------------------------------------------------------------- --- parser metatable, which maps __call to method parse, and adds some --- error tracing boilerplate. -------------------------------------------------------------------------------- -local parser_metatable = { } - -function parser_metatable :__call (lx, ...) - return self :parse (lx, ...) -end - -------------------------------------------------------------------------------- --- Turn a table into a parser, mainly by setting the metatable. -------------------------------------------------------------------------------- -function M.make_parser(kind, p) - p.kind = kind - if not p.transformers then p.transformers = { } end - function p.transformers:add (x) - table.insert (self, x) - end - setmetatable (p, parser_metatable) - return p -end - -------------------------------------------------------------------------------- --- Return true iff [x] is a parser. --- If it's a gg-generated parser, return the name of its kind. -------------------------------------------------------------------------------- -function M.is_parser (x) - return type(x)=="function" or getmetatable(x)==parser_metatable and x.kind -end - -------------------------------------------------------------------------------- --- Parse a sequence, without applying builder nor transformers. -------------------------------------------------------------------------------- -local function raw_parse_sequence (lx, p) - local r = { } - for i=1, #p do - local e=p[i] - if type(e) == "string" then - local kw = lx :next() - if not lx :is_keyword (kw, e) then - M.parse_error( - lx, "A keyword was expected, probably `%s'.", e) - end - elseif M.is_parser (e) then - table.insert (r, e(lx)) - else -- Invalid parser definition, this is *not* a parsing error - error(string.format( - "Sequence `%s': element #%i is neither a string nor a parser: %s", - p.name, i, pp.tostring(e))) - end - end - return r -end - -------------------------------------------------------------------------------- --- Parse a multisequence, without applying multisequence transformers. --- The sequences are completely parsed. -------------------------------------------------------------------------------- -local function raw_parse_multisequence (lx, sequence_table, default) - local seq_parser = sequence_table[lx:is_keyword(lx:peek())] - if seq_parser then return seq_parser (lx) - elseif default then return default (lx) - else return false end -end - -------------------------------------------------------------------------------- --- Applies all transformers listed in parser on ast. -------------------------------------------------------------------------------- -local function transform (ast, parser, fli, lli) - if parser.transformers then - for _, t in ipairs (parser.transformers) do ast = t(ast) or ast end - end - if type(ast) == 'table' then - local ali = ast.lineinfo - if not ali or ali.first~=fli or ali.last~=lli then - ast.lineinfo = lexer.new_lineinfo(fli, lli) - end - end - return ast -end - -------------------------------------------------------------------------------- --- Generate a tracable parsing error (not implemented yet) -------------------------------------------------------------------------------- -function M.parse_error(lx, fmt, ...) - local li = lx:lineinfo_left() - local file, line, column, offset, positions - if li then - file, line, column, offset = li.source, li.line, li.column, li.offset - positions = { first = li, last = li } - else - line, column, offset = -1, -1, -1 - end - - local msg = string.format("line %i, char %i: "..fmt, line, column, ...) - if file and file~='?' then msg = "file "..file..", "..msg end - - local src = lx.src - if offset>0 and src then - local i, j = offset, offset - while src:sub(i,i) ~= '\n' and i>=0 do i=i-1 end - while src:sub(j,j) ~= '\n' and j<=#src do j=j+1 end - local srcline = src:sub (i+1, j-1) - local idx = string.rep (" ", column).."^" - msg = string.format("%s\n>>> %s\n>>> %s", msg, srcline, idx) - end - --lx :kill() - error(msg) -end - -------------------------------------------------------------------------------- --- --- Sequence parser generator --- -------------------------------------------------------------------------------- --- Input fields: --- --- * [builder]: how to build an AST out of sequence parts. let [x] be the list --- of subparser results (keywords are simply omitted). [builder] can be: --- - [nil], in which case the result of parsing is simply [x] --- - a string, which is then put as a tag on [x] --- - a function, which takes [x] as a parameter and returns an AST. --- --- * [name]: the name of the parser. Used for debug messages --- --- * [transformers]: a list of AST->AST functions, applied in order on ASTs --- returned by the parser. --- --- * Table-part entries corresponds to keywords (strings) and subparsers --- (function and callable objects). --- --- After creation, the following fields are added: --- * [parse] the parsing function lexer->AST --- * [kind] == "sequence" --- * [name] is set, if it wasn't in the input. --- -------------------------------------------------------------------------------- -function M.sequence (p) - M.make_parser ("sequence", p) - - ------------------------------------------------------------------- - -- Parsing method - ------------------------------------------------------------------- - function p:parse (lx) - - -- Raw parsing: - local fli = lx:lineinfo_right() - local seq = raw_parse_sequence (lx, self) - local lli = lx:lineinfo_left() - - -- Builder application: - local builder, tb = self.builder, type (self.builder) - if tb == "string" then seq.tag = builder - elseif tb == "function" or builder and builder.__call then seq = builder(seq) - elseif builder == nil then -- nothing - else error ("Invalid builder of type "..tb.." in sequence") end - seq = transform (seq, self, fli, lli) - assert (not seq or seq.lineinfo) - return seq - end - - ------------------------------------------------------------------- - -- Construction - ------------------------------------------------------------------- - -- Try to build a proper name - if p.name then - -- don't touch existing name - elseif type(p[1])=="string" then -- find name based on 1st keyword - if #p==1 then p.name=p[1] - elseif type(p[#p])=="string" then - p.name = p[1] .. " ... " .. p[#p] - else p.name = p[1] .. " ..." end - else -- can't find a decent name - p.name = "unnamed_sequence" - end - - return p -end -- - - -------------------------------------------------------------------------------- --- --- Multiple, keyword-driven, sequence parser generator --- -------------------------------------------------------------------------------- --- in [p], useful fields are: --- --- * [transformers]: as usual --- --- * [name]: as usual --- --- * Table-part entries must be sequence parsers, or tables which can --- be turned into a sequence parser by [gg.sequence]. These --- sequences must start with a keyword, and this initial keyword --- must be different for each sequence. The table-part entries will --- be removed after [gg.multisequence] returns. --- --- * [default]: the parser to run if the next keyword in the lexer is --- none of the registered initial keywords. If there's no default --- parser and no suitable initial keyword, the multisequence parser --- simply returns [false]. --- --- After creation, the following fields are added: --- --- * [parse] the parsing function lexer->AST --- --- * [sequences] the table of sequences, indexed by initial keywords. --- --- * [add] method takes a sequence parser or a config table for --- [gg.sequence], and adds/replaces the corresponding sequence --- parser. If the keyword was already used, the former sequence is --- removed and a warning is issued. --- --- * [get] method returns a sequence by its initial keyword --- --- * [kind] == "multisequence" --- -------------------------------------------------------------------------------- -function M.multisequence (p) - M.make_parser ("multisequence", p) - - ------------------------------------------------------------------- - -- Add a sequence (might be just a config table for [gg.sequence]) - ------------------------------------------------------------------- - function p :add (s) - -- compile if necessary: - local keyword = type(s)=='table' and s[1] - if type(s)=='table' and not M.is_parser(s) then M.sequence(s) end - if M.is_parser(s)~='sequence' or type(keyword)~='string' then - if self.default then -- two defaults - error ("In a multisequence parser, all but one sequences ".. - "must start with a keyword") - else self.default = s end -- first default - else - if self.sequences[keyword] then -- duplicate keyword - -- TODO: warn that initial keyword `keyword` is overloaded in multiseq - end - self.sequences[keyword] = s - end - end -- - - ------------------------------------------------------------------- - -- Get the sequence starting with this keyword. [kw :: string] - ------------------------------------------------------------------- - function p :get (kw) return self.sequences [kw] end - - ------------------------------------------------------------------- - -- Remove the sequence starting with keyword [kw :: string] - ------------------------------------------------------------------- - function p :del (kw) - if not self.sequences[kw] then - -- TODO: warn that we try to delete a non-existent entry - end - local removed = self.sequences[kw] - self.sequences[kw] = nil - return removed - end - - ------------------------------------------------------------------- - -- Parsing method - ------------------------------------------------------------------- - function p :parse (lx) - local fli = lx:lineinfo_right() - local x = raw_parse_multisequence (lx, self.sequences, self.default) - local lli = lx:lineinfo_left() - return transform (x, self, fli, lli) - end - - ------------------------------------------------------------------- - -- Construction - ------------------------------------------------------------------- - -- Register the sequences passed to the constructor. They're going - -- from the array part of the parser to the hash part of field - -- [sequences] - p.sequences = { } - for i=1, #p do p :add (p[i]); p[i] = nil end - - -- FIXME: why is this commented out? - --if p.default and not is_parser(p.default) then sequence(p.default) end - return p -end -- - - -------------------------------------------------------------------------------- --- --- Expression parser generator --- -------------------------------------------------------------------------------- --- --- Expression configuration relies on three tables: [prefix], [infix] --- and [suffix]. Moreover, the primary parser can be replaced by a --- table: in this case the [primary] table will be passed to --- [gg.multisequence] to create a parser. --- --- Each of these tables is a modified multisequence parser: the --- differences with respect to regular multisequence config tables are: --- --- * the builder takes specific parameters: --- - for [prefix], it takes the result of the prefix sequence parser, --- and the prefixed expression --- - for [infix], it takes the left-hand-side expression, the results --- of the infix sequence parser, and the right-hand-side expression. --- - for [suffix], it takes the suffixed expression, and the result --- of the suffix sequence parser. --- --- * the default field is a list, with parameters: --- - [parser] the raw parsing function --- - [transformers], as usual --- - [prec], the operator's precedence --- - [assoc] for [infix] table, the operator's associativity, which --- can be "left", "right" or "flat" (default to left) --- --- In [p], useful fields are: --- * [transformers]: as usual --- * [name]: as usual --- * [primary]: the atomic expression parser, or a multisequence config --- table (mandatory) --- * [prefix]: prefix operators config table, see above. --- * [infix]: infix operators config table, see above. --- * [suffix]: suffix operators config table, see above. --- --- After creation, these fields are added: --- * [kind] == "expr" --- * [parse] as usual --- * each table is turned into a multisequence, and therefore has an --- [add] method --- -------------------------------------------------------------------------------- -function M.expr (p) - M.make_parser ("expr", p) - - ------------------------------------------------------------------- - -- parser method. - -- In addition to the lexer, it takes an optional precedence: - -- it won't read expressions whose precedence is lower or equal - -- to [prec]. - ------------------------------------------------------------------- - function p :parse (lx, prec) - prec = prec or 0 - - ------------------------------------------------------ - -- Extract the right parser and the corresponding - -- options table, for (pre|in|suff)fix operators. - -- Options include prec, assoc, transformers. - ------------------------------------------------------ - local function get_parser_info (tab) - local p2 = tab :get (lx :is_keyword (lx :peek())) - if p2 then -- keyword-based sequence found - local function parser(lx) return raw_parse_sequence(lx, p2) end - return parser, p2 - else -- Got to use the default parser - local d = tab.default - if d then return d.parse or d.parser, d - else return false, false end - end - end - - ------------------------------------------------------ - -- Look for a prefix sequence. Multiple prefixes are - -- handled through the recursive [p.parse] call. - -- Notice the double-transform: one for the primary - -- expr, and one for the one with the prefix op. - ------------------------------------------------------ - local function handle_prefix () - local fli = lx :lineinfo_right() - local p2_func, p2 = get_parser_info (self.prefix) - local op = p2_func and p2_func (lx) - if op then -- Keyword-based sequence found - local ili = lx :lineinfo_right() -- Intermediate LineInfo - local e = p2.builder (op, self :parse (lx, p2.prec)) - local lli = lx :lineinfo_left() - return transform (transform (e, p2, ili, lli), self, fli, lli) - else -- No prefix found, get a primary expression - local e = self.primary(lx) - local lli = lx :lineinfo_left() - return transform (e, self, fli, lli) - end - end -- - - ------------------------------------------------------ - -- Look for an infix sequence+right-hand-side operand. - -- Return the whole binary expression result, - -- or false if no operator was found. - ------------------------------------------------------ - local function handle_infix (e) - local p2_func, p2 = get_parser_info (self.infix) - if not p2 then return false end - - ----------------------------------------- - -- Handle flattening operators: gather all operands - -- of the series in [list]; when a different operator - -- is found, stop, build from [list], [transform] and - -- return. - ----------------------------------------- - if (not p2.prec or p2.prec>prec) and p2.assoc=="flat" then - local fli = lx:lineinfo_right() - local pflat, list = p2, { e } - repeat - local op = p2_func(lx) - if not op then break end - table.insert (list, self:parse (lx, p2.prec)) - local _ -- We only care about checking that p2==pflat - _, p2 = get_parser_info (self.infix) - until p2 ~= pflat - local e2 = pflat.builder (list) - local lli = lx:lineinfo_left() - return transform (transform (e2, pflat, fli, lli), self, fli, lli) - - ----------------------------------------- - -- Handle regular infix operators: [e] the LHS is known, - -- just gather the operator and [e2] the RHS. - -- Result goes in [e3]. - ----------------------------------------- - elseif p2.prec and p2.prec>prec or - p2.prec==prec and p2.assoc=="right" then - local fli = e.lineinfo.first -- lx:lineinfo_right() - local op = p2_func(lx) - if not op then return false end - local e2 = self:parse (lx, p2.prec) - local e3 = p2.builder (e, op, e2) - local lli = lx:lineinfo_left() - return transform (transform (e3, p2, fli, lli), self, fli, lli) - - ----------------------------------------- - -- Check for non-associative operators, and complain if applicable. - ----------------------------------------- - elseif p2.assoc=="none" and p2.prec==prec then - M.parse_error (lx, "non-associative operator!") - - ----------------------------------------- - -- No infix operator suitable at that precedence - ----------------------------------------- - else return false end - - end -- - - ------------------------------------------------------ - -- Look for a suffix sequence. - -- Return the result of suffix operator on [e], - -- or false if no operator was found. - ------------------------------------------------------ - local function handle_suffix (e) - -- FIXME bad fli, must take e.lineinfo.first - local p2_func, p2 = get_parser_info (self.suffix) - if not p2 then return false end - if not p2.prec or p2.prec>=prec then - --local fli = lx:lineinfo_right() - local fli = e.lineinfo.first - local op = p2_func(lx) - if not op then return false end - local lli = lx:lineinfo_left() - e = p2.builder (e, op) - e = transform (transform (e, p2, fli, lli), self, fli, lli) - return e - end - return false - end -- - - ------------------------------------------------------ - -- Parser body: read suffix and (infix+operand) - -- extensions as long as we're able to fetch more at - -- this precedence level. - ------------------------------------------------------ - local e = handle_prefix() - repeat - local x = handle_suffix (e); e = x or e - local y = handle_infix (e); e = y or e - until not (x or y) - - -- No transform: it already happened in operators handling - return e - end -- - - ------------------------------------------------------------------- - -- Construction - ------------------------------------------------------------------- - if not p.primary then p.primary=p[1]; p[1]=nil end - for _, t in ipairs{ "primary", "prefix", "infix", "suffix" } do - if not p[t] then p[t] = { } end - if not M.is_parser(p[t]) then M.multisequence(p[t]) end - end - function p:add(...) return self.primary:add(...) end - return p -end -- - - -------------------------------------------------------------------------------- --- --- List parser generator --- -------------------------------------------------------------------------------- --- In [p], the following fields can be provided in input: --- --- * [builder]: takes list of subparser results, returns AST --- * [transformers]: as usual --- * [name]: as usual --- --- * [terminators]: list of strings representing the keywords which --- might mark the end of the list. When non-empty, the list is --- allowed to be empty. A string is treated as a single-element --- table, whose element is that string, e.g. ["do"] is the same as --- [{"do"}]. --- --- * [separators]: list of strings representing the keywords which can --- separate elements of the list. When non-empty, one of these --- keyword has to be found between each element. Lack of a separator --- indicates the end of the list. A string is treated as a --- single-element table, whose element is that string, e.g. ["do"] --- is the same as [{"do"}]. If [terminators] is empty/nil, then --- [separators] has to be non-empty. --- --- After creation, the following fields are added: --- * [parse] the parsing function lexer->AST --- * [kind] == "list" --- -------------------------------------------------------------------------------- -function M.list (p) - M.make_parser ("list", p) - - ------------------------------------------------------------------- - -- Parsing method - ------------------------------------------------------------------- - function p :parse (lx) - - ------------------------------------------------------ - -- Used to quickly check whether there's a terminator - -- or a separator immediately ahead - ------------------------------------------------------ - local function peek_is_in (keywords) - return keywords and lx:is_keyword(lx:peek(), unpack(keywords)) end - - local x = { } - local fli = lx :lineinfo_right() - - -- if there's a terminator to start with, don't bother trying - local is_empty_list = self.terminators and (peek_is_in (self.terminators) or lx:peek().tag=="Eof") - if not is_empty_list then - repeat - local item = self.primary(lx) - table.insert (x, item) -- read one element - until - -- There's a separator list specified, and next token isn't in it. - -- Otherwise, consume it with [lx:next()] - self.separators and not(peek_is_in (self.separators) and lx:next()) or - -- Terminator token ahead - peek_is_in (self.terminators) or - -- Last reason: end of file reached - lx:peek().tag=="Eof" - end - - local lli = lx:lineinfo_left() - - -- Apply the builder. It can be a string, or a callable value, - -- or simply nothing. - local b = self.builder - if b then - if type(b)=="string" then x.tag = b -- b is a string, use it as a tag - elseif type(b)=="function" then x=b(x) - else - local bmt = getmetatable(b) - if bmt and bmt.__call then x=b(x) end - end - end - return transform (x, self, fli, lli) - end -- - - ------------------------------------------------------------------- - -- Construction - ------------------------------------------------------------------- - if not p.primary then p.primary = p[1]; p[1] = nil end - if type(p.terminators) == "string" then p.terminators = { p.terminators } - elseif p.terminators and #p.terminators == 0 then p.terminators = nil end - if type(p.separators) == "string" then p.separators = { p.separators } - elseif p.separators and #p.separators == 0 then p.separators = nil end - - return p -end -- - - -------------------------------------------------------------------------------- --- --- Keyword-conditioned parser generator --- -------------------------------------------------------------------------------- --- --- Only apply a parser if a given keyword is found. The result of --- [gg.onkeyword] parser is the result of the subparser (modulo --- [transformers] applications). --- --- lineinfo: the keyword is *not* included in the boundaries of the --- resulting lineinfo. A review of all usages of gg.onkeyword() in the --- implementation of metalua has shown that it was the appropriate choice --- in every case. --- --- Input fields: --- --- * [name]: as usual --- --- * [transformers]: as usual --- --- * [peek]: if non-nil, the conditioning keyword is left in the lexeme --- stream instead of being consumed. --- --- * [primary]: the subparser. --- --- * [keywords]: list of strings representing triggering keywords. --- --- * Table-part entries can contain strings, and/or exactly one parser. --- Strings are put in [keywords], and the parser is put in [primary]. --- --- After the call, the following fields will be set: --- --- * [parse] the parsing method --- * [kind] == "onkeyword" --- * [primary] --- * [keywords] --- -------------------------------------------------------------------------------- -function M.onkeyword (p) - M.make_parser ("onkeyword", p) - - ------------------------------------------------------------------- - -- Parsing method - ------------------------------------------------------------------- - function p :parse (lx) - if lx :is_keyword (lx:peek(), unpack(self.keywords)) then - local fli = lx:lineinfo_right() - if not self.peek then lx:next() end - local content = self.primary (lx) - local lli = lx:lineinfo_left() - local li = content.lineinfo or { } - fli, lli = li.first or fli, li.last or lli - return transform (content, p, fli, lli) - else return false end - end - - ------------------------------------------------------------------- - -- Construction - ------------------------------------------------------------------- - if not p.keywords then p.keywords = { } end - for _, x in ipairs(p) do - if type(x)=="string" then table.insert (p.keywords, x) - else assert (not p.primary and M.is_parser (x)); p.primary = x end - end - assert (next (p.keywords), "Missing trigger keyword in gg.onkeyword") - assert (p.primary, 'no primary parser in gg.onkeyword') - return p -end -- - - -------------------------------------------------------------------------------- --- --- Optional keyword consummer pseudo-parser generator --- -------------------------------------------------------------------------------- --- --- This doesn't return a real parser, just a function. That function parses --- one of the keywords passed as parameters, and returns it. It returns --- [false] if no matching keyword is found. --- --- Notice that tokens returned by lexer already carry lineinfo, therefore --- there's no need to add them, as done usually through transform() calls. -------------------------------------------------------------------------------- -function M.optkeyword (...) - local args = {...} - if type (args[1]) == "table" then - assert (#args == 1) - args = args[1] - end - for _, v in ipairs(args) do assert (type(v)=="string") end - return function (lx) - local x = lx:is_keyword (lx:peek(), unpack (args)) - if x then lx:next(); return x - else return false end - end -end - - -------------------------------------------------------------------------------- --- --- Run a parser with a special lexer --- -------------------------------------------------------------------------------- --- --- This doesn't return a real parser, just a function. --- First argument is the lexer class to be used with the parser, --- 2nd is the parser itself. --- The resulting parser returns whatever the argument parser does. --- -------------------------------------------------------------------------------- -function M.with_lexer(new_lexer, parser) - - ------------------------------------------------------------------- - -- Most gg functions take their parameters in a table, so it's - -- better to silently accept when with_lexer{ } is called with - -- its arguments in a list: - ------------------------------------------------------------------- - if not parser and #new_lexer==2 and type(new_lexer[1])=='table' then - return M.with_lexer(unpack(new_lexer)) - end - - ------------------------------------------------------------------- - -- Save the current lexer, switch it for the new one, run the parser, - -- restore the previous lexer, even if the parser caused an error. - ------------------------------------------------------------------- - return function (lx) - local old_lexer = getmetatable(lx) - lx:sync() - setmetatable(lx, new_lexer) - local status, result = pcall(parser, lx) - lx:sync() - setmetatable(lx, old_lexer) - if status then return result else error(result) end - end -end - --------------------------------------------------------------------------------- --- --- Make sure a parser is used and returns successfully. --- --------------------------------------------------------------------------------- -function M.nonempty(primary) - local p = M.make_parser('non-empty list', { primary = primary, name=primary.name }) - function p :parse (lx) - local fli = lx:lineinfo_right() - local content = self.primary (lx) - local lli = lx:lineinfo_left() - local li = content.lineinfo or { } - fli, lli = li.first or fli, li.last or lli - if #content == 0 then - M.parse_error (lx, "`%s' must not be empty.", self.name or "list") - else - return transform (content, self, fli, lli) - end - end - return p -end - -local FUTURE_MT = { } -function FUTURE_MT:__tostring() return "" end -function FUTURE_MT:__newindex(key, value) error "don't write in futures" end -function FUTURE_MT :__index (parser_name) - return function(...) - local p, m = rawget(self, '__path'), self.__module - if p then for _, name in ipairs(p) do - m=rawget(m, name) - if not m then error ("Submodule '"..name.."' undefined") end - end end - local f = rawget(m, parser_name) - if not f then error ("Parser '"..parser_name.."' undefined") end - return f(...) - end -end - -function M.future(module, ...) - checks('table') - local path = ... and {...} - if path then for _, x in ipairs(path) do - assert(type(x)=='string', "Bad future arg") - end end - local self = { __module = module, - __path = path } - return setmetatable(self, FUTURE_MT) -end - -return M diff --git a/Utils/luarocks/share/lua/5.1/metalua/grammar/lexer.lua b/Utils/luarocks/share/lua/5.1/metalua/grammar/lexer.lua deleted file mode 100644 index 0f96f8edf..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/grammar/lexer.lua +++ /dev/null @@ -1,672 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- -------------------------------------------------------------------------------- - -local checks = require 'checks' - -local M = { } - -local lexer = { alpha={ }, sym={ } } -lexer.__index=lexer -lexer.__type='lexer.stream' - -M.lexer = lexer - - -local debugf = function() end --- local debugf=printf - ----------------------------------------------------------------------- --- Some locale settings produce bad results, e.g. French locale --- expect float numbers to use commas instead of periods. --- TODO: change number parser into something loclae-independent, --- locales are nasty. ----------------------------------------------------------------------- -os.setlocale('C') - -local MT = { } - -M.metatables=MT - ----------------------------------------------------------------------- --- Create a new metatable, for a new class of objects. ----------------------------------------------------------------------- -local function new_metatable(name) - local mt = { __type = 'lexer.'..name }; - mt.__index = mt - MT[name] = mt -end - - ----------------------------------------------------------------------- --- Position: represent a point in a source file. ----------------------------------------------------------------------- -new_metatable 'position' - -local position_idx=1 - -function M.new_position(line, column, offset, source) - checks('number', 'number', 'number', 'string') - local id = position_idx; position_idx = position_idx+1 - return setmetatable({line=line, column=column, offset=offset, - source=source, id=id}, MT.position) -end - -function MT.position :__tostring() - return string.format("<%s%s|L%d|C%d|K%d>", - self.comments and "C|" or "", - self.source, self.line, self.column, self.offset) -end - - - ----------------------------------------------------------------------- --- Position factory: convert offsets into line/column/offset positions. ----------------------------------------------------------------------- -new_metatable 'position_factory' - -function M.new_position_factory(src, src_name) - -- assert(type(src)=='string') - -- assert(type(src_name)=='string') - local lines = { 1 } - for offset in src :gmatch '\n()' do table.insert(lines, offset) end - local max = #src+1 - table.insert(lines, max+1) -- +1 includes Eof - return setmetatable({ src_name=src_name, line2offset=lines, max=max }, - MT.position_factory) -end - -function MT.position_factory :get_position (offset) - -- assert(type(offset)=='number') - assert(offset<=self.max) - local line2offset = self.line2offset - local left = self.last_left or 1 - if offset", - fli.comments and "C|" or "", - fli.source, line, column, offset, - lli.comments and "|C" or "") -end - ----------------------------------------------------------------------- --- Token: atomic Lua language element, with a category, a content, --- and some lineinfo relating it to its original source. ----------------------------------------------------------------------- -new_metatable 'token' - -function M.new_token(tag, content, lineinfo) - --printf("TOKEN `%s{ %q, lineinfo = %s} boundaries %d, %d", - -- tag, content, tostring(lineinfo), lineinfo.first.id, lineinfo.last.id) - return setmetatable({tag=tag, lineinfo=lineinfo, content}, MT.token) -end - -function MT.token :__tostring() - --return string.format("`%s{ %q, %s }", self.tag, self[1], tostring(self.lineinfo)) - return string.format("`%s %q", self.tag, self[1]) -end - - ----------------------------------------------------------------------- --- Comment: series of comment blocks with associated lineinfo. --- To be attached to the tokens just before and just after them. ----------------------------------------------------------------------- -new_metatable 'comment' - -function M.new_comment(lines) - local first = lines[1].lineinfo.first - local last = lines[#lines].lineinfo.last - local lineinfo = M.new_lineinfo(first, last) - return setmetatable({lineinfo=lineinfo, unpack(lines)}, MT.comment) -end - -function MT.comment :text() - local last_line = self[1].lineinfo.last.line - local acc = { } - for i, line in ipairs(self) do - local nreturns = line.lineinfo.first.line - last_line - table.insert(acc, ("\n"):rep(nreturns)) - table.insert(acc, line[1]) - end - return table.concat(acc) -end - -function M.new_comment_line(text, lineinfo, nequals) - checks('string', 'lexer.lineinfo', '?number') - return { lineinfo = lineinfo, text, nequals } -end - - - ----------------------------------------------------------------------- --- Patterns used by [lexer :extract] to decompose the raw string into --- correctly tagged tokens. ----------------------------------------------------------------------- -lexer.patterns = { - spaces = "^[ \r\n\t]*()", - short_comment = "^%-%-([^\n]*)\n?()", - --final_short_comment = "^%-%-([^\n]*)()$", - long_comment = "^%-%-%[(=*)%[\n?(.-)%]%1%]()", - long_string = "^%[(=*)%[\n?(.-)%]%1%]()", - number_mantissa = { "^%d+%.?%d*()", "^%d*%.%d+()" }, - number_mantissa_hex = { "^%x+%.?%x*()", "^%x*%.%x+()" }, --Lua5.1 and Lua5.2 - number_exponant = "^[eE][%+%-]?%d+()", - number_exponant_hex = "^[pP][%+%-]?%d+()", --Lua5.2 - number_hex = "^0[xX]()", - word = "^([%a_][%w_]*)()" -} - ----------------------------------------------------------------------- --- unescape a whole string, applying [unesc_digits] and --- [unesc_letter] as many times as required. ----------------------------------------------------------------------- -local function unescape_string (s) - - -- Turn the digits of an escape sequence into the corresponding - -- character, e.g. [unesc_digits("123") == string.char(123)]. - local function unesc_digits (backslashes, digits) - if #backslashes%2==0 then - -- Even number of backslashes, they escape each other, not the digits. - -- Return them so that unesc_letter() can treat them - return backslashes..digits - else - -- Remove the odd backslash, which escapes the number sequence. - -- The rest will be returned and parsed by unesc_letter() - backslashes = backslashes :sub (1,-2) - end - local k, j, i = digits :reverse() :byte(1, 3) - local z = string.byte "0" - local code = (k or z) + 10*(j or z) + 100*(i or z) - 111*z - if code > 255 then - error ("Illegal escape sequence '\\"..digits.. - "' in string: ASCII codes must be in [0..255]") - end - local c = string.char (code) - if c == '\\' then c = '\\\\' end -- parsed by unesc_letter (test: "\092b" --> "\\b") - return backslashes..c - end - - -- Turn hex digits of escape sequence into char. - local function unesc_hex(backslashes, digits) - if #backslashes%2==0 then - return backslashes..'x'..digits - else - backslashes = backslashes :sub (1,-2) - end - local c = string.char(tonumber(digits,16)) - if c == '\\' then c = '\\\\' end -- parsed by unesc_letter (test: "\x5cb" --> "\\b") - return backslashes..c - end - - -- Handle Lua 5.2 \z sequences - local function unesc_z(backslashes, more) - if #backslashes%2==0 then - return backslashes..more - else - return backslashes :sub (1,-2) - end - end - - -- Take a letter [x], and returns the character represented by the - -- sequence ['\\'..x], e.g. [unesc_letter "n" == "\n"]. - local function unesc_letter(x) - local t = { - a = "\a", b = "\b", f = "\f", - n = "\n", r = "\r", t = "\t", v = "\v", - ["\\"] = "\\", ["'"] = "'", ['"'] = '"', ["\n"] = "\n" } - return t[x] or x - end - - s = s: gsub ("(\\+)(z%s*)", unesc_z) -- Lua 5.2 - s = s: gsub ("(\\+)([0-9][0-9]?[0-9]?)", unesc_digits) - s = s: gsub ("(\\+)x([0-9a-fA-F][0-9a-fA-F])", unesc_hex) -- Lua 5.2 - s = s: gsub ("\\(%D)",unesc_letter) - return s -end - -lexer.extractors = { - "extract_long_comment", "extract_short_comment", - "extract_short_string", "extract_word", "extract_number", - "extract_long_string", "extract_symbol" } - - - ----------------------------------------------------------------------- --- Really extract next token from the raw string --- (and update the index). --- loc: offset of the position just after spaces and comments --- previous_i: offset in src before extraction began ----------------------------------------------------------------------- -function lexer :extract () - local attached_comments = { } - local function gen_token(...) - local token = M.new_token(...) - if #attached_comments>0 then -- attach previous comments to token - local comments = M.new_comment(attached_comments) - token.lineinfo.first.comments = comments - if self.lineinfo_last_extracted then - self.lineinfo_last_extracted.comments = comments - end - attached_comments = { } - end - token.lineinfo.first.facing = self.lineinfo_last_extracted - self.lineinfo_last_extracted.facing = assert(token.lineinfo.first) - self.lineinfo_last_extracted = assert(token.lineinfo.last) - return token - end - while true do -- loop until a non-comment token is found - - -- skip whitespaces - self.i = self.src:match (self.patterns.spaces, self.i) - if self.i>#self.src then - local fli = self.posfact :get_position (#self.src+1) - local lli = self.posfact :get_position (#self.src+1) -- ok? - local tok = gen_token("Eof", "eof", M.new_lineinfo(fli, lli)) - tok.lineinfo.last.facing = lli - return tok - end - local i_first = self.i -- loc = position after whitespaces - - -- try every extractor until a token is found - for _, extractor in ipairs(self.extractors) do - local tag, content, xtra = self [extractor] (self) - if tag then - local fli = self.posfact :get_position (i_first) - local lli = self.posfact :get_position (self.i-1) - local lineinfo = M.new_lineinfo(fli, lli) - if tag=='Comment' then - local prev_comment = attached_comments[#attached_comments] - if not xtra -- new comment is short - and prev_comment and not prev_comment[2] -- prev comment is short - and prev_comment.lineinfo.last.line+1==fli.line then -- adjascent lines - -- concat with previous comment - prev_comment[1] = prev_comment[1].."\n"..content -- TODO quadratic, BAD! - prev_comment.lineinfo.last = lli - else -- accumulate comment - local comment = M.new_comment_line(content, lineinfo, xtra) - table.insert(attached_comments, comment) - end - break -- back to skipping spaces - else -- not a comment: real token, then - return gen_token(tag, content, lineinfo) - end -- if token is a comment - end -- if token found - end -- for each extractor - end -- while token is a comment -end -- :extract() - - - - ----------------------------------------------------------------------- --- Extract a short comment. ----------------------------------------------------------------------- -function lexer :extract_short_comment() - -- TODO: handle final_short_comment - local content, j = self.src :match (self.patterns.short_comment, self.i) - if content then self.i=j; return 'Comment', content, nil end -end - ----------------------------------------------------------------------- --- Extract a long comment. ----------------------------------------------------------------------- -function lexer :extract_long_comment() - local equals, content, j = self.src:match (self.patterns.long_comment, self.i) - if j then self.i = j; return "Comment", content, #equals end -end - ----------------------------------------------------------------------- --- Extract a '...' or "..." short string. ----------------------------------------------------------------------- -function lexer :extract_short_string() - local k = self.src :sub (self.i,self.i) -- first char - if k~=[[']] and k~=[["]] then return end -- no match' - local i = self.i + 1 - local j = i - while true do - local x,y; x, j, y = self.src :match ("([\\\r\n"..k.."])()(.?)", j) -- next interesting char - if x == '\\' then - if y == 'z' then -- Lua 5.2 \z - j = self.src :match ("^%s*()", j+1) - else - j=j+1 -- escaped char - end - elseif x == k then break -- end of string - else - assert (not x or x=='\r' or x=='\n') - return nil, 'Unterminated string' - end - end - self.i = j - - return 'String', unescape_string (self.src :sub (i,j-2)) -end - ----------------------------------------------------------------------- --- Extract Id or Keyword. ----------------------------------------------------------------------- -function lexer :extract_word() - local word, j = self.src:match (self.patterns.word, self.i) - if word then - self.i = j - return (self.alpha [word] and 'Keyword' or 'Id'), word - end -end - ----------------------------------------------------------------------- --- Extract Number. ----------------------------------------------------------------------- -function lexer :extract_number() - local j = self.src:match(self.patterns.number_hex, self.i) - if j then - j = self.src:match (self.patterns.number_mantissa_hex[1], j) or - self.src:match (self.patterns.number_mantissa_hex[2], j) - if j then - j = self.src:match (self.patterns.number_exponant_hex, j) or j - end - else - j = self.src:match (self.patterns.number_mantissa[1], self.i) or - self.src:match (self.patterns.number_mantissa[2], self.i) - if j then - j = self.src:match (self.patterns.number_exponant, j) or j - end - end - if not j then return end - -- Number found, interpret with tonumber() and return it - local str = self.src:sub (self.i, j-1) - -- :TODO: tonumber on Lua5.2 floating hex may or may not work on Lua5.1 - local n = tonumber (str) - if not n then error(str.." is not a valid number according to tonumber()") end - self.i = j - return 'Number', n -end - ----------------------------------------------------------------------- --- Extract long string. ----------------------------------------------------------------------- -function lexer :extract_long_string() - local _, content, j = self.src :match (self.patterns.long_string, self.i) - if j then self.i = j; return 'String', content end -end - ----------------------------------------------------------------------- --- Extract symbol. ----------------------------------------------------------------------- -function lexer :extract_symbol() - local k = self.src:sub (self.i,self.i) - local symk = self.sym [k] -- symbols starting with `k` - if not symk then - self.i = self.i + 1 - return 'Keyword', k - end - for _, sym in pairs (symk) do - if sym == self.src:sub (self.i, self.i + #sym - 1) then - self.i = self.i + #sym - return 'Keyword', sym - end - end - self.i = self.i+1 - return 'Keyword', k -end - ----------------------------------------------------------------------- --- Add a keyword to the list of keywords recognized by the lexer. ----------------------------------------------------------------------- -function lexer :add (w, ...) - assert(not ..., "lexer :add() takes only one arg, although possibly a table") - if type (w) == "table" then - for _, x in ipairs (w) do self :add (x) end - else - if w:match (self.patterns.word .. "$") then self.alpha [w] = true - elseif w:match "^%p%p+$" then - local k = w:sub(1,1) - local list = self.sym [k] - if not list then list = { }; self.sym [k] = list end - table.insert (list, w) - elseif w:match "^%p$" then return - else error "Invalid keyword" end - end -end - ----------------------------------------------------------------------- --- Return the [n]th next token, without consuming it. --- [n] defaults to 1. If it goes pass the end of the stream, an EOF --- token is returned. ----------------------------------------------------------------------- -function lexer :peek (n) - if not n then n=1 end - if n > #self.peeked then - for i = #self.peeked+1, n do - self.peeked [i] = self :extract() - end - end - return self.peeked [n] -end - ----------------------------------------------------------------------- --- Return the [n]th next token, removing it as well as the 0..n-1 --- previous tokens. [n] defaults to 1. If it goes pass the end of the --- stream, an EOF token is returned. ----------------------------------------------------------------------- -function lexer :next (n) - n = n or 1 - self :peek (n) - local a - for i=1,n do - a = table.remove (self.peeked, 1) - -- TODO: is this used anywhere? I think not. a.lineinfo.last may be nil. - --self.lastline = a.lineinfo.last.line - end - self.lineinfo_last_consumed = a.lineinfo.last - return a -end - ----------------------------------------------------------------------- --- Returns an object which saves the stream's current state. ----------------------------------------------------------------------- --- FIXME there are more fields than that to save -function lexer :save () return { self.i; {unpack(self.peeked) } } end - ----------------------------------------------------------------------- --- Restore the stream's state, as saved by method [save]. ----------------------------------------------------------------------- --- FIXME there are more fields than that to restore -function lexer :restore (s) self.i=s[1]; self.peeked=s[2] end - ----------------------------------------------------------------------- --- Resynchronize: cancel any token in self.peeked, by emptying the --- list and resetting the indexes ----------------------------------------------------------------------- -function lexer :sync() - local p1 = self.peeked[1] - if p1 then - local li_first = p1.lineinfo.first - if li_first.comments then li_first=li_first.comments.lineinfo.first end - self.i = li_first.offset - self.column_offset = self.i - li_first.column - self.peeked = { } - self.attached_comments = p1.lineinfo.first.comments or { } - end -end - ----------------------------------------------------------------------- --- Take the source and offset of an old lexer. ----------------------------------------------------------------------- -function lexer :takeover(old) - self :sync(); old :sync() - for _, field in ipairs{ 'i', 'src', 'attached_comments', 'posfact' } do - self[field] = old[field] - end - return self -end - ----------------------------------------------------------------------- --- Return the current position in the sources. This position is between --- two tokens, and can be within a space / comment area, and therefore --- have a non-null width. :lineinfo_left() returns the beginning of the --- separation area, :lineinfo_right() returns the end of that area. --- --- ____ last consummed token ____ first unconsummed token --- / / --- XXXXX YYYYY --- \____ \____ --- :lineinfo_left() :lineinfo_right() ----------------------------------------------------------------------- -function lexer :lineinfo_right() - return self :peek(1).lineinfo.first -end - -function lexer :lineinfo_left() - return self.lineinfo_last_consumed -end - ----------------------------------------------------------------------- --- Create a new lexstream. ----------------------------------------------------------------------- -function lexer :newstream (src_or_stream, name) - name = name or "?" - if type(src_or_stream)=='table' then -- it's a stream - return setmetatable ({ }, self) :takeover (src_or_stream) - elseif type(src_or_stream)=='string' then -- it's a source string - local src = src_or_stream - local pos1 = M.new_position(1, 1, 1, name) - local stream = { - src_name = name; -- Name of the file - src = src; -- The source, as a single string - peeked = { }; -- Already peeked, but not discarded yet, tokens - i = 1; -- Character offset in src - attached_comments = { },-- comments accumulator - lineinfo_last_extracted = pos1, - lineinfo_last_consumed = pos1, - posfact = M.new_position_factory (src_or_stream, name) - } - setmetatable (stream, self) - - -- Skip initial sharp-bang for Unix scripts - -- FIXME: redundant with mlp.chunk() - if src and src :match "^#!" then - local endofline = src :find "\n" - stream.i = endofline and (endofline + 1) or #src - end - return stream - else - assert(false, ":newstream() takes a source string or a stream, not a ".. - type(src_or_stream)) - end -end - ----------------------------------------------------------------------- --- If there's no ... args, return the token a (whose truth value is --- true) if it's a `Keyword{ }, or nil. If there are ... args, they --- have to be strings. if the token a is a keyword, and it's content --- is one of the ... args, then returns it (it's truth value is --- true). If no a keyword or not in ..., return nil. ----------------------------------------------------------------------- -function lexer :is_keyword (a, ...) - if not a or a.tag ~= "Keyword" then return false end - local words = {...} - if #words == 0 then return a[1] end - for _, w in ipairs (words) do - if w == a[1] then return w end - end - return false -end - ----------------------------------------------------------------------- --- Cause an error if the next token isn't a keyword whose content --- is listed among ... args (which have to be strings). ----------------------------------------------------------------------- -function lexer :check (...) - local words = {...} - local a = self :next() - local function err () - error ("Got " .. tostring (a) .. - ", expected one of these keywords : '" .. - table.concat (words,"', '") .. "'") end - if not a or a.tag ~= "Keyword" then err () end - if #words == 0 then return a[1] end - for _, w in ipairs (words) do - if w == a[1] then return w end - end - err () -end - ----------------------------------------------------------------------- --- ----------------------------------------------------------------------- -function lexer :clone() - local alpha_clone, sym_clone = { }, { } - for word in pairs(self.alpha) do alpha_clone[word]=true end - for letter, list in pairs(self.sym) do sym_clone[letter] = { unpack(list) } end - local clone = { alpha=alpha_clone, sym=sym_clone } - setmetatable(clone, self) - clone.__index = clone - return clone -end - ----------------------------------------------------------------------- --- Cancel everything left in a lexer, all subsequent attempts at --- `:peek()` or `:next()` will return `Eof`. ----------------------------------------------------------------------- -function lexer :kill() - self.i = #self.src+1 - self.peeked = { } - self.attached_comments = { } - self.lineinfo_last = self.posfact :get_position (#self.src+1) -end - -return M diff --git a/Utils/luarocks/share/lua/5.1/metalua/loader.lua b/Utils/luarocks/share/lua/5.1/metalua/loader.lua deleted file mode 100644 index e535fef32..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/loader.lua +++ /dev/null @@ -1,133 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- --------------------------------------------------------------------------------- - -local M = require "package" -- extend Lua's basic "package" module -local checks = require 'checks' - -M.metalua_extension_prefix = 'metalua.extension.' - --- Initialize package.mpath from package.path -M.mpath = M.mpath or os.getenv 'LUA_MPATH' or - (M.path..";") :gsub("%.(lua[:;])", ".m%1") :sub(1, -2) - -M.mcache = M.mcache or os.getenv 'LUA_MCACHE' - ----------------------------------------------------------------------- --- resc(k) returns "%"..k if it's a special regular expression char, --- or just k if it's normal. ----------------------------------------------------------------------- -local regexp_magic = { } -for k in ("^$()%.[]*+-?") :gmatch "." do regexp_magic[k]="%"..k end - -local function resc(k) return regexp_magic[k] or k end - ----------------------------------------------------------------------- --- Take a Lua module name, return the open file and its name, --- or and an error message. ----------------------------------------------------------------------- -function M.findfile(name, path_string) - local config_regexp = ("([^\n])\n"):rep(5):sub(1, -2) - local dir_sep, path_sep, path_mark, execdir, igmark = - M.config :match (config_regexp) - name = name:gsub ('%.', dir_sep) - local errors = { } - local path_pattern = string.format('[^%s]+', resc(path_sep)) - for path in path_string:gmatch (path_pattern) do - --printf('path = %s, rpath_mark=%s, name=%s', path, resc(path_mark), name) - local filename = path:gsub (resc (path_mark), name) - --printf('filename = %s', filename) - local file = io.open (filename, 'rb') - if file then return file, filename end - table.insert(errors, string.format("\tno file %q", filename)) - end - return false, '\n'..table.concat(errors, "\n")..'\n' -end - ----------------------------------------------------------------------- --- Before compiling a metalua source module, try to find and load --- a more recent bytecode dump. Requires lfs ----------------------------------------------------------------------- -local function metalua_cache_loader(name, src_filename, src) - if not M.mcache:find('%?') then - -- This is highly suspicious... - print("WARNING: no '?' character in $LUA_MCACHE/package.mcache") - end - local mlc = require 'metalua.compiler'.new() - local lfs = require 'lfs' - local dir_sep = M.config:sub(1,1) - local dst_filename = M.mcache :gsub ('%?', (name:gsub('%.', dir_sep))) - local src_a = lfs.attributes(src_filename) - local src_date = src_a and src_a.modification or 0 - local dst_a = lfs.attributes(dst_filename) - local dst_date = dst_a and dst_a.modification or 0 - local delta = dst_date - src_date - local bytecode, file, msg - if delta <= 0 then - --print ("(need to recompile "..src_filename.." into "..dst_filename..")") - bytecode = mlc :src_to_bytecode (src, '@'..src_filename) - for x in dst_filename :gmatch('()'..dir_sep) do - lfs.mkdir(dst_filename:sub(1,x)) - end - file, msg = io.open(dst_filename, 'wb') - if not file then error(msg) end - file :write (bytecode) - file :close() - else - file, msg = io.open(dst_filename, 'rb') - if not file then error(msg) end - bytecode = file :read '*a' - file :close() - end - return mlc :bytecode_to_function (bytecode, '@'..src_filename) -end - ----------------------------------------------------------------------- --- Load a metalua source file. ----------------------------------------------------------------------- -function M.metalua_loader (name) - local file, filename_or_msg = M.findfile (name, M.mpath) - if not file then return filename_or_msg end - local luastring = file:read '*a' - file:close() - if M.mcache and pcall(require, 'lfs') then - return metalua_cache_loader(name, filename_or_msg, luastring) - else return require 'metalua.compiler'.new() :src_to_function (luastring, '@'..filename_or_msg) end -end - - ----------------------------------------------------------------------- --- Placed after lua/luac loader, so precompiled files have --- higher precedence. ----------------------------------------------------------------------- -table.insert(M.loaders, M.metalua_loader) - ----------------------------------------------------------------------- --- Load an extension. ----------------------------------------------------------------------- -function extension (name, mlp) - local complete_name = M.metalua_extension_prefix..name - local extend_func = require (complete_name) - if not mlp.extensions[complete_name] then - local ast =extend_func(mlp) - mlp.extensions[complete_name] =extend_func - return ast - end -end - -return M diff --git a/Utils/luarocks/share/lua/5.1/metalua/pprint.lua b/Utils/luarocks/share/lua/5.1/metalua/pprint.lua deleted file mode 100644 index 73a842b63..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/pprint.lua +++ /dev/null @@ -1,295 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- ----------------------------------------------------------------------- - ----------------------------------------------------------------------- ----------------------------------------------------------------------- --- --- Lua objects pretty-printer --- ----------------------------------------------------------------------- ----------------------------------------------------------------------- - -local M = { } - -M.DEFAULT_CFG = { - hide_hash = false; -- Print the non-array part of tables? - metalua_tag = true; -- Use Metalua's backtick syntax sugar? - fix_indent = nil; -- If a number, number of indentation spaces; - -- If false, indent to the previous brace. - line_max = nil; -- If a number, tries to avoid making lines with - -- more than this number of chars. - initial_indent = 0; -- If a number, starts at this level of indentation - keywords = { }; -- Set of keywords which must not use Lua's field - -- shortcuts {["foo"]=...} -> {foo=...} -} - -local function valid_id(cfg, x) - if type(x) ~= "string" then return false end - if not x:match "^[a-zA-Z_][a-zA-Z0-9_]*$" then return false end - if cfg.keywords and cfg.keywords[x] then return false end - return true -end - -local __tostring_cache = setmetatable({ }, {__mode='k'}) - --- Retrieve the string produced by `__tostring` metamethod if present, --- return `false` otherwise. Cached in `__tostring_cache`. -local function __tostring(x) - local the_string = __tostring_cache[x] - if the_string~=nil then return the_string end - local mt = getmetatable(x) - if mt then - local __tostring = mt.__tostring - if __tostring then - the_string = __tostring(x) - __tostring_cache[x] = the_string - return the_string - end - end - if x~=nil then __tostring_cache[x] = false end -- nil is an illegal key - return false -end - -local xlen -- mutually recursive with `xlen_type` - -local xlen_cache = setmetatable({ }, {__mode='k'}) - --- Helpers for the `xlen` function -local xlen_type = { - ["nil"] = function ( ) return 3 end; - number = function (x) return #tostring(x) end; - boolean = function (x) return x and 4 or 5 end; - string = function (x) return #string.format("%q",x) end; -} - -function xlen_type.table (adt, cfg, nested) - local custom_string = __tostring(adt) - if custom_string then return #custom_string end - - -- Circular referenced objects are printed with the plain - -- `tostring` function in nested positions. - if nested [adt] then return #tostring(adt) end - nested [adt] = true - - local has_tag = cfg.metalua_tag and valid_id(cfg, adt.tag) - local alen = #adt - local has_arr = alen>0 - local has_hash = false - local x = 0 - - if not cfg.hide_hash then - -- first pass: count hash-part - for k, v in pairs(adt) do - if k=="tag" and has_tag then - -- this is the tag -> do nothing! - elseif type(k)=="number" and k<=alen and math.fmod(k,1)==0 and k>0 then - -- array-part pair -> do nothing! - else - has_hash = true - if valid_id(cfg, k) then x=x+#k - else x = x + xlen (k, cfg, nested) + 2 end -- count surrounding brackets - x = x + xlen (v, cfg, nested) + 5 -- count " = " and ", " - end - end - end - - for i = 1, alen do x = x + xlen (adt[i], nested) + 2 end -- count ", " - - nested[adt] = false -- No more nested calls - - if not (has_tag or has_arr or has_hash) then return 3 end - if has_tag then x=x+#adt.tag+1 end - if not (has_arr or has_hash) then return x end - if not has_hash and alen==1 and type(adt[1])~="table" then - return x-2 -- substract extraneous ", " - end - return x+2 -- count "{ " and " }", substract extraneous ", " -end - - --- Compute the number of chars it would require to display the table --- on a single line. Helps to decide whether some carriage returns are --- required. Since the size of each sub-table is required many times, --- it's cached in [xlen_cache]. -xlen = function (x, cfg, nested) - -- no need to compute length for 1-line prints - if not cfg.line_max then return 0 end - nested = nested or { } - if x==nil then return #"nil" end - local len = xlen_cache[x] - if len then return len end - local f = xlen_type[type(x)] - if not f then return #tostring(x) end - len = f (x, cfg, nested) - xlen_cache[x] = len - return len -end - -local function consider_newline(p, len) - if not p.cfg.line_max then return end - if p.current_offset + len <= p.cfg.line_max then return end - if p.indent < p.current_offset then - p:acc "\n"; p:acc ((" "):rep(p.indent)) - p.current_offset = p.indent - end -end - -local acc_value - -local acc_type = { - ["nil"] = function(p) p:acc("nil") end; - number = function(p, adt) p:acc (tostring (adt)) end; - string = function(p, adt) p:acc ((string.format ("%q", adt):gsub("\\\n", "\\n"))) end; - boolean = function(p, adt) p:acc (adt and "true" or "false") end } - --- Indentation: --- * if `cfg.fix_indent` is set to a number: --- * add this number of space for each level of depth --- * return to the line as soon as it flushes things further left --- * if not, tabulate to one space after the opening brace. --- * as a result, it never saves right-space to return before first element - -function acc_type.table(p, adt) - if p.nested[adt] then p:acc(tostring(adt)); return end - p.nested[adt] = true - - local has_tag = p.cfg.metalua_tag and valid_id(p.cfg, adt.tag) - local alen = #adt - local has_arr = alen>0 - local has_hash = false - - local previous_indent = p.indent - - if has_tag then p:acc("`"); p:acc(adt.tag) end - - local function indent(p) - if not p.cfg.fix_indent then p.indent = p.current_offset - else p.indent = p.indent + p.cfg.fix_indent end - end - - -- First pass: handle hash-part - if not p.cfg.hide_hash then - for k, v in pairs(adt) do - - if has_tag and k=='tag' then -- pass the 'tag' field - elseif type(k)=="number" and k<=alen and k>0 and math.fmod(k,1)==0 then - -- pass array-part keys (consecutive ints less than `#adt`) - else -- hash-part keys - if has_hash then p:acc ", " else -- 1st hash-part pair ever found - p:acc "{ "; indent(p) - end - - -- Determine whether a newline is required - local is_id, expected_len=valid_id(p.cfg, k) - if is_id then expected_len=#k+xlen(v, p.cfg, p.nested)+#" = , " - else expected_len = xlen(k, p.cfg, p.nested)+xlen(v, p.cfg, p.nested)+#"[] = , " end - consider_newline(p, expected_len) - - -- Print the key - if is_id then p:acc(k); p:acc " = " else - p:acc "["; acc_value (p, k); p:acc "] = " - end - - acc_value (p, v) -- Print the value - has_hash = true - end - end - end - - -- Now we know whether there's a hash-part, an array-part, and a tag. - -- Tag and hash-part are already printed if they're present. - if not has_tag and not has_hash and not has_arr then p:acc "{ }"; - elseif has_tag and not has_hash and not has_arr then -- nothing, tag already in acc - else - assert (has_hash or has_arr) -- special case { } already handled - local no_brace = false - if has_hash and has_arr then p:acc ", " - elseif has_tag and not has_hash and alen==1 and type(adt[1])~="table" then - -- No brace required; don't print "{", remember not to print "}" - p:acc (" "); acc_value (p, adt[1]) -- indent= indent+(cfg.fix_indent or 0)) - no_brace = true - elseif not has_hash then - -- Braces required, but not opened by hash-part handler yet - p:acc "{ "; indent(p) - end - - -- 2nd pass: array-part - if not no_brace and has_arr then - local expected_len = xlen(adt[1], p.cfg, p.nested) - consider_newline(p, expected_len) - acc_value(p, adt[1]) -- indent+(cfg.fix_indent or 0) - for i=2, alen do - p:acc ", "; - consider_newline(p, xlen(adt[i], p.cfg, p.nested)) - acc_value (p, adt[i]) --indent+(cfg.fix_indent or 0) - end - end - if not no_brace then p:acc " }" end - end - p.nested[adt] = false -- No more nested calls - p.indent = previous_indent -end - - -function acc_value(p, v) - local custom_string = __tostring(v) - if custom_string then p:acc(custom_string) else - local f = acc_type[type(v)] - if f then f(p, v) else p:acc(tostring(v)) end - end -end - - --- FIXME: new_indent seems to be always nil?!s detection --- FIXME: accumulator function should be configurable, --- so that print() doesn't need to bufferize the whole string --- before starting to print. -function M.tostring(t, cfg) - - cfg = cfg or M.DEFAULT_CFG or { } - - local p = { - cfg = cfg; - indent = 0; - current_offset = cfg.initial_indent or 0; - buffer = { }; - nested = { }; - acc = function(self, str) - table.insert(self.buffer, str) - self.current_offset = self.current_offset + #str - end; - } - acc_value(p, t) - return table.concat(p.buffer) -end - -function M.print(...) return print(M.tostring(...)) end -function M.sprintf(fmt, ...) - local args={...} - for i, v in pairs(args) do - local t=type(v) - if t=='table' then args[i]=M.tostring(v) - elseif t=='nil' then args[i]='nil' end - end - return string.format(fmt, unpack(args)) -end - -function M.printf(...) print(M.sprintf(...)) end - -return M \ No newline at end of file diff --git a/Utils/luarocks/share/lua/5.1/metalua/repl.mlua b/Utils/luarocks/share/lua/5.1/metalua/repl.mlua deleted file mode 100644 index 0c89bc0b4..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/repl.mlua +++ /dev/null @@ -1,108 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- -------------------------------------------------------------------------------- - --- Keep these global: -PRINT_AST = true -LINE_WIDTH = 60 -PROMPT = "M> " -PROMPT2 = ">> " - -local pp=require 'metalua.pprint' -local M = { } - -mlc = require 'metalua.compiler'.new() - -local readline - -do -- set readline() to a line reader, either editline otr a default - local status, editline = pcall(require, 'editline') - if status then - local rl_handle = editline.init 'metalua' - readline = |p| rl_handle:read(p) - else - local status, rl = pcall(require, 'readline') - if status then - rl.set_options{histfile='~/.metalua_history', keeplines=100, completion=false } - readline = rl.readline - else -- neither editline nor readline available - function readline (p) - io.write (p) - io.flush () - return io.read '*l' - end - end - end -end - -local function reached_eof(lx, msg) - return lx:peek().tag=='Eof' or msg:find "token `Eof" -end - - -function M.run() - pp.printf ("Metalua, interactive REPLoop.\n".. - "(c) 2006-2013 ") - local lines = { } - while true do - local src, lx, ast, f, results, success - repeat - local line = readline(next(lines) and PROMPT2 or PROMPT) - if not line then print(); os.exit(0) end -- line==nil iff eof on stdin - if not next(lines) then - line = line:gsub('^%s*=', 'return ') - end - table.insert(lines, line) - src = table.concat (lines, "\n") - until #line>0 - lx = mlc :src_to_lexstream(src) - success, ast = pcall(mlc.lexstream_to_ast, mlc, lx) - if success then - success, f = pcall(mlc.ast_to_function, mlc, ast, '=stdin') - if success then - results = { xpcall(f, debug.traceback) } - success = table.remove (results, 1) - if success then - -- Success! - for _, x in ipairs(results) do - pp.print(x, {line_max=LINE_WIDTH, metalua_tag=true}) - end - lines = { } - else - print "Evaluation error:" - print (results[1]) - lines = { } - end - else - print "Can't compile into bytecode:" - print (f) - lines = { } - end - else - -- If lx has been read entirely, try to read - -- another line before failing. - if not reached_eof(lx, ast) then - print "Can't compile source into AST:" - print (ast) - lines = { } - end - end - end -end - -return M \ No newline at end of file diff --git a/Utils/luarocks/share/lua/5.1/metalua/treequery.mlua b/Utils/luarocks/share/lua/5.1/metalua/treequery.mlua deleted file mode 100644 index e369b9954..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/treequery.mlua +++ /dev/null @@ -1,488 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- -------------------------------------------------------------------------------- - -local walk = require 'metalua.treequery.walk' - -local M = { } --- support for old-style modules -treequery = M - --- ----------------------------------------------------------------------------- --- ----------------------------------------------------------------------------- --- --- multimap helper mmap: associate a key to a set of values --- --- ----------------------------------------------------------------------------- --- ----------------------------------------------------------------------------- - -local function mmap_add (mmap, node, x) - if node==nil then return false end - local set = mmap[node] - if set then set[x] = true - else mmap[node] = {[x]=true} end -end - --- currently unused, I throw the whole set away -local function mmap_remove (mmap, node, x) - local set = mmap[node] - if not set then return false - elseif not set[x] then return false - elseif next(set) then set[x]=nil - else mmap[node] = nil end - return true -end - --- ----------------------------------------------------------------------------- --- ----------------------------------------------------------------------------- --- --- TreeQuery object. --- --- ----------------------------------------------------------------------------- --- ----------------------------------------------------------------------------- - -local ACTIVE_SCOPE = setmetatable({ }, {__mode="k"}) - --- treequery metatable -local Q = { }; Q.__index = Q - ---- treequery constructor --- the resultingg object will allow to filter ans operate on the AST --- @param root the AST to visit --- @return a treequery visitor instance -function M.treequery(root) - return setmetatable({ - root = root, - unsatisfied = 0, - predicates = { }, - until_up = { }, - from_up = { }, - up_f = false, - down_f = false, - filters = { }, - }, Q) -end - --- helper to share the implementations of positional filters -local function add_pos_filter(self, position, inverted, inclusive, f, ...) - if type(f)=='string' then f = M.has_tag(f, ...) end - if not inverted then self.unsatisfied += 1 end - local x = { - pred = f, - position = position, - satisfied = false, - inverted = inverted or false, - inclusive = inclusive or false } - table.insert(self.predicates, x) - return self -end - -function Q :if_unknown(f) - self.unknown_handler = f or (||nil) - return self -end - --- TODO: offer an API for inclusive pos_filters - ---- select nodes which are after one which satisfies predicate f -Q.after = |self, f, ...| add_pos_filter(self, 'after', false, false, f, ...) ---- select nodes which are not after one which satisfies predicate f -Q.not_after = |self, f, ...| add_pos_filter(self, 'after', true, false, f, ...) ---- select nodes which are under one which satisfies predicate f -Q.under = |self, f, ...| add_pos_filter(self, 'under', false, false, f, ...) ---- select nodes which are not under one which satisfies predicate f -Q.not_under = |self, f, ...| add_pos_filter(self, 'under', true, false, f, ...) - ---- select nodes which satisfy predicate f -function Q :filter(f, ...) - if type(f)=='string' then f = M.has_tag(f, ...) end - table.insert(self.filters, f); - return self -end - ---- select nodes which satisfy predicate f -function Q :filter_not(f, ...) - if type(f)=='string' then f = M.has_tag(f, ...) end - table.insert(self.filters, |...| not f(...)) - return self -end - --- private helper: apply filters and execute up/down callbacks when applicable -function Q :execute() - local cfg = { } - -- TODO: optimize away not_under & not_after by pruning the tree - function cfg.down(...) - --printf ("[down]\t%s\t%s", self.unsatisfied, table.tostring((...))) - ACTIVE_SCOPE[...] = cfg.scope - local satisfied = self.unsatisfied==0 - for _, x in ipairs(self.predicates) do - if not x.satisfied and x.pred(...) then - x.satisfied = true - local node, parent = ... - local inc = x.inverted and 1 or -1 - if x.position=='under' then - -- satisfied from after we get down this node... - self.unsatisfied += inc - -- ...until before we get up this node - mmap_add(self.until_up, node, x) - elseif x.position=='after' then - -- satisfied from after we get up this node... - mmap_add(self.from_up, node, x) - -- ...until before we get up this node's parent - mmap_add(self.until_up, parent, x) - elseif x.position=='under_or_after' then - -- satisfied from after we get down this node... - self.satisfied += inc - -- ...until before we get up this node's parent... - mmap_add(self.until_up, parent, x) - else - error "position not understood" - end -- position - if x.inclusive then satisfied = self.unsatisfied==0 end - end -- predicate passed - end -- for predicates - - if satisfied then - for _, f in ipairs(self.filters) do - if not f(...) then satisfied=false; break end - end - if satisfied and self.down_f then self.down_f(...) end - end - end - - function cfg.up(...) - --printf ("[up]\t%s", table.tostring((...))) - - -- Remove predicates which are due before we go up this node - local preds = self.until_up[...] - if preds then - for x, _ in pairs(preds) do - local inc = x.inverted and -1 or 1 - self.unsatisfied += inc - x.satisfied = false - end - self.until_up[...] = nil - end - - -- Execute the up callback - -- TODO: cache the filter passing result from the down callback - -- TODO: skip if there's no callback - local satisfied = self.unsatisfied==0 - if satisfied then - for _, f in ipairs(self.filters) do - if not f(self, ...) then satisfied=false; break end - end - if satisfied and self.up_f then self.up_f(...) end - end - - -- Set predicate which are due after we go up this node - local preds = self.from_up[...] - if preds then - for p, _ in pairs(preds) do - local inc = p.inverted and 1 or -1 - self.unsatisfied += inc - end - self.from_up[...] = nil - end - ACTIVE_SCOPE[...] = nil - end - - function cfg.binder(id_node, ...) - --printf(" >>> Binder called on %s, %s", table.tostring(id_node), - -- table.tostring{...}:sub(2,-2)) - cfg.down(id_node, ...) - cfg.up(id_node, ...) - --printf("down/up on binder done") - end - - cfg.unknown = self.unknown_handler - - --function cfg.occurrence (binder, occ) - -- if binder then OCC2BIND[occ] = binder[1] end - --printf(" >>> %s is an occurrence of %s", occ[1], table.tostring(binder and binder[2])) - --end - - --function cfg.binder(...) cfg.down(...); cfg.up(...) end - return walk.guess(cfg, self.root) -end - ---- Execute a function on each selected node --- @down: function executed when we go down a node, i.e. before its children --- have been examined. --- @up: function executed when we go up a node, i.e. after its children --- have been examined. -function Q :foreach(down, up) - if not up and not down then - error "iterator missing" - end - self.up_f = up - self.down_f = down - return self :execute() -end - ---- Return the list of nodes selected by a given treequery. -function Q :list() - local acc = { } - self :foreach(|x| table.insert(acc, x)) - return acc -end - ---- Return the first matching element --- TODO: dirty hack, to implement properly with a 'break' return. --- Also, it won't behave correctly if a predicate causes an error, --- or if coroutines are involved. -function Q :first() - local result = { } - local function f(...) result = {...}; error() end - pcall(|| self :foreach(f)) - return unpack(result) -end - ---- Pretty printer for queries -function Q :__tostring() return "" end - --- ----------------------------------------------------------------------------- --- ----------------------------------------------------------------------------- --- --- Predicates. --- --- ----------------------------------------------------------------------------- --- ----------------------------------------------------------------------------- - ---- Return a predicate which is true if the tested node's tag is among the --- one listed as arguments --- @param ... a sequence of tag names -function M.has_tag(...) - local args = {...} - if #args==1 then - local tag = ... - return (|node| node.tag==tag) - --return function(self, node) printf("node %s has_tag %s?", table.tostring(node), tag); return node.tag==tag end - else - local tags = { } - for _, tag in ipairs(args) do tags[tag]=true end - return function(node) - local node_tag = node.tag - return node_tag and tags[node_tag] - end - end -end - ---- Predicate to test whether a node represents an expression. -M.is_expr = M.has_tag('Nil', 'Dots', 'True', 'False', 'Number','String', - 'Function', 'Table', 'Op', 'Paren', 'Call', 'Invoke', - 'Id', 'Index') - --- helper for is_stat -local STAT_TAGS = { Do=1, Set=1, While=1, Repeat=1, If=1, Fornum=1, - Forin=1, Local=1, Localrec=1, Return=1, Break=1 } - ---- Predicate to test whether a node represents a statement. --- It is context-aware, i.e. it recognizes `Call and `Invoke nodes --- used in a statement context as such. -function M.is_stat(node, parent) - local tag = node.tag - if not tag then return false - elseif STAT_TAGS[tag] then return true - elseif tag=='Call' or tag=='Invoke' then return parent and parent.tag==nil - else return false end -end - ---- Predicate to test whether a node represents a statements block. -function M.is_block(node) return node.tag==nil end - --- ----------------------------------------------------------------------------- --- ----------------------------------------------------------------------------- --- --- Variables and scopes. --- --- ----------------------------------------------------------------------------- --- ----------------------------------------------------------------------------- - -local BINDER_PARENT_TAG = { - Local=true, Localrec=true, Forin=true, Function=true } - ---- Test whether a node is a binder. This is local predicate, although it --- might need to inspect the parent node. -function M.is_binder(node, parent) - --printf('is_binder(%s, %s)', table.tostring(node), table.tostring(parent)) - if node.tag ~= 'Id' or not parent then return false end - if parent.tag=='Fornum' then return parent[1]==node end - if not BINDER_PARENT_TAG[parent.tag] then return false end - for _, binder in ipairs(parent[1]) do - if binder==node then return true end - end - return false -end - ---- Retrieve the binder associated to an occurrence within root. --- @param occurrence an Id node representing an occurrence in `root`. --- @param root the tree in which `node` and its binder occur. --- @return the binder node, and its ancestors up to root if found. --- @return nil if node is global (or not an occurrence) in `root`. -function M.binder(occurrence, root) - local cfg, id_name, result = { }, occurrence[1], { } - function cfg.occurrence(id) - if id == occurrence then result = cfg.scope :get(id_name) end - -- TODO: break the walker - end - walk.guess(cfg, root) - return unpack(result) -end - ---- Predicate to filter occurrences of a given binder. --- Warning: it relies on internal scope book-keeping, --- and for this reason, it only works as query method argument. --- It won't work outside of a query. --- @param binder the binder whose occurrences must be kept by predicate --- @return a predicate - --- function M.is_occurrence_of(binder) --- return function(node, ...) --- if node.tag ~= 'Id' then return nil end --- if M.is_binder(node, ...) then return nil end --- local scope = ACTIVE_SCOPE[node] --- if not scope then return nil end --- local result = scope :get (node[1]) or { } --- if result[1] ~= binder then return nil end --- return unpack(result) --- end --- end - -function M.is_occurrence_of(binder) - return function(node, ...) - local b = M.get_binder(node) - return b and b==binder - end -end - -function M.get_binder(occurrence, ...) - if occurrence.tag ~= 'Id' then return nil end - if M.is_binder(occurrence, ...) then return nil end - local scope = ACTIVE_SCOPE[occurrence] - local binder_hierarchy = scope :get(occurrence[1]) - return unpack (binder_hierarchy or { }) -end - ---- Transform a predicate on a node into a predicate on this node's --- parent. For instance if p tests whether a node has property P, --- then parent(p) tests whether this node's parent has property P. --- The ancestor level is precised with n, with 1 being the node itself, --- 2 its parent, 3 its grand-parent etc. --- @param[optional] n the parent to examine, default=2 --- @param pred the predicate to transform --- @return a predicate -function M.parent(n, pred, ...) - if type(n)~='number' then n, pred = 2, n end - if type(pred)=='string' then pred = M.has_tag(pred, ...) end - return function(self, ...) - return select(n, ...) and pred(self, select(n, ...)) - end -end - ---- Transform a predicate on a node into a predicate on this node's --- n-th child. --- @param n the child's index number --- @param pred the predicate to transform --- @return a predicate -function M.child(n, pred) - return function(node, ...) - local child = node[n] - return child and pred(child, node, ...) - end -end - ---- Predicate to test the position of a node in its parent. --- The predicate succeeds if the node is the n-th child of its parent, --- and a <= n <= b. --- nth(a) is equivalent to nth(a, a). --- Negative indices are admitted, and count from the last child, --- as done for instance by string.sub(). --- --- TODO: This is wrong, this tests the table relationship rather than the --- AST node relationship. --- Must build a getindex helper, based on pattern matching, then build --- the predicate around it. --- --- @param a lower bound --- @param a upper bound --- @return a predicate -function M.is_nth(a, b) - b = b or a - return function(self, node, parent) - if not parent then return false end - local nchildren = #parent - local a = a<=0 and nchildren+a+1 or a - if a>nchildren then return false end - local b = b<=0 and nchildren+b+1 or b>nchildren and nchildren or b - for i=a,b do if parent[i]==node then return true end end - return false - end -end - ---- Returns a list of the direct children of AST node `ast`. --- Children are only expressions, statements and blocks, --- not intermediates such as `Pair` nodes or internal lists --- in `Local` or `Set` nodes. --- Children are returned in parsing order, which isn't necessarily --- the same as source code order. For instance, the right-hand-side --- of a `Local` node is listed before the left-hand-side, because --- semantically the right is evaluated before the variables on the --- left enter scope. --- --- @param ast the node whose children are needed --- @return a list of the direct children of `ast` -function M.children(ast) - local acc = { } - local cfg = { } - function cfg.down(x) - if x~=ast then table.insert(acc, x); return 'break' end - end - walk.guess(cfg, ast) - return acc -end - --- ----------------------------------------------------------------------------- --- ----------------------------------------------------------------------------- --- --- Comments parsing. --- --- ----------------------------------------------------------------------------- --- ----------------------------------------------------------------------------- - -local comment_extractor = |which_side| function (node) - local x = node.lineinfo - x = x and x[which_side] - x = x and x.comments - if not x then return nil end - local lines = { } - for _, record in ipairs(x) do - table.insert(lines, record[1]) - end - return table.concat(lines, '\n') -end - -M.comment_prefix = comment_extractor 'first' -M.comment_suffix = comment_extractor 'last' - - ---- Shortcut for the query constructor -function M :__call(...) return self.treequery(...) end -setmetatable(M, M) - -return M diff --git a/Utils/luarocks/share/lua/5.1/metalua/treequery/walk.mlua b/Utils/luarocks/share/lua/5.1/metalua/treequery/walk.mlua deleted file mode 100644 index 94fc5d65d..000000000 --- a/Utils/luarocks/share/lua/5.1/metalua/treequery/walk.mlua +++ /dev/null @@ -1,266 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- -------------------------------------------------------------------------------- - --- Low level AST traversal library. --- --- This library is a helper for the higher-level `treequery` library. --- It walks through every node of an AST, depth-first, and executes --- some callbacks contained in its `cfg` config table: --- --- * `cfg.down(...)` is called when it walks down a node, and receive as --- parameters the node just entered, followed by its parent, grand-parent --- etc. until the root node. --- --- * `cfg.up(...)` is called when it walks back up a node, and receive as --- parameters the node just entered, followed by its parent, grand-parent --- etc. until the root node. --- --- * `cfg.occurrence(binder, id_node, ...)` is called when it visits --- an `` `Id{ }`` node which isn't a local variable creator. binder --- is a reference to its binder with its context. The binder is the --- `` `Id{ }`` node which created this local variable. By "binder --- and its context", we mean a list starting with the `` `Id{ }``, --- and followed by every ancestor of the binder node, up until the --- common root node. `binder` is nil if the variable is global. --- `id_node` is followed by its ancestor, up until the root node. --- --- `cfg.scope` is maintained during the traversal, associating a --- variable name to the binder which creates it in the context of the --- node currently visited. --- --- `walk.traverse.xxx` functions are in charge of the recursive --- descent into children nodes. They're private helpers. They are also --- in charge of calling appropriate `cfg.xxx` callbacks. - --{ extension ("match", ...) } - -local pp = require 'metalua.pprint' - -local M = { traverse = { }; tags = { }; debug = false } - -local function table_transpose(t) - local tt = { }; for a, b in pairs(t) do tt[b]=a end; return tt -end - --------------------------------------------------------------------------------- --- Standard tags: can be used to guess the type of an AST, or to check --- that the type of an AST is respected. --------------------------------------------------------------------------------- -M.tags.stat = table_transpose{ - 'Do', 'Set', 'While', 'Repeat', 'Local', 'Localrec', 'Return', - 'Fornum', 'Forin', 'If', 'Break', 'Goto', 'Label', - 'Call', 'Invoke' } -M.tags.expr = table_transpose{ - 'Paren', 'Call', 'Invoke', 'Index', 'Op', 'Function', 'Stat', - 'Table', 'Nil', 'Dots', 'True', 'False', 'Number', 'String', 'Id' } - --------------------------------------------------------------------------------- --- These [M.traverse.xxx()] functions are in charge of actually going through --- ASTs. At each node, they make sure to call the appropriate walker. --------------------------------------------------------------------------------- - -function M.traverse.stat (cfg, x, ...) - if M.debug then pp.printf("traverse stat %s", x) end - local ancestors = {...} - local B = |y| M.block (cfg, y, x, unpack(ancestors)) -- Block - local S = |y| M.stat (cfg, y, x, unpack(ancestors)) -- Statement - local E = |y| M.expr (cfg, y, x, unpack(ancestors)) -- Expression - local EL = |y| M.expr_list (cfg, y, x, unpack(ancestors)) -- Expression List - local IL = |y| M.binder_list (cfg, y, x, unpack(ancestors)) -- Id binders List - local OS = || cfg.scope :save() -- Open scope - local CS = || cfg.scope :restore() -- Close scope - - match x with - | {...} if x.tag == nil -> for _, y in ipairs(x) do M.stat(cfg, y, ...) end - -- no tag --> node not inserted in the history ancestors - | `Do{...} -> OS(x); for _, y in ipairs(x) do S(y) end; CS(x) - | `Set{ lhs, rhs } -> EL(lhs); EL(rhs) - | `While{ cond, body } -> E(cond); OS(); B(body); CS() - | `Repeat{ body, cond } -> OS(body); B(body); E(cond); CS(body) - | `Local{ lhs } -> IL(lhs) - | `Local{ lhs, rhs } -> EL(rhs); IL(lhs) - | `Localrec{ lhs, rhs } -> IL(lhs); EL(rhs) - | `Fornum{ i, a, b, body } -> E(a); E(b); OS(); IL{i}; B(body); CS() - | `Fornum{ i, a, b, c, body } -> E(a); E(b); E(c); OS(); IL{i}; B(body); CS() - | `Forin{ i, rhs, body } -> EL(rhs); OS(); IL(i); B(body); CS() - | `If{...} -> - for i=1, #x-1, 2 do - E(x[i]); OS(); B(x[i+1]); CS() - end - if #x%2 == 1 then - OS(); B(x[#x]); CS() - end - | `Call{...}|`Invoke{...}|`Return{...} -> EL(x) - | `Break | `Goto{ _ } | `Label{ _ } -> -- nothing - | { tag=tag, ...} if M.tags.stat[tag]-> - M.malformed (cfg, x, unpack (ancestors)) - | _ -> - M.unknown (cfg, x, unpack (ancestors)) - end -end - -function M.traverse.expr (cfg, x, ...) - if M.debug then pp.printf("traverse expr %s", x) end - local ancestors = {...} - local B = |y| M.block (cfg, y, x, unpack(ancestors)) -- Block - local S = |y| M.stat (cfg, y, x, unpack(ancestors)) -- Statement - local E = |y| M.expr (cfg, y, x, unpack(ancestors)) -- Expression - local EL = |y| M.expr_list (cfg, y, x, unpack(ancestors)) -- Expression List - local IL = |y| M.binder_list (cfg, y, x, unpack(ancestors)) -- Id binders list - local OS = || cfg.scope :save() -- Open scope - local CS = || cfg.scope :restore() -- Close scope - - match x with - | `Paren{ e } -> E(e) - | `Call{...} | `Invoke{...} -> EL(x) - | `Index{ a, b } -> E(a); E(b) - | `Op{ opid, ... } -> E(x[2]); if #x==3 then E(x[3]) end - | `Function{ params, body } -> OS(body); IL(params); B(body); CS(body) - | `Stat{ b, e } -> OS(b); B(b); E(e); CS(b) - | `Id{ name } -> M.occurrence(cfg, x, unpack(ancestors)) - | `Table{ ... } -> - for i = 1, #x do match x[i] with - | `Pair{ k, v } -> E(k); E(v) - | v -> E(v) - end end - | `Nil|`Dots|`True|`False|`Number{_}|`String{_} -> -- terminal node - | { tag=tag, ...} if M.tags.expr[tag]-> M.malformed (cfg, x, unpack (ancestors)) - | _ -> M.unknown (cfg, x, unpack (ancestors)) - end -end - -function M.traverse.block (cfg, x, ...) - assert(type(x)=='table', "traverse.block() expects a table") - if x.tag then M.malformed(cfg, x, ...) - else for _, y in ipairs(x) do M.stat(cfg, y, x, ...) end - end -end - -function M.traverse.expr_list (cfg, x, ...) - assert(type(x)=='table', "traverse.expr_list() expects a table") - -- x doesn't appear in the ancestors - for _, y in ipairs(x) do M.expr(cfg, y, ...) end -end - -function M.malformed(cfg, x, ...) - local f = cfg.malformed or cfg.error - if f then f(x, ...) else - error ("Malformed node of tag "..(x.tag or '(nil)')) - end -end - -function M.unknown(cfg, x, ...) - local f = cfg.unknown or cfg.error - if f then f(x, ...) else - error ("Unknown node tag "..(x.tag or '(nil)')) - end -end - -function M.occurrence(cfg, x, ...) - if cfg.occurrence then cfg.occurrence(cfg.scope :get(x[1]), x, ...) end -end - --- TODO: Is it useful to call each error handling function? -function M.binder_list (cfg, id_list, ...) - local f = cfg.binder - local ferror = cfg.error or cfg.malformed or cfg.unknown - for i, id_node in ipairs(id_list) do - local down, up = cfg.down, cfg.up - if id_node.tag == 'Id' then - cfg.scope :set (id_node[1], { id_node, ... }) - if down then down(id_node, ...) end - if f then f(id_node, ...) end - if up then up(id_node, ...) end - elseif i==#id_list and id_node.tag=='Dots' then - if down then down(id_node, ...) end - if up then up(id_node, ...) end - -- Do nothing, those are valid `Dots - elseif ferror then - -- Traverse error handling function - ferror(id_node, ...) - else - error("Invalid binders list") - end - end -end - ----------------------------------------------------------------------- --- Generic walker generator. --- * if `cfg' has an entry matching the tree name, use this entry --- * if not, try to use the entry whose name matched the ast kind --- * if an entry is a table, look for 'up' and 'down' entries --- * if it is a function, consider it as a `down' traverser. ----------------------------------------------------------------------- -local walker_builder = function(traverse) - assert(traverse) - return function (cfg, ...) - if not cfg.scope then cfg.scope = M.newscope() end - local down, up = cfg.down, cfg.up - local broken = down and down(...) - if broken ~= 'break' then M.traverse[traverse] (cfg, ...) end - if up then up(...) end - end -end - ----------------------------------------------------------------------- --- Declare [M.stat], [M.expr], [M.block]. --- `M.binder_list` is not here, because `cfg.up` and `cfg.down` must --- be called on individual binders, not on the list itself. --- It's therefore handled in `traverse.binder_list()` ----------------------------------------------------------------------- -for _, w in ipairs{ "stat", "expr", "block" } do --, "malformed", "unknown" } do - M[w] = walker_builder (w, M.traverse[w]) -end - --- Don't call up/down callbacks on expr lists -M.expr_list = M.traverse.expr_list - - ----------------------------------------------------------------------- --- Try to guess the type of the AST then choose the right walkker. ----------------------------------------------------------------------- -function M.guess (cfg, x, ...) - assert(type(x)=='table', "arg #2 in a walker must be an AST") - if M.tags.expr[x.tag] then return M.expr(cfg, x, ...) end - if M.tags.stat[x.tag] then return M.stat(cfg, x, ...) end - if not x.tag then return M.block(cfg, x, ...) end - error ("Can't guess the AST type from tag "..(x.tag or '')) -end - -local S = { }; S.__index = S - -function M.newscope() - local instance = { current = { } } - instance.stack = { instance.current } - setmetatable (instance, S) - return instance -end - -function S :save(...) - local current_copy = { } - for a, b in pairs(self.current) do current_copy[a]=b end - table.insert (self.stack, current_copy) - if ... then return self :add(...) end -end - -function S :restore() self.current = table.remove (self.stack) end -function S :get (var_name) return self.current[var_name] end -function S :set (key, val) self.current[key] = val end - -return M diff --git a/Utils/luarocks/share/lua/5.1/models/apimodel.lua b/Utils/luarocks/share/lua/5.1/models/apimodel.lua deleted file mode 100644 index e0ed1c968..000000000 --- a/Utils/luarocks/share/lua/5.1/models/apimodel.lua +++ /dev/null @@ -1,241 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2011-2012 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Simon BERNARD --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -local M = {} - --------------------------------------------------------------------------------- --- API MODEL --------------------------------------------------------------------------------- - -function M._file() - local file = { - -- FIELDS - tag = "file", - name = nil, -- string - shortdescription = "", -- string - description = "", -- string - types = {}, -- map from typename to type - globalvars = {}, -- map from varname to item - returns = {}, -- list of return - - -- FUNCTIONS - addtype = function (self,type) - self.types[type.name] = type - type.parent = self - end, - - mergetype = function (self,newtype,erase,erasesourcerangefield) - local currenttype = self.types[newtype.name] - if currenttype then - -- merge recordtypedef - if currenttype.tag =="recordtypedef" and newtype.tag == "recordtypedef" then - -- merge fields - for fieldname ,field in pairs( newtype.fields) do - local currentfield = currenttype.fields[fieldname] - if erase or not currentfield then - currenttype:addfield(field) - elseif erasesourcerangefield then - if field.sourcerange.min and field.sourcerange.max then - currentfield.sourcerange.min = field.sourcerange.min - currentfield.sourcerange.max = field.sourcerange.max - end - end - end - - -- merge descriptions and source ranges - if erase then - if newtype.description or newtype.description == "" then currenttype.description = newtype.description end - if newtype.shortdescription or newtype.shortdescription == "" then currenttype.shortdescription = newtype.shortdescription end - if newtype.sourcerange.min and newtype.sourcerange.max then - currenttype.sourcerange.min = newtype.sourcerange.min - currenttype.sourcerange.max = newtype.sourcerange.max - end - end - -- merge functiontypedef - elseif currenttype.tag == "functiontypedef" and newtype.tag == "functiontypedef" then - -- merge params - for i, param1 in ipairs(newtype.params) do - local missing = true - for j, param2 in ipairs(currenttype.params) do - if param1.name == param2.name then - missing = false - break - end - end - if missing then - table.insert(currenttype.params,param1) - end - end - - -- merge descriptions and source ranges - if erase then - if newtype.description or newtype.description == "" then currenttype.description = newtype.description end - if newtype.shortdescription or newtype.shortdescription == "" then currenttype.shortdescription = newtype.shortdescription end - if newtype.sourcerange.min and newtype.sourcerange.max then - currenttype.sourcerange.min = newtype.sourcerange.min - currenttype.sourcerange.max = newtype.sourcerange.max - end - end - end - else - self:addtype(newtype) - end - end, - - addglobalvar = function (self,item) - self.globalvars[item.name] = item - item.parent = self - end, - - moduletyperef = function (self) - if self and self.returns[1] and self.returns[1].types[1] then - local typeref = self.returns[1].types[1] - return typeref - end - end - } - return file -end - -function M._recordtypedef(name) - local recordtype = { - -- FIELDS - tag = "recordtypedef", - name = name, -- string (mandatory) - shortdescription = "", -- string - description = "", -- string - fields = {}, -- map from fieldname to field - sourcerange = {min=0,max=0}, - - -- FUNCTIONS - addfield = function (self,field) - self.fields[field.name] = field - field.parent = self - end - } - return recordtype -end - -function M._functiontypedef(name) - return { - tag = "functiontypedef", - name = name, -- string (mandatory) - shortdescription = "", -- string - description = "", -- string - params = {}, -- list of parameter - returns = {} -- list of return - } -end - -function M._parameter(name) - return { - tag = "parameter", - name = name, -- string (mandatory) - description = "", -- string - type = nil -- typeref (external or internal or primitive typeref) - } -end - -function M._item(name) - return { - -- FIELDS - tag = "item", - name = name, -- string (mandatory) - shortdescription = "", -- string - description = "", -- string - type = nil, -- typeref (external or internal or primitive typeref) - occurrences = {}, -- list of identifier (see internalmodel) - sourcerange = {min=0, max=0}, - - -- This is A TRICK - -- This value is ALWAYS nil, except for internal purposes (short references). - external = nil, - - -- FUNCTIONS - addoccurence = function (self,occ) - table.insert(self.occurrences,occ) - occ.definition = self - end, - - resolvetype = function (self,file) - if self and self.type then - if self.type.tag =="internaltyperef" then - -- if file is not given try to retrieve it. - if not file then - if self.parent and self.parent.tag == 'recordtypedef' then - file = self.parent.parent - elseif self.parent.tag == 'file' then - file = self.parent - end - end - if file then return file.types[self.type.typename] end - elseif self.type.tag =="inlinetyperef" then - return self.type.def - end - end - end - } -end - -function M._externaltypref(modulename, typename) - return { - tag = "externaltyperef", - modulename = modulename, -- string - typename = typename -- string - } -end - -function M._internaltyperef(typename) - return { - tag = "internaltyperef", - typename = typename -- string - } -end - -function M._primitivetyperef(typename) - return { - tag = "primitivetyperef", - typename = typename -- string - } -end - -function M._moduletyperef(modulename,returnposition) - return { - tag = "moduletyperef", - modulename = modulename, -- string - returnposition = returnposition -- number - } -end - -function M._exprtyperef(expression,returnposition) - return { - tag = "exprtyperef", - expression = expression, -- expression (see internal model) - returnposition = returnposition -- number - } -end - -function M._inlinetyperef(definition) - return { - tag = "inlinetyperef", - def = definition, -- expression (see internal model) - - } -end - -function M._return(description) - return { - tag = "return", - description = description or "", -- string - types = {} -- list of typref (external or internal or primitive typeref) - } -end -return M diff --git a/Utils/luarocks/share/lua/5.1/models/apimodelbuilder.lua b/Utils/luarocks/share/lua/5.1/models/apimodelbuilder.lua deleted file mode 100644 index 6fcd3c8f5..000000000 --- a/Utils/luarocks/share/lua/5.1/models/apimodelbuilder.lua +++ /dev/null @@ -1,459 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2011-2012 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Simon BERNARD --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -local apimodel = require "models.apimodel" -local ldp = require "models.ldparser" -local Q = require "metalua.treequery" - -local M = {} - -local handledcomments={} -- cache to know the comment already handled - ----- --- UTILITY METHODS -local primitivetypes = { - ['boolean'] = true, - ['function'] = true, - ['nil'] = true, - ['number'] = true, - ['string'] = true, - ['table'] = true, - ['thread'] = true, - ['userdata'] = true -} - --- get or create the typedef with the name "name" -local function gettypedef(_file,name,kind,sourcerangemin,sourcerangemax) - local kind = kind or "recordtypedef" - local _typedef = _file.types[name] - if _typedef then - if _typedef.tag == kind then return _typedef end - else - if kind == "recordtypedef" and name ~= "global" then - local _recordtypedef = apimodel._recordtypedef(name) - - -- define sourcerange - _recordtypedef.sourcerange.min = sourcerangemin - _recordtypedef.sourcerange.max = sourcerangemax - - -- add to file if a name is defined - if _recordtypedef.name then _file:addtype(_recordtypedef) end - return _recordtypedef - elseif kind == "functiontypedef" then - -- TODO support function - return nil - else - return nil - end - end - return nil -end - - --- create a typeref from the typref doc_tag -local function createtyperef(dt_typeref,_file,sourcerangemin,sourcerangemax) - local _typeref - if dt_typeref.tag == "typeref" then - if dt_typeref.module then - -- manage external type - _typeref = apimodel._externaltypref() - _typeref.modulename = dt_typeref.module - _typeref.typename = dt_typeref.type - else - if primitivetypes[dt_typeref.type] then - -- manage primitive type - _typeref = apimodel._primitivetyperef() - _typeref.typename = dt_typeref.type - else - -- manage internal type - _typeref = apimodel._internaltyperef() - _typeref.typename = dt_typeref.type - if _file then - gettypedef(_file, _typeref.typename, "recordtypedef", sourcerangemin,sourcerangemax) - end - end - end - end - return _typeref -end - --- create a return from the return doc_tag -local function createreturn(dt_return,_file,sourcerangemin,sourcerangemax) - local _return = apimodel._return() - - _return.description = dt_return.description - - -- manage typeref - if dt_return.types then - for _, dt_typeref in ipairs(dt_return.types) do - local _typeref = createtyperef(dt_typeref,_file,sourcerangemin,sourcerangemax) - if _typeref then - table.insert(_return.types,_typeref) - end - end - end - return _return -end - --- create a item from the field doc_tag -local function createfield(dt_field,_file,sourcerangemin,sourcerangemax) - local _item = apimodel._item(dt_field.name) - - if dt_field.shortdescription then - _item.shortdescription = dt_field.shortdescription - _item.description = dt_field.description - else - _item.shortdescription = dt_field.description - end - - -- manage typeref - local dt_typeref = dt_field.type - if dt_typeref then - _item.type = createtyperef(dt_typeref,_file,sourcerangemin,sourcerangemax) - end - return _item -end - --- create a param from the param doc_tag -local function createparam(dt_param,_file,sourcerangemin,sourcerangemax) - if not dt_param.name then return nil end - - local _parameter = apimodel._parameter(dt_param.name) - _parameter.description = dt_param.description - - -- manage typeref - local dt_typeref = dt_param.type - if dt_typeref then - _parameter.type = createtyperef(dt_typeref,_file,sourcerangemin,sourcerangemax) - end - return _parameter -end - --- get or create the typedef with the name "name" -function M.additemtoparent(_file,_item,scope,sourcerangemin,sourcerangemax) - if scope and not scope.module then - if _item.name then - if scope.type == "global" then - _file:addglobalvar(_item) - else - local _recordtypedef = gettypedef (_file, scope.type ,"recordtypedef",sourcerangemin,sourcerangemax) - _recordtypedef:addfield(_item) - end - else - -- if no item name precise we store the scope in the item to be able to add it to the right parent later - _item.scope = scope - end - end -end - --- Function type counter -local i = 0 - --- Reset function type counter -local function resetfunctiontypeidgenerator() - i = 0 -end - --- Provides an unique index for a function type -local function generatefunctiontypeid() - i = i + 1 - return i -end - --- generate a function type name -local function generatefunctiontypename(_functiontypedef) - local name = {"__"} - if _functiontypedef.returns and _functiontypedef.returns[1] then - local ret = _functiontypedef.returns[1] - for _, type in ipairs(ret.types) do - if type.typename then - if type.modulename then - table.insert(name,type.modulename) - end - table.insert(name,"#") - table.insert(name,type.typename) - end - end - - end - table.insert(name,"=") - if _functiontypedef.params then - for _, param in ipairs(_functiontypedef.params) do - local type = param.type - if type then - if type.typename then - if type.modulename then - table.insert(name,type.modulename) - end - table.insert(name,"#") - table.insert(name,type.typename) - else - table.insert(name,"#unknown") - end - end - table.insert(name,"[") - table.insert(name,param.name) - table.insert(name,"]") - end - end - table.insert(name,"__") - table.insert(name, generatefunctiontypeid()) - return table.concat(name) -end - - - ------------------------------------------------------- --- create the module api -function M.createmoduleapi(ast,modulename) - - -- Initialise function type naming - resetfunctiontypeidgenerator() - - local _file = apimodel._file() - - local _comment2apiobj = {} - - local function handlecomment(comment) - - -- Extract information from tagged comments - local parsedcomment = ldp.parse(comment[1]) - if not parsedcomment then return nil end - - -- Get tags from the languages - local regulartags = parsedcomment.tags - - -- Will contain last API object generated from comments - local _lastapiobject - - -- if comment is an ld comment - if regulartags then - -- manage "module" comment - if regulartags["module"] then - -- get name - _file.name = regulartags["module"][1].name or modulename - _lastapiobject = _file - - -- manage descriptions - _file.shortdescription = parsedcomment.shortdescription - _file.description = parsedcomment.description - - local sourcerangemin = comment.lineinfo.first.offset - local sourcerangemax = comment.lineinfo.last.offset - - -- manage returns - if regulartags ["return"] then - for _, dt_return in ipairs(regulartags ["return"]) do - local _return = createreturn(dt_return,_file,sourcerangemin,sourcerangemax) - table.insert(_file.returns,_return) - end - end - -- if no returns on module create a defaultreturn of type #modulename - if #_file.returns == 0 and _file.name then - -- create internal type ref - local _typeref = apimodel._internaltyperef() - _typeref.typename = _file.name - - -- create return - local _return = apimodel._return() - table.insert(_return.types,_typeref) - - -- add return - table.insert(_file.returns,_return) - - --create recordtypedef is not define - gettypedef(_file,_typeref.typename,"recordtypedef",sourcerangemin,sourcerangemax) - end - -- manage "type" comment - elseif regulartags["type"] and regulartags["type"][1].name ~= "global" then - local dt_type = regulartags["type"][1]; - -- create record type if it doesn't exist - local sourcerangemin = comment.lineinfo.first.offset - local sourcerangemax = comment.lineinfo.last.offset - local _recordtypedef = gettypedef (_file, dt_type.name ,"recordtypedef",sourcerangemin,sourcerangemax) - _lastapiobject = _recordtypedef - - -- re-set sourcerange in case the type was created before the type tag - _recordtypedef.sourcerange.min = sourcerangemin - _recordtypedef.sourcerange.max = sourcerangemax - - -- manage description - _recordtypedef.shortdescription = parsedcomment.shortdescription - _recordtypedef.description = parsedcomment.description - - -- manage fields - if regulartags["field"] then - for _, dt_field in ipairs(regulartags["field"]) do - local _item = createfield(dt_field,_file,sourcerangemin,sourcerangemax) - -- define sourcerange only if we create it - _item.sourcerange.min = sourcerangemin - _item.sourcerange.max = sourcerangemax - if _item then _recordtypedef:addfield(_item) end - end - end - elseif regulartags["field"] then - local dt_field = regulartags["field"][1] - - -- create item - local sourcerangemin = comment.lineinfo.first.offset - local sourcerangemax = comment.lineinfo.last.offset - local _item = createfield(dt_field,_file,sourcerangemin,sourcerangemax) - _item.shortdescription = parsedcomment.shortdescription - _item.description = parsedcomment.description - _lastapiobject = _item - - -- define sourcerange - _item.sourcerange.min = sourcerangemin - _item.sourcerange.max = sourcerangemax - - -- add item to its parent - local scope = regulartags["field"][1].parent - M.additemtoparent(_file,_item,scope,sourcerangemin,sourcerangemax) - elseif regulartags["function"] or regulartags["param"] or regulartags["return"] then - -- create item - local _item = apimodel._item() - _item.shortdescription = parsedcomment.shortdescription - _item.description = parsedcomment.description - _lastapiobject = _item - - -- set name - if regulartags["function"] then _item.name = regulartags["function"][1].name end - - -- define sourcerange - local sourcerangemin = comment.lineinfo.first.offset - local sourcerangemax = comment.lineinfo.last.offset - _item.sourcerange.min = sourcerangemin - _item.sourcerange.max = sourcerangemax - - - -- create function type - local _functiontypedef = apimodel._functiontypedef() - _functiontypedef.shortdescription = parsedcomment.shortdescription - _functiontypedef.description = parsedcomment.description - - - -- manage params - if regulartags["param"] then - for _, dt_param in ipairs(regulartags["param"]) do - local _param = createparam(dt_param,_file,sourcerangemin,sourcerangemax) - table.insert(_functiontypedef.params,_param) - end - end - - -- manage returns - if regulartags["return"] then - for _, dt_return in ipairs(regulartags["return"]) do - local _return = createreturn(dt_return,_file,sourcerangemin,sourcerangemax) - table.insert(_functiontypedef.returns,_return) - end - end - - -- add type name - _functiontypedef.name = generatefunctiontypename(_functiontypedef) - _file:addtype(_functiontypedef) - - -- create ref to this type - local _internaltyperef = apimodel._internaltyperef() - _internaltyperef.typename = _functiontypedef.name - _item.type=_internaltyperef - - -- add item to its parent - local sourcerangemin = comment.lineinfo.first.offset - local sourcerangemax = comment.lineinfo.last.offset - local scope = (regulartags["function"] and regulartags["function"][1].parent) or nil - M.additemtoparent(_file,_item,scope,sourcerangemin,sourcerangemax) - end - end - - -- when we could not know which type of api object it is, we suppose this is an item - if not _lastapiobject then - _lastapiobject = apimodel._item() - _lastapiobject.shortdescription = parsedcomment.shortdescription - _lastapiobject.description = parsedcomment.description - _lastapiobject.sourcerange.min = comment.lineinfo.first.offset - _lastapiobject.sourcerange.max = comment.lineinfo.last.offset - end - - -- - -- Store user defined tags - -- - local thirdtags = parsedcomment and parsedcomment.unknowntags - if thirdtags then - -- Define a storage index for user defined tags on current API element - if not _lastapiobject.metadata then _lastapiobject.metadata = {} end - - -- Loop over user defined tags - for usertag, taglist in pairs(thirdtags) do - if not _lastapiobject.metadata[ usertag ] then - _lastapiobject.metadata[ usertag ] = { - tag = usertag - } - end - for _, tag in ipairs( taglist ) do - table.insert(_lastapiobject.metadata[usertag], tag) - end - end - end - - -- if we create an api object linked it to - _comment2apiobj[comment] =_lastapiobject - end - - local function parsecomment(node, parent, ...) - -- check for comments before this node - if node.lineinfo and node.lineinfo.first.comments then - local comments = node.lineinfo.first.comments - -- check all comments - for _,comment in ipairs(comments) do - -- if not already handled - if not handledcomments[comment] then - handlecomment(comment) - handledcomments[comment]=true - end - end - end - -- check for comments after this node - if node.lineinfo and node.lineinfo.last.comments then - local comments = node.lineinfo.last.comments - -- check all comments - for _,comment in ipairs(comments) do - -- if not already handled - if not handledcomments[comment] then - handlecomment(comment) - handledcomments[comment]=true - end - end - end - end - Q(ast):filter(function(x) return x.tag~=nil end):foreach(parsecomment) - return _file, _comment2apiobj -end - - -function M.extractlocaltype ( commentblock,_file) - if not commentblock then return nil end - - local stringcomment = commentblock[1] - - local parsedtag = ldp.parseinlinecomment(stringcomment) - if parsedtag then - local sourcerangemin = commentblock.lineinfo.first.offset - local sourcerangemax = commentblock.lineinfo.last.offset - - return createtyperef(parsedtag,_file,sourcerangemin,sourcerangemax), parsedtag.description - end - - return nil, stringcomment -end - -M.generatefunctiontypename = generatefunctiontypename - -return M \ No newline at end of file diff --git a/Utils/luarocks/share/lua/5.1/models/internalmodel.lua b/Utils/luarocks/share/lua/5.1/models/internalmodel.lua deleted file mode 100644 index 552521052..000000000 --- a/Utils/luarocks/share/lua/5.1/models/internalmodel.lua +++ /dev/null @@ -1,65 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -local M = {} - -function M._internalcontent() - return { - content = nil, -- block - unknownglobalvars = {}, -- list of item - tag = "MInternalContent" - } -end - -function M._block() - return { - content = {}, -- list of expr (identifier, index, call, invoke, block) - localvars = {}, -- list of {var=item, scope ={min,max}} - sourcerange = {min=0,max=0}, - tag = "MBlock" - } -end - -function M._identifier() - return { - definition = nil, -- item - sourcerange = {min=0,max=0}, - tag = "MIdentifier" - } -end - -function M._index(key, value) - return { - left= key, -- expr (identifier, index, call, invoke, block) - right= value, -- string - sourcerange = {min=0,max=0}, - tag = "MIndex" - } -end - -function M._call(funct) - return { - func = funct, -- expr (identifier, index, call, invoke, block) - sourcerange = {min=0,max=0}, - tag = "MCall" - } -end - -function M._invoke(name, expr) - return { - functionname = name, -- string - record = expr, -- expr (identifier, index, call, invoke, block) - sourcerange = {min=0,max=0}, - tag = "MInvoke" - } -end - -return M diff --git a/Utils/luarocks/share/lua/5.1/models/internalmodelbuilder.mlua b/Utils/luarocks/share/lua/5.1/models/internalmodelbuilder.mlua deleted file mode 100644 index 4aeafa6cb..000000000 --- a/Utils/luarocks/share/lua/5.1/models/internalmodelbuilder.mlua +++ /dev/null @@ -1,861 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2011-2012 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Simon BERNARD --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- --{ extension ('match', ...) } - -local Q = require 'metalua.treequery' - -local internalmodel = require 'models.internalmodel' -local apimodel = require 'models.apimodel' -local apimodelbuilder = require 'models.apimodelbuilder' - -local M = {} - --- Analyzes an AST and returns two tables --- * `locals`, which associates `Id{ } nodes which create a local variable --- to a list of the `Id{ } occurrence nodes of that variable; --- * `globals` which associates variable names to occurrences of --- global variables having that name. -function bindings(ast) - local locals, globals = { }, { } - local function f(id, ...) - local name = id[1] - if Q.is_binder(id, ...) then - local binder = ... -- parent is the binder - locals[binder] = locals[binder] or { } - locals[binder][name]={ } - else - local _, binder = Q.get_binder(id, ...) - if binder then -- this is a local - table.insert(locals[binder][name], id) - else - local g = globals[name] - if g then table.insert(g, id) else globals[name]={id} end - end - end - end - Q(ast) :filter('Id') :foreach(f) - return locals, globals -end - --- -------------------------------------- - --- ---------------------------------------------------------- --- return the comment linked before to this node --- ---------------------------------------------------------- -local function getlinkedcommentbefore(node) - local function _getlinkedcomment(node,line) - if node and node.lineinfo and node.lineinfo.first.line == line then - -- get the last comment before (the nearest of code) - local comments = node.lineinfo.first.comments - local comment = comments and comments[#comments] - if comment and comment.lineinfo.last.line == line-1 then - -- ignore the comment if there are code before on the same line - if node.lineinfo.first.facing and (node.lineinfo.first.facing.line ~= comment.lineinfo.first.line) then - return comment - end - else - return _getlinkedcomment(node.parent,line) - end - end - return nil - end - - if node.lineinfo and node.lineinfo.first.line then - return _getlinkedcomment(node,node.lineinfo.first.line) - else - return nil - end -end - --- ---------------------------------------------------------- --- return the comment linked after to this node --- ---------------------------------------------------------- -local function getlinkedcommentafter(node) - local function _getlinkedcomment(node,line) - if node and node.lineinfo and node.lineinfo.last.line == line then - -- get the first comment after (the nearest of code) - local comments = node.lineinfo.last.comments - local comment = comments and comments[1] - if comment and comment.lineinfo.first.line == line then - return comment - else - return _getlinkedcomment(node.parent,line) - end - end - return nil - end - - if node.lineinfo and node.lineinfo.last.line then - return _getlinkedcomment(node,node.lineinfo.last.line) - else - return nil - end -end - --- ---------------------------------------------------------- --- return true if this node is a block for the internal representation --- ---------------------------------------------------------- -local supported_b = { - Function = true, - Do = true, - While = true, - Fornum = true, - Forin = true, - Repeat = true, -} -local function supportedblock(node, parent) - return supported_b[ node.tag ] or - (parent and parent.tag == "If" and node.tag == nil) -end - --- ---------------------------------------------------------- --- create a block from the metalua node --- ---------------------------------------------------------- -local function createblock(block, parent) - local _block = internalmodel._block() - match block with - | `Function{param, body} - | `Do{...} - | `Fornum {identifier, min, max, body} - | `Forin {identifiers, exprs, body} - | `Repeat {body, expr} -> - _block.sourcerange.min = block.lineinfo.first.offset - _block.sourcerange.max = block.lineinfo.last.offset - | `While {expr, body} -> - _block.sourcerange.min = body.lineinfo.first.facing.offset - _block.sourcerange.max = body.lineinfo.last.facing.offset - | _ -> - if parent and parent.tag == "If" and block.tag == nil then - _block.sourcerange.min = block.lineinfo.first.facing.offset - _block.sourcerange.max = block.lineinfo.last.facing.offset - end - end - return _block -end - --- ---------------------------------------------------------- --- return true if this node is a expression in the internal representation --- ---------------------------------------------------------- -local supported_e = { - Index = true, - Id = true, - Call = true, - Invoke = true -} -local function supportedexpr(node) - return supported_e[ node.tag ] -end - -local idto_block = {} -- cache from metalua id to internal model block -local idto_identifier = {} -- cache from metalua id to internal model indentifier -local expreto_expression = {} -- cache from metalua expression to internal model expression - --- ---------------------------------------------------------- --- create an expression from a metalua node --- ---------------------------------------------------------- -local function createexpr(expr,_block) - local _expr = nil - - match expr with - | `Id { name } -> - -- we store the block which hold this node - -- to be able to define - idto_block[expr]= _block - - -- if expr has not line info, it means expr has no representation in the code - -- so we don't need it. - if not expr.lineinfo then return nil end - - -- create identifier - local _identifier = internalmodel._identifier() - idto_identifier[expr]= _identifier - _expr = _identifier - | `Index { innerexpr, `String{fieldname} } -> - if not expr.lineinfo then return nil end - -- create index - local _expression = createexpr(innerexpr,_block) - if _expression then _expr = internalmodel._index(_expression,fieldname) end - | `Call{innerexpr, ...} -> - if not expr.lineinfo then return nil end - -- create call - local _expression = createexpr(innerexpr,_block) - if _expression then _expr = internalmodel._call(_expression) end - | `Invoke{innerexpr,`String{functionname},...} -> - if not expr.lineinfo then return nil end - -- create invoke - local _expression = createexpr(innerexpr,_block) - if _expression then _expr = internalmodel._invoke(functionname,_expression) end - | _ -> - end - - if _expr then - _expr.sourcerange.min = expr.lineinfo.first.offset - _expr.sourcerange.max = expr.lineinfo.last.offset - - expreto_expression[expr] = _expr - end - - return _expr -end - --- ---------------------------------------------------------- --- create block and expression node --- ---------------------------------------------------------- -local function createtreestructure(ast) - -- create internal content - local _internalcontent = internalmodel._internalcontent() - - -- create root block - local _block = internalmodel._block() - local _blocks = { _block } - _block.sourcerange.min = ast.lineinfo.first.facing.offset - -- TODO remove the math.max when we support partial AST - _block.sourcerange.max = math.max(ast.lineinfo.last.facing.offset, 10000) - - _internalcontent.content = _block - - -- visitor function (down) - local function down (node,parent) - if supportedblock(node,parent) then - -- create the block - local _block = createblock(node,parent) - -- add it to parent block - table.insert(_blocks[#_blocks].content, _block) - -- enqueue the last block to know the "current" block - table.insert(_blocks,_block) - elseif supportedexpr(node) then - -- we handle expression only if it was not already do - if not expreto_expression[node] then - -- create expr - local _expression = createexpr(node,_blocks[#_blocks]) - -- add it to parent block - if _expression then - table.insert(_blocks[#_blocks].content, _expression) - end - end - end - end - - -- visitor function (up) - local function up (node, parent) - if supportedblock(node,parent) then - -- dequeue the last block to know the "current" block - table.remove(_blocks,#_blocks) - end - end - - -- visit ast and build internal model - Q(ast):foreach(down,up) - - return _internalcontent -end - -local getitem - --- ---------------------------------------------------------- --- create the type from the node and position --- ---------------------------------------------------------- -local function createtype(node,position,comment2apiobj,file) - -- create module type ref - match node with - | `Call{ `Id "require", `String {modulename}} -> - return apimodel._moduletyperef(modulename,position) - | `Function {params, body} -> - -- create the functiontypedef from code - local _functiontypedef = apimodel._functiontypedef() - for _, p in ipairs(params) do - -- create parameters - local paramname - if p.tag=="Dots" then - paramname = "..." - else - paramname = p[1] - end - local _param = apimodel._parameter(paramname) - table.insert(_functiontypedef.params,_param) - end - _functiontypedef.name = "___" -- no name for inline type - - return apimodel._inlinetyperef(_functiontypedef) - | `String {value} -> - local typeref = apimodel._primitivetyperef("string") - return typeref - | `Number {value} -> - local typeref = apimodel._primitivetyperef("number") - return typeref - | `True | `False -> - local typeref = apimodel._primitivetyperef("boolean") - return typeref - | `Table {...} -> - -- create recordtypedef from code - local _recordtypedef = apimodel._recordtypedef("___") -- no name for inline type - -- for each element of the table - for i=1,select("#", ...) do - local pair = select(i, ...) - -- if this is a pair we create a new item in the type - if pair.tag == "Pair" then - -- create an item - local _item = getitem(pair,nil, comment2apiobj,file) - if _item then - _recordtypedef:addfield(_item) - end - end - end - return apimodel._inlinetyperef(_recordtypedef) - | _ -> - end - -- if node is an expression supported - local supportedexpr = expreto_expression[node] - if supportedexpr then - -- create expression type ref - return apimodel._exprtyperef(supportedexpr,position) - end - -end - -local function completeapidoctype(apidoctype,itemname,init,file,comment2apiobj) - if not apidoctype.name then - apidoctype.name = itemname - file:mergetype(apidoctype) - end - - -- create type from code - local typeref = createtype(init,1,comment2apiobj,file) - if typeref and typeref.tag == "inlinetyperef" - and typeref.def.tag == "recordtypedef" then - - -- set the name - typeref.def.name = apidoctype.name - - -- merge the type with priority to documentation except for source range - file:mergetype(typeref.def,false,true) - end -end - -local function completeapidocitem (apidocitem, itemname, init, file, binder, comment2apiobj) - -- manage the case item has no name - if not apidocitem.name then - apidocitem.name = itemname - - -- if item has no name this means it could not be attach to a parent - if apidocitem.scope then - apimodelbuilder.additemtoparent(file,apidocitem,apidocitem.scope,apidocitem.sourcerange.min,apidocitem.sourcerange.max) - apidocitem.scope = nil - end - end - - -- for function try to merge definition - local apitype = apidocitem:resolvetype(file) - if apitype and apitype.tag == "functiontypedef" then - local codetype = createtype(init,1,comment2apiobj,file) - if codetype and codetype.tag =="inlinetyperef" then - codetype.def.name = apitype.name - file:mergetype(codetype.def) - end - end - - -- manage the case item has no type - if not apidocitem.type then - -- extract typing from comment - local type, desc = apimodelbuilder.extractlocaltype(getlinkedcommentafter(binder),file) - - if type then - apidocitem.type = type - else - -- if not found extracttype from code - apidocitem.type = createtype(init,1,comment2apiobj,file) - end - end -end - --- ---------------------------------------------------------- --- create or get the item finding in the binder with the given itemname --- return also the ast node corresponding to this item --- ---------------------------------------------------------- -getitem = function (binder, itemname, comment2apiobj, file) - - -- local function to create item - local function createitem(itemname, astnode, itemtype, description) - local _item = apimodel._item(itemname) - if description then _item.description = description end - _item.type = itemtype - if astnode and astnode.lineinfo then - _item.sourcerange.min = astnode.lineinfo.first.offset - _item.sourcerange.max = astnode.lineinfo.last.offset - end - return _item, astnode - end - - -- try to match binder with known patter of item declaration - match binder with - | `Pair {string, init} - | `Set { {`Index { right , string}}, {init,...}} if string and string.tag =="String" -> - -- Pair and set is for searching field from type .. - -- if the itemname is given this mean we search for a local or a global not a field type. - if not itemname then - local itemname = string[1] - - -- check for luadoc typing - local commentbefore = getlinkedcommentbefore(binder) - local apiobj = comment2apiobj[commentbefore] -- find apiobj linked to this comment - if apiobj then - if apiobj.tag=="item" then - if not apiobj.name or apiobj.name == itemname then - -- use code to complete api information if it's necessary - completeapidocitem(apiobj, itemname, init,file,binder,comment2apiobj) - -- for item use code source range rather than doc source range - if string and string.lineinfo then - apiobj.sourcerange.min = string.lineinfo.first.offset - apiobj.sourcerange.max = string.lineinfo.last.offset - end - return apiobj, string - end - elseif apiobj.tag=="recordtypedef" then - -- use code to complete api information if it's necessary - completeapidoctype(apiobj, itemname, init,file,comment2apiobj) - return createitem(itemname, string, apimodel._internaltyperef(apiobj.name), nil) - end - - -- if the apiobj could not be associated to the current obj, - -- we do not use the documentation neither - commentbefore = nil - end - - -- else we use code to extract the type and description - -- check for "local" typing - local type, desc = apimodelbuilder.extractlocaltype(getlinkedcommentafter(binder),file) - local desc = desc or (commentbefore and commentbefore[1]) - if type then - return createitem(itemname, string, type, desc ) - else - -- if no "local typing" extract type from code - return createitem(itemname, string, createtype(init,1,comment2apiobj,file), desc) - end - end - | `Set {ids, inits} - | `Local {ids, inits} -> - -- if this is a single local var declaration - -- we check if there are a comment block linked and try to extract the type - if #ids == 1 then - local currentid, currentinit = ids[1],inits[1] - -- ignore non Ids node - if currentid.tag ~= 'Id' or currentid[1] ~= itemname then return nil end - - -- check for luadoc typing - local commentbefore = getlinkedcommentbefore(binder) - local apiobj = comment2apiobj[commentbefore] -- find apiobj linked to this comment - if apiobj then - if apiobj.tag=="item" then - -- use code to complete api information if it's necessary - if not apiobj.name or apiobj.name == itemname then - completeapidocitem(apiobj, itemname, currentinit,file,binder,comment2apiobj) - -- if this is a global var or if is has no parent - -- we do not create a new item - if not apiobj.parent or apiobj.parent == file then - -- for item use code source range rather than doc source range - if currentid and currentid.lineinfo then - apiobj.sourcerange.min = currentid.lineinfo.first.offset - apiobj.sourcerange.max = currentid.lineinfo.last.offset - end - return apiobj, currentid - else - return createitem(itemname, currentid, apiobj.type, nil) - end - end - elseif apiobj.tag=="recordtypedef" then - -- use code to complete api information if it's necessary - completeapidoctype(apiobj, itemname, currentinit,file,comment2apiobj) - return createitem(itemname, currentid, apimodel._internaltyperef(apiobj.name), nil) - end - - -- if the apiobj could not be associated to the current obj, - -- we do not use the documentation neither - commentbefore = nil - end - - -- else we use code to extract the type and description - -- check for "local" typing - local type,desc = apimodelbuilder.extractlocaltype(getlinkedcommentafter(binder),file) - desc = desc or (commentbefore and commentbefore[1]) - if type then - return createitem(itemname, currentid, type, desc) - else - -- if no "local typing" extract type from code - return createitem(itemname, currentid, createtype(currentinit,1,comment2apiobj,file), desc) - end - end - -- else we use code to extract the type - local init,returnposition = nil,1 - for i,id in ipairs(ids) do - -- calculate the current return position - if init and (init.tag == "Call" or init.tag == "Invoke") then - -- if previous init was a call or an invoke - -- we increment the returnposition - returnposition= returnposition+1 - else - -- if init is not a function call - -- we change the init used to determine the type - init = inits[i] - end - - -- get the name of the current id - local idname = id[1] - - -- if this is the good id - if itemname == idname then - -- create type from init node and return position - return createitem (itemname, id, createtype(init,returnposition,comment2apiobj,file),nil) - end - end - | `Function {params, body} -> - for i,id in ipairs(params) do - -- get the name of the current id - local idname = id[1] - -- if this is the good id - if itemname == idname then - -- extract param's type from luadocumentation - local obj = comment2apiobj[getlinkedcommentbefore(binder)] - if obj and obj.tag=="item" then - local typedef = obj:resolvetype(file) - if typedef and typedef.tag =="functiontypedef" then - for j, param in ipairs(typedef.params) do - if i==j then - if i ==1 and itemname == "self" and param.type == nil - and obj.parent and obj.parent.tag == "recordtypedef" and obj.parent.name then - param.type = apimodel._internaltyperef(obj.parent.name) - end - -- TODO perhaps we must clone the typeref - return createitem(itemname,id, param.type,param.description) - end - end - end - end - return createitem(itemname,id) - end - end - | `Forin {ids, expr, body} -> - for i,id in ipairs(ids) do - -- get the name of the current id - local idname = id[1] - -- if this is the good id - if itemname == idname then - -- return data : we can not guess the type for now - return createitem(itemname,id) - end - end - | `Fornum {id, ...} -> - -- get the name of the current id - local idname = id[1] - -- if this is the good id - if itemname == idname then - -- return data : we can not guess the type for now - return createitem(itemname,id) - end - | `Localrec {{id}, {func}} -> - -- get the name of the current id - local idname = id[1] - -- if this is the good id - if itemname == idname then - -- check for luadoc typing - local commentbefore = getlinkedcommentbefore(binder) - local apiobj = comment2apiobj[commentbefore] -- find apiobj linked to this comment - if apiobj then - if apiobj.tag=="item" then - if not apiobj.name or apiobj.name == itemname then - -- use code to complete api information if it's necessary - completeapidocitem(apiobj, itemname, func,file,binder,comment2apiobj) - return createitem(itemname,id,apiobj.type,nil) - end - end - - -- if the apiobj could not be associated to the current obj, - -- we do not use the documentation neither - commentbefore = nil - end - - -- else we use code to extract the type and description - -- check for "local" typing - local type,desc = apimodelbuilder.extractlocaltype(getlinkedcommentafter(binder),file) - desc = desc or (commentbefore and commentbefore[1]) - if type then - return createitem(itemname, id, type, desc) - else - -- if no "local typing" extract type from code - return createitem(itemname, id, createtype(func,1,comment2apiobj,file), desc) - end - end - | _ -> - end -end - --- ---------------------------------------------------------- --- Search from Id node to Set node to find field of type. --- --- Lua code : table.field1.field2 = 12 --- looks like that in metalua : --- `Set{ --- `Index { `Index { `Id "table", `String "field1" }, --- `String "field2"}, --- `Number "12"} --- ---------------------------------------------------------- -local function searchtypefield(node,_currentitem,comment2apiobj,file) - - -- we are just interested : - -- by item which is field of recordtypedef - -- by ast node which are Index - if _currentitem then - local type = _currentitem:resolvetype(file) - if type and type.tag == "recordtypedef" then - if node and node.tag == "Index" then - local rightpart = node[2] - local _newcurrentitem = type.fields[rightpart[1]] - - if _newcurrentitem then - -- if this index represent a known field of the type we continue to search - searchtypefield (node.parent,_newcurrentitem,comment2apiobj,file) - else - -- if not, this is perhaps a new field, but - -- to be a new field this index must be include in a Set - if node.parent and node.parent.tag =="Set" then - -- in this case we create the new item ans add it to the type - local set = node.parent - local item, string = getitem(set,nil, comment2apiobj,file) - -- add this item to the type, only if it has no parent and if this type does not contain already this field - if item and not item.parent and string and not type.fields[string[1]] then - type:addfield(item) - end - end - end - end - end - end -end - --- ---------------------------------------------------------- --- create local vars, global vars and linked it with theirs occurences --- ---------------------------------------------------------- -local function createvardefinitions(_internalcontent,ast,file,comment2apiobj) - -- use bindings to get locals and globals definition - local locals, globals = bindings( ast ) - - -- create locals var - for binder, namesAndOccurrences in pairs(locals) do - for name, occurrences in pairs(namesAndOccurrences) do - -- get item, id - local _item, id = getitem(binder, name,comment2apiobj,file) - if id then - -- add definition as occurence - -- we consider the identifier in the binder as an occurence - local _identifierdef = idto_identifier[id] - if _identifierdef then - table.insert(_item.occurrences, _identifierdef) - _identifierdef.definition = _item - end - - -- add occurences - for _,occurrence in ipairs(occurrences) do - searchtypefield(occurrence.parent, _item,comment2apiobj,file) - local _identifier = idto_identifier[occurrence] - if _identifier then - table.insert(_item.occurrences, _identifier) - _identifier.definition = _item - end - end - - -- add item to block - local _block = idto_block[id] - table.insert(_block.localvars,{item=_item,scope = {min=0,max=0}}) - end - end - end - - -- create globals var - for name, occurrences in pairs( globals ) do - - -- get or create definition - local _item = file.globalvars[name] - local binder = occurrences[1].parent - if not _item then - -- global declaration is only if the first occurence in left part of a 'Set' - if binder and binder.tag == "Set" then - _item = getitem(binder, name,comment2apiobj,file) - end - - -- if we find and item this is a global var declaration - if _item then - file:addglobalvar(_item) - else - -- else it is an unknown global var - _item = apimodel._item(name) - local _firstoccurrence = idto_identifier[occurrences[1]] - if _firstoccurrence then - _item.sourcerange.min = _firstoccurrence.sourcerange.min - _item.sourcerange.max = _firstoccurrence.sourcerange.max - end - table.insert(_internalcontent.unknownglobalvars,_item) - end - else - -- if the global var definition already exists, we just try to it - if binder then - match binder with - | `Set {ids, inits} -> - -- manage case only if there are 1 element in the Set - if #ids == 1 then - local currentid, currentinit = ids[1],inits[1] - -- ignore non Ids node and bad name - if currentid.tag == 'Id' and currentid[1] == name then - completeapidocitem(_item, name, currentinit,file,binder,comment2apiobj) - - if currentid and currentid.lineinfo then - _item.sourcerange.min = currentid.lineinfo.first.offset - _item.sourcerange.max = currentid.lineinfo.last.offset - end - end - end - | _ -> - end - end - end - - -- add occurences - for _,occurence in ipairs(occurrences) do - local _identifier = idto_identifier[occurence] - searchtypefield(occurence.parent, _item,comment2apiobj,file) - if _identifier then - table.insert(_item.occurrences, _identifier) - _identifier.definition = _item - end - end - end -end - --- ---------------------------------------------------------- --- add parent to all ast node --- ---------------------------------------------------------- -local function addparents(ast) - -- visitor function (down) - local function down (node,parent) - node.parent = parent - end - - -- visit ast and build internal model - Q(ast):foreach(down,up) -end - --- ---------------------------------------------------------- --- try to detect a module declaration from code --- ---------------------------------------------------------- -local function searchmodule(ast,file,comment2apiobj,modulename) - -- if the last statement is a return - if ast then - local laststatement = ast[#ast] - if laststatement and laststatement.tag == "Return" then - -- and if the first expression returned is an identifier. - local firstexpr = laststatement[1] - if firstexpr and firstexpr.tag == "Id" then - -- get identifier in internal model - local _identifier = idto_identifier [firstexpr] - -- the definition should be an inline type - if _identifier - and _identifier.definition - and _identifier.definition.type - and _identifier.definition.type.tag == "inlinetyperef" - and _identifier.definition.type.def.tag == "recordtypedef" then - - --set modulename if needed - if not file.name then file.name = modulename end - - -- create or merge type - local _type = _identifier.definition.type.def - _type.name = modulename - - -- if file (module) has no documentation add item documentation to it - -- else add it to the type. - if not file.description or file.description == "" then - file.description = _identifier.definition.description - else - _type.description = _identifier.definition.description - end - _identifier.definition.description = "" - if not file.shortdescription or file.shortdescription == "" then - file.shortdescription = _identifier.definition.shortdescription - else - _type.shortdescription = _identifier.definition.shortdescription - end - _identifier.definition.shortdescription = "" - - -- WORKAROUND FOR BUG 421622: [outline]module selection in outline does not select it in texteditor - --_type.sourcerange.min = _identifier.definition.sourcerange.min - --_type.sourcerange.max = _identifier.definition.sourcerange.max - - -- merge the type with priority to documentation except for source range - file:mergetype(_type,false,true) - - -- create return if needed - if not file.returns[1] then - file.returns[1] = apimodel._return() - file.returns[1].types = { apimodel._internaltyperef(modulename) } - end - - -- change the type of the identifier - _identifier.definition.type = apimodel._internaltyperef(modulename) - end - end - end - end -end - --- ---------------------------------------------------------- --- create the internalcontent from an ast metalua --- ---------------------------------------------------------- -function M.createinternalcontent (ast,file,comment2apiobj,modulename) - -- init cache - idto_block = {} - idto_identifier = {} - expreto_expression = {} - comment2apiobj = comment2apiobj or {} - file = file or apimodel._file() - - -- execute code safely to be sure to clean cache correctly - local internalcontent - local ok, errmsg = pcall(function () - -- add parent to all node - addparents(ast) - - -- create block and expression node - internalcontent = createtreestructure(ast) - - -- create Local vars, global vars and linked occurences (Items) - createvardefinitions(internalcontent,ast,file,comment2apiobj) - - -- try to dectect module information from code - local moduletyperef = file:moduletyperef() - if moduletyperef and moduletyperef.tag == "internaltyperef" then - modulename = moduletyperef.typename or modulename - end - if modulename then - searchmodule(ast,file,comment2apiobj,modulename) - end - end) - - -- clean cache - idto_block = {} - idto_identifier = {} - expreto_expression = {} - - -- if not ok raise an error - if not ok then error (errmsg) end - - return internalcontent -end - -return M diff --git a/Utils/luarocks/share/lua/5.1/models/ldparser.lua b/Utils/luarocks/share/lua/5.1/models/ldparser.lua deleted file mode 100644 index d74071bf4..000000000 --- a/Utils/luarocks/share/lua/5.1/models/ldparser.lua +++ /dev/null @@ -1,656 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2011-2013 Sierra Wireless and others. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Sierra Wireless - initial API and implementation -------------------------------------------------------------------------------- -local mlc = require ('metalua.compiler').new() -local gg = require 'metalua.grammar.generator' -local lexer = require 'metalua.grammar.lexer' -local mlp = mlc.parser - -local M = {} -- module -local lx -- lexer used to parse tag -local registeredparsers -- table {tagname => {list de parsers}} - --- ---------------------------------------------------- --- raise an error if result contains a node error --- ---------------------------------------------------- -local function raiserror(result) - for i, node in ipairs(result) do - assert(not node or node.tag ~= "Error") - end -end - - --- ---------------------------------------------------- --- copy key and value from one table to an other --- ---------------------------------------------------- -local function copykey(tablefrom, tableto) - for key, value in pairs(tablefrom) do - if key ~= "lineinfos" then - tableto[key] = value - end - end -end - --- ---------------------------------------------------- --- Handle keyword and identifiers as word --- ---------------------------------------------------- -local function parseword(lx) - local word = lx :peek() - local tag = word.tag - - if tag=='Keyword' or tag=='Id' then - lx:next() - return {tag='Word', lineinfo=word.lineinfo, word[1]} - else - return gg.parse_error(lx,'Id or Keyword expected') - end -end - --- ---------------------------------------------------- --- parse an id --- return a table {name, lineinfo) --- ---------------------------------------------------- -local idparser = gg.sequence({ - builder = function (result) - raiserror(result) - return { name = result[1][1] } - end, - parseword -}) - --- ---------------------------------------------------- --- parse a modulename (id.)?id --- return a table {name, lineinfo) --- ---------------------------------------------------- -local modulenameparser = gg.list({ - builder = function (result) - raiserror(result) - local ids = {} - for i, id in ipairs(result) do - table.insert(ids,id.name) - end - return {name = table.concat(ids,".")} - end, - primary = idparser, - separators = '.' -}) --- ---------------------------------------------------- --- parse a typename (id.)?id --- return a table {name, lineinfo) --- ---------------------------------------------------- -local typenameparser= modulenameparser - --- ---------------------------------------------------- --- parse an internaltype ref --- return a table {name, lineinfo) --- ---------------------------------------------------- -local internaltyperefparser = gg.sequence({ - builder = function(result) - raiserror(result) - return {tag = "typeref",type=result[1].name} - end, - "#", typenameparser -}) - --- ---------------------------------------------------- --- parse en external type ref --- return a table {name, lineinfo) --- ---------------------------------------------------- -local externaltyperefparser = gg.sequence({ - builder = function(result) - raiserror(result) - return {tag = "typeref",module=result[1].name,type=result[2].name} - end, - modulenameparser,"#", typenameparser -}) - - --- ---------------------------------------------------- --- parse a typeref --- return a table {name, lineinfo) --- ---------------------------------------------------- -local typerefparser = gg.multisequence{ - internaltyperefparser, - externaltyperefparser} - --- ---------------------------------------------------- --- parse a list of typeref --- return a list of table {name, lineinfo) --- ---------------------------------------------------- -local typereflistparser = gg.list({ - primary = typerefparser, - separators = ',' -}) - --- ---------------------------------------------------- --- TODO use a more generic way to parse (modifier if not always a typeref) --- TODO support more than one modifier --- ---------------------------------------------------- -local modifiersparser = gg.sequence({ - builder = function(result) - raiserror(result) - return {[result[1].name]=result[2]} - end, - "[", idparser , "=" , internaltyperefparser , "]" -}) - --- ---------------------------------------------------- --- parse a return tag --- ---------------------------------------------------- -local returnparsers = { - -- full parser - gg.sequence({ - builder = function (result) - raiserror(result) - return { types= result[1]} - end, - '@','return', typereflistparser - }), - -- parser without typerefs - gg.sequence({ - builder = function (result) - raiserror(result) - return { types = {}} - end, - '@','return' - }) -} - --- ---------------------------------------------------- --- parse a param tag --- ---------------------------------------------------- -local paramparsers = { - -- full parser - gg.sequence({ - builder = function (result) - raiserror(result) - return { name = result[2].name, type = result[1]} - end, - '@','param', typerefparser, idparser - }), - - -- full parser without type - gg.sequence({ - builder = function (result) - raiserror(result) - return { name = result[1].name} - end, - '@','param', idparser - }), - - -- Parser for `Dots - gg.sequence({ - builder = function (result) - raiserror(result) - return { name = '...' } - end, - '@','param', '...' - }), -} --- ---------------------------------------------------- --- parse a field tag --- ---------------------------------------------------- -local fieldparsers = { - -- full parser - gg.sequence({ - builder = function (result) - raiserror(result) - local tag = {} - copykey(result[1],tag) - tag.type = result[2] - tag.name = result[3].name - return tag - end, - '@','field', modifiersparser, typerefparser, idparser - }), - - -- parser without name - gg.sequence({ - builder = function (result) - raiserror(result) - local tag = {} - copykey(result[1],tag) - tag.type = result[2] - return tag - end, - '@','field', modifiersparser, typerefparser - }), - - -- parser without type - gg.sequence({ - builder = function (result) - raiserror(result) - local tag = {} - copykey(result[1],tag) - tag.name = result[2].name - return tag - end, - '@','field', modifiersparser, idparser - }), - - -- parser without type and name - gg.sequence({ - builder = function (result) - raiserror(result) - local tag = {} - copykey(result[1],tag) - return tag - end, - '@','field', modifiersparser - }), - - -- parser without modifiers - gg.sequence({ - builder = function (result) - raiserror(result) - return { name = result[2].name, type = result[1]} - end, - '@','field', typerefparser, idparser - }), - - -- parser without modifiers and name - gg.sequence({ - builder = function (result) - raiserror(result) - return {type = result[1]} - end, - '@','field', typerefparser - }), - - -- parser without type and modifiers - gg.sequence({ - builder = function (result) - raiserror(result) - return { name = result[1].name} - end, - '@','field', idparser - }), - - -- parser with nothing - gg.sequence({ - builder = function (result) - raiserror(result) - return {} - end, - '@','field' - }) -} - --- ---------------------------------------------------- --- parse a function tag --- TODO use a more generic way to parse modifier ! --- ---------------------------------------------------- -local functionparsers = { - -- full parser - gg.sequence({ - builder = function (result) - raiserror(result) - local tag = {} - copykey(result[1],tag) - tag.name = result[2].name - return tag - end, - '@','function', modifiersparser, idparser - }), - - -- parser without name - gg.sequence({ - builder = function (result) - raiserror(result) - local tag = {} - copykey(result[1],tag) - return tag - end, - '@','function', modifiersparser - }), - - -- parser without modifier - gg.sequence({ - builder = function (result) - raiserror(result) - local tag = {} - tag.name = result[1].name - return tag - end, - '@','function', idparser - }), - - -- empty parser - gg.sequence({ - builder = function (result) - raiserror(result) - return {} - end, - '@','function' - }) -} - --- ---------------------------------------------------- --- parse a type tag --- ---------------------------------------------------- -local typeparsers = { - -- full parser - gg.sequence({ - builder = function (result) - raiserror(result) - return { name = result[1].name} - end, - '@','type',typenameparser - }), - -- parser without name - gg.sequence({ - builder = function (result) - raiserror(result) - return {} - end, - '@','type' - }) -} - --- ---------------------------------------------------- --- parse a module tag --- ---------------------------------------------------- -local moduleparsers = { - -- full parser - gg.sequence({ - builder = function (result) - raiserror(result) - return { name = result[1].name } - end, - '@','module', modulenameparser - }), - -- parser without name - gg.sequence({ - builder = function (result) - raiserror(result) - return {} - end, - '@','module' - }) -} - --- ---------------------------------------------------- --- parse a third tag --- ---------------------------------------------------- -local thirdtagsparser = gg.sequence({ - builder = function (result) - raiserror(result) - return { name = result[1][1] } - end, - '@', mlp.id -}) --- ---------------------------------------------------- --- init parser --- ---------------------------------------------------- -local function initparser() - -- register parsers - -- each tag name has several parsers - registeredparsers = { - ["module"] = moduleparsers, - ["return"] = returnparsers, - ["type"] = typeparsers, - ["field"] = fieldparsers, - ["function"] = functionparsers, - ["param"] = paramparsers - } - - -- create lexer used for parsing - lx = lexer.lexer:clone() - lx.extractors = { - -- "extract_long_comment", - -- "extract_short_comment", - -- "extract_long_string", - "extract_short_string", - "extract_word", - "extract_number", - "extract_symbol" - } - - -- Add dots as keyword - local tagnames = { '...' } - - -- Add tag names as key word - for tagname, _ in pairs(registeredparsers) do - table.insert(tagnames,tagname) - end - lx:add(tagnames) - - return lx, parsers -end - -initparser() - --- ---------------------------------------------------- --- get the string pattern to remove for each line of description --- the goal is to fix the indentation problems --- ---------------------------------------------------- -local function getstringtoremove (stringcomment,commentstart) - local _,_,capture = string.find(stringcomment,"\n?([ \t]*)@[^{]+",commentstart) - if not capture then - _,_,capture = string.find(stringcomment,"^([ \t]*)",commentstart) - end - capture = string.gsub(capture,"(.)","%1?") - return capture -end - --- ---------------------------------------------------- --- parse comment tag partition and return table structure --- ---------------------------------------------------- -local function parsetag(part) - if part.comment:find("^@") then - -- check if the part start by a supported tag - for tagname,parsers in pairs(registeredparsers) do - if (part.comment:find("^@"..tagname)) then - -- try the registered parsers for this tag - local result - for i, parser in ipairs(parsers) do - local valid, tag = pcall(parser, lx:newstream(part.comment, tagname .. 'tag lexer')) - if valid then - -- add tagname - tag.tagname = tagname - - -- add description - local endoffset = tag.lineinfo.last.offset - tag.description = part.comment:sub(endoffset+2,-1) - return tag - end - end - end - end - end - return nil -end - --- ---------------------------------------------------- --- Parse third party tags. --- --- Enable to parse a tag not defined in language. --- So for, accepted format is: @sometagname adescription --- ---------------------------------------------------- -local function parsethirdtag( part ) - - -- Check it there is someting to process - if not part.comment:find("^@") then - return nil, 'No tag to parse' - end - - -- Apply parser - local status, parsedtag = pcall(thirdtagsparser, lx:newstream(part.comment, 'Third party tag lexer')) - if not status then - return nil, "Unable to parse given string." - end - - -- Retrieve description - local endoffset = parsedtag.lineinfo.last.offset - local tag = { - description = part.comment:sub(endoffset+2,-1) - } - return parsedtag.name, tag -end - --- --------------------------------------------------------- --- split string comment in several part --- return list of {comment = string, offset = number} --- the first part is the part before the first tag --- the others are the part from a tag to the next one --- ---------------------------------------------------- -local function split(stringcomment,commentstart) - local partstart = commentstart - local result = {} - - -- manage case where the comment start by @ - -- (we must ignore the inline see tag @{..}) - local at_startoffset, at_endoffset = stringcomment:find("^[ \t]*@[^{]",partstart) - if at_endoffset then - partstart = at_endoffset-1 -- we start before the @ and the non '{' character - end - - -- split comment - -- (we must ignore the inline see tag @{..}) - repeat - at_startoffset, at_endoffset = stringcomment:find("\n[ \t]*@[^{]",partstart) - local partend - if at_startoffset then - partend= at_startoffset-1 -- the end is before the separator pattern (just before the \n) - else - partend = #stringcomment -- we don't find any pattern so the end is the end of the string - end - table.insert(result, { comment = stringcomment:sub (partstart,partend) , - offset = partstart}) - if at_endoffset then - partstart = at_endoffset-1 -- the new start is befire the @ and the non { char - end - until not at_endoffset - return result -end - - --- ---------------------------------------------------- --- parse a comment block and return a table --- ---------------------------------------------------- -function M.parse(stringcomment) - - local _comment = {description="", shortdescription=""} - - -- clean windows carriage return - stringcomment = string.gsub(stringcomment,"\r\n","\n") - - -- check if it's a ld comment - -- get the begin of the comment - -- ============================ - if not stringcomment:find("^-") then - -- if this comment don't start by -, we will not handle it. - return nil - end - - -- retrieve the real start - local commentstart = 2 --after the first hyphen - -- if the first line is an empty comment line with at least 3 hyphens we ignore it - local _ , endoffset = stringcomment:find("^-+[ \t]*\n") - if endoffset then - commentstart = endoffset+1 - end - - -- clean comments - -- =================== - -- remove line of "-" - stringcomment = string.sub(stringcomment,commentstart) - -- clean indentation - local pattern = getstringtoremove (stringcomment,1) - stringcomment = string.gsub(stringcomment,"^"..pattern,"") - stringcomment = string.gsub(stringcomment,"\n"..pattern,"\n") - - -- split comment part - -- ==================== - local commentparts = split(stringcomment, 1) - - -- Extract descriptions - -- ==================== - local firstpart = commentparts[1].comment - if firstpart:find("^[^@]") or firstpart:find("^@{") then - -- if the comment part don't start by @ - -- it's the part which contains descriptions - -- (there are an exception for the in-line see tag @{..}) - local shortdescription, description = string.match(firstpart,'^(.-[.?])(%s.+)') - -- store description - if shortdescription then - _comment.shortdescription = shortdescription - -- clean description - -- remove always the first space character - -- (this manage the case short and long description is on the same line) - description = string.gsub(description, "^[ \t]","") - -- if first line is only an empty string remove it - description = string.gsub(description, "^[ \t]*\n","") - _comment.description = description - else - _comment.shortdescription = firstpart - _comment.description = "" - end - end - - -- Extract tags - -- =================== - -- Parse regular tags - local tag - for i, part in ipairs(commentparts) do - tag = parsetag(part) - --if it's a supported tag (so tag is not nil, it's a table) - if tag then - if not _comment.tags then _comment.tags = {} end - if not _comment.tags[tag.tagname] then - _comment.tags[tag.tagname] = {} - end - table.insert(_comment.tags[tag.tagname], tag) - else - - -- Try user defined tags, so far they will look like - -- @identifier description - local tagname, thirdtag = parsethirdtag( part ) - if tagname then - -- - -- Append found tag - -- - local reservedname = 'unknowntags' - if not _comment.unknowntags then - _comment.unknowntags = {} - end - - -- Create specific section for parsed tag - if not _comment.unknowntags[tagname] then - _comment.unknowntags[tagname] = {} - end - -- Append to specific section - table.insert(_comment.unknowntags[tagname], thirdtag) - end - end - end - return _comment -end - - -function M.parseinlinecomment(stringcomment) - --TODO this code is use to activate typage only on --- comments. (deactivate for now) - -- if not stringcomment or not stringcomment:find("^-") then - -- -- if this comment don't start by -, we will not handle it. - -- return nil - -- end - -- -- remove the first '-' - -- stringcomment = string.sub(stringcomment,2) - -- print (stringcomment) - -- io.flush() - local valid, parsedtag = pcall(typerefparser, lx:newstream(stringcomment, 'typeref parser')) - if valid then - local endoffset = parsedtag.lineinfo.last.offset - parsedtag.description = stringcomment:sub(endoffset+2,-1) - return parsedtag - end -end - -return M diff --git a/Utils/luarocks/share/lua/5.1/pl/Date.lua b/Utils/luarocks/share/lua/5.1/pl/Date.lua deleted file mode 100644 index c11a9ef18..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/Date.lua +++ /dev/null @@ -1,546 +0,0 @@ ---- Date and Date Format classes. --- See the Guide. --- @class module --- @name pl.Date --- @pragma nostrip - ---[[ -module("pl.Date") -]] - -local class = require 'pl.class' -local os_time, os_date = os.time, os.date -local stringx = require 'pl.stringx' - -local Date = class() -Date.Format = class() - ---- Date constructor. --- @param t this can be either
      ---
    • nil - use current date and time
    • ---
    • number - seconds since epoch (as returned by @{os.time})
    • ---
    • Date - copy constructor
    • ---
    • table - table containing year, month, etc as for os.time() --- You may leave out year, month or day, in which case current values will be used. ---
    • ---
    • two to six numbers: year, month, day, hour, min, sec ---
    --- @function Date -function Date:_init(t,...) - local time - if select('#',...) > 0 then - local extra = {...} - local year = t - t = { - year = year, - month = extra[1], - day = extra[2], - hour = extra[3], - min = extra[4], - sec = extra[5] - } - end - if t == nil then - time = os_time() - elseif type(t) == 'number' then - time = t - elseif type(t) == 'table' then - if getmetatable(t) == Date then -- copy ctor - time = t.time - else - if not (t.year and t.month and t.year) then - local lt = os.date('*t') - if not t.year and not t.month and not t.day then - t.year = lt.year - t.month = lt.month - t.day = lt.day - else - t.year = t.year or lt.year - t.month = t.month or (t.day and lt.month or 1) - t.day = t.day or 1 - end - end - time = os_time(t) - end - end - self:set(time) -end - -local thour,tmin - ---- get the time zone offset from UTC. --- @return hours ahead of UTC --- @return minutes ahead of UTC -function Date.tzone () - if not thour then - local t = os.time() - local ut = os.date('!*t',t) - local lt = os.date('*t',t) - thour = lt.hour - ut.hour - tmin = lt.min - ut.min - end - return thour, tmin -end - ---- convert this date to UTC. -function Date:toUTC () - local th, tm = Date.tzone() - self:add { hour = -th } - - if tm > 0 then self:add {min = -tm} end -end - ---- convert this UTC date to local. -function Date:toLocal () - local th, tm = Date.tzone() - self:add { hour = th } - if tm > 0 then self:add {min = tm} end -end - ---- set the current time of this Date object. --- @param t seconds since epoch -function Date:set(t) - self.time = t - self.tab = os_date('*t',self.time) -end - ---- set the year. --- @param y Four-digit year --- @class function --- @name Date:year - ---- set the month. --- @param m month --- @class function --- @name Date:month - ---- set the day. --- @param d day --- @class function --- @name Date:day - ---- set the hour. --- @param h hour --- @class function --- @name Date:hour - ---- set the minutes. --- @param min minutes --- @class function --- @name Date:min - ---- set the seconds. --- @param sec seconds --- @class function --- @name Date:sec - ---- set the day of year. --- @class function --- @param yday day of year --- @name Date:yday - ---- get the year. --- @param y Four-digit year --- @class function --- @name Date:year - ---- get the month. --- @class function --- @name Date:month - ---- get the day. --- @class function --- @name Date:day - ---- get the hour. --- @class function --- @name Date:hour - ---- get the minutes. --- @class function --- @name Date:min - ---- get the seconds. --- @class function --- @name Date:sec - ---- get the day of year. --- @class function --- @name Date:yday - - -for _,c in ipairs{'year','month','day','hour','min','sec','yday'} do - Date[c] = function(self,val) - if val then - self.tab[c] = val - self:set(os_time(self.tab)) - return self - else - return self.tab[c] - end - end -end - ---- name of day of week. --- @param full abbreviated if true, full otherwise. --- @return string name -function Date:weekday_name(full) - return os_date(full and '%A' or '%a',self.time) -end - ---- name of month. --- @param full abbreviated if true, full otherwise. --- @return string name -function Date:month_name(full) - return os_date(full and '%B' or '%b',self.time) -end - ---- is this day on a weekend?. -function Date:is_weekend() - return self.tab.wday == 0 or self.tab.wday == 6 -end - ---- add to a date object. --- @param t a table containing one of the following keys and a value:
    --- year,month,day,hour,min,sec --- @return this date -function Date:add(t) - local key,val = next(t) - self.tab[key] = self.tab[key] + val - self:set(os_time(self.tab)) - return self -end - ---- last day of the month. --- @return int day -function Date:last_day() - local d = 28 - local m = self.tab.month - while self.tab.month == m do - d = d + 1 - self:add{day=1} - end - self:add{day=-1} - return self -end - ---- difference between two Date objects. --- Note: currently the result is a regular @{Date} object, --- but also has `interval` field set, which means a more --- appropriate string rep is used. --- @param other Date object --- @return a Date object -function Date:diff(other) - local dt = self.time - other.time - if dt < 0 then error("date difference is negative!",2) end - local date = Date(dt) - date.interval = true - return date -end - ---- long numerical ISO data format version of this date. -function Date:__tostring() - if not self.interval then - return os_date('%Y-%m-%d %H:%M:%S',self.time) - else - local t, res = self.tab, '' - local y,m,d = t.year - 1970, t.month - 1, t.day - 1 - if y > 0 then res = res .. y .. ' years ' end - if m > 0 then res = res .. m .. ' months ' end - if d > 0 then res = res .. d .. ' days ' end - if y == 0 and m == 0 then - local h = t.hour - Date.tzone() -- not accounting for UTC mins! - if h > 0 then res = res .. h .. ' hours ' end - if t.min > 0 then res = res .. t.min .. ' min ' end - if t.sec > 0 then res = res .. t.sec .. ' sec ' end - end - return res - end -end - ---- equality between Date objects. -function Date:__eq(other) - return self.time == other.time -end - ---- equality between Date objects. -function Date:__lt(other) - return self.time < other.time -end - - ------------- Date.Format class: parsing and renderinig dates ------------ - --- short field names, explicit os.date names, and a mask for allowed field repeats -local formats = { - d = {'day',{true,true}}, - y = {'year',{false,true,false,true}}, - m = {'month',{true,true}}, - H = {'hour',{true,true}}, - M = {'min',{true,true}}, - S = {'sec',{true,true}}, -} - --- - ---- Date.Format constructor. --- @param fmt. A string where the following fields are significant:
      ---
    • d day (either d or dd)
    • ---
    • y year (either yy or yyy)
    • ---
    • m month (either m or mm)
    • ---
    • H hour (either H or HH)
    • ---
    • M minute (either M or MM)
    • ---
    • S second (either S or SS)
    • ---
    --- Alternatively, if fmt is nil then this returns a flexible date parser --- that tries various date/time schemes in turn: ---
      ---
    1. ISO 8601, --- like 2010-05-10 12:35:23Z or 2008-10-03T14:30+02
    2. ---
    3. times like 15:30 or 8.05pm (assumed to be today's date)
    4. ---
    5. dates like 28/10/02 (European order!) or 5 Feb 2012
    6. ---
    7. month name like march or Mar (case-insensitive, first 3 letters); --- here the day will be 1 and the year this current year
    8. ---
    --- A date in format 3 can be optionally followed by a time in format 2. --- Please see test-date.lua in the tests folder for more examples. --- @usage df = Date.Format("yyyy-mm-dd HH:MM:SS") --- @class function --- @name Date.Format -function Date.Format:_init(fmt) - if not fmt then return end - local append = table.insert - local D,PLUS,OPENP,CLOSEP = '\001','\002','\003','\004' - local vars,used = {},{} - local patt,outf = {},{} - local i = 1 - while i < #fmt do - local ch = fmt:sub(i,i) - local df = formats[ch] - if df then - if used[ch] then error("field appeared twice: "..ch,2) end - used[ch] = true - -- this field may be repeated - local _,inext = fmt:find(ch..'+',i+1) - local cnt = not _ and 1 or inext-i+1 - if not df[2][cnt] then error("wrong number of fields: "..ch,2) end - -- single chars mean 'accept more than one digit' - local p = cnt==1 and (D..PLUS) or (D):rep(cnt) - append(patt,OPENP..p..CLOSEP) - append(vars,ch) - if ch == 'y' then - append(outf,cnt==2 and '%y' or '%Y') - else - append(outf,'%'..ch) - end - i = i + cnt - else - append(patt,ch) - append(outf,ch) - i = i + 1 - end - end - -- escape any magic characters - fmt = table.concat(patt):gsub('[%-%.%+%[%]%(%)%$%^%%%?%*]','%%%1') - -- replace markers with their magic equivalents - fmt = fmt:gsub(D,'%%d'):gsub(PLUS,'+'):gsub(OPENP,'('):gsub(CLOSEP,')') - self.fmt = fmt - self.outf = table.concat(outf) - self.vars = vars - -end - -local parse_date - ---- parse a string into a Date object. --- @param str a date string --- @return date object -function Date.Format:parse(str) - if not self.fmt then - return parse_date(str,self.us) - end - local res = {str:match(self.fmt)} - if #res==0 then return nil, 'cannot parse '..str end - local tab = {} - for i,v in ipairs(self.vars) do - local name = formats[v][1] -- e.g. 'y' becomes 'year' - tab[name] = tonumber(res[i]) - end - -- os.date() requires these fields; if not present, we assume - -- that the time set is for the current day. - if not (tab.year and tab.month and tab.year) then - local today = Date() - tab.year = tab.year or today:year() - tab.month = tab.month or today:month() - tab.day = tab.day or today:month() - end - local Y = tab.year - if Y < 100 then -- classic Y2K pivot - tab.year = Y + (Y < 35 and 2000 or 1999) - elseif not Y then - tab.year = 1970 - end - --dump(tab) - return Date(tab) -end - ---- convert a Date object into a string. --- @param d a date object, or a time value as returned by @{os.time} --- @return string -function Date.Format:tostring(d) - local tm = type(d) == 'number' and d or d.time - if self.outf then - return os.date(self.outf,tm) - else - return tostring(Date(d)) - end -end - -function Date.Format:US_order(yesno) - self.us = yesno -end - -local months = {jan=1,feb=2,mar=3,apr=4,may=5,jun=6,jul=7,aug=8,sep=9,oct=10,nov=11,dec=12} - ---[[ -Allowed patterns: -- [day] [monthname] [year] [time] -- [day]/[month][/year] [time] - -]] - - -local is_word = stringx.isalpha -local is_number = stringx.isdigit -local function tonum(s,l1,l2,kind) - kind = kind or '' - local n = tonumber(s) - if not n then error(("%snot a number: '%s'"):format(kind,s)) end - if n < l1 or n > l2 then - error(("%s out of range: %s is not between %d and %d"):format(kind,s,l1,l2)) - end - return n -end - -local function parse_iso_end(p,ns,sec) - -- may be fractional part of seconds - local _,nfrac,secfrac = p:find('^%.%d+',ns+1) - if secfrac then - sec = sec .. secfrac - p = p:sub(nfrac+1) - else - p = p:sub(ns+1) - end - -- ISO 8601 dates may end in Z (for UTC) or [+-][isotime] - if p:match 'z$' then return sec, {h=0,m=0} end -- we're UTC! - p = p:gsub(':','') -- turn 00:30 to 0030 - local _,_,sign,offs = p:find('^([%+%-])(%d+)') - if not sign then return sec, nil end -- not UTC - - if #offs == 2 then offs = offs .. '00' end -- 01 to 0100 - local tz = { h = tonumber(offs:sub(1,2)), m = tonumber(offs:sub(3,4)) } - if sign == '-' then tz.h = -tz.h; tz.m = -tz.m end - return sec, tz -end - -local function parse_date_unsafe (s,US) - s = s:gsub('T',' ') -- ISO 8601 - local parts = stringx.split(s:lower()) - local i,p = 1,parts[1] - local function nextp() i = i + 1; p = parts[i] end - local year,min,hour,sec,apm - local tz - local _,nxt,day, month = p:find '^(%d+)/(%d+)' - if day then - -- swop for US case - if US then - day, month = month, day - end - _,_,year = p:find('^/(%d+)',nxt+1) - nextp() - else -- ISO - year,month,day = p:match('^(%d+)%-(%d+)%-(%d+)') - if year then - nextp() - end - end - if p and not year and is_number(p) then -- has to be date - day = p - nextp() - end - if p and is_word(p) then - p = p:sub(1,3) - local mon = months[p] - if mon then - month = mon - else error("not a month: " .. p) end - nextp() - end - if p and not year and is_number(p) then - year = p - nextp() - end - - if p then -- time is hh:mm[:ss], hhmm[ss] or H.M[am|pm] - _,nxt,hour,min = p:find '^(%d+):(%d+)' - local ns - if nxt then -- are there seconds? - _,ns,sec = p:find ('^:(%d+)',nxt+1) - --if ns then - sec,tz = parse_iso_end(p,ns or nxt,sec) - --end - else -- might be h.m - _,ns,hour,min = p:find '^(%d+)%.(%d+)' - if ns then - apm = p:match '[ap]m$' - else -- or hhmm[ss] - local hourmin - _,nxt,hourmin = p:find ('^(%d+)') - if nxt then - hour = hourmin:sub(1,2) - min = hourmin:sub(3,4) - sec = hourmin:sub(5,6) - if #sec == 0 then sec = nil end - sec,tz = parse_iso_end(p,nxt,sec) - end - end - end - end - local today - if not (year and month and day) then - today = Date() - end - day = day and tonum(day,1,31,'day') or (month and 1 or today:day()) - month = month and tonum(month,1,12,'month') or today:month() - year = year and tonumber(year) or today:year() - if year < 100 then -- two-digit year pivot - year = year + (year < 35 and 2000 or 1900) - end - hour = hour and tonum(hour,1,apm and 12 or 24,'hour') or 12 - if apm == 'pm' then - hour = hour + 12 - end - min = min and tonum(min,1,60) or 0 - sec = sec and tonum(sec,1,60) or 0 - local res = Date {year = year, month = month, day = day, hour = hour, min = min, sec = sec} - if tz then -- ISO 8601 UTC time - res:toUTC() - res:add {hour = tz.h} - if tz.m ~= 0 then res:add {min = tz.m} end - end - return res -end - -function parse_date (s) - local ok, d = pcall(parse_date_unsafe,s) - if not ok then -- error - d = d:gsub('.-:%d+: ','') - return nil, d - else - return d - end -end - - -return Date - diff --git a/Utils/luarocks/share/lua/5.1/pl/List.lua b/Utils/luarocks/share/lua/5.1/pl/List.lua deleted file mode 100644 index 776f4d938..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/List.lua +++ /dev/null @@ -1,553 +0,0 @@ ---- Python-style list class.

    --- Based on original code by Nick Trout. ---

    --- Please Note: methods that change the list will return the list. --- This is to allow for method chaining, but please note that ls = ls:sort() --- does not mean that a new copy of the list is made. In-place (mutable) methods --- are marked as returning 'the list' in this documentation. ---

    --- See the Guide for further discussion ---

    --- See http://www.python.org/doc/current/tut/tut.html, section 5.1 ---

    --- Note: The comments before some of the functions are from the Python docs --- and contain Python code. ---

    --- Written for Lua version 4.0
    --- Redone for Lua 5.1, Steve Donovan. --- @class module --- @name pl.List --- @pragma nostrip - -local tinsert,tremove,concat,tsort = table.insert,table.remove,table.concat,table.sort -local setmetatable, getmetatable,type,tostring,assert,string,next = setmetatable,getmetatable,type,tostring,assert,string,next -local write = io.write -local tablex = require 'pl.tablex' -local filter,imap,imap2,reduce,transform,tremovevalues = tablex.filter,tablex.imap,tablex.imap2,tablex.reduce,tablex.transform,tablex.removevalues -local tablex = tablex -local tsub = tablex.sub -local utils = require 'pl.utils' -local function_arg = utils.function_arg -local is_type = utils.is_type -local split = utils.split -local assert_arg = utils.assert_arg -local normalize_slice = tablex._normalize_slice - ---[[ -module ('pl.List',utils._module) -]] - -local Multimap = utils.stdmt.MultiMap --- metatable for our list objects -local List = utils.stdmt.List -List.__index = List -List._class = List - -local iter - --- we give the metatable its own metatable so that we can call it like a function! -setmetatable(List,{ - __call = function (tbl,arg) - return List.new(arg) - end, -}) - -local function makelist (t,obj) - local klass = List - if obj then - klass = getmetatable(obj) - end - return setmetatable(t,klass) -end - -local function is_list(t) - return getmetatable(t) == List -end - -local function simple_table(t) - return type(t) == 'table' and not is_list(t) and #t > 0 -end - -function List:_init (src) - if src then - for v in iter(src) do - tinsert(self,v) - end - end -end - ---- Create a new list. Can optionally pass a table; --- passing another instance of List will cause a copy to be created --- we pass anything which isn't a simple table to iterate() to work out --- an appropriate iterator @see List.iterate --- @param t An optional list-like table --- @return a new List --- @usage ls = List(); ls = List {1,2,3,4} -function List.new(t) - local ls - if not simple_table(t) then - ls = {} - List._init(ls,t) - else - ls = t - end - makelist(ls) - return ls -end - -function List:clone() - local ls = makelist({},self) - List._init(ls,self) - return ls -end - -function List.default_map_with(T) - return function(self,name) - local f = T[name] - if f then - return function(self,...) - return self:map(f,...) - end - else - error("method not found: "..name,2) - end - end -end - - ----Add an item to the end of the list. --- @param i An item --- @return the list -function List:append(i) - tinsert(self,i) - return self -end - -List.push = tinsert - ---- Extend the list by appending all the items in the given list. --- equivalent to 'a[len(a):] = L'. --- @param L Another List --- @return the list -function List:extend(L) - assert_arg(1,L,'table') - for i = 1,#L do tinsert(self,L[i]) end - return self -end - ---- Insert an item at a given position. i is the index of the --- element before which to insert. --- @param i index of element before whichh to insert --- @param x A data item --- @return the list -function List:insert(i, x) - assert_arg(1,i,'number') - tinsert(self,i,x) - return self -end - ---- Insert an item at the begining of the list. --- @param x a data item --- @return the list -function List:put (x) - return self:insert(1,x) -end - ---- Remove an element given its index. --- (equivalent of Python's del s[i]) --- @param i the index --- @return the list -function List:remove (i) - assert_arg(1,i,'number') - tremove(self,i) - return self -end - ---- Remove the first item from the list whose value is given. --- (This is called 'remove' in Python; renamed to avoid confusion --- with table.remove) --- Return nil if there is no such item. --- @param x A data value --- @return the list -function List:remove_value(x) - for i=1,#self do - if self[i]==x then tremove(self,i) return self end - end - return self - end - ---- Remove the item at the given position in the list, and return it. --- If no index is specified, a:pop() returns the last item in the list. --- The item is also removed from the list. --- @param i An index --- @return the item -function List:pop(i) - if not i then i = #self end - assert_arg(1,i,'number') - return tremove(self,i) -end - -List.get = List.pop - ---- Return the index in the list of the first item whose value is given. --- Return nil if there is no such item. --- @class function --- @name List:index --- @param x A data value --- @param idx where to start search (default 1) --- @return the index, or nil if not found. - -local tfind = tablex.find -List.index = tfind - ---- does this list contain the value?. --- @param x A data value --- @return true or false -function List:contains(x) - return tfind(self,x) and true or false -end - ---- Return the number of times value appears in the list. --- @param x A data value --- @return number of times x appears -function List:count(x) - local cnt=0 - for i=1,#self do - if self[i]==x then cnt=cnt+1 end - end - return cnt -end - ---- Sort the items of the list, in place. --- @param cmp an optional comparison function; '<' is used if not given. --- @return the list -function List:sort(cmp) - tsort(self,cmp) - return self -end - ---- Reverse the elements of the list, in place. --- @return the list -function List:reverse() - local t = self - local n = #t - local n2 = n/2 - for i = 1,n2 do - local k = n-i+1 - t[i],t[k] = t[k],t[i] - end - return self -end - ---- Emulate list slicing. like 'list[first:last]' in Python. --- If first or last are negative then they are relative to the end of the list --- eg. slice(-2) gives last 2 entries in a list, and --- slice(-4,-2) gives from -4th to -2nd --- @param first An index --- @param last An index --- @return a new List -function List:slice(first,last) - return tsub(self,first,last) -end - ---- empty the list. --- @return the list -function List:clear() - for i=1,#self do tremove(self,i) end - return self -end - -local eps = 1.0e-10 - ---- Emulate Python's range(x) function. --- Include it in List table for tidiness --- @param start A number --- @param finish A number greater than start; if zero, then 0..start-1 --- @param incr an optional increment (may be less than 1) --- @usage List.range(0,3) == List {0,1,2,3} -function List.range(start,finish,incr) - if not finish then - start = 0 - finish = finish - 1 - end - if incr then - if not utils.is_integer(incr) then finish = finish + eps end - else - incr = 1 - end - assert_arg(1,start,'number') - assert_arg(2,finish,'number') - local t = List.new() - for i=start,finish,incr do tinsert(t,i) end - return t -end - ---- list:len() is the same as #list. -function List:len() - return #self -end - --- Extended operations -- - ---- Remove a subrange of elements. --- equivalent to 'del s[i1:i2]' in Python. --- @param i1 start of range --- @param i2 end of range --- @return the list -function List:chop(i1,i2) - return tremovevalues(self,i1,i2) -end - ---- Insert a sublist into a list --- equivalent to 's[idx:idx] = list' in Python --- @param idx index --- @param list list to insert --- @return the list --- @usage l = List{10,20}; l:splice(2,{21,22}); assert(l == List{10,21,22,20}) -function List:splice(idx,list) - assert_arg(1,idx,'number') - idx = idx - 1 - local i = 1 - for v in iter(list) do - tinsert(self,i+idx,v) - i = i + 1 - end - return self -end - ---- general slice assignment s[i1:i2] = seq. --- @param i1 start index --- @param i2 end index --- @param seq a list --- @return the list -function List:slice_assign(i1,i2,seq) - assert_arg(1,i1,'number') - assert_arg(1,i2,'number') - i1,i2 = normalize_slice(self,i1,i2) - if i2 >= i1 then self:chop(i1,i2) end - self:splice(i1,seq) - return self -end - ---- concatenation operator. --- @param L another List --- @return a new list consisting of the list with the elements of the new list appended -function List:__concat(L) - assert_arg(1,L,'table') - local ls = self:clone() - ls:extend(L) - return ls -end - ---- equality operator ==. True iff all elements of two lists are equal. --- @param L another List --- @return true or false -function List:__eq(L) - if #self ~= #L then return false end - for i = 1,#self do - if self[i] ~= L[i] then return false end - end - return true -end - ---- join the elements of a list using a delimiter.
    --- This method uses tostring on all elements. --- @param delim a delimiter string, can be empty. --- @return a string -function List:join (delim) - delim = delim or '' - assert_arg(1,delim,'string') - return concat(imap(tostring,self),delim) -end - ---- join a list of strings.
    --- Uses table.concat directly. --- @class function --- @name List:concat --- @param delim a delimiter --- @return a string -List.concat = concat - -local function tostring_q(val) - local s = tostring(val) - if type(val) == 'string' then - s = '"'..s..'"' - end - return s -end - ---- how our list should be rendered as a string. Uses join(). --- @see List:join -function List:__tostring() - return '{'..self:join(',',tostring_q)..'}' -end - ---[[ --- NOTE: this works, but is unreliable. If you leave the loop before finishing, --- then the iterator is not reset. ---- can iterate over a list directly. --- @usage for v in ls do print(v) end -function List:__call() - if not self.key then self.key = 1 end - local value = self[self.key] - self.key = self.key + 1 - if not value then self.key = nil end - return value -end ---]] - ---[[ -function List.__call(t,v,i) - i = (i or 0) + 1 - v = t[i] - if v then return i, v end -end ---]] - ---- call the function for each element of the list. --- @param fun a function or callable object --- @param ... optional values to pass to function -function List:foreach (fun,...) - local t = self - fun = function_arg(1,fun) - for i = 1,#t do - fun(t[i],...) - end -end - ---- create a list of all elements which match a function. --- @param fun a boolean function --- @param arg optional argument to be passed as second argument of the predicate --- @return a new filtered list. -function List:filter (fun,arg) - return makelist(filter(self,fun,arg),self) -end - ---- split a string using a delimiter. --- @param s the string --- @param delim the delimiter (default spaces) --- @return a List of strings --- @see pl.utils.split -function List.split (s,delim) - assert_arg(1,s,'string') - return makelist(split(s,delim)) -end - ---- apply a function to all elements. --- Any extra arguments will be passed to the function --- @param fun a function of at least one argument --- @param ... arbitrary extra arguments. --- @return a new list: {f(x) for x in self} --- @see pl.tablex.imap -function List:map (fun,...) - return makelist(imap(fun,self,...),self) -end - ---- apply a function to all elements, in-place. --- Any extra arguments are passed to the function. --- @param fun A function that takes at least one argument --- @param ... arbitrary extra arguments. -function List:transform (fun,...) - transform(fun,self,...) -end - ---- apply a function to elements of two lists. --- Any extra arguments will be passed to the function --- @param fun a function of at least two arguments --- @param ls another list --- @param ... arbitrary extra arguments. --- @return a new list: {f(x,y) for x in self, for x in arg1} --- @see pl.tablex.imap2 -function List:map2 (fun,ls,...) - return makelist(imap2(fun,self,ls,...),self) -end - ---- apply a named method to all elements. --- Any extra arguments will be passed to the method. --- @param name name of method --- @param ... extra arguments --- @return a new list of the results --- @see pl.seq.mapmethod -function List:mapm (name,...) - local res = {} - local t = self - for i = 1,#t do - local val = t[i] - local fn = val[name] - if not fn then error(type(val).." does not have method "..name,2) end - res[i] = fn(val,...) - end - return makelist(res,self) -end - ---- 'reduce' a list using a binary function. --- @param fun a function of two arguments --- @return result of the function --- @see pl.tablex.reduce -function List:reduce (fun) - return reduce(fun,self) -end - ---- partition a list using a classifier function. --- The function may return nil, but this will be converted to the string key ''. --- @param fun a function of at least one argument --- @param ... will also be passed to the function --- @return a table where the keys are the returned values, and the values are Lists --- of values where the function returned that key. It is given the type of Multimap. --- @see pl.MultiMap -function List:partition (fun,...) - fun = function_arg(1,fun) - local res = {} - for i = 1,#self do - local val = self[i] - local klass = fun(val,...) - if klass == nil then klass = '' end - if not res[klass] then res[klass] = List() end - res[klass]:append(val) - end - return setmetatable(res,Multimap) -end - ---- return an iterator over all values. -function List:iter () - return iter(self) -end - ---- Create an iterator over a seqence. --- This captures the Python concept of 'sequence'. --- For tables, iterates over all values with integer indices. --- @param seq a sequence; a string (over characters), a table, a file object (over lines) or an iterator function --- @usage for x in iterate {1,10,22,55} do io.write(x,',') end ==> 1,10,22,55 --- @usage for ch in iterate 'help' do do io.write(ch,' ') end ==> h e l p -function List.iterate(seq) - if type(seq) == 'string' then - local idx = 0 - local n = #seq - local sub = string.sub - return function () - idx = idx + 1 - if idx > n then return nil - else - return sub(seq,idx,idx) - end - end - elseif type(seq) == 'table' then - local idx = 0 - local n = #seq - return function() - idx = idx + 1 - if idx > n then return nil - else - return seq[idx] - end - end - elseif type(seq) == 'function' then - return seq - elseif type(seq) == 'userdata' and io.type(seq) == 'file' then - return seq:lines() - end -end -iter = List.iterate - -return List - diff --git a/Utils/luarocks/share/lua/5.1/pl/Map.lua b/Utils/luarocks/share/lua/5.1/pl/Map.lua deleted file mode 100644 index 8b7284037..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/Map.lua +++ /dev/null @@ -1,108 +0,0 @@ ---- A Map class. --- @class module --- @name pl.Map - ---[[ -module ('pl.Map') -]] -local tablex = require 'pl.tablex' -local utils = require 'pl.utils' -local stdmt = utils.stdmt -local is_callable = utils.is_callable -local tmakeset,deepcompare,merge,keys,difference,tupdate = tablex.makeset,tablex.deepcompare,tablex.merge,tablex.keys,tablex.difference,tablex.update - -local pretty_write = require 'pl.pretty' . write -local Map = stdmt.Map -local Set = stdmt.Set -local List = stdmt.List - -local class = require 'pl.class' - --- the Map class --------------------- -class(nil,nil,Map) - -local function makemap (m) - return setmetatable(m,Map) -end - -function Map:_init (t) - local mt = getmetatable(t) - if mt == Set or mt == Map then - self:update(t) - else - return t -- otherwise assumed to be a map-like table - end -end - - -local function makelist(t) - return setmetatable(t,List) -end - ---- list of keys. -Map.keys = tablex.keys - ---- list of values. -Map.values = tablex.values - ---- return an iterator over all key-value pairs. -function Map:iter () - return pairs(self) -end - ---- return a List of all key-value pairs, sorted by the keys. -function Map:items() - local ls = makelist(tablex.pairmap (function (k,v) return makelist {k,v} end, self)) - ls:sort(function(t1,t2) return t1[1] < t2[1] end) - return ls -end - --- Will return the existing value, or if it doesn't exist it will set --- a default value and return it. -function Map:setdefault(key, defaultval) - return self[key] or self:set(key,defaultval) or defaultval -end - ---- size of map. --- note: this is a relatively expensive operation! --- @class function --- @name Map:len -Map.len = tablex.size - ---- put a value into the map. --- @param key the key --- @param val the value -function Map:set (key,val) - self[key] = val -end - ---- get a value from the map. --- @param key the key --- @return the value, or nil if not found. -function Map:get (key) - return rawget(self,key) -end - -local index_by = tablex.index_by - --- get a list of values indexed by a list of keys. --- @param keys a list-like table of keys --- @return a new list -function Map:getvalues (keys) - return makelist(index_by(self,keys)) -end - -Map.iter = pairs - -Map.update = tablex.update - -function Map:__eq (m) - -- note we explicitly ask deepcompare _not_ to use __eq! - return deepcompare(self,m,true) -end - -function Map:__tostring () - return pretty_write(self,'') -end - -return Map diff --git a/Utils/luarocks/share/lua/5.1/pl/MultiMap.lua b/Utils/luarocks/share/lua/5.1/pl/MultiMap.lua deleted file mode 100644 index f1c430db5..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/MultiMap.lua +++ /dev/null @@ -1,65 +0,0 @@ ---- MultiMap, a Map which has multiple values per key.
    --- @class module --- @name pl.MultiMap - ---[[ -module ('pl.MultiMap') -]] - -local classes = require 'pl.class' -local tablex = require 'pl.tablex' -local utils = require 'pl.utils' -local List = require 'pl.List' - -local index_by,tsort,concat = tablex.index_by,table.sort,table.concat -local append,extend,slice = List.append,List.extend,List.slice -local append = table.insert -local is_type = utils.is_type - -local class = require 'pl.class' -local Map = require 'pl.Map' - --- MultiMap is a standard MT -local MultiMap = utils.stdmt.MultiMap - -class(Map,nil,MultiMap) -MultiMap._name = 'MultiMap' - -function MultiMap:_init (t) - if not t then return end - self:update(t) -end - ---- update a MultiMap using a table. --- @param t either a Multimap or a map-like table. --- @return the map -function MultiMap:update (t) - utils.assert_arg(1,t,'table') - if Map:class_of(t) then - for k,v in pairs(t) do - self[k] = List() - self[k]:append(v) - end - else - for k,v in pairs(t) do - self[k] = List(v) - end - end -end - ---- add a new value to a key. Setting a nil value removes the key. --- @param key the key --- @param val the value --- @return the map -function MultiMap:set (key,val) - if val == nil then - self[key] = nil - else - if not self[key] then - self[key] = List() - end - self[key]:append(val) - end -end - -return MultiMap diff --git a/Utils/luarocks/share/lua/5.1/pl/OrderedMap.lua b/Utils/luarocks/share/lua/5.1/pl/OrderedMap.lua deleted file mode 100644 index 7cc79635a..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/OrderedMap.lua +++ /dev/null @@ -1,150 +0,0 @@ ---- OrderedMap, a pl.Map which preserves ordering. --- @class module --- @name pl.OrderedMap - ---[[ -module ('pl.OrderedMap') -]] - -local tablex = require 'pl.tablex' -local utils = require 'pl.utils' -local List = require 'pl.List' -local index_by,tsort,concat = tablex.index_by,table.sort,table.concat - -local class = require 'pl.class' -local Map = require 'pl.Map' - -local OrderedMap = class(Map) -OrderedMap._name = 'OrderedMap' - ---- construct an OrderedMap. --- Will throw an error if the argument is bad. --- @param t optional initialization table, same as for @{OrderedMap:update} -function OrderedMap:_init (t) - self._keys = List() - if t then - local map,err = self:update(t) - if not map then error(err,2) end - end -end - -local assert_arg,raise = utils.assert_arg,utils.raise - ---- update an OrderedMap using a table.
    --- If the table is itself an OrderedMap, then its entries will be appended.
    --- if it s a table of the form {{key1=val1},{key2=val2},...} these will be appended.
    --- Otherwise, it is assumed to be a map-like table, and order of extra entries is arbitrary. --- @param t a table. --- @return the map, or nil in case of error --- @return the error message -function OrderedMap:update (t) - assert_arg(1,t,'table') - if OrderedMap:class_of(t) then - for k,v in t:iter() do - self:set(k,v) - end - elseif #t > 0 then -- an array must contain {key=val} tables - if type(t[1]) == 'table' then - for _,pair in ipairs(t) do - local key,value = next(pair) - if not key then return raise 'empty pair initialization table' end - self:set(key,value) - end - else - return raise 'cannot use an array to initialize an OrderedMap' - end - else - for k,v in pairs(t) do - self:set(k,v) - end - end - return self -end - ---- set the key's value. This key will be appended at the end of the map.
    --- If the value is nil, then the key is removed. --- @param key the key --- @param val the value --- @return the map -function OrderedMap:set (key,val) - if not self[key] and val ~= nil then -- ensure that keys are unique - self._keys:append(key) - elseif val == nil then -- removing a key-value pair - self._keys:remove_value(key) - end - self[key] = val - return self -end - ---- insert a key/value pair before a given position. --- Note: if the map already contains the key, then this effectively --- moves the item to the new position by first removing at the old position. --- Has no effect if the key does not exist and val is nil --- @param pos a position starting at 1 --- @param key the key --- @param val the value; if nil use the old value -function OrderedMap:insert (pos,key,val) - local oldval = self[key] - val = val or oldval - if oldval then - self._keys:remove_value(key) - end - if val then - self._keys:insert(pos,key) - self[key] = val - end - return self -end - ---- return the keys in order. --- (Not a copy!) --- @return List -function OrderedMap:keys () - return self._keys -end - ---- return the values in order. --- this is relatively expensive. --- @return List -function OrderedMap:values () - return List(index_by(self,self._keys)) -end - ---- sort the keys. --- @param cmp a comparison function as for @{table.sort} --- @return the map -function OrderedMap:sort (cmp) - tsort(self._keys,cmp) - return self -end - ---- iterate over key-value pairs in order. -function OrderedMap:iter () - local i = 0 - local keys = self._keys - local n,idx = #keys - return function() - i = i + 1 - if i > #keys then return nil end - idx = keys[i] - return idx,self[idx] - end -end - -function OrderedMap:__tostring () - local res = {} - for i,v in ipairs(self._keys) do - local val = self[v] - local vs = tostring(val) - if type(val) ~= 'number' then - vs = '"'..vs..'"' - end - res[i] = tostring(v)..'='..vs - end - return '{'..concat(res,',')..'}' -end - -return OrderedMap - - - diff --git a/Utils/luarocks/share/lua/5.1/pl/Set.lua b/Utils/luarocks/share/lua/5.1/pl/Set.lua deleted file mode 100644 index fd6de90ba..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/Set.lua +++ /dev/null @@ -1,127 +0,0 @@ ----- A Set class. --- @class module --- @name pl.Set - ---[[ -module ('pl.Set') -]] -local tablex = require 'pl.tablex' -local utils = require 'pl.utils' -local stdmt = utils.stdmt -local tmakeset,deepcompare,merge,keys,difference,tupdate = tablex.makeset,tablex.deepcompare,tablex.merge,tablex.keys,tablex.difference,tablex.update -local Map = stdmt.Map -local Set = stdmt.Set -local List = stdmt.List -local class = require 'pl.class' - --- the Set class -------------------- -class(Map,nil,Set) - -local function makeset (t) - return setmetatable(t,Set) -end - ---- create a set.
    --- @param t may be a Set, Map or list-like table. --- @class function --- @name Set -function Set:_init (t) - local mt = getmetatable(t) - if mt == Set or mt == Map then - for k in pairs(t) do self[k] = true end - else - for _,v in ipairs(t) do self[v] = true end - end -end - -function Set:__tostring () - return '['..self:keys():join ','..']' -end - ---- add a value to a set. --- @param key a value -function Set:set (key) - self[key] = true -end - ---- remove a value from a set. --- @param key a value -function Set:unset (key) - self[key] = nil -end - ---- get a list of the values in a set. --- @class function --- @name Set:values -Set.values = Map.keys - ---- map a function over the values of a set. --- @param fn a function --- @param ... extra arguments to pass to the function. --- @return a new set -function Set:map (fn,...) - fn = utils.function_arg(1,fn) - local res = {} - for k in pairs(self) do - res[fn(k,...)] = true - end - return makeset(res) -end - ---- union of two sets (also +). --- @param set another set --- @return a new set -function Set:union (set) - return merge(self,set,true) -end -Set.__add = Set.union - ---- intersection of two sets (also *). --- @param set another set --- @return a new set -function Set:intersection (set) - return merge(self,set,false) -end -Set.__mul = Set.intersection - ---- new set with elements in the set that are not in the other (also -). --- @param set another set --- @return a new set -function Set:difference (set) - return difference(self,set,false) -end -Set.__sub = Set.difference - --- a new set with elements in _either_ the set _or_ other but not both (also ^). --- @param set another set --- @return a new set -function Set:symmetric_difference (set) - return difference(self,set,true) -end -Set.__pow = Set.symmetric_difference - ---- is the first set a subset of the second?. --- @return true or false -function Set:issubset (set) - for k in pairs(self) do - if not set[k] then return false end - end - return true -end -Set.__lt = Set.subset - ---- is the set empty?. --- @return true or false -function Set:issempty () - return next(self) == nil -end - ---- are the sets disjoint? (no elements in common). --- Uses naive definition, i.e. that intersection is empty --- @param set another set --- @return true or false -function Set:isdisjoint (set) - return self:intersection(set):isempty() -end - -return Set diff --git a/Utils/luarocks/share/lua/5.1/pl/app.lua b/Utils/luarocks/share/lua/5.1/pl/app.lua deleted file mode 100644 index 845255094..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/app.lua +++ /dev/null @@ -1,143 +0,0 @@ ---- Application support functions. ---

    See the Guide --- @class module --- @name pl.app - -local io,package,require = _G.io, _G.package, _G.require -local utils = require 'pl.utils' -local path = require 'pl.path' -local lfs = require 'lfs' - - -local app = {} - -local function check_script_name () - if _G.arg == nil then error('no command line args available\nWas this run from a main script?') end - return _G.arg[0] -end - ---- add the current script's path to the Lua module path. --- Applies to both the source and the binary module paths. It makes it easy for --- the main file of a multi-file program to access its modules in the same directory. --- `base` allows these modules to be put in a specified subdirectory, to allow for --- cleaner deployment and resolve potential conflicts between a script name and its --- library directory. --- @param base optional base directory. --- @return the current script's path with a trailing slash -function app.require_here (base) - local p = path.dirname(check_script_name()) - if not path.isabs(p) then - p = path.join(lfs.currentdir(),p) - end - if p:sub(-1,-1) ~= path.sep then - p = p..path.sep - end - if base then - p = p..base..path.sep - end - local so_ext = path.is_windows and 'dll' or 'so' - local lsep = package.path:find '^;' and '' or ';' - local csep = package.cpath:find '^;' and '' or ';' - package.path = ('%s?.lua;%s?%sinit.lua%s%s'):format(p,p,path.sep,lsep,package.path) - package.cpath = ('%s?.%s%s%s'):format(p,so_ext,csep,package.cpath) - return p -end - ---- return a suitable path for files private to this application. --- These will look like '~/.SNAME/file', with '~' as with expanduser and --- SNAME is the name of the script without .lua extension. --- @param file a filename (w/out path) --- @return a full pathname, or nil --- @return 'cannot create' error -function app.appfile (file) - local sname = path.basename(check_script_name()) - local name,ext = path.splitext(sname) - local dir = path.join(path.expanduser('~'),'.'..name) - if not path.isdir(dir) then - local ret = lfs.mkdir(dir) - if not ret then return utils.raise ('cannot create '..dir) end - end - return path.join(dir,file) -end - ---- return string indicating operating system. --- @return 'Windows','OSX' or whatever uname returns (e.g. 'Linux') -function app.platform() - if path.is_windows then - return 'Windows' - else - local f = io.popen('uname') - local res = f:read() - if res == 'Darwin' then res = 'OSX' end - f:close() - return res - end -end - ---- parse command-line arguments into flags and parameters. --- Understands GNU-style command-line flags; short (-f) and long (--flag). --- These may be given a value with either '=' or ':' (-k:2,--alpha=3.2,-n2); --- note that a number value can be given without a space. --- Multiple short args can be combined like so: (-abcd). --- @param args an array of strings (default is the global 'arg') --- @param flags_with_values any flags that take values, e.g. {out=true} --- @return a table of flags (flag=value pairs) --- @return an array of parameters --- @raise if args is nil, then the global `args` must be available! -function app.parse_args (args,flags_with_values) - if not args then - args = _G.arg - if not args then error "Not in a main program: 'arg' not found" end - end - flags_with_values = flags_with_values or {} - local _args = {} - local flags = {} - local i = 1 - while i <= #args do - local a = args[i] - local v = a:match('^-(.+)') - local is_long - if v then -- we have a flag - if v:find '^-' then - is_long = true - v = v:sub(2) - end - if flags_with_values[v] then - if i == #_args or args[i+1]:find '^-' then - return utils.raise ("no value for '"..v.."'") - end - flags[v] = args[i+1] - i = i + 1 - else - -- a value can be indicated with = or : - local var,val = utils.splitv (v,'[=:]') - var = var or v - val = val or true - if not is_long then - if #var > 1 then - if var:find '.%d+' then -- short flag, number value - val = var:sub(2) - var = var:sub(1,1) - else -- multiple short flags - for i = 1,#var do - flags[var:sub(i,i)] = true - end - val = nil -- prevents use of var as a flag below - end - else -- single short flag (can have value, defaults to true) - val = val or true - end - end - if val then - flags[var] = val - end - end - else - _args[#_args+1] = a - end - i = i + 1 - end - return flags,_args -end - -return app diff --git a/Utils/luarocks/share/lua/5.1/pl/array2d.lua b/Utils/luarocks/share/lua/5.1/pl/array2d.lua deleted file mode 100644 index e178df975..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/array2d.lua +++ /dev/null @@ -1,391 +0,0 @@ ---- Operations on two-dimensional arrays. --- @class module --- @name pl.array2d - -local require, type,tonumber,assert,tostring,io,ipairs,string,table = - _G.require, _G.type,_G.tonumber,_G.assert,_G.tostring,_G.io,_G.ipairs,_G.string,_G.table -local ops = require 'pl.operator' -local tablex = require 'pl.tablex' -local utils = require 'pl.utils' - -local imap,tmap,reduce,keys,tmap2,tset,index_by = tablex.imap,tablex.map,tablex.reduce,tablex.keys,tablex.map2,tablex.set,tablex.index_by -local remove = table.remove -local perm = require 'pl.permute' -local splitv,fprintf,assert_arg = utils.splitv,utils.fprintf,utils.assert_arg -local byte = string.byte -local stdout = io.stdout - ---[[ -module ('pl.array2d',utils._module) -]] - -local array2d = {} - ---- extract a column from the 2D array. --- @param a 2d array --- @param key an index or key --- @return 1d array -function array2d.column (a,key) - assert_arg(1,a,'table') - return imap(ops.index,a,key) -end -local column = array2d.column - ---- map a function over a 2D array --- @param f a function of at least one argument --- @param a 2d array --- @param arg an optional extra argument to be passed to the function. --- @return 2d array -function array2d.map (f,a,arg) - assert_arg(1,a,'table') - f = utils.function_arg(1,f) - return imap(function(row) return imap(f,row,arg) end, a) -end - ---- reduce the rows using a function. --- @param f a binary function --- @param a 2d array --- @return 1d array --- @see pl.tablex.reduce -function array2d.reduce_rows (f,a) - assert_arg(1,a,'table') - return tmap(function(row) return reduce(f,row) end, a) -end - - - ---- reduce the columns using a function. --- @param f a binary function --- @param a 2d array --- @return 1d array --- @see pl.tablex.reduce -function array2d.reduce_cols (f,a) - assert_arg(1,a,'table') - return tmap(function(c) return reduce(f,column(a,c)) end, keys(a[1])) -end - ---- reduce a 2D array into a scalar, using two operations. --- @param opc operation to reduce the final result --- @param opr operation to reduce the rows --- @param a 2D array -function array2d.reduce2 (opc,opr,a) - assert_arg(3,a,'table') - local tmp = array2d.reduce_rows(opr,a) - return reduce(opc,tmp) -end - -local function dimension (t) - return type(t[1])=='table' and 2 or 1 -end - ---- map a function over two arrays. --- They can be both or either 2D arrays --- @param f function of at least two arguments --- @param ad order of first array --- @param bd order of second array --- @param a 1d or 2d array --- @param b 1d or 2d array --- @param arg optional extra argument to pass to function --- @return 2D array, unless both arrays are 1D -function array2d.map2 (f,ad,bd,a,b,arg) - assert_arg(1,a,'table') - assert_arg(2,b,'table') - f = utils.function_arg(1,f) - --local ad,bd = dimension(a),dimension(b) - if ad == 1 and bd == 2 then - return imap(function(row) - return tmap2(f,a,row,arg) - end, b) - elseif ad == 2 and bd == 1 then - return imap(function(row) - return tmap2(f,row,b,arg) - end, a) - elseif ad == 1 and bd == 1 then - return tmap2(f,a,b) - elseif ad == 2 and bd == 2 then - return tmap2(function(rowa,rowb) - return tmap2(f,rowa,rowb,arg) - end, a,b) - end -end - ---- cartesian product of two 1d arrays. --- @param f a function of 2 arguments --- @param t1 a 1d table --- @param t2 a 1d table --- @return 2d table --- @usage product('..',{1,2},{'a','b'}) == {{'1a','2a'},{'1b','2b'}} -function array2d.product (f,t1,t2) - f = utils.function_arg(1,f) - assert_arg(2,t1,'table') - assert_arg(3,t2,'table') - local res, map = {}, tablex.map - for i,v in ipairs(t2) do - res[i] = map(f,t1,v) - end - return res -end - ---- flatten a 2D array. --- (this goes over columns first.) --- @param t 2d table --- @return a 1d table --- @usage flatten {{1,2},{3,4},{5,6}} == {1,2,3,4,5,6} -function array2d.flatten (t) - local res = {} - local k = 1 - for _,a in ipairs(t) do -- for all rows - for i = 1,#a do - res[k] = a[i] - k = k + 1 - end - end - return res -end - ---- swap two rows of an array. --- @param t a 2d array --- @param i1 a row index --- @param i2 a row index -function array2d.swap_rows (t,i1,i2) - assert_arg(1,t,'table') - t[i1],t[i2] = t[i2],t[i1] -end - ---- swap two columns of an array. --- @param t a 2d array --- @param j1 a column index --- @param j2 a column index -function array2d.swap_cols (t,j1,j2) - assert_arg(1,t,'table') - for i = 1,#t do - local row = t[i] - row[j1],row[j2] = row[j2],row[j1] - end -end - ---- extract the specified rows. --- @param t 2d array --- @param ridx a table of row indices -function array2d.extract_rows (t,ridx) - return index_by(t,ridx) -end - ---- extract the specified columns. --- @param t 2d array --- @param cidx a table of column indices -function array2d.extract_cols (t,cidx) - assert_arg(1,t,'table') - for i = 1,#t do - t[i] = index_by(t[i],cidx) - end -end - ---- remove a row from an array. --- @class function --- @name array2d.remove_row --- @param t a 2d array --- @param i a row index -array2d.remove_row = remove - ---- remove a column from an array. --- @param t a 2d array --- @param j a column index -function array2d.remove_col (t,j) - assert_arg(1,t,'table') - for i = 1,#t do - remove(t[i],j) - end -end - -local Ai = byte 'A' - -local function _parse (s) - local c,r - if s:sub(1,1) == 'R' then - r,c = s:match 'R(%d+)C(%d+)' - r,c = tonumber(r),tonumber(c) - else - c,r = s:match '(.)(.)' - c = byte(c) - byte 'A' + 1 - r = tonumber(r) - end - assert(c ~= nil and r ~= nil,'bad cell specifier: '..s) - return r,c -end - ---- parse a spreadsheet range. --- The range can be specified either as 'A1:B2' or 'R1C1:R2C2'; --- a special case is a single element (e.g 'A1' or 'R1C1') --- @param s a range. --- @return start col --- @return start row --- @return end col --- @return end row -function array2d.parse_range (s) - if s:find ':' then - local start,finish = splitv(s,':') - local i1,j1 = _parse(start) - local i2,j2 = _parse(finish) - return i1,j1,i2,j2 - else -- single value - local i,j = _parse(s) - return i,j - end -end - ---- get a slice of a 2D array using spreadsheet range notation. @see parse_range --- @param t a 2D array --- @param rstr range expression --- @return a slice --- @see array2d.parse_range --- @see array2d.slice -function array2d.range (t,rstr) - assert_arg(1,t,'table') - local i1,j1,i2,j2 = array2d.parse_range(rstr) - if i2 then - return array2d.slice(t,i1,j1,i2,j2) - else -- single value - return t[i1][j1] - end -end - -local function default_range (t,i1,j1,i2,j2) - assert(t and type(t)=='table','not a table') - i1,j1 = i1 or 1, j1 or 1 - i2,j2 = i2 or #t, j2 or #t[1] - return i1,j1,i2,j2 -end - ---- get a slice of a 2D array. Note that if the specified range has --- a 1D result, the rank of the result will be 1. --- @param t a 2D array --- @param i1 start row (default 1) --- @param j1 start col (default 1) --- @param i2 end row (default N) --- @param j2 end col (default M) --- @return an array, 2D in general but 1D in special cases. -function array2d.slice (t,i1,j1,i2,j2) - assert_arg(1,t,'table') - i1,j1,i2,j2 = default_range(t,i1,j1,i2,j2) - local res = {} - for i = i1,i2 do - local val - local row = t[i] - if j1 == j2 then - val = row[j1] - else - val = {} - for j = j1,j2 do - val[#val+1] = row[j] - end - end - res[#res+1] = val - end - if i1 == i2 then res = res[1] end - return res -end - ---- set a specified range of an array to a value. --- @param t a 2D array --- @param value the value --- @param i1 start row (default 1) --- @param j1 start col (default 1) --- @param i2 end row (default N) --- @param j2 end col (default M) -function array2d.set (t,value,i1,j1,i2,j2) - i1,j1,i2,j2 = default_range(t,i1,j1,i2,j2) - for i = i1,i2 do - tset(t[i],value) - end -end - ---- write a 2D array to a file. --- @param t a 2D array --- @param f a file object (default stdout) --- @param fmt a format string (default is just to use tostring) --- @param i1 start row (default 1) --- @param j1 start col (default 1) --- @param i2 end row (default N) --- @param j2 end col (default M) -function array2d.write (t,f,fmt,i1,j1,i2,j2) - assert_arg(1,t,'table') - f = f or stdout - local rowop - if fmt then - rowop = function(row,j) fprintf(f,fmt,row[j]) end - else - rowop = function(row,j) f:write(tostring(row[j]),' ') end - end - local function newline() - f:write '\n' - end - array2d.forall(t,rowop,newline,i1,j1,i2,j2) -end - ---- perform an operation for all values in a 2D array. --- @param t 2D array --- @param row_op function to call on each value --- @param end_row_op function to call at end of each row --- @param i1 start row (default 1) --- @param j1 start col (default 1) --- @param i2 end row (default N) --- @param j2 end col (default M) -function array2d.forall (t,row_op,end_row_op,i1,j1,i2,j2) - assert_arg(1,t,'table') - i1,j1,i2,j2 = default_range(t,i1,j1,i2,j2) - for i = i1,i2 do - local row = t[i] - for j = j1,j2 do - row_op(row,j) - end - if end_row_op then end_row_op(i) end - end -end - ---- iterate over all elements in a 2D array, with optional indices. --- @param a 2D array --- @param indices with indices (default false) --- @param i1 start row (default 1) --- @param j1 start col (default 1) --- @param i2 end row (default N) --- @param j2 end col (default M) --- @return either value or i,j,value depending on indices -function array2d.iter (a,indices,i1,j1,i2,j2) - assert_arg(1,a,'table') - local norowset = not (i2 and j2) - i1,j1,i2,j2 = default_range(a,i1,j1,i2,j2) - local n,i,j = i2-i1+1,i1-1,j1-1 - local row,nr = nil,0 - local onr = j2 - j1 + 1 - return function() - j = j + 1 - if j > nr then - j = j1 - i = i + 1 - if i > i2 then return nil end - row = a[i] - nr = norowset and #row or onr - end - if indices then - return i,j,row[j] - else - return row[j] - end - end -end - -function array2d.columns (a) - assert_arg(1,a,'table') - local n = a[1][1] - local i = 0 - return function() - i = i + 1 - if i > n then return nil end - return column(a,i) - end -end - -return array2d - - diff --git a/Utils/luarocks/share/lua/5.1/pl/class.lua b/Utils/luarocks/share/lua/5.1/pl/class.lua deleted file mode 100644 index 5cfbf991d..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/class.lua +++ /dev/null @@ -1,155 +0,0 @@ ---- Provides a reuseable and convenient framework for creating classes in Lua. --- Two possible notations:
    B = class(A) or class.B(A) .
    ---

    The latter form creates a named class.

    --- See the Guide for further discussion --- @module pl.class - -local error, getmetatable, io, pairs, rawget, rawset, setmetatable, tostring, type = - _G.error, _G.getmetatable, _G.io, _G.pairs, _G.rawget, _G.rawset, _G.setmetatable, _G.tostring, _G.type --- this trickery is necessary to prevent the inheritance of 'super' and --- the resulting recursive call problems. -local function call_ctor (c,obj,...) - -- nice alias for the base class ctor - local base = rawget(c,'_base') - if base then obj.super = rawget(base,'_init') end - local res = c._init(obj,...) - obj.super = nil - return res -end - -local function is_a(self,klass) - local m = getmetatable(self) - if not m then return false end --*can't be an object! - while m do - if m == klass then return true end - m = rawget(m,'_base') - end - return false -end - -local function class_of(klass,obj) - if type(klass) ~= 'table' or not rawget(klass,'is_a') then return false end - return klass.is_a(obj,klass) -end - -local function _class_tostring (obj) - local mt = obj._class - local name = rawget(mt,'_name') - setmetatable(obj,nil) - local str = tostring(obj) - setmetatable(obj,mt) - if name then str = name ..str:gsub('table','') end - return str -end - -local function tupdate(td,ts) - for k,v in pairs(ts) do - td[k] = v - end -end - -local function _class(base,c_arg,c) - c = c or {} -- a new class instance, which is the metatable for all objects of this type - -- the class will be the metatable for all its objects, - -- and they will look up their methods in it. - local mt = {} -- a metatable for the class instance - - if type(base) == 'table' then - -- our new class is a shallow copy of the base class! - tupdate(c,base) - c._base = base - -- inherit the 'not found' handler, if present - if rawget(c,'_handler') then mt.__index = c._handler end - elseif base ~= nil then - error("must derive from a table type",3) - end - - c.__index = c - setmetatable(c,mt) - c._init = nil - - if base and rawget(base,'_class_init') then - base._class_init(c,c_arg) - end - - -- expose a ctor which can be called by () - mt.__call = function(class_tbl,...) - local obj = {} - setmetatable(obj,c) - - if rawget(c,'_init') then -- explicit constructor - local res = call_ctor(c,obj,...) - if res then -- _if_ a ctor returns a value, it becomes the object... - obj = res - setmetatable(obj,c) - end - elseif base and rawget(base,'_init') then -- default constructor - -- make sure that any stuff from the base class is initialized! - call_ctor(base,obj,...) - end - - if base and rawget(base,'_post_init') then - base._post_init(obj) - end - - if not rawget(c,'__tostring') then - c.__tostring = _class_tostring - end - return obj - end - -- Call Class.catch to set a handler for methods/properties not found in the class! - c.catch = function(handler) - c._handler = handler - mt.__index = handler - end - c.is_a = is_a - c.class_of = class_of - c._class = c - -- any object can have a specified delegate which is called with unrecognized methods - -- if _handler exists and obj[key] is nil, then pass onto handler! - c.delegate = function(self,obj) - mt.__index = function(tbl,key) - local method = obj[key] - if method then - return function(self,...) - return method(obj,...) - end - elseif self._handler then - return self._handler(tbl,key) - end - end - end - return c -end - ---- create a new class, derived from a given base class.
    --- Supporting two class creation syntaxes: --- either Name = class(base) or class.Name(base) --- @class function --- @name class --- @param base optional base class --- @param c_arg optional parameter to class ctor --- @param c optional table to be used as class -local class -class = setmetatable({},{ - __call = function(fun,...) - return _class(...) - end, - __index = function(tbl,key) - if key == 'class' then - io.stderr:write('require("pl.class").class is deprecated. Use require("pl.class")\n') - return class - end - local env = _G - return function(...) - local c = _class(...) - c._name = key - rawset(env,key,c) - return c - end - end -}) - - -return class - diff --git a/Utils/luarocks/share/lua/5.1/pl/comprehension.lua b/Utils/luarocks/share/lua/5.1/pl/comprehension.lua deleted file mode 100644 index 9765bbf87..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/comprehension.lua +++ /dev/null @@ -1,288 +0,0 @@ ---- List comprehensions implemented in Lua.

    --- --- See the wiki page ---

    ---   local C= require 'pl.comprehension' . new()
    ---
    ---    C ('x for x=1,10') ()
    ---    ==> {1,2,3,4,5,6,7,8,9,10}
    ---    C 'x^2 for x=1,4' ()
    ---    ==> {1,4,9,16}
    ---    C '{x,x^2} for x=1,4' ()
    ---    ==> {{1,1},{2,4},{3,9},{4,16}}
    ---    C '2*x for x' {1,2,3}
    ---    ==> {2,4,6}
    ---    dbl = C '2*x for x'
    ---    dbl {10,20,30}
    ---    ==> {20,40,60}
    ---    C 'x for x if x % 2 == 0' {1,2,3,4,5}
    ---    ==> {2,4}
    ---    C '{x,y} for x = 1,2 for y = 1,2' ()
    ---    ==> {{1,1},{1,2},{2,1},{2,2}}
    ---    C '{x,y} for x for y' ({1,2},{10,20})
    ---    ==> {{1,10},{1,20},{2,10},{2,20}}
    ---   assert(C 'sum(x^2 for x)' {2,3,4} == 2^2+3^2+4^2)
    --- 
    --- ---

    (c) 2008 David Manura. Licensed under the same terms as Lua (MIT license). ---

    -- See the Guide --- @class module --- @name pl.comprehension - -local utils = require 'pl.utils' - ---~ local _VERSION, assert, getfenv, ipairs, load, math, pcall, require, setmetatable, table, tonumber = ---~ _G._VERSION, _G.assert, _G.getfenv, _G.ipairs, _G.load, _G.math, _G.pcall, _G.require, _G.setmetatable, _G.table, _G.tonumber - -local status,lb = pcall(require, "pl.luabalanced") -if not status then - lb = require 'luabalanced' -end - -local math_max = math.max -local table_concat = table.concat - --- fold operations --- http://en.wikipedia.org/wiki/Fold_(higher-order_function) -local ops = { - list = {init=' {} ', accum=' __result[#__result+1] = (%s) '}, - table = {init=' {} ', accum=' local __k, __v = %s __result[__k] = __v '}, - sum = {init=' 0 ', accum=' __result = __result + (%s) '}, - min = {init=' nil ', accum=' local __tmp = %s ' .. - ' if __result then if __tmp < __result then ' .. - '__result = __tmp end else __result = __tmp end '}, - max = {init=' nil ', accum=' local __tmp = %s ' .. - ' if __result then if __tmp > __result then ' .. - '__result = __tmp end else __result = __tmp end '}, -} - - --- Parses comprehension string expr. --- Returns output expression list string, array of for types --- ('=', 'in' or nil) , array of input variable name --- strings , array of input variable value strings --- , array of predicate expression strings , --- operation name string , and number of placeholder --- parameters . --- --- The is equivalent to the mathematical set-builder notation: --- --- { | in , } --- --- @usage "x^2 for x" -- array values --- @usage "x^2 for x=1,10,2" -- numeric for --- @usage "k^v for k,v in pairs(_1)" -- iterator for --- @usage "(x+y)^2 for x for y if x > y" -- nested --- -local function parse_comprehension(expr) - local t = {} - local pos = 1 - - -- extract opname (if exists) - local opname - local tok, post = expr:match('^%s*([%a_][%w_]*)%s*%(()', pos) - local pose = #expr + 1 - if tok then - local tok2, posb = lb.match_bracketed(expr, post-1) - assert(tok2, 'syntax error') - if expr:match('^%s*$', posb) then - opname = tok - pose = posb - 1 - pos = post - end - end - opname = opname or "list" - - -- extract out expression list - local out; out, pos = lb.match_explist(expr, pos) - assert(out, "syntax error: missing expression list") - out = table_concat(out, ', ') - - -- extract "for" clauses - local fortypes = {} - local invarlists = {} - local invallists = {} - while 1 do - local post = expr:match('^%s*for%s+()', pos) - if not post then break end - pos = post - - -- extract input vars - local iv; iv, pos = lb.match_namelist(expr, pos) - assert(#iv > 0, 'syntax error: zero variables') - for _,ident in ipairs(iv) do - assert(not ident:match'^__', - "identifier " .. ident .. " may not contain __ prefix") - end - invarlists[#invarlists+1] = iv - - -- extract '=' or 'in' (optional) - local fortype, post = expr:match('^(=)%s*()', pos) - if not fortype then fortype, post = expr:match('^(in)%s+()', pos) end - if fortype then - pos = post - -- extract input value range - local il; il, pos = lb.match_explist(expr, pos) - assert(#il > 0, 'syntax error: zero expressions') - assert(fortype ~= '=' or #il == 2 or #il == 3, - 'syntax error: numeric for requires 2 or three expressions') - fortypes[#invarlists] = fortype - invallists[#invarlists] = il - else - fortypes[#invarlists] = false - invallists[#invarlists] = false - end - end - assert(#invarlists > 0, 'syntax error: missing "for" clause') - - -- extract "if" clauses - local preds = {} - while 1 do - local post = expr:match('^%s*if%s+()', pos) - if not post then break end - pos = post - local pred; pred, pos = lb.match_expression(expr, pos) - assert(pred, 'syntax error: predicated expression not found') - preds[#preds+1] = pred - end - - -- extract number of parameter variables (name matching "_%d+") - local stmp = ''; lb.gsub(expr, function(u, sin) -- strip comments/strings - if u == 'e' then stmp = stmp .. ' ' .. sin .. ' ' end - end) - local max_param = 0; stmp:gsub('[%a_][%w_]*', function(s) - local s = s:match('^_(%d+)$') - if s then max_param = math_max(max_param, tonumber(s)) end - end) - - if pos ~= pose then - assert(false, "syntax error: unrecognized " .. expr:sub(pos)) - end - - --DEBUG: - --print('----\n', string.format("%q", expr), string.format("%q", out), opname) - --for k,v in ipairs(invarlists) do print(k,v, invallists[k]) end - --for k,v in ipairs(preds) do print(k,v) end - - return out, fortypes, invarlists, invallists, preds, opname, max_param -end - - --- Create Lua code string representing comprehension. --- Arguments are in the form returned by parse_comprehension. -local function code_comprehension( - out, fortypes, invarlists, invallists, preds, opname, max_param -) - local op = assert(ops[opname]) - local code = op.accum:gsub('%%s', out) - - for i=#preds,1,-1 do local pred = preds[i] - code = ' if ' .. pred .. ' then ' .. code .. ' end ' - end - for i=#invarlists,1,-1 do - if not fortypes[i] then - local arrayname = '__in' .. i - local idx = '__idx' .. i - code = - ' for ' .. idx .. ' = 1, #' .. arrayname .. ' do ' .. - ' local ' .. invarlists[i][1] .. ' = ' .. arrayname .. '['..idx..'] ' .. - code .. ' end ' - else - code = - ' for ' .. - table_concat(invarlists[i], ', ') .. - ' ' .. fortypes[i] .. ' ' .. - table_concat(invallists[i], ', ') .. - ' do ' .. code .. ' end ' - end - end - code = ' local __result = ( ' .. op.init .. ' ) ' .. code - return code -end - - --- Convert code string represented by code_comprehension --- into Lua function. Also must pass ninputs = #invarlists, --- max_param, and invallists (from parse_comprehension). --- Uses environment env. -local function wrap_comprehension(code, ninputs, max_param, invallists, env) - assert(ninputs > 0) - local ts = {} - for i=1,max_param do - ts[#ts+1] = '_' .. i - end - for i=1,ninputs do - if not invallists[i] then - local name = '__in' .. i - ts[#ts+1] = name - end - end - if #ts > 0 then - code = ' local ' .. table_concat(ts, ', ') .. ' = ... ' .. code - end - code = code .. ' return __result ' - --print('DEBUG:', code) - local f, err = utils.load(code,'tmp','t',env) - if not f then assert(false, err .. ' with generated code ' .. code) end - return f -end - - --- Build Lua function from comprehension string. --- Uses environment env. -local function build_comprehension(expr, env) - local out, fortypes, invarlists, invallists, preds, opname, max_param - = parse_comprehension(expr) - local code = code_comprehension( - out, fortypes, invarlists, invallists, preds, opname, max_param) - local f = wrap_comprehension(code, #invarlists, max_param, invallists, env) - return f -end - - --- Creates new comprehension cache. --- Any list comprehension function created are set to the environment --- env (defaults to caller of new). -local function new(env) - -- Note: using a single global comprehension cache would have had - -- security implications (e.g. retrieving cached functions created - -- in other environments). - -- The cache lookup function could have instead been written to retrieve - -- the caller's environment, lookup up the cache private to that - -- environment, and then looked up the function in that cache. - -- That would avoid the need for this call to - -- explicitly manage caches; however, that might also have an undue - -- performance penalty. - - if not env then - env = getfenv(2) - end - - local mt = {} - local cache = setmetatable({}, mt) - - -- Index operator builds, caches, and returns Lua function - -- corresponding to comprehension expression string. - -- - -- Example: f = comprehension['x^2 for x'] - -- - function mt:__index(expr) - local f = build_comprehension(expr, env) - self[expr] = f -- cache - return f - end - - -- Convenience syntax. - -- Allows comprehension 'x^2 for x' instead of comprehension['x^2 for x']. - mt.__call = mt.__index - - cache.new = new - - return cache -end - - -local comprehension = {} -comprehension.new = new - -return comprehension diff --git a/Utils/luarocks/share/lua/5.1/pl/config.lua b/Utils/luarocks/share/lua/5.1/pl/config.lua deleted file mode 100644 index bd6b89781..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/config.lua +++ /dev/null @@ -1,169 +0,0 @@ ---- Reads configuration files into a Lua table.

    --- Understands INI files, classic Unix config files, and simple --- delimited columns of values.

    ---

    ---    # test.config
    ---    # Read timeout in seconds
    ---    read.timeout=10
    ---    # Write timeout in seconds
    ---    write.timeout=5
    ---    #acceptable ports
    ---    ports = 1002,1003,1004
    ---
    ---        -- readconfig.lua
    ---    require 'pl'
    ---    local t = config.read 'test.config'
    ---    print(pretty.write(t))
    ---
    ---    ### output #####
    ---   {
    ---      ports = {
    ---        1002,
    ---        1003,
    ---        1004
    ---      },
    ---      write_timeout = 5,
    ---      read_timeout = 10
    ---    }
    --- 
    --- See the Guide for further discussion --- @class module --- @name pl.config - -local type,tonumber,ipairs,io, table = _G.type,_G.tonumber,_G.ipairs,_G.io,_G.table - -local function split(s,re) - local res = {} - local t_insert = table.insert - re = '[^'..re..']+' - for k in s:gmatch(re) do t_insert(res,k) end - return res -end - -local function strip(s) - return s:gsub('^%s+',''):gsub('%s+$','') -end - -local function strip_quotes (s) - return s:gsub("['\"](.*)['\"]",'%1') -end - -local config = {} - ---- like io.lines(), but allows for lines to be continued with '\'. --- @param file a file-like object (anything where read() returns the next line) or a filename. --- Defaults to stardard input. --- @return an iterator over the lines, or nil --- @return error 'not a file-like object' or 'file is nil' -function config.lines(file) - local f,openf,err - local line = '' - if type(file) == 'string' then - f,err = io.open(file,'r') - if not f then return nil,err end - openf = true - else - f = file or io.stdin - if not file.read then return nil, 'not a file-like object' end - end - if not f then return nil, 'file is nil' end - return function() - local l = f:read() - while l do - -- does the line end with '\'? - local i = l:find '\\%s*$' - if i then -- if so, - line = line..l:sub(1,i-1) - elseif line == '' then - return l - else - l = line..l - line = '' - return l - end - l = f:read() - end - if openf then f:close() end - end -end - ---- read a configuration file into a table --- @param file either a file-like object or a string, which must be a filename --- @param cnfg a configuration table that may contain these fields: ---
      ---
    • variablilize make names into valid Lua identifiers (default true)
    • ---
    • convert_numbers try to convert values into numbers (default true)
    • ---
    • trim_space ensure that there is no starting or trailing whitespace with values (default true)
    • ---
    • trim_quotes remove quotes from strings (default false)
    • ---
    • list_delim delimiter to use when separating columns (default ',')
    • ---
    --- @return a table containing items, or nil --- @return error message (same as @{config.lines} -function config.read(file,cnfg) - local f,openf,err - cnfg = cnfg or {} - local function check_cnfg (var,def) - local val = cnfg[var] - if val == nil then return def else return val end - end - local t = {} - local top_t = t - local variablilize = check_cnfg ('variabilize',true) - local list_delim = check_cnfg('list_delim',',') - local convert_numbers = check_cnfg('convert_numbers',true) - local trim_space = check_cnfg('trim_space',true) - local trim_quotes = check_cnfg('trim_quotes',false) - local ignore_assign = check_cnfg('ignore_assign',false) - - local function process_name(key) - if variablilize then - key = key:gsub('[^%w]','_') - end - return key - end - - local function process_value(value) - if list_delim and value:find(list_delim) then - value = split(value,list_delim) - for i,v in ipairs(value) do - value[i] = process_value(v) - end - elseif convert_numbers and value:find('^[%d%+%-]') then - local val = tonumber(value) - if val then value = val end - end - if type(value) == 'string' then - if trim_space then value = strip(value) end - if trim_quotes then value = strip_quotes(value) end - end - return value - end - - local iter,err = config.lines(file) - if not iter then return nil,err end - for line in iter do - -- strips comments - local ci = line:find('%s*[#;]') - if ci then line = line:sub(1,ci-1) end - -- and ignore blank lines - if line:find('^%s*$') then - elseif line:find('^%[') then -- section! - local section = process_name(line:match('%[([^%]]+)%]')) - t = top_t - t[section] = {} - t = t[section] - else - local i1,i2 = line:find('%s*=%s*') - if i1 and not ignore_assign then -- key,value assignment - local key = process_name(line:sub(1,i1-1)) - local value = process_value(line:sub(i2+1)) - t[key] = value - else -- a plain list of values... - t[#t+1] = process_value(line) - end - end - end - return top_t -end - -return config diff --git a/Utils/luarocks/share/lua/5.1/pl/data.lua b/Utils/luarocks/share/lua/5.1/pl/data.lua deleted file mode 100644 index 931c92692..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/data.lua +++ /dev/null @@ -1,588 +0,0 @@ ---- Reading and querying simple tabular data. ---
    --- data.read 'test.txt'
    --- ==> {{10,20},{2,5},{40,50},fieldnames={'x','y'},delim=','}
    --- 
    --- Provides a way of creating basic SQL-like queries. ---
    ---    require 'pl'
    ---    local d = data.read('xyz.txt')
    ---    local q = d:select('x,y,z where x > 3 and z < 2 sort by y')
    ---    for x,y,z in q do
    ---        print(x,y,z)
    ---    end
    --- 
    ---

    See the Guide --- @class module --- @name pl.data - -local utils = require 'pl.utils' -local _DEBUG = rawget(_G,'_DEBUG') - -local patterns,function_arg,usplit = utils.patterns,utils.function_arg,utils.split -local append,concat = table.insert,table.concat -local gsub = string.gsub -local io = io -local _G,print,loadstring,type,tonumber,ipairs,setmetatable,pcall,error,setfenv = _G,print,loadstring,type,tonumber,ipairs,setmetatable,pcall,error,setfenv - ---[[ -module ('pl.data',utils._module) -]] - -local data = {} - -local parse_select - -local function count(s,chr) - chr = utils.escape(chr) - local _,cnt = s:gsub(chr,' ') - return cnt -end - -local function rstrip(s) - return s:gsub('%s+$','') -end - -local function make_list(l) - return setmetatable(l,utils.stdmt.List) -end - -local function split(s,delim) - return make_list(usplit(s,delim)) -end - -local function map(fun,t) - local res = {} - for i = 1,#t do - append(res,fun(t[i])) - end - return res -end - -local function find(t,v) - for i = 1,#t do - if v == t[i] then return i end - end -end - -local DataMT = { - column_by_name = function(self,name) - if type(name) == 'number' then - name = '$'..name - end - local arr = {} - for res in data.query(self,name) do - append(arr,res) - end - return make_list(arr) - end, - - copy_select = function(self,condn) - condn = parse_select(condn,self) - local iter = data.query(self,condn) - local res = {} - local row = make_list{iter()} - while #row > 0 do - append(res,row) - row = make_list{iter()} - end - res.delim = self.delim - return data.new(res,split(condn.fields,',')) - end, - - column_names = function(self) - return self.fieldnames - end, -} -DataMT.__index = DataMT - ---- return a particular column as a list of values (Method).
    --- @param name either name of column, or numerical index. --- @class function --- @name Data.column_by_name - ---- return a query iterator on this data object (Method).
    --- @param condn the query expression --- @class function --- @name Data.select --- @see data.query - ---- return a new data object based on this query (Method).
    --- @param condn the query expression --- @class function --- @name Data.copy_select - ---- return the field names of this data object (Method).
    --- @class function --- @name Data.column_names - ---- write out a row (Method).
    --- @param f file-like object --- @class function --- @name Data.write_row - ---- write data out to file(Method).
    --- @param f file-like object --- @class function --- @name Data.write - - --- [guessing delimiter] We check for comma, tab and spaces in that order. --- [issue] any other delimiters to be checked? -local delims = {',','\t',' ',';'} - -local function guess_delim (line) - for _,delim in ipairs(delims) do - if count(line,delim) > 0 then - return delim == ' ' and '%s+' or delim - end - end - return ' ' -end - --- [file parameter] If it's a string, we try open as a filename. If nil, then --- either stdin or stdout depending on the mode. Otherwise, check if this is --- a file-like object (implements read or write depending) -local function open_file (f,mode) - local opened, err - local reading = mode == 'r' - if type(f) == 'string' then - if f == 'stdin' then - f = io.stdin - elseif f == 'stdout' then - f = io.stdout - else - f,err = io.open(f,mode) - if not f then return nil,err end - opened = true - end - end - if f and ((reading and not f.read) or (not reading and not f.write)) then - return nil, "not a file-like object" - end - return f,nil,opened -end - -local function all_n () - -end - ---- read a delimited file in a Lua table. --- By default, attempts to treat first line as separated list of fieldnames. --- @param file a filename or a file-like object (default stdin) --- @param cnfg options table: can override delim (a string pattern), fieldnames (a list), --- specify no_convert (default is to convert), numfields (indices of columns known --- to be numbers) and thousands_dot (thousands separator in Excel CSV is '.') -function data.read(file,cnfg) - local convert,err,opened - local D = {} - if not cnfg then cnfg = {} end - local f,err,opened = open_file(file,'r') - if not f then return nil, err end - local thousands_dot = cnfg.thousands_dot - - local function try_tonumber(x) - if thousands_dot then x = x:gsub('%.(...)','%1') end - return tonumber(x) - end - - local line = f:read() - if not line then return nil, "empty file" end - -- first question: what is the delimiter? - D.delim = cnfg.delim and cnfg.delim or guess_delim(line) - local delim = D.delim - local collect_end = cnfg.last_field_collect - local numfields = cnfg.numfields - -- some space-delimited data starts with a space. This should not be a column, - -- although it certainly would be for comma-separated, etc. - local strip - if delim == '%s+' and line:find(delim) == 1 then - strip = function(s) return s:gsub('^%s+','') end - line = strip(line) - end - -- first line will usually be field names. Unless fieldnames are specified, - -- we check if it contains purely numerical values for the case of reading - -- plain data files. - if not cnfg.fieldnames then - local fields = split(line,delim) - local nums = map(tonumber,fields) - if #nums == #fields then - convert = tonumber - append(D,nums) - numfields = {} - for i = 1,#nums do numfields[i] = i end - else - cnfg.fieldnames = fields - end - line = f:read() - if strip then line = strip(line) end - elseif type(cnfg.fieldnames) == 'string' then - cnfg.fieldnames = split(cnfg.fieldnames,delim) - end - -- at this point, the column headers have been read in. If the first - -- row consisted of numbers, it has already been added to the dataset. - if cnfg.fieldnames then - D.fieldnames = cnfg.fieldnames - -- [conversion] unless @no_convert, we need the numerical field indices - -- of the first data row. Can also be specified by @numfields. - if not cnfg.no_convert then - if not numfields then - numfields = {} - local fields = split(line,D.delim) - for i = 1,#fields do - if tonumber(fields[i]) then - append(numfields,i) - end - end - end - if #numfields > 0 then -- there are numerical fields - -- note that using dot as the thousands separator (@thousands_dot) - -- requires a special conversion function! - convert = thousands_dot and try_tonumber or tonumber - end - end - end - -- keep going until finished - while line do - if not line:find ('^%s*$') then - if strip then line = strip(line) end - local fields = split(line,delim) - if convert then - for k = 1,#numfields do - local i = numfields[k] - local val = convert(fields[i]) - if val == nil then - return nil, "not a number: "..fields[i] - else - fields[i] = val - end - end - end - -- [collecting end field] If @last_field_collect then we will collect - -- all extra space-delimited fields into a single last field. - if collect_end and #fields > #D.fieldnames then - local ends,N = {},#D.fieldnames - for i = N+1,#fields do - append(ends,fields[i]) - end - ends = concat(ends,' ') - local cfields = {} - for i = 1,N do cfields[i] = fields[i] end - cfields[N] = cfields[N]..' '..ends - fields = cfields - end - append(D,fields) - end - line = f:read() - end - if opened then f:close() end - if delim == '%s+' then D.delim = ' ' end - if not D.fieldnames then D.fieldnames = {} end - return data.new(D) -end - -local function write_row (data,f,row) - f:write(concat(row,data.delim),'\n') -end - -DataMT.write_row = write_row - -local function write (data,file) - local f,err,opened = open_file(file,'w') - if not f then return nil, err end - if #data.fieldnames > 0 then - f:write(concat(data.fieldnames,data.delim),'\n') - end - for i = 1,#data do - write_row(data,f,data[i]) - end - if opened then f:close() end -end - -DataMT.write = write - -local function massage_fieldnames (fields) - -- [fieldnames must be valid Lua identifiers] fix 0.8 was %A - for i = 1,#fields do - fields[i] = fields[i]:gsub('%W','_') - end -end - - ---- create a new dataset from a table of rows.
    --- Can specify the fieldnames, else the table must have a field called --- 'fieldnames', which is either a string of delimiter-separated names, --- or a table of names.
    --- If the table does not have a field called 'delim', then an attempt will be --- made to guess it from the fieldnames string, defaults otherwise to tab. --- @param d the table. --- @param fieldnames optional fieldnames --- @return the table. -function data.new (d,fieldnames) - d.fieldnames = d.fieldnames or fieldnames - if not d.delim and type(d.fieldnames) == 'string' then - d.delim = guess_delim(d.fieldnames) - d.fieldnames = split(d.fieldnames,d.delim) - end - d.fieldnames = make_list(d.fieldnames) - massage_fieldnames(d.fieldnames) - setmetatable(d,DataMT) - -- a query with just the fieldname will return a sequence - -- of values, which seq.copy turns into a table. - return d -end - -local sorted_query = [[ -return function (t) - local i = 0 - local v - local ls = {} - for i,v in ipairs(t) do - if CONDITION then - ls[#ls+1] = v - end - end - table.sort(ls,function(v1,v2) - return SORT_EXPR - end) - local n = #ls - return function() - i = i + 1 - v = ls[i] - if i > n then return end - return FIELDLIST - end -end -]] - --- question: is this optimized case actually worth the extra code? -local simple_query = [[ -return function (t) - local n = #t - local i = 0 - local v - return function() - repeat - i = i + 1 - v = t[i] - until i > n or CONDITION - if i > n then return end - return FIELDLIST - end -end -]] - -local function is_string (s) - return type(s) == 'string' -end - -local field_error - -local function fieldnames_as_string (data) - return concat(data.fieldnames,',') -end - -local function massage_fields(data,f) - local idx - if f:find '^%d+$' then - idx = tonumber(f) - else - idx = find(data.fieldnames,f) - end - if idx then - return 'v['..idx..']' - else - field_error = f..' not found in '..fieldnames_as_string(data) - return f - end -end - -local List = require 'pl.List' - -local function process_select (data,parms) - --- preparing fields ---- - local res,ret - field_error = nil - local fields = parms.fields - local numfields = fields:find '%$' or #data.fieldnames == 0 - if fields:find '^%s*%*%s*' then - if not numfields then - fields = fieldnames_as_string(data) - else - local ncol = #data[1] - fields = {} - for i = 1,ncol do append(fields,'$'..i) end - fields = concat(fields,',') - end - end - local idpat = patterns.IDEN - if numfields then - idpat = '%$(%d+)' - else - -- massage field names to replace non-identifier chars - fields = rstrip(fields):gsub('[^,%w]','_') - end - local massage_fields = utils.bind1(massage_fields,data) - ret = gsub(fields,idpat,massage_fields) - if field_error then return nil,field_error end - parms.fields = fields - parms.proc_fields = ret - parms.where = parms.where or 'true' - if is_string(parms.where) then - parms.where = gsub(parms.where,idpat,massage_fields) - field_error = nil - end - return true -end - - -parse_select = function(s,data) - local endp - local parms = {} - local w1,w2 = s:find('where ') - local s1,s2 = s:find('sort by ') - if w1 then -- where clause! - endp = (s1 or 0)-1 - parms.where = s:sub(w2+1,endp) - end - if s1 then -- sort by clause (must be last!) - parms.sort_by = s:sub(s2+1) - end - endp = (w1 or s1 or 0)-1 - parms.fields = s:sub(1,endp) - local status,err = process_select(data,parms) - if not status then return nil,err - else return parms end -end - ---- create a query iterator from a select string. --- Select string has this format:
    --- FIELDLIST [ where LUA-CONDN [ sort by FIELD] ]
    --- FIELDLIST is a comma-separated list of valid fields, or '*'.

    --- The condition can also be a table, with fields 'fields' (comma-sep string or --- table), 'sort_by' (string) and 'where' (Lua expression string or function) --- @param data table produced by read --- @param condn select string or table --- @param context a list of tables to be searched when resolving functions --- @param return_row if true, wrap the results in a row table --- @return an iterator over the specified fields, or nil --- @return an error message -function data.query(data,condn,context,return_row) - local err - if is_string(condn) then - condn,err = parse_select(condn,data) - if not condn then return nil,err end - elseif type(condn) == 'table' then - if type(condn.fields) == 'table' then - condn.fields = concat(condn.fields,',') - end - if not condn.proc_fields then - local status,err = process_select(data,condn) - if not status then return nil,err end - end - else - return nil, "condition must be a string or a table" - end - local query, k - if condn.sort_by then -- use sorted_query - query = sorted_query - else - query = simple_query - end - local fields = condn.proc_fields or condn.fields - if return_row then - fields = '{'..fields..'}' - end - query,k = query:gsub('FIELDLIST',fields) - if is_string(condn.where) then - query = query:gsub('CONDITION',condn.where) - condn.where = nil - else - query = query:gsub('CONDITION','_condn(v)') - condn.where = function_arg(0,condn.where,'condition.where must be callable') - end - if condn.sort_by then - local expr,sort_var,sort_dir - local sort_by = condn.sort_by - local i1,i2 = sort_by:find('%s+') - if i1 then - sort_var,sort_dir = sort_by:sub(1,i1-1),sort_by:sub(i2+1) - else - sort_var = sort_by - sort_dir = 'asc' - end - if sort_var:match '^%$' then sort_var = sort_var:sub(2) end - sort_var = massage_fields(data,sort_var) - if field_error then return nil,field_error end - if sort_dir == 'asc' then - sort_dir = '<' - else - sort_dir = '>' - end - expr = ('%s %s %s'):format(sort_var:gsub('v','v1'),sort_dir,sort_var:gsub('v','v2')) - query = query:gsub('SORT_EXPR',expr) - end - if condn.where then - query = 'return function(_condn) '..query..' end' - end - if _DEBUG then print(query) end - - local fn,err = loadstring(query,'tmp') - if not fn then return nil,err end - fn = fn() -- get the function - if condn.where then - fn = fn(condn.where) - end - local qfun = fn(data) - if context then - -- [specifying context for condition] @context is a list of tables which are - -- 'injected'into the condition's custom context - append(context,_G) - local lookup = {} - setfenv(qfun,lookup) - setmetatable(lookup,{ - __index = function(tbl,key) - -- _G.print(tbl,key) - for k,t in ipairs(context) do - if t[key] then return t[key] end - end - end - }) - end - return qfun -end - - -DataMT.select = data.query -DataMT.select_row = function(d,condn,context) - return data.query(d,condn,context,true) -end - ---- Filter input using a query. --- @param Q a query string --- @param infile filename or file-like object --- @param outfile filename or file-like object --- @param dont_fail true if you want to return an error, not just fail -function data.filter (Q,infile,outfile,dont_fail) - local err - local d = data.read(infile or 'stdin') - local out = open_file(outfile or 'stdout') - local iter,err = d:select(Q) - local delim = d.delim - if not iter then - err = 'error: '..err - if dont_fail then - return nil,err - else - utils.quit(1,err) - end - end - while true do - local res = {iter()} - if #res == 0 then break end - out:write(concat(res,delim),'\n') - end -end - -return data - diff --git a/Utils/luarocks/share/lua/5.1/pl/dir.lua b/Utils/luarocks/share/lua/5.1/pl/dir.lua deleted file mode 100644 index 5cea49e27..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/dir.lua +++ /dev/null @@ -1,478 +0,0 @@ ---- Useful functions for getting directory contents and matching them against wildcards. --- @class module --- @name pl.dir - -local utils = require 'pl.utils' -local path = require 'pl.path' -local is_windows = path.is_windows -local tablex = require 'pl.tablex' -local ldir = path.dir -local chdir = path.chdir -local mkdir = path.mkdir -local rmdir = path.rmdir -local sub = string.sub -local os,pcall,ipairs,pairs,require,setmetatable,_G = os,pcall,ipairs,pairs,require,setmetatable,_G -local remove = os.remove -local append = table.insert -local wrap = coroutine.wrap -local yield = coroutine.yield -local assert_arg,assert_string,raise = utils.assert_arg,utils.assert_string,utils.raise -local List = utils.stdmt.List - ---[[ -module ('pl.dir',utils._module) -]] - -local dir = {} - -local function assert_dir (n,val) - assert_arg(n,val,'string',path.isdir,'not a directory') -end - -local function assert_file (n,val) - assert_arg(n,val,'string',path.isfile,'not a file') -end - -local function filemask(mask) - mask = utils.escape(mask) - return mask:gsub('%%%*','.+'):gsub('%%%?','.')..'$' -end - ---- does the filename match the shell pattern?. --- (cf. fnmatch.fnmatch in Python, 11.8) --- @param file A file name --- @param pattern A shell pattern --- @return true or false --- @raise file and pattern must be strings -function dir.fnmatch(file,pattern) - assert_string(1,file) - assert_string(2,pattern) - return path.normcase(file):find(filemask(pattern)) ~= nil -end - ---- return a list of all files which match the pattern. --- (cf. fnmatch.filter in Python, 11.8) --- @param files A table containing file names --- @param pattern A shell pattern. --- @return list of files --- @raise file and pattern must be strings -function dir.filter(files,pattern) - assert_arg(1,files,'table') - assert_string(2,pattern) - local res = {} - local mask = filemask(pattern) - for i,f in ipairs(files) do - if f:find(mask) then append(res,f) end - end - return setmetatable(res,List) -end - -local function _listfiles(dir,filemode,match) - local res = {} - local check = utils.choose(filemode,path.isfile,path.isdir) - if not dir then dir = '.' end - for f in ldir(dir) do - if f ~= '.' and f ~= '..' then - local p = path.join(dir,f) - if check(p) and (not match or match(p)) then - append(res,p) - end - end - end - return setmetatable(res,List) -end - ---- return a list of all files in a directory which match the a shell pattern. --- @param dir A directory. If not given, all files in current directory are returned. --- @param mask A shell pattern. If not given, all files are returned. --- @return lsit of files --- @raise dir and mask must be strings -function dir.getfiles(dir,mask) - assert_dir(1,dir) - assert_string(2,mask) - local match - if mask then - mask = filemask(mask) - match = function(f) - return f:find(mask) - end - end - return _listfiles(dir,true,match) -end - ---- return a list of all subdirectories of the directory. --- @param dir A directory --- @return a list of directories --- @raise dir must be a string -function dir.getdirectories(dir) - assert_dir(1,dir) - return _listfiles(dir,false) -end - -local function quote_argument (f) - f = path.normcase(f) - if f:find '%s' then - return '"'..f..'"' - else - return f - end -end - - -local alien,ffi,ffi_checked,CopyFile,MoveFile,GetLastError,win32_errors,cmd_tmpfile - -local function execute_command(cmd,parms) - if not cmd_tmpfile then cmd_tmpfile = path.tmpname () end - local err = path.is_windows and ' > ' or ' 2> ' - cmd = cmd..' '..parms..err..cmd_tmpfile - local ret = utils.execute(cmd) - if not ret then - return false,(utils.readfile(cmd_tmpfile):gsub('\n(.*)','')) - else - return true - end -end - -local function find_ffi_copyfile () - if not ffi_checked then - ffi_checked = true - local res - res,alien = pcall(require,'alien') - if not res then - alien = nil - res, ffi = pcall(require,'ffi') - end - if not res then - ffi = nil - return - end - else - return - end - if alien then - -- register the Win32 CopyFile and MoveFile functions - local kernel = alien.load('kernel32.dll') - CopyFile = kernel.CopyFileA - CopyFile:types{'string','string','int',ret='int',abi='stdcall'} - MoveFile = kernel.MoveFileA - MoveFile:types{'string','string',ret='int',abi='stdcall'} - GetLastError = kernel.GetLastError - GetLastError:types{ret ='int', abi='stdcall'} - elseif ffi then - ffi.cdef [[ - int CopyFileA(const char *src, const char *dest, int iovr); - int MoveFileA(const char *src, const char *dest); - int GetLastError(); - ]] - CopyFile = ffi.C.CopyFileA - MoveFile = ffi.C.MoveFileA - GetLastError = ffi.C.GetLastError - end - win32_errors = { - ERROR_FILE_NOT_FOUND = 2, - ERROR_PATH_NOT_FOUND = 3, - ERROR_ACCESS_DENIED = 5, - ERROR_WRITE_PROTECT = 19, - ERROR_BAD_UNIT = 20, - ERROR_NOT_READY = 21, - ERROR_WRITE_FAULT = 29, - ERROR_READ_FAULT = 30, - ERROR_SHARING_VIOLATION = 32, - ERROR_LOCK_VIOLATION = 33, - ERROR_HANDLE_DISK_FULL = 39, - ERROR_BAD_NETPATH = 53, - ERROR_NETWORK_BUSY = 54, - ERROR_DEV_NOT_EXIST = 55, - ERROR_FILE_EXISTS = 80, - ERROR_OPEN_FAILED = 110, - ERROR_INVALID_NAME = 123, - ERROR_BAD_PATHNAME = 161, - ERROR_ALREADY_EXISTS = 183, - } -end - -local function two_arguments (f1,f2) - return quote_argument(f1)..' '..quote_argument(f2) -end - -local function file_op (is_copy,src,dest,flag) - if flag == 1 and path.exists(dest) then - return false,"cannot overwrite destination" - end - if is_windows then - -- if we haven't tried to load Alien/LuaJIT FFI before, then do so - find_ffi_copyfile() - -- fallback if there's no Alien, just use DOS commands *shudder* - -- 'rename' involves a copy and then deleting the source. - if not CopyFile then - src = path.normcase(src) - dest = path.normcase(dest) - local cmd = is_copy and 'copy' or 'rename' - local res, err = execute_command('copy',two_arguments(src,dest)) - if not res then return nil,err end - if not is_copy then - return execute_command('del',quote_argument(src)) - end - else - if path.isdir(dest) then - dest = path.join(dest,path.basename(src)) - end - local ret - if is_copy then ret = CopyFile(src,dest,flag) - else ret = MoveFile(src,dest) end - if ret == 0 then - local err = GetLastError() - for name,value in pairs(win32_errors) do - if value == err then return false,name end - end - return false,"Error #"..err - else return true - end - end - else -- for Unix, just use cp for now - return execute_command(is_copy and 'cp' or 'mv', - two_arguments(src,dest)) - end -end - ---- copy a file. --- @param src source file --- @param dest destination file or directory --- @param flag true if you want to force the copy (default) --- @return true if operation succeeded --- @raise src and dest must be strings -function dir.copyfile (src,dest,flag) - assert_string(1,src) - assert_string(2,dest) - flag = flag==nil or flag - return file_op(true,src,dest,flag and 0 or 1) -end - ---- move a file. --- @param src source file --- @param dest destination file or directory --- @return true if operation succeeded --- @raise src and dest must be strings -function dir.movefile (src,dest) - assert_string(1,src) - assert_string(2,dest) - return file_op(false,src,dest,0) -end - -local function _dirfiles(dir,attrib) - local dirs = {} - local files = {} - for f in ldir(dir) do - if f ~= '.' and f ~= '..' then - local p = path.join(dir,f) - local mode = attrib(p,'mode') - if mode=='directory' then - append(dirs,f) - else - append(files,f) - end - end - end - return setmetatable(dirs,List),setmetatable(files,List) -end - - -local function _walker(root,bottom_up,attrib) - local dirs,files = _dirfiles(root,attrib) - if not bottom_up then yield(root,dirs,files) end - for i,d in ipairs(dirs) do - _walker(root..path.sep..d,bottom_up,attrib) - end - if bottom_up then yield(root,dirs,files) end -end - ---- return an iterator which walks through a directory tree starting at root. --- The iterator returns (root,dirs,files) --- Note that dirs and files are lists of names (i.e. you must say path.join(root,d) --- to get the actual full path) --- If bottom_up is false (or not present), then the entries at the current level are returned --- before we go deeper. This means that you can modify the returned list of directories before --- continuing. --- This is a clone of os.walk from the Python libraries. --- @param root A starting directory --- @param bottom_up False if we start listing entries immediately. --- @param follow_links follow symbolic links --- @return an iterator returning root,dirs,files --- @raise root must be a string -function dir.walk(root,bottom_up,follow_links) - assert_string(1,root) - if not path.isdir(root) then return raise 'not a directory' end - local attrib - if path.is_windows or not follow_links then - attrib = path.attrib - else - attrib = path.link_attrib - end - return wrap(function () _walker(root,bottom_up,attrib) end) -end - ---- remove a whole directory tree. --- @param fullpath A directory path --- @return true or nil --- @return error if failed --- @raise fullpath must be a string -function dir.rmtree(fullpath) - assert_string(1,fullpath) - if not path.isdir(fullpath) then return raise 'not a directory' end - if path.islink(fullpath) then return false,'will not follow symlink' end - for root,dirs,files in dir.walk(fullpath,true) do - for i,f in ipairs(files) do - remove(path.join(root,f)) - end - rmdir(root) - end - return true -end - -local dirpat -if path.is_windows then - dirpat = '(.+)\\[^\\]+$' -else - dirpat = '(.+)/[^/]+$' -end - -local _makepath -function _makepath(p) - -- windows root drive case - if p:find '^%a:[\\]*$' then - return true - end - if not path.isdir(p) then - local subp = p:match(dirpat) - if not _makepath(subp) then return raise ('cannot create '..subp) end - return mkdir(p) - else - return true - end -end - ---- create a directory path. --- This will create subdirectories as necessary! --- @param p A directory path --- @return a valid created path --- @raise p must be a string -function dir.makepath (p) - assert_string(1,p) - return _makepath(path.normcase(path.abspath(p))) -end - - ---- clone a directory tree. Will always try to create a new directory structure --- if necessary. --- @param path1 the base path of the source tree --- @param path2 the new base path for the destination --- @param file_fun an optional function to apply on all files --- @param verbose an optional boolean to control the verbosity of the output. --- It can also be a logging function that behaves like print() --- @return true, or nil --- @return error message, or list of failed directory creations --- @return list of failed file operations --- @raise path1 and path2 must be strings --- @usage clonetree('.','../backup',copyfile) -function dir.clonetree (path1,path2,file_fun,verbose) - assert_string(1,path1) - assert_string(2,path2) - if verbose == true then verbose = print end - local abspath,normcase,isdir,join = path.abspath,path.normcase,path.isdir,path.join - local faildirs,failfiles = {},{} - if not isdir(path1) then return raise 'source is not a valid directory' end - path1 = abspath(normcase(path1)) - path2 = abspath(normcase(path2)) - if verbose then verbose('normalized:',path1,path2) end - -- particularly NB that the new path isn't fully contained in the old path - if path1 == path2 then return raise "paths are the same" end - local i1,i2 = path2:find(path1,1,true) - if i2 == #path1 and path2:sub(i2+1,i2+1) == path.sep then - return raise 'destination is a subdirectory of the source' - end - local cp = path.common_prefix (path1,path2) - local idx = #cp - if idx == 0 then -- no common path, but watch out for Windows paths! - if path1:sub(2,2) == ':' then idx = 3 end - end - for root,dirs,files in dir.walk(path1) do - local opath = path2..root:sub(idx) - if verbose then verbose('paths:',opath,root) end - if not isdir(opath) then - local ret = dir.makepath(opath) - if not ret then append(faildirs,opath) end - if verbose then verbose('creating:',opath,ret) end - end - if file_fun then - for i,f in ipairs(files) do - local p1 = join(root,f) - local p2 = join(opath,f) - local ret = file_fun(p1,p2) - if not ret then append(failfiles,p2) end - if verbose then - verbose('files:',p1,p2,ret) - end - end - end - end - return true,faildirs,failfiles -end - ---- return an iterator over all entries in a directory tree --- @param d a directory --- @return an iterator giving pathname and mode (true for dir, false otherwise) --- @raise d must be a non-empty string -function dir.dirtree( d ) - assert( d and d ~= "", "directory parameter is missing or empty" ) - local exists, isdir = path.exists, path.isdir - local sep = path.sep - - local last = sub ( d, -1 ) - if last == sep or last == '/' then - d = sub( d, 1, -2 ) - end - - local function yieldtree( dir ) - for entry in ldir( dir ) do - if entry ~= "." and entry ~= ".." then - entry = dir .. sep .. entry - if exists(entry) then -- Just in case a symlink is broken. - local is_dir = isdir(entry) - yield( entry, is_dir ) - if is_dir then - yieldtree( entry ) - end - end - end - end - end - - return wrap( function() yieldtree( d ) end ) -end - - ---- Recursively returns all the file starting at path. It can optionally take a shell pattern and --- only returns files that match pattern. If a pattern is given it will do a case insensitive search. --- @param start_path {string} A directory. If not given, all files in current directory are returned. --- @param pattern {string} A shell pattern. If not given, all files are returned. --- @return Table containing all the files found recursively starting at path and filtered by pattern. --- @raise start_path must be a string -function dir.getallfiles( start_path, pattern ) - assert( type( start_path ) == "string", "bad argument #1 to 'GetAllFiles' (Expected string but recieved " .. type( start_path ) .. ")" ) - pattern = pattern or "" - - local files = {} - local normcase = path.normcase - for filename, mode in dir.dirtree( start_path ) do - if not mode then - local mask = filemask( pattern ) - if normcase(filename):find( mask ) then - files[#files + 1] = filename - end - end - end - - return files -end - -return dir diff --git a/Utils/luarocks/share/lua/5.1/pl/file.lua b/Utils/luarocks/share/lua/5.1/pl/file.lua deleted file mode 100644 index 6c82e2859..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/file.lua +++ /dev/null @@ -1,69 +0,0 @@ ---- File manipulation functions: reading, writing, moving and copying. --- @class module --- @name pl.file -local os = os -local utils = require 'pl.utils' -local dir = require 'pl.dir' -local path = require 'pl.path' - ---[[ -module ('pl.file',utils._module) -]] -local file = {} - ---- return the contents of a file as a string --- @class function --- @name file.read --- @param filename The file path --- @return file contents -file.read = utils.readfile - ---- write a string to a file --- @class function --- @name file.write --- @param filename The file path --- @param str The string -file.write = utils.writefile - ---- copy a file. --- @class function --- @name file.copy --- @param src source file --- @param dest destination file --- @param flag true if you want to force the copy (default) --- @return true if operation succeeded -file.copy = dir.copyfile - ---- move a file. --- @class function --- @name file.move --- @param src source file --- @param dest destination file --- @return true if operation succeeded, else false and the reason for the error. -file.move = dir.movefile - ---- Return the time of last access as the number of seconds since the epoch. --- @class function --- @name file.access_time --- @param path A file path -file.access_time = path.getatime - ----Return when the file was created. --- @class function --- @name file.creation_time --- @param path A file path -file.creation_time = path.getctime - ---- Return the time of last modification --- @class function --- @name file.modified_time --- @param path A file path -file.modified_time = path.getmtime - ---- Delete a file --- @class function --- @name file.delete --- @param path A file path -file.delete = os.remove - -return file diff --git a/Utils/luarocks/share/lua/5.1/pl/func.lua b/Utils/luarocks/share/lua/5.1/pl/func.lua deleted file mode 100644 index 3711c9a71..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/func.lua +++ /dev/null @@ -1,379 +0,0 @@ ---- Functional helpers like composition, binding and placeholder expressions. --- Placeholder expressions are useful for short anonymous functions, and were --- inspired by the Boost Lambda library. ---

    --- utils.import 'pl.func'
    --- ls = List{10,20,30}
    --- = ls:map(_1+1)
    ---    {11,21,31}
    --- 
    --- They can also be used to bind particular arguments of a function. ---
    --- p = bind(print,'start>',_0)
    --- p(10,20,30)
    --- start>   10   20  30
    --- 
    --- See the Guide --- @class module --- @name pl.func -local type,select,setmetatable,getmetatable,rawset = type,select,setmetatable,getmetatable,rawset -local concat,append = table.concat,table.insert -local max = math.max -local print,tostring = print,tostring -local pairs,ipairs,loadstring,rawget,unpack = pairs,ipairs,loadstring,rawget,unpack -local _G = _G -local utils = require 'pl.utils' -local tablex = require 'pl.tablex' -local map = tablex.map -local _DEBUG = rawget(_G,'_DEBUG') -local assert_arg = utils.assert_arg - ---[[ -module ('pl.func',utils._module) -]] - -local func = {} - --- metatable for Placeholder Expressions (PE) -local _PEMT = {} - -local function P (t) - setmetatable(t,_PEMT) - return t -end - -func.PE = P - -local function isPE (obj) - return getmetatable(obj) == _PEMT -end - -func.isPE = isPE - --- construct a placeholder variable (e.g _1 and _2) -local function PH (idx) - return P {op='X',repr='_'..idx, index=idx} -end - --- construct a constant placeholder variable (e.g _C1 and _C2) -local function CPH (idx) - return P {op='X',repr='_C'..idx, index=idx} -end - -func._1,func._2,func._3,func._4,func._5 = PH(1),PH(2),PH(3),PH(4),PH(5) -func._0 = P{op='X',repr='...',index=0} - -function func.Var (name) - local ls = utils.split(name,'[%s,]+') - local res = {} - for _,n in ipairs(ls) do - append(res,P{op='X',repr=n,index=0}) - end - return unpack(res) -end - -function func._ (value) - return P{op='X',repr=value,index='wrap'} -end - -local repr - -func.Nil = func.Var 'nil' - -function _PEMT.__index(obj,key) - return P{op='[]',obj,key} -end - -function _PEMT.__call(fun,...) - return P{op='()',fun,...} -end - -function _PEMT.__tostring (e) - return repr(e) -end - -function _PEMT.__unm(arg) - return P{op='-',arg} -end - -function func.Not (arg) - return P{op='not',arg} -end - -function func.Len (arg) - return P{op='#',arg} -end - - -local function binreg(context,t) - for name,op in pairs(t) do - rawset(context,name,function(x,y) - return P{op=op,x,y} - end) - end -end - -local function import_name (name,fun,context) - rawset(context,name,function(...) - return P{op='()',fun,...} - end) -end - -local imported_functions = {} - -local function is_global_table (n) - return type(_G[n]) == 'table' -end - ---- wrap a table of functions. This makes them available for use in --- placeholder expressions. --- @param tname a table name --- @param context context to put results, defaults to environment of caller -function func.import(tname,context) - assert_arg(1,tname,'string',is_global_table,'arg# 1: not a name of a global table') - local t = _G[tname] - context = context or _G - for name,fun in pairs(t) do - import_name(name,fun,context) - imported_functions[fun] = name - end -end - ---- register a function for use in placeholder expressions. --- @param fun a function --- @param name an optional name --- @return a placeholder functiond -function func.register (fun,name) - assert_arg(1,fun,'function') - if name then - assert_arg(2,name,'string') - imported_functions[fun] = name - end - return function(...) - return P{op='()',fun,...} - end -end - -function func.lookup_imported_name (fun) - return imported_functions[fun] -end - -local function _arg(...) return ... end - -function func.Args (...) - return P{op='()',_arg,...} -end - --- binary and unary operators, with their precedences (see 2.5.6) -local operators = { - ['or'] = 0, - ['and'] = 1, - ['=='] = 2, ['~='] = 2, ['<'] = 2, ['>'] = 2, ['<='] = 2, ['>='] = 2, - ['..'] = 3, - ['+'] = 4, ['-'] = 4, - ['*'] = 5, ['/'] = 5, ['%'] = 5, - ['not'] = 6, ['#'] = 6, ['-'] = 6, - ['^'] = 7 -} - --- comparisons (as prefix functions) -binreg (func,{And='and',Or='or',Eq='==',Lt='<',Gt='>',Le='<=',Ge='>='}) - --- standard binary operators (as metamethods) -binreg (_PEMT,{__add='+',__sub='-',__mul='*',__div='/',__mod='%',__pow='^',__concat='..'}) - -binreg (_PEMT,{__eq='=='}) - ---- all elements of a table except the first. --- @param ls a list-like table. -function func.tail (ls) - assert_arg(1,ls,'table') - local res = {} - for i = 2,#ls do - append(res,ls[i]) - end - return res -end - ---- create a string representation of a placeholder expression. --- @param e a placeholder expression --- @param lastpred not used -function repr (e,lastpred) - local tail = func.tail - if isPE(e) then - local pred = operators[e.op] - local ls = map(repr,e,pred) - if pred then --unary or binary operator - if #ls ~= 1 then - local s = concat(ls,' '..e.op..' ') - if lastpred and lastpred > pred then - s = '('..s..')' - end - return s - else - return e.op..' '..ls[1] - end - else -- either postfix, or a placeholder - if e.op == '[]' then - return ls[1]..'['..ls[2]..']' - elseif e.op == '()' then - local fn - if ls[1] ~= nil then -- was _args, undeclared! - fn = ls[1] - else - fn = '' - end - return fn..'('..concat(tail(ls),',')..')' - else - return e.repr - end - end - elseif type(e) == 'string' then - return '"'..e..'"' - elseif type(e) == 'function' then - local name = func.lookup_imported_name(e) - if name then return name else return tostring(e) end - else - return tostring(e) --should not really get here! - end -end -func.repr = repr - --- collect all the non-PE values in this PE into vlist, and replace each occurence --- with a constant PH (_C1, etc). Return the maximum placeholder index found. -local collect_values -function collect_values (e,vlist) - if isPE(e) then - if e.op ~= 'X' then - local m = 0 - for i,subx in ipairs(e) do - local pe = isPE(subx) - if pe then - if subx.op == 'X' and subx.index == 'wrap' then - subx = subx.repr - pe = false - else - m = max(m,collect_values(subx,vlist)) - end - end - if not pe then - append(vlist,subx) - e[i] = CPH(#vlist) - end - end - return m - else -- was a placeholder, it has an index... - return e.index - end - else -- plain value has no placeholder dependence - return 0 - end -end -func.collect_values = collect_values - ---- instantiate a PE into an actual function. First we find the largest placeholder used, --- e.g. _2; from this a list of the formal parameters can be build. Then we collect and replace --- any non-PE values from the PE, and build up a constant binding list. --- Finally, the expression can be compiled, and e.__PE_function is set. --- @param e a placeholder expression --- @return a function -function func.instantiate (e) - local consts,values,parms = {},{},{} - local rep, err, fun - local n = func.collect_values(e,values) - for i = 1,#values do - append(consts,'_C'..i) - if _DEBUG then print(i,values[i]) end - end - for i =1,n do - append(parms,'_'..i) - end - consts = concat(consts,',') - parms = concat(parms,',') - rep = repr(e) - local fstr = ('return function(%s) return function(%s) return %s end end'):format(consts,parms,rep) - if _DEBUG then print(fstr) end - fun,err = loadstring(fstr,'fun') - if not fun then return nil,err end - fun = fun() -- get wrapper - fun = fun(unpack(values)) -- call wrapper (values could be empty) - e.__PE_function = fun - return fun -end - ---- instantiate a PE unless it has already been done. --- @param e a placeholder expression --- @return the function -function func.I(e) - if rawget(e,'__PE_function') then - return e.__PE_function - else return func.instantiate(e) - end -end - -utils.add_function_factory(_PEMT,func.I) - ---- bind the first parameter of the function to a value. --- @class function --- @name func.curry --- @param fn a function of one or more arguments --- @param p a value --- @return a function of one less argument --- @usage (curry(math.max,10))(20) == math.max(10,20) -func.curry = utils.bind1 - ---- create a function which chains two functions. --- @param f a function of at least one argument --- @param g a function of at least one argument --- @return a function --- @usage printf = compose(io.write,string.format) -function func.compose (f,g) - return function(...) return f(g(...)) end -end - ---- bind the arguments of a function to given values. --- bind(fn,v,_2) is equivalent to curry(fn,v). --- @param fn a function of at least one argument --- @param ... values or placeholder variables --- @return a function --- @usage (bind(f,_1,a))(b) == f(a,b) --- @usage (bind(f,_2,_1))(a,b) == f(b,a) -function func.bind(fn,...) - local args = table.pack(...) - local holders,parms,bvalues,values = {},{},{'fn'},{} - local nv,maxplace,varargs = 1,0,false - for i = 1,args.n do - local a = args[i] - if isPE(a) and a.op == 'X' then - append(holders,a.repr) - maxplace = max(maxplace,a.index) - if a.index == 0 then varargs = true end - else - local v = '_v'..nv - append(bvalues,v) - append(holders,v) - append(values,a) - nv = nv + 1 - end - end - for np = 1,maxplace do - append(parms,'_'..np) - end - if varargs then append(parms,'...') end - bvalues = concat(bvalues,',') - parms = concat(parms,',') - holders = concat(holders,',') - local fstr = ([[ -return function (%s) - return function(%s) return fn(%s) end -end -]]):format(bvalues,parms,holders) - if _DEBUG then print(fstr) end - local res,err = loadstring(fstr) - res = res() - return res(fn,unpack(values)) -end - -return func - - diff --git a/Utils/luarocks/share/lua/5.1/pl/init.lua b/Utils/luarocks/share/lua/5.1/pl/init.lua deleted file mode 100644 index ee336e57c..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/init.lua +++ /dev/null @@ -1,47 +0,0 @@ --------------- --- entry point for loading all PL libraries only on demand. --- Requiring 'pl' means that whenever a module is accesssed (e.g. utils.split) --- then that module is dynamically loaded. The submodules are all brought into --- the global space. --- @class module --- @name pl - -local modules = { - utils = true,path=true,dir=true,tablex=true,stringio=true,sip=true, - input=true,seq=true,lexer=true,stringx=true, - config=true,pretty=true,data=true,func=true,text=true, - operator=true,lapp=true,array2d=true, - comprehension=true,xml=true, - test = true, app = true, file = true, class = true, List = true, - Map = true, Set = true, OrderedMap = true, MultiMap = true, - Date = true, - -- classes -- -} -_G.utils = require 'pl.utils' - -for name,klass in pairs(_G.utils.stdmt) do - klass.__index = function(t,key) - return require ('pl.'..name)[key] - end; -end - -local _hook -setmetatable(_G,{ - hook = function(handler) - _hook = handler - end, - __index = function(t,name) - local found = modules[name] - -- either true, or the name of the module containing this class. - -- either way, we load the required module and make it globally available. - if found then - -- e..g pretty.dump causes pl.pretty to become available as 'pretty' - rawset(_G,name,require('pl.'..name)) - return _G[name] - elseif _hook then - return _hook(t,name) - end - end -}) - -if _G.PENLIGHT_STRICT then require 'pl.strict' end diff --git a/Utils/luarocks/share/lua/5.1/pl/input.lua b/Utils/luarocks/share/lua/5.1/pl/input.lua deleted file mode 100644 index ea566f470..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/input.lua +++ /dev/null @@ -1,172 +0,0 @@ ---- Iterators for extracting words or numbers from an input source. ---
    ---    require 'pl'
    ---    local total,n = seq.sum(input.numbers())
    ---    print('average',total/n)
    --- 
    ---

    See here --- @class module --- @name pl.input -local strfind = string.find -local strsub = string.sub -local strmatch = string.match -local pairs,type,unpack,tonumber = pairs,type,unpack,tonumber -local utils = require 'pl.utils' -local patterns = utils.patterns -local io = io -local assert_arg = utils.assert_arg - ---[[ -module ('pl.input',utils._module) -]] - -local input = {} - ---- create an iterator over all tokens. --- based on allwords from PiL, 7.1 --- @param getter any function that returns a line of text --- @param pattern --- @param fn Optionally can pass a function to process each token as it/s found. --- @return an iterator -function input.alltokens (getter,pattern,fn) - local line = getter() -- current line - local pos = 1 -- current position in the line - return function () -- iterator function - while line do -- repeat while there are lines - local s, e = strfind(line, pattern, pos) - if s then -- found a word? - pos = e + 1 -- next position is after this token - local res = strsub(line, s, e) -- return the token - if fn then res = fn(res) end - return res - else - line = getter() -- token not found; try next line - pos = 1 -- restart from first position - end - end - return nil -- no more lines: end of traversal - end -end -local alltokens = input.alltokens - --- question: shd this _split_ a string containing line feeds? - ---- create a function which grabs the next value from a source. If the source is a string, then the getter --- will return the string and thereafter return nil. If not specified then the source is assumed to be stdin. --- @param f a string or a file-like object (i.e. has a read() method which returns the next line) --- @return a getter function -function input.create_getter(f) - if f then - if type(f) == 'string' then - local ls = utils.split(f,'\n') - local i,n = 0,#ls - return function() - i = i + 1 - if i > n then return nil end - return ls[i] - end - else - -- anything that supports the read() method! - if not f.read then error('not a file-like object') end - return function() return f:read() end - end - else - return io.read -- i.e. just read from stdin - end -end - ---- generate a sequence of numbers from a source. --- @param f A source --- @return An iterator -function input.numbers(f) - return alltokens(input.create_getter(f), - '('..patterns.FLOAT..')',tonumber) -end - ---- generate a sequence of words from a source. --- @param f A source --- @return An iterator -function input.words(f) - return alltokens(input.create_getter(f),"%w+") -end - -local function apply_tonumber (no_fail,...) - local args = {...} - for i = 1,#args do - local n = tonumber(args[i]) - if n == nil then - if not no_fail then return nil,args[i] end - else - args[i] = n - end - end - return args -end - ---- parse an input source into fields. --- By default, will fail if it cannot convert a field to a number. --- @param ids a list of field indices, or a maximum field index --- @param delim delimiter to parse fields (default space) --- @param f a source @see create_getter --- @param opts option table, {no_fail=true} --- @return an iterator with the field values --- @usage for x,y in fields {2,3} do print(x,y) end -- 2nd and 3rd fields from stdin -function input.fields (ids,delim,f,opts) - local sep - local s - local getter = input.create_getter(f) - local no_fail = opts and opts.no_fail - local no_convert = opts and opts.no_convert - if not delim or delim == ' ' then - delim = '%s' - sep = '%s+' - s = '%s*' - else - sep = delim - s = '' - end - local max_id = 0 - if type(ids) == 'table' then - for i,id in pairs(ids) do - if id > max_id then max_id = id end - end - else - max_id = ids - ids = {} - for i = 1,max_id do ids[#ids+1] = i end - end - local pat = '[^'..delim..']*' - local k = 1 - for i = 1,max_id do - if ids[k] == i then - k = k + 1 - s = s..'('..pat..')' - else - s = s..pat - end - if i < max_id then - s = s..sep - end - end - local linecount = 1 - return function() - local line,results,err - repeat - line = getter() - linecount = linecount + 1 - if not line then return nil end - if no_convert then - results = {strmatch(line,s)} - else - results,err = apply_tonumber(no_fail,strmatch(line,s)) - if not results then - utils.quit("line "..(linecount-1)..": cannot convert '"..err.."' to number") - end - end - until #results > 0 - return unpack(results) - end -end - -return input - diff --git a/Utils/luarocks/share/lua/5.1/pl/lapp.lua b/Utils/luarocks/share/lua/5.1/pl/lapp.lua deleted file mode 100644 index 80a81294a..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/lapp.lua +++ /dev/null @@ -1,350 +0,0 @@ ---- Simple command-line parsing using human-readable specification. --- Supports GNU-style parameters. ---

    ---      lapp = require 'pl.lapp'
    ---      local args = lapp [[
    ---      Does some calculations
    ---        -o,--offset (default 0.0)  Offset to add to scaled number
    ---        -s,--scale  (number)  Scaling factor
    ---         <number> (number )  Number to be scaled
    ---      ]]
    ---
    ---      print(args.offset + args.scale * args.number)
    --- 
    --- Lines begining with '-' are flags; there may be a short and a long name; --- lines begining wih '<var>' are arguments. Anything in parens after --- the flag/argument is either a default, a type name or a range constraint. ---

    See the Guide --- @class module --- @name pl.lapp - -local status,sip = pcall(require,'pl.sip') -if not status then - sip = require 'sip' -end -local match = sip.match_at_start -local append,tinsert = table.insert,table.insert - ---[[ -module('pl.lapp') -]] - -local function lines(s) return s:gmatch('([^\n]*)\n') end -local function lstrip(str) return str:gsub('^%s+','') end -local function strip(str) return lstrip(str):gsub('%s+$','') end -local function at(s,k) return s:sub(k,k) end -local function isdigit(s) return s:find('^%d+$') == 1 end - -local lapp = {} - -local open_files,parms,aliases,parmlist,usage,windows,script - -lapp.callback = false -- keep Strict happy - -local filetypes = { - stdin = {io.stdin,'file-in'}, stdout = {io.stdout,'file-out'}, - stderr = {io.stderr,'file-out'} -} - ---- controls whether to dump usage on error. --- Defaults to true -lapp.show_usage_error = true - ---- quit this script immediately. --- @param msg optional message --- @param no_usage suppress 'usage' display -function lapp.quit(msg,no_usage) - if msg then - io.stderr:write(msg..'\n\n') - end - if not no_usage then - io.stderr:write(usage) - end - os.exit(1); -end - ---- print an error to stderr and quit. --- @param msg a message --- @param no_usage suppress 'usage' display -function lapp.error(msg,no_usage) - if not lapp.show_usage_error then - no_usage = true - end - lapp.quit(script..':'..msg,no_usage) -end - ---- open a file. --- This will quit on error, and keep a list of file objects for later cleanup. --- @param file filename --- @param opt same as second parameter of io.open -function lapp.open (file,opt) - local val,err = io.open(file,opt) - if not val then lapp.error(err,true) end - append(open_files,val) - return val -end - ---- quit if the condition is false. --- @param condn a condition --- @param msg an optional message -function lapp.assert(condn,msg) - if not condn then - lapp.error(msg) - end -end - -local function range_check(x,min,max,parm) - lapp.assert(min <= x and max >= x,parm..' out of range') -end - -local function xtonumber(s) - local val = tonumber(s) - if not val then lapp.error("unable to convert to number: "..s) end - return val -end - -local function is_filetype(type) - return type == 'file-in' or type == 'file-out' -end - -local types - -local function convert_parameter(ps,val) - if ps.converter then - val = ps.converter(val) - end - if ps.type == 'number' then - val = xtonumber(val) - elseif is_filetype(ps.type) then - val = lapp.open(val,(ps.type == 'file-in' and 'r') or 'w' ) - elseif ps.type == 'boolean' then - val = true - end - if ps.constraint then - ps.constraint(val) - end - return val -end - ---- add a new type to Lapp. These appear in parens after the value like --- a range constraint, e.g. ' (integer) Process PID' --- @param name name of type --- @param converter either a function to convert values, or a Lua type name. --- @param constraint optional function to verify values, should use lapp.error --- if failed. -function lapp.add_type (name,converter,constraint) - types[name] = {converter=converter,constraint=constraint} -end - -local function force_short(short) - lapp.assert(#short==1,short..": short parameters should be one character") -end - -local function process_default (sval) - local val = tonumber(sval) - if val then -- we have a number! - return val,'number' - elseif filetypes[sval] then - local ft = filetypes[sval] - return ft[1],ft[2] - else - if sval:match '^["\']' then sval = sval:sub(2,-2) end - return sval,'string' - end -end - ---- process a Lapp options string. --- Usually called as lapp(). --- @param str the options text --- @return a table with parameter-value pairs -function lapp.process_options_string(str) - local results = {} - local opts = {at_start=true} - local varargs - open_files = {} - parms = {} - aliases = {} - parmlist = {} - types = {} - - local function check_varargs(s) - local res,cnt = s:gsub('^%.%.%.%s*','') - return res, (cnt > 0) - end - - local function set_result(ps,parm,val) - if not ps.varargs then - results[parm] = val - else - if not results[parm] then - results[parm] = { val } - else - append(results[parm],val) - end - end - end - - usage = str - - for line in lines(str) do - local res = {} - local optspec,optparm,i1,i2,defval,vtype,constraint,rest - line = lstrip(line) - local function check(str) - return match(str,line,res) - end - - -- flags: either '-', '-,--' or '--' - if check '-$v{short}, --$v{long} $' or check '-$v{short} $' or check '--$v{long} $' then - if res.long then - optparm = res.long - if res.short then aliases[res.short] = optparm end - else - optparm = res.short - end - if res.short then force_short(res.short) end - res.rest, varargs = check_varargs(res.rest) - elseif check '$<{name} $' then -- is it ? - -- so becomes input_file ... - optparm,rest = res.name:match '([^%.]+)(.*)' - optparm = optparm:gsub('%A','_') - varargs = rest == '...' - append(parmlist,optparm) - end - if res.rest then -- this is not a pure doc line - line = res.rest - res = {} - -- do we have (default ) or ()? - if match('$({def} $',line,res) or match('$({def}',line,res) then - local typespec = strip(res.def) - if match('default $',typespec,res) then - defval,vtype = process_default(res[1]) - elseif match('$f{min}..$f{max}',typespec,res) then - local min,max = res.min,res.max - vtype = 'number' - constraint = function(x) - range_check(x,min,max,optparm) - end - else -- () just contains type of required parameter - vtype = typespec - end - else -- must be a plain flag, no extra parameter required - defval = false - vtype = 'boolean' - end - local ps = { - type = vtype, - defval = defval, - required = defval == nil, - comment = res.rest or optparm, - constraint = constraint, - varargs = varargs - } - varargs = nil - if types[vtype] then - local converter = types[vtype].converter - if type(converter) == 'string' then - ps.type = converter - else - ps.converter = converter - end - ps.constraint = types[vtype].constraint - end - parms[optparm] = ps - end - end - -- cool, we have our parms, let's parse the command line args - local iparm = 1 - local iextra = 1 - local i = 1 - local parm,ps,val - - while i <= #arg do - local theArg = arg[i] - local res = {} - -- look for a flag, - or -- - if match('--$v{long}',theArg,res) or match('-$v{short}',theArg,res) then - if res.long then -- long option - parm = res.long - elseif #res.short == 1 then - parm = res.short - else - local parmstr = res.short - parm = at(parmstr,1) - if isdigit(at(parmstr,2)) then - -- a short option followed by a digit is an exception (for AW;)) - -- push ahead into the arg array - tinsert(arg,i+1,parmstr:sub(2)) - else - -- push multiple flags into the arg array! - for k = 2,#parmstr do - tinsert(arg,i+k-1,'-'..at(parmstr,k)) - end - end - end - if parm == 'h' or parm == 'help' then - lapp.quit() - end - if aliases[parm] then parm = aliases[parm] end - else -- a parameter - parm = parmlist[iparm] - if not parm then - -- extra unnamed parameters are indexed starting at 1 - parm = iextra - ps = { type = 'string' } - parms[parm] = ps - iextra = iextra + 1 - else - ps = parms[parm] - end - if not ps.varargs then - iparm = iparm + 1 - end - val = theArg - end - ps = parms[parm] - if not ps then lapp.error("unrecognized parameter: "..parm) end - if ps.type ~= 'boolean' then -- we need a value! This should follow - if not val then - i = i + 1 - val = arg[i] - end - lapp.assert(val,parm.." was expecting a value") - end - ps.used = true - val = convert_parameter(ps,val) - set_result(ps,parm,val) - if is_filetype(ps.type) then - set_result(ps,parm..'_name',theArg) - end - if lapp.callback then - lapp.callback(parm,theArg,res) - end - i = i + 1 - val = nil - end - -- check unused parms, set defaults and check if any required parameters were missed - for parm,ps in pairs(parms) do - if not ps.used then - if ps.required then lapp.error("missing required parameter: "..parm) end - set_result(ps,parm,ps.defval) - end - end - return results -end - -if arg then - script = arg[0]:gsub('.+[\\/]',''):gsub('%.%a+$','') -else - script = "inter" -end - - -setmetatable(lapp, { - __call = function(tbl,str) return lapp.process_options_string(str) end, -}) - - -return lapp - - diff --git a/Utils/luarocks/share/lua/5.1/pl/lexer.lua b/Utils/luarocks/share/lua/5.1/pl/lexer.lua deleted file mode 100644 index 5b9fa0c80..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/lexer.lua +++ /dev/null @@ -1,461 +0,0 @@ ---- Lexical scanner for creating a sequence of tokens from text.
    ---

    lexer.scan(s) returns an iterator over all tokens found in the --- string s. This iterator returns two values, a token type string --- (such as 'string' for quoted string, 'iden' for identifier) and the value of the --- token. ---

    --- Versions specialized for Lua and C are available; these also handle block comments --- and classify keywords as 'keyword' tokens. For example: ---

    --- > s = 'for i=1,n do'
    --- > for t,v in lexer.lua(s)  do print(t,v) end
    --- keyword for
    --- iden    i
    --- =       =
    --- number  1
    --- ,       ,
    --- iden    n
    --- keyword do
    --- 
    --- See the Guide for further discussion
    --- @class module --- @name pl.lexer - -local yield,wrap = coroutine.yield,coroutine.wrap -local strfind = string.find -local strsub = string.sub -local append = table.insert ---[[ -module ('pl.lexer',utils._module) -]] - -local function assert_arg(idx,val,tp) - if type(val) ~= tp then - error("argument "..idx.." must be "..tp, 2) - end -end - -local lexer = {} - -local NUMBER1 = '^[%+%-]?%d+%.?%d*[eE][%+%-]?%d+' -local NUMBER2 = '^[%+%-]?%d+%.?%d*' -local NUMBER3 = '^0x[%da-fA-F]+' -local NUMBER4 = '^%d+%.?%d*[eE][%+%-]?%d+' -local NUMBER5 = '^%d+%.?%d*' -local IDEN = '^[%a_][%w_]*' -local WSPACE = '^%s+' -local STRING1 = [[^'.-[^\\]']] -local STRING2 = [[^".-[^\\]"]] -local STRING3 = "^((['\"])%2)" -- empty string -local PREPRO = '^#.-[^\\]\n' - -local plain_matches,lua_matches,cpp_matches,lua_keyword,cpp_keyword - -local function tdump(tok) - return yield(tok,tok) -end - -local function ndump(tok,options) - if options and options.number then - tok = tonumber(tok) - end - return yield("number",tok) -end - --- regular strings, single or double quotes; usually we want them --- without the quotes -local function sdump(tok,options) - if options and options.string then - tok = tok:sub(2,-2) - end - return yield("string",tok) -end - --- long Lua strings need extra work to get rid of the quotes -local function sdump_l(tok,options) - if options and options.string then - tok = tok:sub(3,-3) - end - return yield("string",tok) -end - -local function chdump(tok,options) - if options and options.string then - tok = tok:sub(2,-2) - end - return yield("char",tok) -end - -local function cdump(tok) - return yield('comment',tok) -end - -local function wsdump (tok) - return yield("space",tok) -end - -local function pdump (tok) - return yield('prepro',tok) -end - -local function plain_vdump(tok) - return yield("iden",tok) -end - -local function lua_vdump(tok) - if lua_keyword[tok] then - return yield("keyword",tok) - else - return yield("iden",tok) - end -end - -local function cpp_vdump(tok) - if cpp_keyword[tok] then - return yield("keyword",tok) - else - return yield("iden",tok) - end -end - ---- create a plain token iterator from a string or file-like object. --- @param s the string --- @param matches an optional match table (set of pattern-action pairs) --- @param filter a table of token types to exclude, by default {space=true} --- @param options a table of options; by default, {number=true,string=true}, --- which means convert numbers and strip string quotes. -function lexer.scan (s,matches,filter,options) - --assert_arg(1,s,'string') - local file = type(s) ~= 'string' and s - filter = filter or {space=true} - options = options or {number=true,string=true} - if filter then - if filter.space then filter[wsdump] = true end - if filter.comments then - filter[cdump] = true - end - end - if not matches then - if not plain_matches then - plain_matches = { - {WSPACE,wsdump}, - {NUMBER3,ndump}, - {IDEN,plain_vdump}, - {NUMBER1,ndump}, - {NUMBER2,ndump}, - {STRING3,sdump}, - {STRING1,sdump}, - {STRING2,sdump}, - {'^.',tdump} - } - end - matches = plain_matches - end - local function lex () - local i1,i2,idx,res1,res2,tok,pat,fun,capt - local line = 1 - if file then s = file:read()..'\n' end - local sz = #s - local idx = 1 - --print('sz',sz) - while true do - for _,m in ipairs(matches) do - pat = m[1] - fun = m[2] - i1,i2 = strfind(s,pat,idx) - if i1 then - tok = strsub(s,i1,i2) - idx = i2 + 1 - if not (filter and filter[fun]) then - lexer.finished = idx > sz - res1,res2 = fun(tok,options) - end - if res1 then - local tp = type(res1) - -- insert a token list - if tp=='table' then - yield('','') - for _,t in ipairs(res1) do - yield(t[1],t[2]) - end - elseif tp == 'string' then -- or search up to some special pattern - i1,i2 = strfind(s,res1,idx) - if i1 then - tok = strsub(s,i1,i2) - idx = i2 + 1 - yield('',tok) - else - yield('','') - idx = sz + 1 - end - --if idx > sz then return end - else - yield(line,idx) - end - end - if idx > sz then - if file then - --repeat -- next non-empty line - line = line + 1 - s = file:read() - if not s then return end - --until not s:match '^%s*$' - s = s .. '\n' - idx ,sz = 1,#s - break - else - return - end - else break end - end - end - end - end - return wrap(lex) -end - -local function isstring (s) - return type(s) == 'string' -end - ---- insert tokens into a stream. --- @param tok a token stream --- @param a1 a string is the type, a table is a token list and --- a function is assumed to be a token-like iterator (returns type & value) --- @param a2 a string is the value -function lexer.insert (tok,a1,a2) - if not a1 then return end - local ts - if isstring(a1) and isstring(a2) then - ts = {{a1,a2}} - elseif type(a1) == 'function' then - ts = {} - for t,v in a1() do - append(ts,{t,v}) - end - else - ts = a1 - end - tok(ts) -end - ---- get everything in a stream upto a newline. --- @param tok a token stream --- @return a string -function lexer.getline (tok) - local t,v = tok('.-\n') - return v -end - ---- get current line number.
    --- Only available if the input source is a file-like object. --- @param tok a token stream --- @return the line number and current column -function lexer.lineno (tok) - return tok(0) -end - ---- get the rest of the stream. --- @param tok a token stream --- @return a string -function lexer.getrest (tok) - local t,v = tok('.+') - return v -end - ---- get the Lua keywords as a set-like table. --- So res["and"] etc would be true. --- @return a table -function lexer.get_keywords () - if not lua_keyword then - lua_keyword = { - ["and"] = true, ["break"] = true, ["do"] = true, - ["else"] = true, ["elseif"] = true, ["end"] = true, - ["false"] = true, ["for"] = true, ["function"] = true, - ["if"] = true, ["in"] = true, ["local"] = true, ["nil"] = true, - ["not"] = true, ["or"] = true, ["repeat"] = true, - ["return"] = true, ["then"] = true, ["true"] = true, - ["until"] = true, ["while"] = true - } - end - return lua_keyword -end - - ---- create a Lua token iterator from a string or file-like object. --- Will return the token type and value. --- @param s the string --- @param filter a table of token types to exclude, by default {space=true,comments=true} --- @param options a table of options; by default, {number=true,string=true}, --- which means convert numbers and strip string quotes. -function lexer.lua(s,filter,options) - filter = filter or {space=true,comments=true} - lexer.get_keywords() - if not lua_matches then - lua_matches = { - {WSPACE,wsdump}, - {NUMBER3,ndump}, - {IDEN,lua_vdump}, - {NUMBER4,ndump}, - {NUMBER5,ndump}, - {STRING3,sdump}, - {STRING1,sdump}, - {STRING2,sdump}, - {'^%-%-%[%[.-%]%]',cdump}, - {'^%-%-.-\n',cdump}, - {'^%[%[.-%]%]',sdump_l}, - {'^==',tdump}, - {'^~=',tdump}, - {'^<=',tdump}, - {'^>=',tdump}, - {'^%.%.%.',tdump}, - {'^%.%.',tdump}, - {'^.',tdump} - } - end - return lexer.scan(s,lua_matches,filter,options) -end - ---- create a C/C++ token iterator from a string or file-like object. --- Will return the token type type and value. --- @param s the string --- @param filter a table of token types to exclude, by default {space=true,comments=true} --- @param options a table of options; by default, {number=true,string=true}, --- which means convert numbers and strip string quotes. -function lexer.cpp(s,filter,options) - filter = filter or {comments=true} - if not cpp_keyword then - cpp_keyword = { - ["class"] = true, ["break"] = true, ["do"] = true, ["sizeof"] = true, - ["else"] = true, ["continue"] = true, ["struct"] = true, - ["false"] = true, ["for"] = true, ["public"] = true, ["void"] = true, - ["private"] = true, ["protected"] = true, ["goto"] = true, - ["if"] = true, ["static"] = true, ["const"] = true, ["typedef"] = true, - ["enum"] = true, ["char"] = true, ["int"] = true, ["bool"] = true, - ["long"] = true, ["float"] = true, ["true"] = true, ["delete"] = true, - ["double"] = true, ["while"] = true, ["new"] = true, - ["namespace"] = true, ["try"] = true, ["catch"] = true, - ["switch"] = true, ["case"] = true, ["extern"] = true, - ["return"] = true,["default"] = true,['unsigned'] = true,['signed'] = true, - ["union"] = true, ["volatile"] = true, ["register"] = true,["short"] = true, - } - end - if not cpp_matches then - cpp_matches = { - {WSPACE,wsdump}, - {PREPRO,pdump}, - {NUMBER3,ndump}, - {IDEN,cpp_vdump}, - {NUMBER4,ndump}, - {NUMBER5,ndump}, - {STRING3,sdump}, - {STRING1,chdump}, - {STRING2,sdump}, - {'^//.-\n',cdump}, - {'^/%*.-%*/',cdump}, - {'^==',tdump}, - {'^!=',tdump}, - {'^<=',tdump}, - {'^>=',tdump}, - {'^->',tdump}, - {'^&&',tdump}, - {'^||',tdump}, - {'^%+%+',tdump}, - {'^%-%-',tdump}, - {'^%+=',tdump}, - {'^%-=',tdump}, - {'^%*=',tdump}, - {'^/=',tdump}, - {'^|=',tdump}, - {'^%^=',tdump}, - {'^::',tdump}, - {'^.',tdump} - } - end - return lexer.scan(s,cpp_matches,filter,options) -end - ---- get a list of parameters separated by a delimiter from a stream. --- @param tok the token stream --- @param endtoken end of list (default ')'). Can be '\n' --- @param delim separator (default ',') --- @return a list of token lists. -function lexer.get_separated_list(tok,endtoken,delim) - endtoken = endtoken or ')' - delim = delim or ',' - local parm_values = {} - local level = 1 -- used to count ( and ) - local tl = {} - local function tappend (tl,t,val) - val = val or t - append(tl,{t,val}) - end - local is_end - if endtoken == '\n' then - is_end = function(t,val) - return t == 'space' and val:find '\n' - end - else - is_end = function (t) - return t == endtoken - end - end - local token,value - while true do - token,value=tok() - if not token then return nil,'EOS' end -- end of stream is an error! - if is_end(token,value) and level == 1 then - append(parm_values,tl) - break - elseif token == '(' then - level = level + 1 - tappend(tl,'(') - elseif token == ')' then - level = level - 1 - if level == 0 then -- finished with parm list - append(parm_values,tl) - break - else - tappend(tl,')') - end - elseif token == delim and level == 1 then - append(parm_values,tl) -- a new parm - tl = {} - else - tappend(tl,token,value) - end - end - return parm_values,{token,value} -end - ---- get the next non-space token from the stream. --- @param tok the token stream. -function lexer.skipws (tok) - local t,v = tok() - while t == 'space' do - t,v = tok() - end - return t,v -end - -local skipws = lexer.skipws - ---- get the next token, which must be of the expected type. --- Throws an error if this type does not match! --- @param tok the token stream --- @param expected_type the token type --- @param no_skip_ws whether we should skip whitespace -function lexer.expecting (tok,expected_type,no_skip_ws) - assert_arg(1,tok,'function') - assert_arg(2,expected_type,'string') - local t,v - if no_skip_ws then - t,v = tok() - else - t,v = skipws(tok) - end - if t ~= expected_type then error ("expecting "..expected_type,2) end - return v -end - -return lexer diff --git a/Utils/luarocks/share/lua/5.1/pl/luabalanced.lua b/Utils/luarocks/share/lua/5.1/pl/luabalanced.lua deleted file mode 100644 index bb2377836..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/luabalanced.lua +++ /dev/null @@ -1,264 +0,0 @@ ---- Extract delimited Lua sequences from strings. --- Inspired by Damian Conway's Text::Balanced in Perl.
    ---
      ---
    • [1] Lua Wiki Page
    • ---
    • [2] http://search.cpan.org/dist/Text-Balanced/lib/Text/Balanced.pm
    • ---

    ---
    --- local lb = require "pl.luabalanced"
    --- --Extract Lua expression starting at position 4.
    ---  print(lb.match_expression("if x^2 + x > 5 then print(x) end", 4))
    ---  --> x^2 + x > 5     16
    --- --Extract Lua string starting at (default) position 1.
    --- print(lb.match_string([["test\"123" .. "more"]]))
    --- --> "test\"123"     12
    --- 
    --- (c) 2008, David Manura, Licensed under the same terms as Lua (MIT license). --- @class module --- @name pl.luabalanced - -local M = {} - -local assert = assert -local table_concat = table.concat - --- map opening brace <-> closing brace. -local ends = { ['('] = ')', ['{'] = '}', ['['] = ']' } -local begins = {}; for k,v in pairs(ends) do begins[v] = k end - - --- Match Lua string in string starting at position . --- Returns , , where is the matched --- string (or nil on no match) and is the character --- following the match (or on no match). --- Supports all Lua string syntax: "...", '...', [[...]], [=[...]=], etc. -local function match_string(s, pos) - pos = pos or 1 - local posa = pos - local c = s:sub(pos,pos) - if c == '"' or c == "'" then - pos = pos + 1 - while 1 do - pos = assert(s:find("[" .. c .. "\\]", pos), 'syntax error') - if s:sub(pos,pos) == c then - local part = s:sub(posa, pos) - return part, pos + 1 - else - pos = pos + 2 - end - end - else - local sc = s:match("^%[(=*)%[", pos) - if sc then - local _; _, pos = s:find("%]" .. sc .. "%]", pos) - assert(pos) - local part = s:sub(posa, pos) - return part, pos + 1 - else - return nil, pos - end - end -end -M.match_string = match_string - - --- Match bracketed Lua expression, e.g. "(...)", "{...}", "[...]", "[[...]]", --- [=[...]=], etc. --- Function interface is similar to match_string. -local function match_bracketed(s, pos) - pos = pos or 1 - local posa = pos - local ca = s:sub(pos,pos) - if not ends[ca] then - return nil, pos - end - local stack = {} - while 1 do - pos = s:find('[%(%{%[%)%}%]\"\']', pos) - assert(pos, 'syntax error: unbalanced') - local c = s:sub(pos,pos) - if c == '"' or c == "'" then - local part; part, pos = match_string(s, pos) - assert(part) - elseif ends[c] then -- open - local mid, posb - if c == '[' then mid, posb = s:match('^%[(=*)%[()', pos) end - if mid then - pos = s:match('%]' .. mid .. '%]()', posb) - assert(pos, 'syntax error: long string not terminated') - if #stack == 0 then - local part = s:sub(posa, pos-1) - return part, pos - end - else - stack[#stack+1] = c - pos = pos + 1 - end - else -- close - assert(stack[#stack] == assert(begins[c]), 'syntax error: unbalanced') - stack[#stack] = nil - if #stack == 0 then - local part = s:sub(posa, pos) - return part, pos+1 - end - pos = pos + 1 - end - end -end -M.match_bracketed = match_bracketed - - --- Match Lua comment, e.g. "--...\n", "--[[...]]", "--[=[...]=]", etc. --- Function interface is similar to match_string. -local function match_comment(s, pos) - pos = pos or 1 - if s:sub(pos, pos+1) ~= '--' then - return nil, pos - end - pos = pos + 2 - local partt, post = match_string(s, pos) - if partt then - return '--' .. partt, post - end - local part; part, pos = s:match('^([^\n]*\n?)()', pos) - return '--' .. part, pos -end - - --- Match Lua expression, e.g. "a + b * c[e]". --- Function interface is similar to match_string. -local wordop = {['and']=true, ['or']=true, ['not']=true} -local is_compare = {['>']=true, ['<']=true, ['~']=true} -local function match_expression(s, pos) - pos = pos or 1 - local posa = pos - local lastident - local poscs, posce - while pos do - local c = s:sub(pos,pos) - if c == '"' or c == "'" or c == '[' and s:find('^[=%[]', pos+1) then - local part; part, pos = match_string(s, pos) - assert(part, 'syntax error') - elseif c == '-' and s:sub(pos+1,pos+1) == '-' then - -- note: handle adjacent comments in loop to properly support - -- backtracing (poscs/posce). - poscs = pos - while s:sub(pos,pos+1) == '--' do - local part; part, pos = match_comment(s, pos) - assert(part) - pos = s:match('^%s*()', pos) - posce = pos - end - elseif c == '(' or c == '{' or c == '[' then - local part; part, pos = match_bracketed(s, pos) - elseif c == '=' and s:sub(pos+1,pos+1) == '=' then - pos = pos + 2 -- skip over two-char op containing '=' - elseif c == '=' and is_compare[s:sub(pos-1,pos-1)] then - pos = pos + 1 -- skip over two-char op containing '=' - elseif c:match'^[%)%}%];,=]' then - local part = s:sub(posa, pos-1) - return part, pos - elseif c:match'^[%w_]' then - local newident,newpos = s:match('^([%w_]+)()', pos) - if pos ~= posa and not wordop[newident] then -- non-first ident - local pose = ((posce == pos) and poscs or pos) - 1 - while s:match('^%s', pose) do pose = pose - 1 end - local ce = s:sub(pose,pose) - if ce:match'[%)%}\'\"%]]' or - ce:match'[%w_]' and not wordop[lastident] - then - local part = s:sub(posa, pos-1) - return part, pos - end - end - lastident, pos = newident, newpos - else - pos = pos + 1 - end - pos = s:find('[%(%{%[%)%}%]\"\';,=%w_%-]', pos) - end - local part = s:sub(posa, #s) - return part, #s+1 -end -M.match_expression = match_expression - - --- Match name list (zero or more names). E.g. "a,b,c" --- Function interface is similar to match_string, --- but returns array as match. -local function match_namelist(s, pos) - pos = pos or 1 - local list = {} - while 1 do - local c = #list == 0 and '^' or '^%s*,%s*' - local item, post = s:match(c .. '([%a_][%w_]*)%s*()', pos) - if item then pos = post else break end - list[#list+1] = item - end - return list, pos -end -M.match_namelist = match_namelist - - --- Match expression list (zero or more expressions). E.g. "a+b,b*c". --- Function interface is similar to match_string, --- but returns array as match. -local function match_explist(s, pos) - pos = pos or 1 - local list = {} - while 1 do - if #list ~= 0 then - local post = s:match('^%s*,%s*()', pos) - if post then pos = post else break end - end - local item; item, pos = match_expression(s, pos) - assert(item, 'syntax error') - list[#list+1] = item - end - return list, pos -end -M.match_explist = match_explist - - --- Replace snippets of code in Lua code string --- using replacement function f(u,sin) --> sout. --- is the type of snippet ('c' = comment, 's' = string, --- 'e' = any other code). --- Snippet is replaced with (unless is nil or false, in --- which case the original snippet is kept) --- This is somewhat analogous to string.gsub . -local function gsub(s, f) - local pos = 1 - local posa = 1 - local sret = '' - while 1 do - pos = s:find('[%-\'\"%[]', pos) - if not pos then break end - if s:match('^%-%-', pos) then - local exp = s:sub(posa, pos-1) - if #exp > 0 then sret = sret .. (f('e', exp) or exp) end - local comment; comment, pos = match_comment(s, pos) - sret = sret .. (f('c', assert(comment)) or comment) - posa = pos - else - local posb = s:find('^[\'\"%[]', pos) - local str - if posb then str, pos = match_string(s, posb) end - if str then - local exp = s:sub(posa, posb-1) - if #exp > 0 then sret = sret .. (f('e', exp) or exp) end - sret = sret .. (f('s', str) or str) - posa = pos - else - pos = pos + 1 - end - end - end - local exp = s:sub(posa) - if #exp > 0 then sret = sret .. (f('e', exp) or exp) end - return sret -end -M.gsub = gsub - - -return M diff --git a/Utils/luarocks/share/lua/5.1/pl/operator.lua b/Utils/luarocks/share/lua/5.1/pl/operator.lua deleted file mode 100644 index 48c8a10b4..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/operator.lua +++ /dev/null @@ -1,197 +0,0 @@ ---- Lua operators available as functions. --- (similar to the Python module of the same name)
    --- There is a module field optable which maps the operator strings --- onto these functions, e.g.
    operator.optable['()']==operator.call
    ---

    Operator strings like '>' and '{}' can be passed to most Penlight functions --- expecting a function argument.

    --- @class module --- @name pl.operator - -local strfind = string.find -local utils = require 'pl.utils' - -local operator = {} - ---- apply function to some arguments () --- @param fn a function or callable object --- @param ... arguments -function operator.call(fn,...) - return fn(...) -end - ---- get the indexed value from a table [] --- @param t a table or any indexable object --- @param k the key -function operator.index(t,k) - return t[k] -end - ---- returns true if arguments are equal == --- @param a value --- @param b value -function operator.eq(a,b) - return a==b -end - ---- returns true if arguments are not equal ~= - -- @param a value --- @param b value -function operator.neq(a,b) - return a~=b -end - ---- returns true if a is less than b < --- @param a value --- @param b value -function operator.lt(a,b) - return a < b -end - ---- returns true if a is less or equal to b <= --- @param a value --- @param b value -function operator.le(a,b) - return a <= b -end - ---- returns true if a is greater than b > --- @param a value --- @param b value -function operator.gt(a,b) - return a > b -end - ---- returns true if a is greater or equal to b >= --- @param a value --- @param b value -function operator.ge(a,b) - return a >= b -end - ---- returns length of string or table # --- @param a a string or a table -function operator.len(a) - return #a -end - ---- add two values + --- @param a value --- @param b value -function operator.add(a,b) - return a+b -end - ---- subtract b from a - --- @param a value --- @param b value -function operator.sub(a,b) - return a-b -end - ---- multiply two values * --- @param a value --- @param b value -function operator.mul(a,b) - return a*b -end - ---- divide first value by second / --- @param a value --- @param b value -function operator.div(a,b) - return a/b -end - ---- raise first to the power of second ^ --- @param a value --- @param b value -function operator.pow(a,b) - return a^b -end - ---- modulo; remainder of a divided by b % --- @param a value --- @param b value -function operator.mod(a,b) - return a%b -end - ---- concatenate two values (either strings or __concat defined) .. --- @param a value --- @param b value -function operator.concat(a,b) - return a..b -end - ---- return the negative of a value - --- @param a value --- @param b value -function operator.unm(a) - return -a -end - ---- false if value evaluates as true not --- @param a value -function operator.lnot(a) - return not a -end - ---- true if both values evaluate as true and --- @param a value --- @param b value -function operator.land(a,b) - return a and b -end - ---- true if either value evaluate as true or --- @param a value --- @param b value -function operator.lor(a,b) - return a or b -end - ---- make a table from the arguments {} --- @param ... non-nil arguments --- @return a table -function operator.table (...) - return {...} -end - ---- match two strings ~ --- uses @{string.find} -function operator.match (a,b) - return strfind(a,b)~=nil -end - ---- the null operation. --- @param ... arguments --- @return the arguments -function operator.nop (...) - return ... -end - - operator.optable = { - ['+']=operator.add, - ['-']=operator.sub, - ['*']=operator.mul, - ['/']=operator.div, - ['%']=operator.mod, - ['^']=operator.pow, - ['..']=operator.concat, - ['()']=operator.call, - ['[]']=operator.index, - ['<']=operator.lt, - ['<=']=operator.le, - ['>']=operator.gt, - ['>=']=operator.ge, - ['==']=operator.eq, - ['~=']=operator.neq, - ['#']=operator.len, - ['and']=operator.land, - ['or']=operator.lor, - ['{}']=operator.table, - ['~']=operator.match, - ['']=operator.nop, -} - -return operator diff --git a/Utils/luarocks/share/lua/5.1/pl/path.lua b/Utils/luarocks/share/lua/5.1/pl/path.lua deleted file mode 100644 index 9055f3f4b..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/path.lua +++ /dev/null @@ -1,335 +0,0 @@ ---- Path manipulation and file queries.
    --- This is modelled after Python's os.path library (11.1) --- @class module --- @name pl.path - --- imports and locals -local _G = _G -local sub = string.sub -local getenv = os.getenv -local tmpnam = os.tmpname -local attributes, currentdir, link_attrib -local package = package -local io = io -local append = table.insert -local ipairs = ipairs -local utils = require 'pl.utils' -local assert_arg,assert_string,raise = utils.assert_arg,utils.assert_string,utils.raise - ---[[ -module ('pl.path',utils._module) -]] - -local path, attrib - -if _G.luajava then - path = require 'pl.platf.luajava' -else - path = {} - - local res,lfs = _G.pcall(_G.require,'lfs') - if res then - attributes = lfs.attributes - currentdir = lfs.currentdir - link_attrib = lfs.symlinkattributes - else - error("pl.path requires LuaFileSystem") - end - - attrib = attributes - path.attrib = attrib - path.link_attrib = link_attrib - path.dir = lfs.dir - path.mkdir = lfs.mkdir - path.rmdir = lfs.rmdir - path.chdir = lfs.chdir - - --- is this a directory? - -- @param P A file path - function path.isdir(P) - if P:match("\\$") then - P = P:sub(1,-2) - end - return attrib(P,'mode') == 'directory' - end - - --- is this a file?. - -- @param P A file path - function path.isfile(P) - return attrib(P,'mode') == 'file' - end - - -- is this a symbolic link? - -- @param P A file path - function path.islink(P) - if link_attrib then - return link_attrib(P,'mode')=='link' - else - return false - end - end - - --- return size of a file. - -- @param P A file path - function path.getsize(P) - return attrib(P,'size') - end - - --- does a path exist?. - -- @param P A file path - -- @return the file path if it exists, nil otherwise - function path.exists(P) - return attrib(P,'mode') ~= nil and P - end - - --- Return the time of last access as the number of seconds since the epoch. - -- @param P A file path - function path.getatime(P) - return attrib(P,'access') - end - - --- Return the time of last modification - -- @param P A file path - function path.getmtime(P) - return attrib(P,'modification') - end - - ---Return the system's ctime. - -- @param P A file path - function path.getctime(P) - return path.attrib(P,'change') - end -end - - -local function at(s,i) - return sub(s,i,i) -end - -path.is_windows = utils.dir_separator == '\\' - -local other_sep --- !constant sep is the directory separator for this platform. -if path.is_windows then - path.sep = '\\'; other_sep = '/' - path.dirsep = ';' -else - path.sep = '/' - path.dirsep = ':' -end -local sep,dirsep = path.sep,path.dirsep - ---- are we running Windows? --- @class field --- @name path.is_windows - ---- path separator for this platform. --- @class field --- @name path.sep - ---- separator for PATH for this platform --- @class field --- @name path.dirsep - ---- given a path, return the directory part and a file part. --- if there's no directory part, the first value will be empty --- @param P A file path -function path.splitpath(P) - assert_string(1,P) - local i = #P - local ch = at(P,i) - while i > 0 and ch ~= sep and ch ~= other_sep do - i = i - 1 - ch = at(P,i) - end - if i == 0 then - return '',P - else - return sub(P,1,i-1), sub(P,i+1) - end -end - ---- return an absolute path. --- @param P A file path -function path.abspath(P) - assert_string(1,P) - if not currentdir then return P end - P = P:gsub('[\\/]$','') - local pwd = currentdir() - if not path.isabs(P) then - return path.join(pwd,P) - elseif path.is_windows and at(P,2) ~= ':' and at(P,2) ~= '\\' then - return pwd:sub(1,2)..P - else - return P - end -end - ---- given a path, return the root part and the extension part. --- if there's no extension part, the second value will be empty --- @param P A file path -function path.splitext(P) - assert_string(1,P) - local i = #P - local ch = at(P,i) - while i > 0 and ch ~= '.' do - if ch == sep or ch == other_sep then - return P,'' - end - i = i - 1 - ch = at(P,i) - end - if i == 0 then - return P,'' - else - return sub(P,1,i-1),sub(P,i) - end -end - ---- return the directory part of a path --- @param P A file path -function path.dirname(P) - assert_string(1,P) - local p1,p2 = path.splitpath(P) - return p1 -end - ---- return the file part of a path --- @param P A file path -function path.basename(P) - assert_string(1,P) - local p1,p2 = path.splitpath(P) - return p2 -end - ---- get the extension part of a path. --- @param P A file path -function path.extension(P) - assert_string(1,P) - local p1,p2 = path.splitext(P) - return p2 -end - ---- is this an absolute path?. --- @param P A file path -function path.isabs(P) - assert_string(1,P) - if path.is_windows then - return at(P,1) == '/' or at(P,1)=='\\' or at(P,2)==':' - else - return at(P,1) == '/' - end -end - ---- return the P resulting from combining the two paths. --- if the second is already an absolute path, then it returns it. --- @param p1 A file path --- @param p2 A file path -function path.join(p1,p2) - assert_string(1,p1) - assert_string(2,p2) - if path.isabs(p2) then return p2 end - local endc = at(p1,#p1) - if endc ~= path.sep and endc ~= other_sep then - p1 = p1..path.sep - end - return p1..p2 -end - ---- normalize the case of a pathname. On Unix, this returns the path unchanged; --- for Windows, it converts the path to lowercase, and it also converts forward slashes --- to backward slashes. --- @param P A file path -function path.normcase(P) - assert_string(1,P) - if path.is_windows then - return (P:lower():gsub('/','\\')) - else - return P - end -end - ---- normalize a path name. --- A//B, A/./B and A/foo/../B all become A/B. --- @param P a file path -function path.normpath (P) - assert_string(1,P) - if path.is_windows then - P = P:gsub('/','\\') - return (P:gsub('[^\\]+\\%.%.\\',''):gsub('\\%.?\\','\\')) - else - return (P:gsub('[^/]+/%.%./',''):gsub('/%.?/','/')) - end -end - - ---- Replace a starting '~' with the user's home directory. --- In windows, if HOME isn't set, then USERPROFILE is used in preference to --- HOMEDRIVE HOMEPATH. This is guaranteed to be writeable on all versions of Windows. --- @param P A file path -function path.expanduser(P) - assert_string(1,P) - if at(P,1) == '~' then - local home = getenv('HOME') - if not home then -- has to be Windows - home = getenv 'USERPROFILE' or (getenv 'HOMEDRIVE' .. getenv 'HOMEPATH') - end - return home..sub(P,2) - else - return P - end -end - - ----Return a suitable full path to a new temporary file name. --- unlike os.tmpnam(), it always gives you a writeable path (uses %TMP% on Windows) -function path.tmpname () - local res = tmpnam() - if path.is_windows then res = getenv('TMP')..res end - return res -end - ---- return the largest common prefix path of two paths. --- @param path1 a file path --- @param path2 a file path -function path.common_prefix (path1,path2) - assert_string(1,path1) - assert_string(2,path2) - -- get them in order! - if #path1 > #path2 then path2,path1 = path1,path2 end - for i = 1,#path1 do - local c1 = at(path1,i) - if c1 ~= at(path2,i) then - local cp = path1:sub(1,i-1) - if at(path1,i-1) ~= sep then - cp = path.dirname(cp) - end - return cp - end - end - if at(path2,#path1+1) ~= sep then path1 = path.dirname(path1) end - return path1 - --return '' -end - - ---- return the full path where a particular Lua module would be found. --- Both package.path and package.cpath is searched, so the result may --- either be a Lua file or a shared libarary. --- @param mod name of the module --- @return on success: path of module, lua or binary --- @return on error: nil,error string -function path.package_path(mod) - assert_string(1,mod) - local res - mod = mod:gsub('%.',sep) - res = package.searchpath(mod,package.path) - if res then return res,true end - res = package.searchpath(mod,package.cpath) - if res then return res,false end - return raise 'cannot find module on path' -end - - ----- finis ----- -return path diff --git a/Utils/luarocks/share/lua/5.1/pl/permute.lua b/Utils/luarocks/share/lua/5.1/pl/permute.lua deleted file mode 100644 index 8c2e66fa9..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/permute.lua +++ /dev/null @@ -1,65 +0,0 @@ ---- Permutation operations. --- @class module --- @name pl.permute -local tablex = require 'pl.tablex' -local utils = require 'pl.utils' -local copy = tablex.deepcopy -local append = table.insert -local coroutine = coroutine -local resume = coroutine.resume -local assert_arg = utils.assert_arg - ---[[ -module ('pl.permute',utils._module) -]] - -local permute = {} - --- PiL, 9.3 - -local permgen -permgen = function (a, n, fn) - if n == 0 then - fn(a) - else - for i=1,n do - -- put i-th element as the last one - a[n], a[i] = a[i], a[n] - - -- generate all permutations of the other elements - permgen(a, n - 1, fn) - - -- restore i-th element - a[n], a[i] = a[i], a[n] - - end - end -end - ---- an iterator over all permutations of the elements of a list. --- Please note that the same list is returned each time, so do not keep references! --- @param a list-like table --- @return an iterator which provides the next permutation as a list -function permute.iter (a) - assert_arg(1,a,'table') - local n = #a - local co = coroutine.create(function () permgen(a, n, coroutine.yield) end) - return function () -- iterator - local code, res = resume(co) - return res - end -end - ---- construct a table containing all the permutations of a list. --- @param a list-like table --- @return a table of tables --- @usage permute.table {1,2,3} --> {{2,3,1},{3,2,1},{3,1,2},{1,3,2},{2,1,3},{1,2,3}} -function permute.table (a) - assert_arg(1,a,'table') - local res = {} - local n = #a - permgen(a,n,function(t) append(res,copy(t)) end) - return res -end - -return permute diff --git a/Utils/luarocks/share/lua/5.1/pl/platf/luajava.lua b/Utils/luarocks/share/lua/5.1/pl/platf/luajava.lua deleted file mode 100644 index 4fb82e619..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/platf/luajava.lua +++ /dev/null @@ -1,101 +0,0 @@ --- experimental support for LuaJava --- -local path = {} - - -path.link_attrib = nil - -local File = luajava.bindClass("java.io.File") -local Array = luajava.bindClass('java.lang.reflect.Array') - -local function file(s) - return luajava.new(File,s) -end - -function path.dir(P) - local ls = file(P):list() - print(ls) - local idx,n = -1,Array:getLength(ls) - return function () - idx = idx + 1 - if idx == n then return nil - else - return Array:get(ls,idx) - end - end -end - -function path.mkdir(P) - return file(P):mkdir() -end - -function path.rmdir(P) - return file(P):delete() -end - ---- is this a directory? --- @param P A file path -function path.isdir(P) - if P:match("\\$") then - P = P:sub(1,-2) - end - return file(P):isDirectory() -end - ---- is this a file?. --- @param P A file path -function path.isfile(P) - return file(P):isFile() -end - --- is this a symbolic link? --- Direct support for symbolic links is not provided. --- see http://stackoverflow.com/questions/813710/java-1-6-determine-symbolic-links --- and the caveats therein. --- @param P A file path -function path.islink(P) - local f = file(P) - local canon - local parent = f:getParent() - if not parent then - canon = f - else - parent = f.getParentFile():getCanonicalFile() - canon = luajava.new(File,parent,f:getName()) - end - return canon:getCanonicalFile() ~= canon:getAbsoluteFile() -end - ---- return size of a file. --- @param P A file path -function path.getsize(P) - return file(P):length() -end - ---- does a path exist?. --- @param P A file path --- @return the file path if it exists, nil otherwise -function path.exists(P) - return file(P):exists() and P -end - ---- Return the time of last access as the number of seconds since the epoch. --- @param P A file path -function path.getatime(P) - return path.getmtime(P) -end - ---- Return the time of last modification --- @param P A file path -function path.getmtime(P) - -- Java time is no. of millisec since the epoch - return file(P):lastModified()/1000 -end - ----Return the system's ctime. --- @param P A file path -function path.getctime(P) - return path.getmtime(P) -end - -return path diff --git a/Utils/luarocks/share/lua/5.1/pl/pretty.lua b/Utils/luarocks/share/lua/5.1/pl/pretty.lua deleted file mode 100644 index c414c9d5c..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/pretty.lua +++ /dev/null @@ -1,224 +0,0 @@ ---- Pretty-printing Lua tables. --- Also provides a sandboxed Lua table reader and --- a function to present large numbers in human-friendly format. --- @class module --- @name pl.pretty - -local append = table.insert -local concat = table.concat -local utils = require 'pl.utils' -local lexer = require 'pl.lexer' -local assert_arg = utils.assert_arg - -local pretty = {} - ---- read a string representation of a Lua table. --- Uses load(), but tries to be cautious about loading arbitrary code! --- It is expecting a string of the form '{...}', with perhaps some whitespace --- before or after the curly braces. An empty environment is used, and --- any occurance of the keyword 'function' will be considered a problem. --- @param s {string} string of the form '{...}', with perhaps some whitespace --- before or after the curly braces. -function pretty.read(s) - assert_arg(1,s,'string') - if not s:find '^%s*%b{}%s*$' then return nil,"not a Lua table" end - if s:find '[^\'"%w_]function[^\'"%w_]' then - local tok = lexer.lua(s) - for t,v in tok do - if t == 'keyword' then - return nil,"cannot have Lua keywords in table definition" - end - end - end - local chunk,err = utils.load('return '..s,'tbl','t',{}) - if not chunk then return nil,err end - return chunk() -end - -local function quote_if_necessary (v) - if not v then return '' - else - if v:find ' ' then v = '"'..v..'"' end - end - return v -end - -local keywords - - ---- Create a string representation of a Lua table. --- This function never fails, but may complain by returning an --- extra value. Normally puts out one item per line, using --- the provided indent; set the second parameter to '' if --- you want output on one line. --- @param tbl {table} Table to serialize to a string. --- @param space {string} (optional) The indent to use. --- Defaults to two spaces. --- @param not_clever {bool} (optional) Use for plain output, e.g {['key']=1}. --- Defaults to false. --- @return a string --- @return a possible error message -function pretty.write (tbl,space,not_clever) - if type(tbl) ~= 'table' then - local res = tostring(tbl) - if type(tbl) == 'string' then res = '"'..res..'"' end - return res, 'not a table' - end - if not keywords then - keywords = lexer.get_keywords() - end - local set = ' = ' - if space == '' then set = '=' end - space = space or ' ' - local lines = {} - local line = '' - local tables = {} - - local function is_identifier (s) - return (s:find('^[%a_][%w_]*$')) and not keywords[s] - end - - local function put(s) - if #s > 0 then - line = line..s - end - end - - local function putln (s) - if #line > 0 then - line = line..s - append(lines,line) - line = '' - else - append(lines,s) - end - end - - local function eat_last_comma () - local n,lastch = #lines - local lastch = lines[n]:sub(-1,-1) - if lastch == ',' then - lines[n] = lines[n]:sub(1,-2) - end - end - - local function quote (s) - return ('%q'):format(tostring(s)) - end - - local function index (numkey,key) - if not numkey then key = quote(key) end - return '['..key..']' - end - - local writeit - writeit = function (t,oldindent,indent) - local tp = type(t) - if tp ~= 'string' and tp ~= 'table' then - putln(quote_if_necessary(tostring(t))..',') - elseif tp == 'string' then - if t:find('\n') then - putln('[[\n'..t..']],') - else - putln(quote(t)..',') - end - elseif tp == 'table' then - if tables[t] then - putln(',') - return - end - tables[t] = true - local newindent = indent..space - putln('{') - local used = {} - if not not_clever then - for i,val in ipairs(t) do - put(indent) - writeit(val,indent,newindent) - used[i] = true - end - end - for key,val in pairs(t) do - local numkey = type(key) == 'number' - if not_clever then - key = tostring(key) - put(indent..index(numkey,key)..set) - writeit(val,indent,newindent) - else - if not numkey or not used[key] then -- non-array indices - if numkey or not is_identifier(key) then - key = index(numkey,key) - end - put(indent..key..set) - writeit(val,indent,newindent) - end - end - end - eat_last_comma() - putln(oldindent..'},') - else - putln(tostring(t)..',') - end - end - writeit(tbl,'',space) - eat_last_comma() - return concat(lines,#space > 0 and '\n' or '') -end - ---- Dump a Lua table out to a file or stdout. --- @param t {table} The table to write to a file or stdout. --- @param ... {string} (optional) File name to write too. Defaults to writing --- to stdout. -function pretty.dump (t,...) - if select('#',...)==0 then - print(pretty.write(t)) - return true - else - return utils.writefile(...,pretty.write(t)) - end -end - -local memp,nump = {'B','KiB','MiB','GiB'},{'','K','M','B'} - -local comma -function comma (val) - local thou = math.floor(val/1000) - if thou > 0 then return comma(thou)..','..(val % 1000) - else return tostring(val) end -end - ---- format large numbers nicely for human consumption. --- @param num a number --- @param kind one of 'M' (memory in KiB etc), 'N' (postfixes are 'K','M' and 'B') --- and 'T' (use commas as thousands separator) --- @param prec number of digits to use for 'M' and 'N' (default 1) -function pretty.number (num,kind,prec) - local fmt = '%.'..(prec or 1)..'f%s' - if kind == 'T' then - return comma(num) - else - local postfixes, fact - if kind == 'M' then - fact = 1024 - postfixes = memp - else - fact = 1000 - postfixes = nump - end - local div = fact - local k = 1 - while num >= div and k <= #postfixes do - div = div * fact - k = k + 1 - end - div = div / fact - if k > #postfixes then k = k - 1; div = div/fact end - if k > 1 then - return fmt:format(num/div,postfixes[k] or 'duh') - else - return num..postfixes[1] - end - end -end - -return pretty diff --git a/Utils/luarocks/share/lua/5.1/pl/seq.lua b/Utils/luarocks/share/lua/5.1/pl/seq.lua deleted file mode 100644 index 479a12a6e..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/seq.lua +++ /dev/null @@ -1,527 +0,0 @@ ---- Manipulating sequences as iterators. --- @class module --- @name pl.seq - -local next,assert,type,pairs,tonumber,type,setmetatable,getmetatable,_G = next,assert,type,pairs,tonumber,type,setmetatable,getmetatable,_G -local strfind = string.find -local strmatch = string.match -local format = string.format -local mrandom = math.random -local remove,tsort,tappend = table.remove,table.sort,table.insert -local io = io -local utils = require 'pl.utils' -local function_arg = utils.function_arg -local _List = utils.stdmt.List -local _Map = utils.stdmt.Map -local assert_arg = utils.assert_arg -require 'debug' - ---[[ -module("pl.seq",utils._module) -]] - -local seq = {} - --- given a number, return a function(y) which returns true if y > x --- @param x a number -function seq.greater_than(x) - return function(v) - return tonumber(v) > x - end -end - --- given a number, returns a function(y) which returns true if y < x --- @param x a number -function seq.less_than(x) - return function(v) - return tonumber(v) < x - end -end - --- given any value, return a function(y) which returns true if y == x --- @param x a value -function seq.equal_to(x) - if type(x) == "number" then - return function(v) - return tonumber(v) == x - end - else - return function(v) - return v == x - end - end -end - ---- given a string, return a function(y) which matches y against the string. --- @param s a string -function seq.matching(s) - return function(v) - return strfind(v,s) - end -end - ---- sequence adaptor for a table. Note that if any generic function is --- passed a table, it will automatically use seq.list() --- @param t a list-like table --- @usage sum(list(t)) is the sum of all elements of t --- @usage for x in list(t) do...end -function seq.list(t) - assert_arg(1,t,'table') - local key,value - return function() - key,value = next(t,key) - return value - end -end - ---- return the keys of the table. --- @param t a list-like table --- @return iterator over keys -function seq.keys(t) - assert_arg(1,t,'table') - local key,value - return function() - key,value = next(t,key) - return key - end -end - -local list = seq.list -local function default_iter(iter) - if type(iter) == 'table' then return list(iter) - else return iter end -end - -seq.iter = default_iter - ---- create an iterator over a numerical range. Like the standard Python function xrange. --- @param start a number --- @param finish a number greater than start -function seq.range(start,finish) - local i = start - 1 - return function() - i = i + 1 - if i > finish then return nil - else return i end - end -end - --- count the number of elements in the sequence which satisfy the predicate --- @param iter a sequence --- @param condn a predicate function (must return either true or false) --- @param optional argument to be passed to predicate as second argument. -function seq.count(iter,condn,arg) - local i = 0 - seq.foreach(iter,function(val) - if condn(val,arg) then i = i + 1 end - end) - return i -end - ---- return the minimum and the maximum value of the sequence. --- @param iter a sequence -function seq.minmax(iter) - local vmin,vmax = 1e70,-1e70 - for v in default_iter(iter) do - v = tonumber(v) - if v < vmin then vmin = v end - if v > vmax then vmax = v end - end - return vmin,vmax -end - ---- return the sum and element count of the sequence. --- @param iter a sequence --- @param fn an optional function to apply to the values -function seq.sum(iter,fn) - local s = 0 - local i = 0 - for v in default_iter(iter) do - if fn then v = fn(v) end - s = s + v - i = i + 1 - end - return s,i -end - ---- create a table from the sequence. (This will make the result a List.) --- @param iter a sequence --- @return a List --- @usage copy(list(ls)) is equal to ls --- @usage copy(list {1,2,3}) == List{1,2,3} -function seq.copy(iter) - local res = {} - for v in default_iter(iter) do - tappend(res,v) - end - setmetatable(res,_List) - return res -end - ---- create a table of pairs from the double-valued sequence. --- @param iter a double-valued sequence --- @param i1 used to capture extra iterator values --- @param i2 as with pairs & ipairs --- @usage copy2(ipairs{10,20,30}) == {{1,10},{2,20},{3,30}} --- @return a list-like table -function seq.copy2 (iter,i1,i2) - local res = {} - for v1,v2 in iter,i1,i2 do - tappend(res,{v1,v2}) - end - return res -end - ---- create a table of 'tuples' from a multi-valued sequence. --- A generalization of copy2 above --- @param iter a multiple-valued sequence --- @return a list-like table -function seq.copy_tuples (iter) - iter = default_iter(iter) - local res = {} - local row = {iter()} - while #row > 0 do - tappend(res,row) - row = {iter()} - end - return res -end - ---- return an iterator of random numbers. --- @param n the length of the sequence --- @param l same as the first optional argument to math.random --- @param u same as the second optional argument to math.random --- @return a sequnce -function seq.random(n,l,u) - local rand - assert(type(n) == 'number') - if u then - rand = function() return mrandom(l,u) end - elseif l then - rand = function() return mrandom(l) end - else - rand = mrandom - end - - return function() - if n == 0 then return nil - else - n = n - 1 - return rand() - end - end -end - ---- return an iterator to the sorted elements of a sequence. --- @param iter a sequence --- @param comp an optional comparison function (comp(x,y) is true if x < y) -function seq.sort(iter,comp) - local t = seq.copy(iter) - tsort(t,comp) - return list(t) -end - ---- return an iterator which returns elements of two sequences. --- @param iter1 a sequence --- @param iter2 a sequence --- @usage for x,y in seq.zip(ls1,ls2) do....end -function seq.zip(iter1,iter2) - iter1 = default_iter(iter1) - iter2 = default_iter(iter2) - return function() - return iter1(),iter2() - end -end - ---- A table where the key/values are the values and value counts of the sequence. --- This version works with 'hashable' values like strings and numbers.
    --- pl.tablex.count_map is more general. --- @param iter a sequence --- @return a map-like table --- @return a table --- @see pl.tablex.count_map -function seq.count_map(iter) - local t = {} - local v - for s in default_iter(iter) do - v = t[s] - if v then t[s] = v + 1 - else t[s] = 1 end - end - return setmetatable(t,_Map) -end - --- given a sequence, return all the unique values in that sequence. --- @param iter a sequence --- @param returns_table true if we return a table, not a sequence --- @return a sequence or a table; defaults to a sequence. -function seq.unique(iter,returns_table) - local t = seq.count_map(iter) - local res = {} - for k in pairs(t) do tappend(res,k) end - table.sort(res) - if returns_table then - return res - else - return list(res) - end -end - --- print out a sequence @iter, with a separator @sep (default space) --- and maximum number of values per line @nfields (default 7) --- @fmt is an optional format function to create a representation of each value. -function seq.printall(iter,sep,nfields,fmt) - local write = io.write - if not sep then sep = ' ' end - if not nfields then - if sep == '\n' then nfields = 1e30 - else nfields = 7 end - end - if fmt then - local fstr = fmt - fmt = function(v) return format(fstr,v) end - end - local k = 1 - for v in default_iter(iter) do - if fmt then v = fmt(v) end - if k < nfields then - write(v,sep) - k = k + 1 - else - write(v,'\n') - k = 1 - end - end - write '\n' -end - --- return an iterator running over every element of two sequences (concatenation). --- @param iter1 a sequence --- @param iter2 a sequence -function seq.splice(iter1,iter2) - iter1 = default_iter(iter1) - iter2 = default_iter(iter2) - local iter = iter1 - return function() - local ret = iter() - if ret == nil then - if iter == iter1 then - iter = iter2 - return iter() - else return nil end - else - return ret - end - end -end - ---- return a sequence where every element of a sequence has been transformed --- by a function. If you don't supply an argument, then the function will --- receive both values of a double-valued sequence, otherwise behaves rather like --- tablex.map. --- @param fn a function to apply to elements; may take two arguments --- @param iter a sequence of one or two values --- @param arg optional argument to pass to function. -function seq.map(fn,iter,arg) - fn = function_arg(1,fn) - iter = default_iter(iter) - return function() - local v1,v2 = iter() - if v1 == nil then return nil end - if arg then return fn(v1,arg) or false - else return fn(v1,v2) or false - end - end -end - ---- filter a sequence using a predicate function --- @param iter a sequence of one or two values --- @param pred a boolean function; may take two arguments --- @param arg optional argument to pass to function. -function seq.filter (iter,pred,arg) - pred = function_arg(2,pred) - return function () - local v1,v2 - while true do - v1,v2 = iter() - if v1 == nil then return nil end - if arg then - if pred(v1,arg) then return v1,v2 end - else - if pred(v1,v2) then return v1,v2 end - end - end - end -end - ---- 'reduce' a sequence using a binary function. --- @param fun a function of two arguments --- @param iter a sequence --- @param oldval optional initial value --- @usage seq.reduce(operator.add,seq.list{1,2,3,4}) == 10 --- @usage seq.reduce('-',{1,2,3,4,5}) == -13 -function seq.reduce (fun,iter,oldval) - fun = function_arg(1,fun) - iter = default_iter(iter) - if not oldval then - oldval = iter() - end - local val = oldval - for v in iter do - val = fun(val,v) - end - return val -end - ---- take the first n values from the sequence. --- @param iter a sequence of one or two values --- @param n number of items to take --- @return a sequence of at most n items -function seq.take (iter,n) - local i = 1 - iter = default_iter(iter) - return function() - if i > n then return end - local val1,val2 = iter() - if not val1 then return end - i = i + 1 - return val1,val2 - end -end - ---- skip the first n values of a sequence --- @param iter a sequence of one or more values --- @param n number of items to skip -function seq.skip (iter,n) - n = n or 1 - for i = 1,n do iter() end - return iter -end - ---- a sequence with a sequence count and the original value.
    --- enum(copy(ls)) is a roundabout way of saying ipairs(ls). --- @param iter a single or double valued sequence --- @return sequence of (i,v), i = 1..n and v is from iter. -function seq.enum (iter) - local i = 0 - iter = default_iter(iter) - return function () - local val1,val2 = iter() - if not val1 then return end - i = i + 1 - return i,val1,val2 - end -end - ---- map using a named method over a sequence. --- @param iter a sequence --- @param name the method name --- @param arg1 optional first extra argument --- @param arg2 optional second extra argument -function seq.mapmethod (iter,name,arg1,arg2) - iter = default_iter(iter) - return function() - local val = iter() - if not val then return end - local fn = val[name] - if not fn then error(type(val).." does not have method "..name) end - return fn(val,arg1,arg2) - end -end - ---- a sequence of (last,current) values from another sequence. --- This will return S(i-1),S(i) if given S(i) --- @param iter a sequence -function seq.last (iter) - iter = default_iter(iter) - local l = iter() - if l == nil then return nil end - return function () - local val,ll - val = iter() - if val == nil then return nil end - ll = l - l = val - return val,ll - end -end - ---- call the function on each element of the sequence. --- @param iter a sequence with up to 3 values --- @param fn a function -function seq.foreach(iter,fn) - fn = function_arg(2,fn) - for i1,i2,i3 in default_iter(iter) do fn(i1,i2,i3) end -end - ----------------------- Sequence Adapters --------------------- - -local SMT -local callable = utils.is_callable - -local function SW (iter,...) - if callable(iter) then - return setmetatable({iter=iter},SMT) - else - return iter,... - end -end - - --- can't directly look these up in seq because of the wrong argument order... -local map,reduce,mapmethod = seq.map, seq.reduce, seq.mapmethod -local overrides = { - map = function(self,fun,arg) - return map(fun,self,arg) - end, - reduce = function(self,fun) - return reduce(fun,self) - end -} - -SMT = { - __index = function (tbl,key) - local s = overrides[key] or seq[key] - if s then - return function(sw,...) return SW(s(sw.iter,...)) end - else - return function(sw,...) return SW(mapmethod(sw.iter,key,...)) end - end - end, - __call = function (sw) - return sw.iter() - end, -} - -setmetatable(seq,{ - __call = function(tbl,iter) - if not callable(iter) then - if type(iter) == 'table' then iter = seq.list(iter) - else return iter - end - end - return setmetatable({iter=iter},SMT) - end -}) - ---- create a wrapped iterator over all lines in the file. --- @param f either a filename or nil (for standard input) --- @return a sequence wrapper -function seq.lines (f) - local iter = f and io.lines(f) or io.lines() - return SW(iter) -end - -function seq.import () - _G.debug.setmetatable(function() end,{ - __index = function(tbl,key) - local s = overrides[key] or seq[key] - if s then return s - else - return function(s,...) return seq.mapmethod(s,key,...) end - end - end - }) -end - -return seq diff --git a/Utils/luarocks/share/lua/5.1/pl/sip.lua b/Utils/luarocks/share/lua/5.1/pl/sip.lua deleted file mode 100644 index c739a54ca..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/sip.lua +++ /dev/null @@ -1,335 +0,0 @@ ---- Simple Input Patterns (SIP).

    --- SIP patterns start with '$', then a --- one-letter type, and then an optional variable in curly braces.

    --- Example: ---

    ---  sip.match('$v=$q','name="dolly"',res)
    ---  ==> res=={'name','dolly'}
    ---  sip.match('($q{first},$q{second})','("john","smith")',res)
    ---  ==> res=={second='smith',first='john'}
    --- 
    ---
    --- Type names
    --- v    identifier
    --- i     integer
    --- f     floating-point
    --- q    quoted string
    --- ([{<  match up to closing bracket
    --- 
    ---

    --- See the Guide --- @class module --- @name pl.sip - -local append,concat = table.insert,table.concat -local concat = table.concat -local ipairs,loadstring,type,unpack = ipairs,loadstring,type,unpack -local io,_G = io,_G -local print,rawget = print,rawget - -local patterns = { - FLOAT = '[%+%-%d]%d*%.?%d*[eE]?[%+%-]?%d*', - INTEGER = '[+%-%d]%d*', - IDEN = '[%a_][%w_]*', - FILE = '[%a%.\\][:%][%w%._%-\\]*' -} - -local function assert_arg(idx,val,tp) - if type(val) ~= tp then - error("argument "..idx.." must be "..tp, 2) - end -end - - ---[[ -module ('pl.sip',utils._module) -]] - -local sip = {} - -local brackets = {['<'] = '>', ['('] = ')', ['{'] = '}', ['['] = ']' } -local stdclasses = {a=1,c=0,d=1,l=1,p=0,u=1,w=1,x=1,s=0} - -local _patterns = {} - - -local function group(s) - return '('..s..')' -end - --- escape all magic characters except $, which has special meaning --- Also, un-escape any characters after $, so $( passes through as is. -local function escape (spec) - --_G.print('spec',spec) - local res = spec:gsub('[%-%.%+%[%]%(%)%^%%%?%*]','%%%1'):gsub('%$%%(%S)','$%1') - --_G.print('res',res) - return res -end - -local function imcompressible (s) - return s:gsub('%s+','\001') -end - --- [handling of spaces in patterns] --- spaces may be 'compressed' (i.e will match zero or more spaces) --- unless this occurs within a number or an identifier. So we mark --- the four possible imcompressible patterns first and then replace. --- The possible alnum patterns are v,f,a,d,x,l and u. -local function compress_spaces (s) - s = s:gsub('%$[vifadxlu]%s+%$[vfadxlu]',imcompressible) - s = s:gsub('[%w_]%s+[%w_]',imcompressible) - s = s:gsub('[%w_]%s+%$[vfadxlu]',imcompressible) - s = s:gsub('%$[vfadxlu]%s+[%w_]',imcompressible) - s = s:gsub('%s+','%%s*') - s = s:gsub('\001',' ') - return s -end - ---- convert a SIP pattern into the equivalent Lua string pattern. --- @param spec a SIP pattern --- @param options a table; only the at_start field is --- currently meaningful and esures that the pattern is anchored --- at the start of the string. --- @return a Lua string pattern. -function sip.create_pattern (spec,options) - assert_arg(1,spec,'string') - local fieldnames,fieldtypes = {},{} - - if type(spec) == 'string' then - spec = escape(spec) - else - local res = {} - for i,s in ipairs(spec) do - res[i] = escape(s) - end - spec = concat(res,'.-') - end - - local kount = 1 - - local function addfield (name,type) - if not name then name = kount end - if fieldnames then append(fieldnames,name) end - if fieldtypes then fieldtypes[name] = type end - kount = kount + 1 - end - - local named_vars, pattern - named_vars = spec:find('{%a+}') - pattern = '%$%S' - - if options and options.at_start then - spec = '^'..spec - end - if spec:sub(-1,-1) == '$' then - spec = spec:sub(1,-2)..'$r' - if named_vars then spec = spec..'{rest}' end - end - - - local names - - if named_vars then - names = {} - spec = spec:gsub('{(%a+)}',function(name) - append(names,name) - return '' - end) - end - spec = compress_spaces(spec) - - local k = 1 - local err - local r = (spec:gsub(pattern,function(s) - local type,name - type = s:sub(2,2) - if names then name = names[k]; k=k+1 end - -- this kludge is necessary because %q generates two matches, and - -- we want to ignore the first. Not a problem for named captures. - if not names and type == 'q' then - addfield(nil,'Q') - else - addfield(name,type) - end - local res - if type == 'v' then - res = group(patterns.IDEN) - elseif type == 'i' then - res = group(patterns.INTEGER) - elseif type == 'f' then - res = group(patterns.FLOAT) - elseif type == 'r' then - res = '(%S.*)' - elseif type == 'q' then - -- some Lua pattern matching voodoo; we want to match '...' as - -- well as "...", and can use the fact that %n will match a - -- previous capture. Adding the extra field above comes from needing - -- to accomodate the extra spurious match (which is either ' or ") - addfield(name,type) - res = '(["\'])(.-)%'..(kount-2) - elseif type == 'p' then - res = '([%a]?[:]?[\\/%.%w_]+)' - else - local endbracket = brackets[type] - if endbracket then - res = '(%b'..type..endbracket..')' - elseif stdclasses[type] or stdclasses[type:lower()] then - res = '(%'..type..'+)' - else - err = "unknown format type or character class" - end - end - return res - end)) - --print(r,err) - if err then - return nil,err - else - return r,fieldnames,fieldtypes - end -end - - -local function tnumber (s) - return s == 'd' or s == 'i' or s == 'f' -end - -function sip.create_spec_fun(spec,options) - local fieldtypes,fieldnames - local ls = {} - spec,fieldnames,fieldtypes = sip.create_pattern(spec,options) - if not spec then return spec,fieldnames end - local named_vars = type(fieldnames[1]) == 'string' - for i = 1,#fieldnames do - append(ls,'mm'..i) - end - local fun = ('return (function(s,res)\n\tlocal %s = s:match(%q)\n'):format(concat(ls,','),spec) - fun = fun..'\tif not mm1 then return false end\n' - local k=1 - for i,f in ipairs(fieldnames) do - if f ~= '_' then - local var = 'mm'..i - if tnumber(fieldtypes[f]) then - var = 'tonumber('..var..')' - elseif brackets[fieldtypes[f]] then - var = var..':sub(2,-2)' - end - if named_vars then - fun = ('%s\tres.%s = %s\n'):format(fun,f,var) - else - if fieldtypes[f] ~= 'Q' then -- we skip the string-delim capture - fun = ('%s\tres[%d] = %s\n'):format(fun,k,var) - k = k + 1 - end - end - end - end - return fun..'\treturn true\nend)\n', named_vars -end - ---- convert a SIP pattern into a matching function. --- The returned function takes two arguments, the line and an empty table. --- If the line matched the pattern, then this function return true --- and the table is filled with field-value pairs. --- @param spec a SIP pattern --- @param options optional table; {anywhere=true} will stop pattern anchoring at start --- @return a function if successful, or nil, -function sip.compile(spec,options) - assert_arg(1,spec,'string') - local fun,names = sip.create_spec_fun(spec,options) - if not fun then return nil,names end - if rawget(_G,'_DEBUG') then print(fun) end - local chunk,err = loadstring(fun,'tmp') - if err then return nil,err end - return chunk(),names -end - -local cache = {} - ---- match a SIP pattern against a string. --- @param spec a SIP pattern --- @param line a string --- @param res a table to receive values --- @param options (optional) option table --- @return true or false -function sip.match (spec,line,res,options) - assert_arg(1,spec,'string') - assert_arg(2,line,'string') - assert_arg(3,res,'table') - if not cache[spec] then - cache[spec] = sip.compile(spec,options) - end - return cache[spec](line,res) -end - ---- match a SIP pattern against the start of a string. --- @param spec a SIP pattern --- @param line a string --- @param res a table to receive values --- @return true or false -function sip.match_at_start (spec,line,res) - return sip.match(spec,line,res,{at_start=true}) -end - ---- given a pattern and a file object, return an iterator over the results --- @param spec a SIP pattern --- @param f a file - use standard input if not specified. -function sip.fields (spec,f) - assert_arg(1,spec,'string') - f = f or io.stdin - local fun,err = sip.compile(spec) - if not fun then return nil,err end - local res = {} - return function() - while true do - local line = f:read() - if not line then return end - if fun(line,res) then - local values = res - res = {} - return unpack(values) - end - end - end -end - ---- register a match which will be used in the read function. --- @param spec a SIP pattern --- @param fun a function to be called with the results of the match --- @see read -function sip.pattern (spec,fun) - assert_arg(1,spec,'string') - local pat,named = sip.compile(spec) - append(_patterns,{pat=pat,named=named,callback=fun or false}) -end - ---- enter a loop which applies all registered matches to the input file. --- @param f a file object; if nil, then io.stdin is assumed. -function sip.read (f) - local owned,err - f = f or io.stdin - if type(f) == 'string' then - f,err = io.open(f) - if not f then return nil,err end - owned = true - end - local res = {} - for line in f:lines() do - for _,item in ipairs(_patterns) do - if item.pat(line,res) then - if item.callback then - if item.named then - item.callback(res) - else - item.callback(unpack(res)) - end - end - res = {} - break - end - end - end - if owned then f:close() end -end - -return sip diff --git a/Utils/luarocks/share/lua/5.1/pl/strict.lua b/Utils/luarocks/share/lua/5.1/pl/strict.lua deleted file mode 100644 index f7d8c94c8..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/strict.lua +++ /dev/null @@ -1,71 +0,0 @@ ---- Checks uses of undeclared global variables. --- All global variables must be 'declared' through a regular assignment --- (even assigning nil will do) in a main chunk before being used --- anywhere or assigned to inside a function. --- @class module --- @name pl.strict - -require 'debug' -local getinfo, error, rawset, rawget = debug.getinfo, error, rawset, rawget -local handler,hooked - -local mt = getmetatable(_G) -if mt == nil then - mt = {} - setmetatable(_G, mt) -elseif mt.hook then - hooked = true -end - --- predeclaring _PROMPT keeps the Lua Interpreter happy -mt.__declared = {_PROMPT=true} - -local function what () - local d = getinfo(3, "S") - return d and d.what or "C" -end - -mt.__newindex = function (t, n, v) - if not mt.__declared[n] then - local w = what() - if w ~= "main" and w ~= "C" then - error("assign to undeclared variable '"..n.."'", 2) - end - mt.__declared[n] = true - end - rawset(t, n, v) -end - -handler = function(t,n) - if not mt.__declared[n] and what() ~= "C" then - error("variable '"..n.."' is not declared", 2) - end - return rawget(t, n) -end - -function package.strict (mod) - local mt = getmetatable(mod) - if mt == nil then - mt = {} - setmetatable(mod, mt) - end - mt.__declared = {} - mt.__newindex = function(t, n, v) - mt.__declared[n] = true - rawset(t, n, v) - end - mt.__index = function(t,n) - if not mt.__declared[n] then - error("variable '"..n.."' is not declared", 2) - end - return rawget(t, n) - end -end - -if not hooked then - mt.__index = handler -else - mt.hook(handler) -end - - diff --git a/Utils/luarocks/share/lua/5.1/pl/stringio.lua b/Utils/luarocks/share/lua/5.1/pl/stringio.lua deleted file mode 100644 index 0129ddd56..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/stringio.lua +++ /dev/null @@ -1,144 +0,0 @@ ---- Reading and writing strings using file-like objects.
    ---

    ---  f = stringio.open(text)
    ---  l1 = f:read()  -- read first line
    ---  n,m = f:read ('*n','*n') -- read two numbers
    ---  for line in f:lines() do print(line) end -- iterate over all lines
    ---  f = stringio.create()
    ---  f:write('hello')
    ---  f:write('dolly')
    ---  assert(f:value(),'hellodolly')
    --- 
    --- See the Guide. --- @class module --- @name pl.stringio - -local getmetatable,tostring,unpack,tonumber = getmetatable,tostring,unpack,tonumber -local concat,append = table.concat,table.insert - -local stringio = {} - ---- Writer class -local SW = {} -SW.__index = SW - -local function xwrite(self,...) - local args = {...} --arguments may not be nil! - for i = 1, #args do - append(self.tbl,args[i]) - end -end - -function SW:write(arg1,arg2,...) - if arg2 then - xwrite(self,arg1,arg2,...) - else - append(self.tbl,arg1) - end -end - -function SW:writef(fmt,...) - self:write(fmt:format(...)) -end - -function SW:value() - return concat(self.tbl) -end - -function SW:close() -- for compatibility only -end - -function SW:seek() -end - ---- Reader class -local SR = {} -SR.__index = SR - -function SR:_read(fmt) - local i,str = self.i,self.str - local sz = #str - if i >= sz then return nil end - local res - if fmt == nil or fmt == '*l' then - local idx = str:find('\n',i) or (sz+1) - res = str:sub(i,idx-1) - self.i = idx+1 - elseif fmt == '*a' then - res = str:sub(i) - self.i = sz - elseif fmt == '*n' then - local _,i2,i2,idx - _,idx = str:find ('%s*%d+',i) - _,i2 = str:find ('%.%d+',idx+1) - if i2 then idx = i2 end - _,i2 = str:find ('[eE][%+%-]*%d+',idx+1) - if i2 then idx = i2 end - local val = str:sub(i,idx) - res = tonumber(val) - self.i = idx+1 - elseif type(fmt) == 'number' then - res = str:sub(i,i+fmt-1) - self.i = i + fmt - else - error("bad read format",2) - end - return res -end - -function SR:read(...) - local fmts = {...} - if #fmts <= 1 then - return self:_read(fmts[1]) - else - local res = {} - for i = 1, #fmts do - res[i] = self:_read(fmts[i]) - end - return unpack(res) - end -end - -function SR:seek(whence,offset) - local base - whence = whence or 'cur' - offset = offset or 0 - if whence == 'set' then - base = 1 - elseif whence == 'cur' then - base = self.i - elseif whence == 'end' then - base = #self.str - end - self.i = base + offset - return self.i -end - -function SR:lines() - return function() - return self:read() - end -end - -function SR:close() -- for compatibility only -end - ---- create a file-like object which can be used to construct a string. --- The resulting object has an extra value() method for --- retrieving the string value. --- @usage f = create(); f:write('hello, dolly\n'); print(f:value()) -function stringio.create() - return setmetatable({tbl={}},SW) -end - ---- create a file-like object for reading from a given string. --- @param s The input string. -function stringio.open(s) - return setmetatable({str=s,i=1},SR) -end - -function stringio.lines(s) - return stringio.open(s):lines() -end - -return stringio diff --git a/Utils/luarocks/share/lua/5.1/pl/stringx.lua b/Utils/luarocks/share/lua/5.1/pl/stringx.lua deleted file mode 100644 index 5699b2039..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/stringx.lua +++ /dev/null @@ -1,441 +0,0 @@ ---- Python-style string library.

    --- see 3.6.1 of the Python reference.

    --- If you want to make these available as string methods, then say --- stringx.import() to bring them into the standard string --- table. --- @class module --- @name pl.stringx -local string = string -local find = string.find -local type,setmetatable,getmetatable,ipairs,unpack = type,setmetatable,getmetatable,ipairs,unpack -local error,tostring = error,tostring -local gsub = string.gsub -local rep = string.rep -local sub = string.sub -local concat = table.concat -local utils = require 'pl.utils' -local escape = utils.escape -local ceil = math.ceil -local _G = _G -local assert_arg,usplit,list_MT = utils.assert_arg,utils.split,utils.stdmt.List -local lstrip - -local function assert_string (n,s) - assert_arg(n,s,'string') -end - -local function non_empty(s) - return #s > 0 -end - -local function assert_nonempty_string(n,s) - assert_arg(n,s,'string',non_empty,'must be a non-empty string') -end - ---[[ -module ('pl.stringx',utils._module) -]] - -local stringx = {} - ---- does s only contain alphabetic characters?. --- @param s a string -function stringx.isalpha(s) - assert_string(1,s) - return find(s,'^%a+$') == 1 -end - ---- does s only contain digits?. --- @param s a string -function stringx.isdigit(s) - assert_string(1,s) - return find(s,'^%d+$') == 1 -end - ---- does s only contain alphanumeric characters?. --- @param s a string -function stringx.isalnum(s) - assert_string(1,s) - return find(s,'^%w+$') == 1 -end - ---- does s only contain spaces?. --- @param s a string -function stringx.isspace(s) - assert_string(1,s) - return find(s,'^%s+$') == 1 -end - ---- does s only contain lower case characters?. --- @param s a string -function stringx.islower(s) - assert_string(1,s) - return find(s,'^[%l%s]+$') == 1 -end - ---- does s only contain upper case characters?. --- @param s a string -function stringx.isupper(s) - assert_string(1,s) - return find(s,'^[%u%s]+$') == 1 -end - ---- concatenate the strings using this string as a delimiter. --- @param self the string --- @param seq a table of strings or numbers --- @usage (' '):join {1,2,3} == '1 2 3' -function stringx.join (self,seq) - assert_string(1,self) - return concat(seq,self) -end - ---- does string start with the substring?. --- @param self the string --- @param s2 a string -function stringx.startswith(self,s2) - assert_string(1,self) - assert_string(2,s2) - return find(self,s2,1,true) == 1 -end - -local function _find_all(s,sub,first,last) - if sub == '' then return #s+1,#s end - local i1,i2 = find(s,sub,first,true) - local res - local k = 0 - while i1 do - res = i1 - k = k + 1 - i1,i2 = find(s,sub,i2+1,true) - if last and i1 > last then break end - end - return res,k -end - ---- does string end with the given substring?. --- @param s a string --- @param send a substring or a table of suffixes -function stringx.endswith(s,send) - assert_string(1,s) - if type(send) == 'string' then - return #s >= #send and s:find(send, #s-#send+1, true) and true or false - elseif type(send) == 'table' then - local endswith = stringx.endswith - for _,suffix in ipairs(send) do - if endswith(s,suffix) then return true end - end - return false - else - error('argument #2: either a substring or a table of suffixes expected') - end -end - --- break string into a list of lines --- @param self the string --- @param keepends (currently not used) -function stringx.splitlines (self,keepends) - assert_string(1,self) - local res = usplit(self,'[\r\n]') - -- we are currently hacking around a problem with utils.split (see stringx.split) - if #res == 0 then res = {''} end - return setmetatable(res,list_MT) -end - -local function tab_expand (self,n) - return (gsub(self,'([^\t]*)\t', function(s) - return s..(' '):rep(n - #s % n) - end)) -end - ---- replace all tabs in s with n spaces. If not specified, n defaults to 8. --- with 0.9.5 this now correctly expands to the next tab stop (if you really --- want to just replace tabs, use :gsub('\t',' ') etc) --- @param self the string --- @param n number of spaces to expand each tab, (default 8) -function stringx.expandtabs(self,n) - assert_string(1,self) - n = n or 8 - if not self:find '\n' then return tab_expand(self,n) end - local res,i = {},1 - for line in stringx.lines(self) do - res[i] = tab_expand(line,n) - i = i + 1 - end - return table.concat(res,'\n') -end - ---- find index of first instance of sub in s from the left. --- @param self the string --- @param sub substring --- @param i1 start index -function stringx.lfind(self,sub,i1) - assert_string(1,self) - assert_string(2,sub) - local idx = find(self,sub,i1,true) - if idx then return idx else return nil end -end - ---- find index of first instance of sub in s from the right. --- @param self the string --- @param sub substring --- @param first first index --- @param last last index -function stringx.rfind(self,sub,first,last) - assert_string(1,self) - assert_string(2,sub) - local idx = _find_all(self,sub,first,last) - if idx then return idx else return nil end -end - ---- replace up to n instances of old by new in the string s. --- if n is not present, replace all instances. --- @param s the string --- @param old the target substring --- @param new the substitution --- @param n optional maximum number of substitutions --- @return result string --- @return the number of substitutions -function stringx.replace(s,old,new,n) - assert_string(1,s) - assert_string(1,old) - return (gsub(s,escape(old),new:gsub('%%','%%%%'),n)) -end - ---- split a string into a list of strings using a delimiter. --- @class function --- @name split --- @param self the string --- @param re a delimiter (defaults to whitespace) --- @param n maximum number of results --- @usage #(('one two'):split()) == 2 --- @usage ('one,two,three'):split(',') == List{'one','two','three'} --- @usage ('one,two,three'):split(',',2) == List{'one','two,three'} -function stringx.split(self,re,n) - local s = self - local plain = true - if not re then -- default spaces - s = lstrip(s) - plain = false - end - local res = usplit(s,re,plain,n) - if re and re ~= '' and find(s,re,-#re,true) then - res[#res+1] = "" - end - return setmetatable(res,list_MT) -end - ---- split a string using a pattern. Note that at least one value will be returned! --- @param self the string --- @param re a Lua string pattern (defaults to whitespace) --- @return the parts of the string --- @usage a,b = line:splitv('=') -function stringx.splitv (self,re) - assert_string(1,self) - return utils.splitv(self,re) -end - -local function copy(self) - return self..'' -end - ---- count all instances of substring in string. --- @param self the string --- @param sub substring -function stringx.count(self,sub) - assert_string(1,self) - local i,k = _find_all(self,sub,1) - return k -end - -local function _just(s,w,ch,left,right) - local n = #s - if w > n then - if not ch then ch = ' ' end - local f1,f2 - if left and right then - local ln = ceil((w-n)/2) - local rn = w - n - ln - f1 = rep(ch,ln) - f2 = rep(ch,rn) - elseif right then - f1 = rep(ch,w-n) - f2 = '' - else - f2 = rep(ch,w-n) - f1 = '' - end - return f1..s..f2 - else - return copy(s) - end -end - ---- left-justify s with width w. --- @param self the string --- @param w width of justification --- @param ch padding character, default ' ' -function stringx.ljust(self,w,ch) - assert_string(1,self) - assert_arg(2,w,'number') - return _just(self,w,ch,true,false) -end - ---- right-justify s with width w. --- @param s the string --- @param w width of justification --- @param ch padding character, default ' ' -function stringx.rjust(s,w,ch) - assert_string(1,s) - assert_arg(2,w,'number') - return _just(s,w,ch,false,true) -end - ---- center-justify s with width w. --- @param s the string --- @param w width of justification --- @param ch padding character, default ' ' -function stringx.center(s,w,ch) - assert_string(1,s) - assert_arg(2,w,'number') - return _just(s,w,ch,true,true) -end - -local function _strip(s,left,right,chrs) - if not chrs then - chrs = '%s' - else - chrs = '['..escape(chrs)..']' - end - if left then - local i1,i2 = find(s,'^'..chrs..'*') - if i2 >= i1 then - s = sub(s,i2+1) - end - end - if right then - local i1,i2 = find(s,chrs..'*$') - if i2 >= i1 then - s = sub(s,1,i1-1) - end - end - return s -end - ---- trim any whitespace on the left of s. --- @param self the string --- @param chrs default space, can be a string of characters to be trimmed -function stringx.lstrip(self,chrs) - assert_string(1,self) - return _strip(self,true,false,chrs) -end -lstrip = stringx.lstrip - ---- trim any whitespace on the right of s. --- @param s the string --- @param chrs default space, can be a string of characters to be trimmed -function stringx.rstrip(s,chrs) - assert_string(1,s) - return _strip(s,false,true,chrs) -end - ---- trim any whitespace on both left and right of s. --- @param self the string --- @param chrs default space, can be a string of characters to be trimmed -function stringx.strip(self,chrs) - assert_string(1,self) - return _strip(self,true,true,chrs) -end - --- The partition functions split a string using a delimiter into three parts: --- the part before, the delimiter itself, and the part afterwards -local function _partition(p,delim,fn) - local i1,i2 = fn(p,delim) - if not i1 or i1 == -1 then - return p,'','' - else - if not i2 then i2 = i1 end - return sub(p,1,i1-1),sub(p,i1,i2),sub(p,i2+1) - end -end - ---- partition the string using first occurance of a delimiter --- @param self the string --- @param ch delimiter --- @return part before ch --- @return ch --- @return part after ch -function stringx.partition(self,ch) - assert_string(1,self) - assert_nonempty_string(2,ch) - return _partition(self,ch,stringx.lfind) -end - ---- partition the string p using last occurance of a delimiter --- @param self the string --- @param ch delimiter --- @return part before ch --- @return ch --- @return part after ch -function stringx.rpartition(self,ch) - assert_string(1,self) - assert_nonempty_string(2,ch) - return _partition(self,ch,stringx.rfind) -end - ---- return the 'character' at the index. --- @param self the string --- @param idx an index (can be negative) --- @return a substring of length 1 if successful, empty string otherwise. -function stringx.at(self,idx) - assert_string(1,self) - assert_arg(2,idx,'number') - return sub(self,idx,idx) -end - ---- return an interator over all lines in a string --- @param self the string --- @return an iterator -function stringx.lines (self) - assert_string(1,self) - local s = self - if not s:find '\n$' then s = s..'\n' end - return s:gmatch('([^\n]*)\n') -end - ---- iniital word letters uppercase ('title case'). --- Here 'words' mean chunks of non-space characters. --- @param self the string --- @return a string with each word's first letter uppercase -function stringx.title(self) - return (self:gsub('(%S)(%S*)',function(f,r) - return f:upper()..r:lower() - end)) -end - -stringx.capitalize = stringx.title - -local elipsis = '...' -local n_elipsis = #elipsis - ---- return a shorted version of a string. --- @param self the string --- @param sz the maxinum size allowed --- @param tail true if we want to show the end of the string (head otherwise) -function stringx.shorten(self,sz,tail) - if #self > sz then - if sz < n_elipsis then return elipsis:sub(1,sz) end - if tail then - local i = #self - sz + 1 + n_elipsis - return elipsis .. self:sub(i) - else - return self:sub(1,sz-n_elipsis) .. elipsis - end - end - return self -end - -function stringx.import(dont_overload) - utils.import(stringx,string) -end - -return stringx diff --git a/Utils/luarocks/share/lua/5.1/pl/tablex.lua b/Utils/luarocks/share/lua/5.1/pl/tablex.lua deleted file mode 100644 index bfddb4b70..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/tablex.lua +++ /dev/null @@ -1,766 +0,0 @@ ---- Extended operations on Lua tables. --- @class module --- @name pl.tablex -local getmetatable,setmetatable,require = getmetatable,setmetatable,require -local append,remove = table.insert,table.remove -local min,max = math.min,math.max -local pairs,type,unpack,next,ipairs,select,tostring = pairs,type,unpack,next,ipairs,select,tostring -local utils = require ('pl.utils') -local function_arg = utils.function_arg -local Set = utils.stdmt.Set -local List = utils.stdmt.List -local Map = utils.stdmt.Map -local assert_arg = utils.assert_arg - ---[[ -module ('pl.tablex',utils._module) -]] - -local tablex = {} - --- generally, functions that make copies of tables try to preserve the metatable. --- However, when the source has no obvious type, then we attach appropriate metatables --- like List, Map, etc to the result. -local function setmeta (res,tbl,def) - return setmetatable(res,getmetatable(tbl) or def) -end - -local function makelist (res) - return setmetatable(res,List) -end - ---- copy a table into another, in-place. --- @param t1 destination table --- @param t2 source table --- @return first table -function tablex.update (t1,t2) - assert_arg(1,t1,'table') - assert_arg(2,t2,'table') - for k,v in pairs(t2) do - t1[k] = v - end - return t1 -end - ---- total number of elements in this table.
    --- Note that this is distinct from #t, which is the number --- of values in the array part; this value will always --- be greater or equal. The difference gives the size of --- the hash part, for practical purposes. --- @param t a table --- @return the size -function tablex.size (t) - assert_arg(1,t,'table') - local i = 0 - for k in pairs(t) do i = i + 1 end - return i -end - ---- make a shallow copy of a table --- @param t source table --- @return new table -function tablex.copy (t) - assert_arg(1,t,'table') - local res = {} - for k,v in pairs(t) do - res[k] = v - end - return res -end - ---- make a deep copy of a table, recursively copying all the keys and fields. --- This will also set the copied table's metatable to that of the original. --- @param t A table --- @return new table -function tablex.deepcopy(t) - assert_arg(1,t,'table') - if type(t) ~= 'table' then return t end - local mt = getmetatable(t) - local res = {} - for k,v in pairs(t) do - if type(v) == 'table' then - v = tablex.deepcopy(v) - end - res[k] = v - end - setmetatable(res,mt) - return res -end - -local abs = math.abs - ---- compare two values. --- if they are tables, then compare their keys and fields recursively. --- @param t1 A value --- @param t2 A value --- @param ignore_mt if true, ignore __eq metamethod (default false) --- @param eps if defined, then used for any number comparisons --- @return true or false -function tablex.deepcompare(t1,t2,ignore_mt,eps) - local ty1 = type(t1) - local ty2 = type(t2) - if ty1 ~= ty2 then return false end - -- non-table types can be directly compared - if ty1 ~= 'table' then - if ty1 == 'number' and eps then return abs(t1-t2) < eps end - return t1 == t2 - end - -- as well as tables which have the metamethod __eq - local mt = getmetatable(t1) - if not ignore_mt and mt and mt.__eq then return t1 == t2 end - for k1,v1 in pairs(t1) do - local v2 = t2[k1] - if v2 == nil or not tablex.deepcompare(v1,v2,ignore_mt,eps) then return false end - end - for k2,v2 in pairs(t2) do - local v1 = t1[k2] - if v1 == nil or not tablex.deepcompare(v1,v2,ignore_mt,eps) then return false end - end - return true -end - ---- compare two list-like tables using a predicate. --- @param t1 a table --- @param t2 a table --- @param cmp A comparison function -function tablex.compare (t1,t2,cmp) - assert_arg(1,t1,'table') - assert_arg(2,t2,'table') - if #t1 ~= #t2 then return false end - cmp = function_arg(3,cmp) - for k in ipairs(t1) do - if not cmp(t1[k],t2[k]) then return false end - end - return true -end - ---- compare two list-like tables using an optional predicate, without regard for element order. --- @param t1 a list-like table --- @param t2 a list-like table --- @param cmp A comparison function (may be nil) -function tablex.compare_no_order (t1,t2,cmp) - assert_arg(1,t1,'table') - assert_arg(2,t2,'table') - if cmp then cmp = function_arg(3,cmp) end - if #t1 ~= #t2 then return false end - local visited = {} - for i = 1,#t1 do - local val = t1[i] - local gotcha - for j = 1,#t2 do if not visited[j] then - local match - if cmp then match = cmp(val,t2[j]) else match = val == t2[j] end - if match then - gotcha = j - break - end - end end - if not gotcha then return false end - visited[gotcha] = true - end - return true -end - - ---- return the index of a value in a list. --- Like string.find, there is an optional index to start searching, --- which can be negative. --- @param t A list-like table (i.e. with numerical indices) --- @param val A value --- @param idx index to start; -1 means last element,etc (default 1) --- @return index of value or nil if not found --- @usage find({10,20,30},20) == 2 --- @usage find({'a','b','a','c'},'a',2) == 3 - -function tablex.find(t,val,idx) - assert_arg(1,t,'table') - idx = idx or 1 - if idx < 0 then idx = #t + idx + 1 end - for i = idx,#t do - if t[i] == val then return i end - end - return nil -end - ---- return the index of a value in a list, searching from the end. --- Like string.find, there is an optional index to start searching, --- which can be negative. --- @param t A list-like table (i.e. with numerical indices) --- @param val A value --- @param idx index to start; -1 means last element,etc (default 1) --- @return index of value or nil if not found --- @usage rfind({10,10,10},10) == 3 -function tablex.rfind(t,val,idx) - assert_arg(1,t,'table') - idx = idx or #t - if idx < 0 then idx = #t + idx + 1 end - for i = idx,1,-1 do - if t[i] == val then return i end - end - return nil -end - - ---- return the index (or key) of a value in a table using a comparison function. --- @param t A table --- @param cmp A comparison function --- @param arg an optional second argument to the function --- @return index of value, or nil if not found --- @return value returned by comparison function -function tablex.find_if(t,cmp,arg) - assert_arg(1,t,'table') - cmp = function_arg(2,cmp) - for k,v in pairs(t) do - local c = cmp(v,arg) - if c then return k,c end - end - return nil -end - ---- return a list of all values in a table indexed by another list. --- @param tbl a table --- @param idx an index table (a list of keys) --- @return a list-like table --- @usage index_by({10,20,30,40},{2,4}) == {20,40} --- @usage index_by({one=1,two=2,three=3},{'one','three'}) == {1,3} -function tablex.index_by(tbl,idx) - assert_arg(1,tbl,'table') - assert_arg(2,idx,'table') - local res = {} - for _,i in ipairs(idx) do - append(res,tbl[i]) - end - return setmeta(res,tbl,List) -end - ---- apply a function to all values of a table. --- This returns a table of the results. --- Any extra arguments are passed to the function. --- @param fun A function that takes at least one argument --- @param t A table --- @param ... optional arguments --- @usage map(function(v) return v*v end, {10,20,30,fred=2}) is {100,400,900,fred=4} -function tablex.map(fun,t,...) - assert_arg(1,t,'table') - fun = function_arg(1,fun) - local res = {} - for k,v in pairs(t) do - res[k] = fun(v,...) - end - return setmeta(res,t) -end - ---- apply a function to all values of a list. --- This returns a table of the results. --- Any extra arguments are passed to the function. --- @param fun A function that takes at least one argument --- @param t a table (applies to array part) --- @param ... optional arguments --- @return a list-like table --- @usage imap(function(v) return v*v end, {10,20,30,fred=2}) is {100,400,900} -function tablex.imap(fun,t,...) - assert_arg(1,t,'table') - fun = function_arg(1,fun) - local res = {} - for i = 1,#t do - res[i] = fun(t[i],...) or false - end - return setmeta(res,t,List) -end - ---- apply a named method to values from a table. --- @param name the method name --- @param t a list-like table --- @param ... any extra arguments to the method -function tablex.map_named_method (name,t,...) - assert_arg(1,name,'string') - assert_arg(2,t,'table') - local res = {} - for i = 1,#t do - local val = t[i] - local fun = val[name] - res[i] = fun(val,...) - end - return setmeta(res,t,List) -end - - ---- apply a function to all values of a table, in-place. --- Any extra arguments are passed to the function. --- @param fun A function that takes at least one argument --- @param t a table --- @param ... extra arguments -function tablex.transform (fun,t,...) - assert_arg(1,t,'table') - fun = function_arg(1,fun) - for k,v in pairs(t) do - t[v] = fun(v,...) - end -end - ---- generate a table of all numbers in a range --- @param start number --- @param finish number --- @param step optional increment (default 1 for increasing, -1 for decreasing) -function tablex.range (start,finish,step) - local res = {} - local k = 1 - if not step then - if finish > start then step = finish > start and 1 or -1 end - end - for i=start,finish,step do res[k]=i; k=k+1 end - return res -end - ---- apply a function to values from two tables. --- @param fun a function of at least two arguments --- @param t1 a table --- @param t2 a table --- @param ... extra arguments --- @return a table --- @usage map2('+',{1,2,3,m=4},{10,20,30,m=40}) is {11,22,23,m=44} -function tablex.map2 (fun,t1,t2,...) - assert_arg(1,t1,'table') - assert_arg(2,t2,'table') - fun = function_arg(1,fun) - local res = {} - for k,v in pairs(t1) do - res[k] = fun(v,t2[k],...) - end - return setmeta(res,t1,List) -end - ---- apply a function to values from two arrays. --- @param fun a function of at least two arguments --- @param t1 a list-like table --- @param t2 a list-like table --- @param ... extra arguments --- @usage imap2('+',{1,2,3,m=4},{10,20,30,m=40}) is {11,22,23} -function tablex.imap2 (fun,t1,t2,...) - assert_arg(2,t1,'table') - assert_arg(3,t2,'table') - fun = function_arg(1,fun) - local res = {} - for i = 1,#t1 do - res[i] = fun(t1[i],t2[i],...) - end - return res -end - ---- 'reduce' a list using a binary function. --- @param fun a function of two arguments --- @param t a list-like table --- @return the result of the function --- @usage reduce('+',{1,2,3,4}) == 10 -function tablex.reduce (fun,t) - assert_arg(2,t,'table') - fun = function_arg(1,fun) - local n = #t - local res = t[1] - for i = 2,n do - res = fun(res,t[i]) - end - return res -end - ---- apply a function to all elements of a table. --- The arguments to the function will be the value, --- the key and finally any extra arguments passed to this function. --- Note that the Lua 5.0 function table.foreach passed the key first. --- @param t a table --- @param fun a function with at least one argument --- @param ... extra arguments -function tablex.foreach(t,fun,...) - assert_arg(1,t,'table') - fun = function_arg(2,fun) - for k,v in pairs(t) do - fun(v,k,...) - end -end - ---- apply a function to all elements of a list-like table in order. --- The arguments to the function will be the value, --- the index and finally any extra arguments passed to this function --- @param t a table --- @param fun a function with at least one argument --- @param ... optional arguments -function tablex.foreachi(t,fun,...) - assert_arg(1,t,'table') - fun = function_arg(2,fun) - for k,v in ipairs(t) do - fun(v,k,...) - end -end - - ---- Apply a function to a number of tables. --- A more general version of map --- The result is a table containing the result of applying that function to the --- ith value of each table. Length of output list is the minimum length of all the lists --- @param fun a function of n arguments --- @param ... n tables --- @usage mapn(function(x,y,z) return x+y+z end, {1,2,3},{10,20,30},{100,200,300}) is {111,222,333} --- @usage mapn(math.max, {1,20,300},{10,2,3},{100,200,100}) is {100,200,300} --- @param fun A function that takes as many arguments as there are tables -function tablex.mapn(fun,...) - fun = function_arg(1,fun) - local res = {} - local lists = {...} - local minn = 1e40 - for i = 1,#lists do - minn = min(minn,#(lists[i])) - end - for i = 1,minn do - local args = {} - for j = 1,#lists do - args[#args+1] = lists[j][i] - end - res[#res+1] = fun(unpack(args)) - end - return res -end - ---- call the function with the key and value pairs from a table. --- The function can return a value and a key (note the order!). If both --- are not nil, then this pair is inserted into the result. If only value is not nil, then --- it is appended to the result. --- @param fun A function which will be passed each key and value as arguments, plus any extra arguments to pairmap. --- @param t A table --- @param ... optional arguments --- @usage pairmap({fred=10,bonzo=20},function(k,v) return v end) is {10,20} --- @usage pairmap({one=1,two=2},function(k,v) return {k,v},k end) is {one={'one',1},two={'two',2}} -function tablex.pairmap(fun,t,...) - assert_arg(1,t,'table') - fun = function_arg(1,fun) - local res = {} - for k,v in pairs(t) do - local rv,rk = fun(k,v,...) - if rk then - res[rk] = rv - else - res[#res+1] = rv - end - end - return res -end - -local function keys_op(i,v) return i end - ---- return all the keys of a table in arbitrary order. --- @param t A table -function tablex.keys(t) - assert_arg(1,t,'table') - return makelist(tablex.pairmap(keys_op,t)) -end - -local function values_op(i,v) return v end - ---- return all the values of the table in arbitrary order --- @param t A table -function tablex.values(t) - assert_arg(1,t,'table') - return makelist(tablex.pairmap(values_op,t)) -end - -local function index_map_op (i,v) return i,v end - ---- create an index map from a list-like table. The original values become keys, --- and the associated values are the indices into the original list. --- @param t a list-like table --- @return a map-like table -function tablex.index_map (t) - assert_arg(1,t,'table') - return setmetatable(tablex.pairmap(index_map_op,t),Map) -end - -local function set_op(i,v) return true,v end - ---- create a set from a list-like table. A set is a table where the original values --- become keys, and the associated values are all true. --- @param t a list-like table --- @return a set (a map-like table) -function tablex.makeset (t) - assert_arg(1,t,'table') - return setmetatable(tablex.pairmap(set_op,t),Set) -end - - ---- combine two tables, either as union or intersection. Corresponds to --- set operations for sets () but more general. Not particularly --- useful for list-like tables. --- @param t1 a table --- @param t2 a table --- @param dup true for a union, false for an intersection. --- @usage merge({alice=23,fred=34},{bob=25,fred=34}) is {fred=34} --- @usage merge({alice=23,fred=34},{bob=25,fred=34},true) is {bob=25,fred=34,alice=23} --- @see tablex.index_map -function tablex.merge (t1,t2,dup) - assert_arg(1,t1,'table') - assert_arg(2,t2,'table') - local res = {} - for k,v in pairs(t1) do - if dup or t2[k] then res[k] = v end - end - for k,v in pairs(t2) do - if dup or t1[k] then res[k] = v end - end - return setmeta(res,t1,Map) -end - ---- a new table which is the difference of two tables. --- With sets (where the values are all true) this is set difference and --- symmetric difference depending on the third parameter. --- @param s1 a map-like table or set --- @param s2 a map-like table or set --- @param symm symmetric difference (default false) --- @return a map-like table or set -function tablex.difference (s1,s2,symm) - assert_arg(1,s1,'table') - assert_arg(2,s2,'table') - local res = {} - for k,v in pairs(s1) do - if not s2[k] then res[k] = v end - end - if symm then - for k,v in pairs(s2) do - if not s1[k] then res[k] = v end - end - end - return setmeta(res,s1,Map) -end - ---- A table where the key/values are the values and value counts of the table. --- @param t a list-like table --- @param cmp a function that defines equality (otherwise uses ==) --- @return a map-like table --- @see seq.count_map -function tablex.count_map (t,cmp) - assert_arg(1,t,'table') - local res,mask = {},{} - cmp = function_arg(2,cmp) - local n = #t - for i,v in ipairs(t) do - if not mask[v] then - mask[v] = true - -- check this value against all other values - res[v] = 1 -- there's at least one instance - for j = i+1,n do - local w = t[j] - if cmp and cmp(v,w) or v == w then - res[v] = res[v] + 1 - mask[w] = true - end - end - end - end - return setmetatable(res,Map) -end - ---- filter a table's values using a predicate function --- @param t a list-like table --- @param pred a boolean function --- @param arg optional argument to be passed as second argument of the predicate -function tablex.filter (t,pred,arg) - assert_arg(1,t,'table') - pred = function_arg(2,pred) - local res = {} - for k,v in ipairs(t) do - if pred(v,arg) then append(res,v) end - end - return setmeta(res,t,List) -end - ---- return a table where each element is a table of the ith values of an arbitrary --- number of tables. It is equivalent to a matrix transpose. --- @usage zip({10,20,30},{100,200,300}) is {{10,100},{20,200},{30,300}} -function tablex.zip(...) - return tablex.mapn(function(...) return {...} end,...) -end - -local _copy -function _copy (dest,src,idest,isrc,nsrc,clean_tail) - idest = idest or 1 - isrc = isrc or 1 - local iend - if not nsrc then - nsrc = #src - iend = #src - else - iend = isrc + min(nsrc-1,#src-isrc) - end - if dest == src then -- special case - if idest > isrc and iend >= idest then -- overlapping ranges - src = tablex.sub(src,isrc,nsrc) - isrc = 1; iend = #src - end - end - for i = isrc,iend do - dest[idest] = src[i] - idest = idest + 1 - end - if clean_tail then - tablex.clear(dest,idest) - end - return dest -end - ---- copy an array into another one, resizing the destination if necessary.
    --- @param dest a list-like table --- @param src a list-like table --- @param idest where to start copying values from source (default 1) --- @param isrc where to start copying values into destination (default 1) --- @param nsrc number of elements to copy from source (default source size) -function tablex.icopy (dest,src,idest,isrc,nsrc) - assert_arg(1,dest,'table') - assert_arg(2,src,'table') - return _copy(dest,src,idest,isrc,nsrc,true) -end - ---- copy an array into another one.
    --- @param dest a list-like table --- @param src a list-like table --- @param idest where to start copying values from source (default 1) --- @param isrc where to start copying values into destination (default 1) --- @param nsrc number of elements to copy from source (default source size) -function tablex.move (dest,src,idest,isrc,nsrc) - assert_arg(1,dest,'table') - assert_arg(2,src,'table') - return _copy(dest,src,idest,isrc,nsrc,false) -end - -function tablex._normalize_slice(self,first,last) - local sz = #self - if not first then first=1 end - if first<0 then first=sz+first+1 end - -- make the range _inclusive_! - if not last then last=sz end - if last < 0 then last=sz+1+last end - return first,last -end - ---- Extract a range from a table, like 'string.sub'. --- If first or last are negative then they are relative to the end of the list --- eg. sub(t,-2) gives last 2 entries in a list, and --- sub(t,-4,-2) gives from -4th to -2nd --- @param t a list-like table --- @param first An index --- @param last An index --- @return a new List -function tablex.sub(t,first,last) - assert_arg(1,t,'table') - first,last = tablex._normalize_slice(t,first,last) - local res={} - for i=first,last do append(res,t[i]) end - return setmeta(res,t,List) -end - ---- set an array range to a value. If it's a function we use the result --- of applying it to the indices. --- @param t a list-like table --- @param val a value --- @param i1 start range (default 1) --- @param i2 end range (default table size) -function tablex.set (t,val,i1,i2) - i1,i2 = i1 or 1,i2 or #t - if utils.is_callable(val) then - for i = i1,i2 do - t[i] = val(i) - end - else - for i = i1,i2 do - t[i] = val - end - end -end - ---- create a new array of specified size with initial value. --- @param n size --- @param val initial value (can be nil, but don't expect # to work!) --- @return the table -function tablex.new (n,val) - local res = {} - tablex.set(res,val,1,n) - return res -end - ---- clear out the contents of a table. --- @param t a table --- @param istart optional start position -function tablex.clear(t,istart) - istart = istart or 1 - for i = istart,#t do remove(t) end -end - ---- insert values into a table.
    --- insertvalues(t, [pos,] values)
    --- similar to table.insert but inserts values from given table "values", --- not the object itself, into table "t" at position "pos". -function tablex.insertvalues(t, ...) - local pos, values - if select('#', ...) == 1 then - pos,values = #t+1, ... - else - pos,values = ... - end - if #values > 0 then - for i=#t,pos,-1 do - t[i+#values] = t[i] - end - local offset = 1 - pos - for i=pos,pos+#values-1 do - t[i] = values[i + offset] - end - end - return t -end - ---- remove a range of values from a table. --- @param t a list-like table --- @param i1 start index --- @param i2 end index --- @return the table -function tablex.removevalues (t,i1,i2) - i1,i2 = tablex._normalize_slice(t,i1,i2) - for i = i1,i2 do - remove(t,i1) - end - return t -end - -local _find -_find = function (t,value,tables) - for k,v in pairs(t) do - if v == value then return k end - end - for k,v in pairs(t) do - if not tables[v] and type(v) == 'table' then - tables[v] = true - local res = _find(v,value,tables) - if res then - res = tostring(res) - if type(k) ~= 'string' then - return '['..k..']'..res - else - return k..'.'..res - end - end - end - end -end - ---- find a value in a table by recursive search. --- @param t the table --- @param value the value --- @param exclude any tables to avoid searching --- @usage search(_G,math.sin,{package.path}) == 'math.sin' --- @return a fieldspec, e.g. 'a.b' or 'math.sin' -function tablex.search (t,value,exclude) - assert_arg(1,t,'table') - local tables = {[t]=true} - if exclude then - for _,v in pairs(exclude) do tables[v] = true end - end - return _find(t,value,tables) -end - -return tablex diff --git a/Utils/luarocks/share/lua/5.1/pl/template.lua b/Utils/luarocks/share/lua/5.1/pl/template.lua deleted file mode 100644 index dbff1f2fc..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/template.lua +++ /dev/null @@ -1,99 +0,0 @@ ---- A template preprocessor. --- Originally by Ricki Lake ---

    There are two rules:

      ---
    • lines starting with # are Lua
    • ---
    • otherwise, `$(expr)` is the result of evaluating `expr`
    • ---
    ---
    --- #  for i = 1,3 do
    ---    $(i) Hello, Word!
    --- #  end
    --- 
    --- Other escape characters can be used, when the defaults conflict --- with the output language. ---
    --- > for _,n in pairs{'one','two','three'} do
    ---  static int l_${n} (luaState *state);
    --- > end
    --- 
    --- See the Guide. --- @class module --- @name pl.template - ---[[ - module('pl.template') -]] - -local utils = require 'pl.utils' -local append,format = table.insert,string.format - -local function parseHashLines(chunk,brackets,esc) - local exec_pat = "()$(%b"..brackets..")()" - - local function parseDollarParen(pieces, chunk, s, e) - local s = 1 - for term, executed, e in chunk:gmatch (exec_pat) do - executed = '('..executed:sub(2,-2)..')' - append(pieces, - format("%q..(%s or '')..",chunk:sub(s, term - 1), executed)) - s = e - end - append(pieces, format("%q", chunk:sub(s))) - end - - local esc_pat = esc.."+([^\n]*\n?)" - local esc_pat1, esc_pat2 = "^"..esc_pat, "\n"..esc_pat - local pieces, s = {"return function(_put) ", n = 1}, 1 - while true do - local ss, e, lua = chunk:find (esc_pat1, s) - if not e then - ss, e, lua = chunk:find(esc_pat2, s) - append(pieces, "_put(") - parseDollarParen(pieces, chunk:sub(s, ss)) - append(pieces, ")") - if not e then break end - end - append(pieces, lua) - s = e + 1 - end - append(pieces, " end") - return table.concat(pieces) -end - -local template = {} - ---- expand the template using the specified environment. --- @param str the template string --- @param env the environment (by default empty).
    --- There are three special fields in the environment table
      ---
    • _parent continue looking up in this table
    • ---
    • _brackets; default is '()', can be any suitable bracket pair
    • ---
    • _escape; default is '#'
    • ---
    -function template.substitute(str,env) - env = env or {} - if rawget(env,"_parent") then - setmetatable(env,{__index = env._parent}) - end - local brackets = rawget(env,"_brackets") or '()' - local escape = rawget(env,"_escape") or '#' - local code = parseHashLines(str,brackets,escape) - local fn,err = utils.load(code,'TMP','t',env) - if not fn then return nil,err end - fn = fn() - local out = {} - local res,err = xpcall(function() fn(function(s) - out[#out+1] = s - end) end,debug.traceback) - if not res then - if env._debug then print(code) end - return nil,err - end - return table.concat(out) -end - -return template - - - - diff --git a/Utils/luarocks/share/lua/5.1/pl/test.lua b/Utils/luarocks/share/lua/5.1/pl/test.lua deleted file mode 100644 index 162337968..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/test.lua +++ /dev/null @@ -1,116 +0,0 @@ ---- Useful test utilities. --- @module pl.test - -local tablex = require 'pl.tablex' -local utils = require 'pl.utils' -local pretty = require 'pl.pretty' -local path = require 'pl.path' -local print,type = print,type -local clock = os.clock -local debug = require 'debug' -local io,debug = io,debug - -local function dump(x) - if type(x) == 'table' and not (getmetatable(x) and getmetatable(x).__tostring) then - return pretty.write(x,' ',true) - else - return tostring(x) - end -end - -local test = {} - -local function complain (x,y,msg) - local i = debug.getinfo(3) - local err = io.stderr - err:write(path.basename(i.short_src)..':'..i.currentline..': assertion failed\n') - err:write("got:\t",dump(x),'\n') - err:write("needed:\t",dump(y),'\n') - utils.quit(1,msg or "these values were not equal") -end - ---- like assert, except takes two arguments that must be equal and can be tables. --- If they are plain tables, it will use tablex.deepcompare. --- @param x any value --- @param y a value equal to x --- @param eps an optional tolerance for numerical comparisons -function test.asserteq (x,y,eps) - local res = x == y - if not res then - res = tablex.deepcompare(x,y,true,eps) - end - if not res then - complain(x,y) - end -end - ---- assert that the first string matches the second. --- @param s1 a string --- @param s2 a string -function test.assertmatch (s1,s2) - if not s1:match(s2) then - complain (s1,s2,"these strings did not match") - end -end - -function test.assertraise(fn,e) - local ok, err = pcall(unpack(fn)) - if not err or err:match(e)==nil then - complain (err,e,"these errors did not match") - end -end - ---- a version of asserteq that takes two pairs of values. --- x1==y1 and x2==y2 must be true. Useful for functions that naturally --- return two values. --- @param x1 any value --- @param x2 any value --- @param y1 any value --- @param y2 any value -function test.asserteq2 (x1,x2,y1,y2) - if x1 ~= y1 then complain(x1,y1) end - if x2 ~= y2 then complain(x2,y2) end -end - --- tuple type -- - -local tuple_mt = {} - -function tuple_mt.__tostring(self) - local ts = {} - for i=1, self.n do - local s = self[i] - ts[i] = type(s) == 'string' and string.format('%q', s) or tostring(s) - end - return 'tuple(' .. table.concat(ts, ', ') .. ')' -end - -function tuple_mt.__eq(a, b) - if a.n ~= b.n then return false end - for i=1, a.n do - if a[i] ~= b[i] then return false end - end - return true -end - ---- encode an arbitrary argument list as a tuple. --- This can be used to compare to other argument lists, which is --- very useful for testing functions which return a number of values. --- @usage asserteq(tuple( ('ab'):find 'a'), tuple(1,1)) -function test.tuple(...) - return setmetatable({n=select('#', ...), ...}, tuple_mt) -end - ---- Time a function. Call the function a given number of times, and report the number of seconds taken, --- together with a message. Any extra arguments will be passed to the function. --- @param msg a descriptive message --- @param n number of times to call the function --- @param fun the function --- @param ... optional arguments to fun -function test.timer(msg,n,fun,...) - local start = clock() - for i = 1,n do fun(...) end - utils.printf("%s: took %7.2f sec\n",msg,clock()-start) -end - -return test diff --git a/Utils/luarocks/share/lua/5.1/pl/text.lua b/Utils/luarocks/share/lua/5.1/pl/text.lua deleted file mode 100644 index 4c09c7003..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/text.lua +++ /dev/null @@ -1,241 +0,0 @@ ---- Text processing utilities.

    --- This provides a Template class (modeled after the same from the Python --- libraries, see string.Template). It also provides similar functions to those --- found in the textwrap module. --- See the Guide. ---

    --- Calling text.format_operator() overloads the % operator for strings to give Python/Ruby style formated output. --- This is extended to also do template-like substitution for map-like data. ---

    --- > require 'pl.text'.format_operator()
    --- > = '%s = %5.3f' % {'PI',math.pi}
    --- PI = 3.142
    --- > = '$name = $value' % {name='dog',value='Pluto'}
    --- dog = Pluto
    --- 
    --- @class module --- @name pl.text - -local gsub = string.gsub -local concat,append = table.concat,table.insert -local utils = require 'pl.utils' -local bind1,usplit,assert_arg,is_callable = utils.bind1,utils.split,utils.assert_arg,utils.is_callable - -local function lstrip(str) return (str:gsub('^%s+','')) end -local function strip(str) return (lstrip(str):gsub('%s+$','')) end -local function make_list(l) return setmetatable(l,utils.stdmt.List) end -local function split(s,delim) return make_list(usplit(s,delim)) end - -local function imap(f,t,...) - local res = {} - for i = 1,#t do res[i] = f(t[i],...) end - return res -end - ---[[ -module ('pl.text',utils._module) -]] - -local text = {} - -local function _indent (s,sp) - local sl = split(s,'\n') - return concat(imap(bind1('..',sp),sl),'\n')..'\n' -end - ---- indent a multiline string. --- @param s the string --- @param n the size of the indent --- @param ch the character to use when indenting (default ' ') --- @return indented string -function text.indent (s,n,ch) - assert_arg(1,s,'string') - assert_arg(2,s,'number') - return _indent(s,string.rep(ch or ' ',n)) -end - ---- dedent a multiline string by removing any initial indent. --- useful when working with [[..]] strings. --- @param s the string --- @return a string with initial indent zero. -function text.dedent (s) - assert_arg(1,s,'string') - local sl = split(s,'\n') - local i1,i2 = sl[1]:find('^%s*') - sl = imap(string.sub,sl,i2+1) - return concat(sl,'\n')..'\n' -end - ---- format a paragraph into lines so that they fit into a line width. --- It will not break long words, so lines can be over the length --- to that extent. --- @param s the string --- @param width the margin width, default 70 --- @return a list of lines -function text.wrap (s,width) - assert_arg(1,s,'string') - width = width or 70 - s = s:gsub('\n',' ') - local i,nxt = 1 - local lines,line = {} - while i < #s do - nxt = i+width - if s:find("[%w']",nxt) then -- inside a word - nxt = s:find('%W',nxt+1) -- so find word boundary - end - line = s:sub(i,nxt) - i = i + #line - append(lines,strip(line)) - end - return make_list(lines) -end - ---- format a paragraph so that it fits into a line width. --- @param s the string --- @param width the margin width, default 70 --- @return a string --- @see wrap -function text.fill (s,width) - return concat(text.wrap(s,width),'\n') .. '\n' -end - -local Template = {} -text.Template = Template -Template.__index = Template -setmetatable(Template, { - __call = function(obj,tmpl) - return Template.new(tmpl) - end}) - -function Template.new(tmpl) - assert_arg(1,tmpl,'string') - local res = {} - res.tmpl = tmpl - setmetatable(res,Template) - return res -end - -local function _substitute(s,tbl,safe) - local subst - if is_callable(tbl) then - subst = tbl - else - function subst(f) - local s = tbl[f] - if not s then - if safe then - return f - else - error("not present in table "..f) - end - else - return s - end - end - end - local res = gsub(s,'%${([%w_]+)}',subst) - return (gsub(res,'%$([%w_]+)',subst)) -end - ---- substitute values into a template, throwing an error. --- This will throw an error if no name is found. --- @param tbl a table of name-value pairs. -function Template:substitute(tbl) - assert_arg(1,tbl,'table') - return _substitute(self.tmpl,tbl,false) -end - ---- substitute values into a template. --- This version just passes unknown names through. --- @param tbl a table of name-value pairs. -function Template:safe_substitute(tbl) - assert_arg(1,tbl,'table') - return _substitute(self.tmpl,tbl,true) -end - ---- substitute values into a template, preserving indentation.
    --- If the value is a multiline string _or_ a template, it will insert --- the lines at the correct indentation.
    --- Furthermore, if a template, then that template will be subsituted --- using the same table. --- @param tbl a table of name-value pairs. -function Template:indent_substitute(tbl) - assert_arg(1,tbl,'table') - if not self.strings then - self.strings = split(self.tmpl,'\n') - end - -- the idea is to substitute line by line, grabbing any spaces as - -- well as the $var. If the value to be substituted contains newlines, - -- then we split that into lines and adjust the indent before inserting. - local function subst(line) - return line:gsub('(%s*)%$([%w_]+)',function(sp,f) - local subtmpl - local s = tbl[f] - if not s then error("not present in table "..f) end - if getmetatable(s) == Template then - subtmpl = s - s = s.tmpl - else - s = tostring(s) - end - if s:find '\n' then - s = _indent(s,sp) - end - if subtmpl then return _substitute(s,tbl) - else return s - end - end) - end - local lines = imap(subst,self.strings) - return concat(lines,'\n')..'\n' -end - -------- Python-style formatting operator ------ --- (see the lua-users wiki) -- - -function text.format_operator() - - local format = string.format - - -- a more forgiving version of string.format, which applies - -- tostring() to any value with a %s format. - local function formatx (fmt,...) - local args = {...} - local i = 1 - for p in fmt:gmatch('%%.') do - if p == '%s' and type(args[i]) ~= 'string' then - args[i] = tostring(args[i]) - end - i = i + 1 - end - return format(fmt,unpack(args)) - end - - local function basic_subst(s,t) - return (s:gsub('%$([%w_]+)',t)) - end - - -- Note this goes further than the original, and will allow these cases: - -- 1. a single value - -- 2. a list of values - -- 3. a map of var=value pairs - -- 4. a function, as in gsub - -- For the second two cases, it uses $-variable substituion. - getmetatable("").__mod = function(a, b) - if b == nil then - return a - elseif type(b) == "table" and getmetatable(b) == nil then - if #b == 0 then -- assume a map-like table - return _substitute(a,b,true) - else - return formatx(a,unpack(b)) - end - elseif type(b) == 'function' then - return basic_subst(a,b) - else - return formatx(a,b) - end - end -end - -return text diff --git a/Utils/luarocks/share/lua/5.1/pl/utils.lua b/Utils/luarocks/share/lua/5.1/pl/utils.lua deleted file mode 100644 index af1553b2f..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/utils.lua +++ /dev/null @@ -1,529 +0,0 @@ ---- Generally useful routines. --- See the Guide. --- @class module --- @name pl.utils -local format,gsub,byte = string.format,string.gsub,string.byte -local clock = os.clock -local stdout = io.stdout -local append = table.insert - -local collisions = {} - -local utils = {} - -utils._VERSION = "0.9.4" - -utils.dir_separator = _G.package.config:sub(1,1) - ---- end this program gracefully. --- @param code The exit code or a message to be printed --- @param ... extra arguments for message's format' --- @see utils.fprintf -function utils.quit(code,...) - if type(code) == 'string' then - utils.fprintf(io.stderr,code,...) - code = -1 - else - utils.fprintf(io.stderr,...) - end - io.stderr:write('\n') - os.exit(code) -end - ---- print an arbitrary number of arguments using a format. --- @param fmt The format (see string.format) --- @param ... Extra arguments for format -function utils.printf(fmt,...) - utils.fprintf(stdout,fmt,...) -end - ---- write an arbitrary number of arguments to a file using a format. --- @param f File handle to write to. --- @param fmt The format (see string.format). --- @param ... Extra arguments for format -function utils.fprintf(f,fmt,...) - utils.assert_string(2,fmt) - f:write(format(fmt,...)) -end - -local function import_symbol(T,k,v,libname) - local key = rawget(T,k) - -- warn about collisions! - if key and k ~= '_M' and k ~= '_NAME' and k ~= '_PACKAGE' and k ~= '_VERSION' then - utils.printf("warning: '%s.%s' overrides existing symbol\n",libname,k) - end - rawset(T,k,v) -end - -local function lookup_lib(T,t) - for k,v in pairs(T) do - if v == t then return k end - end - return '?' -end - -local already_imported = {} - ---- take a table and 'inject' it into the local namespace. --- @param t The Table --- @param T An optional destination table (defaults to callers environment) -function utils.import(t,T) - T = T or _G - t = t or utils - if type(t) == 'string' then - t = require (t) - end - local libname = lookup_lib(T,t) - if already_imported[t] then return end - already_imported[t] = libname - for k,v in pairs(t) do - import_symbol(T,k,v,libname) - end -end - -utils.patterns = { - FLOAT = '[%+%-%d]%d*%.?%d*[eE]?[%+%-]?%d*', - INTEGER = '[+%-%d]%d*', - IDEN = '[%a_][%w_]*', - FILE = '[%a%.\\][:%][%w%._%-\\]*' -} - ---- escape any 'magic' characters in a string --- @param s The input string -function utils.escape(s) - utils.assert_string(1,s) - return (s:gsub('[%-%.%+%[%]%(%)%$%^%%%?%*]','%%%1')) -end - ---- return either of two values, depending on a condition. --- @param cond A condition --- @param value1 Value returned if cond is true --- @param value2 Value returned if cond is false (can be optional) -function utils.choose(cond,value1,value2) - if cond then return value1 - else return value2 - end -end - -local raise - ---- return the contents of a file as a string --- @param filename The file path --- @param is_bin open in binary mode --- @return file contents -function utils.readfile(filename,is_bin) - local mode = is_bin and 'b' or '' - utils.assert_string(1,filename) - local f,err = io.open(filename,'r'..mode) - if not f then return utils.raise (err) end - local res,err = f:read('*a') - f:close() - if not res then return raise (err) end - return res -end - ---- write a string to a file --- @param filename The file path --- @param str The string --- @return true or nil --- @return error message --- @raise error if filename or str aren't strings -function utils.writefile(filename,str) - utils.assert_string(1,filename) - utils.assert_string(2,str) - local f,err = io.open(filename,'w') - if not f then return raise(err) end - f:write(str) - f:close() - return true -end - ---- return the contents of a file as a list of lines --- @param filename The file path --- @return file contents as a table --- @raise errror if filename is not a string -function utils.readlines(filename) - utils.assert_string(1,filename) - local f,err = io.open(filename,'r') - if not f then return raise(err) end - local res = {} - for line in f:lines() do - append(res,line) - end - f:close() - return res -end - ---- split a string into a list of strings separated by a delimiter. --- @param s The input string --- @param re A Lua string pattern; defaults to '%s+' --- @param plain don't use Lua patterns --- @param n optional maximum number of splits --- @return a list-like table --- @raise error if s is not a string -function utils.split(s,re,plain,n) - utils.assert_string(1,s) - local find,sub,append = string.find, string.sub, table.insert - local i1,ls = 1,{} - if not re then re = '%s+' end - if re == '' then return {s} end - while true do - local i2,i3 = find(s,re,i1,plain) - if not i2 then - local last = sub(s,i1) - if last ~= '' then append(ls,last) end - if #ls == 1 and ls[1] == '' then - return {} - else - return ls - end - end - append(ls,sub(s,i1,i2-1)) - if n and #ls == n then - ls[#ls] = sub(s,i1) - return ls - end - i1 = i3+1 - end -end - ---- split a string into a number of values. --- @param s the string --- @param re the delimiter, default space --- @return n values --- @usage first,next = splitv('jane:doe',':') --- @see split -function utils.splitv (s,re) - return unpack(utils.split(s,re)) -end - -local lua52 = table.pack ~= nil -local lua51_load = load - -if not lua52 then -- define Lua 5.2 style load() - function utils.load(str,src,mode,env) - local chunk,err - if type(str) == 'string' then - chunk,err = loadstring(str,src) - else - chunk,err = lua51_load(str,src) - end - if chunk and env then setfenv(chunk,env) end - return chunk,err - end -else - utils.load = load - -- setfenv/getfenv replacements for Lua 5.2 - -- by Sergey Rozhenko - -- http://lua-users.org/lists/lua-l/2010-06/msg00313.html - -- Roberto Ierusalimschy notes that it is possible for getfenv to return nil - -- in the case of a function with no globals: - -- http://lua-users.org/lists/lua-l/2010-06/msg00315.html - function setfenv(f, t) - f = (type(f) == 'function' and f or debug.getinfo(f + 1, 'f').func) - local name - local up = 0 - repeat - up = up + 1 - name = debug.getupvalue(f, up) - until name == '_ENV' or name == nil - if name then - debug.upvaluejoin(f, up, function() return name end, 1) -- use unique upvalue - debug.setupvalue(f, up, t) - end - end - - function getfenv(f) - f = (type(f) == 'function' and f or debug.getinfo(f + 1, 'f').func) - local name, val - local up = 0 - repeat - up = up + 1 - name, val = debug.getupvalue(f, up) - until name == '_ENV' or name == nil - return val - end -end - - ---- execute a shell command. --- This is a compatibility function that returns the same for Lua 5.1 and Lua 5.2 --- @param cmd a shell command --- @return true if successful --- @return actual return code -function utils.execute (cmd) - local res1,res2,res2 = os.execute(cmd) - if not lua52 then - return res1==0,res1 - else - return res1,res2 - end -end - -if not lua52 then - function table.pack (...) - local n = select('#',...) - return {n=n; ...},n - end - local sep = package.config:sub(1,1) - function package.searchpath (mod,path) - mod = mod:gsub('%.',sep) - for m in path:gmatch('[^;]+') do - local nm = m:gsub('?',mod) - local f = io.open(nm,'r') - if f then f:close(); return nm end - end - end -end - -if not table.pack then table.pack = _G.pack end -if not rawget(_G,"pack") then _G.pack = table.pack end - ---- take an arbitrary set of arguments and make into a table. --- This returns the table and the size; works fine for nil arguments --- @param ... arguments --- @return table --- @return table size --- @usage local t,n = utils.args(...) - ---- 'memoize' a function (cache returned value for next call). --- This is useful if you have a function which is relatively expensive, --- but you don't know in advance what values will be required, so --- building a table upfront is wasteful/impossible. --- @param func a function of at least one argument --- @return a function with at least one argument, which is used as the key. -function utils.memoize(func) - return setmetatable({}, { - __index = function(self, k, ...) - local v = func(k,...) - self[k] = v - return v - end, - __call = function(self, k) return self[k] end - }) -end - ---- is the object either a function or a callable object?. --- @param obj Object to check. -function utils.is_callable (obj) - return type(obj) == 'function' or getmetatable(obj) and getmetatable(obj).__call -end - ---- is the object of the specified type?. --- If the type is a string, then use type, otherwise compare with metatable --- @param obj An object to check --- @param tp String of what type it should be -function utils.is_type (obj,tp) - if type(tp) == 'string' then return type(obj) == tp end - local mt = getmetatable(obj) - return tp == mt -end - -local fileMT = getmetatable(io.stdout) - ---- a string representation of a type. --- For tables with metatables, we assume that the metatable has a `_name` --- field. Knows about Lua file objects. --- @param obj an object --- @return a string like 'number', 'table' or 'List' -function utils.type (obj) - local t = type(obj) - if t == 'table' or t == 'userdata' then - local mt = getmetatable(obj) - if mt == fileMT then - return 'file' - else - return mt._name or "unknown "..t - end - else - return t - end -end - ---- is this number an integer? --- @param x a number --- @raise error if x is not a number -function utils.is_integer (x) - return math.ceil(x)==x -end - -utils.stdmt = { - List = {_name='List'}, Map = {_name='Map'}, - Set = {_name='Set'}, MultiMap = {_name='MultiMap'} -} - -local _function_factories = {} - ---- associate a function factory with a type. --- A function factory takes an object of the given type and --- returns a function for evaluating it --- @param mt metatable --- @param fun a callable that returns a function -function utils.add_function_factory (mt,fun) - _function_factories[mt] = fun -end - -local function _string_lambda(f) - local raise = utils.raise - if f:find '^|' or f:find '_' then - local args,body = f:match '|([^|]*)|(.+)' - if f:find '_' then - args = '_' - body = f - else - if not args then return raise 'bad string lambda' end - end - local fstr = 'return function('..args..') return '..body..' end' - local fn,err = loadstring(fstr) - if not fn then return raise(err) end - fn = fn() - return fn - else return raise 'not a string lambda' - end -end - ---- an anonymous function as a string. This string is either of the form --- '|args| expression' or is a function of one argument, '_' --- @param lf function as a string --- @return a function --- @usage string_lambda '|x|x+1' (2) == 3 --- @usage string_lambda '_+1 (2) == 3 -utils.string_lambda = utils.memoize(_string_lambda) - -local ops - ---- process a function argument. --- This is used throughout Penlight and defines what is meant by a function: --- Something that is callable, or an operator string as defined by pl.operator, --- such as '>' or '#'. If a function factory has been registered for the type, it will --- be called to get the function. --- @param idx argument index --- @param f a function, operator string, or callable object --- @param msg optional error message --- @return a callable --- @raise if idx is not a number or if f is not callable --- @see utils.is_callable -function utils.function_arg (idx,f,msg) - utils.assert_arg(1,idx,'number') - local tp = type(f) - if tp == 'function' then return f end -- no worries! - -- ok, a string can correspond to an operator (like '==') - if tp == 'string' then - if not ops then ops = require 'pl.operator'.optable end - local fn = ops[f] - if fn then return fn end - local fn, err = utils.string_lambda(f) - if not fn then error(err..': '..f) end - return fn - elseif tp == 'table' or tp == 'userdata' then - local mt = getmetatable(f) - if not mt then error('not a callable object',2) end - local ff = _function_factories[mt] - if not ff then - if not mt.__call then error('not a callable object',2) end - return f - else - return ff(f) -- we have a function factory for this type! - end - end - if not msg then msg = " must be callable" end - if idx > 0 then - error("argument "..idx..": "..msg,2) - else - error(msg,2) - end -end - ---- bind the first argument of the function to a value. --- @param fn a function of at least two values (may be an operator string) --- @param p a value --- @return a function such that f(x) is fn(p,x) --- @raise same as @{function_arg} --- @see pl.func.curry -function utils.bind1 (fn,p) - fn = utils.function_arg(1,fn) - return function(...) return fn(p,...) end -end - ---- assert that the given argument is in fact of the correct type. --- @param n argument index --- @param val the value --- @param tp the type --- @param verify an optional verfication function --- @param msg an optional custom message --- @param lev optional stack position for trace, default 2 --- @raise if the argument n is not the correct type --- @usage assert_arg(1,t,'table') --- @usage assert_arg(n,val,'string',path.isdir,'not a directory') -function utils.assert_arg (n,val,tp,verify,msg,lev) - if type(val) ~= tp then - error(("argument %d expected a '%s', got a '%s'"):format(n,tp,type(val)),2) - end - if verify and not verify(val) then - error(("argument %d: '%s' %s"):format(n,val,msg),lev or 2) - end -end - ---- assert the common case that the argument is a string. --- @param n argument index --- @param val a value that must be a string --- @raise val must be a string -function utils.assert_string (n,val) - utils.assert_arg(n,val,'string',nil,nil,nil,3) -end - -local err_mode = 'default' - ---- control the error strategy used by Penlight. --- Controls how utils.raise works; the default is for it --- to return nil and the error string, but if the mode is 'error' then --- it will throw an error. If mode is 'quit' it will immediately terminate --- the program. --- @param mode - either 'default', 'quit' or 'error' --- @see utils.raise -function utils.on_error (mode) - err_mode = mode -end - ---- used by Penlight functions to return errors. Its global behaviour is controlled --- by utils.on_error --- @param err the error string. --- @see utils.on_error -function utils.raise (err) - if err_mode == 'default' then return nil,err - elseif err_mode == 'quit' then utils.quit(err) - else error(err,2) - end -end - -raise = utils.raise - ---- load a code string or bytecode chunk. --- @param code Lua code as a string or bytecode --- @param name for source errors --- @param mode kind of chunk, 't' for text, 'b' for bytecode, 'bt' for all (default) --- @param env the environment for the new chunk (default nil) --- @return compiled chunk --- @return error message (chunk is nil) --- @function utils.load - - ---- Lua 5.2 Compatible Functions --- @section lua52 - ---- pack an argument list into a table. --- @param ... any arguments --- @return a table with field n set to the length --- @return the length --- @function table.pack - ------- --- return the full path where a Lua module name would be matched. --- @param mod module name, possibly dotted --- @param path a path in the same form as package.path or package.cpath --- @see path.package_path --- @function package.searchpath - -return utils - - diff --git a/Utils/luarocks/share/lua/5.1/pl/xml.lua b/Utils/luarocks/share/lua/5.1/pl/xml.lua deleted file mode 100644 index a452b26a0..000000000 --- a/Utils/luarocks/share/lua/5.1/pl/xml.lua +++ /dev/null @@ -1,676 +0,0 @@ ---- XML LOM Utilities. --- This implements some useful things on LOM documents, such as returned by lxp.lom.parse. --- In particular, it can convert LOM back into XML text, with optional pretty-printing control. --- It's based on stanza.lua from Prosody http://hg.prosody.im/trunk/file/4621c92d2368/util/stanza.lua) --- --- Can be used as a lightweight one-stop-shop for simple XML processing; a simple XML parser is included --- but the default is to use lxp.lom if it can be found. ---
    --- Prosody IM
    --- Copyright (C) 2008-2010 Matthew Wild
    --- Copyright (C) 2008-2010 Waqas Hussain
    ---
    --- classic Lua XML parser by Roberto Ierusalimschy.
    --- modified to output LOM format.
    --- http://lua-users.org/wiki/LuaXml
    --- 
    --- @module pl.xml - -local t_insert = table.insert; -local t_concat = table.concat; -local t_remove = table.remove; -local s_format = string.format; -local s_match = string.match; -local tostring = tostring; -local setmetatable = setmetatable; -local getmetatable = getmetatable; -local pairs = pairs; -local ipairs = ipairs; -local type = type; -local next = next; -local print = print; -local unpack = unpack or table.unpack; -local s_gsub = string.gsub; -local s_char = string.char; -local s_find = string.find; -local os = os; -local pcall,require,io = pcall,require,io -local split = require 'pl.utils'.split - -local _M = {} -local Doc = { __type = "doc" }; -Doc.__index = Doc; - ---- create a new document node. --- @param tag the tag name --- @param attr optional attributes (table of name-value pairs) -function _M.new(tag, attr) - local doc = { tag = tag, attr = attr or {}, last_add = {}}; - return setmetatable(doc, Doc); -end - ---- parse an XML document. By default, this uses lxp.lom.parse, but --- falls back to basic_parse, or if use_basic is true --- @param text_or_file file or string representation --- @param is_file whether text_or_file is a file name or not --- @param use_basic do a basic parse --- @return a parsed LOM document with the document metatatables set --- @return nil, error the error can either be a file error or a parse error -function _M.parse(text_or_file, is_file, use_basic) - local parser,status,lom - if use_basic then parser = _M.basic_parse - else - status,lom = pcall(require,'lxp.lom') - if not status then parser = _M.basic_parse else parser = lom.parse end - end - if is_file then - local f,err = io.open(text_or_file) - if not f then return nil,err end - text_or_file = f:read '*a' - f:close() - end - local doc,err = parser(text_or_file) - if not doc then return nil,err end - if lom then - _M.walk(doc,false,function(_,d) - setmetatable(d,Doc) - end) - end - return doc -end - ----- convenient function to add a document node, This updates the last inserted position. --- @param tag a tag name --- @param attrs optional set of attributes (name-string pairs) -function Doc:addtag(tag, attrs) - local s = _M.new(tag, attrs); - (self.last_add[#self.last_add] or self):add_direct_child(s); - t_insert(self.last_add, s); - return self; -end - ---- convenient function to add a text node. This updates the last inserted position. --- @param text a string -function Doc:text(text) - (self.last_add[#self.last_add] or self):add_direct_child(text); - return self; -end - ----- go up one level in a document -function Doc:up() - t_remove(self.last_add); - return self; -end - -function Doc:reset() - local last_add = self.last_add; - for i = 1,#last_add do - last_add[i] = nil; - end - return self; -end - ---- append a child to a document directly. --- @param child a child node (either text or a document) -function Doc:add_direct_child(child) - t_insert(self, child); -end - ---- append a child to a document at the last element added --- @param child a child node (either text or a document) -function Doc:add_child(child) - (self.last_add[#self.last_add] or self):add_direct_child(child); - return self; -end - ---accessing attributes: useful not to have to expose implementation (attr) ---but also can allow attr to be nil in any future optimizations - ---- set attributes of a document node. --- @param t a table containing attribute/value pairs -function Doc:set_attribs (t) - for k,v in pairs(t) do - self.attr[k] = v - end -end - ---- set a single attribute of a document node. --- @param a attribute --- @param v its value -function Doc:set_attrib(a,v) - self.attr[a] = v -end - ---- access the attributes of a document node. -function Doc:get_attribs() - return self.attr -end - ---- function to create an element with a given tag name and a set of children. --- @param tag a tag name --- @param items either text or a table where the hash part is the attributes and the list part is the children. -function _M.elem(tag,items) - local s = _M.new(tag) - if type(items) == 'string' then items = {items} end - if _M.is_tag(items) then - t_insert(s,items) - elseif type(items) == 'table' then - for k,v in pairs(items) do - if type(k) == 'string' then - s.attr[k] = v - t_insert(s.attr,k) - else - s[k] = v - end - end - end - return s -end - ---- given a list of names, return a number of element constructors. --- @param list a list of names, or a comma-separated string. --- @usage local parent,children = doc.tags 'parent,children'
    --- doc = parent {child 'one', child 'two'} -function _M.tags(list) - local ctors = {} - local elem = _M.elem - if type(list) == 'string' then list = split(list,'%s*,%s*') end - for _,tag in ipairs(list) do - local ctor = function(items) return _M.elem(tag,items) end - t_insert(ctors,ctor) - end - return unpack(ctors) -end - -local templ_cache = {} - -local function is_data(data) - return #data == 0 or type(data[1]) ~= 'table' -end - -local function prepare_data(data) - -- a hack for ensuring that $1 maps to first element of data, etc. - -- Either this or could change the gsub call just below. - for i,v in ipairs(data) do - data[tostring(i)] = v - end -end - ---- create a substituted copy of a document, --- @param templ may be a document or a string representation which will be parsed and cached --- @param data a table of name-value pairs or a list of such tables --- @return an XML document -function Doc.subst(templ, data) - if type(data) ~= 'table' or not next(data) then return nil, "data must be a non-empty table" end - if is_data(data) then - prepare_data(data) - end - if type(templ) == 'string' then - if templ_cache[templ] then - templ = templ_cache[templ] - else - local str,err = templ - templ,err = _M.parse(str) - if not templ then return nil,err end - templ_cache[str] = templ - end - end - local function _subst(item) - return _M.clone(templ,function(s) - return s:gsub('%$(%w+)',item) - end) - end - if is_data(data) then return _subst(data) end - local list = {} - for _,item in ipairs(data) do - prepare_data(item) - t_insert(list,_subst(item)) - end - if data.tag then - list = _M.elem(data.tag,list) - end - return list -end - - ---- get the first child with a given tag name. --- @param tag the tag name -function Doc:child_with_name(tag) - for _, child in ipairs(self) do - if child.tag == tag then return child; end - end -end - -local _children_with_name -function _children_with_name(self,tag,list,recurse) - for _, child in ipairs(self) do if type(child) == 'table' then - if child.tag == tag then t_insert(list,child) end - if recurse then _children_with_name(child,tag,list,recurse) end - end end -end - ---- get all elements in a document that have a given tag. --- @param tag a tag name --- @param dont_recurse optionally only return the immediate children with this tag name --- @return a list of elements -function Doc:get_elements_with_name(tag,dont_recurse) - local res = {} - _children_with_name(self,tag,res,not dont_recurse) - return res -end - --- iterate over all children of a document node, including text nodes. -function Doc:children() - local i = 0; - return function (a) - i = i + 1 - return a[i]; - end, self, i; -end - --- return the first child element of a node, if it exists. -function Doc:first_childtag() - if #self == 0 then return end - for _,t in ipairs(self) do - if type(t) == 'table' then return t end - end -end - -function Doc:matching_tags(tag, xmlns) - xmlns = xmlns or self.attr.xmlns; - local tags = self; - local start_i, max_i = 1, #tags; - return function () - for i=start_i,max_i do - v = tags[i]; - if (not tag or v.tag == tag) - and (not xmlns or xmlns == v.attr.xmlns) then - start_i = i+1; - return v; - end - end - end, tags, i; -end - ---- iterate over all child elements of a document node. -function Doc:childtags() - local i = 0; - return function (a) - local v - repeat - i = i + 1 - v = self[i] - if v and type(v) == 'table' then return v; end - until not v - end, self[1], i; -end - ---- visit child element of a node and call a function, possibility modifying the document. --- @param callback a function passed the node (text or element). If it returns nil, that node will be removed. --- If it returns a value, that will replace the current node. -function Doc:maptags(callback) - local is_tag = _M.is_tag - local i = 1; - while i <= #self do - if is_tag(self[i]) then - local ret = callback(self[i]); - if ret == nil then - t_remove(self, i); - else - self[i] = ret; - i = i + 1; - end - end - end - return self; -end - -local xml_escape -do - local escape_table = { ["'"] = "'", ["\""] = """, ["<"] = "<", [">"] = ">", ["&"] = "&" }; - function xml_escape(str) return (s_gsub(str, "['&<>\"]", escape_table)); end - _M.xml_escape = xml_escape; -end - --- pretty printing --- if indent, then put each new tag on its own line --- if attr_indent, put each new attribute on its own line -local function _dostring(t, buf, self, xml_escape, parentns, idn, indent, attr_indent) - local nsid = 0; - local tag = t.tag - local lf,alf = ""," " - if indent then lf = '\n'..idn end - if attr_indent then alf = '\n'..idn..attr_indent end - t_insert(buf, lf.."<"..tag); - for k, v in pairs(t.attr) do - if type(k) ~= 'number' then -- LOM attr table has list-like part - if s_find(k, "\1", 1, true) then - local ns, attrk = s_match(k, "^([^\1]*)\1?(.*)$"); - nsid = nsid + 1; - t_insert(buf, " xmlns:ns"..nsid.."='"..xml_escape(ns).."' ".."ns"..nsid..":"..attrk.."='"..xml_escape(v).."'"); - elseif not(k == "xmlns" and v == parentns) then - t_insert(buf, alf..k.."='"..xml_escape(v).."'"); - end - end - end - local len,has_children = #t; - if len == 0 then - local out = "/>" - if attr_indent then out = '\n'..idn..out end - t_insert(buf, out); - else - t_insert(buf, ">"); - for n=1,len do - local child = t[n]; - if child.tag then - self(child, buf, self, xml_escape, t.attr.xmlns,idn and idn..indent, indent, attr_indent ); - has_children = true - else -- text element - t_insert(buf, xml_escape(child)); - end - end - t_insert(buf, (has_children and lf or '')..""); - end -end - ----- pretty-print an XML document ---- @param t an XML document ---- @param idn an initial indent (indents are all strings) ---- @param indent an indent for each level ---- @param attr_indent if given, indent each attribute pair and put on a separate line ---- @return a string representation -function _M.tostring(t,idn,indent, attr_indent) - local buf = {}; - _dostring(t, buf, _dostring, xml_escape, nil,idn,indent, attr_indent); - return t_concat(buf); -end - -Doc.__tostring = _M.tostring - ---- get the full text value of an element -function Doc:get_text() - local res = {} - for i,el in ipairs(self) do - if type(el) == 'string' then t_insert(res,el) end - end - return t_concat(res); -end - ---- make a copy of a document --- @param doc the original document --- @param strsubst an optional function for handling string copying which could do substitution, etc. -function _M.clone(doc, strsubst) - local lookup_table = {}; - local function _copy(object) - if type(object) ~= "table" then - if strsubst and type(object) == 'string' then return strsubst(object) - else return object; - end - elseif lookup_table[object] then - return lookup_table[object]; - end - local new_table = {}; - lookup_table[object] = new_table; - for index, value in pairs(object) do - new_table[_copy(index)] = _copy(value); -- is cloning keys much use, hm? - end - return setmetatable(new_table, getmetatable(object)); - end - - return _copy(doc) -end - ---- compare two documents. --- @param t1 any value --- @param t2 any value -function _M.compare(t1,t2) - local ty1 = type(t1) - local ty2 = type(t2) - if ty1 ~= ty2 then return false, 'type mismatch' end - if ty1 == 'string' then - return t1 == t2 and true or 'text '..t1..' ~= text '..t2 - end - if ty1 ~= 'table' or ty2 ~= 'table' then return false, 'not a document' end - if t1.tag ~= t2.tag then return false, 'tag '..t1.tag..' ~= tag '..t2.tag end - if #t1 ~= #t2 then return false, 'size '..#t1..' ~= size '..#t2..' for tag '..t1.tag end - -- compare attributes - for k,v in pairs(t1.attr) do - if t2.attr[k] ~= v then return false, 'mismatch attrib' end - end - for k,v in pairs(t2.attr) do - if t1.attr[k] ~= v then return false, 'mismatch attrib' end - end - -- compare children - for i = 1,#t1 do - local yes,err = _M.compare(t1[i],t2[i]) - if not yes then return err end - end - return true -end - ---- is this value a document element? --- @param d any value -function _M.is_tag(d) - return type(d) == 'table' and type(d.tag) == 'string' -end - ---- call the desired function recursively over the document. --- @param doc the document --- @param depth_first visit child notes first, then the current node --- @param operation a function which will receive the current tag name and current node. -function _M.walk (doc, depth_first, operation) - if not depth_first then operation(doc.tag,doc) end - for _,d in ipairs(doc) do - if _M.is_tag(d) then - _M.walk(d,depth_first,operation) - end - end - if depth_first then operation(doc.tag,doc) end -end - -local escapes = { quot = "\"", apos = "'", lt = "<", gt = ">", amp = "&" } -local function unescape(str) return (str:gsub( "&(%a+);", escapes)); end - -local function parseargs(s) - local arg = {} - s:gsub("([%w:]+)%s*=%s*([\"'])(.-)%2", function (w, _, a) - arg[w] = unescape(a) - end) - return arg -end - ---- Parse a simple XML document using a pure Lua parser based on Robero Ierusalimschy's original version. --- @param s the XML document to be parsed. --- @param all_text if true, preserves all whitespace. Otherwise only text containing non-whitespace is included. -function _M.basic_parse(s,all_text) - local t_insert,t_remove = table.insert,table.remove - local s_find,s_sub = string.find,string.sub - local stack = {} - local top = {} - t_insert(stack, top) - local ni,c,label,xarg, empty - local i, j = 1, 1 - -- we're not interested in - local _,istart = s_find(s,'^%s*<%?[^%?]+%?>%s*') - if istart then i = istart+1 end - while true do - ni,j,c,label,xarg, empty = s_find(s, "<(%/?)([%w:%-_]+)(.-)(%/?)>", i) - if not ni then break end - local text = s_sub(s, i, ni-1) - if all_text or not s_find(text, "^%s*$") then - t_insert(top, unescape(text)) - end - if empty == "/" then -- empty element tag - t_insert(top, setmetatable({tag=label, attr=parseargs(xarg), empty=1},Doc)) - elseif c == "" then -- start tag - top = setmetatable({tag=label, attr=parseargs(xarg)},Doc) - t_insert(stack, top) -- new level - else -- end tag - local toclose = t_remove(stack) -- remove top - top = stack[#stack] - if #stack < 1 then - error("nothing to close with "..label) - end - if toclose.tag ~= label then - error("trying to close "..toclose.tag.." with "..label) - end - t_insert(top, toclose) - end - i = j+1 - end - local text = s_sub(s, i) - if all_text or not s_find(text, "^%s*$") then - t_insert(stack[#stack], unescape(text)) - end - if #stack > 1 then - error("unclosed "..stack[#stack].tag) - end - local res = stack[1] - return type(res[1])=='string' and res[2] or res[1] -end - -local function empty(attr) return not attr or not next(attr) end -local function is_text(s) return type(s) == 'string' end -local function is_element(d) return type(d) == 'table' and d.tag ~= nil end - --- returns the key,value pair from a table if it has exactly one entry -local function has_one_element(t) - local key,value = next(t) - if next(t,key) ~= nil then return false end - return key,value -end - -local function append_capture(res,tbl) - if not empty(tbl) then -- no point in capturing empty tables... - local key - if tbl._ then -- if $_ was set then it is meant as the top-level key for the captured table - key = tbl._ - tbl._ = nil - if empty(tbl) then return end - end - -- a table with only one pair {[0]=value} shall be reduced to that value - local numkey,val = has_one_element(tbl) - if numkey == 0 then tbl = val end - if key then - res[key] = tbl - else -- otherwise, we append the captured table - t_insert(res,tbl) - end - end -end - -local function make_number(pat) - if pat:find '^%d+$' then -- $1 etc means use this as an array location - pat = tonumber(pat) - end - return pat -end - -local function capture_attrib(res,pat,value) - pat = make_number(pat:sub(2)) - res[pat] = value - return true -end - -local match -function match(d,pat,res,keep_going) - local ret = true - if d == nil then return false end - -- attribute string matching is straight equality, except if the pattern is a $ capture, - -- which always succeeds. - if type(d) == 'string' then - if type(pat) ~= 'string' then return false end - if _M.debug then print(d,pat) end - if pat:find '^%$' then - return capture_attrib(res,pat,d) - else - return d == pat - end - else - if _M.debug then print(d.tag,pat.tag) end - -- this is an element node. For a match to succeed, the attributes must - -- match as well. - -- a tagname in the pattern ending with '-' is a wildcard and matches like an attribute - local tagpat = pat.tag:match '^(.-)%-$' - if tagpat then - tagpat = make_number(tagpat) - res[tagpat] = d.tag - end - if d.tag == pat.tag or tagpat then - - if not empty(pat.attr) then - if empty(d.attr) then ret = false - else - for prop,pval in pairs(pat.attr) do - local dval = d.attr[prop] - if not match(dval,pval,res) then ret = false; break end - end - end - end - -- the pattern may have child nodes. We match partially, so that {P1,P2} shall match {X,P1,X,X,P2,..} - if ret and #pat > 0 then - local i,j = 1,1 - local function next_elem() - j = j + 1 -- next child element of data - if is_text(d[j]) then j = j + 1 end - return j <= #d - end - repeat - local p = pat[i] - -- repeated {{<...>}} patterns shall match one or more elements - -- so e.g. {P+} will match {X,X,P,P,X,P,X,X,X} - if is_element(p) and p.repeated then - local found - repeat - local tbl = {} - ret = match(d[j],p,tbl,false) - if ret then - found = false --true - append_capture(res,tbl) - end - until not next_elem() or (found and not ret) - i = i + 1 - else - ret = match(d[j],p,res,false) - if ret then i = i + 1 end - end - until not next_elem() or i > #pat -- run out of elements or patterns to match - -- if every element in our pattern matched ok, then it's been a successful match - if i > #pat then return true end - end - if ret then return true end - else - ret = false - end - -- keep going anyway - look at the children! - if keep_going then - for child in d:childtags() do - ret = match(child,pat,res,keep_going) - if ret then break end - end - end - end - return ret -end - -function Doc:match(pat) - if is_text(pat) then - pat = _M.parse(pat,false,true) - end - _M.walk(pat,false,function(_,d) - if is_text(d[1]) and is_element(d[2]) and is_text(d[3]) and - d[1]:find '%s*{{' and d[3]:find '}}%s*' then - t_remove(d,1) - t_remove(d,2) - d[1].repeated = true - end - end) - - local res = {} - local ret = match(self,pat,res,true) - return res,ret -end - - -return _M - diff --git a/Utils/luarocks/share/lua/5.1/template/file.lua b/Utils/luarocks/share/lua/5.1/template/file.lua deleted file mode 100644 index e562c9d55..000000000 --- a/Utils/luarocks/share/lua/5.1/template/file.lua +++ /dev/null @@ -1,106 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -return[[# -
    -# -- -# -- Module name -# -- -# if _file.name then - Module $(_file.name) -# end -# -- -# -- Descriptions -# -- -# if _file.shortdescription then - $( format(_file.shortdescription) ) -# end -# if _file.description and #_file.description > 0 then - $( format(_file.description) ) -# end -# -- -# -- Handle "@usage" special tag -# -- -#if _file.metadata and _file.metadata.usage then - $( applytemplate(_file.metadata.usage, i+1) ) -#end -# -- -# -- Show quick description of current type -# -- -# -# -- show quick description for globals -# if not isempty(_file.globalvars) then - Global(s) - -# for _, item in sortedpairs(_file.globalvars) do - - - - -# end -
    $( fulllinkto(item) )$( format(item.shortdescription) )
    -# end -# -# -- get type corresponding to this file (module) -# local currenttype -# local typeref = _file:moduletyperef() -# if typeref and typeref.tag == "internaltyperef" then -# local typedef = _file.types[typeref.typename] -# if typedef and typedef.tag == "recordtypedef" then -# currenttype = typedef -# end -# end -# -# -- show quick description type exposed by module -# if currenttype and not isempty(currenttype.fields) then - Type $(currenttype.name) - $( applytemplate(currenttype, i+2, 'index') ) -# end -# -- -# -- Show quick description of other types -# -- -# if _file.types then -# for name, type in sortedpairs( _file.types ) do -# if type ~= currenttype and type.tag == 'recordtypedef' and not isempty(type.fields) then - Type $(name) - $( applytemplate(type, i+2, 'index') ) -# end -# end -# end -# -- -# -- Long description of globals -# -- -# if not isempty(_file.globalvars) then - Global(s) -# for name, item in sortedpairs(_file.globalvars) do - $( applytemplate(item, i+2) ) -# end -# end -# -- -# -- Long description of current type -# -- -# if currenttype then - Type $(currenttype.name) - $( applytemplate(currenttype, i+2) ) -# end -# -- -# -- Long description of other types -# -- -# if not isempty( _file.types ) then -# for name, type in sortedpairs( _file.types ) do -# if type ~= currenttype and type.tag == 'recordtypedef' then - Type $(name) - $( applytemplate(type, i+2) ) -# end -# end -# end -
    -]] diff --git a/Utils/luarocks/share/lua/5.1/template/index.lua b/Utils/luarocks/share/lua/5.1/template/index.lua deleted file mode 100644 index 555c2d373..000000000 --- a/Utils/luarocks/share/lua/5.1/template/index.lua +++ /dev/null @@ -1,28 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -return -[[# -#if _index.modules then -
    -

    Module$( #_index.modules > 1 and 's' )

    - -# for _, module in sortedpairs( _index.modules ) do -# if module.tag ~= 'index' then - - - - -# end -# end -
    $( fulllinkto(module) )$( module.description and format(module.shortdescription) )
    -
    -#end ]] diff --git a/Utils/luarocks/share/lua/5.1/template/index/recordtypedef.lua b/Utils/luarocks/share/lua/5.1/template/index/recordtypedef.lua deleted file mode 100644 index 8dfdbc4ce..000000000 --- a/Utils/luarocks/share/lua/5.1/template/index/recordtypedef.lua +++ /dev/null @@ -1,23 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -return [[# -# if not isempty(_recordtypedef.fields) then - -# for _, item in sortedpairs( _recordtypedef.fields ) do - - - - -# end -
    $( fulllinkto(item) )$( format(item.shortdescription) )
    -# end -# ]] diff --git a/Utils/luarocks/share/lua/5.1/template/item.lua b/Utils/luarocks/share/lua/5.1/template/item.lua deleted file mode 100644 index 122006185..000000000 --- a/Utils/luarocks/share/lua/5.1/template/item.lua +++ /dev/null @@ -1,167 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -return -[[
    -
    -# -- -# -- Resolve item type definition -# -- -# local typedef = _item:resolvetype() - -# -- -# -- Show item type for internal type -# -- -#if _item.type and (not typedef or typedef.tag ~= 'functiontypedef') then -# --Show link only when available -# local link = fulllinkto(_item.type) -# if link then - $( link ) -# else - $(prettyname(_item.type)) -# end -#end - -$( prettyname(_item) ) - -
    -
    -# if _item.shortdescription then - $( format(_item.shortdescription) ) -# end -# if _item.description and #_item.description > 0 then - $( format(_item.description) ) -# end -# -# -- -# -- For function definitions, describe parameters and return values -# -- -#if typedef and typedef.tag == 'functiontypedef' then -# -- -# -- Describe parameters -# -- -# local fdef = typedef -# -# -- Adjust parameter count if first one is 'self' -# local paramcount -# if #fdef.params > 0 and isinvokable(_item) then -# paramcount = #fdef.params - 1 -# else -# paramcount = #fdef.params -# end -# -# -- List parameters -# if paramcount > 0 then - Parameter$( paramcount > 1 and 's' ) -
      -# for position, param in ipairs( fdef.params ) do -# if not (position == 1 and isinvokable(_item)) then -
    • -# local paramline = "" -# if param.type then -# local link = linkto( param.type ) -# local name = prettyname( param.type ) -# if link then -# paramline = paramline .. '' .. name .. "" -# else -# paramline = paramline .. name -# end -# end -# -# paramline = paramline .. " " .. param.name .. " " -# -# if param.optional then -# paramline = paramline .. "optional" .. " " -# end -# if param.hidden then -# paramline = paramline .. "hidden" -# end -# -# paramline = paramline .. ": " -# -# if param.description and #param.description > 0 then -# paramline = paramline .. "\n" .. param.description -# end -# - $( format (paramline)) -
    • -# end -# end -
    -# end -# -# -- -# -- Describe returns types -# -- -# if fdef and #fdef.returns > 0 then - Return value$(#fdef.returns > 1 and 's') -# -- -# -- Format nice type list -# -- -# local function niceparmlist( parlist ) -# local typelist = {} -# for position, type in ipairs(parlist) do -# local link = linkto( type ) -# local name = prettyname( type ) -# if link then -# typelist[#typelist + 1] = ''..name..'' -# else -# typelist[#typelist + 1] = name -# end -# -- Append end separator or separating comma -# typelist[#typelist + 1] = position == #parlist and ':' or ', ' -# end -# return table.concat( typelist ) -# end -# -- -# -- Generate a list if they are several return clauses -# -- -# if #fdef.returns > 1 then -
      -# for position, ret in ipairs(fdef.returns) do -
    1. -# local returnline = ""; -# -# local paramlist = niceparmlist(ret.types) -# if #ret.types > 0 and #paramlist > 0 then -# returnline = "" .. paramlist .. "" -# end -# returnline = returnline .. "\n" .. ret.description - $( format (returnline)) -
    2. -# end -
    -# else -# local paramlist = niceparmlist(fdef.returns[1].types) -# local isreturn = fdef.returns and #fdef.returns > 0 and #paramlist > 0 -# local isdescription = fdef.returns and fdef.returns[1].description and #format(fdef.returns[1].description) > 0 -# -# local returnline = ""; -# -- Show return type if provided -# if isreturn then -# returnline = ""..paramlist.."" -# end -# if isdescription then -# returnline = returnline .. "\n" .. fdef.returns[1].description -# end - $( format(returnline)) -# end -# end -#end -# -#-- -#-- Show usage samples -#-- -#if _item.metadata and _item.metadata.usage then - $( applytemplate(_item.metadata.usage, i) ) -#end -
    -
    ]] diff --git a/Utils/luarocks/share/lua/5.1/template/page.lua b/Utils/luarocks/share/lua/5.1/template/page.lua deleted file mode 100644 index 32e1957c4..000000000 --- a/Utils/luarocks/share/lua/5.1/template/page.lua +++ /dev/null @@ -1,68 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -return -[[ - -#if _page.headers and #_page.headers > 0 then - -# for _, header in ipairs(_page.headers) do - $(header) -# end - -#end - -
    -
    - -
    -
    -
    -
    -# -- -# -- Generating lateral menu -# -- - - $( applytemplate(_page.currentmodule) ) -
    - - -]] diff --git a/Utils/luarocks/share/lua/5.1/template/recordtypedef.lua b/Utils/luarocks/share/lua/5.1/template/recordtypedef.lua deleted file mode 100644 index 758f1e0b0..000000000 --- a/Utils/luarocks/share/lua/5.1/template/recordtypedef.lua +++ /dev/null @@ -1,36 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -return [[# -# -- -# -- Descriptions -# -- -#if _recordtypedef.shortdescription and #_recordtypedef.shortdescription > 0 then - $( format( _recordtypedef.shortdescription ) ) -#end -#if _recordtypedef.description and #_recordtypedef.description > 0 then - $( format( _recordtypedef.description ) ) -#end -#-- -#-- Describe usage -#-- -#if _recordtypedef.metadata and _recordtypedef.metadata.usage then - $( applytemplate(_recordtypedef.metadata.usage, i) ) -#end -# -- -# -- Describe type fields -# -- -#if not isempty( _recordtypedef.fields ) then - Field(s) -# for name, item in sortedpairs( _recordtypedef.fields ) do - $( applytemplate(item, i) ) -# end -#end ]] diff --git a/Utils/luarocks/share/lua/5.1/template/usage.lua b/Utils/luarocks/share/lua/5.1/template/usage.lua deleted file mode 100644 index 93a8c7148..000000000 --- a/Utils/luarocks/share/lua/5.1/template/usage.lua +++ /dev/null @@ -1,33 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Marc AUBRY --- - initial API and implementation --------------------------------------------------------------------------------- -return[[# -#-- -#-- Show usage samples -#-- -#if _usage then -# if #_usage > 1 then -# -- Show all usages - Usages: -
      -# -- Loop over several usage description -# for _, usage in ipairs(_usage) do -
    • $( securechevrons(usage.description) )
    • -# end -
    -# elseif #_usage == 1 then -# -- Show unique usage sample - Usage: -# local usage = _usage[1] -
    $( securechevrons(usage.description) )
    -# end -#end -#]] diff --git a/Utils/luarocks/share/lua/5.1/template/utils.lua b/Utils/luarocks/share/lua/5.1/template/utils.lua deleted file mode 100644 index f2fd01f40..000000000 --- a/Utils/luarocks/share/lua/5.1/template/utils.lua +++ /dev/null @@ -1,470 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -local apimodel = require 'models.apimodel' - ---- --- @module docutils --- Handles link generation, node quick description. --- --- Provides: --- * link generation --- * anchor generation --- * node quick description -local M = {} - -function M.isempty(map) - local f = pairs(map) - return f(map) == nil -end - ---- --- Provide a handling function for all supported anchor types --- recordtypedef => #(typename) --- item (field of recordtypedef) => #(typename).itemname --- item (global) => itemname -M.anchortypes = { - recordtypedef = function (o) return string.format('#(%s)', o.name) end, - item = function(o) - if not o.parent or o.parent.tag == 'file' then - -- Handle items referencing globals - return o.name - elseif o.parent and o.parent.tag == 'recordtypedef' then - -- Handle items included in recordtypedef - local recordtypedef = o.parent - local recordtypedefanchor = M.anchor(recordtypedef) - if not recordtypedefanchor then - return nil, 'Unable to generate anchor for `recordtypedef parent.' - end - return string.format('%s.%s', recordtypedefanchor, o.name) - end - return nil, 'Unable to generate anchor for `item' - end -} - ---- --- Provides anchor string for an object of API mode --- --- @function [parent = #docutils] anchor --- @param modelobject Object form API model --- @result #string Anchor for an API model object, this function __may rise an error__ --- @usage # -- In a template --- # local anchorname = anchor(someobject) --- -function M.anchor( modelobject ) - local tag = modelobject.tag - if M.anchortypes[ tag ] then - return M.anchortypes[ tag ](modelobject) - end - return nil, string.format('No anchor available for `%s', tag) -end - -local function getexternalmodule( item ) - -- Get file which contains this item - local file - if item.parent then - if item.parent.tag =='recordtypedef' then - local recordtypedefparent = item.parent.parent - if recordtypedefparent and recordtypedefparent.tag =='file'then - file = recordtypedefparent - end - elseif item.parent.tag =='file' then - file = item.parent - else - return nil, 'Unable to fetch item parent' - end - end - return file -end - ---- --- Provide a handling function for all supported link types --- --- internaltyperef => ##(typename) --- => #anchor(recordtyperef) --- externaltyperef => modulename.html##(typename) --- => linkto(file)#anchor(recordtyperef) --- file(module) => modulename.html --- index => index.html --- recordtypedef => ##(typename) --- => #anchor(recordtyperef) --- item (internal field of recordtypedef) => ##(typename).itemname --- => #anchor(item) --- item (internal global) => #itemname --- => #anchor(item) --- item (external field of recordtypedef) => modulename.html##(typename).itemname --- => linkto(file)#anchor(item) --- item (externalglobal) => modulename.html#itemname --- => linkto(file)#anchor(item) -M.linktypes = { - internaltyperef = function(o) return string.format('##(%s)', o.typename) end, - externaltyperef = function(o) return string.format('%s.html##(%s)', o.modulename, o.typename) end, - file = function(o) return string.format('%s.html', o.name) end, - index = function() return 'index.html' end, - recordtypedef = function(o) - local anchor = M.anchor(o) - if not anchor then - return nil, 'Unable to generate anchor for `recordtypedef.' - end - return string.format('#%s', anchor) - end, - item = function(o) - - -- For every item get anchor - local anchor = M.anchor(o) - if not anchor then - return nil, 'Unable to generate anchor for `item.' - end - - -- Built local link to item - local linktoitem = string.format('#%s', anchor) - - -- - -- For external item, prefix with the link to the module. - -- - -- The "external item" concept is used only here for short/embedded - -- notation purposed. This concept and the `.external` field SHALL NOT - -- be used elsewhere. - -- - if o.external then - - -- Get link to file which contains this item - local file = getexternalmodule( o ) - local linktofile = file and M.linkto( file ) - if not linktofile then - return nil, 'Unable to generate link for external `item.' - end - - -- Built external link to item - linktoitem = string.format("%s%s", linktofile, linktoitem) - end - - return linktoitem - end -} - ---- --- Generates text for HTML links from API model element --- --- @function [parent = #docutils] --- @param modelobject Object form API model --- @result #string Links text for an API model element, this function __may rise an error__. --- @usage # -- In a template --- Some text -function M.linkto( apiobject ) - local tag = apiobject.tag - if M.linktypes[ tag ] then - return M.linktypes[tag](apiobject) - end - if not tag then - return nil, 'Link generation is impossible as no tag has been provided.' - end - return nil, string.format('No link generation available for `%s.', tag) -end - ---- --- Provide a handling function for all supported pretty name types --- primitivetyperef => #typename --- internaltyperef => #typename --- externaltyperef => modulename#typename --- file(module) => modulename --- index => index --- recordtypedef => typename --- item (internal function of recordtypedef) => typename.itemname(param1, param2,...) --- item (internal func with self of recordtypedef) => typename:itemname(param2) --- item (internal non func field of recordtypedef) => typename.itemname --- item (internal func global) => functionname(param1, param2,...) --- item (internal non func global) => itemname --- item (external function of recordtypedef) => modulename#typename.itemname(param1, param2,...) --- item (external func with self of recordtypedef) => modulename#typename:itemname(param2) --- item (external non func field of recordtypedef) => modulename#typename.itemname --- item (external func global) => functionname(param1, param2,...) --- item (external non func global) => itemname -M.prettynametypes = { - primitivetyperef = function(o) return string.format('#%s', o.typename) end, - externaltyperef = function(o) return string.format('%s#%s', o.modulename, o.typename) end, - index = function(o) return "index" end, - file = function(o) return o.name end, - recordtypedef = function(o) return o.name end, - item = function( o ) - - -- Determine item name - -- ---------------------- - local itemname = o.name - - -- Determine scope - -- ---------------------- - local parent = o.parent - local isglobal = parent and parent.tag == 'file' - local isfield = parent and parent.tag == 'recordtypedef' - - -- Determine type name - -- ---------------------- - - local typename = isfield and parent.name - - -- Fetch item definition - -- ---------------------- - -- Get file object - local file - if isglobal then - file = parent - elseif isfield then - file = parent.parent - end - -- Get definition - local definition = o:resolvetype (file) - - - - -- Build prettyname - -- ---------------------- - local prettyname - if not definition or definition.tag ~= 'functiontypedef' then - -- Fields - if isglobal or not typename then - prettyname = itemname - else - prettyname = string.format('%s.%s', typename, itemname) - end - else - -- Functions - -- Build parameter list - local paramlist = {} - local isinvokable = M.isinvokable(o) - for position, param in ipairs(definition.params) do - -- For non global function, when first parameter is 'self', - -- it will not be part of listed parameters - if not (position == 1 and isinvokable and isfield) then - table.insert(paramlist, param.name) - if position ~= #definition.params then - table.insert(paramlist, ', ') - end - end - end - - if isglobal or not typename then - prettyname = string.format('%s(%s)',itemname, table.concat(paramlist)) - else - -- Determine function prefix operator, - -- ':' if 'self' is first parameter, '.' else way - local operator = isinvokable and ':' or '.' - - -- Append function parameters - prettyname = string.format('%s%s%s(%s)',typename, operator, itemname, table.concat(paramlist)) - end - end - - -- Manage external Item prettyname - -- ---------------------- - local externalmodule = o.external and getexternalmodule( o ) - local externalmodulename = externalmodule and externalmodule.name - - if externalmodulename then - return string.format('%s#%s',externalmodulename,prettyname) - else - return prettyname - end - end -} -M.prettynametypes.internaltyperef = M.prettynametypes.primitivetyperef - ---- --- Check if the given item is a function that can be invoked -function M.isinvokable(item) - --test if the item is global - if item.parent and item.parent.tag == 'file' then - return false - end - -- check first param - local definition = item:resolvetype() - if definition and definition.tag == 'functiontypedef' then - if (#definition.params > 0) then - return definition.params[1].name == 'self' - end - end -end - ---- --- Provide human readable overview from an API model element --- --- Resolve all element needed to summurize nicely an element form API model. --- @usage $ print( prettyname(item) ) --- module:somefunction(secondparameter) --- @function [parent = #docutils] --- @param apiobject Object form API model --- @result #string Human readable description of given element. --- @result #nil, #string In case of error. -function M.prettyname( apiobject ) - local tag = apiobject.tag - if M.prettynametypes[tag] then - return M.prettynametypes[tag](apiobject) - elseif not tag then - return nil, 'No pretty name available as no tag has been provided.' - end - return nil, string.format('No pretty name for `%s.', tag) -end - ---- --- Just make a string print table in HTML. --- @function [parent = #docutils] securechevrons --- @param #string String to convert. --- @usage securechevrons('') => '<markup>' --- @return #string Converted string. -function M.securechevrons( str ) - if not str then return nil, 'String expected.' end - return string.gsub(str:gsub('<', '<'), '>', '>') -end - -------------------------------------------------------------------------------- --- Handling format of @{some#type} tag. --- Following functions enable to recognize several type of references between --- "{}". -------------------------------------------------------------------------------- - ---- --- Provide API Model elements from string describing global elements --- such as: --- * `global#foo` --- * `foo#global.bar` -local globals = function(str) - -- Handling globals from modules - for modulename, fieldname in str:gmatch('([%a%.%d_]+)#global%.([%a%.%d_]+)') do - local item = apimodel._item(fieldname) - local file = apimodel._file() - file.name = modulename - file:addglobalvar( item ) - return item - end - -- Handling other globals - for name in str:gmatch('global#([%a%.%d_]+)') do - -- print("globale", name) - return apimodel._externaltypref('global', name) - end - return nil -end - ---- --- Transform a string like `module#(type).field` in an API Model item -local field = function( str ) - - -- Match `module#type.field` - local mod, typename, fieldname = str:gmatch('([%a%.%d_]*)#([%a%.%d_]+)%.([%a%.%d_]+)')() - - -- Try matching `module#(type).field` - if not mod then - mod, typename, fieldname = str:gmatch('([%a%.%d_]*)#%(([%a%.%d_]+)%)%.([%a%.%d_]+)')() - if not mod then - -- No match - return nil - end - end - - -- Build according `item - local modulefielditem = apimodel._item( fieldname ) - local moduletype = apimodel._recordtypedef(typename) - moduletype:addfield( modulefielditem ) - local typeref - if #mod > 0 then - local modulefile = apimodel._file() - modulefile.name = mod - modulefile:addtype( moduletype ) - typeref = apimodel._externaltypref(mod, typename) - modulefielditem.external = true - else - typeref = apimodel._internaltyperef(typename) - end - modulefielditem.type = typeref - return modulefielditem -end - ---- --- Build an API internal reference from a string like: `#typeref` -local internal = function ( typestring ) - for name in typestring:gmatch('#([%a%.%d_]+)') do - -- Do not handle this name is it starts with reserved name "global" - if name:find("global.") == 1 then return nil end - return apimodel._internaltyperef(name) - end - return nil -end - ---- --- Build an API external reference from a string like: `mod.ule#type` -local extern = function (type) - - -- Match `mod.ule#ty.pe` - local modulename, typename = type:gmatch('([%a%.%d_]+)#([%a%.%d_]+)')() - - -- Trying `mod.ule#(ty.pe)` - if not modulename then - modulename, typename = type:gmatch('([%a%.%d_]+)#%(([%a%.%d_]+)%)')() - - -- No match at all - if not modulename then - return nil - end - end - return apimodel._externaltypref(modulename, typename) -end - ---- --- Build an API external reference from a string like: `mod.ule` -local file = function (type) - for modulename in type:gmatch('([%a%.%d_]+)') do - local file = apimodel._file() - file.name = modulename - return file - end - return nil -end - - ---- --- Provide API Model element from a string --- @usage local externaltyperef = getelement("somemodule#somefield") -function M.getelement( str ) - - -- Order matters, more restrictive are at begin of table - local extractors = { - globals, - field, - extern, - internal, - file - } - -- Loop over extractors. - -- First valid result is used - for _, extractor in ipairs( extractors ) do - local result = extractor( str ) - if result then return result end - end - return nil -end - --------------------------------------------------------------------------------- --- Iterator that iterates on the table in key ascending order. --- --- @function [parent=#utils.table] sortedPairs --- @param t table to iterate. --- @return iterator function. -function M.sortedpairs(t) - local a = {} - local insert = table.insert - for n in pairs(t) do insert(a, n) end - table.sort(a) - local i = 0 - return function() - i = i + 1 - return a[i], t[a[i]] - end -end -return M diff --git a/Utils/luarocks/share/lua/5.1/templateengine.lua b/Utils/luarocks/share/lua/5.1/templateengine.lua deleted file mode 100644 index efa976b8a..000000000 --- a/Utils/luarocks/share/lua/5.1/templateengine.lua +++ /dev/null @@ -1,116 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2011-2012 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- ---- --- This library provide html description of elements from the externalapi -local M = {} - --- Load template engine -local pltemplate = require 'pl.template' - --- Markdown handling -local markdown = require 'markdown' - --- apply template to the given element -function M.applytemplate(elem, ident, templatetype) - -- define environment - local env = M.getenv(elem, ident) - - -- load template - local template = M.gettemplate(elem,templatetype) - if not template then - templatetype = templatetype and string.format(' "%s"', templatetype) or '' - local elementname = string.format(' for %s', elem.tag or 'untagged element') - error(string.format('Unable to load %s template %s', templatetype, elementname)) - end - - -- apply template - local str, err = pltemplate.substitute(template, env) - - --manage errors - if not str then - local templateerror = templatetype and string.format(' parsing "%s" template ', templatetype) or '' - error(string.format('An error occured%s for "%s"\n%s',templateerror, elem.tag, err)) - end - return str -end - --- get the a new environment for this element -function M.getenv(elem, ident) - local currentenv ={} - for k,v in pairs(M.env) do currentenv[k] = v end - if elem and elem.tag then - currentenv['_'..elem.tag]= elem - end - currentenv['i']= ident or 1 - return currentenv -end - --- get the template for this element -function M.gettemplate(elem,templatetype) - local tag = elem and elem.tag - if tag then - if templatetype then - return require ("template." .. templatetype.. "." .. tag) - else - return require ("template." .. tag) - end - end -end - - ---- --- Allow user to format text in descriptions. --- Default implementation replaces @{---} tags with links and apply markdown. --- @return #string -local function format(string) - -- Allow to replace encountered tags with valid links - local replace = function(found) - local apiobj = M.env.getelement(found) - if apiobj then - return M.env.fulllinkto(apiobj) - end - return found - end - string = string:gsub('@{%s*(.-)%s*}', replace) - return M.env.markdown( string ) -end ---- --- Provide a full link to an element using `prettyname` and `linkto`. --- Default implementation is for HTML. -local function fulllinkto(o) - local ref = M.env.linkto(o) - local name = M.env.prettyname(o) - if not ref then - return name - end - return string.format('%s', ref, name) -end --- --- Define default template environnement --- -local defaultenv = { - table = table, - ipairs = ipairs, - pairs = pairs, - markdown = markdown, - applytemplate = M.applytemplate, - format = format, - linkto = function(str) return str end, - fulllinkto = fulllinkto, - prettyname = function(s) return s end, - getelement = function(s) return nil end -} - --- this is the global env accessible in the templates --- env should be redefine by docgenerator user to add functions or redefine it. -M.env = defaultenv -return M diff --git a/Utils/luarocks/systree/bin/luadocumentor.bat b/Utils/luarocks/systree/bin/luadocumentor.bat deleted file mode 100644 index e16f6f7e9..000000000 --- a/Utils/luarocks/systree/bin/luadocumentor.bat +++ /dev/null @@ -1,3 +0,0 @@ -@echo off -"C:\Users\Hugues\Documents\GitHub\MOOSE\Utils\luarocks\lua5.1" -e "package.path=\"C:\\Users\\Hugues\\AppData\\Roaming/luarocks/share/lua/5.1/?.lua;C:\\Users\\Hugues\\AppData\\Roaming/luarocks/share/lua/5.1/?/init.lua;C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks\\systree/share/lua/5.1/?.lua;C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks\\systree/share/lua/5.1/?/init.lua;C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks/lua/?.lua;\"..package.path; package.cpath=\"C:\\Users\\Hugues\\AppData\\Roaming/luarocks/lib/lua/5.1/?.dll;C:/Users/Hugues/Documents/GitHub/MOOSE/Utils/luarocks\\systree/lib/lua/5.1/?.dll;\"..package.cpath" -e "local k,l,_=pcall(require,\"luarocks.loader\") _=k and l.add_context(\"luadocumentor\",\"0.1.5-1\")" "C:\Users\Hugues\Documents\GitHub\MOOSE\Utils\luarocks\systree\lib\luarocks\rocks\luadocumentor\0.1.5-1\bin\luadocumentor" %* -exit /b %ERRORLEVEL% diff --git a/Utils/luarocks/systree/lib/lua/5.1/checks.dll b/Utils/luarocks/systree/lib/lua/5.1/checks.dll deleted file mode 100644 index 9959cdc01..000000000 Binary files a/Utils/luarocks/systree/lib/lua/5.1/checks.dll and /dev/null differ diff --git a/Utils/luarocks/systree/lib/lua/5.1/lfs.dll b/Utils/luarocks/systree/lib/lua/5.1/lfs.dll deleted file mode 100644 index 9249ec0eb..000000000 Binary files a/Utils/luarocks/systree/lib/lua/5.1/lfs.dll and /dev/null differ diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/checks/1.0-1/checks-1.0-1.rockspec b/Utils/luarocks/systree/lib/luarocks/rocks/checks/1.0-1/checks-1.0-1.rockspec deleted file mode 100644 index 9f9cae083..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/checks/1.0-1/checks-1.0-1.rockspec +++ /dev/null @@ -1,36 +0,0 @@ ---*-lua-*- -package = "checks" -version = "1.0-1" -source = { - url = "https://github.com/fab13n/checks/raw/master/checks-1.0-1.tar.gz", - dir = "checks", -} - -description = { - summary = "Easy, terse, readable and fast function arguments type checking", - detailed = [[ - This library declares a `checks()` function and a - `checkers` table, which allow to check the parameters - passed to a Lua function in a fast and unobtrusive way. - - Althought provided here as a standalone library, it is - part of Sierra Wireless' Aleos Applicaion Framework, - available under the Eclipse Public License, currently at: - - https://github.com/SierraWireless/luasched - - ]], - homepage = "https://github.com/SierraWireless/luasched", - license = "Eclipse public license" -} - -dependencies = { - "lua >= 5.1" -} - -build = { - type = 'builtin', - modules = { - checks = 'checks.c' - } -} diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/checks/1.0-1/rock_manifest b/Utils/luarocks/systree/lib/luarocks/rocks/checks/1.0-1/rock_manifest deleted file mode 100644 index b45de952e..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/checks/1.0-1/rock_manifest +++ /dev/null @@ -1,6 +0,0 @@ -rock_manifest = { - ["checks-1.0-1.rockspec"] = "70af2f5dd173774a16b9e7cfdfd12ecd", - lib = { - ["checks.dll"] = "2f86fd2ab34447e9e211836fd56939ae" - } -} diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/luadocumentor/0.1.5-1/bin/luadocumentor b/Utils/luarocks/systree/lib/luarocks/rocks/luadocumentor/0.1.5-1/bin/luadocumentor deleted file mode 100644 index dccc8df18..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/luadocumentor/0.1.5-1/bin/luadocumentor +++ /dev/null @@ -1,178 +0,0 @@ -#!/usr/bin/lua --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- - --- Check interpreter version -if _VERSION ~= "Lua 5.1" then - print("Luadocumentor is only compatible with Lua 5.1") - return -end - --- --- Defining help message. --- - --- This message is compliant to 'lapp', which will match options and arguments --- from command line. -local help = [[luadocumentor v0.1.4: tool for Lua Documentation Language - -f, --format (default doc) Define output format : - * doc: Will produce HTML documentation from specified file(s) or directories. - * api: Will produce API file(s) from specified file(s) or directories. - -d, --dir (default docs) Define an output directory. If the given directory doesn't exist, it will be created. - -h, --help Display the help. - -n, --noheuristic Do not use code analysis, use only comments to generate documentation. - -s, --style (default !) The path of your own css file, if you don't want to use the default one. (usefull only for the doc format) - [directories|files] Define the paths or the directories of inputs files. Only Lua or C files containing a @module tag will be considered. -]] -local docgenerator = require 'docgenerator' -local lddextractor = require 'lddextractor' -local lapp = require 'pl.lapp' -local args = lapp( help ) - -if not args or #args < 1 then - print('No directory provided') - return -elseif args.help then - -- Just print help - print( help ) - return -end - --- --- define css file name --- -local cssfilename = "stylesheet.css" - --- --- Parse files from given folders --- - --- Check if all folders exist -local fs = require 'fs.lfs' -local allpresent, missing = fs.checkdirectory(args) - --- Some of given directories are absent -if missing then - -- List missing directories - print 'Unable to open' - for _, file in ipairs( missing ) do - print('\t'.. file) - end - return -end - --- Get files from given directories -local filestoparse, error = fs.filelist( args ) -if not filestoparse then - print ( error ) - return -end - --- --- Generate documentation only files --- -if args.format == 'api' then - for _, filename in ipairs( filestoparse ) do - - -- Loading file content - print('Dealing with "'..filename..'".') - local file, error = io.open(filename, 'r') - if not file then - print ('Unable to open "'..filename.."'.\n"..error) - else - local code = file:read('*all') - file:close() - - -- - -- Creating comment file - -- - local commentfile, error = lddextractor.generatecommentfile(filename, code) - - -- Getting module name - -- Optimize me - local module, moduleerror = lddextractor.generateapimodule(filename, code) - if not commentfile then - print('Unable to create documentation file for "'..filename..'"\n'..error) - elseif not module or not module.name then - local error = moduleerror and '\n'..moduleerror or '' - print('Unable to compute module name for "'..filename..'".'..error) - else - -- - -- Flush documentation file on disk - -- - local path = args.dir..fs.separator..module.name..'.lua' - local status, err = fs.fill(path, commentfile) - if not status then - print(err) - end - end - end - end - print('Done') - return -end - --- Deal only supported output types -if args.format ~= 'doc' then - print ('"'..args.format..'" format is not handled.') - return -end --- Generate html form files -local parsedfiles, unparsed = docgenerator.generatedocforfiles(filestoparse, cssfilename,args.noheuristic) - --- Show warnings on unparsed files -if #unparsed > 0 then - for _, faultyfile in ipairs( unparsed ) do - print( faultyfile ) - end -end --- This loop is just for counting parsed files --- TODO: Find a more elegant way to do it -local parsedfilescount = 0 -for _, p in pairs(parsedfiles) do - parsedfilescount = parsedfilescount + 1 -end -print (parsedfilescount .. ' file(s) parsed.') - --- Create html files -local generated = 0 -for _, apifile in pairs ( parsedfiles ) do - local status, err = fs.fill(args.dir..fs.separator..apifile.name..'.html', apifile.body) - if status then - generated = generated + 1 - else - print( 'Unable to create '..apifile.name..'.html on disk.') - end -end -print (generated .. ' file(s) generated.') - --- Copying css -local csscontent -if args.style == '!' then - csscontent = require 'defaultcss' -else - local css, error = io.open(args.style, 'r') - if not css then - print('Unable to open "'..args.style .. '".\n'..error) - return - end - csscontent = css:read("*all") - css:close() -end - -local status, error = fs.fill(args.dir..fs.separator..cssfilename, csscontent) -if not status then - print(error) - return -end -print('Adding css') -print('Done') diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/luadocumentor/0.1.5-1/doc/LICENSE b/Utils/luarocks/systree/lib/luarocks/rocks/luadocumentor/0.1.5-1/doc/LICENSE deleted file mode 100644 index 11ecb7958..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/luadocumentor/0.1.5-1/doc/LICENSE +++ /dev/null @@ -1,198 +0,0 @@ -Eclipse Public License - v 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC -LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM -CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation - distributed under this Agreement, and -b) in the case of each subsequent Contributor: - i) changes to the Program, and - ii) additions to the Program; - - where such changes and/or additions to the Program originate from and are - distributed by that particular Contributor. A Contribution 'originates' from - a Contributor if it was added to the Program by such Contributor itself or - anyone acting on such Contributor's behalf. Contributions do not include - additions to the Program which: (i) are separate modules of software - distributed in conjunction with the Program under their own license - agreement, and (ii) are not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents" mean patent claims licensable by a Contributor which are -necessarily infringed by the use or sale of its Contribution alone or when -combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, -including all Contributors. - -2. GRANT OF RIGHTS - a) Subject to the terms of this Agreement, each Contributor hereby grants - Recipient a non-exclusive, worldwide, royalty-free copyright license to - reproduce, prepare derivative works of, publicly display, publicly perform, - distribute and sublicense the Contribution of such Contributor, if any, and - such derivative works, in source code and object code form. - b) Subject to the terms of this Agreement, each Contributor hereby grants - Recipient a non-exclusive, worldwide, royalty-free patent license under - Licensed Patents to make, use, sell, offer to sell, import and otherwise - transfer the Contribution of such Contributor, if any, in source code and - object code form. This patent license shall apply to the combination of the - Contribution and the Program if, at the time the Contribution is added by - the Contributor, such addition of the Contribution causes such combination - to be covered by the Licensed Patents. The patent license shall not apply - to any other combinations which include the Contribution. No hardware per - se is licensed hereunder. - c) Recipient understands that although each Contributor grants the licenses to - its Contributions set forth herein, no assurances are provided by any - Contributor that the Program does not infringe the patent or other - intellectual property rights of any other entity. Each Contributor - disclaims any liability to Recipient for claims brought by any other entity - based on infringement of intellectual property rights or otherwise. As a - condition to exercising the rights and licenses granted hereunder, each - Recipient hereby assumes sole responsibility to secure any other - intellectual property rights needed, if any. For example, if a third party - patent license is required to allow Recipient to distribute the Program, it - is Recipient's responsibility to acquire that license before distributing - the Program. - d) Each Contributor represents that to its knowledge it has sufficient - copyright rights in its Contribution, if any, to grant the copyright - license set forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its -own license agreement, provided that: - - a) it complies with the terms and conditions of this Agreement; and - b) its license agreement: - i) effectively disclaims on behalf of all Contributors all warranties and - conditions, express and implied, including warranties or conditions of - title and non-infringement, and implied warranties or conditions of - merchantability and fitness for a particular purpose; - ii) effectively excludes on behalf of all Contributors all liability for - damages, including direct, indirect, special, incidental and - consequential damages, such as lost profits; - iii) states that any provisions which differ from this Agreement are offered - by that Contributor alone and not by any other party; and - iv) states that source code for the Program is available from such - Contributor, and informs licensees how to obtain it in a reasonable - manner on or through a medium customarily used for software exchange. - -When the Program is made available in source code form: - - a) it must be made available under this Agreement; and - b) a copy of this Agreement must be included with each copy of the Program. - Contributors may not remove or alter any copyright notices contained within - the Program. - -Each Contributor must identify itself as the originator of its Contribution, if -any, in a manner that reasonably allows subsequent Recipients to identify the -originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with -respect to end users, business partners and the like. While this license is -intended to facilitate the commercial use of the Program, the Contributor who -includes the Program in a commercial product offering should do so in a manner -which does not create potential liability for other Contributors. Therefore, if -a Contributor includes the Program in a commercial product offering, such -Contributor ("Commercial Contributor") hereby agrees to defend and indemnify -every other Contributor ("Indemnified Contributor") against any losses, damages -and costs (collectively "Losses") arising from claims, lawsuits and other legal -actions brought by a third party against the Indemnified Contributor to the -extent caused by the acts or omissions of such Commercial Contributor in -connection with its distribution of the Program in a commercial product -offering. The obligations in this section do not apply to any claims or Losses -relating to any actual or alleged intellectual property infringement. In order -to qualify, an Indemnified Contributor must: a) promptly notify the Commercial -Contributor in writing of such claim, and b) allow the Commercial Contributor to -control, and cooperate with the Commercial Contributor in, the defense and any -related settlement negotiations. The Indemnified Contributor may participate in -any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product -offering, Product X. That Contributor is then a Commercial Contributor. If that -Commercial Contributor then makes performance claims, or offers warranties -related to Product X, those performance claims and warranties are such -Commercial Contributor's responsibility alone. Under this section, the -Commercial Contributor would have to defend claims against the other -Contributors related to those performance claims and warranties, and if a court -requires any other Contributor to pay any damages as a result, the Commercial -Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR -IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each -Recipient is solely responsible for determining the appropriateness of using and -distributing the Program and assumes all risks associated with its exercise of -rights under this Agreement , including but not limited to the risks and costs -of program errors, compliance with applicable laws, damage to or loss of data, -programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY -CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST -PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS -GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of the -terms of this Agreement, and without further action by the parties hereto, such -provision shall be reformed to the minimum extent necessary to make such -provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Program itself -(excluding combinations of the Program with other software or hardware) -infringes such Recipient's patent(s), then such Recipient's rights granted under -Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails to -comply with any of the material terms or conditions of this Agreement and does -not cure such failure in a reasonable period of time after becoming aware of -such noncompliance. If all Recipient's rights under this Agreement terminate, -Recipient agrees to cease use and distribution of the Program as soon as -reasonably practicable. However, Recipient's obligations under this Agreement -and any licenses granted by Recipient relating to the Program shall continue and -survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in -order to avoid inconsistency the Agreement is copyrighted and may only be -modified in the following manner. The Agreement Steward reserves the right to -publish new versions (including revisions) of this Agreement from time to time. -No one other than the Agreement Steward has the right to modify this Agreement. -The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation -may assign the responsibility to serve as the Agreement Steward to a suitable -separate entity. Each new version of the Agreement will be given a -distinguishing version number. The Program (including Contributions) may always -be distributed subject to the version of the Agreement under which it was -received. In addition, after a new version of the Agreement is published, -Contributor may elect to distribute the Program (including its Contributions) -under the new version. Except as expressly stated in Sections 2(a) and 2(b) -above, Recipient receives no rights or licenses to the intellectual property of -any Contributor under this Agreement, whether expressly, by implication, -estoppel or otherwise. All rights in the Program not expressly granted under -this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the -intellectual property laws of the United States of America. No party to this -Agreement will bring a legal action under this Agreement more than one year -after the cause of action arose. Each party waives its rights to a jury trial in -any resulting litigation. diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/luadocumentor/0.1.5-1/doc/README.md b/Utils/luarocks/systree/lib/luarocks/rocks/luadocumentor/0.1.5-1/doc/README.md deleted file mode 100644 index 03611d630..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/luadocumentor/0.1.5-1/doc/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Lua Documentor - -LuaDocumentor allow users to generate HTML and API files from code documented -using Lua documentation language. - -Documentation is -[available here](http://wiki.eclipse.org/Koneki/LDT/User_Area/LuaDocumentor). diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/luadocumentor/0.1.5-1/luadocumentor-0.1.5-1.rockspec b/Utils/luarocks/systree/lib/luarocks/rocks/luadocumentor/0.1.5-1/luadocumentor-0.1.5-1.rockspec deleted file mode 100644 index 9ed686c3f..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/luadocumentor/0.1.5-1/luadocumentor-0.1.5-1.rockspec +++ /dev/null @@ -1,57 +0,0 @@ -package = 'LuaDocumentor' -version = '0.1.5-1' -description = { - summary = 'LuaDocumentor allow users to generate HTML and API files from code documented using Lua documentation language.', - detailed = [[ - This is an example for the LuaRocks tutorial. - Here we would put a detailed, typically - paragraph-long description. - ]], - homepage = 'http://wiki.eclipse.org/Koneki/LDT/User_Area/LuaDocumentor', - license = 'EPL' -} -source = { - url = 'git://github.com/LuaDevelopmentTools/luadocumentor.git', - tag = 'v0.1.5-1' -} -dependencies = { - 'lua ~> 5.1', - 'luafilesystem ~> 1.6', - 'markdown ~> 0.32', - 'metalua-compiler ~> 0.7', - 'penlight ~> 0.9' -} -build = { - type = 'builtin', - install = { - bin = { - luadocumentor = 'luadocumentor.lua' - }, - lua = { - ['models.internalmodelbuilder'] = 'models/internalmodelbuilder.mlua' - } - }, - modules = { - defaultcss = 'defaultcss.lua', - docgenerator = 'docgenerator.lua', - extractors = 'extractors.lua', - lddextractor = 'lddextractor.lua', - templateengine = 'templateengine.lua', - - ['fs.lfs'] = 'fs/lfs.lua', - - ['models.apimodel'] = 'models/apimodel.lua', - ['models.apimodelbuilder'] = 'models/apimodelbuilder.lua', - ['models.internalmodel'] = 'models/internalmodel.lua', - ['models.ldparser'] = 'models/ldparser.lua', - - ['template.file'] = 'template/file.lua', - ['template.index'] = 'template/index.lua', - ['template.index.recordtypedef'] = 'template/index/recordtypedef.lua', - ['template.item'] = 'template/item.lua', - ['template.page'] = 'template/page.lua', - ['template.recordtypedef'] = 'template/recordtypedef.lua', - ['template.usage'] = 'template/usage.lua', - ['template.utils'] = 'template/utils.lua', - } -} diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/luadocumentor/0.1.5-1/rock_manifest b/Utils/luarocks/systree/lib/luarocks/rocks/luadocumentor/0.1.5-1/rock_manifest deleted file mode 100644 index c286d43bd..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/luadocumentor/0.1.5-1/rock_manifest +++ /dev/null @@ -1,39 +0,0 @@ -rock_manifest = { - bin = { - luadocumentor = "bc5cc07f56db2cf1dbe80f0827332873" - }, - doc = { - LICENSE = "52a21f73ac77fd790dc40dc5acda0fc2", - ["README.md"] = "fcef1f43c69f3559b347d854b2626deb" - }, - lua = { - ["defaultcss.lua"] = "dd9b2b89e5080972bbb52056247c0c65", - ["docgenerator.lua"] = "92d0a3947d88226340014d2f033be37f", - ["extractors.lua"] = "74191695e5217706ee355925e5ca40fa", - fs = { - ["lfs.lua"] = "4d00f9bc942b02a86ccea16544d3e85d" - }, - ["lddextractor.lua"] = "56edde775a5d57818aa0a07b4f723536", - models = { - ["apimodel.lua"] = "3c401de18691b1222b0ad253958260ee", - ["apimodelbuilder.lua"] = "4c4a3c0b48b404973542dd99f994eb2c", - ["internalmodel.lua"] = "a1a21e50af8db0f0a0b9d164ccc08853", - ["internalmodelbuilder.mlua"] = "ff95dfca573ccc1c19a79434e96a492d", - ["ldparser.lua"] = "538904a3adbfff4ff83deda029847323" - }, - template = { - ["file.lua"] = "41f095bc049ef161060d8e3b4ac9de63", - index = { - ["recordtypedef.lua"] = "0977ff0048a837389c2ac10285eb1ce1" - }, - ["index.lua"] = "5a3b3cface3b1fd9cb2d56f1edd5487b", - ["item.lua"] = "5d5a6d9bffd8935c4ed283105ede331b", - ["page.lua"] = "351f4a7215272f7e448faeece4945bc0", - ["recordtypedef.lua"] = "69938e1d60e94eed7f95b0999f1386ca", - ["usage.lua"] = "979503deb84877cb221130a5be7c1535", - ["utils.lua"] = "ad97fb4e3de9fb6480b25cdd877b50d9" - }, - ["templateengine.lua"] = "09bfc6350e14f4ab509d14fb0fb295c0" - }, - ["luadocumentor-0.1.5-1.rockspec"] = "4ba1b88898dce89e7fd8fb6a700496a4" -} diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/doc.css b/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/doc.css deleted file mode 100644 index e816a7e2c..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/doc.css +++ /dev/null @@ -1,212 +0,0 @@ -body { - margin-left: 1em; - margin-right: 1em; - font-family: arial, helvetica, geneva, sans-serif; - background-color:#ffffff; margin:0px; -} - -code { - font-family: "Andale Mono", monospace; -} - -tt { - font-family: "Andale Mono", monospace; -} - -body, td, th { font-size: 11pt; } - -h1, h2, h3, h4 { margin-left: 0em; } - -textarea, pre, tt { font-size:10pt; } -body, td, th { color:#000000; } -small { font-size:0.85em; } -h1 { font-size:1.5em; } -h2 { font-size:1.25em; } -h3 { font-size:1.15em; } -h4 { font-size:1.06em; } - -a:link { font-weight:bold; color: #004080; text-decoration: none; } -a:visited { font-weight:bold; color: #006699; text-decoration: none; } -a:link:hover { text-decoration:underline; } -hr { color:#cccccc } -img { border-width: 0px; } - -h3 { padding-top: 1em; } - -p { margin-left: 1em; } - -p.name { - font-family: "Andale Mono", monospace; - padding-top: 1em; - margin-left: 0em; -} - -blockquote { margin-left: 3em; } - -.example { - background-color: rgb(245, 245, 245); - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-style: solid; - border-right-style: solid; - border-bottom-style: solid; - border-left-style: solid; - border-top-color: silver; - border-right-color: silver; - border-bottom-color: silver; - border-left-color: silver; - padding: 1em; - margin-left: 1em; - margin-right: 1em; - font-family: "Andale Mono", monospace; - font-size: smaller; -} - -hr { - margin-left: 0em; - background: #00007f; - border: 0px; - height: 1px; -} - -ul { list-style-type: disc; } - -table.index { border: 1px #00007f; } -table.index td { text-align: left; vertical-align: top; } -table.index ul { padding-top: 0em; margin-top: 0em; } - -table { - border: 1px solid black; - border-collapse: collapse; - margin-left: auto; - margin-right: auto; -} - -th { - border: 1px solid black; - padding: 0.5em; -} - -td { - border: 1px solid black; - padding: 0.5em; -} -div.header, div.footer { margin-left: 0em; } - -#container { - margin-left: 1em; - margin-right: 1em; - background-color: #f0f0f0; -} - -#product { - text-align: center; - border-bottom: 1px solid #cccccc; - background-color: #ffffff; -} - -#product big { - font-size: 2em; -} - -#product_logo { -} - -#product_name { -} - -#product_description { -} - -#main { - background-color: #f0f0f0; - border-left: 2px solid #cccccc; -} - -#navigation { - float: left; - width: 12em; - margin: 0; - vertical-align: top; - background-color: #f0f0f0; - overflow:visible; -} - -#navigation h1 { - background-color:#e7e7e7; - font-size:1.1em; - color:#000000; - text-align:left; - margin:0px; - padding:0.2em; - border-top:1px solid #dddddd; - border-bottom:1px solid #dddddd; -} - -#navigation ul { - font-size:1em; - list-style-type: none; - padding: 0; - margin: 1px; -} - -#navigation li { - text-indent: -1em; - margin: 0em 0em 0em 0.5em; - display: block; - padding: 3px 0px 0px 12px; -} - -#navigation li li a { - padding: 0px 3px 0px -1em; -} - -#content { - margin-left: 12em; - padding: 1em; - border-left: 2px solid #cccccc; - border-right: 2px solid #cccccc; - background-color: #ffffff; -} - -#about { - clear: both; - margin: 0; - padding: 5px; - border-top: 2px solid #cccccc; - background-color: #ffffff; -} - -@media print { - body { - font: 10pt "Times New Roman", "TimeNR", Times, serif; - } - a { - font-weight:bold; color: #004080; text-decoration: underline; - } - #main { - background-color: #ffffff; border-left: 0px; - } - #container { - margin-left: 2%; margin-right: 2%; background-color: #ffffff; - } - #content { - margin-left: 0px; padding: 1em; border-left: 0px; border-right: 0px; background-color: #ffffff; - } - #navigation { - display: none; - } - #product_logo { - display: none; - } - #about img { - display: none; - } - .example { - font-family: "Andale Mono", monospace; - font-size: 8pt; - page-break-inside: avoid; - } -} diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/examples.html b/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/examples.html deleted file mode 100644 index 34fee6977..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/examples.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - LuaFileSystem - - - - - - -
    - -
    - -
    LuaFileSystem
    -
    File System Library for the Lua Programming Language
    -
    - -
    - - - -
    - -

    Examples

    - -

    Directory iterator

    - -

    The following example iterates over a directory and recursively lists the -attributes for each file inside it.

    - -
    -local lfs = require"lfs"
    -
    -function attrdir (path)
    -    for file in lfs.dir(path) do
    -        if file ~= "." and file ~= ".." then
    -            local f = path..'/'..file
    -            print ("\t "..f)
    -            local attr = lfs.attributes (f)
    -            assert (type(attr) == "table")
    -            if attr.mode == "directory" then
    -                attrdir (f)
    -            else
    -                for name, value in pairs(attr) do
    -                    print (name, value)
    -                end
    -            end
    -        end
    -    end
    -end
    -
    -attrdir (".")
    -
    - -
    - -
    - -
    -

    Valid XHTML 1.0!

    -

    $Id: examples.html,v 1.8 2007/12/14 15:28:04 carregal Exp $

    -
    - -
    - - - diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/index.html b/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/index.html deleted file mode 100644 index a551a6a22..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/index.html +++ /dev/null @@ -1,218 +0,0 @@ - - - - LuaFileSystem - - - - - - -
    - -
    - -
    LuaFileSystem
    -
    File System Library for the Lua Programming Language
    -
    - -
    - - - -
    - -

    Overview

    - -

    LuaFileSystem is a Lua library -developed to complement the set of functions related to file -systems offered by the standard Lua distribution.

    - -

    LuaFileSystem offers a portable way to access -the underlying directory structure and file attributes.

    - -

    LuaFileSystem is free software and uses the same -license as Lua 5.1.

    - -

    Status

    - -

    Current version is 1.6.3. It works with Lua 5.1, 5.2 and 5.3.

    - -

    Download

    - -

    LuaFileSystem source can be downloaded from its -Github -page.

    - -

    History

    - -
    -
    Version 1.6.3 [15/Jan/2015]
    -
      -
    • Lua 5.3 support.
    • -
    • Assorted bugfixes.
    • -
    - -
    Version 1.6.2 [??/Oct/2012]
    -
      -
    • Full Lua 5.2 compatibility (with Lua 5.1 fallbacks)
    • -
    - -
    Version 1.6.1 [01/Oct/2012]
    -
      -
    • fix build for Lua 5.2
    • -
    - -
    Version 1.6.0 [26/Sep/2012]
    -
      -
    • getcwd fix for Android
    • -
    • support for Lua 5.2
    • -
    • add lfs.link
    • -
    • other bug fixes
    • -
    - -
    Version 1.5.0 [20/Oct/2009]
    -
      -
    • Added explicit next and close methods to second return value of lfs.dir -(the directory object), for explicit iteration or explicit closing.
    • -
    • Added directory locking via lfs.lock_dir function (see the manual).
    • -
    -
    Version 1.4.2 [03/Feb/2009]
    -
    -
      -
    • fixed bug [#13198] - lfs.attributes(filename, 'size') overflow on files > 2 Gb again (bug report and patch by KUBO Takehiro).
    • -
    • fixed bug [#39794] - Compile error on Solaris 10 (bug report and patch by Aaron B).
    • -
    • fixed compilation problems with Borland C.
    • -
    -
    - -
    Version 1.4.1 [07/May/2008]
    -
    -
      -
    • documentation review
    • -
    • fixed Windows compilation issues
    • -
    • fixed bug in the Windows tests (patch by Shmuel Zeigerman)
    • -
    • fixed bug [#2185] - lfs.attributes(filename, 'size') overflow on files > 2 Gb -
    • -
    -
    - -
    Version 1.4.0 [13/Feb/2008]
    -
    -
      -
    • added function - lfs.setmode - (works only in Windows systems).
    • -
    • lfs.attributes - raises an error if attribute does not exist
    • -
    -
    - -
    Version 1.3.0 [26/Oct/2007]
    -
    - -
    - -
    Version 1.2.1 [08/May/2007]
    -
    -
      -
    • compatible only with Lua 5.1 (Lua 5.0 support was dropped)
    • -
    -
    - -
    Version 1.2 [15/Mar/2006]
    -
    - -
    - -
    Version 1.1 [30/May/2005]
    -
    - -
    - -
    Version 1.0 [21/Jan/2005]
    -
    - -
    Version 1.0 Beta [10/Nov/2004]
    -
    -
    - -

    Credits

    - -

    LuaFileSystem was designed by Roberto Ierusalimschy, -André Carregal and Tomás Guisasola as part of the -Kepler Project, -which holds its copyright. LuaFileSystem is currently maintained by Fábio Mascarenhas.

    - -

    Contact us

    - -

    For more information please -contact us. -Comments are welcome!

    - -

    You can also reach other Kepler developers and users on the Kepler Project -mailing list.

    - -
    - -
    - -
    -

    Valid XHTML 1.0!

    -

    $Id: index.html,v 1.44 2009/02/04 21:21:33 carregal Exp $

    -
    - -
    - - - diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/license.html b/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/license.html deleted file mode 100644 index 1325e128e..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/license.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - LuaFileSystem - - - - - - -
    - -
    - -
    LuaFileSystem
    -
    File System Library for the Lua Programming Language
    -
    - -
    - - - -
    - -

    License

    - -

    -LuaFileSystem is free software: it can be used for both academic -and commercial purposes at absolutely no cost. There are no -royalties or GNU-like "copyleft" restrictions. LuaFileSystem -qualifies as -Open Source -software. -Its licenses are compatible with -GPL. -LuaFileSystem is not in the public domain and the -Kepler Project -keep its copyright. -The legal details are below. -

    - -

    The spirit of the license is that you are free to use -LuaFileSystem for any purpose at no cost without having to ask us. -The only requirement is that if you do use LuaFileSystem, then you -should give us credit by including the appropriate copyright notice -somewhere in your product or its documentation.

    - -

    The LuaFileSystem library is designed and implemented by Roberto -Ierusalimschy, André Carregal and Tomás Guisasola. -The implementation is not derived from licensed software.

    - -
    -

    Copyright © 2003 Kepler Project.

    - -

    Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, copy, -modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions:

    - -

    The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software.

    - -

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE.

    - -
    - -
    - -
    -

    Valid XHTML 1.0!

    -

    $Id: license.html,v 1.13 2008/02/11 22:42:21 carregal Exp $

    -
    - -
    - - - diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/luafilesystem.png b/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/luafilesystem.png deleted file mode 100644 index e1dd8c65b..000000000 Binary files a/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/luafilesystem.png and /dev/null differ diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/manual.html b/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/manual.html deleted file mode 100644 index a13d2001c..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/doc/us/manual.html +++ /dev/null @@ -1,280 +0,0 @@ - - - - LuaFileSystem - - - - - - -
    - -
    - -
    LuaFileSystem
    -
    File System Library for the Lua Programming Language
    -
    - -
    - - - -
    - -

    Introduction

    - -

    LuaFileSystem is a Lua library -developed to complement the set of functions related to file -systems offered by the standard Lua distribution.

    - -

    LuaFileSystem offers a portable way to access -the underlying directory structure and file attributes.

    - -

    Building

    - -

    -LuaFileSystem should be built with Lua 5.1 so the language library -and header files for the target version must be installed properly. -

    - -

    -LuaFileSystem offers a Makefile and a separate configuration file, -config, -which should be edited to suit your installation before running -make. -The file has some definitions like paths to the external libraries, -compiler options and the like. -

    - -

    On Windows, the C runtime used to compile LuaFileSystem must be the same -runtime that Lua uses, or some LuaFileSystem functions will not work.

    - -

    Installation

    - -

    The easiest way to install LuaFileSystem is to use LuaRocks:

    - -
    -luarocks install luafilesystem
    -
    - -

    If you prefer to install LuaFileSystem manually, the compiled binary should be copied to a directory in your -C path.

    - -

    Reference

    - -

    -LuaFileSystem offers the following functions: -

    - -
    -
    lfs.attributes (filepath [, aname])
    -
    Returns a table with the file attributes corresponding to - filepath (or nil followed by an error message - in case of error). - If the second optional argument is given, then only the value of the - named attribute is returned (this use is equivalent to - lfs.attributes(filepath).aname, but the table is not created - and only one attribute is retrieved from the O.S.). - The attributes are described as follows; - attribute mode is a string, all the others are numbers, - and the time related attributes use the same time reference of - os.time: -
    -
    dev
    -
    on Unix systems, this represents the device that the inode resides on. On Windows systems, - represents the drive number of the disk containing the file
    - -
    ino
    -
    on Unix systems, this represents the inode number. On Windows systems this has no meaning
    - -
    mode
    -
    string representing the associated protection mode (the values could be - file, directory, link, socket, - named pipe, char device, block device or - other)
    - -
    nlink
    -
    number of hard links to the file
    - -
    uid
    -
    user-id of owner (Unix only, always 0 on Windows)
    - -
    gid
    -
    group-id of owner (Unix only, always 0 on Windows)
    - -
    rdev
    -
    on Unix systems, represents the device type, for special file inodes. - On Windows systems represents the same as dev
    - -
    access
    -
    time of last access
    - -
    modification
    -
    time of last data modification
    - -
    change
    -
    time of last file status change
    - -
    size
    -
    file size, in bytes
    - -
    blocks
    -
    block allocated for file; (Unix only)
    - -
    blksize
    -
    optimal file system I/O blocksize; (Unix only)
    -
    - This function uses stat internally thus if the given - filepath is a symbolic link, it is followed (if it points to - another link the chain is followed recursively) and the information - is about the file it refers to. - To obtain information about the link itself, see function - lfs.symlinkattributes. -
    - -
    lfs.chdir (path)
    -
    Changes the current working directory to the given - path.
    - Returns true in case of success or nil plus an - error string.
    - -
    lfs.lock_dir(path, [seconds_stale])
    -
    Creates a lockfile (called lockfile.lfs) in path if it does not - exist and returns the lock. If the lock already exists checks if - it's stale, using the second parameter (default for the second - parameter is INT_MAX, which in practice means the lock will never - be stale. To free the the lock call lock:free().
    - In case of any errors it returns nil and the error message. In - particular, if the lock exists and is not stale it returns the - "File exists" message.
    - -
    lfs.currentdir ()
    -
    Returns a string with the current working directory or nil - plus an error string.
    - -
    iter, dir_obj = lfs.dir (path)
    -
    - Lua iterator over the entries of a given directory. - Each time the iterator is called with dir_obj it returns a directory entry's name as a string, or - nil if there are no more entries. You can also iterate by calling dir_obj:next(), and - explicitly close the directory before the iteration finished with dir_obj:close(). - Raises an error if path is not a directory. -
    - -
    lfs.lock (filehandle, mode[, start[, length]])
    -
    Locks a file or a part of it. This function works on open files; the - file handle should be specified as the first argument. - The string mode could be either - r (for a read/shared lock) or w (for a - write/exclusive lock). The optional arguments start - and length can be used to specify a starting point and - its length; both should be numbers.
    - Returns true if the operation was successful; in - case of error, it returns nil plus an error string. -
    - -
    lfs.link (old, new[, symlink])
    -
    Creates a link. The first argument is the object to link to - and the second is the name of the link. If the optional third - argument is true, the link will by a symbolic link (by default, a - hard link is created). -
    - -
    lfs.mkdir (dirname)
    -
    Creates a new directory. The argument is the name of the new - directory.
    - Returns true if the operation was successful; - in case of error, it returns nil plus an error string. -
    - -
    lfs.rmdir (dirname)
    -
    Removes an existing directory. The argument is the name of the directory.
    - Returns true if the operation was successful; - in case of error, it returns nil plus an error string.
    - -
    lfs.setmode (file, mode)
    -
    Sets the writing mode for a file. The mode string can be either "binary" or "text". - Returns true followed the previous mode string for the file, or - nil followed by an error string in case of errors. - On non-Windows platforms, where the two modes are identical, - setting the mode has no effect, and the mode is always returned as binary. -
    - -
    lfs.symlinkattributes (filepath [, aname])
    -
    Identical to lfs.attributes except that - it obtains information about the link itself (not the file it refers to). - On Windows this function does not yet support links, and is identical to - lfs.attributes. -
    - -
    lfs.touch (filepath [, atime [, mtime]])
    -
    Set access and modification times of a file. This function is - a bind to utime function. The first argument is the - filename, the second argument (atime) is the access time, - and the third argument (mtime) is the modification time. - Both times are provided in seconds (which should be generated with - Lua standard function os.time). - If the modification time is omitted, the access time provided is used; - if both times are omitted, the current time is used.
    - Returns true if the operation was successful; - in case of error, it returns nil plus an error string. -
    - -
    lfs.unlock (filehandle[, start[, length]])
    -
    Unlocks a file or a part of it. This function works on - open files; the file handle should be specified as the first - argument. The optional arguments start and - length can be used to specify a starting point and its - length; both should be numbers.
    - Returns true if the operation was successful; - in case of error, it returns nil plus an error string. -
    -
    - -
    - -
    - -
    -

    Valid XHTML 1.0!

    -

    $Id: manual.html,v 1.45 2009/06/03 20:53:55 mascarenhas Exp $

    -
    - -
    - - - diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/luafilesystem-1.6.3-2.rockspec b/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/luafilesystem-1.6.3-2.rockspec deleted file mode 100644 index c27e2b711..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/luafilesystem-1.6.3-2.rockspec +++ /dev/null @@ -1,29 +0,0 @@ -package = "LuaFileSystem" -version = "1.6.3-2" -source = { - url = "git://github.com/keplerproject/luafilesystem", - tag = "v_1_6_3" -} -description = { - summary = "File System Library for the Lua Programming Language", - detailed = [[ - LuaFileSystem is a Lua library developed to complement the set of - functions related to file systems offered by the standard Lua - distribution. LuaFileSystem offers a portable way to access the - underlying directory structure and file attributes. - ]], - homepage = "http://keplerproject.github.io/luafilesystem", - license = "MIT/X11" -} -dependencies = { - "lua >= 5.1" -} -build = { - type = "builtin", - modules = { - lfs = "src/lfs.c" - }, - copy_directories = { - "doc", "tests" - } -} diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/rock_manifest b/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/rock_manifest deleted file mode 100644 index 1b646b631..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/rock_manifest +++ /dev/null @@ -1,19 +0,0 @@ -rock_manifest = { - doc = { - us = { - ["doc.css"] = "d0a913514fb190240b3b4033d105cbc0", - ["examples.html"] = "5832f72021728374cf57b621d62ce0ff", - ["index.html"] = "96885bdda963939f0a363b5fa6b16b59", - ["license.html"] = "e3a756835cb7c8ae277d5e513c8e32ee", - ["luafilesystem.png"] = "81e923e976e99f894ea0aa8b52baff29", - ["manual.html"] = "d6473799b73ce486c3ea436586cb3b34" - } - }, - lib = { - ["lfs.dll"] = "bb5e7f0d82350913063363393fafb3e3" - }, - ["luafilesystem-1.6.3-2.rockspec"] = "eb0ef7c190516892eb8357af799eea5f", - tests = { - ["test.lua"] = "7b4ddb5bdb7e0b1b1ed0150d473535c9" - } -} diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/tests/test.lua b/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/tests/test.lua deleted file mode 100644 index abfbd4d96..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/luafilesystem/1.6.3-2/tests/test.lua +++ /dev/null @@ -1,175 +0,0 @@ -#!/usr/bin/env lua5.1 - -local tmp = "/tmp" -local sep = string.match (package.config, "[^\n]+") -local upper = ".." - -local lfs = require"lfs" -print (lfs._VERSION) - -io.write(".") -io.flush() - -function attrdir (path) - for file in lfs.dir(path) do - if file ~= "." and file ~= ".." then - local f = path..sep..file - print ("\t=> "..f.." <=") - local attr = lfs.attributes (f) - assert (type(attr) == "table") - if attr.mode == "directory" then - attrdir (f) - else - for name, value in pairs(attr) do - print (name, value) - end - end - end - end -end - --- Checking changing directories -local current = assert (lfs.currentdir()) -local reldir = string.gsub (current, "^.*%"..sep.."([^"..sep.."])$", "%1") -assert (lfs.chdir (upper), "could not change to upper directory") -assert (lfs.chdir (reldir), "could not change back to current directory") -assert (lfs.currentdir() == current, "error trying to change directories") -assert (lfs.chdir ("this couldn't be an actual directory") == nil, "could change to a non-existent directory") - -io.write(".") -io.flush() - --- Changing creating and removing directories -local tmpdir = current..sep.."lfs_tmp_dir" -local tmpfile = tmpdir..sep.."tmp_file" --- Test for existence of a previous lfs_tmp_dir --- that may have resulted from an interrupted test execution and remove it -if lfs.chdir (tmpdir) then - assert (lfs.chdir (upper), "could not change to upper directory") - assert (os.remove (tmpfile), "could not remove file from previous test") - assert (lfs.rmdir (tmpdir), "could not remove directory from previous test") -end - -io.write(".") -io.flush() - --- tries to create a directory -assert (lfs.mkdir (tmpdir), "could not make a new directory") -local attrib, errmsg = lfs.attributes (tmpdir) -if not attrib then - error ("could not get attributes of file `"..tmpdir.."':\n"..errmsg) -end -local f = io.open(tmpfile, "w") -f:close() - -io.write(".") -io.flush() - --- Change access time -local testdate = os.time({ year = 2007, day = 10, month = 2, hour=0}) -assert (lfs.touch (tmpfile, testdate)) -local new_att = assert (lfs.attributes (tmpfile)) -assert (new_att.access == testdate, "could not set access time") -assert (new_att.modification == testdate, "could not set modification time") - -io.write(".") -io.flush() - --- Change access and modification time -local testdate1 = os.time({ year = 2007, day = 10, month = 2, hour=0}) -local testdate2 = os.time({ year = 2007, day = 11, month = 2, hour=0}) - -assert (lfs.touch (tmpfile, testdate2, testdate1)) -local new_att = assert (lfs.attributes (tmpfile)) -assert (new_att.access == testdate2, "could not set access time") -assert (new_att.modification == testdate1, "could not set modification time") - -io.write(".") -io.flush() - --- Checking link (does not work on Windows) -if lfs.link (tmpfile, "_a_link_for_test_", true) then - assert (lfs.attributes"_a_link_for_test_".mode == "file") - assert (lfs.symlinkattributes"_a_link_for_test_".mode == "link") - assert (lfs.link (tmpfile, "_a_hard_link_for_test_")) - assert (lfs.attributes (tmpfile, "nlink") == 2) - assert (os.remove"_a_link_for_test_") - assert (os.remove"_a_hard_link_for_test_") -end - -io.write(".") -io.flush() - --- Checking text/binary modes (only has an effect in Windows) -local f = io.open(tmpfile, "w") -local result, mode = lfs.setmode(f, "binary") -assert(result) -- on non-Windows platforms, mode is always returned as "binary" -result, mode = lfs.setmode(f, "text") -assert(result and mode == "binary") -f:close() - -io.write(".") -io.flush() - --- Restore access time to current value -assert (lfs.touch (tmpfile, attrib.access, attrib.modification)) -new_att = assert (lfs.attributes (tmpfile)) -assert (new_att.access == attrib.access) -assert (new_att.modification == attrib.modification) - -io.write(".") -io.flush() - --- Check consistency of lfs.attributes values -local attr = lfs.attributes (tmpfile) -for key, value in pairs(attr) do - assert (value == lfs.attributes (tmpfile, key), - "lfs.attributes values not consistent") -end - --- Remove new file and directory -assert (os.remove (tmpfile), "could not remove new file") -assert (lfs.rmdir (tmpdir), "could not remove new directory") -assert (lfs.mkdir (tmpdir..sep.."lfs_tmp_dir") == nil, "could create a directory inside a non-existent one") - -io.write(".") -io.flush() - --- Trying to get attributes of a non-existent file -assert (lfs.attributes ("this couldn't be an actual file") == nil, "could get attributes of a non-existent file") -assert (type(lfs.attributes (upper)) == "table", "couldn't get attributes of upper directory") - -io.write(".") -io.flush() - --- Stressing directory iterator -count = 0 -for i = 1, 4000 do - for file in lfs.dir (tmp) do - count = count + 1 - end -end - -io.write(".") -io.flush() - --- Stressing directory iterator, explicit version -count = 0 -for i = 1, 4000 do - local iter, dir = lfs.dir(tmp) - local file = dir:next() - while file do - count = count + 1 - file = dir:next() - end - assert(not pcall(dir.next, dir)) -end - -io.write(".") -io.flush() - --- directory explicit close -local iter, dir = lfs.dir(tmp) -dir:close() -assert(not pcall(dir.next, dir)) -print"Ok!" diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/manifest b/Utils/luarocks/systree/lib/luarocks/rocks/manifest deleted file mode 100644 index b3bae3c19..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/manifest +++ /dev/null @@ -1,605 +0,0 @@ -commands = { - luadocumentor = { - "luadocumentor/0.1.5-1" - } -} -dependencies = { - checks = { - ["1.0-1"] = { - { - constraints = { - { - op = ">=", - version = { - 5, 1, string = "5.1" - } - } - }, - name = "lua" - } - } - }, - luadocumentor = { - ["0.1.5-1"] = { - { - constraints = { - { - op = "~>", - version = { - 5, 1, string = "5.1" - } - } - }, - name = "lua" - }, - { - constraints = { - { - op = "~>", - version = { - 1, 6, string = "1.6" - } - } - }, - name = "luafilesystem" - }, - { - constraints = { - { - op = "~>", - version = { - 0, 32, string = "0.32" - } - } - }, - name = "markdown" - }, - { - constraints = { - { - op = "~>", - version = { - 0, 7, string = "0.7" - } - } - }, - name = "metalua-compiler" - }, - { - constraints = { - { - op = "~>", - version = { - 0, 9, string = "0.9" - } - } - }, - name = "penlight" - } - } - }, - luafilesystem = { - ["1.6.3-2"] = { - { - constraints = { - { - op = ">=", - version = { - 5, 1, string = "5.1" - } - } - }, - name = "lua" - } - } - }, - markdown = { - ["0.32-2"] = { - { - constraints = { - { - op = ">=", - version = { - 5, 1, string = "5.1" - } - } - }, - name = "lua" - } - } - }, - ["metalua-compiler"] = { - ["0.7.3-1"] = { - { - constraints = { - { - op = "~>", - version = { - 5, 1, string = "5.1" - } - } - }, - name = "lua" - }, - { - constraints = { - { - op = "~>", - version = { - 1, 6, string = "1.6" - } - } - }, - name = "luafilesystem" - }, - { - constraints = { - { - op = ">=", - version = { - 0, 7, 3, string = "0.7.3" - } - } - }, - name = "metalua-parser" - } - } - }, - ["metalua-parser"] = { - ["0.7.3-2"] = { - { - constraints = { - { - op = ">=", - version = { - 5, 1, string = "5.1" - } - } - }, - name = "lua" - } - } - }, - penlight = { - ["0.9.8-1"] = { - { - constraints = {}, - name = "luafilesystem" - } - } - } -} -modules = { - checks = { - "checks/1.0-1" - }, - defaultcss = { - "luadocumentor/0.1.5-1" - }, - docgenerator = { - "luadocumentor/0.1.5-1" - }, - extractors = { - "luadocumentor/0.1.5-1" - }, - ["fs.lfs"] = { - "luadocumentor/0.1.5-1" - }, - lddextractor = { - "luadocumentor/0.1.5-1" - }, - lfs = { - "luafilesystem/1.6.3-2" - }, - markdown = { - "markdown/0.32-2" - }, - ["metalua.compiler"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.compiler.bytecode"] = { - "metalua-compiler/0.7.3-1" - }, - ["metalua.compiler.bytecode.compile"] = { - "metalua-compiler/0.7.3-1" - }, - ["metalua.compiler.bytecode.lcode"] = { - "metalua-compiler/0.7.3-1" - }, - ["metalua.compiler.bytecode.ldump"] = { - "metalua-compiler/0.7.3-1" - }, - ["metalua.compiler.bytecode.lopcodes"] = { - "metalua-compiler/0.7.3-1" - }, - ["metalua.compiler.globals"] = { - "metalua-compiler/0.7.3-1" - }, - ["metalua.compiler.parser"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.compiler.parser.annot.generator"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.compiler.parser.annot.grammar"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.compiler.parser.expr"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.compiler.parser.ext"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.compiler.parser.lexer"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.compiler.parser.meta"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.compiler.parser.misc"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.compiler.parser.stat"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.compiler.parser.table"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.grammar.generator"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.grammar.lexer"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua.loader"] = { - "metalua-compiler/0.7.3-1" - }, - ["metalua.pprint"] = { - "metalua-parser/0.7.3-2" - }, - ["metalua/compiler/ast_to_src.mlua"] = { - "metalua-compiler/0.7.3-1" - }, - ["metalua/extension/comprehension.mlua"] = { - "metalua-compiler/0.7.3-1" - }, - ["metalua/extension/match.mlua"] = { - "metalua-compiler/0.7.3-1" - }, - ["metalua/repl.mlua"] = { - "metalua-compiler/0.7.3-1" - }, - ["metalua/treequery.mlua"] = { - "metalua-compiler/0.7.3-1" - }, - ["metalua/treequery/walk.mlua"] = { - "metalua-compiler/0.7.3-1" - }, - ["models.apimodel"] = { - "luadocumentor/0.1.5-1" - }, - ["models.apimodelbuilder"] = { - "luadocumentor/0.1.5-1" - }, - ["models.internalmodel"] = { - "luadocumentor/0.1.5-1" - }, - ["models.ldparser"] = { - "luadocumentor/0.1.5-1" - }, - ["models/internalmodelbuilder.mlua"] = { - "luadocumentor/0.1.5-1" - }, - pl = { - "penlight/0.9.8-1" - }, - ["pl.Date"] = { - "penlight/0.9.8-1" - }, - ["pl.List"] = { - "penlight/0.9.8-1" - }, - ["pl.Map"] = { - "penlight/0.9.8-1" - }, - ["pl.MultiMap"] = { - "penlight/0.9.8-1" - }, - ["pl.OrderedMap"] = { - "penlight/0.9.8-1" - }, - ["pl.Set"] = { - "penlight/0.9.8-1" - }, - ["pl.app"] = { - "penlight/0.9.8-1" - }, - ["pl.array2d"] = { - "penlight/0.9.8-1" - }, - ["pl.class"] = { - "penlight/0.9.8-1" - }, - ["pl.comprehension"] = { - "penlight/0.9.8-1" - }, - ["pl.config"] = { - "penlight/0.9.8-1" - }, - ["pl.data"] = { - "penlight/0.9.8-1" - }, - ["pl.dir"] = { - "penlight/0.9.8-1" - }, - ["pl.file"] = { - "penlight/0.9.8-1" - }, - ["pl.func"] = { - "penlight/0.9.8-1" - }, - ["pl.input"] = { - "penlight/0.9.8-1" - }, - ["pl.lapp"] = { - "penlight/0.9.8-1" - }, - ["pl.lexer"] = { - "penlight/0.9.8-1" - }, - ["pl.luabalanced"] = { - "penlight/0.9.8-1" - }, - ["pl.operator"] = { - "penlight/0.9.8-1" - }, - ["pl.path"] = { - "penlight/0.9.8-1" - }, - ["pl.permute"] = { - "penlight/0.9.8-1" - }, - ["pl.platf.luajava"] = { - "penlight/0.9.8-1" - }, - ["pl.pretty"] = { - "penlight/0.9.8-1" - }, - ["pl.seq"] = { - "penlight/0.9.8-1" - }, - ["pl.sip"] = { - "penlight/0.9.8-1" - }, - ["pl.strict"] = { - "penlight/0.9.8-1" - }, - ["pl.stringio"] = { - "penlight/0.9.8-1" - }, - ["pl.stringx"] = { - "penlight/0.9.8-1" - }, - ["pl.tablex"] = { - "penlight/0.9.8-1" - }, - ["pl.template"] = { - "penlight/0.9.8-1" - }, - ["pl.test"] = { - "penlight/0.9.8-1" - }, - ["pl.text"] = { - "penlight/0.9.8-1" - }, - ["pl.utils"] = { - "penlight/0.9.8-1" - }, - ["pl.xml"] = { - "penlight/0.9.8-1" - }, - ["template.file"] = { - "luadocumentor/0.1.5-1" - }, - ["template.index"] = { - "luadocumentor/0.1.5-1" - }, - ["template.index.recordtypedef"] = { - "luadocumentor/0.1.5-1" - }, - ["template.item"] = { - "luadocumentor/0.1.5-1" - }, - ["template.page"] = { - "luadocumentor/0.1.5-1" - }, - ["template.recordtypedef"] = { - "luadocumentor/0.1.5-1" - }, - ["template.usage"] = { - "luadocumentor/0.1.5-1" - }, - ["template.utils"] = { - "luadocumentor/0.1.5-1" - }, - templateengine = { - "luadocumentor/0.1.5-1" - } -} -repository = { - checks = { - ["1.0-1"] = { - { - arch = "installed", - commands = {}, - dependencies = {}, - modules = { - checks = "checks.dll" - } - } - } - }, - luadocumentor = { - ["0.1.5-1"] = { - { - arch = "installed", - commands = { - luadocumentor = "luadocumentor" - }, - dependencies = { - luafilesystem = "1.6.3-2", - markdown = "0.32-2", - ["metalua-compiler"] = "0.7.3-1", - ["metalua-parser"] = "0.7.3-2", - penlight = "0.9.8-1" - }, - modules = { - defaultcss = "defaultcss.lua", - docgenerator = "docgenerator.lua", - extractors = "extractors.lua", - ["fs.lfs"] = "fs/lfs.lua", - lddextractor = "lddextractor.lua", - ["models.apimodel"] = "models/apimodel.lua", - ["models.apimodelbuilder"] = "models/apimodelbuilder.lua", - ["models.internalmodel"] = "models/internalmodel.lua", - ["models.ldparser"] = "models/ldparser.lua", - ["models/internalmodelbuilder.mlua"] = "models/internalmodelbuilder.mlua", - ["template.file"] = "template/file.lua", - ["template.index"] = "template/index.lua", - ["template.index.recordtypedef"] = "template/index/recordtypedef.lua", - ["template.item"] = "template/item.lua", - ["template.page"] = "template/page.lua", - ["template.recordtypedef"] = "template/recordtypedef.lua", - ["template.usage"] = "template/usage.lua", - ["template.utils"] = "template/utils.lua", - templateengine = "templateengine.lua" - } - } - } - }, - luafilesystem = { - ["1.6.3-2"] = { - { - arch = "installed", - commands = {}, - dependencies = {}, - modules = { - lfs = "lfs.dll" - } - } - } - }, - markdown = { - ["0.32-2"] = { - { - arch = "installed", - commands = {}, - dependencies = {}, - modules = { - markdown = "markdown.lua" - } - } - } - }, - ["metalua-compiler"] = { - ["0.7.3-1"] = { - { - arch = "installed", - commands = {}, - dependencies = { - luafilesystem = "1.6.3-2", - ["metalua-parser"] = "0.7.3-2" - }, - modules = { - ["metalua.compiler.bytecode"] = "metalua/compiler/bytecode.lua", - ["metalua.compiler.bytecode.compile"] = "metalua/compiler/bytecode/compile.lua", - ["metalua.compiler.bytecode.lcode"] = "metalua/compiler/bytecode/lcode.lua", - ["metalua.compiler.bytecode.ldump"] = "metalua/compiler/bytecode/ldump.lua", - ["metalua.compiler.bytecode.lopcodes"] = "metalua/compiler/bytecode/lopcodes.lua", - ["metalua.compiler.globals"] = "metalua/compiler/globals.lua", - ["metalua.loader"] = "metalua/loader.lua", - ["metalua/compiler/ast_to_src.mlua"] = "metalua/compiler/ast_to_src.mlua", - ["metalua/extension/comprehension.mlua"] = "metalua/extension/comprehension.mlua", - ["metalua/extension/match.mlua"] = "metalua/extension/match.mlua", - ["metalua/repl.mlua"] = "metalua/repl.mlua", - ["metalua/treequery.mlua"] = "metalua/treequery.mlua", - ["metalua/treequery/walk.mlua"] = "metalua/treequery/walk.mlua" - } - } - } - }, - ["metalua-parser"] = { - ["0.7.3-2"] = { - { - arch = "installed", - commands = {}, - dependencies = {}, - modules = { - ["metalua.compiler"] = "metalua/compiler.lua", - ["metalua.compiler.parser"] = "metalua/compiler/parser.lua", - ["metalua.compiler.parser.annot.generator"] = "metalua/compiler/parser/annot/generator.lua", - ["metalua.compiler.parser.annot.grammar"] = "metalua/compiler/parser/annot/grammar.lua", - ["metalua.compiler.parser.expr"] = "metalua/compiler/parser/expr.lua", - ["metalua.compiler.parser.ext"] = "metalua/compiler/parser/ext.lua", - ["metalua.compiler.parser.lexer"] = "metalua/compiler/parser/lexer.lua", - ["metalua.compiler.parser.meta"] = "metalua/compiler/parser/meta.lua", - ["metalua.compiler.parser.misc"] = "metalua/compiler/parser/misc.lua", - ["metalua.compiler.parser.stat"] = "metalua/compiler/parser/stat.lua", - ["metalua.compiler.parser.table"] = "metalua/compiler/parser/table.lua", - ["metalua.grammar.generator"] = "metalua/grammar/generator.lua", - ["metalua.grammar.lexer"] = "metalua/grammar/lexer.lua", - ["metalua.pprint"] = "metalua/pprint.lua" - } - } - } - }, - penlight = { - ["0.9.8-1"] = { - { - arch = "installed", - commands = {}, - dependencies = { - luafilesystem = "1.6.3-2" - }, - modules = { - pl = "pl/init.lua", - ["pl.Date"] = "pl/Date.lua", - ["pl.List"] = "pl/List.lua", - ["pl.Map"] = "pl/Map.lua", - ["pl.MultiMap"] = "pl/MultiMap.lua", - ["pl.OrderedMap"] = "pl/OrderedMap.lua", - ["pl.Set"] = "pl/Set.lua", - ["pl.app"] = "pl/app.lua", - ["pl.array2d"] = "pl/array2d.lua", - ["pl.class"] = "pl/class.lua", - ["pl.comprehension"] = "pl/comprehension.lua", - ["pl.config"] = "pl/config.lua", - ["pl.data"] = "pl/data.lua", - ["pl.dir"] = "pl/dir.lua", - ["pl.file"] = "pl/file.lua", - ["pl.func"] = "pl/func.lua", - ["pl.input"] = "pl/input.lua", - ["pl.lapp"] = "pl/lapp.lua", - ["pl.lexer"] = "pl/lexer.lua", - ["pl.luabalanced"] = "pl/luabalanced.lua", - ["pl.operator"] = "pl/operator.lua", - ["pl.path"] = "pl/path.lua", - ["pl.permute"] = "pl/permute.lua", - ["pl.platf.luajava"] = "pl/platf/luajava.lua", - ["pl.pretty"] = "pl/pretty.lua", - ["pl.seq"] = "pl/seq.lua", - ["pl.sip"] = "pl/sip.lua", - ["pl.strict"] = "pl/strict.lua", - ["pl.stringio"] = "pl/stringio.lua", - ["pl.stringx"] = "pl/stringx.lua", - ["pl.tablex"] = "pl/tablex.lua", - ["pl.template"] = "pl/template.lua", - ["pl.test"] = "pl/test.lua", - ["pl.text"] = "pl/text.lua", - ["pl.utils"] = "pl/utils.lua", - ["pl.xml"] = "pl/xml.lua" - } - } - } - } -} diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/markdown/0.32-2/markdown-0.32-2.rockspec b/Utils/luarocks/systree/lib/luarocks/rocks/markdown/0.32-2/markdown-0.32-2.rockspec deleted file mode 100644 index abbfc89e1..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/markdown/0.32-2/markdown-0.32-2.rockspec +++ /dev/null @@ -1,23 +0,0 @@ -package = "Markdown" -version = "0.32-2" -source = { - url = "http://www.frykholm.se/files/markdown-0.32.tar.gz", - dir = "." -} -description = { - summary = "Markdown text-to-html markup system.", - detailed = [[ - A pure-lua implementation of the Markdown text-to-html markup system. - ]], - license = "MIT", - homepage = "http://www.frykholm.se/files/markdown.lua" -} -dependencies = { - "lua >= 5.1", -} -build = { - type = "none", - install = { - lua = { "markdown.lua" }, - } -} diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/markdown/0.32-2/rock_manifest b/Utils/luarocks/systree/lib/luarocks/rocks/markdown/0.32-2/rock_manifest deleted file mode 100644 index 8f3d633ca..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/markdown/0.32-2/rock_manifest +++ /dev/null @@ -1,6 +0,0 @@ -rock_manifest = { - lua = { - ["markdown.lua"] = "0ea5f9d6d22a6c9aa4fdf63cf1d7d066" - }, - ["markdown-0.32-2.rockspec"] = "83f0335058d8fbd078d4f2c1ce941df0" -} diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/metalua-compiler/0.7.3-1/doc/README-compiler.md b/Utils/luarocks/systree/lib/luarocks/rocks/metalua-compiler/0.7.3-1/doc/README-compiler.md deleted file mode 100644 index b2679cdb5..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/metalua-compiler/0.7.3-1/doc/README-compiler.md +++ /dev/null @@ -1,104 +0,0 @@ -Metalua Compiler -================ - -## Metalua compiler - -This module `metalua-compiler` depends on `metalua-parser`. Its main -feature is to compile ASTs into Lua 5.1 bytecode, allowing to convert -them into bytecode files and executable functions. This opens the -following possibilities: - -* compiler objects generated with `require 'metalua.compiler'.new()` - support methods `:xxx_to_function()` and `:xxx_to_bytecode()`; - -* Compile-time meta-programming: use of `-{...}` splices in source - code, to generate code during compilation; - -* Some syntax extensions, such as structural pattern matching and - lists by comprehension; - -* Some AST manipulation facilities such as `treequery`, which are - implemented with Metalua syntax extensions. - -## What's new in Metalua 0.7 - -This is a major overhaul of the compiler's architecture. Some of the -most noteworthy changes are: - -* No more installation or bootstrap script. Some Metalua source files - have been rewritten in plain Lua, and module sources have been - refactored, so that if you just drop the `metalua` folder somewhere - in your `LUA_PATH`, it works. - -* The compiler can be cut in two parts: - - * a parser which generates ASTs out of Lua sources, and should be - either portable or easily ported to Lua 5.2; - - * a compiler, which can turn sources and AST into executable - Lua 5.1 bytecode and run it. It also supports compile-time - meta-programming, i.e. code included between `-{ ... }` is - executed during compilation, and the ASTs it produces are - included in the resulting bytecode. - -* Both parts are packaged as separate LuaRocks, `metalua-parser` and - `metalua-compiler` respectively, so that you can install the former - without the latter. - -* The parser is not a unique object anymore. Instead, - `require "metalua.compiler".new()` returns a different compiler - instance every time it's called. Compiler instances can be reused on - as many source files as wanted, but extending one instance's grammar - doesn't affect other compiler instances. - -* Included standard library has been shed. There are too many standard - libs in Lua, and none of them is standard enough, offering - yet-another-one, coupled with a specific compiler can only add to - confusion. - -* Many syntax extensions, which either were arguably more code samples - than actual production-ready tools, or relied too heavily on the - removed runtime standard libraries, have been removed. - -* The remaining libraries and samples are: - - * `metalua.compiler` converts sources into ASTs, bytecode, - functions, and ASTs back into sources. - - * `metalua` compiles and/or executes files from the command line, - can start an interactive REPL session. - - * `metalua.loader` adds a package loader which allows to use modules - written in Metalua, even from a plain Lua program. - - * `metalua.treequery` is an advanced DSL allowing to search ASTs in - a smart way, e.g. "_search `return` statements which return a - `local` variable but aren't in a nested `function`_". - - * `metalua.extension.comprehension` is a language extension which - supports lists by comprehension - (`even = { i for i=1, 100 if i%2==0 }`) and improved loops - (`for i=1, 10 for j=1,10 if i~=j do print(i,j) end`). - - * `metalua.extension.match` is a language extension which offers - Haskell/ML structural pattern matching - (``match AST with `Function{ args, body } -> ... | `Number{ 0 } -> ...end``) - - * **TODO Move basic extensions in a separate module.** - -* To remove the compilation speed penalty associated with - metaprogramming, when environment variable `LUA_MCACHE` or Lua - variable `package.mcache` is defined and LuaFileSystem is available, - the results of Metalua source compilations is cached. Unless the - source file is more recent than the latest cached bytecode file, the - latter is loaded instead of the former. - -* The Luarock install for the full compiler lists dependencies towards - Readline, LuaFileSytem, and Alt-Getopts. Those projects are - optional, but having them automatically installed by LuaRocks offers - a better user experience. - -* The license has changed from MIT to double license MIT + EPL. This - has been done in order to provide the IP guarantees expected by the - Eclipse Foundation, to include Metalua in Eclipse's - [Lua Development Tools](http://www.eclipse.org/koneki/ldt/). diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/metalua-compiler/0.7.3-1/doc/README-parser.md b/Utils/luarocks/systree/lib/luarocks/rocks/metalua-compiler/0.7.3-1/doc/README-parser.md deleted file mode 100644 index 98e34ee43..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/metalua-compiler/0.7.3-1/doc/README-parser.md +++ /dev/null @@ -1,177 +0,0 @@ -Metalua Parser -============== - -`metalua-parser` is a subset of the Metalua compiler, which turns -valid Lua source files and strings into abstract syntax trees -(AST). This README includes a description of this AST format. People -interested by Lua code analysis and generation are encouraged to -produce and/or consume this format to represent ASTs. - -It has been designed for Lua 5.1. It hasn't been tested against -Lua 5.2, but should be easily ported. - -## Usage - -Module `metalua.compiler` has a `new()` function, which returns a -compiler instance. This instance has a set of methods of the form -`:xxx_to_yyy(input)`, where `xxx` and `yyy` must be one of the -following: - -* `srcfile` the name of a Lua source file; -* `src` a string containing the Lua sources of a list of statements; -* `lexstream` a lexical tokens stream; -* `ast` an abstract syntax tree; -* `bytecode` a chunk of Lua bytecode that can be loaded in a Lua 5.1 - VM (not available if you only installed the parser); -* `function` an executable Lua function. - -Compiling into bytecode or executable functions requires the whole -Metalua compiler, not only the parser. The most frequently used -functions are `:src_to_ast(source_string)` and -`:srcfile_to_ast("path/to/source/file.lua")`. - - mlc = require 'metalua.compiler'.new() - ast = mlc :src_to_ast[[ return 123 ]] - -A compiler instance can be reused as much as you want; it's only -interesting to work with more than one compiler instance when you -start extending their grammars. - -## Abstract Syntax Trees definition - -### Notation - -Trees are written below with some Metalua syntax sugar, which -increases their readability. the backquote symbol introduces a `tag`, -i.e. a string stored in the `"tag"` field of a table: - -* `` `Foo{ 1, 2, 3 }`` is a shortcut for `{tag="Foo", 1, 2, 3}`; -* `` `Foo`` is a shortcut for `{tag="Foo"}`; -* `` `Foo 123`` is a shortcut for `` `Foo{ 123 }``, and therefore - `{tag="Foo", 123 }`; the expression after the tag must be a literal - number or string. - -When using a Metalua interpreter or compiler, the backtick syntax is -supported and can be used directly. Metalua's pretty-printing helpers -also try to use backtick syntax whenever applicable. - -### Tree elements - -Tree elements are mainly categorized into statements `stat`, -expressions `expr` and lists of statements `block`. Auxiliary -definitions include function applications/method invocation `apply`, -are both valid statements and expressions, expressions admissible on -the left-hand-side of an assignment statement `lhs`. - - block: { stat* } - - stat: - `Do{ stat* } - | `Set{ {lhs+} {expr+} } -- lhs1, lhs2... = e1, e2... - | `While{ expr block } -- while e do b end - | `Repeat{ block expr } -- repeat b until e - | `If{ (expr block)+ block? } -- if e1 then b1 [elseif e2 then b2] ... [else bn] end - | `Fornum{ ident expr expr expr? block } -- for ident = e, e[, e] do b end - | `Forin{ {ident+} {expr+} block } -- for i1, i2... in e1, e2... do b end - | `Local{ {ident+} {expr+}? } -- local i1, i2... = e1, e2... - | `Localrec{ ident expr } -- only used for 'local function' - | `Goto{ } -- goto str - | `Label{ } -- ::str:: - | `Return{ } -- return e1, e2... - | `Break -- break - | apply - - expr: - `Nil | `Dots | `True | `False - | `Number{ } - | `String{ } - | `Function{ { ident* `Dots? } block } - | `Table{ ( `Pair{ expr expr } | expr )* } - | `Op{ opid expr expr? } - | `Paren{ expr } -- significant to cut multiple values returns - | apply - | lhs - - apply: - `Call{ expr expr* } - | `Invoke{ expr `String{ } expr* } - - ident: `Id{ } - - lhs: ident | `Index{ expr expr } - - opid: 'add' | 'sub' | 'mul' | 'div' - | 'mod' | 'pow' | 'concat'| 'eq' - | 'lt' | 'le' | 'and' | 'or' - | 'not' | 'len' - -### Meta-data (lineinfo) - - -ASTs also embed some metadata, allowing to map them to their source -representation. Those informations are stored in a `"lineinfo"` field -in each tree node, which points to the range of characters in the -source string which represents it, and to the content of any comment -that would appear immediately before or after that node. - -Lineinfo objects have two fields, `"first"` and `"last"`, describing -respectively the beginning and the end of the subtree in the -sources. For instance, the sub-node ``Number{123}` produced by parsing -`[[return 123]]` will have `lineinfo.first` describing offset 8, and -`lineinfo.last` describing offset 10: - - - > mlc = require 'metalua.compiler'.new() - > ast = mlc :src_to_ast "return 123 -- comment" - > print(ast[1][1].lineinfo) - - > - -A lineinfo keeps track of character offsets relative to the beginning -of the source string/file ("K8-10" above), line numbers (L1 above; a -lineinfo spanning on several lines would read something like "L1-10"), -columns i.e. offset within the line ("C8-10" above), and a filename if -available (the "?" mark above indicating that we have no file name, as -the AST comes from a string). The final "|C>" indicates that there's a -comment immediately after the node; an initial " 5.1", -- Lua 5.2 bytecode not supported - "luafilesystem ~> 1.6", -- Cached compilation based on file timestamps - "metalua-parser >= 0.7.3", -- AST production -} - -build = { - type="builtin", - modules={ - ["metalua.compiler.bytecode"] = "metalua/compiler/bytecode.lua", - ["metalua.compiler.globals"] = "metalua/compiler/globals.lua", - ["metalua.compiler.bytecode.compile"] = "metalua/compiler/bytecode/compile.lua", - ["metalua.compiler.bytecode.lcode"] = "metalua/compiler/bytecode/lcode.lua", - ["metalua.compiler.bytecode.lopcodes"] = "metalua/compiler/bytecode/lopcodes.lua", - ["metalua.compiler.bytecode.ldump"] = "metalua/compiler/bytecode/ldump.lua", - ["metalua.loader"] = "metalua/loader.lua", - }, - install={ - lua={ - ["metalua.treequery"] = "metalua/treequery.mlua", - ["metalua.compiler.ast_to_src"] = "metalua/compiler/ast_to_src.mlua", - ["metalua.treequery.walk"] = "metalua/treequery/walk.mlua", - ["metalua.extension.match"] = "metalua/extension/match.mlua", - ["metalua.extension.comprehension"] = "metalua/extension/comprehension.mlua", - ["metalua.repl"] = "metalua/repl.mlua", - } - } -} diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/metalua-compiler/0.7.3-1/rock_manifest b/Utils/luarocks/systree/lib/luarocks/rocks/metalua-compiler/0.7.3-1/rock_manifest deleted file mode 100644 index 7452a8f94..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/metalua-compiler/0.7.3-1/rock_manifest +++ /dev/null @@ -1,33 +0,0 @@ -rock_manifest = { - doc = { - ["README-compiler.md"] = "292523d759247d210d32fb2f6153e0f4", - ["README-parser.md"] = "b44e3673d96dd296f2c0e92a6c87ee18", - ["README.md"] = "20bfb490cddef9e101e44688791abcda" - }, - lua = { - metalua = { - compiler = { - ["ast_to_src.mlua"] = "1309f76df37585ef8e1f67f748b07b22", - bytecode = { - ["compile.lua"] = "430e4a6fac8b64b5ebb3ae585ebae75a", - ["lcode.lua"] = "3ad8755ebe8ea8eca6b1d2846eec92c4", - ["ldump.lua"] = "295e1d9657fb0126ce3471b3366da694", - ["lopcodes.lua"] = "a0f15cfc93b026b0a868466d066f1d21" - }, - ["bytecode.lua"] = "1032e5233455fd4e504daf5d2893527b", - ["globals.lua"] = "80ae19c6e640de0746348c91633c4c55" - }, - extension = { - ["comprehension.mlua"] = "426f5856896bda4c3763bd5f61410685", - ["match.mlua"] = "79960265331e8b2f46199c2411a103de" - }, - ["loader.lua"] = "1cdbf6cdf6ca97c55540d068474f1d8a", - ["repl.mlua"] = "729456f3a8cc073788acee564a0495f0", - treequery = { - ["walk.mlua"] = "5159aaddbec55936f91ea4236f6451d3" - }, - ["treequery.mlua"] = "97ffcee0825ac3bc776d01566767b2e8" - } - }, - ["metalua-compiler-0.7.3-1.rockspec"] = "b3883b25641d862db6828300bb755d51" -} diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/metalua-parser/0.7.3-2/doc/README-compiler.md b/Utils/luarocks/systree/lib/luarocks/rocks/metalua-parser/0.7.3-2/doc/README-compiler.md deleted file mode 100644 index b2679cdb5..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/metalua-parser/0.7.3-2/doc/README-compiler.md +++ /dev/null @@ -1,104 +0,0 @@ -Metalua Compiler -================ - -## Metalua compiler - -This module `metalua-compiler` depends on `metalua-parser`. Its main -feature is to compile ASTs into Lua 5.1 bytecode, allowing to convert -them into bytecode files and executable functions. This opens the -following possibilities: - -* compiler objects generated with `require 'metalua.compiler'.new()` - support methods `:xxx_to_function()` and `:xxx_to_bytecode()`; - -* Compile-time meta-programming: use of `-{...}` splices in source - code, to generate code during compilation; - -* Some syntax extensions, such as structural pattern matching and - lists by comprehension; - -* Some AST manipulation facilities such as `treequery`, which are - implemented with Metalua syntax extensions. - -## What's new in Metalua 0.7 - -This is a major overhaul of the compiler's architecture. Some of the -most noteworthy changes are: - -* No more installation or bootstrap script. Some Metalua source files - have been rewritten in plain Lua, and module sources have been - refactored, so that if you just drop the `metalua` folder somewhere - in your `LUA_PATH`, it works. - -* The compiler can be cut in two parts: - - * a parser which generates ASTs out of Lua sources, and should be - either portable or easily ported to Lua 5.2; - - * a compiler, which can turn sources and AST into executable - Lua 5.1 bytecode and run it. It also supports compile-time - meta-programming, i.e. code included between `-{ ... }` is - executed during compilation, and the ASTs it produces are - included in the resulting bytecode. - -* Both parts are packaged as separate LuaRocks, `metalua-parser` and - `metalua-compiler` respectively, so that you can install the former - without the latter. - -* The parser is not a unique object anymore. Instead, - `require "metalua.compiler".new()` returns a different compiler - instance every time it's called. Compiler instances can be reused on - as many source files as wanted, but extending one instance's grammar - doesn't affect other compiler instances. - -* Included standard library has been shed. There are too many standard - libs in Lua, and none of them is standard enough, offering - yet-another-one, coupled with a specific compiler can only add to - confusion. - -* Many syntax extensions, which either were arguably more code samples - than actual production-ready tools, or relied too heavily on the - removed runtime standard libraries, have been removed. - -* The remaining libraries and samples are: - - * `metalua.compiler` converts sources into ASTs, bytecode, - functions, and ASTs back into sources. - - * `metalua` compiles and/or executes files from the command line, - can start an interactive REPL session. - - * `metalua.loader` adds a package loader which allows to use modules - written in Metalua, even from a plain Lua program. - - * `metalua.treequery` is an advanced DSL allowing to search ASTs in - a smart way, e.g. "_search `return` statements which return a - `local` variable but aren't in a nested `function`_". - - * `metalua.extension.comprehension` is a language extension which - supports lists by comprehension - (`even = { i for i=1, 100 if i%2==0 }`) and improved loops - (`for i=1, 10 for j=1,10 if i~=j do print(i,j) end`). - - * `metalua.extension.match` is a language extension which offers - Haskell/ML structural pattern matching - (``match AST with `Function{ args, body } -> ... | `Number{ 0 } -> ...end``) - - * **TODO Move basic extensions in a separate module.** - -* To remove the compilation speed penalty associated with - metaprogramming, when environment variable `LUA_MCACHE` or Lua - variable `package.mcache` is defined and LuaFileSystem is available, - the results of Metalua source compilations is cached. Unless the - source file is more recent than the latest cached bytecode file, the - latter is loaded instead of the former. - -* The Luarock install for the full compiler lists dependencies towards - Readline, LuaFileSytem, and Alt-Getopts. Those projects are - optional, but having them automatically installed by LuaRocks offers - a better user experience. - -* The license has changed from MIT to double license MIT + EPL. This - has been done in order to provide the IP guarantees expected by the - Eclipse Foundation, to include Metalua in Eclipse's - [Lua Development Tools](http://www.eclipse.org/koneki/ldt/). diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/metalua-parser/0.7.3-2/doc/README-parser.md b/Utils/luarocks/systree/lib/luarocks/rocks/metalua-parser/0.7.3-2/doc/README-parser.md deleted file mode 100644 index 98e34ee43..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/metalua-parser/0.7.3-2/doc/README-parser.md +++ /dev/null @@ -1,177 +0,0 @@ -Metalua Parser -============== - -`metalua-parser` is a subset of the Metalua compiler, which turns -valid Lua source files and strings into abstract syntax trees -(AST). This README includes a description of this AST format. People -interested by Lua code analysis and generation are encouraged to -produce and/or consume this format to represent ASTs. - -It has been designed for Lua 5.1. It hasn't been tested against -Lua 5.2, but should be easily ported. - -## Usage - -Module `metalua.compiler` has a `new()` function, which returns a -compiler instance. This instance has a set of methods of the form -`:xxx_to_yyy(input)`, where `xxx` and `yyy` must be one of the -following: - -* `srcfile` the name of a Lua source file; -* `src` a string containing the Lua sources of a list of statements; -* `lexstream` a lexical tokens stream; -* `ast` an abstract syntax tree; -* `bytecode` a chunk of Lua bytecode that can be loaded in a Lua 5.1 - VM (not available if you only installed the parser); -* `function` an executable Lua function. - -Compiling into bytecode or executable functions requires the whole -Metalua compiler, not only the parser. The most frequently used -functions are `:src_to_ast(source_string)` and -`:srcfile_to_ast("path/to/source/file.lua")`. - - mlc = require 'metalua.compiler'.new() - ast = mlc :src_to_ast[[ return 123 ]] - -A compiler instance can be reused as much as you want; it's only -interesting to work with more than one compiler instance when you -start extending their grammars. - -## Abstract Syntax Trees definition - -### Notation - -Trees are written below with some Metalua syntax sugar, which -increases their readability. the backquote symbol introduces a `tag`, -i.e. a string stored in the `"tag"` field of a table: - -* `` `Foo{ 1, 2, 3 }`` is a shortcut for `{tag="Foo", 1, 2, 3}`; -* `` `Foo`` is a shortcut for `{tag="Foo"}`; -* `` `Foo 123`` is a shortcut for `` `Foo{ 123 }``, and therefore - `{tag="Foo", 123 }`; the expression after the tag must be a literal - number or string. - -When using a Metalua interpreter or compiler, the backtick syntax is -supported and can be used directly. Metalua's pretty-printing helpers -also try to use backtick syntax whenever applicable. - -### Tree elements - -Tree elements are mainly categorized into statements `stat`, -expressions `expr` and lists of statements `block`. Auxiliary -definitions include function applications/method invocation `apply`, -are both valid statements and expressions, expressions admissible on -the left-hand-side of an assignment statement `lhs`. - - block: { stat* } - - stat: - `Do{ stat* } - | `Set{ {lhs+} {expr+} } -- lhs1, lhs2... = e1, e2... - | `While{ expr block } -- while e do b end - | `Repeat{ block expr } -- repeat b until e - | `If{ (expr block)+ block? } -- if e1 then b1 [elseif e2 then b2] ... [else bn] end - | `Fornum{ ident expr expr expr? block } -- for ident = e, e[, e] do b end - | `Forin{ {ident+} {expr+} block } -- for i1, i2... in e1, e2... do b end - | `Local{ {ident+} {expr+}? } -- local i1, i2... = e1, e2... - | `Localrec{ ident expr } -- only used for 'local function' - | `Goto{ } -- goto str - | `Label{ } -- ::str:: - | `Return{ } -- return e1, e2... - | `Break -- break - | apply - - expr: - `Nil | `Dots | `True | `False - | `Number{ } - | `String{ } - | `Function{ { ident* `Dots? } block } - | `Table{ ( `Pair{ expr expr } | expr )* } - | `Op{ opid expr expr? } - | `Paren{ expr } -- significant to cut multiple values returns - | apply - | lhs - - apply: - `Call{ expr expr* } - | `Invoke{ expr `String{ } expr* } - - ident: `Id{ } - - lhs: ident | `Index{ expr expr } - - opid: 'add' | 'sub' | 'mul' | 'div' - | 'mod' | 'pow' | 'concat'| 'eq' - | 'lt' | 'le' | 'and' | 'or' - | 'not' | 'len' - -### Meta-data (lineinfo) - - -ASTs also embed some metadata, allowing to map them to their source -representation. Those informations are stored in a `"lineinfo"` field -in each tree node, which points to the range of characters in the -source string which represents it, and to the content of any comment -that would appear immediately before or after that node. - -Lineinfo objects have two fields, `"first"` and `"last"`, describing -respectively the beginning and the end of the subtree in the -sources. For instance, the sub-node ``Number{123}` produced by parsing -`[[return 123]]` will have `lineinfo.first` describing offset 8, and -`lineinfo.last` describing offset 10: - - - > mlc = require 'metalua.compiler'.new() - > ast = mlc :src_to_ast "return 123 -- comment" - > print(ast[1][1].lineinfo) - - > - -A lineinfo keeps track of character offsets relative to the beginning -of the source string/file ("K8-10" above), line numbers (L1 above; a -lineinfo spanning on several lines would read something like "L1-10"), -columns i.e. offset within the line ("C8-10" above), and a filename if -available (the "?" mark above indicating that we have no file name, as -the AST comes from a string). The final "|C>" indicates that there's a -comment immediately after the node; an initial "= 5.1" -} -build = { - type="builtin", - modules={ - ["metalua.grammar.generator"] = "metalua/grammar/generator.lua", - ["metalua.grammar.lexer"] = "metalua/grammar/lexer.lua", - ["metalua.compiler.parser"] = "metalua/compiler/parser.lua", - ["metalua.compiler.parser.table"] = "metalua/compiler/parser/table.lua", - ["metalua.compiler.parser.ext"] = "metalua/compiler/parser/ext.lua", - ["metalua.compiler.parser.annot.generator"] = "metalua/compiler/parser/annot/generator.lua", - ["metalua.compiler.parser.annot.grammar"] = "metalua/compiler/parser/annot/grammar.lua", - ["metalua.compiler.parser.stat"] = "metalua/compiler/parser/stat.lua", - ["metalua.compiler.parser.misc"] = "metalua/compiler/parser/misc.lua", - ["metalua.compiler.parser.lexer"] = "metalua/compiler/parser/lexer.lua", - ["metalua.compiler.parser.meta"] = "metalua/compiler/parser/meta.lua", - ["metalua.compiler.parser.expr"] = "metalua/compiler/parser/expr.lua", - ["metalua.compiler"] = "metalua/compiler.lua", - ["metalua.pprint"] = "metalua/pprint.lua", - } -} diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/metalua-parser/0.7.3-2/rock_manifest b/Utils/luarocks/systree/lib/luarocks/rocks/metalua-parser/0.7.3-2/rock_manifest deleted file mode 100644 index 4640e3d33..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/metalua-parser/0.7.3-2/rock_manifest +++ /dev/null @@ -1,34 +0,0 @@ -rock_manifest = { - doc = { - ["README-compiler.md"] = "292523d759247d210d32fb2f6153e0f4", - ["README-parser.md"] = "b44e3673d96dd296f2c0e92a6c87ee18", - ["README.md"] = "20bfb490cddef9e101e44688791abcda" - }, - lua = { - metalua = { - compiler = { - parser = { - annot = { - ["generator.lua"] = "d86f7507d66ba6a3692a6f8611e9939b", - ["grammar.lua"] = "7d195bde7992efd9923771751b67b18f" - }, - ["expr.lua"] = "3a0b1984a6f92280e2e63b074fdcec10", - ["ext.lua"] = "a99e31a07bc390b826f6653bcc47d89b", - ["lexer.lua"] = "eac0f9d475d9dae4ea5a2724014cebec", - ["meta.lua"] = "12870bceda6395695020b739196e2a92", - ["misc.lua"] = "49d59f4fc1bfb77b36f78d4f87ae258f", - ["stat.lua"] = "83f10ac899be12ca4df58bbe8645299f", - ["table.lua"] = "5d2389e89603b7f78c731e6918aa1a9b" - }, - ["parser.lua"] = "e6ae68ce200de8071bb0fefad97f9b79" - }, - ["compiler.lua"] = "ca65ee9a3053581f4315821a31d0c1fd", - grammar = { - ["generator.lua"] = "b8a29e817d6798c12f40a230a0f6d0af", - ["lexer.lua"] = "7cb7c835479a9be884130eaacb9be60a" - }, - ["pprint.lua"] = "0b9bd8757b45c2d4be30106abcbd45b2" - } - }, - ["metalua-parser-0.7.3-2.rockspec"] = "a56680900b0b51701db7cd7abf49af92" -} diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/penlight/0.9.8-1/penlight-0.9.8-1.rockspec b/Utils/luarocks/systree/lib/luarocks/rocks/penlight/0.9.8-1/penlight-0.9.8-1.rockspec deleted file mode 100644 index d1d8b0f85..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/penlight/0.9.8-1/penlight-0.9.8-1.rockspec +++ /dev/null @@ -1,66 +0,0 @@ -package = "penlight" -version = "0.9.8-1" - -source = { - dir = "penlight-0.9.8", - url = "http://stevedonovan.github.com/files/penlight-0.9.8-core.zip", -} - -description = { - summary = "Lua utility libraries loosely based on the Python standard libraries", - homepage = "http://stevedonovan.github.com/Penlight", - license = "MIT/X11", - maintainer = "steve.j.donovan@gmail.com", - detailed = [[ -Penlight is a set of pure Lua libraries for making it easier to work with common tasks like -iterating over directories, reading configuration files and the like. Provides functional operations -on tables and sequences. -]] -} - -dependencies = { - "luafilesystem", -} - -build = { - type = "builtin", - modules = { - ["pl.strict"] = "lua/pl/strict.lua", - ["pl.dir"] = "lua/pl/dir.lua", - ["pl.operator"] = "lua/pl/operator.lua", - ["pl.input"] = "lua/pl/input.lua", - ["pl.config"] = "lua/pl/config.lua", - ["pl.seq"] = "lua/pl/seq.lua", - ["pl.stringio"] = "lua/pl/stringio.lua", - ["pl.text"] = "lua/pl/text.lua", - ["pl.test"] = "lua/pl/test.lua", - ["pl.tablex"] = "lua/pl/tablex.lua", - ["pl.app"] = "lua/pl/app.lua", - ["pl.stringx"] = "lua/pl/stringx.lua", - ["pl.lexer"] = "lua/pl/lexer.lua", - ["pl.utils"] = "lua/pl/utils.lua", - ["pl.sip"] = "lua/pl/sip.lua", - ["pl.permute"] = "lua/pl/permute.lua", - ["pl.pretty"] = "lua/pl/pretty.lua", - ["pl.class"] = "lua/pl/class.lua", - ["pl.List"] = "lua/pl/List.lua", - ["pl.data"] = "lua/pl/data.lua", - ["pl.Date"] = "lua/pl/Date.lua", - ["pl"] = "lua/pl/init.lua", - ["pl.luabalanced"] = "lua/pl/luabalanced.lua", - ["pl.comprehension"] = "lua/pl/comprehension.lua", - ["pl.path"] = "lua/pl/path.lua", - ["pl.array2d"] = "lua/pl/array2d.lua", - ["pl.func"] = "lua/pl/func.lua", - ["pl.lapp"] = "lua/pl/lapp.lua", - ["pl.file"] = "lua/pl/file.lua", - ['pl.template'] = "lua/pl/template.lua", - ["pl.Map"] = "lua/pl/Map.lua", - ["pl.MultiMap"] = "lua/pl/MultiMap.lua", - ["pl.OrderedMap"] = "lua/pl/OrderedMap.lua", - ["pl.Set"] = "lua/pl/Set.lua", - ["pl.xml"] = "lua/pl/xml.lua", - ["pl.platf.luajava"] = "lua/pl/platf/luajava.lua" - }, -} - diff --git a/Utils/luarocks/systree/lib/luarocks/rocks/penlight/0.9.8-1/rock_manifest b/Utils/luarocks/systree/lib/luarocks/rocks/penlight/0.9.8-1/rock_manifest deleted file mode 100644 index 8565ebbd3..000000000 --- a/Utils/luarocks/systree/lib/luarocks/rocks/penlight/0.9.8-1/rock_manifest +++ /dev/null @@ -1,45 +0,0 @@ -rock_manifest = { - lua = { - pl = { - ["Date.lua"] = "d2131d59151ce978c4db6a648fcd275a", - ["List.lua"] = "1236c5eb08956619daacd25a462a9682", - ["Map.lua"] = "0297a536ac0595ac59e8828f8c867f53", - ["MultiMap.lua"] = "e5f898fe2443e51c38825e9bc3d1aee5", - ["OrderedMap.lua"] = "bd8e39c59e22c582a33e2f025d3ae914", - ["Set.lua"] = "346ff7392fd4aeda418fb832e8da7a7f", - ["app.lua"] = "23ffb79e69a3fd679013cf82d95ed792", - ["array2d.lua"] = "77618ec2e2de4d6d237484dfd742cd73", - ["class.lua"] = "6f58bf39e7f90711b6840ad6955d258e", - ["comprehension.lua"] = "f8600ba945dde5d959194500a687c69f", - ["config.lua"] = "9ea3ce0ac3cdf2ce0e17f1353f32abb6", - ["data.lua"] = "be446ff813b5bcf30b4063601165df6a", - ["dir.lua"] = "3d60d4c1caeaabe199fe361e4e9b14a4", - ["file.lua"] = "f5c9527ea14b511d2cb9af80b219c562", - ["func.lua"] = "cc50d73512b6d0518f6587b82844de8c", - ["init.lua"] = "9232be7d8790d4f907972a00dec7949d", - ["input.lua"] = "bab7c64ca9a740df5e9fb9909610bbc4", - ["lapp.lua"] = "1cc81f048bc3fcd775c40cd9a2d601a7", - ["lexer.lua"] = "da0db5e323a2d37545ccb02592d0d3c8", - ["luabalanced.lua"] = "00b94a997a9ea4d73f54c10893f3b35f", - ["operator.lua"] = "e606629c738966cf497bb938457adebd", - ["path.lua"] = "b0714bc337c068b7252f64250fe59604", - ["permute.lua"] = "b0ed9ba2787119ef99468329a54ea16a", - platf = { - ["luajava.lua"] = "9c2898667281ad9501cc05a8e31a6f53" - }, - ["pretty.lua"] = "3ece64317ce05916eaba91fa96d9e7c0", - ["seq.lua"] = "e99e420345ab11120a7b741d8184920a", - ["sip.lua"] = "bde74f65e7246017d3ef034d178100ea", - ["strict.lua"] = "720e939931dbbe42fad8fd4e7736435e", - ["stringio.lua"] = "a8f4c786ea1b62f16ed05e6b09840044", - ["stringx.lua"] = "43f57755969c6b4001316226506a3744", - ["tablex.lua"] = "dec027cc3a3901766bd933c5fc0f3e93", - ["template.lua"] = "f358175bbb84c401c6213c953ce295a4", - ["test.lua"] = "1c45f7b1c438673f1eb668e2ca592f1c", - ["text.lua"] = "c30f90cab2d00186a6432e408ba1fe14", - ["utils.lua"] = "68cd38638a29b4ab5f1cc0eae38dce77", - ["xml.lua"] = "e13ed468c450fccb9a8e858a0f787eef" - } - }, - ["penlight-0.9.8-1.rockspec"] = "96edac3ff1d0ac57cb45d6551a56a775" -} diff --git a/Utils/luarocks/systree/share/lua/5.1/defaultcss.lua b/Utils/luarocks/systree/share/lua/5.1/defaultcss.lua deleted file mode 100644 index 2c2b331cc..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/defaultcss.lua +++ /dev/null @@ -1,270 +0,0 @@ -return [[html { - color: #000; - background: #FFF; -} -body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td { - margin: 0; - padding: 0; -} -table { - border-collapse: collapse; - border-spacing: 0; -} -fieldset,img { - border: 0; -} -address,caption,cite,code,dfn,em,strong,th,var,optgroup { - font-style: inherit; - font-weight: inherit; -} -del,ins { - text-decoration: none; -} -li { - list-style: bullet; - margin-left: 20px; -} -caption,th { - text-align: left; -} -h1,h2,h3,h4,h5,h6 { - font-size: 100%; - font-weight: bold; -} -q:before,q:after { - content: ''; -} -abbr,acronym { - border: 0; - font-variant: normal; -} -sup { - vertical-align: baseline; -} -sub { - vertical-align: baseline; -} -legend { - color: #000; -} -input,button,textarea,select,optgroup,option { - font-family: inherit; - font-size: inherit; - font-style: inherit; - font-weight: inherit; -} -input,button,textarea,select {*font-size:100%; -} -/* END RESET */ - -body { - margin-left: 1em; - margin-right: 1em; - font-family: arial, helvetica, geneva, sans-serif; - background-color: #ffffff; margin: 0px; -} - -code, tt { font-family: monospace; } - -body, p, td, th { font-size: .95em; line-height: 1.2em;} - -p, ul { margin: 10px 0 0 10px;} - -strong { font-weight: bold;} - -em { font-style: italic;} - -h1 { - font-size: 1.5em; - margin: 25px 0 20px 0; -} -h2, h3, h4 { margin: 15px 0 10px 0; } -h2 { font-size: 1.25em; } -h3 { font-size: 1.15em; } -h4 { font-size: 1.06em; } - -a:link { font-weight: bold; color: #004080; text-decoration: none; } -a:visited { font-weight: bold; color: #006699; text-decoration: none; } -a:link:hover { text-decoration: underline; } - -hr { - color:#cccccc; - background: #00007f; - height: 1px; -} - -blockquote { margin-left: 3em; } - -ul { list-style-type: disc; } - -p.name { - font-family: "Andale Mono", monospace; - padding-top: 1em; -} - -p:first-child { - margin-top: 0px; -} - -pre.example { - background-color: rgb(245, 245, 245); - border: 1px solid silver; - padding: 10px; - margin: 10px 0 10px 0; - font-family: "Andale Mono", monospace; - font-size: .85em; -} - -pre { - background-color: rgb(245, 245, 245); - border: 1px solid silver; - padding: 10px; - margin: 10px 0 10px 0; - font-family: "Andale Mono", monospace; -} - - -table.index { border: 1px #00007f; } -table.index td { text-align: left; vertical-align: top; } - -#container { - margin-left: 1em; - margin-right: 1em; - background-color: #f0f0f0; -} - -#product { - text-align: center; - border-bottom: 1px solid #cccccc; - background-color: #ffffff; -} - -#product big { - font-size: 2em; -} - -#main { - background-color: #f0f0f0; - border-left: 2px solid #cccccc; -} - -#navigation { - float: left; - width: 18em; - vertical-align: top; - background-color: #f0f0f0; - overflow: scroll; - position: fixed; - height:100%; -} - -#navigation h2 { - background-color:#e7e7e7; - font-size:1.1em; - color:#000000; - text-align: left; - padding:0.2em; - border-top:1px solid #dddddd; - border-bottom:1px solid #dddddd; -} - -#navigation ul -{ - font-size:1em; - list-style-type: none; - margin: 1px 1px 10px 1px; -} - -#navigation li { - text-indent: -1em; - display: block; - margin: 3px 0px 0px 22px; -} - -#navigation li li a { - margin: 0px 3px 0px -1em; -} - -#content { - margin-left: 18em; - padding: 1em; - border-left: 2px solid #cccccc; - border-right: 2px solid #cccccc; - background-color: #ffffff; -} - -#about { - clear: both; - padding: 5px; - border-top: 2px solid #cccccc; - background-color: #ffffff; -} - -@media print { - body { - font: 12pt "Times New Roman", "TimeNR", Times, serif; - } - a { font-weight: bold; color: #004080; text-decoration: underline; } - - #main { - background-color: #ffffff; - border-left: 0px; - } - - #container { - margin-left: 2%; - margin-right: 2%; - background-color: #ffffff; - } - - #content { - padding: 1em; - background-color: #ffffff; - } - - #navigation { - display: none; - } - pre.example { - font-family: "Andale Mono", monospace; - font-size: 10pt; - page-break-inside: avoid; - } -} - -table.module_list { - border-width: 1px; - border-style: solid; - border-color: #cccccc; - border-collapse: collapse; -} -table.module_list td { - border-width: 1px; - padding: 3px; - border-style: solid; - border-color: #cccccc; -} -table.module_list td.name { background-color: #f0f0f0; } -table.module_list td.summary { width: 100%; } - - -table.function_list { - border-width: 1px; - border-style: solid; - border-color: #cccccc; - border-collapse: collapse; -} -table.function_list td { - border-width: 1px; - padding: 3px; - border-style: solid; - border-color: #cccccc; -} -table.function_list td.name { background-color: #f0f0f0; } -table.function_list td.summary { width: 100%; } - -dl.table dt, dl.function dt {border-top: 1px solid #ccc; padding-top: 1em;} -dl.table dd, dl.function dd {padding-bottom: 1em; margin: 10px 0 0 20px;} -dl.table h3, dl.function h3 {font-size: .95em;} - -]] diff --git a/Utils/luarocks/systree/share/lua/5.1/docgenerator.lua b/Utils/luarocks/systree/share/lua/5.1/docgenerator.lua deleted file mode 100644 index 2a4d88812..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/docgenerator.lua +++ /dev/null @@ -1,87 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- - --- --- Load documentation generator and update its path --- -local templateengine = require 'templateengine' -for name, def in pairs( require 'template.utils' ) do - templateengine.env [ name ] = def -end - --- Load documentation extractor and set handled languages -local lddextractor = require 'lddextractor' - -local M = {} -M.defaultsitemainpagename = 'index' - -function M.generatedocforfiles(filenames, cssname,noheuristic) - if not filenames then return nil, 'No files provided.' end - -- - -- Generate API model elements for all files - -- - local generatedfiles = {} - local wrongfiles = {} - for _, filename in pairs( filenames ) do - -- Load file content - local file, error = io.open(filename, 'r') - if not file then return nil, 'Unable to read "'..filename..'"\n'..err end - local code = file:read('*all') - file:close() - -- Get module for current file - local apimodule, err = lddextractor.generateapimodule(filename, code,noheuristic) - - -- Handle modules with module name - if apimodule and apimodule.name then - generatedfiles[ apimodule.name ] = apimodule - elseif not apimodule then - -- Track faulty files - table.insert(wrongfiles, 'Unable to extract comments from "'..filename..'".\n'..err) - elseif not apimodule.name then - -- Do not generate documentation for unnamed modules - table.insert(wrongfiles, 'Unable to create documentation for "'..filename..'", no module name provided.') - end - end - -- - -- Defining index, which will summarize all modules - -- - local index = { - modules = generatedfiles, - name = M.defaultsitemainpagename, - tag='index' - } - generatedfiles[ M.defaultsitemainpagename ] = index - - -- - -- Define page cursor - -- - local page = { - currentmodule = nil, - headers = { [[]] }, - modules = generatedfiles, - tag = 'page' - } - - -- - -- Iterate over modules, generating complete doc pages - -- - for _, module in pairs( generatedfiles ) do - -- Update current cursor page - page.currentmodule = module - -- Generate page - local content, error = templateengine.applytemplate(page) - if not content then return nil, error end - module.body = content - end - return generatedfiles, wrongfiles -end -return M diff --git a/Utils/luarocks/systree/share/lua/5.1/extractors.lua b/Utils/luarocks/systree/share/lua/5.1/extractors.lua deleted file mode 100644 index aa5235ea9..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/extractors.lua +++ /dev/null @@ -1,102 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -local M = {} -require 'metalua.loader' -local compiler = require 'metalua.compiler' -local mlc = compiler.new() -local Q = require 'metalua.treequery' - --- Enable to retrieve all Javadoc-like comments from C code -function M.c(code) - if not code then return nil, 'No code provided' end - local comments = {} - -- Loop over comments stripping cosmetic '*' - for comment in code:gmatch('%s*/%*%*+(.-)%*+/') do - -- All Lua special comment are prefixed with an '-', - -- so we also comment C comment to make them compliant - table.insert(comments, '-'..comment) - end - return comments -end - --- Enable to retrieve "---" comments from Lua code -function M.lua( code ) - if not code then return nil, 'No code provided' end - - -- manage shebang - if code then code = code:gsub("^(#.-\n)", function (s) return string.rep(' ',string.len(s)) end) end - - -- check for errors - local f, err = loadstring(code,'source_to_check') - if not f then - return nil, 'Syntax error.\n' .. err - end - - -- Get ast from file - local status, ast = pcall(mlc.src_to_ast, mlc, code) - -- - -- Detect parsing errors - -- - if not status then - return nil, 'There might be a syntax error.\n' .. ast - end - - -- - -- Extract commented nodes from AST - -- - - -- Function enabling commented node selection - local function acceptcommentednode(node) - return node.lineinfo and ( node.lineinfo.last.comments or node.lineinfo.first.comments ) - end - - -- Fetch commented node from AST - local commentednodes = Q(ast):filter( acceptcommentednode ):list() - - -- Comment cache to avoid selecting same comment twice - local commentcache = {} - -- Will contain selected comments - local comments = {} - - -- Loop over commented nodes - for _, node in ipairs( commentednodes ) do - - -- A node can is relateds to comment before and after itself, - -- the following gathers them. - local commentlists = {} - if node.lineinfo and node.lineinfo.first.comments then - table.insert(commentlists, node.lineinfo.first.comments) - end - if node.lineinfo and node.lineinfo.last.comments then - table.insert(commentlists, node.lineinfo.last.comments) - end - -- Now that we have comments before and fater the node, - -- collect them in a single table - for _, list in ipairs( commentlists ) do - for _, commenttable in ipairs(list) do - -- Only select special comments - local firstcomment = #commenttable > 0 and #commenttable[1] > 0 and commenttable[1] - if firstcomment:sub(1, 1) == '-' then - for _, comment in ipairs( commenttable ) do - -- Only comments which were not already collected - if not commentcache[comment] then - commentcache[comment] = true - table.insert(comments, comment) - end - end - end - end - end - end - return comments -end -return M diff --git a/Utils/luarocks/systree/share/lua/5.1/fs/lfs.lua b/Utils/luarocks/systree/share/lua/5.1/fs/lfs.lua deleted file mode 100644 index 3fc513542..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/fs/lfs.lua +++ /dev/null @@ -1,130 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -local lfs = require 'lfs' -local M = {} -local function iswindows() - local p = io.popen("echo %os%") - if not p then - return false - end - local result =p:read("*l") - p:close() - return result == "Windows_NT" -end -M.separator = iswindows() and [[\]] or [[/]] ---- --- Will recursively browse given directories and list files encountered --- @param tab Table, list where files will be added --- @param dirorfiles list of path to browse in order to build list. --- Files from this list will be added to tab list. --- @return tab list, table containing all files from directories --- and files contained in dirorfile -local function appendfiles(tab, dirorfile) - - -- Nothing to process - if #dirorfile < 1 then return tab end - - -- Append all files to list - local dirs = {} - for _, path in ipairs( dirorfile ) do - -- Determine element nature - local elementnature = lfs.attributes (path, "mode") - - -- Handle files - if elementnature == 'file' then - table.insert(tab, path) - else if elementnature == 'directory' then - - -- Check if folder is accessible - local status, error = pcall(lfs.dir, path) - if not status then return nil, error end - - -- - -- Handle folders - -- - for diskelement in lfs.dir(path) do - - -- Format current file name - local currentfilename - if path:sub(#path) == M.separator then - currentfilename = path .. diskelement - else - currentfilename = path .. M.separator .. diskelement - end - - -- Handle folder elements - local nature, err = lfs.attributes (currentfilename, "mode") - -- Append file to current list - if nature == 'file' then - table.insert(tab, currentfilename) - elseif nature == 'directory' then - -- Avoid current and parent directory in order to avoid - -- endless recursion - if diskelement ~= '.' and diskelement ~= '..' then - -- Handle subfolders - table.insert(dirs, currentfilename) - end - end - end - end - end - end - -- If we only encountered files, going deeper is useless - if #dirs == 0 then return tab end - -- Append files from encountered directories - return appendfiles(tab, dirs) -end ---- --- Provide a list of files from a directory --- @param list Table of directories to browse --- @return table of string, path to files contained in given directories -function M.filelist(list) - if not list then return nil, 'No directory list provided' end - return appendfiles({}, list) -end -function M.checkdirectory( dirlist ) - if not dirlist then return false end - local missingdirs = {} - for _, filename in ipairs( dirlist ) do - if not lfs.attributes(filename, 'mode') then - table.insert(missingdirs, filename) - end - end - if #missingdirs > 0 then - return false, missingdirs - end - return true -end -function M.fill(filename, content) - -- - -- Ensure parent directory exists - -- - local parent = filename:gmatch([[(.*)]] .. M.separator ..[[(.+)]])() - local parentnature = lfs.attributes(parent, 'mode') - -- Create parent directory while absent - if not parentnature then - lfs.mkdir( parent ) - elseif parentnature ~= 'directory' then - -- Notify that disk element already exists - return nil, parent..' is a '..parentnature..'.' - end - - -- Create actual file - local file, error = io.open(filename, 'w') - if not file then - return nil, error - end - file:write( content ) - file:close() - return true -end -return M diff --git a/Utils/luarocks/systree/share/lua/5.1/lddextractor.lua b/Utils/luarocks/systree/share/lua/5.1/lddextractor.lua deleted file mode 100644 index b2cea2ea3..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/lddextractor.lua +++ /dev/null @@ -1,113 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -require 'metalua.loader' -local compiler = require 'metalua.compiler' -local mlc = compiler.new() -local M = {} - --- --- Define default supported languages --- -M.supportedlanguages = {} -local extractors = require 'extractors' - --- Support Lua comment extracting -M.supportedlanguages['lua'] = extractors.lua - --- Support C comment extracting -for _,c in ipairs({'c', 'cpp', 'c++'}) do - M.supportedlanguages[c] = extractors.c -end - --- Extract comment from code, --- type of code is deduced from filename extension -function M.extract(filename, code) - -- Check parameters - if not code then return nil, 'No code provided' end - if type(filename) ~= "string" then - return nil, 'No string for file name provided' - end - - -- Extract file extension - local fileextension = filename:gmatch('.*%.(.*)')() - if not fileextension then - return nil, 'File '..filename..' has no extension, could not determine how to extract documentation.' - end - - -- Check if it is possible to extract documentation from these files - local extractor = M.supportedlanguages[ fileextension ] - if not extractor then - return nil, 'Unable to extract documentation from '.. fileextension .. ' file.' - end - return extractor( code ) -end --- Generate a file gathering only comments from given code -function M.generatecommentfile(filename, code) - local comments, error = M.extract(filename, code) - if not comments then - return nil, 'Unable to generate comment file.\n'..error - end - local filecontent = {} - for _, comment in ipairs( comments ) do - table.insert(filecontent, "--[[") - table.insert(filecontent, comment) - table.insert(filecontent, "\n]]\n\n") - end - return table.concat(filecontent)..'return nil\n' -end --- Create API Model module from a 'comment only' lua file -function M.generateapimodule(filename, code,noheuristic) - if not filename then return nil, 'No file name given.' end - if not code then return nil, 'No code provided.' end - if type(filename) ~= "string" then return nil, 'No string for file name provided' end - - -- for non lua file get comment file - if filename:gmatch('.*%.(.*)')() ~= 'lua' then - local err - code, err = M.generatecommentfile(filename, code) - if not code then - return nil, 'Unable to create api module for "'..filename..'".\n'..err - end - else - - -- manage shebang - if code then code = code:gsub("^(#.-\n)", function (s) return string.rep(' ',string.len(s)) end) end - - -- check for errors - local f, err = loadstring(code,'source_to_check') - if not f then - return nil, 'File'..filename..'contains syntax error.\n' .. err - end - end - - local status, ast = pcall(mlc.src_to_ast, mlc, code) - if not status then - return nil, 'Unable to compute ast for "'..filename..'".\n'..ast - end - - -- Extract module name as the filename without extension - local modulename - local matcher = string.gmatch(filename,'.*/(.*)%..*$') - if matcher then modulename = matcher() end - - -- Create api model - local apimodelbuilder = require 'models.apimodelbuilder' - local _file, comment2apiobj = apimodelbuilder.createmoduleapi(ast, modulename) - - -- Create internal model - if not noheuristic then - local internalmodelbuilder = require "models.internalmodelbuilder" - local _internalcontent = internalmodelbuilder.createinternalcontent(ast,_file,comment2apiobj, modulename) - end - return _file -end -return M diff --git a/Utils/luarocks/systree/share/lua/5.1/markdown.lua b/Utils/luarocks/systree/share/lua/5.1/markdown.lua deleted file mode 100644 index b16d43b3d..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/markdown.lua +++ /dev/null @@ -1,1359 +0,0 @@ -#!/usr/bin/env lua - ---[[ -# markdown.lua -- version 0.32 - - - -**Author:** Niklas Frykholm, -**Date:** 31 May 2008 - -This is an implementation of the popular text markup language Markdown in pure Lua. -Markdown can convert documents written in a simple and easy to read text format -to well-formatted HTML. For a more thourough description of Markdown and the Markdown -syntax, see . - -The original Markdown source is written in Perl and makes heavy use of advanced -regular expression techniques (such as negative look-ahead, etc) which are not available -in Lua's simple regex engine. Therefore this Lua port has been rewritten from the ground -up. It is probably not completely bug free. If you notice any bugs, please report them to -me. A unit test that exposes the error is helpful. - -## Usage - - require "markdown" - markdown(source) - -``markdown.lua`` exposes a single global function named ``markdown(s)`` which applies the -Markdown transformation to the specified string. - -``markdown.lua`` can also be used directly from the command line: - - lua markdown.lua test.md - -Creates a file ``test.html`` with the converted content of ``test.md``. Run: - - lua markdown.lua -h - -For a description of the command-line options. - -``markdown.lua`` uses the same license as Lua, the MIT license. - -## License - -Copyright © 2008 Niklas Frykholm. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this -software and associated documentation files (the "Software"), to deal in the Software -without restriction, including without limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons -to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies -or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -## Version history - -- **0.32** -- 31 May 2008 - - Fix for links containing brackets -- **0.31** -- 1 Mar 2008 - - Fix for link definitions followed by spaces -- **0.30** -- 25 Feb 2008 - - Consistent behavior with Markdown when the same link reference is reused -- **0.29** -- 24 Feb 2008 - - Fix for
     blocks with spaces in them
    --	**0.28** -- 18 Feb 2008
    -	-	Fix for link encoding
    --	**0.27** -- 14 Feb 2008
    -	-	Fix for link database links with ()
    --	**0.26** -- 06 Feb 2008
    -	-	Fix for nested italic and bold markers
    --	**0.25** -- 24 Jan 2008
    -	-	Fix for encoding of naked <
    --	**0.24** -- 21 Jan 2008
    -	-	Fix for link behavior.
    --	**0.23** -- 10 Jan 2008
    -	-	Fix for a regression bug in longer expressions in italic or bold.
    --	**0.22** -- 27 Dec 2007
    -	-	Fix for crash when processing blocks with a percent sign in them.
    --	**0.21** -- 27 Dec 2007
    -	- 	Fix for combined strong and emphasis tags
    --	**0.20** -- 13 Oct 2007
    -	-	Fix for < as well in image titles, now matches Dingus behavior
    --	**0.19** -- 28 Sep 2007
    -	-	Fix for quotation marks " and ampersands & in link and image titles.
    --	**0.18** -- 28 Jul 2007
    -	-	Does not crash on unmatched tags (behaves like standard markdown)
    --	**0.17** -- 12 Apr 2007
    -	-	Fix for links with %20 in them.
    --	**0.16** -- 12 Apr 2007
    -	-	Do not require arg global to exist.
    --	**0.15** -- 28 Aug 2006
    -	-	Better handling of links with underscores in them.
    --	**0.14** -- 22 Aug 2006
    -	-	Bug for *`foo()`*
    --	**0.13** -- 12 Aug 2006
    -	-	Added -l option for including stylesheet inline in document.
    -	-	Fixed bug in -s flag.
    -	-	Fixed emphasis bug.
    --	**0.12** -- 15 May 2006
    -	-	Fixed several bugs to comply with MarkdownTest 1.0 
    --	**0.11** -- 12 May 2006
    -	-	Fixed bug for escaping `*` and `_` inside code spans.
    -	-	Added license terms.
    -	-	Changed join() to table.concat().
    --	**0.10** -- 3 May 2006
    -	-	Initial public release.
    -
    -// Niklas
    -]]
    -
    -
    --- Set up a table for holding local functions to avoid polluting the global namespace
    -local M = {}
    -local MT = {__index = _G}
    -setmetatable(M, MT)
    -setfenv(1, M)
    -
    -----------------------------------------------------------------------
    --- Utility functions
    -----------------------------------------------------------------------
    -
    --- Locks table t from changes, writes an error if someone attempts to change the table.
    --- This is useful for detecting variables that have "accidently" been made global. Something
    --- I tend to do all too much.
    -function lock(t)
    -	function lock_new_index(t, k, v)
    -		error("module has been locked -- " .. k .. " must be declared local", 2)
    -	end
    -
    -	local mt = {__newindex = lock_new_index}
    -	if getmetatable(t) then mt.__index = getmetatable(t).__index end
    -	setmetatable(t, mt)
    -end
    -
    --- Returns the result of mapping the values in table t through the function f
    -function map(t, f)
    -	local out = {}
    -	for k,v in pairs(t) do out[k] = f(v,k) end
    -	return out
    -end
    -
    --- The identity function, useful as a placeholder.
    -function identity(text) return text end
    -
    --- Functional style if statement. (NOTE: no short circuit evaluation)
    -function iff(t, a, b) if t then return a else return b end end
    -
    --- Splits the text into an array of separate lines.
    -function split(text, sep)
    -	sep = sep or "\n"
    -	local lines = {}
    -	local pos = 1
    -	while true do
    -		local b,e = text:find(sep, pos)
    -		if not b then table.insert(lines, text:sub(pos)) break end
    -		table.insert(lines, text:sub(pos, b-1))
    -		pos = e + 1
    -	end
    -	return lines
    -end
    -
    --- Converts tabs to spaces
    -function detab(text)
    -	local tab_width = 4
    -	local function rep(match)
    -		local spaces = -match:len()
    -		while spaces<1 do spaces = spaces + tab_width end
    -		return match .. string.rep(" ", spaces)
    -	end
    -	text = text:gsub("([^\n]-)\t", rep)
    -	return text
    -end
    -
    --- Applies string.find for every pattern in the list and returns the first match
    -function find_first(s, patterns, index)
    -	local res = {}
    -	for _,p in ipairs(patterns) do
    -		local match = {s:find(p, index)}
    -		if #match>0 and (#res==0 or match[1] < res[1]) then res = match end
    -	end
    -	return unpack(res)
    -end
    -
    --- If a replacement array is specified, the range [start, stop] in the array is replaced
    --- with the replacement array and the resulting array is returned. Without a replacement
    --- array the section of the array between start and stop is returned.
    -function splice(array, start, stop, replacement)
    -	if replacement then
    -		local n = stop - start + 1
    -		while n > 0 do
    -			table.remove(array, start)
    -			n = n - 1
    -		end
    -		for i,v in ipairs(replacement) do
    -			table.insert(array, start, v)
    -		end
    -		return array
    -	else
    -		local res = {}
    -		for i = start,stop do
    -			table.insert(res, array[i])
    -		end
    -		return res
    -	end
    -end
    -
    --- Outdents the text one step.
    -function outdent(text)
    -	text = "\n" .. text
    -	text = text:gsub("\n  ? ? ?", "\n")
    -	text = text:sub(2)
    -	return text
    -end
    -
    --- Indents the text one step.
    -function indent(text)
    -	text = text:gsub("\n", "\n    ")
    -	return text
    -end
    -
    --- Does a simple tokenization of html data. Returns the data as a list of tokens. 
    --- Each token is a table with a type field (which is either "tag" or "text") and
    --- a text field (which contains the original token data).
    -function tokenize_html(html)
    -	local tokens = {}
    -	local pos = 1
    -	while true do
    -		local start = find_first(html, {"", start)
    -		elseif html:match("^<%?", start) then
    -			_,stop = html:find("?>", start)
    -		else
    -			_,stop = html:find("%b<>", start)
    -		end
    -		if not stop then
    -			-- error("Could not match html tag " .. html:sub(start,start+30)) 
    -		 	table.insert(tokens, {type="text", text=html:sub(start, start)})
    -			pos = start + 1
    -		else
    -			table.insert(tokens, {type="tag", text=html:sub(start, stop)})
    -			pos = stop + 1
    -		end
    -	end
    -	return tokens
    -end
    -
    -----------------------------------------------------------------------
    --- Hash
    -----------------------------------------------------------------------
    -
    --- This is used to "hash" data into alphanumeric strings that are unique
    --- in the document. (Note that this is not cryptographic hash, the hash
    --- function is not one-way.) The hash procedure is used to protect parts
    --- of the document from further processing.
    -
    -local HASH = {
    -	-- Has the hash been inited.
    -	inited = false,
    -	
    -	-- The unique string prepended to all hash values. This is to ensure
    -	-- that hash values do not accidently coincide with an actual existing
    -	-- string in the document.
    -	identifier = "",
    -	
    -	-- Counter that counts up for each new hash instance.
    -	counter = 0,
    -	
    -	-- Hash table.
    -	table = {}
    -}
    -
    --- Inits hashing. Creates a hash_identifier that doesn't occur anywhere
    --- in the text.
    -function init_hash(text)
    -	HASH.inited = true
    -	HASH.identifier = ""
    -	HASH.counter = 0
    -	HASH.table = {}
    -	
    -	local s = "HASH"
    -	local counter = 0
    -	local id
    -	while true do
    -		id  = s .. counter
    -		if not text:find(id, 1, true) then break end
    -		counter = counter + 1
    -	end
    -	HASH.identifier = id
    -end
    -
    --- Returns the hashed value for s.
    -function hash(s)
    -	assert(HASH.inited)
    -	if not HASH.table[s] then
    -		HASH.counter = HASH.counter + 1
    -		local id = HASH.identifier .. HASH.counter .. "X"
    -		HASH.table[s] = id
    -	end
    -	return HASH.table[s]
    -end
    -
    -----------------------------------------------------------------------
    --- Protection
    -----------------------------------------------------------------------
    -
    --- The protection module is used to "protect" parts of a document
    --- so that they are not modified by subsequent processing steps. 
    --- Protected parts are saved in a table for later unprotection
    -
    --- Protection data
    -local PD = {
    -	-- Saved blocks that have been converted
    -	blocks = {},
    -
    -	-- Block level tags that will be protected
    -	tags = {"p", "div", "h1", "h2", "h3", "h4", "h5", "h6", "blockquote",
    -	"pre", "table", "dl", "ol", "ul", "script", "noscript", "form", "fieldset",
    -	"iframe", "math", "ins", "del"}
    -}
    -
    --- Pattern for matching a block tag that begins and ends in the leftmost
    --- column and may contain indented subtags, i.e.
    --- 
    --- A nested block. ---
    --- Nested data. ---
    ---
    -function block_pattern(tag) - return "\n<" .. tag .. ".-\n[ \t]*\n" -end - --- Pattern for matching a block tag that begins and ends with a newline -function line_pattern(tag) - return "\n<" .. tag .. ".-[ \t]*\n" -end - --- Protects the range of characters from start to stop in the text and --- returns the protected string. -function protect_range(text, start, stop) - local s = text:sub(start, stop) - local h = hash(s) - PD.blocks[h] = s - text = text:sub(1,start) .. h .. text:sub(stop) - return text -end - --- Protect every part of the text that matches any of the patterns. The first --- matching pattern is protected first, etc. -function protect_matches(text, patterns) - while true do - local start, stop = find_first(text, patterns) - if not start then break end - text = protect_range(text, start, stop) - end - return text -end - --- Protects blocklevel tags in the specified text -function protect(text) - -- First protect potentially nested block tags - text = protect_matches(text, map(PD.tags, block_pattern)) - -- Then protect block tags at the line level. - text = protect_matches(text, map(PD.tags, line_pattern)) - -- Protect
    and comment tags - text = protect_matches(text, {"\n]->[ \t]*\n"}) - text = protect_matches(text, {"\n[ \t]*\n"}) - return text -end - --- Returns true if the string s is a hash resulting from protection -function is_protected(s) - return PD.blocks[s] -end - --- Unprotects the specified text by expanding all the nonces -function unprotect(text) - for k,v in pairs(PD.blocks) do - v = v:gsub("%%", "%%%%") - text = text:gsub(k, v) - end - return text -end - - ----------------------------------------------------------------------- --- Block transform ----------------------------------------------------------------------- - --- The block transform functions transform the text on the block level. --- They work with the text as an array of lines rather than as individual --- characters. - --- Returns true if the line is a ruler of (char) characters. --- The line must contain at least three char characters and contain only spaces and --- char characters. -function is_ruler_of(line, char) - if not line:match("^[ %" .. char .. "]*$") then return false end - if not line:match("%" .. char .. ".*%" .. char .. ".*%" .. char) then return false end - return true -end - --- Identifies the block level formatting present in the line -function classify(line) - local info = {line = line, text = line} - - if line:match("^ ") then - info.type = "indented" - info.outdented = line:sub(5) - return info - end - - for _,c in ipairs({'*', '-', '_', '='}) do - if is_ruler_of(line, c) then - info.type = "ruler" - info.ruler_char = c - return info - end - end - - if line == "" then - info.type = "blank" - return info - end - - if line:match("^(#+)[ \t]*(.-)[ \t]*#*[ \t]*$") then - local m1, m2 = line:match("^(#+)[ \t]*(.-)[ \t]*#*[ \t]*$") - info.type = "header" - info.level = m1:len() - info.text = m2 - return info - end - - if line:match("^ ? ? ?(%d+)%.[ \t]+(.+)") then - local number, text = line:match("^ ? ? ?(%d+)%.[ \t]+(.+)") - info.type = "list_item" - info.list_type = "numeric" - info.number = 0 + number - info.text = text - return info - end - - if line:match("^ ? ? ?([%*%+%-])[ \t]+(.+)") then - local bullet, text = line:match("^ ? ? ?([%*%+%-])[ \t]+(.+)") - info.type = "list_item" - info.list_type = "bullet" - info.bullet = bullet - info.text= text - return info - end - - if line:match("^>[ \t]?(.*)") then - info.type = "blockquote" - info.text = line:match("^>[ \t]?(.*)") - return info - end - - if is_protected(line) then - info.type = "raw" - info.html = unprotect(line) - return info - end - - info.type = "normal" - return info -end - --- Find headers constisting of a normal line followed by a ruler and converts them to --- header entries. -function headers(array) - local i = 1 - while i <= #array - 1 do - if array[i].type == "normal" and array[i+1].type == "ruler" and - (array[i+1].ruler_char == "-" or array[i+1].ruler_char == "=") then - local info = {line = array[i].line} - info.text = info.line - info.type = "header" - info.level = iff(array[i+1].ruler_char == "=", 1, 2) - table.remove(array, i+1) - array[i] = info - end - i = i + 1 - end - return array -end - --- Find list blocks and convert them to protected data blocks -function lists(array, sublist) - local function process_list(arr) - local function any_blanks(arr) - for i = 1, #arr do - if arr[i].type == "blank" then return true end - end - return false - end - - local function split_list_items(arr) - local acc = {arr[1]} - local res = {} - for i=2,#arr do - if arr[i].type == "list_item" then - table.insert(res, acc) - acc = {arr[i]} - else - table.insert(acc, arr[i]) - end - end - table.insert(res, acc) - return res - end - - local function process_list_item(lines, block) - while lines[#lines].type == "blank" do - table.remove(lines) - end - - local itemtext = lines[1].text - for i=2,#lines do - itemtext = itemtext .. "\n" .. outdent(lines[i].line) - end - if block then - itemtext = block_transform(itemtext, true) - if not itemtext:find("
    ") then itemtext = indent(itemtext) end
    -				return "    
  • " .. itemtext .. "
  • " - else - local lines = split(itemtext) - lines = map(lines, classify) - lines = lists(lines, true) - lines = blocks_to_html(lines, true) - itemtext = table.concat(lines, "\n") - if not itemtext:find("
    ") then itemtext = indent(itemtext) end
    -				return "    
  • " .. itemtext .. "
  • " - end - end - - local block_list = any_blanks(arr) - local items = split_list_items(arr) - local out = "" - for _, item in ipairs(items) do - out = out .. process_list_item(item, block_list) .. "\n" - end - if arr[1].list_type == "numeric" then - return "
      \n" .. out .. "
    " - else - return "
      \n" .. out .. "
    " - end - end - - -- Finds the range of lines composing the first list in the array. A list - -- starts with (^ list_item) or (blank list_item) and ends with - -- (blank* $) or (blank normal). - -- - -- A sublist can start with just (list_item) does not need a blank... - local function find_list(array, sublist) - local function find_list_start(array, sublist) - if array[1].type == "list_item" then return 1 end - if sublist then - for i = 1,#array do - if array[i].type == "list_item" then return i end - end - else - for i = 1, #array-1 do - if array[i].type == "blank" and array[i+1].type == "list_item" then - return i+1 - end - end - end - return nil - end - local function find_list_end(array, start) - local pos = #array - for i = start, #array-1 do - if array[i].type == "blank" and array[i+1].type ~= "list_item" - and array[i+1].type ~= "indented" and array[i+1].type ~= "blank" then - pos = i-1 - break - end - end - while pos > start and array[pos].type == "blank" do - pos = pos - 1 - end - return pos - end - - local start = find_list_start(array, sublist) - if not start then return nil end - return start, find_list_end(array, start) - end - - while true do - local start, stop = find_list(array, sublist) - if not start then break end - local text = process_list(splice(array, start, stop)) - local info = { - line = text, - type = "raw", - html = text - } - array = splice(array, start, stop, {info}) - end - - -- Convert any remaining list items to normal - for _,line in ipairs(array) do - if line.type == "list_item" then line.type = "normal" end - end - - return array -end - --- Find and convert blockquote markers. -function blockquotes(lines) - local function find_blockquote(lines) - local start - for i,line in ipairs(lines) do - if line.type == "blockquote" then - start = i - break - end - end - if not start then return nil end - - local stop = #lines - for i = start+1, #lines do - if lines[i].type == "blank" or lines[i].type == "blockquote" then - elseif lines[i].type == "normal" then - if lines[i-1].type == "blank" then stop = i-1 break end - else - stop = i-1 break - end - end - while lines[stop].type == "blank" do stop = stop - 1 end - return start, stop - end - - local function process_blockquote(lines) - local raw = lines[1].text - for i = 2,#lines do - raw = raw .. "\n" .. lines[i].text - end - local bt = block_transform(raw) - if not bt:find("
    ") then bt = indent(bt) end
    -		return "
    \n " .. bt .. - "\n
    " - end - - while true do - local start, stop = find_blockquote(lines) - if not start then break end - local text = process_blockquote(splice(lines, start, stop)) - local info = { - line = text, - type = "raw", - html = text - } - lines = splice(lines, start, stop, {info}) - end - return lines -end - --- Find and convert codeblocks. -function codeblocks(lines) - local function find_codeblock(lines) - local start - for i,line in ipairs(lines) do - if line.type == "indented" then start = i break end - end - if not start then return nil end - - local stop = #lines - for i = start+1, #lines do - if lines[i].type ~= "indented" and lines[i].type ~= "blank" then - stop = i-1 - break - end - end - while lines[stop].type == "blank" do stop = stop - 1 end - return start, stop - end - - local function process_codeblock(lines) - local raw = detab(encode_code(outdent(lines[1].line))) - for i = 2,#lines do - raw = raw .. "\n" .. detab(encode_code(outdent(lines[i].line))) - end - return "
    " .. raw .. "\n
    " - end - - while true do - local start, stop = find_codeblock(lines) - if not start then break end - local text = process_codeblock(splice(lines, start, stop)) - local info = { - line = text, - type = "raw", - html = text - } - lines = splice(lines, start, stop, {info}) - end - return lines -end - --- Convert lines to html code -function blocks_to_html(lines, no_paragraphs) - local out = {} - local i = 1 - while i <= #lines do - local line = lines[i] - if line.type == "ruler" then - table.insert(out, "
    ") - elseif line.type == "raw" then - table.insert(out, line.html) - elseif line.type == "normal" then - local s = line.line - - while i+1 <= #lines and lines[i+1].type == "normal" do - i = i + 1 - s = s .. "\n" .. lines[i].line - end - - if no_paragraphs then - table.insert(out, span_transform(s)) - else - table.insert(out, "

    " .. span_transform(s) .. "

    ") - end - elseif line.type == "header" then - local s = "" .. span_transform(line.text) .. "" - table.insert(out, s) - else - table.insert(out, line.line) - end - i = i + 1 - end - return out -end - --- Perform all the block level transforms -function block_transform(text, sublist) - local lines = split(text) - lines = map(lines, classify) - lines = headers(lines) - lines = lists(lines, sublist) - lines = codeblocks(lines) - lines = blockquotes(lines) - lines = blocks_to_html(lines) - local text = table.concat(lines, "\n") - return text -end - --- Debug function for printing a line array to see the result --- of partial transforms. -function print_lines(lines) - for i, line in ipairs(lines) do - print(i, line.type, line.text or line.line) - end -end - ----------------------------------------------------------------------- --- Span transform ----------------------------------------------------------------------- - --- Functions for transforming the text at the span level. - --- These characters may need to be escaped because they have a special --- meaning in markdown. -escape_chars = "'\\`*_{}[]()>#+-.!'" -escape_table = {} - -function init_escape_table() - escape_table = {} - for i = 1,#escape_chars do - local c = escape_chars:sub(i,i) - escape_table[c] = hash(c) - end -end - --- Adds a new escape to the escape table. -function add_escape(text) - if not escape_table[text] then - escape_table[text] = hash(text) - end - return escape_table[text] -end - --- Escape characters that should not be disturbed by markdown. -function escape_special_chars(text) - local tokens = tokenize_html(text) - - local out = "" - for _, token in ipairs(tokens) do - local t = token.text - if token.type == "tag" then - -- In tags, encode * and _ so they don't conflict with their use in markdown. - t = t:gsub("%*", escape_table["*"]) - t = t:gsub("%_", escape_table["_"]) - else - t = encode_backslash_escapes(t) - end - out = out .. t - end - return out -end - --- Encode backspace-escaped characters in the markdown source. -function encode_backslash_escapes(t) - for i=1,escape_chars:len() do - local c = escape_chars:sub(i,i) - t = t:gsub("\\%" .. c, escape_table[c]) - end - return t -end - --- Unescape characters that have been encoded. -function unescape_special_chars(t) - local tin = t - for k,v in pairs(escape_table) do - k = k:gsub("%%", "%%%%") - t = t:gsub(v,k) - end - if t ~= tin then t = unescape_special_chars(t) end - return t -end - --- Encode/escape certain characters inside Markdown code runs. --- The point is that in code, these characters are literals, --- and lose their special Markdown meanings. -function encode_code(s) - s = s:gsub("%&", "&") - s = s:gsub("<", "<") - s = s:gsub(">", ">") - for k,v in pairs(escape_table) do - s = s:gsub("%"..k, v) - end - return s -end - --- Handle backtick blocks. -function code_spans(s) - s = s:gsub("\\\\", escape_table["\\"]) - s = s:gsub("\\`", escape_table["`"]) - - local pos = 1 - while true do - local start, stop = s:find("`+", pos) - if not start then return s end - local count = stop - start + 1 - -- Find a matching numbert of backticks - local estart, estop = s:find(string.rep("`", count), stop+1) - local brstart = s:find("\n", stop+1) - if estart and (not brstart or estart < brstart) then - local code = s:sub(stop+1, estart-1) - code = code:gsub("^[ \t]+", "") - code = code:gsub("[ \t]+$", "") - code = code:gsub(escape_table["\\"], escape_table["\\"] .. escape_table["\\"]) - code = code:gsub(escape_table["`"], escape_table["\\"] .. escape_table["`"]) - code = "" .. encode_code(code) .. "" - code = add_escape(code) - s = s:sub(1, start-1) .. code .. s:sub(estop+1) - pos = start + code:len() - else - pos = stop + 1 - end - end - return s -end - --- Encode alt text... enodes &, and ". -function encode_alt(s) - if not s then return s end - s = s:gsub('&', '&') - s = s:gsub('"', '"') - s = s:gsub('<', '<') - return s -end - --- Handle image references -function images(text) - local function reference_link(alt, id) - alt = encode_alt(alt:match("%b[]"):sub(2,-2)) - id = id:match("%[(.*)%]"):lower() - if id == "" then id = text:lower() end - link_database[id] = link_database[id] or {} - if not link_database[id].url then return nil end - local url = link_database[id].url or id - url = encode_alt(url) - local title = encode_alt(link_database[id].title) - if title then title = " title=\"" .. title .. "\"" else title = "" end - return add_escape ('' .. alt .. '") - end - - local function inline_link(alt, link) - alt = encode_alt(alt:match("%b[]"):sub(2,-2)) - local url, title = link:match("%(?[ \t]*['\"](.+)['\"]") - url = url or link:match("%(?%)") - url = encode_alt(url) - title = encode_alt(title) - if title then - return add_escape('' .. alt .. '') - else - return add_escape('' .. alt .. '') - end - end - - text = text:gsub("!(%b[])[ \t]*\n?[ \t]*(%b[])", reference_link) - text = text:gsub("!(%b[])(%b())", inline_link) - return text -end - --- Handle anchor references -function anchors(text) - local function reference_link(text, id) - text = text:match("%b[]"):sub(2,-2) - id = id:match("%b[]"):sub(2,-2):lower() - if id == "" then id = text:lower() end - link_database[id] = link_database[id] or {} - if not link_database[id].url then return nil end - local url = link_database[id].url or id - url = encode_alt(url) - local title = encode_alt(link_database[id].title) - if title then title = " title=\"" .. title .. "\"" else title = "" end - return add_escape("") .. text .. add_escape("") - end - - local function inline_link(text, link) - text = text:match("%b[]"):sub(2,-2) - local url, title = link:match("%(?[ \t]*['\"](.+)['\"]") - title = encode_alt(title) - url = url or link:match("%(?%)") or "" - url = encode_alt(url) - if title then - return add_escape("") .. text .. "" - else - return add_escape("") .. text .. add_escape("") - end - end - - text = text:gsub("(%b[])[ \t]*\n?[ \t]*(%b[])", reference_link) - text = text:gsub("(%b[])(%b())", inline_link) - return text -end - --- Handle auto links, i.e. . -function auto_links(text) - local function link(s) - return add_escape("") .. s .. "" - end - -- Encode chars as a mix of dec and hex entitites to (perhaps) fool - -- spambots. - local function encode_email_address(s) - -- Use a deterministic encoding to make unit testing possible. - -- Code 45% hex, 45% dec, 10% plain. - local hex = {code = function(c) return "&#x" .. string.format("%x", c:byte()) .. ";" end, count = 1, rate = 0.45} - local dec = {code = function(c) return "&#" .. c:byte() .. ";" end, count = 0, rate = 0.45} - local plain = {code = function(c) return c end, count = 0, rate = 0.1} - local codes = {hex, dec, plain} - local function swap(t,k1,k2) local temp = t[k2] t[k2] = t[k1] t[k1] = temp end - - local out = "" - for i = 1,s:len() do - for _,code in ipairs(codes) do code.count = code.count + code.rate end - if codes[1].count < codes[2].count then swap(codes,1,2) end - if codes[2].count < codes[3].count then swap(codes,2,3) end - if codes[1].count < codes[2].count then swap(codes,1,2) end - - local code = codes[1] - local c = s:sub(i,i) - -- Force encoding of "@" to make email address more invisible. - if c == "@" and code == plain then code = codes[2] end - out = out .. code.code(c) - code.count = code.count - 1 - end - return out - end - local function mail(s) - s = unescape_special_chars(s) - local address = encode_email_address("mailto:" .. s) - local text = encode_email_address(s) - return add_escape("") .. text .. "" - end - -- links - text = text:gsub("<(https?:[^'\">%s]+)>", link) - text = text:gsub("<(ftp:[^'\">%s]+)>", link) - - -- mail - text = text:gsub("%s]+)>", mail) - text = text:gsub("<([-.%w]+%@[-.%w]+)>", mail) - return text -end - --- Encode free standing amps (&) and angles (<)... note that this does not --- encode free >. -function amps_and_angles(s) - -- encode amps not part of &..; expression - local pos = 1 - while true do - local amp = s:find("&", pos) - if not amp then break end - local semi = s:find(";", amp+1) - local stop = s:find("[ \t\n&]", amp+1) - if not semi or (stop and stop < semi) or (semi - amp) > 15 then - s = s:sub(1,amp-1) .. "&" .. s:sub(amp+1) - pos = amp+1 - else - pos = amp+1 - end - end - - -- encode naked <'s - s = s:gsub("<([^a-zA-Z/?$!])", "<%1") - s = s:gsub("<$", "<") - - -- what about >, nothing done in the original markdown source to handle them - return s -end - --- Handles emphasis markers (* and _) in the text. -function emphasis(text) - for _, s in ipairs {"%*%*", "%_%_"} do - text = text:gsub(s .. "([^%s][%*%_]?)" .. s, "%1") - text = text:gsub(s .. "([^%s][^<>]-[^%s][%*%_]?)" .. s, "%1") - end - for _, s in ipairs {"%*", "%_"} do - text = text:gsub(s .. "([^%s_])" .. s, "%1") - text = text:gsub(s .. "([^%s_])" .. s, "%1") - text = text:gsub(s .. "([^%s_][^<>_]-[^%s_])" .. s, "%1") - text = text:gsub(s .. "([^<>_]-[^<>_]-[^<>_]-)" .. s, "%1") - end - return text -end - --- Handles line break markers in the text. -function line_breaks(text) - return text:gsub(" +\n", "
    \n") -end - --- Perform all span level transforms. -function span_transform(text) - text = code_spans(text) - text = escape_special_chars(text) - text = images(text) - text = anchors(text) - text = auto_links(text) - text = amps_and_angles(text) - text = emphasis(text) - text = line_breaks(text) - return text -end - ----------------------------------------------------------------------- --- Markdown ----------------------------------------------------------------------- - --- Cleanup the text by normalizing some possible variations to make further --- processing easier. -function cleanup(text) - -- Standardize line endings - text = text:gsub("\r\n", "\n") -- DOS to UNIX - text = text:gsub("\r", "\n") -- Mac to UNIX - - -- Convert all tabs to spaces - text = detab(text) - - -- Strip lines with only spaces and tabs - while true do - local subs - text, subs = text:gsub("\n[ \t]+\n", "\n\n") - if subs == 0 then break end - end - - return "\n" .. text .. "\n" -end - --- Strips link definitions from the text and stores the data in a lookup table. -function strip_link_definitions(text) - local linkdb = {} - - local function link_def(id, url, title) - id = id:match("%[(.+)%]"):lower() - linkdb[id] = linkdb[id] or {} - linkdb[id].url = url or linkdb[id].url - linkdb[id].title = title or linkdb[id].title - return "" - end - - local def_no_title = "\n ? ? ?(%b[]):[ \t]*\n?[ \t]*]+)>?[ \t]*" - local def_title1 = def_no_title .. "[ \t]+\n?[ \t]*[\"'(]([^\n]+)[\"')][ \t]*" - local def_title2 = def_no_title .. "[ \t]*\n[ \t]*[\"'(]([^\n]+)[\"')][ \t]*" - local def_title3 = def_no_title .. "[ \t]*\n?[ \t]+[\"'(]([^\n]+)[\"')][ \t]*" - - text = text:gsub(def_title1, link_def) - text = text:gsub(def_title2, link_def) - text = text:gsub(def_title3, link_def) - text = text:gsub(def_no_title, link_def) - return text, linkdb -end - -link_database = {} - --- Main markdown processing function -function markdown(text) - init_hash(text) - init_escape_table() - - text = cleanup(text) - text = protect(text) - text, link_database = strip_link_definitions(text) - text = block_transform(text) - text = unescape_special_chars(text) - return text -end - ----------------------------------------------------------------------- --- End of module ----------------------------------------------------------------------- - -setfenv(1, _G) -M.lock(M) - --- Expose markdown function to the world -markdown = M.markdown - --- Class for parsing command-line options -local OptionParser = {} -OptionParser.__index = OptionParser - --- Creates a new option parser -function OptionParser:new() - local o = {short = {}, long = {}} - setmetatable(o, self) - return o -end - --- Calls f() whenever a flag with specified short and long name is encountered -function OptionParser:flag(short, long, f) - local info = {type = "flag", f = f} - if short then self.short[short] = info end - if long then self.long[long] = info end -end - --- Calls f(param) whenever a parameter flag with specified short and long name is encountered -function OptionParser:param(short, long, f) - local info = {type = "param", f = f} - if short then self.short[short] = info end - if long then self.long[long] = info end -end - --- Calls f(v) for each non-flag argument -function OptionParser:arg(f) - self.arg = f -end - --- Runs the option parser for the specified set of arguments. Returns true if all arguments --- where successfully parsed and false otherwise. -function OptionParser:run(args) - local pos = 1 - while pos <= #args do - local arg = args[pos] - if arg == "--" then - for i=pos+1,#args do - if self.arg then self.arg(args[i]) end - return true - end - end - if arg:match("^%-%-") then - local info = self.long[arg:sub(3)] - if not info then print("Unknown flag: " .. arg) return false end - if info.type == "flag" then - info.f() - pos = pos + 1 - else - param = args[pos+1] - if not param then print("No parameter for flag: " .. arg) return false end - info.f(param) - pos = pos+2 - end - elseif arg:match("^%-") then - for i=2,arg:len() do - local c = arg:sub(i,i) - local info = self.short[c] - if not info then print("Unknown flag: -" .. c) return false end - if info.type == "flag" then - info.f() - else - if i == arg:len() then - param = args[pos+1] - if not param then print("No parameter for flag: -" .. c) return false end - info.f(param) - pos = pos + 1 - else - param = arg:sub(i+1) - info.f(param) - end - break - end - end - pos = pos + 1 - else - if self.arg then self.arg(arg) end - pos = pos + 1 - end - end - return true -end - --- Handles the case when markdown is run from the command line -local function run_command_line(arg) - -- Generate output for input s given options - local function run(s, options) - s = markdown(s) - if not options.wrap_header then return s end - local header = "" - if options.header then - local f = io.open(options.header) or error("Could not open file: " .. options.header) - header = f:read("*a") - f:close() - else - header = [[ - - - - - TITLE - - - -]] - local title = options.title or s:match("

    (.-)

    ") or s:match("

    (.-)

    ") or - s:match("

    (.-)

    ") or "Untitled" - header = header:gsub("TITLE", title) - if options.inline_style then - local style = "" - local f = io.open(options.stylesheet) - if f then - style = f:read("*a") f:close() - else - error("Could not include style sheet " .. options.stylesheet .. ": File not found") - end - header = header:gsub('', - "") - else - header = header:gsub("STYLESHEET", options.stylesheet) - end - header = header:gsub("CHARSET", options.charset) - end - local footer = "" - if options.footer then - local f = io.open(options.footer) or error("Could not open file: " .. options.footer) - footer = f:read("*a") - f:close() - end - return header .. s .. footer - end - - -- Generate output path name from input path name given options. - local function outpath(path, options) - if options.append then return path .. ".html" end - local m = path:match("^(.+%.html)[^/\\]+$") if m then return m end - m = path:match("^(.+%.)[^/\\]*$") if m and path ~= m .. "html" then return m .. "html" end - return path .. ".html" - end - - -- Default commandline options - local options = { - wrap_header = true, - header = nil, - footer = nil, - charset = "utf-8", - title = nil, - stylesheet = "default.css", - inline_style = false - } - local help = [[ -Usage: markdown.lua [OPTION] [FILE] -Runs the markdown text markup to HTML converter on each file specified on the -command line. If no files are specified, runs on standard input. - -No header: - -n, --no-wrap Don't wrap the output in ... tags. -Custom header: - -e, --header FILE Use content of FILE for header. - -f, --footer FILE Use content of FILE for footer. -Generated header: - -c, --charset SET Specifies charset (default utf-8). - -i, --title TITLE Specifies title (default from first

    tag). - -s, --style STYLE Specifies style sheet file (default default.css). - -l, --inline-style Include the style sheet file inline in the header. -Generated files: - -a, --append Append .html extension (instead of replacing). -Other options: - -h, --help Print this help text. - -t, --test Run the unit tests. -]] - - local run_stdin = true - local op = OptionParser:new() - op:flag("n", "no-wrap", function () options.wrap_header = false end) - op:param("e", "header", function (x) options.header = x end) - op:param("f", "footer", function (x) options.footer = x end) - op:param("c", "charset", function (x) options.charset = x end) - op:param("i", "title", function(x) options.title = x end) - op:param("s", "style", function(x) options.stylesheet = x end) - op:flag("l", "inline-style", function(x) options.inline_style = true end) - op:flag("a", "append", function() options.append = true end) - op:flag("t", "test", function() - local n = arg[0]:gsub("markdown.lua", "markdown-tests.lua") - local f = io.open(n) - if f then - f:close() dofile(n) - else - error("Cannot find markdown-tests.lua") - end - run_stdin = false - end) - op:flag("h", "help", function() print(help) run_stdin = false end) - op:arg(function(path) - local file = io.open(path) or error("Could not open file: " .. path) - local s = file:read("*a") - file:close() - s = run(s, options) - file = io.open(outpath(path, options), "w") or error("Could not open output file: " .. outpath(path, options)) - file:write(s) - file:close() - run_stdin = false - end - ) - - if not op:run(arg) then - print(help) - run_stdin = false - end - - if run_stdin then - local s = io.read("*a") - s = run(s, options) - io.write(s) - end -end - --- If we are being run from the command-line, act accordingly -if arg and arg[0]:find("markdown%.lua$") then - run_command_line(arg) -else - return markdown -end \ No newline at end of file diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler.lua b/Utils/luarocks/systree/share/lua/5.1/metalua/compiler.lua deleted file mode 100644 index 202b254fd..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler.lua +++ /dev/null @@ -1,181 +0,0 @@ ---------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- --------------------------------------------------------------------------------- - --------------------------------------------------------------------------------- --- --- Convert between various code representation formats. Atomic --- converters are written in extenso, others are composed automatically --- by chaining the atomic ones together in a closure. --- --- Supported formats are: --- --- * srcfile: the name of a file containing sources. --- * src: these sources as a single string. --- * lexstream: a stream of lexemes. --- * ast: an abstract syntax tree. --- * proto: a (Yueliang) struture containing a high level --- representation of bytecode. Largely based on the --- Proto structure in Lua's VM --- * bytecode: a string dump of the function, as taken by --- loadstring() and produced by string.dump(). --- * function: an executable lua function in RAM. --- --------------------------------------------------------------------------------- - -local checks = require 'checks' - -local M = { } - --------------------------------------------------------------------------------- --- Order of the transformations. if 'a' is on the left of 'b', then a 'a' can --- be transformed into a 'b' (but not the other way around). --- M.sequence goes for numbers to format names, M.order goes from format --- names to numbers. --------------------------------------------------------------------------------- -M.sequence = { - 'srcfile', 'src', 'lexstream', 'ast', 'proto', 'bytecode', 'function' } - -local arg_types = { - srcfile = { 'string', '?string' }, - src = { 'string', '?string' }, - lexstream = { 'lexer.stream', '?string' }, - ast = { 'table', '?string' }, - proto = { 'table', '?string' }, - bytecode = { 'string', '?string' }, -} - -if false then - -- if defined, runs on every newly-generated AST - function M.check_ast(ast) - local function rec(x, n, parent) - if not x.lineinfo and parent.lineinfo then - local pp = require 'metalua.pprint' - pp.printf("WARNING: Missing lineinfo in child #%s `%s{...} of node at %s", - n, x.tag or '', tostring(parent.lineinfo)) - end - for i, child in ipairs(x) do - if type(child)=='table' then rec(child, i, x) end - end - end - rec(ast, -1, { }) - end -end - - -M.order= { }; for a,b in pairs(M.sequence) do M.order[b]=a end - -local CONV = { } -- conversion metatable __index - -function CONV :srcfile_to_src(x, name) - checks('metalua.compiler', 'string', '?string') - name = name or '@'..x - local f, msg = io.open (x, 'rb') - if not f then error(msg) end - local r, msg = f :read '*a' - if not r then error("Cannot read file '"..x.."': "..msg) end - f :close() - return r, name -end - -function CONV :src_to_lexstream(src, name) - checks('metalua.compiler', 'string', '?string') - local r = self.parser.lexer :newstream (src, name) - return r, name -end - -function CONV :lexstream_to_ast(lx, name) - checks('metalua.compiler', 'lexer.stream', '?string') - local r = self.parser.chunk(lx) - r.source = name - if M.check_ast then M.check_ast (r) end - return r, name -end - -local bytecode_compiler = nil -- cache to avoid repeated `pcall(require(...))` -local function get_bytecode_compiler() - if bytecode_compiler then return bytecode_compiler else - local status, result = pcall(require, 'metalua.compiler.bytecode') - if status then - bytecode_compiler = result - return result - elseif string.match(result, "not found") then - error "Compilation only available with full Metalua" - else error (result) end - end -end - -function CONV :ast_to_proto(ast, name) - checks('metalua.compiler', 'table', '?string') - return get_bytecode_compiler().ast_to_proto(ast, name), name -end - -function CONV :proto_to_bytecode(proto, name) - return get_bytecode_compiler().proto_to_bytecode(proto), name -end - -function CONV :bytecode_to_function(bc, name) - checks('metalua.compiler', 'string', '?string') - return loadstring(bc, name) -end - --- Create all sensible combinations -for i=1,#M.sequence do - local src = M.sequence[i] - for j=i+2, #M.sequence do - local dst = M.sequence[j] - local dst_name = src.."_to_"..dst - local my_arg_types = arg_types[src] - local functions = { } - for k=i, j-1 do - local name = M.sequence[k].."_to_"..M.sequence[k+1] - local f = assert(CONV[name], name) - table.insert (functions, f) - end - CONV[dst_name] = function(self, a, b) - checks('metalua.compiler', unpack(my_arg_types)) - for _, f in ipairs(functions) do - a, b = f(self, a, b) - end - return a, b - end - --printf("Created M.%s out of %s", dst_name, table.concat(n, ', ')) - end -end - - --------------------------------------------------------------------------------- --- This one goes in the "wrong" direction, cannot be composed. --------------------------------------------------------------------------------- -function CONV :function_to_bytecode(...) return string.dump(...) end - -function CONV :ast_to_src(...) - require 'metalua.loader' -- ast_to_string isn't written in plain lua - return require 'metalua.compiler.ast_to_src' (...) -end - -local MT = { __index=CONV, __type='metalua.compiler' } - -function M.new() - local parser = require 'metalua.compiler.parser' .new() - local self = { parser = parser } - setmetatable(self, MT) - return self -end - -return M \ No newline at end of file diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/ast_to_src.mlua b/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/ast_to_src.mlua deleted file mode 100644 index ca80a12d2..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/ast_to_src.mlua +++ /dev/null @@ -1,682 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- -------------------------------------------------------------------------------- - --{ extension ('match', ...) } - -local M = { } -M.__index = M -M.__call = |self, ...| self:run(...) - -local pp=require 'metalua.pprint' - --------------------------------------------------------------------------------- --- Instanciate a new AST->source synthetizer --------------------------------------------------------------------------------- -function M.new () - local self = { - _acc = { }, -- Accumulates pieces of source as strings - current_indent = 0, -- Current level of line indentation - indent_step = " " -- Indentation symbol, normally spaces or '\t' - } - return setmetatable (self, M) -end - --------------------------------------------------------------------------------- --- Run a synthetizer on the `ast' arg and return the source as a string. --- Can also be used as a static method `M.run (ast)'; in this case, --- a temporary Metizer is instanciated on the fly. --------------------------------------------------------------------------------- -function M:run (ast) - if not ast then - self, ast = M.new(), self - end - self._acc = { } - self:node (ast) - return table.concat (self._acc) -end - --------------------------------------------------------------------------------- --- Accumulate a piece of source file in the synthetizer. --------------------------------------------------------------------------------- -function M:acc (x) - if x then table.insert (self._acc, x) end -end - --------------------------------------------------------------------------------- --- Accumulate an indented newline. --- Jumps an extra line if indentation is 0, so that --- toplevel definitions are separated by an extra empty line. --------------------------------------------------------------------------------- -function M:nl () - if self.current_indent == 0 then self:acc "\n" end - self:acc ("\n" .. self.indent_step:rep (self.current_indent)) -end - --------------------------------------------------------------------------------- --- Increase indentation and accumulate a new line. --------------------------------------------------------------------------------- -function M:nlindent () - self.current_indent = self.current_indent + 1 - self:nl () -end - --------------------------------------------------------------------------------- --- Decrease indentation and accumulate a new line. --------------------------------------------------------------------------------- -function M:nldedent () - self.current_indent = self.current_indent - 1 - self:acc ("\n" .. self.indent_step:rep (self.current_indent)) -end - --------------------------------------------------------------------------------- --- Keywords, which are illegal as identifiers. --------------------------------------------------------------------------------- -local keywords_list = { - "and", "break", "do", "else", "elseif", - "end", "false", "for", "function", "if", - "in", "local", "nil", "not", "or", - "repeat", "return", "then", "true", "until", - "while" } -local keywords = { } -for _, kw in pairs(keywords_list) do keywords[kw]=true end - --------------------------------------------------------------------------------- --- Return true iff string `id' is a legal identifier name. --------------------------------------------------------------------------------- -local function is_ident (id) - return string['match'](id, "^[%a_][%w_]*$") and not keywords[id] -end - --------------------------------------------------------------------------------- --- Return true iff ast represents a legal function name for --- syntax sugar ``function foo.bar.gnat() ... end'': --- a series of nested string indexes, with an identifier as --- the innermost node. --------------------------------------------------------------------------------- -local function is_idx_stack (ast) - match ast with - | `Id{ _ } -> return true - | `Index{ left, `String{ _ } } -> return is_idx_stack (left) - | _ -> return false - end -end - --------------------------------------------------------------------------------- --- Operator precedences, in increasing order. --- This is not directly used, it's used to generate op_prec below. --------------------------------------------------------------------------------- -local op_preprec = { - { "or", "and" }, - { "lt", "le", "eq", "ne" }, - { "concat" }, - { "add", "sub" }, - { "mul", "div", "mod" }, - { "unary", "not", "len" }, - { "pow" }, - { "index" } } - --------------------------------------------------------------------------------- --- operator --> precedence table, generated from op_preprec. --------------------------------------------------------------------------------- -local op_prec = { } - -for prec, ops in ipairs (op_preprec) do - for _, op in ipairs (ops) do - op_prec[op] = prec - end -end - --------------------------------------------------------------------------------- --- operator --> source representation. --------------------------------------------------------------------------------- -local op_symbol = { - add = " + ", sub = " - ", mul = " * ", - div = " / ", mod = " % ", pow = " ^ ", - concat = " .. ", eq = " == ", ne = " ~= ", - lt = " < ", le = " <= ", ["and"] = " and ", - ["or"] = " or ", ["not"] = "not ", len = "# " } - --------------------------------------------------------------------------------- --- Accumulate the source representation of AST `node' in --- the synthetizer. Most of the work is done by delegating to --- the method having the name of the AST tag. --- If something can't be converted to normal sources, it's --- instead dumped as a `-{ ... }' splice in the source accumulator. --------------------------------------------------------------------------------- -function M:node (node) - assert (self~=M and self._acc) - if node==nil then self:acc'<>' - elseif not self.custom_printer or not self.custom_printer (self, node) then - if not node.tag then -- tagless (henceunindented) block. - self:list (node, self.nl) - else - local f = M[node.tag] - if type (f) == "function" then -- Delegate to tag method. - f (self, node, unpack (node)) - elseif type (f) == "string" then -- tag string. - self:acc (f) - else -- No appropriate method, fall back to splice dumping. - -- This cannot happen in a plain Lua AST. - self:acc " -{ " - self:acc (pp.tostring (node, {metalua_tag=1, hide_hash=1}), 80) - self:acc " }" - end - end - end -end - -function M:block(body) - if not self.custom_printer or not self.custom_printer (self, body) then - self:nlindent () - self:list (body, self.nl) - self:nldedent () - end -end - --------------------------------------------------------------------------------- --- Convert every node in the AST list `list' passed as 1st arg. --- `sep' is an optional separator to be accumulated between each list element, --- it can be a string or a synth method. --- `start' is an optional number (default == 1), indicating which is the --- first element of list to be converted, so that we can skip the begining --- of a list. --------------------------------------------------------------------------------- -function M:list (list, sep, start) - for i = start or 1, # list do - self:node (list[i]) - if list[i + 1] then - if not sep then - elseif type (sep) == "function" then sep (self) - elseif type (sep) == "string" then self:acc (sep) - else error "Invalid list separator" end - end - end -end - --------------------------------------------------------------------------------- --- --- Tag methods. --- ------------ --- --- Specific AST node dumping methods, associated to their node kinds --- by their name, which is the corresponding AST tag. --- synth:node() is in charge of delegating a node's treatment to the --- appropriate tag method. --- --- Such tag methods are called with the AST node as 1st arg. --- As a convenience, the n node's children are passed as args #2 ... n+1. --- --- There are several things that could be refactored into common subroutines --- here: statement blocks dumping, function dumping... --- However, given their small size and linear execution --- (they basically perform series of :acc(), :node(), :list(), --- :nl(), :nlindent() and :nldedent() calls), it seems more readable --- to avoid multiplication of such tiny functions. --- --- To make sense out of these, you need to know metalua's AST syntax, as --- found in the reference manual or in metalua/doc/ast.txt. --- --------------------------------------------------------------------------------- - -function M:Do (node) - self:acc "do" - self:block (node) - self:acc "end" -end - -function M:Set (node) - match node with - | `Set{ { `Index{ lhs, `String{ method } } }, - { `Function{ { `Id "self", ... } == params, body } } } - if is_idx_stack (lhs) and is_ident (method) -> - -- ``function foo:bar(...) ... end'' -- - self:acc "function " - self:node (lhs) - self:acc ":" - self:acc (method) - self:acc " (" - self:list (params, ", ", 2) - self:acc ")" - self:block (body) - self:acc "end" - - | `Set{ { lhs }, { `Function{ params, body } } } if is_idx_stack (lhs) -> - -- ``function foo(...) ... end'' -- - self:acc "function " - self:node (lhs) - self:acc " (" - self:list (params, ", ") - self:acc ")" - self:block (body) - self:acc "end" - - | `Set{ { `Id{ lhs1name } == lhs1, ... } == lhs, rhs } - if not is_ident (lhs1name) -> - -- ``foo, ... = ...'' when foo is *not* a valid identifier. - -- In that case, the spliced 1st variable must get parentheses, - -- to be distinguished from a statement splice. - -- This cannot happen in a plain Lua AST. - self:acc "(" - self:node (lhs1) - self:acc ")" - if lhs[2] then -- more than one lhs variable - self:acc ", " - self:list (lhs, ", ", 2) - end - self:acc " = " - self:list (rhs, ", ") - - | `Set{ lhs, rhs } -> - -- ``... = ...'', no syntax sugar -- - self:list (lhs, ", ") - self:acc " = " - self:list (rhs, ", ") - | `Set{ lhs, rhs, annot } -> - -- ``... = ...'', no syntax sugar, annotation -- - local n = #lhs - for i=1,n do - local ell, a = lhs[i], annot[i] - self:node (ell) - if a then - self:acc ' #' - self:node(a) - end - if i~=n then self:acc ', ' end - end - self:acc " = " - self:list (rhs, ", ") - end -end - -function M:While (node, cond, body) - self:acc "while " - self:node (cond) - self:acc " do" - self:block (body) - self:acc "end" -end - -function M:Repeat (node, body, cond) - self:acc "repeat" - self:block (body) - self:acc "until " - self:node (cond) -end - -function M:If (node) - for i = 1, #node-1, 2 do - -- for each ``if/then'' and ``elseif/then'' pair -- - local cond, body = node[i], node[i+1] - self:acc (i==1 and "if " or "elseif ") - self:node (cond) - self:acc " then" - self:block (body) - end - -- odd number of children --> last one is an `else' clause -- - if #node%2 == 1 then - self:acc "else" - self:block (node[#node]) - end - self:acc "end" -end - -function M:Fornum (node, var, first, last) - local body = node[#node] - self:acc "for " - self:node (var) - self:acc " = " - self:node (first) - self:acc ", " - self:node (last) - if #node==5 then -- 5 children --> child #4 is a step increment. - self:acc ", " - self:node (node[4]) - end - self:acc " do" - self:block (body) - self:acc "end" -end - -function M:Forin (node, vars, generators, body) - self:acc "for " - self:list (vars, ", ") - self:acc " in " - self:list (generators, ", ") - self:acc " do" - self:block (body) - self:acc "end" -end - -function M:Local (node, lhs, rhs, annots) - if next (lhs) then - self:acc "local " - if annots then - local n = #lhs - for i=1, n do - self:node (lhs) - local a = annots[i] - if a then - self:acc ' #' - self:node (a) - end - if i~=n then self:acc ', ' end - end - else - self:list (lhs, ", ") - end - if rhs[1] then - self:acc " = " - self:list (rhs, ", ") - end - else -- Can't create a local statement with 0 variables in plain Lua - self:acc (pp.tostring (node, {metalua_tag=1, hide_hash=1, fix_indent=2})) - end -end - -function M:Localrec (node, lhs, rhs) - match node with - | `Localrec{ { `Id{name} }, { `Function{ params, body } } } - if is_ident (name) -> - -- ``local function name() ... end'' -- - self:acc "local function " - self:acc (name) - self:acc " (" - self:list (params, ", ") - self:acc ")" - self:block (body) - self:acc "end" - - | _ -> - -- Other localrec are unprintable ==> splice them -- - -- This cannot happen in a plain Lua AST. -- - self:acc "-{ " - self:acc (pp.tostring (node, {metalua_tag=1, hide_hash=1, fix_indent=2})) - self:acc " }" - end -end - -function M:Call (node, f) - -- single string or table literal arg ==> no need for parentheses. -- - local parens - match node with - | `Call{ _, `String{_} } - | `Call{ _, `Table{...}} -> parens = false - | _ -> parens = true - end - self:node (f) - self:acc (parens and " (" or " ") - self:list (node, ", ", 2) -- skip `f'. - self:acc (parens and ")") -end - -function M:Invoke (node, f, method) - -- single string or table literal arg ==> no need for parentheses. -- - local parens - match node with - | `Invoke{ _, _, `String{_} } - | `Invoke{ _, _, `Table{...}} -> parens = false - | _ -> parens = true - end - self:node (f) - self:acc ":" - self:acc (method[1]) - self:acc (parens and " (" or " ") - self:list (node, ", ", 3) -- Skip args #1 and #2, object and method name. - self:acc (parens and ")") -end - -function M:Return (node) - self:acc "return " - self:list (node, ", ") -end - -M.Break = "break" -M.Nil = "nil" -M.False = "false" -M.True = "true" -M.Dots = "..." - -function M:Number (node, n) - self:acc (tostring (n)) -end - -function M:String (node, str) - -- format "%q" prints '\n' in an umpractical way IMO, - -- so this is fixed with the :gsub( ) call. - self:acc (string.format ("%q", str):gsub ("\\\n", "\\n")) -end - -function M:Function (node, params, body, annots) - self:acc "function (" - if annots then - local n = #params - for i=1,n do - local p, a = params[i], annots[i] - self:node(p) - if annots then - self:acc " #" - self:node(a) - end - if i~=n then self:acc ', ' end - end - else - self:list (params, ", ") - end - self:acc ")" - self:block (body) - self:acc "end" -end - -function M:Table (node) - if not node[1] then self:acc "{ }" else - self:acc "{" - if #node > 1 then self:nlindent () else self:acc " " end - for i, elem in ipairs (node) do - match elem with - | `Pair{ `String{ key }, value } if is_ident (key) -> - -- ``key = value''. -- - self:acc (key) - self:acc " = " - self:node (value) - - | `Pair{ key, value } -> - -- ``[key] = value''. -- - self:acc "[" - self:node (key) - self:acc "] = " - self:node (value) - - | _ -> - -- ``value''. -- - self:node (elem) - end - if node [i+1] then - self:acc "," - self:nl () - end - end - if #node > 1 then self:nldedent () else self:acc " " end - self:acc "}" - end -end - -function M:Op (node, op, a, b) - -- Transform ``not (a == b)'' into ``a ~= b''. -- - match node with - | `Op{ "not", `Op{ "eq", _a, _b } } - | `Op{ "not", `Paren{ `Op{ "eq", _a, _b } } } -> - op, a, b = "ne", _a, _b - | _ -> - end - - if b then -- binary operator. - local left_paren, right_paren - match a with - | `Op{ op_a, ...} if op_prec[op] >= op_prec[op_a] -> left_paren = true - | _ -> left_paren = false - end - - match b with -- FIXME: might not work with right assoc operators ^ and .. - | `Op{ op_b, ...} if op_prec[op] >= op_prec[op_b] -> right_paren = true - | _ -> right_paren = false - end - - self:acc (left_paren and "(") - self:node (a) - self:acc (left_paren and ")") - - self:acc (op_symbol [op]) - - self:acc (right_paren and "(") - self:node (b) - self:acc (right_paren and ")") - - else -- unary operator. - local paren - match a with - | `Op{ op_a, ... } if op_prec[op] >= op_prec[op_a] -> paren = true - | _ -> paren = false - end - self:acc (op_symbol[op]) - self:acc (paren and "(") - self:node (a) - self:acc (paren and ")") - end -end - -function M:Paren (node, content) - self:acc "(" - self:node (content) - self:acc ")" -end - -function M:Index (node, table, key) - local paren_table - -- Check precedence, see if parens are needed around the table -- - match table with - | `Op{ op, ... } if op_prec[op] < op_prec.index -> paren_table = true - | _ -> paren_table = false - end - - self:acc (paren_table and "(") - self:node (table) - self:acc (paren_table and ")") - - match key with - | `String{ field } if is_ident (field) -> - -- ``table.key''. -- - self:acc "." - self:acc (field) - | _ -> - -- ``table [key]''. -- - self:acc "[" - self:node (key) - self:acc "]" - end -end - -function M:Id (node, name) - if is_ident (name) then - self:acc (name) - else -- Unprintable identifier, fall back to splice representation. - -- This cannot happen in a plain Lua AST. - self:acc "-{`Id " - self:String (node, name) - self:acc "}" - end -end - - -M.TDyn = '*' -M.TDynbar = '**' -M.TPass = 'pass' -M.TField = 'field' -M.TIdbar = M.TId -M.TReturn = M.Return - - -function M:TId (node, name) self:acc(name) end - - -function M:TCatbar(node, te, tebar) - self:acc'(' - self:node(te) - self:acc'|' - self:tebar(tebar) - self:acc')' -end - -function M:TFunction(node, p, r) - self:tebar(p) - self:acc '->' - self:tebar(r) -end - -function M:TTable (node, default, pairs) - self:acc '[' - self:list (pairs, ', ') - if default.tag~='TField' then - self:acc '|' - self:node (default) - end - self:acc ']' -end - -function M:TPair (node, k, v) - self:node (k) - self:acc '=' - self:node (v) -end - -function M:TIdbar (node, name) - self :acc (name) -end - -function M:TCatbar (node, a, b) - self:node(a) - self:acc ' ++ ' - self:node(b) -end - -function M:tebar(node) - if node.tag then self:node(node) else - self:acc '(' - self:list(node, ', ') - self:acc ')' - end -end - -function M:TUnkbar(node, name) - self:acc '~~' - self:acc (name) -end - -function M:TUnk(node, name) - self:acc '~' - self:acc (name) -end - -for name, tag in pairs{ const='TConst', var='TVar', currently='TCurrently', just='TJust' } do - M[tag] = function(self, node, te) - self:acc (name..' ') - self:node(te) - end -end - -return M diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/bytecode.lua b/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/bytecode.lua deleted file mode 100644 index b3afbdb73..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/bytecode.lua +++ /dev/null @@ -1,29 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- --------------------------------------------------------------------------------- - -local compile = require 'metalua.compiler.bytecode.compile' -local ldump = require 'metalua.compiler.bytecode.ldump' - -local M = { } - -M.ast_to_proto = compile.ast_to_proto -M.proto_to_bytecode = ldump.dump_string -M.proto_to_file = ldump.dump_file - -return M \ No newline at end of file diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/bytecode/compile.lua b/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/bytecode/compile.lua deleted file mode 100644 index 011517f3d..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/bytecode/compile.lua +++ /dev/null @@ -1,1263 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Kein-Hong Man, Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Kein-Hong Man - Initial implementation for Lua 5.0, part of Yueliang --- Fabien Fleutot - Port to Lua 5.1, integration with Metalua --- -------------------------------------------------------------------------------- - ----------------------------------------------------------------------- --- --- This code mainly results from the borrowing, then ruthless abuse, of --- Yueliang's implementation of Lua 5.0 compiler. --- ---------------------------------------------------------------------- - -local pp = require 'metalua.pprint' - -local luaK = require 'metalua.compiler.bytecode.lcode' -local luaP = require 'metalua.compiler.bytecode.lopcodes' - -local debugf = function() end ---local debugf=printf - -local stat = { } -local expr = { } - -local M = { } - -M.MAX_INT = 2147483645 -- INT_MAX-2 for 32-bit systems (llimits.h) -M.MAXVARS = 200 -- (llimits.h) -M.MAXUPVALUES = 32 -- (llimits.h) -M.MAXPARAMS = 100 -- (llimits.h) -M.LUA_MAXPARSERLEVEL = 200 -- (llimits.h) - --- from lobject.h -M.VARARG_HASARG = 1 -M.VARARG_ISVARARG = 2 -M.VARARG_NEEDSARG = 4 - -local function hasmultret (k) - return k=="VCALL" or k=="VVARARG" -end - ------------------------------------------------------------------------ --- Some ASTs take expression lists as children; it should be --- acceptible to give an expression instead, and to automatically --- interpret it as a single element list. That's what does this --- function, adding a surrounding list iff needed. --- --- WARNING: "Do" is the tag for chunks, which are essentially lists. --- Therefore, we don't listify stuffs with a "Do" tag. ------------------------------------------------------------------------ -local function ensure_list (ast) - return ast.tag and ast.tag ~= "Do" and {ast} or ast end - ------------------------------------------------------------------------ --- Get a localvar structure { varname, startpc, endpc } from a --- (zero-based) index of active variable. The catch is: don't get --- confused between local index and active index. --- --- locvars[x] contains { varname, startpc, endpc }; --- actvar[i] contains the index of the variable in locvars ------------------------------------------------------------------------ -local function getlocvar (fs, i) - return fs.f.locvars[fs.actvar[i]] -end - -local function removevars (fs, tolevel) - while fs.nactvar > tolevel do - fs.nactvar = fs.nactvar - 1 - -- There may be dummy locvars due to expr.Stat - -- FIXME: strange that they didn't disappear?! - local locvar = getlocvar (fs, fs.nactvar) - --printf("[REMOVEVARS] removing var #%i = %s", fs.nactvar, - -- locvar and tostringv(locvar) or "") - if locvar then locvar.endpc = fs.pc end - end -end - ------------------------------------------------------------------------ --- [f] has a list of all its local variables, active and inactive. --- Some local vars can correspond to the same register, if they exist --- in different scopes. --- [fs.nlocvars] is the total number of local variables, not to be --- confused with [fs.nactvar] the numebr of variables active at the --- current PC. --- At this stage, the existence of the variable is not yet aknowledged, --- since [fs.nactvar] and [fs.freereg] aren't updated. ------------------------------------------------------------------------ -local function registerlocalvar (fs, varname) - --debugf("[locvar: %s = reg %i]", varname, fs.nlocvars) - local f = fs.f - f.locvars[fs.nlocvars] = { } -- LocVar - f.locvars[fs.nlocvars].varname = varname - local nlocvars = fs.nlocvars - fs.nlocvars = fs.nlocvars + 1 - return nlocvars -end - ------------------------------------------------------------------------ --- update the active vars counter in [fs] by adding [nvars] of them, --- and sets those variables' [startpc] to the current [fs.pc]. --- These variables were allready created, but not yet counted, by --- new_localvar. ------------------------------------------------------------------------ -local function adjustlocalvars (fs, nvars) - --debugf("adjustlocalvars, nvars=%i, previous fs.nactvar=%i,".. - -- " #locvars=%i, #actvar=%i", - -- nvars, fs.nactvar, #fs.f.locvars, #fs.actvar) - - fs.nactvar = fs.nactvar + nvars - for i = nvars, 1, -1 do - --printf ("adjusting actvar #%i", fs.nactvar - i) - getlocvar (fs, fs.nactvar - i).startpc = fs.pc - end -end - ------------------------------------------------------------------------- --- check whether, in an assignment to a local variable, the local variable --- is needed in a previous assignment (to a table). If so, save original --- local value in a safe place and use this safe copy in the previous --- assignment. ------------------------------------------------------------------------- -local function check_conflict (fs, lh, v) - local extra = fs.freereg -- eventual position to save local variable - local conflict = false - while lh do - if lh.v.k == "VINDEXED" then - if lh.v.info == v.info then -- conflict? - conflict = true - lh.v.info = extra -- previous assignment will use safe copy - end - if lh.v.aux == v.info then -- conflict? - conflict = true - lh.v.aux = extra -- previous assignment will use safe copy - end - end - lh = lh.prev - end - if conflict then - luaK:codeABC (fs, "OP_MOVE", fs.freereg, v.info, 0) -- make copy - luaK:reserveregs (fs, 1) - end -end - ------------------------------------------------------------------------ --- Create an expdesc. To be updated when expdesc is lua-ified. ------------------------------------------------------------------------ -local function init_exp (e, k, i) - e.f, e.t, e.k, e.info = luaK.NO_JUMP, luaK.NO_JUMP, k, i end - ------------------------------------------------------------------------ --- Reserve the string in tthe constant pool, and return an expdesc --- referring to it. ------------------------------------------------------------------------ -local function codestring (fs, e, str) - --printf( "codestring(%s)", disp.ast(str)) - init_exp (e, "VK", luaK:stringK (fs, str)) -end - ------------------------------------------------------------------------ --- search for a local variable named [name] in the function being --- built by [fs]. Doesn't try to visit upvalues. ------------------------------------------------------------------------ -local function searchvar (fs, name) - for i = fs.nactvar - 1, 0, -1 do - -- Because of expr.Stat, there can be some actvars which don't - -- correspond to any locvar. Hence the checking for locvar's - -- nonnilness before getting the varname. - local locvar = getlocvar(fs, i) - if locvar and name == locvar.varname then - --printf("Found local var: %s; i = %i", tostringv(locvar), i) - return i - end - end - return -1 -- not found -end - ------------------------------------------------------------------------ --- create and return a new proto [f] ------------------------------------------------------------------------ -local function newproto () - local f = {} - f.k = {} - f.sizek = 0 - f.p = {} - f.sizep = 0 - f.code = {} - f.sizecode = 0 - f.sizelineinfo = 0 - f.sizeupvalues = 0 - f.nups = 0 - f.upvalues = {} - f.numparams = 0 - f.is_vararg = 0 - f.maxstacksize = 0 - f.lineinfo = {} - f.sizelocvars = 0 - f.locvars = {} - f.lineDefined = 0 - f.source = nil - return f -end - ------------------------------------------------------------------------- --- create and return a function state [new_fs] as a sub-funcstate of [fs]. ------------------------------------------------------------------------- -local function open_func (old_fs) - local new_fs = { } - new_fs.upvalues = { } - new_fs.actvar = { } - local f = newproto () - new_fs.f = f - new_fs.prev = old_fs -- linked list of funcstates - new_fs.pc = 0 - new_fs.lasttarget = -1 - new_fs.jpc = luaK.NO_JUMP - new_fs.freereg = 0 - new_fs.nk = 0 - new_fs.h = {} -- constant table; was luaH_new call - new_fs.np = 0 - new_fs.nlocvars = 0 - new_fs.nactvar = 0 - new_fs.bl = nil - new_fs.nestlevel = old_fs and old_fs.nestlevel or 0 - f.maxstacksize = 2 -- registers 0/1 are always valid - new_fs.lastline = 0 - new_fs.forward_gotos = { } - new_fs.labels = { } - return new_fs -end - ------------------------------------------------------------------------- --- Finish to set up [f] according to final state of [fs] ------------------------------------------------------------------------- -local function close_func (fs) - local f = fs.f - --printf("[CLOSE_FUNC] remove any remaining var") - removevars (fs, 0) - luaK:ret (fs, 0, 0) - f.sizecode = fs.pc - f.sizelineinfo = fs.pc - f.sizek = fs.nk - f.sizep = fs.np - f.sizelocvars = fs.nlocvars - f.sizeupvalues = f.nups - assert (fs.bl == nil) - if next(fs.forward_gotos) then - local x = pp.tostring(fs.forward_gotos) - error ("Unresolved goto: "..x) - end -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function pushclosure(fs, func, v) - local f = fs.f - f.p [fs.np] = func.f - fs.np = fs.np + 1 - init_exp (v, "VRELOCABLE", luaK:codeABx (fs, "OP_CLOSURE", 0, fs.np - 1)) - for i = 0, func.f.nups - 1 do - local o = (func.upvalues[i].k == "VLOCAL") and "OP_MOVE" or "OP_GETUPVAL" - luaK:codeABC (fs, o, 0, func.upvalues[i].info, 0) - end -end - ------------------------------------------------------------------------- --- FIXME: is there a need for f=fs.f? if yes, why not always using it? ------------------------------------------------------------------------- -local function indexupvalue(fs, name, v) - local f = fs.f - for i = 0, f.nups - 1 do - if fs.upvalues[i].k == v.k and fs.upvalues[i].info == v.info then - assert(fs.f.upvalues[i] == name) - return i - end - end - -- new one - f.upvalues[f.nups] = name - assert (v.k == "VLOCAL" or v.k == "VUPVAL") - fs.upvalues[f.nups] = { k = v.k; info = v.info } - local nups = f.nups - f.nups = f.nups + 1 - return nups -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function markupval(fs, level) - local bl = fs.bl - while bl and bl.nactvar > level do bl = bl.previous end - if bl then bl.upval = true end -end - - ---for debug only ---[[ -local function bldepth(fs) - local i, x= 1, fs.bl - while x do i=i+1; x=x.previous end - return i -end ---]] - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function enterblock (fs, bl, isbreakable) - bl.breaklist = luaK.NO_JUMP - bl.isbreakable = isbreakable - bl.nactvar = fs.nactvar - bl.upval = false - bl.previous = fs.bl - fs.bl = bl - assert (fs.freereg == fs.nactvar) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function leaveblock (fs) - local bl = fs.bl - fs.bl = bl.previous - --printf("[LEAVEBLOCK] Removing vars...") - removevars (fs, bl.nactvar) - --printf("[LEAVEBLOCK] ...Vars removed") - if bl.upval then - luaK:codeABC (fs, "OP_CLOSE", bl.nactvar, 0, 0) - end - -- a block either controls scope or breaks (never both) - assert (not bl.isbreakable or not bl.upval) - assert (bl.nactvar == fs.nactvar) - fs.freereg = fs.nactvar -- free registers - luaK:patchtohere (fs, bl.breaklist) -end - - ------------------------------------------------------------------------- --- read a list of expressions from a list of ast [astlist] --- starts at the [offset]th element of the list (defaults to 1) ------------------------------------------------------------------------- -local function explist(fs, astlist, v, offset) - offset = offset or 1 - if #astlist < offset then error "I don't handle empty expr lists yet" end - --printf("[EXPLIST] about to precompile 1st element %s", disp.ast(astlist[offset])) - expr.expr (fs, astlist[offset], v) - --printf("[EXPLIST] precompiled first element v=%s", tostringv(v)) - for i = offset+1, #astlist do - luaK:exp2nextreg (fs, v) - --printf("[EXPLIST] flushed v=%s", tostringv(v)) - expr.expr (fs, astlist[i], v) - --printf("[EXPLIST] precompiled element v=%s", tostringv(v)) - end - return #astlist - offset + 1 -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function funcargs (fs, ast, v, idx_from) - local args = { } -- expdesc - local nparams - if #ast < idx_from then args.k = "VVOID" else - explist(fs, ast, args, idx_from) - luaK:setmultret(fs, args) - end - assert(v.k == "VNONRELOC") - local base = v.info -- base register for call - if hasmultret(args.k) then nparams = luaK.LUA_MULTRET else -- open call - if args.k ~= "VVOID" then - luaK:exp2nextreg(fs, args) end -- close last argument - nparams = fs.freereg - (base + 1) - end - init_exp(v, "VCALL", luaK:codeABC(fs, "OP_CALL", base, nparams + 1, 2)) - if ast.lineinfo then - luaK:fixline(fs, ast.lineinfo.first.line) - else - luaK:fixline(fs, ast.line) - end - fs.freereg = base + 1 -- call remove function and arguments and leaves - -- (unless changed) one result -end - ------------------------------------------------------------------------- --- calculates log value for encoding the hash portion's size ------------------------------------------------------------------------- -local function log2(x) - -- math result is always one more than lua0_log2() - local mn, ex = math.frexp(x) - return ex - 1 -end - ------------------------------------------------------------------------- --- converts an integer to a "floating point byte", represented as --- (mmmmmxxx), where the real value is (xxx) * 2^(mmmmm) ------------------------------------------------------------------------- - --- local function int2fb(x) --- local m = 0 -- mantissa --- while x >= 8 do x = math.floor((x + 1) / 2); m = m + 1 end --- return m * 8 + x --- end - -local function int2fb(x) - local e = 0 - while x >= 16 do - x = math.floor ( (x+1) / 2) - e = e+1 - end - if x<8 then return x - else return (e+1) * 8 + x - 8 end -end - - ------------------------------------------------------------------------- --- FIXME: to be unified with singlevar ------------------------------------------------------------------------- -local function singlevaraux(fs, n, var, base) ---[[ -print("\n\nsinglevaraux: fs, n, var, base") -printv(fs) -printv(n) -printv(var) -printv(base) -print("\n") ---]] - if fs == nil then -- no more levels? - init_exp(var, "VGLOBAL", luaP.NO_REG) -- default is global variable - return "VGLOBAL" - else - local v = searchvar(fs, n) -- look up at current level - if v >= 0 then - init_exp(var, "VLOCAL", v) - if not base then - markupval(fs, v) -- local will be used as an upval - end - else -- not found at current level; try upper one - if singlevaraux(fs.prev, n, var, false) == "VGLOBAL" then - return "VGLOBAL" end - var.info = indexupvalue (fs, n, var) - var.k = "VUPVAL" - return "VUPVAL" - end - end -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function singlevar(fs, varname, var) - if singlevaraux(fs, varname, var, true) == "VGLOBAL" then - var.info = luaK:stringK (fs, varname) end -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function new_localvar (fs, name, n) - assert (type (name) == "string") - if fs.nactvar + n > M.MAXVARS then error ("too many local vars") end - fs.actvar[fs.nactvar + n] = registerlocalvar (fs, name) - --printf("[NEW_LOCVAR] %i = %s", fs.nactvar+n, name) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function parlist (fs, ast_params) - local dots = (#ast_params > 0 and ast_params[#ast_params].tag == "Dots") - local nparams = dots and #ast_params - 1 or #ast_params - for i = 1, nparams do - assert (ast_params[i].tag == "Id", "Function parameters must be Ids") - new_localvar (fs, ast_params[i][1], i-1) - end - -- from [code_param]: - --checklimit (fs, fs.nactvar, self.M.MAXPARAMS, "parameters") - fs.f.numparams = fs.nactvar - fs.f.is_vararg = dots and M.VARARG_ISVARARG or 0 - adjustlocalvars (fs, nparams) - fs.f.numparams = fs.nactvar --FIXME vararg must be taken in account - luaK:reserveregs (fs, fs.nactvar) -- reserve register for parameters -end - ------------------------------------------------------------------------- --- if there's more variables than expressions in an assignment, --- some assignations to nil are made for extraneous vars. --- Also handles multiret functions ------------------------------------------------------------------------- -local function adjust_assign (fs, nvars, nexps, e) - local extra = nvars - nexps - if hasmultret (e.k) then - extra = extra+1 -- includes call itself - if extra <= 0 then extra = 0 end - luaK:setreturns(fs, e, extra) -- call provides the difference - if extra > 1 then luaK:reserveregs(fs, extra-1) end - else - if e.k ~= "VVOID" then - luaK:exp2nextreg(fs, e) end -- close last expression - if extra > 0 then - local reg = fs.freereg - luaK:reserveregs(fs, extra) - luaK:_nil(fs, reg, extra) - end - end -end - - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function enterlevel (fs) - fs.nestlevel = fs.nestlevel + 1 - assert (fs.nestlevel <= M.LUA_MAXPARSERLEVEL, "too many syntax levels") -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function leavelevel (fs) - fs.nestlevel = fs.nestlevel - 1 -end - ------------------------------------------------------------------------- --- Parse conditions in if/then/else, while, repeat ------------------------------------------------------------------------- -local function cond (fs, ast) - local v = { } - expr.expr(fs, ast, v) -- read condition - if v.k == "VNIL" then v.k = "VFALSE" end -- 'falses' are all equal here - luaK:goiftrue (fs, v) - return v.f -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function chunk (fs, ast) - enterlevel (fs) - assert (not ast.tag) - for i=1, #ast do - stat.stat (fs, ast[i]); - fs.freereg = fs.nactvar - end - leavelevel (fs) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function block (fs, ast) - local bl = {} - enterblock (fs, bl, false) - for i=1, #ast do - stat.stat (fs, ast[i]) - fs.freereg = fs.nactvar - end - assert (bl.breaklist == luaK.NO_JUMP) - leaveblock (fs) -end - ------------------------------------------------------------------------- --- Forin / Fornum body parser --- [fs] --- [body] --- [base] --- [nvars] --- [isnum] ------------------------------------------------------------------------- -local function forbody (fs, ast_body, base, nvars, isnum) - local bl = {} -- BlockCnt - adjustlocalvars (fs, 3) -- control variables - local prep = - isnum and luaK:codeAsBx (fs, "OP_FORPREP", base, luaK.NO_JUMP) - or luaK:jump (fs) - enterblock (fs, bl, false) -- loop block - adjustlocalvars (fs, nvars) -- scope for declared variables - luaK:reserveregs (fs, nvars) - block (fs, ast_body) - leaveblock (fs) - --luaK:patchtohere (fs, prep-1) - luaK:patchtohere (fs, prep) - local endfor = - isnum and luaK:codeAsBx (fs, "OP_FORLOOP", base, luaK.NO_JUMP) - or luaK:codeABC (fs, "OP_TFORLOOP", base, 0, nvars) - luaK:fixline (fs, ast_body.line) -- pretend that 'OP_FOR' starts the loop - luaK:patchlist (fs, isnum and endfor or luaK:jump(fs), prep + 1) -end - - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function recfield (fs, ast, cc) - local reg = fs.freereg - local key, val = {}, {} -- expdesc - --FIXME: expr + exp2val = index --> - -- check reduncancy between exp2val and exp2rk - cc.nh = cc.nh + 1 - expr.expr(fs, ast[1], key); - luaK:exp2val (fs, key) - local keyreg = luaK:exp2RK (fs, key) - expr.expr(fs, ast[2], val) - local valreg = luaK:exp2RK (fs, val) - luaK:codeABC(fs, "OP_SETTABLE", cc.t.info, keyreg, valreg) - fs.freereg = reg -- free registers -end - - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function listfield(fs, ast, cc) - expr.expr(fs, ast, cc.v) - assert (cc.na <= luaP.MAXARG_Bx) -- FIXME check <= or < - cc.na = cc.na + 1 - cc.tostore = cc.tostore + 1 -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -local function closelistfield(fs, cc) - if cc.v.k == "VVOID" then return end -- there is no list item - luaK:exp2nextreg(fs, cc.v) - cc.v.k = "VVOID" - if cc.tostore == luaP.LFIELDS_PER_FLUSH then - luaK:setlist (fs, cc.t.info, cc.na, cc.tostore) - cc.tostore = 0 - end -end - ------------------------------------------------------------------------- --- The last field might be a call to a multireturn function. In that --- case, we must unfold all of its results into the list. ------------------------------------------------------------------------- -local function lastlistfield(fs, cc) - if cc.tostore == 0 then return end - if hasmultret (cc.v.k) then - luaK:setmultret(fs, cc.v) - luaK:setlist (fs, cc.t.info, cc.na, luaK.LUA_MULTRET) - cc.na = cc.na - 1 - else - if cc.v.k ~= "VVOID" then luaK:exp2nextreg(fs, cc.v) end - luaK:setlist (fs, cc.t.info, cc.na, cc.tostore) - end -end ------------------------------------------------------------------------- ------------------------------------------------------------------------- --- --- Statement parsers table --- ------------------------------------------------------------------------- ------------------------------------------------------------------------- - -function stat.stat (fs, ast) - if ast.lineinfo then fs.lastline = ast.lineinfo.last.line end - --debugf (" - Statement %s", table.tostring (ast) ) - - if not ast.tag then chunk (fs, ast) else - - local parser = stat [ast.tag] - if not parser then - error ("A statement cannot have tag `"..ast.tag) end - parser (fs, ast) - end - --debugf (" - /Statement `%s", ast.tag) -end - ------------------------------------------------------------------------- - -stat.Do = block - ------------------------------------------------------------------------- - -function stat.Break (fs, ast) - -- if ast.lineinfo then fs.lastline = ast.lineinfo.last.line - local bl, upval = fs.bl, false - while bl and not bl.isbreakable do - if bl.upval then upval = true end - bl = bl.previous - end - assert (bl, "no loop to break") - if upval then luaK:codeABC(fs, "OP_CLOSE", bl.nactvar, 0, 0) end - bl.breaklist = luaK:concat(fs, bl.breaklist, luaK:jump(fs)) -end - ------------------------------------------------------------------------- - -function stat.Return (fs, ast) - local e = {} -- expdesc - local first -- registers with returned values - local nret = #ast - - if nret == 0 then first = 0 - else - --printf("[RETURN] compiling explist") - explist (fs, ast, e) - --printf("[RETURN] explist e=%s", tostringv(e)) - if hasmultret (e.k) then - luaK:setmultret(fs, e) - if e.k == "VCALL" and nret == 1 then - luaP:SET_OPCODE(luaK:getcode(fs, e), "OP_TAILCALL") - assert(luaP:GETARG_A(luaK:getcode(fs, e)) == fs.nactvar) - end - first = fs.nactvar - nret = luaK.LUA_MULTRET -- return all values - elseif nret == 1 then - first = luaK:exp2anyreg(fs, e) - else - --printf("* Return multiple vals in nextreg %i", fs.freereg) - luaK:exp2nextreg(fs, e) -- values must go to the 'stack' - first = fs.nactvar -- return all 'active' values - assert(nret == fs.freereg - first) - end - end - luaK:ret(fs, first, nret) -end ------------------------------------------------------------------------- - -function stat.Local (fs, ast) - local names, values = ast[1], ast[2] or { } - for i = 1, #names do new_localvar (fs, names[i][1], i-1) end - local e = { } - if #values == 0 then e.k = "VVOID" else explist (fs, values, e) end - adjust_assign (fs, #names, #values, e) - adjustlocalvars (fs, #names) -end - ------------------------------------------------------------------------- - -function stat.Localrec (fs, ast) - assert(#ast[1]==1 and #ast[2]==1, "Multiple letrecs not implemented yet") - local ast_var, ast_val, e_var, e_val = ast[1][1], ast[2][1], { }, { } - new_localvar (fs, ast_var[1], 0) - init_exp (e_var, "VLOCAL", fs.freereg) - luaK:reserveregs (fs, 1) - adjustlocalvars (fs, 1) - expr.expr (fs, ast_val, e_val) - luaK:storevar (fs, e_var, e_val) - getlocvar (fs, fs.nactvar-1).startpc = fs.pc -end - ------------------------------------------------------------------------- - -function stat.If (fs, ast) - local astlen = #ast - -- Degenerate case #1: no statement - if astlen==0 then return block(fs, { }) end - -- Degenerate case #2: only an else statement - if astlen==1 then return block(fs, ast[1]) end - - local function test_then_block (fs, test, body) - local condexit = cond (fs, test); - block (fs, body) - return condexit - end - - local escapelist = luaK.NO_JUMP - - local flist = test_then_block (fs, ast[1], ast[2]) -- 'then' statement - for i = 3, #ast - 1, 2 do -- 'elseif' statement - escapelist = luaK:concat( fs, escapelist, luaK:jump(fs)) - luaK:patchtohere (fs, flist) - flist = test_then_block (fs, ast[i], ast[i+1]) - end - if #ast % 2 == 1 then -- 'else' statement - escapelist = luaK:concat(fs, escapelist, luaK:jump(fs)) - luaK:patchtohere(fs, flist) - block (fs, ast[#ast]) - else - escapelist = luaK:concat(fs, escapelist, flist) - end - luaK:patchtohere(fs, escapelist) -end - ------------------------------------------------------------------------- - -function stat.Forin (fs, ast) - local vars, vals, body = ast[1], ast[2], ast[3] - -- imitating forstat: - local bl = { } - enterblock (fs, bl, true) - -- imitating forlist: - local e, base = { }, fs.freereg - new_localvar (fs, "(for generator)", 0) - new_localvar (fs, "(for state)", 1) - new_localvar (fs, "(for control)", 2) - for i = 1, #vars do new_localvar (fs, vars[i][1], i+2) end - explist (fs, vals, e) - adjust_assign (fs, 3, #vals, e) - luaK:checkstack (fs, 3) - forbody (fs, body, base, #vars, false) - -- back to forstat: - leaveblock (fs) -end - ------------------------------------------------------------------------- - -function stat.Fornum (fs, ast) - - local function exp1 (ast_e) - local e = { } - expr.expr (fs, ast_e, e) - luaK:exp2nextreg (fs, e) - end - -- imitating forstat: - local bl = { } - enterblock (fs, bl, true) - -- imitating fornum: - local base = fs.freereg - new_localvar (fs, "(for index)", 0) - new_localvar (fs, "(for limit)", 1) - new_localvar (fs, "(for step)", 2) - new_localvar (fs, ast[1][1], 3) - exp1 (ast[2]) -- initial value - exp1 (ast[3]) -- limit - if #ast == 5 then exp1 (ast[4]) else -- default step = 1 - luaK:codeABx(fs, "OP_LOADK", fs.freereg, luaK:numberK(fs, 1)) - luaK:reserveregs(fs, 1) - end - forbody (fs, ast[#ast], base, 1, true) - -- back to forstat: - leaveblock (fs) -end - ------------------------------------------------------------------------- -function stat.Repeat (fs, ast) - local repeat_init = luaK:getlabel (fs) - local bl1, bl2 = { }, { } - enterblock (fs, bl1, true) - enterblock (fs, bl2, false) - chunk (fs, ast[1]) - local condexit = cond (fs, ast[2]) - if not bl2.upval then - leaveblock (fs) - luaK:patchlist (fs, condexit, repeat_init) - else - stat.Break (fs) - luaK:patchtohere (fs, condexit) - leaveblock (fs) - luaK:patchlist (fs, luaK:jump (fs), repeat_init) - end - leaveblock (fs) -end - ------------------------------------------------------------------------- - -function stat.While (fs, ast) - local whileinit = luaK:getlabel (fs) - local condexit = cond (fs, ast[1]) - local bl = { } - enterblock (fs, bl, true) - block (fs, ast[2]) - luaK:patchlist (fs, luaK:jump (fs), whileinit) - leaveblock (fs) - luaK:patchtohere (fs, condexit); -end - ------------------------------------------------------------------------- - --- FIXME: it's cumbersome to write this in this semi-recursive way. -function stat.Set (fs, ast) - local ast_lhs, ast_vals, e = ast[1], ast[2], { } - - --print "\n\nSet ast_lhs ast_vals:" - --print(disp.ast(ast_lhs)) - --print(disp.ast(ast_vals)) - - local function let_aux (lhs, nvars) - local legal = { VLOCAL=1, VUPVAL=1, VGLOBAL=1, VINDEXED=1 } - --printv(lhs) - if not legal [lhs.v.k] then - error ("Bad lhs expr: "..pp.tostring(ast_lhs)) - end - if nvars < #ast_lhs then -- this is not the last lhs - local nv = { v = { }, prev = lhs } - expr.expr (fs, ast_lhs [nvars+1], nv.v) - if nv.v.k == "VLOCAL" then check_conflict (fs, lhs, nv.v) end - let_aux (nv, nvars+1) - else -- this IS the last lhs - explist (fs, ast_vals, e) - if #ast_vals < nvars then - adjust_assign (fs, nvars, #ast_vals, e) - elseif #ast_vals > nvars then - adjust_assign (fs, nvars, #ast_vals, e) - fs.freereg = fs.freereg - #ast_vals + nvars - else -- #ast_vals == nvars (and we're at last lhs) - luaK:setoneret (fs, e) -- close last expression - luaK:storevar (fs, lhs.v, e) - return -- avoid default - end - end - init_exp (e, "VNONRELOC", fs.freereg - 1) -- default assignment - luaK:storevar (fs, lhs.v, e) - end - - local lhs = { v = { }, prev = nil } - expr.expr (fs, ast_lhs[1], lhs.v) - let_aux( lhs, 1) -end - ------------------------------------------------------------------------- - -function stat.Call (fs, ast) - local v = { } - expr.Call (fs, ast, v) - luaP:SETARG_C (luaK:getcode(fs, v), 1) -end - ------------------------------------------------------------------------- - -function stat.Invoke (fs, ast) - local v = { } - expr.Invoke (fs, ast, v) - --FIXME: didn't check that, just copied from stat.Call - luaP:SETARG_C (luaK:getcode(fs, v), 1) -end - - -local function patch_goto (fs, src, dst) - -end - - ------------------------------------------------------------------------- --- Goto/Label data: --- fs.labels :: string => { nactvar :: int; pc :: int } --- fs.forward_gotos :: string => list(int) --- --- fs.labels goes from label ids to the number of active variables at --- the label's PC, and that PC --- --- fs.forward_gotos goes from label ids to the list of the PC where --- some goto wants to jump to this label. Since gotos are actually made --- up of two instructions OP_CLOSE and OP_JMP, it's the first instruction's --- PC that's stored in fs.forward_gotos --- --- Note that backward gotos aren't stored: since their destination is knowns --- when they're compiled, their target is directly set. ------------------------------------------------------------------------- - ------------------------------------------------------------------------- --- Set a Label to jump to with Goto ------------------------------------------------------------------------- -function stat.Label (fs, ast) - local label_id = ast[1] - if type(label_id)=='table' then label_id=label_id[1] end - -- printf("Label %s at PC %i", label_id, fs.pc) - ------------------------------------------------------------------- - -- Register the label, so that future gotos can use it. - ------------------------------------------------------------------- - if fs.labels [label_id] then error "Duplicate label in function" - else fs.labels [label_id] = { pc = fs.pc; nactvar = fs.nactvar } end - local gotos = fs.forward_gotos [label_id] - if gotos then - ---------------------------------------------------------------- - -- Patch forward gotos which were targetting this label. - ---------------------------------------------------------------- - for _, goto_pc in ipairs(gotos) do - local close_instr = fs.f.code[goto_pc] - local jmp_instr = fs.f.code[goto_pc+1] - local goto_nactvar = luaP:GETARG_A (close_instr) - if fs.nactvar < goto_nactvar then - luaP:SETARG_A (close_instr, fs.nactvar) end - luaP:SETARG_sBx (jmp_instr, fs.pc - goto_pc - 2) - end - ---------------------------------------------------------------- - -- Gotos are patched, they can be forgotten about (when the - -- function will be finished, it will be checked that all gotos - -- have been patched, by checking that forward_goto is empty). - ---------------------------------------------------------------- - fs.forward_gotos[label_id] = nil - end -end - ------------------------------------------------------------------------- --- jumps to a label set with stat.Label. --- Argument must be a String or an Id --- FIXME/optim: get rid of useless OP_CLOSE when nactvar doesn't change. --- Thsi must be done both here for backward gotos, and in --- stat.Label for forward gotos. ------------------------------------------------------------------------- -function stat.Goto (fs, ast) - local label_id = ast[1] - if type(label_id)=='table' then label_id=label_id[1] end - -- printf("Goto %s at PC %i", label_id, fs.pc) - local label = fs.labels[label_id] - if label then - ---------------------------------------------------------------- - -- Backward goto: the label already exists, so I can get its - -- nactvar and address directly. nactvar is used to close - -- upvalues if we get out of scoping blocks by jumping. - ---------------------------------------------------------------- - if fs.nactvar > label.nactvar then - luaK:codeABC (fs, "OP_CLOSE", label.nactvar, 0, 0) end - local offset = label.pc - fs.pc - 1 - luaK:codeAsBx (fs, "OP_JMP", 0, offset) - else - ---------------------------------------------------------------- - -- Forward goto: will be patched when the matching label is - -- found, forward_gotos[label_id] keeps the PC of the CLOSE - -- instruction just before the JMP. [stat.Label] will use it to - -- patch the OP_CLOSE and the OP_JMP. - ---------------------------------------------------------------- - if not fs.forward_gotos[label_id] then - fs.forward_gotos[label_id] = { } end - table.insert (fs.forward_gotos[label_id], fs.pc) - luaK:codeABC (fs, "OP_CLOSE", fs.nactvar, 0, 0) - luaK:codeAsBx (fs, "OP_JMP", 0, luaK.NO_JUMP) - end -end - ------------------------------------------------------------------------- ------------------------------------------------------------------------- --- --- Expression parsers table --- ------------------------------------------------------------------------- ------------------------------------------------------------------------- - -function expr.expr (fs, ast, v) - if type(ast) ~= "table" then - error ("Expr AST expected, got "..pp.tostring(ast)) end - - if ast.lineinfo then fs.lastline = ast.lineinfo.last.line end - - --debugf (" - Expression %s", table.tostring (ast)) - local parser = expr[ast.tag] - if parser then parser (fs, ast, v) - elseif not ast.tag then - error ("No tag in expression ".. - pp.tostring(ast, {line_max=80, hide_hash=1, metalua_tag=1})) - else - error ("No parser for node `"..ast.tag) end - --debugf (" - /Expression `%s", ast.tag) -end - ------------------------------------------------------------------------- - -function expr.Nil (fs, ast, v) init_exp (v, "VNIL", 0) end -function expr.True (fs, ast, v) init_exp (v, "VTRUE", 0) end -function expr.False (fs, ast, v) init_exp (v, "VFALSE", 0) end -function expr.String (fs, ast, v) codestring (fs, v, ast[1]) end -function expr.Number (fs, ast, v) - init_exp (v, "VKNUM", 0) - v.nval = ast[1] -end - -function expr.Paren (fs, ast, v) - expr.expr (fs, ast[1], v) - luaK:setoneret (fs, v) -end - -function expr.Dots (fs, ast, v) - assert (fs.f.is_vararg ~= 0, "No vararg in this function") - -- NEEDSARG flag is set if and only if the function is a vararg, - -- but no vararg has been used yet in its code. - if fs.f.is_vararg < M.VARARG_NEEDSARG then - fs.f.is_varag = fs.f.is_vararg - M.VARARG_NEEDSARG end - init_exp (v, "VVARARG", luaK:codeABC (fs, "OP_VARARG", 0, 1, 0)) -end - ------------------------------------------------------------------------- - -function expr.Table (fs, ast, v) - local pc = luaK:codeABC(fs, "OP_NEWTABLE", 0, 0, 0) - local cc = { v = { } , na = 0, nh = 0, tostore = 0, t = v } -- ConsControl - init_exp (v, "VRELOCABLE", pc) - init_exp (cc.v, "VVOID", 0) -- no value (yet) - luaK:exp2nextreg (fs, v) -- fix it at stack top (for gc) - for i = 1, #ast do - assert(cc.v.k == "VVOID" or cc.tostore > 0) - closelistfield(fs, cc); - (ast[i].tag == "Pair" and recfield or listfield) (fs, ast[i], cc) - end - lastlistfield(fs, cc) - - -- Configure [OP_NEWTABLE] dimensions - luaP:SETARG_B(fs.f.code[pc], int2fb(cc.na)) -- set initial array size - luaP:SETARG_C(fs.f.code[pc], int2fb(cc.nh)) -- set initial table size - --printv(fs.f.code[pc]) -end - - ------------------------------------------------------------------------- - -function expr.Function (fs, ast, v) - if ast.lineinfo then fs.lastline = ast.lineinfo.last.line end - - local new_fs = open_func(fs) - if ast.lineinfo then - new_fs.f.lineDefined, new_fs.f.lastLineDefined = - ast.lineinfo.first.line, ast.lineinfo.last.line - end - parlist (new_fs, ast[1]) - chunk (new_fs, ast[2]) - close_func (new_fs) - pushclosure(fs, new_fs, v) -end - ------------------------------------------------------------------------- - -function expr.Op (fs, ast, v) - if ast.lineinfo then fs.lastline = ast.lineinfo.last.line end - local op = ast[1] - - if #ast == 2 then - expr.expr (fs, ast[2], v) - luaK:prefix (fs, op, v) - elseif #ast == 3 then - local v2 = { } - expr.expr (fs, ast[2], v) - luaK:infix (fs, op, v) - expr.expr (fs, ast[3], v2) - luaK:posfix (fs, op, v, v2) - else - error "Wrong arg number" - end -end - ------------------------------------------------------------------------- - -function expr.Call (fs, ast, v) - expr.expr (fs, ast[1], v) - luaK:exp2nextreg (fs, v) - funcargs(fs, ast, v, 2) - --debugf("after expr.Call: %s, %s", v.k, luaP.opnames[luaK:getcode(fs, v).OP]) -end - ------------------------------------------------------------------------- --- `Invoke{ table key args } -function expr.Invoke (fs, ast, v) - expr.expr (fs, ast[1], v) - luaK:dischargevars (fs, v) - local key = { } - codestring (fs, key, ast[2][1]) - luaK:_self (fs, v, key) - funcargs (fs, ast, v, 3) -end - ------------------------------------------------------------------------- - -function expr.Index (fs, ast, v) - if #ast ~= 2 then - print"\n\nBAD INDEX AST:" - pp.print(ast) - error "generalized indexes not implemented" end - - if ast.lineinfo then fs.lastline = ast.lineinfo.last.line end - - --assert(fs.lastline ~= 0, ast.tag) - - expr.expr (fs, ast[1], v) - luaK:exp2anyreg (fs, v) - - local k = { } - expr.expr (fs, ast[2], k) - luaK:exp2val (fs, k) - luaK:indexed (fs, v, k) -end - ------------------------------------------------------------------------- - -function expr.Id (fs, ast, v) - assert (ast.tag == "Id") - singlevar (fs, ast[1], v) -end - ------------------------------------------------------------------------- - -function expr.Stat (fs, ast, v) - --printf(" * Stat: %i actvars, first freereg is %i", fs.nactvar, fs.freereg) - --printf(" actvars: %s", table.tostring(fs.actvar)) - - -- Protect temporary stack values by pretending they are local - -- variables. Local vars are in registers 0 ... fs.nactvar-1, - -- and temporary unnamed variables in fs.nactvar ... fs.freereg-1 - local save_nactvar = fs.nactvar - - -- Eventually, the result should go on top of stack *after all - -- `Stat{ } related computation and string usage is over. The index - -- of this destination register is kept here: - local dest_reg = fs.freereg - - -- There might be variables in actvar whose register is > nactvar, - -- and therefore will not be protected by the "nactvar := freereg" - -- trick. Indeed, `Local only increases nactvar after the variable - -- content has been computed. Therefore, in - -- "local foo = -{`Stat{...}}", variable foo will be messed up by - -- the compilation of `Stat. - -- FIX: save the active variables at indices >= nactvar in - -- save_actvar, and restore them after `Stat has been computed. - -- - -- I use a while rather than for loops and length operators because - -- fs.actvar is a 0-based array... - local save_actvar = { } do - local i = fs.nactvar - while true do - local v = fs.actvar[i] - if not v then break end - --printf("save hald-baked actvar %s at index %i", table.tostring(v), i) - save_actvar[i] = v - i=i+1 - end - end - - fs.nactvar = fs.freereg -- Now temp unnamed registers are protected - enterblock (fs, { }, false) - chunk (fs, ast[1]) - expr.expr (fs, ast[2], v) - luaK:exp2nextreg (fs, v) - leaveblock (fs) - luaK:exp2reg (fs, v, dest_reg) - - -- Reserve the newly allocated stack level - -- Puzzled note: here was written "fs.freereg = fs.freereg+1". - -- I'm pretty sure it should rather be dest_reg+1, but maybe - -- both are equivalent? - fs.freereg = dest_reg+1 - - -- Restore nactvar, so that intermediate stacked value stop - -- being protected. - --printf(" nactvar back from %i to %i", fs.nactvar, save_nactvar) - fs.nactvar = save_nactvar - - -- restore messed-up unregistered local vars - for i, j in pairs(save_actvar) do - --printf(" Restoring actvar %i", i) - fs.actvar[i] = j - end - --printf(" * End of Stat") -end - ------------------------------------------------------------------------- --- Main function: ast --> proto ------------------------------------------------------------------------- -function M.ast_to_proto (ast, source) - local fs = open_func (nil) - fs.f.is_vararg = M.VARARG_ISVARARG - chunk (fs, ast) - close_func (fs) - assert (fs.prev == nil) - assert (fs.f.nups == 0) - assert (fs.nestlevel == 0) - if source then fs.f.source = source end - return fs.f, source -end - -return M \ No newline at end of file diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/bytecode/lcode.lua b/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/bytecode/lcode.lua deleted file mode 100644 index ede1a1c45..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/bytecode/lcode.lua +++ /dev/null @@ -1,1038 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2005-2013 Kein-Hong Man, Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Kein-Hong Man - Initial implementation for Lua 5.0, part of Yueliang --- Fabien Fleutot - Port to Lua 5.1, integration with Metalua --- -------------------------------------------------------------------------------- - ---[[-------------------------------------------------------------------- - - $Id$ - - lcode.lua - Lua 5 code generator in Lua - This file is part of Yueliang. - - Copyright (c) 2005 Kein-Hong Man - The COPYRIGHT file describes the conditions - under which this software may be distributed. - - See the ChangeLog for more information. - ------------------------------------------------------------------------- - - [FF] Slightly modified, mainly to produce Lua 5.1 bytecode. - -----------------------------------------------------------------------]] - ---[[-------------------------------------------------------------------- --- Notes: --- * one function manipulate a pointer argument with a simple data type --- (can't be emulated by a table, ambiguous), now returns that value: --- luaK:concat(fs, l1, l2) --- * some function parameters changed to boolean, additional code --- translates boolean back to 1/0 for instruction fields --- * Added: --- luaK:ttisnumber(o) (from lobject.h) --- luaK:nvalue(o) (from lobject.h) --- luaK:setnilvalue(o) (from lobject.h) --- luaK:setsvalue(o) (from lobject.h) --- luaK:setnvalue(o) (from lobject.h) --- luaK:sethvalue(o) (from lobject.h) -----------------------------------------------------------------------]] - -local luaP = require 'metalua.compiler.bytecode.lopcodes' - -local function debugf() end - -local luaK = { } - -luaK.MAXSTACK = 250 -- (llimits.h, used in lcode.lua) -luaK.LUA_MULTRET = -1 -- (lua.h) - ------------------------------------------------------------------------- --- Marks the end of a patch list. It is an invalid value both as an absolute --- address, and as a list link (would link an element to itself). ------------------------------------------------------------------------- -luaK.NO_JUMP = -1 - ---FF 5.1 -function luaK:isnumeral(e) - return e.k=="VKNUM" and e.t==self.NO_JUMP and e.t==self.NO_JUMP -end - ------------------------------------------------------------------------- --- emulation of TObject macros (these are from lobject.h) --- * TObject is a table since lcode passes references around --- * tt member field removed, using Lua's type() instead ------------------------------------------------------------------------- -function luaK:ttisnumber(o) - if o then return type(o.value) == "number" else return false end -end -function luaK:nvalue(o) return o.value end -function luaK:setnilvalue(o) o.value = nil end -function luaK:setsvalue(o, s) o.value = s end -luaK.setnvalue = luaK.setsvalue -luaK.sethvalue = luaK.setsvalue - ------------------------------------------------------------------------- --- returns the instruction object for given e (expdesc) ------------------------------------------------------------------------- -function luaK:getcode(fs, e) - return fs.f.code[e.info] -end - ------------------------------------------------------------------------- --- codes an instruction with a signed Bx (sBx) field ------------------------------------------------------------------------- -function luaK:codeAsBx(fs, o, A, sBx) - return self:codeABx(fs, o, A, sBx + luaP.MAXARG_sBx) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:hasjumps(e) - return e.t ~= e.f -end - ------------------------------------------------------------------------- --- FF updated 5.1 ------------------------------------------------------------------------- -function luaK:_nil(fs, from, n) - if fs.pc > fs.lasttarget then -- no jumps to current position? - if fs.pc == 0 then return end --function start, positions are already clean - local previous = fs.f.code[fs.pc - 1] - if luaP:GET_OPCODE(previous) == "OP_LOADNIL" then - local pfrom = luaP:GETARG_A(previous) - local pto = luaP:GETARG_B(previous) - if pfrom <= from and from <= pto + 1 then -- can connect both? - if from + n - 1 > pto then - luaP:SETARG_B(previous, from + n - 1) - end - return - end - end - end - self:codeABC(fs, "OP_LOADNIL", from, from + n - 1, 0) -- else no optimization -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:jump(fs) - local jpc = fs.jpc -- save list of jumps to here - fs.jpc = self.NO_JUMP - local j = self:codeAsBx(fs, "OP_JMP", 0, self.NO_JUMP) - return self:concat(fs, j, jpc) -- keep them on hold -end - ---FF 5.1 -function luaK:ret (fs, first, nret) - luaK:codeABC (fs, "OP_RETURN", first, nret+1, 0) -end - - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:condjump(fs, op, A, B, C) - self:codeABC(fs, op, A, B, C) - return self:jump(fs) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:fixjump(fs, pc, dest) - local jmp = fs.f.code[pc] - local offset = dest - (pc + 1) - assert(dest ~= self.NO_JUMP) - if math.abs(offset) > luaP.MAXARG_sBx then - error("control structure too long") - end - luaP:SETARG_sBx(jmp, offset) -end - ------------------------------------------------------------------------- --- returns current 'pc' and marks it as a jump target (to avoid wrong --- optimizations with consecutive instructions not in the same basic block). ------------------------------------------------------------------------- -function luaK:getlabel(fs) - fs.lasttarget = fs.pc - return fs.pc -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:getjump(fs, pc) - local offset = luaP:GETARG_sBx(fs.f.code[pc]) - if offset == self.NO_JUMP then -- point to itself represents end of list - return self.NO_JUMP -- end of list - else - return (pc + 1) + offset -- turn offset into absolute position - end -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:getjumpcontrol(fs, pc) - local pi = fs.f.code[pc] - local ppi = fs.f.code[pc - 1] - if pc >= 1 and luaP:testOpMode(luaP:GET_OPCODE(ppi), "OpModeT") then - return ppi - else - return pi - end -end - ------------------------------------------------------------------------- --- check whether list has any jump that do not produce a value --- (or produce an inverted value) ------------------------------------------------------------------------- ---FF updated 5.1 -function luaK:need_value(fs, list, cond) - while list ~= self.NO_JUMP do - local i = self:getjumpcontrol(fs, list) - if luaP:GET_OPCODE(i) ~= "OP_TESTSET" or - luaP:GETARG_A(i) ~= luaP.NO_REG or - luaP:GETARG_C(i) ~= cond then - return true - end - list = self:getjump(fs, list) - end - return false -- not found -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- ---FF updated 5.1 -function luaK:patchtestreg(fs, node, reg) - assert(reg) -- pour assurer, vu que j'ai ajoute un parametre p/r a 5.0 - local i = self:getjumpcontrol(fs, node) - if luaP:GET_OPCODE(i) ~= "OP_TESTSET" then - return false end -- cannot patch other instructions - if reg ~= luaP.NO_REG and reg ~= luaP:GETARG_B(i) then - luaP:SETARG_A(i, reg) - else - -- no register to put value or register already has the value - luaP:SET_OPCODE(i, "OP_TEST") - luaP:SETARG_A(i, luaP:GETARG_B(i)) - luaP:SETARG_B(i, 0) - luaP:SETARG_C(i, luaP:GETARG_C(i)) - end - return true -end - ---FF added 5.1 -function luaK:removevalues (fs, list) - while list ~= self.NO_JUMP do - self:patchtestreg (fs, list, luaP.NO_REG) - list = self:getjump (fs, list) - end -end - ------------------------------------------------------------------------- --- FF updated 5.1 ------------------------------------------------------------------------- -function luaK:patchlistaux(fs, list, vtarget, reg, dtarget) - while list ~= self.NO_JUMP do - local _next = self:getjump(fs, list) - if self:patchtestreg (fs, list, reg) then - self:fixjump(fs, list, vtarget) - else - self:fixjump (fs, list, dtarget) - end - list = _next - end -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:dischargejpc(fs) - self:patchlistaux(fs, fs.jpc, fs.pc, luaP.NO_REG, fs.pc) - fs.jpc = self.NO_JUMP -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:patchlist(fs, list, target) - if target == fs.pc then - self:patchtohere(fs, list) - else - assert(target < fs.pc) - self:patchlistaux(fs, list, target, luaP.NO_REG, target) - end -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:patchtohere(fs, list) - self:getlabel(fs) - fs.jpc = self:concat(fs, fs.jpc, list) -end - ------------------------------------------------------------------------- --- * l1 was a pointer, now l1 is returned and callee assigns the value ------------------------------------------------------------------------- -function luaK:concat(fs, l1, l2) - if l2 == self.NO_JUMP then return l1 -- unchanged - elseif l1 == self.NO_JUMP then - return l2 -- changed - else - local list = l1 - local _next = self:getjump(fs, list) - while _next ~= self.NO_JUMP do -- find last element - list = _next - _next = self:getjump(fs, list) - end - self:fixjump(fs, list, l2) - end - return l1 -- unchanged -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:checkstack(fs, n) - local newstack = fs.freereg + n - if newstack > fs.f.maxstacksize then - if newstack >= luaK.MAXSTACK then - error("function or expression too complex") - end - fs.f.maxstacksize = newstack - end -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:reserveregs(fs, n) - self:checkstack(fs, n) - fs.freereg = fs.freereg + n -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:freereg(fs, reg) - if not luaP:ISK (reg) and reg >= fs.nactvar then - fs.freereg = fs.freereg - 1 - assert(reg == fs.freereg, - string.format("reg=%i, fs.freereg=%i", reg, fs.freereg)) - end -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:freeexp(fs, e) - if e.k == "VNONRELOC" then - self:freereg(fs, e.info) - end -end - ------------------------------------------------------------------------- --- k is a constant, v is... what? --- fs.h is a hash value --> index in f.k ------------------------------------------------------------------------- --- * luaH_get, luaH_set deleted; direct table access used instead --- * luaO_rawequalObj deleted in first assert --- * setobj2n deleted in assignment of v to f.k table ------------------------------------------------------------------------- ---FF radically updated, not completely understood -function luaK:addk(fs, k, v) - local idx = fs.h[k.value] - local f = fs.f --- local oldsize = f.sizek - if self:ttisnumber (idx) then - --TODO this assert currently FAILS - --assert(fs.f.k[self:nvalue(idx)] == v) - return self:nvalue(idx) - else -- constant not found; create a new entry - do - local t = type (v.value) - assert(t=="nil" or t=="string" or t=="number" or t=="boolean") - end - --debugf("[const: k[%i] = %s ]", fs.nk, tostringv(v.value)) - fs.f.k[fs.nk] = v - fs.h[k.value] = { } - self:setnvalue(fs.h[k.value], fs.nk) - local nk = fs.nk - fs.nk = fs.nk+1 - return nk - end -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:stringK(fs, s) - assert (type(s)=="string") - local o = {} -- TObject - self:setsvalue(o, s) - return self:addk(fs, o, o) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:numberK(fs, r) - assert (type(r)=="number") - local o = {} -- TObject - self:setnvalue(o, r) - return self:addk(fs, o, o) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:boolK(fs, r) - assert (type(r)=="boolean") - local o = {} -- TObject - self:setnvalue(o, r) - return self:addk(fs, o, o) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:nilK(fs) - local k, v = {}, {} -- TObject - self:setnilvalue(v) - self:sethvalue(k, fs.h) -- cannot use nil as key; instead use table itself - return self:addk(fs, k, v) -end - - ---FF 5.1 -function luaK:setreturns (fs, e, nresults) - if e.k == "VCALL" then -- expression is an open function call? - luaP:SETARG_C(self:getcode(fs, e), nresults + 1) - elseif e.k == "VVARARG" then - luaP:SETARG_B (self:getcode (fs, e), nresults + 1) - luaP:SETARG_A (self:getcode (fs, e), fs.freereg) - self:reserveregs (fs, 1) - end -end - ---FF 5.1 -function luaK:setmultret (fs, e) - self:setreturns (fs, e, self.LUA_MULTRET) -end - ---FF 5.1 -function luaK:setoneret (fs, e) - if e.k == "VCALL" then -- expression is an open function call? - e.k = "VNONRELOC" - e.info = luaP:GETARG_A(self:getcode(fs, e)) - elseif e.k == "VVARARG" then - luaP:SETARG_B (self:getcode (fs, e), 2) - e.k = "VRELOCABLE" - end -end - - ------------------------------------------------------------------------- ---FF deprecated in 5.1 ------------------------------------------------------------------------- -function luaK:setcallreturns(fs, e, nresults) - assert (false, "setcallreturns deprecated") - --print "SCR:" - --printv(e) - --printv(self:getcode(fs, e)) - if e.k == "VCALL" then -- expression is an open function call? - luaP:SETARG_C(self:getcode(fs, e), nresults + 1) - if nresults == 1 then -- 'regular' expression? - e.k = "VNONRELOC" - e.info = luaP:GETARG_A(self:getcode(fs, e)) - end - elseif e.k == "VVARARG" then - --printf("Handle vararg return on expr %s, whose code is %s", - -- tostringv(e), tostringv(self:getcode(fs, e))) - if nresults == 1 then - luaP:SETARG_B (self:getcode (fs, e), 2) - e.k = "VRELOCABLE" ---FIXME: why no SETARG_A??? - else - luaP:SETARG_B (self:getcode (fs, e), nresults + 1) - luaP:SETARG_A (self:getcode (fs, e), fs.freereg) - self:reserveregs (fs, 1) - --printf("Now code is %s", tostringv(self:getcode(fs, e))) - end - end -end - ------------------------------------------------------------------------- --- Ajoute le code pour effectuer l'extraction de la locvar/upval/globvar --- /idx, sachant ------------------------------------------------------------------------- -function luaK:dischargevars(fs, e) ---printf("\ndischargevars\n") - local k = e.k - if k == "VLOCAL" then - e.k = "VNONRELOC" - elseif k == "VUPVAL" then - e.info = self:codeABC(fs, "OP_GETUPVAL", 0, e.info, 0) - e.k = "VRELOCABLE" - elseif k == "VGLOBAL" then - e.info = self:codeABx(fs, "OP_GETGLOBAL", 0, e.info) - e.k = "VRELOCABLE" - elseif k == "VINDEXED" then - self:freereg(fs, e.aux) - self:freereg(fs, e.info) - e.info = self:codeABC(fs, "OP_GETTABLE", 0, e.info, e.aux) - e.k = "VRELOCABLE" - elseif k == "VCALL" or k == "VVARARG" then - self:setoneret(fs, e) - else - -- there is one value available (somewhere) - end ---printf("\n/dischargevars\n") -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:code_label(fs, A, b, jump) - self:getlabel(fs) -- those instructions may be jump targets - return self:codeABC(fs, "OP_LOADBOOL", A, b, jump) -end - ------------------------------------------------------------------------- --- FF updated 5.1 ------------------------------------------------------------------------- -function luaK:discharge2reg(fs, e, reg) - self:dischargevars(fs, e) - local k = e.k - if k == "VNIL" then - self:_nil(fs, reg, 1) - elseif k == "VFALSE" or k == "VTRUE" then - self:codeABC(fs, "OP_LOADBOOL", reg, (e.k == "VTRUE") and 1 or 0, 0) - elseif k == "VKNUM" then - self:codeABx (fs, "OP_LOADK", reg, self:numberK(fs, e.nval)) - elseif k == "VK" then - self:codeABx(fs, "OP_LOADK", reg, e.info) - elseif k == "VRELOCABLE" then - local pc = self:getcode(fs, e) - luaP:SETARG_A(pc, reg) - elseif k == "VNONRELOC" then - if reg ~= e.info then - self:codeABC(fs, "OP_MOVE", reg, e.info, 0) - end - else - assert(e.k == "VVOID" or e.k == "VJMP") - return -- nothing to do... - end - e.info = reg - e.k = "VNONRELOC" -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:discharge2anyreg(fs, e) - if e.k ~= "VNONRELOC" then - self:reserveregs(fs, 1) - self:discharge2reg(fs, e, fs.freereg - 1) - end -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:exp2reg(fs, e, reg) - self:discharge2reg(fs, e, reg) - if e.k == "VJMP" then - e.t = self:concat(fs, e.t, e.info) -- put this jump in 't' list - end - if self:hasjumps(e) then - local final -- position after whole expression - local p_f = self.NO_JUMP -- position of an eventual LOAD false - local p_t = self.NO_JUMP -- position of an eventual LOAD true - if self:need_value(fs, e.t, 1) or self:need_value(fs, e.f, 0) then - local fj = self.NO_JUMP -- first jump (over LOAD ops.) - if e.k ~= "VJMP" then fj = self:jump(fs) end - p_f = self:code_label(fs, reg, 0, 1) - p_t = self:code_label(fs, reg, 1, 0) - self:patchtohere(fs, fj) - end - final = self:getlabel(fs) - self:patchlistaux(fs, e.f, final, reg, p_f) - self:patchlistaux(fs, e.t, final, reg, p_t) - end - e.f, e.t = self.NO_JUMP, self.NO_JUMP - e.info = reg - e.k = "VNONRELOC" -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:exp2nextreg(fs, e) - self:dischargevars(fs, e) - --[FF] Allready in place (added for expr.Stat) - if e.k == "VNONRELOC" and e.info == fs.freereg then - --printf("Expression already in next reg %i: %s", fs.freereg, tostringv(e)) - return end - self:freeexp(fs, e) - self:reserveregs(fs, 1) - self:exp2reg(fs, e, fs.freereg - 1) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:exp2anyreg(fs, e) - --printf("exp2anyregs(e=%s)", tostringv(e)) - self:dischargevars(fs, e) - if e.k == "VNONRELOC" then - if not self:hasjumps(e) then -- exp is already in a register - return e.info - end - if e.info >= fs.nactvar then -- reg. is not a local? - self:exp2reg(fs, e, e.info) -- put value on it - return e.info - end - end - self:exp2nextreg(fs, e) -- default - return e.info -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:exp2val(fs, e) - if self:hasjumps(e) then - self:exp2anyreg(fs, e) - else - self:dischargevars(fs, e) - end -end - ------------------------------------------------------------------------- --- FF updated 5.1 ------------------------------------------------------------------------- -function luaK:exp2RK(fs, e) - self:exp2val(fs, e) - local k = e.k - if k=="VNIL" or k=="VTRUE" or k=="VFALSE" or k=="VKNUM" then - if fs.nk <= luaP.MAXINDEXRK then - if k=="VNIL" then e.info = self:nilK(fs) - elseif k=="VKNUM" then e.info = self:numberK (fs, e.nval) - else e.info = self:boolK(fs, e.k=="VTRUE") end - e.k = "VK" - return luaP:RKASK(e.info) - end - elseif k == "VK" then - if e.info <= luaP.MAXINDEXRK then -- constant fit in argC? - return luaP:RKASK (e.info) - end - end - -- not a constant in the right range: put it in a register - return self:exp2anyreg(fs, e) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:storevar(fs, var, exp) - --print("STOREVAR") - --printf("var=%s", tostringv(var)) - --printf("exp=%s", tostringv(exp)) - - local k = var.k - if k == "VLOCAL" then - self:freeexp(fs, exp) - self:exp2reg(fs, exp, var.info) - return - elseif k == "VUPVAL" then - local e = self:exp2anyreg(fs, exp) - self:codeABC(fs, "OP_SETUPVAL", e, var.info, 0) - elseif k == "VGLOBAL" then - --printf("store global, exp=%s", tostringv(exp)) - local e = self:exp2anyreg(fs, exp) - self:codeABx(fs, "OP_SETGLOBAL", e, var.info) - elseif k == "VINDEXED" then - local e = self:exp2RK(fs, exp) - self:codeABC(fs, "OP_SETTABLE", var.info, var.aux, e) - else - assert(0) -- invalid var kind to store - end - self:freeexp(fs, exp) - --print("/STOREVAR") -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:_self(fs, e, key) - self:exp2anyreg(fs, e) - self:freeexp(fs, e) - local func = fs.freereg - self:reserveregs(fs, 2) - self:codeABC(fs, "OP_SELF", func, e.info, self:exp2RK(fs, key)) - self:freeexp(fs, key) - e.info = func - e.k = "VNONRELOC" -end - ------------------------------------------------------------------------- --- FF updated 5.1 ------------------------------------------------------------------------- -function luaK:invertjump(fs, e) - --printf("invertjump on jump instruction #%i", e.info) - --printv(self:getcode(fs, e)) - local pc = self:getjumpcontrol(fs, e.info) - assert(luaP:testOpMode(luaP:GET_OPCODE(pc), "OpModeT") and - luaP:GET_OPCODE(pc) ~= "OP_TESTSET" and - luaP:GET_OPCODE(pc) ~= "OP_TEST") - --printf("Before invert:") - --printv(pc) - luaP:SETARG_A(pc, (luaP:GETARG_A(pc) == 0) and 1 or 0) - --printf("After invert:") - --printv(pc) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:jumponcond(fs, e, cond) - if e.k == "VRELOCABLE" then - local ie = self:getcode(fs, e) - if luaP:GET_OPCODE(ie) == "OP_NOT" then - fs.pc = fs.pc - 1 -- remove previous OP_NOT - return self:condjump(fs, "OP_TEST", luaP:GETARG_B(ie), 0, - cond and 0 or 1) - end - -- else go through - end - self:discharge2anyreg(fs, e) - self:freeexp(fs, e) - return self:condjump(fs, "OP_TESTSET", luaP.NO_REG, e.info, cond and 1 or 0) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:goiftrue(fs, e) - local pc -- pc of last jump - self:dischargevars(fs, e) - local k = e.k - if k == "VK" or k == "VTRUE" or k == "VKNUM" then - pc = self.NO_JUMP -- always true; do nothing - elseif k == "VFALSE" then - pc = self:jump(fs) -- always jump - elseif k == "VJMP" then - self:invertjump(fs, e) - pc = e.info - else - pc = self:jumponcond(fs, e, false) - end - e.f = self:concat(fs, e.f, pc) -- insert last jump in 'f' list - self:patchtohere(fs, e.t) - e.t = self.NO_JUMP -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:goiffalse(fs, e) - local pc -- pc of last jump - self:dischargevars(fs, e) - local k = e.k - if k == "VNIL" or k == "VFALSE"then - pc = self.NO_JUMP -- always false; do nothing - elseif k == "VTRUE" then - pc = self:jump(fs) -- always jump - elseif k == "VJMP" then - pc = e.info - else - pc = self:jumponcond(fs, e, true) - end - e.t = self:concat(fs, e.t, pc) -- insert last jump in 't' list - self:patchtohere(fs, e.f) - e.f = self.NO_JUMP -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:codenot(fs, e) - self:dischargevars(fs, e) - local k = e.k - if k == "VNIL" or k == "VFALSE" then - e.k = "VTRUE" - elseif k == "VK" or k == "VKNUM" or k == "VTRUE" then - e.k = "VFALSE" - elseif k == "VJMP" then - self:invertjump(fs, e) - elseif k == "VRELOCABLE" or k == "VNONRELOC" then - self:discharge2anyreg(fs, e) - self:freeexp(fs, e) - e.info = self:codeABC(fs, "OP_NOT", 0, e.info, 0) - e.k = "VRELOCABLE" - else - assert(0) -- cannot happen - end - -- interchange true and false lists - e.f, e.t = e.t, e.f - self:removevalues(fs, e.f) - self:removevalues(fs, e.t) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:indexed(fs, t, k) - t.aux = self:exp2RK(fs, k) - t.k = "VINDEXED" -end - ---FF 5.1 -function luaK:constfolding (op, e1, e2) - if not self:isnumeral(e1) or not self:isnumeral(e2) then return false end - local v1, v2, e, r = e1.nval, e2 and e2.nval, nil - if op == "OP_ADD" then r = v1+v2 - elseif op == "OP_SUB" then r = v1-v2 - elseif op == "OP_MUL" then r = v1*v2 - elseif op == "OP_DIV" then if v2==0 then return false end r = v1/v2 - elseif op == "OP_MOD" then if v2==0 then return false end r = v1%v2 - elseif op == "OP_POW" then r = v1^v2 - elseif op == "OP_UNM" then r = -v1 - elseif op == "OP_LEN" then return false - else assert (false, "Unknown numeric value") end - e1.nval = r - return true -end - ---FF 5.1 -function luaK:codearith (fs, op, e1, e2) - if self:constfolding (op, e1, e2) then return else - local o1 = self:exp2RK (fs, e1) - local o2 = 0 - if op ~= "OP_UNM" and op ~= "OP_LEN" then - o2 = self:exp2RK (fs, e2) end - self:freeexp(fs, e2) - self:freeexp(fs, e1) - e1.info = self:codeABC (fs, op, 0, o1, o2) - e1.k = "VRELOCABLE" - end -end - ---FF 5.1 -function luaK:codecomp (fs, op, cond, e1, e2) - assert (type (cond) == "boolean") - local o1 = self:exp2RK (fs, e1) - local o2 = self:exp2RK (fs, e2) - self:freeexp (fs, e2) - self:freeexp (fs, e1) - if not cond and op ~= "OP_EQ" then - local temp = o1; o1=o2; o2=temp cond = true end - e1.info = self:condjump (fs, op, cond and 1 or 0, o1, o2) - e1.k = "VJMP" -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:prefix (fs, op, e) - local e2 = { t = self.NO_JUMP; f = self.NO_JUMP; - k = "VKNUM"; nval = 0 } - if op == "unm" then - if e.k == "VK" then - self:exp2anyreg (fs, e) end - self:codearith (fs, "OP_UNM", e, e2) - elseif op == "not" then - self:codenot (fs, e) - elseif op == "len" then - self:exp2anyreg (fs, e) - self:codearith (fs, "OP_LEN", e, e2) - else - assert (false, "Unknown unary operator") - end -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:infix (fs, op, v) - if op == "and" then - self:goiftrue(fs, v) - elseif op == "or" then - self:goiffalse(fs, v) - elseif op == "concat" then - self:exp2nextreg(fs, v) -- operand must be on the 'stack' - else - if not self:isnumeral (v) then self:exp2RK(fs, v) end - end -end - ------------------------------------------------------------------------- --- --- grep "ORDER OPR" if you change these enums ------------------------------------------------------------------------- -luaK.arith_opc = { -- done as a table lookup instead of a calc - add = "OP_ADD", - sub = "OP_SUB", - mul = "OP_MUL", - mod = "OP_MOD", - div = "OP_DIV", - pow = "OP_POW", - len = "OP_LEN", - ["not"] = "OP_NOT" -} -luaK.test_opc = { -- was ops[] in the codebinop function - eq = {opc="OP_EQ", cond=true}, - lt = {opc="OP_LT", cond=true}, - le = {opc="OP_LE", cond=true}, - - -- Pseudo-ops, with no metatable equivalent: - ne = {opc="OP_EQ", cond=false}, - gt = {opc="OP_LT", cond=false}, - ge = {opc="OP_LE", cond=false} -} - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:posfix(fs, op, e1, e2) - if op == "and" then - assert(e1.t == self.NO_JUMP) -- list must be closed - self:dischargevars(fs, e2) - e2.f = self:concat(fs, e2.f, e1.f) - for k,v in pairs(e2) do e1[k]=v end -- *e1 = *e2 - elseif op == "or" then - assert(e1.f == self.NO_JUMP) -- list must be closed - self:dischargevars(fs, e2) - e2.t = self:concat(fs, e2.t, e1.t) - for k,v in pairs(e2) do e1[k]=v end -- *e1 = *e2 - elseif op == "concat" then - self:exp2val(fs, e2) - if e2.k == "VRELOCABLE" - and luaP:GET_OPCODE(self:getcode(fs, e2)) == "OP_CONCAT" then - assert(e1.info == luaP:GETARG_B(self:getcode(fs, e2)) - 1) - self:freeexp(fs, e1) - luaP:SETARG_B(self:getcode(fs, e2), e1.info) - e1.k = "VRELOCABLE"; e1.info = e2.info - else - self:exp2nextreg(fs, e2) - self:codearith (fs, "OP_CONCAT", e1, e2) - end - else - local opc = self.arith_opc[op] - if opc then self:codearith (fs, opc, e1, e2) else - opc = self.test_opc[op] or error ("Unknown operator "..op) - self:codecomp (fs, opc.opc, opc.cond, e1, e2) - end - end -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:fixline(fs, line) - --assert (line) - if not line then - --print(debug.traceback "fixline (line == nil)") - end - fs.f.lineinfo[fs.pc - 1] = line or 0 -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:code(fs, i, line) - if not line then - line = 0 - --print(debug.traceback "line == nil") - end - local f = fs.f - - do -- print it - local params = { } - for _,x in ipairs{"A","B","Bx", "sBx", "C"} do - if i[x] then table.insert (params, string.format ("%s=%i", x, i[x])) end - end - debugf ("[code:\t%s\t%s]", luaP.opnames[i.OP], table.concat (params, ", ")) - end - - self:dischargejpc(fs) -- 'pc' will change - - f.code[fs.pc] = i - f.lineinfo[fs.pc] = line - - if line == 0 then - f.lineinfo[fs.pc] = fs.lastline - if fs.lastline == 0 then - --print(debug.traceback()) - end - end - - if f.lineinfo[fs.pc] == 0 then - f.lineinfo[fs.pc] = 42 - end - - local pc = fs.pc - fs.pc = fs.pc + 1 - return pc -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:codeABC(fs, o, a, b, c) - assert(luaP:getOpMode(o) == "iABC", o.." is not an ABC operation") - --assert getbmode(o) ~= opargn or b == 0 - --assert getcmode(o) ~= opargn or c == 0 - --FF - --return self:code(fs, luaP:CREATE_ABC(o, a, b, c), fs.ls.lastline) - return self:code(fs, luaP:CREATE_ABC(o, a, b, c), fs.lastline) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:codeABx(fs, o, a, bc) - assert(luaP:getOpMode(o) == "iABx" or luaP:getOpMode(o) == "iAsBx") - --assert getcmode(o) == opargn - --FF - --return self:code(fs, luaP:CREATE_ABx(o, a, bc), fs.ls.lastline) - return self:code(fs, luaP:CREATE_ABx(o, a, bc), fs.lastline) -end - ------------------------------------------------------------------------- --- ------------------------------------------------------------------------- -function luaK:setlist (fs, base, nelems, tostore) - local c = math.floor ((nelems-1) / luaP.LFIELDS_PER_FLUSH + 1) - local b = tostore == self.LUA_MULTRET and 0 or tostore - assert (tostore ~= 0) - if c <= luaP.MAXARG_C then self:codeABC (fs, "OP_SETLIST", base, b, c) - else - self:codeABC (fs, "OP_SETLIST", base, b, 0) - self:code (fs, c, fs.lastline)--FIXME - end - fs.freereg = base + 1 -end - -return luaK \ No newline at end of file diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/bytecode/ldump.lua b/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/bytecode/ldump.lua deleted file mode 100644 index 6ac76179f..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/bytecode/ldump.lua +++ /dev/null @@ -1,448 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2005-2013 Kein-Hong Man, Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Kein-Hong Man - Initial implementation for Lua 5.0, part of Yueliang --- Fabien Fleutot - Port to Lua 5.1, integration with Metalua --- -------------------------------------------------------------------------------- - ---[[-------------------------------------------------------------------- - - ldump.lua - Save bytecodes in Lua - This file is part of Yueliang. - - Copyright (c) 2005 Kein-Hong Man - The COPYRIGHT file describes the conditions - under which this software may be distributed. - ------------------------------------------------------------------------- - - [FF] Slightly modified, mainly to produce Lua 5.1 bytecode. - -----------------------------------------------------------------------]] - ---[[-------------------------------------------------------------------- --- Notes: --- * LUA_NUMBER (double), byte order (little endian) and some other --- header values hard-coded; see other notes below... --- * One significant difference is that instructions are still in table --- form (with OP/A/B/C/Bx fields) and luaP:Instruction() is needed to --- convert them into 4-char strings --- * Deleted: --- luaU:DumpVector: folded into DumpLines, DumpCode --- * Added: --- luaU:endianness() (from lundump.c) --- luaU:make_setS: create a chunk writer that writes to a string --- luaU:make_setF: create a chunk writer that writes to a file --- (lua.h contains a typedef for a Chunkwriter pointer, and --- a Lua-based implementation exists, writer() in lstrlib.c) --- luaU:from_double(x): encode double value for writing --- luaU:from_int(x): encode integer value for writing --- (error checking is limited for these conversion functions) --- (double conversion does not support denormals or NaNs) --- luaU:ttype(o) (from lobject.h) -----------------------------------------------------------------------]] - -local luaP = require 'metalua.compiler.bytecode.lopcodes' - -local M = { } - -local format = { } -format.header = string.dump(function()end):sub(1, 12) -format.little_endian, format.int_size, -format.size_t_size, format.instr_size, -format.number_size, format.integral = format.header:byte(7, 12) -format.little_endian = format.little_endian~=0 -format.integral = format.integral ~=0 - -assert(format.integral or format.number_size==8, "Number format not supported by dumper") -assert(format.little_endian, "Big endian architectures not supported by dumper") - ---requires luaP -local luaU = { } -M.luaU = luaU - -luaU.format = format - --- constants used by dumper -luaU.LUA_TNIL = 0 -luaU.LUA_TBOOLEAN = 1 -luaU.LUA_TNUMBER = 3 -- (all in lua.h) -luaU.LUA_TSTRING = 4 -luaU.LUA_TNONE = -1 - --- definitions for headers of binary files ---luaU.LUA_SIGNATURE = "\27Lua" -- binary files start with "Lua" ---luaU.VERSION = 81 -- 0x50; last format change was in 5.0 ---luaU.FORMAT_VERSION = 0 -- 0 is official version. yeah I know I'm a liar. - --- a multiple of PI for testing native format --- multiplying by 1E7 gives non-trivial integer values ---luaU.TEST_NUMBER = 3.14159265358979323846E7 - ---[[-------------------------------------------------------------------- --- Additional functions to handle chunk writing --- * to use make_setS and make_setF, see test_ldump.lua elsewhere -----------------------------------------------------------------------]] - ------------------------------------------------------------------------- --- works like the lobject.h version except that TObject used in these --- scripts only has a 'value' field, no 'tt' field (native types used) ------------------------------------------------------------------------- -function luaU:ttype(o) - local tt = type(o.value) - if tt == "number" then return self.LUA_TNUMBER - elseif tt == "string" then return self.LUA_TSTRING - elseif tt == "nil" then return self.LUA_TNIL - elseif tt == "boolean" then return self.LUA_TBOOLEAN - else - return self.LUA_TNONE -- the rest should not appear - end -end - ------------------------------------------------------------------------- --- create a chunk writer that writes to a string --- * returns the writer function and a table containing the string --- * to get the final result, look in buff.data ------------------------------------------------------------------------- -function luaU:make_setS() - local buff = {} - buff.data = "" - local writer = - function(s, buff) -- chunk writer - if not s then return end - buff.data = buff.data..s - end - return writer, buff -end - ------------------------------------------------------------------------- --- create a chunk writer that writes to a file --- * returns the writer function and a table containing the file handle --- * if a nil is passed, then writer should close the open file ------------------------------------------------------------------------- -function luaU:make_setF(filename) - local buff = {} - buff.h = io.open(filename, "wb") - if not buff.h then return nil end - local writer = - function(s, buff) -- chunk writer - if not buff.h then return end - if not s then buff.h:close(); return end - buff.h:write(s) - end - return writer, buff -end - ------------------------------------------------------------------------ --- converts a IEEE754 double number to an 8-byte little-endian string --- * luaU:from_double() and luaU:from_int() are from ChunkBake project --- * supports +/- Infinity, but not denormals or NaNs ------------------------------------------------------------------------ -function luaU:from_double(x) - local function grab_byte(v) - return math.floor(v / 256), - string.char(math.mod(math.floor(v), 256)) - end - local sign = 0 - if x < 0 then sign = 1; x = -x end - local mantissa, exponent = math.frexp(x) - if x == 0 then -- zero - mantissa, exponent = 0, 0 - elseif x == 1/0 then - mantissa, exponent = 0, 2047 - else - mantissa = (mantissa * 2 - 1) * math.ldexp(0.5, 53) - exponent = exponent + 1022 - end - local v, byte = "" -- convert to bytes - x = mantissa - for i = 1,6 do - x, byte = grab_byte(x); v = v..byte -- 47:0 - end - x, byte = grab_byte(exponent * 16 + x); v = v..byte -- 55:48 - x, byte = grab_byte(sign * 128 + x); v = v..byte -- 63:56 - return v -end - ------------------------------------------------------------------------ --- converts a number to a little-endian 32-bit integer string --- * input value assumed to not overflow, can be signed/unsigned ------------------------------------------------------------------------ -function luaU:from_int(x, size) - local v = "" - x = math.floor(x) - if x >= 0 then - for i = 1, size do - v = v..string.char(math.mod(x, 256)); x = math.floor(x / 256) - end - else -- x < 0 - x = -x - local carry = 1 - for i = 1, size do - local c = 255 - math.mod(x, 256) + carry - if c == 256 then c = 0; carry = 1 else carry = 0 end - v = v..string.char(c); x = math.floor(x / 256) - end - end - return v -end - ---[[-------------------------------------------------------------------- --- Functions to make a binary chunk --- * many functions have the size parameter removed, since output is --- in the form of a string and some sizes are implicit or hard-coded --- * luaU:DumpVector has been deleted (used in DumpCode & DumpLines) -----------------------------------------------------------------------]] - ------------------------------------------------------------------------- --- dump a block of literal bytes ------------------------------------------------------------------------- -function luaU:DumpLiteral(s, D) self:DumpBlock(s, D) end - ---[[-------------------------------------------------------------------- --- struct DumpState: --- L -- lua_State (not used in this script) --- write -- lua_Chunkwriter (chunk writer function) --- data -- void* (chunk writer context or data already written) -----------------------------------------------------------------------]] - ------------------------------------------------------------------------- --- dumps a block of bytes --- * lua_unlock(D.L), lua_lock(D.L) deleted ------------------------------------------------------------------------- -function luaU:DumpBlock(b, D) D.write(b, D.data) end - ------------------------------------------------------------------------- --- dumps a single byte ------------------------------------------------------------------------- -function luaU:DumpByte(y, D) - self:DumpBlock(string.char(y), D) -end - ------------------------------------------------------------------------- --- dumps a signed integer of size `format.int_size` (for int) ------------------------------------------------------------------------- -function luaU:DumpInt(x, D) - self:DumpBlock(self:from_int(x, format.int_size), D) -end - ------------------------------------------------------------------------- --- dumps an unsigned integer of size `format.size_t_size` (for size_t) ------------------------------------------------------------------------- -function luaU:DumpSize(x, D) - self:DumpBlock(self:from_int(x, format.size_t_size), D) -end - ------------------------------------------------------------------------- --- dumps a LUA_NUMBER; can be an int or double depending on the VM. ------------------------------------------------------------------------- -function luaU:DumpNumber(x, D) - if format.integral then - self:DumpBlock(self:from_int(x, format.number_size), D) - else - self:DumpBlock(self:from_double(x), D) - end -end - ------------------------------------------------------------------------- --- dumps a Lua string ------------------------------------------------------------------------- -function luaU:DumpString(s, D) - if s == nil then - self:DumpSize(0, D) - else - s = s.."\0" -- include trailing '\0' - self:DumpSize(string.len(s), D) - self:DumpBlock(s, D) - end -end - ------------------------------------------------------------------------- --- dumps instruction block from function prototype ------------------------------------------------------------------------- -function luaU:DumpCode(f, D) - local n = f.sizecode - self:DumpInt(n, D) - --was DumpVector - for i = 0, n - 1 do - self:DumpBlock(luaP:Instruction(f.code[i]), D) - end -end - ------------------------------------------------------------------------- --- dumps local variable names from function prototype ------------------------------------------------------------------------- -function luaU:DumpLocals(f, D) - local n = f.sizelocvars - self:DumpInt(n, D) - for i = 0, n - 1 do - -- Dirty temporary fix: - -- `Stat{ } keeps properly count of the number of local vars, - -- but fails to keep score of their debug info (names). - -- It therefore might happen that #f.localvars < f.sizelocvars, or - -- that a variable's startpc and endpc fields are left unset. - -- FIXME: This might not be needed anymore, check the bug report - -- by J. Belmonte. - local var = f.locvars[i] - if not var then break end - -- printf("[DUMPLOCALS] dumping local var #%i = %s", i, table.tostring(var)) - self:DumpString(var.varname, D) - self:DumpInt(var.startpc or 0, D) - self:DumpInt(var.endpc or 0, D) - end -end - ------------------------------------------------------------------------- --- dumps line information from function prototype ------------------------------------------------------------------------- -function luaU:DumpLines(f, D) - local n = f.sizelineinfo - self:DumpInt(n, D) - --was DumpVector - for i = 0, n - 1 do - self:DumpInt(f.lineinfo[i], D) -- was DumpBlock - --print(i, f.lineinfo[i]) - end -end - ------------------------------------------------------------------------- --- dump upvalue names from function prototype ------------------------------------------------------------------------- -function luaU:DumpUpvalues(f, D) - local n = f.sizeupvalues - self:DumpInt(n, D) - for i = 0, n - 1 do - self:DumpString(f.upvalues[i], D) - end -end - ------------------------------------------------------------------------- --- dump constant pool from function prototype --- * nvalue(o) and tsvalue(o) macros removed ------------------------------------------------------------------------- -function luaU:DumpConstants(f, D) - local n = f.sizek - self:DumpInt(n, D) - for i = 0, n - 1 do - local o = f.k[i] -- TObject - local tt = self:ttype(o) - assert (tt >= 0) - self:DumpByte(tt, D) - if tt == self.LUA_TNUMBER then - self:DumpNumber(o.value, D) - elseif tt == self.LUA_TSTRING then - self:DumpString(o.value, D) - elseif tt == self.LUA_TBOOLEAN then - self:DumpByte (o.value and 1 or 0, D) - elseif tt == self.LUA_TNIL then - else - assert(false) -- cannot happen - end - end -end - - -function luaU:DumpProtos (f, D) - local n = f.sizep - assert (n) - self:DumpInt(n, D) - for i = 0, n - 1 do - self:DumpFunction(f.p[i], f.source, D) - end -end - -function luaU:DumpDebug(f, D) - self:DumpLines(f, D) - self:DumpLocals(f, D) - self:DumpUpvalues(f, D) -end - - ------------------------------------------------------------------------- --- dump child function prototypes from function prototype ---FF completely reworked for 5.1 format ------------------------------------------------------------------------- -function luaU:DumpFunction(f, p, D) - -- print "Dumping function:" - -- table.print(f, 60) - - local source = f.source - if source == p then source = nil end - self:DumpString(source, D) - self:DumpInt(f.lineDefined, D) - self:DumpInt(f.lastLineDefined or 42, D) - self:DumpByte(f.nups, D) - self:DumpByte(f.numparams, D) - self:DumpByte(f.is_vararg, D) - self:DumpByte(f.maxstacksize, D) - self:DumpCode(f, D) - self:DumpConstants(f, D) - self:DumpProtos( f, D) - self:DumpDebug(f, D) -end - ------------------------------------------------------------------------- --- dump Lua header section (some sizes hard-coded) ---FF: updated for version 5.1 ------------------------------------------------------------------------- -function luaU:DumpHeader(D) - self:DumpLiteral(format.header, D) -end - ------------------------------------------------------------------------- --- dump function as precompiled chunk --- * w, data are created from make_setS, make_setF ---FF: suppressed extraneous [L] param ------------------------------------------------------------------------- -function luaU:dump (Main, w, data) - local D = {} -- DumpState - D.write = w - D.data = data - self:DumpHeader(D) - self:DumpFunction(Main, nil, D) - -- added: for a chunk writer writing to a file, this final call with - -- nil data is to indicate to the writer to close the file - D.write(nil, D.data) -end - ------------------------------------------------------------------------- --- find byte order (from lundump.c) --- * hard-coded to little-endian ------------------------------------------------------------------------- -function luaU:endianness() - return 1 -end - --- FIXME: ugly concat-base generation in [make_setS], bufferize properly! -function M.dump_string (proto) - local writer, buff = luaU:make_setS() - luaU:dump (proto, writer, buff) - return buff.data -end - --- FIXME: [make_setS] sucks, perform synchronous file writing --- Now unused -function M.dump_file (proto, filename) - local writer, buff = luaU:make_setS() - luaU:dump (proto, writer, buff) - local file = io.open (filename, "wb") - file:write (buff.data) - io.close(file) - --if UNIX_SHARPBANG then os.execute ("chmod a+x "..filename) end -end - -return M diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/bytecode/lopcodes.lua b/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/bytecode/lopcodes.lua deleted file mode 100644 index e49285e6f..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/bytecode/lopcodes.lua +++ /dev/null @@ -1,442 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2005-2013 Kein-Hong Man, Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Kein-Hong Man - Initial implementation for Lua 5.0, part of Yueliang --- Fabien Fleutot - Port to Lua 5.1, integration with Metalua --- -------------------------------------------------------------------------------- - ---[[-------------------------------------------------------------------- - - $Id$ - - lopcodes.lua - Lua 5 virtual machine opcodes in Lua - This file is part of Yueliang. - - Copyright (c) 2005 Kein-Hong Man - The COPYRIGHT file describes the conditions - under which this software may be distributed. - - See the ChangeLog for more information. - ------------------------------------------------------------------------- - - [FF] Slightly modified, mainly to produce Lua 5.1 bytecode. - -----------------------------------------------------------------------]] - ---[[-------------------------------------------------------------------- --- Notes: --- * an Instruction is a table with OP, A, B, C, Bx elements; this --- should allow instruction handling to work with doubles and ints --- * Added: --- luaP:Instruction(i): convert field elements to a 4-char string --- luaP:DecodeInst(x): convert 4-char string into field elements --- * WARNING luaP:Instruction outputs instructions encoded in little- --- endian form and field size and positions are hard-coded -----------------------------------------------------------------------]] - -local function debugf() end - -local luaP = { } - ---[[ -=========================================================================== - We assume that instructions are unsigned numbers. - All instructions have an opcode in the first 6 bits. - Instructions can have the following fields: - 'A' : 8 bits - 'B' : 9 bits - 'C' : 9 bits - 'Bx' : 18 bits ('B' and 'C' together) - 'sBx' : signed Bx - - A signed argument is represented in excess K; that is, the number - value is the unsigned value minus K. K is exactly the maximum value - for that argument (so that -max is represented by 0, and +max is - represented by 2*max), which is half the maximum for the corresponding - unsigned argument. -=========================================================================== ---]] - -luaP.OpMode = {"iABC", "iABx", "iAsBx"} -- basic instruction format - ------------------------------------------------------------------------- --- size and position of opcode arguments. --- * WARNING size and position is hard-coded elsewhere in this script ------------------------------------------------------------------------- -luaP.SIZE_C = 9 -luaP.SIZE_B = 9 -luaP.SIZE_Bx = luaP.SIZE_C + luaP.SIZE_B -luaP.SIZE_A = 8 - -luaP.SIZE_OP = 6 - -luaP.POS_C = luaP.SIZE_OP -luaP.POS_B = luaP.POS_C + luaP.SIZE_C -luaP.POS_Bx = luaP.POS_C -luaP.POS_A = luaP.POS_B + luaP.SIZE_B - ---FF from 5.1 -luaP.BITRK = 2^(luaP.SIZE_B - 1) -function luaP:ISK(x) return x >= self.BITRK end -luaP.MAXINDEXRK = luaP.BITRK - 1 -function luaP:RKASK(x) - if x < self.BITRK then return x+self.BITRK else return x end -end - - - ------------------------------------------------------------------------- --- limits for opcode arguments. --- we use (signed) int to manipulate most arguments, --- so they must fit in BITS_INT-1 bits (-1 for sign) ------------------------------------------------------------------------- --- removed "#if SIZE_Bx < BITS_INT-1" test, assume this script is --- running on a Lua VM with double or int as LUA_NUMBER - -luaP.MAXARG_Bx = math.ldexp(1, luaP.SIZE_Bx) - 1 -luaP.MAXARG_sBx = math.floor(luaP.MAXARG_Bx / 2) -- 'sBx' is signed - -luaP.MAXARG_A = math.ldexp(1, luaP.SIZE_A) - 1 -luaP.MAXARG_B = math.ldexp(1, luaP.SIZE_B) - 1 -luaP.MAXARG_C = math.ldexp(1, luaP.SIZE_C) - 1 - --- creates a mask with 'n' 1 bits at position 'p' --- MASK1(n,p) deleted --- creates a mask with 'n' 0 bits at position 'p' --- MASK0(n,p) deleted - ---[[-------------------------------------------------------------------- - Visual representation for reference: - - 31 | | | 0 bit position - +-----+-----+-----+----------+ - | B | C | A | Opcode | iABC format - +-----+-----+-----+----------+ - - 9 - 9 - 8 - 6 - field sizes - +-----+-----+-----+----------+ - | [s]Bx | A | Opcode | iABx | iAsBx format - +-----+-----+-----+----------+ -----------------------------------------------------------------------]] - ------------------------------------------------------------------------- --- the following macros help to manipulate instructions --- * changed to a table object representation, very clean compared to --- the [nightmare] alternatives of using a number or a string ------------------------------------------------------------------------- - --- these accept or return opcodes in the form of string names -function luaP:GET_OPCODE(i) return self.ROpCode[i.OP] end -function luaP:SET_OPCODE(i, o) i.OP = self.OpCode[o] end - -function luaP:GETARG_A(i) return i.A end -function luaP:SETARG_A(i, u) i.A = u end - -function luaP:GETARG_B(i) return i.B end -function luaP:SETARG_B(i, b) i.B = b end - -function luaP:GETARG_C(i) return i.C end -function luaP:SETARG_C(i, b) i.C = b end - -function luaP:GETARG_Bx(i) return i.Bx end -function luaP:SETARG_Bx(i, b) i.Bx = b end - -function luaP:GETARG_sBx(i) return i.Bx - self.MAXARG_sBx end -function luaP:SETARG_sBx(i, b) i.Bx = b + self.MAXARG_sBx end - -function luaP:CREATE_ABC(o,a,b,c) - return {OP = self.OpCode[o], A = a, B = b, C = c} -end - -function luaP:CREATE_ABx(o,a,bc) - return {OP = self.OpCode[o], A = a, Bx = bc} -end - ------------------------------------------------------------------------- --- Bit shuffling stuffs ------------------------------------------------------------------------- - -if false and pcall (require, 'bit') then - ------------------------------------------------------------------------ - -- Return a 4-char string little-endian encoded form of an instruction - ------------------------------------------------------------------------ - function luaP:Instruction(i) - --FIXME - end -else - ------------------------------------------------------------------------ - -- Version without bit manipulation library. - ------------------------------------------------------------------------ - local p2 = {1,2,4,8,16,32,64,128,256, 512, 1024, 2048, 4096} - -- keeps [n] bits from [x] - local function keep (x, n) return x % p2[n+1] end - -- shifts bits of [x] [n] places to the right - local function srb (x,n) return math.floor (x / p2[n+1]) end - -- shifts bits of [x] [n] places to the left - local function slb (x,n) return x * p2[n+1] end - - ------------------------------------------------------------------------ - -- Return a 4-char string little-endian encoded form of an instruction - ------------------------------------------------------------------------ - function luaP:Instruction(i) - -- printf("Instr->string: %s %s", self.opnames[i.OP], table.tostring(i)) - local c0, c1, c2, c3 - -- change to OP/A/B/C format if needed - if i.Bx then i.C = keep (i.Bx, 9); i.B = srb (i.Bx, 9) end - -- c0 = 6B from opcode + 2LSB from A (flushed to MSB) - c0 = i.OP + slb (keep (i.A, 2), 6) - -- c1 = 6MSB from A + 2LSB from C (flushed to MSB) - c1 = srb (i.A, 2) + slb (keep (i.C, 2), 6) - -- c2 = 7MSB from C + 1LSB from B (flushed to MSB) - c2 = srb (i.C, 2) + slb (keep (i.B, 1), 7) - -- c3 = 8MSB from B - c3 = srb (i.B, 1) - --printf ("Instruction: %s %s", self.opnames[i.OP], tostringv (i)) - --printf ("Bin encoding: %x %x %x %x", c0, c1, c2, c3) - return string.char(c0, c1, c2, c3) - end -end ------------------------------------------------------------------------- --- decodes a 4-char little-endian string into an instruction struct ------------------------------------------------------------------------- -function luaP:DecodeInst(x) - error "Not implemented" -end - ------------------------------------------------------------------------- --- invalid register that fits in 8 bits ------------------------------------------------------------------------- -luaP.NO_REG = luaP.MAXARG_A - ------------------------------------------------------------------------- --- R(x) - register --- Kst(x) - constant (in constant table) --- RK(x) == if x < MAXSTACK then R(x) else Kst(x-MAXSTACK) ------------------------------------------------------------------------- - ------------------------------------------------------------------------- --- grep "ORDER OP" if you change these enums ------------------------------------------------------------------------- - ---[[-------------------------------------------------------------------- -Lua virtual machine opcodes (enum OpCode): ------------------------------------------------------------------------- -name args description ------------------------------------------------------------------------- -OP_MOVE A B R(A) := R(B) -OP_LOADK A Bx R(A) := Kst(Bx) -OP_LOADBOOL A B C R(A) := (Bool)B; if (C) PC++ -OP_LOADNIL A B R(A) := ... := R(B) := nil -OP_GETUPVAL A B R(A) := UpValue[B] -OP_GETGLOBAL A Bx R(A) := Gbl[Kst(Bx)] -OP_GETTABLE A B C R(A) := R(B)[RK(C)] -OP_SETGLOBAL A Bx Gbl[Kst(Bx)] := R(A) -OP_SETUPVAL A B UpValue[B] := R(A) -OP_SETTABLE A B C R(A)[RK(B)] := RK(C) -OP_NEWTABLE A B C R(A) := {} (size = B,C) -OP_SELF A B C R(A+1) := R(B); R(A) := R(B)[RK(C)] -OP_ADD A B C R(A) := RK(B) + RK(C) -OP_SUB A B C R(A) := RK(B) - RK(C) -OP_MUL A B C R(A) := RK(B) * RK(C) -OP_DIV A B C R(A) := RK(B) / RK(C) -OP_POW A B C R(A) := RK(B) ^ RK(C) -OP_UNM A B R(A) := -R(B) -OP_NOT A B R(A) := not R(B) -OP_CONCAT A B C R(A) := R(B).. ... ..R(C) -OP_JMP sBx PC += sBx -OP_EQ A B C if ((RK(B) == RK(C)) ~= A) then pc++ -OP_LT A B C if ((RK(B) < RK(C)) ~= A) then pc++ -OP_LE A B C if ((RK(B) <= RK(C)) ~= A) then pc++ -OP_TEST A B C if (R(B) <=> C) then R(A) := R(B) else pc++ -OP_CALL A B C R(A), ... ,R(A+C-2) := R(A)(R(A+1), ... ,R(A+B-1)) -OP_TAILCALL A B C return R(A)(R(A+1), ... ,R(A+B-1)) -OP_RETURN A B return R(A), ... ,R(A+B-2) (see note) -OP_FORLOOP A sBx R(A)+=R(A+2); if R(A) =) R(A) -OP_CLOSURE A Bx R(A) := closure(KPROTO[Bx], R(A), ... ,R(A+n)) -----------------------------------------------------------------------]] - -luaP.opnames = {} -- opcode names -luaP.OpCode = {} -- lookup name -> number -luaP.ROpCode = {} -- lookup number -> name - -local i = 0 -for v in string.gfind([[ -MOVE -- 0 -LOADK -LOADBOOL -LOADNIL -GETUPVAL -GETGLOBAL -- 5 -GETTABLE -SETGLOBAL -SETUPVAL -SETTABLE -NEWTABLE -- 10 -SELF -ADD -SUB -MUL -DIV -- 15 -MOD -POW -UNM -NOT -LEN -- 20 -CONCAT -JMP -EQ -LT -LE -- 25 -TEST -TESTSET -CALL -TAILCALL -RETURN -- 30 -FORLOOP -FORPREP -TFORLOOP -SETLIST -CLOSE -- 35 -CLOSURE -VARARG -]], "[%a]+") do - local n = "OP_"..v - luaP.opnames[i] = v - luaP.OpCode[n] = i - luaP.ROpCode[i] = n - i = i + 1 -end -luaP.NUM_OPCODES = i - ---[[ -=========================================================================== - Notes: - (1) In OP_CALL, if (B == 0) then B = top. C is the number of returns - 1, - and can be 0: OP_CALL then sets 'top' to last_result+1, so - next open instruction (OP_CALL, OP_RETURN, OP_SETLIST) may use 'top'. - - (2) In OP_RETURN, if (B == 0) then return up to 'top' - - (3) For comparisons, B specifies what conditions the test should accept. - - (4) All 'skips' (pc++) assume that next instruction is a jump - - (5) OP_SETLISTO is used when the last item in a table constructor is a - function, so the number of elements set is up to top of stack -=========================================================================== ---]] - ------------------------------------------------------------------------- --- masks for instruction properties ------------------------------------------------------------------------- --- was enum OpModeMask: -luaP.OpModeBreg = 2 -- B is a register -luaP.OpModeBrk = 3 -- B is a register/constant -luaP.OpModeCrk = 4 -- C is a register/constant -luaP.OpModesetA = 5 -- instruction set register A -luaP.OpModeK = 6 -- Bx is a constant -luaP.OpModeT = 1 -- operator is a test - ------------------------------------------------------------------------- --- get opcode mode, e.g. "iABC" ------------------------------------------------------------------------- -function luaP:getOpMode(m) - --printv(m) - --printv(self.OpCode[m]) - --printv(self.opmodes [self.OpCode[m]+1]) - return self.OpMode[tonumber(string.sub(self.opmodes[self.OpCode[m] + 1], 7, 7))] -end - ------------------------------------------------------------------------- --- test an instruction property flag --- * b is a string, e.g. "OpModeBreg" ------------------------------------------------------------------------- -function luaP:testOpMode(m, b) - return (string.sub(self.opmodes[self.OpCode[m] + 1], self[b], self[b]) == "1") -end - --- number of list items to accumulate before a SETLIST instruction --- (must be a power of 2) --- * used in lparser, lvm, ldebug, ltests -luaP.LFIELDS_PER_FLUSH = 50 --FF updated to match 5.1 - --- luaP_opnames[] is set above, as the luaP.opnames table --- opmode(t,b,bk,ck,sa,k,m) deleted - ---[[-------------------------------------------------------------------- - Legend for luaP:opmodes: - 1 T -> T (is a test?) - 2 B -> B is a register - 3 b -> B is an RK register/constant combination - 4 C -> C is an RK register/constant combination - 5 A -> register A is set by the opcode - 6 K -> Bx is a constant - 7 m -> 1 if iABC layout, - 2 if iABx layout, - 3 if iAsBx layout -----------------------------------------------------------------------]] - -luaP.opmodes = { --- TBbCAKm opcode - "0100101", -- OP_MOVE 0 - "0000112", -- OP_LOADK - "0000101", -- OP_LOADBOOL - "0100101", -- OP_LOADNIL - "0000101", -- OP_GETUPVAL - "0000112", -- OP_GETGLOBAL 5 - "0101101", -- OP_GETTABLE - "0000012", -- OP_SETGLOBAL - "0000001", -- OP_SETUPVAL - "0011001", -- OP_SETTABLE - "0000101", -- OP_NEWTABLE 10 - "0101101", -- OP_SELF - "0011101", -- OP_ADD - "0011101", -- OP_SUB - "0011101", -- OP_MUL - "0011101", -- OP_DIV 15 - "0011101", -- OP_MOD - "0011101", -- OP_POW - "0100101", -- OP_UNM - "0100101", -- OP_NOT - "0100101", -- OP_LEN 20 - "0101101", -- OP_CONCAT - "0000003", -- OP_JMP - "1011001", -- OP_EQ - "1011001", -- OP_LT - "1011001", -- OP_LE 25 - "1000101", -- OP_TEST - "1100101", -- OP_TESTSET - "0000001", -- OP_CALL - "0000001", -- OP_TAILCALL - "0000001", -- OP_RETURN 30 - "0000003", -- OP_FORLOOP - "0000103", -- OP_FORPREP - "1000101", -- OP_TFORLOOP - "0000001", -- OP_SETLIST - "0000001", -- OP_CLOSE 35 - "0000102", -- OP_CLOSURE - "0000101" -- OP_VARARG -} - -return luaP \ No newline at end of file diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/globals.lua b/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/globals.lua deleted file mode 100644 index d5f7459e9..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/globals.lua +++ /dev/null @@ -1,86 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- --------------------------------------------------------------------------------- - ---*-lua-*----------------------------------------------------------------------- --- Override Lua's default compilation functions, so that they support Metalua --- rather than only plain Lua --------------------------------------------------------------------------------- - -local mlc = require 'metalua.compiler' - -local M = { } - --- Original versions -local original_lua_versions = { - load = load, - loadfile = loadfile, - loadstring = loadstring, - dofile = dofile } - -local lua_loadstring = loadstring -local lua_loadfile = loadfile - -function M.loadstring(str, name) - if type(str) ~= 'string' then error 'string expected' end - if str:match '^\027LuaQ' then return lua_loadstring(str) end - local n = str:match '^#![^\n]*\n()' - if n then str=str:sub(n, -1) end - -- FIXME: handle erroneous returns (return nil + error msg) - return mlc.new():src_to_function(str, name) -end - -function M.loadfile(filename) - local f, err_msg = io.open(filename, 'rb') - if not f then return nil, err_msg end - local success, src = pcall( f.read, f, '*a') - pcall(f.close, f) - if success then return M.loadstring (src, '@'..filename) - else return nil, src end -end - -function M.load(f, name) - local acc = { } - while true do - local x = f() - if not x then break end - assert(type(x)=='string', "function passed to load() must return strings") - table.insert(acc, x) - end - return M.loadstring(table.concat(acc)) -end - -function M.dostring(src) - local f, msg = M.loadstring(src) - if not f then error(msg) end - return f() -end - -function M.dofile(name) - local f, msg = M.loadfile(name) - if not f then error(msg) end - return f() -end - --- Export replacement functions as globals -for name, f in pairs(M) do _G[name] = f end - --- To be done *after* exportation -M.lua = original_lua_versions - -return M \ No newline at end of file diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser.lua b/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser.lua deleted file mode 100644 index 74997aef2..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser.lua +++ /dev/null @@ -1,42 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- --------------------------------------------------------------------------------- - --- Export all public APIs from sub-modules, squashed into a flat spacename - -local MT = { __type='metalua.compiler.parser' } - -local MODULE_REL_NAMES = { "annot.grammar", "expr", "meta", "misc", - "stat", "table", "ext" } - -local function new() - local M = { - lexer = require "metalua.compiler.parser.lexer" (); - extensions = { } } - for _, rel_name in ipairs(MODULE_REL_NAMES) do - local abs_name = "metalua.compiler.parser."..rel_name - local extender = require (abs_name) - if not M.extensions[abs_name] then - if type (extender) == 'function' then extender(M) end - M.extensions[abs_name] = extender - end - end - return setmetatable(M, MT) -end - -return { new = new } diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/annot/generator.lua b/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/annot/generator.lua deleted file mode 100644 index 3a805ad42..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/annot/generator.lua +++ /dev/null @@ -1,48 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- --------------------------------------------------------------------------------- - -local checks = require 'checks' -local gg = require 'metalua.grammar.generator' -local M = { } - -function M.opt(mlc, primary, a_type) - checks('table', 'table|function', 'string') - return gg.sequence{ - primary, - gg.onkeyword{ "#", function() return assert(mlc.annot[a_type]) end }, - builder = function(x) - local t, annot = unpack(x) - return annot and { tag='Annot', t, annot } or t - end } -end - --- split a list of "foo" and "`Annot{foo, annot}" into a list of "foo" --- and a list of "annot". --- No annot list is returned if none of the elements were annotated. -function M.split(lst) - local x, a, some = { }, { }, false - for i, p in ipairs(lst) do - if p.tag=='Annot' then - some, x[i], a[i] = true, unpack(p) - else x[i] = p end - end - if some then return x, a else return lst end -end - -return M diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/annot/grammar.lua b/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/annot/grammar.lua deleted file mode 100644 index 7ce3ec41b..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/annot/grammar.lua +++ /dev/null @@ -1,112 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- --------------------------------------------------------------------------------- - -local gg = require 'metalua.grammar.generator' - -return function(M) - local _M = gg.future(M) - M.lexer :add '->' - local A = { } - local _A = gg.future(A) - M.annot = A - - -- Type identifier: Lua keywords such as `"nil"` allowed. - function M.annot.tid(lx) - local w = lx :next() - local t = w.tag - if t=='Keyword' and w[1] :match '^[%a_][%w_]*$' or w.tag=='Id' - then return {tag='TId'; lineinfo=w.lineinfo; w[1]} - else return gg.parse_error (lx, 'tid expected') end - end - - local field_types = { var='TVar'; const='TConst'; - currently='TCurrently'; field='TField' } - - -- TODO check lineinfo - function M.annot.tf(lx) - local tk = lx:next() - local w = tk[1] - local tag = field_types[w] - if not tag then error ('Invalid field type '..w) - elseif tag=='TField' then return {tag='TField'} else - local te = M.te(lx) - return {tag=tag; te} - end - end - - M.annot.tebar_content = gg.list{ - name = 'tebar content', - primary = _A.te, - separators = { ",", ";" }, - terminators = ")" } - - M.annot.tebar = gg.multisequence{ - name = 'annot.tebar', - --{ '*', builder = 'TDynbar' }, -- maybe not user-available - { '(', _A.tebar_content, ')', - builder = function(x) return x[1] end }, - { _A.te } - } - - M.annot.te = gg.multisequence{ - name = 'annot.te', - { _A.tid, builder=function(x) return x[1] end }, - { '*', builder = 'TDyn' }, - { "[", - gg.list{ - primary = gg.sequence{ - _M.expr, "=", _A.tf, - builder = 'TPair' - }, - separators = { ",", ";" }, - terminators = { "]", "|" } }, - gg.onkeyword{ "|", _A.tf }, - "]", - builder = function(x) - local fields, other = unpack(x) - return { tag='TTable', other or {tag='TField'}, fields } - end }, -- "[ ... ]" - { '(', _A.tebar_content, ')', '->', '(', _A.tebar_content, ')', - builder = function(x) - local p, r = unpack(x) - return {tag='TFunction', p, r } - end } } - - M.annot.ts = gg.multisequence{ - name = 'annot.ts', - { 'return', _A.tebar_content, builder='TReturn' }, - { _A.tid, builder = function(x) - if x[1][1]=='pass' then return {tag='TPass'} - else error "Bad statement type" end - end } } - --- TODO: add parsers for statements: --- #return tebar --- #alias = te --- #ell = tf ---[[ - M.annot.stat_annot = gg.sequence{ - gg.list{ primary=_A.tid, separators='.' }, - '=', - XXX??, - builder = 'Annot' } ---]] - - return M.annot -end \ No newline at end of file diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/expr.lua b/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/expr.lua deleted file mode 100644 index 8ce4677a5..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/expr.lua +++ /dev/null @@ -1,206 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- -------------------------------------------------------------------------------- - -------------------------------------------------------------------------------- --- --- Exported API: --- * [mlp.expr()] --- * [mlp.expr_list()] --- * [mlp.func_val()] --- -------------------------------------------------------------------------------- - -local pp = require 'metalua.pprint' -local gg = require 'metalua.grammar.generator' -local annot = require 'metalua.compiler.parser.annot.generator' - -return function(M) - local _M = gg.future(M) - local _table = gg.future(M, 'table') - local _meta = gg.future(M, 'meta') -- TODO move to ext? - local _annot = gg.future(M, 'annot') -- TODO move to annot - - -------------------------------------------------------------------------------- - -- Non-empty expression list. Actually, this isn't used here, but that's - -- handy to give to users. - -------------------------------------------------------------------------------- - M.expr_list = gg.list{ primary=_M.expr, separators="," } - - -------------------------------------------------------------------------------- - -- Helpers for function applications / method applications - -------------------------------------------------------------------------------- - M.func_args_content = gg.list{ - name = "function arguments", - primary = _M.expr, - separators = ",", - terminators = ")" } - - -- Used to parse methods - M.method_args = gg.multisequence{ - name = "function argument(s)", - { "{", _table.content, "}" }, - { "(", _M.func_args_content, ")", builder = unpack }, - { "+{", _meta.quote_content, "}" }, - -- TODO lineinfo? - function(lx) local r = M.opt_string(lx); return r and {r} or { } end } - - -------------------------------------------------------------------------------- - -- [func_val] parses a function, from opening parameters parenthese to - -- "end" keyword included. Used for anonymous functions as well as - -- function declaration statements (both local and global). - -- - -- It's wrapped in a [_func_val] eta expansion, so that when expr - -- parser uses the latter, they will notice updates of [func_val] - -- definitions. - -------------------------------------------------------------------------------- - M.func_params_content = gg.list{ - name="function parameters", - gg.multisequence{ { "...", builder = "Dots" }, annot.opt(M, _M.id, 'te') }, - separators = ",", terminators = {")", "|"} } - - -- TODO move to annot - M.func_val = gg.sequence{ - name = "function body", - "(", _M.func_params_content, ")", _M.block, "end", - builder = function(x) - local params, body = unpack(x) - local annots, some = { }, false - for i, p in ipairs(params) do - if p.tag=='Annot' then - params[i], annots[i], some = p[1], p[2], true - else annots[i] = false end - end - if some then return { tag='Function', params, body, annots } - else return { tag='Function', params, body } end - end } - - local func_val = function(lx) return M.func_val(lx) end - - -------------------------------------------------------------------------------- - -- Default parser for primary expressions - -------------------------------------------------------------------------------- - function M.id_or_literal (lx) - local a = lx:next() - if a.tag~="Id" and a.tag~="String" and a.tag~="Number" then - local msg - if a.tag=='Eof' then - msg = "End of file reached when an expression was expected" - elseif a.tag=='Keyword' then - msg = "An expression was expected, and `"..a[1].. - "' can't start an expression" - else - msg = "Unexpected expr token " .. pp.tostring (a) - end - gg.parse_error (lx, msg) - end - return a - end - - - -------------------------------------------------------------------------------- - -- Builder generator for operators. Wouldn't be worth it if "|x|" notation - -- were allowed, but then lua 5.1 wouldn't compile it - -------------------------------------------------------------------------------- - - -- opf1 = |op| |_,a| `Op{ op, a } - local function opf1 (op) return - function (_,a) return { tag="Op", op, a } end end - - -- opf2 = |op| |a,_,b| `Op{ op, a, b } - local function opf2 (op) return - function (a,_,b) return { tag="Op", op, a, b } end end - - -- opf2r = |op| |a,_,b| `Op{ op, b, a } -- (args reversed) - local function opf2r (op) return - function (a,_,b) return { tag="Op", op, b, a } end end - - local function op_ne(a, _, b) - -- This version allows to remove the "ne" operator from the AST definition. - -- However, it doesn't always produce the exact same bytecode as Lua 5.1. - return { tag="Op", "not", - { tag="Op", "eq", a, b, lineinfo= { - first = a.lineinfo.first, last = b.lineinfo.last } } } - end - - - -------------------------------------------------------------------------------- - -- - -- complete expression - -- - -------------------------------------------------------------------------------- - - -- FIXME: set line number. In [expr] transformers probably - M.expr = gg.expr { - name = "expression", - primary = gg.multisequence{ - name = "expr primary", - { "(", _M.expr, ")", builder = "Paren" }, - { "function", _M.func_val, builder = unpack }, - { "-{", _meta.splice_content, "}", builder = unpack }, - { "+{", _meta.quote_content, "}", builder = unpack }, - { "nil", builder = "Nil" }, - { "true", builder = "True" }, - { "false", builder = "False" }, - { "...", builder = "Dots" }, - { "{", _table.content, "}", builder = unpack }, - _M.id_or_literal }, - - infix = { - name = "expr infix op", - { "+", prec = 60, builder = opf2 "add" }, - { "-", prec = 60, builder = opf2 "sub" }, - { "*", prec = 70, builder = opf2 "mul" }, - { "/", prec = 70, builder = opf2 "div" }, - { "%", prec = 70, builder = opf2 "mod" }, - { "^", prec = 90, builder = opf2 "pow", assoc = "right" }, - { "..", prec = 40, builder = opf2 "concat", assoc = "right" }, - { "==", prec = 30, builder = opf2 "eq" }, - { "~=", prec = 30, builder = op_ne }, - { "<", prec = 30, builder = opf2 "lt" }, - { "<=", prec = 30, builder = opf2 "le" }, - { ">", prec = 30, builder = opf2r "lt" }, - { ">=", prec = 30, builder = opf2r "le" }, - { "and",prec = 20, builder = opf2 "and" }, - { "or", prec = 10, builder = opf2 "or" } }, - - prefix = { - name = "expr prefix op", - { "not", prec = 80, builder = opf1 "not" }, - { "#", prec = 80, builder = opf1 "len" }, - { "-", prec = 80, builder = opf1 "unm" } }, - - suffix = { - name = "expr suffix op", - { "[", _M.expr, "]", builder = function (tab, idx) - return {tag="Index", tab, idx[1]} end}, - { ".", _M.id, builder = function (tab, field) - return {tag="Index", tab, _M.id2string(field[1])} end }, - { "(", _M.func_args_content, ")", builder = function(f, args) - return {tag="Call", f, unpack(args[1])} end }, - { "{", _table.content, "}", builder = function (f, arg) - return {tag="Call", f, arg[1]} end}, - { ":", _M.id, _M.method_args, builder = function (obj, post) - local m_name, args = unpack(post) - return {tag="Invoke", obj, _M.id2string(m_name), unpack(args)} end}, - { "+{", _meta.quote_content, "}", builder = function (f, arg) - return {tag="Call", f, arg[1] } end }, - default = { name="opt_string_arg", parse = _M.opt_string, builder = function(f, arg) - return {tag="Call", f, arg } end } } } - return M -end \ No newline at end of file diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/ext.lua b/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/ext.lua deleted file mode 100644 index 4e9d3950f..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/ext.lua +++ /dev/null @@ -1,96 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- -------------------------------------------------------------------------------- - --------------------------------------------------------------------------------- --- --- Non-Lua syntax extensions --- --------------------------------------------------------------------------------- - -local gg = require 'metalua.grammar.generator' - -return function(M) - - local _M = gg.future(M) - - --------------------------------------------------------------------------- - -- Algebraic Datatypes - ---------------------------------------------------------------------------- - local function adt (lx) - local node = _M.id (lx) - local tagval = node[1] - -- tagkey = `Pair{ `String "key", `String{ -{tagval} } } - local tagkey = { tag="Pair", {tag="String", "tag"}, {tag="String", tagval} } - if lx:peek().tag == "String" or lx:peek().tag == "Number" then - -- TODO support boolean litterals - return { tag="Table", tagkey, lx:next() } - elseif lx:is_keyword (lx:peek(), "{") then - local x = M.table.table (lx) - table.insert (x, 1, tagkey) - return x - else return { tag="Table", tagkey } end - end - - M.adt = gg.sequence{ "`", adt, builder = unpack } - - M.expr.primary :add(M.adt) - - ---------------------------------------------------------------------------- - -- Anonymous lambda - ---------------------------------------------------------------------------- - M.lambda_expr = gg.sequence{ - "|", _M.func_params_content, "|", _M.expr, - builder = function (x) - local li = x[2].lineinfo - return { tag="Function", x[1], - { {tag="Return", x[2], lineinfo=li }, lineinfo=li } } - end } - - M.expr.primary :add (M.lambda_expr) - - -------------------------------------------------------------------------------- - -- Allows to write "a `f` b" instead of "f(a, b)". Taken from Haskell. - -------------------------------------------------------------------------------- - function M.expr_in_backquotes (lx) return M.expr(lx, 35) end -- 35=limited precedence - M.expr.infix :add{ name = "infix function", - "`", _M.expr_in_backquotes, "`", prec = 35, assoc="left", - builder = function(a, op, b) return {tag="Call", op[1], a, b} end } - - -------------------------------------------------------------------------------- - -- C-style op+assignments - -- TODO: no protection against side-effects in LHS vars. - -------------------------------------------------------------------------------- - local function op_assign(kw, op) - local function rhs(a, b) return { tag="Op", op, a, b } end - local function f(a,b) - if #a ~= #b then gg.parse_error "assymetric operator+assignment" end - local right = { } - local r = { tag="Set", a, right } - for i=1, #a do right[i] = { tag="Op", op, a[i], b[i] } end - return r - end - M.lexer :add (kw) - M.assignments[kw] = f - end - - local ops = { add='+='; sub='-='; mul='*='; div='/=' } - for ast_op_name, keyword in pairs(ops) do op_assign(keyword, ast_op_name) end - - return M -end \ No newline at end of file diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/lexer.lua b/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/lexer.lua deleted file mode 100644 index 2b5ff7e9d..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/lexer.lua +++ /dev/null @@ -1,43 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2006-2014 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- --------------------------------------------------------------------------------- - ----------------------------------------------------------------------- --- Generate a new lua-specific lexer, derived from the generic lexer. ----------------------------------------------------------------------- - -local generic_lexer = require 'metalua.grammar.lexer' - -return function() - local lexer = generic_lexer.lexer :clone() - - local keywords = { - "and", "break", "do", "else", "elseif", - "end", "false", "for", "function", - "goto", -- Lua5.2 - "if", - "in", "local", "nil", "not", "or", "repeat", - "return", "then", "true", "until", "while", - "...", "..", "==", ">=", "<=", "~=", - "::", -- Lua5,2 - "+{", "-{" } -- Metalua - - for _, w in ipairs(keywords) do lexer :add (w) end - - return lexer -end \ No newline at end of file diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/meta.lua b/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/meta.lua deleted file mode 100644 index 71eb3c358..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/meta.lua +++ /dev/null @@ -1,138 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2014 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- -------------------------------------------------------------------------------- - --- Compile-time metaprogramming features: splicing ASTs generated during compilation, --- AST quasi-quoting helpers. - -local gg = require 'metalua.grammar.generator' - -return function(M) - local _M = gg.future(M) - M.meta={ } - local _MM = gg.future(M.meta) - - -------------------------------------------------------------------------------- - -- External splicing: compile an AST into a chunk, load and evaluate - -- that chunk, and replace the chunk by its result (which must also be - -- an AST). - -------------------------------------------------------------------------------- - - -- TODO: that's not part of the parser - function M.meta.eval (ast) - -- TODO: should there be one mlc per splice, or per parser instance? - local mlc = require 'metalua.compiler'.new() - local f = mlc :ast_to_function (ast, '=splice') - local result=f(M) -- splices act on the current parser - return result - end - - ---------------------------------------------------------------------------- - -- Going from an AST to an AST representing that AST - -- the only hash-part key being lifted is `"tag"`. - -- Doesn't lift subtrees protected inside a `Splice{ ... }. - -- e.g. change `Foo{ 123 } into - -- `Table{ `Pair{ `String "tag", `String "foo" }, `Number 123 } - ---------------------------------------------------------------------------- - local function lift (t) - --print("QUOTING:", table.tostring(t, 60,'nohash')) - local cases = { } - function cases.table (t) - local mt = { tag = "Table" } - --table.insert (mt, { tag = "Pair", quote "quote", { tag = "True" } }) - if t.tag == "Splice" then - assert (#t==1, "Invalid splice") - local sp = t[1] - return sp - elseif t.tag then - table.insert (mt, { tag="Pair", lift "tag", lift(t.tag) }) - end - for _, v in ipairs (t) do - table.insert (mt, lift(v)) - end - return mt - end - function cases.number (t) return { tag = "Number", t, quote = true } end - function cases.string (t) return { tag = "String", t, quote = true } end - function cases.boolean (t) return { tag = t and "True" or "False", t, quote = true } end - local f = cases [type(t)] - if f then return f(t) else error ("Cannot quote an AST containing "..tostring(t)) end - end - M.meta.lift = lift - - -------------------------------------------------------------------------------- - -- when this variable is false, code inside [-{...}] is compiled and - -- avaluated immediately. When it's true (supposedly when we're - -- parsing data inside a quasiquote), [-{foo}] is replaced by - -- [`Splice{foo}], which will be unpacked by [quote()]. - -------------------------------------------------------------------------------- - local in_a_quote = false - - -------------------------------------------------------------------------------- - -- Parse the inside of a "-{ ... }" - -------------------------------------------------------------------------------- - function M.meta.splice_content (lx) - local parser_name = "expr" - if lx:is_keyword (lx:peek(2), ":") then - local a = lx:next() - lx:next() -- skip ":" - assert (a.tag=="Id", "Invalid splice parser name") - parser_name = a[1] - end - -- TODO FIXME running a new parser with the old lexer?! - local parser = require 'metalua.compiler.parser'.new() - local ast = parser [parser_name](lx) - if in_a_quote then -- only prevent quotation in this subtree - --printf("SPLICE_IN_QUOTE:\n%s", _G.table.tostring(ast, "nohash", 60)) - return { tag="Splice", ast } - else -- convert in a block, eval, replace with result - if parser_name == "expr" then ast = { { tag="Return", ast } } - elseif parser_name == "stat" then ast = { ast } - elseif parser_name ~= "block" then - error ("splice content must be an expr, stat or block") end - --printf("EXEC THIS SPLICE:\n%s", _G.table.tostring(ast, "nohash", 60)) - return M.meta.eval (ast) - end - end - - M.meta.splice = gg.sequence{ "-{", _MM.splice_content, "}", builder=unpack } - - -------------------------------------------------------------------------------- - -- Parse the inside of a "+{ ... }" - -------------------------------------------------------------------------------- - function M.meta.quote_content (lx) - local parser - if lx:is_keyword (lx:peek(2), ":") then -- +{parser: content } - local parser_name = M.id(lx)[1] - parser = M[parser_name] - lx:next() -- skip ":" - else -- +{ content } - parser = M.expr - end - - local prev_iq = in_a_quote - in_a_quote = true - --print("IN_A_QUOTE") - local content = parser (lx) - local q_content = M.meta.lift (content) - in_a_quote = prev_iq - return q_content - end - - return M -end \ No newline at end of file diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/misc.lua b/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/misc.lua deleted file mode 100644 index f7dde0923..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/misc.lua +++ /dev/null @@ -1,176 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- -------------------------------------------------------------------------------- - -------------------------------------------------------------------------------- --- --- Summary: metalua parser, miscellaneous utility functions. --- -------------------------------------------------------------------------------- - --------------------------------------------------------------------------------- --- --- Exported API: --- * [mlp.fget()] --- * [mlp.id()] --- * [mlp.opt_id()] --- * [mlp.id_list()] --- * [mlp.string()] --- * [mlp.opt_string()] --- * [mlp.id2string()] --- --------------------------------------------------------------------------------- - -local pp = require 'metalua.pprint' -local gg = require 'metalua.grammar.generator' - --- TODO: replace splice-aware versions with naive ones, move etensions in ./meta - -return function(M) - local _M = gg.future(M) - ---[[ metaprog-free versions: - function M.id(lx) - if lx:peek().tag~='Id' then gg.parse_error(lx, "Identifier expected") - else return lx:next() end - end - - function M.opt_id(lx) - if lx:peek().tag~='Id' then return lx:next() else return false end - end - - function M.string(lx) - if lx:peek().tag~='String' then gg.parse_error(lx, "String expected") - else return lx:next() end - end - - function M.opt_string(lx) - if lx:peek().tag~='String' then return lx:next() else return false end - end - - -------------------------------------------------------------------------------- - -- Converts an identifier into a string. Hopefully one day it'll handle - -- splices gracefully, but that proves quite tricky. - -------------------------------------------------------------------------------- - function M.id2string (id) - if id.tag == "Id" then id.tag = "String"; return id - else error ("Identifier expected: "..table.tostring(id, 'nohash')) end - end ---]] - - -------------------------------------------------------------------------------- - -- Try to read an identifier (possibly as a splice), or return [false] if no - -- id is found. - -------------------------------------------------------------------------------- - function M.opt_id (lx) - local a = lx:peek(); - if lx:is_keyword (a, "-{") then - local v = M.meta.splice(lx) - if v.tag ~= "Id" and v.tag ~= "Splice" then - gg.parse_error(lx, "Bad id splice") - end - return v - elseif a.tag == "Id" then return lx:next() - else return false end - end - - -------------------------------------------------------------------------------- - -- Mandatory reading of an id: causes an error if it can't read one. - -------------------------------------------------------------------------------- - function M.id (lx) - return M.opt_id (lx) or gg.parse_error(lx,"Identifier expected") - end - - -------------------------------------------------------------------------------- - -- Common helper function - -------------------------------------------------------------------------------- - M.id_list = gg.list { primary = _M.id, separators = "," } - - -------------------------------------------------------------------------------- - -- Converts an identifier into a string. Hopefully one day it'll handle - -- splices gracefully, but that proves quite tricky. - -------------------------------------------------------------------------------- - function M.id2string (id) - --print("id2string:", disp.ast(id)) - if id.tag == "Id" then id.tag = "String"; return id - elseif id.tag == "Splice" then - error ("id2string on splice not implemented") - -- Evaluating id[1] will produce `Id{ xxx }, - -- and we want it to produce `String{ xxx }. - -- The following is the plain notation of: - -- +{ `String{ `Index{ `Splice{ -{id[1]} }, `Number 1 } } } - return { tag="String", { tag="Index", { tag="Splice", id[1] }, - { tag="Number", 1 } } } - else error ("Identifier expected: "..pp.tostring (id, {metalua_tag=1, hide_hash=1})) end - end - - -------------------------------------------------------------------------------- - -- Read a string, possibly spliced, or return an error if it can't - -------------------------------------------------------------------------------- - function M.string (lx) - local a = lx:peek() - if lx:is_keyword (a, "-{") then - local v = M.meta.splice(lx) - if v.tag ~= "String" and v.tag ~= "Splice" then - gg.parse_error(lx,"Bad string splice") - end - return v - elseif a.tag == "String" then return lx:next() - else error "String expected" end - end - - -------------------------------------------------------------------------------- - -- Try to read a string, or return false if it can't. No splice allowed. - -------------------------------------------------------------------------------- - function M.opt_string (lx) - return lx:peek().tag == "String" and lx:next() - end - - -------------------------------------------------------------------------------- - -- Chunk reader: block + Eof - -------------------------------------------------------------------------------- - function M.skip_initial_sharp_comment (lx) - -- Dirty hack: I'm happily fondling lexer's private parts - -- FIXME: redundant with lexer:newstream() - lx :sync() - local i = lx.src:match ("^#.-\n()", lx.i) - if i then - lx.i = i - lx.column_offset = i - lx.line = lx.line and lx.line + 1 or 1 - end - end - - local function chunk (lx) - if lx:peek().tag == 'Eof' then - return { } -- handle empty files - else - M.skip_initial_sharp_comment (lx) - local chunk = M.block (lx) - if lx:peek().tag ~= "Eof" then - gg.parse_error(lx, "End-of-file expected") - end - return chunk - end - end - - -- chunk is wrapped in a sequence so that it has a "transformer" field. - M.chunk = gg.sequence { chunk, builder = unpack } - - return M -end \ No newline at end of file diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/stat.lua b/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/stat.lua deleted file mode 100644 index 5d5e3a91d..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/stat.lua +++ /dev/null @@ -1,279 +0,0 @@ ------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- -------------------------------------------------------------------------------- - -------------------------------------------------------------------------------- --- --- Summary: metalua parser, statement/block parser. This is part of the --- definition of module [mlp]. --- -------------------------------------------------------------------------------- - -------------------------------------------------------------------------------- --- --- Exports API: --- * [mlp.stat()] --- * [mlp.block()] --- * [mlp.for_header()] --- -------------------------------------------------------------------------------- - -local lexer = require 'metalua.grammar.lexer' -local gg = require 'metalua.grammar.generator' - -local annot = require 'metalua.compiler.parser.annot.generator' - --------------------------------------------------------------------------------- --- List of all keywords that indicate the end of a statement block. Users are --- likely to extend this list when designing extensions. --------------------------------------------------------------------------------- - - -return function(M) - local _M = gg.future(M) - - M.block_terminators = { "else", "elseif", "end", "until", ")", "}", "]" } - - -- FIXME: this must be handled from within GG!!! - -- FIXME: there's no :add method in the list anyway. Added by gg.list?! - function M.block_terminators :add(x) - if type (x) == "table" then for _, y in ipairs(x) do self :add (y) end - else table.insert (self, x) end - end - - ---------------------------------------------------------------------------- - -- list of statements, possibly followed by semicolons - ---------------------------------------------------------------------------- - M.block = gg.list { - name = "statements block", - terminators = M.block_terminators, - primary = function (lx) - -- FIXME use gg.optkeyword() - local x = M.stat (lx) - if lx:is_keyword (lx:peek(), ";") then lx:next() end - return x - end } - - ---------------------------------------------------------------------------- - -- Helper function for "return " parsing. - -- Called when parsing return statements. - -- The specific test for initial ";" is because it's not a block terminator, - -- so without it gg.list would choke on "return ;" statements. - -- We don't make a modified copy of block_terminators because this list - -- is sometimes modified at runtime, and the return parser would get out of - -- sync if it was relying on a copy. - ---------------------------------------------------------------------------- - local return_expr_list_parser = gg.multisequence{ - { ";" , builder = function() return { } end }, - default = gg.list { - _M.expr, separators = ",", terminators = M.block_terminators } } - - - local for_vars_list = gg.list{ - name = "for variables list", - primary = _M.id, - separators = ",", - terminators = "in" } - - ---------------------------------------------------------------------------- - -- for header, between [for] and [do] (exclusive). - -- Return the `Forxxx{...} AST, without the body element (the last one). - ---------------------------------------------------------------------------- - function M.for_header (lx) - local vars = M.id_list(lx) - if lx :is_keyword (lx:peek(), "=") then - if #vars ~= 1 then - gg.parse_error (lx, "numeric for only accepts one variable") - end - lx:next() -- skip "=" - local exprs = M.expr_list (lx) - if #exprs < 2 or #exprs > 3 then - gg.parse_error (lx, "numeric for requires 2 or 3 boundaries") - end - return { tag="Fornum", vars[1], unpack (exprs) } - else - if not lx :is_keyword (lx :next(), "in") then - gg.parse_error (lx, '"=" or "in" expected in for loop') - end - local exprs = M.expr_list (lx) - return { tag="Forin", vars, exprs } - end - end - - ---------------------------------------------------------------------------- - -- Function def parser helper: id ( . id ) * - ---------------------------------------------------------------------------- - local function fn_builder (list) - local acc = list[1] - local first = acc.lineinfo.first - for i = 2, #list do - local index = M.id2string(list[i]) - local li = lexer.new_lineinfo(first, index.lineinfo.last) - acc = { tag="Index", acc, index, lineinfo=li } - end - return acc - end - local func_name = gg.list{ _M.id, separators = ".", builder = fn_builder } - - ---------------------------------------------------------------------------- - -- Function def parser helper: ( : id )? - ---------------------------------------------------------------------------- - local method_name = gg.onkeyword{ name = "method invocation", ":", _M.id, - transformers = { function(x) return x and x.tag=='Id' and M.id2string(x) end } } - - ---------------------------------------------------------------------------- - -- Function def builder - ---------------------------------------------------------------------------- - local function funcdef_builder(x) - local name, method, func = unpack(x) - if method then - name = { tag="Index", name, method, - lineinfo = { - first = name.lineinfo.first, - last = method.lineinfo.last } } - table.insert (func[1], 1, {tag="Id", "self"}) - end - local r = { tag="Set", {name}, {func} } - r[1].lineinfo = name.lineinfo - r[2].lineinfo = func.lineinfo - return r - end - - - ---------------------------------------------------------------------------- - -- if statement builder - ---------------------------------------------------------------------------- - local function if_builder (x) - local cond_block_pairs, else_block, r = x[1], x[2], {tag="If"} - local n_pairs = #cond_block_pairs - for i = 1, n_pairs do - local cond, block = unpack(cond_block_pairs[i]) - r[2*i-1], r[2*i] = cond, block - end - if else_block then table.insert(r, #r+1, else_block) end - return r - end - - -------------------------------------------------------------------------------- - -- produce a list of (expr,block) pairs - -------------------------------------------------------------------------------- - local elseifs_parser = gg.list { - gg.sequence { _M.expr, "then", _M.block , name='elseif parser' }, - separators = "elseif", - terminators = { "else", "end" } - } - - local annot_expr = gg.sequence { - _M.expr, - gg.onkeyword{ "#", gg.future(M, 'annot').tf }, - builder = function(x) - local e, a = unpack(x) - if a then return { tag='Annot', e, a } - else return e end - end } - - local annot_expr_list = gg.list { - primary = annot.opt(M, _M.expr, 'tf'), separators = ',' } - - ------------------------------------------------------------------------ - -- assignments and calls: statements that don't start with a keyword - ------------------------------------------------------------------------ - local function assign_or_call_stat_parser (lx) - local e = annot_expr_list (lx) - local a = lx:is_keyword(lx:peek()) - local op = a and M.assignments[a] - -- TODO: refactor annotations - if op then - --FIXME: check that [e] is a LHS - lx :next() - local annots - e, annots = annot.split(e) - local v = M.expr_list (lx) - if type(op)=="string" then return { tag=op, e, v, annots } - else return op (e, v) end - else - assert (#e > 0) - if #e > 1 then - gg.parse_error (lx, - "comma is not a valid statement separator; statement can be ".. - "separated by semicolons, or not separated at all") - elseif e[1].tag ~= "Call" and e[1].tag ~= "Invoke" then - local typename - if e[1].tag == 'Id' then - typename = '("'..e[1][1]..'") is an identifier' - elseif e[1].tag == 'Op' then - typename = "is an arithmetic operation" - else typename = "is of type '"..(e[1].tag or "").."'" end - gg.parse_error (lx, - "This expression %s; ".. - "a statement was expected, and only function and method call ".. - "expressions can be used as statements", typename); - end - return e[1] - end - end - - M.local_stat_parser = gg.multisequence{ - -- local function - { "function", _M.id, _M.func_val, builder = - function(x) - local vars = { x[1], lineinfo = x[1].lineinfo } - local vals = { x[2], lineinfo = x[2].lineinfo } - return { tag="Localrec", vars, vals } - end }, - -- local ( = )? - default = gg.sequence{ - gg.list{ - primary = annot.opt(M, _M.id, 'tf'), - separators = ',' }, - gg.onkeyword{ "=", _M.expr_list }, - builder = function(x) - local annotated_left, right = unpack(x) - local left, annotations = annot.split(annotated_left) - return {tag="Local", left, right or { }, annotations } - end } } - - ------------------------------------------------------------------------ - -- statement - ------------------------------------------------------------------------ - M.stat = gg.multisequence { - name = "statement", - { "do", _M.block, "end", builder = - function (x) return { tag="Do", unpack (x[1]) } end }, - { "for", _M.for_header, "do", _M.block, "end", builder = - function (x) x[1][#x[1]+1] = x[2]; return x[1] end }, - { "function", func_name, method_name, _M.func_val, builder=funcdef_builder }, - { "while", _M.expr, "do", _M.block, "end", builder = "While" }, - { "repeat", _M.block, "until", _M.expr, builder = "Repeat" }, - { "local", _M.local_stat_parser, builder = unpack }, - { "return", return_expr_list_parser, builder = - function(x) x[1].tag='Return'; return x[1] end }, - { "break", builder = function() return { tag="Break" } end }, - { "-{", gg.future(M, 'meta').splice_content, "}", builder = unpack }, - { "if", gg.nonempty(elseifs_parser), gg.onkeyword{ "else", M.block }, "end", - builder = if_builder }, - default = assign_or_call_stat_parser } - - M.assignments = { - ["="] = "Set" - } - - function M.assignments:add(k, v) self[k] = v end - - return M -end \ No newline at end of file diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/table.lua b/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/table.lua deleted file mode 100644 index 11102d9ec..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/compiler/parser/table.lua +++ /dev/null @@ -1,77 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- --------------------------------------------------------------------------------- - --------------------------------------------------------------------------------- --- --- Exported API: --- * [M.table_bracket_field()] --- * [M.table_field()] --- * [M.table_content()] --- * [M.table()] --- --- KNOWN BUG: doesn't handle final ";" or "," before final "}" --- --------------------------------------------------------------------------------- - -local gg = require 'metalua.grammar.generator' - -return function(M) - - M.table = { } - local _table = gg.future(M.table) - local _expr = gg.future(M).expr - - -------------------------------------------------------------------------------- - -- `[key] = value` table field definition - -------------------------------------------------------------------------------- - M.table.bracket_pair = gg.sequence{ "[", _expr, "]", "=", _expr, builder = "Pair" } - - -------------------------------------------------------------------------------- - -- table element parser: list value, `id = value` pair or `[value] = value` pair. - -------------------------------------------------------------------------------- - function M.table.element (lx) - if lx :is_keyword (lx :peek(), "[") then return M.table.bracket_pair(lx) end - local e = M.expr (lx) - if not lx :is_keyword (lx :peek(), "=") then return e end - lx :next(); -- skip the "=" - local key = M.id2string(e) -- will fail on non-identifiers - local val = M.expr(lx) - local r = { tag="Pair", key, val } - r.lineinfo = { first = key.lineinfo.first, last = val.lineinfo.last } - return r - end - - ----------------------------------------------------------------------------- - -- table constructor, without enclosing braces; returns a full table object - ----------------------------------------------------------------------------- - M.table.content = gg.list { - -- eta expansion to allow patching the element definition - primary = _table.element, - separators = { ",", ";" }, - terminators = "}", - builder = "Table" } - - -------------------------------------------------------------------------------- - -- complete table constructor including [{...}] - -------------------------------------------------------------------------------- - -- TODO beware, stat and expr use only table.content, this can't be patched. - M.table.table = gg.sequence{ "{", _table.content, "}", builder = unpack } - - return M -end \ No newline at end of file diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/extension/comprehension.mlua b/Utils/luarocks/systree/share/lua/5.1/metalua/extension/comprehension.mlua deleted file mode 100644 index 8917b9a92..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/extension/comprehension.mlua +++ /dev/null @@ -1,282 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- -------------------------------------------------------------------------------- --- --- This extension implements list comprehensions, similar to Haskell and --- Python syntax, to easily describe lists. --- --- * x[a ... b] is the list { x[a], x[a+1], ..., x[b] } --- * { f()..., b } contains all the elements returned by f(), then b --- (allows to expand list fields other than the last one) --- * list comprehensions a la python, with "for" and "if" suffixes: --- {i+10*j for i=1,3 for j=1,3 if i~=j} is { 21, 31, 12, 32, 13, 23 } --- -------------------------------------------------------------------------------- - --{ extension ("match", ...) } - -local SUPPORT_IMPROVED_LOOPS = true -local SUPPORT_IMPROVED_INDEXES = false -- depends on deprecated table.isub -local SUPPORT_CONTINUE = true -local SUPPORT_COMP_LISTS = true - -assert (SUPPORT_IMPROVED_LOOPS or not SUPPORT_CONTINUE, - "Can't support 'continue' without improved loop headers") - -local gg = require 'metalua.grammar.generator' -local Q = require 'metalua.treequery' - -local function dots_list_suffix_builder (x) return `DotsSuffix{ x } end - -local function for_list_suffix_builder (list_element, suffix) - local new_header = suffix[1] - match list_element with - | `Comp{ _, acc } -> table.insert (acc, new_header); return list_element - | _ -> return `Comp{ list_element, { new_header } } - end -end - -local function if_list_suffix_builder (list_element, suffix) - local new_header = `If{ suffix[1] } - match list_element with - | `Comp{ _, acc } -> table.insert (acc, new_header); return list_element - | _ -> return `Comp{ list_element, { new_header } } - end -end - --- Builds a statement from a table element, which adds this element to --- a table `t`, potentially thanks to an alias `tinsert` to --- `table.insert`. --- @param core the part around which the loops are built. --- either `DotsSuffix{expr}, `Pair{ expr } or a plain expression --- @param list comprehension suffixes, in the order in which they appear --- either `Forin{ ... } or `Fornum{ ...} or `If{ ... }. In each case, --- it misses a last child node as its body. --- @param t a variable containing the table to fill --- @param tinsert a variable containing `table.insert`. --- --- @return fill a statement which fills empty table `t` with the denoted element -local function comp_list_builder(core, list, t, tinsert) - local filler - -- 1 - Build the loop's core: if it has suffix "...", every elements of the - -- multi-return must be inserted, hence the extra [for] loop. - match core with - | `DotsSuffix{ element } -> - local x = gg.gensym() - filler = +{stat: for _, -{x} in pairs{ -{element} } do (-{tinsert})(-{t}, -{x}) end } - | `Pair{ key, value } -> - --filler = +{ -{t}[-{key}] = -{value} } - filler = `Set{ { `Index{ t, key } }, { value } } - | _ -> filler = +{ (-{tinsert})(-{t}, -{core}) } - end - - -- 2 - Stack the `if` and `for` control structures, from outside to inside. - -- This is done in a destructive way for the elements of [list]. - for i = #list, 1, -1 do - table.insert (list[i], {filler}) - filler = list[i] - end - - return filler -end - -local function table_content_builder (list) - local special = false -- Does the table need a special builder? - for _, element in ipairs(list) do - local etag = element.tag - if etag=='Comp' or etag=='DotsSuffix' then special=true; break end - end - if not special then list.tag='Table'; return list end - - local t, tinsert = gg.gensym 'table', gg.gensym 'table_insert' - local filler_block = { +{stat: local -{t}, -{tinsert} = { }, table.insert } } - for _, element in ipairs(list) do - local filler - match element with - | `Comp{ core, comp } -> filler = comp_list_builder(core, comp, t, tinsert) - | _ -> filler = comp_list_builder(element, { }, t, tinsert) - end - table.insert(filler_block, filler) - end - return `Stat{ filler_block, t } -end - - --------------------------------------------------------------------------------- --- Back-end for improved index operator. -local function index_builder(a, suffix) - match suffix[1] with - -- Single index, no range: keep the native semantics - | { { e, false } } -> return `Index{ a, e } - -- Either a range, or multiple indexes, or both - | ranges -> - local r = `Call{ +{table.isub}, a } - local function acc (x,y) table.insert (r,x); table.insert (r,y) end - for _, seq in ipairs (ranges) do - match seq with - | { e, false } -> acc(e,e) - | { e, f } -> acc(e,f) - end - end - return r - end -end - -------------------------------------------------------------------- --- Find continue statements in a loop body, change them into goto --- end-of-body. -local function transform_continue_statements(body) - local continue_statements = Q(body) - :if_unknown() -- tolerate unknown 'Continue' statements - :not_under ('Forin', 'Fornum', 'While', 'Repeat') - :filter ('Continue') - :list() - if next(continue_statements) then - local continue_label = gg.gensym 'continue' [1] - table.insert(body, `Label{ continue_label }) - for _, statement in ipairs(continue_statements) do - statement.tag = 'Goto' - statement[1] = continue_label - end - return true - else return false end -end - -------------------------------------------------------------------------------- --- Back-end for loops with a multi-element header -local function loop_builder(x) - local first, elements, body = unpack(x) - - -- Change continue statements into gotos. - if SUPPORT_CONTINUE then transform_continue_statements(body) end - - ------------------------------------------------------------------- - -- If it's a regular loop, don't bloat the code - if not next(elements) then - table.insert(first, body) - return first - end - - ------------------------------------------------------------------- - -- There's no reason to treat the first element in a special way - table.insert(elements, 1, first) - - ------------------------------------------------------------------- - -- Change breaks into gotos that escape all loops at once. - local exit_label = nil - local function break_to_goto(break_node) - if not exit_label then exit_label = gg.gensym 'break' [1] end - break_node = break_node or { } - break_node.tag = 'Goto' - break_node[1] = exit_label - return break_node - end - Q(body) - :not_under('Function', 'Forin', 'Fornum', 'While', 'Repeat') - :filter('Break') - :foreach (break_to_goto) - - ------------------------------------------------------------------- - -- Compile all headers elements, from last to first. - -- invariant: `body` is a block (not a statement) - local result = body - for i = #elements, 1, -1 do - local e = elements[i] - match e with - | `If{ cond } -> - result = { `If{ cond, result } } - | `Until{ cond } -> - result = +{block: if -{cond} then -{break_to_goto()} else -{result} end } - | `While{ cond } -> - if i==1 then result = { `While{ cond, result } } -- top-level while - else result = +{block: if -{cond} then -{result} else -{break_to_goto()} end } end - | `Forin{ ... } | `Fornum{ ... } -> - table.insert (e, result); result={e} - | _-> require'metalua.pprint'.printf("Bad loop header element %s", e) - end - end - - - ------------------------------------------------------------------- - -- If some breaks had to be changed into gotos, insert the label - if exit_label then result = { result, `Label{ exit_label } } end - - return result -end - - --------------------------------------------------------------------------------- --- Improved "[...]" index operator: --- * support for multi-indexes ("foo[bar, gnat]") --- * support for ranges ("foo[bar ... gnat]") --------------------------------------------------------------------------------- -local function extend(M) - - local _M = gg.future(M) - - if SUPPORT_COMP_LISTS then - -- support for "for" / "if" comprehension suffixes in literal tables - local original_table_element = M.table.element - M.table.element = gg.expr{ name="table cell", - primary = original_table_element, - suffix = { name="table cell suffix", - { "...", builder = dots_list_suffix_builder }, - { "for", _M.for_header, builder = for_list_suffix_builder }, - { "if", _M.expr, builder = if_list_suffix_builder } } } - M.table.content.builder = table_content_builder - end - - if SUPPORT_IMPROVED_INDEXES then - -- Support for ranges and multiple indices in bracket suffixes - M.expr.suffix:del '[' - M.expr.suffix:add{ name="table index/range", - "[", gg.list{ - gg.sequence { _M.expr, gg.onkeyword{ "...", _M.expr } } , - separators = { ",", ";" } }, - "]", builder = index_builder } - end - - if SUPPORT_IMPROVED_LOOPS then - local original_for_header = M.for_header - M.stat :del 'for' - M.stat :del 'while' - - M.loop_suffix = gg.multisequence{ - { 'while', _M.expr, builder = |x| `Until{ `Op{ 'not', x[1] } } }, - { 'until', _M.expr, builder = |x| `Until{ x[1] } }, - { 'if', _M.expr, builder = |x| `If{ x[1] } }, - { 'for', original_for_header, builder = |x| x[1] } } - - M.loop_suffix_list = gg.list{ _M.loop_suffix, terminators='do' } - - M.stat :add{ - 'for', original_for_header, _M.loop_suffix_list, 'do', _M.block, 'end', - builder = loop_builder } - - M.stat :add{ - 'while', _M.expr, _M.loop_suffix_list, 'do', _M.block, 'end', - builder = |x| loop_builder{ `While{x[1]}, x[2], x[3] } } - end - - if SUPPORT_CONTINUE then - M.lexer :add 'continue' - M.stat :add{ 'continue', builder='Continue' } - end -end - -return extend diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/extension/match.mlua b/Utils/luarocks/systree/share/lua/5.1/metalua/extension/match.mlua deleted file mode 100644 index f55ff4140..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/extension/match.mlua +++ /dev/null @@ -1,400 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- -------------------------------------------------------------------------------- - -------------------------------------------------------------------------------- --- --- Glossary: --- --- * term_seq: the tested stuff, a sequence of terms --- * pattern_element: might match one term of a term seq. Represented --- as expression ASTs. --- * pattern_seq: might match a term_seq --- * pattern_group: several pattern seqs, one of them might match --- the term seq. --- * case: pattern_group * guard option * block --- * match_statement: tested term_seq * case list --- --- Hence a complete match statement is a: --- --- { list(expr), list{ list(list(expr)), expr or false, block } } --- --- Implementation hints --- ==================== --- --- The implementation is made as modular as possible, so that parts --- can be reused in other extensions. The priviledged way to share --- contextual information across functions is through the 'cfg' table --- argument. Its fields include: --- --- * code: code generated from pattern. A pattern_(element|seq|group) --- is compiled as a sequence of instructions which will jump to --- label [cfg.on_failure] if the tested term doesn't match. --- --- * on_failure: name of the label where the code will jump if the --- pattern doesn't match --- --- * locals: names of local variables used by the pattern. This --- includes bound variables, and temporary variables used to --- destructure tables. Names are stored as keys of the table, --- values are meaningless. --- --- * after_success: label where the code must jump after a pattern --- succeeded to capture a term, and the guard suceeded if there is --- any, and the conditional block has run. --- --- * ntmp: number of temporary variables used to destructurate table --- in the current case. --- --- Code generation is performed by acc_xxx() functions, which accumulate --- code in cfg.code: --- --- * acc_test(test, cfg) will generate a jump to cfg.on_failure --- *when the test returns TRUE* --- --- * acc_stat accumulates a statement --- --- * acc_assign accumulate an assignment statement, and makes sure that --- the LHS variable the registered as local in cfg.locals. --- -------------------------------------------------------------------------------- - --- TODO: hygiene wrt type() --- TODO: cfg.ntmp isn't reset as often as it could. I'm not even sure --- the corresponding locals are declared. - -local checks = require 'checks' -local gg = require 'metalua.grammar.generator' -local pp = require 'metalua.pprint' - ----------------------------------------------------------------------- --- This would have been best done through library 'metalua.walk', --- but walk depends on match, so we have to break the dependency. --- It replaces all instances of `...' in `ast' with `term', unless --- it appears in a function. ----------------------------------------------------------------------- -local function replace_dots (ast, term) - local function rec (node) - for i, child in ipairs(node) do - if type(child)~="table" then -- pass - elseif child.tag=='Dots' then - if term=='ambiguous' then - error ("You can't use `...' on the right of a match case when it appears ".. - "more than once on the left") - else node[i] = term end - elseif child.tag=='Function' then return nil - else rec(child) end - end - end - return rec(ast) -end - -local tmpvar_base = gg.gensym 'submatch.' [1] - -local function next_tmpvar(cfg) - assert (cfg.ntmp, "No cfg.ntmp imbrication level in the match compiler") - cfg.ntmp = cfg.ntmp+1 - return `Id{ tmpvar_base .. cfg.ntmp } -end - --- Code accumulators -local acc_stat = |x,cfg| table.insert (cfg.code, x) -local acc_test = |x,cfg| acc_stat(+{stat: if -{x} then -{`Goto{cfg.on_failure}} end}, cfg) --- lhs :: `Id{ string } --- rhs :: expr -local function acc_assign (lhs, rhs, cfg) - assert(lhs.tag=='Id') - cfg.locals[lhs[1]] = true - acc_stat (`Set{ {lhs}, {rhs} }, cfg) -end - -local literal_tags = { String=1, Number=1, True=1, False=1, Nil=1 } - --- pattern :: `Id{ string } --- term :: expr -local function id_pattern_element_builder (pattern, term, cfg) - assert (pattern.tag == "Id") - if pattern[1] == "_" then - -- "_" is used as a dummy var ==> no assignment, no == checking - cfg.locals._ = true - elseif cfg.locals[pattern[1]] then - -- This var is already bound ==> test for equality - acc_test (+{ -{term} ~= -{pattern} }, cfg) - else - -- Free var ==> bind it, and remember it for latter linearity checking - acc_assign (pattern, term, cfg) - cfg.locals[pattern[1]] = true - end -end - --- mutually recursive with table_pattern_element_builder -local pattern_element_builder - --- pattern :: pattern and `Table{ } --- term :: expr -local function table_pattern_element_builder (pattern, term, cfg) - local seen_dots, len = false, 0 - acc_test (+{ type( -{term} ) ~= "table" }, cfg) - for i = 1, #pattern do - local key, sub_pattern - if pattern[i].tag=="Pair" then -- Explicit key/value pair - key, sub_pattern = unpack (pattern[i]) - assert (literal_tags[key.tag], "Invalid key") - else -- Implicit key - len, key, sub_pattern = len+1, `Number{ len+1 }, pattern[i] - end - - -- '...' can only appear in final position - -- Could be fixed actually... - assert (not seen_dots, "Wrongly placed `...' ") - - if sub_pattern.tag == "Id" then - -- Optimization: save a useless [ v(n+1)=v(n).key ] - id_pattern_element_builder (sub_pattern, `Index{ term, key }, cfg) - if sub_pattern[1] ~= "_" then - acc_test (+{ -{sub_pattern} == nil }, cfg) - end - elseif sub_pattern.tag == "Dots" then - -- Remember where the capture is, and thatt arity checking shouldn't occur - seen_dots = true - else - -- Business as usual: - local v2 = next_tmpvar(cfg) - acc_assign (v2, `Index{ term, key }, cfg) - pattern_element_builder (sub_pattern, v2, cfg) - -- TODO: restore ntmp? - end - end - if seen_dots then -- remember how to retrieve `...' - -- FIXME: check, but there might be cases where the variable -{term} - -- will be overridden in contrieved tables. - -- ==> save it now, and clean the setting statement if unused - if cfg.dots_replacement then cfg.dots_replacement = 'ambiguous' - else cfg.dots_replacement = +{ select (-{`Number{len}}, unpack(-{term})) } end - else -- Check arity - acc_test (+{ #-{term} ~= -{`Number{len}} }, cfg) - end -end - --- mutually recursive with pattern_element_builder -local eq_pattern_element_builder, regexp_pattern_element_builder - --- Concatenate code in [cfg.code], that will jump to label --- [cfg.on_failure] if [pattern] doesn't match [term]. [pattern] --- should be an identifier, or at least cheap to compute and --- side-effects free. --- --- pattern :: pattern_element --- term :: expr -function pattern_element_builder (pattern, term, cfg) - if literal_tags[pattern.tag] then - acc_test (+{ -{term} ~= -{pattern} }, cfg) - elseif "Id" == pattern.tag then - id_pattern_element_builder (pattern, term, cfg) - elseif "Op" == pattern.tag and "div" == pattern[1] then - regexp_pattern_element_builder (pattern, term, cfg) - elseif "Op" == pattern.tag and "eq" == pattern[1] then - eq_pattern_element_builder (pattern, term, cfg) - elseif "Table" == pattern.tag then - table_pattern_element_builder (pattern, term, cfg) - else - error ("Invalid pattern at ".. - tostring(pattern.lineinfo).. - ": "..pp.tostring(pattern, {hide_hash=true})) - end -end - -function eq_pattern_element_builder (pattern, term, cfg) - local _, pat1, pat2 = unpack (pattern) - local ntmp_save = cfg.ntmp - pattern_element_builder (pat1, term, cfg) - cfg.ntmp = ntmp_save - pattern_element_builder (pat2, term, cfg) -end - --- pattern :: `Op{ 'div', string, list{`Id string} or `Id{ string }} --- term :: expr -local function regexp_pattern_element_builder (pattern, term, cfg) - local op, regexp, sub_pattern = unpack(pattern) - - -- Sanity checks -- - assert (op=='div', "Don't know what to do with that op in a pattern") - assert (regexp.tag=="String", - "Left hand side operand for '/' in a pattern must be ".. - "a literal string representing a regular expression") - if sub_pattern.tag=="Table" then - for _, x in ipairs(sub_pattern) do - assert (x.tag=="Id" or x.tag=='Dots', - "Right hand side operand for '/' in a pattern must be ".. - "a list of identifiers") - end - else - assert (sub_pattern.tag=="Id", - "Right hand side operand for '/' in a pattern must be ".. - "an identifier or a list of identifiers") - end - - -- Regexp patterns can only match strings - acc_test (+{ type(-{term}) ~= 'string' }, cfg) - -- put all captures in a list - local capt_list = +{ { string.strmatch(-{term}, -{regexp}) } } - -- save them in a var_n for recursive decomposition - local v2 = next_tmpvar(cfg) - acc_stat (+{stat: local -{v2} = -{capt_list} }, cfg) - -- was capture successful? - acc_test (+{ not next (-{v2}) }, cfg) - pattern_element_builder (sub_pattern, v2, cfg) -end - - --- Jumps to [cfg.on_faliure] if pattern_seq doesn't match --- term_seq. -local function pattern_seq_builder (pattern_seq, term_seq, cfg) - if #pattern_seq ~= #term_seq then error ("Bad seq arity") end - cfg.locals = { } -- reset bound variables between alternatives - for i=1, #pattern_seq do - cfg.ntmp = 1 -- reset the tmp var generator - pattern_element_builder(pattern_seq[i], term_seq[i], cfg) - end -end - --------------------------------------------------- --- for each case i: --- pattern_seq_builder_i: --- * on failure, go to on_failure_i --- * on success, go to on_success --- label on_success: --- block --- goto after_success --- label on_failure_i --------------------------------------------------- -local function case_builder (case, term_seq, cfg) - local patterns_group, guard, block = unpack(case) - local on_success = gg.gensym 'on_success' [1] - for i = 1, #patterns_group do - local pattern_seq = patterns_group[i] - cfg.on_failure = gg.gensym 'match_fail' [1] - cfg.dots_replacement = false - pattern_seq_builder (pattern_seq, term_seq, cfg) - if i<#patterns_group then - acc_stat (`Goto{on_success}, cfg) - acc_stat (`Label{cfg.on_failure}, cfg) - end - end - acc_stat (`Label{on_success}, cfg) - if guard then acc_test (+{not -{guard}}, cfg) end - if cfg.dots_replacement then - replace_dots (block, cfg.dots_replacement) - end - block.tag = 'Do' - acc_stat (block, cfg) - acc_stat (`Goto{cfg.after_success}, cfg) - acc_stat (`Label{cfg.on_failure}, cfg) -end - -local function match_builder (x) - local term_seq, cases = unpack(x) - local cfg = { - code = `Do{ }, - after_success = gg.gensym "_after_success" } - - - -- Some sharing issues occur when modifying term_seq, - -- so it's replaced by a copy new_term_seq. - -- TODO: clean that up, and re-suppress the useless copies - -- (cf. remarks about capture bug below). - local new_term_seq = { } - - local match_locals - - -- Make sure that all tested terms are variables or literals - for i=1, #term_seq do - local t = term_seq[i] - -- Capture problem: the following would compile wrongly: - -- `match x with x -> end' - -- Temporary workaround: suppress the condition, so that - -- all external variables are copied into unique names. - --if t.tag ~= 'Id' and not literal_tags[t.tag] then - local v = gg.gensym 'v' - if not match_locals then match_locals = `Local{ {v}, {t} } else - table.insert(match_locals[1], v) - table.insert(match_locals[2], t) - end - new_term_seq[i] = v - --end - end - term_seq = new_term_seq - - if match_locals then acc_stat(match_locals, cfg) end - - for i=1, #cases do - local case_cfg = { - after_success = cfg.after_success, - code = `Do{ } - -- locals = { } -- unnecessary, done by pattern_seq_builder - } - case_builder (cases[i], term_seq, case_cfg) - if next (case_cfg.locals) then - local case_locals = { } - table.insert (case_cfg.code, 1, `Local{ case_locals, { } }) - for v, _ in pairs (case_cfg.locals) do - table.insert (case_locals, `Id{ v }) - end - end - acc_stat(case_cfg.code, cfg) - end - local li = `String{tostring(cases.lineinfo)} - acc_stat(+{error('mismatch at '..-{li})}, cfg) - acc_stat(`Label{cfg.after_success}, cfg) - return cfg.code -end - ----------------------------------------------------------------------- --- Syntactical front-end ----------------------------------------------------------------------- - -local function extend(M) - - local _M = gg.future(M) - - checks('metalua.compiler.parser') - M.lexer:add{ "match", "with", "->" } - M.block.terminators:add "|" - - local match_cases_list_parser = gg.list{ name = "match cases list", - gg.sequence{ name = "match case", - gg.list{ name = "match case patterns list", - primary = _M.expr_list, - separators = "|", - terminators = { "->", "if" } }, - gg.onkeyword{ "if", _M.expr, consume = true }, - "->", - _M.block }, - separators = "|", - terminators = "end" } - - M.stat:add{ name = "match statement", - "match", - _M.expr_list, - "with", gg.optkeyword "|", - match_cases_list_parser, - "end", - builder = |x| match_builder{ x[1], x[3] } } -end - -return extend \ No newline at end of file diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/grammar/generator.lua b/Utils/luarocks/systree/share/lua/5.1/metalua/grammar/generator.lua deleted file mode 100644 index 2680d8a53..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/grammar/generator.lua +++ /dev/null @@ -1,834 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- --------------------------------------------------------------------------------- - --------------------------------------------------------------------------------- --- --- Summary: parser generator. Collection of higher order functors, --- which allow to build and combine parsers. Relies on a lexer --- that supports the same API as the one exposed in mll.lua. --- --------------------------------------------------------------------------------- - --------------------------------------------------------------------------------- --- --- Exported API: --- --- Parser generators: --- * [gg.sequence()] --- * [gg.multisequence()] --- * [gg.expr()] --- * [gg.list()] --- * [gg.onkeyword()] --- * [gg.optkeyword()] --- --- Other functions: --- * [gg.parse_error()] --- * [gg.make_parser()] --- * [gg.is_parser()] --- --------------------------------------------------------------------------------- - -local M = { } - -local checks = require 'checks' -local lexer = require 'metalua.grammar.lexer' -local pp = require 'metalua.pprint' - --------------------------------------------------------------------------------- --- Symbol generator: [gensym()] returns a guaranteed-to-be-unique identifier. --- The main purpose is to avoid variable capture in macros. --- --- If a string is passed as an argument, theis string will be part of the --- id name (helpful for macro debugging) --------------------------------------------------------------------------------- -local gensymidx = 0 - -function M.gensym (arg) - gensymidx = gensymidx + 1 - return { tag="Id", string.format(".%i.%s", gensymidx, arg or "")} -end - - -------------------------------------------------------------------------------- --- parser metatable, which maps __call to method parse, and adds some --- error tracing boilerplate. -------------------------------------------------------------------------------- -local parser_metatable = { } - -function parser_metatable :__call (lx, ...) - return self :parse (lx, ...) -end - -------------------------------------------------------------------------------- --- Turn a table into a parser, mainly by setting the metatable. -------------------------------------------------------------------------------- -function M.make_parser(kind, p) - p.kind = kind - if not p.transformers then p.transformers = { } end - function p.transformers:add (x) - table.insert (self, x) - end - setmetatable (p, parser_metatable) - return p -end - -------------------------------------------------------------------------------- --- Return true iff [x] is a parser. --- If it's a gg-generated parser, return the name of its kind. -------------------------------------------------------------------------------- -function M.is_parser (x) - return type(x)=="function" or getmetatable(x)==parser_metatable and x.kind -end - -------------------------------------------------------------------------------- --- Parse a sequence, without applying builder nor transformers. -------------------------------------------------------------------------------- -local function raw_parse_sequence (lx, p) - local r = { } - for i=1, #p do - local e=p[i] - if type(e) == "string" then - local kw = lx :next() - if not lx :is_keyword (kw, e) then - M.parse_error( - lx, "A keyword was expected, probably `%s'.", e) - end - elseif M.is_parser (e) then - table.insert (r, e(lx)) - else -- Invalid parser definition, this is *not* a parsing error - error(string.format( - "Sequence `%s': element #%i is neither a string nor a parser: %s", - p.name, i, pp.tostring(e))) - end - end - return r -end - -------------------------------------------------------------------------------- --- Parse a multisequence, without applying multisequence transformers. --- The sequences are completely parsed. -------------------------------------------------------------------------------- -local function raw_parse_multisequence (lx, sequence_table, default) - local seq_parser = sequence_table[lx:is_keyword(lx:peek())] - if seq_parser then return seq_parser (lx) - elseif default then return default (lx) - else return false end -end - -------------------------------------------------------------------------------- --- Applies all transformers listed in parser on ast. -------------------------------------------------------------------------------- -local function transform (ast, parser, fli, lli) - if parser.transformers then - for _, t in ipairs (parser.transformers) do ast = t(ast) or ast end - end - if type(ast) == 'table' then - local ali = ast.lineinfo - if not ali or ali.first~=fli or ali.last~=lli then - ast.lineinfo = lexer.new_lineinfo(fli, lli) - end - end - return ast -end - -------------------------------------------------------------------------------- --- Generate a tracable parsing error (not implemented yet) -------------------------------------------------------------------------------- -function M.parse_error(lx, fmt, ...) - local li = lx:lineinfo_left() - local file, line, column, offset, positions - if li then - file, line, column, offset = li.source, li.line, li.column, li.offset - positions = { first = li, last = li } - else - line, column, offset = -1, -1, -1 - end - - local msg = string.format("line %i, char %i: "..fmt, line, column, ...) - if file and file~='?' then msg = "file "..file..", "..msg end - - local src = lx.src - if offset>0 and src then - local i, j = offset, offset - while src:sub(i,i) ~= '\n' and i>=0 do i=i-1 end - while src:sub(j,j) ~= '\n' and j<=#src do j=j+1 end - local srcline = src:sub (i+1, j-1) - local idx = string.rep (" ", column).."^" - msg = string.format("%s\n>>> %s\n>>> %s", msg, srcline, idx) - end - --lx :kill() - error(msg) -end - -------------------------------------------------------------------------------- --- --- Sequence parser generator --- -------------------------------------------------------------------------------- --- Input fields: --- --- * [builder]: how to build an AST out of sequence parts. let [x] be the list --- of subparser results (keywords are simply omitted). [builder] can be: --- - [nil], in which case the result of parsing is simply [x] --- - a string, which is then put as a tag on [x] --- - a function, which takes [x] as a parameter and returns an AST. --- --- * [name]: the name of the parser. Used for debug messages --- --- * [transformers]: a list of AST->AST functions, applied in order on ASTs --- returned by the parser. --- --- * Table-part entries corresponds to keywords (strings) and subparsers --- (function and callable objects). --- --- After creation, the following fields are added: --- * [parse] the parsing function lexer->AST --- * [kind] == "sequence" --- * [name] is set, if it wasn't in the input. --- -------------------------------------------------------------------------------- -function M.sequence (p) - M.make_parser ("sequence", p) - - ------------------------------------------------------------------- - -- Parsing method - ------------------------------------------------------------------- - function p:parse (lx) - - -- Raw parsing: - local fli = lx:lineinfo_right() - local seq = raw_parse_sequence (lx, self) - local lli = lx:lineinfo_left() - - -- Builder application: - local builder, tb = self.builder, type (self.builder) - if tb == "string" then seq.tag = builder - elseif tb == "function" or builder and builder.__call then seq = builder(seq) - elseif builder == nil then -- nothing - else error ("Invalid builder of type "..tb.." in sequence") end - seq = transform (seq, self, fli, lli) - assert (not seq or seq.lineinfo) - return seq - end - - ------------------------------------------------------------------- - -- Construction - ------------------------------------------------------------------- - -- Try to build a proper name - if p.name then - -- don't touch existing name - elseif type(p[1])=="string" then -- find name based on 1st keyword - if #p==1 then p.name=p[1] - elseif type(p[#p])=="string" then - p.name = p[1] .. " ... " .. p[#p] - else p.name = p[1] .. " ..." end - else -- can't find a decent name - p.name = "unnamed_sequence" - end - - return p -end -- - - -------------------------------------------------------------------------------- --- --- Multiple, keyword-driven, sequence parser generator --- -------------------------------------------------------------------------------- --- in [p], useful fields are: --- --- * [transformers]: as usual --- --- * [name]: as usual --- --- * Table-part entries must be sequence parsers, or tables which can --- be turned into a sequence parser by [gg.sequence]. These --- sequences must start with a keyword, and this initial keyword --- must be different for each sequence. The table-part entries will --- be removed after [gg.multisequence] returns. --- --- * [default]: the parser to run if the next keyword in the lexer is --- none of the registered initial keywords. If there's no default --- parser and no suitable initial keyword, the multisequence parser --- simply returns [false]. --- --- After creation, the following fields are added: --- --- * [parse] the parsing function lexer->AST --- --- * [sequences] the table of sequences, indexed by initial keywords. --- --- * [add] method takes a sequence parser or a config table for --- [gg.sequence], and adds/replaces the corresponding sequence --- parser. If the keyword was already used, the former sequence is --- removed and a warning is issued. --- --- * [get] method returns a sequence by its initial keyword --- --- * [kind] == "multisequence" --- -------------------------------------------------------------------------------- -function M.multisequence (p) - M.make_parser ("multisequence", p) - - ------------------------------------------------------------------- - -- Add a sequence (might be just a config table for [gg.sequence]) - ------------------------------------------------------------------- - function p :add (s) - -- compile if necessary: - local keyword = type(s)=='table' and s[1] - if type(s)=='table' and not M.is_parser(s) then M.sequence(s) end - if M.is_parser(s)~='sequence' or type(keyword)~='string' then - if self.default then -- two defaults - error ("In a multisequence parser, all but one sequences ".. - "must start with a keyword") - else self.default = s end -- first default - else - if self.sequences[keyword] then -- duplicate keyword - -- TODO: warn that initial keyword `keyword` is overloaded in multiseq - end - self.sequences[keyword] = s - end - end -- - - ------------------------------------------------------------------- - -- Get the sequence starting with this keyword. [kw :: string] - ------------------------------------------------------------------- - function p :get (kw) return self.sequences [kw] end - - ------------------------------------------------------------------- - -- Remove the sequence starting with keyword [kw :: string] - ------------------------------------------------------------------- - function p :del (kw) - if not self.sequences[kw] then - -- TODO: warn that we try to delete a non-existent entry - end - local removed = self.sequences[kw] - self.sequences[kw] = nil - return removed - end - - ------------------------------------------------------------------- - -- Parsing method - ------------------------------------------------------------------- - function p :parse (lx) - local fli = lx:lineinfo_right() - local x = raw_parse_multisequence (lx, self.sequences, self.default) - local lli = lx:lineinfo_left() - return transform (x, self, fli, lli) - end - - ------------------------------------------------------------------- - -- Construction - ------------------------------------------------------------------- - -- Register the sequences passed to the constructor. They're going - -- from the array part of the parser to the hash part of field - -- [sequences] - p.sequences = { } - for i=1, #p do p :add (p[i]); p[i] = nil end - - -- FIXME: why is this commented out? - --if p.default and not is_parser(p.default) then sequence(p.default) end - return p -end -- - - -------------------------------------------------------------------------------- --- --- Expression parser generator --- -------------------------------------------------------------------------------- --- --- Expression configuration relies on three tables: [prefix], [infix] --- and [suffix]. Moreover, the primary parser can be replaced by a --- table: in this case the [primary] table will be passed to --- [gg.multisequence] to create a parser. --- --- Each of these tables is a modified multisequence parser: the --- differences with respect to regular multisequence config tables are: --- --- * the builder takes specific parameters: --- - for [prefix], it takes the result of the prefix sequence parser, --- and the prefixed expression --- - for [infix], it takes the left-hand-side expression, the results --- of the infix sequence parser, and the right-hand-side expression. --- - for [suffix], it takes the suffixed expression, and the result --- of the suffix sequence parser. --- --- * the default field is a list, with parameters: --- - [parser] the raw parsing function --- - [transformers], as usual --- - [prec], the operator's precedence --- - [assoc] for [infix] table, the operator's associativity, which --- can be "left", "right" or "flat" (default to left) --- --- In [p], useful fields are: --- * [transformers]: as usual --- * [name]: as usual --- * [primary]: the atomic expression parser, or a multisequence config --- table (mandatory) --- * [prefix]: prefix operators config table, see above. --- * [infix]: infix operators config table, see above. --- * [suffix]: suffix operators config table, see above. --- --- After creation, these fields are added: --- * [kind] == "expr" --- * [parse] as usual --- * each table is turned into a multisequence, and therefore has an --- [add] method --- -------------------------------------------------------------------------------- -function M.expr (p) - M.make_parser ("expr", p) - - ------------------------------------------------------------------- - -- parser method. - -- In addition to the lexer, it takes an optional precedence: - -- it won't read expressions whose precedence is lower or equal - -- to [prec]. - ------------------------------------------------------------------- - function p :parse (lx, prec) - prec = prec or 0 - - ------------------------------------------------------ - -- Extract the right parser and the corresponding - -- options table, for (pre|in|suff)fix operators. - -- Options include prec, assoc, transformers. - ------------------------------------------------------ - local function get_parser_info (tab) - local p2 = tab :get (lx :is_keyword (lx :peek())) - if p2 then -- keyword-based sequence found - local function parser(lx) return raw_parse_sequence(lx, p2) end - return parser, p2 - else -- Got to use the default parser - local d = tab.default - if d then return d.parse or d.parser, d - else return false, false end - end - end - - ------------------------------------------------------ - -- Look for a prefix sequence. Multiple prefixes are - -- handled through the recursive [p.parse] call. - -- Notice the double-transform: one for the primary - -- expr, and one for the one with the prefix op. - ------------------------------------------------------ - local function handle_prefix () - local fli = lx :lineinfo_right() - local p2_func, p2 = get_parser_info (self.prefix) - local op = p2_func and p2_func (lx) - if op then -- Keyword-based sequence found - local ili = lx :lineinfo_right() -- Intermediate LineInfo - local e = p2.builder (op, self :parse (lx, p2.prec)) - local lli = lx :lineinfo_left() - return transform (transform (e, p2, ili, lli), self, fli, lli) - else -- No prefix found, get a primary expression - local e = self.primary(lx) - local lli = lx :lineinfo_left() - return transform (e, self, fli, lli) - end - end -- - - ------------------------------------------------------ - -- Look for an infix sequence+right-hand-side operand. - -- Return the whole binary expression result, - -- or false if no operator was found. - ------------------------------------------------------ - local function handle_infix (e) - local p2_func, p2 = get_parser_info (self.infix) - if not p2 then return false end - - ----------------------------------------- - -- Handle flattening operators: gather all operands - -- of the series in [list]; when a different operator - -- is found, stop, build from [list], [transform] and - -- return. - ----------------------------------------- - if (not p2.prec or p2.prec>prec) and p2.assoc=="flat" then - local fli = lx:lineinfo_right() - local pflat, list = p2, { e } - repeat - local op = p2_func(lx) - if not op then break end - table.insert (list, self:parse (lx, p2.prec)) - local _ -- We only care about checking that p2==pflat - _, p2 = get_parser_info (self.infix) - until p2 ~= pflat - local e2 = pflat.builder (list) - local lli = lx:lineinfo_left() - return transform (transform (e2, pflat, fli, lli), self, fli, lli) - - ----------------------------------------- - -- Handle regular infix operators: [e] the LHS is known, - -- just gather the operator and [e2] the RHS. - -- Result goes in [e3]. - ----------------------------------------- - elseif p2.prec and p2.prec>prec or - p2.prec==prec and p2.assoc=="right" then - local fli = e.lineinfo.first -- lx:lineinfo_right() - local op = p2_func(lx) - if not op then return false end - local e2 = self:parse (lx, p2.prec) - local e3 = p2.builder (e, op, e2) - local lli = lx:lineinfo_left() - return transform (transform (e3, p2, fli, lli), self, fli, lli) - - ----------------------------------------- - -- Check for non-associative operators, and complain if applicable. - ----------------------------------------- - elseif p2.assoc=="none" and p2.prec==prec then - M.parse_error (lx, "non-associative operator!") - - ----------------------------------------- - -- No infix operator suitable at that precedence - ----------------------------------------- - else return false end - - end -- - - ------------------------------------------------------ - -- Look for a suffix sequence. - -- Return the result of suffix operator on [e], - -- or false if no operator was found. - ------------------------------------------------------ - local function handle_suffix (e) - -- FIXME bad fli, must take e.lineinfo.first - local p2_func, p2 = get_parser_info (self.suffix) - if not p2 then return false end - if not p2.prec or p2.prec>=prec then - --local fli = lx:lineinfo_right() - local fli = e.lineinfo.first - local op = p2_func(lx) - if not op then return false end - local lli = lx:lineinfo_left() - e = p2.builder (e, op) - e = transform (transform (e, p2, fli, lli), self, fli, lli) - return e - end - return false - end -- - - ------------------------------------------------------ - -- Parser body: read suffix and (infix+operand) - -- extensions as long as we're able to fetch more at - -- this precedence level. - ------------------------------------------------------ - local e = handle_prefix() - repeat - local x = handle_suffix (e); e = x or e - local y = handle_infix (e); e = y or e - until not (x or y) - - -- No transform: it already happened in operators handling - return e - end -- - - ------------------------------------------------------------------- - -- Construction - ------------------------------------------------------------------- - if not p.primary then p.primary=p[1]; p[1]=nil end - for _, t in ipairs{ "primary", "prefix", "infix", "suffix" } do - if not p[t] then p[t] = { } end - if not M.is_parser(p[t]) then M.multisequence(p[t]) end - end - function p:add(...) return self.primary:add(...) end - return p -end -- - - -------------------------------------------------------------------------------- --- --- List parser generator --- -------------------------------------------------------------------------------- --- In [p], the following fields can be provided in input: --- --- * [builder]: takes list of subparser results, returns AST --- * [transformers]: as usual --- * [name]: as usual --- --- * [terminators]: list of strings representing the keywords which --- might mark the end of the list. When non-empty, the list is --- allowed to be empty. A string is treated as a single-element --- table, whose element is that string, e.g. ["do"] is the same as --- [{"do"}]. --- --- * [separators]: list of strings representing the keywords which can --- separate elements of the list. When non-empty, one of these --- keyword has to be found between each element. Lack of a separator --- indicates the end of the list. A string is treated as a --- single-element table, whose element is that string, e.g. ["do"] --- is the same as [{"do"}]. If [terminators] is empty/nil, then --- [separators] has to be non-empty. --- --- After creation, the following fields are added: --- * [parse] the parsing function lexer->AST --- * [kind] == "list" --- -------------------------------------------------------------------------------- -function M.list (p) - M.make_parser ("list", p) - - ------------------------------------------------------------------- - -- Parsing method - ------------------------------------------------------------------- - function p :parse (lx) - - ------------------------------------------------------ - -- Used to quickly check whether there's a terminator - -- or a separator immediately ahead - ------------------------------------------------------ - local function peek_is_in (keywords) - return keywords and lx:is_keyword(lx:peek(), unpack(keywords)) end - - local x = { } - local fli = lx :lineinfo_right() - - -- if there's a terminator to start with, don't bother trying - local is_empty_list = self.terminators and (peek_is_in (self.terminators) or lx:peek().tag=="Eof") - if not is_empty_list then - repeat - local item = self.primary(lx) - table.insert (x, item) -- read one element - until - -- There's a separator list specified, and next token isn't in it. - -- Otherwise, consume it with [lx:next()] - self.separators and not(peek_is_in (self.separators) and lx:next()) or - -- Terminator token ahead - peek_is_in (self.terminators) or - -- Last reason: end of file reached - lx:peek().tag=="Eof" - end - - local lli = lx:lineinfo_left() - - -- Apply the builder. It can be a string, or a callable value, - -- or simply nothing. - local b = self.builder - if b then - if type(b)=="string" then x.tag = b -- b is a string, use it as a tag - elseif type(b)=="function" then x=b(x) - else - local bmt = getmetatable(b) - if bmt and bmt.__call then x=b(x) end - end - end - return transform (x, self, fli, lli) - end -- - - ------------------------------------------------------------------- - -- Construction - ------------------------------------------------------------------- - if not p.primary then p.primary = p[1]; p[1] = nil end - if type(p.terminators) == "string" then p.terminators = { p.terminators } - elseif p.terminators and #p.terminators == 0 then p.terminators = nil end - if type(p.separators) == "string" then p.separators = { p.separators } - elseif p.separators and #p.separators == 0 then p.separators = nil end - - return p -end -- - - -------------------------------------------------------------------------------- --- --- Keyword-conditioned parser generator --- -------------------------------------------------------------------------------- --- --- Only apply a parser if a given keyword is found. The result of --- [gg.onkeyword] parser is the result of the subparser (modulo --- [transformers] applications). --- --- lineinfo: the keyword is *not* included in the boundaries of the --- resulting lineinfo. A review of all usages of gg.onkeyword() in the --- implementation of metalua has shown that it was the appropriate choice --- in every case. --- --- Input fields: --- --- * [name]: as usual --- --- * [transformers]: as usual --- --- * [peek]: if non-nil, the conditioning keyword is left in the lexeme --- stream instead of being consumed. --- --- * [primary]: the subparser. --- --- * [keywords]: list of strings representing triggering keywords. --- --- * Table-part entries can contain strings, and/or exactly one parser. --- Strings are put in [keywords], and the parser is put in [primary]. --- --- After the call, the following fields will be set: --- --- * [parse] the parsing method --- * [kind] == "onkeyword" --- * [primary] --- * [keywords] --- -------------------------------------------------------------------------------- -function M.onkeyword (p) - M.make_parser ("onkeyword", p) - - ------------------------------------------------------------------- - -- Parsing method - ------------------------------------------------------------------- - function p :parse (lx) - if lx :is_keyword (lx:peek(), unpack(self.keywords)) then - local fli = lx:lineinfo_right() - if not self.peek then lx:next() end - local content = self.primary (lx) - local lli = lx:lineinfo_left() - local li = content.lineinfo or { } - fli, lli = li.first or fli, li.last or lli - return transform (content, p, fli, lli) - else return false end - end - - ------------------------------------------------------------------- - -- Construction - ------------------------------------------------------------------- - if not p.keywords then p.keywords = { } end - for _, x in ipairs(p) do - if type(x)=="string" then table.insert (p.keywords, x) - else assert (not p.primary and M.is_parser (x)); p.primary = x end - end - assert (next (p.keywords), "Missing trigger keyword in gg.onkeyword") - assert (p.primary, 'no primary parser in gg.onkeyword') - return p -end -- - - -------------------------------------------------------------------------------- --- --- Optional keyword consummer pseudo-parser generator --- -------------------------------------------------------------------------------- --- --- This doesn't return a real parser, just a function. That function parses --- one of the keywords passed as parameters, and returns it. It returns --- [false] if no matching keyword is found. --- --- Notice that tokens returned by lexer already carry lineinfo, therefore --- there's no need to add them, as done usually through transform() calls. -------------------------------------------------------------------------------- -function M.optkeyword (...) - local args = {...} - if type (args[1]) == "table" then - assert (#args == 1) - args = args[1] - end - for _, v in ipairs(args) do assert (type(v)=="string") end - return function (lx) - local x = lx:is_keyword (lx:peek(), unpack (args)) - if x then lx:next(); return x - else return false end - end -end - - -------------------------------------------------------------------------------- --- --- Run a parser with a special lexer --- -------------------------------------------------------------------------------- --- --- This doesn't return a real parser, just a function. --- First argument is the lexer class to be used with the parser, --- 2nd is the parser itself. --- The resulting parser returns whatever the argument parser does. --- -------------------------------------------------------------------------------- -function M.with_lexer(new_lexer, parser) - - ------------------------------------------------------------------- - -- Most gg functions take their parameters in a table, so it's - -- better to silently accept when with_lexer{ } is called with - -- its arguments in a list: - ------------------------------------------------------------------- - if not parser and #new_lexer==2 and type(new_lexer[1])=='table' then - return M.with_lexer(unpack(new_lexer)) - end - - ------------------------------------------------------------------- - -- Save the current lexer, switch it for the new one, run the parser, - -- restore the previous lexer, even if the parser caused an error. - ------------------------------------------------------------------- - return function (lx) - local old_lexer = getmetatable(lx) - lx:sync() - setmetatable(lx, new_lexer) - local status, result = pcall(parser, lx) - lx:sync() - setmetatable(lx, old_lexer) - if status then return result else error(result) end - end -end - --------------------------------------------------------------------------------- --- --- Make sure a parser is used and returns successfully. --- --------------------------------------------------------------------------------- -function M.nonempty(primary) - local p = M.make_parser('non-empty list', { primary = primary, name=primary.name }) - function p :parse (lx) - local fli = lx:lineinfo_right() - local content = self.primary (lx) - local lli = lx:lineinfo_left() - local li = content.lineinfo or { } - fli, lli = li.first or fli, li.last or lli - if #content == 0 then - M.parse_error (lx, "`%s' must not be empty.", self.name or "list") - else - return transform (content, self, fli, lli) - end - end - return p -end - -local FUTURE_MT = { } -function FUTURE_MT:__tostring() return "" end -function FUTURE_MT:__newindex(key, value) error "don't write in futures" end -function FUTURE_MT :__index (parser_name) - return function(...) - local p, m = rawget(self, '__path'), self.__module - if p then for _, name in ipairs(p) do - m=rawget(m, name) - if not m then error ("Submodule '"..name.."' undefined") end - end end - local f = rawget(m, parser_name) - if not f then error ("Parser '"..parser_name.."' undefined") end - return f(...) - end -end - -function M.future(module, ...) - checks('table') - local path = ... and {...} - if path then for _, x in ipairs(path) do - assert(type(x)=='string', "Bad future arg") - end end - local self = { __module = module, - __path = path } - return setmetatable(self, FUTURE_MT) -end - -return M diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/grammar/lexer.lua b/Utils/luarocks/systree/share/lua/5.1/metalua/grammar/lexer.lua deleted file mode 100644 index 0f96f8edf..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/grammar/lexer.lua +++ /dev/null @@ -1,672 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- -------------------------------------------------------------------------------- - -local checks = require 'checks' - -local M = { } - -local lexer = { alpha={ }, sym={ } } -lexer.__index=lexer -lexer.__type='lexer.stream' - -M.lexer = lexer - - -local debugf = function() end --- local debugf=printf - ----------------------------------------------------------------------- --- Some locale settings produce bad results, e.g. French locale --- expect float numbers to use commas instead of periods. --- TODO: change number parser into something loclae-independent, --- locales are nasty. ----------------------------------------------------------------------- -os.setlocale('C') - -local MT = { } - -M.metatables=MT - ----------------------------------------------------------------------- --- Create a new metatable, for a new class of objects. ----------------------------------------------------------------------- -local function new_metatable(name) - local mt = { __type = 'lexer.'..name }; - mt.__index = mt - MT[name] = mt -end - - ----------------------------------------------------------------------- --- Position: represent a point in a source file. ----------------------------------------------------------------------- -new_metatable 'position' - -local position_idx=1 - -function M.new_position(line, column, offset, source) - checks('number', 'number', 'number', 'string') - local id = position_idx; position_idx = position_idx+1 - return setmetatable({line=line, column=column, offset=offset, - source=source, id=id}, MT.position) -end - -function MT.position :__tostring() - return string.format("<%s%s|L%d|C%d|K%d>", - self.comments and "C|" or "", - self.source, self.line, self.column, self.offset) -end - - - ----------------------------------------------------------------------- --- Position factory: convert offsets into line/column/offset positions. ----------------------------------------------------------------------- -new_metatable 'position_factory' - -function M.new_position_factory(src, src_name) - -- assert(type(src)=='string') - -- assert(type(src_name)=='string') - local lines = { 1 } - for offset in src :gmatch '\n()' do table.insert(lines, offset) end - local max = #src+1 - table.insert(lines, max+1) -- +1 includes Eof - return setmetatable({ src_name=src_name, line2offset=lines, max=max }, - MT.position_factory) -end - -function MT.position_factory :get_position (offset) - -- assert(type(offset)=='number') - assert(offset<=self.max) - local line2offset = self.line2offset - local left = self.last_left or 1 - if offset", - fli.comments and "C|" or "", - fli.source, line, column, offset, - lli.comments and "|C" or "") -end - ----------------------------------------------------------------------- --- Token: atomic Lua language element, with a category, a content, --- and some lineinfo relating it to its original source. ----------------------------------------------------------------------- -new_metatable 'token' - -function M.new_token(tag, content, lineinfo) - --printf("TOKEN `%s{ %q, lineinfo = %s} boundaries %d, %d", - -- tag, content, tostring(lineinfo), lineinfo.first.id, lineinfo.last.id) - return setmetatable({tag=tag, lineinfo=lineinfo, content}, MT.token) -end - -function MT.token :__tostring() - --return string.format("`%s{ %q, %s }", self.tag, self[1], tostring(self.lineinfo)) - return string.format("`%s %q", self.tag, self[1]) -end - - ----------------------------------------------------------------------- --- Comment: series of comment blocks with associated lineinfo. --- To be attached to the tokens just before and just after them. ----------------------------------------------------------------------- -new_metatable 'comment' - -function M.new_comment(lines) - local first = lines[1].lineinfo.first - local last = lines[#lines].lineinfo.last - local lineinfo = M.new_lineinfo(first, last) - return setmetatable({lineinfo=lineinfo, unpack(lines)}, MT.comment) -end - -function MT.comment :text() - local last_line = self[1].lineinfo.last.line - local acc = { } - for i, line in ipairs(self) do - local nreturns = line.lineinfo.first.line - last_line - table.insert(acc, ("\n"):rep(nreturns)) - table.insert(acc, line[1]) - end - return table.concat(acc) -end - -function M.new_comment_line(text, lineinfo, nequals) - checks('string', 'lexer.lineinfo', '?number') - return { lineinfo = lineinfo, text, nequals } -end - - - ----------------------------------------------------------------------- --- Patterns used by [lexer :extract] to decompose the raw string into --- correctly tagged tokens. ----------------------------------------------------------------------- -lexer.patterns = { - spaces = "^[ \r\n\t]*()", - short_comment = "^%-%-([^\n]*)\n?()", - --final_short_comment = "^%-%-([^\n]*)()$", - long_comment = "^%-%-%[(=*)%[\n?(.-)%]%1%]()", - long_string = "^%[(=*)%[\n?(.-)%]%1%]()", - number_mantissa = { "^%d+%.?%d*()", "^%d*%.%d+()" }, - number_mantissa_hex = { "^%x+%.?%x*()", "^%x*%.%x+()" }, --Lua5.1 and Lua5.2 - number_exponant = "^[eE][%+%-]?%d+()", - number_exponant_hex = "^[pP][%+%-]?%d+()", --Lua5.2 - number_hex = "^0[xX]()", - word = "^([%a_][%w_]*)()" -} - ----------------------------------------------------------------------- --- unescape a whole string, applying [unesc_digits] and --- [unesc_letter] as many times as required. ----------------------------------------------------------------------- -local function unescape_string (s) - - -- Turn the digits of an escape sequence into the corresponding - -- character, e.g. [unesc_digits("123") == string.char(123)]. - local function unesc_digits (backslashes, digits) - if #backslashes%2==0 then - -- Even number of backslashes, they escape each other, not the digits. - -- Return them so that unesc_letter() can treat them - return backslashes..digits - else - -- Remove the odd backslash, which escapes the number sequence. - -- The rest will be returned and parsed by unesc_letter() - backslashes = backslashes :sub (1,-2) - end - local k, j, i = digits :reverse() :byte(1, 3) - local z = string.byte "0" - local code = (k or z) + 10*(j or z) + 100*(i or z) - 111*z - if code > 255 then - error ("Illegal escape sequence '\\"..digits.. - "' in string: ASCII codes must be in [0..255]") - end - local c = string.char (code) - if c == '\\' then c = '\\\\' end -- parsed by unesc_letter (test: "\092b" --> "\\b") - return backslashes..c - end - - -- Turn hex digits of escape sequence into char. - local function unesc_hex(backslashes, digits) - if #backslashes%2==0 then - return backslashes..'x'..digits - else - backslashes = backslashes :sub (1,-2) - end - local c = string.char(tonumber(digits,16)) - if c == '\\' then c = '\\\\' end -- parsed by unesc_letter (test: "\x5cb" --> "\\b") - return backslashes..c - end - - -- Handle Lua 5.2 \z sequences - local function unesc_z(backslashes, more) - if #backslashes%2==0 then - return backslashes..more - else - return backslashes :sub (1,-2) - end - end - - -- Take a letter [x], and returns the character represented by the - -- sequence ['\\'..x], e.g. [unesc_letter "n" == "\n"]. - local function unesc_letter(x) - local t = { - a = "\a", b = "\b", f = "\f", - n = "\n", r = "\r", t = "\t", v = "\v", - ["\\"] = "\\", ["'"] = "'", ['"'] = '"', ["\n"] = "\n" } - return t[x] or x - end - - s = s: gsub ("(\\+)(z%s*)", unesc_z) -- Lua 5.2 - s = s: gsub ("(\\+)([0-9][0-9]?[0-9]?)", unesc_digits) - s = s: gsub ("(\\+)x([0-9a-fA-F][0-9a-fA-F])", unesc_hex) -- Lua 5.2 - s = s: gsub ("\\(%D)",unesc_letter) - return s -end - -lexer.extractors = { - "extract_long_comment", "extract_short_comment", - "extract_short_string", "extract_word", "extract_number", - "extract_long_string", "extract_symbol" } - - - ----------------------------------------------------------------------- --- Really extract next token from the raw string --- (and update the index). --- loc: offset of the position just after spaces and comments --- previous_i: offset in src before extraction began ----------------------------------------------------------------------- -function lexer :extract () - local attached_comments = { } - local function gen_token(...) - local token = M.new_token(...) - if #attached_comments>0 then -- attach previous comments to token - local comments = M.new_comment(attached_comments) - token.lineinfo.first.comments = comments - if self.lineinfo_last_extracted then - self.lineinfo_last_extracted.comments = comments - end - attached_comments = { } - end - token.lineinfo.first.facing = self.lineinfo_last_extracted - self.lineinfo_last_extracted.facing = assert(token.lineinfo.first) - self.lineinfo_last_extracted = assert(token.lineinfo.last) - return token - end - while true do -- loop until a non-comment token is found - - -- skip whitespaces - self.i = self.src:match (self.patterns.spaces, self.i) - if self.i>#self.src then - local fli = self.posfact :get_position (#self.src+1) - local lli = self.posfact :get_position (#self.src+1) -- ok? - local tok = gen_token("Eof", "eof", M.new_lineinfo(fli, lli)) - tok.lineinfo.last.facing = lli - return tok - end - local i_first = self.i -- loc = position after whitespaces - - -- try every extractor until a token is found - for _, extractor in ipairs(self.extractors) do - local tag, content, xtra = self [extractor] (self) - if tag then - local fli = self.posfact :get_position (i_first) - local lli = self.posfact :get_position (self.i-1) - local lineinfo = M.new_lineinfo(fli, lli) - if tag=='Comment' then - local prev_comment = attached_comments[#attached_comments] - if not xtra -- new comment is short - and prev_comment and not prev_comment[2] -- prev comment is short - and prev_comment.lineinfo.last.line+1==fli.line then -- adjascent lines - -- concat with previous comment - prev_comment[1] = prev_comment[1].."\n"..content -- TODO quadratic, BAD! - prev_comment.lineinfo.last = lli - else -- accumulate comment - local comment = M.new_comment_line(content, lineinfo, xtra) - table.insert(attached_comments, comment) - end - break -- back to skipping spaces - else -- not a comment: real token, then - return gen_token(tag, content, lineinfo) - end -- if token is a comment - end -- if token found - end -- for each extractor - end -- while token is a comment -end -- :extract() - - - - ----------------------------------------------------------------------- --- Extract a short comment. ----------------------------------------------------------------------- -function lexer :extract_short_comment() - -- TODO: handle final_short_comment - local content, j = self.src :match (self.patterns.short_comment, self.i) - if content then self.i=j; return 'Comment', content, nil end -end - ----------------------------------------------------------------------- --- Extract a long comment. ----------------------------------------------------------------------- -function lexer :extract_long_comment() - local equals, content, j = self.src:match (self.patterns.long_comment, self.i) - if j then self.i = j; return "Comment", content, #equals end -end - ----------------------------------------------------------------------- --- Extract a '...' or "..." short string. ----------------------------------------------------------------------- -function lexer :extract_short_string() - local k = self.src :sub (self.i,self.i) -- first char - if k~=[[']] and k~=[["]] then return end -- no match' - local i = self.i + 1 - local j = i - while true do - local x,y; x, j, y = self.src :match ("([\\\r\n"..k.."])()(.?)", j) -- next interesting char - if x == '\\' then - if y == 'z' then -- Lua 5.2 \z - j = self.src :match ("^%s*()", j+1) - else - j=j+1 -- escaped char - end - elseif x == k then break -- end of string - else - assert (not x or x=='\r' or x=='\n') - return nil, 'Unterminated string' - end - end - self.i = j - - return 'String', unescape_string (self.src :sub (i,j-2)) -end - ----------------------------------------------------------------------- --- Extract Id or Keyword. ----------------------------------------------------------------------- -function lexer :extract_word() - local word, j = self.src:match (self.patterns.word, self.i) - if word then - self.i = j - return (self.alpha [word] and 'Keyword' or 'Id'), word - end -end - ----------------------------------------------------------------------- --- Extract Number. ----------------------------------------------------------------------- -function lexer :extract_number() - local j = self.src:match(self.patterns.number_hex, self.i) - if j then - j = self.src:match (self.patterns.number_mantissa_hex[1], j) or - self.src:match (self.patterns.number_mantissa_hex[2], j) - if j then - j = self.src:match (self.patterns.number_exponant_hex, j) or j - end - else - j = self.src:match (self.patterns.number_mantissa[1], self.i) or - self.src:match (self.patterns.number_mantissa[2], self.i) - if j then - j = self.src:match (self.patterns.number_exponant, j) or j - end - end - if not j then return end - -- Number found, interpret with tonumber() and return it - local str = self.src:sub (self.i, j-1) - -- :TODO: tonumber on Lua5.2 floating hex may or may not work on Lua5.1 - local n = tonumber (str) - if not n then error(str.." is not a valid number according to tonumber()") end - self.i = j - return 'Number', n -end - ----------------------------------------------------------------------- --- Extract long string. ----------------------------------------------------------------------- -function lexer :extract_long_string() - local _, content, j = self.src :match (self.patterns.long_string, self.i) - if j then self.i = j; return 'String', content end -end - ----------------------------------------------------------------------- --- Extract symbol. ----------------------------------------------------------------------- -function lexer :extract_symbol() - local k = self.src:sub (self.i,self.i) - local symk = self.sym [k] -- symbols starting with `k` - if not symk then - self.i = self.i + 1 - return 'Keyword', k - end - for _, sym in pairs (symk) do - if sym == self.src:sub (self.i, self.i + #sym - 1) then - self.i = self.i + #sym - return 'Keyword', sym - end - end - self.i = self.i+1 - return 'Keyword', k -end - ----------------------------------------------------------------------- --- Add a keyword to the list of keywords recognized by the lexer. ----------------------------------------------------------------------- -function lexer :add (w, ...) - assert(not ..., "lexer :add() takes only one arg, although possibly a table") - if type (w) == "table" then - for _, x in ipairs (w) do self :add (x) end - else - if w:match (self.patterns.word .. "$") then self.alpha [w] = true - elseif w:match "^%p%p+$" then - local k = w:sub(1,1) - local list = self.sym [k] - if not list then list = { }; self.sym [k] = list end - table.insert (list, w) - elseif w:match "^%p$" then return - else error "Invalid keyword" end - end -end - ----------------------------------------------------------------------- --- Return the [n]th next token, without consuming it. --- [n] defaults to 1. If it goes pass the end of the stream, an EOF --- token is returned. ----------------------------------------------------------------------- -function lexer :peek (n) - if not n then n=1 end - if n > #self.peeked then - for i = #self.peeked+1, n do - self.peeked [i] = self :extract() - end - end - return self.peeked [n] -end - ----------------------------------------------------------------------- --- Return the [n]th next token, removing it as well as the 0..n-1 --- previous tokens. [n] defaults to 1. If it goes pass the end of the --- stream, an EOF token is returned. ----------------------------------------------------------------------- -function lexer :next (n) - n = n or 1 - self :peek (n) - local a - for i=1,n do - a = table.remove (self.peeked, 1) - -- TODO: is this used anywhere? I think not. a.lineinfo.last may be nil. - --self.lastline = a.lineinfo.last.line - end - self.lineinfo_last_consumed = a.lineinfo.last - return a -end - ----------------------------------------------------------------------- --- Returns an object which saves the stream's current state. ----------------------------------------------------------------------- --- FIXME there are more fields than that to save -function lexer :save () return { self.i; {unpack(self.peeked) } } end - ----------------------------------------------------------------------- --- Restore the stream's state, as saved by method [save]. ----------------------------------------------------------------------- --- FIXME there are more fields than that to restore -function lexer :restore (s) self.i=s[1]; self.peeked=s[2] end - ----------------------------------------------------------------------- --- Resynchronize: cancel any token in self.peeked, by emptying the --- list and resetting the indexes ----------------------------------------------------------------------- -function lexer :sync() - local p1 = self.peeked[1] - if p1 then - local li_first = p1.lineinfo.first - if li_first.comments then li_first=li_first.comments.lineinfo.first end - self.i = li_first.offset - self.column_offset = self.i - li_first.column - self.peeked = { } - self.attached_comments = p1.lineinfo.first.comments or { } - end -end - ----------------------------------------------------------------------- --- Take the source and offset of an old lexer. ----------------------------------------------------------------------- -function lexer :takeover(old) - self :sync(); old :sync() - for _, field in ipairs{ 'i', 'src', 'attached_comments', 'posfact' } do - self[field] = old[field] - end - return self -end - ----------------------------------------------------------------------- --- Return the current position in the sources. This position is between --- two tokens, and can be within a space / comment area, and therefore --- have a non-null width. :lineinfo_left() returns the beginning of the --- separation area, :lineinfo_right() returns the end of that area. --- --- ____ last consummed token ____ first unconsummed token --- / / --- XXXXX YYYYY --- \____ \____ --- :lineinfo_left() :lineinfo_right() ----------------------------------------------------------------------- -function lexer :lineinfo_right() - return self :peek(1).lineinfo.first -end - -function lexer :lineinfo_left() - return self.lineinfo_last_consumed -end - ----------------------------------------------------------------------- --- Create a new lexstream. ----------------------------------------------------------------------- -function lexer :newstream (src_or_stream, name) - name = name or "?" - if type(src_or_stream)=='table' then -- it's a stream - return setmetatable ({ }, self) :takeover (src_or_stream) - elseif type(src_or_stream)=='string' then -- it's a source string - local src = src_or_stream - local pos1 = M.new_position(1, 1, 1, name) - local stream = { - src_name = name; -- Name of the file - src = src; -- The source, as a single string - peeked = { }; -- Already peeked, but not discarded yet, tokens - i = 1; -- Character offset in src - attached_comments = { },-- comments accumulator - lineinfo_last_extracted = pos1, - lineinfo_last_consumed = pos1, - posfact = M.new_position_factory (src_or_stream, name) - } - setmetatable (stream, self) - - -- Skip initial sharp-bang for Unix scripts - -- FIXME: redundant with mlp.chunk() - if src and src :match "^#!" then - local endofline = src :find "\n" - stream.i = endofline and (endofline + 1) or #src - end - return stream - else - assert(false, ":newstream() takes a source string or a stream, not a ".. - type(src_or_stream)) - end -end - ----------------------------------------------------------------------- --- If there's no ... args, return the token a (whose truth value is --- true) if it's a `Keyword{ }, or nil. If there are ... args, they --- have to be strings. if the token a is a keyword, and it's content --- is one of the ... args, then returns it (it's truth value is --- true). If no a keyword or not in ..., return nil. ----------------------------------------------------------------------- -function lexer :is_keyword (a, ...) - if not a or a.tag ~= "Keyword" then return false end - local words = {...} - if #words == 0 then return a[1] end - for _, w in ipairs (words) do - if w == a[1] then return w end - end - return false -end - ----------------------------------------------------------------------- --- Cause an error if the next token isn't a keyword whose content --- is listed among ... args (which have to be strings). ----------------------------------------------------------------------- -function lexer :check (...) - local words = {...} - local a = self :next() - local function err () - error ("Got " .. tostring (a) .. - ", expected one of these keywords : '" .. - table.concat (words,"', '") .. "'") end - if not a or a.tag ~= "Keyword" then err () end - if #words == 0 then return a[1] end - for _, w in ipairs (words) do - if w == a[1] then return w end - end - err () -end - ----------------------------------------------------------------------- --- ----------------------------------------------------------------------- -function lexer :clone() - local alpha_clone, sym_clone = { }, { } - for word in pairs(self.alpha) do alpha_clone[word]=true end - for letter, list in pairs(self.sym) do sym_clone[letter] = { unpack(list) } end - local clone = { alpha=alpha_clone, sym=sym_clone } - setmetatable(clone, self) - clone.__index = clone - return clone -end - ----------------------------------------------------------------------- --- Cancel everything left in a lexer, all subsequent attempts at --- `:peek()` or `:next()` will return `Eof`. ----------------------------------------------------------------------- -function lexer :kill() - self.i = #self.src+1 - self.peeked = { } - self.attached_comments = { } - self.lineinfo_last = self.posfact :get_position (#self.src+1) -end - -return M diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/loader.lua b/Utils/luarocks/systree/share/lua/5.1/metalua/loader.lua deleted file mode 100644 index e535fef32..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/loader.lua +++ /dev/null @@ -1,133 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- --------------------------------------------------------------------------------- - -local M = require "package" -- extend Lua's basic "package" module -local checks = require 'checks' - -M.metalua_extension_prefix = 'metalua.extension.' - --- Initialize package.mpath from package.path -M.mpath = M.mpath or os.getenv 'LUA_MPATH' or - (M.path..";") :gsub("%.(lua[:;])", ".m%1") :sub(1, -2) - -M.mcache = M.mcache or os.getenv 'LUA_MCACHE' - ----------------------------------------------------------------------- --- resc(k) returns "%"..k if it's a special regular expression char, --- or just k if it's normal. ----------------------------------------------------------------------- -local regexp_magic = { } -for k in ("^$()%.[]*+-?") :gmatch "." do regexp_magic[k]="%"..k end - -local function resc(k) return regexp_magic[k] or k end - ----------------------------------------------------------------------- --- Take a Lua module name, return the open file and its name, --- or and an error message. ----------------------------------------------------------------------- -function M.findfile(name, path_string) - local config_regexp = ("([^\n])\n"):rep(5):sub(1, -2) - local dir_sep, path_sep, path_mark, execdir, igmark = - M.config :match (config_regexp) - name = name:gsub ('%.', dir_sep) - local errors = { } - local path_pattern = string.format('[^%s]+', resc(path_sep)) - for path in path_string:gmatch (path_pattern) do - --printf('path = %s, rpath_mark=%s, name=%s', path, resc(path_mark), name) - local filename = path:gsub (resc (path_mark), name) - --printf('filename = %s', filename) - local file = io.open (filename, 'rb') - if file then return file, filename end - table.insert(errors, string.format("\tno file %q", filename)) - end - return false, '\n'..table.concat(errors, "\n")..'\n' -end - ----------------------------------------------------------------------- --- Before compiling a metalua source module, try to find and load --- a more recent bytecode dump. Requires lfs ----------------------------------------------------------------------- -local function metalua_cache_loader(name, src_filename, src) - if not M.mcache:find('%?') then - -- This is highly suspicious... - print("WARNING: no '?' character in $LUA_MCACHE/package.mcache") - end - local mlc = require 'metalua.compiler'.new() - local lfs = require 'lfs' - local dir_sep = M.config:sub(1,1) - local dst_filename = M.mcache :gsub ('%?', (name:gsub('%.', dir_sep))) - local src_a = lfs.attributes(src_filename) - local src_date = src_a and src_a.modification or 0 - local dst_a = lfs.attributes(dst_filename) - local dst_date = dst_a and dst_a.modification or 0 - local delta = dst_date - src_date - local bytecode, file, msg - if delta <= 0 then - --print ("(need to recompile "..src_filename.." into "..dst_filename..")") - bytecode = mlc :src_to_bytecode (src, '@'..src_filename) - for x in dst_filename :gmatch('()'..dir_sep) do - lfs.mkdir(dst_filename:sub(1,x)) - end - file, msg = io.open(dst_filename, 'wb') - if not file then error(msg) end - file :write (bytecode) - file :close() - else - file, msg = io.open(dst_filename, 'rb') - if not file then error(msg) end - bytecode = file :read '*a' - file :close() - end - return mlc :bytecode_to_function (bytecode, '@'..src_filename) -end - ----------------------------------------------------------------------- --- Load a metalua source file. ----------------------------------------------------------------------- -function M.metalua_loader (name) - local file, filename_or_msg = M.findfile (name, M.mpath) - if not file then return filename_or_msg end - local luastring = file:read '*a' - file:close() - if M.mcache and pcall(require, 'lfs') then - return metalua_cache_loader(name, filename_or_msg, luastring) - else return require 'metalua.compiler'.new() :src_to_function (luastring, '@'..filename_or_msg) end -end - - ----------------------------------------------------------------------- --- Placed after lua/luac loader, so precompiled files have --- higher precedence. ----------------------------------------------------------------------- -table.insert(M.loaders, M.metalua_loader) - ----------------------------------------------------------------------- --- Load an extension. ----------------------------------------------------------------------- -function extension (name, mlp) - local complete_name = M.metalua_extension_prefix..name - local extend_func = require (complete_name) - if not mlp.extensions[complete_name] then - local ast =extend_func(mlp) - mlp.extensions[complete_name] =extend_func - return ast - end -end - -return M diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/pprint.lua b/Utils/luarocks/systree/share/lua/5.1/metalua/pprint.lua deleted file mode 100644 index 73a842b63..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/pprint.lua +++ /dev/null @@ -1,295 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- ----------------------------------------------------------------------- - ----------------------------------------------------------------------- ----------------------------------------------------------------------- --- --- Lua objects pretty-printer --- ----------------------------------------------------------------------- ----------------------------------------------------------------------- - -local M = { } - -M.DEFAULT_CFG = { - hide_hash = false; -- Print the non-array part of tables? - metalua_tag = true; -- Use Metalua's backtick syntax sugar? - fix_indent = nil; -- If a number, number of indentation spaces; - -- If false, indent to the previous brace. - line_max = nil; -- If a number, tries to avoid making lines with - -- more than this number of chars. - initial_indent = 0; -- If a number, starts at this level of indentation - keywords = { }; -- Set of keywords which must not use Lua's field - -- shortcuts {["foo"]=...} -> {foo=...} -} - -local function valid_id(cfg, x) - if type(x) ~= "string" then return false end - if not x:match "^[a-zA-Z_][a-zA-Z0-9_]*$" then return false end - if cfg.keywords and cfg.keywords[x] then return false end - return true -end - -local __tostring_cache = setmetatable({ }, {__mode='k'}) - --- Retrieve the string produced by `__tostring` metamethod if present, --- return `false` otherwise. Cached in `__tostring_cache`. -local function __tostring(x) - local the_string = __tostring_cache[x] - if the_string~=nil then return the_string end - local mt = getmetatable(x) - if mt then - local __tostring = mt.__tostring - if __tostring then - the_string = __tostring(x) - __tostring_cache[x] = the_string - return the_string - end - end - if x~=nil then __tostring_cache[x] = false end -- nil is an illegal key - return false -end - -local xlen -- mutually recursive with `xlen_type` - -local xlen_cache = setmetatable({ }, {__mode='k'}) - --- Helpers for the `xlen` function -local xlen_type = { - ["nil"] = function ( ) return 3 end; - number = function (x) return #tostring(x) end; - boolean = function (x) return x and 4 or 5 end; - string = function (x) return #string.format("%q",x) end; -} - -function xlen_type.table (adt, cfg, nested) - local custom_string = __tostring(adt) - if custom_string then return #custom_string end - - -- Circular referenced objects are printed with the plain - -- `tostring` function in nested positions. - if nested [adt] then return #tostring(adt) end - nested [adt] = true - - local has_tag = cfg.metalua_tag and valid_id(cfg, adt.tag) - local alen = #adt - local has_arr = alen>0 - local has_hash = false - local x = 0 - - if not cfg.hide_hash then - -- first pass: count hash-part - for k, v in pairs(adt) do - if k=="tag" and has_tag then - -- this is the tag -> do nothing! - elseif type(k)=="number" and k<=alen and math.fmod(k,1)==0 and k>0 then - -- array-part pair -> do nothing! - else - has_hash = true - if valid_id(cfg, k) then x=x+#k - else x = x + xlen (k, cfg, nested) + 2 end -- count surrounding brackets - x = x + xlen (v, cfg, nested) + 5 -- count " = " and ", " - end - end - end - - for i = 1, alen do x = x + xlen (adt[i], nested) + 2 end -- count ", " - - nested[adt] = false -- No more nested calls - - if not (has_tag or has_arr or has_hash) then return 3 end - if has_tag then x=x+#adt.tag+1 end - if not (has_arr or has_hash) then return x end - if not has_hash and alen==1 and type(adt[1])~="table" then - return x-2 -- substract extraneous ", " - end - return x+2 -- count "{ " and " }", substract extraneous ", " -end - - --- Compute the number of chars it would require to display the table --- on a single line. Helps to decide whether some carriage returns are --- required. Since the size of each sub-table is required many times, --- it's cached in [xlen_cache]. -xlen = function (x, cfg, nested) - -- no need to compute length for 1-line prints - if not cfg.line_max then return 0 end - nested = nested or { } - if x==nil then return #"nil" end - local len = xlen_cache[x] - if len then return len end - local f = xlen_type[type(x)] - if not f then return #tostring(x) end - len = f (x, cfg, nested) - xlen_cache[x] = len - return len -end - -local function consider_newline(p, len) - if not p.cfg.line_max then return end - if p.current_offset + len <= p.cfg.line_max then return end - if p.indent < p.current_offset then - p:acc "\n"; p:acc ((" "):rep(p.indent)) - p.current_offset = p.indent - end -end - -local acc_value - -local acc_type = { - ["nil"] = function(p) p:acc("nil") end; - number = function(p, adt) p:acc (tostring (adt)) end; - string = function(p, adt) p:acc ((string.format ("%q", adt):gsub("\\\n", "\\n"))) end; - boolean = function(p, adt) p:acc (adt and "true" or "false") end } - --- Indentation: --- * if `cfg.fix_indent` is set to a number: --- * add this number of space for each level of depth --- * return to the line as soon as it flushes things further left --- * if not, tabulate to one space after the opening brace. --- * as a result, it never saves right-space to return before first element - -function acc_type.table(p, adt) - if p.nested[adt] then p:acc(tostring(adt)); return end - p.nested[adt] = true - - local has_tag = p.cfg.metalua_tag and valid_id(p.cfg, adt.tag) - local alen = #adt - local has_arr = alen>0 - local has_hash = false - - local previous_indent = p.indent - - if has_tag then p:acc("`"); p:acc(adt.tag) end - - local function indent(p) - if not p.cfg.fix_indent then p.indent = p.current_offset - else p.indent = p.indent + p.cfg.fix_indent end - end - - -- First pass: handle hash-part - if not p.cfg.hide_hash then - for k, v in pairs(adt) do - - if has_tag and k=='tag' then -- pass the 'tag' field - elseif type(k)=="number" and k<=alen and k>0 and math.fmod(k,1)==0 then - -- pass array-part keys (consecutive ints less than `#adt`) - else -- hash-part keys - if has_hash then p:acc ", " else -- 1st hash-part pair ever found - p:acc "{ "; indent(p) - end - - -- Determine whether a newline is required - local is_id, expected_len=valid_id(p.cfg, k) - if is_id then expected_len=#k+xlen(v, p.cfg, p.nested)+#" = , " - else expected_len = xlen(k, p.cfg, p.nested)+xlen(v, p.cfg, p.nested)+#"[] = , " end - consider_newline(p, expected_len) - - -- Print the key - if is_id then p:acc(k); p:acc " = " else - p:acc "["; acc_value (p, k); p:acc "] = " - end - - acc_value (p, v) -- Print the value - has_hash = true - end - end - end - - -- Now we know whether there's a hash-part, an array-part, and a tag. - -- Tag and hash-part are already printed if they're present. - if not has_tag and not has_hash and not has_arr then p:acc "{ }"; - elseif has_tag and not has_hash and not has_arr then -- nothing, tag already in acc - else - assert (has_hash or has_arr) -- special case { } already handled - local no_brace = false - if has_hash and has_arr then p:acc ", " - elseif has_tag and not has_hash and alen==1 and type(adt[1])~="table" then - -- No brace required; don't print "{", remember not to print "}" - p:acc (" "); acc_value (p, adt[1]) -- indent= indent+(cfg.fix_indent or 0)) - no_brace = true - elseif not has_hash then - -- Braces required, but not opened by hash-part handler yet - p:acc "{ "; indent(p) - end - - -- 2nd pass: array-part - if not no_brace and has_arr then - local expected_len = xlen(adt[1], p.cfg, p.nested) - consider_newline(p, expected_len) - acc_value(p, adt[1]) -- indent+(cfg.fix_indent or 0) - for i=2, alen do - p:acc ", "; - consider_newline(p, xlen(adt[i], p.cfg, p.nested)) - acc_value (p, adt[i]) --indent+(cfg.fix_indent or 0) - end - end - if not no_brace then p:acc " }" end - end - p.nested[adt] = false -- No more nested calls - p.indent = previous_indent -end - - -function acc_value(p, v) - local custom_string = __tostring(v) - if custom_string then p:acc(custom_string) else - local f = acc_type[type(v)] - if f then f(p, v) else p:acc(tostring(v)) end - end -end - - --- FIXME: new_indent seems to be always nil?!s detection --- FIXME: accumulator function should be configurable, --- so that print() doesn't need to bufferize the whole string --- before starting to print. -function M.tostring(t, cfg) - - cfg = cfg or M.DEFAULT_CFG or { } - - local p = { - cfg = cfg; - indent = 0; - current_offset = cfg.initial_indent or 0; - buffer = { }; - nested = { }; - acc = function(self, str) - table.insert(self.buffer, str) - self.current_offset = self.current_offset + #str - end; - } - acc_value(p, t) - return table.concat(p.buffer) -end - -function M.print(...) return print(M.tostring(...)) end -function M.sprintf(fmt, ...) - local args={...} - for i, v in pairs(args) do - local t=type(v) - if t=='table' then args[i]=M.tostring(v) - elseif t=='nil' then args[i]='nil' end - end - return string.format(fmt, unpack(args)) -end - -function M.printf(...) print(M.sprintf(...)) end - -return M \ No newline at end of file diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/repl.mlua b/Utils/luarocks/systree/share/lua/5.1/metalua/repl.mlua deleted file mode 100644 index 0c89bc0b4..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/repl.mlua +++ /dev/null @@ -1,108 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- -------------------------------------------------------------------------------- - --- Keep these global: -PRINT_AST = true -LINE_WIDTH = 60 -PROMPT = "M> " -PROMPT2 = ">> " - -local pp=require 'metalua.pprint' -local M = { } - -mlc = require 'metalua.compiler'.new() - -local readline - -do -- set readline() to a line reader, either editline otr a default - local status, editline = pcall(require, 'editline') - if status then - local rl_handle = editline.init 'metalua' - readline = |p| rl_handle:read(p) - else - local status, rl = pcall(require, 'readline') - if status then - rl.set_options{histfile='~/.metalua_history', keeplines=100, completion=false } - readline = rl.readline - else -- neither editline nor readline available - function readline (p) - io.write (p) - io.flush () - return io.read '*l' - end - end - end -end - -local function reached_eof(lx, msg) - return lx:peek().tag=='Eof' or msg:find "token `Eof" -end - - -function M.run() - pp.printf ("Metalua, interactive REPLoop.\n".. - "(c) 2006-2013 ") - local lines = { } - while true do - local src, lx, ast, f, results, success - repeat - local line = readline(next(lines) and PROMPT2 or PROMPT) - if not line then print(); os.exit(0) end -- line==nil iff eof on stdin - if not next(lines) then - line = line:gsub('^%s*=', 'return ') - end - table.insert(lines, line) - src = table.concat (lines, "\n") - until #line>0 - lx = mlc :src_to_lexstream(src) - success, ast = pcall(mlc.lexstream_to_ast, mlc, lx) - if success then - success, f = pcall(mlc.ast_to_function, mlc, ast, '=stdin') - if success then - results = { xpcall(f, debug.traceback) } - success = table.remove (results, 1) - if success then - -- Success! - for _, x in ipairs(results) do - pp.print(x, {line_max=LINE_WIDTH, metalua_tag=true}) - end - lines = { } - else - print "Evaluation error:" - print (results[1]) - lines = { } - end - else - print "Can't compile into bytecode:" - print (f) - lines = { } - end - else - -- If lx has been read entirely, try to read - -- another line before failing. - if not reached_eof(lx, ast) then - print "Can't compile source into AST:" - print (ast) - lines = { } - end - end - end -end - -return M \ No newline at end of file diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/treequery.mlua b/Utils/luarocks/systree/share/lua/5.1/metalua/treequery.mlua deleted file mode 100644 index e369b9954..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/treequery.mlua +++ /dev/null @@ -1,488 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- -------------------------------------------------------------------------------- - -local walk = require 'metalua.treequery.walk' - -local M = { } --- support for old-style modules -treequery = M - --- ----------------------------------------------------------------------------- --- ----------------------------------------------------------------------------- --- --- multimap helper mmap: associate a key to a set of values --- --- ----------------------------------------------------------------------------- --- ----------------------------------------------------------------------------- - -local function mmap_add (mmap, node, x) - if node==nil then return false end - local set = mmap[node] - if set then set[x] = true - else mmap[node] = {[x]=true} end -end - --- currently unused, I throw the whole set away -local function mmap_remove (mmap, node, x) - local set = mmap[node] - if not set then return false - elseif not set[x] then return false - elseif next(set) then set[x]=nil - else mmap[node] = nil end - return true -end - --- ----------------------------------------------------------------------------- --- ----------------------------------------------------------------------------- --- --- TreeQuery object. --- --- ----------------------------------------------------------------------------- --- ----------------------------------------------------------------------------- - -local ACTIVE_SCOPE = setmetatable({ }, {__mode="k"}) - --- treequery metatable -local Q = { }; Q.__index = Q - ---- treequery constructor --- the resultingg object will allow to filter ans operate on the AST --- @param root the AST to visit --- @return a treequery visitor instance -function M.treequery(root) - return setmetatable({ - root = root, - unsatisfied = 0, - predicates = { }, - until_up = { }, - from_up = { }, - up_f = false, - down_f = false, - filters = { }, - }, Q) -end - --- helper to share the implementations of positional filters -local function add_pos_filter(self, position, inverted, inclusive, f, ...) - if type(f)=='string' then f = M.has_tag(f, ...) end - if not inverted then self.unsatisfied += 1 end - local x = { - pred = f, - position = position, - satisfied = false, - inverted = inverted or false, - inclusive = inclusive or false } - table.insert(self.predicates, x) - return self -end - -function Q :if_unknown(f) - self.unknown_handler = f or (||nil) - return self -end - --- TODO: offer an API for inclusive pos_filters - ---- select nodes which are after one which satisfies predicate f -Q.after = |self, f, ...| add_pos_filter(self, 'after', false, false, f, ...) ---- select nodes which are not after one which satisfies predicate f -Q.not_after = |self, f, ...| add_pos_filter(self, 'after', true, false, f, ...) ---- select nodes which are under one which satisfies predicate f -Q.under = |self, f, ...| add_pos_filter(self, 'under', false, false, f, ...) ---- select nodes which are not under one which satisfies predicate f -Q.not_under = |self, f, ...| add_pos_filter(self, 'under', true, false, f, ...) - ---- select nodes which satisfy predicate f -function Q :filter(f, ...) - if type(f)=='string' then f = M.has_tag(f, ...) end - table.insert(self.filters, f); - return self -end - ---- select nodes which satisfy predicate f -function Q :filter_not(f, ...) - if type(f)=='string' then f = M.has_tag(f, ...) end - table.insert(self.filters, |...| not f(...)) - return self -end - --- private helper: apply filters and execute up/down callbacks when applicable -function Q :execute() - local cfg = { } - -- TODO: optimize away not_under & not_after by pruning the tree - function cfg.down(...) - --printf ("[down]\t%s\t%s", self.unsatisfied, table.tostring((...))) - ACTIVE_SCOPE[...] = cfg.scope - local satisfied = self.unsatisfied==0 - for _, x in ipairs(self.predicates) do - if not x.satisfied and x.pred(...) then - x.satisfied = true - local node, parent = ... - local inc = x.inverted and 1 or -1 - if x.position=='under' then - -- satisfied from after we get down this node... - self.unsatisfied += inc - -- ...until before we get up this node - mmap_add(self.until_up, node, x) - elseif x.position=='after' then - -- satisfied from after we get up this node... - mmap_add(self.from_up, node, x) - -- ...until before we get up this node's parent - mmap_add(self.until_up, parent, x) - elseif x.position=='under_or_after' then - -- satisfied from after we get down this node... - self.satisfied += inc - -- ...until before we get up this node's parent... - mmap_add(self.until_up, parent, x) - else - error "position not understood" - end -- position - if x.inclusive then satisfied = self.unsatisfied==0 end - end -- predicate passed - end -- for predicates - - if satisfied then - for _, f in ipairs(self.filters) do - if not f(...) then satisfied=false; break end - end - if satisfied and self.down_f then self.down_f(...) end - end - end - - function cfg.up(...) - --printf ("[up]\t%s", table.tostring((...))) - - -- Remove predicates which are due before we go up this node - local preds = self.until_up[...] - if preds then - for x, _ in pairs(preds) do - local inc = x.inverted and -1 or 1 - self.unsatisfied += inc - x.satisfied = false - end - self.until_up[...] = nil - end - - -- Execute the up callback - -- TODO: cache the filter passing result from the down callback - -- TODO: skip if there's no callback - local satisfied = self.unsatisfied==0 - if satisfied then - for _, f in ipairs(self.filters) do - if not f(self, ...) then satisfied=false; break end - end - if satisfied and self.up_f then self.up_f(...) end - end - - -- Set predicate which are due after we go up this node - local preds = self.from_up[...] - if preds then - for p, _ in pairs(preds) do - local inc = p.inverted and 1 or -1 - self.unsatisfied += inc - end - self.from_up[...] = nil - end - ACTIVE_SCOPE[...] = nil - end - - function cfg.binder(id_node, ...) - --printf(" >>> Binder called on %s, %s", table.tostring(id_node), - -- table.tostring{...}:sub(2,-2)) - cfg.down(id_node, ...) - cfg.up(id_node, ...) - --printf("down/up on binder done") - end - - cfg.unknown = self.unknown_handler - - --function cfg.occurrence (binder, occ) - -- if binder then OCC2BIND[occ] = binder[1] end - --printf(" >>> %s is an occurrence of %s", occ[1], table.tostring(binder and binder[2])) - --end - - --function cfg.binder(...) cfg.down(...); cfg.up(...) end - return walk.guess(cfg, self.root) -end - ---- Execute a function on each selected node --- @down: function executed when we go down a node, i.e. before its children --- have been examined. --- @up: function executed when we go up a node, i.e. after its children --- have been examined. -function Q :foreach(down, up) - if not up and not down then - error "iterator missing" - end - self.up_f = up - self.down_f = down - return self :execute() -end - ---- Return the list of nodes selected by a given treequery. -function Q :list() - local acc = { } - self :foreach(|x| table.insert(acc, x)) - return acc -end - ---- Return the first matching element --- TODO: dirty hack, to implement properly with a 'break' return. --- Also, it won't behave correctly if a predicate causes an error, --- or if coroutines are involved. -function Q :first() - local result = { } - local function f(...) result = {...}; error() end - pcall(|| self :foreach(f)) - return unpack(result) -end - ---- Pretty printer for queries -function Q :__tostring() return "" end - --- ----------------------------------------------------------------------------- --- ----------------------------------------------------------------------------- --- --- Predicates. --- --- ----------------------------------------------------------------------------- --- ----------------------------------------------------------------------------- - ---- Return a predicate which is true if the tested node's tag is among the --- one listed as arguments --- @param ... a sequence of tag names -function M.has_tag(...) - local args = {...} - if #args==1 then - local tag = ... - return (|node| node.tag==tag) - --return function(self, node) printf("node %s has_tag %s?", table.tostring(node), tag); return node.tag==tag end - else - local tags = { } - for _, tag in ipairs(args) do tags[tag]=true end - return function(node) - local node_tag = node.tag - return node_tag and tags[node_tag] - end - end -end - ---- Predicate to test whether a node represents an expression. -M.is_expr = M.has_tag('Nil', 'Dots', 'True', 'False', 'Number','String', - 'Function', 'Table', 'Op', 'Paren', 'Call', 'Invoke', - 'Id', 'Index') - --- helper for is_stat -local STAT_TAGS = { Do=1, Set=1, While=1, Repeat=1, If=1, Fornum=1, - Forin=1, Local=1, Localrec=1, Return=1, Break=1 } - ---- Predicate to test whether a node represents a statement. --- It is context-aware, i.e. it recognizes `Call and `Invoke nodes --- used in a statement context as such. -function M.is_stat(node, parent) - local tag = node.tag - if not tag then return false - elseif STAT_TAGS[tag] then return true - elseif tag=='Call' or tag=='Invoke' then return parent and parent.tag==nil - else return false end -end - ---- Predicate to test whether a node represents a statements block. -function M.is_block(node) return node.tag==nil end - --- ----------------------------------------------------------------------------- --- ----------------------------------------------------------------------------- --- --- Variables and scopes. --- --- ----------------------------------------------------------------------------- --- ----------------------------------------------------------------------------- - -local BINDER_PARENT_TAG = { - Local=true, Localrec=true, Forin=true, Function=true } - ---- Test whether a node is a binder. This is local predicate, although it --- might need to inspect the parent node. -function M.is_binder(node, parent) - --printf('is_binder(%s, %s)', table.tostring(node), table.tostring(parent)) - if node.tag ~= 'Id' or not parent then return false end - if parent.tag=='Fornum' then return parent[1]==node end - if not BINDER_PARENT_TAG[parent.tag] then return false end - for _, binder in ipairs(parent[1]) do - if binder==node then return true end - end - return false -end - ---- Retrieve the binder associated to an occurrence within root. --- @param occurrence an Id node representing an occurrence in `root`. --- @param root the tree in which `node` and its binder occur. --- @return the binder node, and its ancestors up to root if found. --- @return nil if node is global (or not an occurrence) in `root`. -function M.binder(occurrence, root) - local cfg, id_name, result = { }, occurrence[1], { } - function cfg.occurrence(id) - if id == occurrence then result = cfg.scope :get(id_name) end - -- TODO: break the walker - end - walk.guess(cfg, root) - return unpack(result) -end - ---- Predicate to filter occurrences of a given binder. --- Warning: it relies on internal scope book-keeping, --- and for this reason, it only works as query method argument. --- It won't work outside of a query. --- @param binder the binder whose occurrences must be kept by predicate --- @return a predicate - --- function M.is_occurrence_of(binder) --- return function(node, ...) --- if node.tag ~= 'Id' then return nil end --- if M.is_binder(node, ...) then return nil end --- local scope = ACTIVE_SCOPE[node] --- if not scope then return nil end --- local result = scope :get (node[1]) or { } --- if result[1] ~= binder then return nil end --- return unpack(result) --- end --- end - -function M.is_occurrence_of(binder) - return function(node, ...) - local b = M.get_binder(node) - return b and b==binder - end -end - -function M.get_binder(occurrence, ...) - if occurrence.tag ~= 'Id' then return nil end - if M.is_binder(occurrence, ...) then return nil end - local scope = ACTIVE_SCOPE[occurrence] - local binder_hierarchy = scope :get(occurrence[1]) - return unpack (binder_hierarchy or { }) -end - ---- Transform a predicate on a node into a predicate on this node's --- parent. For instance if p tests whether a node has property P, --- then parent(p) tests whether this node's parent has property P. --- The ancestor level is precised with n, with 1 being the node itself, --- 2 its parent, 3 its grand-parent etc. --- @param[optional] n the parent to examine, default=2 --- @param pred the predicate to transform --- @return a predicate -function M.parent(n, pred, ...) - if type(n)~='number' then n, pred = 2, n end - if type(pred)=='string' then pred = M.has_tag(pred, ...) end - return function(self, ...) - return select(n, ...) and pred(self, select(n, ...)) - end -end - ---- Transform a predicate on a node into a predicate on this node's --- n-th child. --- @param n the child's index number --- @param pred the predicate to transform --- @return a predicate -function M.child(n, pred) - return function(node, ...) - local child = node[n] - return child and pred(child, node, ...) - end -end - ---- Predicate to test the position of a node in its parent. --- The predicate succeeds if the node is the n-th child of its parent, --- and a <= n <= b. --- nth(a) is equivalent to nth(a, a). --- Negative indices are admitted, and count from the last child, --- as done for instance by string.sub(). --- --- TODO: This is wrong, this tests the table relationship rather than the --- AST node relationship. --- Must build a getindex helper, based on pattern matching, then build --- the predicate around it. --- --- @param a lower bound --- @param a upper bound --- @return a predicate -function M.is_nth(a, b) - b = b or a - return function(self, node, parent) - if not parent then return false end - local nchildren = #parent - local a = a<=0 and nchildren+a+1 or a - if a>nchildren then return false end - local b = b<=0 and nchildren+b+1 or b>nchildren and nchildren or b - for i=a,b do if parent[i]==node then return true end end - return false - end -end - ---- Returns a list of the direct children of AST node `ast`. --- Children are only expressions, statements and blocks, --- not intermediates such as `Pair` nodes or internal lists --- in `Local` or `Set` nodes. --- Children are returned in parsing order, which isn't necessarily --- the same as source code order. For instance, the right-hand-side --- of a `Local` node is listed before the left-hand-side, because --- semantically the right is evaluated before the variables on the --- left enter scope. --- --- @param ast the node whose children are needed --- @return a list of the direct children of `ast` -function M.children(ast) - local acc = { } - local cfg = { } - function cfg.down(x) - if x~=ast then table.insert(acc, x); return 'break' end - end - walk.guess(cfg, ast) - return acc -end - --- ----------------------------------------------------------------------------- --- ----------------------------------------------------------------------------- --- --- Comments parsing. --- --- ----------------------------------------------------------------------------- --- ----------------------------------------------------------------------------- - -local comment_extractor = |which_side| function (node) - local x = node.lineinfo - x = x and x[which_side] - x = x and x.comments - if not x then return nil end - local lines = { } - for _, record in ipairs(x) do - table.insert(lines, record[1]) - end - return table.concat(lines, '\n') -end - -M.comment_prefix = comment_extractor 'first' -M.comment_suffix = comment_extractor 'last' - - ---- Shortcut for the query constructor -function M :__call(...) return self.treequery(...) end -setmetatable(M, M) - -return M diff --git a/Utils/luarocks/systree/share/lua/5.1/metalua/treequery/walk.mlua b/Utils/luarocks/systree/share/lua/5.1/metalua/treequery/walk.mlua deleted file mode 100644 index 94fc5d65d..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/metalua/treequery/walk.mlua +++ /dev/null @@ -1,266 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2006-2013 Fabien Fleutot and others. --- --- All rights reserved. --- --- This program and the accompanying materials are made available --- under the terms of the Eclipse Public License v1.0 which --- accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- This program and the accompanying materials are also made available --- under the terms of the MIT public license which accompanies this --- distribution, and is available at http://www.lua.org/license.html --- --- Contributors: --- Fabien Fleutot - API and implementation --- -------------------------------------------------------------------------------- - --- Low level AST traversal library. --- --- This library is a helper for the higher-level `treequery` library. --- It walks through every node of an AST, depth-first, and executes --- some callbacks contained in its `cfg` config table: --- --- * `cfg.down(...)` is called when it walks down a node, and receive as --- parameters the node just entered, followed by its parent, grand-parent --- etc. until the root node. --- --- * `cfg.up(...)` is called when it walks back up a node, and receive as --- parameters the node just entered, followed by its parent, grand-parent --- etc. until the root node. --- --- * `cfg.occurrence(binder, id_node, ...)` is called when it visits --- an `` `Id{ }`` node which isn't a local variable creator. binder --- is a reference to its binder with its context. The binder is the --- `` `Id{ }`` node which created this local variable. By "binder --- and its context", we mean a list starting with the `` `Id{ }``, --- and followed by every ancestor of the binder node, up until the --- common root node. `binder` is nil if the variable is global. --- `id_node` is followed by its ancestor, up until the root node. --- --- `cfg.scope` is maintained during the traversal, associating a --- variable name to the binder which creates it in the context of the --- node currently visited. --- --- `walk.traverse.xxx` functions are in charge of the recursive --- descent into children nodes. They're private helpers. They are also --- in charge of calling appropriate `cfg.xxx` callbacks. - --{ extension ("match", ...) } - -local pp = require 'metalua.pprint' - -local M = { traverse = { }; tags = { }; debug = false } - -local function table_transpose(t) - local tt = { }; for a, b in pairs(t) do tt[b]=a end; return tt -end - --------------------------------------------------------------------------------- --- Standard tags: can be used to guess the type of an AST, or to check --- that the type of an AST is respected. --------------------------------------------------------------------------------- -M.tags.stat = table_transpose{ - 'Do', 'Set', 'While', 'Repeat', 'Local', 'Localrec', 'Return', - 'Fornum', 'Forin', 'If', 'Break', 'Goto', 'Label', - 'Call', 'Invoke' } -M.tags.expr = table_transpose{ - 'Paren', 'Call', 'Invoke', 'Index', 'Op', 'Function', 'Stat', - 'Table', 'Nil', 'Dots', 'True', 'False', 'Number', 'String', 'Id' } - --------------------------------------------------------------------------------- --- These [M.traverse.xxx()] functions are in charge of actually going through --- ASTs. At each node, they make sure to call the appropriate walker. --------------------------------------------------------------------------------- - -function M.traverse.stat (cfg, x, ...) - if M.debug then pp.printf("traverse stat %s", x) end - local ancestors = {...} - local B = |y| M.block (cfg, y, x, unpack(ancestors)) -- Block - local S = |y| M.stat (cfg, y, x, unpack(ancestors)) -- Statement - local E = |y| M.expr (cfg, y, x, unpack(ancestors)) -- Expression - local EL = |y| M.expr_list (cfg, y, x, unpack(ancestors)) -- Expression List - local IL = |y| M.binder_list (cfg, y, x, unpack(ancestors)) -- Id binders List - local OS = || cfg.scope :save() -- Open scope - local CS = || cfg.scope :restore() -- Close scope - - match x with - | {...} if x.tag == nil -> for _, y in ipairs(x) do M.stat(cfg, y, ...) end - -- no tag --> node not inserted in the history ancestors - | `Do{...} -> OS(x); for _, y in ipairs(x) do S(y) end; CS(x) - | `Set{ lhs, rhs } -> EL(lhs); EL(rhs) - | `While{ cond, body } -> E(cond); OS(); B(body); CS() - | `Repeat{ body, cond } -> OS(body); B(body); E(cond); CS(body) - | `Local{ lhs } -> IL(lhs) - | `Local{ lhs, rhs } -> EL(rhs); IL(lhs) - | `Localrec{ lhs, rhs } -> IL(lhs); EL(rhs) - | `Fornum{ i, a, b, body } -> E(a); E(b); OS(); IL{i}; B(body); CS() - | `Fornum{ i, a, b, c, body } -> E(a); E(b); E(c); OS(); IL{i}; B(body); CS() - | `Forin{ i, rhs, body } -> EL(rhs); OS(); IL(i); B(body); CS() - | `If{...} -> - for i=1, #x-1, 2 do - E(x[i]); OS(); B(x[i+1]); CS() - end - if #x%2 == 1 then - OS(); B(x[#x]); CS() - end - | `Call{...}|`Invoke{...}|`Return{...} -> EL(x) - | `Break | `Goto{ _ } | `Label{ _ } -> -- nothing - | { tag=tag, ...} if M.tags.stat[tag]-> - M.malformed (cfg, x, unpack (ancestors)) - | _ -> - M.unknown (cfg, x, unpack (ancestors)) - end -end - -function M.traverse.expr (cfg, x, ...) - if M.debug then pp.printf("traverse expr %s", x) end - local ancestors = {...} - local B = |y| M.block (cfg, y, x, unpack(ancestors)) -- Block - local S = |y| M.stat (cfg, y, x, unpack(ancestors)) -- Statement - local E = |y| M.expr (cfg, y, x, unpack(ancestors)) -- Expression - local EL = |y| M.expr_list (cfg, y, x, unpack(ancestors)) -- Expression List - local IL = |y| M.binder_list (cfg, y, x, unpack(ancestors)) -- Id binders list - local OS = || cfg.scope :save() -- Open scope - local CS = || cfg.scope :restore() -- Close scope - - match x with - | `Paren{ e } -> E(e) - | `Call{...} | `Invoke{...} -> EL(x) - | `Index{ a, b } -> E(a); E(b) - | `Op{ opid, ... } -> E(x[2]); if #x==3 then E(x[3]) end - | `Function{ params, body } -> OS(body); IL(params); B(body); CS(body) - | `Stat{ b, e } -> OS(b); B(b); E(e); CS(b) - | `Id{ name } -> M.occurrence(cfg, x, unpack(ancestors)) - | `Table{ ... } -> - for i = 1, #x do match x[i] with - | `Pair{ k, v } -> E(k); E(v) - | v -> E(v) - end end - | `Nil|`Dots|`True|`False|`Number{_}|`String{_} -> -- terminal node - | { tag=tag, ...} if M.tags.expr[tag]-> M.malformed (cfg, x, unpack (ancestors)) - | _ -> M.unknown (cfg, x, unpack (ancestors)) - end -end - -function M.traverse.block (cfg, x, ...) - assert(type(x)=='table', "traverse.block() expects a table") - if x.tag then M.malformed(cfg, x, ...) - else for _, y in ipairs(x) do M.stat(cfg, y, x, ...) end - end -end - -function M.traverse.expr_list (cfg, x, ...) - assert(type(x)=='table', "traverse.expr_list() expects a table") - -- x doesn't appear in the ancestors - for _, y in ipairs(x) do M.expr(cfg, y, ...) end -end - -function M.malformed(cfg, x, ...) - local f = cfg.malformed or cfg.error - if f then f(x, ...) else - error ("Malformed node of tag "..(x.tag or '(nil)')) - end -end - -function M.unknown(cfg, x, ...) - local f = cfg.unknown or cfg.error - if f then f(x, ...) else - error ("Unknown node tag "..(x.tag or '(nil)')) - end -end - -function M.occurrence(cfg, x, ...) - if cfg.occurrence then cfg.occurrence(cfg.scope :get(x[1]), x, ...) end -end - --- TODO: Is it useful to call each error handling function? -function M.binder_list (cfg, id_list, ...) - local f = cfg.binder - local ferror = cfg.error or cfg.malformed or cfg.unknown - for i, id_node in ipairs(id_list) do - local down, up = cfg.down, cfg.up - if id_node.tag == 'Id' then - cfg.scope :set (id_node[1], { id_node, ... }) - if down then down(id_node, ...) end - if f then f(id_node, ...) end - if up then up(id_node, ...) end - elseif i==#id_list and id_node.tag=='Dots' then - if down then down(id_node, ...) end - if up then up(id_node, ...) end - -- Do nothing, those are valid `Dots - elseif ferror then - -- Traverse error handling function - ferror(id_node, ...) - else - error("Invalid binders list") - end - end -end - ----------------------------------------------------------------------- --- Generic walker generator. --- * if `cfg' has an entry matching the tree name, use this entry --- * if not, try to use the entry whose name matched the ast kind --- * if an entry is a table, look for 'up' and 'down' entries --- * if it is a function, consider it as a `down' traverser. ----------------------------------------------------------------------- -local walker_builder = function(traverse) - assert(traverse) - return function (cfg, ...) - if not cfg.scope then cfg.scope = M.newscope() end - local down, up = cfg.down, cfg.up - local broken = down and down(...) - if broken ~= 'break' then M.traverse[traverse] (cfg, ...) end - if up then up(...) end - end -end - ----------------------------------------------------------------------- --- Declare [M.stat], [M.expr], [M.block]. --- `M.binder_list` is not here, because `cfg.up` and `cfg.down` must --- be called on individual binders, not on the list itself. --- It's therefore handled in `traverse.binder_list()` ----------------------------------------------------------------------- -for _, w in ipairs{ "stat", "expr", "block" } do --, "malformed", "unknown" } do - M[w] = walker_builder (w, M.traverse[w]) -end - --- Don't call up/down callbacks on expr lists -M.expr_list = M.traverse.expr_list - - ----------------------------------------------------------------------- --- Try to guess the type of the AST then choose the right walkker. ----------------------------------------------------------------------- -function M.guess (cfg, x, ...) - assert(type(x)=='table', "arg #2 in a walker must be an AST") - if M.tags.expr[x.tag] then return M.expr(cfg, x, ...) end - if M.tags.stat[x.tag] then return M.stat(cfg, x, ...) end - if not x.tag then return M.block(cfg, x, ...) end - error ("Can't guess the AST type from tag "..(x.tag or '')) -end - -local S = { }; S.__index = S - -function M.newscope() - local instance = { current = { } } - instance.stack = { instance.current } - setmetatable (instance, S) - return instance -end - -function S :save(...) - local current_copy = { } - for a, b in pairs(self.current) do current_copy[a]=b end - table.insert (self.stack, current_copy) - if ... then return self :add(...) end -end - -function S :restore() self.current = table.remove (self.stack) end -function S :get (var_name) return self.current[var_name] end -function S :set (key, val) self.current[key] = val end - -return M diff --git a/Utils/luarocks/systree/share/lua/5.1/models/apimodel.lua b/Utils/luarocks/systree/share/lua/5.1/models/apimodel.lua deleted file mode 100644 index e0ed1c968..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/models/apimodel.lua +++ /dev/null @@ -1,241 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2011-2012 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Simon BERNARD --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -local M = {} - --------------------------------------------------------------------------------- --- API MODEL --------------------------------------------------------------------------------- - -function M._file() - local file = { - -- FIELDS - tag = "file", - name = nil, -- string - shortdescription = "", -- string - description = "", -- string - types = {}, -- map from typename to type - globalvars = {}, -- map from varname to item - returns = {}, -- list of return - - -- FUNCTIONS - addtype = function (self,type) - self.types[type.name] = type - type.parent = self - end, - - mergetype = function (self,newtype,erase,erasesourcerangefield) - local currenttype = self.types[newtype.name] - if currenttype then - -- merge recordtypedef - if currenttype.tag =="recordtypedef" and newtype.tag == "recordtypedef" then - -- merge fields - for fieldname ,field in pairs( newtype.fields) do - local currentfield = currenttype.fields[fieldname] - if erase or not currentfield then - currenttype:addfield(field) - elseif erasesourcerangefield then - if field.sourcerange.min and field.sourcerange.max then - currentfield.sourcerange.min = field.sourcerange.min - currentfield.sourcerange.max = field.sourcerange.max - end - end - end - - -- merge descriptions and source ranges - if erase then - if newtype.description or newtype.description == "" then currenttype.description = newtype.description end - if newtype.shortdescription or newtype.shortdescription == "" then currenttype.shortdescription = newtype.shortdescription end - if newtype.sourcerange.min and newtype.sourcerange.max then - currenttype.sourcerange.min = newtype.sourcerange.min - currenttype.sourcerange.max = newtype.sourcerange.max - end - end - -- merge functiontypedef - elseif currenttype.tag == "functiontypedef" and newtype.tag == "functiontypedef" then - -- merge params - for i, param1 in ipairs(newtype.params) do - local missing = true - for j, param2 in ipairs(currenttype.params) do - if param1.name == param2.name then - missing = false - break - end - end - if missing then - table.insert(currenttype.params,param1) - end - end - - -- merge descriptions and source ranges - if erase then - if newtype.description or newtype.description == "" then currenttype.description = newtype.description end - if newtype.shortdescription or newtype.shortdescription == "" then currenttype.shortdescription = newtype.shortdescription end - if newtype.sourcerange.min and newtype.sourcerange.max then - currenttype.sourcerange.min = newtype.sourcerange.min - currenttype.sourcerange.max = newtype.sourcerange.max - end - end - end - else - self:addtype(newtype) - end - end, - - addglobalvar = function (self,item) - self.globalvars[item.name] = item - item.parent = self - end, - - moduletyperef = function (self) - if self and self.returns[1] and self.returns[1].types[1] then - local typeref = self.returns[1].types[1] - return typeref - end - end - } - return file -end - -function M._recordtypedef(name) - local recordtype = { - -- FIELDS - tag = "recordtypedef", - name = name, -- string (mandatory) - shortdescription = "", -- string - description = "", -- string - fields = {}, -- map from fieldname to field - sourcerange = {min=0,max=0}, - - -- FUNCTIONS - addfield = function (self,field) - self.fields[field.name] = field - field.parent = self - end - } - return recordtype -end - -function M._functiontypedef(name) - return { - tag = "functiontypedef", - name = name, -- string (mandatory) - shortdescription = "", -- string - description = "", -- string - params = {}, -- list of parameter - returns = {} -- list of return - } -end - -function M._parameter(name) - return { - tag = "parameter", - name = name, -- string (mandatory) - description = "", -- string - type = nil -- typeref (external or internal or primitive typeref) - } -end - -function M._item(name) - return { - -- FIELDS - tag = "item", - name = name, -- string (mandatory) - shortdescription = "", -- string - description = "", -- string - type = nil, -- typeref (external or internal or primitive typeref) - occurrences = {}, -- list of identifier (see internalmodel) - sourcerange = {min=0, max=0}, - - -- This is A TRICK - -- This value is ALWAYS nil, except for internal purposes (short references). - external = nil, - - -- FUNCTIONS - addoccurence = function (self,occ) - table.insert(self.occurrences,occ) - occ.definition = self - end, - - resolvetype = function (self,file) - if self and self.type then - if self.type.tag =="internaltyperef" then - -- if file is not given try to retrieve it. - if not file then - if self.parent and self.parent.tag == 'recordtypedef' then - file = self.parent.parent - elseif self.parent.tag == 'file' then - file = self.parent - end - end - if file then return file.types[self.type.typename] end - elseif self.type.tag =="inlinetyperef" then - return self.type.def - end - end - end - } -end - -function M._externaltypref(modulename, typename) - return { - tag = "externaltyperef", - modulename = modulename, -- string - typename = typename -- string - } -end - -function M._internaltyperef(typename) - return { - tag = "internaltyperef", - typename = typename -- string - } -end - -function M._primitivetyperef(typename) - return { - tag = "primitivetyperef", - typename = typename -- string - } -end - -function M._moduletyperef(modulename,returnposition) - return { - tag = "moduletyperef", - modulename = modulename, -- string - returnposition = returnposition -- number - } -end - -function M._exprtyperef(expression,returnposition) - return { - tag = "exprtyperef", - expression = expression, -- expression (see internal model) - returnposition = returnposition -- number - } -end - -function M._inlinetyperef(definition) - return { - tag = "inlinetyperef", - def = definition, -- expression (see internal model) - - } -end - -function M._return(description) - return { - tag = "return", - description = description or "", -- string - types = {} -- list of typref (external or internal or primitive typeref) - } -end -return M diff --git a/Utils/luarocks/systree/share/lua/5.1/models/apimodelbuilder.lua b/Utils/luarocks/systree/share/lua/5.1/models/apimodelbuilder.lua deleted file mode 100644 index 6fcd3c8f5..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/models/apimodelbuilder.lua +++ /dev/null @@ -1,459 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2011-2012 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Simon BERNARD --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -local apimodel = require "models.apimodel" -local ldp = require "models.ldparser" -local Q = require "metalua.treequery" - -local M = {} - -local handledcomments={} -- cache to know the comment already handled - ----- --- UTILITY METHODS -local primitivetypes = { - ['boolean'] = true, - ['function'] = true, - ['nil'] = true, - ['number'] = true, - ['string'] = true, - ['table'] = true, - ['thread'] = true, - ['userdata'] = true -} - --- get or create the typedef with the name "name" -local function gettypedef(_file,name,kind,sourcerangemin,sourcerangemax) - local kind = kind or "recordtypedef" - local _typedef = _file.types[name] - if _typedef then - if _typedef.tag == kind then return _typedef end - else - if kind == "recordtypedef" and name ~= "global" then - local _recordtypedef = apimodel._recordtypedef(name) - - -- define sourcerange - _recordtypedef.sourcerange.min = sourcerangemin - _recordtypedef.sourcerange.max = sourcerangemax - - -- add to file if a name is defined - if _recordtypedef.name then _file:addtype(_recordtypedef) end - return _recordtypedef - elseif kind == "functiontypedef" then - -- TODO support function - return nil - else - return nil - end - end - return nil -end - - --- create a typeref from the typref doc_tag -local function createtyperef(dt_typeref,_file,sourcerangemin,sourcerangemax) - local _typeref - if dt_typeref.tag == "typeref" then - if dt_typeref.module then - -- manage external type - _typeref = apimodel._externaltypref() - _typeref.modulename = dt_typeref.module - _typeref.typename = dt_typeref.type - else - if primitivetypes[dt_typeref.type] then - -- manage primitive type - _typeref = apimodel._primitivetyperef() - _typeref.typename = dt_typeref.type - else - -- manage internal type - _typeref = apimodel._internaltyperef() - _typeref.typename = dt_typeref.type - if _file then - gettypedef(_file, _typeref.typename, "recordtypedef", sourcerangemin,sourcerangemax) - end - end - end - end - return _typeref -end - --- create a return from the return doc_tag -local function createreturn(dt_return,_file,sourcerangemin,sourcerangemax) - local _return = apimodel._return() - - _return.description = dt_return.description - - -- manage typeref - if dt_return.types then - for _, dt_typeref in ipairs(dt_return.types) do - local _typeref = createtyperef(dt_typeref,_file,sourcerangemin,sourcerangemax) - if _typeref then - table.insert(_return.types,_typeref) - end - end - end - return _return -end - --- create a item from the field doc_tag -local function createfield(dt_field,_file,sourcerangemin,sourcerangemax) - local _item = apimodel._item(dt_field.name) - - if dt_field.shortdescription then - _item.shortdescription = dt_field.shortdescription - _item.description = dt_field.description - else - _item.shortdescription = dt_field.description - end - - -- manage typeref - local dt_typeref = dt_field.type - if dt_typeref then - _item.type = createtyperef(dt_typeref,_file,sourcerangemin,sourcerangemax) - end - return _item -end - --- create a param from the param doc_tag -local function createparam(dt_param,_file,sourcerangemin,sourcerangemax) - if not dt_param.name then return nil end - - local _parameter = apimodel._parameter(dt_param.name) - _parameter.description = dt_param.description - - -- manage typeref - local dt_typeref = dt_param.type - if dt_typeref then - _parameter.type = createtyperef(dt_typeref,_file,sourcerangemin,sourcerangemax) - end - return _parameter -end - --- get or create the typedef with the name "name" -function M.additemtoparent(_file,_item,scope,sourcerangemin,sourcerangemax) - if scope and not scope.module then - if _item.name then - if scope.type == "global" then - _file:addglobalvar(_item) - else - local _recordtypedef = gettypedef (_file, scope.type ,"recordtypedef",sourcerangemin,sourcerangemax) - _recordtypedef:addfield(_item) - end - else - -- if no item name precise we store the scope in the item to be able to add it to the right parent later - _item.scope = scope - end - end -end - --- Function type counter -local i = 0 - --- Reset function type counter -local function resetfunctiontypeidgenerator() - i = 0 -end - --- Provides an unique index for a function type -local function generatefunctiontypeid() - i = i + 1 - return i -end - --- generate a function type name -local function generatefunctiontypename(_functiontypedef) - local name = {"__"} - if _functiontypedef.returns and _functiontypedef.returns[1] then - local ret = _functiontypedef.returns[1] - for _, type in ipairs(ret.types) do - if type.typename then - if type.modulename then - table.insert(name,type.modulename) - end - table.insert(name,"#") - table.insert(name,type.typename) - end - end - - end - table.insert(name,"=") - if _functiontypedef.params then - for _, param in ipairs(_functiontypedef.params) do - local type = param.type - if type then - if type.typename then - if type.modulename then - table.insert(name,type.modulename) - end - table.insert(name,"#") - table.insert(name,type.typename) - else - table.insert(name,"#unknown") - end - end - table.insert(name,"[") - table.insert(name,param.name) - table.insert(name,"]") - end - end - table.insert(name,"__") - table.insert(name, generatefunctiontypeid()) - return table.concat(name) -end - - - ------------------------------------------------------- --- create the module api -function M.createmoduleapi(ast,modulename) - - -- Initialise function type naming - resetfunctiontypeidgenerator() - - local _file = apimodel._file() - - local _comment2apiobj = {} - - local function handlecomment(comment) - - -- Extract information from tagged comments - local parsedcomment = ldp.parse(comment[1]) - if not parsedcomment then return nil end - - -- Get tags from the languages - local regulartags = parsedcomment.tags - - -- Will contain last API object generated from comments - local _lastapiobject - - -- if comment is an ld comment - if regulartags then - -- manage "module" comment - if regulartags["module"] then - -- get name - _file.name = regulartags["module"][1].name or modulename - _lastapiobject = _file - - -- manage descriptions - _file.shortdescription = parsedcomment.shortdescription - _file.description = parsedcomment.description - - local sourcerangemin = comment.lineinfo.first.offset - local sourcerangemax = comment.lineinfo.last.offset - - -- manage returns - if regulartags ["return"] then - for _, dt_return in ipairs(regulartags ["return"]) do - local _return = createreturn(dt_return,_file,sourcerangemin,sourcerangemax) - table.insert(_file.returns,_return) - end - end - -- if no returns on module create a defaultreturn of type #modulename - if #_file.returns == 0 and _file.name then - -- create internal type ref - local _typeref = apimodel._internaltyperef() - _typeref.typename = _file.name - - -- create return - local _return = apimodel._return() - table.insert(_return.types,_typeref) - - -- add return - table.insert(_file.returns,_return) - - --create recordtypedef is not define - gettypedef(_file,_typeref.typename,"recordtypedef",sourcerangemin,sourcerangemax) - end - -- manage "type" comment - elseif regulartags["type"] and regulartags["type"][1].name ~= "global" then - local dt_type = regulartags["type"][1]; - -- create record type if it doesn't exist - local sourcerangemin = comment.lineinfo.first.offset - local sourcerangemax = comment.lineinfo.last.offset - local _recordtypedef = gettypedef (_file, dt_type.name ,"recordtypedef",sourcerangemin,sourcerangemax) - _lastapiobject = _recordtypedef - - -- re-set sourcerange in case the type was created before the type tag - _recordtypedef.sourcerange.min = sourcerangemin - _recordtypedef.sourcerange.max = sourcerangemax - - -- manage description - _recordtypedef.shortdescription = parsedcomment.shortdescription - _recordtypedef.description = parsedcomment.description - - -- manage fields - if regulartags["field"] then - for _, dt_field in ipairs(regulartags["field"]) do - local _item = createfield(dt_field,_file,sourcerangemin,sourcerangemax) - -- define sourcerange only if we create it - _item.sourcerange.min = sourcerangemin - _item.sourcerange.max = sourcerangemax - if _item then _recordtypedef:addfield(_item) end - end - end - elseif regulartags["field"] then - local dt_field = regulartags["field"][1] - - -- create item - local sourcerangemin = comment.lineinfo.first.offset - local sourcerangemax = comment.lineinfo.last.offset - local _item = createfield(dt_field,_file,sourcerangemin,sourcerangemax) - _item.shortdescription = parsedcomment.shortdescription - _item.description = parsedcomment.description - _lastapiobject = _item - - -- define sourcerange - _item.sourcerange.min = sourcerangemin - _item.sourcerange.max = sourcerangemax - - -- add item to its parent - local scope = regulartags["field"][1].parent - M.additemtoparent(_file,_item,scope,sourcerangemin,sourcerangemax) - elseif regulartags["function"] or regulartags["param"] or regulartags["return"] then - -- create item - local _item = apimodel._item() - _item.shortdescription = parsedcomment.shortdescription - _item.description = parsedcomment.description - _lastapiobject = _item - - -- set name - if regulartags["function"] then _item.name = regulartags["function"][1].name end - - -- define sourcerange - local sourcerangemin = comment.lineinfo.first.offset - local sourcerangemax = comment.lineinfo.last.offset - _item.sourcerange.min = sourcerangemin - _item.sourcerange.max = sourcerangemax - - - -- create function type - local _functiontypedef = apimodel._functiontypedef() - _functiontypedef.shortdescription = parsedcomment.shortdescription - _functiontypedef.description = parsedcomment.description - - - -- manage params - if regulartags["param"] then - for _, dt_param in ipairs(regulartags["param"]) do - local _param = createparam(dt_param,_file,sourcerangemin,sourcerangemax) - table.insert(_functiontypedef.params,_param) - end - end - - -- manage returns - if regulartags["return"] then - for _, dt_return in ipairs(regulartags["return"]) do - local _return = createreturn(dt_return,_file,sourcerangemin,sourcerangemax) - table.insert(_functiontypedef.returns,_return) - end - end - - -- add type name - _functiontypedef.name = generatefunctiontypename(_functiontypedef) - _file:addtype(_functiontypedef) - - -- create ref to this type - local _internaltyperef = apimodel._internaltyperef() - _internaltyperef.typename = _functiontypedef.name - _item.type=_internaltyperef - - -- add item to its parent - local sourcerangemin = comment.lineinfo.first.offset - local sourcerangemax = comment.lineinfo.last.offset - local scope = (regulartags["function"] and regulartags["function"][1].parent) or nil - M.additemtoparent(_file,_item,scope,sourcerangemin,sourcerangemax) - end - end - - -- when we could not know which type of api object it is, we suppose this is an item - if not _lastapiobject then - _lastapiobject = apimodel._item() - _lastapiobject.shortdescription = parsedcomment.shortdescription - _lastapiobject.description = parsedcomment.description - _lastapiobject.sourcerange.min = comment.lineinfo.first.offset - _lastapiobject.sourcerange.max = comment.lineinfo.last.offset - end - - -- - -- Store user defined tags - -- - local thirdtags = parsedcomment and parsedcomment.unknowntags - if thirdtags then - -- Define a storage index for user defined tags on current API element - if not _lastapiobject.metadata then _lastapiobject.metadata = {} end - - -- Loop over user defined tags - for usertag, taglist in pairs(thirdtags) do - if not _lastapiobject.metadata[ usertag ] then - _lastapiobject.metadata[ usertag ] = { - tag = usertag - } - end - for _, tag in ipairs( taglist ) do - table.insert(_lastapiobject.metadata[usertag], tag) - end - end - end - - -- if we create an api object linked it to - _comment2apiobj[comment] =_lastapiobject - end - - local function parsecomment(node, parent, ...) - -- check for comments before this node - if node.lineinfo and node.lineinfo.first.comments then - local comments = node.lineinfo.first.comments - -- check all comments - for _,comment in ipairs(comments) do - -- if not already handled - if not handledcomments[comment] then - handlecomment(comment) - handledcomments[comment]=true - end - end - end - -- check for comments after this node - if node.lineinfo and node.lineinfo.last.comments then - local comments = node.lineinfo.last.comments - -- check all comments - for _,comment in ipairs(comments) do - -- if not already handled - if not handledcomments[comment] then - handlecomment(comment) - handledcomments[comment]=true - end - end - end - end - Q(ast):filter(function(x) return x.tag~=nil end):foreach(parsecomment) - return _file, _comment2apiobj -end - - -function M.extractlocaltype ( commentblock,_file) - if not commentblock then return nil end - - local stringcomment = commentblock[1] - - local parsedtag = ldp.parseinlinecomment(stringcomment) - if parsedtag then - local sourcerangemin = commentblock.lineinfo.first.offset - local sourcerangemax = commentblock.lineinfo.last.offset - - return createtyperef(parsedtag,_file,sourcerangemin,sourcerangemax), parsedtag.description - end - - return nil, stringcomment -end - -M.generatefunctiontypename = generatefunctiontypename - -return M \ No newline at end of file diff --git a/Utils/luarocks/systree/share/lua/5.1/models/internalmodel.lua b/Utils/luarocks/systree/share/lua/5.1/models/internalmodel.lua deleted file mode 100644 index 552521052..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/models/internalmodel.lua +++ /dev/null @@ -1,65 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -local M = {} - -function M._internalcontent() - return { - content = nil, -- block - unknownglobalvars = {}, -- list of item - tag = "MInternalContent" - } -end - -function M._block() - return { - content = {}, -- list of expr (identifier, index, call, invoke, block) - localvars = {}, -- list of {var=item, scope ={min,max}} - sourcerange = {min=0,max=0}, - tag = "MBlock" - } -end - -function M._identifier() - return { - definition = nil, -- item - sourcerange = {min=0,max=0}, - tag = "MIdentifier" - } -end - -function M._index(key, value) - return { - left= key, -- expr (identifier, index, call, invoke, block) - right= value, -- string - sourcerange = {min=0,max=0}, - tag = "MIndex" - } -end - -function M._call(funct) - return { - func = funct, -- expr (identifier, index, call, invoke, block) - sourcerange = {min=0,max=0}, - tag = "MCall" - } -end - -function M._invoke(name, expr) - return { - functionname = name, -- string - record = expr, -- expr (identifier, index, call, invoke, block) - sourcerange = {min=0,max=0}, - tag = "MInvoke" - } -end - -return M diff --git a/Utils/luarocks/systree/share/lua/5.1/models/internalmodelbuilder.mlua b/Utils/luarocks/systree/share/lua/5.1/models/internalmodelbuilder.mlua deleted file mode 100644 index 4aeafa6cb..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/models/internalmodelbuilder.mlua +++ /dev/null @@ -1,861 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2011-2012 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Simon BERNARD --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- --{ extension ('match', ...) } - -local Q = require 'metalua.treequery' - -local internalmodel = require 'models.internalmodel' -local apimodel = require 'models.apimodel' -local apimodelbuilder = require 'models.apimodelbuilder' - -local M = {} - --- Analyzes an AST and returns two tables --- * `locals`, which associates `Id{ } nodes which create a local variable --- to a list of the `Id{ } occurrence nodes of that variable; --- * `globals` which associates variable names to occurrences of --- global variables having that name. -function bindings(ast) - local locals, globals = { }, { } - local function f(id, ...) - local name = id[1] - if Q.is_binder(id, ...) then - local binder = ... -- parent is the binder - locals[binder] = locals[binder] or { } - locals[binder][name]={ } - else - local _, binder = Q.get_binder(id, ...) - if binder then -- this is a local - table.insert(locals[binder][name], id) - else - local g = globals[name] - if g then table.insert(g, id) else globals[name]={id} end - end - end - end - Q(ast) :filter('Id') :foreach(f) - return locals, globals -end - --- -------------------------------------- - --- ---------------------------------------------------------- --- return the comment linked before to this node --- ---------------------------------------------------------- -local function getlinkedcommentbefore(node) - local function _getlinkedcomment(node,line) - if node and node.lineinfo and node.lineinfo.first.line == line then - -- get the last comment before (the nearest of code) - local comments = node.lineinfo.first.comments - local comment = comments and comments[#comments] - if comment and comment.lineinfo.last.line == line-1 then - -- ignore the comment if there are code before on the same line - if node.lineinfo.first.facing and (node.lineinfo.first.facing.line ~= comment.lineinfo.first.line) then - return comment - end - else - return _getlinkedcomment(node.parent,line) - end - end - return nil - end - - if node.lineinfo and node.lineinfo.first.line then - return _getlinkedcomment(node,node.lineinfo.first.line) - else - return nil - end -end - --- ---------------------------------------------------------- --- return the comment linked after to this node --- ---------------------------------------------------------- -local function getlinkedcommentafter(node) - local function _getlinkedcomment(node,line) - if node and node.lineinfo and node.lineinfo.last.line == line then - -- get the first comment after (the nearest of code) - local comments = node.lineinfo.last.comments - local comment = comments and comments[1] - if comment and comment.lineinfo.first.line == line then - return comment - else - return _getlinkedcomment(node.parent,line) - end - end - return nil - end - - if node.lineinfo and node.lineinfo.last.line then - return _getlinkedcomment(node,node.lineinfo.last.line) - else - return nil - end -end - --- ---------------------------------------------------------- --- return true if this node is a block for the internal representation --- ---------------------------------------------------------- -local supported_b = { - Function = true, - Do = true, - While = true, - Fornum = true, - Forin = true, - Repeat = true, -} -local function supportedblock(node, parent) - return supported_b[ node.tag ] or - (parent and parent.tag == "If" and node.tag == nil) -end - --- ---------------------------------------------------------- --- create a block from the metalua node --- ---------------------------------------------------------- -local function createblock(block, parent) - local _block = internalmodel._block() - match block with - | `Function{param, body} - | `Do{...} - | `Fornum {identifier, min, max, body} - | `Forin {identifiers, exprs, body} - | `Repeat {body, expr} -> - _block.sourcerange.min = block.lineinfo.first.offset - _block.sourcerange.max = block.lineinfo.last.offset - | `While {expr, body} -> - _block.sourcerange.min = body.lineinfo.first.facing.offset - _block.sourcerange.max = body.lineinfo.last.facing.offset - | _ -> - if parent and parent.tag == "If" and block.tag == nil then - _block.sourcerange.min = block.lineinfo.first.facing.offset - _block.sourcerange.max = block.lineinfo.last.facing.offset - end - end - return _block -end - --- ---------------------------------------------------------- --- return true if this node is a expression in the internal representation --- ---------------------------------------------------------- -local supported_e = { - Index = true, - Id = true, - Call = true, - Invoke = true -} -local function supportedexpr(node) - return supported_e[ node.tag ] -end - -local idto_block = {} -- cache from metalua id to internal model block -local idto_identifier = {} -- cache from metalua id to internal model indentifier -local expreto_expression = {} -- cache from metalua expression to internal model expression - --- ---------------------------------------------------------- --- create an expression from a metalua node --- ---------------------------------------------------------- -local function createexpr(expr,_block) - local _expr = nil - - match expr with - | `Id { name } -> - -- we store the block which hold this node - -- to be able to define - idto_block[expr]= _block - - -- if expr has not line info, it means expr has no representation in the code - -- so we don't need it. - if not expr.lineinfo then return nil end - - -- create identifier - local _identifier = internalmodel._identifier() - idto_identifier[expr]= _identifier - _expr = _identifier - | `Index { innerexpr, `String{fieldname} } -> - if not expr.lineinfo then return nil end - -- create index - local _expression = createexpr(innerexpr,_block) - if _expression then _expr = internalmodel._index(_expression,fieldname) end - | `Call{innerexpr, ...} -> - if not expr.lineinfo then return nil end - -- create call - local _expression = createexpr(innerexpr,_block) - if _expression then _expr = internalmodel._call(_expression) end - | `Invoke{innerexpr,`String{functionname},...} -> - if not expr.lineinfo then return nil end - -- create invoke - local _expression = createexpr(innerexpr,_block) - if _expression then _expr = internalmodel._invoke(functionname,_expression) end - | _ -> - end - - if _expr then - _expr.sourcerange.min = expr.lineinfo.first.offset - _expr.sourcerange.max = expr.lineinfo.last.offset - - expreto_expression[expr] = _expr - end - - return _expr -end - --- ---------------------------------------------------------- --- create block and expression node --- ---------------------------------------------------------- -local function createtreestructure(ast) - -- create internal content - local _internalcontent = internalmodel._internalcontent() - - -- create root block - local _block = internalmodel._block() - local _blocks = { _block } - _block.sourcerange.min = ast.lineinfo.first.facing.offset - -- TODO remove the math.max when we support partial AST - _block.sourcerange.max = math.max(ast.lineinfo.last.facing.offset, 10000) - - _internalcontent.content = _block - - -- visitor function (down) - local function down (node,parent) - if supportedblock(node,parent) then - -- create the block - local _block = createblock(node,parent) - -- add it to parent block - table.insert(_blocks[#_blocks].content, _block) - -- enqueue the last block to know the "current" block - table.insert(_blocks,_block) - elseif supportedexpr(node) then - -- we handle expression only if it was not already do - if not expreto_expression[node] then - -- create expr - local _expression = createexpr(node,_blocks[#_blocks]) - -- add it to parent block - if _expression then - table.insert(_blocks[#_blocks].content, _expression) - end - end - end - end - - -- visitor function (up) - local function up (node, parent) - if supportedblock(node,parent) then - -- dequeue the last block to know the "current" block - table.remove(_blocks,#_blocks) - end - end - - -- visit ast and build internal model - Q(ast):foreach(down,up) - - return _internalcontent -end - -local getitem - --- ---------------------------------------------------------- --- create the type from the node and position --- ---------------------------------------------------------- -local function createtype(node,position,comment2apiobj,file) - -- create module type ref - match node with - | `Call{ `Id "require", `String {modulename}} -> - return apimodel._moduletyperef(modulename,position) - | `Function {params, body} -> - -- create the functiontypedef from code - local _functiontypedef = apimodel._functiontypedef() - for _, p in ipairs(params) do - -- create parameters - local paramname - if p.tag=="Dots" then - paramname = "..." - else - paramname = p[1] - end - local _param = apimodel._parameter(paramname) - table.insert(_functiontypedef.params,_param) - end - _functiontypedef.name = "___" -- no name for inline type - - return apimodel._inlinetyperef(_functiontypedef) - | `String {value} -> - local typeref = apimodel._primitivetyperef("string") - return typeref - | `Number {value} -> - local typeref = apimodel._primitivetyperef("number") - return typeref - | `True | `False -> - local typeref = apimodel._primitivetyperef("boolean") - return typeref - | `Table {...} -> - -- create recordtypedef from code - local _recordtypedef = apimodel._recordtypedef("___") -- no name for inline type - -- for each element of the table - for i=1,select("#", ...) do - local pair = select(i, ...) - -- if this is a pair we create a new item in the type - if pair.tag == "Pair" then - -- create an item - local _item = getitem(pair,nil, comment2apiobj,file) - if _item then - _recordtypedef:addfield(_item) - end - end - end - return apimodel._inlinetyperef(_recordtypedef) - | _ -> - end - -- if node is an expression supported - local supportedexpr = expreto_expression[node] - if supportedexpr then - -- create expression type ref - return apimodel._exprtyperef(supportedexpr,position) - end - -end - -local function completeapidoctype(apidoctype,itemname,init,file,comment2apiobj) - if not apidoctype.name then - apidoctype.name = itemname - file:mergetype(apidoctype) - end - - -- create type from code - local typeref = createtype(init,1,comment2apiobj,file) - if typeref and typeref.tag == "inlinetyperef" - and typeref.def.tag == "recordtypedef" then - - -- set the name - typeref.def.name = apidoctype.name - - -- merge the type with priority to documentation except for source range - file:mergetype(typeref.def,false,true) - end -end - -local function completeapidocitem (apidocitem, itemname, init, file, binder, comment2apiobj) - -- manage the case item has no name - if not apidocitem.name then - apidocitem.name = itemname - - -- if item has no name this means it could not be attach to a parent - if apidocitem.scope then - apimodelbuilder.additemtoparent(file,apidocitem,apidocitem.scope,apidocitem.sourcerange.min,apidocitem.sourcerange.max) - apidocitem.scope = nil - end - end - - -- for function try to merge definition - local apitype = apidocitem:resolvetype(file) - if apitype and apitype.tag == "functiontypedef" then - local codetype = createtype(init,1,comment2apiobj,file) - if codetype and codetype.tag =="inlinetyperef" then - codetype.def.name = apitype.name - file:mergetype(codetype.def) - end - end - - -- manage the case item has no type - if not apidocitem.type then - -- extract typing from comment - local type, desc = apimodelbuilder.extractlocaltype(getlinkedcommentafter(binder),file) - - if type then - apidocitem.type = type - else - -- if not found extracttype from code - apidocitem.type = createtype(init,1,comment2apiobj,file) - end - end -end - --- ---------------------------------------------------------- --- create or get the item finding in the binder with the given itemname --- return also the ast node corresponding to this item --- ---------------------------------------------------------- -getitem = function (binder, itemname, comment2apiobj, file) - - -- local function to create item - local function createitem(itemname, astnode, itemtype, description) - local _item = apimodel._item(itemname) - if description then _item.description = description end - _item.type = itemtype - if astnode and astnode.lineinfo then - _item.sourcerange.min = astnode.lineinfo.first.offset - _item.sourcerange.max = astnode.lineinfo.last.offset - end - return _item, astnode - end - - -- try to match binder with known patter of item declaration - match binder with - | `Pair {string, init} - | `Set { {`Index { right , string}}, {init,...}} if string and string.tag =="String" -> - -- Pair and set is for searching field from type .. - -- if the itemname is given this mean we search for a local or a global not a field type. - if not itemname then - local itemname = string[1] - - -- check for luadoc typing - local commentbefore = getlinkedcommentbefore(binder) - local apiobj = comment2apiobj[commentbefore] -- find apiobj linked to this comment - if apiobj then - if apiobj.tag=="item" then - if not apiobj.name or apiobj.name == itemname then - -- use code to complete api information if it's necessary - completeapidocitem(apiobj, itemname, init,file,binder,comment2apiobj) - -- for item use code source range rather than doc source range - if string and string.lineinfo then - apiobj.sourcerange.min = string.lineinfo.first.offset - apiobj.sourcerange.max = string.lineinfo.last.offset - end - return apiobj, string - end - elseif apiobj.tag=="recordtypedef" then - -- use code to complete api information if it's necessary - completeapidoctype(apiobj, itemname, init,file,comment2apiobj) - return createitem(itemname, string, apimodel._internaltyperef(apiobj.name), nil) - end - - -- if the apiobj could not be associated to the current obj, - -- we do not use the documentation neither - commentbefore = nil - end - - -- else we use code to extract the type and description - -- check for "local" typing - local type, desc = apimodelbuilder.extractlocaltype(getlinkedcommentafter(binder),file) - local desc = desc or (commentbefore and commentbefore[1]) - if type then - return createitem(itemname, string, type, desc ) - else - -- if no "local typing" extract type from code - return createitem(itemname, string, createtype(init,1,comment2apiobj,file), desc) - end - end - | `Set {ids, inits} - | `Local {ids, inits} -> - -- if this is a single local var declaration - -- we check if there are a comment block linked and try to extract the type - if #ids == 1 then - local currentid, currentinit = ids[1],inits[1] - -- ignore non Ids node - if currentid.tag ~= 'Id' or currentid[1] ~= itemname then return nil end - - -- check for luadoc typing - local commentbefore = getlinkedcommentbefore(binder) - local apiobj = comment2apiobj[commentbefore] -- find apiobj linked to this comment - if apiobj then - if apiobj.tag=="item" then - -- use code to complete api information if it's necessary - if not apiobj.name or apiobj.name == itemname then - completeapidocitem(apiobj, itemname, currentinit,file,binder,comment2apiobj) - -- if this is a global var or if is has no parent - -- we do not create a new item - if not apiobj.parent or apiobj.parent == file then - -- for item use code source range rather than doc source range - if currentid and currentid.lineinfo then - apiobj.sourcerange.min = currentid.lineinfo.first.offset - apiobj.sourcerange.max = currentid.lineinfo.last.offset - end - return apiobj, currentid - else - return createitem(itemname, currentid, apiobj.type, nil) - end - end - elseif apiobj.tag=="recordtypedef" then - -- use code to complete api information if it's necessary - completeapidoctype(apiobj, itemname, currentinit,file,comment2apiobj) - return createitem(itemname, currentid, apimodel._internaltyperef(apiobj.name), nil) - end - - -- if the apiobj could not be associated to the current obj, - -- we do not use the documentation neither - commentbefore = nil - end - - -- else we use code to extract the type and description - -- check for "local" typing - local type,desc = apimodelbuilder.extractlocaltype(getlinkedcommentafter(binder),file) - desc = desc or (commentbefore and commentbefore[1]) - if type then - return createitem(itemname, currentid, type, desc) - else - -- if no "local typing" extract type from code - return createitem(itemname, currentid, createtype(currentinit,1,comment2apiobj,file), desc) - end - end - -- else we use code to extract the type - local init,returnposition = nil,1 - for i,id in ipairs(ids) do - -- calculate the current return position - if init and (init.tag == "Call" or init.tag == "Invoke") then - -- if previous init was a call or an invoke - -- we increment the returnposition - returnposition= returnposition+1 - else - -- if init is not a function call - -- we change the init used to determine the type - init = inits[i] - end - - -- get the name of the current id - local idname = id[1] - - -- if this is the good id - if itemname == idname then - -- create type from init node and return position - return createitem (itemname, id, createtype(init,returnposition,comment2apiobj,file),nil) - end - end - | `Function {params, body} -> - for i,id in ipairs(params) do - -- get the name of the current id - local idname = id[1] - -- if this is the good id - if itemname == idname then - -- extract param's type from luadocumentation - local obj = comment2apiobj[getlinkedcommentbefore(binder)] - if obj and obj.tag=="item" then - local typedef = obj:resolvetype(file) - if typedef and typedef.tag =="functiontypedef" then - for j, param in ipairs(typedef.params) do - if i==j then - if i ==1 and itemname == "self" and param.type == nil - and obj.parent and obj.parent.tag == "recordtypedef" and obj.parent.name then - param.type = apimodel._internaltyperef(obj.parent.name) - end - -- TODO perhaps we must clone the typeref - return createitem(itemname,id, param.type,param.description) - end - end - end - end - return createitem(itemname,id) - end - end - | `Forin {ids, expr, body} -> - for i,id in ipairs(ids) do - -- get the name of the current id - local idname = id[1] - -- if this is the good id - if itemname == idname then - -- return data : we can not guess the type for now - return createitem(itemname,id) - end - end - | `Fornum {id, ...} -> - -- get the name of the current id - local idname = id[1] - -- if this is the good id - if itemname == idname then - -- return data : we can not guess the type for now - return createitem(itemname,id) - end - | `Localrec {{id}, {func}} -> - -- get the name of the current id - local idname = id[1] - -- if this is the good id - if itemname == idname then - -- check for luadoc typing - local commentbefore = getlinkedcommentbefore(binder) - local apiobj = comment2apiobj[commentbefore] -- find apiobj linked to this comment - if apiobj then - if apiobj.tag=="item" then - if not apiobj.name or apiobj.name == itemname then - -- use code to complete api information if it's necessary - completeapidocitem(apiobj, itemname, func,file,binder,comment2apiobj) - return createitem(itemname,id,apiobj.type,nil) - end - end - - -- if the apiobj could not be associated to the current obj, - -- we do not use the documentation neither - commentbefore = nil - end - - -- else we use code to extract the type and description - -- check for "local" typing - local type,desc = apimodelbuilder.extractlocaltype(getlinkedcommentafter(binder),file) - desc = desc or (commentbefore and commentbefore[1]) - if type then - return createitem(itemname, id, type, desc) - else - -- if no "local typing" extract type from code - return createitem(itemname, id, createtype(func,1,comment2apiobj,file), desc) - end - end - | _ -> - end -end - --- ---------------------------------------------------------- --- Search from Id node to Set node to find field of type. --- --- Lua code : table.field1.field2 = 12 --- looks like that in metalua : --- `Set{ --- `Index { `Index { `Id "table", `String "field1" }, --- `String "field2"}, --- `Number "12"} --- ---------------------------------------------------------- -local function searchtypefield(node,_currentitem,comment2apiobj,file) - - -- we are just interested : - -- by item which is field of recordtypedef - -- by ast node which are Index - if _currentitem then - local type = _currentitem:resolvetype(file) - if type and type.tag == "recordtypedef" then - if node and node.tag == "Index" then - local rightpart = node[2] - local _newcurrentitem = type.fields[rightpart[1]] - - if _newcurrentitem then - -- if this index represent a known field of the type we continue to search - searchtypefield (node.parent,_newcurrentitem,comment2apiobj,file) - else - -- if not, this is perhaps a new field, but - -- to be a new field this index must be include in a Set - if node.parent and node.parent.tag =="Set" then - -- in this case we create the new item ans add it to the type - local set = node.parent - local item, string = getitem(set,nil, comment2apiobj,file) - -- add this item to the type, only if it has no parent and if this type does not contain already this field - if item and not item.parent and string and not type.fields[string[1]] then - type:addfield(item) - end - end - end - end - end - end -end - --- ---------------------------------------------------------- --- create local vars, global vars and linked it with theirs occurences --- ---------------------------------------------------------- -local function createvardefinitions(_internalcontent,ast,file,comment2apiobj) - -- use bindings to get locals and globals definition - local locals, globals = bindings( ast ) - - -- create locals var - for binder, namesAndOccurrences in pairs(locals) do - for name, occurrences in pairs(namesAndOccurrences) do - -- get item, id - local _item, id = getitem(binder, name,comment2apiobj,file) - if id then - -- add definition as occurence - -- we consider the identifier in the binder as an occurence - local _identifierdef = idto_identifier[id] - if _identifierdef then - table.insert(_item.occurrences, _identifierdef) - _identifierdef.definition = _item - end - - -- add occurences - for _,occurrence in ipairs(occurrences) do - searchtypefield(occurrence.parent, _item,comment2apiobj,file) - local _identifier = idto_identifier[occurrence] - if _identifier then - table.insert(_item.occurrences, _identifier) - _identifier.definition = _item - end - end - - -- add item to block - local _block = idto_block[id] - table.insert(_block.localvars,{item=_item,scope = {min=0,max=0}}) - end - end - end - - -- create globals var - for name, occurrences in pairs( globals ) do - - -- get or create definition - local _item = file.globalvars[name] - local binder = occurrences[1].parent - if not _item then - -- global declaration is only if the first occurence in left part of a 'Set' - if binder and binder.tag == "Set" then - _item = getitem(binder, name,comment2apiobj,file) - end - - -- if we find and item this is a global var declaration - if _item then - file:addglobalvar(_item) - else - -- else it is an unknown global var - _item = apimodel._item(name) - local _firstoccurrence = idto_identifier[occurrences[1]] - if _firstoccurrence then - _item.sourcerange.min = _firstoccurrence.sourcerange.min - _item.sourcerange.max = _firstoccurrence.sourcerange.max - end - table.insert(_internalcontent.unknownglobalvars,_item) - end - else - -- if the global var definition already exists, we just try to it - if binder then - match binder with - | `Set {ids, inits} -> - -- manage case only if there are 1 element in the Set - if #ids == 1 then - local currentid, currentinit = ids[1],inits[1] - -- ignore non Ids node and bad name - if currentid.tag == 'Id' and currentid[1] == name then - completeapidocitem(_item, name, currentinit,file,binder,comment2apiobj) - - if currentid and currentid.lineinfo then - _item.sourcerange.min = currentid.lineinfo.first.offset - _item.sourcerange.max = currentid.lineinfo.last.offset - end - end - end - | _ -> - end - end - end - - -- add occurences - for _,occurence in ipairs(occurrences) do - local _identifier = idto_identifier[occurence] - searchtypefield(occurence.parent, _item,comment2apiobj,file) - if _identifier then - table.insert(_item.occurrences, _identifier) - _identifier.definition = _item - end - end - end -end - --- ---------------------------------------------------------- --- add parent to all ast node --- ---------------------------------------------------------- -local function addparents(ast) - -- visitor function (down) - local function down (node,parent) - node.parent = parent - end - - -- visit ast and build internal model - Q(ast):foreach(down,up) -end - --- ---------------------------------------------------------- --- try to detect a module declaration from code --- ---------------------------------------------------------- -local function searchmodule(ast,file,comment2apiobj,modulename) - -- if the last statement is a return - if ast then - local laststatement = ast[#ast] - if laststatement and laststatement.tag == "Return" then - -- and if the first expression returned is an identifier. - local firstexpr = laststatement[1] - if firstexpr and firstexpr.tag == "Id" then - -- get identifier in internal model - local _identifier = idto_identifier [firstexpr] - -- the definition should be an inline type - if _identifier - and _identifier.definition - and _identifier.definition.type - and _identifier.definition.type.tag == "inlinetyperef" - and _identifier.definition.type.def.tag == "recordtypedef" then - - --set modulename if needed - if not file.name then file.name = modulename end - - -- create or merge type - local _type = _identifier.definition.type.def - _type.name = modulename - - -- if file (module) has no documentation add item documentation to it - -- else add it to the type. - if not file.description or file.description == "" then - file.description = _identifier.definition.description - else - _type.description = _identifier.definition.description - end - _identifier.definition.description = "" - if not file.shortdescription or file.shortdescription == "" then - file.shortdescription = _identifier.definition.shortdescription - else - _type.shortdescription = _identifier.definition.shortdescription - end - _identifier.definition.shortdescription = "" - - -- WORKAROUND FOR BUG 421622: [outline]module selection in outline does not select it in texteditor - --_type.sourcerange.min = _identifier.definition.sourcerange.min - --_type.sourcerange.max = _identifier.definition.sourcerange.max - - -- merge the type with priority to documentation except for source range - file:mergetype(_type,false,true) - - -- create return if needed - if not file.returns[1] then - file.returns[1] = apimodel._return() - file.returns[1].types = { apimodel._internaltyperef(modulename) } - end - - -- change the type of the identifier - _identifier.definition.type = apimodel._internaltyperef(modulename) - end - end - end - end -end - --- ---------------------------------------------------------- --- create the internalcontent from an ast metalua --- ---------------------------------------------------------- -function M.createinternalcontent (ast,file,comment2apiobj,modulename) - -- init cache - idto_block = {} - idto_identifier = {} - expreto_expression = {} - comment2apiobj = comment2apiobj or {} - file = file or apimodel._file() - - -- execute code safely to be sure to clean cache correctly - local internalcontent - local ok, errmsg = pcall(function () - -- add parent to all node - addparents(ast) - - -- create block and expression node - internalcontent = createtreestructure(ast) - - -- create Local vars, global vars and linked occurences (Items) - createvardefinitions(internalcontent,ast,file,comment2apiobj) - - -- try to dectect module information from code - local moduletyperef = file:moduletyperef() - if moduletyperef and moduletyperef.tag == "internaltyperef" then - modulename = moduletyperef.typename or modulename - end - if modulename then - searchmodule(ast,file,comment2apiobj,modulename) - end - end) - - -- clean cache - idto_block = {} - idto_identifier = {} - expreto_expression = {} - - -- if not ok raise an error - if not ok then error (errmsg) end - - return internalcontent -end - -return M diff --git a/Utils/luarocks/systree/share/lua/5.1/models/ldparser.lua b/Utils/luarocks/systree/share/lua/5.1/models/ldparser.lua deleted file mode 100644 index d74071bf4..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/models/ldparser.lua +++ /dev/null @@ -1,656 +0,0 @@ -------------------------------------------------------------------------------- --- Copyright (c) 2011-2013 Sierra Wireless and others. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Sierra Wireless - initial API and implementation -------------------------------------------------------------------------------- -local mlc = require ('metalua.compiler').new() -local gg = require 'metalua.grammar.generator' -local lexer = require 'metalua.grammar.lexer' -local mlp = mlc.parser - -local M = {} -- module -local lx -- lexer used to parse tag -local registeredparsers -- table {tagname => {list de parsers}} - --- ---------------------------------------------------- --- raise an error if result contains a node error --- ---------------------------------------------------- -local function raiserror(result) - for i, node in ipairs(result) do - assert(not node or node.tag ~= "Error") - end -end - - --- ---------------------------------------------------- --- copy key and value from one table to an other --- ---------------------------------------------------- -local function copykey(tablefrom, tableto) - for key, value in pairs(tablefrom) do - if key ~= "lineinfos" then - tableto[key] = value - end - end -end - --- ---------------------------------------------------- --- Handle keyword and identifiers as word --- ---------------------------------------------------- -local function parseword(lx) - local word = lx :peek() - local tag = word.tag - - if tag=='Keyword' or tag=='Id' then - lx:next() - return {tag='Word', lineinfo=word.lineinfo, word[1]} - else - return gg.parse_error(lx,'Id or Keyword expected') - end -end - --- ---------------------------------------------------- --- parse an id --- return a table {name, lineinfo) --- ---------------------------------------------------- -local idparser = gg.sequence({ - builder = function (result) - raiserror(result) - return { name = result[1][1] } - end, - parseword -}) - --- ---------------------------------------------------- --- parse a modulename (id.)?id --- return a table {name, lineinfo) --- ---------------------------------------------------- -local modulenameparser = gg.list({ - builder = function (result) - raiserror(result) - local ids = {} - for i, id in ipairs(result) do - table.insert(ids,id.name) - end - return {name = table.concat(ids,".")} - end, - primary = idparser, - separators = '.' -}) --- ---------------------------------------------------- --- parse a typename (id.)?id --- return a table {name, lineinfo) --- ---------------------------------------------------- -local typenameparser= modulenameparser - --- ---------------------------------------------------- --- parse an internaltype ref --- return a table {name, lineinfo) --- ---------------------------------------------------- -local internaltyperefparser = gg.sequence({ - builder = function(result) - raiserror(result) - return {tag = "typeref",type=result[1].name} - end, - "#", typenameparser -}) - --- ---------------------------------------------------- --- parse en external type ref --- return a table {name, lineinfo) --- ---------------------------------------------------- -local externaltyperefparser = gg.sequence({ - builder = function(result) - raiserror(result) - return {tag = "typeref",module=result[1].name,type=result[2].name} - end, - modulenameparser,"#", typenameparser -}) - - --- ---------------------------------------------------- --- parse a typeref --- return a table {name, lineinfo) --- ---------------------------------------------------- -local typerefparser = gg.multisequence{ - internaltyperefparser, - externaltyperefparser} - --- ---------------------------------------------------- --- parse a list of typeref --- return a list of table {name, lineinfo) --- ---------------------------------------------------- -local typereflistparser = gg.list({ - primary = typerefparser, - separators = ',' -}) - --- ---------------------------------------------------- --- TODO use a more generic way to parse (modifier if not always a typeref) --- TODO support more than one modifier --- ---------------------------------------------------- -local modifiersparser = gg.sequence({ - builder = function(result) - raiserror(result) - return {[result[1].name]=result[2]} - end, - "[", idparser , "=" , internaltyperefparser , "]" -}) - --- ---------------------------------------------------- --- parse a return tag --- ---------------------------------------------------- -local returnparsers = { - -- full parser - gg.sequence({ - builder = function (result) - raiserror(result) - return { types= result[1]} - end, - '@','return', typereflistparser - }), - -- parser without typerefs - gg.sequence({ - builder = function (result) - raiserror(result) - return { types = {}} - end, - '@','return' - }) -} - --- ---------------------------------------------------- --- parse a param tag --- ---------------------------------------------------- -local paramparsers = { - -- full parser - gg.sequence({ - builder = function (result) - raiserror(result) - return { name = result[2].name, type = result[1]} - end, - '@','param', typerefparser, idparser - }), - - -- full parser without type - gg.sequence({ - builder = function (result) - raiserror(result) - return { name = result[1].name} - end, - '@','param', idparser - }), - - -- Parser for `Dots - gg.sequence({ - builder = function (result) - raiserror(result) - return { name = '...' } - end, - '@','param', '...' - }), -} --- ---------------------------------------------------- --- parse a field tag --- ---------------------------------------------------- -local fieldparsers = { - -- full parser - gg.sequence({ - builder = function (result) - raiserror(result) - local tag = {} - copykey(result[1],tag) - tag.type = result[2] - tag.name = result[3].name - return tag - end, - '@','field', modifiersparser, typerefparser, idparser - }), - - -- parser without name - gg.sequence({ - builder = function (result) - raiserror(result) - local tag = {} - copykey(result[1],tag) - tag.type = result[2] - return tag - end, - '@','field', modifiersparser, typerefparser - }), - - -- parser without type - gg.sequence({ - builder = function (result) - raiserror(result) - local tag = {} - copykey(result[1],tag) - tag.name = result[2].name - return tag - end, - '@','field', modifiersparser, idparser - }), - - -- parser without type and name - gg.sequence({ - builder = function (result) - raiserror(result) - local tag = {} - copykey(result[1],tag) - return tag - end, - '@','field', modifiersparser - }), - - -- parser without modifiers - gg.sequence({ - builder = function (result) - raiserror(result) - return { name = result[2].name, type = result[1]} - end, - '@','field', typerefparser, idparser - }), - - -- parser without modifiers and name - gg.sequence({ - builder = function (result) - raiserror(result) - return {type = result[1]} - end, - '@','field', typerefparser - }), - - -- parser without type and modifiers - gg.sequence({ - builder = function (result) - raiserror(result) - return { name = result[1].name} - end, - '@','field', idparser - }), - - -- parser with nothing - gg.sequence({ - builder = function (result) - raiserror(result) - return {} - end, - '@','field' - }) -} - --- ---------------------------------------------------- --- parse a function tag --- TODO use a more generic way to parse modifier ! --- ---------------------------------------------------- -local functionparsers = { - -- full parser - gg.sequence({ - builder = function (result) - raiserror(result) - local tag = {} - copykey(result[1],tag) - tag.name = result[2].name - return tag - end, - '@','function', modifiersparser, idparser - }), - - -- parser without name - gg.sequence({ - builder = function (result) - raiserror(result) - local tag = {} - copykey(result[1],tag) - return tag - end, - '@','function', modifiersparser - }), - - -- parser without modifier - gg.sequence({ - builder = function (result) - raiserror(result) - local tag = {} - tag.name = result[1].name - return tag - end, - '@','function', idparser - }), - - -- empty parser - gg.sequence({ - builder = function (result) - raiserror(result) - return {} - end, - '@','function' - }) -} - --- ---------------------------------------------------- --- parse a type tag --- ---------------------------------------------------- -local typeparsers = { - -- full parser - gg.sequence({ - builder = function (result) - raiserror(result) - return { name = result[1].name} - end, - '@','type',typenameparser - }), - -- parser without name - gg.sequence({ - builder = function (result) - raiserror(result) - return {} - end, - '@','type' - }) -} - --- ---------------------------------------------------- --- parse a module tag --- ---------------------------------------------------- -local moduleparsers = { - -- full parser - gg.sequence({ - builder = function (result) - raiserror(result) - return { name = result[1].name } - end, - '@','module', modulenameparser - }), - -- parser without name - gg.sequence({ - builder = function (result) - raiserror(result) - return {} - end, - '@','module' - }) -} - --- ---------------------------------------------------- --- parse a third tag --- ---------------------------------------------------- -local thirdtagsparser = gg.sequence({ - builder = function (result) - raiserror(result) - return { name = result[1][1] } - end, - '@', mlp.id -}) --- ---------------------------------------------------- --- init parser --- ---------------------------------------------------- -local function initparser() - -- register parsers - -- each tag name has several parsers - registeredparsers = { - ["module"] = moduleparsers, - ["return"] = returnparsers, - ["type"] = typeparsers, - ["field"] = fieldparsers, - ["function"] = functionparsers, - ["param"] = paramparsers - } - - -- create lexer used for parsing - lx = lexer.lexer:clone() - lx.extractors = { - -- "extract_long_comment", - -- "extract_short_comment", - -- "extract_long_string", - "extract_short_string", - "extract_word", - "extract_number", - "extract_symbol" - } - - -- Add dots as keyword - local tagnames = { '...' } - - -- Add tag names as key word - for tagname, _ in pairs(registeredparsers) do - table.insert(tagnames,tagname) - end - lx:add(tagnames) - - return lx, parsers -end - -initparser() - --- ---------------------------------------------------- --- get the string pattern to remove for each line of description --- the goal is to fix the indentation problems --- ---------------------------------------------------- -local function getstringtoremove (stringcomment,commentstart) - local _,_,capture = string.find(stringcomment,"\n?([ \t]*)@[^{]+",commentstart) - if not capture then - _,_,capture = string.find(stringcomment,"^([ \t]*)",commentstart) - end - capture = string.gsub(capture,"(.)","%1?") - return capture -end - --- ---------------------------------------------------- --- parse comment tag partition and return table structure --- ---------------------------------------------------- -local function parsetag(part) - if part.comment:find("^@") then - -- check if the part start by a supported tag - for tagname,parsers in pairs(registeredparsers) do - if (part.comment:find("^@"..tagname)) then - -- try the registered parsers for this tag - local result - for i, parser in ipairs(parsers) do - local valid, tag = pcall(parser, lx:newstream(part.comment, tagname .. 'tag lexer')) - if valid then - -- add tagname - tag.tagname = tagname - - -- add description - local endoffset = tag.lineinfo.last.offset - tag.description = part.comment:sub(endoffset+2,-1) - return tag - end - end - end - end - end - return nil -end - --- ---------------------------------------------------- --- Parse third party tags. --- --- Enable to parse a tag not defined in language. --- So for, accepted format is: @sometagname adescription --- ---------------------------------------------------- -local function parsethirdtag( part ) - - -- Check it there is someting to process - if not part.comment:find("^@") then - return nil, 'No tag to parse' - end - - -- Apply parser - local status, parsedtag = pcall(thirdtagsparser, lx:newstream(part.comment, 'Third party tag lexer')) - if not status then - return nil, "Unable to parse given string." - end - - -- Retrieve description - local endoffset = parsedtag.lineinfo.last.offset - local tag = { - description = part.comment:sub(endoffset+2,-1) - } - return parsedtag.name, tag -end - --- --------------------------------------------------------- --- split string comment in several part --- return list of {comment = string, offset = number} --- the first part is the part before the first tag --- the others are the part from a tag to the next one --- ---------------------------------------------------- -local function split(stringcomment,commentstart) - local partstart = commentstart - local result = {} - - -- manage case where the comment start by @ - -- (we must ignore the inline see tag @{..}) - local at_startoffset, at_endoffset = stringcomment:find("^[ \t]*@[^{]",partstart) - if at_endoffset then - partstart = at_endoffset-1 -- we start before the @ and the non '{' character - end - - -- split comment - -- (we must ignore the inline see tag @{..}) - repeat - at_startoffset, at_endoffset = stringcomment:find("\n[ \t]*@[^{]",partstart) - local partend - if at_startoffset then - partend= at_startoffset-1 -- the end is before the separator pattern (just before the \n) - else - partend = #stringcomment -- we don't find any pattern so the end is the end of the string - end - table.insert(result, { comment = stringcomment:sub (partstart,partend) , - offset = partstart}) - if at_endoffset then - partstart = at_endoffset-1 -- the new start is befire the @ and the non { char - end - until not at_endoffset - return result -end - - --- ---------------------------------------------------- --- parse a comment block and return a table --- ---------------------------------------------------- -function M.parse(stringcomment) - - local _comment = {description="", shortdescription=""} - - -- clean windows carriage return - stringcomment = string.gsub(stringcomment,"\r\n","\n") - - -- check if it's a ld comment - -- get the begin of the comment - -- ============================ - if not stringcomment:find("^-") then - -- if this comment don't start by -, we will not handle it. - return nil - end - - -- retrieve the real start - local commentstart = 2 --after the first hyphen - -- if the first line is an empty comment line with at least 3 hyphens we ignore it - local _ , endoffset = stringcomment:find("^-+[ \t]*\n") - if endoffset then - commentstart = endoffset+1 - end - - -- clean comments - -- =================== - -- remove line of "-" - stringcomment = string.sub(stringcomment,commentstart) - -- clean indentation - local pattern = getstringtoremove (stringcomment,1) - stringcomment = string.gsub(stringcomment,"^"..pattern,"") - stringcomment = string.gsub(stringcomment,"\n"..pattern,"\n") - - -- split comment part - -- ==================== - local commentparts = split(stringcomment, 1) - - -- Extract descriptions - -- ==================== - local firstpart = commentparts[1].comment - if firstpart:find("^[^@]") or firstpart:find("^@{") then - -- if the comment part don't start by @ - -- it's the part which contains descriptions - -- (there are an exception for the in-line see tag @{..}) - local shortdescription, description = string.match(firstpart,'^(.-[.?])(%s.+)') - -- store description - if shortdescription then - _comment.shortdescription = shortdescription - -- clean description - -- remove always the first space character - -- (this manage the case short and long description is on the same line) - description = string.gsub(description, "^[ \t]","") - -- if first line is only an empty string remove it - description = string.gsub(description, "^[ \t]*\n","") - _comment.description = description - else - _comment.shortdescription = firstpart - _comment.description = "" - end - end - - -- Extract tags - -- =================== - -- Parse regular tags - local tag - for i, part in ipairs(commentparts) do - tag = parsetag(part) - --if it's a supported tag (so tag is not nil, it's a table) - if tag then - if not _comment.tags then _comment.tags = {} end - if not _comment.tags[tag.tagname] then - _comment.tags[tag.tagname] = {} - end - table.insert(_comment.tags[tag.tagname], tag) - else - - -- Try user defined tags, so far they will look like - -- @identifier description - local tagname, thirdtag = parsethirdtag( part ) - if tagname then - -- - -- Append found tag - -- - local reservedname = 'unknowntags' - if not _comment.unknowntags then - _comment.unknowntags = {} - end - - -- Create specific section for parsed tag - if not _comment.unknowntags[tagname] then - _comment.unknowntags[tagname] = {} - end - -- Append to specific section - table.insert(_comment.unknowntags[tagname], thirdtag) - end - end - end - return _comment -end - - -function M.parseinlinecomment(stringcomment) - --TODO this code is use to activate typage only on --- comments. (deactivate for now) - -- if not stringcomment or not stringcomment:find("^-") then - -- -- if this comment don't start by -, we will not handle it. - -- return nil - -- end - -- -- remove the first '-' - -- stringcomment = string.sub(stringcomment,2) - -- print (stringcomment) - -- io.flush() - local valid, parsedtag = pcall(typerefparser, lx:newstream(stringcomment, 'typeref parser')) - if valid then - local endoffset = parsedtag.lineinfo.last.offset - parsedtag.description = stringcomment:sub(endoffset+2,-1) - return parsedtag - end -end - -return M diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/Date.lua b/Utils/luarocks/systree/share/lua/5.1/pl/Date.lua deleted file mode 100644 index c11a9ef18..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/Date.lua +++ /dev/null @@ -1,546 +0,0 @@ ---- Date and Date Format classes. --- See the Guide. --- @class module --- @name pl.Date --- @pragma nostrip - ---[[ -module("pl.Date") -]] - -local class = require 'pl.class' -local os_time, os_date = os.time, os.date -local stringx = require 'pl.stringx' - -local Date = class() -Date.Format = class() - ---- Date constructor. --- @param t this can be either
      ---
    • nil - use current date and time
    • ---
    • number - seconds since epoch (as returned by @{os.time})
    • ---
    • Date - copy constructor
    • ---
    • table - table containing year, month, etc as for os.time() --- You may leave out year, month or day, in which case current values will be used. ---
    • ---
    • two to six numbers: year, month, day, hour, min, sec ---
    --- @function Date -function Date:_init(t,...) - local time - if select('#',...) > 0 then - local extra = {...} - local year = t - t = { - year = year, - month = extra[1], - day = extra[2], - hour = extra[3], - min = extra[4], - sec = extra[5] - } - end - if t == nil then - time = os_time() - elseif type(t) == 'number' then - time = t - elseif type(t) == 'table' then - if getmetatable(t) == Date then -- copy ctor - time = t.time - else - if not (t.year and t.month and t.year) then - local lt = os.date('*t') - if not t.year and not t.month and not t.day then - t.year = lt.year - t.month = lt.month - t.day = lt.day - else - t.year = t.year or lt.year - t.month = t.month or (t.day and lt.month or 1) - t.day = t.day or 1 - end - end - time = os_time(t) - end - end - self:set(time) -end - -local thour,tmin - ---- get the time zone offset from UTC. --- @return hours ahead of UTC --- @return minutes ahead of UTC -function Date.tzone () - if not thour then - local t = os.time() - local ut = os.date('!*t',t) - local lt = os.date('*t',t) - thour = lt.hour - ut.hour - tmin = lt.min - ut.min - end - return thour, tmin -end - ---- convert this date to UTC. -function Date:toUTC () - local th, tm = Date.tzone() - self:add { hour = -th } - - if tm > 0 then self:add {min = -tm} end -end - ---- convert this UTC date to local. -function Date:toLocal () - local th, tm = Date.tzone() - self:add { hour = th } - if tm > 0 then self:add {min = tm} end -end - ---- set the current time of this Date object. --- @param t seconds since epoch -function Date:set(t) - self.time = t - self.tab = os_date('*t',self.time) -end - ---- set the year. --- @param y Four-digit year --- @class function --- @name Date:year - ---- set the month. --- @param m month --- @class function --- @name Date:month - ---- set the day. --- @param d day --- @class function --- @name Date:day - ---- set the hour. --- @param h hour --- @class function --- @name Date:hour - ---- set the minutes. --- @param min minutes --- @class function --- @name Date:min - ---- set the seconds. --- @param sec seconds --- @class function --- @name Date:sec - ---- set the day of year. --- @class function --- @param yday day of year --- @name Date:yday - ---- get the year. --- @param y Four-digit year --- @class function --- @name Date:year - ---- get the month. --- @class function --- @name Date:month - ---- get the day. --- @class function --- @name Date:day - ---- get the hour. --- @class function --- @name Date:hour - ---- get the minutes. --- @class function --- @name Date:min - ---- get the seconds. --- @class function --- @name Date:sec - ---- get the day of year. --- @class function --- @name Date:yday - - -for _,c in ipairs{'year','month','day','hour','min','sec','yday'} do - Date[c] = function(self,val) - if val then - self.tab[c] = val - self:set(os_time(self.tab)) - return self - else - return self.tab[c] - end - end -end - ---- name of day of week. --- @param full abbreviated if true, full otherwise. --- @return string name -function Date:weekday_name(full) - return os_date(full and '%A' or '%a',self.time) -end - ---- name of month. --- @param full abbreviated if true, full otherwise. --- @return string name -function Date:month_name(full) - return os_date(full and '%B' or '%b',self.time) -end - ---- is this day on a weekend?. -function Date:is_weekend() - return self.tab.wday == 0 or self.tab.wday == 6 -end - ---- add to a date object. --- @param t a table containing one of the following keys and a value:
    --- year,month,day,hour,min,sec --- @return this date -function Date:add(t) - local key,val = next(t) - self.tab[key] = self.tab[key] + val - self:set(os_time(self.tab)) - return self -end - ---- last day of the month. --- @return int day -function Date:last_day() - local d = 28 - local m = self.tab.month - while self.tab.month == m do - d = d + 1 - self:add{day=1} - end - self:add{day=-1} - return self -end - ---- difference between two Date objects. --- Note: currently the result is a regular @{Date} object, --- but also has `interval` field set, which means a more --- appropriate string rep is used. --- @param other Date object --- @return a Date object -function Date:diff(other) - local dt = self.time - other.time - if dt < 0 then error("date difference is negative!",2) end - local date = Date(dt) - date.interval = true - return date -end - ---- long numerical ISO data format version of this date. -function Date:__tostring() - if not self.interval then - return os_date('%Y-%m-%d %H:%M:%S',self.time) - else - local t, res = self.tab, '' - local y,m,d = t.year - 1970, t.month - 1, t.day - 1 - if y > 0 then res = res .. y .. ' years ' end - if m > 0 then res = res .. m .. ' months ' end - if d > 0 then res = res .. d .. ' days ' end - if y == 0 and m == 0 then - local h = t.hour - Date.tzone() -- not accounting for UTC mins! - if h > 0 then res = res .. h .. ' hours ' end - if t.min > 0 then res = res .. t.min .. ' min ' end - if t.sec > 0 then res = res .. t.sec .. ' sec ' end - end - return res - end -end - ---- equality between Date objects. -function Date:__eq(other) - return self.time == other.time -end - ---- equality between Date objects. -function Date:__lt(other) - return self.time < other.time -end - - ------------- Date.Format class: parsing and renderinig dates ------------ - --- short field names, explicit os.date names, and a mask for allowed field repeats -local formats = { - d = {'day',{true,true}}, - y = {'year',{false,true,false,true}}, - m = {'month',{true,true}}, - H = {'hour',{true,true}}, - M = {'min',{true,true}}, - S = {'sec',{true,true}}, -} - --- - ---- Date.Format constructor. --- @param fmt. A string where the following fields are significant:
      ---
    • d day (either d or dd)
    • ---
    • y year (either yy or yyy)
    • ---
    • m month (either m or mm)
    • ---
    • H hour (either H or HH)
    • ---
    • M minute (either M or MM)
    • ---
    • S second (either S or SS)
    • ---
    --- Alternatively, if fmt is nil then this returns a flexible date parser --- that tries various date/time schemes in turn: ---
      ---
    1. ISO 8601, --- like 2010-05-10 12:35:23Z or 2008-10-03T14:30+02
    2. ---
    3. times like 15:30 or 8.05pm (assumed to be today's date)
    4. ---
    5. dates like 28/10/02 (European order!) or 5 Feb 2012
    6. ---
    7. month name like march or Mar (case-insensitive, first 3 letters); --- here the day will be 1 and the year this current year
    8. ---
    --- A date in format 3 can be optionally followed by a time in format 2. --- Please see test-date.lua in the tests folder for more examples. --- @usage df = Date.Format("yyyy-mm-dd HH:MM:SS") --- @class function --- @name Date.Format -function Date.Format:_init(fmt) - if not fmt then return end - local append = table.insert - local D,PLUS,OPENP,CLOSEP = '\001','\002','\003','\004' - local vars,used = {},{} - local patt,outf = {},{} - local i = 1 - while i < #fmt do - local ch = fmt:sub(i,i) - local df = formats[ch] - if df then - if used[ch] then error("field appeared twice: "..ch,2) end - used[ch] = true - -- this field may be repeated - local _,inext = fmt:find(ch..'+',i+1) - local cnt = not _ and 1 or inext-i+1 - if not df[2][cnt] then error("wrong number of fields: "..ch,2) end - -- single chars mean 'accept more than one digit' - local p = cnt==1 and (D..PLUS) or (D):rep(cnt) - append(patt,OPENP..p..CLOSEP) - append(vars,ch) - if ch == 'y' then - append(outf,cnt==2 and '%y' or '%Y') - else - append(outf,'%'..ch) - end - i = i + cnt - else - append(patt,ch) - append(outf,ch) - i = i + 1 - end - end - -- escape any magic characters - fmt = table.concat(patt):gsub('[%-%.%+%[%]%(%)%$%^%%%?%*]','%%%1') - -- replace markers with their magic equivalents - fmt = fmt:gsub(D,'%%d'):gsub(PLUS,'+'):gsub(OPENP,'('):gsub(CLOSEP,')') - self.fmt = fmt - self.outf = table.concat(outf) - self.vars = vars - -end - -local parse_date - ---- parse a string into a Date object. --- @param str a date string --- @return date object -function Date.Format:parse(str) - if not self.fmt then - return parse_date(str,self.us) - end - local res = {str:match(self.fmt)} - if #res==0 then return nil, 'cannot parse '..str end - local tab = {} - for i,v in ipairs(self.vars) do - local name = formats[v][1] -- e.g. 'y' becomes 'year' - tab[name] = tonumber(res[i]) - end - -- os.date() requires these fields; if not present, we assume - -- that the time set is for the current day. - if not (tab.year and tab.month and tab.year) then - local today = Date() - tab.year = tab.year or today:year() - tab.month = tab.month or today:month() - tab.day = tab.day or today:month() - end - local Y = tab.year - if Y < 100 then -- classic Y2K pivot - tab.year = Y + (Y < 35 and 2000 or 1999) - elseif not Y then - tab.year = 1970 - end - --dump(tab) - return Date(tab) -end - ---- convert a Date object into a string. --- @param d a date object, or a time value as returned by @{os.time} --- @return string -function Date.Format:tostring(d) - local tm = type(d) == 'number' and d or d.time - if self.outf then - return os.date(self.outf,tm) - else - return tostring(Date(d)) - end -end - -function Date.Format:US_order(yesno) - self.us = yesno -end - -local months = {jan=1,feb=2,mar=3,apr=4,may=5,jun=6,jul=7,aug=8,sep=9,oct=10,nov=11,dec=12} - ---[[ -Allowed patterns: -- [day] [monthname] [year] [time] -- [day]/[month][/year] [time] - -]] - - -local is_word = stringx.isalpha -local is_number = stringx.isdigit -local function tonum(s,l1,l2,kind) - kind = kind or '' - local n = tonumber(s) - if not n then error(("%snot a number: '%s'"):format(kind,s)) end - if n < l1 or n > l2 then - error(("%s out of range: %s is not between %d and %d"):format(kind,s,l1,l2)) - end - return n -end - -local function parse_iso_end(p,ns,sec) - -- may be fractional part of seconds - local _,nfrac,secfrac = p:find('^%.%d+',ns+1) - if secfrac then - sec = sec .. secfrac - p = p:sub(nfrac+1) - else - p = p:sub(ns+1) - end - -- ISO 8601 dates may end in Z (for UTC) or [+-][isotime] - if p:match 'z$' then return sec, {h=0,m=0} end -- we're UTC! - p = p:gsub(':','') -- turn 00:30 to 0030 - local _,_,sign,offs = p:find('^([%+%-])(%d+)') - if not sign then return sec, nil end -- not UTC - - if #offs == 2 then offs = offs .. '00' end -- 01 to 0100 - local tz = { h = tonumber(offs:sub(1,2)), m = tonumber(offs:sub(3,4)) } - if sign == '-' then tz.h = -tz.h; tz.m = -tz.m end - return sec, tz -end - -local function parse_date_unsafe (s,US) - s = s:gsub('T',' ') -- ISO 8601 - local parts = stringx.split(s:lower()) - local i,p = 1,parts[1] - local function nextp() i = i + 1; p = parts[i] end - local year,min,hour,sec,apm - local tz - local _,nxt,day, month = p:find '^(%d+)/(%d+)' - if day then - -- swop for US case - if US then - day, month = month, day - end - _,_,year = p:find('^/(%d+)',nxt+1) - nextp() - else -- ISO - year,month,day = p:match('^(%d+)%-(%d+)%-(%d+)') - if year then - nextp() - end - end - if p and not year and is_number(p) then -- has to be date - day = p - nextp() - end - if p and is_word(p) then - p = p:sub(1,3) - local mon = months[p] - if mon then - month = mon - else error("not a month: " .. p) end - nextp() - end - if p and not year and is_number(p) then - year = p - nextp() - end - - if p then -- time is hh:mm[:ss], hhmm[ss] or H.M[am|pm] - _,nxt,hour,min = p:find '^(%d+):(%d+)' - local ns - if nxt then -- are there seconds? - _,ns,sec = p:find ('^:(%d+)',nxt+1) - --if ns then - sec,tz = parse_iso_end(p,ns or nxt,sec) - --end - else -- might be h.m - _,ns,hour,min = p:find '^(%d+)%.(%d+)' - if ns then - apm = p:match '[ap]m$' - else -- or hhmm[ss] - local hourmin - _,nxt,hourmin = p:find ('^(%d+)') - if nxt then - hour = hourmin:sub(1,2) - min = hourmin:sub(3,4) - sec = hourmin:sub(5,6) - if #sec == 0 then sec = nil end - sec,tz = parse_iso_end(p,nxt,sec) - end - end - end - end - local today - if not (year and month and day) then - today = Date() - end - day = day and tonum(day,1,31,'day') or (month and 1 or today:day()) - month = month and tonum(month,1,12,'month') or today:month() - year = year and tonumber(year) or today:year() - if year < 100 then -- two-digit year pivot - year = year + (year < 35 and 2000 or 1900) - end - hour = hour and tonum(hour,1,apm and 12 or 24,'hour') or 12 - if apm == 'pm' then - hour = hour + 12 - end - min = min and tonum(min,1,60) or 0 - sec = sec and tonum(sec,1,60) or 0 - local res = Date {year = year, month = month, day = day, hour = hour, min = min, sec = sec} - if tz then -- ISO 8601 UTC time - res:toUTC() - res:add {hour = tz.h} - if tz.m ~= 0 then res:add {min = tz.m} end - end - return res -end - -function parse_date (s) - local ok, d = pcall(parse_date_unsafe,s) - if not ok then -- error - d = d:gsub('.-:%d+: ','') - return nil, d - else - return d - end -end - - -return Date - diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/List.lua b/Utils/luarocks/systree/share/lua/5.1/pl/List.lua deleted file mode 100644 index 776f4d938..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/List.lua +++ /dev/null @@ -1,553 +0,0 @@ ---- Python-style list class.

    --- Based on original code by Nick Trout. ---

    --- Please Note: methods that change the list will return the list. --- This is to allow for method chaining, but please note that ls = ls:sort() --- does not mean that a new copy of the list is made. In-place (mutable) methods --- are marked as returning 'the list' in this documentation. ---

    --- See the Guide for further discussion ---

    --- See http://www.python.org/doc/current/tut/tut.html, section 5.1 ---

    --- Note: The comments before some of the functions are from the Python docs --- and contain Python code. ---

    --- Written for Lua version 4.0
    --- Redone for Lua 5.1, Steve Donovan. --- @class module --- @name pl.List --- @pragma nostrip - -local tinsert,tremove,concat,tsort = table.insert,table.remove,table.concat,table.sort -local setmetatable, getmetatable,type,tostring,assert,string,next = setmetatable,getmetatable,type,tostring,assert,string,next -local write = io.write -local tablex = require 'pl.tablex' -local filter,imap,imap2,reduce,transform,tremovevalues = tablex.filter,tablex.imap,tablex.imap2,tablex.reduce,tablex.transform,tablex.removevalues -local tablex = tablex -local tsub = tablex.sub -local utils = require 'pl.utils' -local function_arg = utils.function_arg -local is_type = utils.is_type -local split = utils.split -local assert_arg = utils.assert_arg -local normalize_slice = tablex._normalize_slice - ---[[ -module ('pl.List',utils._module) -]] - -local Multimap = utils.stdmt.MultiMap --- metatable for our list objects -local List = utils.stdmt.List -List.__index = List -List._class = List - -local iter - --- we give the metatable its own metatable so that we can call it like a function! -setmetatable(List,{ - __call = function (tbl,arg) - return List.new(arg) - end, -}) - -local function makelist (t,obj) - local klass = List - if obj then - klass = getmetatable(obj) - end - return setmetatable(t,klass) -end - -local function is_list(t) - return getmetatable(t) == List -end - -local function simple_table(t) - return type(t) == 'table' and not is_list(t) and #t > 0 -end - -function List:_init (src) - if src then - for v in iter(src) do - tinsert(self,v) - end - end -end - ---- Create a new list. Can optionally pass a table; --- passing another instance of List will cause a copy to be created --- we pass anything which isn't a simple table to iterate() to work out --- an appropriate iterator @see List.iterate --- @param t An optional list-like table --- @return a new List --- @usage ls = List(); ls = List {1,2,3,4} -function List.new(t) - local ls - if not simple_table(t) then - ls = {} - List._init(ls,t) - else - ls = t - end - makelist(ls) - return ls -end - -function List:clone() - local ls = makelist({},self) - List._init(ls,self) - return ls -end - -function List.default_map_with(T) - return function(self,name) - local f = T[name] - if f then - return function(self,...) - return self:map(f,...) - end - else - error("method not found: "..name,2) - end - end -end - - ----Add an item to the end of the list. --- @param i An item --- @return the list -function List:append(i) - tinsert(self,i) - return self -end - -List.push = tinsert - ---- Extend the list by appending all the items in the given list. --- equivalent to 'a[len(a):] = L'. --- @param L Another List --- @return the list -function List:extend(L) - assert_arg(1,L,'table') - for i = 1,#L do tinsert(self,L[i]) end - return self -end - ---- Insert an item at a given position. i is the index of the --- element before which to insert. --- @param i index of element before whichh to insert --- @param x A data item --- @return the list -function List:insert(i, x) - assert_arg(1,i,'number') - tinsert(self,i,x) - return self -end - ---- Insert an item at the begining of the list. --- @param x a data item --- @return the list -function List:put (x) - return self:insert(1,x) -end - ---- Remove an element given its index. --- (equivalent of Python's del s[i]) --- @param i the index --- @return the list -function List:remove (i) - assert_arg(1,i,'number') - tremove(self,i) - return self -end - ---- Remove the first item from the list whose value is given. --- (This is called 'remove' in Python; renamed to avoid confusion --- with table.remove) --- Return nil if there is no such item. --- @param x A data value --- @return the list -function List:remove_value(x) - for i=1,#self do - if self[i]==x then tremove(self,i) return self end - end - return self - end - ---- Remove the item at the given position in the list, and return it. --- If no index is specified, a:pop() returns the last item in the list. --- The item is also removed from the list. --- @param i An index --- @return the item -function List:pop(i) - if not i then i = #self end - assert_arg(1,i,'number') - return tremove(self,i) -end - -List.get = List.pop - ---- Return the index in the list of the first item whose value is given. --- Return nil if there is no such item. --- @class function --- @name List:index --- @param x A data value --- @param idx where to start search (default 1) --- @return the index, or nil if not found. - -local tfind = tablex.find -List.index = tfind - ---- does this list contain the value?. --- @param x A data value --- @return true or false -function List:contains(x) - return tfind(self,x) and true or false -end - ---- Return the number of times value appears in the list. --- @param x A data value --- @return number of times x appears -function List:count(x) - local cnt=0 - for i=1,#self do - if self[i]==x then cnt=cnt+1 end - end - return cnt -end - ---- Sort the items of the list, in place. --- @param cmp an optional comparison function; '<' is used if not given. --- @return the list -function List:sort(cmp) - tsort(self,cmp) - return self -end - ---- Reverse the elements of the list, in place. --- @return the list -function List:reverse() - local t = self - local n = #t - local n2 = n/2 - for i = 1,n2 do - local k = n-i+1 - t[i],t[k] = t[k],t[i] - end - return self -end - ---- Emulate list slicing. like 'list[first:last]' in Python. --- If first or last are negative then they are relative to the end of the list --- eg. slice(-2) gives last 2 entries in a list, and --- slice(-4,-2) gives from -4th to -2nd --- @param first An index --- @param last An index --- @return a new List -function List:slice(first,last) - return tsub(self,first,last) -end - ---- empty the list. --- @return the list -function List:clear() - for i=1,#self do tremove(self,i) end - return self -end - -local eps = 1.0e-10 - ---- Emulate Python's range(x) function. --- Include it in List table for tidiness --- @param start A number --- @param finish A number greater than start; if zero, then 0..start-1 --- @param incr an optional increment (may be less than 1) --- @usage List.range(0,3) == List {0,1,2,3} -function List.range(start,finish,incr) - if not finish then - start = 0 - finish = finish - 1 - end - if incr then - if not utils.is_integer(incr) then finish = finish + eps end - else - incr = 1 - end - assert_arg(1,start,'number') - assert_arg(2,finish,'number') - local t = List.new() - for i=start,finish,incr do tinsert(t,i) end - return t -end - ---- list:len() is the same as #list. -function List:len() - return #self -end - --- Extended operations -- - ---- Remove a subrange of elements. --- equivalent to 'del s[i1:i2]' in Python. --- @param i1 start of range --- @param i2 end of range --- @return the list -function List:chop(i1,i2) - return tremovevalues(self,i1,i2) -end - ---- Insert a sublist into a list --- equivalent to 's[idx:idx] = list' in Python --- @param idx index --- @param list list to insert --- @return the list --- @usage l = List{10,20}; l:splice(2,{21,22}); assert(l == List{10,21,22,20}) -function List:splice(idx,list) - assert_arg(1,idx,'number') - idx = idx - 1 - local i = 1 - for v in iter(list) do - tinsert(self,i+idx,v) - i = i + 1 - end - return self -end - ---- general slice assignment s[i1:i2] = seq. --- @param i1 start index --- @param i2 end index --- @param seq a list --- @return the list -function List:slice_assign(i1,i2,seq) - assert_arg(1,i1,'number') - assert_arg(1,i2,'number') - i1,i2 = normalize_slice(self,i1,i2) - if i2 >= i1 then self:chop(i1,i2) end - self:splice(i1,seq) - return self -end - ---- concatenation operator. --- @param L another List --- @return a new list consisting of the list with the elements of the new list appended -function List:__concat(L) - assert_arg(1,L,'table') - local ls = self:clone() - ls:extend(L) - return ls -end - ---- equality operator ==. True iff all elements of two lists are equal. --- @param L another List --- @return true or false -function List:__eq(L) - if #self ~= #L then return false end - for i = 1,#self do - if self[i] ~= L[i] then return false end - end - return true -end - ---- join the elements of a list using a delimiter.
    --- This method uses tostring on all elements. --- @param delim a delimiter string, can be empty. --- @return a string -function List:join (delim) - delim = delim or '' - assert_arg(1,delim,'string') - return concat(imap(tostring,self),delim) -end - ---- join a list of strings.
    --- Uses table.concat directly. --- @class function --- @name List:concat --- @param delim a delimiter --- @return a string -List.concat = concat - -local function tostring_q(val) - local s = tostring(val) - if type(val) == 'string' then - s = '"'..s..'"' - end - return s -end - ---- how our list should be rendered as a string. Uses join(). --- @see List:join -function List:__tostring() - return '{'..self:join(',',tostring_q)..'}' -end - ---[[ --- NOTE: this works, but is unreliable. If you leave the loop before finishing, --- then the iterator is not reset. ---- can iterate over a list directly. --- @usage for v in ls do print(v) end -function List:__call() - if not self.key then self.key = 1 end - local value = self[self.key] - self.key = self.key + 1 - if not value then self.key = nil end - return value -end ---]] - ---[[ -function List.__call(t,v,i) - i = (i or 0) + 1 - v = t[i] - if v then return i, v end -end ---]] - ---- call the function for each element of the list. --- @param fun a function or callable object --- @param ... optional values to pass to function -function List:foreach (fun,...) - local t = self - fun = function_arg(1,fun) - for i = 1,#t do - fun(t[i],...) - end -end - ---- create a list of all elements which match a function. --- @param fun a boolean function --- @param arg optional argument to be passed as second argument of the predicate --- @return a new filtered list. -function List:filter (fun,arg) - return makelist(filter(self,fun,arg),self) -end - ---- split a string using a delimiter. --- @param s the string --- @param delim the delimiter (default spaces) --- @return a List of strings --- @see pl.utils.split -function List.split (s,delim) - assert_arg(1,s,'string') - return makelist(split(s,delim)) -end - ---- apply a function to all elements. --- Any extra arguments will be passed to the function --- @param fun a function of at least one argument --- @param ... arbitrary extra arguments. --- @return a new list: {f(x) for x in self} --- @see pl.tablex.imap -function List:map (fun,...) - return makelist(imap(fun,self,...),self) -end - ---- apply a function to all elements, in-place. --- Any extra arguments are passed to the function. --- @param fun A function that takes at least one argument --- @param ... arbitrary extra arguments. -function List:transform (fun,...) - transform(fun,self,...) -end - ---- apply a function to elements of two lists. --- Any extra arguments will be passed to the function --- @param fun a function of at least two arguments --- @param ls another list --- @param ... arbitrary extra arguments. --- @return a new list: {f(x,y) for x in self, for x in arg1} --- @see pl.tablex.imap2 -function List:map2 (fun,ls,...) - return makelist(imap2(fun,self,ls,...),self) -end - ---- apply a named method to all elements. --- Any extra arguments will be passed to the method. --- @param name name of method --- @param ... extra arguments --- @return a new list of the results --- @see pl.seq.mapmethod -function List:mapm (name,...) - local res = {} - local t = self - for i = 1,#t do - local val = t[i] - local fn = val[name] - if not fn then error(type(val).." does not have method "..name,2) end - res[i] = fn(val,...) - end - return makelist(res,self) -end - ---- 'reduce' a list using a binary function. --- @param fun a function of two arguments --- @return result of the function --- @see pl.tablex.reduce -function List:reduce (fun) - return reduce(fun,self) -end - ---- partition a list using a classifier function. --- The function may return nil, but this will be converted to the string key ''. --- @param fun a function of at least one argument --- @param ... will also be passed to the function --- @return a table where the keys are the returned values, and the values are Lists --- of values where the function returned that key. It is given the type of Multimap. --- @see pl.MultiMap -function List:partition (fun,...) - fun = function_arg(1,fun) - local res = {} - for i = 1,#self do - local val = self[i] - local klass = fun(val,...) - if klass == nil then klass = '' end - if not res[klass] then res[klass] = List() end - res[klass]:append(val) - end - return setmetatable(res,Multimap) -end - ---- return an iterator over all values. -function List:iter () - return iter(self) -end - ---- Create an iterator over a seqence. --- This captures the Python concept of 'sequence'. --- For tables, iterates over all values with integer indices. --- @param seq a sequence; a string (over characters), a table, a file object (over lines) or an iterator function --- @usage for x in iterate {1,10,22,55} do io.write(x,',') end ==> 1,10,22,55 --- @usage for ch in iterate 'help' do do io.write(ch,' ') end ==> h e l p -function List.iterate(seq) - if type(seq) == 'string' then - local idx = 0 - local n = #seq - local sub = string.sub - return function () - idx = idx + 1 - if idx > n then return nil - else - return sub(seq,idx,idx) - end - end - elseif type(seq) == 'table' then - local idx = 0 - local n = #seq - return function() - idx = idx + 1 - if idx > n then return nil - else - return seq[idx] - end - end - elseif type(seq) == 'function' then - return seq - elseif type(seq) == 'userdata' and io.type(seq) == 'file' then - return seq:lines() - end -end -iter = List.iterate - -return List - diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/Map.lua b/Utils/luarocks/systree/share/lua/5.1/pl/Map.lua deleted file mode 100644 index 8b7284037..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/Map.lua +++ /dev/null @@ -1,108 +0,0 @@ ---- A Map class. --- @class module --- @name pl.Map - ---[[ -module ('pl.Map') -]] -local tablex = require 'pl.tablex' -local utils = require 'pl.utils' -local stdmt = utils.stdmt -local is_callable = utils.is_callable -local tmakeset,deepcompare,merge,keys,difference,tupdate = tablex.makeset,tablex.deepcompare,tablex.merge,tablex.keys,tablex.difference,tablex.update - -local pretty_write = require 'pl.pretty' . write -local Map = stdmt.Map -local Set = stdmt.Set -local List = stdmt.List - -local class = require 'pl.class' - --- the Map class --------------------- -class(nil,nil,Map) - -local function makemap (m) - return setmetatable(m,Map) -end - -function Map:_init (t) - local mt = getmetatable(t) - if mt == Set or mt == Map then - self:update(t) - else - return t -- otherwise assumed to be a map-like table - end -end - - -local function makelist(t) - return setmetatable(t,List) -end - ---- list of keys. -Map.keys = tablex.keys - ---- list of values. -Map.values = tablex.values - ---- return an iterator over all key-value pairs. -function Map:iter () - return pairs(self) -end - ---- return a List of all key-value pairs, sorted by the keys. -function Map:items() - local ls = makelist(tablex.pairmap (function (k,v) return makelist {k,v} end, self)) - ls:sort(function(t1,t2) return t1[1] < t2[1] end) - return ls -end - --- Will return the existing value, or if it doesn't exist it will set --- a default value and return it. -function Map:setdefault(key, defaultval) - return self[key] or self:set(key,defaultval) or defaultval -end - ---- size of map. --- note: this is a relatively expensive operation! --- @class function --- @name Map:len -Map.len = tablex.size - ---- put a value into the map. --- @param key the key --- @param val the value -function Map:set (key,val) - self[key] = val -end - ---- get a value from the map. --- @param key the key --- @return the value, or nil if not found. -function Map:get (key) - return rawget(self,key) -end - -local index_by = tablex.index_by - --- get a list of values indexed by a list of keys. --- @param keys a list-like table of keys --- @return a new list -function Map:getvalues (keys) - return makelist(index_by(self,keys)) -end - -Map.iter = pairs - -Map.update = tablex.update - -function Map:__eq (m) - -- note we explicitly ask deepcompare _not_ to use __eq! - return deepcompare(self,m,true) -end - -function Map:__tostring () - return pretty_write(self,'') -end - -return Map diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/MultiMap.lua b/Utils/luarocks/systree/share/lua/5.1/pl/MultiMap.lua deleted file mode 100644 index f1c430db5..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/MultiMap.lua +++ /dev/null @@ -1,65 +0,0 @@ ---- MultiMap, a Map which has multiple values per key.
    --- @class module --- @name pl.MultiMap - ---[[ -module ('pl.MultiMap') -]] - -local classes = require 'pl.class' -local tablex = require 'pl.tablex' -local utils = require 'pl.utils' -local List = require 'pl.List' - -local index_by,tsort,concat = tablex.index_by,table.sort,table.concat -local append,extend,slice = List.append,List.extend,List.slice -local append = table.insert -local is_type = utils.is_type - -local class = require 'pl.class' -local Map = require 'pl.Map' - --- MultiMap is a standard MT -local MultiMap = utils.stdmt.MultiMap - -class(Map,nil,MultiMap) -MultiMap._name = 'MultiMap' - -function MultiMap:_init (t) - if not t then return end - self:update(t) -end - ---- update a MultiMap using a table. --- @param t either a Multimap or a map-like table. --- @return the map -function MultiMap:update (t) - utils.assert_arg(1,t,'table') - if Map:class_of(t) then - for k,v in pairs(t) do - self[k] = List() - self[k]:append(v) - end - else - for k,v in pairs(t) do - self[k] = List(v) - end - end -end - ---- add a new value to a key. Setting a nil value removes the key. --- @param key the key --- @param val the value --- @return the map -function MultiMap:set (key,val) - if val == nil then - self[key] = nil - else - if not self[key] then - self[key] = List() - end - self[key]:append(val) - end -end - -return MultiMap diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/OrderedMap.lua b/Utils/luarocks/systree/share/lua/5.1/pl/OrderedMap.lua deleted file mode 100644 index 7cc79635a..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/OrderedMap.lua +++ /dev/null @@ -1,150 +0,0 @@ ---- OrderedMap, a pl.Map which preserves ordering. --- @class module --- @name pl.OrderedMap - ---[[ -module ('pl.OrderedMap') -]] - -local tablex = require 'pl.tablex' -local utils = require 'pl.utils' -local List = require 'pl.List' -local index_by,tsort,concat = tablex.index_by,table.sort,table.concat - -local class = require 'pl.class' -local Map = require 'pl.Map' - -local OrderedMap = class(Map) -OrderedMap._name = 'OrderedMap' - ---- construct an OrderedMap. --- Will throw an error if the argument is bad. --- @param t optional initialization table, same as for @{OrderedMap:update} -function OrderedMap:_init (t) - self._keys = List() - if t then - local map,err = self:update(t) - if not map then error(err,2) end - end -end - -local assert_arg,raise = utils.assert_arg,utils.raise - ---- update an OrderedMap using a table.
    --- If the table is itself an OrderedMap, then its entries will be appended.
    --- if it s a table of the form {{key1=val1},{key2=val2},...} these will be appended.
    --- Otherwise, it is assumed to be a map-like table, and order of extra entries is arbitrary. --- @param t a table. --- @return the map, or nil in case of error --- @return the error message -function OrderedMap:update (t) - assert_arg(1,t,'table') - if OrderedMap:class_of(t) then - for k,v in t:iter() do - self:set(k,v) - end - elseif #t > 0 then -- an array must contain {key=val} tables - if type(t[1]) == 'table' then - for _,pair in ipairs(t) do - local key,value = next(pair) - if not key then return raise 'empty pair initialization table' end - self:set(key,value) - end - else - return raise 'cannot use an array to initialize an OrderedMap' - end - else - for k,v in pairs(t) do - self:set(k,v) - end - end - return self -end - ---- set the key's value. This key will be appended at the end of the map.
    --- If the value is nil, then the key is removed. --- @param key the key --- @param val the value --- @return the map -function OrderedMap:set (key,val) - if not self[key] and val ~= nil then -- ensure that keys are unique - self._keys:append(key) - elseif val == nil then -- removing a key-value pair - self._keys:remove_value(key) - end - self[key] = val - return self -end - ---- insert a key/value pair before a given position. --- Note: if the map already contains the key, then this effectively --- moves the item to the new position by first removing at the old position. --- Has no effect if the key does not exist and val is nil --- @param pos a position starting at 1 --- @param key the key --- @param val the value; if nil use the old value -function OrderedMap:insert (pos,key,val) - local oldval = self[key] - val = val or oldval - if oldval then - self._keys:remove_value(key) - end - if val then - self._keys:insert(pos,key) - self[key] = val - end - return self -end - ---- return the keys in order. --- (Not a copy!) --- @return List -function OrderedMap:keys () - return self._keys -end - ---- return the values in order. --- this is relatively expensive. --- @return List -function OrderedMap:values () - return List(index_by(self,self._keys)) -end - ---- sort the keys. --- @param cmp a comparison function as for @{table.sort} --- @return the map -function OrderedMap:sort (cmp) - tsort(self._keys,cmp) - return self -end - ---- iterate over key-value pairs in order. -function OrderedMap:iter () - local i = 0 - local keys = self._keys - local n,idx = #keys - return function() - i = i + 1 - if i > #keys then return nil end - idx = keys[i] - return idx,self[idx] - end -end - -function OrderedMap:__tostring () - local res = {} - for i,v in ipairs(self._keys) do - local val = self[v] - local vs = tostring(val) - if type(val) ~= 'number' then - vs = '"'..vs..'"' - end - res[i] = tostring(v)..'='..vs - end - return '{'..concat(res,',')..'}' -end - -return OrderedMap - - - diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/Set.lua b/Utils/luarocks/systree/share/lua/5.1/pl/Set.lua deleted file mode 100644 index fd6de90ba..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/Set.lua +++ /dev/null @@ -1,127 +0,0 @@ ----- A Set class. --- @class module --- @name pl.Set - ---[[ -module ('pl.Set') -]] -local tablex = require 'pl.tablex' -local utils = require 'pl.utils' -local stdmt = utils.stdmt -local tmakeset,deepcompare,merge,keys,difference,tupdate = tablex.makeset,tablex.deepcompare,tablex.merge,tablex.keys,tablex.difference,tablex.update -local Map = stdmt.Map -local Set = stdmt.Set -local List = stdmt.List -local class = require 'pl.class' - --- the Set class -------------------- -class(Map,nil,Set) - -local function makeset (t) - return setmetatable(t,Set) -end - ---- create a set.
    --- @param t may be a Set, Map or list-like table. --- @class function --- @name Set -function Set:_init (t) - local mt = getmetatable(t) - if mt == Set or mt == Map then - for k in pairs(t) do self[k] = true end - else - for _,v in ipairs(t) do self[v] = true end - end -end - -function Set:__tostring () - return '['..self:keys():join ','..']' -end - ---- add a value to a set. --- @param key a value -function Set:set (key) - self[key] = true -end - ---- remove a value from a set. --- @param key a value -function Set:unset (key) - self[key] = nil -end - ---- get a list of the values in a set. --- @class function --- @name Set:values -Set.values = Map.keys - ---- map a function over the values of a set. --- @param fn a function --- @param ... extra arguments to pass to the function. --- @return a new set -function Set:map (fn,...) - fn = utils.function_arg(1,fn) - local res = {} - for k in pairs(self) do - res[fn(k,...)] = true - end - return makeset(res) -end - ---- union of two sets (also +). --- @param set another set --- @return a new set -function Set:union (set) - return merge(self,set,true) -end -Set.__add = Set.union - ---- intersection of two sets (also *). --- @param set another set --- @return a new set -function Set:intersection (set) - return merge(self,set,false) -end -Set.__mul = Set.intersection - ---- new set with elements in the set that are not in the other (also -). --- @param set another set --- @return a new set -function Set:difference (set) - return difference(self,set,false) -end -Set.__sub = Set.difference - --- a new set with elements in _either_ the set _or_ other but not both (also ^). --- @param set another set --- @return a new set -function Set:symmetric_difference (set) - return difference(self,set,true) -end -Set.__pow = Set.symmetric_difference - ---- is the first set a subset of the second?. --- @return true or false -function Set:issubset (set) - for k in pairs(self) do - if not set[k] then return false end - end - return true -end -Set.__lt = Set.subset - ---- is the set empty?. --- @return true or false -function Set:issempty () - return next(self) == nil -end - ---- are the sets disjoint? (no elements in common). --- Uses naive definition, i.e. that intersection is empty --- @param set another set --- @return true or false -function Set:isdisjoint (set) - return self:intersection(set):isempty() -end - -return Set diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/app.lua b/Utils/luarocks/systree/share/lua/5.1/pl/app.lua deleted file mode 100644 index 845255094..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/app.lua +++ /dev/null @@ -1,143 +0,0 @@ ---- Application support functions. ---

    See the Guide --- @class module --- @name pl.app - -local io,package,require = _G.io, _G.package, _G.require -local utils = require 'pl.utils' -local path = require 'pl.path' -local lfs = require 'lfs' - - -local app = {} - -local function check_script_name () - if _G.arg == nil then error('no command line args available\nWas this run from a main script?') end - return _G.arg[0] -end - ---- add the current script's path to the Lua module path. --- Applies to both the source and the binary module paths. It makes it easy for --- the main file of a multi-file program to access its modules in the same directory. --- `base` allows these modules to be put in a specified subdirectory, to allow for --- cleaner deployment and resolve potential conflicts between a script name and its --- library directory. --- @param base optional base directory. --- @return the current script's path with a trailing slash -function app.require_here (base) - local p = path.dirname(check_script_name()) - if not path.isabs(p) then - p = path.join(lfs.currentdir(),p) - end - if p:sub(-1,-1) ~= path.sep then - p = p..path.sep - end - if base then - p = p..base..path.sep - end - local so_ext = path.is_windows and 'dll' or 'so' - local lsep = package.path:find '^;' and '' or ';' - local csep = package.cpath:find '^;' and '' or ';' - package.path = ('%s?.lua;%s?%sinit.lua%s%s'):format(p,p,path.sep,lsep,package.path) - package.cpath = ('%s?.%s%s%s'):format(p,so_ext,csep,package.cpath) - return p -end - ---- return a suitable path for files private to this application. --- These will look like '~/.SNAME/file', with '~' as with expanduser and --- SNAME is the name of the script without .lua extension. --- @param file a filename (w/out path) --- @return a full pathname, or nil --- @return 'cannot create' error -function app.appfile (file) - local sname = path.basename(check_script_name()) - local name,ext = path.splitext(sname) - local dir = path.join(path.expanduser('~'),'.'..name) - if not path.isdir(dir) then - local ret = lfs.mkdir(dir) - if not ret then return utils.raise ('cannot create '..dir) end - end - return path.join(dir,file) -end - ---- return string indicating operating system. --- @return 'Windows','OSX' or whatever uname returns (e.g. 'Linux') -function app.platform() - if path.is_windows then - return 'Windows' - else - local f = io.popen('uname') - local res = f:read() - if res == 'Darwin' then res = 'OSX' end - f:close() - return res - end -end - ---- parse command-line arguments into flags and parameters. --- Understands GNU-style command-line flags; short (-f) and long (--flag). --- These may be given a value with either '=' or ':' (-k:2,--alpha=3.2,-n2); --- note that a number value can be given without a space. --- Multiple short args can be combined like so: (-abcd). --- @param args an array of strings (default is the global 'arg') --- @param flags_with_values any flags that take values, e.g. {out=true} --- @return a table of flags (flag=value pairs) --- @return an array of parameters --- @raise if args is nil, then the global `args` must be available! -function app.parse_args (args,flags_with_values) - if not args then - args = _G.arg - if not args then error "Not in a main program: 'arg' not found" end - end - flags_with_values = flags_with_values or {} - local _args = {} - local flags = {} - local i = 1 - while i <= #args do - local a = args[i] - local v = a:match('^-(.+)') - local is_long - if v then -- we have a flag - if v:find '^-' then - is_long = true - v = v:sub(2) - end - if flags_with_values[v] then - if i == #_args or args[i+1]:find '^-' then - return utils.raise ("no value for '"..v.."'") - end - flags[v] = args[i+1] - i = i + 1 - else - -- a value can be indicated with = or : - local var,val = utils.splitv (v,'[=:]') - var = var or v - val = val or true - if not is_long then - if #var > 1 then - if var:find '.%d+' then -- short flag, number value - val = var:sub(2) - var = var:sub(1,1) - else -- multiple short flags - for i = 1,#var do - flags[var:sub(i,i)] = true - end - val = nil -- prevents use of var as a flag below - end - else -- single short flag (can have value, defaults to true) - val = val or true - end - end - if val then - flags[var] = val - end - end - else - _args[#_args+1] = a - end - i = i + 1 - end - return flags,_args -end - -return app diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/array2d.lua b/Utils/luarocks/systree/share/lua/5.1/pl/array2d.lua deleted file mode 100644 index e178df975..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/array2d.lua +++ /dev/null @@ -1,391 +0,0 @@ ---- Operations on two-dimensional arrays. --- @class module --- @name pl.array2d - -local require, type,tonumber,assert,tostring,io,ipairs,string,table = - _G.require, _G.type,_G.tonumber,_G.assert,_G.tostring,_G.io,_G.ipairs,_G.string,_G.table -local ops = require 'pl.operator' -local tablex = require 'pl.tablex' -local utils = require 'pl.utils' - -local imap,tmap,reduce,keys,tmap2,tset,index_by = tablex.imap,tablex.map,tablex.reduce,tablex.keys,tablex.map2,tablex.set,tablex.index_by -local remove = table.remove -local perm = require 'pl.permute' -local splitv,fprintf,assert_arg = utils.splitv,utils.fprintf,utils.assert_arg -local byte = string.byte -local stdout = io.stdout - ---[[ -module ('pl.array2d',utils._module) -]] - -local array2d = {} - ---- extract a column from the 2D array. --- @param a 2d array --- @param key an index or key --- @return 1d array -function array2d.column (a,key) - assert_arg(1,a,'table') - return imap(ops.index,a,key) -end -local column = array2d.column - ---- map a function over a 2D array --- @param f a function of at least one argument --- @param a 2d array --- @param arg an optional extra argument to be passed to the function. --- @return 2d array -function array2d.map (f,a,arg) - assert_arg(1,a,'table') - f = utils.function_arg(1,f) - return imap(function(row) return imap(f,row,arg) end, a) -end - ---- reduce the rows using a function. --- @param f a binary function --- @param a 2d array --- @return 1d array --- @see pl.tablex.reduce -function array2d.reduce_rows (f,a) - assert_arg(1,a,'table') - return tmap(function(row) return reduce(f,row) end, a) -end - - - ---- reduce the columns using a function. --- @param f a binary function --- @param a 2d array --- @return 1d array --- @see pl.tablex.reduce -function array2d.reduce_cols (f,a) - assert_arg(1,a,'table') - return tmap(function(c) return reduce(f,column(a,c)) end, keys(a[1])) -end - ---- reduce a 2D array into a scalar, using two operations. --- @param opc operation to reduce the final result --- @param opr operation to reduce the rows --- @param a 2D array -function array2d.reduce2 (opc,opr,a) - assert_arg(3,a,'table') - local tmp = array2d.reduce_rows(opr,a) - return reduce(opc,tmp) -end - -local function dimension (t) - return type(t[1])=='table' and 2 or 1 -end - ---- map a function over two arrays. --- They can be both or either 2D arrays --- @param f function of at least two arguments --- @param ad order of first array --- @param bd order of second array --- @param a 1d or 2d array --- @param b 1d or 2d array --- @param arg optional extra argument to pass to function --- @return 2D array, unless both arrays are 1D -function array2d.map2 (f,ad,bd,a,b,arg) - assert_arg(1,a,'table') - assert_arg(2,b,'table') - f = utils.function_arg(1,f) - --local ad,bd = dimension(a),dimension(b) - if ad == 1 and bd == 2 then - return imap(function(row) - return tmap2(f,a,row,arg) - end, b) - elseif ad == 2 and bd == 1 then - return imap(function(row) - return tmap2(f,row,b,arg) - end, a) - elseif ad == 1 and bd == 1 then - return tmap2(f,a,b) - elseif ad == 2 and bd == 2 then - return tmap2(function(rowa,rowb) - return tmap2(f,rowa,rowb,arg) - end, a,b) - end -end - ---- cartesian product of two 1d arrays. --- @param f a function of 2 arguments --- @param t1 a 1d table --- @param t2 a 1d table --- @return 2d table --- @usage product('..',{1,2},{'a','b'}) == {{'1a','2a'},{'1b','2b'}} -function array2d.product (f,t1,t2) - f = utils.function_arg(1,f) - assert_arg(2,t1,'table') - assert_arg(3,t2,'table') - local res, map = {}, tablex.map - for i,v in ipairs(t2) do - res[i] = map(f,t1,v) - end - return res -end - ---- flatten a 2D array. --- (this goes over columns first.) --- @param t 2d table --- @return a 1d table --- @usage flatten {{1,2},{3,4},{5,6}} == {1,2,3,4,5,6} -function array2d.flatten (t) - local res = {} - local k = 1 - for _,a in ipairs(t) do -- for all rows - for i = 1,#a do - res[k] = a[i] - k = k + 1 - end - end - return res -end - ---- swap two rows of an array. --- @param t a 2d array --- @param i1 a row index --- @param i2 a row index -function array2d.swap_rows (t,i1,i2) - assert_arg(1,t,'table') - t[i1],t[i2] = t[i2],t[i1] -end - ---- swap two columns of an array. --- @param t a 2d array --- @param j1 a column index --- @param j2 a column index -function array2d.swap_cols (t,j1,j2) - assert_arg(1,t,'table') - for i = 1,#t do - local row = t[i] - row[j1],row[j2] = row[j2],row[j1] - end -end - ---- extract the specified rows. --- @param t 2d array --- @param ridx a table of row indices -function array2d.extract_rows (t,ridx) - return index_by(t,ridx) -end - ---- extract the specified columns. --- @param t 2d array --- @param cidx a table of column indices -function array2d.extract_cols (t,cidx) - assert_arg(1,t,'table') - for i = 1,#t do - t[i] = index_by(t[i],cidx) - end -end - ---- remove a row from an array. --- @class function --- @name array2d.remove_row --- @param t a 2d array --- @param i a row index -array2d.remove_row = remove - ---- remove a column from an array. --- @param t a 2d array --- @param j a column index -function array2d.remove_col (t,j) - assert_arg(1,t,'table') - for i = 1,#t do - remove(t[i],j) - end -end - -local Ai = byte 'A' - -local function _parse (s) - local c,r - if s:sub(1,1) == 'R' then - r,c = s:match 'R(%d+)C(%d+)' - r,c = tonumber(r),tonumber(c) - else - c,r = s:match '(.)(.)' - c = byte(c) - byte 'A' + 1 - r = tonumber(r) - end - assert(c ~= nil and r ~= nil,'bad cell specifier: '..s) - return r,c -end - ---- parse a spreadsheet range. --- The range can be specified either as 'A1:B2' or 'R1C1:R2C2'; --- a special case is a single element (e.g 'A1' or 'R1C1') --- @param s a range. --- @return start col --- @return start row --- @return end col --- @return end row -function array2d.parse_range (s) - if s:find ':' then - local start,finish = splitv(s,':') - local i1,j1 = _parse(start) - local i2,j2 = _parse(finish) - return i1,j1,i2,j2 - else -- single value - local i,j = _parse(s) - return i,j - end -end - ---- get a slice of a 2D array using spreadsheet range notation. @see parse_range --- @param t a 2D array --- @param rstr range expression --- @return a slice --- @see array2d.parse_range --- @see array2d.slice -function array2d.range (t,rstr) - assert_arg(1,t,'table') - local i1,j1,i2,j2 = array2d.parse_range(rstr) - if i2 then - return array2d.slice(t,i1,j1,i2,j2) - else -- single value - return t[i1][j1] - end -end - -local function default_range (t,i1,j1,i2,j2) - assert(t and type(t)=='table','not a table') - i1,j1 = i1 or 1, j1 or 1 - i2,j2 = i2 or #t, j2 or #t[1] - return i1,j1,i2,j2 -end - ---- get a slice of a 2D array. Note that if the specified range has --- a 1D result, the rank of the result will be 1. --- @param t a 2D array --- @param i1 start row (default 1) --- @param j1 start col (default 1) --- @param i2 end row (default N) --- @param j2 end col (default M) --- @return an array, 2D in general but 1D in special cases. -function array2d.slice (t,i1,j1,i2,j2) - assert_arg(1,t,'table') - i1,j1,i2,j2 = default_range(t,i1,j1,i2,j2) - local res = {} - for i = i1,i2 do - local val - local row = t[i] - if j1 == j2 then - val = row[j1] - else - val = {} - for j = j1,j2 do - val[#val+1] = row[j] - end - end - res[#res+1] = val - end - if i1 == i2 then res = res[1] end - return res -end - ---- set a specified range of an array to a value. --- @param t a 2D array --- @param value the value --- @param i1 start row (default 1) --- @param j1 start col (default 1) --- @param i2 end row (default N) --- @param j2 end col (default M) -function array2d.set (t,value,i1,j1,i2,j2) - i1,j1,i2,j2 = default_range(t,i1,j1,i2,j2) - for i = i1,i2 do - tset(t[i],value) - end -end - ---- write a 2D array to a file. --- @param t a 2D array --- @param f a file object (default stdout) --- @param fmt a format string (default is just to use tostring) --- @param i1 start row (default 1) --- @param j1 start col (default 1) --- @param i2 end row (default N) --- @param j2 end col (default M) -function array2d.write (t,f,fmt,i1,j1,i2,j2) - assert_arg(1,t,'table') - f = f or stdout - local rowop - if fmt then - rowop = function(row,j) fprintf(f,fmt,row[j]) end - else - rowop = function(row,j) f:write(tostring(row[j]),' ') end - end - local function newline() - f:write '\n' - end - array2d.forall(t,rowop,newline,i1,j1,i2,j2) -end - ---- perform an operation for all values in a 2D array. --- @param t 2D array --- @param row_op function to call on each value --- @param end_row_op function to call at end of each row --- @param i1 start row (default 1) --- @param j1 start col (default 1) --- @param i2 end row (default N) --- @param j2 end col (default M) -function array2d.forall (t,row_op,end_row_op,i1,j1,i2,j2) - assert_arg(1,t,'table') - i1,j1,i2,j2 = default_range(t,i1,j1,i2,j2) - for i = i1,i2 do - local row = t[i] - for j = j1,j2 do - row_op(row,j) - end - if end_row_op then end_row_op(i) end - end -end - ---- iterate over all elements in a 2D array, with optional indices. --- @param a 2D array --- @param indices with indices (default false) --- @param i1 start row (default 1) --- @param j1 start col (default 1) --- @param i2 end row (default N) --- @param j2 end col (default M) --- @return either value or i,j,value depending on indices -function array2d.iter (a,indices,i1,j1,i2,j2) - assert_arg(1,a,'table') - local norowset = not (i2 and j2) - i1,j1,i2,j2 = default_range(a,i1,j1,i2,j2) - local n,i,j = i2-i1+1,i1-1,j1-1 - local row,nr = nil,0 - local onr = j2 - j1 + 1 - return function() - j = j + 1 - if j > nr then - j = j1 - i = i + 1 - if i > i2 then return nil end - row = a[i] - nr = norowset and #row or onr - end - if indices then - return i,j,row[j] - else - return row[j] - end - end -end - -function array2d.columns (a) - assert_arg(1,a,'table') - local n = a[1][1] - local i = 0 - return function() - i = i + 1 - if i > n then return nil end - return column(a,i) - end -end - -return array2d - - diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/class.lua b/Utils/luarocks/systree/share/lua/5.1/pl/class.lua deleted file mode 100644 index 5cfbf991d..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/class.lua +++ /dev/null @@ -1,155 +0,0 @@ ---- Provides a reuseable and convenient framework for creating classes in Lua. --- Two possible notations:
    B = class(A) or class.B(A) .
    ---

    The latter form creates a named class.

    --- See the Guide for further discussion --- @module pl.class - -local error, getmetatable, io, pairs, rawget, rawset, setmetatable, tostring, type = - _G.error, _G.getmetatable, _G.io, _G.pairs, _G.rawget, _G.rawset, _G.setmetatable, _G.tostring, _G.type --- this trickery is necessary to prevent the inheritance of 'super' and --- the resulting recursive call problems. -local function call_ctor (c,obj,...) - -- nice alias for the base class ctor - local base = rawget(c,'_base') - if base then obj.super = rawget(base,'_init') end - local res = c._init(obj,...) - obj.super = nil - return res -end - -local function is_a(self,klass) - local m = getmetatable(self) - if not m then return false end --*can't be an object! - while m do - if m == klass then return true end - m = rawget(m,'_base') - end - return false -end - -local function class_of(klass,obj) - if type(klass) ~= 'table' or not rawget(klass,'is_a') then return false end - return klass.is_a(obj,klass) -end - -local function _class_tostring (obj) - local mt = obj._class - local name = rawget(mt,'_name') - setmetatable(obj,nil) - local str = tostring(obj) - setmetatable(obj,mt) - if name then str = name ..str:gsub('table','') end - return str -end - -local function tupdate(td,ts) - for k,v in pairs(ts) do - td[k] = v - end -end - -local function _class(base,c_arg,c) - c = c or {} -- a new class instance, which is the metatable for all objects of this type - -- the class will be the metatable for all its objects, - -- and they will look up their methods in it. - local mt = {} -- a metatable for the class instance - - if type(base) == 'table' then - -- our new class is a shallow copy of the base class! - tupdate(c,base) - c._base = base - -- inherit the 'not found' handler, if present - if rawget(c,'_handler') then mt.__index = c._handler end - elseif base ~= nil then - error("must derive from a table type",3) - end - - c.__index = c - setmetatable(c,mt) - c._init = nil - - if base and rawget(base,'_class_init') then - base._class_init(c,c_arg) - end - - -- expose a ctor which can be called by () - mt.__call = function(class_tbl,...) - local obj = {} - setmetatable(obj,c) - - if rawget(c,'_init') then -- explicit constructor - local res = call_ctor(c,obj,...) - if res then -- _if_ a ctor returns a value, it becomes the object... - obj = res - setmetatable(obj,c) - end - elseif base and rawget(base,'_init') then -- default constructor - -- make sure that any stuff from the base class is initialized! - call_ctor(base,obj,...) - end - - if base and rawget(base,'_post_init') then - base._post_init(obj) - end - - if not rawget(c,'__tostring') then - c.__tostring = _class_tostring - end - return obj - end - -- Call Class.catch to set a handler for methods/properties not found in the class! - c.catch = function(handler) - c._handler = handler - mt.__index = handler - end - c.is_a = is_a - c.class_of = class_of - c._class = c - -- any object can have a specified delegate which is called with unrecognized methods - -- if _handler exists and obj[key] is nil, then pass onto handler! - c.delegate = function(self,obj) - mt.__index = function(tbl,key) - local method = obj[key] - if method then - return function(self,...) - return method(obj,...) - end - elseif self._handler then - return self._handler(tbl,key) - end - end - end - return c -end - ---- create a new class, derived from a given base class.
    --- Supporting two class creation syntaxes: --- either Name = class(base) or class.Name(base) --- @class function --- @name class --- @param base optional base class --- @param c_arg optional parameter to class ctor --- @param c optional table to be used as class -local class -class = setmetatable({},{ - __call = function(fun,...) - return _class(...) - end, - __index = function(tbl,key) - if key == 'class' then - io.stderr:write('require("pl.class").class is deprecated. Use require("pl.class")\n') - return class - end - local env = _G - return function(...) - local c = _class(...) - c._name = key - rawset(env,key,c) - return c - end - end -}) - - -return class - diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/comprehension.lua b/Utils/luarocks/systree/share/lua/5.1/pl/comprehension.lua deleted file mode 100644 index 9765bbf87..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/comprehension.lua +++ /dev/null @@ -1,288 +0,0 @@ ---- List comprehensions implemented in Lua.

    --- --- See the wiki page ---

    ---   local C= require 'pl.comprehension' . new()
    ---
    ---    C ('x for x=1,10') ()
    ---    ==> {1,2,3,4,5,6,7,8,9,10}
    ---    C 'x^2 for x=1,4' ()
    ---    ==> {1,4,9,16}
    ---    C '{x,x^2} for x=1,4' ()
    ---    ==> {{1,1},{2,4},{3,9},{4,16}}
    ---    C '2*x for x' {1,2,3}
    ---    ==> {2,4,6}
    ---    dbl = C '2*x for x'
    ---    dbl {10,20,30}
    ---    ==> {20,40,60}
    ---    C 'x for x if x % 2 == 0' {1,2,3,4,5}
    ---    ==> {2,4}
    ---    C '{x,y} for x = 1,2 for y = 1,2' ()
    ---    ==> {{1,1},{1,2},{2,1},{2,2}}
    ---    C '{x,y} for x for y' ({1,2},{10,20})
    ---    ==> {{1,10},{1,20},{2,10},{2,20}}
    ---   assert(C 'sum(x^2 for x)' {2,3,4} == 2^2+3^2+4^2)
    --- 
    --- ---

    (c) 2008 David Manura. Licensed under the same terms as Lua (MIT license). ---

    -- See the Guide --- @class module --- @name pl.comprehension - -local utils = require 'pl.utils' - ---~ local _VERSION, assert, getfenv, ipairs, load, math, pcall, require, setmetatable, table, tonumber = ---~ _G._VERSION, _G.assert, _G.getfenv, _G.ipairs, _G.load, _G.math, _G.pcall, _G.require, _G.setmetatable, _G.table, _G.tonumber - -local status,lb = pcall(require, "pl.luabalanced") -if not status then - lb = require 'luabalanced' -end - -local math_max = math.max -local table_concat = table.concat - --- fold operations --- http://en.wikipedia.org/wiki/Fold_(higher-order_function) -local ops = { - list = {init=' {} ', accum=' __result[#__result+1] = (%s) '}, - table = {init=' {} ', accum=' local __k, __v = %s __result[__k] = __v '}, - sum = {init=' 0 ', accum=' __result = __result + (%s) '}, - min = {init=' nil ', accum=' local __tmp = %s ' .. - ' if __result then if __tmp < __result then ' .. - '__result = __tmp end else __result = __tmp end '}, - max = {init=' nil ', accum=' local __tmp = %s ' .. - ' if __result then if __tmp > __result then ' .. - '__result = __tmp end else __result = __tmp end '}, -} - - --- Parses comprehension string expr. --- Returns output expression list string, array of for types --- ('=', 'in' or nil) , array of input variable name --- strings , array of input variable value strings --- , array of predicate expression strings , --- operation name string , and number of placeholder --- parameters . --- --- The is equivalent to the mathematical set-builder notation: --- --- { | in , } --- --- @usage "x^2 for x" -- array values --- @usage "x^2 for x=1,10,2" -- numeric for --- @usage "k^v for k,v in pairs(_1)" -- iterator for --- @usage "(x+y)^2 for x for y if x > y" -- nested --- -local function parse_comprehension(expr) - local t = {} - local pos = 1 - - -- extract opname (if exists) - local opname - local tok, post = expr:match('^%s*([%a_][%w_]*)%s*%(()', pos) - local pose = #expr + 1 - if tok then - local tok2, posb = lb.match_bracketed(expr, post-1) - assert(tok2, 'syntax error') - if expr:match('^%s*$', posb) then - opname = tok - pose = posb - 1 - pos = post - end - end - opname = opname or "list" - - -- extract out expression list - local out; out, pos = lb.match_explist(expr, pos) - assert(out, "syntax error: missing expression list") - out = table_concat(out, ', ') - - -- extract "for" clauses - local fortypes = {} - local invarlists = {} - local invallists = {} - while 1 do - local post = expr:match('^%s*for%s+()', pos) - if not post then break end - pos = post - - -- extract input vars - local iv; iv, pos = lb.match_namelist(expr, pos) - assert(#iv > 0, 'syntax error: zero variables') - for _,ident in ipairs(iv) do - assert(not ident:match'^__', - "identifier " .. ident .. " may not contain __ prefix") - end - invarlists[#invarlists+1] = iv - - -- extract '=' or 'in' (optional) - local fortype, post = expr:match('^(=)%s*()', pos) - if not fortype then fortype, post = expr:match('^(in)%s+()', pos) end - if fortype then - pos = post - -- extract input value range - local il; il, pos = lb.match_explist(expr, pos) - assert(#il > 0, 'syntax error: zero expressions') - assert(fortype ~= '=' or #il == 2 or #il == 3, - 'syntax error: numeric for requires 2 or three expressions') - fortypes[#invarlists] = fortype - invallists[#invarlists] = il - else - fortypes[#invarlists] = false - invallists[#invarlists] = false - end - end - assert(#invarlists > 0, 'syntax error: missing "for" clause') - - -- extract "if" clauses - local preds = {} - while 1 do - local post = expr:match('^%s*if%s+()', pos) - if not post then break end - pos = post - local pred; pred, pos = lb.match_expression(expr, pos) - assert(pred, 'syntax error: predicated expression not found') - preds[#preds+1] = pred - end - - -- extract number of parameter variables (name matching "_%d+") - local stmp = ''; lb.gsub(expr, function(u, sin) -- strip comments/strings - if u == 'e' then stmp = stmp .. ' ' .. sin .. ' ' end - end) - local max_param = 0; stmp:gsub('[%a_][%w_]*', function(s) - local s = s:match('^_(%d+)$') - if s then max_param = math_max(max_param, tonumber(s)) end - end) - - if pos ~= pose then - assert(false, "syntax error: unrecognized " .. expr:sub(pos)) - end - - --DEBUG: - --print('----\n', string.format("%q", expr), string.format("%q", out), opname) - --for k,v in ipairs(invarlists) do print(k,v, invallists[k]) end - --for k,v in ipairs(preds) do print(k,v) end - - return out, fortypes, invarlists, invallists, preds, opname, max_param -end - - --- Create Lua code string representing comprehension. --- Arguments are in the form returned by parse_comprehension. -local function code_comprehension( - out, fortypes, invarlists, invallists, preds, opname, max_param -) - local op = assert(ops[opname]) - local code = op.accum:gsub('%%s', out) - - for i=#preds,1,-1 do local pred = preds[i] - code = ' if ' .. pred .. ' then ' .. code .. ' end ' - end - for i=#invarlists,1,-1 do - if not fortypes[i] then - local arrayname = '__in' .. i - local idx = '__idx' .. i - code = - ' for ' .. idx .. ' = 1, #' .. arrayname .. ' do ' .. - ' local ' .. invarlists[i][1] .. ' = ' .. arrayname .. '['..idx..'] ' .. - code .. ' end ' - else - code = - ' for ' .. - table_concat(invarlists[i], ', ') .. - ' ' .. fortypes[i] .. ' ' .. - table_concat(invallists[i], ', ') .. - ' do ' .. code .. ' end ' - end - end - code = ' local __result = ( ' .. op.init .. ' ) ' .. code - return code -end - - --- Convert code string represented by code_comprehension --- into Lua function. Also must pass ninputs = #invarlists, --- max_param, and invallists (from parse_comprehension). --- Uses environment env. -local function wrap_comprehension(code, ninputs, max_param, invallists, env) - assert(ninputs > 0) - local ts = {} - for i=1,max_param do - ts[#ts+1] = '_' .. i - end - for i=1,ninputs do - if not invallists[i] then - local name = '__in' .. i - ts[#ts+1] = name - end - end - if #ts > 0 then - code = ' local ' .. table_concat(ts, ', ') .. ' = ... ' .. code - end - code = code .. ' return __result ' - --print('DEBUG:', code) - local f, err = utils.load(code,'tmp','t',env) - if not f then assert(false, err .. ' with generated code ' .. code) end - return f -end - - --- Build Lua function from comprehension string. --- Uses environment env. -local function build_comprehension(expr, env) - local out, fortypes, invarlists, invallists, preds, opname, max_param - = parse_comprehension(expr) - local code = code_comprehension( - out, fortypes, invarlists, invallists, preds, opname, max_param) - local f = wrap_comprehension(code, #invarlists, max_param, invallists, env) - return f -end - - --- Creates new comprehension cache. --- Any list comprehension function created are set to the environment --- env (defaults to caller of new). -local function new(env) - -- Note: using a single global comprehension cache would have had - -- security implications (e.g. retrieving cached functions created - -- in other environments). - -- The cache lookup function could have instead been written to retrieve - -- the caller's environment, lookup up the cache private to that - -- environment, and then looked up the function in that cache. - -- That would avoid the need for this call to - -- explicitly manage caches; however, that might also have an undue - -- performance penalty. - - if not env then - env = getfenv(2) - end - - local mt = {} - local cache = setmetatable({}, mt) - - -- Index operator builds, caches, and returns Lua function - -- corresponding to comprehension expression string. - -- - -- Example: f = comprehension['x^2 for x'] - -- - function mt:__index(expr) - local f = build_comprehension(expr, env) - self[expr] = f -- cache - return f - end - - -- Convenience syntax. - -- Allows comprehension 'x^2 for x' instead of comprehension['x^2 for x']. - mt.__call = mt.__index - - cache.new = new - - return cache -end - - -local comprehension = {} -comprehension.new = new - -return comprehension diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/config.lua b/Utils/luarocks/systree/share/lua/5.1/pl/config.lua deleted file mode 100644 index bd6b89781..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/config.lua +++ /dev/null @@ -1,169 +0,0 @@ ---- Reads configuration files into a Lua table.

    --- Understands INI files, classic Unix config files, and simple --- delimited columns of values.

    ---

    ---    # test.config
    ---    # Read timeout in seconds
    ---    read.timeout=10
    ---    # Write timeout in seconds
    ---    write.timeout=5
    ---    #acceptable ports
    ---    ports = 1002,1003,1004
    ---
    ---        -- readconfig.lua
    ---    require 'pl'
    ---    local t = config.read 'test.config'
    ---    print(pretty.write(t))
    ---
    ---    ### output #####
    ---   {
    ---      ports = {
    ---        1002,
    ---        1003,
    ---        1004
    ---      },
    ---      write_timeout = 5,
    ---      read_timeout = 10
    ---    }
    --- 
    --- See the Guide for further discussion --- @class module --- @name pl.config - -local type,tonumber,ipairs,io, table = _G.type,_G.tonumber,_G.ipairs,_G.io,_G.table - -local function split(s,re) - local res = {} - local t_insert = table.insert - re = '[^'..re..']+' - for k in s:gmatch(re) do t_insert(res,k) end - return res -end - -local function strip(s) - return s:gsub('^%s+',''):gsub('%s+$','') -end - -local function strip_quotes (s) - return s:gsub("['\"](.*)['\"]",'%1') -end - -local config = {} - ---- like io.lines(), but allows for lines to be continued with '\'. --- @param file a file-like object (anything where read() returns the next line) or a filename. --- Defaults to stardard input. --- @return an iterator over the lines, or nil --- @return error 'not a file-like object' or 'file is nil' -function config.lines(file) - local f,openf,err - local line = '' - if type(file) == 'string' then - f,err = io.open(file,'r') - if not f then return nil,err end - openf = true - else - f = file or io.stdin - if not file.read then return nil, 'not a file-like object' end - end - if not f then return nil, 'file is nil' end - return function() - local l = f:read() - while l do - -- does the line end with '\'? - local i = l:find '\\%s*$' - if i then -- if so, - line = line..l:sub(1,i-1) - elseif line == '' then - return l - else - l = line..l - line = '' - return l - end - l = f:read() - end - if openf then f:close() end - end -end - ---- read a configuration file into a table --- @param file either a file-like object or a string, which must be a filename --- @param cnfg a configuration table that may contain these fields: ---
      ---
    • variablilize make names into valid Lua identifiers (default true)
    • ---
    • convert_numbers try to convert values into numbers (default true)
    • ---
    • trim_space ensure that there is no starting or trailing whitespace with values (default true)
    • ---
    • trim_quotes remove quotes from strings (default false)
    • ---
    • list_delim delimiter to use when separating columns (default ',')
    • ---
    --- @return a table containing items, or nil --- @return error message (same as @{config.lines} -function config.read(file,cnfg) - local f,openf,err - cnfg = cnfg or {} - local function check_cnfg (var,def) - local val = cnfg[var] - if val == nil then return def else return val end - end - local t = {} - local top_t = t - local variablilize = check_cnfg ('variabilize',true) - local list_delim = check_cnfg('list_delim',',') - local convert_numbers = check_cnfg('convert_numbers',true) - local trim_space = check_cnfg('trim_space',true) - local trim_quotes = check_cnfg('trim_quotes',false) - local ignore_assign = check_cnfg('ignore_assign',false) - - local function process_name(key) - if variablilize then - key = key:gsub('[^%w]','_') - end - return key - end - - local function process_value(value) - if list_delim and value:find(list_delim) then - value = split(value,list_delim) - for i,v in ipairs(value) do - value[i] = process_value(v) - end - elseif convert_numbers and value:find('^[%d%+%-]') then - local val = tonumber(value) - if val then value = val end - end - if type(value) == 'string' then - if trim_space then value = strip(value) end - if trim_quotes then value = strip_quotes(value) end - end - return value - end - - local iter,err = config.lines(file) - if not iter then return nil,err end - for line in iter do - -- strips comments - local ci = line:find('%s*[#;]') - if ci then line = line:sub(1,ci-1) end - -- and ignore blank lines - if line:find('^%s*$') then - elseif line:find('^%[') then -- section! - local section = process_name(line:match('%[([^%]]+)%]')) - t = top_t - t[section] = {} - t = t[section] - else - local i1,i2 = line:find('%s*=%s*') - if i1 and not ignore_assign then -- key,value assignment - local key = process_name(line:sub(1,i1-1)) - local value = process_value(line:sub(i2+1)) - t[key] = value - else -- a plain list of values... - t[#t+1] = process_value(line) - end - end - end - return top_t -end - -return config diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/data.lua b/Utils/luarocks/systree/share/lua/5.1/pl/data.lua deleted file mode 100644 index 931c92692..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/data.lua +++ /dev/null @@ -1,588 +0,0 @@ ---- Reading and querying simple tabular data. ---
    --- data.read 'test.txt'
    --- ==> {{10,20},{2,5},{40,50},fieldnames={'x','y'},delim=','}
    --- 
    --- Provides a way of creating basic SQL-like queries. ---
    ---    require 'pl'
    ---    local d = data.read('xyz.txt')
    ---    local q = d:select('x,y,z where x > 3 and z < 2 sort by y')
    ---    for x,y,z in q do
    ---        print(x,y,z)
    ---    end
    --- 
    ---

    See the Guide --- @class module --- @name pl.data - -local utils = require 'pl.utils' -local _DEBUG = rawget(_G,'_DEBUG') - -local patterns,function_arg,usplit = utils.patterns,utils.function_arg,utils.split -local append,concat = table.insert,table.concat -local gsub = string.gsub -local io = io -local _G,print,loadstring,type,tonumber,ipairs,setmetatable,pcall,error,setfenv = _G,print,loadstring,type,tonumber,ipairs,setmetatable,pcall,error,setfenv - ---[[ -module ('pl.data',utils._module) -]] - -local data = {} - -local parse_select - -local function count(s,chr) - chr = utils.escape(chr) - local _,cnt = s:gsub(chr,' ') - return cnt -end - -local function rstrip(s) - return s:gsub('%s+$','') -end - -local function make_list(l) - return setmetatable(l,utils.stdmt.List) -end - -local function split(s,delim) - return make_list(usplit(s,delim)) -end - -local function map(fun,t) - local res = {} - for i = 1,#t do - append(res,fun(t[i])) - end - return res -end - -local function find(t,v) - for i = 1,#t do - if v == t[i] then return i end - end -end - -local DataMT = { - column_by_name = function(self,name) - if type(name) == 'number' then - name = '$'..name - end - local arr = {} - for res in data.query(self,name) do - append(arr,res) - end - return make_list(arr) - end, - - copy_select = function(self,condn) - condn = parse_select(condn,self) - local iter = data.query(self,condn) - local res = {} - local row = make_list{iter()} - while #row > 0 do - append(res,row) - row = make_list{iter()} - end - res.delim = self.delim - return data.new(res,split(condn.fields,',')) - end, - - column_names = function(self) - return self.fieldnames - end, -} -DataMT.__index = DataMT - ---- return a particular column as a list of values (Method).
    --- @param name either name of column, or numerical index. --- @class function --- @name Data.column_by_name - ---- return a query iterator on this data object (Method).
    --- @param condn the query expression --- @class function --- @name Data.select --- @see data.query - ---- return a new data object based on this query (Method).
    --- @param condn the query expression --- @class function --- @name Data.copy_select - ---- return the field names of this data object (Method).
    --- @class function --- @name Data.column_names - ---- write out a row (Method).
    --- @param f file-like object --- @class function --- @name Data.write_row - ---- write data out to file(Method).
    --- @param f file-like object --- @class function --- @name Data.write - - --- [guessing delimiter] We check for comma, tab and spaces in that order. --- [issue] any other delimiters to be checked? -local delims = {',','\t',' ',';'} - -local function guess_delim (line) - for _,delim in ipairs(delims) do - if count(line,delim) > 0 then - return delim == ' ' and '%s+' or delim - end - end - return ' ' -end - --- [file parameter] If it's a string, we try open as a filename. If nil, then --- either stdin or stdout depending on the mode. Otherwise, check if this is --- a file-like object (implements read or write depending) -local function open_file (f,mode) - local opened, err - local reading = mode == 'r' - if type(f) == 'string' then - if f == 'stdin' then - f = io.stdin - elseif f == 'stdout' then - f = io.stdout - else - f,err = io.open(f,mode) - if not f then return nil,err end - opened = true - end - end - if f and ((reading and not f.read) or (not reading and not f.write)) then - return nil, "not a file-like object" - end - return f,nil,opened -end - -local function all_n () - -end - ---- read a delimited file in a Lua table. --- By default, attempts to treat first line as separated list of fieldnames. --- @param file a filename or a file-like object (default stdin) --- @param cnfg options table: can override delim (a string pattern), fieldnames (a list), --- specify no_convert (default is to convert), numfields (indices of columns known --- to be numbers) and thousands_dot (thousands separator in Excel CSV is '.') -function data.read(file,cnfg) - local convert,err,opened - local D = {} - if not cnfg then cnfg = {} end - local f,err,opened = open_file(file,'r') - if not f then return nil, err end - local thousands_dot = cnfg.thousands_dot - - local function try_tonumber(x) - if thousands_dot then x = x:gsub('%.(...)','%1') end - return tonumber(x) - end - - local line = f:read() - if not line then return nil, "empty file" end - -- first question: what is the delimiter? - D.delim = cnfg.delim and cnfg.delim or guess_delim(line) - local delim = D.delim - local collect_end = cnfg.last_field_collect - local numfields = cnfg.numfields - -- some space-delimited data starts with a space. This should not be a column, - -- although it certainly would be for comma-separated, etc. - local strip - if delim == '%s+' and line:find(delim) == 1 then - strip = function(s) return s:gsub('^%s+','') end - line = strip(line) - end - -- first line will usually be field names. Unless fieldnames are specified, - -- we check if it contains purely numerical values for the case of reading - -- plain data files. - if not cnfg.fieldnames then - local fields = split(line,delim) - local nums = map(tonumber,fields) - if #nums == #fields then - convert = tonumber - append(D,nums) - numfields = {} - for i = 1,#nums do numfields[i] = i end - else - cnfg.fieldnames = fields - end - line = f:read() - if strip then line = strip(line) end - elseif type(cnfg.fieldnames) == 'string' then - cnfg.fieldnames = split(cnfg.fieldnames,delim) - end - -- at this point, the column headers have been read in. If the first - -- row consisted of numbers, it has already been added to the dataset. - if cnfg.fieldnames then - D.fieldnames = cnfg.fieldnames - -- [conversion] unless @no_convert, we need the numerical field indices - -- of the first data row. Can also be specified by @numfields. - if not cnfg.no_convert then - if not numfields then - numfields = {} - local fields = split(line,D.delim) - for i = 1,#fields do - if tonumber(fields[i]) then - append(numfields,i) - end - end - end - if #numfields > 0 then -- there are numerical fields - -- note that using dot as the thousands separator (@thousands_dot) - -- requires a special conversion function! - convert = thousands_dot and try_tonumber or tonumber - end - end - end - -- keep going until finished - while line do - if not line:find ('^%s*$') then - if strip then line = strip(line) end - local fields = split(line,delim) - if convert then - for k = 1,#numfields do - local i = numfields[k] - local val = convert(fields[i]) - if val == nil then - return nil, "not a number: "..fields[i] - else - fields[i] = val - end - end - end - -- [collecting end field] If @last_field_collect then we will collect - -- all extra space-delimited fields into a single last field. - if collect_end and #fields > #D.fieldnames then - local ends,N = {},#D.fieldnames - for i = N+1,#fields do - append(ends,fields[i]) - end - ends = concat(ends,' ') - local cfields = {} - for i = 1,N do cfields[i] = fields[i] end - cfields[N] = cfields[N]..' '..ends - fields = cfields - end - append(D,fields) - end - line = f:read() - end - if opened then f:close() end - if delim == '%s+' then D.delim = ' ' end - if not D.fieldnames then D.fieldnames = {} end - return data.new(D) -end - -local function write_row (data,f,row) - f:write(concat(row,data.delim),'\n') -end - -DataMT.write_row = write_row - -local function write (data,file) - local f,err,opened = open_file(file,'w') - if not f then return nil, err end - if #data.fieldnames > 0 then - f:write(concat(data.fieldnames,data.delim),'\n') - end - for i = 1,#data do - write_row(data,f,data[i]) - end - if opened then f:close() end -end - -DataMT.write = write - -local function massage_fieldnames (fields) - -- [fieldnames must be valid Lua identifiers] fix 0.8 was %A - for i = 1,#fields do - fields[i] = fields[i]:gsub('%W','_') - end -end - - ---- create a new dataset from a table of rows.
    --- Can specify the fieldnames, else the table must have a field called --- 'fieldnames', which is either a string of delimiter-separated names, --- or a table of names.
    --- If the table does not have a field called 'delim', then an attempt will be --- made to guess it from the fieldnames string, defaults otherwise to tab. --- @param d the table. --- @param fieldnames optional fieldnames --- @return the table. -function data.new (d,fieldnames) - d.fieldnames = d.fieldnames or fieldnames - if not d.delim and type(d.fieldnames) == 'string' then - d.delim = guess_delim(d.fieldnames) - d.fieldnames = split(d.fieldnames,d.delim) - end - d.fieldnames = make_list(d.fieldnames) - massage_fieldnames(d.fieldnames) - setmetatable(d,DataMT) - -- a query with just the fieldname will return a sequence - -- of values, which seq.copy turns into a table. - return d -end - -local sorted_query = [[ -return function (t) - local i = 0 - local v - local ls = {} - for i,v in ipairs(t) do - if CONDITION then - ls[#ls+1] = v - end - end - table.sort(ls,function(v1,v2) - return SORT_EXPR - end) - local n = #ls - return function() - i = i + 1 - v = ls[i] - if i > n then return end - return FIELDLIST - end -end -]] - --- question: is this optimized case actually worth the extra code? -local simple_query = [[ -return function (t) - local n = #t - local i = 0 - local v - return function() - repeat - i = i + 1 - v = t[i] - until i > n or CONDITION - if i > n then return end - return FIELDLIST - end -end -]] - -local function is_string (s) - return type(s) == 'string' -end - -local field_error - -local function fieldnames_as_string (data) - return concat(data.fieldnames,',') -end - -local function massage_fields(data,f) - local idx - if f:find '^%d+$' then - idx = tonumber(f) - else - idx = find(data.fieldnames,f) - end - if idx then - return 'v['..idx..']' - else - field_error = f..' not found in '..fieldnames_as_string(data) - return f - end -end - -local List = require 'pl.List' - -local function process_select (data,parms) - --- preparing fields ---- - local res,ret - field_error = nil - local fields = parms.fields - local numfields = fields:find '%$' or #data.fieldnames == 0 - if fields:find '^%s*%*%s*' then - if not numfields then - fields = fieldnames_as_string(data) - else - local ncol = #data[1] - fields = {} - for i = 1,ncol do append(fields,'$'..i) end - fields = concat(fields,',') - end - end - local idpat = patterns.IDEN - if numfields then - idpat = '%$(%d+)' - else - -- massage field names to replace non-identifier chars - fields = rstrip(fields):gsub('[^,%w]','_') - end - local massage_fields = utils.bind1(massage_fields,data) - ret = gsub(fields,idpat,massage_fields) - if field_error then return nil,field_error end - parms.fields = fields - parms.proc_fields = ret - parms.where = parms.where or 'true' - if is_string(parms.where) then - parms.where = gsub(parms.where,idpat,massage_fields) - field_error = nil - end - return true -end - - -parse_select = function(s,data) - local endp - local parms = {} - local w1,w2 = s:find('where ') - local s1,s2 = s:find('sort by ') - if w1 then -- where clause! - endp = (s1 or 0)-1 - parms.where = s:sub(w2+1,endp) - end - if s1 then -- sort by clause (must be last!) - parms.sort_by = s:sub(s2+1) - end - endp = (w1 or s1 or 0)-1 - parms.fields = s:sub(1,endp) - local status,err = process_select(data,parms) - if not status then return nil,err - else return parms end -end - ---- create a query iterator from a select string. --- Select string has this format:
    --- FIELDLIST [ where LUA-CONDN [ sort by FIELD] ]
    --- FIELDLIST is a comma-separated list of valid fields, or '*'.

    --- The condition can also be a table, with fields 'fields' (comma-sep string or --- table), 'sort_by' (string) and 'where' (Lua expression string or function) --- @param data table produced by read --- @param condn select string or table --- @param context a list of tables to be searched when resolving functions --- @param return_row if true, wrap the results in a row table --- @return an iterator over the specified fields, or nil --- @return an error message -function data.query(data,condn,context,return_row) - local err - if is_string(condn) then - condn,err = parse_select(condn,data) - if not condn then return nil,err end - elseif type(condn) == 'table' then - if type(condn.fields) == 'table' then - condn.fields = concat(condn.fields,',') - end - if not condn.proc_fields then - local status,err = process_select(data,condn) - if not status then return nil,err end - end - else - return nil, "condition must be a string or a table" - end - local query, k - if condn.sort_by then -- use sorted_query - query = sorted_query - else - query = simple_query - end - local fields = condn.proc_fields or condn.fields - if return_row then - fields = '{'..fields..'}' - end - query,k = query:gsub('FIELDLIST',fields) - if is_string(condn.where) then - query = query:gsub('CONDITION',condn.where) - condn.where = nil - else - query = query:gsub('CONDITION','_condn(v)') - condn.where = function_arg(0,condn.where,'condition.where must be callable') - end - if condn.sort_by then - local expr,sort_var,sort_dir - local sort_by = condn.sort_by - local i1,i2 = sort_by:find('%s+') - if i1 then - sort_var,sort_dir = sort_by:sub(1,i1-1),sort_by:sub(i2+1) - else - sort_var = sort_by - sort_dir = 'asc' - end - if sort_var:match '^%$' then sort_var = sort_var:sub(2) end - sort_var = massage_fields(data,sort_var) - if field_error then return nil,field_error end - if sort_dir == 'asc' then - sort_dir = '<' - else - sort_dir = '>' - end - expr = ('%s %s %s'):format(sort_var:gsub('v','v1'),sort_dir,sort_var:gsub('v','v2')) - query = query:gsub('SORT_EXPR',expr) - end - if condn.where then - query = 'return function(_condn) '..query..' end' - end - if _DEBUG then print(query) end - - local fn,err = loadstring(query,'tmp') - if not fn then return nil,err end - fn = fn() -- get the function - if condn.where then - fn = fn(condn.where) - end - local qfun = fn(data) - if context then - -- [specifying context for condition] @context is a list of tables which are - -- 'injected'into the condition's custom context - append(context,_G) - local lookup = {} - setfenv(qfun,lookup) - setmetatable(lookup,{ - __index = function(tbl,key) - -- _G.print(tbl,key) - for k,t in ipairs(context) do - if t[key] then return t[key] end - end - end - }) - end - return qfun -end - - -DataMT.select = data.query -DataMT.select_row = function(d,condn,context) - return data.query(d,condn,context,true) -end - ---- Filter input using a query. --- @param Q a query string --- @param infile filename or file-like object --- @param outfile filename or file-like object --- @param dont_fail true if you want to return an error, not just fail -function data.filter (Q,infile,outfile,dont_fail) - local err - local d = data.read(infile or 'stdin') - local out = open_file(outfile or 'stdout') - local iter,err = d:select(Q) - local delim = d.delim - if not iter then - err = 'error: '..err - if dont_fail then - return nil,err - else - utils.quit(1,err) - end - end - while true do - local res = {iter()} - if #res == 0 then break end - out:write(concat(res,delim),'\n') - end -end - -return data - diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/dir.lua b/Utils/luarocks/systree/share/lua/5.1/pl/dir.lua deleted file mode 100644 index 5cea49e27..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/dir.lua +++ /dev/null @@ -1,478 +0,0 @@ ---- Useful functions for getting directory contents and matching them against wildcards. --- @class module --- @name pl.dir - -local utils = require 'pl.utils' -local path = require 'pl.path' -local is_windows = path.is_windows -local tablex = require 'pl.tablex' -local ldir = path.dir -local chdir = path.chdir -local mkdir = path.mkdir -local rmdir = path.rmdir -local sub = string.sub -local os,pcall,ipairs,pairs,require,setmetatable,_G = os,pcall,ipairs,pairs,require,setmetatable,_G -local remove = os.remove -local append = table.insert -local wrap = coroutine.wrap -local yield = coroutine.yield -local assert_arg,assert_string,raise = utils.assert_arg,utils.assert_string,utils.raise -local List = utils.stdmt.List - ---[[ -module ('pl.dir',utils._module) -]] - -local dir = {} - -local function assert_dir (n,val) - assert_arg(n,val,'string',path.isdir,'not a directory') -end - -local function assert_file (n,val) - assert_arg(n,val,'string',path.isfile,'not a file') -end - -local function filemask(mask) - mask = utils.escape(mask) - return mask:gsub('%%%*','.+'):gsub('%%%?','.')..'$' -end - ---- does the filename match the shell pattern?. --- (cf. fnmatch.fnmatch in Python, 11.8) --- @param file A file name --- @param pattern A shell pattern --- @return true or false --- @raise file and pattern must be strings -function dir.fnmatch(file,pattern) - assert_string(1,file) - assert_string(2,pattern) - return path.normcase(file):find(filemask(pattern)) ~= nil -end - ---- return a list of all files which match the pattern. --- (cf. fnmatch.filter in Python, 11.8) --- @param files A table containing file names --- @param pattern A shell pattern. --- @return list of files --- @raise file and pattern must be strings -function dir.filter(files,pattern) - assert_arg(1,files,'table') - assert_string(2,pattern) - local res = {} - local mask = filemask(pattern) - for i,f in ipairs(files) do - if f:find(mask) then append(res,f) end - end - return setmetatable(res,List) -end - -local function _listfiles(dir,filemode,match) - local res = {} - local check = utils.choose(filemode,path.isfile,path.isdir) - if not dir then dir = '.' end - for f in ldir(dir) do - if f ~= '.' and f ~= '..' then - local p = path.join(dir,f) - if check(p) and (not match or match(p)) then - append(res,p) - end - end - end - return setmetatable(res,List) -end - ---- return a list of all files in a directory which match the a shell pattern. --- @param dir A directory. If not given, all files in current directory are returned. --- @param mask A shell pattern. If not given, all files are returned. --- @return lsit of files --- @raise dir and mask must be strings -function dir.getfiles(dir,mask) - assert_dir(1,dir) - assert_string(2,mask) - local match - if mask then - mask = filemask(mask) - match = function(f) - return f:find(mask) - end - end - return _listfiles(dir,true,match) -end - ---- return a list of all subdirectories of the directory. --- @param dir A directory --- @return a list of directories --- @raise dir must be a string -function dir.getdirectories(dir) - assert_dir(1,dir) - return _listfiles(dir,false) -end - -local function quote_argument (f) - f = path.normcase(f) - if f:find '%s' then - return '"'..f..'"' - else - return f - end -end - - -local alien,ffi,ffi_checked,CopyFile,MoveFile,GetLastError,win32_errors,cmd_tmpfile - -local function execute_command(cmd,parms) - if not cmd_tmpfile then cmd_tmpfile = path.tmpname () end - local err = path.is_windows and ' > ' or ' 2> ' - cmd = cmd..' '..parms..err..cmd_tmpfile - local ret = utils.execute(cmd) - if not ret then - return false,(utils.readfile(cmd_tmpfile):gsub('\n(.*)','')) - else - return true - end -end - -local function find_ffi_copyfile () - if not ffi_checked then - ffi_checked = true - local res - res,alien = pcall(require,'alien') - if not res then - alien = nil - res, ffi = pcall(require,'ffi') - end - if not res then - ffi = nil - return - end - else - return - end - if alien then - -- register the Win32 CopyFile and MoveFile functions - local kernel = alien.load('kernel32.dll') - CopyFile = kernel.CopyFileA - CopyFile:types{'string','string','int',ret='int',abi='stdcall'} - MoveFile = kernel.MoveFileA - MoveFile:types{'string','string',ret='int',abi='stdcall'} - GetLastError = kernel.GetLastError - GetLastError:types{ret ='int', abi='stdcall'} - elseif ffi then - ffi.cdef [[ - int CopyFileA(const char *src, const char *dest, int iovr); - int MoveFileA(const char *src, const char *dest); - int GetLastError(); - ]] - CopyFile = ffi.C.CopyFileA - MoveFile = ffi.C.MoveFileA - GetLastError = ffi.C.GetLastError - end - win32_errors = { - ERROR_FILE_NOT_FOUND = 2, - ERROR_PATH_NOT_FOUND = 3, - ERROR_ACCESS_DENIED = 5, - ERROR_WRITE_PROTECT = 19, - ERROR_BAD_UNIT = 20, - ERROR_NOT_READY = 21, - ERROR_WRITE_FAULT = 29, - ERROR_READ_FAULT = 30, - ERROR_SHARING_VIOLATION = 32, - ERROR_LOCK_VIOLATION = 33, - ERROR_HANDLE_DISK_FULL = 39, - ERROR_BAD_NETPATH = 53, - ERROR_NETWORK_BUSY = 54, - ERROR_DEV_NOT_EXIST = 55, - ERROR_FILE_EXISTS = 80, - ERROR_OPEN_FAILED = 110, - ERROR_INVALID_NAME = 123, - ERROR_BAD_PATHNAME = 161, - ERROR_ALREADY_EXISTS = 183, - } -end - -local function two_arguments (f1,f2) - return quote_argument(f1)..' '..quote_argument(f2) -end - -local function file_op (is_copy,src,dest,flag) - if flag == 1 and path.exists(dest) then - return false,"cannot overwrite destination" - end - if is_windows then - -- if we haven't tried to load Alien/LuaJIT FFI before, then do so - find_ffi_copyfile() - -- fallback if there's no Alien, just use DOS commands *shudder* - -- 'rename' involves a copy and then deleting the source. - if not CopyFile then - src = path.normcase(src) - dest = path.normcase(dest) - local cmd = is_copy and 'copy' or 'rename' - local res, err = execute_command('copy',two_arguments(src,dest)) - if not res then return nil,err end - if not is_copy then - return execute_command('del',quote_argument(src)) - end - else - if path.isdir(dest) then - dest = path.join(dest,path.basename(src)) - end - local ret - if is_copy then ret = CopyFile(src,dest,flag) - else ret = MoveFile(src,dest) end - if ret == 0 then - local err = GetLastError() - for name,value in pairs(win32_errors) do - if value == err then return false,name end - end - return false,"Error #"..err - else return true - end - end - else -- for Unix, just use cp for now - return execute_command(is_copy and 'cp' or 'mv', - two_arguments(src,dest)) - end -end - ---- copy a file. --- @param src source file --- @param dest destination file or directory --- @param flag true if you want to force the copy (default) --- @return true if operation succeeded --- @raise src and dest must be strings -function dir.copyfile (src,dest,flag) - assert_string(1,src) - assert_string(2,dest) - flag = flag==nil or flag - return file_op(true,src,dest,flag and 0 or 1) -end - ---- move a file. --- @param src source file --- @param dest destination file or directory --- @return true if operation succeeded --- @raise src and dest must be strings -function dir.movefile (src,dest) - assert_string(1,src) - assert_string(2,dest) - return file_op(false,src,dest,0) -end - -local function _dirfiles(dir,attrib) - local dirs = {} - local files = {} - for f in ldir(dir) do - if f ~= '.' and f ~= '..' then - local p = path.join(dir,f) - local mode = attrib(p,'mode') - if mode=='directory' then - append(dirs,f) - else - append(files,f) - end - end - end - return setmetatable(dirs,List),setmetatable(files,List) -end - - -local function _walker(root,bottom_up,attrib) - local dirs,files = _dirfiles(root,attrib) - if not bottom_up then yield(root,dirs,files) end - for i,d in ipairs(dirs) do - _walker(root..path.sep..d,bottom_up,attrib) - end - if bottom_up then yield(root,dirs,files) end -end - ---- return an iterator which walks through a directory tree starting at root. --- The iterator returns (root,dirs,files) --- Note that dirs and files are lists of names (i.e. you must say path.join(root,d) --- to get the actual full path) --- If bottom_up is false (or not present), then the entries at the current level are returned --- before we go deeper. This means that you can modify the returned list of directories before --- continuing. --- This is a clone of os.walk from the Python libraries. --- @param root A starting directory --- @param bottom_up False if we start listing entries immediately. --- @param follow_links follow symbolic links --- @return an iterator returning root,dirs,files --- @raise root must be a string -function dir.walk(root,bottom_up,follow_links) - assert_string(1,root) - if not path.isdir(root) then return raise 'not a directory' end - local attrib - if path.is_windows or not follow_links then - attrib = path.attrib - else - attrib = path.link_attrib - end - return wrap(function () _walker(root,bottom_up,attrib) end) -end - ---- remove a whole directory tree. --- @param fullpath A directory path --- @return true or nil --- @return error if failed --- @raise fullpath must be a string -function dir.rmtree(fullpath) - assert_string(1,fullpath) - if not path.isdir(fullpath) then return raise 'not a directory' end - if path.islink(fullpath) then return false,'will not follow symlink' end - for root,dirs,files in dir.walk(fullpath,true) do - for i,f in ipairs(files) do - remove(path.join(root,f)) - end - rmdir(root) - end - return true -end - -local dirpat -if path.is_windows then - dirpat = '(.+)\\[^\\]+$' -else - dirpat = '(.+)/[^/]+$' -end - -local _makepath -function _makepath(p) - -- windows root drive case - if p:find '^%a:[\\]*$' then - return true - end - if not path.isdir(p) then - local subp = p:match(dirpat) - if not _makepath(subp) then return raise ('cannot create '..subp) end - return mkdir(p) - else - return true - end -end - ---- create a directory path. --- This will create subdirectories as necessary! --- @param p A directory path --- @return a valid created path --- @raise p must be a string -function dir.makepath (p) - assert_string(1,p) - return _makepath(path.normcase(path.abspath(p))) -end - - ---- clone a directory tree. Will always try to create a new directory structure --- if necessary. --- @param path1 the base path of the source tree --- @param path2 the new base path for the destination --- @param file_fun an optional function to apply on all files --- @param verbose an optional boolean to control the verbosity of the output. --- It can also be a logging function that behaves like print() --- @return true, or nil --- @return error message, or list of failed directory creations --- @return list of failed file operations --- @raise path1 and path2 must be strings --- @usage clonetree('.','../backup',copyfile) -function dir.clonetree (path1,path2,file_fun,verbose) - assert_string(1,path1) - assert_string(2,path2) - if verbose == true then verbose = print end - local abspath,normcase,isdir,join = path.abspath,path.normcase,path.isdir,path.join - local faildirs,failfiles = {},{} - if not isdir(path1) then return raise 'source is not a valid directory' end - path1 = abspath(normcase(path1)) - path2 = abspath(normcase(path2)) - if verbose then verbose('normalized:',path1,path2) end - -- particularly NB that the new path isn't fully contained in the old path - if path1 == path2 then return raise "paths are the same" end - local i1,i2 = path2:find(path1,1,true) - if i2 == #path1 and path2:sub(i2+1,i2+1) == path.sep then - return raise 'destination is a subdirectory of the source' - end - local cp = path.common_prefix (path1,path2) - local idx = #cp - if idx == 0 then -- no common path, but watch out for Windows paths! - if path1:sub(2,2) == ':' then idx = 3 end - end - for root,dirs,files in dir.walk(path1) do - local opath = path2..root:sub(idx) - if verbose then verbose('paths:',opath,root) end - if not isdir(opath) then - local ret = dir.makepath(opath) - if not ret then append(faildirs,opath) end - if verbose then verbose('creating:',opath,ret) end - end - if file_fun then - for i,f in ipairs(files) do - local p1 = join(root,f) - local p2 = join(opath,f) - local ret = file_fun(p1,p2) - if not ret then append(failfiles,p2) end - if verbose then - verbose('files:',p1,p2,ret) - end - end - end - end - return true,faildirs,failfiles -end - ---- return an iterator over all entries in a directory tree --- @param d a directory --- @return an iterator giving pathname and mode (true for dir, false otherwise) --- @raise d must be a non-empty string -function dir.dirtree( d ) - assert( d and d ~= "", "directory parameter is missing or empty" ) - local exists, isdir = path.exists, path.isdir - local sep = path.sep - - local last = sub ( d, -1 ) - if last == sep or last == '/' then - d = sub( d, 1, -2 ) - end - - local function yieldtree( dir ) - for entry in ldir( dir ) do - if entry ~= "." and entry ~= ".." then - entry = dir .. sep .. entry - if exists(entry) then -- Just in case a symlink is broken. - local is_dir = isdir(entry) - yield( entry, is_dir ) - if is_dir then - yieldtree( entry ) - end - end - end - end - end - - return wrap( function() yieldtree( d ) end ) -end - - ---- Recursively returns all the file starting at path. It can optionally take a shell pattern and --- only returns files that match pattern. If a pattern is given it will do a case insensitive search. --- @param start_path {string} A directory. If not given, all files in current directory are returned. --- @param pattern {string} A shell pattern. If not given, all files are returned. --- @return Table containing all the files found recursively starting at path and filtered by pattern. --- @raise start_path must be a string -function dir.getallfiles( start_path, pattern ) - assert( type( start_path ) == "string", "bad argument #1 to 'GetAllFiles' (Expected string but recieved " .. type( start_path ) .. ")" ) - pattern = pattern or "" - - local files = {} - local normcase = path.normcase - for filename, mode in dir.dirtree( start_path ) do - if not mode then - local mask = filemask( pattern ) - if normcase(filename):find( mask ) then - files[#files + 1] = filename - end - end - end - - return files -end - -return dir diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/file.lua b/Utils/luarocks/systree/share/lua/5.1/pl/file.lua deleted file mode 100644 index 6c82e2859..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/file.lua +++ /dev/null @@ -1,69 +0,0 @@ ---- File manipulation functions: reading, writing, moving and copying. --- @class module --- @name pl.file -local os = os -local utils = require 'pl.utils' -local dir = require 'pl.dir' -local path = require 'pl.path' - ---[[ -module ('pl.file',utils._module) -]] -local file = {} - ---- return the contents of a file as a string --- @class function --- @name file.read --- @param filename The file path --- @return file contents -file.read = utils.readfile - ---- write a string to a file --- @class function --- @name file.write --- @param filename The file path --- @param str The string -file.write = utils.writefile - ---- copy a file. --- @class function --- @name file.copy --- @param src source file --- @param dest destination file --- @param flag true if you want to force the copy (default) --- @return true if operation succeeded -file.copy = dir.copyfile - ---- move a file. --- @class function --- @name file.move --- @param src source file --- @param dest destination file --- @return true if operation succeeded, else false and the reason for the error. -file.move = dir.movefile - ---- Return the time of last access as the number of seconds since the epoch. --- @class function --- @name file.access_time --- @param path A file path -file.access_time = path.getatime - ----Return when the file was created. --- @class function --- @name file.creation_time --- @param path A file path -file.creation_time = path.getctime - ---- Return the time of last modification --- @class function --- @name file.modified_time --- @param path A file path -file.modified_time = path.getmtime - ---- Delete a file --- @class function --- @name file.delete --- @param path A file path -file.delete = os.remove - -return file diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/func.lua b/Utils/luarocks/systree/share/lua/5.1/pl/func.lua deleted file mode 100644 index 3711c9a71..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/func.lua +++ /dev/null @@ -1,379 +0,0 @@ ---- Functional helpers like composition, binding and placeholder expressions. --- Placeholder expressions are useful for short anonymous functions, and were --- inspired by the Boost Lambda library. ---

    --- utils.import 'pl.func'
    --- ls = List{10,20,30}
    --- = ls:map(_1+1)
    ---    {11,21,31}
    --- 
    --- They can also be used to bind particular arguments of a function. ---
    --- p = bind(print,'start>',_0)
    --- p(10,20,30)
    --- start>   10   20  30
    --- 
    --- See the Guide --- @class module --- @name pl.func -local type,select,setmetatable,getmetatable,rawset = type,select,setmetatable,getmetatable,rawset -local concat,append = table.concat,table.insert -local max = math.max -local print,tostring = print,tostring -local pairs,ipairs,loadstring,rawget,unpack = pairs,ipairs,loadstring,rawget,unpack -local _G = _G -local utils = require 'pl.utils' -local tablex = require 'pl.tablex' -local map = tablex.map -local _DEBUG = rawget(_G,'_DEBUG') -local assert_arg = utils.assert_arg - ---[[ -module ('pl.func',utils._module) -]] - -local func = {} - --- metatable for Placeholder Expressions (PE) -local _PEMT = {} - -local function P (t) - setmetatable(t,_PEMT) - return t -end - -func.PE = P - -local function isPE (obj) - return getmetatable(obj) == _PEMT -end - -func.isPE = isPE - --- construct a placeholder variable (e.g _1 and _2) -local function PH (idx) - return P {op='X',repr='_'..idx, index=idx} -end - --- construct a constant placeholder variable (e.g _C1 and _C2) -local function CPH (idx) - return P {op='X',repr='_C'..idx, index=idx} -end - -func._1,func._2,func._3,func._4,func._5 = PH(1),PH(2),PH(3),PH(4),PH(5) -func._0 = P{op='X',repr='...',index=0} - -function func.Var (name) - local ls = utils.split(name,'[%s,]+') - local res = {} - for _,n in ipairs(ls) do - append(res,P{op='X',repr=n,index=0}) - end - return unpack(res) -end - -function func._ (value) - return P{op='X',repr=value,index='wrap'} -end - -local repr - -func.Nil = func.Var 'nil' - -function _PEMT.__index(obj,key) - return P{op='[]',obj,key} -end - -function _PEMT.__call(fun,...) - return P{op='()',fun,...} -end - -function _PEMT.__tostring (e) - return repr(e) -end - -function _PEMT.__unm(arg) - return P{op='-',arg} -end - -function func.Not (arg) - return P{op='not',arg} -end - -function func.Len (arg) - return P{op='#',arg} -end - - -local function binreg(context,t) - for name,op in pairs(t) do - rawset(context,name,function(x,y) - return P{op=op,x,y} - end) - end -end - -local function import_name (name,fun,context) - rawset(context,name,function(...) - return P{op='()',fun,...} - end) -end - -local imported_functions = {} - -local function is_global_table (n) - return type(_G[n]) == 'table' -end - ---- wrap a table of functions. This makes them available for use in --- placeholder expressions. --- @param tname a table name --- @param context context to put results, defaults to environment of caller -function func.import(tname,context) - assert_arg(1,tname,'string',is_global_table,'arg# 1: not a name of a global table') - local t = _G[tname] - context = context or _G - for name,fun in pairs(t) do - import_name(name,fun,context) - imported_functions[fun] = name - end -end - ---- register a function for use in placeholder expressions. --- @param fun a function --- @param name an optional name --- @return a placeholder functiond -function func.register (fun,name) - assert_arg(1,fun,'function') - if name then - assert_arg(2,name,'string') - imported_functions[fun] = name - end - return function(...) - return P{op='()',fun,...} - end -end - -function func.lookup_imported_name (fun) - return imported_functions[fun] -end - -local function _arg(...) return ... end - -function func.Args (...) - return P{op='()',_arg,...} -end - --- binary and unary operators, with their precedences (see 2.5.6) -local operators = { - ['or'] = 0, - ['and'] = 1, - ['=='] = 2, ['~='] = 2, ['<'] = 2, ['>'] = 2, ['<='] = 2, ['>='] = 2, - ['..'] = 3, - ['+'] = 4, ['-'] = 4, - ['*'] = 5, ['/'] = 5, ['%'] = 5, - ['not'] = 6, ['#'] = 6, ['-'] = 6, - ['^'] = 7 -} - --- comparisons (as prefix functions) -binreg (func,{And='and',Or='or',Eq='==',Lt='<',Gt='>',Le='<=',Ge='>='}) - --- standard binary operators (as metamethods) -binreg (_PEMT,{__add='+',__sub='-',__mul='*',__div='/',__mod='%',__pow='^',__concat='..'}) - -binreg (_PEMT,{__eq='=='}) - ---- all elements of a table except the first. --- @param ls a list-like table. -function func.tail (ls) - assert_arg(1,ls,'table') - local res = {} - for i = 2,#ls do - append(res,ls[i]) - end - return res -end - ---- create a string representation of a placeholder expression. --- @param e a placeholder expression --- @param lastpred not used -function repr (e,lastpred) - local tail = func.tail - if isPE(e) then - local pred = operators[e.op] - local ls = map(repr,e,pred) - if pred then --unary or binary operator - if #ls ~= 1 then - local s = concat(ls,' '..e.op..' ') - if lastpred and lastpred > pred then - s = '('..s..')' - end - return s - else - return e.op..' '..ls[1] - end - else -- either postfix, or a placeholder - if e.op == '[]' then - return ls[1]..'['..ls[2]..']' - elseif e.op == '()' then - local fn - if ls[1] ~= nil then -- was _args, undeclared! - fn = ls[1] - else - fn = '' - end - return fn..'('..concat(tail(ls),',')..')' - else - return e.repr - end - end - elseif type(e) == 'string' then - return '"'..e..'"' - elseif type(e) == 'function' then - local name = func.lookup_imported_name(e) - if name then return name else return tostring(e) end - else - return tostring(e) --should not really get here! - end -end -func.repr = repr - --- collect all the non-PE values in this PE into vlist, and replace each occurence --- with a constant PH (_C1, etc). Return the maximum placeholder index found. -local collect_values -function collect_values (e,vlist) - if isPE(e) then - if e.op ~= 'X' then - local m = 0 - for i,subx in ipairs(e) do - local pe = isPE(subx) - if pe then - if subx.op == 'X' and subx.index == 'wrap' then - subx = subx.repr - pe = false - else - m = max(m,collect_values(subx,vlist)) - end - end - if not pe then - append(vlist,subx) - e[i] = CPH(#vlist) - end - end - return m - else -- was a placeholder, it has an index... - return e.index - end - else -- plain value has no placeholder dependence - return 0 - end -end -func.collect_values = collect_values - ---- instantiate a PE into an actual function. First we find the largest placeholder used, --- e.g. _2; from this a list of the formal parameters can be build. Then we collect and replace --- any non-PE values from the PE, and build up a constant binding list. --- Finally, the expression can be compiled, and e.__PE_function is set. --- @param e a placeholder expression --- @return a function -function func.instantiate (e) - local consts,values,parms = {},{},{} - local rep, err, fun - local n = func.collect_values(e,values) - for i = 1,#values do - append(consts,'_C'..i) - if _DEBUG then print(i,values[i]) end - end - for i =1,n do - append(parms,'_'..i) - end - consts = concat(consts,',') - parms = concat(parms,',') - rep = repr(e) - local fstr = ('return function(%s) return function(%s) return %s end end'):format(consts,parms,rep) - if _DEBUG then print(fstr) end - fun,err = loadstring(fstr,'fun') - if not fun then return nil,err end - fun = fun() -- get wrapper - fun = fun(unpack(values)) -- call wrapper (values could be empty) - e.__PE_function = fun - return fun -end - ---- instantiate a PE unless it has already been done. --- @param e a placeholder expression --- @return the function -function func.I(e) - if rawget(e,'__PE_function') then - return e.__PE_function - else return func.instantiate(e) - end -end - -utils.add_function_factory(_PEMT,func.I) - ---- bind the first parameter of the function to a value. --- @class function --- @name func.curry --- @param fn a function of one or more arguments --- @param p a value --- @return a function of one less argument --- @usage (curry(math.max,10))(20) == math.max(10,20) -func.curry = utils.bind1 - ---- create a function which chains two functions. --- @param f a function of at least one argument --- @param g a function of at least one argument --- @return a function --- @usage printf = compose(io.write,string.format) -function func.compose (f,g) - return function(...) return f(g(...)) end -end - ---- bind the arguments of a function to given values. --- bind(fn,v,_2) is equivalent to curry(fn,v). --- @param fn a function of at least one argument --- @param ... values or placeholder variables --- @return a function --- @usage (bind(f,_1,a))(b) == f(a,b) --- @usage (bind(f,_2,_1))(a,b) == f(b,a) -function func.bind(fn,...) - local args = table.pack(...) - local holders,parms,bvalues,values = {},{},{'fn'},{} - local nv,maxplace,varargs = 1,0,false - for i = 1,args.n do - local a = args[i] - if isPE(a) and a.op == 'X' then - append(holders,a.repr) - maxplace = max(maxplace,a.index) - if a.index == 0 then varargs = true end - else - local v = '_v'..nv - append(bvalues,v) - append(holders,v) - append(values,a) - nv = nv + 1 - end - end - for np = 1,maxplace do - append(parms,'_'..np) - end - if varargs then append(parms,'...') end - bvalues = concat(bvalues,',') - parms = concat(parms,',') - holders = concat(holders,',') - local fstr = ([[ -return function (%s) - return function(%s) return fn(%s) end -end -]]):format(bvalues,parms,holders) - if _DEBUG then print(fstr) end - local res,err = loadstring(fstr) - res = res() - return res(fn,unpack(values)) -end - -return func - - diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/init.lua b/Utils/luarocks/systree/share/lua/5.1/pl/init.lua deleted file mode 100644 index ee336e57c..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/init.lua +++ /dev/null @@ -1,47 +0,0 @@ --------------- --- entry point for loading all PL libraries only on demand. --- Requiring 'pl' means that whenever a module is accesssed (e.g. utils.split) --- then that module is dynamically loaded. The submodules are all brought into --- the global space. --- @class module --- @name pl - -local modules = { - utils = true,path=true,dir=true,tablex=true,stringio=true,sip=true, - input=true,seq=true,lexer=true,stringx=true, - config=true,pretty=true,data=true,func=true,text=true, - operator=true,lapp=true,array2d=true, - comprehension=true,xml=true, - test = true, app = true, file = true, class = true, List = true, - Map = true, Set = true, OrderedMap = true, MultiMap = true, - Date = true, - -- classes -- -} -_G.utils = require 'pl.utils' - -for name,klass in pairs(_G.utils.stdmt) do - klass.__index = function(t,key) - return require ('pl.'..name)[key] - end; -end - -local _hook -setmetatable(_G,{ - hook = function(handler) - _hook = handler - end, - __index = function(t,name) - local found = modules[name] - -- either true, or the name of the module containing this class. - -- either way, we load the required module and make it globally available. - if found then - -- e..g pretty.dump causes pl.pretty to become available as 'pretty' - rawset(_G,name,require('pl.'..name)) - return _G[name] - elseif _hook then - return _hook(t,name) - end - end -}) - -if _G.PENLIGHT_STRICT then require 'pl.strict' end diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/input.lua b/Utils/luarocks/systree/share/lua/5.1/pl/input.lua deleted file mode 100644 index ea566f470..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/input.lua +++ /dev/null @@ -1,172 +0,0 @@ ---- Iterators for extracting words or numbers from an input source. ---
    ---    require 'pl'
    ---    local total,n = seq.sum(input.numbers())
    ---    print('average',total/n)
    --- 
    ---

    See here --- @class module --- @name pl.input -local strfind = string.find -local strsub = string.sub -local strmatch = string.match -local pairs,type,unpack,tonumber = pairs,type,unpack,tonumber -local utils = require 'pl.utils' -local patterns = utils.patterns -local io = io -local assert_arg = utils.assert_arg - ---[[ -module ('pl.input',utils._module) -]] - -local input = {} - ---- create an iterator over all tokens. --- based on allwords from PiL, 7.1 --- @param getter any function that returns a line of text --- @param pattern --- @param fn Optionally can pass a function to process each token as it/s found. --- @return an iterator -function input.alltokens (getter,pattern,fn) - local line = getter() -- current line - local pos = 1 -- current position in the line - return function () -- iterator function - while line do -- repeat while there are lines - local s, e = strfind(line, pattern, pos) - if s then -- found a word? - pos = e + 1 -- next position is after this token - local res = strsub(line, s, e) -- return the token - if fn then res = fn(res) end - return res - else - line = getter() -- token not found; try next line - pos = 1 -- restart from first position - end - end - return nil -- no more lines: end of traversal - end -end -local alltokens = input.alltokens - --- question: shd this _split_ a string containing line feeds? - ---- create a function which grabs the next value from a source. If the source is a string, then the getter --- will return the string and thereafter return nil. If not specified then the source is assumed to be stdin. --- @param f a string or a file-like object (i.e. has a read() method which returns the next line) --- @return a getter function -function input.create_getter(f) - if f then - if type(f) == 'string' then - local ls = utils.split(f,'\n') - local i,n = 0,#ls - return function() - i = i + 1 - if i > n then return nil end - return ls[i] - end - else - -- anything that supports the read() method! - if not f.read then error('not a file-like object') end - return function() return f:read() end - end - else - return io.read -- i.e. just read from stdin - end -end - ---- generate a sequence of numbers from a source. --- @param f A source --- @return An iterator -function input.numbers(f) - return alltokens(input.create_getter(f), - '('..patterns.FLOAT..')',tonumber) -end - ---- generate a sequence of words from a source. --- @param f A source --- @return An iterator -function input.words(f) - return alltokens(input.create_getter(f),"%w+") -end - -local function apply_tonumber (no_fail,...) - local args = {...} - for i = 1,#args do - local n = tonumber(args[i]) - if n == nil then - if not no_fail then return nil,args[i] end - else - args[i] = n - end - end - return args -end - ---- parse an input source into fields. --- By default, will fail if it cannot convert a field to a number. --- @param ids a list of field indices, or a maximum field index --- @param delim delimiter to parse fields (default space) --- @param f a source @see create_getter --- @param opts option table, {no_fail=true} --- @return an iterator with the field values --- @usage for x,y in fields {2,3} do print(x,y) end -- 2nd and 3rd fields from stdin -function input.fields (ids,delim,f,opts) - local sep - local s - local getter = input.create_getter(f) - local no_fail = opts and opts.no_fail - local no_convert = opts and opts.no_convert - if not delim or delim == ' ' then - delim = '%s' - sep = '%s+' - s = '%s*' - else - sep = delim - s = '' - end - local max_id = 0 - if type(ids) == 'table' then - for i,id in pairs(ids) do - if id > max_id then max_id = id end - end - else - max_id = ids - ids = {} - for i = 1,max_id do ids[#ids+1] = i end - end - local pat = '[^'..delim..']*' - local k = 1 - for i = 1,max_id do - if ids[k] == i then - k = k + 1 - s = s..'('..pat..')' - else - s = s..pat - end - if i < max_id then - s = s..sep - end - end - local linecount = 1 - return function() - local line,results,err - repeat - line = getter() - linecount = linecount + 1 - if not line then return nil end - if no_convert then - results = {strmatch(line,s)} - else - results,err = apply_tonumber(no_fail,strmatch(line,s)) - if not results then - utils.quit("line "..(linecount-1)..": cannot convert '"..err.."' to number") - end - end - until #results > 0 - return unpack(results) - end -end - -return input - diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/lapp.lua b/Utils/luarocks/systree/share/lua/5.1/pl/lapp.lua deleted file mode 100644 index 80a81294a..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/lapp.lua +++ /dev/null @@ -1,350 +0,0 @@ ---- Simple command-line parsing using human-readable specification. --- Supports GNU-style parameters. ---

    ---      lapp = require 'pl.lapp'
    ---      local args = lapp [[
    ---      Does some calculations
    ---        -o,--offset (default 0.0)  Offset to add to scaled number
    ---        -s,--scale  (number)  Scaling factor
    ---         <number> (number )  Number to be scaled
    ---      ]]
    ---
    ---      print(args.offset + args.scale * args.number)
    --- 
    --- Lines begining with '-' are flags; there may be a short and a long name; --- lines begining wih '<var>' are arguments. Anything in parens after --- the flag/argument is either a default, a type name or a range constraint. ---

    See the Guide --- @class module --- @name pl.lapp - -local status,sip = pcall(require,'pl.sip') -if not status then - sip = require 'sip' -end -local match = sip.match_at_start -local append,tinsert = table.insert,table.insert - ---[[ -module('pl.lapp') -]] - -local function lines(s) return s:gmatch('([^\n]*)\n') end -local function lstrip(str) return str:gsub('^%s+','') end -local function strip(str) return lstrip(str):gsub('%s+$','') end -local function at(s,k) return s:sub(k,k) end -local function isdigit(s) return s:find('^%d+$') == 1 end - -local lapp = {} - -local open_files,parms,aliases,parmlist,usage,windows,script - -lapp.callback = false -- keep Strict happy - -local filetypes = { - stdin = {io.stdin,'file-in'}, stdout = {io.stdout,'file-out'}, - stderr = {io.stderr,'file-out'} -} - ---- controls whether to dump usage on error. --- Defaults to true -lapp.show_usage_error = true - ---- quit this script immediately. --- @param msg optional message --- @param no_usage suppress 'usage' display -function lapp.quit(msg,no_usage) - if msg then - io.stderr:write(msg..'\n\n') - end - if not no_usage then - io.stderr:write(usage) - end - os.exit(1); -end - ---- print an error to stderr and quit. --- @param msg a message --- @param no_usage suppress 'usage' display -function lapp.error(msg,no_usage) - if not lapp.show_usage_error then - no_usage = true - end - lapp.quit(script..':'..msg,no_usage) -end - ---- open a file. --- This will quit on error, and keep a list of file objects for later cleanup. --- @param file filename --- @param opt same as second parameter of io.open -function lapp.open (file,opt) - local val,err = io.open(file,opt) - if not val then lapp.error(err,true) end - append(open_files,val) - return val -end - ---- quit if the condition is false. --- @param condn a condition --- @param msg an optional message -function lapp.assert(condn,msg) - if not condn then - lapp.error(msg) - end -end - -local function range_check(x,min,max,parm) - lapp.assert(min <= x and max >= x,parm..' out of range') -end - -local function xtonumber(s) - local val = tonumber(s) - if not val then lapp.error("unable to convert to number: "..s) end - return val -end - -local function is_filetype(type) - return type == 'file-in' or type == 'file-out' -end - -local types - -local function convert_parameter(ps,val) - if ps.converter then - val = ps.converter(val) - end - if ps.type == 'number' then - val = xtonumber(val) - elseif is_filetype(ps.type) then - val = lapp.open(val,(ps.type == 'file-in' and 'r') or 'w' ) - elseif ps.type == 'boolean' then - val = true - end - if ps.constraint then - ps.constraint(val) - end - return val -end - ---- add a new type to Lapp. These appear in parens after the value like --- a range constraint, e.g. ' (integer) Process PID' --- @param name name of type --- @param converter either a function to convert values, or a Lua type name. --- @param constraint optional function to verify values, should use lapp.error --- if failed. -function lapp.add_type (name,converter,constraint) - types[name] = {converter=converter,constraint=constraint} -end - -local function force_short(short) - lapp.assert(#short==1,short..": short parameters should be one character") -end - -local function process_default (sval) - local val = tonumber(sval) - if val then -- we have a number! - return val,'number' - elseif filetypes[sval] then - local ft = filetypes[sval] - return ft[1],ft[2] - else - if sval:match '^["\']' then sval = sval:sub(2,-2) end - return sval,'string' - end -end - ---- process a Lapp options string. --- Usually called as lapp(). --- @param str the options text --- @return a table with parameter-value pairs -function lapp.process_options_string(str) - local results = {} - local opts = {at_start=true} - local varargs - open_files = {} - parms = {} - aliases = {} - parmlist = {} - types = {} - - local function check_varargs(s) - local res,cnt = s:gsub('^%.%.%.%s*','') - return res, (cnt > 0) - end - - local function set_result(ps,parm,val) - if not ps.varargs then - results[parm] = val - else - if not results[parm] then - results[parm] = { val } - else - append(results[parm],val) - end - end - end - - usage = str - - for line in lines(str) do - local res = {} - local optspec,optparm,i1,i2,defval,vtype,constraint,rest - line = lstrip(line) - local function check(str) - return match(str,line,res) - end - - -- flags: either '-', '-,--' or '--' - if check '-$v{short}, --$v{long} $' or check '-$v{short} $' or check '--$v{long} $' then - if res.long then - optparm = res.long - if res.short then aliases[res.short] = optparm end - else - optparm = res.short - end - if res.short then force_short(res.short) end - res.rest, varargs = check_varargs(res.rest) - elseif check '$<{name} $' then -- is it ? - -- so becomes input_file ... - optparm,rest = res.name:match '([^%.]+)(.*)' - optparm = optparm:gsub('%A','_') - varargs = rest == '...' - append(parmlist,optparm) - end - if res.rest then -- this is not a pure doc line - line = res.rest - res = {} - -- do we have (default ) or ()? - if match('$({def} $',line,res) or match('$({def}',line,res) then - local typespec = strip(res.def) - if match('default $',typespec,res) then - defval,vtype = process_default(res[1]) - elseif match('$f{min}..$f{max}',typespec,res) then - local min,max = res.min,res.max - vtype = 'number' - constraint = function(x) - range_check(x,min,max,optparm) - end - else -- () just contains type of required parameter - vtype = typespec - end - else -- must be a plain flag, no extra parameter required - defval = false - vtype = 'boolean' - end - local ps = { - type = vtype, - defval = defval, - required = defval == nil, - comment = res.rest or optparm, - constraint = constraint, - varargs = varargs - } - varargs = nil - if types[vtype] then - local converter = types[vtype].converter - if type(converter) == 'string' then - ps.type = converter - else - ps.converter = converter - end - ps.constraint = types[vtype].constraint - end - parms[optparm] = ps - end - end - -- cool, we have our parms, let's parse the command line args - local iparm = 1 - local iextra = 1 - local i = 1 - local parm,ps,val - - while i <= #arg do - local theArg = arg[i] - local res = {} - -- look for a flag, - or -- - if match('--$v{long}',theArg,res) or match('-$v{short}',theArg,res) then - if res.long then -- long option - parm = res.long - elseif #res.short == 1 then - parm = res.short - else - local parmstr = res.short - parm = at(parmstr,1) - if isdigit(at(parmstr,2)) then - -- a short option followed by a digit is an exception (for AW;)) - -- push ahead into the arg array - tinsert(arg,i+1,parmstr:sub(2)) - else - -- push multiple flags into the arg array! - for k = 2,#parmstr do - tinsert(arg,i+k-1,'-'..at(parmstr,k)) - end - end - end - if parm == 'h' or parm == 'help' then - lapp.quit() - end - if aliases[parm] then parm = aliases[parm] end - else -- a parameter - parm = parmlist[iparm] - if not parm then - -- extra unnamed parameters are indexed starting at 1 - parm = iextra - ps = { type = 'string' } - parms[parm] = ps - iextra = iextra + 1 - else - ps = parms[parm] - end - if not ps.varargs then - iparm = iparm + 1 - end - val = theArg - end - ps = parms[parm] - if not ps then lapp.error("unrecognized parameter: "..parm) end - if ps.type ~= 'boolean' then -- we need a value! This should follow - if not val then - i = i + 1 - val = arg[i] - end - lapp.assert(val,parm.." was expecting a value") - end - ps.used = true - val = convert_parameter(ps,val) - set_result(ps,parm,val) - if is_filetype(ps.type) then - set_result(ps,parm..'_name',theArg) - end - if lapp.callback then - lapp.callback(parm,theArg,res) - end - i = i + 1 - val = nil - end - -- check unused parms, set defaults and check if any required parameters were missed - for parm,ps in pairs(parms) do - if not ps.used then - if ps.required then lapp.error("missing required parameter: "..parm) end - set_result(ps,parm,ps.defval) - end - end - return results -end - -if arg then - script = arg[0]:gsub('.+[\\/]',''):gsub('%.%a+$','') -else - script = "inter" -end - - -setmetatable(lapp, { - __call = function(tbl,str) return lapp.process_options_string(str) end, -}) - - -return lapp - - diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/lexer.lua b/Utils/luarocks/systree/share/lua/5.1/pl/lexer.lua deleted file mode 100644 index 5b9fa0c80..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/lexer.lua +++ /dev/null @@ -1,461 +0,0 @@ ---- Lexical scanner for creating a sequence of tokens from text.
    ---

    lexer.scan(s) returns an iterator over all tokens found in the --- string s. This iterator returns two values, a token type string --- (such as 'string' for quoted string, 'iden' for identifier) and the value of the --- token. ---

    --- Versions specialized for Lua and C are available; these also handle block comments --- and classify keywords as 'keyword' tokens. For example: ---

    --- > s = 'for i=1,n do'
    --- > for t,v in lexer.lua(s)  do print(t,v) end
    --- keyword for
    --- iden    i
    --- =       =
    --- number  1
    --- ,       ,
    --- iden    n
    --- keyword do
    --- 
    --- See the Guide for further discussion
    --- @class module --- @name pl.lexer - -local yield,wrap = coroutine.yield,coroutine.wrap -local strfind = string.find -local strsub = string.sub -local append = table.insert ---[[ -module ('pl.lexer',utils._module) -]] - -local function assert_arg(idx,val,tp) - if type(val) ~= tp then - error("argument "..idx.." must be "..tp, 2) - end -end - -local lexer = {} - -local NUMBER1 = '^[%+%-]?%d+%.?%d*[eE][%+%-]?%d+' -local NUMBER2 = '^[%+%-]?%d+%.?%d*' -local NUMBER3 = '^0x[%da-fA-F]+' -local NUMBER4 = '^%d+%.?%d*[eE][%+%-]?%d+' -local NUMBER5 = '^%d+%.?%d*' -local IDEN = '^[%a_][%w_]*' -local WSPACE = '^%s+' -local STRING1 = [[^'.-[^\\]']] -local STRING2 = [[^".-[^\\]"]] -local STRING3 = "^((['\"])%2)" -- empty string -local PREPRO = '^#.-[^\\]\n' - -local plain_matches,lua_matches,cpp_matches,lua_keyword,cpp_keyword - -local function tdump(tok) - return yield(tok,tok) -end - -local function ndump(tok,options) - if options and options.number then - tok = tonumber(tok) - end - return yield("number",tok) -end - --- regular strings, single or double quotes; usually we want them --- without the quotes -local function sdump(tok,options) - if options and options.string then - tok = tok:sub(2,-2) - end - return yield("string",tok) -end - --- long Lua strings need extra work to get rid of the quotes -local function sdump_l(tok,options) - if options and options.string then - tok = tok:sub(3,-3) - end - return yield("string",tok) -end - -local function chdump(tok,options) - if options and options.string then - tok = tok:sub(2,-2) - end - return yield("char",tok) -end - -local function cdump(tok) - return yield('comment',tok) -end - -local function wsdump (tok) - return yield("space",tok) -end - -local function pdump (tok) - return yield('prepro',tok) -end - -local function plain_vdump(tok) - return yield("iden",tok) -end - -local function lua_vdump(tok) - if lua_keyword[tok] then - return yield("keyword",tok) - else - return yield("iden",tok) - end -end - -local function cpp_vdump(tok) - if cpp_keyword[tok] then - return yield("keyword",tok) - else - return yield("iden",tok) - end -end - ---- create a plain token iterator from a string or file-like object. --- @param s the string --- @param matches an optional match table (set of pattern-action pairs) --- @param filter a table of token types to exclude, by default {space=true} --- @param options a table of options; by default, {number=true,string=true}, --- which means convert numbers and strip string quotes. -function lexer.scan (s,matches,filter,options) - --assert_arg(1,s,'string') - local file = type(s) ~= 'string' and s - filter = filter or {space=true} - options = options or {number=true,string=true} - if filter then - if filter.space then filter[wsdump] = true end - if filter.comments then - filter[cdump] = true - end - end - if not matches then - if not plain_matches then - plain_matches = { - {WSPACE,wsdump}, - {NUMBER3,ndump}, - {IDEN,plain_vdump}, - {NUMBER1,ndump}, - {NUMBER2,ndump}, - {STRING3,sdump}, - {STRING1,sdump}, - {STRING2,sdump}, - {'^.',tdump} - } - end - matches = plain_matches - end - local function lex () - local i1,i2,idx,res1,res2,tok,pat,fun,capt - local line = 1 - if file then s = file:read()..'\n' end - local sz = #s - local idx = 1 - --print('sz',sz) - while true do - for _,m in ipairs(matches) do - pat = m[1] - fun = m[2] - i1,i2 = strfind(s,pat,idx) - if i1 then - tok = strsub(s,i1,i2) - idx = i2 + 1 - if not (filter and filter[fun]) then - lexer.finished = idx > sz - res1,res2 = fun(tok,options) - end - if res1 then - local tp = type(res1) - -- insert a token list - if tp=='table' then - yield('','') - for _,t in ipairs(res1) do - yield(t[1],t[2]) - end - elseif tp == 'string' then -- or search up to some special pattern - i1,i2 = strfind(s,res1,idx) - if i1 then - tok = strsub(s,i1,i2) - idx = i2 + 1 - yield('',tok) - else - yield('','') - idx = sz + 1 - end - --if idx > sz then return end - else - yield(line,idx) - end - end - if idx > sz then - if file then - --repeat -- next non-empty line - line = line + 1 - s = file:read() - if not s then return end - --until not s:match '^%s*$' - s = s .. '\n' - idx ,sz = 1,#s - break - else - return - end - else break end - end - end - end - end - return wrap(lex) -end - -local function isstring (s) - return type(s) == 'string' -end - ---- insert tokens into a stream. --- @param tok a token stream --- @param a1 a string is the type, a table is a token list and --- a function is assumed to be a token-like iterator (returns type & value) --- @param a2 a string is the value -function lexer.insert (tok,a1,a2) - if not a1 then return end - local ts - if isstring(a1) and isstring(a2) then - ts = {{a1,a2}} - elseif type(a1) == 'function' then - ts = {} - for t,v in a1() do - append(ts,{t,v}) - end - else - ts = a1 - end - tok(ts) -end - ---- get everything in a stream upto a newline. --- @param tok a token stream --- @return a string -function lexer.getline (tok) - local t,v = tok('.-\n') - return v -end - ---- get current line number.
    --- Only available if the input source is a file-like object. --- @param tok a token stream --- @return the line number and current column -function lexer.lineno (tok) - return tok(0) -end - ---- get the rest of the stream. --- @param tok a token stream --- @return a string -function lexer.getrest (tok) - local t,v = tok('.+') - return v -end - ---- get the Lua keywords as a set-like table. --- So res["and"] etc would be true. --- @return a table -function lexer.get_keywords () - if not lua_keyword then - lua_keyword = { - ["and"] = true, ["break"] = true, ["do"] = true, - ["else"] = true, ["elseif"] = true, ["end"] = true, - ["false"] = true, ["for"] = true, ["function"] = true, - ["if"] = true, ["in"] = true, ["local"] = true, ["nil"] = true, - ["not"] = true, ["or"] = true, ["repeat"] = true, - ["return"] = true, ["then"] = true, ["true"] = true, - ["until"] = true, ["while"] = true - } - end - return lua_keyword -end - - ---- create a Lua token iterator from a string or file-like object. --- Will return the token type and value. --- @param s the string --- @param filter a table of token types to exclude, by default {space=true,comments=true} --- @param options a table of options; by default, {number=true,string=true}, --- which means convert numbers and strip string quotes. -function lexer.lua(s,filter,options) - filter = filter or {space=true,comments=true} - lexer.get_keywords() - if not lua_matches then - lua_matches = { - {WSPACE,wsdump}, - {NUMBER3,ndump}, - {IDEN,lua_vdump}, - {NUMBER4,ndump}, - {NUMBER5,ndump}, - {STRING3,sdump}, - {STRING1,sdump}, - {STRING2,sdump}, - {'^%-%-%[%[.-%]%]',cdump}, - {'^%-%-.-\n',cdump}, - {'^%[%[.-%]%]',sdump_l}, - {'^==',tdump}, - {'^~=',tdump}, - {'^<=',tdump}, - {'^>=',tdump}, - {'^%.%.%.',tdump}, - {'^%.%.',tdump}, - {'^.',tdump} - } - end - return lexer.scan(s,lua_matches,filter,options) -end - ---- create a C/C++ token iterator from a string or file-like object. --- Will return the token type type and value. --- @param s the string --- @param filter a table of token types to exclude, by default {space=true,comments=true} --- @param options a table of options; by default, {number=true,string=true}, --- which means convert numbers and strip string quotes. -function lexer.cpp(s,filter,options) - filter = filter or {comments=true} - if not cpp_keyword then - cpp_keyword = { - ["class"] = true, ["break"] = true, ["do"] = true, ["sizeof"] = true, - ["else"] = true, ["continue"] = true, ["struct"] = true, - ["false"] = true, ["for"] = true, ["public"] = true, ["void"] = true, - ["private"] = true, ["protected"] = true, ["goto"] = true, - ["if"] = true, ["static"] = true, ["const"] = true, ["typedef"] = true, - ["enum"] = true, ["char"] = true, ["int"] = true, ["bool"] = true, - ["long"] = true, ["float"] = true, ["true"] = true, ["delete"] = true, - ["double"] = true, ["while"] = true, ["new"] = true, - ["namespace"] = true, ["try"] = true, ["catch"] = true, - ["switch"] = true, ["case"] = true, ["extern"] = true, - ["return"] = true,["default"] = true,['unsigned'] = true,['signed'] = true, - ["union"] = true, ["volatile"] = true, ["register"] = true,["short"] = true, - } - end - if not cpp_matches then - cpp_matches = { - {WSPACE,wsdump}, - {PREPRO,pdump}, - {NUMBER3,ndump}, - {IDEN,cpp_vdump}, - {NUMBER4,ndump}, - {NUMBER5,ndump}, - {STRING3,sdump}, - {STRING1,chdump}, - {STRING2,sdump}, - {'^//.-\n',cdump}, - {'^/%*.-%*/',cdump}, - {'^==',tdump}, - {'^!=',tdump}, - {'^<=',tdump}, - {'^>=',tdump}, - {'^->',tdump}, - {'^&&',tdump}, - {'^||',tdump}, - {'^%+%+',tdump}, - {'^%-%-',tdump}, - {'^%+=',tdump}, - {'^%-=',tdump}, - {'^%*=',tdump}, - {'^/=',tdump}, - {'^|=',tdump}, - {'^%^=',tdump}, - {'^::',tdump}, - {'^.',tdump} - } - end - return lexer.scan(s,cpp_matches,filter,options) -end - ---- get a list of parameters separated by a delimiter from a stream. --- @param tok the token stream --- @param endtoken end of list (default ')'). Can be '\n' --- @param delim separator (default ',') --- @return a list of token lists. -function lexer.get_separated_list(tok,endtoken,delim) - endtoken = endtoken or ')' - delim = delim or ',' - local parm_values = {} - local level = 1 -- used to count ( and ) - local tl = {} - local function tappend (tl,t,val) - val = val or t - append(tl,{t,val}) - end - local is_end - if endtoken == '\n' then - is_end = function(t,val) - return t == 'space' and val:find '\n' - end - else - is_end = function (t) - return t == endtoken - end - end - local token,value - while true do - token,value=tok() - if not token then return nil,'EOS' end -- end of stream is an error! - if is_end(token,value) and level == 1 then - append(parm_values,tl) - break - elseif token == '(' then - level = level + 1 - tappend(tl,'(') - elseif token == ')' then - level = level - 1 - if level == 0 then -- finished with parm list - append(parm_values,tl) - break - else - tappend(tl,')') - end - elseif token == delim and level == 1 then - append(parm_values,tl) -- a new parm - tl = {} - else - tappend(tl,token,value) - end - end - return parm_values,{token,value} -end - ---- get the next non-space token from the stream. --- @param tok the token stream. -function lexer.skipws (tok) - local t,v = tok() - while t == 'space' do - t,v = tok() - end - return t,v -end - -local skipws = lexer.skipws - ---- get the next token, which must be of the expected type. --- Throws an error if this type does not match! --- @param tok the token stream --- @param expected_type the token type --- @param no_skip_ws whether we should skip whitespace -function lexer.expecting (tok,expected_type,no_skip_ws) - assert_arg(1,tok,'function') - assert_arg(2,expected_type,'string') - local t,v - if no_skip_ws then - t,v = tok() - else - t,v = skipws(tok) - end - if t ~= expected_type then error ("expecting "..expected_type,2) end - return v -end - -return lexer diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/luabalanced.lua b/Utils/luarocks/systree/share/lua/5.1/pl/luabalanced.lua deleted file mode 100644 index bb2377836..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/luabalanced.lua +++ /dev/null @@ -1,264 +0,0 @@ ---- Extract delimited Lua sequences from strings. --- Inspired by Damian Conway's Text::Balanced in Perl.
    ---
      ---
    • [1] Lua Wiki Page
    • ---
    • [2] http://search.cpan.org/dist/Text-Balanced/lib/Text/Balanced.pm
    • ---

    ---
    --- local lb = require "pl.luabalanced"
    --- --Extract Lua expression starting at position 4.
    ---  print(lb.match_expression("if x^2 + x > 5 then print(x) end", 4))
    ---  --> x^2 + x > 5     16
    --- --Extract Lua string starting at (default) position 1.
    --- print(lb.match_string([["test\"123" .. "more"]]))
    --- --> "test\"123"     12
    --- 
    --- (c) 2008, David Manura, Licensed under the same terms as Lua (MIT license). --- @class module --- @name pl.luabalanced - -local M = {} - -local assert = assert -local table_concat = table.concat - --- map opening brace <-> closing brace. -local ends = { ['('] = ')', ['{'] = '}', ['['] = ']' } -local begins = {}; for k,v in pairs(ends) do begins[v] = k end - - --- Match Lua string in string starting at position . --- Returns , , where is the matched --- string (or nil on no match) and is the character --- following the match (or on no match). --- Supports all Lua string syntax: "...", '...', [[...]], [=[...]=], etc. -local function match_string(s, pos) - pos = pos or 1 - local posa = pos - local c = s:sub(pos,pos) - if c == '"' or c == "'" then - pos = pos + 1 - while 1 do - pos = assert(s:find("[" .. c .. "\\]", pos), 'syntax error') - if s:sub(pos,pos) == c then - local part = s:sub(posa, pos) - return part, pos + 1 - else - pos = pos + 2 - end - end - else - local sc = s:match("^%[(=*)%[", pos) - if sc then - local _; _, pos = s:find("%]" .. sc .. "%]", pos) - assert(pos) - local part = s:sub(posa, pos) - return part, pos + 1 - else - return nil, pos - end - end -end -M.match_string = match_string - - --- Match bracketed Lua expression, e.g. "(...)", "{...}", "[...]", "[[...]]", --- [=[...]=], etc. --- Function interface is similar to match_string. -local function match_bracketed(s, pos) - pos = pos or 1 - local posa = pos - local ca = s:sub(pos,pos) - if not ends[ca] then - return nil, pos - end - local stack = {} - while 1 do - pos = s:find('[%(%{%[%)%}%]\"\']', pos) - assert(pos, 'syntax error: unbalanced') - local c = s:sub(pos,pos) - if c == '"' or c == "'" then - local part; part, pos = match_string(s, pos) - assert(part) - elseif ends[c] then -- open - local mid, posb - if c == '[' then mid, posb = s:match('^%[(=*)%[()', pos) end - if mid then - pos = s:match('%]' .. mid .. '%]()', posb) - assert(pos, 'syntax error: long string not terminated') - if #stack == 0 then - local part = s:sub(posa, pos-1) - return part, pos - end - else - stack[#stack+1] = c - pos = pos + 1 - end - else -- close - assert(stack[#stack] == assert(begins[c]), 'syntax error: unbalanced') - stack[#stack] = nil - if #stack == 0 then - local part = s:sub(posa, pos) - return part, pos+1 - end - pos = pos + 1 - end - end -end -M.match_bracketed = match_bracketed - - --- Match Lua comment, e.g. "--...\n", "--[[...]]", "--[=[...]=]", etc. --- Function interface is similar to match_string. -local function match_comment(s, pos) - pos = pos or 1 - if s:sub(pos, pos+1) ~= '--' then - return nil, pos - end - pos = pos + 2 - local partt, post = match_string(s, pos) - if partt then - return '--' .. partt, post - end - local part; part, pos = s:match('^([^\n]*\n?)()', pos) - return '--' .. part, pos -end - - --- Match Lua expression, e.g. "a + b * c[e]". --- Function interface is similar to match_string. -local wordop = {['and']=true, ['or']=true, ['not']=true} -local is_compare = {['>']=true, ['<']=true, ['~']=true} -local function match_expression(s, pos) - pos = pos or 1 - local posa = pos - local lastident - local poscs, posce - while pos do - local c = s:sub(pos,pos) - if c == '"' or c == "'" or c == '[' and s:find('^[=%[]', pos+1) then - local part; part, pos = match_string(s, pos) - assert(part, 'syntax error') - elseif c == '-' and s:sub(pos+1,pos+1) == '-' then - -- note: handle adjacent comments in loop to properly support - -- backtracing (poscs/posce). - poscs = pos - while s:sub(pos,pos+1) == '--' do - local part; part, pos = match_comment(s, pos) - assert(part) - pos = s:match('^%s*()', pos) - posce = pos - end - elseif c == '(' or c == '{' or c == '[' then - local part; part, pos = match_bracketed(s, pos) - elseif c == '=' and s:sub(pos+1,pos+1) == '=' then - pos = pos + 2 -- skip over two-char op containing '=' - elseif c == '=' and is_compare[s:sub(pos-1,pos-1)] then - pos = pos + 1 -- skip over two-char op containing '=' - elseif c:match'^[%)%}%];,=]' then - local part = s:sub(posa, pos-1) - return part, pos - elseif c:match'^[%w_]' then - local newident,newpos = s:match('^([%w_]+)()', pos) - if pos ~= posa and not wordop[newident] then -- non-first ident - local pose = ((posce == pos) and poscs or pos) - 1 - while s:match('^%s', pose) do pose = pose - 1 end - local ce = s:sub(pose,pose) - if ce:match'[%)%}\'\"%]]' or - ce:match'[%w_]' and not wordop[lastident] - then - local part = s:sub(posa, pos-1) - return part, pos - end - end - lastident, pos = newident, newpos - else - pos = pos + 1 - end - pos = s:find('[%(%{%[%)%}%]\"\';,=%w_%-]', pos) - end - local part = s:sub(posa, #s) - return part, #s+1 -end -M.match_expression = match_expression - - --- Match name list (zero or more names). E.g. "a,b,c" --- Function interface is similar to match_string, --- but returns array as match. -local function match_namelist(s, pos) - pos = pos or 1 - local list = {} - while 1 do - local c = #list == 0 and '^' or '^%s*,%s*' - local item, post = s:match(c .. '([%a_][%w_]*)%s*()', pos) - if item then pos = post else break end - list[#list+1] = item - end - return list, pos -end -M.match_namelist = match_namelist - - --- Match expression list (zero or more expressions). E.g. "a+b,b*c". --- Function interface is similar to match_string, --- but returns array as match. -local function match_explist(s, pos) - pos = pos or 1 - local list = {} - while 1 do - if #list ~= 0 then - local post = s:match('^%s*,%s*()', pos) - if post then pos = post else break end - end - local item; item, pos = match_expression(s, pos) - assert(item, 'syntax error') - list[#list+1] = item - end - return list, pos -end -M.match_explist = match_explist - - --- Replace snippets of code in Lua code string --- using replacement function f(u,sin) --> sout. --- is the type of snippet ('c' = comment, 's' = string, --- 'e' = any other code). --- Snippet is replaced with (unless is nil or false, in --- which case the original snippet is kept) --- This is somewhat analogous to string.gsub . -local function gsub(s, f) - local pos = 1 - local posa = 1 - local sret = '' - while 1 do - pos = s:find('[%-\'\"%[]', pos) - if not pos then break end - if s:match('^%-%-', pos) then - local exp = s:sub(posa, pos-1) - if #exp > 0 then sret = sret .. (f('e', exp) or exp) end - local comment; comment, pos = match_comment(s, pos) - sret = sret .. (f('c', assert(comment)) or comment) - posa = pos - else - local posb = s:find('^[\'\"%[]', pos) - local str - if posb then str, pos = match_string(s, posb) end - if str then - local exp = s:sub(posa, posb-1) - if #exp > 0 then sret = sret .. (f('e', exp) or exp) end - sret = sret .. (f('s', str) or str) - posa = pos - else - pos = pos + 1 - end - end - end - local exp = s:sub(posa) - if #exp > 0 then sret = sret .. (f('e', exp) or exp) end - return sret -end -M.gsub = gsub - - -return M diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/operator.lua b/Utils/luarocks/systree/share/lua/5.1/pl/operator.lua deleted file mode 100644 index 48c8a10b4..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/operator.lua +++ /dev/null @@ -1,197 +0,0 @@ ---- Lua operators available as functions. --- (similar to the Python module of the same name)
    --- There is a module field optable which maps the operator strings --- onto these functions, e.g.
    operator.optable['()']==operator.call
    ---

    Operator strings like '>' and '{}' can be passed to most Penlight functions --- expecting a function argument.

    --- @class module --- @name pl.operator - -local strfind = string.find -local utils = require 'pl.utils' - -local operator = {} - ---- apply function to some arguments () --- @param fn a function or callable object --- @param ... arguments -function operator.call(fn,...) - return fn(...) -end - ---- get the indexed value from a table [] --- @param t a table or any indexable object --- @param k the key -function operator.index(t,k) - return t[k] -end - ---- returns true if arguments are equal == --- @param a value --- @param b value -function operator.eq(a,b) - return a==b -end - ---- returns true if arguments are not equal ~= - -- @param a value --- @param b value -function operator.neq(a,b) - return a~=b -end - ---- returns true if a is less than b < --- @param a value --- @param b value -function operator.lt(a,b) - return a < b -end - ---- returns true if a is less or equal to b <= --- @param a value --- @param b value -function operator.le(a,b) - return a <= b -end - ---- returns true if a is greater than b > --- @param a value --- @param b value -function operator.gt(a,b) - return a > b -end - ---- returns true if a is greater or equal to b >= --- @param a value --- @param b value -function operator.ge(a,b) - return a >= b -end - ---- returns length of string or table # --- @param a a string or a table -function operator.len(a) - return #a -end - ---- add two values + --- @param a value --- @param b value -function operator.add(a,b) - return a+b -end - ---- subtract b from a - --- @param a value --- @param b value -function operator.sub(a,b) - return a-b -end - ---- multiply two values * --- @param a value --- @param b value -function operator.mul(a,b) - return a*b -end - ---- divide first value by second / --- @param a value --- @param b value -function operator.div(a,b) - return a/b -end - ---- raise first to the power of second ^ --- @param a value --- @param b value -function operator.pow(a,b) - return a^b -end - ---- modulo; remainder of a divided by b % --- @param a value --- @param b value -function operator.mod(a,b) - return a%b -end - ---- concatenate two values (either strings or __concat defined) .. --- @param a value --- @param b value -function operator.concat(a,b) - return a..b -end - ---- return the negative of a value - --- @param a value --- @param b value -function operator.unm(a) - return -a -end - ---- false if value evaluates as true not --- @param a value -function operator.lnot(a) - return not a -end - ---- true if both values evaluate as true and --- @param a value --- @param b value -function operator.land(a,b) - return a and b -end - ---- true if either value evaluate as true or --- @param a value --- @param b value -function operator.lor(a,b) - return a or b -end - ---- make a table from the arguments {} --- @param ... non-nil arguments --- @return a table -function operator.table (...) - return {...} -end - ---- match two strings ~ --- uses @{string.find} -function operator.match (a,b) - return strfind(a,b)~=nil -end - ---- the null operation. --- @param ... arguments --- @return the arguments -function operator.nop (...) - return ... -end - - operator.optable = { - ['+']=operator.add, - ['-']=operator.sub, - ['*']=operator.mul, - ['/']=operator.div, - ['%']=operator.mod, - ['^']=operator.pow, - ['..']=operator.concat, - ['()']=operator.call, - ['[]']=operator.index, - ['<']=operator.lt, - ['<=']=operator.le, - ['>']=operator.gt, - ['>=']=operator.ge, - ['==']=operator.eq, - ['~=']=operator.neq, - ['#']=operator.len, - ['and']=operator.land, - ['or']=operator.lor, - ['{}']=operator.table, - ['~']=operator.match, - ['']=operator.nop, -} - -return operator diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/path.lua b/Utils/luarocks/systree/share/lua/5.1/pl/path.lua deleted file mode 100644 index 9055f3f4b..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/path.lua +++ /dev/null @@ -1,335 +0,0 @@ ---- Path manipulation and file queries.
    --- This is modelled after Python's os.path library (11.1) --- @class module --- @name pl.path - --- imports and locals -local _G = _G -local sub = string.sub -local getenv = os.getenv -local tmpnam = os.tmpname -local attributes, currentdir, link_attrib -local package = package -local io = io -local append = table.insert -local ipairs = ipairs -local utils = require 'pl.utils' -local assert_arg,assert_string,raise = utils.assert_arg,utils.assert_string,utils.raise - ---[[ -module ('pl.path',utils._module) -]] - -local path, attrib - -if _G.luajava then - path = require 'pl.platf.luajava' -else - path = {} - - local res,lfs = _G.pcall(_G.require,'lfs') - if res then - attributes = lfs.attributes - currentdir = lfs.currentdir - link_attrib = lfs.symlinkattributes - else - error("pl.path requires LuaFileSystem") - end - - attrib = attributes - path.attrib = attrib - path.link_attrib = link_attrib - path.dir = lfs.dir - path.mkdir = lfs.mkdir - path.rmdir = lfs.rmdir - path.chdir = lfs.chdir - - --- is this a directory? - -- @param P A file path - function path.isdir(P) - if P:match("\\$") then - P = P:sub(1,-2) - end - return attrib(P,'mode') == 'directory' - end - - --- is this a file?. - -- @param P A file path - function path.isfile(P) - return attrib(P,'mode') == 'file' - end - - -- is this a symbolic link? - -- @param P A file path - function path.islink(P) - if link_attrib then - return link_attrib(P,'mode')=='link' - else - return false - end - end - - --- return size of a file. - -- @param P A file path - function path.getsize(P) - return attrib(P,'size') - end - - --- does a path exist?. - -- @param P A file path - -- @return the file path if it exists, nil otherwise - function path.exists(P) - return attrib(P,'mode') ~= nil and P - end - - --- Return the time of last access as the number of seconds since the epoch. - -- @param P A file path - function path.getatime(P) - return attrib(P,'access') - end - - --- Return the time of last modification - -- @param P A file path - function path.getmtime(P) - return attrib(P,'modification') - end - - ---Return the system's ctime. - -- @param P A file path - function path.getctime(P) - return path.attrib(P,'change') - end -end - - -local function at(s,i) - return sub(s,i,i) -end - -path.is_windows = utils.dir_separator == '\\' - -local other_sep --- !constant sep is the directory separator for this platform. -if path.is_windows then - path.sep = '\\'; other_sep = '/' - path.dirsep = ';' -else - path.sep = '/' - path.dirsep = ':' -end -local sep,dirsep = path.sep,path.dirsep - ---- are we running Windows? --- @class field --- @name path.is_windows - ---- path separator for this platform. --- @class field --- @name path.sep - ---- separator for PATH for this platform --- @class field --- @name path.dirsep - ---- given a path, return the directory part and a file part. --- if there's no directory part, the first value will be empty --- @param P A file path -function path.splitpath(P) - assert_string(1,P) - local i = #P - local ch = at(P,i) - while i > 0 and ch ~= sep and ch ~= other_sep do - i = i - 1 - ch = at(P,i) - end - if i == 0 then - return '',P - else - return sub(P,1,i-1), sub(P,i+1) - end -end - ---- return an absolute path. --- @param P A file path -function path.abspath(P) - assert_string(1,P) - if not currentdir then return P end - P = P:gsub('[\\/]$','') - local pwd = currentdir() - if not path.isabs(P) then - return path.join(pwd,P) - elseif path.is_windows and at(P,2) ~= ':' and at(P,2) ~= '\\' then - return pwd:sub(1,2)..P - else - return P - end -end - ---- given a path, return the root part and the extension part. --- if there's no extension part, the second value will be empty --- @param P A file path -function path.splitext(P) - assert_string(1,P) - local i = #P - local ch = at(P,i) - while i > 0 and ch ~= '.' do - if ch == sep or ch == other_sep then - return P,'' - end - i = i - 1 - ch = at(P,i) - end - if i == 0 then - return P,'' - else - return sub(P,1,i-1),sub(P,i) - end -end - ---- return the directory part of a path --- @param P A file path -function path.dirname(P) - assert_string(1,P) - local p1,p2 = path.splitpath(P) - return p1 -end - ---- return the file part of a path --- @param P A file path -function path.basename(P) - assert_string(1,P) - local p1,p2 = path.splitpath(P) - return p2 -end - ---- get the extension part of a path. --- @param P A file path -function path.extension(P) - assert_string(1,P) - local p1,p2 = path.splitext(P) - return p2 -end - ---- is this an absolute path?. --- @param P A file path -function path.isabs(P) - assert_string(1,P) - if path.is_windows then - return at(P,1) == '/' or at(P,1)=='\\' or at(P,2)==':' - else - return at(P,1) == '/' - end -end - ---- return the P resulting from combining the two paths. --- if the second is already an absolute path, then it returns it. --- @param p1 A file path --- @param p2 A file path -function path.join(p1,p2) - assert_string(1,p1) - assert_string(2,p2) - if path.isabs(p2) then return p2 end - local endc = at(p1,#p1) - if endc ~= path.sep and endc ~= other_sep then - p1 = p1..path.sep - end - return p1..p2 -end - ---- normalize the case of a pathname. On Unix, this returns the path unchanged; --- for Windows, it converts the path to lowercase, and it also converts forward slashes --- to backward slashes. --- @param P A file path -function path.normcase(P) - assert_string(1,P) - if path.is_windows then - return (P:lower():gsub('/','\\')) - else - return P - end -end - ---- normalize a path name. --- A//B, A/./B and A/foo/../B all become A/B. --- @param P a file path -function path.normpath (P) - assert_string(1,P) - if path.is_windows then - P = P:gsub('/','\\') - return (P:gsub('[^\\]+\\%.%.\\',''):gsub('\\%.?\\','\\')) - else - return (P:gsub('[^/]+/%.%./',''):gsub('/%.?/','/')) - end -end - - ---- Replace a starting '~' with the user's home directory. --- In windows, if HOME isn't set, then USERPROFILE is used in preference to --- HOMEDRIVE HOMEPATH. This is guaranteed to be writeable on all versions of Windows. --- @param P A file path -function path.expanduser(P) - assert_string(1,P) - if at(P,1) == '~' then - local home = getenv('HOME') - if not home then -- has to be Windows - home = getenv 'USERPROFILE' or (getenv 'HOMEDRIVE' .. getenv 'HOMEPATH') - end - return home..sub(P,2) - else - return P - end -end - - ----Return a suitable full path to a new temporary file name. --- unlike os.tmpnam(), it always gives you a writeable path (uses %TMP% on Windows) -function path.tmpname () - local res = tmpnam() - if path.is_windows then res = getenv('TMP')..res end - return res -end - ---- return the largest common prefix path of two paths. --- @param path1 a file path --- @param path2 a file path -function path.common_prefix (path1,path2) - assert_string(1,path1) - assert_string(2,path2) - -- get them in order! - if #path1 > #path2 then path2,path1 = path1,path2 end - for i = 1,#path1 do - local c1 = at(path1,i) - if c1 ~= at(path2,i) then - local cp = path1:sub(1,i-1) - if at(path1,i-1) ~= sep then - cp = path.dirname(cp) - end - return cp - end - end - if at(path2,#path1+1) ~= sep then path1 = path.dirname(path1) end - return path1 - --return '' -end - - ---- return the full path where a particular Lua module would be found. --- Both package.path and package.cpath is searched, so the result may --- either be a Lua file or a shared libarary. --- @param mod name of the module --- @return on success: path of module, lua or binary --- @return on error: nil,error string -function path.package_path(mod) - assert_string(1,mod) - local res - mod = mod:gsub('%.',sep) - res = package.searchpath(mod,package.path) - if res then return res,true end - res = package.searchpath(mod,package.cpath) - if res then return res,false end - return raise 'cannot find module on path' -end - - ----- finis ----- -return path diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/permute.lua b/Utils/luarocks/systree/share/lua/5.1/pl/permute.lua deleted file mode 100644 index 8c2e66fa9..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/permute.lua +++ /dev/null @@ -1,65 +0,0 @@ ---- Permutation operations. --- @class module --- @name pl.permute -local tablex = require 'pl.tablex' -local utils = require 'pl.utils' -local copy = tablex.deepcopy -local append = table.insert -local coroutine = coroutine -local resume = coroutine.resume -local assert_arg = utils.assert_arg - ---[[ -module ('pl.permute',utils._module) -]] - -local permute = {} - --- PiL, 9.3 - -local permgen -permgen = function (a, n, fn) - if n == 0 then - fn(a) - else - for i=1,n do - -- put i-th element as the last one - a[n], a[i] = a[i], a[n] - - -- generate all permutations of the other elements - permgen(a, n - 1, fn) - - -- restore i-th element - a[n], a[i] = a[i], a[n] - - end - end -end - ---- an iterator over all permutations of the elements of a list. --- Please note that the same list is returned each time, so do not keep references! --- @param a list-like table --- @return an iterator which provides the next permutation as a list -function permute.iter (a) - assert_arg(1,a,'table') - local n = #a - local co = coroutine.create(function () permgen(a, n, coroutine.yield) end) - return function () -- iterator - local code, res = resume(co) - return res - end -end - ---- construct a table containing all the permutations of a list. --- @param a list-like table --- @return a table of tables --- @usage permute.table {1,2,3} --> {{2,3,1},{3,2,1},{3,1,2},{1,3,2},{2,1,3},{1,2,3}} -function permute.table (a) - assert_arg(1,a,'table') - local res = {} - local n = #a - permgen(a,n,function(t) append(res,copy(t)) end) - return res -end - -return permute diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/platf/luajava.lua b/Utils/luarocks/systree/share/lua/5.1/pl/platf/luajava.lua deleted file mode 100644 index 4fb82e619..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/platf/luajava.lua +++ /dev/null @@ -1,101 +0,0 @@ --- experimental support for LuaJava --- -local path = {} - - -path.link_attrib = nil - -local File = luajava.bindClass("java.io.File") -local Array = luajava.bindClass('java.lang.reflect.Array') - -local function file(s) - return luajava.new(File,s) -end - -function path.dir(P) - local ls = file(P):list() - print(ls) - local idx,n = -1,Array:getLength(ls) - return function () - idx = idx + 1 - if idx == n then return nil - else - return Array:get(ls,idx) - end - end -end - -function path.mkdir(P) - return file(P):mkdir() -end - -function path.rmdir(P) - return file(P):delete() -end - ---- is this a directory? --- @param P A file path -function path.isdir(P) - if P:match("\\$") then - P = P:sub(1,-2) - end - return file(P):isDirectory() -end - ---- is this a file?. --- @param P A file path -function path.isfile(P) - return file(P):isFile() -end - --- is this a symbolic link? --- Direct support for symbolic links is not provided. --- see http://stackoverflow.com/questions/813710/java-1-6-determine-symbolic-links --- and the caveats therein. --- @param P A file path -function path.islink(P) - local f = file(P) - local canon - local parent = f:getParent() - if not parent then - canon = f - else - parent = f.getParentFile():getCanonicalFile() - canon = luajava.new(File,parent,f:getName()) - end - return canon:getCanonicalFile() ~= canon:getAbsoluteFile() -end - ---- return size of a file. --- @param P A file path -function path.getsize(P) - return file(P):length() -end - ---- does a path exist?. --- @param P A file path --- @return the file path if it exists, nil otherwise -function path.exists(P) - return file(P):exists() and P -end - ---- Return the time of last access as the number of seconds since the epoch. --- @param P A file path -function path.getatime(P) - return path.getmtime(P) -end - ---- Return the time of last modification --- @param P A file path -function path.getmtime(P) - -- Java time is no. of millisec since the epoch - return file(P):lastModified()/1000 -end - ----Return the system's ctime. --- @param P A file path -function path.getctime(P) - return path.getmtime(P) -end - -return path diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/pretty.lua b/Utils/luarocks/systree/share/lua/5.1/pl/pretty.lua deleted file mode 100644 index c414c9d5c..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/pretty.lua +++ /dev/null @@ -1,224 +0,0 @@ ---- Pretty-printing Lua tables. --- Also provides a sandboxed Lua table reader and --- a function to present large numbers in human-friendly format. --- @class module --- @name pl.pretty - -local append = table.insert -local concat = table.concat -local utils = require 'pl.utils' -local lexer = require 'pl.lexer' -local assert_arg = utils.assert_arg - -local pretty = {} - ---- read a string representation of a Lua table. --- Uses load(), but tries to be cautious about loading arbitrary code! --- It is expecting a string of the form '{...}', with perhaps some whitespace --- before or after the curly braces. An empty environment is used, and --- any occurance of the keyword 'function' will be considered a problem. --- @param s {string} string of the form '{...}', with perhaps some whitespace --- before or after the curly braces. -function pretty.read(s) - assert_arg(1,s,'string') - if not s:find '^%s*%b{}%s*$' then return nil,"not a Lua table" end - if s:find '[^\'"%w_]function[^\'"%w_]' then - local tok = lexer.lua(s) - for t,v in tok do - if t == 'keyword' then - return nil,"cannot have Lua keywords in table definition" - end - end - end - local chunk,err = utils.load('return '..s,'tbl','t',{}) - if not chunk then return nil,err end - return chunk() -end - -local function quote_if_necessary (v) - if not v then return '' - else - if v:find ' ' then v = '"'..v..'"' end - end - return v -end - -local keywords - - ---- Create a string representation of a Lua table. --- This function never fails, but may complain by returning an --- extra value. Normally puts out one item per line, using --- the provided indent; set the second parameter to '' if --- you want output on one line. --- @param tbl {table} Table to serialize to a string. --- @param space {string} (optional) The indent to use. --- Defaults to two spaces. --- @param not_clever {bool} (optional) Use for plain output, e.g {['key']=1}. --- Defaults to false. --- @return a string --- @return a possible error message -function pretty.write (tbl,space,not_clever) - if type(tbl) ~= 'table' then - local res = tostring(tbl) - if type(tbl) == 'string' then res = '"'..res..'"' end - return res, 'not a table' - end - if not keywords then - keywords = lexer.get_keywords() - end - local set = ' = ' - if space == '' then set = '=' end - space = space or ' ' - local lines = {} - local line = '' - local tables = {} - - local function is_identifier (s) - return (s:find('^[%a_][%w_]*$')) and not keywords[s] - end - - local function put(s) - if #s > 0 then - line = line..s - end - end - - local function putln (s) - if #line > 0 then - line = line..s - append(lines,line) - line = '' - else - append(lines,s) - end - end - - local function eat_last_comma () - local n,lastch = #lines - local lastch = lines[n]:sub(-1,-1) - if lastch == ',' then - lines[n] = lines[n]:sub(1,-2) - end - end - - local function quote (s) - return ('%q'):format(tostring(s)) - end - - local function index (numkey,key) - if not numkey then key = quote(key) end - return '['..key..']' - end - - local writeit - writeit = function (t,oldindent,indent) - local tp = type(t) - if tp ~= 'string' and tp ~= 'table' then - putln(quote_if_necessary(tostring(t))..',') - elseif tp == 'string' then - if t:find('\n') then - putln('[[\n'..t..']],') - else - putln(quote(t)..',') - end - elseif tp == 'table' then - if tables[t] then - putln(',') - return - end - tables[t] = true - local newindent = indent..space - putln('{') - local used = {} - if not not_clever then - for i,val in ipairs(t) do - put(indent) - writeit(val,indent,newindent) - used[i] = true - end - end - for key,val in pairs(t) do - local numkey = type(key) == 'number' - if not_clever then - key = tostring(key) - put(indent..index(numkey,key)..set) - writeit(val,indent,newindent) - else - if not numkey or not used[key] then -- non-array indices - if numkey or not is_identifier(key) then - key = index(numkey,key) - end - put(indent..key..set) - writeit(val,indent,newindent) - end - end - end - eat_last_comma() - putln(oldindent..'},') - else - putln(tostring(t)..',') - end - end - writeit(tbl,'',space) - eat_last_comma() - return concat(lines,#space > 0 and '\n' or '') -end - ---- Dump a Lua table out to a file or stdout. --- @param t {table} The table to write to a file or stdout. --- @param ... {string} (optional) File name to write too. Defaults to writing --- to stdout. -function pretty.dump (t,...) - if select('#',...)==0 then - print(pretty.write(t)) - return true - else - return utils.writefile(...,pretty.write(t)) - end -end - -local memp,nump = {'B','KiB','MiB','GiB'},{'','K','M','B'} - -local comma -function comma (val) - local thou = math.floor(val/1000) - if thou > 0 then return comma(thou)..','..(val % 1000) - else return tostring(val) end -end - ---- format large numbers nicely for human consumption. --- @param num a number --- @param kind one of 'M' (memory in KiB etc), 'N' (postfixes are 'K','M' and 'B') --- and 'T' (use commas as thousands separator) --- @param prec number of digits to use for 'M' and 'N' (default 1) -function pretty.number (num,kind,prec) - local fmt = '%.'..(prec or 1)..'f%s' - if kind == 'T' then - return comma(num) - else - local postfixes, fact - if kind == 'M' then - fact = 1024 - postfixes = memp - else - fact = 1000 - postfixes = nump - end - local div = fact - local k = 1 - while num >= div and k <= #postfixes do - div = div * fact - k = k + 1 - end - div = div / fact - if k > #postfixes then k = k - 1; div = div/fact end - if k > 1 then - return fmt:format(num/div,postfixes[k] or 'duh') - else - return num..postfixes[1] - end - end -end - -return pretty diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/seq.lua b/Utils/luarocks/systree/share/lua/5.1/pl/seq.lua deleted file mode 100644 index 479a12a6e..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/seq.lua +++ /dev/null @@ -1,527 +0,0 @@ ---- Manipulating sequences as iterators. --- @class module --- @name pl.seq - -local next,assert,type,pairs,tonumber,type,setmetatable,getmetatable,_G = next,assert,type,pairs,tonumber,type,setmetatable,getmetatable,_G -local strfind = string.find -local strmatch = string.match -local format = string.format -local mrandom = math.random -local remove,tsort,tappend = table.remove,table.sort,table.insert -local io = io -local utils = require 'pl.utils' -local function_arg = utils.function_arg -local _List = utils.stdmt.List -local _Map = utils.stdmt.Map -local assert_arg = utils.assert_arg -require 'debug' - ---[[ -module("pl.seq",utils._module) -]] - -local seq = {} - --- given a number, return a function(y) which returns true if y > x --- @param x a number -function seq.greater_than(x) - return function(v) - return tonumber(v) > x - end -end - --- given a number, returns a function(y) which returns true if y < x --- @param x a number -function seq.less_than(x) - return function(v) - return tonumber(v) < x - end -end - --- given any value, return a function(y) which returns true if y == x --- @param x a value -function seq.equal_to(x) - if type(x) == "number" then - return function(v) - return tonumber(v) == x - end - else - return function(v) - return v == x - end - end -end - ---- given a string, return a function(y) which matches y against the string. --- @param s a string -function seq.matching(s) - return function(v) - return strfind(v,s) - end -end - ---- sequence adaptor for a table. Note that if any generic function is --- passed a table, it will automatically use seq.list() --- @param t a list-like table --- @usage sum(list(t)) is the sum of all elements of t --- @usage for x in list(t) do...end -function seq.list(t) - assert_arg(1,t,'table') - local key,value - return function() - key,value = next(t,key) - return value - end -end - ---- return the keys of the table. --- @param t a list-like table --- @return iterator over keys -function seq.keys(t) - assert_arg(1,t,'table') - local key,value - return function() - key,value = next(t,key) - return key - end -end - -local list = seq.list -local function default_iter(iter) - if type(iter) == 'table' then return list(iter) - else return iter end -end - -seq.iter = default_iter - ---- create an iterator over a numerical range. Like the standard Python function xrange. --- @param start a number --- @param finish a number greater than start -function seq.range(start,finish) - local i = start - 1 - return function() - i = i + 1 - if i > finish then return nil - else return i end - end -end - --- count the number of elements in the sequence which satisfy the predicate --- @param iter a sequence --- @param condn a predicate function (must return either true or false) --- @param optional argument to be passed to predicate as second argument. -function seq.count(iter,condn,arg) - local i = 0 - seq.foreach(iter,function(val) - if condn(val,arg) then i = i + 1 end - end) - return i -end - ---- return the minimum and the maximum value of the sequence. --- @param iter a sequence -function seq.minmax(iter) - local vmin,vmax = 1e70,-1e70 - for v in default_iter(iter) do - v = tonumber(v) - if v < vmin then vmin = v end - if v > vmax then vmax = v end - end - return vmin,vmax -end - ---- return the sum and element count of the sequence. --- @param iter a sequence --- @param fn an optional function to apply to the values -function seq.sum(iter,fn) - local s = 0 - local i = 0 - for v in default_iter(iter) do - if fn then v = fn(v) end - s = s + v - i = i + 1 - end - return s,i -end - ---- create a table from the sequence. (This will make the result a List.) --- @param iter a sequence --- @return a List --- @usage copy(list(ls)) is equal to ls --- @usage copy(list {1,2,3}) == List{1,2,3} -function seq.copy(iter) - local res = {} - for v in default_iter(iter) do - tappend(res,v) - end - setmetatable(res,_List) - return res -end - ---- create a table of pairs from the double-valued sequence. --- @param iter a double-valued sequence --- @param i1 used to capture extra iterator values --- @param i2 as with pairs & ipairs --- @usage copy2(ipairs{10,20,30}) == {{1,10},{2,20},{3,30}} --- @return a list-like table -function seq.copy2 (iter,i1,i2) - local res = {} - for v1,v2 in iter,i1,i2 do - tappend(res,{v1,v2}) - end - return res -end - ---- create a table of 'tuples' from a multi-valued sequence. --- A generalization of copy2 above --- @param iter a multiple-valued sequence --- @return a list-like table -function seq.copy_tuples (iter) - iter = default_iter(iter) - local res = {} - local row = {iter()} - while #row > 0 do - tappend(res,row) - row = {iter()} - end - return res -end - ---- return an iterator of random numbers. --- @param n the length of the sequence --- @param l same as the first optional argument to math.random --- @param u same as the second optional argument to math.random --- @return a sequnce -function seq.random(n,l,u) - local rand - assert(type(n) == 'number') - if u then - rand = function() return mrandom(l,u) end - elseif l then - rand = function() return mrandom(l) end - else - rand = mrandom - end - - return function() - if n == 0 then return nil - else - n = n - 1 - return rand() - end - end -end - ---- return an iterator to the sorted elements of a sequence. --- @param iter a sequence --- @param comp an optional comparison function (comp(x,y) is true if x < y) -function seq.sort(iter,comp) - local t = seq.copy(iter) - tsort(t,comp) - return list(t) -end - ---- return an iterator which returns elements of two sequences. --- @param iter1 a sequence --- @param iter2 a sequence --- @usage for x,y in seq.zip(ls1,ls2) do....end -function seq.zip(iter1,iter2) - iter1 = default_iter(iter1) - iter2 = default_iter(iter2) - return function() - return iter1(),iter2() - end -end - ---- A table where the key/values are the values and value counts of the sequence. --- This version works with 'hashable' values like strings and numbers.
    --- pl.tablex.count_map is more general. --- @param iter a sequence --- @return a map-like table --- @return a table --- @see pl.tablex.count_map -function seq.count_map(iter) - local t = {} - local v - for s in default_iter(iter) do - v = t[s] - if v then t[s] = v + 1 - else t[s] = 1 end - end - return setmetatable(t,_Map) -end - --- given a sequence, return all the unique values in that sequence. --- @param iter a sequence --- @param returns_table true if we return a table, not a sequence --- @return a sequence or a table; defaults to a sequence. -function seq.unique(iter,returns_table) - local t = seq.count_map(iter) - local res = {} - for k in pairs(t) do tappend(res,k) end - table.sort(res) - if returns_table then - return res - else - return list(res) - end -end - --- print out a sequence @iter, with a separator @sep (default space) --- and maximum number of values per line @nfields (default 7) --- @fmt is an optional format function to create a representation of each value. -function seq.printall(iter,sep,nfields,fmt) - local write = io.write - if not sep then sep = ' ' end - if not nfields then - if sep == '\n' then nfields = 1e30 - else nfields = 7 end - end - if fmt then - local fstr = fmt - fmt = function(v) return format(fstr,v) end - end - local k = 1 - for v in default_iter(iter) do - if fmt then v = fmt(v) end - if k < nfields then - write(v,sep) - k = k + 1 - else - write(v,'\n') - k = 1 - end - end - write '\n' -end - --- return an iterator running over every element of two sequences (concatenation). --- @param iter1 a sequence --- @param iter2 a sequence -function seq.splice(iter1,iter2) - iter1 = default_iter(iter1) - iter2 = default_iter(iter2) - local iter = iter1 - return function() - local ret = iter() - if ret == nil then - if iter == iter1 then - iter = iter2 - return iter() - else return nil end - else - return ret - end - end -end - ---- return a sequence where every element of a sequence has been transformed --- by a function. If you don't supply an argument, then the function will --- receive both values of a double-valued sequence, otherwise behaves rather like --- tablex.map. --- @param fn a function to apply to elements; may take two arguments --- @param iter a sequence of one or two values --- @param arg optional argument to pass to function. -function seq.map(fn,iter,arg) - fn = function_arg(1,fn) - iter = default_iter(iter) - return function() - local v1,v2 = iter() - if v1 == nil then return nil end - if arg then return fn(v1,arg) or false - else return fn(v1,v2) or false - end - end -end - ---- filter a sequence using a predicate function --- @param iter a sequence of one or two values --- @param pred a boolean function; may take two arguments --- @param arg optional argument to pass to function. -function seq.filter (iter,pred,arg) - pred = function_arg(2,pred) - return function () - local v1,v2 - while true do - v1,v2 = iter() - if v1 == nil then return nil end - if arg then - if pred(v1,arg) then return v1,v2 end - else - if pred(v1,v2) then return v1,v2 end - end - end - end -end - ---- 'reduce' a sequence using a binary function. --- @param fun a function of two arguments --- @param iter a sequence --- @param oldval optional initial value --- @usage seq.reduce(operator.add,seq.list{1,2,3,4}) == 10 --- @usage seq.reduce('-',{1,2,3,4,5}) == -13 -function seq.reduce (fun,iter,oldval) - fun = function_arg(1,fun) - iter = default_iter(iter) - if not oldval then - oldval = iter() - end - local val = oldval - for v in iter do - val = fun(val,v) - end - return val -end - ---- take the first n values from the sequence. --- @param iter a sequence of one or two values --- @param n number of items to take --- @return a sequence of at most n items -function seq.take (iter,n) - local i = 1 - iter = default_iter(iter) - return function() - if i > n then return end - local val1,val2 = iter() - if not val1 then return end - i = i + 1 - return val1,val2 - end -end - ---- skip the first n values of a sequence --- @param iter a sequence of one or more values --- @param n number of items to skip -function seq.skip (iter,n) - n = n or 1 - for i = 1,n do iter() end - return iter -end - ---- a sequence with a sequence count and the original value.
    --- enum(copy(ls)) is a roundabout way of saying ipairs(ls). --- @param iter a single or double valued sequence --- @return sequence of (i,v), i = 1..n and v is from iter. -function seq.enum (iter) - local i = 0 - iter = default_iter(iter) - return function () - local val1,val2 = iter() - if not val1 then return end - i = i + 1 - return i,val1,val2 - end -end - ---- map using a named method over a sequence. --- @param iter a sequence --- @param name the method name --- @param arg1 optional first extra argument --- @param arg2 optional second extra argument -function seq.mapmethod (iter,name,arg1,arg2) - iter = default_iter(iter) - return function() - local val = iter() - if not val then return end - local fn = val[name] - if not fn then error(type(val).." does not have method "..name) end - return fn(val,arg1,arg2) - end -end - ---- a sequence of (last,current) values from another sequence. --- This will return S(i-1),S(i) if given S(i) --- @param iter a sequence -function seq.last (iter) - iter = default_iter(iter) - local l = iter() - if l == nil then return nil end - return function () - local val,ll - val = iter() - if val == nil then return nil end - ll = l - l = val - return val,ll - end -end - ---- call the function on each element of the sequence. --- @param iter a sequence with up to 3 values --- @param fn a function -function seq.foreach(iter,fn) - fn = function_arg(2,fn) - for i1,i2,i3 in default_iter(iter) do fn(i1,i2,i3) end -end - ----------------------- Sequence Adapters --------------------- - -local SMT -local callable = utils.is_callable - -local function SW (iter,...) - if callable(iter) then - return setmetatable({iter=iter},SMT) - else - return iter,... - end -end - - --- can't directly look these up in seq because of the wrong argument order... -local map,reduce,mapmethod = seq.map, seq.reduce, seq.mapmethod -local overrides = { - map = function(self,fun,arg) - return map(fun,self,arg) - end, - reduce = function(self,fun) - return reduce(fun,self) - end -} - -SMT = { - __index = function (tbl,key) - local s = overrides[key] or seq[key] - if s then - return function(sw,...) return SW(s(sw.iter,...)) end - else - return function(sw,...) return SW(mapmethod(sw.iter,key,...)) end - end - end, - __call = function (sw) - return sw.iter() - end, -} - -setmetatable(seq,{ - __call = function(tbl,iter) - if not callable(iter) then - if type(iter) == 'table' then iter = seq.list(iter) - else return iter - end - end - return setmetatable({iter=iter},SMT) - end -}) - ---- create a wrapped iterator over all lines in the file. --- @param f either a filename or nil (for standard input) --- @return a sequence wrapper -function seq.lines (f) - local iter = f and io.lines(f) or io.lines() - return SW(iter) -end - -function seq.import () - _G.debug.setmetatable(function() end,{ - __index = function(tbl,key) - local s = overrides[key] or seq[key] - if s then return s - else - return function(s,...) return seq.mapmethod(s,key,...) end - end - end - }) -end - -return seq diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/sip.lua b/Utils/luarocks/systree/share/lua/5.1/pl/sip.lua deleted file mode 100644 index c739a54ca..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/sip.lua +++ /dev/null @@ -1,335 +0,0 @@ ---- Simple Input Patterns (SIP).

    --- SIP patterns start with '$', then a --- one-letter type, and then an optional variable in curly braces.

    --- Example: ---

    ---  sip.match('$v=$q','name="dolly"',res)
    ---  ==> res=={'name','dolly'}
    ---  sip.match('($q{first},$q{second})','("john","smith")',res)
    ---  ==> res=={second='smith',first='john'}
    --- 
    ---
    --- Type names
    --- v    identifier
    --- i     integer
    --- f     floating-point
    --- q    quoted string
    --- ([{<  match up to closing bracket
    --- 
    ---

    --- See the Guide --- @class module --- @name pl.sip - -local append,concat = table.insert,table.concat -local concat = table.concat -local ipairs,loadstring,type,unpack = ipairs,loadstring,type,unpack -local io,_G = io,_G -local print,rawget = print,rawget - -local patterns = { - FLOAT = '[%+%-%d]%d*%.?%d*[eE]?[%+%-]?%d*', - INTEGER = '[+%-%d]%d*', - IDEN = '[%a_][%w_]*', - FILE = '[%a%.\\][:%][%w%._%-\\]*' -} - -local function assert_arg(idx,val,tp) - if type(val) ~= tp then - error("argument "..idx.." must be "..tp, 2) - end -end - - ---[[ -module ('pl.sip',utils._module) -]] - -local sip = {} - -local brackets = {['<'] = '>', ['('] = ')', ['{'] = '}', ['['] = ']' } -local stdclasses = {a=1,c=0,d=1,l=1,p=0,u=1,w=1,x=1,s=0} - -local _patterns = {} - - -local function group(s) - return '('..s..')' -end - --- escape all magic characters except $, which has special meaning --- Also, un-escape any characters after $, so $( passes through as is. -local function escape (spec) - --_G.print('spec',spec) - local res = spec:gsub('[%-%.%+%[%]%(%)%^%%%?%*]','%%%1'):gsub('%$%%(%S)','$%1') - --_G.print('res',res) - return res -end - -local function imcompressible (s) - return s:gsub('%s+','\001') -end - --- [handling of spaces in patterns] --- spaces may be 'compressed' (i.e will match zero or more spaces) --- unless this occurs within a number or an identifier. So we mark --- the four possible imcompressible patterns first and then replace. --- The possible alnum patterns are v,f,a,d,x,l and u. -local function compress_spaces (s) - s = s:gsub('%$[vifadxlu]%s+%$[vfadxlu]',imcompressible) - s = s:gsub('[%w_]%s+[%w_]',imcompressible) - s = s:gsub('[%w_]%s+%$[vfadxlu]',imcompressible) - s = s:gsub('%$[vfadxlu]%s+[%w_]',imcompressible) - s = s:gsub('%s+','%%s*') - s = s:gsub('\001',' ') - return s -end - ---- convert a SIP pattern into the equivalent Lua string pattern. --- @param spec a SIP pattern --- @param options a table; only the at_start field is --- currently meaningful and esures that the pattern is anchored --- at the start of the string. --- @return a Lua string pattern. -function sip.create_pattern (spec,options) - assert_arg(1,spec,'string') - local fieldnames,fieldtypes = {},{} - - if type(spec) == 'string' then - spec = escape(spec) - else - local res = {} - for i,s in ipairs(spec) do - res[i] = escape(s) - end - spec = concat(res,'.-') - end - - local kount = 1 - - local function addfield (name,type) - if not name then name = kount end - if fieldnames then append(fieldnames,name) end - if fieldtypes then fieldtypes[name] = type end - kount = kount + 1 - end - - local named_vars, pattern - named_vars = spec:find('{%a+}') - pattern = '%$%S' - - if options and options.at_start then - spec = '^'..spec - end - if spec:sub(-1,-1) == '$' then - spec = spec:sub(1,-2)..'$r' - if named_vars then spec = spec..'{rest}' end - end - - - local names - - if named_vars then - names = {} - spec = spec:gsub('{(%a+)}',function(name) - append(names,name) - return '' - end) - end - spec = compress_spaces(spec) - - local k = 1 - local err - local r = (spec:gsub(pattern,function(s) - local type,name - type = s:sub(2,2) - if names then name = names[k]; k=k+1 end - -- this kludge is necessary because %q generates two matches, and - -- we want to ignore the first. Not a problem for named captures. - if not names and type == 'q' then - addfield(nil,'Q') - else - addfield(name,type) - end - local res - if type == 'v' then - res = group(patterns.IDEN) - elseif type == 'i' then - res = group(patterns.INTEGER) - elseif type == 'f' then - res = group(patterns.FLOAT) - elseif type == 'r' then - res = '(%S.*)' - elseif type == 'q' then - -- some Lua pattern matching voodoo; we want to match '...' as - -- well as "...", and can use the fact that %n will match a - -- previous capture. Adding the extra field above comes from needing - -- to accomodate the extra spurious match (which is either ' or ") - addfield(name,type) - res = '(["\'])(.-)%'..(kount-2) - elseif type == 'p' then - res = '([%a]?[:]?[\\/%.%w_]+)' - else - local endbracket = brackets[type] - if endbracket then - res = '(%b'..type..endbracket..')' - elseif stdclasses[type] or stdclasses[type:lower()] then - res = '(%'..type..'+)' - else - err = "unknown format type or character class" - end - end - return res - end)) - --print(r,err) - if err then - return nil,err - else - return r,fieldnames,fieldtypes - end -end - - -local function tnumber (s) - return s == 'd' or s == 'i' or s == 'f' -end - -function sip.create_spec_fun(spec,options) - local fieldtypes,fieldnames - local ls = {} - spec,fieldnames,fieldtypes = sip.create_pattern(spec,options) - if not spec then return spec,fieldnames end - local named_vars = type(fieldnames[1]) == 'string' - for i = 1,#fieldnames do - append(ls,'mm'..i) - end - local fun = ('return (function(s,res)\n\tlocal %s = s:match(%q)\n'):format(concat(ls,','),spec) - fun = fun..'\tif not mm1 then return false end\n' - local k=1 - for i,f in ipairs(fieldnames) do - if f ~= '_' then - local var = 'mm'..i - if tnumber(fieldtypes[f]) then - var = 'tonumber('..var..')' - elseif brackets[fieldtypes[f]] then - var = var..':sub(2,-2)' - end - if named_vars then - fun = ('%s\tres.%s = %s\n'):format(fun,f,var) - else - if fieldtypes[f] ~= 'Q' then -- we skip the string-delim capture - fun = ('%s\tres[%d] = %s\n'):format(fun,k,var) - k = k + 1 - end - end - end - end - return fun..'\treturn true\nend)\n', named_vars -end - ---- convert a SIP pattern into a matching function. --- The returned function takes two arguments, the line and an empty table. --- If the line matched the pattern, then this function return true --- and the table is filled with field-value pairs. --- @param spec a SIP pattern --- @param options optional table; {anywhere=true} will stop pattern anchoring at start --- @return a function if successful, or nil, -function sip.compile(spec,options) - assert_arg(1,spec,'string') - local fun,names = sip.create_spec_fun(spec,options) - if not fun then return nil,names end - if rawget(_G,'_DEBUG') then print(fun) end - local chunk,err = loadstring(fun,'tmp') - if err then return nil,err end - return chunk(),names -end - -local cache = {} - ---- match a SIP pattern against a string. --- @param spec a SIP pattern --- @param line a string --- @param res a table to receive values --- @param options (optional) option table --- @return true or false -function sip.match (spec,line,res,options) - assert_arg(1,spec,'string') - assert_arg(2,line,'string') - assert_arg(3,res,'table') - if not cache[spec] then - cache[spec] = sip.compile(spec,options) - end - return cache[spec](line,res) -end - ---- match a SIP pattern against the start of a string. --- @param spec a SIP pattern --- @param line a string --- @param res a table to receive values --- @return true or false -function sip.match_at_start (spec,line,res) - return sip.match(spec,line,res,{at_start=true}) -end - ---- given a pattern and a file object, return an iterator over the results --- @param spec a SIP pattern --- @param f a file - use standard input if not specified. -function sip.fields (spec,f) - assert_arg(1,spec,'string') - f = f or io.stdin - local fun,err = sip.compile(spec) - if not fun then return nil,err end - local res = {} - return function() - while true do - local line = f:read() - if not line then return end - if fun(line,res) then - local values = res - res = {} - return unpack(values) - end - end - end -end - ---- register a match which will be used in the read function. --- @param spec a SIP pattern --- @param fun a function to be called with the results of the match --- @see read -function sip.pattern (spec,fun) - assert_arg(1,spec,'string') - local pat,named = sip.compile(spec) - append(_patterns,{pat=pat,named=named,callback=fun or false}) -end - ---- enter a loop which applies all registered matches to the input file. --- @param f a file object; if nil, then io.stdin is assumed. -function sip.read (f) - local owned,err - f = f or io.stdin - if type(f) == 'string' then - f,err = io.open(f) - if not f then return nil,err end - owned = true - end - local res = {} - for line in f:lines() do - for _,item in ipairs(_patterns) do - if item.pat(line,res) then - if item.callback then - if item.named then - item.callback(res) - else - item.callback(unpack(res)) - end - end - res = {} - break - end - end - end - if owned then f:close() end -end - -return sip diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/strict.lua b/Utils/luarocks/systree/share/lua/5.1/pl/strict.lua deleted file mode 100644 index f7d8c94c8..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/strict.lua +++ /dev/null @@ -1,71 +0,0 @@ ---- Checks uses of undeclared global variables. --- All global variables must be 'declared' through a regular assignment --- (even assigning nil will do) in a main chunk before being used --- anywhere or assigned to inside a function. --- @class module --- @name pl.strict - -require 'debug' -local getinfo, error, rawset, rawget = debug.getinfo, error, rawset, rawget -local handler,hooked - -local mt = getmetatable(_G) -if mt == nil then - mt = {} - setmetatable(_G, mt) -elseif mt.hook then - hooked = true -end - --- predeclaring _PROMPT keeps the Lua Interpreter happy -mt.__declared = {_PROMPT=true} - -local function what () - local d = getinfo(3, "S") - return d and d.what or "C" -end - -mt.__newindex = function (t, n, v) - if not mt.__declared[n] then - local w = what() - if w ~= "main" and w ~= "C" then - error("assign to undeclared variable '"..n.."'", 2) - end - mt.__declared[n] = true - end - rawset(t, n, v) -end - -handler = function(t,n) - if not mt.__declared[n] and what() ~= "C" then - error("variable '"..n.."' is not declared", 2) - end - return rawget(t, n) -end - -function package.strict (mod) - local mt = getmetatable(mod) - if mt == nil then - mt = {} - setmetatable(mod, mt) - end - mt.__declared = {} - mt.__newindex = function(t, n, v) - mt.__declared[n] = true - rawset(t, n, v) - end - mt.__index = function(t,n) - if not mt.__declared[n] then - error("variable '"..n.."' is not declared", 2) - end - return rawget(t, n) - end -end - -if not hooked then - mt.__index = handler -else - mt.hook(handler) -end - - diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/stringio.lua b/Utils/luarocks/systree/share/lua/5.1/pl/stringio.lua deleted file mode 100644 index 0129ddd56..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/stringio.lua +++ /dev/null @@ -1,144 +0,0 @@ ---- Reading and writing strings using file-like objects.
    ---

    ---  f = stringio.open(text)
    ---  l1 = f:read()  -- read first line
    ---  n,m = f:read ('*n','*n') -- read two numbers
    ---  for line in f:lines() do print(line) end -- iterate over all lines
    ---  f = stringio.create()
    ---  f:write('hello')
    ---  f:write('dolly')
    ---  assert(f:value(),'hellodolly')
    --- 
    --- See the Guide. --- @class module --- @name pl.stringio - -local getmetatable,tostring,unpack,tonumber = getmetatable,tostring,unpack,tonumber -local concat,append = table.concat,table.insert - -local stringio = {} - ---- Writer class -local SW = {} -SW.__index = SW - -local function xwrite(self,...) - local args = {...} --arguments may not be nil! - for i = 1, #args do - append(self.tbl,args[i]) - end -end - -function SW:write(arg1,arg2,...) - if arg2 then - xwrite(self,arg1,arg2,...) - else - append(self.tbl,arg1) - end -end - -function SW:writef(fmt,...) - self:write(fmt:format(...)) -end - -function SW:value() - return concat(self.tbl) -end - -function SW:close() -- for compatibility only -end - -function SW:seek() -end - ---- Reader class -local SR = {} -SR.__index = SR - -function SR:_read(fmt) - local i,str = self.i,self.str - local sz = #str - if i >= sz then return nil end - local res - if fmt == nil or fmt == '*l' then - local idx = str:find('\n',i) or (sz+1) - res = str:sub(i,idx-1) - self.i = idx+1 - elseif fmt == '*a' then - res = str:sub(i) - self.i = sz - elseif fmt == '*n' then - local _,i2,i2,idx - _,idx = str:find ('%s*%d+',i) - _,i2 = str:find ('%.%d+',idx+1) - if i2 then idx = i2 end - _,i2 = str:find ('[eE][%+%-]*%d+',idx+1) - if i2 then idx = i2 end - local val = str:sub(i,idx) - res = tonumber(val) - self.i = idx+1 - elseif type(fmt) == 'number' then - res = str:sub(i,i+fmt-1) - self.i = i + fmt - else - error("bad read format",2) - end - return res -end - -function SR:read(...) - local fmts = {...} - if #fmts <= 1 then - return self:_read(fmts[1]) - else - local res = {} - for i = 1, #fmts do - res[i] = self:_read(fmts[i]) - end - return unpack(res) - end -end - -function SR:seek(whence,offset) - local base - whence = whence or 'cur' - offset = offset or 0 - if whence == 'set' then - base = 1 - elseif whence == 'cur' then - base = self.i - elseif whence == 'end' then - base = #self.str - end - self.i = base + offset - return self.i -end - -function SR:lines() - return function() - return self:read() - end -end - -function SR:close() -- for compatibility only -end - ---- create a file-like object which can be used to construct a string. --- The resulting object has an extra value() method for --- retrieving the string value. --- @usage f = create(); f:write('hello, dolly\n'); print(f:value()) -function stringio.create() - return setmetatable({tbl={}},SW) -end - ---- create a file-like object for reading from a given string. --- @param s The input string. -function stringio.open(s) - return setmetatable({str=s,i=1},SR) -end - -function stringio.lines(s) - return stringio.open(s):lines() -end - -return stringio diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/stringx.lua b/Utils/luarocks/systree/share/lua/5.1/pl/stringx.lua deleted file mode 100644 index 5699b2039..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/stringx.lua +++ /dev/null @@ -1,441 +0,0 @@ ---- Python-style string library.

    --- see 3.6.1 of the Python reference.

    --- If you want to make these available as string methods, then say --- stringx.import() to bring them into the standard string --- table. --- @class module --- @name pl.stringx -local string = string -local find = string.find -local type,setmetatable,getmetatable,ipairs,unpack = type,setmetatable,getmetatable,ipairs,unpack -local error,tostring = error,tostring -local gsub = string.gsub -local rep = string.rep -local sub = string.sub -local concat = table.concat -local utils = require 'pl.utils' -local escape = utils.escape -local ceil = math.ceil -local _G = _G -local assert_arg,usplit,list_MT = utils.assert_arg,utils.split,utils.stdmt.List -local lstrip - -local function assert_string (n,s) - assert_arg(n,s,'string') -end - -local function non_empty(s) - return #s > 0 -end - -local function assert_nonempty_string(n,s) - assert_arg(n,s,'string',non_empty,'must be a non-empty string') -end - ---[[ -module ('pl.stringx',utils._module) -]] - -local stringx = {} - ---- does s only contain alphabetic characters?. --- @param s a string -function stringx.isalpha(s) - assert_string(1,s) - return find(s,'^%a+$') == 1 -end - ---- does s only contain digits?. --- @param s a string -function stringx.isdigit(s) - assert_string(1,s) - return find(s,'^%d+$') == 1 -end - ---- does s only contain alphanumeric characters?. --- @param s a string -function stringx.isalnum(s) - assert_string(1,s) - return find(s,'^%w+$') == 1 -end - ---- does s only contain spaces?. --- @param s a string -function stringx.isspace(s) - assert_string(1,s) - return find(s,'^%s+$') == 1 -end - ---- does s only contain lower case characters?. --- @param s a string -function stringx.islower(s) - assert_string(1,s) - return find(s,'^[%l%s]+$') == 1 -end - ---- does s only contain upper case characters?. --- @param s a string -function stringx.isupper(s) - assert_string(1,s) - return find(s,'^[%u%s]+$') == 1 -end - ---- concatenate the strings using this string as a delimiter. --- @param self the string --- @param seq a table of strings or numbers --- @usage (' '):join {1,2,3} == '1 2 3' -function stringx.join (self,seq) - assert_string(1,self) - return concat(seq,self) -end - ---- does string start with the substring?. --- @param self the string --- @param s2 a string -function stringx.startswith(self,s2) - assert_string(1,self) - assert_string(2,s2) - return find(self,s2,1,true) == 1 -end - -local function _find_all(s,sub,first,last) - if sub == '' then return #s+1,#s end - local i1,i2 = find(s,sub,first,true) - local res - local k = 0 - while i1 do - res = i1 - k = k + 1 - i1,i2 = find(s,sub,i2+1,true) - if last and i1 > last then break end - end - return res,k -end - ---- does string end with the given substring?. --- @param s a string --- @param send a substring or a table of suffixes -function stringx.endswith(s,send) - assert_string(1,s) - if type(send) == 'string' then - return #s >= #send and s:find(send, #s-#send+1, true) and true or false - elseif type(send) == 'table' then - local endswith = stringx.endswith - for _,suffix in ipairs(send) do - if endswith(s,suffix) then return true end - end - return false - else - error('argument #2: either a substring or a table of suffixes expected') - end -end - --- break string into a list of lines --- @param self the string --- @param keepends (currently not used) -function stringx.splitlines (self,keepends) - assert_string(1,self) - local res = usplit(self,'[\r\n]') - -- we are currently hacking around a problem with utils.split (see stringx.split) - if #res == 0 then res = {''} end - return setmetatable(res,list_MT) -end - -local function tab_expand (self,n) - return (gsub(self,'([^\t]*)\t', function(s) - return s..(' '):rep(n - #s % n) - end)) -end - ---- replace all tabs in s with n spaces. If not specified, n defaults to 8. --- with 0.9.5 this now correctly expands to the next tab stop (if you really --- want to just replace tabs, use :gsub('\t',' ') etc) --- @param self the string --- @param n number of spaces to expand each tab, (default 8) -function stringx.expandtabs(self,n) - assert_string(1,self) - n = n or 8 - if not self:find '\n' then return tab_expand(self,n) end - local res,i = {},1 - for line in stringx.lines(self) do - res[i] = tab_expand(line,n) - i = i + 1 - end - return table.concat(res,'\n') -end - ---- find index of first instance of sub in s from the left. --- @param self the string --- @param sub substring --- @param i1 start index -function stringx.lfind(self,sub,i1) - assert_string(1,self) - assert_string(2,sub) - local idx = find(self,sub,i1,true) - if idx then return idx else return nil end -end - ---- find index of first instance of sub in s from the right. --- @param self the string --- @param sub substring --- @param first first index --- @param last last index -function stringx.rfind(self,sub,first,last) - assert_string(1,self) - assert_string(2,sub) - local idx = _find_all(self,sub,first,last) - if idx then return idx else return nil end -end - ---- replace up to n instances of old by new in the string s. --- if n is not present, replace all instances. --- @param s the string --- @param old the target substring --- @param new the substitution --- @param n optional maximum number of substitutions --- @return result string --- @return the number of substitutions -function stringx.replace(s,old,new,n) - assert_string(1,s) - assert_string(1,old) - return (gsub(s,escape(old),new:gsub('%%','%%%%'),n)) -end - ---- split a string into a list of strings using a delimiter. --- @class function --- @name split --- @param self the string --- @param re a delimiter (defaults to whitespace) --- @param n maximum number of results --- @usage #(('one two'):split()) == 2 --- @usage ('one,two,three'):split(',') == List{'one','two','three'} --- @usage ('one,two,three'):split(',',2) == List{'one','two,three'} -function stringx.split(self,re,n) - local s = self - local plain = true - if not re then -- default spaces - s = lstrip(s) - plain = false - end - local res = usplit(s,re,plain,n) - if re and re ~= '' and find(s,re,-#re,true) then - res[#res+1] = "" - end - return setmetatable(res,list_MT) -end - ---- split a string using a pattern. Note that at least one value will be returned! --- @param self the string --- @param re a Lua string pattern (defaults to whitespace) --- @return the parts of the string --- @usage a,b = line:splitv('=') -function stringx.splitv (self,re) - assert_string(1,self) - return utils.splitv(self,re) -end - -local function copy(self) - return self..'' -end - ---- count all instances of substring in string. --- @param self the string --- @param sub substring -function stringx.count(self,sub) - assert_string(1,self) - local i,k = _find_all(self,sub,1) - return k -end - -local function _just(s,w,ch,left,right) - local n = #s - if w > n then - if not ch then ch = ' ' end - local f1,f2 - if left and right then - local ln = ceil((w-n)/2) - local rn = w - n - ln - f1 = rep(ch,ln) - f2 = rep(ch,rn) - elseif right then - f1 = rep(ch,w-n) - f2 = '' - else - f2 = rep(ch,w-n) - f1 = '' - end - return f1..s..f2 - else - return copy(s) - end -end - ---- left-justify s with width w. --- @param self the string --- @param w width of justification --- @param ch padding character, default ' ' -function stringx.ljust(self,w,ch) - assert_string(1,self) - assert_arg(2,w,'number') - return _just(self,w,ch,true,false) -end - ---- right-justify s with width w. --- @param s the string --- @param w width of justification --- @param ch padding character, default ' ' -function stringx.rjust(s,w,ch) - assert_string(1,s) - assert_arg(2,w,'number') - return _just(s,w,ch,false,true) -end - ---- center-justify s with width w. --- @param s the string --- @param w width of justification --- @param ch padding character, default ' ' -function stringx.center(s,w,ch) - assert_string(1,s) - assert_arg(2,w,'number') - return _just(s,w,ch,true,true) -end - -local function _strip(s,left,right,chrs) - if not chrs then - chrs = '%s' - else - chrs = '['..escape(chrs)..']' - end - if left then - local i1,i2 = find(s,'^'..chrs..'*') - if i2 >= i1 then - s = sub(s,i2+1) - end - end - if right then - local i1,i2 = find(s,chrs..'*$') - if i2 >= i1 then - s = sub(s,1,i1-1) - end - end - return s -end - ---- trim any whitespace on the left of s. --- @param self the string --- @param chrs default space, can be a string of characters to be trimmed -function stringx.lstrip(self,chrs) - assert_string(1,self) - return _strip(self,true,false,chrs) -end -lstrip = stringx.lstrip - ---- trim any whitespace on the right of s. --- @param s the string --- @param chrs default space, can be a string of characters to be trimmed -function stringx.rstrip(s,chrs) - assert_string(1,s) - return _strip(s,false,true,chrs) -end - ---- trim any whitespace on both left and right of s. --- @param self the string --- @param chrs default space, can be a string of characters to be trimmed -function stringx.strip(self,chrs) - assert_string(1,self) - return _strip(self,true,true,chrs) -end - --- The partition functions split a string using a delimiter into three parts: --- the part before, the delimiter itself, and the part afterwards -local function _partition(p,delim,fn) - local i1,i2 = fn(p,delim) - if not i1 or i1 == -1 then - return p,'','' - else - if not i2 then i2 = i1 end - return sub(p,1,i1-1),sub(p,i1,i2),sub(p,i2+1) - end -end - ---- partition the string using first occurance of a delimiter --- @param self the string --- @param ch delimiter --- @return part before ch --- @return ch --- @return part after ch -function stringx.partition(self,ch) - assert_string(1,self) - assert_nonempty_string(2,ch) - return _partition(self,ch,stringx.lfind) -end - ---- partition the string p using last occurance of a delimiter --- @param self the string --- @param ch delimiter --- @return part before ch --- @return ch --- @return part after ch -function stringx.rpartition(self,ch) - assert_string(1,self) - assert_nonempty_string(2,ch) - return _partition(self,ch,stringx.rfind) -end - ---- return the 'character' at the index. --- @param self the string --- @param idx an index (can be negative) --- @return a substring of length 1 if successful, empty string otherwise. -function stringx.at(self,idx) - assert_string(1,self) - assert_arg(2,idx,'number') - return sub(self,idx,idx) -end - ---- return an interator over all lines in a string --- @param self the string --- @return an iterator -function stringx.lines (self) - assert_string(1,self) - local s = self - if not s:find '\n$' then s = s..'\n' end - return s:gmatch('([^\n]*)\n') -end - ---- iniital word letters uppercase ('title case'). --- Here 'words' mean chunks of non-space characters. --- @param self the string --- @return a string with each word's first letter uppercase -function stringx.title(self) - return (self:gsub('(%S)(%S*)',function(f,r) - return f:upper()..r:lower() - end)) -end - -stringx.capitalize = stringx.title - -local elipsis = '...' -local n_elipsis = #elipsis - ---- return a shorted version of a string. --- @param self the string --- @param sz the maxinum size allowed --- @param tail true if we want to show the end of the string (head otherwise) -function stringx.shorten(self,sz,tail) - if #self > sz then - if sz < n_elipsis then return elipsis:sub(1,sz) end - if tail then - local i = #self - sz + 1 + n_elipsis - return elipsis .. self:sub(i) - else - return self:sub(1,sz-n_elipsis) .. elipsis - end - end - return self -end - -function stringx.import(dont_overload) - utils.import(stringx,string) -end - -return stringx diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/tablex.lua b/Utils/luarocks/systree/share/lua/5.1/pl/tablex.lua deleted file mode 100644 index bfddb4b70..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/tablex.lua +++ /dev/null @@ -1,766 +0,0 @@ ---- Extended operations on Lua tables. --- @class module --- @name pl.tablex -local getmetatable,setmetatable,require = getmetatable,setmetatable,require -local append,remove = table.insert,table.remove -local min,max = math.min,math.max -local pairs,type,unpack,next,ipairs,select,tostring = pairs,type,unpack,next,ipairs,select,tostring -local utils = require ('pl.utils') -local function_arg = utils.function_arg -local Set = utils.stdmt.Set -local List = utils.stdmt.List -local Map = utils.stdmt.Map -local assert_arg = utils.assert_arg - ---[[ -module ('pl.tablex',utils._module) -]] - -local tablex = {} - --- generally, functions that make copies of tables try to preserve the metatable. --- However, when the source has no obvious type, then we attach appropriate metatables --- like List, Map, etc to the result. -local function setmeta (res,tbl,def) - return setmetatable(res,getmetatable(tbl) or def) -end - -local function makelist (res) - return setmetatable(res,List) -end - ---- copy a table into another, in-place. --- @param t1 destination table --- @param t2 source table --- @return first table -function tablex.update (t1,t2) - assert_arg(1,t1,'table') - assert_arg(2,t2,'table') - for k,v in pairs(t2) do - t1[k] = v - end - return t1 -end - ---- total number of elements in this table.
    --- Note that this is distinct from #t, which is the number --- of values in the array part; this value will always --- be greater or equal. The difference gives the size of --- the hash part, for practical purposes. --- @param t a table --- @return the size -function tablex.size (t) - assert_arg(1,t,'table') - local i = 0 - for k in pairs(t) do i = i + 1 end - return i -end - ---- make a shallow copy of a table --- @param t source table --- @return new table -function tablex.copy (t) - assert_arg(1,t,'table') - local res = {} - for k,v in pairs(t) do - res[k] = v - end - return res -end - ---- make a deep copy of a table, recursively copying all the keys and fields. --- This will also set the copied table's metatable to that of the original. --- @param t A table --- @return new table -function tablex.deepcopy(t) - assert_arg(1,t,'table') - if type(t) ~= 'table' then return t end - local mt = getmetatable(t) - local res = {} - for k,v in pairs(t) do - if type(v) == 'table' then - v = tablex.deepcopy(v) - end - res[k] = v - end - setmetatable(res,mt) - return res -end - -local abs = math.abs - ---- compare two values. --- if they are tables, then compare their keys and fields recursively. --- @param t1 A value --- @param t2 A value --- @param ignore_mt if true, ignore __eq metamethod (default false) --- @param eps if defined, then used for any number comparisons --- @return true or false -function tablex.deepcompare(t1,t2,ignore_mt,eps) - local ty1 = type(t1) - local ty2 = type(t2) - if ty1 ~= ty2 then return false end - -- non-table types can be directly compared - if ty1 ~= 'table' then - if ty1 == 'number' and eps then return abs(t1-t2) < eps end - return t1 == t2 - end - -- as well as tables which have the metamethod __eq - local mt = getmetatable(t1) - if not ignore_mt and mt and mt.__eq then return t1 == t2 end - for k1,v1 in pairs(t1) do - local v2 = t2[k1] - if v2 == nil or not tablex.deepcompare(v1,v2,ignore_mt,eps) then return false end - end - for k2,v2 in pairs(t2) do - local v1 = t1[k2] - if v1 == nil or not tablex.deepcompare(v1,v2,ignore_mt,eps) then return false end - end - return true -end - ---- compare two list-like tables using a predicate. --- @param t1 a table --- @param t2 a table --- @param cmp A comparison function -function tablex.compare (t1,t2,cmp) - assert_arg(1,t1,'table') - assert_arg(2,t2,'table') - if #t1 ~= #t2 then return false end - cmp = function_arg(3,cmp) - for k in ipairs(t1) do - if not cmp(t1[k],t2[k]) then return false end - end - return true -end - ---- compare two list-like tables using an optional predicate, without regard for element order. --- @param t1 a list-like table --- @param t2 a list-like table --- @param cmp A comparison function (may be nil) -function tablex.compare_no_order (t1,t2,cmp) - assert_arg(1,t1,'table') - assert_arg(2,t2,'table') - if cmp then cmp = function_arg(3,cmp) end - if #t1 ~= #t2 then return false end - local visited = {} - for i = 1,#t1 do - local val = t1[i] - local gotcha - for j = 1,#t2 do if not visited[j] then - local match - if cmp then match = cmp(val,t2[j]) else match = val == t2[j] end - if match then - gotcha = j - break - end - end end - if not gotcha then return false end - visited[gotcha] = true - end - return true -end - - ---- return the index of a value in a list. --- Like string.find, there is an optional index to start searching, --- which can be negative. --- @param t A list-like table (i.e. with numerical indices) --- @param val A value --- @param idx index to start; -1 means last element,etc (default 1) --- @return index of value or nil if not found --- @usage find({10,20,30},20) == 2 --- @usage find({'a','b','a','c'},'a',2) == 3 - -function tablex.find(t,val,idx) - assert_arg(1,t,'table') - idx = idx or 1 - if idx < 0 then idx = #t + idx + 1 end - for i = idx,#t do - if t[i] == val then return i end - end - return nil -end - ---- return the index of a value in a list, searching from the end. --- Like string.find, there is an optional index to start searching, --- which can be negative. --- @param t A list-like table (i.e. with numerical indices) --- @param val A value --- @param idx index to start; -1 means last element,etc (default 1) --- @return index of value or nil if not found --- @usage rfind({10,10,10},10) == 3 -function tablex.rfind(t,val,idx) - assert_arg(1,t,'table') - idx = idx or #t - if idx < 0 then idx = #t + idx + 1 end - for i = idx,1,-1 do - if t[i] == val then return i end - end - return nil -end - - ---- return the index (or key) of a value in a table using a comparison function. --- @param t A table --- @param cmp A comparison function --- @param arg an optional second argument to the function --- @return index of value, or nil if not found --- @return value returned by comparison function -function tablex.find_if(t,cmp,arg) - assert_arg(1,t,'table') - cmp = function_arg(2,cmp) - for k,v in pairs(t) do - local c = cmp(v,arg) - if c then return k,c end - end - return nil -end - ---- return a list of all values in a table indexed by another list. --- @param tbl a table --- @param idx an index table (a list of keys) --- @return a list-like table --- @usage index_by({10,20,30,40},{2,4}) == {20,40} --- @usage index_by({one=1,two=2,three=3},{'one','three'}) == {1,3} -function tablex.index_by(tbl,idx) - assert_arg(1,tbl,'table') - assert_arg(2,idx,'table') - local res = {} - for _,i in ipairs(idx) do - append(res,tbl[i]) - end - return setmeta(res,tbl,List) -end - ---- apply a function to all values of a table. --- This returns a table of the results. --- Any extra arguments are passed to the function. --- @param fun A function that takes at least one argument --- @param t A table --- @param ... optional arguments --- @usage map(function(v) return v*v end, {10,20,30,fred=2}) is {100,400,900,fred=4} -function tablex.map(fun,t,...) - assert_arg(1,t,'table') - fun = function_arg(1,fun) - local res = {} - for k,v in pairs(t) do - res[k] = fun(v,...) - end - return setmeta(res,t) -end - ---- apply a function to all values of a list. --- This returns a table of the results. --- Any extra arguments are passed to the function. --- @param fun A function that takes at least one argument --- @param t a table (applies to array part) --- @param ... optional arguments --- @return a list-like table --- @usage imap(function(v) return v*v end, {10,20,30,fred=2}) is {100,400,900} -function tablex.imap(fun,t,...) - assert_arg(1,t,'table') - fun = function_arg(1,fun) - local res = {} - for i = 1,#t do - res[i] = fun(t[i],...) or false - end - return setmeta(res,t,List) -end - ---- apply a named method to values from a table. --- @param name the method name --- @param t a list-like table --- @param ... any extra arguments to the method -function tablex.map_named_method (name,t,...) - assert_arg(1,name,'string') - assert_arg(2,t,'table') - local res = {} - for i = 1,#t do - local val = t[i] - local fun = val[name] - res[i] = fun(val,...) - end - return setmeta(res,t,List) -end - - ---- apply a function to all values of a table, in-place. --- Any extra arguments are passed to the function. --- @param fun A function that takes at least one argument --- @param t a table --- @param ... extra arguments -function tablex.transform (fun,t,...) - assert_arg(1,t,'table') - fun = function_arg(1,fun) - for k,v in pairs(t) do - t[v] = fun(v,...) - end -end - ---- generate a table of all numbers in a range --- @param start number --- @param finish number --- @param step optional increment (default 1 for increasing, -1 for decreasing) -function tablex.range (start,finish,step) - local res = {} - local k = 1 - if not step then - if finish > start then step = finish > start and 1 or -1 end - end - for i=start,finish,step do res[k]=i; k=k+1 end - return res -end - ---- apply a function to values from two tables. --- @param fun a function of at least two arguments --- @param t1 a table --- @param t2 a table --- @param ... extra arguments --- @return a table --- @usage map2('+',{1,2,3,m=4},{10,20,30,m=40}) is {11,22,23,m=44} -function tablex.map2 (fun,t1,t2,...) - assert_arg(1,t1,'table') - assert_arg(2,t2,'table') - fun = function_arg(1,fun) - local res = {} - for k,v in pairs(t1) do - res[k] = fun(v,t2[k],...) - end - return setmeta(res,t1,List) -end - ---- apply a function to values from two arrays. --- @param fun a function of at least two arguments --- @param t1 a list-like table --- @param t2 a list-like table --- @param ... extra arguments --- @usage imap2('+',{1,2,3,m=4},{10,20,30,m=40}) is {11,22,23} -function tablex.imap2 (fun,t1,t2,...) - assert_arg(2,t1,'table') - assert_arg(3,t2,'table') - fun = function_arg(1,fun) - local res = {} - for i = 1,#t1 do - res[i] = fun(t1[i],t2[i],...) - end - return res -end - ---- 'reduce' a list using a binary function. --- @param fun a function of two arguments --- @param t a list-like table --- @return the result of the function --- @usage reduce('+',{1,2,3,4}) == 10 -function tablex.reduce (fun,t) - assert_arg(2,t,'table') - fun = function_arg(1,fun) - local n = #t - local res = t[1] - for i = 2,n do - res = fun(res,t[i]) - end - return res -end - ---- apply a function to all elements of a table. --- The arguments to the function will be the value, --- the key and finally any extra arguments passed to this function. --- Note that the Lua 5.0 function table.foreach passed the key first. --- @param t a table --- @param fun a function with at least one argument --- @param ... extra arguments -function tablex.foreach(t,fun,...) - assert_arg(1,t,'table') - fun = function_arg(2,fun) - for k,v in pairs(t) do - fun(v,k,...) - end -end - ---- apply a function to all elements of a list-like table in order. --- The arguments to the function will be the value, --- the index and finally any extra arguments passed to this function --- @param t a table --- @param fun a function with at least one argument --- @param ... optional arguments -function tablex.foreachi(t,fun,...) - assert_arg(1,t,'table') - fun = function_arg(2,fun) - for k,v in ipairs(t) do - fun(v,k,...) - end -end - - ---- Apply a function to a number of tables. --- A more general version of map --- The result is a table containing the result of applying that function to the --- ith value of each table. Length of output list is the minimum length of all the lists --- @param fun a function of n arguments --- @param ... n tables --- @usage mapn(function(x,y,z) return x+y+z end, {1,2,3},{10,20,30},{100,200,300}) is {111,222,333} --- @usage mapn(math.max, {1,20,300},{10,2,3},{100,200,100}) is {100,200,300} --- @param fun A function that takes as many arguments as there are tables -function tablex.mapn(fun,...) - fun = function_arg(1,fun) - local res = {} - local lists = {...} - local minn = 1e40 - for i = 1,#lists do - minn = min(minn,#(lists[i])) - end - for i = 1,minn do - local args = {} - for j = 1,#lists do - args[#args+1] = lists[j][i] - end - res[#res+1] = fun(unpack(args)) - end - return res -end - ---- call the function with the key and value pairs from a table. --- The function can return a value and a key (note the order!). If both --- are not nil, then this pair is inserted into the result. If only value is not nil, then --- it is appended to the result. --- @param fun A function which will be passed each key and value as arguments, plus any extra arguments to pairmap. --- @param t A table --- @param ... optional arguments --- @usage pairmap({fred=10,bonzo=20},function(k,v) return v end) is {10,20} --- @usage pairmap({one=1,two=2},function(k,v) return {k,v},k end) is {one={'one',1},two={'two',2}} -function tablex.pairmap(fun,t,...) - assert_arg(1,t,'table') - fun = function_arg(1,fun) - local res = {} - for k,v in pairs(t) do - local rv,rk = fun(k,v,...) - if rk then - res[rk] = rv - else - res[#res+1] = rv - end - end - return res -end - -local function keys_op(i,v) return i end - ---- return all the keys of a table in arbitrary order. --- @param t A table -function tablex.keys(t) - assert_arg(1,t,'table') - return makelist(tablex.pairmap(keys_op,t)) -end - -local function values_op(i,v) return v end - ---- return all the values of the table in arbitrary order --- @param t A table -function tablex.values(t) - assert_arg(1,t,'table') - return makelist(tablex.pairmap(values_op,t)) -end - -local function index_map_op (i,v) return i,v end - ---- create an index map from a list-like table. The original values become keys, --- and the associated values are the indices into the original list. --- @param t a list-like table --- @return a map-like table -function tablex.index_map (t) - assert_arg(1,t,'table') - return setmetatable(tablex.pairmap(index_map_op,t),Map) -end - -local function set_op(i,v) return true,v end - ---- create a set from a list-like table. A set is a table where the original values --- become keys, and the associated values are all true. --- @param t a list-like table --- @return a set (a map-like table) -function tablex.makeset (t) - assert_arg(1,t,'table') - return setmetatable(tablex.pairmap(set_op,t),Set) -end - - ---- combine two tables, either as union or intersection. Corresponds to --- set operations for sets () but more general. Not particularly --- useful for list-like tables. --- @param t1 a table --- @param t2 a table --- @param dup true for a union, false for an intersection. --- @usage merge({alice=23,fred=34},{bob=25,fred=34}) is {fred=34} --- @usage merge({alice=23,fred=34},{bob=25,fred=34},true) is {bob=25,fred=34,alice=23} --- @see tablex.index_map -function tablex.merge (t1,t2,dup) - assert_arg(1,t1,'table') - assert_arg(2,t2,'table') - local res = {} - for k,v in pairs(t1) do - if dup or t2[k] then res[k] = v end - end - for k,v in pairs(t2) do - if dup or t1[k] then res[k] = v end - end - return setmeta(res,t1,Map) -end - ---- a new table which is the difference of two tables. --- With sets (where the values are all true) this is set difference and --- symmetric difference depending on the third parameter. --- @param s1 a map-like table or set --- @param s2 a map-like table or set --- @param symm symmetric difference (default false) --- @return a map-like table or set -function tablex.difference (s1,s2,symm) - assert_arg(1,s1,'table') - assert_arg(2,s2,'table') - local res = {} - for k,v in pairs(s1) do - if not s2[k] then res[k] = v end - end - if symm then - for k,v in pairs(s2) do - if not s1[k] then res[k] = v end - end - end - return setmeta(res,s1,Map) -end - ---- A table where the key/values are the values and value counts of the table. --- @param t a list-like table --- @param cmp a function that defines equality (otherwise uses ==) --- @return a map-like table --- @see seq.count_map -function tablex.count_map (t,cmp) - assert_arg(1,t,'table') - local res,mask = {},{} - cmp = function_arg(2,cmp) - local n = #t - for i,v in ipairs(t) do - if not mask[v] then - mask[v] = true - -- check this value against all other values - res[v] = 1 -- there's at least one instance - for j = i+1,n do - local w = t[j] - if cmp and cmp(v,w) or v == w then - res[v] = res[v] + 1 - mask[w] = true - end - end - end - end - return setmetatable(res,Map) -end - ---- filter a table's values using a predicate function --- @param t a list-like table --- @param pred a boolean function --- @param arg optional argument to be passed as second argument of the predicate -function tablex.filter (t,pred,arg) - assert_arg(1,t,'table') - pred = function_arg(2,pred) - local res = {} - for k,v in ipairs(t) do - if pred(v,arg) then append(res,v) end - end - return setmeta(res,t,List) -end - ---- return a table where each element is a table of the ith values of an arbitrary --- number of tables. It is equivalent to a matrix transpose. --- @usage zip({10,20,30},{100,200,300}) is {{10,100},{20,200},{30,300}} -function tablex.zip(...) - return tablex.mapn(function(...) return {...} end,...) -end - -local _copy -function _copy (dest,src,idest,isrc,nsrc,clean_tail) - idest = idest or 1 - isrc = isrc or 1 - local iend - if not nsrc then - nsrc = #src - iend = #src - else - iend = isrc + min(nsrc-1,#src-isrc) - end - if dest == src then -- special case - if idest > isrc and iend >= idest then -- overlapping ranges - src = tablex.sub(src,isrc,nsrc) - isrc = 1; iend = #src - end - end - for i = isrc,iend do - dest[idest] = src[i] - idest = idest + 1 - end - if clean_tail then - tablex.clear(dest,idest) - end - return dest -end - ---- copy an array into another one, resizing the destination if necessary.
    --- @param dest a list-like table --- @param src a list-like table --- @param idest where to start copying values from source (default 1) --- @param isrc where to start copying values into destination (default 1) --- @param nsrc number of elements to copy from source (default source size) -function tablex.icopy (dest,src,idest,isrc,nsrc) - assert_arg(1,dest,'table') - assert_arg(2,src,'table') - return _copy(dest,src,idest,isrc,nsrc,true) -end - ---- copy an array into another one.
    --- @param dest a list-like table --- @param src a list-like table --- @param idest where to start copying values from source (default 1) --- @param isrc where to start copying values into destination (default 1) --- @param nsrc number of elements to copy from source (default source size) -function tablex.move (dest,src,idest,isrc,nsrc) - assert_arg(1,dest,'table') - assert_arg(2,src,'table') - return _copy(dest,src,idest,isrc,nsrc,false) -end - -function tablex._normalize_slice(self,first,last) - local sz = #self - if not first then first=1 end - if first<0 then first=sz+first+1 end - -- make the range _inclusive_! - if not last then last=sz end - if last < 0 then last=sz+1+last end - return first,last -end - ---- Extract a range from a table, like 'string.sub'. --- If first or last are negative then they are relative to the end of the list --- eg. sub(t,-2) gives last 2 entries in a list, and --- sub(t,-4,-2) gives from -4th to -2nd --- @param t a list-like table --- @param first An index --- @param last An index --- @return a new List -function tablex.sub(t,first,last) - assert_arg(1,t,'table') - first,last = tablex._normalize_slice(t,first,last) - local res={} - for i=first,last do append(res,t[i]) end - return setmeta(res,t,List) -end - ---- set an array range to a value. If it's a function we use the result --- of applying it to the indices. --- @param t a list-like table --- @param val a value --- @param i1 start range (default 1) --- @param i2 end range (default table size) -function tablex.set (t,val,i1,i2) - i1,i2 = i1 or 1,i2 or #t - if utils.is_callable(val) then - for i = i1,i2 do - t[i] = val(i) - end - else - for i = i1,i2 do - t[i] = val - end - end -end - ---- create a new array of specified size with initial value. --- @param n size --- @param val initial value (can be nil, but don't expect # to work!) --- @return the table -function tablex.new (n,val) - local res = {} - tablex.set(res,val,1,n) - return res -end - ---- clear out the contents of a table. --- @param t a table --- @param istart optional start position -function tablex.clear(t,istart) - istart = istart or 1 - for i = istart,#t do remove(t) end -end - ---- insert values into a table.
    --- insertvalues(t, [pos,] values)
    --- similar to table.insert but inserts values from given table "values", --- not the object itself, into table "t" at position "pos". -function tablex.insertvalues(t, ...) - local pos, values - if select('#', ...) == 1 then - pos,values = #t+1, ... - else - pos,values = ... - end - if #values > 0 then - for i=#t,pos,-1 do - t[i+#values] = t[i] - end - local offset = 1 - pos - for i=pos,pos+#values-1 do - t[i] = values[i + offset] - end - end - return t -end - ---- remove a range of values from a table. --- @param t a list-like table --- @param i1 start index --- @param i2 end index --- @return the table -function tablex.removevalues (t,i1,i2) - i1,i2 = tablex._normalize_slice(t,i1,i2) - for i = i1,i2 do - remove(t,i1) - end - return t -end - -local _find -_find = function (t,value,tables) - for k,v in pairs(t) do - if v == value then return k end - end - for k,v in pairs(t) do - if not tables[v] and type(v) == 'table' then - tables[v] = true - local res = _find(v,value,tables) - if res then - res = tostring(res) - if type(k) ~= 'string' then - return '['..k..']'..res - else - return k..'.'..res - end - end - end - end -end - ---- find a value in a table by recursive search. --- @param t the table --- @param value the value --- @param exclude any tables to avoid searching --- @usage search(_G,math.sin,{package.path}) == 'math.sin' --- @return a fieldspec, e.g. 'a.b' or 'math.sin' -function tablex.search (t,value,exclude) - assert_arg(1,t,'table') - local tables = {[t]=true} - if exclude then - for _,v in pairs(exclude) do tables[v] = true end - end - return _find(t,value,tables) -end - -return tablex diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/template.lua b/Utils/luarocks/systree/share/lua/5.1/pl/template.lua deleted file mode 100644 index dbff1f2fc..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/template.lua +++ /dev/null @@ -1,99 +0,0 @@ ---- A template preprocessor. --- Originally by Ricki Lake ---

    There are two rules:

      ---
    • lines starting with # are Lua
    • ---
    • otherwise, `$(expr)` is the result of evaluating `expr`
    • ---
    ---
    --- #  for i = 1,3 do
    ---    $(i) Hello, Word!
    --- #  end
    --- 
    --- Other escape characters can be used, when the defaults conflict --- with the output language. ---
    --- > for _,n in pairs{'one','two','three'} do
    ---  static int l_${n} (luaState *state);
    --- > end
    --- 
    --- See the Guide. --- @class module --- @name pl.template - ---[[ - module('pl.template') -]] - -local utils = require 'pl.utils' -local append,format = table.insert,string.format - -local function parseHashLines(chunk,brackets,esc) - local exec_pat = "()$(%b"..brackets..")()" - - local function parseDollarParen(pieces, chunk, s, e) - local s = 1 - for term, executed, e in chunk:gmatch (exec_pat) do - executed = '('..executed:sub(2,-2)..')' - append(pieces, - format("%q..(%s or '')..",chunk:sub(s, term - 1), executed)) - s = e - end - append(pieces, format("%q", chunk:sub(s))) - end - - local esc_pat = esc.."+([^\n]*\n?)" - local esc_pat1, esc_pat2 = "^"..esc_pat, "\n"..esc_pat - local pieces, s = {"return function(_put) ", n = 1}, 1 - while true do - local ss, e, lua = chunk:find (esc_pat1, s) - if not e then - ss, e, lua = chunk:find(esc_pat2, s) - append(pieces, "_put(") - parseDollarParen(pieces, chunk:sub(s, ss)) - append(pieces, ")") - if not e then break end - end - append(pieces, lua) - s = e + 1 - end - append(pieces, " end") - return table.concat(pieces) -end - -local template = {} - ---- expand the template using the specified environment. --- @param str the template string --- @param env the environment (by default empty).
    --- There are three special fields in the environment table
      ---
    • _parent continue looking up in this table
    • ---
    • _brackets; default is '()', can be any suitable bracket pair
    • ---
    • _escape; default is '#'
    • ---
    -function template.substitute(str,env) - env = env or {} - if rawget(env,"_parent") then - setmetatable(env,{__index = env._parent}) - end - local brackets = rawget(env,"_brackets") or '()' - local escape = rawget(env,"_escape") or '#' - local code = parseHashLines(str,brackets,escape) - local fn,err = utils.load(code,'TMP','t',env) - if not fn then return nil,err end - fn = fn() - local out = {} - local res,err = xpcall(function() fn(function(s) - out[#out+1] = s - end) end,debug.traceback) - if not res then - if env._debug then print(code) end - return nil,err - end - return table.concat(out) -end - -return template - - - - diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/test.lua b/Utils/luarocks/systree/share/lua/5.1/pl/test.lua deleted file mode 100644 index 162337968..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/test.lua +++ /dev/null @@ -1,116 +0,0 @@ ---- Useful test utilities. --- @module pl.test - -local tablex = require 'pl.tablex' -local utils = require 'pl.utils' -local pretty = require 'pl.pretty' -local path = require 'pl.path' -local print,type = print,type -local clock = os.clock -local debug = require 'debug' -local io,debug = io,debug - -local function dump(x) - if type(x) == 'table' and not (getmetatable(x) and getmetatable(x).__tostring) then - return pretty.write(x,' ',true) - else - return tostring(x) - end -end - -local test = {} - -local function complain (x,y,msg) - local i = debug.getinfo(3) - local err = io.stderr - err:write(path.basename(i.short_src)..':'..i.currentline..': assertion failed\n') - err:write("got:\t",dump(x),'\n') - err:write("needed:\t",dump(y),'\n') - utils.quit(1,msg or "these values were not equal") -end - ---- like assert, except takes two arguments that must be equal and can be tables. --- If they are plain tables, it will use tablex.deepcompare. --- @param x any value --- @param y a value equal to x --- @param eps an optional tolerance for numerical comparisons -function test.asserteq (x,y,eps) - local res = x == y - if not res then - res = tablex.deepcompare(x,y,true,eps) - end - if not res then - complain(x,y) - end -end - ---- assert that the first string matches the second. --- @param s1 a string --- @param s2 a string -function test.assertmatch (s1,s2) - if not s1:match(s2) then - complain (s1,s2,"these strings did not match") - end -end - -function test.assertraise(fn,e) - local ok, err = pcall(unpack(fn)) - if not err or err:match(e)==nil then - complain (err,e,"these errors did not match") - end -end - ---- a version of asserteq that takes two pairs of values. --- x1==y1 and x2==y2 must be true. Useful for functions that naturally --- return two values. --- @param x1 any value --- @param x2 any value --- @param y1 any value --- @param y2 any value -function test.asserteq2 (x1,x2,y1,y2) - if x1 ~= y1 then complain(x1,y1) end - if x2 ~= y2 then complain(x2,y2) end -end - --- tuple type -- - -local tuple_mt = {} - -function tuple_mt.__tostring(self) - local ts = {} - for i=1, self.n do - local s = self[i] - ts[i] = type(s) == 'string' and string.format('%q', s) or tostring(s) - end - return 'tuple(' .. table.concat(ts, ', ') .. ')' -end - -function tuple_mt.__eq(a, b) - if a.n ~= b.n then return false end - for i=1, a.n do - if a[i] ~= b[i] then return false end - end - return true -end - ---- encode an arbitrary argument list as a tuple. --- This can be used to compare to other argument lists, which is --- very useful for testing functions which return a number of values. --- @usage asserteq(tuple( ('ab'):find 'a'), tuple(1,1)) -function test.tuple(...) - return setmetatable({n=select('#', ...), ...}, tuple_mt) -end - ---- Time a function. Call the function a given number of times, and report the number of seconds taken, --- together with a message. Any extra arguments will be passed to the function. --- @param msg a descriptive message --- @param n number of times to call the function --- @param fun the function --- @param ... optional arguments to fun -function test.timer(msg,n,fun,...) - local start = clock() - for i = 1,n do fun(...) end - utils.printf("%s: took %7.2f sec\n",msg,clock()-start) -end - -return test diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/text.lua b/Utils/luarocks/systree/share/lua/5.1/pl/text.lua deleted file mode 100644 index 4c09c7003..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/text.lua +++ /dev/null @@ -1,241 +0,0 @@ ---- Text processing utilities.

    --- This provides a Template class (modeled after the same from the Python --- libraries, see string.Template). It also provides similar functions to those --- found in the textwrap module. --- See the Guide. ---

    --- Calling text.format_operator() overloads the % operator for strings to give Python/Ruby style formated output. --- This is extended to also do template-like substitution for map-like data. ---

    --- > require 'pl.text'.format_operator()
    --- > = '%s = %5.3f' % {'PI',math.pi}
    --- PI = 3.142
    --- > = '$name = $value' % {name='dog',value='Pluto'}
    --- dog = Pluto
    --- 
    --- @class module --- @name pl.text - -local gsub = string.gsub -local concat,append = table.concat,table.insert -local utils = require 'pl.utils' -local bind1,usplit,assert_arg,is_callable = utils.bind1,utils.split,utils.assert_arg,utils.is_callable - -local function lstrip(str) return (str:gsub('^%s+','')) end -local function strip(str) return (lstrip(str):gsub('%s+$','')) end -local function make_list(l) return setmetatable(l,utils.stdmt.List) end -local function split(s,delim) return make_list(usplit(s,delim)) end - -local function imap(f,t,...) - local res = {} - for i = 1,#t do res[i] = f(t[i],...) end - return res -end - ---[[ -module ('pl.text',utils._module) -]] - -local text = {} - -local function _indent (s,sp) - local sl = split(s,'\n') - return concat(imap(bind1('..',sp),sl),'\n')..'\n' -end - ---- indent a multiline string. --- @param s the string --- @param n the size of the indent --- @param ch the character to use when indenting (default ' ') --- @return indented string -function text.indent (s,n,ch) - assert_arg(1,s,'string') - assert_arg(2,s,'number') - return _indent(s,string.rep(ch or ' ',n)) -end - ---- dedent a multiline string by removing any initial indent. --- useful when working with [[..]] strings. --- @param s the string --- @return a string with initial indent zero. -function text.dedent (s) - assert_arg(1,s,'string') - local sl = split(s,'\n') - local i1,i2 = sl[1]:find('^%s*') - sl = imap(string.sub,sl,i2+1) - return concat(sl,'\n')..'\n' -end - ---- format a paragraph into lines so that they fit into a line width. --- It will not break long words, so lines can be over the length --- to that extent. --- @param s the string --- @param width the margin width, default 70 --- @return a list of lines -function text.wrap (s,width) - assert_arg(1,s,'string') - width = width or 70 - s = s:gsub('\n',' ') - local i,nxt = 1 - local lines,line = {} - while i < #s do - nxt = i+width - if s:find("[%w']",nxt) then -- inside a word - nxt = s:find('%W',nxt+1) -- so find word boundary - end - line = s:sub(i,nxt) - i = i + #line - append(lines,strip(line)) - end - return make_list(lines) -end - ---- format a paragraph so that it fits into a line width. --- @param s the string --- @param width the margin width, default 70 --- @return a string --- @see wrap -function text.fill (s,width) - return concat(text.wrap(s,width),'\n') .. '\n' -end - -local Template = {} -text.Template = Template -Template.__index = Template -setmetatable(Template, { - __call = function(obj,tmpl) - return Template.new(tmpl) - end}) - -function Template.new(tmpl) - assert_arg(1,tmpl,'string') - local res = {} - res.tmpl = tmpl - setmetatable(res,Template) - return res -end - -local function _substitute(s,tbl,safe) - local subst - if is_callable(tbl) then - subst = tbl - else - function subst(f) - local s = tbl[f] - if not s then - if safe then - return f - else - error("not present in table "..f) - end - else - return s - end - end - end - local res = gsub(s,'%${([%w_]+)}',subst) - return (gsub(res,'%$([%w_]+)',subst)) -end - ---- substitute values into a template, throwing an error. --- This will throw an error if no name is found. --- @param tbl a table of name-value pairs. -function Template:substitute(tbl) - assert_arg(1,tbl,'table') - return _substitute(self.tmpl,tbl,false) -end - ---- substitute values into a template. --- This version just passes unknown names through. --- @param tbl a table of name-value pairs. -function Template:safe_substitute(tbl) - assert_arg(1,tbl,'table') - return _substitute(self.tmpl,tbl,true) -end - ---- substitute values into a template, preserving indentation.
    --- If the value is a multiline string _or_ a template, it will insert --- the lines at the correct indentation.
    --- Furthermore, if a template, then that template will be subsituted --- using the same table. --- @param tbl a table of name-value pairs. -function Template:indent_substitute(tbl) - assert_arg(1,tbl,'table') - if not self.strings then - self.strings = split(self.tmpl,'\n') - end - -- the idea is to substitute line by line, grabbing any spaces as - -- well as the $var. If the value to be substituted contains newlines, - -- then we split that into lines and adjust the indent before inserting. - local function subst(line) - return line:gsub('(%s*)%$([%w_]+)',function(sp,f) - local subtmpl - local s = tbl[f] - if not s then error("not present in table "..f) end - if getmetatable(s) == Template then - subtmpl = s - s = s.tmpl - else - s = tostring(s) - end - if s:find '\n' then - s = _indent(s,sp) - end - if subtmpl then return _substitute(s,tbl) - else return s - end - end) - end - local lines = imap(subst,self.strings) - return concat(lines,'\n')..'\n' -end - -------- Python-style formatting operator ------ --- (see the lua-users wiki) -- - -function text.format_operator() - - local format = string.format - - -- a more forgiving version of string.format, which applies - -- tostring() to any value with a %s format. - local function formatx (fmt,...) - local args = {...} - local i = 1 - for p in fmt:gmatch('%%.') do - if p == '%s' and type(args[i]) ~= 'string' then - args[i] = tostring(args[i]) - end - i = i + 1 - end - return format(fmt,unpack(args)) - end - - local function basic_subst(s,t) - return (s:gsub('%$([%w_]+)',t)) - end - - -- Note this goes further than the original, and will allow these cases: - -- 1. a single value - -- 2. a list of values - -- 3. a map of var=value pairs - -- 4. a function, as in gsub - -- For the second two cases, it uses $-variable substituion. - getmetatable("").__mod = function(a, b) - if b == nil then - return a - elseif type(b) == "table" and getmetatable(b) == nil then - if #b == 0 then -- assume a map-like table - return _substitute(a,b,true) - else - return formatx(a,unpack(b)) - end - elseif type(b) == 'function' then - return basic_subst(a,b) - else - return formatx(a,b) - end - end -end - -return text diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/utils.lua b/Utils/luarocks/systree/share/lua/5.1/pl/utils.lua deleted file mode 100644 index af1553b2f..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/utils.lua +++ /dev/null @@ -1,529 +0,0 @@ ---- Generally useful routines. --- See the Guide. --- @class module --- @name pl.utils -local format,gsub,byte = string.format,string.gsub,string.byte -local clock = os.clock -local stdout = io.stdout -local append = table.insert - -local collisions = {} - -local utils = {} - -utils._VERSION = "0.9.4" - -utils.dir_separator = _G.package.config:sub(1,1) - ---- end this program gracefully. --- @param code The exit code or a message to be printed --- @param ... extra arguments for message's format' --- @see utils.fprintf -function utils.quit(code,...) - if type(code) == 'string' then - utils.fprintf(io.stderr,code,...) - code = -1 - else - utils.fprintf(io.stderr,...) - end - io.stderr:write('\n') - os.exit(code) -end - ---- print an arbitrary number of arguments using a format. --- @param fmt The format (see string.format) --- @param ... Extra arguments for format -function utils.printf(fmt,...) - utils.fprintf(stdout,fmt,...) -end - ---- write an arbitrary number of arguments to a file using a format. --- @param f File handle to write to. --- @param fmt The format (see string.format). --- @param ... Extra arguments for format -function utils.fprintf(f,fmt,...) - utils.assert_string(2,fmt) - f:write(format(fmt,...)) -end - -local function import_symbol(T,k,v,libname) - local key = rawget(T,k) - -- warn about collisions! - if key and k ~= '_M' and k ~= '_NAME' and k ~= '_PACKAGE' and k ~= '_VERSION' then - utils.printf("warning: '%s.%s' overrides existing symbol\n",libname,k) - end - rawset(T,k,v) -end - -local function lookup_lib(T,t) - for k,v in pairs(T) do - if v == t then return k end - end - return '?' -end - -local already_imported = {} - ---- take a table and 'inject' it into the local namespace. --- @param t The Table --- @param T An optional destination table (defaults to callers environment) -function utils.import(t,T) - T = T or _G - t = t or utils - if type(t) == 'string' then - t = require (t) - end - local libname = lookup_lib(T,t) - if already_imported[t] then return end - already_imported[t] = libname - for k,v in pairs(t) do - import_symbol(T,k,v,libname) - end -end - -utils.patterns = { - FLOAT = '[%+%-%d]%d*%.?%d*[eE]?[%+%-]?%d*', - INTEGER = '[+%-%d]%d*', - IDEN = '[%a_][%w_]*', - FILE = '[%a%.\\][:%][%w%._%-\\]*' -} - ---- escape any 'magic' characters in a string --- @param s The input string -function utils.escape(s) - utils.assert_string(1,s) - return (s:gsub('[%-%.%+%[%]%(%)%$%^%%%?%*]','%%%1')) -end - ---- return either of two values, depending on a condition. --- @param cond A condition --- @param value1 Value returned if cond is true --- @param value2 Value returned if cond is false (can be optional) -function utils.choose(cond,value1,value2) - if cond then return value1 - else return value2 - end -end - -local raise - ---- return the contents of a file as a string --- @param filename The file path --- @param is_bin open in binary mode --- @return file contents -function utils.readfile(filename,is_bin) - local mode = is_bin and 'b' or '' - utils.assert_string(1,filename) - local f,err = io.open(filename,'r'..mode) - if not f then return utils.raise (err) end - local res,err = f:read('*a') - f:close() - if not res then return raise (err) end - return res -end - ---- write a string to a file --- @param filename The file path --- @param str The string --- @return true or nil --- @return error message --- @raise error if filename or str aren't strings -function utils.writefile(filename,str) - utils.assert_string(1,filename) - utils.assert_string(2,str) - local f,err = io.open(filename,'w') - if not f then return raise(err) end - f:write(str) - f:close() - return true -end - ---- return the contents of a file as a list of lines --- @param filename The file path --- @return file contents as a table --- @raise errror if filename is not a string -function utils.readlines(filename) - utils.assert_string(1,filename) - local f,err = io.open(filename,'r') - if not f then return raise(err) end - local res = {} - for line in f:lines() do - append(res,line) - end - f:close() - return res -end - ---- split a string into a list of strings separated by a delimiter. --- @param s The input string --- @param re A Lua string pattern; defaults to '%s+' --- @param plain don't use Lua patterns --- @param n optional maximum number of splits --- @return a list-like table --- @raise error if s is not a string -function utils.split(s,re,plain,n) - utils.assert_string(1,s) - local find,sub,append = string.find, string.sub, table.insert - local i1,ls = 1,{} - if not re then re = '%s+' end - if re == '' then return {s} end - while true do - local i2,i3 = find(s,re,i1,plain) - if not i2 then - local last = sub(s,i1) - if last ~= '' then append(ls,last) end - if #ls == 1 and ls[1] == '' then - return {} - else - return ls - end - end - append(ls,sub(s,i1,i2-1)) - if n and #ls == n then - ls[#ls] = sub(s,i1) - return ls - end - i1 = i3+1 - end -end - ---- split a string into a number of values. --- @param s the string --- @param re the delimiter, default space --- @return n values --- @usage first,next = splitv('jane:doe',':') --- @see split -function utils.splitv (s,re) - return unpack(utils.split(s,re)) -end - -local lua52 = table.pack ~= nil -local lua51_load = load - -if not lua52 then -- define Lua 5.2 style load() - function utils.load(str,src,mode,env) - local chunk,err - if type(str) == 'string' then - chunk,err = loadstring(str,src) - else - chunk,err = lua51_load(str,src) - end - if chunk and env then setfenv(chunk,env) end - return chunk,err - end -else - utils.load = load - -- setfenv/getfenv replacements for Lua 5.2 - -- by Sergey Rozhenko - -- http://lua-users.org/lists/lua-l/2010-06/msg00313.html - -- Roberto Ierusalimschy notes that it is possible for getfenv to return nil - -- in the case of a function with no globals: - -- http://lua-users.org/lists/lua-l/2010-06/msg00315.html - function setfenv(f, t) - f = (type(f) == 'function' and f or debug.getinfo(f + 1, 'f').func) - local name - local up = 0 - repeat - up = up + 1 - name = debug.getupvalue(f, up) - until name == '_ENV' or name == nil - if name then - debug.upvaluejoin(f, up, function() return name end, 1) -- use unique upvalue - debug.setupvalue(f, up, t) - end - end - - function getfenv(f) - f = (type(f) == 'function' and f or debug.getinfo(f + 1, 'f').func) - local name, val - local up = 0 - repeat - up = up + 1 - name, val = debug.getupvalue(f, up) - until name == '_ENV' or name == nil - return val - end -end - - ---- execute a shell command. --- This is a compatibility function that returns the same for Lua 5.1 and Lua 5.2 --- @param cmd a shell command --- @return true if successful --- @return actual return code -function utils.execute (cmd) - local res1,res2,res2 = os.execute(cmd) - if not lua52 then - return res1==0,res1 - else - return res1,res2 - end -end - -if not lua52 then - function table.pack (...) - local n = select('#',...) - return {n=n; ...},n - end - local sep = package.config:sub(1,1) - function package.searchpath (mod,path) - mod = mod:gsub('%.',sep) - for m in path:gmatch('[^;]+') do - local nm = m:gsub('?',mod) - local f = io.open(nm,'r') - if f then f:close(); return nm end - end - end -end - -if not table.pack then table.pack = _G.pack end -if not rawget(_G,"pack") then _G.pack = table.pack end - ---- take an arbitrary set of arguments and make into a table. --- This returns the table and the size; works fine for nil arguments --- @param ... arguments --- @return table --- @return table size --- @usage local t,n = utils.args(...) - ---- 'memoize' a function (cache returned value for next call). --- This is useful if you have a function which is relatively expensive, --- but you don't know in advance what values will be required, so --- building a table upfront is wasteful/impossible. --- @param func a function of at least one argument --- @return a function with at least one argument, which is used as the key. -function utils.memoize(func) - return setmetatable({}, { - __index = function(self, k, ...) - local v = func(k,...) - self[k] = v - return v - end, - __call = function(self, k) return self[k] end - }) -end - ---- is the object either a function or a callable object?. --- @param obj Object to check. -function utils.is_callable (obj) - return type(obj) == 'function' or getmetatable(obj) and getmetatable(obj).__call -end - ---- is the object of the specified type?. --- If the type is a string, then use type, otherwise compare with metatable --- @param obj An object to check --- @param tp String of what type it should be -function utils.is_type (obj,tp) - if type(tp) == 'string' then return type(obj) == tp end - local mt = getmetatable(obj) - return tp == mt -end - -local fileMT = getmetatable(io.stdout) - ---- a string representation of a type. --- For tables with metatables, we assume that the metatable has a `_name` --- field. Knows about Lua file objects. --- @param obj an object --- @return a string like 'number', 'table' or 'List' -function utils.type (obj) - local t = type(obj) - if t == 'table' or t == 'userdata' then - local mt = getmetatable(obj) - if mt == fileMT then - return 'file' - else - return mt._name or "unknown "..t - end - else - return t - end -end - ---- is this number an integer? --- @param x a number --- @raise error if x is not a number -function utils.is_integer (x) - return math.ceil(x)==x -end - -utils.stdmt = { - List = {_name='List'}, Map = {_name='Map'}, - Set = {_name='Set'}, MultiMap = {_name='MultiMap'} -} - -local _function_factories = {} - ---- associate a function factory with a type. --- A function factory takes an object of the given type and --- returns a function for evaluating it --- @param mt metatable --- @param fun a callable that returns a function -function utils.add_function_factory (mt,fun) - _function_factories[mt] = fun -end - -local function _string_lambda(f) - local raise = utils.raise - if f:find '^|' or f:find '_' then - local args,body = f:match '|([^|]*)|(.+)' - if f:find '_' then - args = '_' - body = f - else - if not args then return raise 'bad string lambda' end - end - local fstr = 'return function('..args..') return '..body..' end' - local fn,err = loadstring(fstr) - if not fn then return raise(err) end - fn = fn() - return fn - else return raise 'not a string lambda' - end -end - ---- an anonymous function as a string. This string is either of the form --- '|args| expression' or is a function of one argument, '_' --- @param lf function as a string --- @return a function --- @usage string_lambda '|x|x+1' (2) == 3 --- @usage string_lambda '_+1 (2) == 3 -utils.string_lambda = utils.memoize(_string_lambda) - -local ops - ---- process a function argument. --- This is used throughout Penlight and defines what is meant by a function: --- Something that is callable, or an operator string as defined by pl.operator, --- such as '>' or '#'. If a function factory has been registered for the type, it will --- be called to get the function. --- @param idx argument index --- @param f a function, operator string, or callable object --- @param msg optional error message --- @return a callable --- @raise if idx is not a number or if f is not callable --- @see utils.is_callable -function utils.function_arg (idx,f,msg) - utils.assert_arg(1,idx,'number') - local tp = type(f) - if tp == 'function' then return f end -- no worries! - -- ok, a string can correspond to an operator (like '==') - if tp == 'string' then - if not ops then ops = require 'pl.operator'.optable end - local fn = ops[f] - if fn then return fn end - local fn, err = utils.string_lambda(f) - if not fn then error(err..': '..f) end - return fn - elseif tp == 'table' or tp == 'userdata' then - local mt = getmetatable(f) - if not mt then error('not a callable object',2) end - local ff = _function_factories[mt] - if not ff then - if not mt.__call then error('not a callable object',2) end - return f - else - return ff(f) -- we have a function factory for this type! - end - end - if not msg then msg = " must be callable" end - if idx > 0 then - error("argument "..idx..": "..msg,2) - else - error(msg,2) - end -end - ---- bind the first argument of the function to a value. --- @param fn a function of at least two values (may be an operator string) --- @param p a value --- @return a function such that f(x) is fn(p,x) --- @raise same as @{function_arg} --- @see pl.func.curry -function utils.bind1 (fn,p) - fn = utils.function_arg(1,fn) - return function(...) return fn(p,...) end -end - ---- assert that the given argument is in fact of the correct type. --- @param n argument index --- @param val the value --- @param tp the type --- @param verify an optional verfication function --- @param msg an optional custom message --- @param lev optional stack position for trace, default 2 --- @raise if the argument n is not the correct type --- @usage assert_arg(1,t,'table') --- @usage assert_arg(n,val,'string',path.isdir,'not a directory') -function utils.assert_arg (n,val,tp,verify,msg,lev) - if type(val) ~= tp then - error(("argument %d expected a '%s', got a '%s'"):format(n,tp,type(val)),2) - end - if verify and not verify(val) then - error(("argument %d: '%s' %s"):format(n,val,msg),lev or 2) - end -end - ---- assert the common case that the argument is a string. --- @param n argument index --- @param val a value that must be a string --- @raise val must be a string -function utils.assert_string (n,val) - utils.assert_arg(n,val,'string',nil,nil,nil,3) -end - -local err_mode = 'default' - ---- control the error strategy used by Penlight. --- Controls how utils.raise works; the default is for it --- to return nil and the error string, but if the mode is 'error' then --- it will throw an error. If mode is 'quit' it will immediately terminate --- the program. --- @param mode - either 'default', 'quit' or 'error' --- @see utils.raise -function utils.on_error (mode) - err_mode = mode -end - ---- used by Penlight functions to return errors. Its global behaviour is controlled --- by utils.on_error --- @param err the error string. --- @see utils.on_error -function utils.raise (err) - if err_mode == 'default' then return nil,err - elseif err_mode == 'quit' then utils.quit(err) - else error(err,2) - end -end - -raise = utils.raise - ---- load a code string or bytecode chunk. --- @param code Lua code as a string or bytecode --- @param name for source errors --- @param mode kind of chunk, 't' for text, 'b' for bytecode, 'bt' for all (default) --- @param env the environment for the new chunk (default nil) --- @return compiled chunk --- @return error message (chunk is nil) --- @function utils.load - - ---- Lua 5.2 Compatible Functions --- @section lua52 - ---- pack an argument list into a table. --- @param ... any arguments --- @return a table with field n set to the length --- @return the length --- @function table.pack - ------- --- return the full path where a Lua module name would be matched. --- @param mod module name, possibly dotted --- @param path a path in the same form as package.path or package.cpath --- @see path.package_path --- @function package.searchpath - -return utils - - diff --git a/Utils/luarocks/systree/share/lua/5.1/pl/xml.lua b/Utils/luarocks/systree/share/lua/5.1/pl/xml.lua deleted file mode 100644 index a452b26a0..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/pl/xml.lua +++ /dev/null @@ -1,676 +0,0 @@ ---- XML LOM Utilities. --- This implements some useful things on LOM documents, such as returned by lxp.lom.parse. --- In particular, it can convert LOM back into XML text, with optional pretty-printing control. --- It's based on stanza.lua from Prosody http://hg.prosody.im/trunk/file/4621c92d2368/util/stanza.lua) --- --- Can be used as a lightweight one-stop-shop for simple XML processing; a simple XML parser is included --- but the default is to use lxp.lom if it can be found. ---
    --- Prosody IM
    --- Copyright (C) 2008-2010 Matthew Wild
    --- Copyright (C) 2008-2010 Waqas Hussain
    ---
    --- classic Lua XML parser by Roberto Ierusalimschy.
    --- modified to output LOM format.
    --- http://lua-users.org/wiki/LuaXml
    --- 
    --- @module pl.xml - -local t_insert = table.insert; -local t_concat = table.concat; -local t_remove = table.remove; -local s_format = string.format; -local s_match = string.match; -local tostring = tostring; -local setmetatable = setmetatable; -local getmetatable = getmetatable; -local pairs = pairs; -local ipairs = ipairs; -local type = type; -local next = next; -local print = print; -local unpack = unpack or table.unpack; -local s_gsub = string.gsub; -local s_char = string.char; -local s_find = string.find; -local os = os; -local pcall,require,io = pcall,require,io -local split = require 'pl.utils'.split - -local _M = {} -local Doc = { __type = "doc" }; -Doc.__index = Doc; - ---- create a new document node. --- @param tag the tag name --- @param attr optional attributes (table of name-value pairs) -function _M.new(tag, attr) - local doc = { tag = tag, attr = attr or {}, last_add = {}}; - return setmetatable(doc, Doc); -end - ---- parse an XML document. By default, this uses lxp.lom.parse, but --- falls back to basic_parse, or if use_basic is true --- @param text_or_file file or string representation --- @param is_file whether text_or_file is a file name or not --- @param use_basic do a basic parse --- @return a parsed LOM document with the document metatatables set --- @return nil, error the error can either be a file error or a parse error -function _M.parse(text_or_file, is_file, use_basic) - local parser,status,lom - if use_basic then parser = _M.basic_parse - else - status,lom = pcall(require,'lxp.lom') - if not status then parser = _M.basic_parse else parser = lom.parse end - end - if is_file then - local f,err = io.open(text_or_file) - if not f then return nil,err end - text_or_file = f:read '*a' - f:close() - end - local doc,err = parser(text_or_file) - if not doc then return nil,err end - if lom then - _M.walk(doc,false,function(_,d) - setmetatable(d,Doc) - end) - end - return doc -end - ----- convenient function to add a document node, This updates the last inserted position. --- @param tag a tag name --- @param attrs optional set of attributes (name-string pairs) -function Doc:addtag(tag, attrs) - local s = _M.new(tag, attrs); - (self.last_add[#self.last_add] or self):add_direct_child(s); - t_insert(self.last_add, s); - return self; -end - ---- convenient function to add a text node. This updates the last inserted position. --- @param text a string -function Doc:text(text) - (self.last_add[#self.last_add] or self):add_direct_child(text); - return self; -end - ----- go up one level in a document -function Doc:up() - t_remove(self.last_add); - return self; -end - -function Doc:reset() - local last_add = self.last_add; - for i = 1,#last_add do - last_add[i] = nil; - end - return self; -end - ---- append a child to a document directly. --- @param child a child node (either text or a document) -function Doc:add_direct_child(child) - t_insert(self, child); -end - ---- append a child to a document at the last element added --- @param child a child node (either text or a document) -function Doc:add_child(child) - (self.last_add[#self.last_add] or self):add_direct_child(child); - return self; -end - ---accessing attributes: useful not to have to expose implementation (attr) ---but also can allow attr to be nil in any future optimizations - ---- set attributes of a document node. --- @param t a table containing attribute/value pairs -function Doc:set_attribs (t) - for k,v in pairs(t) do - self.attr[k] = v - end -end - ---- set a single attribute of a document node. --- @param a attribute --- @param v its value -function Doc:set_attrib(a,v) - self.attr[a] = v -end - ---- access the attributes of a document node. -function Doc:get_attribs() - return self.attr -end - ---- function to create an element with a given tag name and a set of children. --- @param tag a tag name --- @param items either text or a table where the hash part is the attributes and the list part is the children. -function _M.elem(tag,items) - local s = _M.new(tag) - if type(items) == 'string' then items = {items} end - if _M.is_tag(items) then - t_insert(s,items) - elseif type(items) == 'table' then - for k,v in pairs(items) do - if type(k) == 'string' then - s.attr[k] = v - t_insert(s.attr,k) - else - s[k] = v - end - end - end - return s -end - ---- given a list of names, return a number of element constructors. --- @param list a list of names, or a comma-separated string. --- @usage local parent,children = doc.tags 'parent,children'
    --- doc = parent {child 'one', child 'two'} -function _M.tags(list) - local ctors = {} - local elem = _M.elem - if type(list) == 'string' then list = split(list,'%s*,%s*') end - for _,tag in ipairs(list) do - local ctor = function(items) return _M.elem(tag,items) end - t_insert(ctors,ctor) - end - return unpack(ctors) -end - -local templ_cache = {} - -local function is_data(data) - return #data == 0 or type(data[1]) ~= 'table' -end - -local function prepare_data(data) - -- a hack for ensuring that $1 maps to first element of data, etc. - -- Either this or could change the gsub call just below. - for i,v in ipairs(data) do - data[tostring(i)] = v - end -end - ---- create a substituted copy of a document, --- @param templ may be a document or a string representation which will be parsed and cached --- @param data a table of name-value pairs or a list of such tables --- @return an XML document -function Doc.subst(templ, data) - if type(data) ~= 'table' or not next(data) then return nil, "data must be a non-empty table" end - if is_data(data) then - prepare_data(data) - end - if type(templ) == 'string' then - if templ_cache[templ] then - templ = templ_cache[templ] - else - local str,err = templ - templ,err = _M.parse(str) - if not templ then return nil,err end - templ_cache[str] = templ - end - end - local function _subst(item) - return _M.clone(templ,function(s) - return s:gsub('%$(%w+)',item) - end) - end - if is_data(data) then return _subst(data) end - local list = {} - for _,item in ipairs(data) do - prepare_data(item) - t_insert(list,_subst(item)) - end - if data.tag then - list = _M.elem(data.tag,list) - end - return list -end - - ---- get the first child with a given tag name. --- @param tag the tag name -function Doc:child_with_name(tag) - for _, child in ipairs(self) do - if child.tag == tag then return child; end - end -end - -local _children_with_name -function _children_with_name(self,tag,list,recurse) - for _, child in ipairs(self) do if type(child) == 'table' then - if child.tag == tag then t_insert(list,child) end - if recurse then _children_with_name(child,tag,list,recurse) end - end end -end - ---- get all elements in a document that have a given tag. --- @param tag a tag name --- @param dont_recurse optionally only return the immediate children with this tag name --- @return a list of elements -function Doc:get_elements_with_name(tag,dont_recurse) - local res = {} - _children_with_name(self,tag,res,not dont_recurse) - return res -end - --- iterate over all children of a document node, including text nodes. -function Doc:children() - local i = 0; - return function (a) - i = i + 1 - return a[i]; - end, self, i; -end - --- return the first child element of a node, if it exists. -function Doc:first_childtag() - if #self == 0 then return end - for _,t in ipairs(self) do - if type(t) == 'table' then return t end - end -end - -function Doc:matching_tags(tag, xmlns) - xmlns = xmlns or self.attr.xmlns; - local tags = self; - local start_i, max_i = 1, #tags; - return function () - for i=start_i,max_i do - v = tags[i]; - if (not tag or v.tag == tag) - and (not xmlns or xmlns == v.attr.xmlns) then - start_i = i+1; - return v; - end - end - end, tags, i; -end - ---- iterate over all child elements of a document node. -function Doc:childtags() - local i = 0; - return function (a) - local v - repeat - i = i + 1 - v = self[i] - if v and type(v) == 'table' then return v; end - until not v - end, self[1], i; -end - ---- visit child element of a node and call a function, possibility modifying the document. --- @param callback a function passed the node (text or element). If it returns nil, that node will be removed. --- If it returns a value, that will replace the current node. -function Doc:maptags(callback) - local is_tag = _M.is_tag - local i = 1; - while i <= #self do - if is_tag(self[i]) then - local ret = callback(self[i]); - if ret == nil then - t_remove(self, i); - else - self[i] = ret; - i = i + 1; - end - end - end - return self; -end - -local xml_escape -do - local escape_table = { ["'"] = "'", ["\""] = """, ["<"] = "<", [">"] = ">", ["&"] = "&" }; - function xml_escape(str) return (s_gsub(str, "['&<>\"]", escape_table)); end - _M.xml_escape = xml_escape; -end - --- pretty printing --- if indent, then put each new tag on its own line --- if attr_indent, put each new attribute on its own line -local function _dostring(t, buf, self, xml_escape, parentns, idn, indent, attr_indent) - local nsid = 0; - local tag = t.tag - local lf,alf = ""," " - if indent then lf = '\n'..idn end - if attr_indent then alf = '\n'..idn..attr_indent end - t_insert(buf, lf.."<"..tag); - for k, v in pairs(t.attr) do - if type(k) ~= 'number' then -- LOM attr table has list-like part - if s_find(k, "\1", 1, true) then - local ns, attrk = s_match(k, "^([^\1]*)\1?(.*)$"); - nsid = nsid + 1; - t_insert(buf, " xmlns:ns"..nsid.."='"..xml_escape(ns).."' ".."ns"..nsid..":"..attrk.."='"..xml_escape(v).."'"); - elseif not(k == "xmlns" and v == parentns) then - t_insert(buf, alf..k.."='"..xml_escape(v).."'"); - end - end - end - local len,has_children = #t; - if len == 0 then - local out = "/>" - if attr_indent then out = '\n'..idn..out end - t_insert(buf, out); - else - t_insert(buf, ">"); - for n=1,len do - local child = t[n]; - if child.tag then - self(child, buf, self, xml_escape, t.attr.xmlns,idn and idn..indent, indent, attr_indent ); - has_children = true - else -- text element - t_insert(buf, xml_escape(child)); - end - end - t_insert(buf, (has_children and lf or '')..""); - end -end - ----- pretty-print an XML document ---- @param t an XML document ---- @param idn an initial indent (indents are all strings) ---- @param indent an indent for each level ---- @param attr_indent if given, indent each attribute pair and put on a separate line ---- @return a string representation -function _M.tostring(t,idn,indent, attr_indent) - local buf = {}; - _dostring(t, buf, _dostring, xml_escape, nil,idn,indent, attr_indent); - return t_concat(buf); -end - -Doc.__tostring = _M.tostring - ---- get the full text value of an element -function Doc:get_text() - local res = {} - for i,el in ipairs(self) do - if type(el) == 'string' then t_insert(res,el) end - end - return t_concat(res); -end - ---- make a copy of a document --- @param doc the original document --- @param strsubst an optional function for handling string copying which could do substitution, etc. -function _M.clone(doc, strsubst) - local lookup_table = {}; - local function _copy(object) - if type(object) ~= "table" then - if strsubst and type(object) == 'string' then return strsubst(object) - else return object; - end - elseif lookup_table[object] then - return lookup_table[object]; - end - local new_table = {}; - lookup_table[object] = new_table; - for index, value in pairs(object) do - new_table[_copy(index)] = _copy(value); -- is cloning keys much use, hm? - end - return setmetatable(new_table, getmetatable(object)); - end - - return _copy(doc) -end - ---- compare two documents. --- @param t1 any value --- @param t2 any value -function _M.compare(t1,t2) - local ty1 = type(t1) - local ty2 = type(t2) - if ty1 ~= ty2 then return false, 'type mismatch' end - if ty1 == 'string' then - return t1 == t2 and true or 'text '..t1..' ~= text '..t2 - end - if ty1 ~= 'table' or ty2 ~= 'table' then return false, 'not a document' end - if t1.tag ~= t2.tag then return false, 'tag '..t1.tag..' ~= tag '..t2.tag end - if #t1 ~= #t2 then return false, 'size '..#t1..' ~= size '..#t2..' for tag '..t1.tag end - -- compare attributes - for k,v in pairs(t1.attr) do - if t2.attr[k] ~= v then return false, 'mismatch attrib' end - end - for k,v in pairs(t2.attr) do - if t1.attr[k] ~= v then return false, 'mismatch attrib' end - end - -- compare children - for i = 1,#t1 do - local yes,err = _M.compare(t1[i],t2[i]) - if not yes then return err end - end - return true -end - ---- is this value a document element? --- @param d any value -function _M.is_tag(d) - return type(d) == 'table' and type(d.tag) == 'string' -end - ---- call the desired function recursively over the document. --- @param doc the document --- @param depth_first visit child notes first, then the current node --- @param operation a function which will receive the current tag name and current node. -function _M.walk (doc, depth_first, operation) - if not depth_first then operation(doc.tag,doc) end - for _,d in ipairs(doc) do - if _M.is_tag(d) then - _M.walk(d,depth_first,operation) - end - end - if depth_first then operation(doc.tag,doc) end -end - -local escapes = { quot = "\"", apos = "'", lt = "<", gt = ">", amp = "&" } -local function unescape(str) return (str:gsub( "&(%a+);", escapes)); end - -local function parseargs(s) - local arg = {} - s:gsub("([%w:]+)%s*=%s*([\"'])(.-)%2", function (w, _, a) - arg[w] = unescape(a) - end) - return arg -end - ---- Parse a simple XML document using a pure Lua parser based on Robero Ierusalimschy's original version. --- @param s the XML document to be parsed. --- @param all_text if true, preserves all whitespace. Otherwise only text containing non-whitespace is included. -function _M.basic_parse(s,all_text) - local t_insert,t_remove = table.insert,table.remove - local s_find,s_sub = string.find,string.sub - local stack = {} - local top = {} - t_insert(stack, top) - local ni,c,label,xarg, empty - local i, j = 1, 1 - -- we're not interested in - local _,istart = s_find(s,'^%s*<%?[^%?]+%?>%s*') - if istart then i = istart+1 end - while true do - ni,j,c,label,xarg, empty = s_find(s, "<(%/?)([%w:%-_]+)(.-)(%/?)>", i) - if not ni then break end - local text = s_sub(s, i, ni-1) - if all_text or not s_find(text, "^%s*$") then - t_insert(top, unescape(text)) - end - if empty == "/" then -- empty element tag - t_insert(top, setmetatable({tag=label, attr=parseargs(xarg), empty=1},Doc)) - elseif c == "" then -- start tag - top = setmetatable({tag=label, attr=parseargs(xarg)},Doc) - t_insert(stack, top) -- new level - else -- end tag - local toclose = t_remove(stack) -- remove top - top = stack[#stack] - if #stack < 1 then - error("nothing to close with "..label) - end - if toclose.tag ~= label then - error("trying to close "..toclose.tag.." with "..label) - end - t_insert(top, toclose) - end - i = j+1 - end - local text = s_sub(s, i) - if all_text or not s_find(text, "^%s*$") then - t_insert(stack[#stack], unescape(text)) - end - if #stack > 1 then - error("unclosed "..stack[#stack].tag) - end - local res = stack[1] - return type(res[1])=='string' and res[2] or res[1] -end - -local function empty(attr) return not attr or not next(attr) end -local function is_text(s) return type(s) == 'string' end -local function is_element(d) return type(d) == 'table' and d.tag ~= nil end - --- returns the key,value pair from a table if it has exactly one entry -local function has_one_element(t) - local key,value = next(t) - if next(t,key) ~= nil then return false end - return key,value -end - -local function append_capture(res,tbl) - if not empty(tbl) then -- no point in capturing empty tables... - local key - if tbl._ then -- if $_ was set then it is meant as the top-level key for the captured table - key = tbl._ - tbl._ = nil - if empty(tbl) then return end - end - -- a table with only one pair {[0]=value} shall be reduced to that value - local numkey,val = has_one_element(tbl) - if numkey == 0 then tbl = val end - if key then - res[key] = tbl - else -- otherwise, we append the captured table - t_insert(res,tbl) - end - end -end - -local function make_number(pat) - if pat:find '^%d+$' then -- $1 etc means use this as an array location - pat = tonumber(pat) - end - return pat -end - -local function capture_attrib(res,pat,value) - pat = make_number(pat:sub(2)) - res[pat] = value - return true -end - -local match -function match(d,pat,res,keep_going) - local ret = true - if d == nil then return false end - -- attribute string matching is straight equality, except if the pattern is a $ capture, - -- which always succeeds. - if type(d) == 'string' then - if type(pat) ~= 'string' then return false end - if _M.debug then print(d,pat) end - if pat:find '^%$' then - return capture_attrib(res,pat,d) - else - return d == pat - end - else - if _M.debug then print(d.tag,pat.tag) end - -- this is an element node. For a match to succeed, the attributes must - -- match as well. - -- a tagname in the pattern ending with '-' is a wildcard and matches like an attribute - local tagpat = pat.tag:match '^(.-)%-$' - if tagpat then - tagpat = make_number(tagpat) - res[tagpat] = d.tag - end - if d.tag == pat.tag or tagpat then - - if not empty(pat.attr) then - if empty(d.attr) then ret = false - else - for prop,pval in pairs(pat.attr) do - local dval = d.attr[prop] - if not match(dval,pval,res) then ret = false; break end - end - end - end - -- the pattern may have child nodes. We match partially, so that {P1,P2} shall match {X,P1,X,X,P2,..} - if ret and #pat > 0 then - local i,j = 1,1 - local function next_elem() - j = j + 1 -- next child element of data - if is_text(d[j]) then j = j + 1 end - return j <= #d - end - repeat - local p = pat[i] - -- repeated {{<...>}} patterns shall match one or more elements - -- so e.g. {P+} will match {X,X,P,P,X,P,X,X,X} - if is_element(p) and p.repeated then - local found - repeat - local tbl = {} - ret = match(d[j],p,tbl,false) - if ret then - found = false --true - append_capture(res,tbl) - end - until not next_elem() or (found and not ret) - i = i + 1 - else - ret = match(d[j],p,res,false) - if ret then i = i + 1 end - end - until not next_elem() or i > #pat -- run out of elements or patterns to match - -- if every element in our pattern matched ok, then it's been a successful match - if i > #pat then return true end - end - if ret then return true end - else - ret = false - end - -- keep going anyway - look at the children! - if keep_going then - for child in d:childtags() do - ret = match(child,pat,res,keep_going) - if ret then break end - end - end - end - return ret -end - -function Doc:match(pat) - if is_text(pat) then - pat = _M.parse(pat,false,true) - end - _M.walk(pat,false,function(_,d) - if is_text(d[1]) and is_element(d[2]) and is_text(d[3]) and - d[1]:find '%s*{{' and d[3]:find '}}%s*' then - t_remove(d,1) - t_remove(d,2) - d[1].repeated = true - end - end) - - local res = {} - local ret = match(self,pat,res,true) - return res,ret -end - - -return _M - diff --git a/Utils/luarocks/systree/share/lua/5.1/template/file.lua b/Utils/luarocks/systree/share/lua/5.1/template/file.lua deleted file mode 100644 index e562c9d55..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/template/file.lua +++ /dev/null @@ -1,106 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -return[[# -
    -# -- -# -- Module name -# -- -# if _file.name then - Module $(_file.name) -# end -# -- -# -- Descriptions -# -- -# if _file.shortdescription then - $( format(_file.shortdescription) ) -# end -# if _file.description and #_file.description > 0 then - $( format(_file.description) ) -# end -# -- -# -- Handle "@usage" special tag -# -- -#if _file.metadata and _file.metadata.usage then - $( applytemplate(_file.metadata.usage, i+1) ) -#end -# -- -# -- Show quick description of current type -# -- -# -# -- show quick description for globals -# if not isempty(_file.globalvars) then - Global(s) - -# for _, item in sortedpairs(_file.globalvars) do - - - - -# end -
    $( fulllinkto(item) )$( format(item.shortdescription) )
    -# end -# -# -- get type corresponding to this file (module) -# local currenttype -# local typeref = _file:moduletyperef() -# if typeref and typeref.tag == "internaltyperef" then -# local typedef = _file.types[typeref.typename] -# if typedef and typedef.tag == "recordtypedef" then -# currenttype = typedef -# end -# end -# -# -- show quick description type exposed by module -# if currenttype and not isempty(currenttype.fields) then - Type $(currenttype.name) - $( applytemplate(currenttype, i+2, 'index') ) -# end -# -- -# -- Show quick description of other types -# -- -# if _file.types then -# for name, type in sortedpairs( _file.types ) do -# if type ~= currenttype and type.tag == 'recordtypedef' and not isempty(type.fields) then - Type $(name) - $( applytemplate(type, i+2, 'index') ) -# end -# end -# end -# -- -# -- Long description of globals -# -- -# if not isempty(_file.globalvars) then - Global(s) -# for name, item in sortedpairs(_file.globalvars) do - $( applytemplate(item, i+2) ) -# end -# end -# -- -# -- Long description of current type -# -- -# if currenttype then - Type $(currenttype.name) - $( applytemplate(currenttype, i+2) ) -# end -# -- -# -- Long description of other types -# -- -# if not isempty( _file.types ) then -# for name, type in sortedpairs( _file.types ) do -# if type ~= currenttype and type.tag == 'recordtypedef' then - Type $(name) - $( applytemplate(type, i+2) ) -# end -# end -# end -
    -]] diff --git a/Utils/luarocks/systree/share/lua/5.1/template/index.lua b/Utils/luarocks/systree/share/lua/5.1/template/index.lua deleted file mode 100644 index 555c2d373..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/template/index.lua +++ /dev/null @@ -1,28 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -return -[[# -#if _index.modules then -
    -

    Module$( #_index.modules > 1 and 's' )

    - -# for _, module in sortedpairs( _index.modules ) do -# if module.tag ~= 'index' then - - - - -# end -# end -
    $( fulllinkto(module) )$( module.description and format(module.shortdescription) )
    -
    -#end ]] diff --git a/Utils/luarocks/systree/share/lua/5.1/template/index/recordtypedef.lua b/Utils/luarocks/systree/share/lua/5.1/template/index/recordtypedef.lua deleted file mode 100644 index 8dfdbc4ce..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/template/index/recordtypedef.lua +++ /dev/null @@ -1,23 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -return [[# -# if not isempty(_recordtypedef.fields) then - -# for _, item in sortedpairs( _recordtypedef.fields ) do - - - - -# end -
    $( fulllinkto(item) )$( format(item.shortdescription) )
    -# end -# ]] diff --git a/Utils/luarocks/systree/share/lua/5.1/template/item.lua b/Utils/luarocks/systree/share/lua/5.1/template/item.lua deleted file mode 100644 index 122006185..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/template/item.lua +++ /dev/null @@ -1,167 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -return -[[
    -
    -# -- -# -- Resolve item type definition -# -- -# local typedef = _item:resolvetype() - -# -- -# -- Show item type for internal type -# -- -#if _item.type and (not typedef or typedef.tag ~= 'functiontypedef') then -# --Show link only when available -# local link = fulllinkto(_item.type) -# if link then - $( link ) -# else - $(prettyname(_item.type)) -# end -#end - -$( prettyname(_item) ) - -
    -
    -# if _item.shortdescription then - $( format(_item.shortdescription) ) -# end -# if _item.description and #_item.description > 0 then - $( format(_item.description) ) -# end -# -# -- -# -- For function definitions, describe parameters and return values -# -- -#if typedef and typedef.tag == 'functiontypedef' then -# -- -# -- Describe parameters -# -- -# local fdef = typedef -# -# -- Adjust parameter count if first one is 'self' -# local paramcount -# if #fdef.params > 0 and isinvokable(_item) then -# paramcount = #fdef.params - 1 -# else -# paramcount = #fdef.params -# end -# -# -- List parameters -# if paramcount > 0 then - Parameter$( paramcount > 1 and 's' ) -
      -# for position, param in ipairs( fdef.params ) do -# if not (position == 1 and isinvokable(_item)) then -
    • -# local paramline = "" -# if param.type then -# local link = linkto( param.type ) -# local name = prettyname( param.type ) -# if link then -# paramline = paramline .. '' .. name .. "" -# else -# paramline = paramline .. name -# end -# end -# -# paramline = paramline .. " " .. param.name .. " " -# -# if param.optional then -# paramline = paramline .. "optional" .. " " -# end -# if param.hidden then -# paramline = paramline .. "hidden" -# end -# -# paramline = paramline .. ": " -# -# if param.description and #param.description > 0 then -# paramline = paramline .. "\n" .. param.description -# end -# - $( format (paramline)) -
    • -# end -# end -
    -# end -# -# -- -# -- Describe returns types -# -- -# if fdef and #fdef.returns > 0 then - Return value$(#fdef.returns > 1 and 's') -# -- -# -- Format nice type list -# -- -# local function niceparmlist( parlist ) -# local typelist = {} -# for position, type in ipairs(parlist) do -# local link = linkto( type ) -# local name = prettyname( type ) -# if link then -# typelist[#typelist + 1] = ''..name..'' -# else -# typelist[#typelist + 1] = name -# end -# -- Append end separator or separating comma -# typelist[#typelist + 1] = position == #parlist and ':' or ', ' -# end -# return table.concat( typelist ) -# end -# -- -# -- Generate a list if they are several return clauses -# -- -# if #fdef.returns > 1 then -
      -# for position, ret in ipairs(fdef.returns) do -
    1. -# local returnline = ""; -# -# local paramlist = niceparmlist(ret.types) -# if #ret.types > 0 and #paramlist > 0 then -# returnline = "" .. paramlist .. "" -# end -# returnline = returnline .. "\n" .. ret.description - $( format (returnline)) -
    2. -# end -
    -# else -# local paramlist = niceparmlist(fdef.returns[1].types) -# local isreturn = fdef.returns and #fdef.returns > 0 and #paramlist > 0 -# local isdescription = fdef.returns and fdef.returns[1].description and #format(fdef.returns[1].description) > 0 -# -# local returnline = ""; -# -- Show return type if provided -# if isreturn then -# returnline = ""..paramlist.."" -# end -# if isdescription then -# returnline = returnline .. "\n" .. fdef.returns[1].description -# end - $( format(returnline)) -# end -# end -#end -# -#-- -#-- Show usage samples -#-- -#if _item.metadata and _item.metadata.usage then - $( applytemplate(_item.metadata.usage, i) ) -#end -
    -
    ]] diff --git a/Utils/luarocks/systree/share/lua/5.1/template/page.lua b/Utils/luarocks/systree/share/lua/5.1/template/page.lua deleted file mode 100644 index 32e1957c4..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/template/page.lua +++ /dev/null @@ -1,68 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -return -[[ - -#if _page.headers and #_page.headers > 0 then - -# for _, header in ipairs(_page.headers) do - $(header) -# end - -#end - -
    -
    - -
    -
    -
    -
    -# -- -# -- Generating lateral menu -# -- - - $( applytemplate(_page.currentmodule) ) -
    - - -]] diff --git a/Utils/luarocks/systree/share/lua/5.1/template/recordtypedef.lua b/Utils/luarocks/systree/share/lua/5.1/template/recordtypedef.lua deleted file mode 100644 index 758f1e0b0..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/template/recordtypedef.lua +++ /dev/null @@ -1,36 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -return [[# -# -- -# -- Descriptions -# -- -#if _recordtypedef.shortdescription and #_recordtypedef.shortdescription > 0 then - $( format( _recordtypedef.shortdescription ) ) -#end -#if _recordtypedef.description and #_recordtypedef.description > 0 then - $( format( _recordtypedef.description ) ) -#end -#-- -#-- Describe usage -#-- -#if _recordtypedef.metadata and _recordtypedef.metadata.usage then - $( applytemplate(_recordtypedef.metadata.usage, i) ) -#end -# -- -# -- Describe type fields -# -- -#if not isempty( _recordtypedef.fields ) then - Field(s) -# for name, item in sortedpairs( _recordtypedef.fields ) do - $( applytemplate(item, i) ) -# end -#end ]] diff --git a/Utils/luarocks/systree/share/lua/5.1/template/usage.lua b/Utils/luarocks/systree/share/lua/5.1/template/usage.lua deleted file mode 100644 index 93a8c7148..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/template/usage.lua +++ /dev/null @@ -1,33 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Marc AUBRY --- - initial API and implementation --------------------------------------------------------------------------------- -return[[# -#-- -#-- Show usage samples -#-- -#if _usage then -# if #_usage > 1 then -# -- Show all usages - Usages: -
      -# -- Loop over several usage description -# for _, usage in ipairs(_usage) do -
    • $( securechevrons(usage.description) )
    • -# end -
    -# elseif #_usage == 1 then -# -- Show unique usage sample - Usage: -# local usage = _usage[1] -
    $( securechevrons(usage.description) )
    -# end -#end -#]] diff --git a/Utils/luarocks/systree/share/lua/5.1/template/utils.lua b/Utils/luarocks/systree/share/lua/5.1/template/utils.lua deleted file mode 100644 index f2fd01f40..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/template/utils.lua +++ /dev/null @@ -1,470 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2012-2014 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- -local apimodel = require 'models.apimodel' - ---- --- @module docutils --- Handles link generation, node quick description. --- --- Provides: --- * link generation --- * anchor generation --- * node quick description -local M = {} - -function M.isempty(map) - local f = pairs(map) - return f(map) == nil -end - ---- --- Provide a handling function for all supported anchor types --- recordtypedef => #(typename) --- item (field of recordtypedef) => #(typename).itemname --- item (global) => itemname -M.anchortypes = { - recordtypedef = function (o) return string.format('#(%s)', o.name) end, - item = function(o) - if not o.parent or o.parent.tag == 'file' then - -- Handle items referencing globals - return o.name - elseif o.parent and o.parent.tag == 'recordtypedef' then - -- Handle items included in recordtypedef - local recordtypedef = o.parent - local recordtypedefanchor = M.anchor(recordtypedef) - if not recordtypedefanchor then - return nil, 'Unable to generate anchor for `recordtypedef parent.' - end - return string.format('%s.%s', recordtypedefanchor, o.name) - end - return nil, 'Unable to generate anchor for `item' - end -} - ---- --- Provides anchor string for an object of API mode --- --- @function [parent = #docutils] anchor --- @param modelobject Object form API model --- @result #string Anchor for an API model object, this function __may rise an error__ --- @usage # -- In a template --- # local anchorname = anchor(someobject) --- -function M.anchor( modelobject ) - local tag = modelobject.tag - if M.anchortypes[ tag ] then - return M.anchortypes[ tag ](modelobject) - end - return nil, string.format('No anchor available for `%s', tag) -end - -local function getexternalmodule( item ) - -- Get file which contains this item - local file - if item.parent then - if item.parent.tag =='recordtypedef' then - local recordtypedefparent = item.parent.parent - if recordtypedefparent and recordtypedefparent.tag =='file'then - file = recordtypedefparent - end - elseif item.parent.tag =='file' then - file = item.parent - else - return nil, 'Unable to fetch item parent' - end - end - return file -end - ---- --- Provide a handling function for all supported link types --- --- internaltyperef => ##(typename) --- => #anchor(recordtyperef) --- externaltyperef => modulename.html##(typename) --- => linkto(file)#anchor(recordtyperef) --- file(module) => modulename.html --- index => index.html --- recordtypedef => ##(typename) --- => #anchor(recordtyperef) --- item (internal field of recordtypedef) => ##(typename).itemname --- => #anchor(item) --- item (internal global) => #itemname --- => #anchor(item) --- item (external field of recordtypedef) => modulename.html##(typename).itemname --- => linkto(file)#anchor(item) --- item (externalglobal) => modulename.html#itemname --- => linkto(file)#anchor(item) -M.linktypes = { - internaltyperef = function(o) return string.format('##(%s)', o.typename) end, - externaltyperef = function(o) return string.format('%s.html##(%s)', o.modulename, o.typename) end, - file = function(o) return string.format('%s.html', o.name) end, - index = function() return 'index.html' end, - recordtypedef = function(o) - local anchor = M.anchor(o) - if not anchor then - return nil, 'Unable to generate anchor for `recordtypedef.' - end - return string.format('#%s', anchor) - end, - item = function(o) - - -- For every item get anchor - local anchor = M.anchor(o) - if not anchor then - return nil, 'Unable to generate anchor for `item.' - end - - -- Built local link to item - local linktoitem = string.format('#%s', anchor) - - -- - -- For external item, prefix with the link to the module. - -- - -- The "external item" concept is used only here for short/embedded - -- notation purposed. This concept and the `.external` field SHALL NOT - -- be used elsewhere. - -- - if o.external then - - -- Get link to file which contains this item - local file = getexternalmodule( o ) - local linktofile = file and M.linkto( file ) - if not linktofile then - return nil, 'Unable to generate link for external `item.' - end - - -- Built external link to item - linktoitem = string.format("%s%s", linktofile, linktoitem) - end - - return linktoitem - end -} - ---- --- Generates text for HTML links from API model element --- --- @function [parent = #docutils] --- @param modelobject Object form API model --- @result #string Links text for an API model element, this function __may rise an error__. --- @usage # -- In a template --- Some text -function M.linkto( apiobject ) - local tag = apiobject.tag - if M.linktypes[ tag ] then - return M.linktypes[tag](apiobject) - end - if not tag then - return nil, 'Link generation is impossible as no tag has been provided.' - end - return nil, string.format('No link generation available for `%s.', tag) -end - ---- --- Provide a handling function for all supported pretty name types --- primitivetyperef => #typename --- internaltyperef => #typename --- externaltyperef => modulename#typename --- file(module) => modulename --- index => index --- recordtypedef => typename --- item (internal function of recordtypedef) => typename.itemname(param1, param2,...) --- item (internal func with self of recordtypedef) => typename:itemname(param2) --- item (internal non func field of recordtypedef) => typename.itemname --- item (internal func global) => functionname(param1, param2,...) --- item (internal non func global) => itemname --- item (external function of recordtypedef) => modulename#typename.itemname(param1, param2,...) --- item (external func with self of recordtypedef) => modulename#typename:itemname(param2) --- item (external non func field of recordtypedef) => modulename#typename.itemname --- item (external func global) => functionname(param1, param2,...) --- item (external non func global) => itemname -M.prettynametypes = { - primitivetyperef = function(o) return string.format('#%s', o.typename) end, - externaltyperef = function(o) return string.format('%s#%s', o.modulename, o.typename) end, - index = function(o) return "index" end, - file = function(o) return o.name end, - recordtypedef = function(o) return o.name end, - item = function( o ) - - -- Determine item name - -- ---------------------- - local itemname = o.name - - -- Determine scope - -- ---------------------- - local parent = o.parent - local isglobal = parent and parent.tag == 'file' - local isfield = parent and parent.tag == 'recordtypedef' - - -- Determine type name - -- ---------------------- - - local typename = isfield and parent.name - - -- Fetch item definition - -- ---------------------- - -- Get file object - local file - if isglobal then - file = parent - elseif isfield then - file = parent.parent - end - -- Get definition - local definition = o:resolvetype (file) - - - - -- Build prettyname - -- ---------------------- - local prettyname - if not definition or definition.tag ~= 'functiontypedef' then - -- Fields - if isglobal or not typename then - prettyname = itemname - else - prettyname = string.format('%s.%s', typename, itemname) - end - else - -- Functions - -- Build parameter list - local paramlist = {} - local isinvokable = M.isinvokable(o) - for position, param in ipairs(definition.params) do - -- For non global function, when first parameter is 'self', - -- it will not be part of listed parameters - if not (position == 1 and isinvokable and isfield) then - table.insert(paramlist, param.name) - if position ~= #definition.params then - table.insert(paramlist, ', ') - end - end - end - - if isglobal or not typename then - prettyname = string.format('%s(%s)',itemname, table.concat(paramlist)) - else - -- Determine function prefix operator, - -- ':' if 'self' is first parameter, '.' else way - local operator = isinvokable and ':' or '.' - - -- Append function parameters - prettyname = string.format('%s%s%s(%s)',typename, operator, itemname, table.concat(paramlist)) - end - end - - -- Manage external Item prettyname - -- ---------------------- - local externalmodule = o.external and getexternalmodule( o ) - local externalmodulename = externalmodule and externalmodule.name - - if externalmodulename then - return string.format('%s#%s',externalmodulename,prettyname) - else - return prettyname - end - end -} -M.prettynametypes.internaltyperef = M.prettynametypes.primitivetyperef - ---- --- Check if the given item is a function that can be invoked -function M.isinvokable(item) - --test if the item is global - if item.parent and item.parent.tag == 'file' then - return false - end - -- check first param - local definition = item:resolvetype() - if definition and definition.tag == 'functiontypedef' then - if (#definition.params > 0) then - return definition.params[1].name == 'self' - end - end -end - ---- --- Provide human readable overview from an API model element --- --- Resolve all element needed to summurize nicely an element form API model. --- @usage $ print( prettyname(item) ) --- module:somefunction(secondparameter) --- @function [parent = #docutils] --- @param apiobject Object form API model --- @result #string Human readable description of given element. --- @result #nil, #string In case of error. -function M.prettyname( apiobject ) - local tag = apiobject.tag - if M.prettynametypes[tag] then - return M.prettynametypes[tag](apiobject) - elseif not tag then - return nil, 'No pretty name available as no tag has been provided.' - end - return nil, string.format('No pretty name for `%s.', tag) -end - ---- --- Just make a string print table in HTML. --- @function [parent = #docutils] securechevrons --- @param #string String to convert. --- @usage securechevrons('') => '<markup>' --- @return #string Converted string. -function M.securechevrons( str ) - if not str then return nil, 'String expected.' end - return string.gsub(str:gsub('<', '<'), '>', '>') -end - -------------------------------------------------------------------------------- --- Handling format of @{some#type} tag. --- Following functions enable to recognize several type of references between --- "{}". -------------------------------------------------------------------------------- - ---- --- Provide API Model elements from string describing global elements --- such as: --- * `global#foo` --- * `foo#global.bar` -local globals = function(str) - -- Handling globals from modules - for modulename, fieldname in str:gmatch('([%a%.%d_]+)#global%.([%a%.%d_]+)') do - local item = apimodel._item(fieldname) - local file = apimodel._file() - file.name = modulename - file:addglobalvar( item ) - return item - end - -- Handling other globals - for name in str:gmatch('global#([%a%.%d_]+)') do - -- print("globale", name) - return apimodel._externaltypref('global', name) - end - return nil -end - ---- --- Transform a string like `module#(type).field` in an API Model item -local field = function( str ) - - -- Match `module#type.field` - local mod, typename, fieldname = str:gmatch('([%a%.%d_]*)#([%a%.%d_]+)%.([%a%.%d_]+)')() - - -- Try matching `module#(type).field` - if not mod then - mod, typename, fieldname = str:gmatch('([%a%.%d_]*)#%(([%a%.%d_]+)%)%.([%a%.%d_]+)')() - if not mod then - -- No match - return nil - end - end - - -- Build according `item - local modulefielditem = apimodel._item( fieldname ) - local moduletype = apimodel._recordtypedef(typename) - moduletype:addfield( modulefielditem ) - local typeref - if #mod > 0 then - local modulefile = apimodel._file() - modulefile.name = mod - modulefile:addtype( moduletype ) - typeref = apimodel._externaltypref(mod, typename) - modulefielditem.external = true - else - typeref = apimodel._internaltyperef(typename) - end - modulefielditem.type = typeref - return modulefielditem -end - ---- --- Build an API internal reference from a string like: `#typeref` -local internal = function ( typestring ) - for name in typestring:gmatch('#([%a%.%d_]+)') do - -- Do not handle this name is it starts with reserved name "global" - if name:find("global.") == 1 then return nil end - return apimodel._internaltyperef(name) - end - return nil -end - ---- --- Build an API external reference from a string like: `mod.ule#type` -local extern = function (type) - - -- Match `mod.ule#ty.pe` - local modulename, typename = type:gmatch('([%a%.%d_]+)#([%a%.%d_]+)')() - - -- Trying `mod.ule#(ty.pe)` - if not modulename then - modulename, typename = type:gmatch('([%a%.%d_]+)#%(([%a%.%d_]+)%)')() - - -- No match at all - if not modulename then - return nil - end - end - return apimodel._externaltypref(modulename, typename) -end - ---- --- Build an API external reference from a string like: `mod.ule` -local file = function (type) - for modulename in type:gmatch('([%a%.%d_]+)') do - local file = apimodel._file() - file.name = modulename - return file - end - return nil -end - - ---- --- Provide API Model element from a string --- @usage local externaltyperef = getelement("somemodule#somefield") -function M.getelement( str ) - - -- Order matters, more restrictive are at begin of table - local extractors = { - globals, - field, - extern, - internal, - file - } - -- Loop over extractors. - -- First valid result is used - for _, extractor in ipairs( extractors ) do - local result = extractor( str ) - if result then return result end - end - return nil -end - --------------------------------------------------------------------------------- --- Iterator that iterates on the table in key ascending order. --- --- @function [parent=#utils.table] sortedPairs --- @param t table to iterate. --- @return iterator function. -function M.sortedpairs(t) - local a = {} - local insert = table.insert - for n in pairs(t) do insert(a, n) end - table.sort(a) - local i = 0 - return function() - i = i + 1 - return a[i], t[a[i]] - end -end -return M diff --git a/Utils/luarocks/systree/share/lua/5.1/templateengine.lua b/Utils/luarocks/systree/share/lua/5.1/templateengine.lua deleted file mode 100644 index efa976b8a..000000000 --- a/Utils/luarocks/systree/share/lua/5.1/templateengine.lua +++ /dev/null @@ -1,116 +0,0 @@ --------------------------------------------------------------------------------- --- Copyright (c) 2011-2012 Sierra Wireless. --- All rights reserved. This program and the accompanying materials --- are made available under the terms of the Eclipse Public License v1.0 --- which accompanies this distribution, and is available at --- http://www.eclipse.org/legal/epl-v10.html --- --- Contributors: --- Kevin KIN-FOO --- - initial API and implementation and initial documentation --------------------------------------------------------------------------------- ---- --- This library provide html description of elements from the externalapi -local M = {} - --- Load template engine -local pltemplate = require 'pl.template' - --- Markdown handling -local markdown = require 'markdown' - --- apply template to the given element -function M.applytemplate(elem, ident, templatetype) - -- define environment - local env = M.getenv(elem, ident) - - -- load template - local template = M.gettemplate(elem,templatetype) - if not template then - templatetype = templatetype and string.format(' "%s"', templatetype) or '' - local elementname = string.format(' for %s', elem.tag or 'untagged element') - error(string.format('Unable to load %s template %s', templatetype, elementname)) - end - - -- apply template - local str, err = pltemplate.substitute(template, env) - - --manage errors - if not str then - local templateerror = templatetype and string.format(' parsing "%s" template ', templatetype) or '' - error(string.format('An error occured%s for "%s"\n%s',templateerror, elem.tag, err)) - end - return str -end - --- get the a new environment for this element -function M.getenv(elem, ident) - local currentenv ={} - for k,v in pairs(M.env) do currentenv[k] = v end - if elem and elem.tag then - currentenv['_'..elem.tag]= elem - end - currentenv['i']= ident or 1 - return currentenv -end - --- get the template for this element -function M.gettemplate(elem,templatetype) - local tag = elem and elem.tag - if tag then - if templatetype then - return require ("template." .. templatetype.. "." .. tag) - else - return require ("template." .. tag) - end - end -end - - ---- --- Allow user to format text in descriptions. --- Default implementation replaces @{---} tags with links and apply markdown. --- @return #string -local function format(string) - -- Allow to replace encountered tags with valid links - local replace = function(found) - local apiobj = M.env.getelement(found) - if apiobj then - return M.env.fulllinkto(apiobj) - end - return found - end - string = string:gsub('@{%s*(.-)%s*}', replace) - return M.env.markdown( string ) -end ---- --- Provide a full link to an element using `prettyname` and `linkto`. --- Default implementation is for HTML. -local function fulllinkto(o) - local ref = M.env.linkto(o) - local name = M.env.prettyname(o) - if not ref then - return name - end - return string.format('%s', ref, name) -end --- --- Define default template environnement --- -local defaultenv = { - table = table, - ipairs = ipairs, - pairs = pairs, - markdown = markdown, - applytemplate = M.applytemplate, - format = format, - linkto = function(str) return str end, - fulllinkto = fulllinkto, - prettyname = function(s) return s end, - getelement = function(s) return nil end -} - --- this is the global env accessible in the templates --- env should be redefine by docgenerator user to add functions or redefine it. -M.env = defaultenv -return M diff --git a/Utils/luarocks/tools/7z.dll b/Utils/luarocks/tools/7z.dll deleted file mode 100644 index c0ff7fbe6..000000000 Binary files a/Utils/luarocks/tools/7z.dll and /dev/null differ diff --git a/Utils/luarocks/tools/7z.exe b/Utils/luarocks/tools/7z.exe deleted file mode 100644 index 5e3d6f9cf..000000000 Binary files a/Utils/luarocks/tools/7z.exe and /dev/null differ diff --git a/Utils/luarocks/tools/cp.exe b/Utils/luarocks/tools/cp.exe deleted file mode 100644 index 0ef4fe85e..000000000 Binary files a/Utils/luarocks/tools/cp.exe and /dev/null differ diff --git a/Utils/luarocks/tools/find.exe b/Utils/luarocks/tools/find.exe deleted file mode 100644 index 85192fbf4..000000000 Binary files a/Utils/luarocks/tools/find.exe and /dev/null differ diff --git a/Utils/luarocks/tools/libeay32.dll b/Utils/luarocks/tools/libeay32.dll deleted file mode 100644 index 8d31f8668..000000000 Binary files a/Utils/luarocks/tools/libeay32.dll and /dev/null differ diff --git a/Utils/luarocks/tools/libiconv2.dll b/Utils/luarocks/tools/libiconv2.dll deleted file mode 100644 index 544dd92f5..000000000 Binary files a/Utils/luarocks/tools/libiconv2.dll and /dev/null differ diff --git a/Utils/luarocks/tools/libintl3.dll b/Utils/luarocks/tools/libintl3.dll deleted file mode 100644 index ec11e6b19..000000000 Binary files a/Utils/luarocks/tools/libintl3.dll and /dev/null differ diff --git a/Utils/luarocks/tools/libssl32.dll b/Utils/luarocks/tools/libssl32.dll deleted file mode 100644 index a30ff0e9e..000000000 Binary files a/Utils/luarocks/tools/libssl32.dll and /dev/null differ diff --git a/Utils/luarocks/tools/ls.exe b/Utils/luarocks/tools/ls.exe deleted file mode 100644 index 96ff2e574..000000000 Binary files a/Utils/luarocks/tools/ls.exe and /dev/null differ diff --git a/Utils/luarocks/tools/md5sum.exe b/Utils/luarocks/tools/md5sum.exe deleted file mode 100644 index 4ae9f74ff..000000000 Binary files a/Utils/luarocks/tools/md5sum.exe and /dev/null differ diff --git a/Utils/luarocks/tools/mkdir.exe b/Utils/luarocks/tools/mkdir.exe deleted file mode 100644 index 83e57d97a..000000000 Binary files a/Utils/luarocks/tools/mkdir.exe and /dev/null differ diff --git a/Utils/luarocks/tools/mv.exe b/Utils/luarocks/tools/mv.exe deleted file mode 100644 index 9fb65bb97..000000000 Binary files a/Utils/luarocks/tools/mv.exe and /dev/null differ diff --git a/Utils/luarocks/tools/pwd.exe b/Utils/luarocks/tools/pwd.exe deleted file mode 100644 index 7dd114de1..000000000 Binary files a/Utils/luarocks/tools/pwd.exe and /dev/null differ diff --git a/Utils/luarocks/tools/rmdir.exe b/Utils/luarocks/tools/rmdir.exe deleted file mode 100644 index 6a85c3c4b..000000000 Binary files a/Utils/luarocks/tools/rmdir.exe and /dev/null differ diff --git a/Utils/luarocks/tools/test.exe b/Utils/luarocks/tools/test.exe deleted file mode 100644 index 94c95f9e4..000000000 Binary files a/Utils/luarocks/tools/test.exe and /dev/null differ diff --git a/Utils/luarocks/tools/uname.exe b/Utils/luarocks/tools/uname.exe deleted file mode 100644 index 3e2f4cf8f..000000000 Binary files a/Utils/luarocks/tools/uname.exe and /dev/null differ diff --git a/Utils/luarocks/tools/wget.exe b/Utils/luarocks/tools/wget.exe deleted file mode 100644 index 54b372e6b..000000000 Binary files a/Utils/luarocks/tools/wget.exe and /dev/null differ diff --git a/Utils/luarocks/wlua5.1.exe b/Utils/luarocks/wlua5.1.exe deleted file mode 100644 index 7be8c3a71..000000000 Binary files a/Utils/luarocks/wlua5.1.exe and /dev/null differ diff --git a/Utils/luasrcdiet.bat b/Utils/luasrcdiet.bat deleted file mode 100644 index 9534f97f7..000000000 --- a/Utils/luasrcdiet.bat +++ /dev/null @@ -1,3 +0,0 @@ -@echo on -"%~dp0luarocks/lua5.1.exe" -e "package.path=\"%~dp0luarocks/share/lua/5.1/?.lua;%~dp0luarocks/share/lua/5.1/?/init.lua;\"..package.path; package.cpath=\"%~dp0luarocks/lib/lua/5.1/?.dll;%~dp0luarocks/systree/lib/lua/5.1/?.dll;\"..package.cpath" -e "local k,l,_=pcall(require,\"luarocks.loader\") _=k and l.add_context(\"luasrcdiet\",\"0.3.0-2\")" "%~dp0luarocks/luasrcdiet/0.3.0-2/bin/luasrcdiet" %* - diff --git a/docs/_config.yml b/_config.yml similarity index 100% rename from docs/_config.yml rename to _config.yml diff --git a/docs/Communities/Slack.JPG b/docs/Communities/Slack.JPG deleted file mode 100644 index 73e799328..000000000 Binary files a/docs/Communities/Slack.JPG and /dev/null differ diff --git a/docs/Documentation/AI_A2A.html b/docs/Documentation/AI_A2A.html deleted file mode 100644 index c60cde5a3..000000000 --- a/docs/Documentation/AI_A2A.html +++ /dev/null @@ -1,2253 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module AI_A2A

    - -

    AI -- AI A2A Air Patrolling or Staging.

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    -

    Contributions:

    - -
      -
    • Dutch_Baron: Working together with James has resulted in the creation of the AI_BALANCER class.
    • -
    - - -

    James has shared his ideas on balancing AI with air units, and together we made a first design which you can use now :-) - * Pikey: Testing and API concept review.

    - -
    - - -

    Global(s)

    - - - - - -
    AI_A2A -

    AI_A2A class, extends Fsm#FSM_CONTROLLABLE

    - -

    The AI_A2A class implements the core functions to operate an AI Group A2A tasking.

    -
    -

    Type AI_A2A

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AI_A2A.CheckStatus - -
    AI_A2A:ClearTargetDistance() - -
    AI_A2A.DisengageRadius - -
    AI_A2A:GetDispatcher() - -
    AI_A2A.HomeAirbase - -
    AI_A2A.IdleCount - -
    AI_A2A:New(AIGroup) -

    Creates a new AI_A2A object

    -
    AI_A2A:OnAfterRTB(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event RTB.

    -
    AI_A2A:OnAfterRefuel(Controllable, From, Event, To) -

    Refuel Handler OnAfter for AI_A2A

    -
    AI_A2A:OnAfterStart(From, Event, To) -

    Start Handler OnAfter for AI_A2A

    -
    AI_A2A:OnAfterStatus(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event Status.

    -
    AI_A2A:OnAfterStop(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event Stop.

    -
    AI_A2A:OnBeforeRTB(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event RTB.

    -
    AI_A2A:OnBeforeRefuel(Controllable, From, Event, To) -

    Refuel Handler OnBefore for AI_A2A

    -
    AI_A2A:OnBeforeStart(From, Event, To) -

    Start Handler OnBefore for AI_A2A

    -
    AI_A2A:OnBeforeStatus(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event Status.

    -
    AI_A2A:OnBeforeStop(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event Stop.

    -
    AI_A2A:OnCrash(EventData) - -
    AI_A2A:OnEjection(EventData) - -
    AI_A2A:OnEnterReturning(Controllable, From, Event, To) -

    OnEnter Transition Handler for State Returning.

    -
    AI_A2A:OnEnterStopped(Controllable, From, Event, To) -

    OnEnter Transition Handler for State Stopped.

    -
    AI_A2A:OnLeaveReturning(Controllable, From, Event, To) -

    OnLeave Transition Handler for State Returning.

    -
    AI_A2A:OnLeaveStopped(Controllable, From, Event, To) -

    OnLeave Transition Handler for State Stopped.

    -
    AI_A2A:OnPilotDead(EventData) - -
    AI_A2A.PatrolCeilingAltitude - -
    AI_A2A.PatrolDamageThreshold - -
    AI_A2A.PatrolFloorAltitude - -
    AI_A2A.PatrolFuelThresholdPercentage - -
    AI_A2A.PatrolManageDamage - -
    AI_A2A.PatrolManageFuel - -
    AI_A2A.PatrolMaxSpeed - -
    AI_A2A.PatrolMinSpeed - -
    AI_A2A.PatrolOutOfFuelOrbitTime - -
    AI_A2A:RTB() -

    Synchronous Event Trigger for Event RTB.

    -
    AI_A2A.RTBHold(AIGroup, Fsm) - -
    AI_A2A.RTBRoute(AIGroup, Fsm) - -
    AI_A2A:Refuel() -

    Refuel Trigger for AI_A2A

    -
    AI_A2A.Resume(AIGroup, Fsm) - -
    AI_A2A:SetAltitude(PatrolFloorAltitude, PatrolCeilingAltitude) -

    Sets the floor and ceiling altitude of the patrol.

    -
    AI_A2A:SetDamageThreshold(PatrolDamageThreshold) -

    When the AI is damaged beyond a certain treshold, it is required that the AI returns to the home base.

    -
    AI_A2A:SetDisengageRadius(DisengageRadius) -

    Sets the disengage range, that when engaging a target beyond the specified range, the engagement will be cancelled and the plane will RTB.

    -
    AI_A2A:SetDispatcher(Dispatcher) - -
    AI_A2A:SetFuelThreshold(PatrolFuelThresholdPercentage, PatrolOutOfFuelOrbitTime) -

    When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base.

    -
    AI_A2A:SetHomeAirbase(HomeAirbase) -

    Sets the home airbase.

    -
    AI_A2A:SetSpeed(PatrolMinSpeed, PatrolMaxSpeed) -

    Sets (modifies) the minimum and maximum speed of the patrol.

    -
    AI_A2A:SetStatusOff() -

    Set the status checking off.

    -
    AI_A2A:SetTanker(TankerName) -

    Sets to refuel at the given tanker.

    -
    AI_A2A:SetTargetDistance(Coordinate) - -
    AI_A2A:Start() -

    Start Trigger for AI_A2A

    -
    AI_A2A:Status() -

    Synchronous Event Trigger for Event Status.

    -
    AI_A2A:Stop() -

    Synchronous Event Trigger for Event Stop.

    -
    AI_A2A.TankerName - -
    AI_A2A:__RTB(Delay) -

    Asynchronous Event Trigger for Event RTB.

    -
    AI_A2A:__Refuel(Delay) -

    Refuel Asynchronous Trigger for AI_A2A

    -
    AI_A2A:__Start(Delay) -

    Start Asynchronous Trigger for AI_A2A

    -
    AI_A2A:__Status(Delay) -

    Asynchronous Event Trigger for Event Status.

    -
    AI_A2A:__Stop(Delay) -

    Asynchronous Event Trigger for Event Stop.

    -
    AI_A2A:onafterDead() - -
    AI_A2A:onafterHold(AIGroup, From, Event, To, HoldTime) - -
    AI_A2A:onafterHome(AIGroup, From, Event, To) - -
    AI_A2A:onafterRTB(AIGroup, From, Event, To) - -
    AI_A2A:onafterRefuel(AIGroup, From, Event, To) - -
    AI_A2A:onafterStart(Controllable, From, Event, To) -

    Defines a new patrol route using the Process_PatrolZone parameters and settings.

    -
    AI_A2A:onafterStatus() - -
    AI_A2A:onbeforeStatus() - -
    - -

    Global(s)

    -
    -
    - - #AI_A2A - -AI_A2A - -
    -
    - -

    AI_A2A class, extends Fsm#FSM_CONTROLLABLE

    - -

    The AI_A2A class implements the core functions to operate an AI Group A2A tasking.

    - - - - -

    AI_A2A constructor

    - - - -

    2. AI_A2A is a FSM

    - -

    Process

    - -

    2.1. AI_A2A States

    - -
      -
    • None ( Group ): The process is not started yet.
    • -
    • Patrolling ( Group ): The AI is patrolling the Patrol Zone.
    • -
    • Returning ( Group ): The AI is returning to Base.
    • -
    • Stopped ( Group ): The process is stopped.
    • -
    • Crashed ( Group ): The AI has crashed or is dead.
    • -
    - -

    2.2. AI_A2A Events

    - -
      -
    • Start ( Group ): Start the process.
    • -
    • Stop ( Group ): Stop the process.
    • -
    • Route ( Group ): Route the AI to a new random 3D point within the Patrol Zone.
    • -
    • RTB ( Group ): Route the AI to the home base.
    • -
    • Detect ( Group ): The AI is detecting targets.
    • -
    • Detected ( Group ): The AI has detected new targets.
    • -
    • Status ( Group ): The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB.
    • -
    - -

    3. Set or Get the AI controllable

    - - - - -
    -
    -

    Type AI_A2A

    -

    Field(s)

    -
    -
    - - #boolean - -AI_A2A.CheckStatus - -
    -
    - - - -
    -
    -
    -
    - - -AI_A2A:ClearTargetDistance() - -
    -
    - - - -
    -
    -
    -
    - - - -AI_A2A.DisengageRadius - -
    -
    - - - -
    -
    -
    -
    - - -AI_A2A:GetDispatcher() - -
    -
    - - - -
    -
    -
    -
    - - - -AI_A2A.HomeAirbase - -
    -
    - - - -
    -
    -
    -
    - - -AI_A2A.IdleCount - -
    -
    - - - -
    -
    -
    -
    - - -AI_A2A:New(AIGroup) - -
    -
    - -

    Creates a new AI_A2A object

    - -

    Parameter

    - -

    Return value

    - -

    #AI_A2A:

    - - -
    -
    -
    -
    - - -AI_A2A:OnAfterRTB(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event RTB.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A:OnAfterRefuel(Controllable, From, Event, To) - -
    -
    - -

    Refuel Handler OnAfter for AI_A2A

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A:OnAfterStart(From, Event, To) - -
    -
    - -

    Start Handler OnAfter for AI_A2A

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A:OnAfterStatus(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Status.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A:OnAfterStop(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Stop.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A:OnBeforeRTB(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event RTB.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_A2A:OnBeforeRefuel(Controllable, From, Event, To) - -
    -
    - -

    Refuel Handler OnBefore for AI_A2A

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -AI_A2A:OnBeforeStart(From, Event, To) - -
    -
    - -

    Start Handler OnBefore for AI_A2A

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -AI_A2A:OnBeforeStatus(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Status.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_A2A:OnBeforeStop(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Stop.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_A2A:OnCrash(EventData) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -AI_A2A:OnEjection(EventData) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -AI_A2A:OnEnterReturning(Controllable, From, Event, To) - -
    -
    - -

    OnEnter Transition Handler for State Returning.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A:OnEnterStopped(Controllable, From, Event, To) - -
    -
    - -

    OnEnter Transition Handler for State Stopped.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A:OnLeaveReturning(Controllable, From, Event, To) - -
    -
    - -

    OnLeave Transition Handler for State Returning.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_A2A:OnLeaveStopped(Controllable, From, Event, To) - -
    -
    - -

    OnLeave Transition Handler for State Stopped.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_A2A:OnPilotDead(EventData) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - - -AI_A2A.PatrolCeilingAltitude - -
    -
    - - - -
    -
    -
    -
    - - - -AI_A2A.PatrolDamageThreshold - -
    -
    - - - -
    -
    -
    -
    - - - -AI_A2A.PatrolFloorAltitude - -
    -
    - - - -
    -
    -
    -
    - - - -AI_A2A.PatrolFuelThresholdPercentage - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -AI_A2A.PatrolManageDamage - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -AI_A2A.PatrolManageFuel - -
    -
    - - - -
    -
    -
    -
    - - - -AI_A2A.PatrolMaxSpeed - -
    -
    - - - -
    -
    -
    -
    - - - -AI_A2A.PatrolMinSpeed - -
    -
    - - - -
    -
    -
    -
    - - - -AI_A2A.PatrolOutOfFuelOrbitTime - -
    -
    - - - -
    -
    -
    -
    - - -AI_A2A:RTB() - -
    -
    - -

    Synchronous Event Trigger for Event RTB.

    - -
    -
    -
    -
    - - -AI_A2A.RTBHold(AIGroup, Fsm) - -
    -
    - - - -

    Parameters

    - -
    -
    -
    -
    - - -AI_A2A.RTBRoute(AIGroup, Fsm) - -
    -
    - - - -

    Parameters

    - -
    -
    -
    -
    - - -AI_A2A:Refuel() - -
    -
    - -

    Refuel Trigger for AI_A2A

    - -
    -
    -
    -
    - - -AI_A2A.Resume(AIGroup, Fsm) - -
    -
    - - - -

    Parameters

    - -
    -
    -
    -
    - - -AI_A2A:SetAltitude(PatrolFloorAltitude, PatrolCeilingAltitude) - -
    -
    - -

    Sets the floor and ceiling altitude of the patrol.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Altitude PatrolFloorAltitude : -The lowest altitude in meters where to execute the patrol.

      - -
    • -
    • - -

      Dcs.DCSTypes#Altitude PatrolCeilingAltitude : -The highest altitude in meters where to execute the patrol.

      - -
    • -
    -

    Return value

    - -

    #AI_A2A: -self

    - -
    -
    -
    -
    - - -AI_A2A:SetDamageThreshold(PatrolDamageThreshold) - -
    -
    - -

    When the AI is damaged beyond a certain treshold, it is required that the AI returns to the home base.

    - - -

    However, damage cannot be foreseen early on. -Therefore, when the damage treshold is reached, -the AI will return immediately to the home base (RTB). -Note that for groups, the average damage of the complete group will be calculated. -So, in a group of 4 airplanes, 2 lost and 2 with damage 0.2, the damage treshold will be 0.25.

    - -

    Parameter

    -
      -
    • - -

      #number PatrolDamageThreshold : -The treshold in percentage (between 0 and 1) when the AI is considered to be damaged.

      - -
    • -
    -

    Return value

    - -

    #AI_A2A: -self

    - -
    -
    -
    -
    - - -AI_A2A:SetDisengageRadius(DisengageRadius) - -
    -
    - -

    Sets the disengage range, that when engaging a target beyond the specified range, the engagement will be cancelled and the plane will RTB.

    - -

    Parameter

    -
      -
    • - -

      #number DisengageRadius : -The disengage range.

      - -
    • -
    -

    Return value

    - -

    #AI_A2A: -self

    - -
    -
    -
    -
    - - -AI_A2A:SetDispatcher(Dispatcher) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      Dispatcher :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A:SetFuelThreshold(PatrolFuelThresholdPercentage, PatrolOutOfFuelOrbitTime) - -
    -
    - -

    When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base.

    - - -

    Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated. -When the fuel treshold is reached, the AI will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the AI_A2A. -Once the time is finished, the old AI will return to the base.

    - -

    Parameters

    -
      -
    • - -

      #number PatrolFuelThresholdPercentage : -The treshold in percentage (between 0 and 1) when the AIControllable is considered to get out of fuel.

      - -
    • -
    • - -

      #number PatrolOutOfFuelOrbitTime : -The amount of seconds the out of fuel AIControllable will orbit before returning to the base.

      - -
    • -
    -

    Return value

    - -

    #AI_A2A: -self

    - -
    -
    -
    -
    - - -AI_A2A:SetHomeAirbase(HomeAirbase) - -
    -
    - -

    Sets the home airbase.

    - -

    Parameter

    - -

    Return value

    - -

    #AI_A2A: -self

    - -
    -
    -
    -
    - - -AI_A2A:SetSpeed(PatrolMinSpeed, PatrolMaxSpeed) - -
    -
    - -

    Sets (modifies) the minimum and maximum speed of the patrol.

    - -

    Parameters

    - -

    Return value

    - -

    #AI_A2A: -self

    - -
    -
    -
    -
    - - -AI_A2A:SetStatusOff() - -
    -
    - -

    Set the status checking off.

    - -

    Return value

    - -

    #AI_A2A: -self

    - -
    -
    -
    -
    - - -AI_A2A:SetTanker(TankerName) - -
    -
    - -

    Sets to refuel at the given tanker.

    - -

    Parameter

    -
      -
    • - -

      Wrapper.Group#GROUP TankerName : -The group name of the tanker as defined within the Mission Editor or spawned.

      - -
    • -
    -

    Return value

    - -

    #AI_A2A: -self

    - -
    -
    -
    -
    - - -AI_A2A:SetTargetDistance(Coordinate) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      Coordinate :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A:Start() - -
    -
    - -

    Start Trigger for AI_A2A

    - -
    -
    -
    -
    - - -AI_A2A:Status() - -
    -
    - -

    Synchronous Event Trigger for Event Status.

    - -
    -
    -
    -
    - - -AI_A2A:Stop() - -
    -
    - -

    Synchronous Event Trigger for Event Stop.

    - -
    -
    -
    -
    - - - -AI_A2A.TankerName - -
    -
    - - - -
    -
    -
    -
    - - -AI_A2A:__RTB(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event RTB.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A:__Refuel(Delay) - -
    -
    - -

    Refuel Asynchronous Trigger for AI_A2A

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A:__Start(Delay) - -
    -
    - -

    Start Asynchronous Trigger for AI_A2A

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A:__Status(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Status.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A:__Stop(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Stop.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A:onafterDead() - -
    -
    - - - -
    -
    -
    -
    - - -AI_A2A:onafterHold(AIGroup, From, Event, To, HoldTime) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIGroup :

      - -
    • -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    • - -

      HoldTime :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A:onafterHome(AIGroup, From, Event, To) - -
    -
    - - - -

    Parameters

    - -
    -
    -
    -
    - - -AI_A2A:onafterRTB(AIGroup, From, Event, To) - -
    -
    - - - -

    Parameters

    - -
    -
    -
    -
    - - -AI_A2A:onafterRefuel(AIGroup, From, Event, To) - -
    -
    - - - -

    Parameters

    - -
    -
    -
    -
    - - -AI_A2A:onafterStart(Controllable, From, Event, To) - -
    -
    - -

    Defines a new patrol route using the Process_PatrolZone parameters and settings.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #AI_A2A: -self

    - -
    -
    -
    -
    - - -AI_A2A:onafterStatus() - -
    -
    - - - -
    -
    -
    -
    - - -AI_A2A:onbeforeStatus() - -
    -
    - - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/AI_A2A_Cap.html b/docs/Documentation/AI_A2A_Cap.html deleted file mode 100644 index 2a8471e1f..000000000 --- a/docs/Documentation/AI_A2A_Cap.html +++ /dev/null @@ -1,1805 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module AI_A2A_Cap

    - -

    AI -- Execute Combat Air Patrol (CAP).

    - -

    Banner Image

    - -
    - -

    AI CAP classes makes AI Groups execute a Combat Air Patrol.

    - - - -

    There are the following types of CAP classes defined:

    - - - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions:

    - - - -
    - - -

    Global(s)

    - - - - - -
    AI_A2A_CAP -

    AIA2ACAP class, extends AICAP#AIPATROL_ZONE

    - -

    The AIA2ACAP class implements the core functions to patrol a Zone by an AI Group or Group -and automatically engage any airborne enemies that are within a certain range or within a certain zone.

    -
    -

    Type AI_A2A_CAP

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AI_A2A_CAP:Abort() -

    Synchronous Event Trigger for Event Abort.

    -
    AI_A2A_CAP:Accomplish() -

    Synchronous Event Trigger for Event Accomplish.

    -
    AI_A2A_CAP.Accomplished - -
    AI_A2A_CAP.AttackRoute(AICap, Fsm) - -
    AI_A2A_CAP.AttackSetUnit - -
    AI_A2A_CAP:Destroy() -

    Synchronous Event Trigger for Event Destroy.

    -
    AI_A2A_CAP:Engage() -

    Synchronous Event Trigger for Event Engage.

    -
    AI_A2A_CAP.EngageMaxSpeed - -
    AI_A2A_CAP.EngageMinSpeed - -
    AI_A2A_CAP.EngageRange - -
    AI_A2A_CAP.EngageZone - -
    AI_A2A_CAP.Engaging - -
    AI_A2A_CAP:Fired() -

    Synchronous Event Trigger for Event Fired.

    -
    AI_A2A_CAP:New(AICap, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageMinSpeed, EngageMaxSpeed, PatrolAltType) -

    Creates a new AIA2ACAP object

    -
    AI_A2A_CAP:OnAfterAbort(AICap, From, Event, To) -

    OnAfter Transition Handler for Event Abort.

    -
    AI_A2A_CAP:OnAfterAccomplish(AICap, From, Event, To) -

    OnAfter Transition Handler for Event Accomplish.

    -
    AI_A2A_CAP:OnAfterDestroy(AICap, From, Event, To) -

    OnAfter Transition Handler for Event Destroy.

    -
    AI_A2A_CAP:OnAfterEngage(AICap, From, Event, To) -

    OnAfter Transition Handler for Event Engage.

    -
    AI_A2A_CAP:OnAfterFired(AICap, From, Event, To) -

    OnAfter Transition Handler for Event Fired.

    -
    AI_A2A_CAP:OnBeforeAbort(AICap, From, Event, To) -

    OnBefore Transition Handler for Event Abort.

    -
    AI_A2A_CAP:OnBeforeAccomplish(AICap, From, Event, To) -

    OnBefore Transition Handler for Event Accomplish.

    -
    AI_A2A_CAP:OnBeforeDestroy(AICap, From, Event, To) -

    OnBefore Transition Handler for Event Destroy.

    -
    AI_A2A_CAP:OnBeforeEngage(AICap, From, Event, To) -

    OnBefore Transition Handler for Event Engage.

    -
    AI_A2A_CAP:OnBeforeFired(AICap, From, Event, To) -

    OnBefore Transition Handler for Event Fired.

    -
    AI_A2A_CAP:OnEnterEngaging(AICap, From, Event, To) -

    OnEnter Transition Handler for State Engaging.

    -
    AI_A2A_CAP:OnEventDead(EventData) - -
    AI_A2A_CAP:OnLeaveEngaging(AICap, From, Event, To) -

    OnLeave Transition Handler for State Engaging.

    -
    AI_A2A_CAP.Resume(AICap) - -
    AI_A2A_CAP:SetEngageRange(EngageRange) -

    Set the Engage Range when the AI will engage with airborne enemies.

    -
    AI_A2A_CAP:SetEngageZone(EngageZone) -

    Set the Engage Zone which defines where the AI will engage bogies.

    -
    AI_A2A_CAP:__Abort(Delay) -

    Asynchronous Event Trigger for Event Abort.

    -
    AI_A2A_CAP:__Accomplish(Delay) -

    Asynchronous Event Trigger for Event Accomplish.

    -
    AI_A2A_CAP:__Destroy(Delay) -

    Asynchronous Event Trigger for Event Destroy.

    -
    AI_A2A_CAP:__Engage(Delay) -

    Asynchronous Event Trigger for Event Engage.

    -
    AI_A2A_CAP:__Fired(Delay) -

    Asynchronous Event Trigger for Event Fired.

    -
    AI_A2A_CAP:onafterAbort(AICap, From, Event, To) - -
    AI_A2A_CAP:onafterAccomplish(AICap, From, Event, To) - -
    AI_A2A_CAP:onafterDestroy(AICap, From, Event, To, EventData) - -
    AI_A2A_CAP:onafterEngage(AICap, From, Event, To, AttackSetUnit) - -
    AI_A2A_CAP:onafterPatrol(AICap, From, Event, To) -

    onafter State Transition for Event Patrol.

    -
    AI_A2A_CAP:onafterStart(AICap, From, Event, To) -

    onafter State Transition for Event Patrol.

    -
    AI_A2A_CAP:onbeforeEngage(AICap, From, Event, To) - -
    - -

    Global(s)

    -
    -
    - - #AI_A2A_CAP - -AI_A2A_CAP - -
    -
    - -

    AIA2ACAP class, extends AICAP#AIPATROL_ZONE

    - -

    The AIA2ACAP class implements the core functions to patrol a Zone by an AI Group or Group -and automatically engage any airborne enemies that are within a certain range or within a certain zone.

    - - - -

    Process

    - -

    The AIA2ACAP is assigned a Group and this must be done before the AIA2ACAP process can be started using the Start event.

    - -

    Process

    - -

    The AI will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits. -Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits.

    - -

    Process

    - -

    This cycle will continue.

    - -

    Process

    - -

    During the patrol, the AI will detect enemy targets, which are reported through the Detected event.

    - -

    Process

    - -

    When enemies are detected, the AI will automatically engage the enemy.

    - -

    Process

    - -

    Until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB. -When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.

    - -

    Process

    - -

    1. AIA2ACAP constructor

    - - - -

    2. AIA2ACAP is a FSM

    - -

    Process

    - -

    2.1 AIA2ACAP States

    - -
      -
    • None ( Group ): The process is not started yet.
    • -
    • Patrolling ( Group ): The AI is patrolling the Patrol Zone.
    • -
    • Engaging ( Group ): The AI is engaging the bogeys.
    • -
    • Returning ( Group ): The AI is returning to Base..
    • -
    - -

    2.2 AIA2ACAP Events

    - - - -

    3. Set the Range of Engagement

    - -

    Range

    - -

    An optional range can be set in meters, -that will define when the AI will engage with the detected airborne enemy targets. -The range can be beyond or smaller than the range of the Patrol Zone. -The range is applied at the position of the AI. -Use the method AICAP#AIA2A_CAP.SetEngageRange() to define that range.

    - -

    4. Set the Zone of Engagement

    - -

    Zone

    - -

    An optional Zone can be set, -that will define when the AI will engage with the detected airborne enemy targets. -Use the method AICap#AIA2A_CAP.SetEngageZone() to define that Zone.

    - -
    - - -
    -
    -

    Type AI_A2A_Cap

    - -

    Type AI_A2A

    - -

    Type AI_A2A_CAP

    -

    Field(s)

    -
    -
    - - -AI_A2A_CAP:Abort() - -
    -
    - -

    Synchronous Event Trigger for Event Abort.

    - -
    -
    -
    -
    - - -AI_A2A_CAP:Accomplish() - -
    -
    - -

    Synchronous Event Trigger for Event Accomplish.

    - -
    -
    -
    -
    - - #boolean - -AI_A2A_CAP.Accomplished - -
    -
    - - - -
    -
    -
    -
    - - -AI_A2A_CAP.AttackRoute(AICap, Fsm) - -
    -
    - - - -

    Parameters

    - -
    -
    -
    -
    - - Core.Set#SET_UNIT - -AI_A2A_CAP.AttackSetUnit - -
    -
    - - - -
    -
    -
    -
    - - -AI_A2A_CAP:Destroy() - -
    -
    - -

    Synchronous Event Trigger for Event Destroy.

    - -
    -
    -
    -
    - - -AI_A2A_CAP:Engage() - -
    -
    - -

    Synchronous Event Trigger for Event Engage.

    - -
    -
    -
    -
    - - - -AI_A2A_CAP.EngageMaxSpeed - -
    -
    - - - -
    -
    -
    -
    - - - -AI_A2A_CAP.EngageMinSpeed - -
    -
    - - - -
    -
    -
    -
    - - - -AI_A2A_CAP.EngageRange - -
    -
    - - - -
    -
    -
    -
    - - - -AI_A2A_CAP.EngageZone - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -AI_A2A_CAP.Engaging - -
    -
    - - - -
    -
    -
    -
    - - -AI_A2A_CAP:Fired() - -
    -
    - -

    Synchronous Event Trigger for Event Fired.

    - -
    -
    -
    -
    - - -AI_A2A_CAP:New(AICap, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageMinSpeed, EngageMaxSpeed, PatrolAltType) - -
    -
    - -

    Creates a new AIA2ACAP object

    - -

    Parameters

    - -

    Return value

    - -

    #AIA2ACAP:

    - - -
    -
    -
    -
    - - -AI_A2A_CAP:OnAfterAbort(AICap, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Abort.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AICap : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_CAP:OnAfterAccomplish(AICap, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Accomplish.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AICap : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_CAP:OnAfterDestroy(AICap, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Destroy.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AICap : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_CAP:OnAfterEngage(AICap, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Engage.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AICap : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_CAP:OnAfterFired(AICap, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Fired.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AICap : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_CAP:OnBeforeAbort(AICap, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Abort.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AICap : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_A2A_CAP:OnBeforeAccomplish(AICap, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Accomplish.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AICap : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_A2A_CAP:OnBeforeDestroy(AICap, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Destroy.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AICap : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_A2A_CAP:OnBeforeEngage(AICap, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Engage.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AICap : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_A2A_CAP:OnBeforeFired(AICap, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Fired.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AICap : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_A2A_CAP:OnEnterEngaging(AICap, From, Event, To) - -
    -
    - -

    OnEnter Transition Handler for State Engaging.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AICap : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_CAP:OnEventDead(EventData) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -AI_A2A_CAP:OnLeaveEngaging(AICap, From, Event, To) - -
    -
    - -

    OnLeave Transition Handler for State Engaging.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AICap : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_A2A_CAP.Resume(AICap) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -AI_A2A_CAP:SetEngageRange(EngageRange) - -
    -
    - -

    Set the Engage Range when the AI will engage with airborne enemies.

    - -

    Parameter

    -
      -
    • - -

      #number EngageRange : -The Engage Range.

      - -
    • -
    -

    Return value

    - -

    #AIA2ACAP: -self

    - -
    -
    -
    -
    - - -AI_A2A_CAP:SetEngageZone(EngageZone) - -
    -
    - -

    Set the Engage Zone which defines where the AI will engage bogies.

    - -

    Parameter

    -
      -
    • - -

      Core.Zone#ZONE EngageZone : -The zone where the AI is performing CAP.

      - -
    • -
    -

    Return value

    - -

    #AIA2ACAP: -self

    - -
    -
    -
    -
    - - -AI_A2A_CAP:__Abort(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Abort.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_CAP:__Accomplish(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Accomplish.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_CAP:__Destroy(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Destroy.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_CAP:__Engage(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Engage.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_CAP:__Fired(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Fired.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_CAP:onafterAbort(AICap, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AICap : -The AI Group managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_CAP:onafterAccomplish(AICap, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AICap : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_CAP:onafterDestroy(AICap, From, Event, To, EventData) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AICap : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    • - -

      Core.Event#EVENTDATA EventData :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_CAP:onafterEngage(AICap, From, Event, To, AttackSetUnit) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AICap : -The AICap Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    • - -

      AttackSetUnit :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_CAP:onafterPatrol(AICap, From, Event, To) - -
    -
    - -

    onafter State Transition for Event Patrol.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AICap : -The AI Group managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_CAP:onafterStart(AICap, From, Event, To) - -
    -
    - -

    onafter State Transition for Event Patrol.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AICap : -The AI Group managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_CAP:onbeforeEngage(AICap, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AICap : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    - -

    Type AI_A2A_GCI

    - -
    - -
    - - diff --git a/docs/Documentation/AI_A2A_Dispatcher.html b/docs/Documentation/AI_A2A_Dispatcher.html deleted file mode 100644 index 269af1489..000000000 --- a/docs/Documentation/AI_A2A_Dispatcher.html +++ /dev/null @@ -1,5688 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module AI_A2A_Dispatcher

    - -

    AI - The AIA2ADISPATCHER creates an automatic A2A defense system based on an EWR network targets and coordinating CAP and GCI.

    - - - -

    Banner Image

    - -
    - -

    QUICK START GUIDE

    - -

    There are basically two classes available to model an A2A defense system.

    - -

    AI_A2A_DISPATCHER is the main A2A defense class that models the A2A defense system. -AI_A2A_GCICAP derives or inherits from AI_A2A_DISPATCHER and is a more noob user friendly class, but is less flexible.

    - -

    Before you start using the AI_A2A_DISPATCHER or AI_A2A_GCICAP ask youself the following questions.

    - -

    0. Do I need AI_A2A_DISPATCHER or do I need AI_A2A_GCICAP?

    - -

    AI_A2A_GCICAP, automates a lot of the below questions using the mission editor and requires minimal lua scripting. -But the AI_A2A_GCICAP provides less flexibility and a lot of options are defaulted. -With AI_A2A_DISPATCHER you can setup a much more fine grained A2A defense mechanism, but some more (easy) lua scripting is required.

    - -

    1. Which Coalition am I modeling an A2A defense system for? blue or red?

    - -

    One AI_A2A_DISPATCHER object can create a defense system for one coalition, which is blue or red. -If you want to create a mutual defense system, for both blue and red, then you need to create two AI_A2A_DISPATCHER objects, -each governing their defense system.

    - - -

    2. Which type of EWR will I setup? Grouping based per AREA, per TYPE or per UNIT? (Later others will follow).

    - -

    The MOOSE framework leverages the Detection classes to perform the EWR detection. -Several types of Detection classes exist, and the most common characteristics of these classes is that they:

    - -
      -
    • Perform detections from multiple FACs as one co-operating entity.
    • -
    • Communicate with a Head Quarters, which consolidates each detection.
    • -
    • Groups detections based on a method (per area, per type or per unit).
    • -
    • Communicates detections.
    • -
    - -

    3. Which EWR units will be used as part of the detection system? Only Ground or also Airborne?

    - -

    Typically EWR networks are setup using 55G6 EWR, 1L13 EWR, Hawk sr and Patriot str ground based radar units. -These radars have different ranges and 55G6 EWR and 1L13 EWR radars are Eastern Bloc units (eg Russia, Ukraine, Georgia) while the Hawk and Patriot radars are Western (eg US). -Additionally, ANY other radar capable unit can be part of the EWR network! Also AWACS airborne units, planes, helicopters can help to detect targets, as long as they have radar. -The position of these units is very important as they need to provide enough coverage -to pick up enemy aircraft as they approach so that CAP and GCI flights can be tasked to intercept them.

    - -

    4. Is a border required?

    - -

    Is this a cold car or a hot war situation? In case of a cold war situation, a border can be set that will only trigger defenses -if the border is crossed by enemy units.

    - -

    5. What maximum range needs to be checked to allow defenses to engage any attacker?

    - -

    A good functioning defense will have a "maximum range" evaluated to the enemy when CAP will be engaged or GCI will be spawned.

    - -

    6. Which Airbases, Carrier Ships, Farps will take part in the defense system for the Coalition?

    - -

    Carefully plan which airbases will take part in the coalition. Color each airbase in the color of the coalition.

    - -

    7. Which Squadrons will I create and which name will I give each Squadron?

    - -

    The defense system works with Squadrons. Each Squadron must be given a unique name, that forms the key to the defense system. -Several options and activities can be set per Squadron.

    - -

    8. Where will the Squadrons be located? On Airbases? On Carrier Ships? On Farps?

    - -

    Squadrons are placed as the "home base" on an airfield, carrier or farp. -Carefully plan where each Squadron will be located as part of the defense system.

    - -

    9. Which plane models will I assign for each Squadron? Do I need one plane model or more plane models per squadron?

    - -

    Per Squadron, one or multiple plane models can be allocated as Templates. -These are late activated groups with one airplane or helicopter that start with a specific name, called the template prefix. -The A2A defense system will select from the given templates a random template to spawn a new plane (group).

    - -

    10. Which payloads, skills and skins will these plane models have?

    - -

    Per Squadron, even if you have one plane model, you can still allocate multiple templates of one plane model, -each having different payloads, skills and skins. -The A2A defense system will select from the given templates a random template to spawn a new plane (group).

    - -

    11. For each Squadron, which will perform CAP?

    - -

    Per Squadron, evaluate which Squadrons will perform CAP. -Not all Squadrons need to perform CAP.

    - -

    12. For each Squadron doing CAP, in which ZONE(s) will the CAP be performed?

    - -

    Per CAP, evaluate where the CAP will be performed, in other words, define the zone. -Near the border or a bit further away?

    - -

    13. For each Squadron doing CAP, which zone types will I create?

    - -

    Per CAP zone, evaluate whether you want:

    - -
      -
    • simple trigger zones
    • -
    • polygon zones
    • -
    • moving zones
    • -
    - -

    Depending on the type of zone selected, a different Zone object needs to be created from a ZONE_ class.

    - -

    14. For each Squadron doing CAP, what are the time intervals and CAP amounts to be performed?

    - -

    For each CAP:

    - -
      -
    • How many CAP you want to have airborne at the same time?
    • -
    • How frequent you want the defense mechanism to check whether to start a new CAP?
    • -
    - -

    15. For each Squadron, which will perform GCI?

    - -

    For each Squadron, evaluate which Squadrons will perform GCI? -Not all Squadrons need to perform GCI.

    - -

    16. For each Squadron, which takeoff method will I use?

    - -

    For each Squadron, evaluate which takeoff method will be used:

    - -
      -
    • Straight from the air
    • -
    • From the runway
    • -
    • From a parking spot with running engines
    • -
    • From a parking spot with cold engines
    • -
    - -

    The default takeoff method is staight in the air.

    - -

    17. For each Squadron, which landing method will I use?

    - -

    For each Squadron, evaluate which landing method will be used:

    - -
      -
    • Despawn near the airbase when returning
    • -
    • Despawn after landing on the runway
    • -
    • Despawn after engine shutdown after landing
    • -
    - -

    The default landing method is despawn when near the airbase when returning.

    - -

    18. For each Squadron, which overhead will I use?

    - -

    For each Squadron, depending on the airplane type (modern, old) and payload, which overhead is required to provide any defense? -In other words, if X attacker airplanes are detected, how many Y defense airplanes need to be spawned per squadron? -The Y is dependent on the type of airplane (era), payload, fuel levels, skills etc. -The overhead is a factor that will calculate dynamically how many Y defenses will be required based on X attackers detected.

    - -

    The default overhead is 1. A value greater than 1, like 1.5 will increase the overhead with 50%, a value smaller than 1, like 0.5 will decrease the overhead with 50%.

    - -

    19. For each Squadron, which grouping will I use?

    - -

    When multiple targets are detected, how will defense airplanes be grouped when multiple defense airplanes are spawned for multiple attackers? -Per one, two, three, four?

    - -

    The default grouping is 1. That means, that each spawned defender will act individually.

    - -
    - -

    Authors: Sven Van de Velde (FlightControl) rework of GCICAP + introduction of new concepts (squadrons).

    -

    Authors: Stonehouse, SNAFU in terms of the advice, documentation, and the original GCICAP script.

    - - -

    Global(s)

    - - - - - - - - - -
    AI_A2A_DISPATCHER -

    AI_A2A_DISPATCHER class, extends Tasking#DETECTION_MANAGER

    - -

    Banner Image

    - -

    The #AIA2ADISPATCHER class is designed to create an automatic air defence system for a coalition.

    -
    AI_A2A_GCICAP -

    AI_A2A_GCICAP class, extends AIA2ADispatcher#AIA2ADISPATCHER

    - -

    Banner Image

    - -

    The AIA2AGCICAP class is designed to create an automatic air defence system for a coalition setting up GCI and CAP air defenses.

    -
    -

    Type AI_A2A_DISPATCHER

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AI_A2A_DISPATCHER:AddDefenderToSquadron(Squadron, Defender, Size) - -
    AI_A2A_DISPATCHER:CAP() -

    CAP Trigger for AIA2ADISPATCHER

    -
    AI_A2A_DISPATCHER:CanCAP(SquadronName) - -
    AI_A2A_DISPATCHER:CanGCI(SquadronName) - -
    AI_A2A_DISPATCHER:ClearDefenderTask(Defender) - -
    AI_A2A_DISPATCHER:ClearDefenderTaskTarget(Defender) - -
    AI_A2A_DISPATCHER:CountCapAirborne(SquadronName) - -
    AI_A2A_DISPATCHER:CountDefendersEngaged(AttackerDetection) - -
    AI_A2A_DISPATCHER:CountDefendersToBeEngaged(AttackerDetection, DefenderCount) - -
    AI_A2A_DISPATCHER.DefenderDefault - -
    AI_A2A_DISPATCHER.DefenderSpawns - -
    AI_A2A_DISPATCHER.DefenderSquadrons - -
    AI_A2A_DISPATCHER.DefenderTasks - -
    AI_A2A_DISPATCHER.Defenders - -
    AI_A2A_DISPATCHER.Detection - -
    AI_A2A_DISPATCHER.DisengageRadius - -
    AI_A2A_DISPATCHER:ENGAGE() -

    ENGAGE Trigger for AIA2ADISPATCHER

    -
    AI_A2A_DISPATCHER:EvaluateENGAGE(DetectedItem) -

    Creates an ENGAGE task when there are human friendlies airborne near the targets.

    -
    AI_A2A_DISPATCHER:EvaluateGCI(DetectedItem) -

    Creates an GCI task when there are targets for it.

    -
    AI_A2A_DISPATCHER:EvaluateSWEEP(DetectedItem) -

    Creates an SWEEP task when there are targets for it.

    -
    AI_A2A_DISPATCHER:GCI() -

    GCI Trigger for AIA2ADISPATCHER

    -
    AI_A2A_DISPATCHER.GciRadius - -
    AI_A2A_DISPATCHER:GetAIFriendliesNearBy(DetectedItem) -

    Calculates which AI friendlies are nearby the area

    -
    AI_A2A_DISPATCHER:GetCAPDelay(SquadronName) - -
    AI_A2A_DISPATCHER:GetDefaultLanding() -

    Gets the default method at which flights will land and despawn as part of the defense system.

    -
    AI_A2A_DISPATCHER:GetDefaultTakeoff() -

    Gets the default method at which new flights will spawn and take-off as part of the defense system.

    -
    AI_A2A_DISPATCHER:GetDefenderTask(Defender) - -
    AI_A2A_DISPATCHER:GetDefenderTaskFsm(Defender) - -
    AI_A2A_DISPATCHER:GetDefenderTaskSquadronName(Defender) - -
    AI_A2A_DISPATCHER:GetDefenderTaskTarget(Defender) - -
    AI_A2A_DISPATCHER:GetDefenderTasks() - -
    AI_A2A_DISPATCHER:GetFriendliesNearBy(DetectedItem, Target) -

    Calculates which friendlies are nearby the area

    -
    AI_A2A_DISPATCHER:GetPlayerFriendliesNearBy(DetectedItem) -

    Calculates which HUMAN friendlies are nearby the area

    -
    AI_A2A_DISPATCHER:GetSquadron(SquadronName) -

    Get an item from the Squadron table.

    -
    AI_A2A_DISPATCHER:GetSquadronFromDefender(Defender) - -
    AI_A2A_DISPATCHER:GetSquadronLanding(SquadronName) -

    Gets the method at which flights will land and despawn as part of the defense system.

    -
    AI_A2A_DISPATCHER:GetSquadronTakeoff(SquadronName) -

    Gets the method at which new flights will spawn and take-off as part of the defense system.

    -
    AI_A2A_DISPATCHER.Landing -

    Defnes Landing location.

    -
    AI_A2A_DISPATCHER:New(Detection) -

    AIA2ADISPATCHER constructor.

    -
    AI_A2A_DISPATCHER:OnAfterAssign(From, Event, To, Task, TaskUnit, PlayerName) -

    OnAfter Transition Handler for Event Assign.

    -
    AI_A2A_DISPATCHER:OnAfterCAP(From, Event, To) -

    CAP Handler OnAfter for AIA2ADISPATCHER

    -
    AI_A2A_DISPATCHER:OnAfterENGAGE(From, Event, To) -

    ENGAGE Handler OnAfter for AIA2ADISPATCHER

    -
    AI_A2A_DISPATCHER:OnAfterGCI(From, Event, To) -

    GCI Handler OnAfter for AIA2ADISPATCHER

    -
    AI_A2A_DISPATCHER:OnBeforeCAP(From, Event, To) -

    CAP Handler OnBefore for AIA2ADISPATCHER

    -
    AI_A2A_DISPATCHER:OnBeforeENGAGE(From, Event, To) -

    ENGAGE Handler OnBefore for AIA2ADISPATCHER

    -
    AI_A2A_DISPATCHER:OnBeforeGCI(From, Event, To) -

    GCI Handler OnBefore for AIA2ADISPATCHER

    -
    AI_A2A_DISPATCHER:OnEventCrashOrDead(EventData) - -
    AI_A2A_DISPATCHER:OnEventEngineShutdown(EventData) - -
    AI_A2A_DISPATCHER:OnEventLand(EventData) - -
    AI_A2A_DISPATCHER:ProcessDetected(Detection) -

    Assigns A2A AI Tasks in relation to the detected items.

    -
    AI_A2A_DISPATCHER:RemoveDefenderFromSquadron(Squadron, Defender) - -
    AI_A2A_DISPATCHER.SchedulerCAP(AI_A2A_DISPATCHER, SquadronName, self) - -
    AI_A2A_DISPATCHER:SetBorderZone(BorderZone) -

    Define a border area to simulate a cold war scenario.

    -
    AI_A2A_DISPATCHER:SetDefaultCapLimit(CapLimit) -

    Set the default CAP limit for squadrons, which will be used to determine how many CAP can be airborne at the same time for the squadron.

    -
    AI_A2A_DISPATCHER:SetDefaultCapTimeInterval(CapMinSeconds, CapMaxSeconds) -

    Set the default CAP time interval for squadrons, which will be used to determine a random CAP timing.

    -
    AI_A2A_DISPATCHER:SetDefaultDamageThreshold(DamageThreshold) -

    Set the default damage treshold when defenders will RTB.

    -
    AI_A2A_DISPATCHER:SetDefaultFuelThreshold(FuelThreshold) -

    Set the default fuel treshold when defenders will RTB or Refuel in the air.

    -
    AI_A2A_DISPATCHER:SetDefaultGrouping(Grouping) -

    Sets the default grouping of new airplanes spawned.

    -
    AI_A2A_DISPATCHER:SetDefaultLanding(Landing) -

    Defines the default method at which flights will land and despawn as part of the defense system.

    -
    AI_A2A_DISPATCHER:SetDefaultLandingAtEngineShutdown() -

    Sets flights by default to land and despawn at engine shutdown, as part of the defense system.

    -
    AI_A2A_DISPATCHER:SetDefaultLandingAtRunway() -

    Sets flights by default to land and despawn at the runway, as part of the defense system.

    -
    AI_A2A_DISPATCHER:SetDefaultLandingNearAirbase() -

    Sets flights by default to land and despawn near the airbase in the air, as part of the defense system.

    -
    AI_A2A_DISPATCHER:SetDefaultOverhead(Overhead) -

    Defines the default amount of extra planes that will take-off as part of the defense system.

    -
    AI_A2A_DISPATCHER:SetDefaultTakeoff(Takeoff) -

    Defines the default method at which new flights will spawn and take-off as part of the defense system.

    -
    AI_A2A_DISPATCHER:SetDefaultTakeoffFromParkingCold() -

    Sets flights to by default take-off from the airbase at a cold location, as part of the defense system.

    -
    AI_A2A_DISPATCHER:SetDefaultTakeoffFromParkingHot() -

    Sets flights by default to take-off from the airbase at a hot location, as part of the defense system.

    -
    AI_A2A_DISPATCHER:SetDefaultTakeoffFromRunway() -

    Sets flights by default to take-off from the runway, as part of the defense system.

    -
    AI_A2A_DISPATCHER:SetDefaultTakeoffInAir() -

    Sets flights to default take-off in the air, as part of the defense system.

    -
    AI_A2A_DISPATCHER:SetDefaultTakeoffInAirAltitude(TakeoffAltitude) -

    Defines the default altitude where airplanes will spawn in the air and take-off as part of the defense system, when the take-off in the air method has been selected.

    -
    AI_A2A_DISPATCHER:SetDefaultTanker(TankerName) -

    Set the default tanker where defenders will Refuel in the air.

    -
    AI_A2A_DISPATCHER:SetDefenderTask(SquadronName, Defender, Type, Fsm, Target) - -
    AI_A2A_DISPATCHER:SetDefenderTaskTarget(AIGroup, Defender, AttackerDetection) - -
    AI_A2A_DISPATCHER:SetDisengageRadius(DisengageRadius) -

    Define the radius to disengage any target when the distance to the home base is larger than the specified meters.

    -
    AI_A2A_DISPATCHER:SetEngageRadius(EngageRadius) -

    Define the radius to engage any target by airborne friendlies, which are executing cap or returning from an intercept mission.

    -
    AI_A2A_DISPATCHER:SetGciRadius(GciRadius) -

    Define the radius to check if a target can be engaged by an ground controlled intercept.

    -
    AI_A2A_DISPATCHER:SetIntercept(InterceptDelay) - -
    AI_A2A_DISPATCHER:SetSquadron(SquadronName, AirbaseName, TemplatePrefixes, Resources) -

    This is the main method to define Squadrons programmatically.

    -
    AI_A2A_DISPATCHER:SetSquadronCap(SquadronName, Zone, FloorAltitude, CeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageMinSpeed, EngageMaxSpeed, AltType) -

    Set a CAP for a Squadron.

    -
    AI_A2A_DISPATCHER:SetSquadronCapInterval(SquadronName, CapLimit, LowInterval, HighInterval, Probability) -

    Set the squadron CAP parameters.

    -
    AI_A2A_DISPATCHER:SetSquadronFuelThreshold(SquadronName, FuelThreshold) -

    Set the fuel treshold for the squadron when defenders will RTB or Refuel in the air.

    -
    AI_A2A_DISPATCHER:SetSquadronGci(SquadronName, EngageMinSpeed, EngageMaxSpeed) - -
    AI_A2A_DISPATCHER:SetSquadronGrouping(SquadronName, Grouping) -

    Sets the grouping of new airplanes spawned.

    -
    AI_A2A_DISPATCHER:SetSquadronLanding(SquadronName, Landing) -

    Defines the method at which flights will land and despawn as part of the defense system.

    -
    AI_A2A_DISPATCHER:SetSquadronLandingAtEngineShutdown(SquadronName) -

    Sets flights to land and despawn at engine shutdown, as part of the defense system.

    -
    AI_A2A_DISPATCHER:SetSquadronLandingAtRunway(SquadronName) -

    Sets flights to land and despawn at the runway, as part of the defense system.

    -
    AI_A2A_DISPATCHER:SetSquadronLandingNearAirbase(SquadronName) -

    Sets flights to land and despawn near the airbase in the air, as part of the defense system.

    -
    AI_A2A_DISPATCHER:SetSquadronOverhead(SquadronName, Overhead) -

    Defines the amount of extra planes that will take-off as part of the defense system.

    -
    AI_A2A_DISPATCHER:SetSquadronTakeoff(SquadronName, Takeoff) -

    Defines the method at which new flights will spawn and take-off as part of the defense system.

    -
    AI_A2A_DISPATCHER:SetSquadronTakeoffFromParkingCold(SquadronName) -

    Sets flights to take-off from the airbase at a cold location, as part of the defense system.

    -
    AI_A2A_DISPATCHER:SetSquadronTakeoffFromParkingHot(SquadronName) -

    Sets flights to take-off from the airbase at a hot location, as part of the defense system.

    -
    AI_A2A_DISPATCHER:SetSquadronTakeoffFromRunway(SquadronName) -

    Sets flights to take-off from the runway, as part of the defense system.

    -
    AI_A2A_DISPATCHER:SetSquadronTakeoffInAir(SquadronName, TakeoffAltitude) -

    Sets flights to take-off in the air, as part of the defense system.

    -
    AI_A2A_DISPATCHER:SetSquadronTakeoffInAirAltitude(SquadronName, TakeoffAltitude) -

    Defines the default altitude where airplanes will spawn in the air and take-off as part of the defense system, when the take-off in the air method has been selected.

    -
    AI_A2A_DISPATCHER:SetSquadronTanker(SquadronName, TankerName) -

    Set the squadron tanker where defenders will Refuel in the air.

    -
    AI_A2A_DISPATCHER:SetTacticalDisplay(TacticalDisplay) -

    Display a tactical report every 30 seconds about which aircraft are: - * Patrolling - * Engaging - * Returning - * Damaged - * Out of Fuel - * ...

    -
    AI_A2A_DISPATCHER.TacticalDisplay - -
    AI_A2A_DISPATCHER.Takeoff - -
    AI_A2A_DISPATCHER:__CAP(Delay) -

    CAP Asynchronous Trigger for AIA2ADISPATCHER

    -
    AI_A2A_DISPATCHER:__ENGAGE(Delay) -

    ENGAGE Asynchronous Trigger for AIA2ADISPATCHER

    -
    AI_A2A_DISPATCHER:__GCI(Delay) -

    GCI Asynchronous Trigger for AIA2ADISPATCHER

    -
    AI_A2A_DISPATCHER:onafterCAP(From, Event, To, SquadronName) - -
    AI_A2A_DISPATCHER:onafterENGAGE(From, Event, To, AttackerDetection, Defenders) - -
    AI_A2A_DISPATCHER:onafterGCI(From, Event, To, AttackerDetection, DefendersMissing, DefenderFriendlies) - -
    - -

    Type AI_A2A_GCICAP

    - - - - - - - - - - - - - - - - - -
    AI_A2A_GCICAP.CAPTemplates - -
    AI_A2A_GCICAP:New(EWRPrefixes, TemplatePrefixes, CapPrefixes, CapLimit, GroupingRadius, EngageRadius, GciRadius, Resources) -

    AIA2AGCICAP constructor.

    -
    AI_A2A_GCICAP:NewWithBorder(EWRPrefixes, TemplatePrefixes, BorderPrefix, CapPrefixes, CapLimit, GroupingRadius, EngageRadius, GciRadius, Resources) -

    AIA2AGCICAP constructor with border.

    -
    AI_A2A_GCICAP.Templates - -
    - -

    Global(s)

    -
    -
    - - #AI_A2A_DISPATCHER - -AI_A2A_DISPATCHER - -
    -
    - -

    AI_A2A_DISPATCHER class, extends Tasking#DETECTION_MANAGER

    - -

    Banner Image

    - -

    The #AIA2ADISPATCHER class is designed to create an automatic air defence system for a coalition.

    - - - -
    - -

    Demo Missions

    - -

    AI_A2A_DISPATCHER Demo Missions

    - -
    - -

    YouTube Channel

    - -

    DCS WORLD - MOOSE - A2A GCICAP - Build an automatic A2A Defense System

    - -
    - -

    Banner Image

    - -

    It includes automatic spawning of Combat Air Patrol aircraft (CAP) and Ground Controlled Intercept aircraft (GCI) in response to enemy air movements that are detected by a ground based radar network. -CAP flights will take off and proceed to designated CAP zones where they will remain on station until the ground radars direct them to intercept detected enemy aircraft or they run short of fuel and must return to base (RTB). When a CAP flight leaves their zone to perform an interception or return to base a new CAP flight will spawn to take their place. -If all CAP flights are engaged or RTB then additional GCI interceptors will scramble to intercept unengaged enemy aircraft under ground radar control. -With a little time and with a little work it provides the mission designer with a convincing and completely automatic air defence system. -In short it is a plug in very flexible and configurable air defence module for DCS World.

    - -

    Note that in order to create a two way A2A defense system, two AI_A2A_DISPATCHER defense system may need to be created, for each coalition one. -This is a good implementation, because maybe in the future, more coalitions may become available in DCS world.

    - -
    - -

    USAGE GUIDE

    - -

    1. AI_A2A_DISPATCHER constructor:

    - -

    Banner Image

    - - -

    The AIA2ADISPATCHER.New() method creates a new AI_A2A_DISPATCHER instance.

    - -

    1.1. Define the EWR network:

    - -

    As part of the AI_A2A_DISPATCHER :New() constructor, an EWR network must be given as the first parameter. -An EWR network, or, Early Warning Radar network, is used to early detect potential airborne targets and to understand the position of patrolling targets of the enemy.

    - -

    Banner Image

    - -

    Typically EWR networks are setup using 55G6 EWR, 1L13 EWR, Hawk sr and Patriot str ground based radar units. -These radars have different ranges and 55G6 EWR and 1L13 EWR radars are Eastern Bloc units (eg Russia, Ukraine, Georgia) while the Hawk and Patriot radars are Western (eg US). -Additionally, ANY other radar capable unit can be part of the EWR network! Also AWACS airborne units, planes, helicopters can help to detect targets, as long as they have radar. -The position of these units is very important as they need to provide enough coverage -to pick up enemy aircraft as they approach so that CAP and GCI flights can be tasked to intercept them.

    - -

    Banner Image

    - -

    Additionally in a hot war situation where the border is no longer respected the placement of radars has a big effect on how fast the war escalates. -For example if they are a long way forward and can detect enemy planes on the ground and taking off -they will start to vector CAP and GCI flights to attack them straight away which will immediately draw a response from the other coalition. -Having the radars further back will mean a slower escalation because fewer targets will be detected and -therefore less CAP and GCI flights will spawn and this will tend to make just the border area active rather than a melee over the whole map. -It all depends on what the desired effect is.

    - -

    EWR networks are dynamically constructed, that is, they form part of the Functional#DETECTION_BASE object that is given as the input parameter of the AI_A2A_DISPATCHER class. -By defining in a smart way the names or name prefixes of the groups with EWR capable units, these groups will be automatically added or deleted from the EWR network, -increasing or decreasing the radar coverage of the Early Warning System.

    - -

    See the following example to setup an EWR network containing EWR stations and AWACS.

    - -

    Banner Image -Banner Image

    - -
    -- Define a SET_GROUP object that builds a collection of groups that define the EWR network.
    --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR.
    -DetectionSetGroup = SET_GROUP:New()
    -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } )
    -DetectionSetGroup:FilterStart()
    -
    --- Setup the detection and group targets to a 30km range!
    -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 )
    -
    --- Setup the A2A dispatcher, and initialize it.
    -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )
    -
    - -

    The above example creates a SET_GROUP instance, and stores this in the variable (object) DetectionSetGroup. -DetectionSetGroup is then being configured to filter all active groups with a group name starting with DF CCCP AWACS or DF CCCP EWR to be included in the Set. -DetectionSetGroup is then being ordered to start the dynamic filtering. Note that any destroy or new spawn of a group with the above names will be removed or added to the Set.

    - -

    Then a new Detection object is created from the class DETECTION_AREAS. A grouping radius of 30000 is choosen, which is 30km. -The Detection object is then passed to the AIA2ADISPATCHER.New() method to indicate the EWR network configuration and setup the A2A defense detection mechanism.

    - -

    You could build a mutual defense system like this:

    - -
    A2ADispatcher_Red = AI_A2A_DISPATCHER:New( EWR_Red )
    -A2ADispatcher_Blue = AI_A2A_DISPATCHER:New( EWR_Blue )
    -
    - -

    2. Define the detected target grouping radius:

    - -

    The target grouping radius is a property of the Detection object, that was passed to the AI_A2A_DISPATCHER object, but can be changed. -The grouping radius should not be too small, but also depends on the types of planes and the era of the simulation. -Fast planes like in the 80s, need a larger radius than WWII planes.
    -Typically I suggest to use 30000 for new generation planes and 10000 for older era aircraft.

    - -

    Note that detected targets are constantly re-grouped, that is, when certain detected aircraft are moving further than the group radius, then these aircraft will become a separate -group being detected. This may result in additional GCI being started by the dispatcher! So don't make this value too small!

    - -

    3. Set the Engage Radius:

    - -

    Define the Engage Radius to engage any target by airborne friendlies, -which are executing cap or returning from an intercept mission.

    - -

    Banner Image

    - -

    If there is a target area detected and reported, -then any friendlies that are airborne near this target area, -will be commanded to (re-)engage that target when available (if no other tasks were commanded).

    - -

    For example, if 50000 or 50km is given as a value, then any friendly that is airborne within 50km from the detected target, -will be considered to receive the command to engage that target area.

    - -

    You need to evaluate the value of this parameter carefully:

    - -
      -
    • If too small, more intercept missions may be triggered upon detected target areas.
    • -
    • If too large, any airborne cap may not be able to reach the detected target area in time, because it is too far.
    • -
    - -

    The default Engage Radius is defined as 100000 or 100km. -Use the method AIA2ADISPATCHER.SetEngageRadius() to set a specific Engage Radius. -The Engage Radius is defined for ALL squadrons which are operational.

    - -

    Demonstration Mission: AID-019 - AI_A2A - Engage Range Test

    - -

    In this example an Engage Radius is set to various values.

    - -
    -- Set 50km as the radius to engage any target by airborne friendlies.
    -A2ADispatcher:SetEngageRadius( 50000 )
    -
    --- Set 100km as the radius to engage any target by airborne friendlies.
    -A2ADispatcher:SetEngageRadius() -- 100000 is the default value.
    -
    - - -

    4. Set the Ground Controlled Intercept Radius or Gci radius:

    - -

    When targets are detected that are still really far off, you don't want the AIA2ADISPATCHER to launch intercepts just yet. -You want it to wait until a certain Gci range is reached, which is the distance of the closest airbase to target -being smaller than the Ground Controlled Intercept radius or Gci radius.

    - -

    The default Gci radius is defined as 200000 or 200km. Override the default Gci radius when the era of the warfare is early, or, -when you don't want to let the AIA2ADISPATCHER react immediately when a certain border or area is not being crossed.

    - -

    Use the method AIA2ADISPATCHER.SetGciRadius() to set a specific controlled ground intercept radius. -The Ground Controlled Intercept radius is defined for ALL squadrons which are operational.

    - -

    Demonstration Mission: AID-013 - AI_A2A - Intercept Test

    - -

    In these examples, the Gci Radius is set to various values:

    - -
    -- Now Setup the A2A dispatcher, and initialize it using the Detection object.
    -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) 
    -
    --- Set 100km as the radius to ground control intercept detected targets from the nearest airbase.
    -A2ADispatcher:SetGciRadius( 100000 )
    -
    --- Set 200km as the radius to ground control intercept.
    -A2ADispatcher:SetGciRadius() -- 200000 is the default value.
    -
    - -

    5. Set the borders:

    - -

    According to the tactical and strategic design of the mission broadly decide the shape and extent of red and blue territories. -They should be laid out such that a border area is created between the two coalitions.

    - -

    Banner Image

    - -

    Define a border area to simulate a cold war scenario. -Use the method AIA2ADISPATCHER.SetBorderZone() to create a border zone for the dispatcher.

    - -

    A cold war is one where CAP aircraft patrol their territory but will not attack enemy aircraft or launch GCI aircraft unless enemy aircraft enter their territory. In other words the EWR may detect an enemy aircraft but will only send aircraft to attack it if it crosses the border. -A hot war is one where CAP aircraft will intercept any detected enemy aircraft and GCI aircraft will launch against detected enemy aircraft without regard for territory. In other words if the ground radar can detect the enemy aircraft then it will send CAP and GCI aircraft to attack it.

    - -

    Banner Image

    - -

    If it’s a cold war then the borders of red and blue territory need to be defined using a zone object derived from Zone#ZONE_BASE. -If a hot war is chosen then no borders actually need to be defined using the helicopter units other than -it makes it easier sometimes for the mission maker to envisage where the red and blue territories roughly are. -In a hot war the borders are effectively defined by the ground based radar coverage of a coalition.

    - -

    Demonstration Mission: AID-009 - AI_A2A - Border Test

    - -

    In this example a border is set for the CCCP A2A dispatcher:

    - -

    Banner Image

    - -
    -- Setup the A2A dispatcher, and initialize it.
    -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )
    -
    --- Setup the border.
    --- Initialize the dispatcher, setting up a border zone. This is a polygon, 
    --- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area.
    --- Any enemy crossing this border will be engaged.
    -
    -CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) )
    -A2ADispatcher:SetBorderZone( CCCPBorderZone )
    -
    - -

    6. Squadrons:

    - -

    The AI_A2A_DISPATCHER works with Squadrons, that need to be defined using the different methods available.

    - -

    Use the method AIA2ADISPATCHER.SetSquadron() to setup a new squadron active at an airfield, -while defining which plane types are being used by the squadron and how many resources are available.

    - -

    Squadrons:

    - -
      -
    • Have name (string) that is the identifier or key of the squadron.
    • -
    • Have specific plane types.
    • -
    • Are located at one airbase.
    • -
    • Optionally have a limited set of resources. The default is that squadrons have unlimited resources.
    • -
    - -

    The name of the squadron given acts as the squadron key in the AI_A2A_DISPATCHER:Squadron...() methods.

    - -

    Additionally, squadrons have specific configuration options to:

    - -
      -
    • Control how new aircraft are taking off from the airfield (in the air, cold, hot, at the runway).
    • -
    • Control how returning aircraft are landing at the airfield (in the air near the airbase, after landing, after engine shutdown).
    • -
    • Control the grouping of new aircraft spawned at the airfield. If there is more than one aircraft to be spawned, these may be grouped.
    • -
    • Control the overhead or defensive strength of the squadron. Depending on the types of planes and amount of resources, the mission designer can choose to increase or reduce the amount of planes spawned.
    • -
    - -

    For performance and bug workaround reasons within DCS, squadrons have different methods to spawn new aircraft or land returning or damaged aircraft.

    - -

    This example defines a couple of squadrons. Note the templates defined within the Mission Editor.

    - -

    Banner Image -Banner Image

    - -
     -- Setup the squadrons.
    - A2ADispatcher:SetSquadron( "Mineralnye", AIRBASE.Caucasus.Mineralnye_Vody, { "SQ CCCP SU-27" }, 20 )
    - A2ADispatcher:SetSquadron( "Maykop", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP MIG-31" }, 20 )
    - A2ADispatcher:SetSquadron( "Mozdok", AIRBASE.Caucasus.Mozdok, { "SQ CCCP MIG-31" }, 20 )
    - A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27" }, 20 )
    - A2ADispatcher:SetSquadron( "Novo", AIRBASE.Caucasus.Novorossiysk, { "SQ CCCP SU-27" }, 20 )
    -
    - -

    6.1. Set squadron take-off methods

    - -

    Use the various SetSquadronTakeoff... methods to control how squadrons are taking-off from the airfield:

    - - - -

    The default landing method is to spawn new aircraft directly in the air.

    - -

    Use these methods to fine-tune for specific airfields that are known to create bottlenecks, or have reduced airbase efficiency. -The more and the longer aircraft need to taxi at an airfield, the more risk there is that:

    - -
      -
    • aircraft will stop waiting for each other or for a landing aircraft before takeoff.
    • -
    • aircraft may get into a "dead-lock" situation, where two aircraft are blocking each other.
    • -
    • aircraft may collide at the airbase.
    • -
    • aircraft may be awaiting the landing of a plane currently in the air, but never lands ...
    • -
    - -

    Currently within the DCS engine, the airfield traffic coordination is erroneous and contains a lot of bugs. -If you experience while testing problems with aircraft take-off or landing, please use one of the above methods as a solution to workaround these issues!

    - -

    This example sets the default takeoff method to be from the runway. -And for a couple of squadrons overrides this default method.

    - -
     -- Setup the Takeoff methods
    -
    - -- The default takeoff
    - A2ADispatcher:SetDefaultTakeOffFromRunway()
    -
    - -- The individual takeoff per squadron
    - A2ADispatcher:SetSquadronTakeoff( "Mineralnye", AI_A2A_DISPATCHER.Takeoff.Air )
    - A2ADispatcher:SetSquadronTakeoffInAir( "Sochi" )
    - A2ADispatcher:SetSquadronTakeoffFromRunway( "Mozdok" )
    - A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Maykop" )
    - A2ADispatcher:SetSquadronTakeoffFromParkingHot( "Novo" )  
    -
    - - -

    6.1. Set Squadron takeoff altitude when spawning new aircraft in the air.

    - -

    In the case of the AIA2ADISPATCHER.SetSquadronTakeoffInAir() there is also an other parameter that can be applied. -That is modifying or setting the altitude from where planes spawn in the air. -Use the method AIA2ADISPATCHER.SetSquadronTakeoffInAirAltitude() to set the altitude for a specific squadron. -The default takeoff altitude can be modified or set using the method AIA2ADISPATCHER.SetSquadronTakeoffInAirAltitude(). -As part of the method AIA2ADISPATCHER.SetSquadronTakeoffInAir() a parameter can be specified to set the takeoff altitude. -If this parameter is not specified, then the default altitude will be used for the squadron.

    - -

    6.2. Set squadron landing methods

    - -

    In analogy with takeoff, the landing methods are to control how squadrons land at the airfield:

    - - - -

    You can use these methods to minimize the airbase coodination overhead and to increase the airbase efficiency. -When there are lots of aircraft returning for landing, at the same airbase, the takeoff process will be halted, which can cause a complete failure of the -A2A defense system, as no new CAP or GCI planes can takeoff. -Note that the method AIA2ADISPATCHER.SetSquadronLandingNearAirbase() will only work for returning aircraft, not for damaged or out of fuel aircraft. -Damaged or out-of-fuel aircraft are returning to the nearest friendly airbase and will land, and are out of control from ground control.

    - -

    This example defines the default landing method to be at the runway. -And for a couple of squadrons overrides this default method.

    - -
     -- Setup the Landing methods
    -
    - -- The default landing method
    - A2ADispatcher:SetDefaultLandingAtRunway()
    -
    - -- The individual landing per squadron
    - A2ADispatcher:SetSquadronLandingAtRunway( "Mineralnye" )
    - A2ADispatcher:SetSquadronLandingNearAirbase( "Sochi" )
    - A2ADispatcher:SetSquadronLandingAtEngineShutdown( "Mozdok" )
    - A2ADispatcher:SetSquadronLandingNearAirbase( "Maykop" )
    - A2ADispatcher:SetSquadronLanding( "Novo", AI_A2A_DISPATCHER.Landing.AtRunway )
    -
    - - -

    6.3. Set squadron grouping

    - -

    Use the method AIA2ADISPATCHER.SetSquadronGrouping() to set the grouping of CAP or GCI flights that will take-off when spawned.

    - -

    Banner Image

    - -

    In the case of GCI, the AIA2ADISPATCHER.SetSquadronGrouping() method has additional behaviour. When there aren't enough CAP flights airborne, a GCI will be initiated for the remaining -targets to be engaged. Depending on the grouping parameter, the spawned flights for GCI are grouped into this setting.
    -For example with a group setting of 2, if 3 targets are detected and cannot be engaged by CAP or any airborne flight, -a GCI needs to be started, the GCI flights will be grouped as follows: Group 1 of 2 flights and Group 2 of one flight!

    - -

    Even more ... If one target has been detected, and the overhead is 1.5, grouping is 1, then two groups of planes will be spawned, with one unit each!

    - -

    The grouping value is set for a Squadron, and can be dynamically adjusted during mission execution, so to adjust the defense flights grouping when the tactical situation changes.

    - -

    6.4. Overhead and Balance the effectiveness of the air defenses in case of GCI.

    - -

    The effectiveness can be set with the overhead parameter. This is a number that is used to calculate the amount of Units that dispatching command will allocate to GCI in surplus of detected amount of units. -The default value of the overhead parameter is 1.0, which means equal balance.

    - -

    Banner Image

    - -

    However, depending on the (type of) aircraft (strength and payload) in the squadron and the amount of resources available, this parameter can be changed.

    - -

    The AIA2ADISPATCHER.SetSquadronOverhead() method can be used to tweak the defense strength, -taking into account the plane types of the squadron.

    - -

    For example, a MIG-31 with full long-distance A2A missiles payload, may still be less effective than a F-15C with short missiles... -So in this case, one may want to use the AIA2ADISPATCHER.SetOverhead() method to allocate more defending planes as the amount of detected attacking planes. -The overhead must be given as a decimal value with 1 as the neutral value, which means that overhead values:

    - -
      -
    • Higher than 1.0, for example 1.5, will increase the defense unit amounts. For 4 planes detected, 6 planes will be spawned.
    • -
    • Lower than 1, for example 0.75, will decrease the defense unit amounts. For 4 planes detected, only 3 planes will be spawned.
    • -
    - -

    The amount of defending units is calculated by multiplying the amount of detected attacking planes as part of the detected group -multiplied by the Overhead and rounded up to the smallest integer.

    - -

    For example ... If one target has been detected, and the overhead is 1.5, grouping is 1, then two groups of planes will be spawned, with one unit each!

    - -

    The overhead value is set for a Squadron, and can be dynamically adjusted during mission execution, so to adjust the defense overhead when the tactical situation changes.

    - -

    6.5. Squadron fuel treshold.

    - -

    When an airplane gets out of fuel to a certain %-tage, which is by default 15% (0.15), there are two possible actions that can be taken: - - The defender will go RTB, and will be replaced with a new defender if possible. - - The defender will refuel at a tanker, if a tanker has been specified for the squadron.

    - -

    Use the method AIA2ADISPATCHER.SetSquadronFuelThreshold() to set the squadron fuel treshold of spawned airplanes for all squadrons.

    - -

    7. Setup a squadron for CAP

    - -

    7.1. Set the CAP zones

    - -

    CAP zones are patrol areas where Combat Air Patrol (CAP) flights loiter until they either return to base due to low fuel or are assigned an interception task by ground control.

    - -

    Banner Image

    - -
      -
    • As the CAP flights wander around within the zone waiting to be tasked, these zones need to be large enough that the aircraft are not constantly turning - but do not have to be big and numerous enough to completely cover a border.

    • -
    • CAP zones can be of any type, and are derived from the Zone#ZONE_BASE class. Zones can be Zone#ZONE, Zone#ZONE_POLYGON, Zone#ZONE_UNIT, Zone#ZONE_GROUP, etc. - This allows to setup static, moving and/or complex zones wherein aircraft will perform the CAP.

    • -
    • Typically 20000-50000 metres width is used and they are spaced so that aircraft in the zone waiting for tasks don’t have to far to travel to protect their coalitions important targets. - These targets are chosen as part of the mission design and might be an important airfield or town etc. - Zone size is also determined somewhat by territory size, plane types - (eg WW2 aircraft might mean smaller zones or more zones because they are slower and take longer to intercept enemy aircraft).

    • -
    • In a cold war it is important to make sure a CAP zone doesn’t intrude into enemy territory as otherwise CAP flights will likely cross borders - and spark a full scale conflict which will escalate rapidly.

    • -
    • CAP flights do not need to be in the CAP zone before they are “on station” and ready for tasking.

    • -
    • Typically if a CAP flight is tasked and therefore leaves their zone empty while they go off and intercept their target another CAP flight will spawn to take their place.

    • -
    - -

    Banner Image

    - -

    The following example illustrates how CAP zones are coded:

    - -

    Banner Image

    - -
     -- CAP Squadron execution.
    - CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) )
    - A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 )
    - A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 )
    -
    - -

    Banner Image

    - -
     CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) )
    - A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" )
    - A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
    -
    - -

    Banner Image

    - -
     CAPZoneMiddle = ZONE:New( "CAP Zone Middle")
    - A2ADispatcher:SetSquadronCap( "Maykop", CAPZoneMiddle, 4000, 8000, 600, 800, 800, 1200, "RADIO" )
    - A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
    -
    - -

    Note the different Zone MOOSE classes being used to create zones of different types. Please click the Zone link for more information about the different zone types. -Zones can be circles, can be setup in the mission editor using trigger zones, but can also be setup in the mission editor as polygons and in this case GROUP objects are being used!

    - -

    7.2. Set the squadron to execute CAP:

    - -

    The method AIA2ADISPATCHER.SetSquadronCap() defines a CAP execution for a squadron.

    - -

    Setting-up a CAP zone also requires specific parameters:

    - -
      -
    • The minimum and maximum altitude
    • -
    • The minimum speed and maximum patrol speed
    • -
    • The minimum and maximum engage speed
    • -
    • The type of altitude measurement
    • -
    - -

    These define how the squadron will perform the CAP while partrolling. Different terrain types requires different types of CAP.

    - -

    The AIA2ADISPATCHER.SetSquadronCapInterval() method specifies how much and when CAP flights will takeoff.

    - -

    It is recommended not to overload the air defense with CAP flights, as these will decrease the performance of the overall system.

    - -

    For example, the following setup will create a CAP for squadron "Sochi":

    - -
     A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" )
    - A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
    -
    - -

    7.3. Squadron tanker to refuel when executing CAP and defender is out of fuel.

    - -

    Instead of sending CAP to RTB when out of fuel, you can let CAP refuel in mid air using a tanker. -This greatly increases the efficiency of your CAP operations.

    - -

    In the mission editor, setup a group with task Refuelling. A tanker unit of the correct coalition will be automatically selected. -Then, use the method AIA2ADISPATCHER.SetDefaultTanker() to set the default tanker for the refuelling. -You can also specify a specific tanker for refuelling for a squadron by using the method AIA2ADISPATCHER.SetSquadronTanker().

    - -

    When the tanker specified is alive and in the air, the tanker will be used for refuelling.

    - -

    For example, the following setup will create a CAP for squadron "Gelend" with a refuel task for the squadron:

    - -

    Banner Image

    - -
     -- Define the CAP
    - A2ADispatcher:SetSquadron( "Gelend", AIRBASE.Caucasus.Gelendzhik, { "SQ CCCP SU-30" }, 20 )
    - A2ADispatcher:SetSquadronCap( "Gelend", ZONE:New( "PatrolZoneGelend" ), 4000, 8000, 600, 800, 1000, 1300 )
    - A2ADispatcher:SetSquadronCapInterval( "Gelend", 2, 30, 600, 1 ) 
    - A2ADispatcher:SetSquadronGci( "Gelend", 900, 1200 )
    -
    - -- Setup the Refuelling for squadron "Gelend", at tanker (group) "TankerGelend" when the fuel in the tank of the CAP defenders is less than 80%.
    - A2ADispatcher:SetSquadronFuelThreshold( "Gelend", 0.8 )
    - A2ADispatcher:SetSquadronTanker( "Gelend", "TankerGelend" )
    -
    - -

    8. Setup a squadron for GCI:

    - -

    The method AIA2ADISPATCHER.SetSquadronGci() defines a GCI execution for a squadron.

    - -

    Setting-up a GCI readiness also requires specific parameters:

    - -
      -
    • The minimum speed and maximum patrol speed
    • -
    - -

    Essentially this controls how many flights of GCI aircraft can be active at any time. -Note allowing large numbers of active GCI flights can adversely impact mission performance on low or medium specification hosts/servers. -GCI needs to be setup at strategic airbases. Too far will mean that the aircraft need to fly a long way to reach the intruders, -too short will mean that the intruders may have alraedy passed the ideal interception point!

    - -

    For example, the following setup will create a GCI for squadron "Sochi":

    - -
     A2ADispatcher:SetSquadronGci( "Mozdok", 900, 1200 )
    -
    - -

    9. Other configuration options

    - -

    9.1. Set a tactical display panel:

    - -

    Every 30 seconds, a tactical display panel can be shown that illustrates what the status is of the different groups controlled by AI_A2A_DISPATCHER. -Use the method AIA2ADISPATCHER.SetTacticalDisplay() to switch on the tactical display panel. The default will not show this panel. -Note that there may be some performance impact if this panel is shown.

    - -

    10. Defaults settings.

    - -

    This provides a good overview of the different parameters that are setup or hardcoded by default. -For some default settings, a method is available that allows you to tweak the defaults.

    - -

    10.1. Default takeoff method.

    - -

    The default takeoff method is set to in the air, which means that new spawned airplanes will be spawned directly in the air above the airbase by default.

    - -

    The default takeoff method can be set for ALL squadrons that don't have an individual takeoff method configured.

    - - - -

    10.2. Default landing method.

    - -

    The default landing method is set to near the airbase, which means that returning airplanes will be despawned directly in the air by default.

    - -

    The default landing method can be set for ALL squadrons that don't have an individual landing method configured.

    - - - -

    10.3. Default overhead.

    - -

    The default overhead is set to 1. That essentially means that there isn't any overhead set by default.

    - -

    The default overhead value can be set for ALL squadrons that don't have an individual overhead value configured.

    - -

    Use the AIA2ADISPATCHER.SetDefaultOverhead() method can be used to set the default overhead or defense strength for ALL squadrons.

    - -

    10.4. Default grouping.

    - -

    The default grouping is set to one airplane. That essentially means that there won't be any grouping applied by default.

    - -

    The default grouping value can be set for ALL squadrons that don't have an individual grouping value configured.

    - -

    Use the method AIA2ADISPATCHER.SetDefaultGrouping() to set the default grouping of spawned airplanes for all squadrons.

    - -

    10.5. Default RTB fuel treshold.

    - -

    When an airplane gets out of fuel to a certain %-tage, which is 15% (0.15), it will go RTB, and will be replaced with a new airplane when applicable.

    - -

    Use the method AIA2ADISPATCHER.SetDefaultFuelThreshold() to set the default fuel treshold of spawned airplanes for all squadrons.

    - -

    10.6. Default RTB damage treshold.

    - -

    When an airplane is damaged to a certain %-tage, which is 40% (0.40), it will go RTB, and will be replaced with a new airplane when applicable.

    - -

    Use the method AIA2ADISPATCHER.SetDefaultDamageThreshold() to set the default damage treshold of spawned airplanes for all squadrons.

    - -

    10.7. Default settings for CAP.

    - -

    10.7.1. Default CAP Time Interval.

    - -

    CAP is time driven, and will evaluate in random time intervals if a new CAP needs to be spawned. -The default CAP time interval is between 180 and 600 seconds.

    - -

    Use the method AIA2ADISPATCHER.SetDefaultCapTimeInterval() to set the default CAP time interval of spawned airplanes for all squadrons.
    -Note that you can still change the CAP limit and CAP time intervals for each CAP individually using the AIA2ADISPATCHER.SetSquadronCapTimeInterval() method.

    - -

    10.7.2. Default CAP limit.

    - -

    Multiple CAP can be airborne at the same time for one squadron, which is controlled by the CAP limit. -The default CAP limit is 1 CAP per squadron to be airborne at the same time. -Note that the default CAP limit is used when a Squadron CAP is defined, and cannot be changed afterwards. -So, ensure that you set the default CAP limit before you spawn the Squadron CAP.

    - -

    Use the method AIA2ADISPATCHER.SetDefaultCapTimeInterval() to set the default CAP time interval of spawned airplanes for all squadrons.
    -Note that you can still change the CAP limit and CAP time intervals for each CAP individually using the AIA2ADISPATCHER.SetSquadronCapTimeInterval() method.

    - -

    10.7.3. Default tanker for refuelling when executing CAP.

    - -

    Instead of sending CAP to RTB when out of fuel, you can let CAP refuel in mid air using a tanker. -This greatly increases the efficiency of your CAP operations.

    - -

    In the mission editor, setup a group with task Refuelling. A tanker unit of the correct coalition will be automatically selected. -Then, use the method AIA2ADISPATCHER.SetDefaultTanker() to set the tanker for the dispatcher. -Use the method AIA2ADISPATCHER.SetDefaultFuelTreshold() to set the %-tage left in the defender airplane tanks when a refuel action is needed.

    - -

    When the tanker specified is alive and in the air, the tanker will be used for refuelling.

    - -

    For example, the following setup will set the default refuel tanker to "Tanker":

    - -

    Banner Image

    - -
     -- Define the CAP
    - A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-34" }, 20 )
    - A2ADispatcher:SetSquadronCap( "Sochi", ZONE:New( "PatrolZone" ), 4000, 8000, 600, 800, 1000, 1300 )
    - A2ADispatcher:SetSquadronCapInterval("Sochi", 2, 30, 600, 1 ) 
    - A2ADispatcher:SetSquadronGci( "Sochi", 900, 1200 )
    -
    - -- Set the default tanker for refuelling to "Tanker", when the default fuel treshold has reached 90% fuel left.
    - A2ADispatcher:SetDefaultFuelThreshold( 0.9 )
    - A2ADispatcher:SetDefaultTanker( "Tanker" )
    -
    - -

    10.8. Default settings for GCI.

    - -

    10.8.1. Optimal intercept point calculation.

    - -

    When intruders are detected, the intrusion path of the attackers can be monitored by the EWR.
    -Although defender planes might be on standby at the airbase, it can still take some time to get the defenses up in the air if there aren't any defenses airborne. -This time can easily take 2 to 3 minutes, and even then the defenders still need to fly towards the target, which takes also time.

    - -

    Therefore, an optimal intercept point is calculated which takes a couple of parameters:

    - -
      -
    • The average bearing of the intruders for an amount of seconds.
    • -
    • The average speed of the intruders for an amount of seconds.
    • -
    • An assumed time it takes to get planes operational at the airbase.
    • -
    - -

    The intercept point will determine:

    - -
      -
    • If there are any friendlies close to engage the target. These can be defenders performing CAP or defenders in RTB.
    • -
    • The optimal airbase from where defenders will takeoff for GCI.
    • -
    - -

    Use the method AIA2ADISPATCHER.SetIntercept() to modify the assumed intercept delay time to calculate a valid interception.

    - -

    10.8.2. Default Disengage Radius.

    - -

    The radius to disengage any target when the distance of the defender to the home base is larger than the specified meters. -The default Disengage Radius is 300km (300000 meters). Note that the Disengage Radius is applicable to ALL squadrons!

    - -

    Use the method AIA2ADISPATCHER.SetDisengageRadius() to modify the default Disengage Radius to another distance setting.

    - - -

    11. Q & A:

    - -

    11.1. Which countries will be selected for each coalition?

    - -

    Which countries are assigned to a coalition influences which units are available to the coalition. -For example because the mission calls for a EWR radar on the blue side the Ukraine might be chosen as a blue country -so that the 55G6 EWR radar unit is available to blue.
    -Some countries assign different tasking to aircraft, for example Germany assigns the CAP task to F-4E Phantoms but the USA does not.
    -Therefore if F4s are wanted as a coalition’s CAP or GCI aircraft Germany will need to be assigned to that coalition.

    - -

    11.2. Country, type, load out, skill and skins for CAP and GCI aircraft?

    - -
      -
    • Note these can be from any countries within the coalition but must be an aircraft with one of the main tasks being “CAP”.
    • -
    • Obviously skins which are selected must be available to all players that join the mission otherwise they will see a default skin.
    • -
    • Load outs should be appropriate to a CAP mission eg perhaps drop tanks for CAP flights and extra missiles for GCI flights.
    • -
    • These decisions will eventually lead to template aircraft units being placed as late activation units that the script will use as templates for spawning CAP and GCI flights. Up to 4 different aircraft configurations can be chosen for each coalition. The spawned aircraft will inherit the characteristics of the template aircraft.
    • -
    • The selected aircraft type must be able to perform the CAP tasking for the chosen country.
    • -
    - - - -
    -
    -
    -
    - - #AI_A2A_GCICAP - -AI_A2A_GCICAP - -
    -
    - -

    AI_A2A_GCICAP class, extends AIA2ADispatcher#AIA2ADISPATCHER

    - -

    Banner Image

    - -

    The AIA2AGCICAP class is designed to create an automatic air defence system for a coalition setting up GCI and CAP air defenses.

    - - -

    The class derives from AI#AIA2ADISPATCHER and thus, all the methods that are defined in the AI#AIA2ADISPATCHER class, can be used also in AI_A2A_GCICAP.

    - -
    - -

    Demo Missions

    - -

    AI_A2A_GCICAP for Caucasus

    -

    AI_A2A_GCICAP for NTTR

    -

    AI_A2A_GCICAP for Normandy

    - -

    AI_A2A_GCICAP for beta testers

    - -
    - -

    YouTube Channel

    - -

    DCS WORLD - MOOSE - A2A GCICAP - Build an automatic A2A Defense System

    - -
    - -

    Banner Image

    - -

    AI_A2A_GCICAP includes automatic spawning of Combat Air Patrol aircraft (CAP) and Ground Controlled Intercept aircraft (GCI) in response to enemy -air movements that are detected by an airborne or ground based radar network.

    - -

    With a little time and with a little work it provides the mission designer with a convincing and completely automatic air defence system.

    - -

    The AIA2AGCICAP provides a lightweight configuration method using the mission editor. Within a very short time, and with very little coding, -the mission designer is able to configure a complete A2A defense system for a coalition using the DCS Mission Editor available functions. -Using the DCS Mission Editor, you define borders of the coalition which are guarded by GCICAP, -configure airbases to belong to the coalition, define squadrons flying certain types of planes or payloads per airbase, and define CAP zones. -Very little lua needs to be applied, a one liner, which is fully explained below, which can be embedded -right in a DO SCRIPT trigger action or in a larger DO SCRIPT FILE trigger action.

    - -

    CAP flights will take off and proceed to designated CAP zones where they will remain on station until the ground radars direct them to intercept -detected enemy aircraft or they run short of fuel and must return to base (RTB).

    - -

    When a CAP flight leaves their zone to perform a GCI or return to base a new CAP flight will spawn to take its place. -If all CAP flights are engaged or RTB then additional GCI interceptors will scramble to intercept unengaged enemy aircraft under ground radar control.

    - -

    In short it is a plug in very flexible and configurable air defence module for DCS World.

    - -
    - -

    The following actions need to be followed when using AI_A2A_GCICAP in your mission:

    - -

    1) Configure a working AI_A2A_GCICAP defense system for ONE coalition.

    - -

    1.1) Define which airbases are for which coalition.

    - -

    Mission Editor Action

    - -

    Color the airbases red or blue. You can do this by selecting the airbase on the map, and select the coalition blue or red.

    - -

    1.2) Place groups of units given a name starting with a EWR prefix of your choice to build your EWR network.

    - -

    Mission Editor Action

    - -

    All EWR groups starting with the EWR prefix (text) will be included in the detection system.

    - -

    An EWR network, or, Early Warning Radar network, is used to early detect potential airborne targets and to understand the position of patrolling targets of the enemy. -Typically EWR networks are setup using 55G6 EWR, 1L13 EWR, Hawk sr and Patriot str ground based radar units. -These radars have different ranges and 55G6 EWR and 1L13 EWR radars are Eastern Bloc units (eg Russia, Ukraine, Georgia) while the Hawk and Patriot radars are Western (eg US). -Additionally, ANY other radar capable unit can be part of the EWR network! -Also AWACS airborne units, planes, helicopters can help to detect targets, as long as they have radar. -The position of these units is very important as they need to provide enough coverage -to pick up enemy aircraft as they approach so that CAP and GCI flights can be tasked to intercept them.

    - -

    Additionally in a hot war situation where the border is no longer respected the placement of radars has a big effect on how fast the war escalates. -For example if they are a long way forward and can detect enemy planes on the ground and taking off -they will start to vector CAP and GCI flights to attack them straight away which will immediately draw a response from the other coalition. -Having the radars further back will mean a slower escalation because fewer targets will be detected and -therefore less CAP and GCI flights will spawn and this will tend to make just the border area active rather than a melee over the whole map. -It all depends on what the desired effect is.

    - -

    EWR networks are dynamically maintained. By defining in a smart way the names or name prefixes of the groups with EWR capable units, these groups will be automatically added or deleted from the EWR network, -increasing or decreasing the radar coverage of the Early Warning System.

    - -

    1.3) Place Airplane or Helicopter Groups with late activation switched on above the airbases to define Squadrons.

    - -

    Mission Editor Action

    - -

    These are templates, with a given name starting with a Template prefix above each airbase that you wanna have a squadron. -These templates need to be within 1.5km from the airbase center. They don't need to have a slot at the airplane, they can just be positioned above the airbase, -without a route, and should only have ONE unit.

    - -

    Mission Editor Action

    - -

    All airplane or helicopter groups that are starting with any of the choosen Template Prefixes will result in a squadron created at the airbase.

    - -

    1.4) Place floating helicopters to create the CAP zones defined by its route points.

    - -

    Mission Editor Action

    - -

    All airplane or helicopter groups that are starting with any of the choosen Template Prefixes will result in a squadron created at the airbase.

    - -

    The helicopter indicates the start of the CAP zone. -The route points define the form of the CAP zone polygon.

    - -

    Mission Editor Action

    - -

    The place of the helicopter is important, as the airbase closest to the helicopter will be the airbase from where the CAP planes will take off for CAP.

    - -

    2) There are a lot of defaults set, which can be further modified using the methods in AI#AIA2ADISPATCHER:

    - -

    2.1) Planes are taking off in the air from the airbases.

    - -

    This prevents airbases to get cluttered with airplanes taking off, it also reduces the risk of human players colliding with taxiiing airplanes, -resulting in the airbase to halt operations.

    - -

    You can change the way how planes take off by using the inherited methods from AI_A2A_DISPATCHER:

    - - - -

    Use these methods to fine-tune for specific airfields that are known to create bottlenecks, or have reduced airbase efficiency. -The more and the longer aircraft need to taxi at an airfield, the more risk there is that:

    - -
      -
    • aircraft will stop waiting for each other or for a landing aircraft before takeoff.
    • -
    • aircraft may get into a "dead-lock" situation, where two aircraft are blocking each other.
    • -
    • aircraft may collide at the airbase.
    • -
    • aircraft may be awaiting the landing of a plane currently in the air, but never lands ...
    • -
    - -

    Currently within the DCS engine, the airfield traffic coordination is erroneous and contains a lot of bugs. -If you experience while testing problems with aircraft take-off or landing, please use one of the above methods as a solution to workaround these issues!

    - -

    2.2) Planes return near the airbase or will land if damaged.

    - -

    When damaged airplanes return to the airbase, they will be routed and will dissapear in the air when they are near the airbase. -There are exceptions to this rule, airplanes that aren't "listening" anymore due to damage or out of fuel, will return to the airbase and land.

    - -

    You can change the way how planes land by using the inherited methods from AI_A2A_DISPATCHER:

    - - - -

    You can use these methods to minimize the airbase coodination overhead and to increase the airbase efficiency. -When there are lots of aircraft returning for landing, at the same airbase, the takeoff process will be halted, which can cause a complete failure of the -A2A defense system, as no new CAP or GCI planes can takeoff. -Note that the method AIA2ADISPATCHER.SetSquadronLandingNearAirbase() will only work for returning aircraft, not for damaged or out of fuel aircraft. -Damaged or out-of-fuel aircraft are returning to the nearest friendly airbase and will land, and are out of control from ground control.

    - -

    2.3) CAP operations setup for specific airbases, will be executed with the following parameters:

    - -
      -
    • The altitude will range between 6000 and 10000 meters.
    • -
    • The CAP speed will vary between 500 and 800 km/h.
    • -
    • The engage speed between 800 and 1200 km/h.
    • -
    - -

    You can change or add a CAP zone by using the inherited methods from AI_A2A_DISPATCHER:

    - -

    The method AIA2ADISPATCHER.SetSquadronCap() defines a CAP execution for a squadron.

    - -

    Setting-up a CAP zone also requires specific parameters:

    - -
      -
    • The minimum and maximum altitude
    • -
    • The minimum speed and maximum patrol speed
    • -
    • The minimum and maximum engage speed
    • -
    • The type of altitude measurement
    • -
    - -

    These define how the squadron will perform the CAP while partrolling. Different terrain types requires different types of CAP.

    - -

    The AIA2ADISPATCHER.SetSquadronCapInterval() method specifies how much and when CAP flights will takeoff.

    - -

    It is recommended not to overload the air defense with CAP flights, as these will decrease the performance of the overall system.

    - -

    For example, the following setup will create a CAP for squadron "Sochi":

    - -

    A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) - A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )

    - -

    2.4) Each airbase will perform GCI when required, with the following parameters:

    - -
      -
    • The engage speed is between 800 and 1200 km/h.
    • -
    - -

    You can change or add a GCI parameters by using the inherited methods from AI_A2A_DISPATCHER:

    - -

    The method AIA2ADISPATCHER.SetSquadronGci() defines a GCI execution for a squadron.

    - -

    Setting-up a GCI readiness also requires specific parameters:

    - -
      -
    • The minimum speed and maximum patrol speed
    • -
    - -

    Essentially this controls how many flights of GCI aircraft can be active at any time. -Note allowing large numbers of active GCI flights can adversely impact mission performance on low or medium specification hosts/servers. -GCI needs to be setup at strategic airbases. Too far will mean that the aircraft need to fly a long way to reach the intruders, -too short will mean that the intruders may have alraedy passed the ideal interception point!

    - -

    For example, the following setup will create a GCI for squadron "Sochi":

    - -

    A2ADispatcher:SetSquadronGci( "Mozdok", 900, 1200 )

    - -

    2.5) Grouping or detected targets.

    - -

    Detected targets are constantly re-grouped, that is, when certain detected aircraft are moving further than the group radius, then these aircraft will become a separate -group being detected.

    - -

    Targets will be grouped within a radius of 30km by default.

    - -

    The radius indicates that detected targets need to be grouped within a radius of 30km. -The grouping radius should not be too small, but also depends on the types of planes and the era of the simulation. -Fast planes like in the 80s, need a larger radius than WWII planes.
    -Typically I suggest to use 30000 for new generation planes and 10000 for older era aircraft.

    - -

    3) Additional notes:

    - -

    In order to create a two way A2A defense system, two AI_A2A_GCICAP defense systems must need to be created, for each coalition one. -Each defense system needs its own EWR network setup, airplane templates and CAP configurations.

    - -

    This is a good implementation, because maybe in the future, more coalitions may become available in DCS world.

    - -

    4) Coding examples how to use the AI_A2A_GCICAP class:

    - -

    4.1) An easy setup:

    - -
     -- Setup the AI_A2A_GCICAP dispatcher for one coalition, and initialize it.
    - GCI_Red = AI_A2A_GCICAP:New( "EWR CCCP", "SQUADRON CCCP", "CAP CCCP", 2 )
    -
    -

    -- -The following parameters were given to the :New method of AIA2AGCICAP, and mean the following:

    - -
      -
    • "EWR CCCP": Groups of the blue coalition are placed that define the EWR network. These groups start with the name EWR CCCP.
    • -
    • "SQUADRON CCCP": Late activated Groups objects of the red coalition are placed above the relevant airbases that will contain these templates in the squadron. - These late activated Groups start with the name SQUADRON CCCP. Each Group object contains only one Unit, and defines the weapon payload, skin and skill level.
    • -
    • "CAP CCCP": CAP Zones are defined using floating, late activated Helicopter Group objects, where the route points define the route of the polygon of the CAP Zone. - These Helicopter Group objects start with the name CAP CCCP, and will be the locations wherein CAP will be performed.
    • -
    • 2 Defines how many CAP airplanes are patrolling in each CAP zone defined simulateneously.
    • -
    - - -

    4.2) A more advanced setup:

    - -
     -- Setup the AI_A2A_GCICAP dispatcher for the blue coalition.
    -
    - A2A_GCICAP_Blue = AI_A2A_GCICAP:New( { "BLUE EWR" }, { "104th", "105th", "106th" }, { "104th CAP" }, 4 ) 
    -
    - -

    The following parameters for the :New method have the following meaning:

    - -
      -
    • { "BLUE EWR" }: An array of the group name prefixes of the groups of the blue coalition are placed that define the EWR network. These groups start with the name BLUE EWR.
    • -
    • { "104th", "105th", "106th" }: An array of the group name prefixes of the Late activated Groups objects of the blue coalition are - placed above the relevant airbases that will contain these templates in the squadron. - These late activated Groups start with the name 104th or 105th or 106th.
    • -
    • { "104th CAP" }: An array of the names of the CAP zones are defined using floating, late activated helicopter group objects, - where the route points define the route of the polygon of the CAP Zone. - These Helicopter Group objects start with the name 104th CAP, and will be the locations wherein CAP will be performed.
    • -
    • 4 Defines how many CAP airplanes are patrolling in each CAP zone defined simulateneously.
    • -
    - - -
    -
    -

    Type AI_A2A_Dispatcher

    - -

    Type AI_A2A_DISPATCHER

    - -

    AIA2ADISPATCHER class.

    - -

    Field(s)

    -
    -
    - - -AI_A2A_DISPATCHER:AddDefenderToSquadron(Squadron, Defender, Size) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Squadron :

      - -
    • -
    • - -

      Defender :

      - -
    • -
    • - -

      Size :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:CAP() - -
    -
    - -

    CAP Trigger for AIA2ADISPATCHER

    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:CanCAP(SquadronName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      #string SquadronName : -The squadron name.

      - -
    • -
    -

    Return value

    - -

    #table: -DefenderSquadron

    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:CanGCI(SquadronName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      #string SquadronName : -The squadron name.

      - -
    • -
    -

    Return value

    - -

    #table: -DefenderSquadron

    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:ClearDefenderTask(Defender) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      Defender :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:ClearDefenderTaskTarget(Defender) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      Defender :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:CountCapAirborne(SquadronName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      SquadronName :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:CountDefendersEngaged(AttackerDetection) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      AttackerDetection :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:CountDefendersToBeEngaged(AttackerDetection, DefenderCount) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      AttackerDetection :

      - -
    • -
    • - -

      DefenderCount :

      - -
    • -
    -
    -
    -
    -
    - - - -AI_A2A_DISPATCHER.DefenderDefault - -
    -
    - - - - -

    The Defender Default Settings over all Squadrons.

    - -
    -
    -
    -
    - - - -AI_A2A_DISPATCHER.DefenderSpawns - -
    -
    - - - -
    -
    -
    -
    - - - -AI_A2A_DISPATCHER.DefenderSquadrons - -
    -
    - - - - -

    The Defender Squadrons.

    - -
    -
    -
    -
    - - - -AI_A2A_DISPATCHER.DefenderTasks - -
    -
    - - - - -

    The Defenders Tasks.

    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER.Defenders - -
    -
    - - - -
    -
    -
    -
    - - Functional.Detection#DETECTION_AREAS - -AI_A2A_DISPATCHER.Detection - -
    -
    - - - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER.DisengageRadius - -
    -
    - - - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:ENGAGE() - -
    -
    - -

    ENGAGE Trigger for AIA2ADISPATCHER

    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:EvaluateENGAGE(DetectedItem) - -
    -
    - -

    Creates an ENGAGE task when there are human friendlies airborne near the targets.

    - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      Set#SET_UNIT: -TargetSetUnit: The target set of units.

      - -
    2. -
    3. - -

      #nil: -If there are no targets to be set.

      - -
    4. -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:EvaluateGCI(DetectedItem) - -
    -
    - -

    Creates an GCI task when there are targets for it.

    - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      Set#SET_UNIT: -TargetSetUnit: The target set of units.

      - -
    2. -
    3. - -

      #nil: -If there are no targets to be set.

      - -
    4. -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:EvaluateSWEEP(DetectedItem) - -
    -
    - -

    Creates an SWEEP task when there are targets for it.

    - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      Set#SET_UNIT: -TargetSetUnit: The target set of units.

      - -
    2. -
    3. - -

      #nil: -If there are no targets to be set.

      - -
    4. -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:GCI() - -
    -
    - -

    GCI Trigger for AIA2ADISPATCHER

    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER.GciRadius - -
    -
    - - - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:GetAIFriendliesNearBy(DetectedItem) - -
    -
    - -

    Calculates which AI friendlies are nearby the area

    - -

    Parameter

    -
      -
    • - -

      DetectedItem :

      - -
    • -
    -

    Return value

    - -

    #number, Core.CommandCenter#REPORT:

    - - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:GetCAPDelay(SquadronName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      #string SquadronName : -The squadron name.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:GetDefaultLanding() - -
    -
    - -

    Gets the default method at which flights will land and despawn as part of the defense system.

    - -

    Return value

    - -

    #number: -Landing The landing method which can be NearAirbase, AtRunway, AtEngineShutdown

    - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Let new flights by default despawn near the airbase when returning.
    -  local LandingMethod = A2ADispatcher:GetDefaultLanding( AI_A2A_Dispatcher.Landing.NearAirbase )
    -  if LandingMethod == AI_A2A_Dispatcher.Landing.NearAirbase then
    -   ...
    -  end
    -
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:GetDefaultTakeoff() - -
    -
    - -

    Gets the default method at which new flights will spawn and take-off as part of the defense system.

    - -

    Return value

    - -

    #number: -Takeoff From the airbase hot, from the airbase cold, in the air, from the runway.

    - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Let new flights by default take-off in the air.
    -  local TakeoffMethod = A2ADispatcher:GetDefaultTakeoff()
    -  if TakeOffMethod == , AI_A2A_Dispatcher.Takeoff.InAir then
    -    ...
    -  end
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:GetDefenderTask(Defender) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      Defender :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:GetDefenderTaskFsm(Defender) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      Defender :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:GetDefenderTaskSquadronName(Defender) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      Defender :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:GetDefenderTaskTarget(Defender) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      Defender :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:GetDefenderTasks() - -
    -
    - - - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:GetFriendliesNearBy(DetectedItem, Target) - -
    -
    - -

    Calculates which friendlies are nearby the area

    - -

    Parameters

    -
      -
    • - -

      DetectedItem :

      - -
    • -
    • - -

      Target :

      - -
    • -
    -

    Return value

    - -

    #number, Core.CommandCenter#REPORT:

    - - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:GetPlayerFriendliesNearBy(DetectedItem) - -
    -
    - -

    Calculates which HUMAN friendlies are nearby the area

    - -

    Parameter

    -
      -
    • - -

      DetectedItem :

      - -
    • -
    -

    Return value

    - -

    #number, Core.CommandCenter#REPORT:

    - - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:GetSquadron(SquadronName) - -
    -
    - -

    Get an item from the Squadron table.

    - -

    Parameter

    -
      -
    • - -

      SquadronName :

      - -
    • -
    -

    Return value

    - -

    #table:

    - - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:GetSquadronFromDefender(Defender) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      Defender :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:GetSquadronLanding(SquadronName) - -
    -
    - -

    Gets the method at which flights will land and despawn as part of the defense system.

    - -

    Parameter

    -
      -
    • - -

      #string SquadronName : -The name of the squadron.

      - -
    • -
    -

    Return value

    - -

    #number: -Landing The landing method which can be NearAirbase, AtRunway, AtEngineShutdown

    - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Let new flights despawn near the airbase when returning.
    -  local LandingMethod = A2ADispatcher:GetSquadronLanding( "SquadronName", AI_A2A_Dispatcher.Landing.NearAirbase )
    -  if LandingMethod == AI_A2A_Dispatcher.Landing.NearAirbase then
    -   ...
    -  end
    -
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:GetSquadronTakeoff(SquadronName) - -
    -
    - -

    Gets the method at which new flights will spawn and take-off as part of the defense system.

    - -

    Parameter

    -
      -
    • - -

      #string SquadronName : -The name of the squadron.

      - -
    • -
    -

    Return value

    - -

    #number: -Takeoff From the airbase hot, from the airbase cold, in the air, from the runway.

    - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Let new flights take-off in the air.
    -  local TakeoffMethod = A2ADispatcher:GetSquadronTakeoff( "SquadronName" )
    -  if TakeOffMethod == , AI_A2A_Dispatcher.Takeoff.InAir then
    -    ...
    -  end
    -  
    - -
    -
    -
    -
    - - - -AI_A2A_DISPATCHER.Landing - -
    -
    - -

    Defnes Landing location.

    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:New(Detection) - -
    -
    - -

    AIA2ADISPATCHER constructor.

    - - -

    This is defining the A2A DISPATCHER for one coaliton. -The Dispatcher works with a Functional#Detection object that is taking of the detection of targets using the EWR units. -The Detection object is polymorphic, depending on the type of detection object choosen, the detection will work differently.

    - -

    Parameter

    - -

    Return value

    - -

    #AIA2ADISPATCHER: -self

    - -

    Usage:

    -
      
    -  -- Setup the Detection, using DETECTION_AREAS.
    -  -- First define the SET of GROUPs that are defining the EWR network.
    -  -- Here with prefixes DF CCCP AWACS, DF CCCP EWR.
    -  DetectionSetGroup = SET_GROUP:New()
    -  DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } )
    -  DetectionSetGroup:FilterStart()
    -  
    -  -- Define the DETECTION_AREAS, using the DetectionSetGroup, with a 30km grouping radius.
    -  Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 )
    -
    -  -- Now Setup the A2A dispatcher, and initialize it using the Detection object.
    -  A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )  --   
    -
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:OnAfterAssign(From, Event, To, Task, TaskUnit, PlayerName) - -
    -
    - -

    OnAfter Transition Handler for Event Assign.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    • - -

      Tasking.TaskA2A#AIA2A Task :

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    • - -

      #string PlayerName :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:OnAfterCAP(From, Event, To) - -
    -
    - -

    CAP Handler OnAfter for AIA2ADISPATCHER

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:OnAfterENGAGE(From, Event, To) - -
    -
    - -

    ENGAGE Handler OnAfter for AIA2ADISPATCHER

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:OnAfterGCI(From, Event, To) - -
    -
    - -

    GCI Handler OnAfter for AIA2ADISPATCHER

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:OnBeforeCAP(From, Event, To) - -
    -
    - -

    CAP Handler OnBefore for AIA2ADISPATCHER

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:OnBeforeENGAGE(From, Event, To) - -
    -
    - -

    ENGAGE Handler OnBefore for AIA2ADISPATCHER

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:OnBeforeGCI(From, Event, To) - -
    -
    - -

    GCI Handler OnBefore for AIA2ADISPATCHER

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:OnEventCrashOrDead(EventData) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:OnEventEngineShutdown(EventData) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:OnEventLand(EventData) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:ProcessDetected(Detection) - -
    -
    - -

    Assigns A2A AI Tasks in relation to the detected items.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean: -Return true if you want the task assigning to continue... false will cancel the loop.

    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:RemoveDefenderFromSquadron(Squadron, Defender) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Squadron :

      - -
    • -
    • - -

      Defender :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER.SchedulerCAP(AI_A2A_DISPATCHER, SquadronName, self) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      AIA2ADISPATCHER :

      - -
    • -
    • - -

      #string SquadronName : -The squadron name.

      - -
    • -
    • - -

      self :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetBorderZone(BorderZone) - -
    -
    - -

    Define a border area to simulate a cold war scenario.

    - - -

    A cold war is one where CAP aircraft patrol their territory but will not attack enemy aircraft or launch GCI aircraft unless enemy aircraft enter their territory. In other words the EWR may detect an enemy aircraft but will only send aircraft to attack it if it crosses the border. -A hot war is one where CAP aircraft will intercept any detected enemy aircraft and GCI aircraft will launch against detected enemy aircraft without regard for territory. In other words if the ground radar can detect the enemy aircraft then it will send CAP and GCI aircraft to attack it. -If it’s a cold war then the borders of red and blue territory need to be defined using a zone object derived from Zone#ZONE_BASE. This method needs to be used for this. -If a hot war is chosen then no borders actually need to be defined using the helicopter units other than it makes it easier sometimes for the mission maker to envisage where the red and blue territories roughly are. In a hot war the borders are effectively defined by the ground based radar coverage of a coalition. Set the noborders parameter to 1

    - -

    Parameter

    -
      -
    • - -

      Core.Zone#ZONE_BASE BorderZone : -An object derived from ZONEBASE, or a list of objects derived from ZONEBASE.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -  -- Now Setup the A2A dispatcher, and initialize it using the Detection object.
    -  A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )  
    -  
    -  -- Set one ZONE_POLYGON object as the border for the A2A dispatcher.
    -  local BorderZone = ZONE_POLYGON( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) -- The GROUP object is a late activate helicopter unit.
    -  A2ADispatcher:SetBorderZone( BorderZone )
    -  
    -or
    -  
    -  -- Set two ZONE_POLYGON objects as the border for the A2A dispatcher.
    -  local BorderZone1 = ZONE_POLYGON( "CCCP Border1", GROUP:FindByName( "CCCP Border1" ) ) -- The GROUP object is a late activate helicopter unit.
    -  local BorderZone2 = ZONE_POLYGON( "CCCP Border2", GROUP:FindByName( "CCCP Border2" ) ) -- The GROUP object is a late activate helicopter unit.
    -  A2ADispatcher:SetBorderZone( { BorderZone1, BorderZone2 } )
    -  
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetDefaultCapLimit(CapLimit) - -
    -
    - -

    Set the default CAP limit for squadrons, which will be used to determine how many CAP can be airborne at the same time for the squadron.

    - - -

    The default CAP limit is 1 CAP, which means one CAP group being spawned.

    - -

    Parameter

    -
      -
    • - -

      #number CapLimit : -The maximum amount of CAP that can be airborne at the same time for the squadron.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -  -- Now Setup the A2A dispatcher, and initialize it using the Detection object.
    -  A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )  
    -  
    -  -- Now Setup the default CAP limit.
    -  A2ADispatcher:SetDefaultCapLimit( 2 ) -- Maximum 2 CAP per squadron.
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetDefaultCapTimeInterval(CapMinSeconds, CapMaxSeconds) - -
    -
    - -

    Set the default CAP time interval for squadrons, which will be used to determine a random CAP timing.

    - - -

    The default CAP time interval is between 180 and 600 seconds.

    - -

    Parameters

    -
      -
    • - -

      #number CapMinSeconds : -The minimum amount of seconds for the random time interval.

      - -
    • -
    • - -

      #number CapMaxSeconds : -The maximum amount of seconds for the random time interval.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -  -- Now Setup the A2A dispatcher, and initialize it using the Detection object.
    -  A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )  
    -  
    -  -- Now Setup the default CAP time interval.
    -  A2ADispatcher:SetDefaultCapTimeInterval( 300, 1200 ) -- Between 300 and 1200 seconds.
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetDefaultDamageThreshold(DamageThreshold) - -
    -
    - -

    Set the default damage treshold when defenders will RTB.

    - - -

    The default damage treshold is by default set to 40%, which means that when the airplane is 40% damaged, it will go RTB.

    - -

    Parameter

    -
      -
    • - -

      #number DamageThreshold : -A decimal number between 0 and 1, that expresses the %-tage of the damage treshold before going RTB.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -  -- Now Setup the A2A dispatcher, and initialize it using the Detection object.
    -  A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )  
    -  
    -  -- Now Setup the default damage treshold.
    -  A2ADispatcher:SetDefaultDamageThreshold( 0.90 ) -- Go RTB when the airplane 90% damaged.
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetDefaultFuelThreshold(FuelThreshold) - -
    -
    - -

    Set the default fuel treshold when defenders will RTB or Refuel in the air.

    - - -

    The fuel treshold is by default set to 15%, which means that an airplane will stay in the air until 15% of its fuel has been consumed.

    - -

    Parameter

    -
      -
    • - -

      #number FuelThreshold : -A decimal number between 0 and 1, that expresses the %-tage of the treshold of fuel remaining in the tank when the plane will go RTB or Refuel.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -  -- Now Setup the A2A dispatcher, and initialize it using the Detection object.
    -  A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )  
    -  
    -  -- Now Setup the default fuel treshold.
    -  A2ADispatcher:SetDefaultRefuelThreshold( 0.30 ) -- Go RTB when only 30% of fuel remaining in the tank.
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetDefaultGrouping(Grouping) - -
    -
    - -

    Sets the default grouping of new airplanes spawned.

    - - -

    Grouping will trigger how new airplanes will be grouped if more than one airplane is spawned for defense.

    - -

    Parameter

    -
      -
    • - -

      #number Grouping : -The level of grouping that will be applied of the CAP or GCI defenders.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Set a grouping by default per 2 airplanes.
    -  A2ADispatcher:SetDefaultGrouping( 2 )
    -
    -
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetDefaultLanding(Landing) - -
    -
    - -

    Defines the default method at which flights will land and despawn as part of the defense system.

    - -

    Parameter

    -
      -
    • - -

      #number Landing : -The landing method which can be NearAirbase, AtRunway, AtEngineShutdown

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Let new flights by default despawn near the airbase when returning.
    -  A2ADispatcher:SetDefaultLanding( AI_A2A_Dispatcher.Landing.NearAirbase )
    -  
    -  -- Let new flights by default despawn after landing land at the runway.
    -  A2ADispatcher:SetDefaultLanding( AI_A2A_Dispatcher.Landing.AtRunway )
    -  
    -  -- Let new flights by default despawn after landing and parking, and after engine shutdown.
    -  A2ADispatcher:SetDefaultLanding( AI_A2A_Dispatcher.Landing.AtEngineShutdown )
    -
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetDefaultLandingAtEngineShutdown() - -
    -
    - -

    Sets flights by default to land and despawn at engine shutdown, as part of the defense system.

    - -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Let flights by default land and despawn at engine shutdown.
    -  A2ADispatcher:SetDefaultLandingAtEngineShutdown()
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetDefaultLandingAtRunway() - -
    -
    - -

    Sets flights by default to land and despawn at the runway, as part of the defense system.

    - -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Let flights by default land at the runway and despawn.
    -  A2ADispatcher:SetDefaultLandingAtRunway()
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetDefaultLandingNearAirbase() - -
    -
    - -

    Sets flights by default to land and despawn near the airbase in the air, as part of the defense system.

    - -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Let flights by default to land near the airbase and despawn.
    -  A2ADispatcher:SetDefaultLandingNearAirbase()
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetDefaultOverhead(Overhead) - -
    -
    - -

    Defines the default amount of extra planes that will take-off as part of the defense system.

    - -

    Parameter

    -
      -
    • - -

      #number Overhead : -The %-tage of Units that dispatching command will allocate to intercept in surplus of detected amount of units. -The default overhead is 1, so equal balance. The AIA2ADISPATCHER.SetOverhead() method can be used to tweak the defense strength, -taking into account the plane types of the squadron. For example, a MIG-31 with full long-distance A2A missiles payload, may still be less effective than a F-15C with short missiles... -So in this case, one may want to use the Overhead method to allocate more defending planes as the amount of detected attacking planes. -The overhead must be given as a decimal value with 1 as the neutral value, which means that Overhead values:

      - -
        -
      • Higher than 1, will increase the defense unit amounts.
      • -
      • Lower than 1, will decrease the defense unit amounts.
      • -
      - -

      The amount of defending units is calculated by multiplying the amount of detected attacking planes as part of the detected group -multiplied by the Overhead and rounded up to the smallest integer.

      - -

      The Overhead value set for a Squadron, can be programmatically adjusted (by using this SetOverhead method), to adjust the defense overhead during mission execution.

      - -

      See example below. -

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- An overhead of 1,5 with 1 planes detected, will allocate 2 planes ( 1 * 1,5 ) = 1,5 => rounded up gives 2.
    -  -- An overhead of 1,5 with 2 planes detected, will allocate 3 planes ( 2 * 1,5 ) = 3 =>  rounded up gives 3.
    -  -- An overhead of 1,5 with 3 planes detected, will allocate 5 planes ( 3 * 1,5 ) = 4,5 => rounded up gives 5 planes.
    -  -- An overhead of 1,5 with 4 planes detected, will allocate 6 planes ( 4 * 1,5 ) = 6  => rounded up gives 6 planes.
    -  
    -  A2ADispatcher:SetDefaultOverhead( 1.5 )
    -
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetDefaultTakeoff(Takeoff) - -
    -
    - -

    Defines the default method at which new flights will spawn and take-off as part of the defense system.

    - -

    Parameter

    -
      -
    • - -

      #number Takeoff : -From the airbase hot, from the airbase cold, in the air, from the runway.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Let new flights by default take-off in the air.
    -  A2ADispatcher:SetDefaultTakeoff( AI_A2A_Dispatcher.Takeoff.Air )
    -  
    -  -- Let new flights by default take-off from the runway.
    -  A2ADispatcher:SetDefaultTakeoff( AI_A2A_Dispatcher.Takeoff.Runway )
    -  
    -  -- Let new flights by default take-off from the airbase hot.
    -  A2ADispatcher:SetDefaultTakeoff( AI_A2A_Dispatcher.Takeoff.Hot )
    -
    -  -- Let new flights by default take-off from the airbase cold.
    -  A2ADispatcher:SetDefaultTakeoff( AI_A2A_Dispatcher.Takeoff.Cold )
    -
    -
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetDefaultTakeoffFromParkingCold() - -
    -
    - -

    Sets flights to by default take-off from the airbase at a cold location, as part of the defense system.

    - -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Let new flights take-off from a cold parking spot.
    -  A2ADispatcher:SetDefaultTakeoffFromParkingCold()
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetDefaultTakeoffFromParkingHot() - -
    -
    - -

    Sets flights by default to take-off from the airbase at a hot location, as part of the defense system.

    - -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Let new flights by default take-off at a hot parking spot.
    -  A2ADispatcher:SetDefaultTakeoffFromParkingHot()
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetDefaultTakeoffFromRunway() - -
    -
    - -

    Sets flights by default to take-off from the runway, as part of the defense system.

    - -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Let new flights by default take-off from the runway.
    -  A2ADispatcher:SetDefaultTakeoffFromRunway()
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetDefaultTakeoffInAir() - -
    -
    - -

    Sets flights to default take-off in the air, as part of the defense system.

    - -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Let new flights by default take-off in the air.
    -  A2ADispatcher:SetDefaultTakeoffInAir()
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetDefaultTakeoffInAirAltitude(TakeoffAltitude) - -
    -
    - -

    Defines the default altitude where airplanes will spawn in the air and take-off as part of the defense system, when the take-off in the air method has been selected.

    - -

    Parameter

    -
      -
    • - -

      #number TakeoffAltitude : -The altitude in meters above the ground.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Set the default takeoff altitude when taking off in the air.
    -  A2ADispatcher:SetDefaultTakeoffInAirAltitude( 2000 )  -- This makes planes start at 2000 meters above the ground.
    -
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetDefaultTanker(TankerName) - -
    -
    - -

    Set the default tanker where defenders will Refuel in the air.

    - -

    Parameter

    -
      -
    • - -

      #strig TankerName : -A string defining the group name of the Tanker as defined within the Mission Editor.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -  -- Now Setup the A2A dispatcher, and initialize it using the Detection object.
    -  A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )  
    -  
    -  -- Now Setup the default fuel treshold.
    -  A2ADispatcher:SetDefaultRefuelThreshold( 0.30 ) -- Go RTB when only 30% of fuel remaining in the tank.
    -  
    -  -- Now Setup the default tanker.
    -  A2ADispatcher:SetDefaultTanker( "Tanker" ) -- The group name of the tanker is "Tanker" in the Mission Editor.
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetDefenderTask(SquadronName, Defender, Type, Fsm, Target) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      SquadronName :

      - -
    • -
    • - -

      Defender :

      - -
    • -
    • - -

      Type :

      - -
    • -
    • - -

      Fsm :

      - -
    • -
    • - -

      Target :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetDefenderTaskTarget(AIGroup, Defender, AttackerDetection) - -
    -
    - - - -

    Parameters

    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetDisengageRadius(DisengageRadius) - -
    -
    - -

    Define the radius to disengage any target when the distance to the home base is larger than the specified meters.

    - -

    Parameter

    -
      -
    • - -

      #number DisengageRadius : -(Optional, Default = 300000) The radius to disengage a target when too far from the home base.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -  -- Set 50km as the Disengage Radius.
    -  A2ADispatcher:SetDisengageRadius( 50000 )
    -  
    -  -- Set 100km as the Disengage Radius.
    -  A2ADispatcher:SetDisngageRadius() -- 300000 is the default value.
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetEngageRadius(EngageRadius) - -
    -
    - -

    Define the radius to engage any target by airborne friendlies, which are executing cap or returning from an intercept mission.

    - - -

    If there is a target area detected and reported, then any friendlies that are airborne near this target area, -will be commanded to (re-)engage that target when available (if no other tasks were commanded).

    - -

    For example, if 100000 is given as a value, then any friendly that is airborne within 100km from the detected target, -will be considered to receive the command to engage that target area.

    - -

    You need to evaluate the value of this parameter carefully:

    - -
      -
    • If too small, more intercept missions may be triggered upon detected target areas.
    • -
    • If too large, any airborne cap may not be able to reach the detected target area in time, because it is too far.
    • -
    - -

    **Use the method AIA2ADISPATCHER.SetEngageRadius() to modify the default Engage Radius for ALL squadrons.**

    - -

    Demonstration Mission: AID-019 - AI_A2A - Engage Range Test

    - - -

    Parameter

    -
      -
    • - -

      #number EngageRadius : -(Optional, Default = 100000) The radius to report friendlies near the target.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -  -- Set 50km as the radius to engage any target by airborne friendlies.
    -  A2ADispatcher:SetEngageRadius( 50000 )
    -  
    -  -- Set 100km as the radius to engage any target by airborne friendlies.
    -  A2ADispatcher:SetEngageRadius() -- 100000 is the default value.
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetGciRadius(GciRadius) - -
    -
    - -

    Define the radius to check if a target can be engaged by an ground controlled intercept.

    - - -

    When targets are detected that are still really far off, you don't want the AIA2ADISPATCHER to launch intercepts just yet. -You want it to wait until a certain Gci range is reached, which is the distance of the closest airbase to target -being smaller than the Ground Controlled Intercept radius or Gci radius.

    - -

    The default Gci radius is defined as 200000 or 200km. Override the default Gci radius when the era of the warfare is early, or, -when you don't want to let the AIA2ADISPATCHER react immediately when a certain border or area is not being crossed.

    - -

    Use the method AIA2ADISPATCHER.SetGciRadius() to set a specific controlled ground intercept radius. -The Ground Controlled Intercept radius is defined for ALL squadrons which are operational.

    - -

    Demonstration Mission: AID-013 - AI_A2A - Intercept Test

    - - -

    Parameter

    -
      -
    • - -

      #number GciRadius : -(Optional, Default = 200000) The radius to ground control intercept detected targets from the nearest airbase.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -  -- Now Setup the A2A dispatcher, and initialize it using the Detection object.
    -  A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) 
    -  
    -  -- Set 100km as the radius to ground control intercept detected targets from the nearest airbase.
    -  A2ADispatcher:SetGciRadius( 100000 )
    -  
    -  -- Set 200km as the radius to ground control intercept.
    -  A2ADispatcher:SetGciRadius() -- 200000 is the default value.
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetIntercept(InterceptDelay) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      InterceptDelay :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetSquadron(SquadronName, AirbaseName, TemplatePrefixes, Resources) - -
    -
    - -

    This is the main method to define Squadrons programmatically.

    - - -

    Squadrons:

    - -
      -
    • Have a name or key that is the identifier or key of the squadron.
    • -
    • Have specific plane types defined by templates.
    • -
    • Are located at one specific airbase. Multiple squadrons can be located at one airbase through.
    • -
    • Optionally have a limited set of resources. The default is that squadrons have unlimited resources.
    • -
    - -

    The name of the squadron given acts as the squadron key in the AI_A2A_DISPATCHER:Squadron...() methods.

    - -

    Additionally, squadrons have specific configuration options to:

    - -
      -
    • Control how new aircraft are taking off from the airfield (in the air, cold, hot, at the runway).
    • -
    • Control how returning aircraft are landing at the airfield (in the air near the airbase, after landing, after engine shutdown).
    • -
    • Control the grouping of new aircraft spawned at the airfield. If there is more than one aircraft to be spawned, these may be grouped.
    • -
    • Control the overhead or defensive strength of the squadron. Depending on the types of planes and amount of resources, the mission designer can choose to increase or reduce the amount of planes spawned.
    • -
    - -

    For performance and bug workaround reasons within DCS, squadrons have different methods to spawn new aircraft or land returning or damaged aircraft.

    - - -

    Parameters

    -
      -
    • - -

      #string SquadronName : -A string (text) that defines the squadron identifier or the key of the Squadron. -It can be any name, for example "104th Squadron" or "SQ SQUADRON1", whatever. -As long as you remember that this name becomes the identifier of your squadron you have defined. -You need to use this name in other methods too!

      - - -
    • -
    • - -

      #string AirbaseName : -The airbase name where you want to have the squadron located. -You need to specify here EXACTLY the name of the airbase as you see it in the mission editor. -Examples are "Batumi" or "Tbilisi-Lochini". -EXACTLY the airbase name, between quotes "". -To ease the airbase naming when using the LDT editor and IntelliSense, the Airbase#AIRBASE class contains enumerations of the airbases of each map.

      - - - - -
    • -
    • - -

      #string TemplatePrefixes : -A string or an array of strings specifying the prefix names of the templates (not going to explain what is templates here again). -Examples are { "104th", "105th" } or "104th" or "Template 1" or "BLUE PLANES". -Just remember that your template (groups late activated) need to start with the prefix you have specified in your code. -If you have only one prefix name for a squadron, you don't need to use the { }, otherwise you need to use the brackets.

      - - -
    • -
    • - -

      #number Resources : -(optional) A number that specifies how many resources are in stock of the squadron. If not specified, the squadron will have infinite resources available.

      - - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usages:

    -
      -
    •   -- Now Setup the A2A dispatcher, and initialize it using the Detection object.
      -  A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )  
      -  
    • -
    •   -- This will create squadron "Squadron1" at "Batumi" airbase, and will use plane types "SQ1" and has 40 planes in stock...  
      -  A2ADispatcher:SetSquadron( "Squadron1", "Batumi", "SQ1", 40 )
      -  
    • -
    •   -- This will create squadron "Sq 1" at "Batumi" airbase, and will use plane types "Mig-29" and "Su-27" and has 20 planes in stock...
      -  -- Note that in this implementation, the A2A dispatcher will select a random plane type when a new plane (group) needs to be spawned for defenses.
      -  -- Note the usage of the {} for the airplane templates list.
      -  A2ADispatcher:SetSquadron( "Sq 1", "Batumi", { "Mig-29", "Su-27" }, 40 )
      -  
    • -
    •   -- This will create 2 squadrons "104th" and "23th" at "Batumi" airbase, and will use plane types "Mig-29" and "Su-27" respectively and each squadron has 10 planes in stock...
      -  A2ADispatcher:SetSquadron( "104th", "Batumi", "Mig-29", 10 )
      -  A2ADispatcher:SetSquadron( "23th", "Batumi", "Su-27", 10 )
      -  
    • -
    •   -- This is an example like the previous, but now with infinite resources.
      -  -- The Resources parameter is not given in the SetSquadron method.
      -  A2ADispatcher:SetSquadron( "104th", "Batumi", "Mig-29" )
      -  A2ADispatcher:SetSquadron( "23th", "Batumi", "Su-27" )
      -  
      -  
    • -
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetSquadronCap(SquadronName, Zone, FloorAltitude, CeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageMinSpeed, EngageMaxSpeed, AltType) - -
    -
    - -

    Set a CAP for a Squadron.

    - -

    Parameters

    -
      -
    • - -

      #string SquadronName : -The squadron name.

      - -
    • -
    • - -

      Core.Zone#ZONE_BASE Zone : -The Zone object derived from Zone#ZONE_BASE that defines the zone wherein the CAP will be executed.

      - -
    • -
    • - -

      #number FloorAltitude : -The minimum altitude at which the cap can be executed.

      - -
    • -
    • - -

      #number CeilingAltitude : -the maximum altitude at which the cap can be executed.

      - -
    • -
    • - -

      #number PatrolMinSpeed : -The minimum speed at which the cap can be executed.

      - -
    • -
    • - -

      #number PatrolMaxSpeed : -The maximum speed at which the cap can be executed.

      - -
    • -
    • - -

      #number EngageMinSpeed : -The minimum speed at which the engage can be executed.

      - -
    • -
    • - -

      #number EngageMaxSpeed : -The maximum speed at which the engage can be executed.

      - -
    • -
    • - -

      #number AltType : -The altitude type, which is a string "BARO" defining Barometric or "RADIO" defining radio controlled altitude.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -       -- CAP Squadron execution.
    -       CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) )
    -       A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 )
    -       A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 )
    -       
    -       CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) )
    -       A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" )
    -       A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
    -       
    -       CAPZoneMiddle = ZONE:New( "CAP Zone Middle")
    -       A2ADispatcher:SetSquadronCap( "Maykop", CAPZoneMiddle, 4000, 8000, 600, 800, 800, 1200, "RADIO" )
    -       A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
    -
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetSquadronCapInterval(SquadronName, CapLimit, LowInterval, HighInterval, Probability) - -
    -
    - -

    Set the squadron CAP parameters.

    - - -

    - -

    Parameters

    -
      -
    • - -

      #string SquadronName : -The squadron name.

      - -
    • -
    • - -

      #number CapLimit : -(optional) The maximum amount of CAP groups to be spawned. Note that a CAP is a group, so can consist out of 1 to 4 airplanes. The default is 1 CAP group.

      - -
    • -
    • - -

      #number LowInterval : -(optional) The minimum time boundary in seconds when a new CAP will be spawned. The default is 180 seconds.

      - -
    • -
    • - -

      #number HighInterval : -(optional) The maximum time boundary in seconds when a new CAP will be spawned. The default is 600 seconds.

      - -
    • -
    • - -

      #number Probability : -Is not in use, you can skip this parameter.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -       -- CAP Squadron execution.
    -       CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) )
    -       A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 )
    -       A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 )
    -       
    -       CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) )
    -       A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" )
    -       A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
    -       
    -       CAPZoneMiddle = ZONE:New( "CAP Zone Middle")
    -       A2ADispatcher:SetSquadronCap( "Maykop", CAPZoneMiddle, 4000, 8000, 600, 800, 800, 1200, "RADIO" )
    -       A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 )
    -
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetSquadronFuelThreshold(SquadronName, FuelThreshold) - -
    -
    - -

    Set the fuel treshold for the squadron when defenders will RTB or Refuel in the air.

    - - -

    The fuel treshold is by default set to 15%, which means that an airplane will stay in the air until 15% of its fuel has been consumed.

    - -

    Parameters

    -
      -
    • - -

      #string SquadronName : -The name of the squadron.

      - -
    • -
    • - -

      #number FuelThreshold : -A decimal number between 0 and 1, that expresses the %-tage of the treshold of fuel remaining in the tank when the plane will go RTB or Refuel.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -  -- Now Setup the A2A dispatcher, and initialize it using the Detection object.
    -  A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )  
    -  
    -  -- Now Setup the default fuel treshold.
    -  A2ADispatcher:SetSquadronRefuelThreshold( "SquadronName", 0.30 ) -- Go RTB when only 30% of fuel remaining in the tank.
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetSquadronGci(SquadronName, EngageMinSpeed, EngageMaxSpeed) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      #string SquadronName : -The squadron name.

      - -
    • -
    • - -

      #number EngageMinSpeed : -The minimum speed at which the gci can be executed.

      - -
    • -
    • - -

      #number EngageMaxSpeed : -The maximum speed at which the gci can be executed.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -       -- GCI Squadron execution.
    -       A2ADispatcher:SetSquadronGci( "Mozdok", 900, 1200 )
    -       A2ADispatcher:SetSquadronGci( "Novo", 900, 2100 )
    -       A2ADispatcher:SetSquadronGci( "Maykop", 900, 1200 )
    -
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetSquadronGrouping(SquadronName, Grouping) - -
    -
    - -

    Sets the grouping of new airplanes spawned.

    - - -

    Grouping will trigger how new airplanes will be grouped if more than one airplane is spawned for defense.

    - -

    Parameters

    -
      -
    • - -

      #string SquadronName : -The name of the squadron.

      - -
    • -
    • - -

      #number Grouping : -The level of grouping that will be applied of the CAP or GCI defenders.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Set a grouping per 2 airplanes.
    -  A2ADispatcher:SetSquadronGrouping( "SquadronName", 2 )
    -
    -
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetSquadronLanding(SquadronName, Landing) - -
    -
    - -

    Defines the method at which flights will land and despawn as part of the defense system.

    - -

    Parameters

    -
      -
    • - -

      #string SquadronName : -The name of the squadron.

      - -
    • -
    • - -

      #number Landing : -The landing method which can be NearAirbase, AtRunway, AtEngineShutdown

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Let new flights despawn near the airbase when returning.
    -  A2ADispatcher:SetSquadronLanding( "SquadronName", AI_A2A_Dispatcher.Landing.NearAirbase )
    -  
    -  -- Let new flights despawn after landing land at the runway.
    -  A2ADispatcher:SetSquadronLanding( "SquadronName", AI_A2A_Dispatcher.Landing.AtRunway )
    -  
    -  -- Let new flights despawn after landing and parking, and after engine shutdown.
    -  A2ADispatcher:SetSquadronLanding( "SquadronName", AI_A2A_Dispatcher.Landing.AtEngineShutdown )
    -
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetSquadronLandingAtEngineShutdown(SquadronName) - -
    -
    - -

    Sets flights to land and despawn at engine shutdown, as part of the defense system.

    - -

    Parameter

    -
      -
    • - -

      #string SquadronName : -The name of the squadron.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Let flights land and despawn at engine shutdown.
    -  A2ADispatcher:SetSquadronLandingAtEngineShutdown( "SquadronName" )
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetSquadronLandingAtRunway(SquadronName) - -
    -
    - -

    Sets flights to land and despawn at the runway, as part of the defense system.

    - -

    Parameter

    -
      -
    • - -

      #string SquadronName : -The name of the squadron.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Let flights land at the runway and despawn.
    -  A2ADispatcher:SetSquadronLandingAtRunway( "SquadronName" )
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetSquadronLandingNearAirbase(SquadronName) - -
    -
    - -

    Sets flights to land and despawn near the airbase in the air, as part of the defense system.

    - -

    Parameter

    -
      -
    • - -

      #string SquadronName : -The name of the squadron.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Let flights to land near the airbase and despawn.
    -  A2ADispatcher:SetSquadronLandingNearAirbase( "SquadronName" )
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetSquadronOverhead(SquadronName, Overhead) - -
    -
    - -

    Defines the amount of extra planes that will take-off as part of the defense system.

    - -

    Parameters

    -
      -
    • - -

      #string SquadronName : -The name of the squadron.

      - -
    • -
    • - -

      #number Overhead : -The %-tage of Units that dispatching command will allocate to intercept in surplus of detected amount of units. -The default overhead is 1, so equal balance. The AIA2ADISPATCHER.SetOverhead() method can be used to tweak the defense strength, -taking into account the plane types of the squadron. For example, a MIG-31 with full long-distance A2A missiles payload, may still be less effective than a F-15C with short missiles... -So in this case, one may want to use the Overhead method to allocate more defending planes as the amount of detected attacking planes. -The overhead must be given as a decimal value with 1 as the neutral value, which means that Overhead values:

      - -
        -
      • Higher than 1, will increase the defense unit amounts.
      • -
      • Lower than 1, will decrease the defense unit amounts.
      • -
      - -

      The amount of defending units is calculated by multiplying the amount of detected attacking planes as part of the detected group -multiplied by the Overhead and rounded up to the smallest integer.

      - -

      The Overhead value set for a Squadron, can be programmatically adjusted (by using this SetOverhead method), to adjust the defense overhead during mission execution.

      - -

      See example below. -

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- An overhead of 1,5 with 1 planes detected, will allocate 2 planes ( 1 * 1,5 ) = 1,5 => rounded up gives 2.
    -  -- An overhead of 1,5 with 2 planes detected, will allocate 3 planes ( 2 * 1,5 ) = 3 =>  rounded up gives 3.
    -  -- An overhead of 1,5 with 3 planes detected, will allocate 5 planes ( 3 * 1,5 ) = 4,5 => rounded up gives 5 planes.
    -  -- An overhead of 1,5 with 4 planes detected, will allocate 6 planes ( 4 * 1,5 ) = 6  => rounded up gives 6 planes.
    -  
    -  A2ADispatcher:SetSquadronOverhead( "SquadronName", 1.5 )
    -
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetSquadronTakeoff(SquadronName, Takeoff) - -
    -
    - -

    Defines the method at which new flights will spawn and take-off as part of the defense system.

    - -

    Parameters

    -
      -
    • - -

      #string SquadronName : -The name of the squadron.

      - -
    • -
    • - -

      #number Takeoff : -From the airbase hot, from the airbase cold, in the air, from the runway.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Let new flights take-off in the air.
    -  A2ADispatcher:SetSquadronTakeoff( "SquadronName", AI_A2A_Dispatcher.Takeoff.Air )
    -  
    -  -- Let new flights take-off from the runway.
    -  A2ADispatcher:SetSquadronTakeoff( "SquadronName", AI_A2A_Dispatcher.Takeoff.Runway )
    -  
    -  -- Let new flights take-off from the airbase hot.
    -  A2ADispatcher:SetSquadronTakeoff( "SquadronName", AI_A2A_Dispatcher.Takeoff.Hot )
    -
    -  -- Let new flights take-off from the airbase cold.
    -  A2ADispatcher:SetSquadronTakeoff( "SquadronName", AI_A2A_Dispatcher.Takeoff.Cold )
    -
    -
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetSquadronTakeoffFromParkingCold(SquadronName) - -
    -
    - -

    Sets flights to take-off from the airbase at a cold location, as part of the defense system.

    - -

    Parameter

    -
      -
    • - -

      #string SquadronName : -The name of the squadron.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Let new flights take-off from a cold parking spot.
    -  A2ADispatcher:SetSquadronTakeoffFromParkingCold( "SquadronName" )
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetSquadronTakeoffFromParkingHot(SquadronName) - -
    -
    - -

    Sets flights to take-off from the airbase at a hot location, as part of the defense system.

    - -

    Parameter

    -
      -
    • - -

      #string SquadronName : -The name of the squadron.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Let new flights take-off in the air.
    -  A2ADispatcher:SetSquadronTakeoffFromParkingHot( "SquadronName" )
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetSquadronTakeoffFromRunway(SquadronName) - -
    -
    - -

    Sets flights to take-off from the runway, as part of the defense system.

    - -

    Parameter

    -
      -
    • - -

      #string SquadronName : -The name of the squadron.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Let new flights take-off from the runway.
    -  A2ADispatcher:SetSquadronTakeoffFromRunway( "SquadronName" )
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetSquadronTakeoffInAir(SquadronName, TakeoffAltitude) - -
    -
    - -

    Sets flights to take-off in the air, as part of the defense system.

    - -

    Parameters

    -
      -
    • - -

      #string SquadronName : -The name of the squadron.

      - -
    • -
    • - -

      #number TakeoffAltitude : -(optional) The altitude in meters above the ground. If not given, the default takeoff altitude will be used.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Let new flights take-off in the air.
    -  A2ADispatcher:SetSquadronTakeoffInAir( "SquadronName" )
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetSquadronTakeoffInAirAltitude(SquadronName, TakeoffAltitude) - -
    -
    - -

    Defines the default altitude where airplanes will spawn in the air and take-off as part of the defense system, when the take-off in the air method has been selected.

    - -

    Parameters

    -
      -
    • - -

      #string SquadronName : -The name of the squadron.

      - -
    • -
    • - -

      #number TakeoffAltitude : -The altitude in meters above the ground.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -
    -  local A2ADispatcher = AI_A2A_DISPATCHER:New( ... )
    -  
    -  -- Set the default takeoff altitude when taking off in the air.
    -  A2ADispatcher:SetSquadronTakeoffInAirAltitude( "SquadronName", 2000 ) -- This makes planes start at 2000 meters above the ground.
    -  
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetSquadronTanker(SquadronName, TankerName) - -
    -
    - -

    Set the squadron tanker where defenders will Refuel in the air.

    - -

    Parameters

    -
      -
    • - -

      #string SquadronName : -The name of the squadron.

      - -
    • -
    • - -

      #strig TankerName : -A string defining the group name of the Tanker as defined within the Mission Editor.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -  -- Now Setup the A2A dispatcher, and initialize it using the Detection object.
    -  A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )  
    -  
    -  -- Now Setup the squadron fuel treshold.
    -  A2ADispatcher:SetSquadronRefuelThreshold( "SquadronName", 0.30 ) -- Go RTB when only 30% of fuel remaining in the tank.
    -  
    -  -- Now Setup the squadron tanker.
    -  A2ADispatcher:SetSquadronTanker( "SquadronName", "Tanker" ) -- The group name of the tanker is "Tanker" in the Mission Editor.
    - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:SetTacticalDisplay(TacticalDisplay) - -
    -
    - -

    Display a tactical report every 30 seconds about which aircraft are: - * Patrolling - * Engaging - * Returning - * Damaged - * Out of Fuel - * ...

    - -

    Parameter

    -
      -
    • - -

      #boolean TacticalDisplay : -Provide a value of true to display every 30 seconds a tactical overview.

      - -
    • -
    -

    Return value

    - -

    #AIA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -  -- Now Setup the A2A dispatcher, and initialize it using the Detection object.
    -  A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )  
    -  
    -  -- Now Setup the Tactical Display for debug mode.
    -  A2ADispatcher:SetTacticalDisplay( true )
    -  
    - -
    -
    -
    -
    - - - -AI_A2A_DISPATCHER.TacticalDisplay - -
    -
    - - - -
    -
    -
    -
    - - #AI_A2A_DISPATCHER.Takeoff - -AI_A2A_DISPATCHER.Takeoff - -
    -
    - - - -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:__CAP(Delay) - -
    -
    - -

    CAP Asynchronous Trigger for AIA2ADISPATCHER

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:__ENGAGE(Delay) - -
    -
    - -

    ENGAGE Asynchronous Trigger for AIA2ADISPATCHER

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:__GCI(Delay) - -
    -
    - -

    GCI Asynchronous Trigger for AIA2ADISPATCHER

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:onafterCAP(From, Event, To, SquadronName) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    • - -

      SquadronName :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:onafterENGAGE(From, Event, To, AttackerDetection, Defenders) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    • - -

      AttackerDetection :

      - -
    • -
    • - -

      Defenders :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_DISPATCHER:onafterGCI(From, Event, To, AttackerDetection, DefendersMissing, DefenderFriendlies) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    • - -

      AttackerDetection :

      - -
    • -
    • - -

      DefendersMissing :

      - -
    • -
    • - -

      DefenderFriendlies :

      - -
    • -
    -
    -
    - -

    Type AI_A2A_DISPATCHER.Takeoff

    - -

    Enumerator for spawns at airbases

    - - -

    Type AI_A2A_GCICAP

    -

    Field(s)

    -
    -
    - - - -AI_A2A_GCICAP.CAPTemplates - -
    -
    - - - -
    -
    -
    -
    - - -AI_A2A_GCICAP:New(EWRPrefixes, TemplatePrefixes, CapPrefixes, CapLimit, GroupingRadius, EngageRadius, GciRadius, Resources) - -
    -
    - -

    AIA2AGCICAP constructor.

    - -

    Parameters

    -
      -
    • - -

      #string EWRPrefixes : -A list of prefixes that of groups that setup the Early Warning Radar network.

      - -
    • -
    • - -

      #string TemplatePrefixes : -A list of template prefixes.

      - -
    • -
    • - -

      #string CapPrefixes : -A list of CAP zone prefixes (polygon zones).

      - -
    • -
    • - -

      #number CapLimit : -A number of how many CAP maximum will be spawned.

      - -
    • -
    • - -

      #number GroupingRadius : -The radius in meters wherein detected planes are being grouped as one target area. -For airplanes, 6000 (6km) is recommended, and is also the default value of this parameter.

      - -
    • -
    • - -

      #number EngageRadius : -The radius in meters wherein detected airplanes will be engaged by airborne defenders without a task.

      - -
    • -
    • - -

      #number GciRadius : -The radius in meters wherein detected airplanes will GCI.

      - -
    • -
    • - -

      #number Resources : -The amount of resources that will be allocated to each squadron.

      - -
    • -
    -

    Return value

    - -

    #AIA2AGCICAP:

    - - -

    Usages:

    -
      -
    •   
      -  -- Setup a new GCICAP dispatcher object. Each squadron has unlimited resources.
      -  -- The EWR network group prefix is "DF CCCP". All groups starting with "DF CCCP" will be part of the EWR network.
      -  -- The Squadron Templates prefix is "SQ CCCP". All groups starting with "SQ CCCP" will be considered as airplane templates.
      -  -- The CAP Zone prefix is "CAP Zone".
      -  -- The CAP Limit is 2.
      -  A2ADispatcher = AI_A2A_GCICAP:New( { "DF CCCP" }, { "SQ CCCP" }, { "CAP Zone" }, 2 )  
      -  
    • -
    •   
      -  -- Setup a new GCICAP dispatcher object. Each squadron has unlimited resources.
      -  -- The EWR network group prefix is "DF CCCP". All groups starting with "DF CCCP" will be part of the EWR network.
      -  -- The Squadron Templates prefix is "SQ CCCP". All groups starting with "SQ CCCP" will be considered as airplane templates.
      -  -- The CAP Zone prefix is "CAP Zone".
      -  -- The CAP Limit is 2.
      -  -- The Grouping Radius is set to 20000. Thus all planes within a 20km radius will be grouped as a group of targets.
      -  A2ADispatcher = AI_A2A_GCICAP:New( { "DF CCCP" }, { "SQ CCCP" }, { "CAP Zone" }, 2, 20000 )  
      -  
    • -
    •   
      -  -- Setup a new GCICAP dispatcher object. Each squadron has unlimited resources.
      -  -- The EWR network group prefix is "DF CCCP". All groups starting with "DF CCCP" will be part of the EWR network.
      -  -- The Squadron Templates prefix is "SQ CCCP". All groups starting with "SQ CCCP" will be considered as airplane templates.
      -  -- The CAP Zone prefix is "CAP Zone".
      -  -- The CAP Limit is 2.
      -  -- The Grouping Radius is set to 20000. Thus all planes within a 20km radius will be grouped as a group of targets.
      -  -- The Engage Radius is set to 60000. Any defender without a task, and in healthy condition, 
      -  -- will be considered a defense task if the target is within 60km from the defender.
      -  A2ADispatcher = AI_A2A_GCICAP:New( { "DF CCCP" }, { "SQ CCCP" }, { "CAP Zone" }, 2, 20000, 60000 )  
      -  
    • -
    •   
      -  -- Setup a new GCICAP dispatcher object. Each squadron has unlimited resources.
      -  -- The EWR network group prefix is DF CCCP. All groups starting with DF CCCP will be part of the EWR network.
      -  -- The Squadron Templates prefix is "SQ CCCP". All groups starting with "SQ CCCP" will be considered as airplane templates.
      -  -- The CAP Zone prefix is "CAP Zone".
      -  -- The CAP Limit is 2.
      -  -- The Grouping Radius is set to 20000. Thus all planes within a 20km radius will be grouped as a group of targets.
      -  -- The Engage Radius is set to 60000. Any defender without a task, and in healthy condition, 
      -  -- will be considered a defense task if the target is within 60km from the defender.
      -  -- The GCI Radius is set to 150000. Any target detected within 150km will be considered for GCI engagement.
      -  A2ADispatcher = AI_A2A_GCICAP:New( { "DF CCCP" }, { "SQ CCCP" }, { "CAP Zone" }, 2, 20000, 60000, 150000 )  
      -  
    • -
    •   
      -  -- Setup a new GCICAP dispatcher object. Each squadron has 30 resources.
      -  -- The EWR network group prefix is "DF CCCP". All groups starting with "DF CCCP" will be part of the EWR network.
      -  -- The Squadron Templates prefix is "SQ CCCP". All groups starting with "SQ CCCP" will be considered as airplane templates.
      -  -- The CAP Zone prefix is "CAP Zone".
      -  -- The CAP Limit is 2.
      -  -- The Grouping Radius is set to 20000. Thus all planes within a 20km radius will be grouped as a group of targets.
      -  -- The Engage Radius is set to 60000. Any defender without a task, and in healthy condition, 
      -  -- will be considered a defense task if the target is within 60km from the defender.
      -  -- The GCI Radius is set to 150000. Any target detected within 150km will be considered for GCI engagement.
      -  -- The amount of resources for each squadron is set to 30. Thus about 30 resources are allocated to each squadron created.
      -
      -  A2ADispatcher = AI_A2A_GCICAP:New( { "DF CCCP" }, { "SQ CCCP" }, { "CAP Zone" }, 2, 20000, 60000, 150000, 30 )  
      -  
    • -
    •   
      -  -- Setup a new GCICAP dispatcher object. Each squadron has 30 resources.
      -  -- The EWR network group prefix is "DF CCCP". All groups starting with "DF CCCP" will be part of the EWR network.
      -  -- The Squadron Templates prefix is "SQ CCCP". All groups starting with "SQ CCCP" will be considered as airplane templates.
      -  -- The CAP Zone prefix is nil. No CAP is created.
      -  -- The CAP Limit is nil.
      -  -- The Grouping Radius is nil. The default range of 6km radius will be grouped as a group of targets.
      -  -- The Engage Radius is set nil. The default Engage Radius will be used to consider a defenser being assigned to a task.
      -  -- The GCI Radius is nil. Any target detected within the default GCI Radius will be considered for GCI engagement.
      -  -- The amount of resources for each squadron is set to 30. Thus about 30 resources are allocated to each squadron created.
      -
      -  A2ADispatcher = AI_A2A_GCICAP:New( { "DF CCCP" }, { "SQ CCCP" }, nil, nil, nil, nil, nil, 30 )  
      -  
    • -
    - -
    -
    -
    -
    - - -AI_A2A_GCICAP:NewWithBorder(EWRPrefixes, TemplatePrefixes, BorderPrefix, CapPrefixes, CapLimit, GroupingRadius, EngageRadius, GciRadius, Resources) - -
    -
    - -

    AIA2AGCICAP constructor with border.

    - -

    Parameters

    -
      -
    • - -

      #string EWRPrefixes : -A list of prefixes that of groups that setup the Early Warning Radar network.

      - -
    • -
    • - -

      #string TemplatePrefixes : -A list of template prefixes.

      - -
    • -
    • - -

      #string BorderPrefix : -A Border Zone Prefix.

      - -
    • -
    • - -

      #string CapPrefixes : -A list of CAP zone prefixes (polygon zones).

      - -
    • -
    • - -

      #number CapLimit : -A number of how many CAP maximum will be spawned.

      - -
    • -
    • - -

      #number GroupingRadius : -The radius in meters wherein detected planes are being grouped as one target area. -For airplanes, 6000 (6km) is recommended, and is also the default value of this parameter.

      - -
    • -
    • - -

      #number EngageRadius : -The radius in meters wherein detected airplanes will be engaged by airborne defenders without a task.

      - -
    • -
    • - -

      #number GciRadius : -The radius in meters wherein detected airplanes will GCI.

      - -
    • -
    • - -

      #number Resources : -The amount of resources that will be allocated to each squadron.

      - -
    • -
    -

    Return value

    - -

    #AIA2AGCICAP:

    - - -

    Usages:

    -
      -
    •   
      -  -- Setup a new GCICAP dispatcher object with a border. Each squadron has unlimited resources.
      -  -- The EWR network group prefix is "DF CCCP". All groups starting with "DF CCCP" will be part of the EWR network.
      -  -- The Squadron Templates prefix is "SQ CCCP". All groups starting with "SQ CCCP" will be considered as airplane templates.
      -  -- The CAP Zone prefix is "CAP Zone".
      -  -- The CAP Limit is 2.
      -
      -  A2ADispatcher = AI_A2A_GCICAP:NewWithBorder( { "DF CCCP" }, { "SQ CCCP" }, "Border", { "CAP Zone" }, 2 )  
      -  
    • -
    •   
      -  -- Setup a new GCICAP dispatcher object with a border. Each squadron has unlimited resources.
      -  -- The EWR network group prefix is "DF CCCP". All groups starting with "DF CCCP" will be part of the EWR network.
      -  -- The Squadron Templates prefix is "SQ CCCP". All groups starting with "SQ CCCP" will be considered as airplane templates.
      -  -- The Border prefix is "Border". This will setup a border using the group defined within the mission editor with the name Border.
      -  -- The CAP Zone prefix is "CAP Zone".
      -  -- The CAP Limit is 2.
      -  -- The Grouping Radius is set to 20000. Thus all planes within a 20km radius will be grouped as a group of targets.
      -
      -  A2ADispatcher = AI_A2A_GCICAP:NewWithBorder( { "DF CCCP" }, { "SQ CCCP" }, "Border", { "CAP Zone" }, 2, 20000 )  
      -  
    • -
    •   
      -  -- Setup a new GCICAP dispatcher object with a border. Each squadron has unlimited resources.
      -  -- The EWR network group prefix is "DF CCCP". All groups starting with "DF CCCP" will be part of the EWR network.
      -  -- The Squadron Templates prefix is "SQ CCCP". All groups starting with "SQ CCCP" will be considered as airplane templates.
      -  -- The Border prefix is "Border". This will setup a border using the group defined within the mission editor with the name Border.
      -  -- The CAP Zone prefix is "CAP Zone".
      -  -- The CAP Limit is 2.
      -  -- The Grouping Radius is set to 20000. Thus all planes within a 20km radius will be grouped as a group of targets.
      -  -- The Engage Radius is set to 60000. Any defender without a task, and in healthy condition, 
      -  -- will be considered a defense task if the target is within 60km from the defender.
      -
      -  A2ADispatcher = AI_A2A_GCICAP:NewWithBorder( { "DF CCCP" }, { "SQ CCCP" }, "Border", { "CAP Zone" }, 2, 20000, 60000 )  
      -  
    • -
    •   
      -  -- Setup a new GCICAP dispatcher object with a border. Each squadron has unlimited resources.
      -  -- The EWR network group prefix is "DF CCCP". All groups starting with "DF CCCP" will be part of the EWR network.
      -  -- The Squadron Templates prefix is "SQ CCCP". All groups starting with "SQ CCCP" will be considered as airplane templates.
      -  -- The Border prefix is "Border". This will setup a border using the group defined within the mission editor with the name Border.
      -  -- The CAP Zone prefix is "CAP Zone".
      -  -- The CAP Limit is 2.
      -  -- The Grouping Radius is set to 20000. Thus all planes within a 20km radius will be grouped as a group of targets.
      -  -- The Engage Radius is set to 60000. Any defender without a task, and in healthy condition, 
      -  -- will be considered a defense task if the target is within 60km from the defender.
      -  -- The GCI Radius is set to 150000. Any target detected within 150km will be considered for GCI engagement.
      -
      -  A2ADispatcher = AI_A2A_GCICAP:NewWithBorder( { "DF CCCP" }, { "SQ CCCP" }, "Border", { "CAP Zone" }, 2, 20000, 60000, 150000 )  
      -  
    • -
    •   
      -  -- Setup a new GCICAP dispatcher object with a border. Each squadron has 30 resources.
      -  -- The EWR network group prefix is "DF CCCP". All groups starting with "DF CCCP" will be part of the EWR network.
      -  -- The Squadron Templates prefix is "SQ CCCP". All groups starting with "SQ CCCP" will be considered as airplane templates.
      -  -- The Border prefix is "Border". This will setup a border using the group defined within the mission editor with the name Border.
      -  -- The CAP Zone prefix is "CAP Zone".
      -  -- The CAP Limit is 2.
      -  -- The Grouping Radius is set to 20000. Thus all planes within a 20km radius will be grouped as a group of targets.
      -  -- The Engage Radius is set to 60000. Any defender without a task, and in healthy condition, 
      -  -- will be considered a defense task if the target is within 60km from the defender.
      -  -- The GCI Radius is set to 150000. Any target detected within 150km will be considered for GCI engagement.
      -  -- The amount of resources for each squadron is set to 30. Thus about 30 resources are allocated to each squadron created.
      -
      -  A2ADispatcher = AI_A2A_GCICAP:NewWithBorder( { "DF CCCP" }, { "SQ CCCP" }, "Border", { "CAP Zone" }, 2, 20000, 60000, 150000, 30 )  
      -  
    • -
    •   
      -  -- Setup a new GCICAP dispatcher object with a border. Each squadron has 30 resources.
      -  -- The EWR network group prefix is "DF CCCP". All groups starting with "DF CCCP" will be part of the EWR network.
      -  -- The Squadron Templates prefix is "SQ CCCP". All groups starting with "SQ CCCP" will be considered as airplane templates.
      -  -- The Border prefix is "Border". This will setup a border using the group defined within the mission editor with the name Border.
      -  -- The CAP Zone prefix is nil. No CAP is created.
      -  -- The CAP Limit is nil.
      -  -- The Grouping Radius is nil. The default range of 6km radius will be grouped as a group of targets.
      -  -- The Engage Radius is set nil. The default Engage Radius will be used to consider a defenser being assigned to a task.
      -  -- The GCI Radius is nil. Any target detected within the default GCI Radius will be considered for GCI engagement.
      -  -- The amount of resources for each squadron is set to 30. Thus about 30 resources are allocated to each squadron created.
      -
      -  A2ADispatcher = AI_A2A_GCICAP:NewWithBorder( { "DF CCCP" }, { "SQ CCCP" }, "Border", nil, nil, nil, nil, nil, 30 )  
      -  
    • -
    - -
    -
    -
    -
    - - - -AI_A2A_GCICAP.Templates - -
    -
    - - - -
    -
    - -

    Type list

    - -

    Type strig

    - -
    - -
    - - diff --git a/docs/Documentation/AI_A2A_GCI.html b/docs/Documentation/AI_A2A_GCI.html deleted file mode 100644 index 6541c5258..000000000 --- a/docs/Documentation/AI_A2A_GCI.html +++ /dev/null @@ -1,1633 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module AI_A2A_GCI

    - -

    AI -- Execute Ground Controlled Interception (GCI).

    - -

    Banner Image

    - -
    - -

    AI A2A_INTEREPT class makes AI Groups execute an Intercept.

    - - - -

    There are the following types of GCI classes defined:

    - - - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - -
    AI_A2A_GCI -

    AIA2AGCI class, extends AIA2A#AIA2A

    - -

    The AIA2AGCI class implements the core functions to intercept intruders.

    -
    -

    Type AI_A2A_GCI

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AI_A2A_GCI:Abort() -

    Synchronous Event Trigger for Event Abort.

    -
    AI_A2A_GCI:Accomplish() -

    Synchronous Event Trigger for Event Accomplish.

    -
    AI_A2A_GCI.Accomplished - -
    AI_A2A_GCI.AttackSetUnit - -
    AI_A2A_GCI:Destroy() -

    Synchronous Event Trigger for Event Destroy.

    -
    AI_A2A_GCI:Engage() -

    Synchronous Event Trigger for Event Engage.

    -
    AI_A2A_GCI.EngageMaxSpeed - -
    AI_A2A_GCI.EngageMinSpeed - -
    AI_A2A_GCI.Engaging - -
    AI_A2A_GCI:Fired() -

    Synchronous Event Trigger for Event Fired.

    -
    AI_A2A_GCI.InterceptRoute(AIControllable, AIIntercept, Fsm) - -
    AI_A2A_GCI:New(AIIntercept, EngageMinSpeed, EngageMaxSpeed) -

    Creates a new AIA2AGCI object

    -
    AI_A2A_GCI:OnAfterAbort(AIIntercept, From, Event, To) -

    OnAfter Transition Handler for Event Abort.

    -
    AI_A2A_GCI:OnAfterAccomplish(AIIntercept, From, Event, To) -

    OnAfter Transition Handler for Event Accomplish.

    -
    AI_A2A_GCI:OnAfterDestroy(AIIntercept, From, Event, To) -

    OnAfter Transition Handler for Event Destroy.

    -
    AI_A2A_GCI:OnAfterEngage(AIIntercept, From, Event, To) -

    OnAfter Transition Handler for Event Engage.

    -
    AI_A2A_GCI:OnAfterFired(AIIntercept, From, Event, To) -

    OnAfter Transition Handler for Event Fired.

    -
    AI_A2A_GCI:OnBeforeAbort(AIIntercept, From, Event, To) -

    OnBefore Transition Handler for Event Abort.

    -
    AI_A2A_GCI:OnBeforeAccomplish(AIIntercept, From, Event, To) -

    OnBefore Transition Handler for Event Accomplish.

    -
    AI_A2A_GCI:OnBeforeDestroy(AIIntercept, From, Event, To) -

    OnBefore Transition Handler for Event Destroy.

    -
    AI_A2A_GCI:OnBeforeEngage(AIIntercept, From, Event, To) -

    OnBefore Transition Handler for Event Engage.

    -
    AI_A2A_GCI:OnBeforeFired(AIIntercept, From, Event, To) -

    OnBefore Transition Handler for Event Fired.

    -
    AI_A2A_GCI:OnEnterEngaging(AIIntercept, From, Event, To) -

    OnEnter Transition Handler for State Engaging.

    -
    AI_A2A_GCI:OnEventDead(EventData) - -
    AI_A2A_GCI:OnLeaveEngaging(AIIntercept, From, Event, To) -

    OnLeave Transition Handler for State Engaging.

    -
    AI_A2A_GCI.PatrolAltType - -
    AI_A2A_GCI.PatrolMaxSpeed - -
    AI_A2A_GCI.PatrolMinSpeed - -
    AI_A2A_GCI:__Abort(Delay) -

    Asynchronous Event Trigger for Event Abort.

    -
    AI_A2A_GCI:__Accomplish(Delay) -

    Asynchronous Event Trigger for Event Accomplish.

    -
    AI_A2A_GCI:__Destroy(Delay) -

    Asynchronous Event Trigger for Event Destroy.

    -
    AI_A2A_GCI:__Engage(Delay) -

    Asynchronous Event Trigger for Event Engage.

    -
    AI_A2A_GCI:__Fired(Delay) -

    Asynchronous Event Trigger for Event Fired.

    -
    AI_A2A_GCI:onafterAbort(AIIntercept, From, Event, To) - -
    AI_A2A_GCI:onafterAccomplish(AIIntercept, From, Event, To) - -
    AI_A2A_GCI:onafterDestroy(AIIntercept, From, Event, To, EventData) - -
    AI_A2A_GCI:onafterEngage(AIIntercept, From, Event, To) -

    onafter State Transition for Event Patrol.

    -
    AI_A2A_GCI:onafterStart(AIIntercept, From, Event, To) -

    onafter State Transition for Event Patrol.

    -
    AI_A2A_GCI:onbeforeEngage(AIIntercept, From, Event, To) - -
    - -

    Global(s)

    -
    -
    - - #AI_A2A_GCI - -AI_A2A_GCI - -
    -
    - -

    AIA2AGCI class, extends AIA2A#AIA2A

    - -

    The AIA2AGCI class implements the core functions to intercept intruders.

    - - -

    The Engage function will intercept intruders.

    - -

    Process

    - -

    The AIA2AGCI is assigned a Group and this must be done before the AIA2AGCI process can be started using the Start event.

    - -

    Process

    - -

    The AI will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits. -Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits.

    - -

    Process

    - -

    This cycle will continue.

    - -

    Process

    - -

    During the patrol, the AI will detect enemy targets, which are reported through the Detected event.

    - -

    Process

    - -

    When enemies are detected, the AI will automatically engage the enemy.

    - -

    Process

    - -

    Until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB. -When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.

    - -

    Process

    - -

    1. AIA2AGCI constructor

    - - - -

    2. AIA2AGCI is a FSM

    - -

    Process

    - -

    2.1 AIA2AGCI States

    - -
      -
    • None ( Group ): The process is not started yet.
    • -
    • Patrolling ( Group ): The AI is patrolling the Patrol Zone.
    • -
    • Engaging ( Group ): The AI is engaging the bogeys.
    • -
    • Returning ( Group ): The AI is returning to Base..
    • -
    - -

    2.2 AIA2AGCI Events

    - - - -

    3. Set the Range of Engagement

    - -

    Range

    - -

    An optional range can be set in meters, -that will define when the AI will engage with the detected airborne enemy targets. -The range can be beyond or smaller than the range of the Patrol Zone. -The range is applied at the position of the AI. -Use the method AIGCI#AIA2A_GCI.SetEngageRange() to define that range.

    - -

    4. Set the Zone of Engagement

    - -

    Zone

    - -

    An optional Zone can be set, -that will define when the AI will engage with the detected airborne enemy targets. -Use the method AICap#AIA2A_GCI.SetEngageZone() to define that Zone.

    - -
    - - -
    -
    -

    Type AI_A2A_GCI

    -

    Field(s)

    -
    -
    - - -AI_A2A_GCI:Abort() - -
    -
    - -

    Synchronous Event Trigger for Event Abort.

    - -
    -
    -
    -
    - - -AI_A2A_GCI:Accomplish() - -
    -
    - -

    Synchronous Event Trigger for Event Accomplish.

    - -
    -
    -
    -
    - - #boolean - -AI_A2A_GCI.Accomplished - -
    -
    - - - -
    -
    -
    -
    - - Core.Set#SET_UNIT - -AI_A2A_GCI.AttackSetUnit - -
    -
    - - - -
    -
    -
    -
    - - -AI_A2A_GCI:Destroy() - -
    -
    - -

    Synchronous Event Trigger for Event Destroy.

    - -
    -
    -
    -
    - - -AI_A2A_GCI:Engage() - -
    -
    - -

    Synchronous Event Trigger for Event Engage.

    - -
    -
    -
    -
    - - - -AI_A2A_GCI.EngageMaxSpeed - -
    -
    - - - -
    -
    -
    -
    - - - -AI_A2A_GCI.EngageMinSpeed - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -AI_A2A_GCI.Engaging - -
    -
    - - - -
    -
    -
    -
    - - -AI_A2A_GCI:Fired() - -
    -
    - -

    Synchronous Event Trigger for Event Fired.

    - -
    -
    -
    -
    - - -AI_A2A_GCI.InterceptRoute(AIControllable, AIIntercept, Fsm) - -
    -
    - - - -

    Parameters

    - -
    -
    -
    -
    - - -AI_A2A_GCI:New(AIIntercept, EngageMinSpeed, EngageMaxSpeed) - -
    -
    - -

    Creates a new AIA2AGCI object

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIIntercept :

      - -
    • -
    • - -

      EngageMinSpeed :

      - -
    • -
    • - -

      EngageMaxSpeed :

      - -
    • -
    -

    Return value

    - -

    #AIA2AGCI:

    - - -
    -
    -
    -
    - - -AI_A2A_GCI:OnAfterAbort(AIIntercept, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Abort.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIIntercept : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_GCI:OnAfterAccomplish(AIIntercept, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Accomplish.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIIntercept : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_GCI:OnAfterDestroy(AIIntercept, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Destroy.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIIntercept : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_GCI:OnAfterEngage(AIIntercept, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Engage.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIIntercept : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_GCI:OnAfterFired(AIIntercept, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Fired.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIIntercept : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_GCI:OnBeforeAbort(AIIntercept, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Abort.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIIntercept : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_A2A_GCI:OnBeforeAccomplish(AIIntercept, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Accomplish.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIIntercept : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_A2A_GCI:OnBeforeDestroy(AIIntercept, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Destroy.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIIntercept : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_A2A_GCI:OnBeforeEngage(AIIntercept, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Engage.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIIntercept : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_A2A_GCI:OnBeforeFired(AIIntercept, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Fired.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIIntercept : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_A2A_GCI:OnEnterEngaging(AIIntercept, From, Event, To) - -
    -
    - -

    OnEnter Transition Handler for State Engaging.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIIntercept : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_GCI:OnEventDead(EventData) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -AI_A2A_GCI:OnLeaveEngaging(AIIntercept, From, Event, To) - -
    -
    - -

    OnLeave Transition Handler for State Engaging.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIIntercept : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - #string - -AI_A2A_GCI.PatrolAltType - -
    -
    - - - -
    -
    -
    -
    - - - -AI_A2A_GCI.PatrolMaxSpeed - -
    -
    - - - -
    -
    -
    -
    - - - -AI_A2A_GCI.PatrolMinSpeed - -
    -
    - - - -
    -
    -
    -
    - - -AI_A2A_GCI:__Abort(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Abort.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_GCI:__Accomplish(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Accomplish.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_GCI:__Destroy(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Destroy.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_GCI:__Engage(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Engage.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_GCI:__Fired(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Fired.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_GCI:onafterAbort(AIIntercept, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIIntercept : -The AI Group managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_GCI:onafterAccomplish(AIIntercept, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIIntercept : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_GCI:onafterDestroy(AIIntercept, From, Event, To, EventData) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIIntercept : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    • - -

      Core.Event#EVENTDATA EventData :

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_GCI:onafterEngage(AIIntercept, From, Event, To) - -
    -
    - -

    onafter State Transition for Event Patrol.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIIntercept : -The AI Group managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_GCI:onafterStart(AIIntercept, From, Event, To) - -
    -
    - -

    onafter State Transition for Event Patrol.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIIntercept : -The AI Group managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_GCI:onbeforeEngage(AIIntercept, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIIntercept : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/AI_A2A_Patrol.html b/docs/Documentation/AI_A2A_Patrol.html deleted file mode 100644 index 4c7a43bc0..000000000 --- a/docs/Documentation/AI_A2A_Patrol.html +++ /dev/null @@ -1,1138 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module AI_A2A_Patrol

    - -

    AI -- Air Patrolling or Staging.

    - -

    Banner Image

    - -
    - -

    AI PATROL classes makes AI Groups execute an Patrol.

    - - - -

    There are the following types of PATROL classes defined:

    - - - -
    - -

    Demo Missions

    - -

    AI_PATROL Demo Missions source code

    - -

    AI_PATROL Demo Missions, only for beta testers

    - -

    ALL Demo Missions pack of the last release

    - -
    - -

    YouTube Channel

    - -

    AI_PATROL YouTube Channel

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    -

    Contributions:

    - -
      -
    • Dutch_Baron: Working together with James has resulted in the creation of the AI_BALANCER class. James has shared his ideas on balancing AI with air units, and together we made a first design which you can use now :-)
    • -
    • Pikey: Testing and API concept review.
    • -
    - -
    - - -

    Global(s)

    - - - - - -
    AI_A2A_PATROL -

    AIA2APATROL class, extends Fsm#FSM_CONTROLLABLE

    - -

    The AIA2APATROL class implements the core functions to patrol a Zone by an AI Group or Group.

    -
    -

    Type AI_A2A_PATROL

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AI_A2A_PATROL:New(AIPatrol, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType) -

    Creates a new AIA2APATROL object

    -
    AI_A2A_PATROL:OnAfterPatrol(AIPatrol, From, Event, To) -

    OnAfter Transition Handler for Event Patrol.

    -
    AI_A2A_PATROL:OnAfterRoute(AIPatrol, From, Event, To) -

    OnAfter Transition Handler for Event Route.

    -
    AI_A2A_PATROL:OnBeforePatrol(AIPatrol, From, Event, To) -

    OnBefore Transition Handler for Event Patrol.

    -
    AI_A2A_PATROL:OnBeforeRoute(AIPatrol, From, Event, To) -

    OnBefore Transition Handler for Event Route.

    -
    AI_A2A_PATROL:OnEnterPatrolling(AIPatrol, From, Event, To) -

    OnEnter Transition Handler for State Patrolling.

    -
    AI_A2A_PATROL:OnLeavePatrolling(AIPatrol, From, Event, To) -

    OnLeave Transition Handler for State Patrolling.

    -
    AI_A2A_PATROL:Patrol() -

    Synchronous Event Trigger for Event Patrol.

    -
    AI_A2A_PATROL.PatrolAltType - -
    AI_A2A_PATROL.PatrolCeilingAltitude - -
    AI_A2A_PATROL.PatrolFloorAltitude - -
    AI_A2A_PATROL.PatrolMaxSpeed - -
    AI_A2A_PATROL.PatrolMinSpeed - -
    AI_A2A_PATROL.PatrolRoute(AIPatrol, Fsm) - -
    AI_A2A_PATROL.PatrolZone - -
    AI_A2A_PATROL.Resume(AIPatrol) - -
    AI_A2A_PATROL:Route() -

    Synchronous Event Trigger for Event Route.

    -
    AI_A2A_PATROL:SetAltitude(PatrolFloorAltitude, PatrolCeilingAltitude) -

    Sets the floor and ceiling altitude of the patrol.

    -
    AI_A2A_PATROL:SetSpeed(PatrolMinSpeed, PatrolMaxSpeed) -

    Sets (modifies) the minimum and maximum speed of the patrol.

    -
    AI_A2A_PATROL:__Patrol(Delay) -

    Asynchronous Event Trigger for Event Patrol.

    -
    AI_A2A_PATROL:__Route(Delay) -

    Asynchronous Event Trigger for Event Route.

    -
    AI_A2A_PATROL:onafterPatrol(AIPatrol, From, Event, To) -

    Defines a new patrol route using the Process_PatrolZone parameters and settings.

    -
    AI_A2A_PATROL:onafterRoute(AIPatrol, From, Event, To) -

    Defines a new patrol route using the Process_PatrolZone parameters and settings.

    -
    - -

    Global(s)

    -
    -
    - - #AI_A2A_PATROL - -AI_A2A_PATROL - -
    -
    - -

    AIA2APATROL class, extends Fsm#FSM_CONTROLLABLE

    - -

    The AIA2APATROL class implements the core functions to patrol a Zone by an AI Group or Group.

    - - - -

    Process

    - -

    The AIA2APATROL is assigned a Group and this must be done before the AIA2APATROL process can be started using the Start event.

    - -

    Process

    - -

    The AI will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits. -Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits.

    - -

    Process

    - -

    This cycle will continue.

    - -

    Process

    - -

    During the patrol, the AI will detect enemy targets, which are reported through the Detected event.

    - -

    Process

    - -

    -- Note that the enemy is not engaged! To model enemy engagement, either tailor the Detected event, or -use derived AI_ classes to model AI offensive or defensive behaviour.

    - -

    Process

    - -

    Until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB. -When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.

    - -

    Process

    - -

    1. AIA2APATROL constructor

    - - - -

    2. AIA2APATROL is a FSM

    - -

    Process

    - -

    2.1. AIA2APATROL States

    - -
      -
    • None ( Group ): The process is not started yet.
    • -
    • Patrolling ( Group ): The AI is patrolling the Patrol Zone.
    • -
    • Returning ( Group ): The AI is returning to Base.
    • -
    • Stopped ( Group ): The process is stopped.
    • -
    • Crashed ( Group ): The AI has crashed or is dead.
    • -
    - -

    2.2. AIA2APATROL Events

    - -
      -
    • Start ( Group ): Start the process.
    • -
    • Stop ( Group ): Stop the process.
    • -
    • Route ( Group ): Route the AI to a new random 3D point within the Patrol Zone.
    • -
    • RTB ( Group ): Route the AI to the home base.
    • -
    • Detect ( Group ): The AI is detecting targets.
    • -
    • Detected ( Group ): The AI has detected new targets.
    • -
    • Status ( Group ): The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB.
    • -
    - -

    3. Set or Get the AI controllable

    - - - -

    4. Set the Speed and Altitude boundaries of the AI controllable

    - - - -

    5. Manage the detection process of the AI controllable

    - -

    The detection process of the AI controllable can be manipulated. -Detection requires an amount of CPU power, which has an impact on your mission performance. -Only put detection on when absolutely necessary, and the frequency of the detection can also be set.

    - - - -

    The detection frequency can be set with AIA2APATROL.SetRefreshTimeInterval( seconds ), where the amount of seconds specify how much seconds will be waited before the next detection. -Use the method AIA2APATROL.GetDetectedUnits() to obtain a list of the Units detected by the AI.

    - -

    The detection can be filtered to potential targets in a specific zone. -Use the method AIA2APATROL.SetDetectionZone() to set the zone where targets need to be detected. -Note that when the zone is too far away, or the AI is not heading towards the zone, or the AI is too high, no targets may be detected -according the weather conditions.

    - -

    6. Manage the "out of fuel" in the AIA2APATROL

    - -

    When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base. -Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated. -When the fuel treshold is reached, the AI will continue for a given time its patrol task in orbit, -while a new AI is targetted to the AIA2APATROL. -Once the time is finished, the old AI will return to the base. -Use the method AIA2APATROL.ManageFuel() to have this proces in place.

    - -

    7. Manage "damage" behaviour of the AI in the AIA2APATROL

    - -

    When the AI is damaged, it is required that a new Patrol is started. However, damage cannon be foreseen early on. -Therefore, when the damage treshold is reached, the AI will return immediately to the home base (RTB). -Use the method AIA2APATROL.ManageDamage() to have this proces in place.

    - -
    - - -
    -
    -

    Type AI_A2A_Patrol

    - -

    Type AI_A2A

    - -

    Type AI_A2A_PATROL

    -

    Field(s)

    -
    -
    - - -AI_A2A_PATROL:New(AIPatrol, PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType) - -
    -
    - -

    Creates a new AIA2APATROL object

    - -

    Parameters

    - -

    Return value

    - -

    #AIA2APATROL: -self

    - -

    Usage:

    -
    -- Define a new AI_A2A_PATROL Object. This PatrolArea will patrol a Group within PatrolZone between 3000 and 6000 meters, with a variying speed between 600 and 900 km/h.
    -PatrolZone = ZONE:New( 'PatrolZone' )
    -PatrolSpawn = SPAWN:New( 'Patrol Group' )
    -PatrolArea = AI_A2A_PATROL:New( PatrolZone, 3000, 6000, 600, 900 )
    - -
    -
    -
    -
    - - -AI_A2A_PATROL:OnAfterPatrol(AIPatrol, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Patrol.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIPatrol : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_PATROL:OnAfterRoute(AIPatrol, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Route.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIPatrol : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_PATROL:OnBeforePatrol(AIPatrol, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Patrol.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIPatrol : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_A2A_PATROL:OnBeforeRoute(AIPatrol, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Route.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIPatrol : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_A2A_PATROL:OnEnterPatrolling(AIPatrol, From, Event, To) - -
    -
    - -

    OnEnter Transition Handler for State Patrolling.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIPatrol : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_PATROL:OnLeavePatrolling(AIPatrol, From, Event, To) - -
    -
    - -

    OnLeave Transition Handler for State Patrolling.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIPatrol : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_A2A_PATROL:Patrol() - -
    -
    - -

    Synchronous Event Trigger for Event Patrol.

    - -
    -
    -
    -
    - - -AI_A2A_PATROL.PatrolAltType - -
    -
    - - - - -

    defafult PatrolAltType to "RADIO" if not specified

    - -
    -
    -
    -
    - - - -AI_A2A_PATROL.PatrolCeilingAltitude - -
    -
    - - - -
    -
    -
    -
    - - - -AI_A2A_PATROL.PatrolFloorAltitude - -
    -
    - - - -
    -
    -
    -
    - - - -AI_A2A_PATROL.PatrolMaxSpeed - -
    -
    - - - -
    -
    -
    -
    - - - -AI_A2A_PATROL.PatrolMinSpeed - -
    -
    - - - -
    -
    -
    -
    - - -AI_A2A_PATROL.PatrolRoute(AIPatrol, Fsm) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIPatrol : -This statis method is called from the route path within the last task at the last waaypoint of the AIPatrol. -Note that this method is required, as triggers the next route when patrolling for the AIPatrol.

      - -
    • -
    • - -

      Fsm :

      - -
    • -
    -
    -
    -
    -
    - - - -AI_A2A_PATROL.PatrolZone - -
    -
    - - - -
    -
    -
    -
    - - -AI_A2A_PATROL.Resume(AIPatrol) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -AI_A2A_PATROL:Route() - -
    -
    - -

    Synchronous Event Trigger for Event Route.

    - -
    -
    -
    -
    - - -AI_A2A_PATROL:SetAltitude(PatrolFloorAltitude, PatrolCeilingAltitude) - -
    -
    - -

    Sets the floor and ceiling altitude of the patrol.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Altitude PatrolFloorAltitude : -The lowest altitude in meters where to execute the patrol.

      - -
    • -
    • - -

      Dcs.DCSTypes#Altitude PatrolCeilingAltitude : -The highest altitude in meters where to execute the patrol.

      - -
    • -
    -

    Return value

    - -

    #AIA2APATROL: -self

    - -
    -
    -
    -
    - - -AI_A2A_PATROL:SetSpeed(PatrolMinSpeed, PatrolMaxSpeed) - -
    -
    - -

    Sets (modifies) the minimum and maximum speed of the patrol.

    - -

    Parameters

    - -

    Return value

    - -

    #AIA2APATROL: -self

    - -
    -
    -
    -
    - - -AI_A2A_PATROL:__Patrol(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Patrol.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_PATROL:__Route(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Route.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_A2A_PATROL:onafterPatrol(AIPatrol, From, Event, To) - -
    -
    - -

    Defines a new patrol route using the Process_PatrolZone parameters and settings.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIPatrol : -The Group Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #AIA2APATROL: -self

    - -
    -
    -
    -
    - - -AI_A2A_PATROL:onafterRoute(AIPatrol, From, Event, To) - -
    -
    - -

    Defines a new patrol route using the Process_PatrolZone parameters and settings.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AIPatrol : -The Group managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/AI_BAI.html b/docs/Documentation/AI_BAI.html deleted file mode 100644 index ae56eb113..000000000 --- a/docs/Documentation/AI_BAI.html +++ /dev/null @@ -1,1992 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module AI_Bai

    - -

    AI -- Provide Battlefield Air Interdiction (bombing).

    - -

    Banner Image

    - -
    - -

    AI_BAI classes makes AI Controllables execute bombing tasks.

    - - - -

    There are the following types of BAI classes defined:

    - - - -
    - -

    Demo Missions

    - -

    AI_BAI Demo Missions source code

    - -

    AI_BAI Demo Missions, only for beta testers

    - -

    ALL Demo Missions pack of the last release

    - -
    - -

    YouTube Channel

    - -

    AI_BAI YouTube Channel

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions:

    - - - -
    - - -

    Global(s)

    - - - - - - - - - -
    AI_BAI_ZONE -

    AIBAIZONE class, extends AIPatrol#AIPATROL_ZONE

    - -

    AIBAIZONE derives from the AIPatrol#AIPATROL_ZONE, inheriting its methods and behaviour.

    -
    _NewEngageRoute(AIControllable) - -
    -

    Type AI_BAI_ZONE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AI_BAI_ZONE.AIControllable -

    The Controllable patrolling.

    -
    AI_BAI_ZONE:Abort() -

    Synchronous Event Trigger for Event Abort.

    -
    AI_BAI_ZONE:Accomplish() -

    Synchronous Event Trigger for Event Accomplish.

    -
    AI_BAI_ZONE.Accomplished - -
    AI_BAI_ZONE:Destroy() -

    Synchronous Event Trigger for Event Destroy.

    -
    AI_BAI_ZONE:Engage(EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) -

    Synchronous Event Trigger for Event Engage.

    -
    AI_BAI_ZONE.EngageAltitude - -
    AI_BAI_ZONE.EngageAttackQty - -
    AI_BAI_ZONE.EngageDirection - -
    AI_BAI_ZONE.EngageSpeed - -
    AI_BAI_ZONE.EngageWeaponExpend - -
    AI_BAI_ZONE.EngageZone - -
    AI_BAI_ZONE:Fired() -

    Synchronous Event Trigger for Event Fired.

    -
    AI_BAI_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageZone, PatrolAltType) -

    Creates a new AIBAIZONE object

    -
    AI_BAI_ZONE:OnAfterAbort(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event Abort.

    -
    AI_BAI_ZONE:OnAfterAccomplish(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event Accomplish.

    -
    AI_BAI_ZONE:OnAfterDestroy(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event Destroy.

    -
    AI_BAI_ZONE:OnAfterEngage(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event Engage.

    -
    AI_BAI_ZONE:OnAfterFired(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event Fired.

    -
    AI_BAI_ZONE:OnBeforeAbort(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event Abort.

    -
    AI_BAI_ZONE:OnBeforeAccomplish(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event Accomplish.

    -
    AI_BAI_ZONE:OnBeforeDestroy(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event Destroy.

    -
    AI_BAI_ZONE:OnBeforeEngage(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event Engage.

    -
    AI_BAI_ZONE:OnBeforeFired(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event Fired.

    -
    AI_BAI_ZONE:OnEnterEngaging(Controllable, From, Event, To) -

    OnEnter Transition Handler for State Engaging.

    -
    AI_BAI_ZONE:OnEventDead(EventData) - -
    AI_BAI_ZONE:OnLeaveEngaging(Controllable, From, Event, To) -

    OnLeave Transition Handler for State Engaging.

    -
    AI_BAI_ZONE.Search - -
    AI_BAI_ZONE:SearchOff() -

    If Search is Off, the current zone coordinate will be the center of the bombing.

    -
    AI_BAI_ZONE:SearchOn() -

    If Search is On, BAI will search for potential targets in the zone.

    -
    AI_BAI_ZONE:SearchOnOff(Search) -

    Specifies whether to search for potential targets in the zone, or let the center of the zone be the bombing coordinate.

    -
    AI_BAI_ZONE:SetEngageZone(EngageZone) -

    Set the Engage Zone where the AI is performing BOMB.

    -
    AI_BAI_ZONE.TargetZone -

    The Zone where the patrol needs to be executed.

    -
    AI_BAI_ZONE:__Abort(Delay) -

    Asynchronous Event Trigger for Event Abort.

    -
    AI_BAI_ZONE:__Accomplish(Delay) -

    Asynchronous Event Trigger for Event Accomplish.

    -
    AI_BAI_ZONE:__Destroy(Delay) -

    Asynchronous Event Trigger for Event Destroy.

    -
    AI_BAI_ZONE:__Engage(Delay, EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) -

    Asynchronous Event Trigger for Event Engage.

    -
    AI_BAI_ZONE:__Fired(Delay) -

    Asynchronous Event Trigger for Event Fired.

    -
    AI_BAI_ZONE:onafterAbort(Controllable, From, Event, To) - -
    AI_BAI_ZONE:onafterAccomplish(Controllable, From, Event, To) - -
    AI_BAI_ZONE:onafterDestroy(Controllable, From, Event, To, EventData) - -
    AI_BAI_ZONE:onafterEngage(Controllable, From, Event, To, EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) - -
    AI_BAI_ZONE:onafterStart(Controllable, From, Event, To) -

    onafter State Transition for Event Start.

    -
    AI_BAI_ZONE:onafterTarget(Controllable, From, Event, To) - -
    AI_BAI_ZONE:onbeforeEngage(Controllable, From, Event, To) - -
    - -

    Global(s)

    -
    -
    - - #AI_BAI_ZONE - -AI_BAI_ZONE - -
    -
    - -

    AIBAIZONE class, extends AIPatrol#AIPATROL_ZONE

    - -

    AIBAIZONE derives from the AIPatrol#AIPATROL_ZONE, inheriting its methods and behaviour.

    - - -

    -The AIBAIZONE class implements the core functions to provide BattleGround Air Interdiction in an Engage Zone by an AIR Controllable or Group. -The AIBAIZONE runs a process. It holds an AI in a Patrol Zone and when the AI is commanded to engage, it will fly to an Engage Zone.

    - -

    HoldAndEngage

    - -

    The AIBAIZONE is assigned a Group and this must be done before the AIBAIZONE process can be started through the Start event.

    - -

    Start Event

    - -

    Upon started, The AI will Route itself towards the random 3D point within a patrol zone, -using a random speed within the given altitude and speed limits. -Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits. -This cycle will continue until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB.

    - -

    Route Event

    - -

    When the AI is commanded to provide BattleGround Air Interdiction (through the event Engage), the AI will fly towards the Engage Zone. -Any target that is detected in the Engage Zone will be reported and will be destroyed by the AI.

    - -

    Engage Event

    - -

    The AI will detect the targets and will only destroy the targets within the Engage Zone.

    - -

    Engage Event

    - -

    Every target that is destroyed, is reported< by the AI.

    - -

    Engage Event

    - -

    Note that the AI does not know when the Engage Zone is cleared, and therefore will keep circling in the zone.

    - -

    Engage Event

    - -

    Until it is notified through the event Accomplish, which is to be triggered by an observing party:

    - -
      -
    • a FAC
    • -
    • a timed event
    • -
    • a menu option selected by a human
    • -
    • a condition
    • -
    • others ...
    • -
    - -

    Engage Event

    - -

    When the AI has accomplished the Bombing, it will fly back to the Patrol Zone.

    - -

    Engage Event

    - -

    It will keep patrolling there, until it is notified to RTB or move to another BOMB Zone. -It can be notified to go RTB through the RTB event.

    - -

    When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.

    - -

    Engage Event

    - -

    1. AIBAIZONE constructor

    - - - -

    2. AIBAIZONE is a FSM

    - -

    Process

    - -

    2.1. AIBAIZONE States

    - -
      -
    • None ( Group ): The process is not started yet.
    • -
    • Patrolling ( Group ): The AI is patrolling the Patrol Zone.
    • -
    • Engaging ( Group ): The AI is engaging the targets in the Engage Zone, executing BOMB.
    • -
    • Returning ( Group ): The AI is returning to Base..
    • -
    - -

    2.2. AIBAIZONE Events

    - - - -

    3. Modify the Engage Zone behaviour to pinpoint a map object or scenery object

    - -

    Use the method AIBAIZONE.SearchOff() to specify that the EngageZone is not to be searched for potential targets (UNITs), but that the center of the zone -is the point where a map object is to be destroyed (like a bridge).

    - -

    Example:

    - -
     -- Tell the BAI not to search for potential targets in the BAIEngagementZone, but rather use the center of the BAIEngagementZone as the bombing location.
    - AIBAIZone:SearchOff()
    -
    - -

    Searching can be switched back on with the method AIBAIZONE.SearchOn(). Use the method AIBAIZONE.SearchOnOff() to flexibily switch searching on or off.

    - -
    - - -
    -
    -
    -
    - - -_NewEngageRoute(AIControllable) - -
    -
    - - - -

    Parameter

    - -
    -
    -

    Type AI_Bai

    - -

    Type AI_BAI_ZONE

    - -

    AIBAIZONE class

    - -

    Field(s)

    -
    -
    - - Wrapper.Controllable#CONTROLLABLE - -AI_BAI_ZONE.AIControllable - -
    -
    - -

    The Controllable patrolling.

    - -
    -
    -
    -
    - - -AI_BAI_ZONE:Abort() - -
    -
    - -

    Synchronous Event Trigger for Event Abort.

    - -
    -
    -
    -
    - - -AI_BAI_ZONE:Accomplish() - -
    -
    - -

    Synchronous Event Trigger for Event Accomplish.

    - -
    -
    -
    -
    - - #boolean - -AI_BAI_ZONE.Accomplished - -
    -
    - - - -
    -
    -
    -
    - - -AI_BAI_ZONE:Destroy() - -
    -
    - -

    Synchronous Event Trigger for Event Destroy.

    - -
    -
    -
    -
    - - -AI_BAI_ZONE:Engage(EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) - -
    -
    - -

    Synchronous Event Trigger for Event Engage.

    - -

    Parameters

    -
      -
    • - -

      #number EngageSpeed : -(optional) The speed the Group will hold when engaging to the target zone.

      - -
    • -
    • - -

      Dcs.DCSTypes#Distance EngageAltitude : -(optional) Desired altitude to perform the unit engagement.

      - -
    • -
    • - -

      Dcs.DCSTypes#AI.Task.WeaponExpend EngageWeaponExpend : -(optional) Determines how much weapon will be released at each attack. -If parameter is not defined the unit / controllable will choose expend on its own discretion. -Use the structure DCSTypes#AI.Task.WeaponExpend to define the amount of weapons to be release at each attack.

      - -
    • -
    • - -

      #number EngageAttackQty : -(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

      - -
    • -
    • - -

      Dcs.DCSTypes#Azimuth EngageDirection : -(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

      - -
    • -
    -
    -
    -
    -
    - - -AI_BAI_ZONE.EngageAltitude - -
    -
    - - - -
    -
    -
    -
    - - - -AI_BAI_ZONE.EngageAttackQty - -
    -
    - - - -
    -
    -
    -
    - - - -AI_BAI_ZONE.EngageDirection - -
    -
    - - - -
    -
    -
    -
    - - -AI_BAI_ZONE.EngageSpeed - -
    -
    - - - -
    -
    -
    -
    - - - -AI_BAI_ZONE.EngageWeaponExpend - -
    -
    - - - -
    -
    -
    -
    - - - -AI_BAI_ZONE.EngageZone - -
    -
    - - - -
    -
    -
    -
    - - -AI_BAI_ZONE:Fired() - -
    -
    - -

    Synchronous Event Trigger for Event Fired.

    - -
    -
    -
    -
    - - -AI_BAI_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageZone, PatrolAltType) - -
    -
    - -

    Creates a new AIBAIZONE object

    - -

    Parameters

    - -

    Return value

    - -

    #AIBAIZONE: -self

    - -
    -
    -
    -
    - - -AI_BAI_ZONE:OnAfterAbort(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Abort.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_BAI_ZONE:OnAfterAccomplish(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Accomplish.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_BAI_ZONE:OnAfterDestroy(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Destroy.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_BAI_ZONE:OnAfterEngage(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Engage.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_BAI_ZONE:OnAfterFired(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Fired.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_BAI_ZONE:OnBeforeAbort(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Abort.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_BAI_ZONE:OnBeforeAccomplish(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Accomplish.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_BAI_ZONE:OnBeforeDestroy(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Destroy.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_BAI_ZONE:OnBeforeEngage(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Engage.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_BAI_ZONE:OnBeforeFired(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Fired.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_BAI_ZONE:OnEnterEngaging(Controllable, From, Event, To) - -
    -
    - -

    OnEnter Transition Handler for State Engaging.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_BAI_ZONE:OnEventDead(EventData) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -AI_BAI_ZONE:OnLeaveEngaging(Controllable, From, Event, To) - -
    -
    - -

    OnLeave Transition Handler for State Engaging.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - - -AI_BAI_ZONE.Search - -
    -
    - - - -
    -
    -
    -
    - - -AI_BAI_ZONE:SearchOff() - -
    -
    - -

    If Search is Off, the current zone coordinate will be the center of the bombing.

    - -

    Return value

    - -

    #AIBAIZONE:

    - - -
    -
    -
    -
    - - -AI_BAI_ZONE:SearchOn() - -
    -
    - -

    If Search is On, BAI will search for potential targets in the zone.

    - -

    Return value

    - -

    #AIBAIZONE:

    - - -
    -
    -
    -
    - - -AI_BAI_ZONE:SearchOnOff(Search) - -
    -
    - -

    Specifies whether to search for potential targets in the zone, or let the center of the zone be the bombing coordinate.

    - - -

    AIBAIZONE will search for potential targets by default.

    - -

    Parameter

    -
      -
    • - -

      Search :

      - -
    • -
    -

    Return value

    - -

    #AIBAIZONE:

    - - -
    -
    -
    -
    - - -AI_BAI_ZONE:SetEngageZone(EngageZone) - -
    -
    - -

    Set the Engage Zone where the AI is performing BOMB.

    - - -

    Note that if the EngageZone is changed, the AI needs to re-detect targets.

    - -

    Parameter

    -
      -
    • - -

      Core.Zone#ZONE EngageZone : -The zone where the AI is performing BOMB.

      - -
    • -
    -

    Return value

    - -

    #AIBAIZONE: -self

    - -
    -
    -
    -
    - - Core.Zone#ZONE_BASE - -AI_BAI_ZONE.TargetZone - -
    -
    - -

    The Zone where the patrol needs to be executed.

    - -
    -
    -
    -
    - - -AI_BAI_ZONE:__Abort(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Abort.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_BAI_ZONE:__Accomplish(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Accomplish.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_BAI_ZONE:__Destroy(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Destroy.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_BAI_ZONE:__Engage(Delay, EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) - -
    -
    - -

    Asynchronous Event Trigger for Event Engage.

    - -

    Parameters

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    • - -

      #number EngageSpeed : -(optional) The speed the Group will hold when engaging to the target zone.

      - -
    • -
    • - -

      Dcs.DCSTypes#Distance EngageAltitude : -(optional) Desired altitude to perform the unit engagement.

      - -
    • -
    • - -

      Dcs.DCSTypes#AI.Task.WeaponExpend EngageWeaponExpend : -(optional) Determines how much weapon will be released at each attack. -If parameter is not defined the unit / controllable will choose expend on its own discretion. -Use the structure DCSTypes#AI.Task.WeaponExpend to define the amount of weapons to be release at each attack.

      - -
    • -
    • - -

      #number EngageAttackQty : -(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

      - -
    • -
    • - -

      Dcs.DCSTypes#Azimuth EngageDirection : -(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

      - -
    • -
    -
    -
    -
    -
    - - -AI_BAI_ZONE:__Fired(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Fired.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_BAI_ZONE:onafterAbort(Controllable, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_BAI_ZONE:onafterAccomplish(Controllable, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_BAI_ZONE:onafterDestroy(Controllable, From, Event, To, EventData) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    • - -

      Core.Event#EVENTDATA EventData :

      - -
    • -
    -
    -
    -
    -
    - - -AI_BAI_ZONE:onafterEngage(Controllable, From, Event, To, EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    • - -

      #number EngageSpeed : -(optional) The speed the Group will hold when engaging to the target zone.

      - -
    • -
    • - -

      Dcs.DCSTypes#Distance EngageAltitude : -(optional) Desired altitude to perform the unit engagement.

      - -
    • -
    • - -

      Dcs.DCSTypes#AI.Task.WeaponExpend EngageWeaponExpend : -(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

      - -
    • -
    • - -

      #number EngageAttackQty : -(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

      - -
    • -
    • - -

      Dcs.DCSTypes#Azimuth EngageDirection : -(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

      - -
    • -
    -
    -
    -
    -
    - - -AI_BAI_ZONE:onafterStart(Controllable, From, Event, To) - -
    -
    - -

    onafter State Transition for Event Start.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_BAI_ZONE:onafterTarget(Controllable, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_BAI_ZONE:onbeforeEngage(Controllable, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/AI_Balancer.html b/docs/Documentation/AI_Balancer.html deleted file mode 100644 index c49d9921a..000000000 --- a/docs/Documentation/AI_Balancer.html +++ /dev/null @@ -1,760 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module AI_Balancer

    - -

    AI -- AI Balancing will replace in multi player missions -non-occupied human slots with AI groups, in order to provide an engaging simulation environment, -even when there are hardly any players in the mission.

    - -

    Banner Image

    - -
    - -

    Demo Missions

    - -

    AI_BALANCER Demo Missions source code

    - -

    AI_BALANCER Demo Missions, only for beta testers

    - -

    ALL Demo Missions pack of the last release

    - -
    - -

    YouTube Channel

    - -

    AI_BALANCER YouTube Channel

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    -

    Contributions:

    - -
      -
    • Dutch_Baron: Working together with James has resulted in the creation of the AI_BALANCER class.
    • -
    - - -

    James has shared his ideas on balancing AI with air units, and together we made a first design which you can use now :-)

    - -
    - - -

    Global(s)

    - - - - - -
    AI_BALANCER -

    AI_BALANCER class, extends Fsm#FSM_SET

    - -

    The AIBALANCER class monitors and manages as many replacement AI groups as there are -CLIENTS in a SETCLIENT collection, which are not occupied by human players.

    -
    -

    Type AI_BALANCER

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AI_BALANCER.Earliest - -
    AI_BALANCER:InitSpawnInterval(Earliest, Latest) -

    Sets the earliest to the latest interval in seconds how long AI_BALANCER will wait to spawn a new AI.

    -
    AI_BALANCER.Latest - -
    AI_BALANCER:New(SetClient, SpawnAI) -

    Creates a new AI_BALANCER object

    -
    AI_BALANCER.ReturnAirbaseSet - -
    AI_BALANCER.ReturnThresholdRange - -
    AI_BALANCER:ReturnToHomeAirbase(ReturnThresholdRange) -

    Returns the AI to the home Airbase#AIRBASE.

    -
    AI_BALANCER:ReturnToNearestAirbases(ReturnThresholdRange, ReturnAirbaseSet) -

    Returns the AI to the nearest friendly Airbase#AIRBASE.

    -
    AI_BALANCER.SetClient - -
    AI_BALANCER.SpawnAI - -
    AI_BALANCER.Test - -
    AI_BALANCER.ToHomeAirbase - -
    AI_BALANCER.ToNearestAirbase - -
    AI_BALANCER:onenterDestroying(SetGroup, AIGroup, From, Event, To, ClientName) - -
    AI_BALANCER:onenterMonitoring(SetGroup) - -
    AI_BALANCER:onenterReturning(SetGroup, AIGroup, From, Event, To) - -
    AI_BALANCER:onenterSpawning(SetGroup, ClientName, AIGroup, From, Event, To) - -
    - -

    Global(s)

    -
    -
    - - #AI_BALANCER - -AI_BALANCER - -
    -
    - -

    AI_BALANCER class, extends Fsm#FSM_SET

    - -

    The AIBALANCER class monitors and manages as many replacement AI groups as there are -CLIENTS in a SETCLIENT collection, which are not occupied by human players.

    - - -

    In other words, use AI_BALANCER to simulate human behaviour by spawning in replacement AI in multi player missions.

    - -

    The parent class Fsm#FSM_SET manages the functionality to control the Finite State Machine (FSM). -The mission designer can tailor the behaviour of the AI_BALANCER, by defining event and state transition methods. -An explanation about state and event transition methods can be found in the FSM module documentation.

    - -

    The mission designer can tailor the AI_BALANCER behaviour, by implementing a state or event handling method for the following:

    - - - -

    1. AI_BALANCER construction

    - -

    Create a new AI_BALANCER object with the AI_BALANCER.New() method:

    - -

    2. AI_BALANCER is a FSM

    - -

    Process

    - -

    2.1. AI_BALANCER States

    - -
      -
    • Monitoring ( Set ): Monitoring the Set if all AI is spawned for the Clients.
    • -
    • Spawning ( Set, ClientName ): There is a new AI group spawned with ClientName as the name of reference.
    • -
    • Spawned ( Set, AIGroup ): A new AI has been spawned. You can handle this event to customize the AI behaviour with other AI FSMs or own processes.
    • -
    • Destroying ( Set, AIGroup ): The AI is being destroyed.
    • -
    • Returning ( Set, AIGroup ): The AI is returning to the airbase specified by the ReturnToAirbase methods. Handle this state to customize the return behaviour of the AI, if any.
    • -
    - -

    2.2. AI_BALANCER Events

    - -
      -
    • Monitor ( Set ): Every 10 seconds, the Monitor event is triggered to monitor the Set.
    • -
    • Spawn ( Set, ClientName ): Triggers when there is a new AI group to be spawned with ClientName as the name of reference.
    • -
    • Spawned ( Set, AIGroup ): Triggers when a new AI has been spawned. You can handle this event to customize the AI behaviour with other AI FSMs or own processes.
    • -
    • Destroy ( Set, AIGroup ): The AI is being destroyed.
    • -
    • Return ( Set, AIGroup ): The AI is returning to the airbase specified by the ReturnToAirbase methods.
    • -
    - -

    3. AI_BALANCER spawn interval for replacement AI

    - -

    Use the method AI_BALANCER.InitSpawnInterval() to set the earliest and latest interval in seconds that is waited until a new replacement AI is spawned.

    - -

    4. AI_BALANCER returns AI to Airbases

    - -

    By default, When a human player joins a slot that is AI_BALANCED, the AI group will be destroyed by default. -However, there are 2 additional options that you can use to customize the destroy behaviour. -When a human player joins a slot, you can configure to let the AI return to:

    - - - -

    Note that when AI returns to an airbase, the AIBALANCER will trigger the Return event and the AI will return, -otherwise the AIBALANCER will trigger a Destroy event, and the AI will be destroyed.

    - - -
    -
    -

    Type AI_Balancer

    - -

    Type AI_BALANCER

    -

    Field(s)

    -
    -
    - - - -AI_BALANCER.Earliest - -
    -
    - - - -
    -
    -
    -
    - - -AI_BALANCER:InitSpawnInterval(Earliest, Latest) - -
    -
    - -

    Sets the earliest to the latest interval in seconds how long AI_BALANCER will wait to spawn a new AI.

    - - -

    Provide 2 identical seconds if the interval should be a fixed amount of seconds.

    - -

    Parameters

    -
      -
    • - -

      #number Earliest : -The earliest a new AI can be spawned in seconds.

      - -
    • -
    • - -

      #number Latest : -The latest a new AI can be spawned in seconds.

      - -
    • -
    -

    Return value

    - - -

    self

    - -
    -
    -
    -
    - - - -AI_BALANCER.Latest - -
    -
    - - - -
    -
    -
    -
    - - -AI_BALANCER:New(SetClient, SpawnAI) - -
    -
    - -

    Creates a new AI_BALANCER object

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_CLIENT SetClient : -A SET_CLIENT object that will contain the CLIENT objects to be monitored if they are alive or not (joined by a player).

      - -
    • -
    • - -

      Core.Spawn#SPAWN SpawnAI : -The default Spawn object to spawn new AI Groups when needed.

      - -
    • -
    -

    Return value

    - -

    #AI_BALANCER:

    - - -
    -
    -
    -
    - - - -AI_BALANCER.ReturnAirbaseSet - -
    -
    - - - -
    -
    -
    -
    - - - -AI_BALANCER.ReturnThresholdRange - -
    -
    - - - -
    -
    -
    -
    - - -AI_BALANCER:ReturnToHomeAirbase(ReturnThresholdRange) - -
    -
    - -

    Returns the AI to the home Airbase#AIRBASE.

    - -

    Parameter

    - -
    -
    -
    -
    - - -AI_BALANCER:ReturnToNearestAirbases(ReturnThresholdRange, ReturnAirbaseSet) - -
    -
    - -

    Returns the AI to the nearest friendly Airbase#AIRBASE.

    - -

    Parameters

    - -
    -
    -
    -
    - - Core.Set#SET_CLIENT - -AI_BALANCER.SetClient - -
    -
    - - - -
    -
    -
    -
    - - Core.Spawn#SPAWN - -AI_BALANCER.SpawnAI - -
    -
    - - - -
    -
    -
    -
    - - Wrapper.Group#GROUP - -AI_BALANCER.Test - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -AI_BALANCER.ToHomeAirbase - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -AI_BALANCER.ToNearestAirbase - -
    -
    - - - -
    -
    -
    -
    - - -AI_BALANCER:onenterDestroying(SetGroup, AIGroup, From, Event, To, ClientName) - -
    -
    - - - -

    Parameters

    - -
    -
    -
    -
    - - -AI_BALANCER:onenterMonitoring(SetGroup) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      SetGroup :

      - -
    • -
    -
    -
    -
    -
    - - -AI_BALANCER:onenterReturning(SetGroup, AIGroup, From, Event, To) - -
    -
    - - - -

    Parameters

    - -
    -
    -
    -
    - - -AI_BALANCER:onenterSpawning(SetGroup, ClientName, AIGroup, From, Event, To) - -
    -
    - - - -

    Parameters

    - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/AI_Cap.html b/docs/Documentation/AI_Cap.html deleted file mode 100644 index 02c5864e9..000000000 --- a/docs/Documentation/AI_Cap.html +++ /dev/null @@ -1,1754 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module AI_Cap

    - -

    AI -- Execute Combat Air Patrol (CAP).

    - -

    Banner Image

    - -
    - -

    AI CAP classes makes AI Controllables execute a Combat Air Patrol.

    - - - -

    There are the following types of CAP classes defined:

    - - - -
    - -

    Demo Missions

    - -

    AI_CAP Demo Missions source code

    - -

    AI_CAP Demo Missions, only for beta testers

    - -

    ALL Demo Missions pack of the last release

    - -
    - -

    YouTube Channel

    - -

    AI_CAP YouTube Channel

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions:

    - - - -
    - - -

    Global(s)

    - - - - - -
    AI_CAP_ZONE -

    AICAPZONE class, extends AICAP#AIPATROL_ZONE

    - -

    The AICAPZONE class implements the core functions to patrol a Zone by an AI Controllable or Group -and automatically engage any airborne enemies that are within a certain range or within a certain zone.

    -
    -

    Type AI_CAP_ZONE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AI_CAP_ZONE.AIControllable -

    The Controllable patrolling.

    -
    AI_CAP_ZONE:Abort() -

    Synchronous Event Trigger for Event Abort.

    -
    AI_CAP_ZONE:Accomplish() -

    Synchronous Event Trigger for Event Accomplish.

    -
    AI_CAP_ZONE.Accomplished - -
    AI_CAP_ZONE:Destroy() -

    Synchronous Event Trigger for Event Destroy.

    -
    AI_CAP_ZONE:Engage() -

    Synchronous Event Trigger for Event Engage.

    -
    AI_CAP_ZONE.EngageRange - -
    AI_CAP_ZONE.EngageRoute(AI, EngageGroup, Fsm) - -
    AI_CAP_ZONE.EngageZone - -
    AI_CAP_ZONE.Engaging - -
    AI_CAP_ZONE:Fired() -

    Synchronous Event Trigger for Event Fired.

    -
    AI_CAP_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType) -

    Creates a new AICAPZONE object

    -
    AI_CAP_ZONE:OnAfterAbort(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event Abort.

    -
    AI_CAP_ZONE:OnAfterAccomplish(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event Accomplish.

    -
    AI_CAP_ZONE:OnAfterDestroy(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event Destroy.

    -
    AI_CAP_ZONE:OnAfterEngage(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event Engage.

    -
    AI_CAP_ZONE:OnAfterFired(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event Fired.

    -
    AI_CAP_ZONE:OnBeforeAbort(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event Abort.

    -
    AI_CAP_ZONE:OnBeforeAccomplish(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event Accomplish.

    -
    AI_CAP_ZONE:OnBeforeDestroy(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event Destroy.

    -
    AI_CAP_ZONE:OnBeforeEngage(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event Engage.

    -
    AI_CAP_ZONE:OnBeforeFired(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event Fired.

    -
    AI_CAP_ZONE:OnEnterEngaging(Controllable, From, Event, To) -

    OnEnter Transition Handler for State Engaging.

    -
    AI_CAP_ZONE:OnEventDead(EventData) - -
    AI_CAP_ZONE:OnLeaveEngaging(Controllable, From, Event, To) -

    OnLeave Transition Handler for State Engaging.

    -
    AI_CAP_ZONE:SetEngageRange(EngageRange) -

    Set the Engage Range when the AI will engage with airborne enemies.

    -
    AI_CAP_ZONE:SetEngageZone(EngageZone) -

    Set the Engage Zone which defines where the AI will engage bogies.

    -
    AI_CAP_ZONE.TargetZone -

    The Zone where the patrol needs to be executed.

    -
    AI_CAP_ZONE:__Abort(Delay) -

    Asynchronous Event Trigger for Event Abort.

    -
    AI_CAP_ZONE:__Accomplish(Delay) -

    Asynchronous Event Trigger for Event Accomplish.

    -
    AI_CAP_ZONE:__Destroy(Delay) -

    Asynchronous Event Trigger for Event Destroy.

    -
    AI_CAP_ZONE:__Engage(Delay) -

    Asynchronous Event Trigger for Event Engage.

    -
    AI_CAP_ZONE:__Fired(Delay) -

    Asynchronous Event Trigger for Event Fired.

    -
    AI_CAP_ZONE:onafterAbort(Controllable, From, Event, To) - -
    AI_CAP_ZONE:onafterAccomplish(Controllable, From, Event, To) - -
    AI_CAP_ZONE:onafterDestroy(Controllable, From, Event, To, EventData) - -
    AI_CAP_ZONE:onafterDetected(Controllable, From, Event, To) - -
    AI_CAP_ZONE:onafterEngage(Controllable, From, Event, To) - -
    AI_CAP_ZONE:onafterStart(Controllable, From, Event, To) -

    onafter State Transition for Event Start.

    -
    AI_CAP_ZONE:onbeforeEngage(Controllable, From, Event, To) - -
    - -

    Global(s)

    -
    -
    - - #AI_CAP_ZONE - -AI_CAP_ZONE - -
    -
    - -

    AICAPZONE class, extends AICAP#AIPATROL_ZONE

    - -

    The AICAPZONE class implements the core functions to patrol a Zone by an AI Controllable or Group -and automatically engage any airborne enemies that are within a certain range or within a certain zone.

    - - - -

    Process

    - -

    The AICAPZONE is assigned a Group and this must be done before the AICAPZONE process can be started using the Start event.

    - -

    Process

    - -

    The AI will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits. -Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits.

    - -

    Process

    - -

    This cycle will continue.

    - -

    Process

    - -

    During the patrol, the AI will detect enemy targets, which are reported through the Detected event.

    - -

    Process

    - -

    When enemies are detected, the AI will automatically engage the enemy.

    - -

    Process

    - -

    Until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB. -When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.

    - -

    Process

    - -

    1. AICAPZONE constructor

    - - - -

    2. AICAPZONE is a FSM

    - -

    Process

    - -

    2.1 AICAPZONE States

    - -
      -
    • None ( Group ): The process is not started yet.
    • -
    • Patrolling ( Group ): The AI is patrolling the Patrol Zone.
    • -
    • Engaging ( Group ): The AI is engaging the bogeys.
    • -
    • Returning ( Group ): The AI is returning to Base..
    • -
    - -

    2.2 AICAPZONE Events

    - - - -

    3. Set the Range of Engagement

    - -

    Range

    - -

    An optional range can be set in meters, -that will define when the AI will engage with the detected airborne enemy targets. -The range can be beyond or smaller than the range of the Patrol Zone. -The range is applied at the position of the AI. -Use the method AICAP#AICAP_ZONE.SetEngageRange() to define that range.

    - -

    4. Set the Zone of Engagement

    - -

    Zone

    - -

    An optional Zone can be set, -that will define when the AI will engage with the detected airborne enemy targets. -Use the method AICap#AICAP_ZONE.SetEngageZone() to define that Zone.

    - -
    - - -
    -
    -

    Type AI_Cap

    - -

    Type AI_CAP_ZONE

    -

    Field(s)

    -
    -
    - - Wrapper.Controllable#CONTROLLABLE - -AI_CAP_ZONE.AIControllable - -
    -
    - -

    The Controllable patrolling.

    - -
    -
    -
    -
    - - -AI_CAP_ZONE:Abort() - -
    -
    - -

    Synchronous Event Trigger for Event Abort.

    - -
    -
    -
    -
    - - -AI_CAP_ZONE:Accomplish() - -
    -
    - -

    Synchronous Event Trigger for Event Accomplish.

    - -
    -
    -
    -
    - - #boolean - -AI_CAP_ZONE.Accomplished - -
    -
    - - - -
    -
    -
    -
    - - -AI_CAP_ZONE:Destroy() - -
    -
    - -

    Synchronous Event Trigger for Event Destroy.

    - -
    -
    -
    -
    - - -AI_CAP_ZONE:Engage() - -
    -
    - -

    Synchronous Event Trigger for Event Engage.

    - -
    -
    -
    -
    - - - -AI_CAP_ZONE.EngageRange - -
    -
    - - - -
    -
    -
    -
    - - -AI_CAP_ZONE.EngageRoute(AI, EngageGroup, Fsm) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      AI : -AICAP#AICAP_ZONE

      - -
    • -
    • - -

      Wrapper.Group#GROUP EngageGroup :

      - -
    • -
    • - -

      Fsm :

      - -
    • -
    -
    -
    -
    -
    - - - -AI_CAP_ZONE.EngageZone - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -AI_CAP_ZONE.Engaging - -
    -
    - - - -
    -
    -
    -
    - - -AI_CAP_ZONE:Fired() - -
    -
    - -

    Synchronous Event Trigger for Event Fired.

    - -
    -
    -
    -
    - - -AI_CAP_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType) - -
    -
    - -

    Creates a new AICAPZONE object

    - -

    Parameters

    - -

    Return value

    - -

    #AICAPZONE: -self

    - -
    -
    -
    -
    - - -AI_CAP_ZONE:OnAfterAbort(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Abort.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAP_ZONE:OnAfterAccomplish(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Accomplish.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAP_ZONE:OnAfterDestroy(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Destroy.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAP_ZONE:OnAfterEngage(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Engage.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAP_ZONE:OnAfterFired(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Fired.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAP_ZONE:OnBeforeAbort(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Abort.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_CAP_ZONE:OnBeforeAccomplish(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Accomplish.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_CAP_ZONE:OnBeforeDestroy(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Destroy.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_CAP_ZONE:OnBeforeEngage(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Engage.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_CAP_ZONE:OnBeforeFired(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Fired.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_CAP_ZONE:OnEnterEngaging(Controllable, From, Event, To) - -
    -
    - -

    OnEnter Transition Handler for State Engaging.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAP_ZONE:OnEventDead(EventData) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -AI_CAP_ZONE:OnLeaveEngaging(Controllable, From, Event, To) - -
    -
    - -

    OnLeave Transition Handler for State Engaging.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_CAP_ZONE:SetEngageRange(EngageRange) - -
    -
    - -

    Set the Engage Range when the AI will engage with airborne enemies.

    - -

    Parameter

    -
      -
    • - -

      #number EngageRange : -The Engage Range.

      - -
    • -
    -

    Return value

    - -

    #AICAPZONE: -self

    - -
    -
    -
    -
    - - -AI_CAP_ZONE:SetEngageZone(EngageZone) - -
    -
    - -

    Set the Engage Zone which defines where the AI will engage bogies.

    - -

    Parameter

    -
      -
    • - -

      Core.Zone#ZONE EngageZone : -The zone where the AI is performing CAP.

      - -
    • -
    -

    Return value

    - -

    #AICAPZONE: -self

    - -
    -
    -
    -
    - - Core.Zone#ZONE_BASE - -AI_CAP_ZONE.TargetZone - -
    -
    - -

    The Zone where the patrol needs to be executed.

    - -
    -
    -
    -
    - - -AI_CAP_ZONE:__Abort(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Abort.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAP_ZONE:__Accomplish(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Accomplish.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAP_ZONE:__Destroy(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Destroy.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAP_ZONE:__Engage(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Engage.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAP_ZONE:__Fired(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Fired.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAP_ZONE:onafterAbort(Controllable, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAP_ZONE:onafterAccomplish(Controllable, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAP_ZONE:onafterDestroy(Controllable, From, Event, To, EventData) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    • - -

      Core.Event#EVENTDATA EventData :

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAP_ZONE:onafterDetected(Controllable, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAP_ZONE:onafterEngage(Controllable, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAP_ZONE:onafterStart(Controllable, From, Event, To) - -
    -
    - -

    onafter State Transition for Event Start.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAP_ZONE:onbeforeEngage(Controllable, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/AI_Cas.html b/docs/Documentation/AI_Cas.html deleted file mode 100644 index 9d3885963..000000000 --- a/docs/Documentation/AI_Cas.html +++ /dev/null @@ -1,1890 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module AI_Cas

    - -

    AI -- Provide Close Air Support to friendly ground troops.

    - -

    Banner Image

    - -
    - -

    AI CAS classes makes AI Controllables execute a Close Air Support.

    - - - -

    There are the following types of CAS classes defined:

    - - - -
    - -

    Demo Missions

    - -

    AI_CAS Demo Missions source code

    - -

    AI_CAS Demo Missions, only for beta testers

    - -

    ALL Demo Missions pack of the last release

    - -
    - -

    YouTube Channel

    - -

    AI_CAS YouTube Channel

    - -
    - - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions:

    - -
      -
    • Quax: Concept, Advice & Testing.
    • -
    • Pikey: Concept, Advice & Testing.
    • -
    • Gunterlund: Test case revision.
    • -
    - -
    - - -

    Global(s)

    - - - - - -
    AI_CAS_ZONE -

    AICASZONE class, extends AIPatrol#AIPATROL_ZONE

    - -

    AICASZONE derives from the AIPatrol#AIPATROL_ZONE, inheriting its methods and behaviour.

    -
    -

    Type AI_CAS_ZONE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AI_CAS_ZONE.AIControllable -

    The Controllable patrolling.

    -
    AI_CAS_ZONE:Abort() -

    Synchronous Event Trigger for Event Abort.

    -
    AI_CAS_ZONE:Accomplish() -

    Synchronous Event Trigger for Event Accomplish.

    -
    AI_CAS_ZONE.Accomplished - -
    AI_CAS_ZONE:Destroy() -

    Synchronous Event Trigger for Event Destroy.

    -
    AI_CAS_ZONE:Engage(EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) -

    Synchronous Event Trigger for Event Engage.

    -
    AI_CAS_ZONE.EngageAltitude - -
    AI_CAS_ZONE.EngageAttackQty - -
    AI_CAS_ZONE.EngageDirection - -
    AI_CAS_ZONE.EngageRoute(AI, EngageGroup, Fsm) - -
    AI_CAS_ZONE.EngageSpeed - -
    AI_CAS_ZONE.EngageWeaponExpend - -
    AI_CAS_ZONE.EngageZone - -
    AI_CAS_ZONE:Fired() -

    Synchronous Event Trigger for Event Fired.

    -
    AI_CAS_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageZone, PatrolAltType) -

    Creates a new AICASZONE object

    -
    AI_CAS_ZONE:OnAfterAbort(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event Abort.

    -
    AI_CAS_ZONE:OnAfterAccomplish(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event Accomplish.

    -
    AI_CAS_ZONE:OnAfterDestroy(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event Destroy.

    -
    AI_CAS_ZONE:OnAfterEngage(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event Engage.

    -
    AI_CAS_ZONE:OnAfterFired(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event Fired.

    -
    AI_CAS_ZONE:OnBeforeAbort(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event Abort.

    -
    AI_CAS_ZONE:OnBeforeAccomplish(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event Accomplish.

    -
    AI_CAS_ZONE:OnBeforeDestroy(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event Destroy.

    -
    AI_CAS_ZONE:OnBeforeEngage(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event Engage.

    -
    AI_CAS_ZONE:OnBeforeFired(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event Fired.

    -
    AI_CAS_ZONE:OnEnterEngaging(Controllable, From, Event, To) -

    OnEnter Transition Handler for State Engaging.

    -
    AI_CAS_ZONE:OnEventDead(EventData) - -
    AI_CAS_ZONE:OnLeaveEngaging(Controllable, From, Event, To) -

    OnLeave Transition Handler for State Engaging.

    -
    AI_CAS_ZONE:SetEngageZone(EngageZone) -

    Set the Engage Zone where the AI is performing CAS.

    -
    AI_CAS_ZONE.TargetZone -

    The Zone where the patrol needs to be executed.

    -
    AI_CAS_ZONE:__Abort(Delay) -

    Asynchronous Event Trigger for Event Abort.

    -
    AI_CAS_ZONE:__Accomplish(Delay) -

    Asynchronous Event Trigger for Event Accomplish.

    -
    AI_CAS_ZONE:__Destroy(Delay) -

    Asynchronous Event Trigger for Event Destroy.

    -
    AI_CAS_ZONE:__Engage(Delay, EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) -

    Asynchronous Event Trigger for Event Engage.

    -
    AI_CAS_ZONE:__Fired(Delay) -

    Asynchronous Event Trigger for Event Fired.

    -
    AI_CAS_ZONE:onafterAbort(Controllable, From, Event, To) - -
    AI_CAS_ZONE:onafterAccomplish(Controllable, From, Event, To) - -
    AI_CAS_ZONE:onafterDestroy(Controllable, From, Event, To, EventData) - -
    AI_CAS_ZONE:onafterEngage(Controllable, From, Event, To, EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) - -
    AI_CAS_ZONE:onafterStart(Controllable, From, Event, To) -

    onafter State Transition for Event Start.

    -
    AI_CAS_ZONE:onafterTarget(Controllable, From, Event, To) - -
    AI_CAS_ZONE:onbeforeEngage(Controllable, From, Event, To) - -
    - -

    Global(s)

    -
    -
    - - #AI_CAS_ZONE - -AI_CAS_ZONE - -
    -
    - -

    AICASZONE class, extends AIPatrol#AIPATROL_ZONE

    - -

    AICASZONE derives from the AIPatrol#AIPATROL_ZONE, inheriting its methods and behaviour.

    - - -

    -The AICASZONE class implements the core functions to provide Close Air Support in an Engage Zone by an AIR Controllable or Group. -The AICASZONE runs a process. It holds an AI in a Patrol Zone and when the AI is commanded to engage, it will fly to an Engage Zone.

    - -

    HoldAndEngage

    - -

    The AICASZONE is assigned a Group and this must be done before the AICASZONE process can be started through the Start event.

    - -

    Start Event

    - -

    Upon started, The AI will Route itself towards the random 3D point within a patrol zone, -using a random speed within the given altitude and speed limits. -Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits. -This cycle will continue until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB.

    - -

    Route Event

    - -

    When the AI is commanded to provide Close Air Support (through the event Engage), the AI will fly towards the Engage Zone. -Any target that is detected in the Engage Zone will be reported and will be destroyed by the AI.

    - -

    Engage Event

    - -

    The AI will detect the targets and will only destroy the targets within the Engage Zone.

    - -

    Engage Event

    - -

    Every target that is destroyed, is reported< by the AI.

    - -

    Engage Event

    - -

    Note that the AI does not know when the Engage Zone is cleared, and therefore will keep circling in the zone.

    - -

    Engage Event

    - -

    Until it is notified through the event Accomplish, which is to be triggered by an observing party:

    - -
      -
    • a FAC
    • -
    • a timed event
    • -
    • a menu option selected by a human
    • -
    • a condition
    • -
    • others ...
    • -
    - -

    Engage Event

    - -

    When the AI has accomplished the CAS, it will fly back to the Patrol Zone.

    - -

    Engage Event

    - -

    It will keep patrolling there, until it is notified to RTB or move to another CAS Zone. -It can be notified to go RTB through the RTB event.

    - -

    When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.

    - -

    Engage Event

    - -

    AICASZONE constructor

    - - - -

    AICASZONE is a FSM

    - -

    Process

    - -

    2.1. AICASZONE States

    - -
      -
    • None ( Group ): The process is not started yet.
    • -
    • Patrolling ( Group ): The AI is patrolling the Patrol Zone.
    • -
    • Engaging ( Group ): The AI is engaging the targets in the Engage Zone, executing CAS.
    • -
    • Returning ( Group ): The AI is returning to Base..
    • -
    - -

    2.2. AICASZONE Events

    - - - -
    - - -
    -
    -

    Type AI_Cas

    - -

    Type AI_CAS_ZONE

    - -

    AICASZONE class

    - -

    Field(s)

    -
    -
    - - Wrapper.Controllable#CONTROLLABLE - -AI_CAS_ZONE.AIControllable - -
    -
    - -

    The Controllable patrolling.

    - -
    -
    -
    -
    - - -AI_CAS_ZONE:Abort() - -
    -
    - -

    Synchronous Event Trigger for Event Abort.

    - -
    -
    -
    -
    - - -AI_CAS_ZONE:Accomplish() - -
    -
    - -

    Synchronous Event Trigger for Event Accomplish.

    - -
    -
    -
    -
    - - #boolean - -AI_CAS_ZONE.Accomplished - -
    -
    - - - -
    -
    -
    -
    - - -AI_CAS_ZONE:Destroy() - -
    -
    - -

    Synchronous Event Trigger for Event Destroy.

    - -
    -
    -
    -
    - - -AI_CAS_ZONE:Engage(EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) - -
    -
    - -

    Synchronous Event Trigger for Event Engage.

    - -

    Parameters

    -
      -
    • - -

      #number EngageSpeed : -(optional) The speed the Group will hold when engaging to the target zone.

      - -
    • -
    • - -

      Dcs.DCSTypes#Distance EngageAltitude : -(optional) Desired altitude to perform the unit engagement.

      - -
    • -
    • - -

      Dcs.DCSTypes#AI.Task.WeaponExpend EngageWeaponExpend : -(optional) Determines how much weapon will be released at each attack. -If parameter is not defined the unit / controllable will choose expend on its own discretion. -Use the structure DCSTypes#AI.Task.WeaponExpend to define the amount of weapons to be release at each attack.

      - -
    • -
    • - -

      #number EngageAttackQty : -(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

      - -
    • -
    • - -

      Dcs.DCSTypes#Azimuth EngageDirection : -(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAS_ZONE.EngageAltitude - -
    -
    - - - -
    -
    -
    -
    - - - -AI_CAS_ZONE.EngageAttackQty - -
    -
    - - - -
    -
    -
    -
    - - - -AI_CAS_ZONE.EngageDirection - -
    -
    - - - -
    -
    -
    -
    - - -AI_CAS_ZONE.EngageRoute(AI, EngageGroup, Fsm) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      AI : -AICAS#AICAS_ZONE

      - -
    • -
    • - -

      Wrapper.Group#GROUP EngageGroup :

      - -
    • -
    • - -

      Fsm :

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAS_ZONE.EngageSpeed - -
    -
    - - - -
    -
    -
    -
    - - - -AI_CAS_ZONE.EngageWeaponExpend - -
    -
    - - - -
    -
    -
    -
    - - - -AI_CAS_ZONE.EngageZone - -
    -
    - - - -
    -
    -
    -
    - - -AI_CAS_ZONE:Fired() - -
    -
    - -

    Synchronous Event Trigger for Event Fired.

    - -
    -
    -
    -
    - - -AI_CAS_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageZone, PatrolAltType) - -
    -
    - -

    Creates a new AICASZONE object

    - -

    Parameters

    - -

    Return value

    - -

    #AICASZONE: -self

    - -
    -
    -
    -
    - - -AI_CAS_ZONE:OnAfterAbort(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Abort.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAS_ZONE:OnAfterAccomplish(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Accomplish.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAS_ZONE:OnAfterDestroy(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Destroy.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAS_ZONE:OnAfterEngage(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Engage.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAS_ZONE:OnAfterFired(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Fired.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAS_ZONE:OnBeforeAbort(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Abort.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_CAS_ZONE:OnBeforeAccomplish(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Accomplish.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_CAS_ZONE:OnBeforeDestroy(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Destroy.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_CAS_ZONE:OnBeforeEngage(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Engage.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAS_ZONE:OnBeforeFired(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Fired.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_CAS_ZONE:OnEnterEngaging(Controllable, From, Event, To) - -
    -
    - -

    OnEnter Transition Handler for State Engaging.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAS_ZONE:OnEventDead(EventData) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -AI_CAS_ZONE:OnLeaveEngaging(Controllable, From, Event, To) - -
    -
    - -

    OnLeave Transition Handler for State Engaging.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_CAS_ZONE:SetEngageZone(EngageZone) - -
    -
    - -

    Set the Engage Zone where the AI is performing CAS.

    - - -

    Note that if the EngageZone is changed, the AI needs to re-detect targets.

    - -

    Parameter

    -
      -
    • - -

      Core.Zone#ZONE EngageZone : -The zone where the AI is performing CAS.

      - -
    • -
    -

    Return value

    - -

    #AICASZONE: -self

    - -
    -
    -
    -
    - - Core.Zone#ZONE_BASE - -AI_CAS_ZONE.TargetZone - -
    -
    - -

    The Zone where the patrol needs to be executed.

    - -
    -
    -
    -
    - - -AI_CAS_ZONE:__Abort(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Abort.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAS_ZONE:__Accomplish(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Accomplish.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAS_ZONE:__Destroy(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Destroy.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAS_ZONE:__Engage(Delay, EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) - -
    -
    - -

    Asynchronous Event Trigger for Event Engage.

    - -

    Parameters

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    • - -

      #number EngageSpeed : -(optional) The speed the Group will hold when engaging to the target zone.

      - -
    • -
    • - -

      Dcs.DCSTypes#Distance EngageAltitude : -(optional) Desired altitude to perform the unit engagement.

      - -
    • -
    • - -

      Dcs.DCSTypes#AI.Task.WeaponExpend EngageWeaponExpend : -(optional) Determines how much weapon will be released at each attack. -If parameter is not defined the unit / controllable will choose expend on its own discretion. -Use the structure DCSTypes#AI.Task.WeaponExpend to define the amount of weapons to be release at each attack.

      - -
    • -
    • - -

      #number EngageAttackQty : -(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

      - -
    • -
    • - -

      Dcs.DCSTypes#Azimuth EngageDirection : -(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAS_ZONE:__Fired(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Fired.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAS_ZONE:onafterAbort(Controllable, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAS_ZONE:onafterAccomplish(Controllable, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAS_ZONE:onafterDestroy(Controllable, From, Event, To, EventData) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    • - -

      Core.Event#EVENTDATA EventData :

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAS_ZONE:onafterEngage(Controllable, From, Event, To, EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    • - -

      #number EngageSpeed : -(optional) The speed the Group will hold when engaging to the target zone.

      - -
    • -
    • - -

      Dcs.DCSTypes#Distance EngageAltitude : -(optional) Desired altitude to perform the unit engagement.

      - -
    • -
    • - -

      Dcs.DCSTypes#AI.Task.WeaponExpend EngageWeaponExpend : -(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

      - -
    • -
    • - -

      #number EngageAttackQty : -(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

      - -
    • -
    • - -

      Dcs.DCSTypes#Azimuth EngageDirection : -(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAS_ZONE:onafterStart(Controllable, From, Event, To) - -
    -
    - -

    onafter State Transition for Event Start.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAS_ZONE:onafterTarget(Controllable, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_CAS_ZONE:onbeforeEngage(Controllable, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/AI_Designate.html b/docs/Documentation/AI_Designate.html deleted file mode 100644 index 99badd527..000000000 --- a/docs/Documentation/AI_Designate.html +++ /dev/null @@ -1,2121 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module AI_Designate

    - -

    AI R2.1 -- Management of target Designation.

    - - - -

    --Banner Image

    - -
    - -

    AI_DESIGNATE is orchestrating the designation of potential targets executed by a Recce group, -and communicates these to a dedicated attacking group of players, -so that following a dynamically generated menu system, -each detected set of potential targets can be lased or smoked...

    - -

    Targets can be:

    - -
      -
    • Lased for a period of time.
    • -
    • Smoked. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.)
    • -
    • Illuminated through an illumination bomb. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.
    • -
    - -
    - -

    AUTHORS and CONTRIBUTIONS

    - -

    Contributions:

    - -
      -
    • Ciribob: Showing the way how to lase targets + how laser codes work!!! Explained the autolase script.
    • -
    • EasyEB: Ideas and Beta Testing
    • -
    • Wingthor: Beta Testing
    • -
    - - -

    Authors:

    - -
      -
    • FlightControl: Design & Programming
    • -
    - - -

    Global(s)

    - - - - - -
    AI_DESIGNATE -

    AI_DESIGNATE class, extends Fsm#FSM

    - -

    AI_DESIGNATE is orchestrating the designation of potential targets executed by a Recce group, -and communicates these to a dedicated attacking group of players, -so that following a dynamically generated menu system, -each detected set of potential targets can be lased or smoked...

    -
    -

    Type AI_DESIGNATE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AI_DESIGNATE:ActivateAutoLase() -

    Coordinates the Auto Lase.

    -
    AI_DESIGNATE.AttackSet - -
    AI_DESIGNATE.AutoLase - -
    AI_DESIGNATE.Designating - -
    AI_DESIGNATE:Detect() -

    Detect Trigger for AI_DESIGNATE

    -
    AI_DESIGNATE.Detection - -
    AI_DESIGNATE.FlashStatusMenu - -
    AI_DESIGNATE:GenerateLaserCodes() -

    Generate an array of possible laser codes.

    -
    AI_DESIGNATE:Illuminate() -

    Illuminate Trigger for AI_DESIGNATE

    -
    AI_DESIGNATE.LaseDuration - -
    AI_DESIGNATE:LaseOff() -

    LaseOff Trigger for AI_DESIGNATE

    -
    AI_DESIGNATE:LaseOn() -

    LaseOn Trigger for AI_DESIGNATE

    -
    AI_DESIGNATE.LaserCodes - -
    AI_DESIGNATE.LaserCodesUsed - -
    AI_DESIGNATE:MenuAutoLase(AutoLase) - -
    AI_DESIGNATE:MenuFlashStatus(AttackGroup, Flash) - -
    AI_DESIGNATE:MenuIlluminate(Index) - -
    AI_DESIGNATE:MenuLaseOff(Index, Duration) - -
    AI_DESIGNATE:MenuLaseOn(Index, Duration) - -
    AI_DESIGNATE:MenuSmoke(Index, Color) - -
    AI_DESIGNATE:MenuStatus(AttackGroup) - -
    AI_DESIGNATE:New(Detection, AttackSet) -

    AI_DESIGNATE Constructor.

    -
    AI_DESIGNATE:OnAfterDetect(From, Event, To) -

    Detect Handler OnAfter for AI_DESIGNATE

    -
    AI_DESIGNATE:OnAfterIlluminate(From, Event, To) -

    Illuminate Handler OnAfter for AI_DESIGNATE

    -
    AI_DESIGNATE:OnAfterLaseOff(From, Event, To) -

    LaseOff Handler OnAfter for AI_DESIGNATE

    -
    AI_DESIGNATE:OnAfterLaseOn(From, Event, To) -

    LaseOn Handler OnAfter for AI_DESIGNATE

    -
    AI_DESIGNATE:OnAfterSmoke(From, Event, To) -

    Smoke Handler OnAfter for AI_DESIGNATE

    -
    AI_DESIGNATE:OnAfterStatus(From, Event, To) -

    Status Handler OnAfter for AI_DESIGNATE

    -
    AI_DESIGNATE:OnBeforeDetect(From, Event, To) -

    Detect Handler OnBefore for AI_DESIGNATE

    -
    AI_DESIGNATE:OnBeforeIlluminate(From, Event, To) -

    Illuminate Handler OnBefore for AI_DESIGNATE

    -
    AI_DESIGNATE:OnBeforeLaseOff(From, Event, To) -

    LaseOff Handler OnBefore for AI_DESIGNATE

    -
    AI_DESIGNATE:OnBeforeLaseOn(From, Event, To) -

    LaseOn Handler OnBefore for AI_DESIGNATE

    -
    AI_DESIGNATE:OnBeforeSmoke(From, Event, To) -

    Smoke Handler OnBefore for AI_DESIGNATE

    -
    AI_DESIGNATE:OnBeforeStatus(From, Event, To) -

    Status Handler OnBefore for AI_DESIGNATE

    -
    AI_DESIGNATE.RecceSet - -
    AI_DESIGNATE.Recces - -
    AI_DESIGNATE:SendStatus() -

    Sends the status to the Attack Groups.

    -
    AI_DESIGNATE:SetAutoLase(AutoLase) -

    Set auto lase.

    -
    AI_DESIGNATE:SetDesignateMenu() -

    Sets the Designate Menu.

    -
    AI_DESIGNATE:SetFlashStatusMenu(FlashMenu) -

    Set the flashing of the status menu.

    -
    AI_DESIGNATE:SetLaserCodes(<, LaserCodes) -

    Set an array of possible laser codes.

    -
    AI_DESIGNATE:SetThreatLevelPrioritization(Prioritize) -

    Set priorization of Targets based on the Threat Level of the Target in an Air to Ground context.

    -
    AI_DESIGNATE:Smoke() -

    Smoke Trigger for AI_DESIGNATE

    -
    AI_DESIGNATE:Status() -

    Status Trigger for AI_DESIGNATE

    -
    AI_DESIGNATE.ThreatLevelPrioritization - -
    AI_DESIGNATE:__Detect(Delay) -

    Detect Asynchronous Trigger for AI_DESIGNATE

    -
    AI_DESIGNATE:__Illuminate(Delay) -

    Illuminate Asynchronous Trigger for AI_DESIGNATE

    -
    AI_DESIGNATE:__LaseOff(Delay) -

    LaseOff Asynchronous Trigger for AI_DESIGNATE

    -
    AI_DESIGNATE:__LaseOn(Delay) -

    LaseOn Asynchronous Trigger for AI_DESIGNATE

    -
    AI_DESIGNATE:__Smoke(Delay) -

    Smoke Asynchronous Trigger for AI_DESIGNATE

    -
    AI_DESIGNATE:__Status(Delay) -

    Status Asynchronous Trigger for AI_DESIGNATE

    -
    AI_DESIGNATE:onafterDetect() - -
    AI_DESIGNATE:onafterDone(From, Event, To, Index) -

    Done

    -
    AI_DESIGNATE:onafterIlluminate(From, Event, To, Index) -

    Illuminating

    -
    AI_DESIGNATE:onafterLaseOff(From, Event, To, Index) - -
    AI_DESIGNATE:onafterLaseOn(From, Event, To, Index, Duration) - -
    AI_DESIGNATE:onafterLasing(From, Event, To, Index, Duration) - -
    AI_DESIGNATE:onafterSmoke(From, Event, To, Index, Color) - -
    - -

    Global(s)

    -
    -
    - - #AI_DESIGNATE - -AI_DESIGNATE - -
    -
    - -

    AI_DESIGNATE class, extends Fsm#FSM

    - -

    AI_DESIGNATE is orchestrating the designation of potential targets executed by a Recce group, -and communicates these to a dedicated attacking group of players, -so that following a dynamically generated menu system, -each detected set of potential targets can be lased or smoked...

    - - - -

    Targets can be:

    - -
      -
    • Lased for a period of time.
    • -
    • Smoked. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.)
    • -
    • Illuminated through an illumination bomb. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.
    • -
    - -

    The following terminology is being used throughout this document:

    - -
      -
    • The DesignateObject is the object of the AI_DESIGNATE class, which is this class explained in the document.
    • -
    • The DetectionObject is the object of a DETECTION_ class (DETECTIONTYPES, DETECTIONAREAS, DETECTION_UNITS), which is executing the detection and grouping of Targets into DetectionItems.
    • -
    • DetectionItems is the list of detected target groupings by the DetectionObject. Each DetectionItem contains a TargetSet.
    • -
    • DetectionItem is one element of the DetectionItems list, and contains a TargetSet.
    • -
    • The TargetSet is a SET_UNITS collection of Targets, that have been detected by the DetectionObject.
    • -
    • A Target is a detected UNIT object by the DetectionObject.
    • -
    • A Threat Level is a number from 0 to 10 that is calculated based on the threat of the Target in an Air to Ground battle scenario.
    • -
    • The RecceSet is a SET_GROUP collection that contains the RecceGroups.
    • -
    • A RecceGroup is a GROUP object containing the Recces.
    • -
    • A Recce is a UNIT object executing the reconnaissance as part the DetectionObject. A Recce can be of any UNIT type.
    • -
    • An AttackGroup is a GROUP object that contain Players.
    • -
    • A Player is an active CLIENT object containing a human player.
    • -
    • A Designate Menu is the menu that is dynamically created during the designation process for each AttackGroup.
    • -
    - -

    The RecceSet is continuously detecting for potential Targets, executing its task as part of the DetectionObject. -Once Targets have been detected, the DesignateObject will trigger the Detect Event.

    - -

    As part of the Detect Event, the DetectionItems list is used by the DesignateObject to provide the Players with:

    - -
      -
    • The RecceGroups are reporting to each AttackGroup, sending Messages containing the Threat Level and the TargetSet composition.
    • -
    • Menu options are created and updated for each AttackGroup, containing the Threat Level and the TargetSet composition.
    • -
    - -

    A Player can then select an action from the Designate Menu.

    - -

    Note that each selected action will be executed for a TargetSet, thus the Target grouping done by the DetectionObject.

    - -

    Each Menu Option in the Designate Menu has two modes:

    - -
      -
    1. If the TargetSet is not being designated, then the Designate Menu option for the target Set will provide options to Lase or Smoke the targets.
    2. -
    3. If the Target Set is being designated, then the Designate Menu option will provide an option to stop or cancel the designation.
    4. -
    - -

    While designating, the RecceGroups will report any change in TargetSet composition or Target presence.

    - -

    The following logic is executed when a TargetSet is selected to be lased from the Designation Menu:

    - -
      -
    • The RecceSet is searched for any Recce that is within designation distance from a Target in the TargetSet that is currently not being designated.
    • -
    • If there is a Recce found that is currently no designating a target, and is within designation distance from the Target, then that Target will be designated.
    • -
    • During designation, any Recce that does not have Line of Sight (LOS) and is not within disignation distance from the Target, will stop designating the Target, and a report is given.
    • -
    • When a Recce is designating a Target, and that Target is destroyed, then the Recce will stop designating the Target, and will report the event.
    • -
    • When a Recce is designating a Target, and that Recce is destroyed, then the Recce will be removed from the RecceSet and designation will stop without reporting.
    • -
    • When all RecceGroups are destroyed from the RecceSet, then the DesignationObject will stop functioning, and nothing will be reported.
    • -
    - -

    In this way, the DesignationObject assists players to designate ground targets for a coordinated attack!

    - -

    Have FUN!

    - -

    1. AI_DESIGNATE constructor

    - - - -

    2. AI_DESIGNATE is a FSM

    - -

    Process

    - -

    2.1 AI_DESIGNATE States

    - -
      -
    • Designating ( Group ): The process is not started yet.
    • -
    - -

    2.2 AI_DESIGNATE Events

    - - - -

    3. Laser codes

    - -

    3.1 Set possible laser codes

    - -

    An array of laser codes can be provided, that will be used by the AI_DESIGNATE when lasing. -The laser code is communicated by the Recce when it is lasing a larget. -Note that the default laser code is 1113. -Working known laser codes are: 1113,1462,1483,1537,1362,1214,1131,1182,1644,1614,1515,1411,1621,1138,1542,1678,1573,1314,1643,1257,1467,1375,1341,1275,1237

    - -

    Use the method AI_DESIGNATE.SetLaserCodes() to set the possible laser codes to be selected from. -One laser code can be given or an sequence of laser codes through an table...

    - -
    AIDesignate:SetLaserCodes( 1214 )
    -
    - -

    The above sets one laser code with the value 1214.

    - -
    AIDesignate:SetLaserCodes( { 1214, 1131, 1614, 1138 } )
    -
    - -

    The above sets a collection of possible laser codes that can be assigned. Note the { } notation!

    - -

    3.2 Auto generate laser codes

    - -

    Use the method AI_DESIGNATE.GenerateLaserCodes() to generate all possible laser codes. Logic implemented and advised by Ciribob!

    - -

    4. Autolase to automatically lase detected targets.

    - -

    DetectionItems can be auto lased once detected by Recces. As such, there is almost no action required from the Players using the Designate Menu. -The auto lase function can be activated through the Designation Menu. -Use the method AI_DESIGNATE.SetAutoLase() to activate or deactivate the auto lase function programmatically. -Note that autolase will automatically activate lasing for ALL DetectedItems. Individual items can be switched-off if required using the Designation Menu.

    - -
    AIDesignate:SetAutoLase( true )
    -
    - -

    Activate the auto lasing.

    - -

    5. Target prioritization on threat level

    - -

    Targets can be detected of different types in one DetectionItem. Depending on the type of the Target, a different threat level applies in an Air to Ground combat context. -SAMs are of a higher threat than normal tanks. So, if the Target type was recognized, the Recces will select those targets that form the biggest threat first, -and will continue this until the remaining vehicles with the lowest threat have been reached.

    - -

    This threat level prioritization can be activated using the method AI_DESIGNATE.SetThreatLevelPrioritization(). -If not activated, Targets will be selected in a random order, but most like those first which are the closest to the Recce marking the Target.

    - -

    6. Status Report

    - -

    A status report is available that displays the current Targets detected, grouped per DetectionItem, and a list of which Targets are currently being marked.

    - -
      -
    • The status report can be shown by selecting "Status" -> "Report Status" from the Designation menu .
    • -
    • The status report can be automatically flashed by selecting "Status" -> "Flash Status On".
    • -
    • The automatic flashing of the status report can be deactivated by selecting "Status" -> "Flash Status Off".
    • -
    • The flashing of the status menu is disabled by default.
    • -
    • The method AI_DESIGNATE.FlashStatusMenu() can be used to enable or disable to flashing of the status menu.
    • -
    - - -
    -
    -

    Type AI_Designate

    - -

    Type AI_DESIGNATE

    -

    Field(s)

    -
    -
    - - -AI_DESIGNATE:ActivateAutoLase() - -
    -
    - -

    Coordinates the Auto Lase.

    - -

    Return value

    - -

    #AI_DESIGNATE:

    - - -
    -
    -
    -
    - - - -AI_DESIGNATE.AttackSet - -
    -
    - - - -
    -
    -
    -
    - - - -AI_DESIGNATE.AutoLase - -
    -
    - - - -
    -
    -
    -
    - - - -AI_DESIGNATE.Designating - -
    -
    - - - -
    -
    -
    -
    - - -AI_DESIGNATE:Detect() - -
    -
    - -

    Detect Trigger for AI_DESIGNATE

    - -
    -
    -
    -
    - - - -AI_DESIGNATE.Detection - -
    -
    - - - -
    -
    -
    -
    - - - -AI_DESIGNATE.FlashStatusMenu - -
    -
    - - - -
    -
    -
    -
    - - -AI_DESIGNATE:GenerateLaserCodes() - -
    -
    - -

    Generate an array of possible laser codes.

    - - -

    Each new lase will select a code from this table. -The entered value can range from 1111 - 1788, --- but the first digit of the series must be a 1 or 2 --- and the last three digits must be between 1 and 8. - The range used to be bugged so its not 1 - 8 but 0 - 7. -function below will use the range 1-7 just in case

    - -

    Return value

    - -

    #AI_DESIGNATE:

    - - -
    -
    -
    -
    - - -AI_DESIGNATE:Illuminate() - -
    -
    - -

    Illuminate Trigger for AI_DESIGNATE

    - -
    -
    -
    -
    - - #number - -AI_DESIGNATE.LaseDuration - -
    -
    - - - -
    -
    -
    -
    - - -AI_DESIGNATE:LaseOff() - -
    -
    - -

    LaseOff Trigger for AI_DESIGNATE

    - -
    -
    -
    -
    - - -AI_DESIGNATE:LaseOn() - -
    -
    - -

    LaseOn Trigger for AI_DESIGNATE

    - -
    -
    -
    -
    - - - -AI_DESIGNATE.LaserCodes - -
    -
    - - - -
    -
    -
    -
    - - - -AI_DESIGNATE.LaserCodesUsed - -
    -
    - - - -
    -
    -
    -
    - - -AI_DESIGNATE:MenuAutoLase(AutoLase) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      AutoLase :

      - -
    • -
    -
    -
    -
    -
    - - -AI_DESIGNATE:MenuFlashStatus(AttackGroup, Flash) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      AttackGroup :

      - -
    • -
    • - -

      Flash :

      - -
    • -
    -
    -
    -
    -
    - - -AI_DESIGNATE:MenuIlluminate(Index) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      Index :

      - -
    • -
    -
    -
    -
    -
    - - -AI_DESIGNATE:MenuLaseOff(Index, Duration) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Index :

      - -
    • -
    • - -

      Duration :

      - -
    • -
    -
    -
    -
    -
    - - -AI_DESIGNATE:MenuLaseOn(Index, Duration) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Index :

      - -
    • -
    • - -

      Duration :

      - -
    • -
    -
    -
    -
    -
    - - -AI_DESIGNATE:MenuSmoke(Index, Color) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Index :

      - -
    • -
    • - -

      Color :

      - -
    • -
    -
    -
    -
    -
    - - -AI_DESIGNATE:MenuStatus(AttackGroup) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      AttackGroup :

      - -
    • -
    -
    -
    -
    -
    - - -AI_DESIGNATE:New(Detection, AttackSet) - -
    -
    - -

    AI_DESIGNATE Constructor.

    - - -

    This class is an abstract class and should not be instantiated.

    - -

    Parameters

    - -

    Return value

    - -

    #AI_DESIGNATE:

    - - -
    -
    -
    -
    - - -AI_DESIGNATE:OnAfterDetect(From, Event, To) - -
    -
    - -

    Detect Handler OnAfter for AI_DESIGNATE

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -AI_DESIGNATE:OnAfterIlluminate(From, Event, To) - -
    -
    - -

    Illuminate Handler OnAfter for AI_DESIGNATE

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -AI_DESIGNATE:OnAfterLaseOff(From, Event, To) - -
    -
    - -

    LaseOff Handler OnAfter for AI_DESIGNATE

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -AI_DESIGNATE:OnAfterLaseOn(From, Event, To) - -
    -
    - -

    LaseOn Handler OnAfter for AI_DESIGNATE

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -AI_DESIGNATE:OnAfterSmoke(From, Event, To) - -
    -
    - -

    Smoke Handler OnAfter for AI_DESIGNATE

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -AI_DESIGNATE:OnAfterStatus(From, Event, To) - -
    -
    - -

    Status Handler OnAfter for AI_DESIGNATE

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -AI_DESIGNATE:OnBeforeDetect(From, Event, To) - -
    -
    - -

    Detect Handler OnBefore for AI_DESIGNATE

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -AI_DESIGNATE:OnBeforeIlluminate(From, Event, To) - -
    -
    - -

    Illuminate Handler OnBefore for AI_DESIGNATE

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -AI_DESIGNATE:OnBeforeLaseOff(From, Event, To) - -
    -
    - -

    LaseOff Handler OnBefore for AI_DESIGNATE

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -AI_DESIGNATE:OnBeforeLaseOn(From, Event, To) - -
    -
    - -

    LaseOn Handler OnBefore for AI_DESIGNATE

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -AI_DESIGNATE:OnBeforeSmoke(From, Event, To) - -
    -
    - -

    Smoke Handler OnBefore for AI_DESIGNATE

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -AI_DESIGNATE:OnBeforeStatus(From, Event, To) - -
    -
    - -

    Status Handler OnBefore for AI_DESIGNATE

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - - -AI_DESIGNATE.RecceSet - -
    -
    - - - -
    -
    -
    -
    - - - -AI_DESIGNATE.Recces - -
    -
    - - - -
    -
    -
    -
    - - -AI_DESIGNATE:SendStatus() - -
    -
    - -

    Sends the status to the Attack Groups.

    - -

    Return value

    - -

    #AI_DESIGNATE:

    - - -
    -
    -
    -
    - - -AI_DESIGNATE:SetAutoLase(AutoLase) - -
    -
    - -

    Set auto lase.

    - - -

    Auto lase will start lasing targets immediately when these are in range.

    - -

    Parameter

    -
      -
    • - -

      #boolean AutoLase :

      - -
    • -
    -

    Return value

    - -

    #AI_DESIGNATE:

    - - -
    -
    -
    -
    - - -AI_DESIGNATE:SetDesignateMenu() - -
    -
    - -

    Sets the Designate Menu.

    - -

    Return value

    - -

    #AI_DESIGNATE:

    - - -
    -
    -
    -
    - - -AI_DESIGNATE:SetFlashStatusMenu(FlashMenu) - -
    -
    - -

    Set the flashing of the status menu.

    - -

    Parameter

    -
      -
    • - -

      #boolean FlashMenu : -true: the status menu will be flashed every detection run; false: no flashing of the menu.

      - -
    • -
    -

    Return value

    - -

    #AI_DESIGNATE:

    - - -
    -
    -
    -
    - - -AI_DESIGNATE:SetLaserCodes(<, LaserCodes) - -
    -
    - -

    Set an array of possible laser codes.

    - - -

    Each new lase will select a code from this table.

    - -

    Parameters

    -
      -
    • - -

      #list < : -number> LaserCodes

      - -
    • -
    • - -

      LaserCodes :

      - -
    • -
    -

    Return value

    - -

    #AI_DESIGNATE:

    - - -
    -
    -
    -
    - - -AI_DESIGNATE:SetThreatLevelPrioritization(Prioritize) - -
    -
    - -

    Set priorization of Targets based on the Threat Level of the Target in an Air to Ground context.

    - -

    Parameter

    -
      -
    • - -

      #boolean Prioritize :

      - -
    • -
    -

    Return value

    - -

    #AI_DESIGNATE:

    - - -
    -
    -
    -
    - - -AI_DESIGNATE:Smoke() - -
    -
    - -

    Smoke Trigger for AI_DESIGNATE

    - -
    -
    -
    -
    - - -AI_DESIGNATE:Status() - -
    -
    - -

    Status Trigger for AI_DESIGNATE

    - -
    -
    -
    -
    - - - -AI_DESIGNATE.ThreatLevelPrioritization - -
    -
    - - - -
    -
    -
    -
    - - -AI_DESIGNATE:__Detect(Delay) - -
    -
    - -

    Detect Asynchronous Trigger for AI_DESIGNATE

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -AI_DESIGNATE:__Illuminate(Delay) - -
    -
    - -

    Illuminate Asynchronous Trigger for AI_DESIGNATE

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -AI_DESIGNATE:__LaseOff(Delay) - -
    -
    - -

    LaseOff Asynchronous Trigger for AI_DESIGNATE

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -AI_DESIGNATE:__LaseOn(Delay) - -
    -
    - -

    LaseOn Asynchronous Trigger for AI_DESIGNATE

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -AI_DESIGNATE:__Smoke(Delay) - -
    -
    - -

    Smoke Asynchronous Trigger for AI_DESIGNATE

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -AI_DESIGNATE:__Status(Delay) - -
    -
    - -

    Status Asynchronous Trigger for AI_DESIGNATE

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -AI_DESIGNATE:onafterDetect() - -
    -
    - - - -

    Return value

    - -

    #AI_DESIGNATE:

    - - -
    -
    -
    -
    - - -AI_DESIGNATE:onafterDone(From, Event, To, Index) - -
    -
    - -

    Done

    - -

    Parameters

    -
      -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    • - -

      Index :

      - -
    • -
    -

    Return value

    - -

    #AI_DESIGNATE:

    - - -
    -
    -
    -
    - - -AI_DESIGNATE:onafterIlluminate(From, Event, To, Index) - -
    -
    - -

    Illuminating

    - -

    Parameters

    -
      -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    • - -

      Index :

      - -
    • -
    -

    Return value

    - -

    #AI_DESIGNATE:

    - - -
    -
    -
    -
    - - -AI_DESIGNATE:onafterLaseOff(From, Event, To, Index) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    • - -

      Index :

      - -
    • -
    -

    Return value

    - -

    #AI_DESIGNATE:

    - - -
    -
    -
    -
    - - -AI_DESIGNATE:onafterLaseOn(From, Event, To, Index, Duration) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    • - -

      Index :

      - -
    • -
    • - -

      Duration :

      - -
    • -
    -
    -
    -
    -
    - - -AI_DESIGNATE:onafterLasing(From, Event, To, Index, Duration) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    • - -

      Index :

      - -
    • -
    • - -

      Duration :

      - -
    • -
    -

    Return value

    - -

    #AI_DESIGNATE:

    - - -
    -
    -
    -
    - - -AI_DESIGNATE:onafterSmoke(From, Event, To, Index, Color) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    • - -

      Index :

      - -
    • -
    • - -

      Color :

      - -
    • -
    -

    Return value

    - -

    #AI_DESIGNATE:

    - - -
    -
    - -

    Type list

    - -
    - -
    - - diff --git a/docs/Documentation/AI_Follow.html b/docs/Documentation/AI_Follow.html deleted file mode 100644 index b52685e7a..000000000 --- a/docs/Documentation/AI_Follow.html +++ /dev/null @@ -1,1935 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module AI_Follow

    - -

    AI -- (R2.1) Build large formations of AI Groups flying together.

    - - - -

    Banner Image

    - -
    - -

    AI_FORMATION makes AI GROUPs fly in formation of various compositions.

    - -

    There are the following types of classes defined:

    - - - -
    - -

    Demo Missions

    - -

    AI_FORMATION Demo Missions source code

    - -

    AI_FORMATION Demo Missions, only for beta testers

    - -

    ALL Demo Missions pack of the last release

    - -
    - -

    YouTube Channel

    - - - -
    - -

    AUTHORS and CONTRIBUTIONS

    - -

    Contributions:

    - -

    Authors:

    - -
      -
    • FlightControl: Concept, Design & Programming. -
    • -
    - -

    Global(s)

    - - - - - -
    AI_FORMATION -

    AI_FORMATION class, extends Fsm#FSM_SET

    - -

    The #AI_FORMATION class allows you to build large formations, make AI follow a Client#CLIENT (player) leader or a Unit#UNIT (AI) leader.

    -
    -

    Type AI_FORMATION

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AI_FORMATION.FollowDistance -

    The current follow distance.

    -
    AI_FORMATION.FollowGroupSet - -
    AI_FORMATION.FollowMenuResumeMission - -
    AI_FORMATION.FollowMode -

    The mode the escort is in.

    -
    AI_FORMATION.FollowName - -
    AI_FORMATION.FollowScheduler -

    The instance of the SCHEDULER class.

    -
    AI_FORMATION.FollowUnit - -
    AI_FORMATION:FormationLeftLine(XStart, YStart, ZStart, ZSpace) -

    FormationLeftLine Trigger for AI_FORMATION

    -
    AI_FORMATION:FormationLeftWing(XStart, XSpace, YStart, ZStart, ZSpace) -

    FormationLeftWing Trigger for AI_FORMATION

    -
    AI_FORMATION:FormationRightLine(XStart, YStart, ZStart, ZSpace) -

    FormationRightLine Trigger for AI_FORMATION

    -
    AI_FORMATION:FormationRightWing(XStart, XSpace, YStart, ZStart, ZSpace) -

    FormationRightWing Trigger for AI_FORMATION

    -
    AI_FORMATION:New(FollowUnit, FollowGroupSet, FollowName, FollowBriefing) -

    AI_FORMATION class constructor for an AI group

    -
    AI_FORMATION:OnAfterFormationLeftLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace) -

    FormationLeftLine Handler OnAfter for AI_FORMATION

    -
    AI_FORMATION:OnAfterFormationLeftWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace) -

    FormationLeftWing Handler OnAfter for AI_FORMATION

    -
    AI_FORMATION:OnAfterFormationRightLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace) -

    FormationRightLine Handler OnAfter for AI_FORMATION

    -
    AI_FORMATION:OnAfterFormationRightWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace) -

    FormationRightWing Handler OnAfter for AI_FORMATION

    -
    AI_FORMATION:OnBeforeFormationLeftLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace) -

    FormationLeftLine Handler OnBefore for AI_FORMATION

    -
    AI_FORMATION:OnBeforeFormationLeftWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace) -

    FormationLeftWing Handler OnBefore for AI_FORMATION

    -
    AI_FORMATION:OnBeforeFormationRightLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace) -

    FormationRightLine Handler OnBefore for AI_FORMATION

    -
    AI_FORMATION:OnBeforeFormationRightWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace) -

    FormationRightWing Handler OnBefore for AI_FORMATION

    -
    AI_FORMATION.OptionReactionOnThreat -

    Which REACTIONONTHREAT is set to the FollowGroup.

    -
    AI_FORMATION.ReportTargets -

    If true, nearby targets are reported.

    -
    AI_FORMATION.SmokeDirectionVector - -
    AI_FORMATION:TestSmokeDirectionVector(SmokeDirection) -

    This function is for test, it will put on the frequency of the FollowScheduler a red smoke at the direction vector calculated for the escort to fly to.

    -
    AI_FORMATION:__FormationLeftLine(Delay, XStart, YStart, ZStart, ZSpace) -

    FormationLeftLine Asynchronous Trigger for AI_FORMATION

    -
    AI_FORMATION:__FormationLeftWing(Delay, XStart, XSpace, YStart, ZStart, ZSpace) -

    FormationLeftWing Asynchronous Trigger for AI_FORMATION

    -
    AI_FORMATION:__FormationRightLine(Delay, XStart, YStart, ZStart, ZSpace) -

    FormationRightLine Asynchronous Trigger for AI_FORMATION

    -
    AI_FORMATION:__FormationRightWing(Delay, XStart, XSpace, YStart, ZStart, ZSpace) -

    FormationRightWing Asynchronous Trigger for AI_FORMATION

    -
    AI_FORMATION:onafterFormationLeftLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace) - -
    AI_FORMATION:onafterFormationLeftWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace) - -
    AI_FORMATION:onafterFormationRightLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace) - -
    AI_FORMATION:onafterFormationRightWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace) - -
    AI_FORMATION:onenterFollowing(FollowGroupSet) - -
    - -

    Type AI_FORMATION.MODE

    - - - - - - - - - -
    AI_FORMATION.MODE.FOLLOW - -
    AI_FORMATION.MODE.MISSION - -
    - -

    Type MENUPARAM

    - - - - - - - - - - - - - - - - - -
    MENUPARAM.ParamDistance - -
    MENUPARAM.ParamFunction - -
    MENUPARAM.ParamMessage - -
    MENUPARAM.ParamSelf - -
    - -

    Global(s)

    -
    -
    - - #AI_FORMATION - -AI_FORMATION - -
    -
    - -

    AI_FORMATION class, extends Fsm#FSM_SET

    - -

    The #AI_FORMATION class allows you to build large formations, make AI follow a Client#CLIENT (player) leader or a Unit#UNIT (AI) leader.

    - - - -

    AI_FORMATION construction

    - -

    Create a new SPAWN object with the AI_FORMATION.New method:

    - - - -

    Initialization methods

    - -

    The following menus are created within the RADIO MENU of an active unit hosted by a player:

    - - - - - -

    Usage:

    -
    -- Declare a new FollowPlanes object as follows:
    -
    --- First find the GROUP object and the CLIENT object.
    -local FollowUnit = CLIENT:FindByName( "Unit Name" ) -- The Unit Name is the name of the unit flagged with the skill Client in the mission editor.
    -local FollowGroup = GROUP:FindByName( "Group Name" ) -- The Group Name is the name of the group that will escort the Follow Client.
    -
    --- Now use these 2 objects to construct the new FollowPlanes object.
    -FollowPlanes = AI_FORMATION:New( FollowUnit, FollowGroup, "Desert", "Welcome to the mission. You are escorted by a plane with code name 'Desert', which can be instructed through the F10 radio menu." )
    -
    - -
    -
    -

    Type AI_Follow

    - -

    Type AI_FORMATION

    - -

    AI_FORMATION class

    - -

    Field(s)

    -
    -
    - - #number - -AI_FORMATION.FollowDistance - -
    -
    - -

    The current follow distance.

    - -
    -
    -
    -
    - - Set#SET_GROUP - -AI_FORMATION.FollowGroupSet - -
    -
    - - - -
    -
    -
    -
    - - Menu#MENU_CLIENT - -AI_FORMATION.FollowMenuResumeMission - -
    -
    - - - -
    -
    -
    -
    - - #AI_FORMATION.MODE - -AI_FORMATION.FollowMode - -
    -
    - -

    The mode the escort is in.

    - -
    -
    -
    -
    - - #string - -AI_FORMATION.FollowName - -
    -
    - - - -
    -
    -
    -
    - - Scheduler#SCHEDULER - -AI_FORMATION.FollowScheduler - -
    -
    - -

    The instance of the SCHEDULER class.

    - -
    -
    -
    -
    - - Unit#UNIT - -AI_FORMATION.FollowUnit - -
    -
    - - - -
    -
    -
    -
    - - -AI_FORMATION:FormationLeftLine(XStart, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationLeftLine Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:FormationLeftWing(XStart, XSpace, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationLeftWing Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:FormationRightLine(XStart, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationRightLine Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:FormationRightWing(XStart, XSpace, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationRightWing Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:New(FollowUnit, FollowGroupSet, FollowName, FollowBriefing) - -
    -
    - -

    AI_FORMATION class constructor for an AI group

    - -

    Parameters

    -
      -
    • - -

      Unit#UNIT FollowUnit : -The UNIT leading the FolllowGroupSet.

      - -
    • -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string FollowName : -Name of the escort.

      - -
    • -
    • - -

      FollowBriefing :

      - -
    • -
    -

    Return value

    - -

    #AI_FORMATION: -self

    - -
    -
    -
    -
    - - -AI_FORMATION:OnAfterFormationLeftLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationLeftLine Handler OnAfter for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:OnAfterFormationLeftWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationLeftWing Handler OnAfter for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:OnAfterFormationRightLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationRightLine Handler OnAfter for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:OnAfterFormationRightWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationRightWing Handler OnAfter for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:OnBeforeFormationLeftLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationLeftLine Handler OnBefore for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -AI_FORMATION:OnBeforeFormationLeftWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationLeftWing Handler OnBefore for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -AI_FORMATION:OnBeforeFormationRightLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationRightLine Handler OnBefore for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -AI_FORMATION:OnBeforeFormationRightWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationRightWing Handler OnBefore for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - DCSTypes#AI.Option.Air.val.REACTION_ON_THREAT - -AI_FORMATION.OptionReactionOnThreat - -
    -
    - -

    Which REACTIONONTHREAT is set to the FollowGroup.

    - -
    -
    -
    -
    - - #boolean - -AI_FORMATION.ReportTargets - -
    -
    - -

    If true, nearby targets are reported.

    - -
    -
    -
    -
    - - -AI_FORMATION.SmokeDirectionVector - -
    -
    - - - -
    -
    -
    -
    - - -AI_FORMATION:TestSmokeDirectionVector(SmokeDirection) - -
    -
    - -

    This function is for test, it will put on the frequency of the FollowScheduler a red smoke at the direction vector calculated for the escort to fly to.

    - - -

    This allows to visualize where the escort is flying to.

    - -

    Parameter

    -
      -
    • - -

      #boolean SmokeDirection : -If true, then the direction vector will be smoked.

      - -
    • -
    -

    Return value

    - -

    #AI_FORMATION:

    - - -
    -
    -
    -
    - - -AI_FORMATION:__FormationLeftLine(Delay, XStart, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationLeftLine Asynchronous Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number Delay :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:__FormationLeftWing(Delay, XStart, XSpace, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationLeftWing Asynchronous Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number Delay :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:__FormationRightLine(Delay, XStart, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationRightLine Asynchronous Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number Delay :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:__FormationRightWing(Delay, XStart, XSpace, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationRightWing Asynchronous Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number Delay :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:onafterFormationLeftLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      FollowGroupSet :

      - -
    • -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    • - -

      XStart :

      - -
    • -
    • - -

      YStart :

      - -
    • -
    • - -

      ZStart :

      - -
    • -
    • - -

      ZSpace :

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:onafterFormationLeftWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      FollowGroupSet :

      - -
    • -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    • - -

      XStart :

      - -
    • -
    • - -

      XSpace :

      - -
    • -
    • - -

      YStart :

      - -
    • -
    • - -

      ZStart :

      - -
    • -
    • - -

      ZSpace :

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:onafterFormationRightLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      FollowGroupSet :

      - -
    • -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    • - -

      XStart :

      - -
    • -
    • - -

      YStart :

      - -
    • -
    • - -

      ZStart :

      - -
    • -
    • - -

      ZSpace :

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:onafterFormationRightWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      FollowGroupSet :

      - -
    • -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    • - -

      XStart :

      - -
    • -
    • - -

      XSpace :

      - -
    • -
    • - -

      YStart :

      - -
    • -
    • - -

      ZStart :

      - -
    • -
    • - -

      ZSpace :

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:onenterFollowing(FollowGroupSet) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      FollowGroupSet :

      - -
    • -
    -
    -
    - -

    Type AI_FORMATION.MODE

    - -

    AI_FORMATION.Mode class

    - -

    Field(s)

    -
    -
    - - #number - -AI_FORMATION.MODE.FOLLOW - -
    -
    - - - -
    -
    -
    -
    - - #number - -AI_FORMATION.MODE.MISSION - -
    -
    - - - -
    -
    - -

    Type Distance

    - -

    Type MENUPARAM

    - -

    MENUPARAM type

    - -

    Field(s)

    -
    -
    - - #Distance - -MENUPARAM.ParamDistance - -
    -
    - - - -
    -
    -
    -
    - - #function - -MENUPARAM.ParamFunction - -
    -
    - - - -
    -
    -
    -
    - - #string - -MENUPARAM.ParamMessage - -
    -
    - - - -
    -
    -
    -
    - - #AI_FORMATION - -MENUPARAM.ParamSelf - -
    -
    - - - -
    -
    - -

    Type nubmer

    - -
    - -
    - - diff --git a/docs/Documentation/AI_Formation.html b/docs/Documentation/AI_Formation.html deleted file mode 100644 index 9738caee6..000000000 --- a/docs/Documentation/AI_Formation.html +++ /dev/null @@ -1,4094 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module AI_Formation

    - -

    AI -- Build large formations of AI Groups flying together.

    - - - -

    Banner Image

    - -
    - -

    AI_FORMATION makes AI GROUPs fly in formation of various compositions. -The AI_FORMATION class models formations in a different manner than the internal DCS formation logic!!! -The purpose of the class is to:

    - -
      -
    • Make formation building a process that can be managed while in flight, rather than a task.
    • -
    • Human players can guide formations, consisting of larget planes.
    • -
    • Build large formations (like a large bomber field).
    • -
    • Form formations that DCS does not support off the shelve.
    • -
    - -

    A few remarks:

    - -
      -
    • Depending on the type of plane, the change in direction by the leader may result in the formation getting disentangled while in flight and needs to be rebuild.
    • -
    • Formations are vulnerable to collissions, but is depending on the type of plane, the distance between the planes and the speed and angle executed by the leader.
    • -
    • Formations may take a while to build up.
    • -
    - -

    As a result, the AI_FORMATION is not perfect, but is very useful to:

    - -
      -
    • Model large formations when flying straight line.
    • -
    • Make humans guide a large formation, when the planes are wide from each other.
    • -
    - -

    There are the following types of classes defined:

    - - - -
    - -

    Demo Missions

    - -

    AI_FORMATION Demo Missions source code

    - -

    AI_FORMATION Demo Missions, only for beta testers

    - -

    ALL Demo Missions pack of the last release

    - -
    - -

    YouTube Channel

    - - - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions:

    - -
    -

    - -

    Global(s)

    - - - - - -
    AI_FORMATION -

    AI_FORMATION class, extends Fsm#FSM_SET

    - -

    The #AI_FORMATION class allows you to build large formations, make AI follow a Client#CLIENT (player) leader or a Unit#UNIT (AI) leader.

    -
    -

    Type AI_FORMATION

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AI_FORMATION.FlightRandomization - -
    AI_FORMATION.FollowDistance -

    The current follow distance.

    -
    AI_FORMATION.FollowGroupSet - -
    AI_FORMATION.FollowMode -

    The mode the escort is in.

    -
    AI_FORMATION.FollowName - -
    AI_FORMATION.FollowScheduler -

    The instance of the SCHEDULER class.

    -
    AI_FORMATION.FollowUnit - -
    AI_FORMATION:FormationBox(XStart, XSpace, YStart, YSpace, ZStart, ZSpace, ZLevels) -

    FormationBox Trigger for AI_FORMATION

    -
    AI_FORMATION:FormationCenterWing(XStart, XSpace, YStart, YSpace, ZStart, ZSpace) -

    FormationCenterWing Trigger for AI_FORMATION

    -
    AI_FORMATION:FormationLeftLine(XStart, YStart, ZStart, ZSpace) -

    FormationLeftLine Trigger for AI_FORMATION

    -
    AI_FORMATION:FormationLeftWing(XStart, XSpace, YStart, ZStart, ZSpace) -

    FormationLeftWing Trigger for AI_FORMATION

    -
    AI_FORMATION:FormationLine(XStart, XSpace, YStart, YSpace, ZStart, ZSpace) -

    FormationLine Trigger for AI_FORMATION

    -
    AI_FORMATION:FormationRightLine(XStart, YStart, ZStart, ZSpace) -

    FormationRightLine Trigger for AI_FORMATION

    -
    AI_FORMATION:FormationRightWing(XStart, XSpace, YStart, ZStart, ZSpace) -

    FormationRightWing Trigger for AI_FORMATION

    -
    AI_FORMATION:FormationStack(XStart, XSpace, YStart, YSpace) -

    FormationStack Trigger for AI_FORMATION

    -
    AI_FORMATION:FormationTrail(XStart, XSpace, YStart) -

    FormationTrail Trigger for AI_FORMATION

    -
    AI_FORMATION:FormationVic(XStart, XSpace, YStart, YSpace, ZStart, ZSpace) -

    FormationVic Trigger for AI_FORMATION

    -
    AI_FORMATION:New(FollowUnit, FollowGroupSet, FollowName, FollowBriefing) -

    AI_FORMATION class constructor for an AI group

    -
    AI_FORMATION:OnAfterFormationBox(From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace, ZLevels) -

    FormationBox Handler OnAfter for AI_FORMATION

    -
    AI_FORMATION:OnAfterFormationCenterWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace) -

    FormationCenterWing Handler OnAfter for AI_FORMATION

    -
    AI_FORMATION:OnAfterFormationLeftLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace) -

    FormationLeftLine Handler OnAfter for AI_FORMATION

    -
    AI_FORMATION:OnAfterFormationLeftWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace) -

    FormationLeftWing Handler OnAfter for AI_FORMATION

    -
    AI_FORMATION:OnAfterFormationLine(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace) -

    FormationLine Handler OnAfter for AI_FORMATION

    -
    AI_FORMATION:OnAfterFormationRightLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace) -

    FormationRightLine Handler OnAfter for AI_FORMATION

    -
    AI_FORMATION:OnAfterFormationRightWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace) -

    FormationRightWing Handler OnAfter for AI_FORMATION

    -
    AI_FORMATION:OnAfterFormationStack(From, Event, To, XStart, XSpace, YStart, YSpace) -

    FormationStack Handler OnAfter for AI_FORMATION

    -
    AI_FORMATION:OnAfterFormationTrail(From, Event, To, XStart, XSpace, YStart) -

    FormationTrail Handler OnAfter for AI_FORMATION

    -
    AI_FORMATION:OnAfterFormationVic(From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace) -

    FormationVic Handler OnAfter for AI_FORMATION

    -
    AI_FORMATION:OnBeforeFormationBox(From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace, ZLevels) -

    FormationBox Handler OnBefore for AI_FORMATION

    -
    AI_FORMATION:OnBeforeFormationCenterWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace) -

    FormationCenterWing Handler OnBefore for AI_FORMATION

    -
    AI_FORMATION:OnBeforeFormationLeftLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace) -

    FormationLeftLine Handler OnBefore for AI_FORMATION

    -
    AI_FORMATION:OnBeforeFormationLeftWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace) -

    FormationLeftWing Handler OnBefore for AI_FORMATION

    -
    AI_FORMATION:OnBeforeFormationLine(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace) -

    FormationLine Handler OnBefore for AI_FORMATION

    -
    AI_FORMATION:OnBeforeFormationRightLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace) -

    FormationRightLine Handler OnBefore for AI_FORMATION

    -
    AI_FORMATION:OnBeforeFormationRightWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace) -

    FormationRightWing Handler OnBefore for AI_FORMATION

    -
    AI_FORMATION:OnBeforeFormationStack(From, Event, To, XStart, XSpace, YStart, YSpace) -

    FormationStack Handler OnBefore for AI_FORMATION

    -
    AI_FORMATION:OnBeforeFormationTrail(From, Event, To, XStart, XSpace, YStart) -

    FormationTrail Handler OnBefore for AI_FORMATION

    -
    AI_FORMATION:OnBeforeFormationVic(From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace) -

    FormationVic Handler OnBefore for AI_FORMATION

    -
    AI_FORMATION.OptionReactionOnThreat -

    Which REACTIONONTHREAT is set to the FollowGroup.

    -
    AI_FORMATION.ReportTargets -

    If true, nearby targets are reported.

    -
    AI_FORMATION:SetFlightRandomization(FlightRandomization) -

    Use the method AIFormation#AIFORMATION.SetFlightRandomization() to make the air units in your formation randomize their flight a bit while in formation.

    -
    AI_FORMATION.SmokeDirectionVector - -
    AI_FORMATION:TestSmokeDirectionVector(SmokeDirection) -

    This function is for test, it will put on the frequency of the FollowScheduler a red smoke at the direction vector calculated for the escort to fly to.

    -
    AI_FORMATION:__FormationBox(Delay, XStart, XSpace, YStart, YSpace, ZStart, ZSpace, ZLevels) -

    FormationBox Asynchronous Trigger for AI_FORMATION

    -
    AI_FORMATION:__FormationCenterWing(Delay, XStart, XSpace, YStart, YSpace, ZStart, ZSpace) -

    FormationCenterWing Asynchronous Trigger for AI_FORMATION

    -
    AI_FORMATION:__FormationLeftLine(Delay, XStart, YStart, ZStart, ZSpace) -

    FormationLeftLine Asynchronous Trigger for AI_FORMATION

    -
    AI_FORMATION:__FormationLeftWing(Delay, XStart, XSpace, YStart, ZStart, ZSpace) -

    FormationLeftWing Asynchronous Trigger for AI_FORMATION

    -
    AI_FORMATION:__FormationLine(Delay, XStart, XSpace, YStart, YSpace, ZStart, ZSpace) -

    FormationLine Asynchronous Trigger for AI_FORMATION

    -
    AI_FORMATION:__FormationRightLine(Delay, XStart, YStart, ZStart, ZSpace) -

    FormationRightLine Asynchronous Trigger for AI_FORMATION

    -
    AI_FORMATION:__FormationRightWing(Delay, XStart, XSpace, YStart, ZStart, ZSpace) -

    FormationRightWing Asynchronous Trigger for AI_FORMATION

    -
    AI_FORMATION:__FormationStack(Delay, XStart, XSpace, YStart, YSpace) -

    FormationStack Asynchronous Trigger for AI_FORMATION

    -
    AI_FORMATION:__FormationTrail(Delay, XStart, XSpace, YStart) -

    FormationTrail Asynchronous Trigger for AI_FORMATION

    -
    AI_FORMATION:__FormationVic(Delay, XStart, XSpace, YStart, YSpace, ZStart, ZSpace) -

    FormationVic Asynchronous Trigger for AI_FORMATION

    -
    AI_FORMATION:onafterFormationBox(From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace, ZLevels, FollowGroupSet) -

    FormationBox Handler OnAfter for AI_FORMATION

    -
    AI_FORMATION:onafterFormationCenterWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace) -

    FormationCenterWing Handler OnAfter for AI_FORMATION

    -
    AI_FORMATION:onafterFormationLeftLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace) -

    FormationLeftLine Handler OnAfter for AI_FORMATION

    -
    AI_FORMATION:onafterFormationLeftWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace) -

    FormationLeftWing Handler OnAfter for AI_FORMATION

    -
    AI_FORMATION:onafterFormationLine(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace) -

    FormationLine Handler OnAfter for AI_FORMATION

    -
    AI_FORMATION:onafterFormationRightLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace) -

    FormationRightLine Handler OnAfter for AI_FORMATION

    -
    AI_FORMATION:onafterFormationRightWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace) - -
    AI_FORMATION:onafterFormationStack(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, YSpace) -

    FormationStack Handler OnAfter for AI_FORMATION

    -
    AI_FORMATION:onafterFormationTrail(FollowGroupSet, From, Event, To, XStart, XSpace, YStart) -

    FormationTrail Handler OnAfter for AI_FORMATION

    -
    AI_FORMATION:onafterFormationVic(From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace, FollowGroupSet) -

    FormationVic Handle for AI_FORMATION

    -
    AI_FORMATION:onenterFollowing(FollowGroupSet) - -
    - -

    Type AI_FORMATION.MODE

    - - - - - - - - - -
    AI_FORMATION.MODE.FOLLOW - -
    AI_FORMATION.MODE.MISSION - -
    - -

    Type MENUPARAM

    - - - - - - - - - - - - - - - - - -
    MENUPARAM.ParamDistance - -
    MENUPARAM.ParamFunction - -
    MENUPARAM.ParamMessage - -
    MENUPARAM.ParamSelf - -
    - -

    Global(s)

    -
    -
    - - #AI_FORMATION - -AI_FORMATION - -
    -
    - -

    AI_FORMATION class, extends Fsm#FSM_SET

    - -

    The #AI_FORMATION class allows you to build large formations, make AI follow a Client#CLIENT (player) leader or a Unit#UNIT (AI) leader.

    - - - -

    AI_FORMATION makes AI GROUPs fly in formation of various compositions. -The AI_FORMATION class models formations in a different manner than the internal DCS formation logic!!! -The purpose of the class is to:

    - -
      -
    • Make formation building a process that can be managed while in flight, rather than a task.
    • -
    • Human players can guide formations, consisting of larget planes.
    • -
    • Build large formations (like a large bomber field).
    • -
    • Form formations that DCS does not support off the shelve.
    • -
    - -

    A few remarks:

    - -
      -
    • Depending on the type of plane, the change in direction by the leader may result in the formation getting disentangled while in flight and needs to be rebuild.
    • -
    • Formations are vulnerable to collissions, but is depending on the type of plane, the distance between the planes and the speed and angle executed by the leader.
    • -
    • Formations may take a while to build up.
    • -
    - -

    As a result, the AI_FORMATION is not perfect, but is very useful to:

    - -
      -
    • Model large formations when flying straight line. You can build close formations when doing this.
    • -
    • Make humans guide a large formation, when the planes are wide from each other.
    • -
    - -

    AI_FORMATION construction

    - -

    Create a new SPAWN object with the AI_FORMATION.New method:

    - - - -

    Formation methods

    - -

    The following methods can be used to set or change the formation:

    - - - -

    Randomization

    - -

    Use the method AIFormation#AIFORMATION.SetFlightRandomization() to simulate the formation flying errors that pilots make while in formation. Is a range set in meters.

    - - -

    Usage:

    -
    local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart()
    -FollowGroupSet:Flush()
    -local LeaderUnit = UNIT:FindByName( "Leader" )
    -local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Center Wing Formation", "Briefing" )
    -LargeFormation:FormationCenterWing( 500, 50, 0, 250, 250 )
    -LargeFormation:__Start( 1 )
    -
    - -
    -
    -

    Type AI_Formation

    - -

    Type AI_FORMATION

    - -

    AI_FORMATION class

    - -

    Field(s)

    -
    -
    - - - -AI_FORMATION.FlightRandomization - -
    -
    - - - -
    -
    -
    -
    - - #number - -AI_FORMATION.FollowDistance - -
    -
    - -

    The current follow distance.

    - -
    -
    -
    -
    - - Set#SET_GROUP - -AI_FORMATION.FollowGroupSet - -
    -
    - - - -
    -
    -
    -
    - - #AI_FORMATION.MODE - -AI_FORMATION.FollowMode - -
    -
    - -

    The mode the escort is in.

    - -
    -
    -
    -
    - - #string - -AI_FORMATION.FollowName - -
    -
    - - - -
    -
    -
    -
    - - Scheduler#SCHEDULER - -AI_FORMATION.FollowScheduler - -
    -
    - -

    The instance of the SCHEDULER class.

    - -
    -
    -
    -
    - - Unit#UNIT - -AI_FORMATION.FollowUnit - -
    -
    - - - -
    -
    -
    -
    - - -AI_FORMATION:FormationBox(XStart, XSpace, YStart, YSpace, ZStart, ZSpace, ZLevels) - -
    -
    - -

    FormationBox Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #number YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    • - -

      #number ZLevels : -The amount of levels on the Z-axis.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:FormationCenterWing(XStart, XSpace, YStart, YSpace, ZStart, ZSpace) - -
    -
    - -

    FormationCenterWing Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #number YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:FormationLeftLine(XStart, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationLeftLine Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:FormationLeftWing(XStart, XSpace, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationLeftWing Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:FormationLine(XStart, XSpace, YStart, YSpace, ZStart, ZSpace) - -
    -
    - -

    FormationLine Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:FormationRightLine(XStart, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationRightLine Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:FormationRightWing(XStart, XSpace, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationRightWing Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:FormationStack(XStart, XSpace, YStart, YSpace) - -
    -
    - -

    FormationStack Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #number YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:FormationTrail(XStart, XSpace, YStart) - -
    -
    - -

    FormationTrail Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:FormationVic(XStart, XSpace, YStart, YSpace, ZStart, ZSpace) - -
    -
    - -

    FormationVic Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #number YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:New(FollowUnit, FollowGroupSet, FollowName, FollowBriefing) - -
    -
    - -

    AI_FORMATION class constructor for an AI group

    - -

    Parameters

    -
      -
    • - -

      Unit#UNIT FollowUnit : -The UNIT leading the FolllowGroupSet.

      - -
    • -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string FollowName : -Name of the escort.

      - -
    • -
    • - -

      FollowBriefing :

      - -
    • -
    -

    Return value

    - -

    #AI_FORMATION: -self

    - -
    -
    -
    -
    - - -AI_FORMATION:OnAfterFormationBox(From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace, ZLevels) - -
    -
    - -

    FormationBox Handler OnAfter for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #number YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    • - -

      #number ZLevels : -The amount of levels on the Z-axis.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:OnAfterFormationCenterWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace) - -
    -
    - -

    FormationCenterWing Handler OnAfter for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #number YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:OnAfterFormationLeftLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationLeftLine Handler OnAfter for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:OnAfterFormationLeftWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationLeftWing Handler OnAfter for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:OnAfterFormationLine(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace) - -
    -
    - -

    FormationLine Handler OnAfter for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:OnAfterFormationRightLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationRightLine Handler OnAfter for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:OnAfterFormationRightWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationRightWing Handler OnAfter for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:OnAfterFormationStack(From, Event, To, XStart, XSpace, YStart, YSpace) - -
    -
    - -

    FormationStack Handler OnAfter for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #number YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:OnAfterFormationTrail(From, Event, To, XStart, XSpace, YStart) - -
    -
    - -

    FormationTrail Handler OnAfter for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:OnAfterFormationVic(From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace) - -
    -
    - -

    FormationVic Handler OnAfter for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #number YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:OnBeforeFormationBox(From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace, ZLevels) - -
    -
    - -

    FormationBox Handler OnBefore for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #number YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    • - -

      #number ZLevels : -The amount of levels on the Z-axis.

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -AI_FORMATION:OnBeforeFormationCenterWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace) - -
    -
    - -

    FormationCenterWing Handler OnBefore for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #number YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -AI_FORMATION:OnBeforeFormationLeftLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationLeftLine Handler OnBefore for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -AI_FORMATION:OnBeforeFormationLeftWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationLeftWing Handler OnBefore for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -AI_FORMATION:OnBeforeFormationLine(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace) - -
    -
    - -

    FormationLine Handler OnBefore for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -AI_FORMATION:OnBeforeFormationRightLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationRightLine Handler OnBefore for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -AI_FORMATION:OnBeforeFormationRightWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationRightWing Handler OnBefore for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -AI_FORMATION:OnBeforeFormationStack(From, Event, To, XStart, XSpace, YStart, YSpace) - -
    -
    - -

    FormationStack Handler OnBefore for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #number YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -AI_FORMATION:OnBeforeFormationTrail(From, Event, To, XStart, XSpace, YStart) - -
    -
    - -

    FormationTrail Handler OnBefore for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -AI_FORMATION:OnBeforeFormationVic(From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace) - -
    -
    - -

    FormationVic Handler OnBefore for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #number YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - DCSTypes#AI.Option.Air.val.REACTION_ON_THREAT - -AI_FORMATION.OptionReactionOnThreat - -
    -
    - -

    Which REACTIONONTHREAT is set to the FollowGroup.

    - -
    -
    -
    -
    - - #boolean - -AI_FORMATION.ReportTargets - -
    -
    - -

    If true, nearby targets are reported.

    - -
    -
    -
    -
    - - -AI_FORMATION:SetFlightRandomization(FlightRandomization) - -
    -
    - -

    Use the method AIFormation#AIFORMATION.SetFlightRandomization() to make the air units in your formation randomize their flight a bit while in formation.

    - -

    Parameter

    -
      -
    • - -

      #number FlightRandomization : -The formation flying errors that pilots can make while in formation. Is a range set in meters.

      - -
    • -
    -

    Return value

    - -

    #AI_FORMATION:

    - - -
    -
    -
    -
    - - -AI_FORMATION.SmokeDirectionVector - -
    -
    - - - -
    -
    -
    -
    - - -AI_FORMATION:TestSmokeDirectionVector(SmokeDirection) - -
    -
    - -

    This function is for test, it will put on the frequency of the FollowScheduler a red smoke at the direction vector calculated for the escort to fly to.

    - - -

    This allows to visualize where the escort is flying to.

    - -

    Parameter

    -
      -
    • - -

      #boolean SmokeDirection : -If true, then the direction vector will be smoked.

      - -
    • -
    -

    Return value

    - -

    #AI_FORMATION:

    - - -
    -
    -
    -
    - - -AI_FORMATION:__FormationBox(Delay, XStart, XSpace, YStart, YSpace, ZStart, ZSpace, ZLevels) - -
    -
    - -

    FormationBox Asynchronous Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number Delay :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #number YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    • - -

      #number ZLevels : -The amount of levels on the Z-axis.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:__FormationCenterWing(Delay, XStart, XSpace, YStart, YSpace, ZStart, ZSpace) - -
    -
    - -

    FormationCenterWing Asynchronous Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number Delay :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #number YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:__FormationLeftLine(Delay, XStart, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationLeftLine Asynchronous Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number Delay :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:__FormationLeftWing(Delay, XStart, XSpace, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationLeftWing Asynchronous Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number Delay :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:__FormationLine(Delay, XStart, XSpace, YStart, YSpace, ZStart, ZSpace) - -
    -
    - -

    FormationLine Asynchronous Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number Delay :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:__FormationRightLine(Delay, XStart, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationRightLine Asynchronous Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number Delay :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:__FormationRightWing(Delay, XStart, XSpace, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationRightWing Asynchronous Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number Delay :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:__FormationStack(Delay, XStart, XSpace, YStart, YSpace) - -
    -
    - -

    FormationStack Asynchronous Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number Delay :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #number YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:__FormationTrail(Delay, XStart, XSpace, YStart) - -
    -
    - -

    FormationTrail Asynchronous Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number Delay :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:__FormationVic(Delay, XStart, XSpace, YStart, YSpace, ZStart, ZSpace) - -
    -
    - -

    FormationVic Asynchronous Trigger for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #number Delay :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #number YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:onafterFormationBox(From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace, ZLevels, FollowGroupSet) - -
    -
    - -

    FormationBox Handler OnAfter for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #number YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    • - -

      #number ZLevels : -The amount of levels on the Z-axis.

      - -
    • -
    • - -

      FollowGroupSet :

      - -
    • -
    -

    Return value

    - -

    #AI_FORMATION:

    - - -
    -
    -
    -
    - - -AI_FORMATION:onafterFormationCenterWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace) - -
    -
    - -

    FormationCenterWing Handler OnAfter for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #number YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:onafterFormationLeftLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationLeftLine Handler OnAfter for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -

    Return value

    - -

    #AI_FORMATION:

    - - -
    -
    -
    -
    - - -AI_FORMATION:onafterFormationLeftWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationLeftWing Handler OnAfter for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:onafterFormationLine(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace) - -
    -
    - -

    FormationLine Handler OnAfter for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -

    Return value

    - -

    #AI_FORMATION:

    - - -
    -
    -
    -
    - - -AI_FORMATION:onafterFormationRightLine(FollowGroupSet, From, Event, To, XStart, YStart, ZStart, ZSpace) - -
    -
    - -

    FormationRightLine Handler OnAfter for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    -

    Return value

    - -

    #AI_FORMATION:

    - - -
    -
    -
    -
    - - -AI_FORMATION:onafterFormationRightWing(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, ZStart, ZSpace) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      FollowGroupSet :

      - -
    • -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    • - -

      XStart :

      - -
    • -
    • - -

      XSpace :

      - -
    • -
    • - -

      YStart :

      - -
    • -
    • - -

      ZStart :

      - -
    • -
    • - -

      ZSpace :

      - -
    • -
    -
    -
    -
    -
    - - -AI_FORMATION:onafterFormationStack(FollowGroupSet, From, Event, To, XStart, XSpace, YStart, YSpace) - -
    -
    - -

    FormationStack Handler OnAfter for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #number YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    -

    Return value

    - -

    #AI_FORMATION:

    - - -
    -
    -
    -
    - - -AI_FORMATION:onafterFormationTrail(FollowGroupSet, From, Event, To, XStart, XSpace, YStart) - -
    -
    - -

    FormationTrail Handler OnAfter for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP FollowGroupSet : -The group AI escorting the FollowUnit.

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    -

    Return value

    - -

    #AI_FORMATION:

    - - -
    -
    -
    -
    - - -AI_FORMATION:onafterFormationVic(From, Event, To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace, FollowGroupSet) - -
    -
    - -

    FormationVic Handle for AI_FORMATION

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number XStart : -The start position on the X-axis in meters for the first group.

      - -
    • -
    • - -

      #number XSpace : -The space between groups on the X-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer YStart : -The start position on the Y-axis in meters for the first group.

      - -
    • -
    • - -

      #number YSpace : -The space between groups on the Y-axis in meters for each sequent group.

      - -
    • -
    • - -

      #nubmer ZStart : -The start position on the Z-axis in meters for the first group.

      - -
    • -
    • - -

      #number ZSpace : -The space between groups on the Z-axis in meters for each sequent group.

      - -
    • -
    • - -

      FollowGroupSet :

      - -
    • -
    -

    Return value

    - -

    #AI_FORMATION:

    - - -
    -
    -
    -
    - - -AI_FORMATION:onenterFollowing(FollowGroupSet) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      FollowGroupSet :

      - -
    • -
    -
    -
    - -

    Type AI_FORMATION.MODE

    - -

    AI_FORMATION.Mode class

    - -

    Field(s)

    -
    -
    - - #number - -AI_FORMATION.MODE.FOLLOW - -
    -
    - - - -
    -
    -
    -
    - - #number - -AI_FORMATION.MODE.MISSION - -
    -
    - - - -
    -
    - -

    Type Distance

    - -

    Type MENUPARAM

    - -

    MENUPARAM type

    - -

    Field(s)

    -
    -
    - - #Distance - -MENUPARAM.ParamDistance - -
    -
    - - - -
    -
    -
    -
    - - #function - -MENUPARAM.ParamFunction - -
    -
    - - - -
    -
    -
    -
    - - #string - -MENUPARAM.ParamMessage - -
    -
    - - - -
    -
    -
    -
    - - #AI_FORMATION - -MENUPARAM.ParamSelf - -
    -
    - - - -
    -
    - -

    Type nubmer

    - -
    - -
    - - diff --git a/docs/Documentation/AI_Patrol.html b/docs/Documentation/AI_Patrol.html deleted file mode 100644 index e015fe835..000000000 --- a/docs/Documentation/AI_Patrol.html +++ /dev/null @@ -1,2861 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module AI_Patrol

    - -

    AI -- Air Patrolling or Staging.

    - -

    Banner Image

    - -
    - -

    AI PATROL classes makes AI Controllables execute an Patrol.

    - - - -

    There are the following types of PATROL classes defined:

    - - - -
    - -

    Demo Missions

    - -

    AI_PATROL Demo Missions source code

    - -

    AI_PATROL Demo Missions, only for beta testers

    - -

    ALL Demo Missions pack of the last release

    - -
    - -

    YouTube Channel

    - -

    AI_PATROL YouTube Channel

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    -

    Contributions:

    - -
      -
    • Dutch_Baron: Working together with James has resulted in the creation of the AI_BALANCER class. James has shared his ideas on balancing AI with air units, and together we made a first design which you can use now :-)
    • -
    • Pikey: Testing and API concept review.
    • -
    - -
    - - -

    Global(s)

    - - - - - -
    AI_PATROL_ZONE -

    AIPATROLZONE class, extends Fsm#FSM_CONTROLLABLE

    - -

    The AIPATROLZONE class implements the core functions to patrol a Zone by an AI Controllable or Group.

    -
    -

    Type AI_PATROL_ZONE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AI_PATROL_ZONE.AIControllable -

    The Controllable patrolling.

    -
    AI_PATROL_ZONE.CheckStatus - -
    AI_PATROL_ZONE:ClearDetectedUnits() -

    Clears the list of Unit#UNITs that were detected by the AI.

    -
    AI_PATROL_ZONE.CoordTest - -
    AI_PATROL_ZONE:Detect() -

    Synchronous Event Trigger for Event Detect.

    -
    AI_PATROL_ZONE.DetectActivated - -
    AI_PATROL_ZONE.DetectInterval - -
    AI_PATROL_ZONE.DetectOn - -
    AI_PATROL_ZONE.DetectZone - -
    AI_PATROL_ZONE:Detected() -

    Synchronous Event Trigger for Event Detected.

    -
    AI_PATROL_ZONE.DetectedUnits - -
    AI_PATROL_ZONE:GetDetectedUnits() -

    Gets a list of Unit#UNITs that were detected by the AI.

    -
    AI_PATROL_ZONE:ManageDamage(PatrolDamageThreshold) -

    When the AI is damaged beyond a certain treshold, it is required that the AI returns to the home base.

    -
    AI_PATROL_ZONE:ManageFuel(PatrolFuelThresholdPercentage, PatrolOutOfFuelOrbitTime) -

    When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base.

    -
    AI_PATROL_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType) -

    Creates a new AIPATROLZONE object

    -
    AI_PATROL_ZONE:OnAfterDetect(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event Detect.

    -
    AI_PATROL_ZONE:OnAfterDetected(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event Detected.

    -
    AI_PATROL_ZONE:OnAfterRTB(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event RTB.

    -
    AI_PATROL_ZONE:OnAfterRoute(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event Route.

    -
    AI_PATROL_ZONE:OnAfterStart(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event Start.

    -
    AI_PATROL_ZONE:OnAfterStatus(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event Status.

    -
    AI_PATROL_ZONE:OnAfterStop(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event Stop.

    -
    AI_PATROL_ZONE:OnBeforeDetect(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event Detect.

    -
    AI_PATROL_ZONE:OnBeforeDetected(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event Detected.

    -
    AI_PATROL_ZONE:OnBeforeRTB(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event RTB.

    -
    AI_PATROL_ZONE:OnBeforeRoute(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event Route.

    -
    AI_PATROL_ZONE:OnBeforeStart(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event Start.

    -
    AI_PATROL_ZONE:OnBeforeStatus(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event Status.

    -
    AI_PATROL_ZONE:OnBeforeStop(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event Stop.

    -
    AI_PATROL_ZONE:OnCrash(EventData) - -
    AI_PATROL_ZONE:OnEjection(EventData) - -
    AI_PATROL_ZONE:OnEnterPatrolling(Controllable, From, Event, To) -

    OnEnter Transition Handler for State Patrolling.

    -
    AI_PATROL_ZONE:OnEnterReturning(Controllable, From, Event, To) -

    OnEnter Transition Handler for State Returning.

    -
    AI_PATROL_ZONE:OnEnterStopped(Controllable, From, Event, To) -

    OnEnter Transition Handler for State Stopped.

    -
    AI_PATROL_ZONE:OnLeavePatrolling(Controllable, From, Event, To) -

    OnLeave Transition Handler for State Patrolling.

    -
    AI_PATROL_ZONE:OnLeaveReturning(Controllable, From, Event, To) -

    OnLeave Transition Handler for State Returning.

    -
    AI_PATROL_ZONE:OnLeaveStopped(Controllable, From, Event, To) -

    OnLeave Transition Handler for State Stopped.

    -
    AI_PATROL_ZONE:OnPilotDead(EventData) - -
    AI_PATROL_ZONE.PatrolAltType - -
    AI_PATROL_ZONE.PatrolCeilingAltitude -

    The highest altitude in meters where to execute the patrol.

    -
    AI_PATROL_ZONE.PatrolDamageThreshold - -
    AI_PATROL_ZONE.PatrolFloorAltitude -

    The lowest altitude in meters where to execute the patrol.

    -
    AI_PATROL_ZONE.PatrolFuelThresholdPercentage - -
    AI_PATROL_ZONE.PatrolManageDamage - -
    AI_PATROL_ZONE.PatrolManageFuel - -
    AI_PATROL_ZONE.PatrolMaxSpeed -

    The maximum speed of the Controllable in km/h.

    -
    AI_PATROL_ZONE.PatrolMinSpeed -

    The minimum speed of the Controllable in km/h.

    -
    AI_PATROL_ZONE.PatrolOutOfFuelOrbitTime - -
    AI_PATROL_ZONE.PatrolZone -

    The Zone where the patrol needs to be executed.

    -
    AI_PATROL_ZONE:RTB() -

    Synchronous Event Trigger for Event RTB.

    -
    AI_PATROL_ZONE:Route() -

    Synchronous Event Trigger for Event Route.

    -
    AI_PATROL_ZONE:SetAltitude(PatrolFloorAltitude, PatrolCeilingAltitude) -

    Sets the floor and ceiling altitude of the patrol.

    -
    AI_PATROL_ZONE:SetDetectionActivated() -

    Activate the detection.

    -
    AI_PATROL_ZONE:SetDetectionDeactivated() -

    Deactivate the detection.

    -
    AI_PATROL_ZONE:SetDetectionOff() -

    Set the detection off.

    -
    AI_PATROL_ZONE:SetDetectionOn() -

    Set the detection on.

    -
    AI_PATROL_ZONE:SetDetectionZone(DetectionZone) -

    Set the detection zone where the AI is detecting targets.

    -
    AI_PATROL_ZONE:SetRefreshTimeInterval(Seconds) -

    Set the interval in seconds between each detection executed by the AI.

    -
    AI_PATROL_ZONE:SetSpeed(PatrolMinSpeed, PatrolMaxSpeed) -

    Sets (modifies) the minimum and maximum speed of the patrol.

    -
    AI_PATROL_ZONE:SetStatusOff() -

    Set the status checking off.

    -
    AI_PATROL_ZONE:Start() -

    Synchronous Event Trigger for Event Start.

    -
    AI_PATROL_ZONE:Status() -

    Synchronous Event Trigger for Event Status.

    -
    AI_PATROL_ZONE:Stop() -

    Synchronous Event Trigger for Event Stop.

    -
    AI_PATROL_ZONE._NewPatrolRoute(AIControllable, self) - -
    AI_PATROL_ZONE:__Detect(Delay) -

    Asynchronous Event Trigger for Event Detect.

    -
    AI_PATROL_ZONE:__Detected(Delay) -

    Asynchronous Event Trigger for Event Detected.

    -
    AI_PATROL_ZONE:__RTB(Delay) -

    Asynchronous Event Trigger for Event RTB.

    -
    AI_PATROL_ZONE:__Route(Delay) -

    Asynchronous Event Trigger for Event Route.

    -
    AI_PATROL_ZONE:__Start(Delay) -

    Asynchronous Event Trigger for Event Start.

    -
    AI_PATROL_ZONE:__Status(Delay) -

    Asynchronous Event Trigger for Event Status.

    -
    AI_PATROL_ZONE:__Stop(Delay) -

    Asynchronous Event Trigger for Event Stop.

    -
    AI_PATROL_ZONE:onafterDead() - -
    AI_PATROL_ZONE:onafterDetect(Controllable, From, Event, To) - -
    AI_PATROL_ZONE:onafterRTB() - -
    AI_PATROL_ZONE:onafterRoute(Controllable, From, Event, To) -

    Defines a new patrol route using the Process_PatrolZone parameters and settings.

    -
    AI_PATROL_ZONE:onafterStart(Controllable, From, Event, To) -

    Defines a new patrol route using the Process_PatrolZone parameters and settings.

    -
    AI_PATROL_ZONE:onafterStatus() - -
    AI_PATROL_ZONE:onbeforeDetect(Controllable, From, Event, To) - -
    AI_PATROL_ZONE:onbeforeStatus() - -
    - -

    Global(s)

    -
    -
    - - #AI_PATROL_ZONE - -AI_PATROL_ZONE - -
    -
    - -

    AIPATROLZONE class, extends Fsm#FSM_CONTROLLABLE

    - -

    The AIPATROLZONE class implements the core functions to patrol a Zone by an AI Controllable or Group.

    - - - -

    Process

    - -

    The AIPATROLZONE is assigned a Group and this must be done before the AIPATROLZONE process can be started using the Start event.

    - -

    Process

    - -

    The AI will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits. -Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits.

    - -

    Process

    - -

    This cycle will continue.

    - -

    Process

    - -

    During the patrol, the AI will detect enemy targets, which are reported through the Detected event.

    - -

    Process

    - -

    -- Note that the enemy is not engaged! To model enemy engagement, either tailor the Detected event, or -use derived AI_ classes to model AI offensive or defensive behaviour.

    - -

    Process

    - -

    Until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB. -When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.

    - -

    Process

    - -

    1. AIPATROLZONE constructor

    - - - -

    2. AIPATROLZONE is a FSM

    - -

    Process

    - -

    2.1. AIPATROLZONE States

    - -
      -
    • None ( Group ): The process is not started yet.
    • -
    • Patrolling ( Group ): The AI is patrolling the Patrol Zone.
    • -
    • Returning ( Group ): The AI is returning to Base.
    • -
    • Stopped ( Group ): The process is stopped.
    • -
    • Crashed ( Group ): The AI has crashed or is dead.
    • -
    - -

    2.2. AIPATROLZONE Events

    - -
      -
    • Start ( Group ): Start the process.
    • -
    • Stop ( Group ): Stop the process.
    • -
    • Route ( Group ): Route the AI to a new random 3D point within the Patrol Zone.
    • -
    • RTB ( Group ): Route the AI to the home base.
    • -
    • Detect ( Group ): The AI is detecting targets.
    • -
    • Detected ( Group ): The AI has detected new targets.
    • -
    • Status ( Group ): The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB.
    • -
    - -

    3. Set or Get the AI controllable

    - - - -

    4. Set the Speed and Altitude boundaries of the AI controllable

    - - - -

    5. Manage the detection process of the AI controllable

    - -

    The detection process of the AI controllable can be manipulated. -Detection requires an amount of CPU power, which has an impact on your mission performance. -Only put detection on when absolutely necessary, and the frequency of the detection can also be set.

    - - - -

    The detection frequency can be set with AIPATROLZONE.SetRefreshTimeInterval( seconds ), where the amount of seconds specify how much seconds will be waited before the next detection. -Use the method AIPATROLZONE.GetDetectedUnits() to obtain a list of the Units detected by the AI.

    - -

    The detection can be filtered to potential targets in a specific zone. -Use the method AIPATROLZONE.SetDetectionZone() to set the zone where targets need to be detected. -Note that when the zone is too far away, or the AI is not heading towards the zone, or the AI is too high, no targets may be detected -according the weather conditions.

    - -

    6. Manage the "out of fuel" in the AIPATROLZONE

    - -

    When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base. -Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated. -When the fuel treshold is reached, the AI will continue for a given time its patrol task in orbit, -while a new AI is targetted to the AIPATROLZONE. -Once the time is finished, the old AI will return to the base. -Use the method AIPATROLZONE.ManageFuel() to have this proces in place.

    - -

    7. Manage "damage" behaviour of the AI in the AIPATROLZONE

    - -

    When the AI is damaged, it is required that a new AIControllable is started. However, damage cannon be foreseen early on. -Therefore, when the damage treshold is reached, the AI will return immediately to the home base (RTB). -Use the method AIPATROLZONE.ManageDamage() to have this proces in place.

    - -
    - - -
    -
    -

    Type AI_Patrol

    - -

    Type AI_PATROL_ZONE

    - -

    AIPATROLZONE class

    - -

    Field(s)

    -
    -
    - - Wrapper.Controllable#CONTROLLABLE - -AI_PATROL_ZONE.AIControllable - -
    -
    - -

    The Controllable patrolling.

    - -
    -
    -
    -
    - - #boolean - -AI_PATROL_ZONE.CheckStatus - -
    -
    - - - -
    -
    -
    -
    - - -AI_PATROL_ZONE:ClearDetectedUnits() - -
    -
    - -

    Clears the list of Unit#UNITs that were detected by the AI.

    - -
    -
    -
    -
    - - Core.Spawn#SPAWN - -AI_PATROL_ZONE.CoordTest - -
    -
    - - - -
    -
    -
    -
    - - -AI_PATROL_ZONE:Detect() - -
    -
    - -

    Synchronous Event Trigger for Event Detect.

    - -
    -
    -
    -
    - - #boolean - -AI_PATROL_ZONE.DetectActivated - -
    -
    - - - -
    -
    -
    -
    - - - -AI_PATROL_ZONE.DetectInterval - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -AI_PATROL_ZONE.DetectOn - -
    -
    - - - -
    -
    -
    -
    - - - -AI_PATROL_ZONE.DetectZone - -
    -
    - - - -
    -
    -
    -
    - - -AI_PATROL_ZONE:Detected() - -
    -
    - -

    Synchronous Event Trigger for Event Detected.

    - -
    -
    -
    -
    - - - -AI_PATROL_ZONE.DetectedUnits - -
    -
    - - - - -

    This table contains the targets detected during patrol.

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:GetDetectedUnits() - -
    -
    - -

    Gets a list of Unit#UNITs that were detected by the AI.

    - - -

    No filtering is applied, so, ANY detected UNIT can be in this list. -It is up to the mission designer to use the Unit class and methods to filter the targets.

    - -

    Return value

    - -

    #table: -The list of Unit#UNITs

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:ManageDamage(PatrolDamageThreshold) - -
    -
    - -

    When the AI is damaged beyond a certain treshold, it is required that the AI returns to the home base.

    - - -

    However, damage cannot be foreseen early on. -Therefore, when the damage treshold is reached, -the AI will return immediately to the home base (RTB). -Note that for groups, the average damage of the complete group will be calculated. -So, in a group of 4 airplanes, 2 lost and 2 with damage 0.2, the damage treshold will be 0.25.

    - -

    Parameter

    -
      -
    • - -

      #number PatrolDamageThreshold : -The treshold in percentage (between 0 and 1) when the AI is considered to be damaged.

      - -
    • -
    -

    Return value

    - -

    #AIPATROLZONE: -self

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:ManageFuel(PatrolFuelThresholdPercentage, PatrolOutOfFuelOrbitTime) - -
    -
    - -

    When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base.

    - - -

    Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated. -When the fuel treshold is reached, the AI will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the AIPATROLZONE. -Once the time is finished, the old AI will return to the base.

    - -

    Parameters

    -
      -
    • - -

      #number PatrolFuelThresholdPercentage : -The treshold in percentage (between 0 and 1) when the AIControllable is considered to get out of fuel.

      - -
    • -
    • - -

      #number PatrolOutOfFuelOrbitTime : -The amount of seconds the out of fuel AIControllable will orbit before returning to the base.

      - -
    • -
    -

    Return value

    - -

    #AIPATROLZONE: -self

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType) - -
    -
    - -

    Creates a new AIPATROLZONE object

    - -

    Parameters

    - -

    Return value

    - -

    #AIPATROLZONE: -self

    - -

    Usage:

    -
    -- Define a new AI_PATROL_ZONE Object. This PatrolArea will patrol an AIControllable within PatrolZone between 3000 and 6000 meters, with a variying speed between 600 and 900 km/h.
    -PatrolZone = ZONE:New( 'PatrolZone' )
    -PatrolSpawn = SPAWN:New( 'Patrol Group' )
    -PatrolArea = AI_PATROL_ZONE:New( PatrolZone, 3000, 6000, 600, 900 )
    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:OnAfterDetect(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Detect.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_PATROL_ZONE:OnAfterDetected(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Detected.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_PATROL_ZONE:OnAfterRTB(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event RTB.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_PATROL_ZONE:OnAfterRoute(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Route.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_PATROL_ZONE:OnAfterStart(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Start.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_PATROL_ZONE:OnAfterStatus(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Status.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_PATROL_ZONE:OnAfterStop(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Stop.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_PATROL_ZONE:OnBeforeDetect(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Detect.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:OnBeforeDetected(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Detected.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:OnBeforeRTB(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event RTB.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:OnBeforeRoute(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Route.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:OnBeforeStart(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Start.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:OnBeforeStatus(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Status.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:OnBeforeStop(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Stop.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:OnCrash(EventData) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:OnEjection(EventData) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:OnEnterPatrolling(Controllable, From, Event, To) - -
    -
    - -

    OnEnter Transition Handler for State Patrolling.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_PATROL_ZONE:OnEnterReturning(Controllable, From, Event, To) - -
    -
    - -

    OnEnter Transition Handler for State Returning.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_PATROL_ZONE:OnEnterStopped(Controllable, From, Event, To) - -
    -
    - -

    OnEnter Transition Handler for State Stopped.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_PATROL_ZONE:OnLeavePatrolling(Controllable, From, Event, To) - -
    -
    - -

    OnLeave Transition Handler for State Patrolling.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:OnLeaveReturning(Controllable, From, Event, To) - -
    -
    - -

    OnLeave Transition Handler for State Returning.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:OnLeaveStopped(Controllable, From, Event, To) - -
    -
    - -

    OnLeave Transition Handler for State Stopped.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:OnPilotDead(EventData) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE.PatrolAltType - -
    -
    - - - - -

    defafult PatrolAltType to "RADIO" if not specified

    - -
    -
    -
    -
    - - Dcs.DCSTypes#Altitude - -AI_PATROL_ZONE.PatrolCeilingAltitude - -
    -
    - -

    The highest altitude in meters where to execute the patrol.

    - -
    -
    -
    -
    - - - -AI_PATROL_ZONE.PatrolDamageThreshold - -
    -
    - - - -
    -
    -
    -
    - - Dcs.DCSTypes#Altitude - -AI_PATROL_ZONE.PatrolFloorAltitude - -
    -
    - -

    The lowest altitude in meters where to execute the patrol.

    - -
    -
    -
    -
    - - - -AI_PATROL_ZONE.PatrolFuelThresholdPercentage - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -AI_PATROL_ZONE.PatrolManageDamage - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -AI_PATROL_ZONE.PatrolManageFuel - -
    -
    - - - -
    -
    -
    -
    - - Dcs.DCSTypes#Speed - -AI_PATROL_ZONE.PatrolMaxSpeed - -
    -
    - -

    The maximum speed of the Controllable in km/h.

    - -
    -
    -
    -
    - - Dcs.DCSTypes#Speed - -AI_PATROL_ZONE.PatrolMinSpeed - -
    -
    - -

    The minimum speed of the Controllable in km/h.

    - -
    -
    -
    -
    - - - -AI_PATROL_ZONE.PatrolOutOfFuelOrbitTime - -
    -
    - - - -
    -
    -
    -
    - - Core.Zone#ZONE_BASE - -AI_PATROL_ZONE.PatrolZone - -
    -
    - -

    The Zone where the patrol needs to be executed.

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:RTB() - -
    -
    - -

    Synchronous Event Trigger for Event RTB.

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:Route() - -
    -
    - -

    Synchronous Event Trigger for Event Route.

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:SetAltitude(PatrolFloorAltitude, PatrolCeilingAltitude) - -
    -
    - -

    Sets the floor and ceiling altitude of the patrol.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Altitude PatrolFloorAltitude : -The lowest altitude in meters where to execute the patrol.

      - -
    • -
    • - -

      Dcs.DCSTypes#Altitude PatrolCeilingAltitude : -The highest altitude in meters where to execute the patrol.

      - -
    • -
    -

    Return value

    - -

    #AIPATROLZONE: -self

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:SetDetectionActivated() - -
    -
    - -

    Activate the detection.

    - - -

    The AI will detect for targets if the Detection is switched On.

    - -

    Return value

    - -

    #AIPATROLZONE: -self

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:SetDetectionDeactivated() - -
    -
    - -

    Deactivate the detection.

    - - -

    The AI will NOT detect for targets.

    - -

    Return value

    - -

    #AIPATROLZONE: -self

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:SetDetectionOff() - -
    -
    - -

    Set the detection off.

    - - -

    The AI will NOT detect for targets. -However, the list of already detected targets will be kept and can be enquired!

    - -

    Return value

    - -

    #AIPATROLZONE: -self

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:SetDetectionOn() - -
    -
    - -

    Set the detection on.

    - - -

    The AI will detect for targets.

    - -

    Return value

    - -

    #AIPATROLZONE: -self

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:SetDetectionZone(DetectionZone) - -
    -
    - -

    Set the detection zone where the AI is detecting targets.

    - -

    Parameter

    -
      -
    • - -

      Core.Zone#ZONE DetectionZone : -The zone where to detect targets.

      - -
    • -
    -

    Return value

    - -

    #AIPATROLZONE: -self

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:SetRefreshTimeInterval(Seconds) - -
    -
    - -

    Set the interval in seconds between each detection executed by the AI.

    - - -

    The list of already detected targets will be kept and updated. -Newly detected targets will be added, but already detected targets that were -not detected in this cycle, will NOT be removed! -The default interval is 30 seconds.

    - -

    Parameter

    -
      -
    • - -

      #number Seconds : -The interval in seconds.

      - -
    • -
    -

    Return value

    - -

    #AIPATROLZONE: -self

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:SetSpeed(PatrolMinSpeed, PatrolMaxSpeed) - -
    -
    - -

    Sets (modifies) the minimum and maximum speed of the patrol.

    - -

    Parameters

    - -

    Return value

    - -

    #AIPATROLZONE: -self

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:SetStatusOff() - -
    -
    - -

    Set the status checking off.

    - -

    Return value

    - -

    #AIPATROLZONE: -self

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:Start() - -
    -
    - -

    Synchronous Event Trigger for Event Start.

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:Status() - -
    -
    - -

    Synchronous Event Trigger for Event Status.

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:Stop() - -
    -
    - -

    Synchronous Event Trigger for Event Stop.

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE._NewPatrolRoute(AIControllable, self) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE AIControllable : -This statis method is called from the route path within the last task at the last waaypoint of the Controllable. -Note that this method is required, as triggers the next route when patrolling for the Controllable.

      - -
    • -
    • - -

      self :

      - -
    • -
    -
    -
    -
    -
    - - -AI_PATROL_ZONE:__Detect(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Detect.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_PATROL_ZONE:__Detected(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Detected.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_PATROL_ZONE:__RTB(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event RTB.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_PATROL_ZONE:__Route(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Route.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_PATROL_ZONE:__Start(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Start.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_PATROL_ZONE:__Status(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Status.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_PATROL_ZONE:__Stop(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Stop.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -AI_PATROL_ZONE:onafterDead() - -
    -
    - - - -
    -
    -
    -
    - - -AI_PATROL_ZONE:onafterDetect(Controllable, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Controllable :

      - -
    • -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    -
    -
    -
    -
    - - -AI_PATROL_ZONE:onafterRTB() - -
    -
    - - - -
    -
    -
    -
    - - -AI_PATROL_ZONE:onafterRoute(Controllable, From, Event, To) - -
    -
    - -

    Defines a new patrol route using the Process_PatrolZone parameters and settings.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -AI_PATROL_ZONE:onafterStart(Controllable, From, Event, To) - -
    -
    - -

    Defines a new patrol route using the Process_PatrolZone parameters and settings.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #AIPATROLZONE: -self

    - -
    -
    -
    -
    - - -AI_PATROL_ZONE:onafterStatus() - -
    -
    - - - -
    -
    -
    -
    - - -AI_PATROL_ZONE:onbeforeDetect(Controllable, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Controllable :

      - -
    • -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    -
    -
    -
    -
    - - -AI_PATROL_ZONE:onbeforeStatus() - -
    -
    - - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/ATC_Ground.html b/docs/Documentation/ATC_Ground.html deleted file mode 100644 index 9fe697d43..000000000 --- a/docs/Documentation/ATC_Ground.html +++ /dev/null @@ -1,1237 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module ATC_Ground

    - -

    Functional -- The ATC_GROUND classes monitor airbase traffic and regulate speed while taxiing.

    - - - -
    - -

    Banner Image

    - -
    - -

    Contributions: Dutch Baron - Concept & Testing

    -

    Author: FlightControl - Framework Design & Programming

    - -
    - - -

    Global(s)

    - - - - - - - - - - - - - - - - - - - - - -
    ATC_GROUND -

    Base class for ATC_GROUND implementations.

    -
    ATC_GROUND_CAUCASUS -

    ATC_GROUND_CAUCASUS, extends #ATC_GROUND

    - -

    The ATC_GROUND_CAUCASUS class monitors the speed of the airplanes at the airbase during taxi.

    -
    ATC_GROUND_NEVADA -

    ATC_GROUND_NEVADA, extends #ATC_GROUND

    - -

    The ATC_GROUND_NEVADA class monitors the speed of the airplanes at the airbase during taxi.

    -
    ATC_GROUND_NORMANDY -

    ATC_GROUND_NORMANDY, extends #ATC_GROUND

    - -

    The ATC_GROUND_NORMANDY class monitors the speed of the airplanes at the airbase during taxi.

    -
    SSB - -
    -

    Type ATC_GROUND

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ATC_GROUND.AirbaseList - -
    ATC_GROUND.Airbases - -
    ATC_GROUND.KickSpeed - -
    ATC_GROUND.MaximumKickSpeed - -
    ATC_GROUND:New(Airbases, AirbaseList) -

    Creates a new ATC_GROUND object.

    -
    ATC_GROUND.SetClient - -
    ATC_GROUND:SetKickSpeed(KickSpeed, Airbase) -

    Set the maximum speed in meters per second (Mps) until the player gets kicked.

    -
    ATC_GROUND:SetKickSpeedKmph(KickSpeed, Airbase) -

    Set the maximum speed in Kmph until the player gets kicked.

    -
    ATC_GROUND:SetKickSpeedMiph(KickSpeedMiph, Airbase) -

    Set the maximum speed in Miph until the player gets kicked.

    -
    ATC_GROUND:SetMaximumKickSpeed(MaximumKickSpeed, Airbase) -

    Set the maximum kick speed in meters per second (Mps) until the player gets kicked.

    -
    ATC_GROUND:SetMaximumKickSpeedKmph(MaximumKickSpeed, Airbase) -

    Set the maximum kick speed in kilometers per hour (Kmph) until the player gets kicked.

    -
    ATC_GROUND:SetMaximumKickSpeedMiph(MaximumKickSpeedMiph, Airbase) -

    Set the maximum kick speed in miles per hour (Miph) until the player gets kicked.

    -
    ATC_GROUND:SmokeRunways(SmokeColor) -

    Smoke the airbases runways.

    -
    ATC_GROUND:_AirbaseMonitor() - -
    - -

    Type ATC_GROUND_CAUCASUS

    - - - - - -
    ATC_GROUND_CAUCASUS:New(AirbaseNames) -

    Creates a new ATCGROUNDCAUCASUS object.

    -
    - -

    Type ATC_GROUND_NEVADA

    - - - - - -
    ATC_GROUND_NEVADA:New(AirbaseNames) -

    Creates a new ATCGROUNDNEVADA object.

    -
    - -

    Type ATC_GROUND_NORMANDY

    - - - - - - - - - -
    ATC_GROUND_NORMANDY.AirbaseMonitor - -
    ATC_GROUND_NORMANDY:New(AirbaseNames) -

    Creates a new ATCGROUNDNORMANDY object.

    -
    - -

    Global(s)

    -
    -
    - - #ATC_GROUND - -ATC_GROUND - -
    -
    - -

    Base class for ATC_GROUND implementations.

    - -
    -
    -
    -
    - - #ATC_GROUND_CAUCASUS - -ATC_GROUND_CAUCASUS - -
    -
    - -

    ATC_GROUND_CAUCASUS, extends #ATC_GROUND

    - -

    The ATC_GROUND_CAUCASUS class monitors the speed of the airplanes at the airbase during taxi.

    - - -

    The pilots may not drive faster than the maximum speed for the airbase, or they will be despawned.

    - -
    - -

    Banner Image

    - -
    - -

    The default maximum speed for the airbases at Caucasus is 50 km/h. Warnings are given if this speed limit is trespassed. -Players will be immediately kicked when driving faster than 150 km/h on the taxi way.

    - - -

    The pilot will receive 3 times a warning during speeding. After the 3rd warning, if the pilot is still driving -faster than the maximum allowed speed, the pilot will be kicked.

    - -

    Different airbases have different maximum speeds, according safety regulations.

    - -

    Airbases monitored

    - -

    The following airbases are monitored at the Caucasus region. -Use the Airbase#AIRBASE.Caucasus enumeration to select the airbases to be monitored.

    - -
      -
    • AIRBASE.Caucasus.Anapa_Vityazevo
    • -
    • AIRBASE.Caucasus.Batumi
    • -
    • AIRBASE.Caucasus.Beslan
    • -
    • AIRBASE.Caucasus.Gelendzhik
    • -
    • AIRBASE.Caucasus.Gudauta
    • -
    • AIRBASE.Caucasus.Kobuleti
    • -
    • AIRBASE.Caucasus.Krasnodar_Center
    • -
    • AIRBASE.Caucasus.Krasnodar_Pashkovsky
    • -
    • AIRBASE.Caucasus.Krymsk
    • -
    • AIRBASE.Caucasus.Kutaisi
    • -
    • AIRBASE.Caucasus.Maykop_Khanskaya
    • -
    • AIRBASE.Caucasus.Mineralnye_Vody
    • -
    • AIRBASE.Caucasus.Mozdok
    • -
    • AIRBASE.Caucasus.Nalchik
    • -
    • AIRBASE.Caucasus.Novorossiysk
    • -
    • AIRBASE.Caucasus.Senaki_Kolkhi
    • -
    • AIRBASE.Caucasus.Sochi_Adler
    • -
    • AIRBASE.Caucasus.Soganlug
    • -
    • AIRBASE.Caucasus.Sukhumi_Babushara
    • -
    • AIRBASE.Caucasus.Tbilisi_Lochini
    • -
    • AIRBASE.Caucasus.Vaziani
    • -
    - - -

    Installation

    - -

    In Single Player Missions

    - -

    ATC_GROUND is fully functional in single player.

    - -

    In Multi Player Missions

    - -

    ATC_GROUND is functional in multi player, however ...

    - -

    Due to a bug in DCS since release 1.5, the despawning of clients are not anymore working in multi player. -To work around this problem, a much better solution has been made, using the slot blocker script designed -by Ciribob.

    - -

    With the help of Ciribob, this script has been extended to also kick client players while in flight. -ATC_GROUND is communicating with this modified script to kick players!

    - -

    Install the file SimpleSlotBlockGameGUI.lua on the server, following the installation instructions described by Ciribob.

    - -

    Simple Slot Blocker from Ciribob & FlightControl

    - -

    Script it!

    - -

    1. ATC_GROUND_CAUCASUS Constructor

    - -

    Creates a new ATCGROUNDCAUCASUS object that will monitor pilots taxiing behaviour.

    - -
    -- This creates a new ATC_GROUND_CAUCASUS object.
    -
    --- Monitor all the airbases.
    -ATC_Ground = ATC_GROUND_CAUCASUS:New()
    -
    --- Monitor specific airbases only.
    -
    -ATC_Ground = ATC_GROUND_CAUCASUS:New(
    -  { AIRBASE.Caucasus.Gelendzhik,     
    -    AIRBASE.Caucasus.Krymsk          
    -  }                                  
    -)                                    
    -
    - -

    2. Set various options

    - -

    There are various methods that you can use to tweak the behaviour of the ATC_GROUND classes.

    - -

    2.1 Speed limit at an airbase.

    - - - -

    2.2 Prevent Takeoff at an airbase. Players will be kicked immediately.

    - - - - - -
    -
    -
    -
    - - #ATC_GROUND_NEVADA - -ATC_GROUND_NEVADA - -
    -
    - -

    ATC_GROUND_NEVADA, extends #ATC_GROUND

    - -

    The ATC_GROUND_NEVADA class monitors the speed of the airplanes at the airbase during taxi.

    - - -

    The pilots may not drive faster than the maximum speed for the airbase, or they will be despawned.

    - -
    - -

    Banner Image

    - -
    - -

    The default maximum speed for the airbases at Nevada is 50 km/h. Warnings are given if this speed limit is trespassed. -Players will be immediately kicked when driving faster than 150 km/h on the taxi way.

    - -

    The ATC_GROUND_NEVADA class monitors the speed of the airplanes at the airbase during taxi. -The pilots may not drive faster than the maximum speed for the airbase, or they will be despawned.

    - -

    The pilot will receive 3 times a warning during speeding. After the 3rd warning, if the pilot is still driving -faster than the maximum allowed speed, the pilot will be kicked.

    - -

    Different airbases have different maximum speeds, according safety regulations.

    - -

    Airbases monitored

    - -

    The following airbases are monitored at the Nevada region. -Use the Airbase#AIRBASE.Nevada enumeration to select the airbases to be monitored.

    - -
      -
    • AIRBASE.Nevada.Beatty_Airport
    • -
    • AIRBASE.Nevada.Boulder_City_Airport
    • -
    • AIRBASE.Nevada.Creech_AFB
    • -
    • AIRBASE.Nevada.Echo_Bay
    • -
    • AIRBASE.Nevada.Groom_Lake_AFB
    • -
    • AIRBASE.Nevada.Henderson_Executive_Airport
    • -
    • AIRBASE.Nevada.Jean_Airport
    • -
    • AIRBASE.Nevada.Laughlin_Airport
    • -
    • AIRBASE.Nevada.Lincoln_County
    • -
    • AIRBASE.Nevada.McCarran_International_Airport
    • -
    • AIRBASE.Nevada.Mellan_Airstrip
    • -
    • AIRBASE.Nevada.Mesquite
    • -
    • AIRBASE.Nevada.Mina_Airport_3Q0
    • -
    • AIRBASE.Nevada.Nellis_AFB
    • -
    • AIRBASE.Nevada.North_Las_Vegas
    • -
    • AIRBASE.Nevada.Pahute_Mesa_Airstrip
    • -
    • AIRBASE.Nevada.Tonopah_Airport
    • -
    • AIRBASE.Nevada.Tonopah_Test_Range_Airfield
    • -
    - -

    Installation

    - -

    In Single Player Missions

    - -

    ATC_GROUND is fully functional in single player.

    - -

    In Multi Player Missions

    - -

    ATC_GROUND is functional in multi player, however ...

    - -

    Due to a bug in DCS since release 1.5, the despawning of clients are not anymore working in multi player. -To work around this problem, a much better solution has been made, using the slot blocker script designed -by Ciribob.

    - -

    With the help of Ciribob, this script has been extended to also kick client players while in flight. -ATC_GROUND is communicating with this modified script to kick players!

    - -

    Install the file SimpleSlotBlockGameGUI.lua on the server, following the installation instructions described by Ciribob.

    - -

    Simple Slot Blocker from Ciribob & FlightControl

    - -

    Script it!

    - -

    1. ATCGROUNDNEVADA Constructor

    - -

    Creates a new ATCGROUNDNEVADA object that will monitor pilots taxiing behaviour.

    - -
    -- This creates a new ATC_GROUND_NEVADA object.
    -
    --- Monitor all the airbases.
    -ATC_Ground = ATC_GROUND_NEVADA:New()
    -
    -
    --- Monitor specific airbases.
    -ATC_Ground = ATC_GROUND_NEVADA:New(              
    -  { AIRBASE.Nevada.Laughlin_Airport,             
    -    AIRBASE.Nevada.Mellan_Airstrip,              
    -    AIRBASE.Nevada.Lincoln_County,               
    -    AIRBASE.Nevada.North_Las_Vegas,              
    -    AIRBASE.Nevada.McCarran_International_Airport
    -  }                                              
    -)                                                
    -
    - -

    2. Set various options

    - -

    There are various methods that you can use to tweak the behaviour of the ATC_GROUND classes.

    - -

    2.1 Speed limit at an airbase.

    - - - -

    2.2 Prevent Takeoff at an airbase. Players will be kicked immediately.

    - - - -

    - -
    -
    -
    -
    - - #ATC_GROUND_NORMANDY - -ATC_GROUND_NORMANDY - -
    -
    - -

    ATC_GROUND_NORMANDY, extends #ATC_GROUND

    - -

    The ATC_GROUND_NORMANDY class monitors the speed of the airplanes at the airbase during taxi.

    - - -

    The pilots may not drive faster than the maximum speed for the airbase, or they will be despawned.

    - -
    - -

    Banner Image

    - -
    - -

    The default maximum speed for the airbases at Caucasus is 40 km/h. Warnings are given if this speed limit is trespassed. -Players will be immediately kicked when driving faster than 100 km/h on the taxi way.

    - -

    The ATC_GROUND_NORMANDY class monitors the speed of the airplanes at the airbase during taxi. -The pilots may not drive faster than the maximum speed for the airbase, or they will be despawned.

    - -

    The pilot will receive 3 times a warning during speeding. After the 3rd warning, if the pilot is still driving -faster than the maximum allowed speed, the pilot will be kicked.

    - -

    Different airbases have different maximum speeds, according safety regulations.

    - -

    Airbases monitored

    - -

    The following airbases are monitored at the Normandy region. -Use the Airbase#AIRBASE.Normandy enumeration to select the airbases to be monitored.

    - -
      -
    • AIRBASE.Normandy.Azeville
    • -
    • AIRBASE.Normandy.Bazenville
    • -
    • AIRBASE.Normandy.Beny_sur_Mer
    • -
    • AIRBASE.Normandy.Beuzeville
    • -
    • AIRBASE.Normandy.Biniville
    • -
    • AIRBASE.Normandy.Brucheville
    • -
    • AIRBASE.Normandy.Cardonville
    • -
    • AIRBASE.Normandy.Carpiquet
    • -
    • AIRBASE.Normandy.Chailey
    • -
    • AIRBASE.Normandy.Chippelle
    • -
    • AIRBASE.Normandy.Cretteville
    • -
    • AIRBASE.Normandy.Cricqueville_en_Bessin
    • -
    • AIRBASE.Normandy.Deux_Jumeaux
    • -
    • AIRBASE.Normandy.Evreux
    • -
    • AIRBASE.Normandy.Ford
    • -
    • AIRBASE.Normandy.Funtington
    • -
    • AIRBASE.Normandy.Lantheuil
    • -
    • AIRBASE.Normandy.Le_Molay
    • -
    • AIRBASE.Normandy.Lessay
    • -
    • AIRBASE.Normandy.Lignerolles
    • -
    • AIRBASE.Normandy.Longues_sur_Mer
    • -
    • AIRBASE.Normandy.Maupertus
    • -
    • AIRBASE.Normandy.Meautis
    • -
    • AIRBASE.Normandy.Needs_Oar_Point
    • -
    • AIRBASE.Normandy.Picauville
    • -
    • AIRBASE.Normandy.Rucqueville
    • -
    • AIRBASE.Normandy.Saint_Pierre_du_Mont
    • -
    • AIRBASE.Normandy.Sainte_Croix_sur_Mer
    • -
    • AIRBASE.Normandy.Sainte_Laurent_sur_Mer
    • -
    • AIRBASE.Normandy.Sommervieu
    • -
    • AIRBASE.Normandy.Tangmere
    • -
    - -

    Installation

    - -

    In Single Player Missions

    - -

    ATC_GROUND is fully functional in single player.

    - -

    In Multi Player Missions

    - -

    ATC_GROUND is functional in multi player, however ...

    - -

    Due to a bug in DCS since release 1.5, the despawning of clients are not anymore working in multi player. -To work around this problem, a much better solution has been made, using the slot blocker script designed -by Ciribob.

    - -

    With the help of Ciribob, this script has been extended to also kick client players while in flight. -ATC_GROUND is communicating with this modified script to kick players!

    - -

    Install the file SimpleSlotBlockGameGUI.lua on the server, following the installation instructions described by Ciribob.

    - -

    Simple Slot Blocker from Ciribob & FlightControl

    - -

    Script it!

    - -

    1. ATCGROUNDNORMANDY Constructor

    - -

    Creates a new ATCGROUNDNORMANDY object that will monitor pilots taxiing behaviour.

    - -
    -- This creates a new ATC_GROUND_NORMANDY object.
    -
    --- Monitor for these clients the airbases.
    -AirbasePoliceCaucasus = ATC_GROUND_NORMANDY:New()
    -
    -ATC_Ground = ATC_GROUND_NORMANDY:New( 
    -  { AIRBASE.Normandy.Chippelle,
    -    AIRBASE.Normandy.Beuzeville 
    -  } 
    -)
    -
    - - -

    2. Set various options

    - -

    There are various methods that you can use to tweak the behaviour of the ATC_GROUND classes.

    - -

    2.1 Speed limit at an airbase.

    - - - -

    2.2 Prevent Takeoff at an airbase. Players will be kicked immediately.

    - - - -
    -
    -
    -
    - - - -SSB - -
    -
    - - - - -

    This is simple slot blocker is used on the server.

    - -
    -
    -

    Type ATC_Ground

    - -

    Type ATC_GROUND

    -

    Field(s)

    -
    -
    - - - -ATC_GROUND.AirbaseList - -
    -
    - - - -
    -
    -
    -
    - - - -ATC_GROUND.Airbases - -
    -
    - - - -
    -
    -
    -
    - - - -ATC_GROUND.KickSpeed - -
    -
    - - - -
    -
    -
    -
    - - - -ATC_GROUND.MaximumKickSpeed - -
    -
    - - - -
    -
    -
    -
    - - -ATC_GROUND:New(Airbases, AirbaseList) - -
    -
    - -

    Creates a new ATC_GROUND object.

    - -

    Parameters

    -
      -
    • - -

      Airbases : -A table of Airbase Names.

      - -
    • -
    • - -

      AirbaseList :

      - -
    • -
    -

    Return value

    - -

    #ATC_GROUND: -self

    - -
    -
    -
    -
    - - Core.Set#SET_CLIENT - -ATC_GROUND.SetClient - -
    -
    - - - -
    -
    -
    -
    - - -ATC_GROUND:SetKickSpeed(KickSpeed, Airbase) - -
    -
    - -

    Set the maximum speed in meters per second (Mps) until the player gets kicked.

    - - -

    An airbase can be specified to set the kick speed for.

    - -

    Parameters

    -
      -
    • - -

      #number KickSpeed : -The speed in Mps.

      - -
    • -
    • - -

      Wrapper.Airbase#AIRBASE Airbase : -(optional) The airbase to set the kick speed for.

      - -
    • -
    -

    Return value

    - -

    #ATC_GROUND: -self

    - -

    Usage:

    -
    
    -  -- Declare Atc_Ground using one of those, depending on the map.
    -
    -  Atc_Ground = ATC_GROUND_CAUCAUS:New()
    -  Atc_Ground = ATC_GROUND_NEVADA:New()
    -  Atc_Ground = ATC_GROUND_NORMANDY:New()
    -  
    -  -- Then use one of these methods...
    -
    -  Atc_Ground:SetKickSpeed( UTILS.KmphToMps( 80 ) ) -- Kick the players at 80 kilometers per hour
    -
    -  Atc_Ground:SetKickSpeed( UTILS.MiphToMps( 100 ) ) -- Kick the players at 100 miles per hour
    -
    -  Atc_Ground:SetKickSpeed( 24 ) -- Kick the players at 24 meters per second ( 24 * 3.6 = 86.4 kilometers per hour )
    -
    - -
    -
    -
    -
    - - -ATC_GROUND:SetKickSpeedKmph(KickSpeed, Airbase) - -
    -
    - -

    Set the maximum speed in Kmph until the player gets kicked.

    - -

    Parameters

    -
      -
    • - -

      #number KickSpeed : -Set the speed in Kmph.

      - -
    • -
    • - -

      Wrapper.Airbase#AIRBASE Airbase : -(optional) The airbase to set the kick speed for.

      - -
    • -
    -

    Return value

    - -

    #ATC_GROUND: -self

    - -

    Atc_Ground:SetKickSpeedKmph( 80 ) -- Kick the players at 80 kilometers per hour

    - - -
    -
    -
    -
    - - -ATC_GROUND:SetKickSpeedMiph(KickSpeedMiph, Airbase) - -
    -
    - -

    Set the maximum speed in Miph until the player gets kicked.

    - -

    Parameters

    -
      -
    • - -

      #number KickSpeedMiph : -Set the speed in Mph.

      - -
    • -
    • - -

      Wrapper.Airbase#AIRBASE Airbase : -(optional) The airbase to set the kick speed for.

      - -
    • -
    -

    Return value

    - -

    #ATC_GROUND: -self

    - -

    Atc_Ground:SetKickSpeedMiph( 100 ) -- Kick the players at 100 miles per hour

    - - -
    -
    -
    -
    - - -ATC_GROUND:SetMaximumKickSpeed(MaximumKickSpeed, Airbase) - -
    -
    - -

    Set the maximum kick speed in meters per second (Mps) until the player gets kicked.

    - - -

    There are no warnings given if this speed is reached, and is to prevent players to take off from the airbase! -An airbase can be specified to set the maximum kick speed for.

    - -

    Parameters

    -
      -
    • - -

      #number MaximumKickSpeed : -The speed in Mps.

      - -
    • -
    • - -

      Wrapper.Airbase#AIRBASE Airbase : -(optional) The airbase to set the kick speed for.

      - -
    • -
    -

    Return value

    - -

    #ATC_GROUND: -self

    - -

    Usage:

    -
    
    -  -- Declare Atc_Ground using one of those, depending on the map.
    -
    -  Atc_Ground = ATC_GROUND_CAUCAUS:New()
    -  Atc_Ground = ATC_GROUND_NEVADA:New()
    -  Atc_Ground = ATC_GROUND_NORMANDY:New()
    -  
    -  -- Then use one of these methods...
    -
    -  Atc_Ground:SetMaximumKickSpeed( UTILS.KmphToMps( 80 ) ) -- Kick the players at 80 kilometers per hour
    -
    -  Atc_Ground:SetMaximumKickSpeed( UTILS.MiphToMps( 100 ) ) -- Kick the players at 100 miles per hour
    -
    -  Atc_Ground:SetMaximumKickSpeed( 24 ) -- Kick the players at 24 meters per second ( 24 * 3.6 = 86.4 kilometers per hour )
    -
    - -
    -
    -
    -
    - - -ATC_GROUND:SetMaximumKickSpeedKmph(MaximumKickSpeed, Airbase) - -
    -
    - -

    Set the maximum kick speed in kilometers per hour (Kmph) until the player gets kicked.

    - - -

    There are no warnings given if this speed is reached, and is to prevent players to take off from the airbase! -An airbase can be specified to set the maximum kick speed for.

    - -

    Parameters

    -
      -
    • - -

      #number MaximumKickSpeed : -Set the speed in Kmph.

      - -
    • -
    • - -

      Wrapper.Airbase#AIRBASE Airbase : -(optional) The airbase to set the kick speed for.

      - -
    • -
    -

    Return value

    - -

    #ATC_GROUND: -self

    - -

    Atc_Ground:SetMaximumKickSpeedKmph( 150 ) -- Kick the players at 150 kilometers per hour

    - - -
    -
    -
    -
    - - -ATC_GROUND:SetMaximumKickSpeedMiph(MaximumKickSpeedMiph, Airbase) - -
    -
    - -

    Set the maximum kick speed in miles per hour (Miph) until the player gets kicked.

    - - -

    There are no warnings given if this speed is reached, and is to prevent players to take off from the airbase! -An airbase can be specified to set the maximum kick speed for.

    - -

    Parameters

    -
      -
    • - -

      #number MaximumKickSpeedMiph : -Set the speed in Mph.

      - -
    • -
    • - -

      Wrapper.Airbase#AIRBASE Airbase : -(optional) The airbase to set the kick speed for.

      - -
    • -
    -

    Return value

    - -

    #ATC_GROUND: -self

    - -

    Atc_Ground:SetMaximumKickSpeedMiph( 100 ) -- Kick the players at 100 miles per hour

    - - -
    -
    -
    -
    - - -ATC_GROUND:SmokeRunways(SmokeColor) - -
    -
    - -

    Smoke the airbases runways.

    - -

    Parameter

    - -

    Return value

    - -

    #ATC_GROUND: -self

    - -
    -
    -
    -
    - - -ATC_GROUND:_AirbaseMonitor() - -
    -
    - - - -
    -
    - -

    Type ATC_GROUND.AirbaseNames

    - -

    Type ATC_GROUND_CAUCASUS

    -

    Field(s)

    -
    -
    - - -ATC_GROUND_CAUCASUS:New(AirbaseNames) - -
    -
    - -

    Creates a new ATCGROUNDCAUCASUS object.

    - -

    Parameter

    -
      -
    • - -

      AirbaseNames : -A list {} of airbase names (Use AIRBASE.Caucasus enumerator).

      - -
    • -
    -

    Return value

    - -

    #ATCGROUNDCAUCASUS: -self

    - -
    -
    - -

    Type ATC_GROUND_NEVADA

    -

    Field(s)

    -
    -
    - - -ATC_GROUND_NEVADA:New(AirbaseNames) - -
    -
    - -

    Creates a new ATCGROUNDNEVADA object.

    - -

    Parameter

    -
      -
    • - -

      AirbaseNames : -A list {} of airbase names (Use AIRBASE.Nevada enumerator).

      - -
    • -
    -

    Return value

    - -

    #ATCGROUNDNEVADA: -self

    - -
    -
    - -

    Type ATC_GROUND_NORMANDY

    -

    Field(s)

    -
    -
    - - - -ATC_GROUND_NORMANDY.AirbaseMonitor - -
    -
    - - - -
    -
    -
    -
    - - -ATC_GROUND_NORMANDY:New(AirbaseNames) - -
    -
    - -

    Creates a new ATCGROUNDNORMANDY object.

    - -

    Parameter

    -
      -
    • - -

      AirbaseNames : -A list {} of airbase names (Use AIRBASE.Normandy enumerator).

      - -
    • -
    -

    Return value

    - -

    #ATCGROUNDNORMANDY: -self

    - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Account.html b/docs/Documentation/Account.html deleted file mode 100644 index 29140de11..000000000 --- a/docs/Documentation/Account.html +++ /dev/null @@ -1,982 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Account

    - -

    Actions - ACTACCOUNT classes account for (detect, count & report) various DCS events occuring on Units.

    - - - -

    Banner Image

    - -
    - - -

    Global(s)

    - - - - - - - - - -
    ACT_ACCOUNT - -
    ACT_ACCOUNT_DEADS - -
    -

    Type ACT_ACCOUNT

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ACT_ACCOUNT.ClassName - -
    ACT_ACCOUNT.DisplayCount - -
    ACT_ACCOUNT:New() -

    Creates a new DESTROY process.

    -
    ACT_ACCOUNT.TargetSetUnit - -
    ACT_ACCOUNT:onafterEvent(ProcessUnit, Event, From, To) -

    StateMachine callback function

    -
    ACT_ACCOUNT:onafterStart(ProcessUnit, Event, From, To) -

    StateMachine callback function

    -
    ACT_ACCOUNT:onenterWaiting(ProcessUnit, Event, From, To) -

    StateMachine callback function

    -
    - -

    Type ACT_ACCOUNT_DEADS

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ACT_ACCOUNT_DEADS.ClassName - -
    ACT_ACCOUNT_DEADS.DisplayCategory - -
    ACT_ACCOUNT_DEADS.DisplayCount - -
    ACT_ACCOUNT_DEADS.DisplayInterval - -
    ACT_ACCOUNT_DEADS.DisplayMessage - -
    ACT_ACCOUNT_DEADS.DisplayTime - -
    ACT_ACCOUNT_DEADS:Init(FsmAccount) - -
    ACT_ACCOUNT_DEADS:New(TargetSetUnit, TaskName) -

    Creates a new DESTROY process.

    -
    ACT_ACCOUNT_DEADS:OnEventHit(EventData) - -
    ACT_ACCOUNT_DEADS.PlayerHits - -
    ACT_ACCOUNT_DEADS.TargetSetUnit - -
    ACT_ACCOUNT_DEADS:onafterEvent(ProcessUnit, Task, From, Event, To, EventData) -

    StateMachine callback function

    -
    ACT_ACCOUNT_DEADS:onenterAccountForOther(ProcessUnit, Task, From, Event, To, EventData) -

    StateMachine callback function

    -
    ACT_ACCOUNT_DEADS:onenterAccountForPlayer(ProcessUnit, Task, From, Event, To, EventData) -

    StateMachine callback function

    -
    ACT_ACCOUNT_DEADS:onenterReport(ProcessUnit, Event, From, To, Task) -

    StateMachine callback function

    -
    ACT_ACCOUNT_DEADS:onfuncEventCrash(EventData) - -
    ACT_ACCOUNT_DEADS:onfuncEventDead(EventData) - -
    - -

    Global(s)

    -
    -
    - - #ACT_ACCOUNT - -ACT_ACCOUNT - -
    -
    - - - -
    -
    -
    -
    - - #ACT_ACCOUNT_DEADS - -ACT_ACCOUNT_DEADS - -
    -
    - - - -
    -
    -

    Type Account

    - -

    Type ACT_ACCOUNT

    - -

    #ACT_ACCOUNT FSM class, extends Fsm#FSM_PROCESS

    - -

    ACT_ACCOUNT state machine:

    - -

    This class is a state machine: it manages a process that is triggered by events causing state transitions to occur.

    - - -

    All derived classes from this class will start with the class name, followed by a _. See the relevant derived class descriptions below. -Each derived class follows exactly the same process, using the same events and following the same state transitions, -but will have different implementation behaviour upon each event or state transition.

    - -

    ACT_ACCOUNT States

    - -
      -
    • Asigned: The player is assigned.
    • -
    • Waiting: Waiting for an event.
    • -
    • Report: Reporting.
    • -
    • Account: Account for an event.
    • -
    • Accounted: All events have been accounted for, end of the process.
    • -
    • Failed: Failed the process.
    • -
    - -

    ACT_ACCOUNT Events

    - -
      -
    • Start: Start the process.
    • -
    • Wait: Wait for an event.
    • -
    • Report: Report the status of the accounting.
    • -
    • Event: An event happened, process the event.
    • -
    • More: More targets.
    • -
    • NoMore (*): No more targets.
    • -
    • Fail (*): The action process has failed.
    • -
    - -

    (*) End states of the process.

    - -

    ACT_ACCOUNT state transition methods:

    - -

    State transition functions can be set by the mission designer customizing or improving the behaviour of the state. -There are 2 moments when state transition methods will be called by the state machine:

    - -
      -
    • Before the state transition. - The state transition method needs to start with the name OnBefore + the name of the state. - If the state transition method returns false, then the processing of the state transition will not be done! - If you want to change the behaviour of the AIControllable at this event, return false, - but then you'll need to specify your own logic using the AIControllable!

    • -
    • After the state transition. - The state transition method needs to start with the name OnAfter + the name of the state. - These state transition methods need to provide a return value, which is specified at the function description.

      -
    • -
    - -

    Field(s)

    -
    -
    - - #string - -ACT_ACCOUNT.ClassName - -
    -
    - - - -
    -
    -
    -
    - - #number - -ACT_ACCOUNT.DisplayCount - -
    -
    - - - -
    -
    -
    -
    - - -ACT_ACCOUNT:New() - -
    -
    - -

    Creates a new DESTROY process.

    - -

    Return value

    - -

    #ACT_ACCOUNT:

    - - -
    -
    -
    -
    - - Set#SET_UNIT - -ACT_ACCOUNT.TargetSetUnit - -
    -
    - - - -
    -
    -
    -
    - - -ACT_ACCOUNT:onafterEvent(ProcessUnit, Event, From, To) - -
    -
    - -

    StateMachine callback function

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT ProcessUnit :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -ACT_ACCOUNT:onafterStart(ProcessUnit, Event, From, To) - -
    -
    - -

    StateMachine callback function

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT ProcessUnit :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -ACT_ACCOUNT:onenterWaiting(ProcessUnit, Event, From, To) - -
    -
    - -

    StateMachine callback function

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT ProcessUnit :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    - -

    Type ACT_ACCOUNT_DEADS

    - -

    #ACTACCOUNTDEADS FSM class, extends Fsm.Account#ACT_ACCOUNT

    - -

    The ACTACCOUNTDEADS class accounts (detects, counts and reports) successful kills of DCS units.

    - - -

    The process is given a Set of units that will be tracked upon successful destruction. -The process will end after each target has been successfully destroyed. -Each successful dead will trigger an Account state transition that can be scored, modified or administered.

    - - -

    ACTACCOUNTDEADS constructor:

    - - - -

    Field(s)

    -
    -
    - - #string - -ACT_ACCOUNT_DEADS.ClassName - -
    -
    - - - -
    -
    -
    -
    - - #string - -ACT_ACCOUNT_DEADS.DisplayCategory - -
    -
    - - - - -

    Targets is the default display category

    - -
    -
    -
    -
    - - #number - -ACT_ACCOUNT_DEADS.DisplayCount - -
    -
    - - - -
    -
    -
    -
    - - #number - -ACT_ACCOUNT_DEADS.DisplayInterval - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -ACT_ACCOUNT_DEADS.DisplayMessage - -
    -
    - - - -
    -
    -
    -
    - - #number - -ACT_ACCOUNT_DEADS.DisplayTime - -
    -
    - - - - -

    10 seconds is the default

    - -
    -
    -
    -
    - - -ACT_ACCOUNT_DEADS:Init(FsmAccount) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      FsmAccount :

      - -
    • -
    -
    -
    -
    -
    - - -ACT_ACCOUNT_DEADS:New(TargetSetUnit, TaskName) - -
    -
    - -

    Creates a new DESTROY process.

    - -

    Parameters

    -
      -
    • - -

      Set#SET_UNIT TargetSetUnit :

      - -
    • -
    • - -

      #string TaskName :

      - -
    • -
    -
    -
    -
    -
    - - -ACT_ACCOUNT_DEADS:OnEventHit(EventData) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -ACT_ACCOUNT_DEADS.PlayerHits - -
    -
    - - - -
    -
    -
    -
    - - Set#SET_UNIT - -ACT_ACCOUNT_DEADS.TargetSetUnit - -
    -
    - - - -
    -
    -
    -
    - - -ACT_ACCOUNT_DEADS:onafterEvent(ProcessUnit, Task, From, Event, To, EventData) - -
    -
    - -

    StateMachine callback function

    - -

    Parameters

    - -
    -
    -
    -
    - - -ACT_ACCOUNT_DEADS:onenterAccountForOther(ProcessUnit, Task, From, Event, To, EventData) - -
    -
    - -

    StateMachine callback function

    - -

    Parameters

    - -
    -
    -
    -
    - - -ACT_ACCOUNT_DEADS:onenterAccountForPlayer(ProcessUnit, Task, From, Event, To, EventData) - -
    -
    - -

    StateMachine callback function

    - -

    Parameters

    - -
    -
    -
    -
    - - -ACT_ACCOUNT_DEADS:onenterReport(ProcessUnit, Event, From, To, Task) - -
    -
    - -

    StateMachine callback function

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT ProcessUnit :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      Task :

      - -
    • -
    -
    -
    -
    -
    - - -ACT_ACCOUNT_DEADS:onfuncEventCrash(EventData) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -ACT_ACCOUNT_DEADS:onfuncEventDead(EventData) - -
    -
    - - - -

    Parameter

    - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Airbase.html b/docs/Documentation/Airbase.html deleted file mode 100644 index fa6abc332..000000000 --- a/docs/Documentation/Airbase.html +++ /dev/null @@ -1,446 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Airbase

    - -

    Wrapper -- AIRBASE is a wrapper class to handle the DCS Airbase objects.

    - - - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - -
    AIRBASE -

    AIRBASE class, extends Positionable#POSITIONABLE

    - -

    AIRBASE is a wrapper class to handle the DCS Airbase objects:

    - -
      -
    • Support all DCS Airbase APIs.
    • -
    -
    -

    Type AIRBASE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AIRBASE.Caucasus -

    Enumeration to identify the airbases in the Caucasus region.

    -
    AIRBASE:Find(DCSAirbase) -

    Finds a AIRBASE from the _DATABASE using a DCSAirbase object.

    -
    AIRBASE:FindByName(AirbaseName) -

    Find a AIRBASE in the _DATABASE using the name of an existing DCS Airbase.

    -
    AIRBASE:GetDCSObject() - -
    AIRBASE:GetZone() -

    Get the airbase zone.

    -
    AIRBASE.Nevada - -
    AIRBASE.Normandy - -
    AIRBASE:Register(AirbaseName) -

    Create a new AIRBASE from DCSAirbase.

    -
    - -

    Global(s)

    -
    -
    - - #AIRBASE - -AIRBASE - -
    -
    - -

    AIRBASE class, extends Positionable#POSITIONABLE

    - -

    AIRBASE is a wrapper class to handle the DCS Airbase objects:

    - -
      -
    • Support all DCS Airbase APIs.
    • -
    - - -
      -
    • Enhance with Airbase specific APIs not in the DCS Airbase API set.
    • -
    - -

    AIRBASE reference methods

    - -

    For each DCS Airbase object alive within a running mission, a AIRBASE wrapper object (instance) will be created within the _DATABASE object. -This is done at the beginning of the mission (when the mission starts).

    - -

    The AIRBASE class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference -using the DCS Airbase or the DCS AirbaseName.

    - -

    Another thing to know is that AIRBASE objects do not "contain" the DCS Airbase object. -The AIRBASE methods will reference the DCS Airbase object by name when it is needed during API execution. -If the DCS Airbase object does not exist or is nil, the AIRBASE methods will return nil and log an exception in the DCS.log file.

    - -

    The AIRBASE class provides the following functions to retrieve quickly the relevant AIRBASE instance:

    - -
      -
    • AIRBASE.Find(): Find a AIRBASE instance from the _DATABASE object using a DCS Airbase object.
    • -
    • AIRBASE.FindByName(): Find a AIRBASE instance from the _DATABASE object using a DCS Airbase name.
    • -
    - -

    IMPORTANT: ONE SHOULD NEVER SANATIZE these AIRBASE OBJECT REFERENCES! (make the AIRBASE object references nil).

    - -

    DCS Airbase APIs

    - -

    The DCS Airbase APIs are used extensively within MOOSE. The AIRBASE class has for each DCS Airbase API a corresponding method. -To be able to distinguish easily in your code the difference between a AIRBASE API call and a DCS Airbase API call, -the first letter of the method is also capitalized. So, by example, the DCS Airbase method DCSWrapper.Airbase#Airbase.getName() -is implemented in the AIRBASE class as AIRBASE.GetName().

    - - -
    -
    -

    Type Airbase

    - -

    Type AIRBASE

    -

    Field(s)

    -
    -
    - - - -AIRBASE.Caucasus - -
    -
    - -

    Enumeration to identify the airbases in the Caucasus region.

    - - - -

    These are all airbases of Caucasus:

    - -
      -
    • AIRBASE.Caucasus.Gelendzhik
    • -
    • AIRBASE.Caucasus.Krasnodar_Pashkovsky
    • -
    • AIRBASE.Caucasus.Sukhumi_Babushara
    • -
    • AIRBASE.Caucasus.Gudauta
    • -
    • AIRBASE.Caucasus.Batumi
    • -
    • AIRBASE.Caucasus.Senaki_Kolkhi
    • -
    • AIRBASE.Caucasus.Kobuleti
    • -
    • AIRBASE.Caucasus.Kutaisi
    • -
    • AIRBASE.Caucasus.Tbilisi_Lochini
    • -
    • AIRBASE.Caucasus.Soganlug
    • -
    • AIRBASE.Caucasus.Vaziani
    • -
    • AIRBASE.Caucasus.Anapa_Vityazevo
    • -
    • AIRBASE.Caucasus.Krasnodar_Center
    • -
    • AIRBASE.Caucasus.Novorossiysk
    • -
    • AIRBASE.Caucasus.Krymsk
    • -
    • AIRBASE.Caucasus.Maykop_Khanskaya
    • -
    • AIRBASE.Caucasus.Sochi_Adler
    • -
    • AIRBASE.Caucasus.Mineralnye_Vody
    • -
    • AIRBASE.Caucasus.Nalchik
    • -
    • AIRBASE.Caucasus.Mozdok
    • -
    • AIRBASE.Caucasus.Beslan -
    • -
    - -
    -
    -
    -
    - - -AIRBASE:Find(DCSAirbase) - -
    -
    - -

    Finds a AIRBASE from the _DATABASE using a DCSAirbase object.

    - -

    Parameter

    - -

    Return value

    - -

    Wrapper.Airbase#AIRBASE: -self

    - -
    -
    -
    -
    - - -AIRBASE:FindByName(AirbaseName) - -
    -
    - -

    Find a AIRBASE in the _DATABASE using the name of an existing DCS Airbase.

    - -

    Parameter

    -
      -
    • - -

      #string AirbaseName : -The Airbase Name.

      - -
    • -
    -

    Return value

    - -

    Wrapper.Airbase#AIRBASE: -self

    - -
    -
    -
    -
    - - -AIRBASE:GetDCSObject() - -
    -
    - - - -
    -
    -
    -
    - - -AIRBASE:GetZone() - -
    -
    - -

    Get the airbase zone.

    - -

    Return value

    - -

    Core.Zone#ZONE_RADIUS: -The zone radius of the airbase.

    - -
    -
    -
    -
    - - - -AIRBASE.Nevada - -
    -
    - - - -
    -
    -
    -
    - - - -AIRBASE.Normandy - -
    -
    - - - -
    -
    -
    -
    - - -AIRBASE:Register(AirbaseName) - -
    -
    - -

    Create a new AIRBASE from DCSAirbase.

    - -

    Parameter

    -
      -
    • - -

      #string AirbaseName : -The name of the airbase.

      - -
    • -
    -

    Return value

    - -

    Wrapper.Airbase#AIRBASE:

    - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/AirbasePolice.html b/docs/Documentation/AirbasePolice.html deleted file mode 100644 index 53ccb51fc..000000000 --- a/docs/Documentation/AirbasePolice.html +++ /dev/null @@ -1,824 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module AirbasePolice

    - -

    Functional -- The AIRBASEPOLICE classes monitor airbase traffic and regulate speed while taxiing.

    - - - -
    - -

    Contributions: Dutch Baron - Concept & Testing

    -

    Author: FlightControl - Framework Design & Programming

    - -
    - - -

    Global(s)

    - - - - - - - - - - - - - - - - - - - - - -
    AIRBASEPOLICE_BASE -

    Base class for AIRBASEPOLICE implementations.

    -
    AIRBASEPOLICE_CAUCASUS -

    AIRBASEPOLICE_CAUCASUS, extends #AIRBASEPOLICE_BASE

    - -

    Banner Image

    - -

    The AIRBASEPOLICE_CAUCASUS class monitors the speed of the airplanes at the airbase during taxi.

    -
    AIRBASEPOLICE_NEVADA -

    AIRBASEPOLICE_NEVADA, extends #AIRBASEPOLICE_BASE

    - -

    Banner Image

    - -

    The AIRBASEPOLICE_NEVADA class monitors the speed of the airplanes at the airbase during taxi.

    -
    AIRBASEPOLICE_NORMANDY -

    AIRBASEPOLICE_NORMANDY, extends #AIRBASEPOLICE_BASE

    - -

    Banner Image

    - -

    The AIRBASEPOLICE_NORMANDY class monitors the speed of the airplanes at the airbase during taxi.

    -
    SSB - -
    -

    Type AIRBASEPOLICE_BASE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AIRBASEPOLICE_BASE.AirbaseList - -
    AIRBASEPOLICE_BASE.AirbaseMonitor - -
    AIRBASEPOLICE_BASE.Airbases - -
    AIRBASEPOLICE_BASE.KickSpeed - -
    AIRBASEPOLICE_BASE:New(Airbases, AirbaseList) -

    Creates a new AIRBASEPOLICE_BASE object.

    -
    AIRBASEPOLICE_BASE.SetClient - -
    AIRBASEPOLICE_BASE:SetKickSpeedKmph(KickSpeed) -

    Set the maximum speed in Kmph until the player gets kicked.

    -
    AIRBASEPOLICE_BASE:SetKickSpeedMiph(KickSpeedMiph) -

    Set the maximum speed in Miph until the player gets kicked.

    -
    AIRBASEPOLICE_BASE:SmokeRunways(SmokeColor) -

    Smoke the airbases runways.

    -
    AIRBASEPOLICE_BASE:_AirbaseMonitor() - -
    - -

    Type AIRBASEPOLICE_CAUCASUS

    - - - - - -
    AIRBASEPOLICE_CAUCASUS:New(AirbaseNames) -

    Creates a new AIRBASEPOLICE_CAUCASUS object.

    -
    - -

    Type AIRBASEPOLICE_NEVADA

    - - - - - -
    AIRBASEPOLICE_NEVADA:New(AirbaseNames) -

    Creates a new AIRBASEPOLICE_NEVADA object.

    -
    - -

    Type AIRBASEPOLICE_NORMANDY

    - - - - - -
    AIRBASEPOLICE_NORMANDY:New(AirbaseNames) -

    Creates a new AIRBASEPOLICE_NORMANDY object.

    -
    - -

    Global(s)

    -
    -
    - - #AIRBASEPOLICE_BASE - -AIRBASEPOLICE_BASE - -
    -
    - -

    Base class for AIRBASEPOLICE implementations.

    - -
    -
    -
    -
    - - #AIRBASEPOLICE_CAUCASUS - -AIRBASEPOLICE_CAUCASUS - -
    -
    - -

    AIRBASEPOLICE_CAUCASUS, extends #AIRBASEPOLICE_BASE

    - -

    Banner Image

    - -

    The AIRBASEPOLICE_CAUCASUS class monitors the speed of the airplanes at the airbase during taxi.

    - - -

    The pilots may not drive faster than the maximum speed for the airbase, or they will be despawned.

    - -

    The maximum speed for the airbases at Caucasus is 50 km/h.

    - -

    The pilot will receive 3 times a warning during speeding. After the 3rd warning, if the pilot is still driving -faster than the maximum allowed speed, the pilot will be kicked.

    - -

    Different airbases have different maximum speeds, according safety regulations.

    - -

    Airbases monitored

    - -

    The following airbases are monitored at the Caucasus region:

    - -
      -
    • Anapa Vityazevo
    • -
    • Batumi
    • -
    • Beslan
    • -
    • Gelendzhik
    • -
    • Gudauta
    • -
    • Kobuleti
    • -
    • Krasnodar Center
    • -
    • Krasnodar Pashkovsky
    • -
    • Krymsk
    • -
    • Kutaisi
    • -
    • Maykop Khanskaya
    • -
    • Mineralnye Vody
    • -
    • Mozdok
    • -
    • Nalchik
    • -
    • Novorossiysk
    • -
    • Senaki Kolkhi
    • -
    • Sochi Adler
    • -
    • Soganlug
    • -
    • Sukhumi Babushara
    • -
    • Tbilisi Lochini
    • -
    • Vaziani
    • -
    - - -

    Installation

    - -

    In Single Player Missions

    - -

    AIRBASEPOLICE is fully functional in single player.

    - -

    In Multi Player Missions

    - -

    AIRBASEPOLICE is NOT functional in multi player, for client machines connecting to the server, running the mission. -Due to a bug in DCS since release 1.5, the despawning of clients are not anymore working in multi player. -To work around this problem, a much better solution has been made, using the slot blocker script designed -by Ciribob. With the help of Ciribob, this script has been extended to also kick client players while in flight. -AIRBASEPOLICE is communicating with this modified script to kick players!

    - -

    Install the file SimpleSlotBlockGameGUI.lua on the server, following the installation instructions described by Ciribob.

    - -

    Simple Slot Blocker from Ciribob & FlightControl

    - -

    Script it!

    - -

    1. AIRBASEPOLICE_CAUCASUS Constructor

    - -

    Creates a new AIRBASEPOLICE_CAUCASUS object that will monitor pilots taxiing behaviour.

    - -
    -- This creates a new AIRBASEPOLICE_CAUCASUS object.
    -
    --- Monitor for these clients the airbases.
    -AirbasePoliceCaucasus = AIRBASEPOLICE_CAUCASUS:New()
    -
    - - -
    -
    -
    -
    - - #AIRBASEPOLICE_NEVADA - -AIRBASEPOLICE_NEVADA - -
    -
    - -

    AIRBASEPOLICE_NEVADA, extends #AIRBASEPOLICE_BASE

    - -

    Banner Image

    - -

    The AIRBASEPOLICE_NEVADA class monitors the speed of the airplanes at the airbase during taxi.

    - - -

    The pilots may not drive faster than the maximum speed for the airbase, or they will be despawned.

    - -

    The pilot will receive 3 times a warning during speeding. After the 3rd warning, if the pilot is still driving -faster than the maximum allowed speed, the pilot will be kicked.

    - -

    Different airbases have different maximum speeds, according safety regulations.

    - -

    Airbases monitored

    - -

    The following airbases are monitored at the Caucasus region:

    - -
      -
    • Nellis
    • -
    • McCarran
    • -
    • Creech
    • -
    • GroomLake
    • -
    - - -

    Installation

    - -

    In Single Player Missions

    - -

    AIRBASEPOLICE is fully functional in single player.

    - -

    In Multi Player Missions

    - -

    AIRBASEPOLICE is NOT functional in multi player, for client machines connecting to the server, running the mission. -Due to a bug in DCS since release 1.5, the despawning of clients are not anymore working in multi player. -To work around this problem, a much better solution has been made, using the slot blocker script designed -by Ciribob. With the help of Ciribob, this script has been extended to also kick client players while in flight. -AIRBASEPOLICE is communicating with this modified script to kick players!

    - -

    Install the file SimpleSlotBlockGameGUI.lua on the server, following the installation instructions described by Ciribob.

    - -

    Simple Slot Blocker from Ciribob & FlightControl

    - -

    Script it!

    - -

    1. AIRBASEPOLICE_NEVADA Constructor

    - -

    Creates a new AIRBASEPOLICE_NEVADA object that will monitor pilots taxiing behaviour.

    - -
    -- This creates a new AIRBASEPOLICE_NEVADA object.
    -
    --- Monitor for these clients the airbases.
    -AirbasePoliceCaucasus = AIRBASEPOLICE_NEVADA:New()
    -
    - - -
    -
    -
    -
    - - #AIRBASEPOLICE_NORMANDY - -AIRBASEPOLICE_NORMANDY - -
    -
    - -

    AIRBASEPOLICE_NORMANDY, extends #AIRBASEPOLICE_BASE

    - -

    Banner Image

    - -

    The AIRBASEPOLICE_NORMANDY class monitors the speed of the airplanes at the airbase during taxi.

    - - -

    The pilots may not drive faster than the maximum speed for the airbase, or they will be despawned.

    - -

    The pilot will receive 3 times a warning during speeding. After the 3rd warning, if the pilot is still driving -faster than the maximum allowed speed, the pilot will be kicked.

    - -

    Different airbases have different maximum speeds, according safety regulations.

    - -

    Airbases monitored

    - -

    The following airbases are monitored at the Caucasus region:

    - -
      -
    • Nellis
    • -
    • McCarran
    • -
    • Creech
    • -
    • GroomLake
    • -
    - - -

    Installation

    - -

    In Single Player Missions

    - -

    AIRBASEPOLICE is fully functional in single player.

    - -

    In Multi Player Missions

    - -

    AIRBASEPOLICE is NOT functional in multi player, for client machines connecting to the server, running the mission. -Due to a bug in DCS since release 1.5, the despawning of clients are not anymore working in multi player. -To work around this problem, a much better solution has been made, using the slot blocker script designed -by Ciribob. With the help of Ciribob, this script has been extended to also kick client players while in flight. -AIRBASEPOLICE is communicating with this modified script to kick players!

    - -

    Install the file SimpleSlotBlockGameGUI.lua on the server, following the installation instructions described by Ciribob.

    - -

    Simple Slot Blocker from Ciribob & FlightControl

    - -

    Script it!

    - -

    1. AIRBASEPOLICE_NORMANDY Constructor

    - -

    Creates a new AIRBASEPOLICE_NORMANDY object that will monitor pilots taxiing behaviour.

    - -
    -- This creates a new AIRBASEPOLICE_NORMANDY object.
    -
    --- Monitor for these clients the airbases.
    -AirbasePoliceCaucasus = AIRBASEPOLICE_NORMANDY:New()
    -
    - - -
    -
    -
    -
    - - - -SSB - -
    -
    - - - - -

    This is simple slot blocker is used on the server.

    - -
    -
    -

    Type AirbasePolice

    - -

    Type AIRBASEPOLICE_BASE

    -

    Field(s)

    -
    -
    - - - -AIRBASEPOLICE_BASE.AirbaseList - -
    -
    - - - -
    -
    -
    -
    - - - -AIRBASEPOLICE_BASE.AirbaseMonitor - -
    -
    - - - -
    -
    -
    -
    - - - -AIRBASEPOLICE_BASE.Airbases - -
    -
    - - - -
    -
    -
    -
    - - - -AIRBASEPOLICE_BASE.KickSpeed - -
    -
    - - - -
    -
    -
    -
    - - -AIRBASEPOLICE_BASE:New(Airbases, AirbaseList) - -
    -
    - -

    Creates a new AIRBASEPOLICE_BASE object.

    - -

    Parameters

    -
      -
    • - -

      Airbases : -A table of Airbase Names.

      - -
    • -
    • - -

      AirbaseList :

      - -
    • -
    -

    Return value

    - -

    #AIRBASEPOLICE_BASE: -self

    - -
    -
    -
    -
    - - Core.Set#SET_CLIENT - -AIRBASEPOLICE_BASE.SetClient - -
    -
    - - - -
    -
    -
    -
    - - -AIRBASEPOLICE_BASE:SetKickSpeedKmph(KickSpeed) - -
    -
    - -

    Set the maximum speed in Kmph until the player gets kicked.

    - -

    Parameter

    -
      -
    • - -

      #number KickSpeed : -Set the maximum speed in Kmph until the player gets kicked.

      - -
    • -
    -

    Return value

    - -

    #AIRBASEPOLICE_BASE: -self

    - -
    -
    -
    -
    - - -AIRBASEPOLICE_BASE:SetKickSpeedMiph(KickSpeedMiph) - -
    -
    - -

    Set the maximum speed in Miph until the player gets kicked.

    - -

    Parameter

    -
      -
    • - -

      #number KickSpeedMiph : -Set the maximum speed in Mph until the player gets kicked.

      - -
    • -
    -

    Return value

    - -

    #AIRBASEPOLICE_BASE: -self

    - -
    -
    -
    -
    - - -AIRBASEPOLICE_BASE:SmokeRunways(SmokeColor) - -
    -
    - -

    Smoke the airbases runways.

    - -

    Parameter

    - -

    Return value

    - -

    #AIRBASEPOLICE_BASE: -self

    - -
    -
    -
    -
    - - -AIRBASEPOLICE_BASE:_AirbaseMonitor() - -
    -
    - - - -
    -
    - -

    Type AIRBASEPOLICE_BASE.AirbaseNames

    - -

    Type AIRBASEPOLICE_CAUCASUS

    -

    Field(s)

    -
    -
    - - -AIRBASEPOLICE_CAUCASUS:New(AirbaseNames) - -
    -
    - -

    Creates a new AIRBASEPOLICE_CAUCASUS object.

    - -

    Parameter

    -
      -
    • - -

      AirbaseNames : -A list {} of airbase names (Use AIRBASE.Caucasus enumerator).

      - -
    • -
    -

    Return value

    - -

    #AIRBASEPOLICE_CAUCASUS: -self

    - -
    -
    - -

    Type AIRBASEPOLICE_NEVADA

    -

    Field(s)

    -
    -
    - - -AIRBASEPOLICE_NEVADA:New(AirbaseNames) - -
    -
    - -

    Creates a new AIRBASEPOLICE_NEVADA object.

    - -

    Parameter

    -
      -
    • - -

      AirbaseNames : -A list {} of airbase names (Use AIRBASE.Nevada enumerator).

      - -
    • -
    -

    Return value

    - -

    #AIRBASEPOLICE_NEVADA: -self

    - -
    -
    - -

    Type AIRBASEPOLICE_NORMANDY

    -

    Field(s)

    -
    -
    - - -AIRBASEPOLICE_NORMANDY:New(AirbaseNames) - -
    -
    - -

    Creates a new AIRBASEPOLICE_NORMANDY object.

    - -

    Parameter

    -
      -
    • - -

      AirbaseNames : -A list {} of airbase names (Use AIRBASE.Normandy enumerator).

      - -
    • -
    -

    Return value

    - -

    #AIRBASEPOLICE_NORMANDY: -self

    - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Assign.html b/docs/Documentation/Assign.html deleted file mode 100644 index c49fd73d2..000000000 --- a/docs/Documentation/Assign.html +++ /dev/null @@ -1,1068 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Assign

    - -

    (SP) (MP) (FSM) Accept or reject process for player (task) assignments.

    - - - -
    - -

    #ACT_ASSIGN FSM template class, extends Fsm#FSM_PROCESS

    - -

    ACT_ASSIGN state machine:

    - -

    This class is a state machine: it manages a process that is triggered by events causing state transitions to occur. -All derived classes from this class will start with the class name, followed by a _. See the relevant derived class descriptions below. -Each derived class follows exactly the same process, using the same events and following the same state transitions, -but will have different implementation behaviour upon each event or state transition.

    - -

    ACT_ASSIGN Events:

    - -

    These are the events defined in this class:

    - -
      -
    • Start: Start the tasking acceptance process.
    • -
    • Assign: Assign the task.
    • -
    • Reject: Reject the task..
    • -
    - -

    ACT_ASSIGN Event methods:

    - -

    Event methods are available (dynamically allocated by the state machine), that accomodate for state transitions occurring in the process. -There are two types of event methods, which you can use to influence the normal mechanisms in the state machine:

    - -
      -
    • Immediate: The event method has exactly the name of the event.
    • -
    • Delayed: The event method starts with a __ + the name of the event. The first parameter of the event method is a number value, expressing the delay in seconds when the event will be executed.
    • -
    - -

    ACT_ASSIGN States:

    - -
      -
    • UnAssigned: The player has not accepted the task.
    • -
    • Assigned (*): The player has accepted the task.
    • -
    • Rejected (*): The player has not accepted the task.
    • -
    • Waiting: The process is awaiting player feedback.
    • -
    • Failed (*): The process has failed.
    • -
    - -

    (*) End states of the process.

    - -

    ACT_ASSIGN state transition methods:

    - -

    State transition functions can be set by the mission designer customizing or improving the behaviour of the state. -There are 2 moments when state transition methods will be called by the state machine:

    - -
      -
    • Before the state transition. - The state transition method needs to start with the name OnBefore + the name of the state. - If the state transition method returns false, then the processing of the state transition will not be done! - If you want to change the behaviour of the AIControllable at this event, return false, - but then you'll need to specify your own logic using the AIControllable!

    • -
    • After the state transition. - The state transition method needs to start with the name OnAfter + the name of the state. - These state transition methods need to provide a return value, which is specified at the function description.

    • -
    - -
    - -

    1) #ACTASSIGNACCEPT class, extends Fsm.Assign#ACT_ASSIGN

    - -

    The ACTASSIGNACCEPT class accepts by default a task for a player. No player intervention is allowed to reject the task.

    - -

    1.1) ACTASSIGNACCEPT constructor:

    - - - -
    - -

    2) #ACTASSIGNMENU_ACCEPT class, extends Fsm.Assign#ACT_ASSIGN

    - -

    The ACTASSIGNMENU_ACCEPT class accepts a task when the player accepts the task through an added menu option. -This assignment type is useful to conditionally allow the player to choose whether or not he would accept the task. -The assignment type also allows to reject the task.

    - -

    2.1) ACTASSIGNMENU_ACCEPT constructor:

    -
    - - - -
    - - -

    Global(s)

    - - - - - - - - - - - - - -
    ACT_ASSIGN - -
    ACT_ASSIGN_ACCEPT - -
    ACT_ASSIGN_MENU_ACCEPT - -
    -

    Type ACT_ASSIGN

    - - - - - - - - - - - - - - - - - - - - - -
    ACT_ASSIGN.ClassName - -
    ACT_ASSIGN:New() -

    Creates a new task assignment state machine.

    -
    ACT_ASSIGN.ProcessUnit - -
    ACT_ASSIGN.TargetZone - -
    ACT_ASSIGN.Task - -
    - -

    Type ACT_ASSIGN_ACCEPT

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ACT_ASSIGN_ACCEPT.ClassName - -
    ACT_ASSIGN_ACCEPT:Init(FsmAssign) - -
    ACT_ASSIGN_ACCEPT:New(TaskBriefing) -

    Creates a new task assignment state machine.

    -
    ACT_ASSIGN_ACCEPT.ProcessUnit - -
    ACT_ASSIGN_ACCEPT.TargetZone - -
    ACT_ASSIGN_ACCEPT.Task - -
    ACT_ASSIGN_ACCEPT.TaskBriefing - -
    ACT_ASSIGN_ACCEPT:onafterStart(ProcessUnit, Event, From, To) -

    StateMachine callback function

    -
    ACT_ASSIGN_ACCEPT:onenterAssigned(ProcessUnit, Event, From, To) -

    StateMachine callback function

    -
    - -

    Type ACT_ASSIGN_MENU_ACCEPT

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ACT_ASSIGN_MENU_ACCEPT.ClassName - -
    ACT_ASSIGN_MENU_ACCEPT:Init(FsmAssign) - -
    ACT_ASSIGN_MENU_ACCEPT.Menu - -
    ACT_ASSIGN_MENU_ACCEPT.MenuAcceptTask - -
    ACT_ASSIGN_MENU_ACCEPT:MenuAssign() -

    Menu function.

    -
    ACT_ASSIGN_MENU_ACCEPT:MenuReject() -

    Menu function.

    -
    ACT_ASSIGN_MENU_ACCEPT.MenuRejectTask - -
    ACT_ASSIGN_MENU_ACCEPT:New(TaskName, TaskBriefing) -

    Init.

    -
    ACT_ASSIGN_MENU_ACCEPT.ProcessUnit - -
    ACT_ASSIGN_MENU_ACCEPT.TargetZone - -
    ACT_ASSIGN_MENU_ACCEPT.Task - -
    ACT_ASSIGN_MENU_ACCEPT.TaskBriefing - -
    ACT_ASSIGN_MENU_ACCEPT.TaskName - -
    ACT_ASSIGN_MENU_ACCEPT:onafterAssign(ProcessUnit, Event, From, To) -

    StateMachine callback function

    -
    ACT_ASSIGN_MENU_ACCEPT:onafterReject(ProcessUnit, Event, From, To) -

    StateMachine callback function

    -
    ACT_ASSIGN_MENU_ACCEPT:onafterStart(ProcessUnit, Event, From, To) -

    StateMachine callback function

    -
    - -

    Global(s)

    -
    -
    - - #ACT_ASSIGN - -ACT_ASSIGN - -
    -
    - - - -
    -
    -
    -
    - - #ACT_ASSIGN_ACCEPT - -ACT_ASSIGN_ACCEPT - -
    -
    - - - -
    -
    -
    -
    - - #ACT_ASSIGN_MENU_ACCEPT - -ACT_ASSIGN_MENU_ACCEPT - -
    -
    - - - -
    -
    -

    Type Assign

    - -

    Type ACT_ASSIGN

    - -

    ACT_ASSIGN class

    - -

    Field(s)

    -
    -
    - - #string - -ACT_ASSIGN.ClassName - -
    -
    - - - -
    -
    -
    -
    - - -ACT_ASSIGN:New() - -
    -
    - -

    Creates a new task assignment state machine.

    - - -

    The process will accept the task by default, no player intervention accepted.

    - -

    Return value

    - -

    #ACT_ASSIGN: -The task acceptance process.

    - -
    -
    -
    -
    - - Wrapper.Unit#UNIT - -ACT_ASSIGN.ProcessUnit - -
    -
    - - - -
    -
    -
    -
    - - Core.Zone#ZONE_BASE - -ACT_ASSIGN.TargetZone - -
    -
    - - - -
    -
    -
    -
    - - Tasking.Task#TASK - -ACT_ASSIGN.Task - -
    -
    - - - -
    -
    - -

    Type ACT_ASSIGN_ACCEPT

    - -

    ACTASSIGNACCEPT class

    - -

    Field(s)

    -
    -
    - - #string - -ACT_ASSIGN_ACCEPT.ClassName - -
    -
    - - - -
    -
    -
    -
    - - -ACT_ASSIGN_ACCEPT:Init(FsmAssign) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      FsmAssign :

      - -
    • -
    -
    -
    -
    -
    - - -ACT_ASSIGN_ACCEPT:New(TaskBriefing) - -
    -
    - -

    Creates a new task assignment state machine.

    - - -

    The process will accept the task by default, no player intervention accepted.

    - -

    Parameter

    -
      -
    • - -

      #string TaskBriefing :

      - -
    • -
    -
    -
    -
    -
    - - Wrapper.Unit#UNIT - -ACT_ASSIGN_ACCEPT.ProcessUnit - -
    -
    - - - -
    -
    -
    -
    - - Core.Zone#ZONE_BASE - -ACT_ASSIGN_ACCEPT.TargetZone - -
    -
    - - - -
    -
    -
    -
    - - Tasking.Task#TASK - -ACT_ASSIGN_ACCEPT.Task - -
    -
    - - - -
    -
    -
    -
    - - - -ACT_ASSIGN_ACCEPT.TaskBriefing - -
    -
    - - - -
    -
    -
    -
    - - -ACT_ASSIGN_ACCEPT:onafterStart(ProcessUnit, Event, From, To) - -
    -
    - -

    StateMachine callback function

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT ProcessUnit :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -ACT_ASSIGN_ACCEPT:onenterAssigned(ProcessUnit, Event, From, To) - -
    -
    - -

    StateMachine callback function

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT ProcessUnit :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    - -

    Type ACT_ASSIGN_MENU_ACCEPT

    - -

    ACTASSIGNMENU_ACCEPT class

    - -

    Field(s)

    -
    -
    - - #string - -ACT_ASSIGN_MENU_ACCEPT.ClassName - -
    -
    - - - -
    -
    -
    -
    - - -ACT_ASSIGN_MENU_ACCEPT:Init(FsmAssign) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      FsmAssign :

      - -
    • -
    -
    -
    -
    -
    - - - -ACT_ASSIGN_MENU_ACCEPT.Menu - -
    -
    - - - -
    -
    -
    -
    - - - -ACT_ASSIGN_MENU_ACCEPT.MenuAcceptTask - -
    -
    - - - -
    -
    -
    -
    - - -ACT_ASSIGN_MENU_ACCEPT:MenuAssign() - -
    -
    - -

    Menu function.

    - -
    -
    -
    -
    - - -ACT_ASSIGN_MENU_ACCEPT:MenuReject() - -
    -
    - -

    Menu function.

    - -
    -
    -
    -
    - - - -ACT_ASSIGN_MENU_ACCEPT.MenuRejectTask - -
    -
    - - - -
    -
    -
    -
    - - -ACT_ASSIGN_MENU_ACCEPT:New(TaskName, TaskBriefing) - -
    -
    - -

    Init.

    - -

    Parameters

    -
      -
    • - -

      #string TaskName :

      - -
    • -
    • - -

      #string TaskBriefing :

      - -
    • -
    -

    Return value

    - -

    #ACTASSIGNMENU_ACCEPT: -self

    - -
    -
    -
    -
    - - Wrapper.Unit#UNIT - -ACT_ASSIGN_MENU_ACCEPT.ProcessUnit - -
    -
    - - - -
    -
    -
    -
    - - Core.Zone#ZONE_BASE - -ACT_ASSIGN_MENU_ACCEPT.TargetZone - -
    -
    - - - -
    -
    -
    -
    - - Tasking.Task#TASK - -ACT_ASSIGN_MENU_ACCEPT.Task - -
    -
    - - - -
    -
    -
    -
    - - - -ACT_ASSIGN_MENU_ACCEPT.TaskBriefing - -
    -
    - - - -
    -
    -
    -
    - - - -ACT_ASSIGN_MENU_ACCEPT.TaskName - -
    -
    - - - -
    -
    -
    -
    - - -ACT_ASSIGN_MENU_ACCEPT:onafterAssign(ProcessUnit, Event, From, To) - -
    -
    - -

    StateMachine callback function

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT ProcessUnit :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -ACT_ASSIGN_MENU_ACCEPT:onafterReject(ProcessUnit, Event, From, To) - -
    -
    - -

    StateMachine callback function

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT ProcessUnit :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -ACT_ASSIGN_MENU_ACCEPT:onafterStart(ProcessUnit, Event, From, To) - -
    -
    - -

    StateMachine callback function

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT ProcessUnit :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Base.html b/docs/Documentation/Base.html deleted file mode 100644 index 1d8f7889f..000000000 --- a/docs/Documentation/Base.html +++ /dev/null @@ -1,2561 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Base

    - -

    Core -- BASE forms the basis of the MOOSE framework.

    - - -

    Each class within the MOOSE framework derives from BASE.

    - -

    Banner Image

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - - - - - -
    BASE -

    1) #BASE class

    - -

    All classes within the MOOSE framework are derived from the BASE class.

    -
    FORMATION - -
    -

    Type BASE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    BASE.ClassID -

    The ID number of the class.

    -
    BASE.ClassName -

    The name of the class.

    -
    BASE.ClassNameAndID -

    The name of the class concatenated with the ID number of the class.

    -
    BASE:ClearState(Object, StateName) - -
    BASE:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) -

    Creation of a Birth Event.

    -
    BASE:CreateEventCrash(EventTime, Initiator) -

    Creation of a Crash Event.

    -
    BASE:CreateEventTakeoff(EventTime, Initiator) -

    Creation of a Takeoff Event.

    -
    BASE:E(Arguments) -

    Log an exception which will be traced always.

    -
    BASE:EventDispatcher() -

    Returns the event dispatcher

    -
    BASE:EventRemoveAll() -

    Remove all subscribed events

    -
    BASE:F(Arguments) -

    Trace a function call.

    -
    BASE:F2(Arguments) -

    Trace a function call level 2.

    -
    BASE:F3(Arguments) -

    Trace a function call level 3.

    -
    BASE:GetClassID() -

    Get the ClassID of the class instance.

    -
    BASE:GetClassName() -

    Get the ClassName of the class instance.

    -
    BASE:GetClassNameAndID() -

    Get the ClassName + ClassID of the class instance.

    -
    BASE:GetEventPriority() -

    Get the Class Event processing Priority.

    -
    BASE:GetParent(Child, FromClass) -

    This is the worker method to retrieve the Parent class.

    -
    BASE:GetState(Object, Key) -

    Get a Value given a Key from the Object.

    -
    BASE:HandleEvent(Event, EventFunction) -

    Subscribe to a DCS Event.

    -
    BASE:Inherit(Child, Parent) -

    This is the worker method to inherit from a parent class.

    -
    BASE:IsInstanceOf(ClassName) -

    This is the worker method to check if an object is an (sub)instance of a class.

    -
    BASE:IsTrace() -

    Enquires if tracing is on (for the class).

    -
    BASE:New() -

    BASE constructor.

    -
    BASE:OnEvent(EventData) -

    Occurs when an object is completely destroyed.

    -
    BASE:OnEventBaseCaptured(EventData) -

    Occurs when a ground unit captures either an airbase or a farp.

    -
    BASE:OnEventBirth(EventData) -

    Occurs when any object is spawned into the mission.

    -
    BASE:OnEventCrash(EventData) -

    Occurs when any aircraft crashes into the ground and is completely destroyed.

    -
    BASE:OnEventDead(EventData) -

    Occurs when an object is dead.

    -
    BASE:OnEventEjection(EventData) -

    Occurs when a pilot ejects from an aircraft -initiator : The unit that has ejected

    -
    BASE:OnEventEngineShutdown(EventData) -

    Occurs when any aircraft shuts down its engines.

    -
    BASE:OnEventEngineStartup(EventData) -

    Occurs when any aircraft starts its engines.

    -
    BASE:OnEventHit(EventData) -

    Occurs whenever an object is hit by a weapon.

    -
    BASE:OnEventHumanFailure(EventData) -

    Occurs when any system fails on a human controlled aircraft.

    -
    BASE:OnEventLand(EventData) -

    Occurs when an aircraft lands at an airbase, farp or ship -initiator : The unit that has landed -place: Object that the unit landed on.

    -
    BASE:OnEventMissionEnd(EventData) -

    Occurs when a mission ends

    -
    BASE:OnEventMissionStart(EventData) -

    Occurs when a mission starts

    -
    BASE:OnEventPilotDead(EventData) -

    Occurs when the pilot of an aircraft is killed.

    -
    BASE:OnEventPlayerEnterUnit(EventData) -

    Occurs when any player assumes direct control of a unit.

    -
    BASE:OnEventPlayerLeaveUnit(EventData) -

    Occurs when any player relieves control of a unit to the AI.

    -
    BASE:OnEventRefueling(EventData) -

    Occurs when an aircraft connects with a tanker and begins taking on fuel.

    -
    BASE:OnEventRefuelingStop(EventData) -

    Occurs when an aircraft is finished taking fuel.

    -
    BASE:OnEventShootingEnd(EventData) -

    Occurs when any unit stops firing its weapon.

    -
    BASE:OnEventShootingStart(EventData) -

    Occurs when any unit begins firing a weapon that has a high rate of fire.

    -
    BASE:OnEventShot(EventData) -

    Occurs whenever any unit in a mission fires a weapon.

    -
    BASE:OnEventTakeoff(EventData) -

    Occurs when an aircraft takes off from an airbase, farp, or ship.

    -
    BASE:ScheduleOnce(Start, SchedulerFunction, ...) -

    Schedule a new time event.

    -
    BASE:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) -

    Schedule a new time event.

    -
    BASE:ScheduleStop(SchedulerFunction) -

    Stops the Schedule.

    -
    BASE.SchedulerObject - -
    BASE:SetEventPriority(EventPriority) -

    Set the Class Event processing Priority.

    -
    BASE:SetState(Object, Key, Value) -

    Set a state or property of the Object given a Key and a Value.

    -
    BASE:T(Arguments) -

    Trace a function logic level 1.

    -
    BASE:T2(Arguments) -

    Trace a function logic level 2.

    -
    BASE:T3(Arguments) -

    Trace a function logic level 3.

    -
    BASE:TraceAll(TraceAll) -

    Trace all methods in MOOSE

    -
    BASE:TraceClass(Class) -

    Set tracing for a class

    -
    BASE:TraceClassMethod(Class, Method) -

    Set tracing for a specific method of class

    -
    BASE:TraceLevel(Level) -

    Set trace level

    -
    BASE:TraceOnOff(TraceOnOff) -

    Set trace on or off -Note that when trace is off, no debug statement is performed, increasing performance! -When Moose is loaded statically, (as one file), tracing is switched off by default.

    -
    BASE:UnHandleEvent(Event) -

    UnSubscribe to a DCS event.

    -
    BASE._ - -
    BASE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) -

    Trace a function call.

    -
    BASE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) -

    Trace a function logic.

    -
    BASE.__ - -
    BASE:onEvent(event) - -
    - -

    Type FORMATION

    - - - - - - - - - -
    FORMATION.Cone -

    A cone formation.

    -
    FORMATION.Vee - -
    - -

    Global(s)

    -
    -
    - - #BASE - -BASE - -
    -
    - -

    1) #BASE class

    - -

    All classes within the MOOSE framework are derived from the BASE class.

    - - -

    -BASE provides facilities for :

    - -
      -
    • The construction and inheritance of MOOSE classes.
    • -
    • The class naming and numbering system.
    • -
    • The class hierarchy search system.
    • -
    • The tracing of information or objects during mission execution for debuggin purposes.
    • -
    • The subscription to DCS events for event handling in MOOSE objects.
    • -
    - -

    Note: The BASE class is an abstract class and is not meant to be used directly.

    - -

    1.1) BASE constructor

    - -

    Any class derived from BASE, will use the Base#BASE.New constructor embedded in the Base#BASE.Inherit method. -See an example at the Base#BASE.New method how this is done.

    - -

    1.2) Trace information for debugging

    - -

    The BASE class contains trace methods to trace progress within a mission execution of a certain object. -These trace methods are inherited by each MOOSE class interiting BASE, soeach object created from derived class from BASE can use the tracing methods to trace its execution.

    - -

    Any type of information can be passed to these tracing methods. See the following examples:

    - -
    self:E( "Hello" )
    -
    - -

    Result in the word "Hello" in the dcs.log.

    - -
    local Array = { 1, nil, "h", { "a","b" }, "x" }
    -self:E( Array )
    -
    - -

    Results with the text [1]=1,[3]="h",[4]={[1]="a",[2]="b"},[5]="x"} in the dcs.log.

    - -
    local Object1 = "Object1"
    -local Object2 = 3
    -local Object3 = { Object 1, Object 2 }
    -self:E( { Object1, Object2, Object3 } )
    -
    - -

    Results with the text [1]={[1]="Object",[2]=3,[3]={[1]="Object",[2]=3}} in the dcs.log.

    - -
    local SpawnObject = SPAWN:New( "Plane" )
    -local GroupObject = GROUP:FindByName( "Group" )
    -self:E( { Spawn = SpawnObject, Group = GroupObject } )
    -
    - -

    Results with the text [1]={Spawn={....),Group={...}} in the dcs.log.

    - -

    Below a more detailed explanation of the different method types for tracing.

    - -

    1.2.1) Tracing methods categories

    - -

    There are basically 3 types of tracing methods available:

    - -
      -
    • BASE.F: Used to trace the entrance of a function and its given parameters. An F is indicated at column 44 in the DCS.log file.
    • -
    • BASE.T: Used to trace further logic within a function giving optional variables or parameters. A T is indicated at column 44 in the DCS.log file.
    • -
    • BASE.E: Used to always trace information giving optional variables or parameters. An E is indicated at column 44 in the DCS.log file.
    • -
    - -

    1.2.2) Tracing levels

    - -

    There are 3 tracing levels within MOOSE.
    -These tracing levels were defined to avoid bulks of tracing to be generated by lots of objects.

    - -

    As such, the F and T methods have additional variants to trace level 2 and 3 respectively:

    - -
      -
    • BASE.F2: Trace the beginning of a function and its given parameters with tracing level 2.
    • -
    • BASE.F3: Trace the beginning of a function and its given parameters with tracing level 3.
    • -
    • BASE.T2: Trace further logic within a function giving optional variables or parameters with tracing level 2.
    • -
    • BASE.T3: Trace further logic within a function giving optional variables or parameters with tracing level 3.
    • -
    - -

    1.2.3) Trace activation.

    - -

    Tracing can be activated in several ways:

    - -
      -
    • Switch tracing on or off through the BASE.TraceOnOff() method.
    • -
    • Activate all tracing through the BASE.TraceAll() method.
    • -
    • Activate only the tracing of a certain class (name) through the BASE.TraceClass() method.
    • -
    • Activate only the tracing of a certain method of a certain class through the BASE.TraceClassMethod() method.
    • -
    • Activate only the tracing of a certain level through the BASE.TraceLevel() method.
    • -
    - -

    1.2.4) Check if tracing is on.

    - -

    The method BASE.IsTrace() will validate if tracing is activated or not.

    - -

    1.3 DCS simulator Event Handling

    - -

    The BASE class provides methods to catch DCS Events. These are events that are triggered from within the DCS simulator, -and handled through lua scripting. MOOSE provides an encapsulation to handle these events more efficiently.

    - -

    1.3.1 Subscribe / Unsubscribe to DCS Events

    - -

    At first, the mission designer will need to Subscribe to a specific DCS event for the class. -So, when the DCS event occurs, the class will be notified of that event. -There are two methods which you use to subscribe to or unsubscribe from an event.

    - - - -

    1.3.2 Event Handling of DCS Events

    - -

    Once the class is subscribed to the event, an Event Handling method on the object or class needs to be written that will be called -when the DCS event occurs. The Event Handling method receives an Event#EVENTDATA structure, which contains a lot of information -about the event that occurred.

    - -

    Find below an example of the prototype how to write an event handling function for two units:

    - -
     local Tank1 = UNIT:FindByName( "Tank A" )
    - local Tank2 = UNIT:FindByName( "Tank B" )
    -
    - -- Here we subscribe to the Dead events. So, if one of these tanks dies, the Tank1 or Tank2 objects will be notified.
    - Tank1:HandleEvent( EVENTS.Dead )
    - Tank2:HandleEvent( EVENTS.Dead )
    -
    - --- This function is an Event Handling function that will be called when Tank1 is Dead.
    - -- @param Wrapper.Unit#UNIT self 
    - -- @param Core.Event#EVENTDATA EventData
    - function Tank1:OnEventDead( EventData )
    -
    -   self:SmokeGreen()
    - end
    -
    - --- This function is an Event Handling function that will be called when Tank2 is Dead.
    - -- @param Wrapper.Unit#UNIT self 
    - -- @param Core.Event#EVENTDATA EventData
    - function Tank2:OnEventDead( EventData )
    -
    -   self:SmokeBlue()
    - end
    -
    - - - -

    See the Event module for more information about event handling.

    - -

    1.4) Class identification methods

    - -

    BASE provides methods to get more information of each object:

    - -
      -
    • BASE.GetClassID(): Gets the ID (number) of the object. Each object created is assigned a number, that is incremented by one.
    • -
    • BASE.GetClassName(): Gets the name of the object, which is the name of the class the object was instantiated from.
    • -
    • BASE.GetClassNameAndID(): Gets the name and ID of the object.
    • -
    - -

    1.5) All objects derived from BASE can have "States"

    - -

    A mechanism is in place in MOOSE, that allows to let the objects administer states.
    -States are essentially properties of objects, which are identified by a Key and a Value.

    - -

    The method BASE.SetState() can be used to set a Value with a reference Key to the object.
    -To read or retrieve a state Value based on a Key, use the BASE.GetState method.

    - -

    These two methods provide a very handy way to keep state at long lasting processes. -Values can be stored within the objects, and later retrieved or changed when needed. -There is one other important thing to note, the BASE.SetState() and BASE.GetState methods -receive as the first parameter the object for which the state needs to be set. -Thus, if the state is to be set for the same object as the object for which the method is used, then provide the same -object name to the method.

    - -

    1.10) Inheritance

    - -

    The following methods are available to implement inheritance

    - -
      -
    • BASE.Inherit: Inherits from a class.
    • -
    • BASE.GetParent: Returns the parent object from the object it is handling, or nil if there is no parent object.
    • -
    - -
    - - -
    -
    -
    -
    - - #FORMATION - -FORMATION - -
    -
    - - - -
    -
    -

    Type Base

    - -

    Type BASE

    -

    Field(s)

    -
    -
    - - -BASE.ClassID - -
    -
    - -

    The ID number of the class.

    - -
    -
    -
    -
    - - -BASE.ClassName - -
    -
    - -

    The name of the class.

    - -
    -
    -
    -
    - - -BASE.ClassNameAndID - -
    -
    - -

    The name of the class concatenated with the ID number of the class.

    - -
    -
    -
    -
    - - -BASE:ClearState(Object, StateName) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Object :

      - -
    • -
    • - -

      StateName :

      - -
    • -
    -
    -
    -
    -
    - - -BASE:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) - -
    -
    - -

    Creation of a Birth Event.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Time EventTime : -The time stamp of the event.

      - -
    • -
    • - -

      Dcs.DCSWrapper.Object#Object Initiator : -The initiating object of the event.

      - -
    • -
    • - -

      #string IniUnitName : -The initiating unit name.

      - -
    • -
    • - -

      place :

      - -
    • -
    • - -

      subplace :

      - -
    • -
    -
    -
    -
    -
    - - -BASE:CreateEventCrash(EventTime, Initiator) - -
    -
    - -

    Creation of a Crash Event.

    - -

    Parameters

    - -
    -
    -
    -
    - - -BASE:CreateEventTakeoff(EventTime, Initiator) - -
    -
    - -

    Creation of a Takeoff Event.

    - -

    Parameters

    - -
    -
    -
    -
    - - -BASE:E(Arguments) - -
    -
    - -

    Log an exception which will be traced always.

    - - -

    Can be anywhere within the function logic.

    - -

    Parameter

    -
      -
    • - -

      Arguments : -A #table or any field.

      - -
    • -
    -
    -
    -
    -
    - - -BASE:EventDispatcher() - -
    -
    - -

    Returns the event dispatcher

    - -

    Return value

    - -

    Core.Event#EVENT:

    - - -
    -
    -
    -
    - - -BASE:EventRemoveAll() - -
    -
    - -

    Remove all subscribed events

    - -

    Return value

    - -

    #BASE:

    - - -
    -
    -
    -
    - - -BASE:F(Arguments) - -
    -
    - -

    Trace a function call.

    - - -

    Must be at the beginning of the function logic.

    - -

    Parameter

    -
      -
    • - -

      Arguments : -A #table or any field.

      - -
    • -
    -
    -
    -
    -
    - - -BASE:F2(Arguments) - -
    -
    - -

    Trace a function call level 2.

    - - -

    Must be at the beginning of the function logic.

    - -

    Parameter

    -
      -
    • - -

      Arguments : -A #table or any field.

      - -
    • -
    -
    -
    -
    -
    - - -BASE:F3(Arguments) - -
    -
    - -

    Trace a function call level 3.

    - - -

    Must be at the beginning of the function logic.

    - -

    Parameter

    -
      -
    • - -

      Arguments : -A #table or any field.

      - -
    • -
    -
    -
    -
    -
    - - -BASE:GetClassID() - -
    -
    - -

    Get the ClassID of the class instance.

    - -

    Return value

    - -

    #string: -The ClassID of the class instance.

    - -
    -
    -
    -
    - - -BASE:GetClassName() - -
    -
    - -

    Get the ClassName of the class instance.

    - -

    Return value

    - -

    #string: -The ClassName of the class instance.

    - -
    -
    -
    -
    - - -BASE:GetClassNameAndID() - -
    -
    - -

    Get the ClassName + ClassID of the class instance.

    - - -

    The ClassName + ClassID is formatted as '%s#%09d'.

    - -

    Return value

    - -

    #string: -The ClassName + ClassID of the class instance.

    - -
    -
    -
    -
    - - -BASE:GetEventPriority() - -
    -
    - -

    Get the Class Event processing Priority.

    - - -

    The Event processing Priority is a number from 1 to 10, -reflecting the order of the classes subscribed to the Event to be processed.

    - -

    Return value

    - -

    #number: -The Event processing Priority.

    - -
    -
    -
    -
    - - -BASE:GetParent(Child, FromClass) - -
    -
    - -

    This is the worker method to retrieve the Parent class.

    - - -

    Note that the Parent class must be passed to call the parent class method.

    - -
    self:GetParent(self):ParentMethod()
    -
    -
    -
    - -

    Parameters

    -
      -
    • - -

      #BASE Child : -is the Child class from which the Parent class needs to be retrieved.

      - -
    • -
    • - -

      FromClass :

      - -
    • -
    -

    Return value

    - -

    #BASE:

    - - -
    -
    -
    -
    - - -BASE:GetState(Object, Key) - -
    -
    - -

    Get a Value given a Key from the Object.

    - - -

    Note that if the Object is destroyed, nillified or garbage collected, then the Values and Keys will also be gone.

    - -

    Parameters

    -
      -
    • - -

      Object : -The object that holds the Value set by the Key.

      - -
    • -
    • - -

      Key : -The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!

      - -
    • -
    -

    Return value

    - - -

    The Value retrieved.

    - -
    -
    -
    -
    - - -BASE:HandleEvent(Event, EventFunction) - -
    -
    - -

    Subscribe to a DCS Event.

    - -

    Parameters

    -
      -
    • - -

      Core.Event#EVENTS Event :

      - -
    • -
    • - -

      #function EventFunction : -(optional) The function to be called when the event occurs for the unit.

      - -
    • -
    -

    Return value

    - -

    #BASE:

    - - -
    -
    -
    -
    - - -BASE:Inherit(Child, Parent) - -
    -
    - -

    This is the worker method to inherit from a parent class.

    - -

    Parameters

    -
      -
    • - -

      Child : -is the Child class that inherits.

      - -
    • -
    • - -

      #BASE Parent : -is the Parent class that the Child inherits from.

      - -
    • -
    -

    Return value

    - -

    #BASE: -Child

    - -
    -
    -
    -
    - - -BASE:IsInstanceOf(ClassName) - -
    -
    - -

    This is the worker method to check if an object is an (sub)instance of a class.

    - - - -

    Examples:

    - -
      -
    • ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true

    • -
    • ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true

    • -
    • ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true

    • -
    • ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true

    • -
    • ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false

    • -
    - - -

    Parameter

    -
      -
    • - -

      ClassName : -is the name of the class or the class itself to run the check against

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -BASE:IsTrace() - -
    -
    - -

    Enquires if tracing is on (for the class).

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -BASE:New() - -
    -
    - -

    BASE constructor.

    - - - -

    This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.

    - -
    function EVENT:New()
    -  local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
    -  return self
    -end
    -  
    -
    - -

    Return value

    - -

    #BASE:

    - - -
    -
    -
    -
    - - -BASE:OnEvent(EventData) - -
    -
    - -

    Occurs when an object is completely destroyed.

    - - -

    initiator : The unit that is was destroyed.

    - -

    Parameter

    - -
    -
    -
    -
    - - -BASE:OnEventBaseCaptured(EventData) - -
    -
    - -

    Occurs when a ground unit captures either an airbase or a farp.

    - - -

    initiator : The unit that captured the base -place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.

    - -

    Parameter

    - -
    -
    -
    -
    - - -BASE:OnEventBirth(EventData) - -
    -
    - -

    Occurs when any object is spawned into the mission.

    - - -

    initiator : The unit that was spawned

    - -

    Parameter

    - -
    -
    -
    -
    - - -BASE:OnEventCrash(EventData) - -
    -
    - -

    Occurs when any aircraft crashes into the ground and is completely destroyed.

    - - -

    initiator : The unit that has crashed

    - -

    Parameter

    - -
    -
    -
    -
    - - -BASE:OnEventDead(EventData) - -
    -
    - -

    Occurs when an object is dead.

    - - -

    initiator : The unit that is dead.

    - -

    Parameter

    - -
    -
    -
    -
    - - -BASE:OnEventEjection(EventData) - -
    -
    - -

    Occurs when a pilot ejects from an aircraft -initiator : The unit that has ejected

    - -

    Parameter

    - -
    -
    -
    -
    - - -BASE:OnEventEngineShutdown(EventData) - -
    -
    - -

    Occurs when any aircraft shuts down its engines.

    - - -

    initiator : The unit that is stopping its engines.

    - -

    Parameter

    - -
    -
    -
    -
    - - -BASE:OnEventEngineStartup(EventData) - -
    -
    - -

    Occurs when any aircraft starts its engines.

    - - -

    initiator : The unit that is starting its engines.

    - -

    Parameter

    - -
    -
    -
    -
    - - -BASE:OnEventHit(EventData) - -
    -
    - -

    Occurs whenever an object is hit by a weapon.

    - - -

    initiator : The unit object the fired the weapon -weapon: Weapon object that hit the target -target: The Object that was hit.

    - -

    Parameter

    - -
    -
    -
    -
    - - -BASE:OnEventHumanFailure(EventData) - -
    -
    - -

    Occurs when any system fails on a human controlled aircraft.

    - - -

    initiator : The unit that had the failure

    - -

    Parameter

    - -
    -
    -
    -
    - - -BASE:OnEventLand(EventData) - -
    -
    - -

    Occurs when an aircraft lands at an airbase, farp or ship -initiator : The unit that has landed -place: Object that the unit landed on.

    - - -

    Can be an Airbase Object, FARP, or Ships

    - -

    Parameter

    - -
    -
    -
    -
    - - -BASE:OnEventMissionEnd(EventData) - -
    -
    - -

    Occurs when a mission ends

    - -

    Parameter

    - -
    -
    -
    -
    - - -BASE:OnEventMissionStart(EventData) - -
    -
    - -

    Occurs when a mission starts

    - -

    Parameter

    - -
    -
    -
    -
    - - -BASE:OnEventPilotDead(EventData) - -
    -
    - -

    Occurs when the pilot of an aircraft is killed.

    - - -

    Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. -initiator : The unit that the pilot has died in.

    - -

    Parameter

    - -
    -
    -
    -
    - - -BASE:OnEventPlayerEnterUnit(EventData) - -
    -
    - -

    Occurs when any player assumes direct control of a unit.

    - - -

    initiator : The unit that is being taken control of.

    - -

    Parameter

    - -
    -
    -
    -
    - - -BASE:OnEventPlayerLeaveUnit(EventData) - -
    -
    - -

    Occurs when any player relieves control of a unit to the AI.

    - - -

    initiator : The unit that the player left.

    - -

    Parameter

    - -
    -
    -
    -
    - - -BASE:OnEventRefueling(EventData) - -
    -
    - -

    Occurs when an aircraft connects with a tanker and begins taking on fuel.

    - - -

    initiator : The unit that is receiving fuel.

    - -

    Parameter

    - -
    -
    -
    -
    - - -BASE:OnEventRefuelingStop(EventData) - -
    -
    - -

    Occurs when an aircraft is finished taking fuel.

    - - -

    initiator : The unit that was receiving fuel.

    - -

    Parameter

    - -
    -
    -
    -
    - - -BASE:OnEventShootingEnd(EventData) - -
    -
    - -

    Occurs when any unit stops firing its weapon.

    - - -

    Event will always correspond with a shooting start event. -initiator : The unit that was doing the shooing.

    - -

    Parameter

    - -
    -
    -
    -
    - - -BASE:OnEventShootingStart(EventData) - -
    -
    - -

    Occurs when any unit begins firing a weapon that has a high rate of fire.

    - - -

    Most common with aircraft cannons (GAU-8), autocannons, and machine guns. -initiator : The unit that is doing the shooing. -target: The unit that is being targeted.

    - -

    Parameter

    - -
    -
    -
    -
    - - -BASE:OnEventShot(EventData) - -
    -
    - -

    Occurs whenever any unit in a mission fires a weapon.

    - - -

    But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart.

    - -

    Parameter

    - -
    -
    -
    -
    - - -BASE:OnEventTakeoff(EventData) - -
    -
    - -

    Occurs when an aircraft takes off from an airbase, farp, or ship.

    - - -

    initiator : The unit that tookoff -place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships

    - -

    Parameter

    - -
    -
    -
    -
    - - -BASE:ScheduleOnce(Start, SchedulerFunction, ...) - -
    -
    - -

    Schedule a new time event.

    - - -

    Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

    - -

    Parameters

    -
      -
    • - -

      #number Start : -Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

      - -
    • -
    • - -

      #function SchedulerFunction : -The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

      - -
    • -
    • - -

      #table ... : -Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

      - -
    • -
    -

    Return value

    - -

    #number: -The ScheduleID of the planned schedule.

    - -
    -
    -
    -
    - - -BASE:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) - -
    -
    - -

    Schedule a new time event.

    - - -

    Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

    - -

    Parameters

    -
      -
    • - -

      #number Start : -Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

      - -
    • -
    • - -

      #number Repeat : -Specifies the interval in seconds when the scheduler will call the event function.

      - -
    • -
    • - -

      #number RandomizeFactor : -Specifies a randomization factor between 0 and 1 to randomize the Repeat.

      - -
    • -
    • - -

      #number Stop : -Specifies the amount of seconds when the scheduler will be stopped.

      - -
    • -
    • - -

      #function SchedulerFunction : -The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

      - -
    • -
    • - -

      #table ... : -Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

      - -
    • -
    -

    Return value

    - -

    #number: -The ScheduleID of the planned schedule.

    - -
    -
    -
    -
    - - -BASE:ScheduleStop(SchedulerFunction) - -
    -
    - -

    Stops the Schedule.

    - -

    Parameter

    -
      -
    • - -

      #function SchedulerFunction : -The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

      - -
    • -
    -
    -
    -
    -
    - - - -BASE.SchedulerObject - -
    -
    - - - -
    -
    -
    -
    - - -BASE:SetEventPriority(EventPriority) - -
    -
    - -

    Set the Class Event processing Priority.

    - - -

    The Event processing Priority is a number from 1 to 10, -reflecting the order of the classes subscribed to the Event to be processed.

    - -

    Parameter

    -
      -
    • - -

      #number EventPriority : -The Event processing Priority.

      - -
    • -
    -

    Return value

    - - -

    self

    - -
    -
    -
    -
    - - -BASE:SetState(Object, Key, Value) - -
    -
    - -

    Set a state or property of the Object given a Key and a Value.

    - - -

    Note that if the Object is destroyed, nillified or garbage collected, then the Values and Keys will also be gone.

    - -

    Parameters

    -
      -
    • - -

      Object : -The object that will hold the Value set by the Key.

      - -
    • -
    • - -

      Key : -The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!

      - -
    • -
    • - -

      Value : -The value to is stored in the object.

      - -
    • -
    -

    Return values

    -
      -
    1. - - -

      The Value set.

      - -
    2. -
    3. - -

      #nil: -The Key was not found and thus the Value could not be retrieved.

      - -
    4. -
    -
    -
    -
    -
    - - -BASE:T(Arguments) - -
    -
    - -

    Trace a function logic level 1.

    - - -

    Can be anywhere within the function logic.

    - -

    Parameter

    -
      -
    • - -

      Arguments : -A #table or any field.

      - -
    • -
    -
    -
    -
    -
    - - -BASE:T2(Arguments) - -
    -
    - -

    Trace a function logic level 2.

    - - -

    Can be anywhere within the function logic.

    - -

    Parameter

    -
      -
    • - -

      Arguments : -A #table or any field.

      - -
    • -
    -
    -
    -
    -
    - - -BASE:T3(Arguments) - -
    -
    - -

    Trace a function logic level 3.

    - - -

    Can be anywhere within the function logic.

    - -

    Parameter

    -
      -
    • - -

      Arguments : -A #table or any field.

      - -
    • -
    -
    -
    -
    -
    - - -BASE:TraceAll(TraceAll) - -
    -
    - -

    Trace all methods in MOOSE

    - -

    Parameter

    -
      -
    • - -

      #boolean TraceAll : -true = trace all methods in MOOSE.

      - -
    • -
    -
    -
    -
    -
    - - -BASE:TraceClass(Class) - -
    -
    - -

    Set tracing for a class

    - -

    Parameter

    -
      -
    • - -

      #string Class :

      - -
    • -
    -
    -
    -
    -
    - - -BASE:TraceClassMethod(Class, Method) - -
    -
    - -

    Set tracing for a specific method of class

    - -

    Parameters

    -
      -
    • - -

      #string Class :

      - -
    • -
    • - -

      #string Method :

      - -
    • -
    -
    -
    -
    -
    - - -BASE:TraceLevel(Level) - -
    -
    - -

    Set trace level

    - -

    Parameter

    -
      -
    • - -

      #number Level :

      - -
    • -
    -
    -
    -
    -
    - - -BASE:TraceOnOff(TraceOnOff) - -
    -
    - -

    Set trace on or off -Note that when trace is off, no debug statement is performed, increasing performance! -When Moose is loaded statically, (as one file), tracing is switched off by default.

    - - -

    So tracing must be switched on manually in your mission if you are using Moose statically. -When moose is loading dynamically (for moose class development), tracing is switched on by default.

    - -

    Parameter

    -
      -
    • - -

      #boolean TraceOnOff : -Switch the tracing on or off.

      - -
    • -
    -

    Usage:

    -
    -- Switch the tracing On
    -BASE:TraceOnOff( true )
    -
    --- Switch the tracing Off
    -BASE:TraceOnOff( false )
    - -
    -
    -
    -
    - - -BASE:UnHandleEvent(Event) - -
    -
    - -

    UnSubscribe to a DCS event.

    - -

    Parameter

    - -

    Return value

    - -

    #BASE:

    - - -
    -
    -
    -
    - - #BASE._ - -BASE._ - -
    -
    - - - -
    -
    -
    -
    - - -BASE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) - -
    -
    - -

    Trace a function call.

    - - -

    This function is private.

    - -

    Parameters

    -
      -
    • - -

      Arguments : -A #table or any field.

      - -
    • -
    • - -

      DebugInfoCurrentParam :

      - -
    • -
    • - -

      DebugInfoFromParam :

      - -
    • -
    -
    -
    -
    -
    - - -BASE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) - -
    -
    - -

    Trace a function logic.

    - -

    Parameters

    -
      -
    • - -

      Arguments : -A #table or any field.

      - -
    • -
    • - -

      DebugInfoCurrentParam :

      - -
    • -
    • - -

      DebugInfoFromParam :

      - -
    • -
    -
    -
    -
    -
    - - #BASE.__ - -BASE.__ - -
    -
    - - - -
    -
    -
    -
    - - -BASE:onEvent(event) - -
    -
    - - - - -

    TODO: Complete Dcs.DCSTypes#Event structure.
    -- The main event handling function... This function captures all events generated for the class. - @param #BASE self - @param Dcs.DCSTypes#Event event

    - -

    Parameter

    -
      -
    • - -

      event :

      - -
    • -
    -
    -
    - -

    Type BASE._

    - -

    Type BASE.__

    - -

    Type FORMATION

    - -

    The Formation Class

    - -

    Field(s)

    -
    -
    - - -FORMATION.Cone - -
    -
    - -

    A cone formation.

    - -
    -
    -
    -
    - - #string - -FORMATION.Vee - -
    -
    - - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Cargo.html b/docs/Documentation/Cargo.html deleted file mode 100644 index 24cc7973c..000000000 --- a/docs/Documentation/Cargo.html +++ /dev/null @@ -1,4165 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Cargo

    - -

    Core -- Management of CARGO logistics, that can be transported from and to transportation carriers.

    - - - -

    Banner Image

    - -
    - -

    Cargo can be of various forms, always are composed out of ONE object ( one unit or one static or one slingload crate ):

    - -
      -
    • CARGO_UNIT, represented by a Unit in a singleton Group: Cargo can be represented by a Unit in a Group. a CARGO_UNIT is representable...
    • -
    • CARGO_GROUP, represented by a Group. A CARGO_GROUP is reportable...
    • -
    - -

    This module is still under construction, but is described above works already, and will keep working ...

    - -
    - -

    Demo Missions

    - -

    CARGO Demo Missions source code

    - -

    CARGO Demo Missions, only for beta testers

    - -

    ALL Demo Missions pack of the last release

    - -
    - -

    YouTube Channel

    - -

    CARGO YouTube Channel

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    CARGO -

    (R2.1) CARGO class, extends Fsm#FSM_PROCESS

    - -

    The CARGO class defines the core functions that defines a cargo object within MOOSE.

    -
    CARGOS - -
    CARGO_CRATE -

    CARGO_CRATE class, extends #CARGO_REPRESENTABLE

    - -

    The CARGO_CRATE class defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier.

    -
    CARGO_GROUP -

    CARGO_GROUP class

    - -

    The CARGO_GROUP class defines a cargo that is represented by a Group object within the simulator, and can be transported by a carrier.

    -
    CARGO_PACKAGE - -
    CARGO_REPORTABLE - -
    CARGO_REPRESENTABLE -

    Models CARGO that is representable by a Unit.

    -
    CARGO_UNIT -

    CARGO_UNIT class, extends #CARGO_REPRESENTABLE

    - -

    The CARGO_UNIT class defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier.

    -
    -

    Type CARGO

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    CARGO:Board(ToCarrier, NearRadius) -

    Boards the cargo to a Carrier.

    -
    CARGO.CargoCarrier -

    The alive DCS object carrying the cargo. This value can be nil, meaning, that the cargo is not contained anywhere...

    -
    CARGO.CargoObject -

    The alive DCS object representing the cargo. This value can be nil, meaning, that the cargo is not represented anywhere...

    -
    CARGO.CargoScheduler - -
    CARGO.Containable -

    This flag defines if the cargo can be contained within a DCS Unit.

    -
    CARGO.Deployed - -
    CARGO:Destroy() -

    Destroy the cargo.

    -
    CARGO:Flare(FlareColor) -

    Signal a flare at the position of the CARGO.

    -
    CARGO:FlareGreen() -

    Signal a green flare at the position of the CARGO.

    -
    CARGO:FlareRed() -

    Signal a red flare at the position of the CARGO.

    -
    CARGO:FlareWhite() -

    Signal a white flare at the position of the CARGO.

    -
    CARGO:FlareYellow() -

    Signal a yellow flare at the position of the CARGO.

    -
    CARGO:GetCoordinate() -

    Get the current coordinates of the Cargo.

    -
    CARGO:GetName() -

    Get the name of the Cargo.

    -
    CARGO:GetObjectName() -

    Get the object name of the Cargo.

    -
    CARGO:GetPointVec2() -

    Get the current PointVec2 of the cargo.

    -
    CARGO:GetType() -

    Get the type of the Cargo.

    -
    CARGO:IsAlive() -

    Check if cargo is alive.

    -
    CARGO:IsDeployed() -

    Is the cargo deployed

    -
    CARGO:IsDestroyed() -

    Check if cargo is destroyed.

    -
    CARGO:IsInZone(Zone) -

    Check if Cargo is the given Zone.

    -
    CARGO:IsLoaded() -

    Check if cargo is loaded.

    -
    CARGO:IsNear(PointVec2, NearRadius) -

    Check if CargoCarrier is near the Cargo to be Loaded.

    -
    CARGO:IsUnLoaded() -

    Check if cargo is unloaded.

    -
    CARGO:Load(ToCarrier) -

    Loads the cargo to a Carrier.

    -
    CARGO.Moveable -

    This flag defines if the cargo is moveable.

    -
    CARGO.Name -

    A string defining the name of the cargo. The name is the unique identifier of the cargo.

    -
    CARGO.NearRadius -

    (optional) A number defining the radius in meters when the cargo is near to a Carrier, so that it can be loaded.

    -
    CARGO:New(Type, Name, Weight, NearRadius) -

    CARGO Constructor.

    -
    CARGO:OnEnterBoarding(Controllable, NearRadius) - -
    CARGO:OnEnterLoaded(Controllable) - -
    CARGO:OnEnterUnBoarding(Controllable) - -
    CARGO:OnEnterUnLoaded(Controllable) - -
    CARGO:OnLeaveBoarding(Controllable) - -
    CARGO:OnLeaveLoaded(Controllable) - -
    CARGO:OnLeaveUnBoarding(Controllable) - -
    CARGO:OnLeaveUnLoaded(Controllable) - -
    CARGO.Representable -

    This flag defines if the cargo can be represented by a DCS Unit.

    -
    CARGO:SetDeployed(Deployed) -

    Set the cargo as deployed

    -
    CARGO:SetWeight(Weight) -

    Set the weight of the cargo.

    -
    CARGO.Slingloadable -

    This flag defines if the cargo can be slingloaded.

    -
    CARGO:Smoke(SmokeColor, Range) -

    Smoke the CARGO.

    -
    CARGO:SmokeBlue() -

    Smoke the CARGO Blue.

    -
    CARGO:SmokeGreen() -

    Smoke the CARGO Green.

    -
    CARGO:SmokeOrange() -

    Smoke the CARGO Orange.

    -
    CARGO:SmokeRed() -

    Smoke the CARGO Red.

    -
    CARGO:SmokeWhite() -

    Smoke the CARGO White.

    -
    CARGO:Spawn(PointVec2) -

    Template method to spawn a new representation of the CARGO in the simulator.

    -
    CARGO.Type -

    A string defining the type of the cargo. eg. Engineers, Equipment, Screwdrivers.

    -
    CARGO:UnBoard(ToPointVec2) -

    UnBoards the cargo to a Carrier.

    -
    CARGO:UnLoad(ToPointVec2) -

    UnLoads the cargo to a Carrier.

    -
    CARGO.Weight -

    A number defining the weight of the cargo. The weight is expressed in kg.

    -
    CARGO:__Board(DelaySeconds, ToCarrier, NearRadius) -

    Boards the cargo to a Carrier.

    -
    CARGO:__Load(DelaySeconds, ToCarrier) -

    Loads the cargo to a Carrier.

    -
    CARGO:__UnBoard(DelaySeconds, ToPointVec2) -

    UnBoards the cargo to a Carrier.

    -
    CARGO:__UnLoad(DelaySeconds, ToPointVec2) -

    UnLoads the cargo to a Carrier.

    -
    - -

    Type CARGO_CRATE

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    CARGO_CRATE.CargoCarrier - -
    CARGO_CRATE.CargoObject - -
    CARGO_CRATE:New(CrateName, Type, Name, Weight, ReportRadius, NearRadius, CargoCrateName) -

    CARGO_CRATE Constructor.

    -
    CARGO_CRATE.OnUnLoadedCallBack - -
    CARGO_CRATE:onenterLoaded(Event, From, To, CargoCarrier) -

    Loaded State.

    -
    CARGO_CRATE:onenterUnLoaded(Event, From, To, Core, ToPointVec2) -

    Enter UnLoaded State.

    -
    - -

    Type CARGO_GROUP

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    CARGO_GROUP.CargoCarrier - -
    CARGO_GROUP.CargoGroup - -
    CARGO_GROUP.CargoObject - -
    CARGO_GROUP:GetCount() -

    Get the amount of cargo units in the group.

    -
    CARGO_GROUP:New(CargoGroup, Type, Name, ReportRadius, NearRadius) -

    CARGO_GROUP constructor.

    -
    CARGO_GROUP:OnEventCargoDead(EventData) - -
    CARGO_GROUP:RespawnOnDestroyed(RespawnDestroyed) -

    Respawn the cargo when destroyed

    -
    CARGO_GROUP:onafterBoarding(CargoCarrier, Event, From, To, NearRadius, ...) -

    Leave Boarding State.

    -
    CARGO_GROUP:onafterUnBoarding(ToPointVec2, Event, From, To, NearRadius, ...) -

    UnBoard Event.

    -
    CARGO_GROUP:onenterBoarding(CargoCarrier, Event, From, To, NearRadius, ...) -

    Enter Boarding State.

    -
    CARGO_GROUP:onenterDestroyed() - -
    CARGO_GROUP:onenterLoaded(CargoCarrier, Event, From, To, ...) -

    Enter Loaded State.

    -
    CARGO_GROUP:onenterUnBoarding(ToPointVec2, Event, From, To, NearRadius, ...) -

    Enter UnBoarding State.

    -
    CARGO_GROUP:onenterUnLoaded(Core, Event, From, To, ToPointVec2, ...) -

    Enter UnLoaded State.

    -
    CARGO_GROUP:onleaveUnBoarding(ToPointVec2, Event, From, To, NearRadius, ...) -

    Leave UnBoarding State.

    -
    - -

    Type CARGO_PACKAGE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    CARGO_PACKAGE.CargoCarrier - -
    CARGO_PACKAGE.CargoInAir - -
    CARGO_PACKAGE.ClassName - -
    CARGO_PACKAGE:IsNear(CargoCarrier) -

    Check if CargoCarrier is near the Cargo to be Loaded.

    -
    CARGO_PACKAGE:New(CargoCarrier, Type, Name, Weight, ReportRadius, NearRadius) -

    CARGO_PACKAGE Constructor.

    -
    CARGO_PACKAGE:onafterLoad(Event, From, To, CargoCarrier, Speed, LoadDistance, Angle) -

    Load Event.

    -
    CARGO_PACKAGE:onafterOnBoard(Event, From, To, CargoCarrier, Speed, BoardDistance, Angle, LoadDistance) -

    Board Event.

    -
    CARGO_PACKAGE:onafterOnBoarded(Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle) -

    Boarded Event.

    -
    CARGO_PACKAGE:onafterUnBoard(Event, From, To, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle, CargoCarrier) -

    UnBoard Event.

    -
    CARGO_PACKAGE:onafterUnBoarded(Event, From, To, CargoCarrier, Speed) -

    UnBoarded Event.

    -
    CARGO_PACKAGE:onafterUnLoad(Event, From, To, Distance, Angle, CargoCarrier, Speed) -

    UnLoad Event.

    -
    - -

    Type CARGO_REPORTABLE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    CARGO_REPORTABLE.CargoObject - -
    CARGO_REPORTABLE.CargoSet - -
    CARGO_REPORTABLE.ClassName - -
    CARGO_REPORTABLE:GetBoardingRange() -

    Get the range till cargo will board.

    -
    CARGO_REPORTABLE:IsInRadius(PointVec2) -

    Check if CargoCarrier is in the ReportRadius for the Cargo to be Loaded.

    -
    CARGO_REPORTABLE:MessageToGroup(Message, TaskGroup, Name) -

    Send a CC message to a GROUP.

    -
    CARGO_REPORTABLE:New(CargoObject, Type, Name, Weight, ReportRadius, NearRadius) -

    CARGO_REPORTABLE Constructor.

    -
    CARGO_REPORTABLE.ReportRadius - -
    CARGO_REPORTABLE:Respawn() -

    Respawn the cargo.

    -
    - -

    Type CARGO_REPRESENTABLE

    - - - - - - - - - - - - - - - - - -
    CARGO_REPRESENTABLE:Destroy() -

    CARGO_REPRESENTABLE Destructor.

    -
    CARGO_REPRESENTABLE:New(Type, Name, Weight, ReportRadius, NearRadius, CargoObject) -

    CARGO_REPRESENTABLE Constructor.

    -
    CARGO_REPRESENTABLE:RouteTo(ToPointVec2, Speed) -

    Route a cargo unit to a PointVec2.

    -
    CARGO_REPRESENTABLE.test - -
    - -

    Type CARGO_UNIT

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    CARGO_UNIT.CargoCarrier - -
    CARGO_UNIT.CargoInAir - -
    CARGO_UNIT.CargoObject - -
    CARGO_UNIT:New(CargoUnit, Type, Name, Weight, ReportRadius, NearRadius) -

    CARGO_UNIT Constructor.

    -
    CARGO_UNIT.OnUnLoadedCallBack - -
    CARGO_UNIT.RunCount - -
    CARGO_UNIT:onafterBoard(Event, From, To, CargoCarrier, NearRadius, ...) -

    Board Event.

    -
    CARGO_UNIT:onafterBoarding(Event, From, To, CargoCarrier, NearRadius, ...) -

    Boarding Event.

    -
    CARGO_UNIT:onafterUnBoarding(Event, From, To, ToPointVec2, NearRadius) -

    UnBoard Event.

    -
    CARGO_UNIT:onenterBoarding(Event, From, To, CargoCarrier, NearRadius, ...) -

    Enter Boarding State.

    -
    CARGO_UNIT:onenterLoaded(Event, From, To, CargoCarrier) -

    Loaded State.

    -
    CARGO_UNIT:onenterUnBoarding(Event, From, To, ToPointVec2, NearRadius) -

    Enter UnBoarding State.

    -
    CARGO_UNIT:onenterUnLoaded(Event, From, To, Core, ToPointVec2) -

    Enter UnLoaded State.

    -
    CARGO_UNIT:onleaveUnBoarding(Event, From, To, ToPointVec2, NearRadius) -

    Leave UnBoarding State.

    -
    - -

    Global(s)

    -
    -
    - - #CARGO - -CARGO - -
    -
    - -

    (R2.1) CARGO class, extends Fsm#FSM_PROCESS

    - -

    The CARGO class defines the core functions that defines a cargo object within MOOSE.

    - - -

    A cargo is a logical object defined that is available for transport, and has a life status within a simulation.

    - -

    The CARGO is a state machine: it manages the different events and states of the cargo. -All derived classes from CARGO follow the same state machine, expose the same cargo event functions, and provide the same cargo states.

    - -

    CARGO Events:

    - -
      -
    • CARGO.Board( ToCarrier ): Boards the cargo to a carrier.
    • -
    • CARGO.Load( ToCarrier ): Loads the cargo into a carrier, regardless of its position.
    • -
    • CARGO.UnBoard( ToPointVec2 ): UnBoard the cargo from a carrier. This will trigger a movement of the cargo to the option ToPointVec2.
    • -
    • CARGO.UnLoad( ToPointVec2 ): UnLoads the cargo from a carrier.
    • -
    • CARGO.Dead( Controllable ): The cargo is dead. The cargo process will be ended.
    • -
    - -

    CARGO States:

    - -
      -
    • UnLoaded: The cargo is unloaded from a carrier.
    • -
    • Boarding: The cargo is currently boarding (= running) into a carrier.
    • -
    • Loaded: The cargo is loaded into a carrier.
    • -
    • UnBoarding: The cargo is currently unboarding (=running) from a carrier.
    • -
    • Dead: The cargo is dead ...
    • -
    • End: The process has come to an end.
    • -
    - -

    CARGO state transition methods:

    - -

    State transition functions can be set by the mission designer customizing or improving the behaviour of the state. -There are 2 moments when state transition methods will be called by the state machine:

    - -
      -
    • Leaving the state. - The state transition method needs to start with the name OnLeave + the name of the state. - If the state transition method returns false, then the processing of the state transition will not be done! - If you want to change the behaviour of the AIControllable at this event, return false, - but then you'll need to specify your own logic using the AIControllable!

    • -
    • Entering the state. - The state transition method needs to start with the name OnEnter + the name of the state. - These state transition methods need to provide a return value, which is specified at the function description.

    • -
    - - -
    -
    -
    -
    - - - -CARGOS - -
    -
    - - - -
    -
    -
    -
    - - #CARGO_CRATE - -CARGO_CRATE - -
    -
    - -

    CARGO_CRATE class, extends #CARGO_REPRESENTABLE

    - -

    The CARGO_CRATE class defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier.

    - - -

    Use the event functions as described above to Load, UnLoad, Board, UnBoard the CARGO_CRATE objects to and from carriers.

    - -
    - - -
    -
    -
    -
    - - #CARGO_GROUP - -CARGO_GROUP - -
    -
    - -

    CARGO_GROUP class

    - -

    The CARGO_GROUP class defines a cargo that is represented by a Group object within the simulator, and can be transported by a carrier.

    - - -

    Use the event functions as described above to Load, UnLoad, Board, UnBoard the CARGO_GROUP to and from carrier.

    - - -
    -
    -
    -
    - - #CARGO_PACKAGE - -CARGO_PACKAGE - -
    -
    - - - -
    -
    -
    -
    - - #CARGO_REPORTABLE - -CARGO_REPORTABLE - -
    -
    - - - -
    -
    -
    -
    - - #CARGO_REPRESENTABLE - -CARGO_REPRESENTABLE - -
    -
    - -

    Models CARGO that is representable by a Unit.

    - -
    -
    -
    -
    - - #CARGO_UNIT - -CARGO_UNIT - -
    -
    - -

    CARGO_UNIT class, extends #CARGO_REPRESENTABLE

    - -

    The CARGO_UNIT class defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier.

    - - -

    Use the event functions as described above to Load, UnLoad, Board, UnBoard the CARGO_UNIT objects to and from carriers.

    - -
    - - -
    -
    -

    Type Cargo

    - -

    Type CARGO

    -

    Field(s)

    -
    -
    - - -CARGO:Board(ToCarrier, NearRadius) - -
    -
    - -

    Boards the cargo to a Carrier.

    - - -

    The event will create a movement (= running or driving) of the cargo to the Carrier. -The cargo must be in the UnLoaded state.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE ToCarrier : -The Carrier that will hold the cargo.

      - -
    • -
    • - -

      #number NearRadius : -The radius when the cargo will board the Carrier (to avoid collision).

      - -
    • -
    -
    -
    -
    -
    - - Wrapper.Client#CLIENT - -CARGO.CargoCarrier - -
    -
    - -

    The alive DCS object carrying the cargo. This value can be nil, meaning, that the cargo is not contained anywhere...

    - -
    -
    -
    -
    - - Wrapper.Controllable#CONTROLLABLE - -CARGO.CargoObject - -
    -
    - -

    The alive DCS object representing the cargo. This value can be nil, meaning, that the cargo is not represented anywhere...

    - -
    -
    -
    -
    - - - -CARGO.CargoScheduler - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -CARGO.Containable - -
    -
    - -

    This flag defines if the cargo can be contained within a DCS Unit.

    - -
    -
    -
    -
    - - - -CARGO.Deployed - -
    -
    - - - -
    -
    -
    -
    - - -CARGO:Destroy() - -
    -
    - -

    Destroy the cargo.

    - -
    -
    -
    -
    - - -CARGO:Flare(FlareColor) - -
    -
    - -

    Signal a flare at the position of the CARGO.

    - -

    Parameter

    - -
    -
    -
    -
    - - -CARGO:FlareGreen() - -
    -
    - -

    Signal a green flare at the position of the CARGO.

    - -
    -
    -
    -
    - - -CARGO:FlareRed() - -
    -
    - -

    Signal a red flare at the position of the CARGO.

    - -
    -
    -
    -
    - - -CARGO:FlareWhite() - -
    -
    - -

    Signal a white flare at the position of the CARGO.

    - -
    -
    -
    -
    - - -CARGO:FlareYellow() - -
    -
    - -

    Signal a yellow flare at the position of the CARGO.

    - -
    -
    -
    -
    - - -CARGO:GetCoordinate() - -
    -
    - -

    Get the current coordinates of the Cargo.

    - -

    Return value

    - -

    Core.Point#COORDINATE: -The coordinates of the Cargo.

    - -
    -
    -
    -
    - - -CARGO:GetName() - -
    -
    - -

    Get the name of the Cargo.

    - -

    Return value

    - -

    #string: -The name of the Cargo.

    - -
    -
    -
    -
    - - -CARGO:GetObjectName() - -
    -
    - -

    Get the object name of the Cargo.

    - -

    Return value

    - -

    #string: -The object name of the Cargo.

    - -
    -
    -
    -
    - - -CARGO:GetPointVec2() - -
    -
    - -

    Get the current PointVec2 of the cargo.

    - -

    Return value

    - -

    Core.Point#POINT_VEC2:

    - - -
    -
    -
    -
    - - -CARGO:GetType() - -
    -
    - -

    Get the type of the Cargo.

    - -

    Return value

    - -

    #string: -The type of the Cargo.

    - -
    -
    -
    -
    - - -CARGO:IsAlive() - -
    -
    - -

    Check if cargo is alive.

    - -

    Return value

    - -

    #boolean: -true if unloaded

    - -
    -
    -
    -
    - - -CARGO:IsDeployed() - -
    -
    - -

    Is the cargo deployed

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -CARGO:IsDestroyed() - -
    -
    - -

    Check if cargo is destroyed.

    - -

    Return value

    - -

    #boolean: -true if destroyed

    - -
    -
    -
    -
    - - -CARGO:IsInZone(Zone) - -
    -
    - -

    Check if Cargo is the given Zone.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean: -true if cargo is in the Zone, false if cargo is not in the Zone.

    - -
    -
    -
    -
    - - -CARGO:IsLoaded() - -
    -
    - -

    Check if cargo is loaded.

    - -

    Return value

    - -

    #boolean: -true if loaded

    - -
    -
    -
    -
    - - -CARGO:IsNear(PointVec2, NearRadius) - -
    -
    - -

    Check if CargoCarrier is near the Cargo to be Loaded.

    - -

    Parameters

    -
      -
    • - -

      Core.Point#POINT_VEC2 PointVec2 :

      - -
    • -
    • - -

      #number NearRadius : -The radius when the cargo will board the Carrier (to avoid collision).

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -CARGO:IsUnLoaded() - -
    -
    - -

    Check if cargo is unloaded.

    - -

    Return value

    - -

    #boolean: -true if unloaded

    - -
    -
    -
    -
    - - -CARGO:Load(ToCarrier) - -
    -
    - -

    Loads the cargo to a Carrier.

    - - -

    The event will load the cargo into the Carrier regardless of its position. There will be no movement simulated of the cargo loading. -The cargo must be in the UnLoaded state.

    - -

    Parameter

    - -
    -
    -
    -
    - - #boolean - -CARGO.Moveable - -
    -
    - -

    This flag defines if the cargo is moveable.

    - -
    -
    -
    -
    - - #string - -CARGO.Name - -
    -
    - -

    A string defining the name of the cargo. The name is the unique identifier of the cargo.

    - -
    -
    -
    -
    - - #number - -CARGO.NearRadius - -
    -
    - -

    (optional) A number defining the radius in meters when the cargo is near to a Carrier, so that it can be loaded.

    - -
    -
    -
    -
    - - -CARGO:New(Type, Name, Weight, NearRadius) - -
    -
    - -

    CARGO Constructor.

    - - -

    This class is an abstract class and should not be instantiated.

    - -

    Parameters

    -
      -
    • - -

      #string Type :

      - -
    • -
    • - -

      #string Name :

      - -
    • -
    • - -

      #number Weight :

      - -
    • -
    • - -

      #number NearRadius : -(optional)

      - -
    • -
    -

    Return value

    - -

    #CARGO:

    - - -
    -
    -
    -
    - - -CARGO:OnEnterBoarding(Controllable, NearRadius) - -
    -
    - - - -

    Parameters

    - -
    -
    -
    -
    - - -CARGO:OnEnterLoaded(Controllable) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -CARGO:OnEnterUnBoarding(Controllable) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -CARGO:OnEnterUnLoaded(Controllable) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -CARGO:OnLeaveBoarding(Controllable) - -
    -
    - - - -

    Parameter

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -CARGO:OnLeaveLoaded(Controllable) - -
    -
    - - - -

    Parameter

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -CARGO:OnLeaveUnBoarding(Controllable) - -
    -
    - - - -

    Parameter

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -CARGO:OnLeaveUnLoaded(Controllable) - -
    -
    - - - -

    Parameter

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - #boolean - -CARGO.Representable - -
    -
    - -

    This flag defines if the cargo can be represented by a DCS Unit.

    - -
    -
    -
    -
    - - -CARGO:SetDeployed(Deployed) - -
    -
    - -

    Set the cargo as deployed

    - -

    Parameter

    -
      -
    • - -

      Deployed :

      - -
    • -
    -
    -
    -
    -
    - - -CARGO:SetWeight(Weight) - -
    -
    - -

    Set the weight of the cargo.

    - -

    Parameter

    -
      -
    • - -

      #number Weight : -The weight in kg.

      - -
    • -
    -

    Return value

    - -

    #CARGO:

    - - -
    -
    -
    -
    - - #boolean - -CARGO.Slingloadable - -
    -
    - -

    This flag defines if the cargo can be slingloaded.

    - -
    -
    -
    -
    - - -CARGO:Smoke(SmokeColor, Range) - -
    -
    - -

    Smoke the CARGO.

    - -

    Parameters

    -
      -
    • - -

      SmokeColor :

      - -
    • -
    • - -

      Range :

      - -
    • -
    -
    -
    -
    -
    - - -CARGO:SmokeBlue() - -
    -
    - -

    Smoke the CARGO Blue.

    - -
    -
    -
    -
    - - -CARGO:SmokeGreen() - -
    -
    - -

    Smoke the CARGO Green.

    - -
    -
    -
    -
    - - -CARGO:SmokeOrange() - -
    -
    - -

    Smoke the CARGO Orange.

    - -
    -
    -
    -
    - - -CARGO:SmokeRed() - -
    -
    - -

    Smoke the CARGO Red.

    - -
    -
    -
    -
    - - -CARGO:SmokeWhite() - -
    -
    - -

    Smoke the CARGO White.

    - -
    -
    -
    -
    - - -CARGO:Spawn(PointVec2) - -
    -
    - -

    Template method to spawn a new representation of the CARGO in the simulator.

    - -

    Parameter

    -
      -
    • - -

      PointVec2 :

      - -
    • -
    -

    Return value

    - -

    #CARGO:

    - - -
    -
    -
    -
    - - #string - -CARGO.Type - -
    -
    - -

    A string defining the type of the cargo. eg. Engineers, Equipment, Screwdrivers.

    - -
    -
    -
    -
    - - -CARGO:UnBoard(ToPointVec2) - -
    -
    - -

    UnBoards the cargo to a Carrier.

    - - -

    The event will create a movement (= running or driving) of the cargo from the Carrier. -The cargo must be in the Loaded state.

    - -

    Parameter

    -
      -
    • - -

      Core.Point#POINT_VEC2 ToPointVec2 : -(optional) @{Point#POINT_VEC2) to where the cargo should run after onboarding. If not provided, the cargo will run to 60 meters behind the Carrier location.

      - -
    • -
    -
    -
    -
    -
    - - -CARGO:UnLoad(ToPointVec2) - -
    -
    - -

    UnLoads the cargo to a Carrier.

    - - -

    The event will unload the cargo from the Carrier. There will be no movement simulated of the cargo loading. -The cargo must be in the Loaded state.

    - -

    Parameter

    -
      -
    • - -

      Core.Point#POINT_VEC2 ToPointVec2 : -(optional) @{Point#POINT_VEC2) to where the cargo will be placed after unloading. If not provided, the cargo will be placed 60 meters behind the Carrier location.

      - -
    • -
    -
    -
    -
    -
    - - #number - -CARGO.Weight - -
    -
    - -

    A number defining the weight of the cargo. The weight is expressed in kg.

    - -
    -
    -
    -
    - - -CARGO:__Board(DelaySeconds, ToCarrier, NearRadius) - -
    -
    - -

    Boards the cargo to a Carrier.

    - - -

    The event will create a movement (= running or driving) of the cargo to the Carrier. -The cargo must be in the UnLoaded state.

    - -

    Parameters

    -
      -
    • - -

      #number DelaySeconds : -The amount of seconds to delay the action.

      - -
    • -
    • - -

      Wrapper.Controllable#CONTROLLABLE ToCarrier : -The Carrier that will hold the cargo.

      - -
    • -
    • - -

      #number NearRadius : -The radius when the cargo will board the Carrier (to avoid collision).

      - -
    • -
    -
    -
    -
    -
    - - -CARGO:__Load(DelaySeconds, ToCarrier) - -
    -
    - -

    Loads the cargo to a Carrier.

    - - -

    The event will load the cargo into the Carrier regardless of its position. There will be no movement simulated of the cargo loading. -The cargo must be in the UnLoaded state.

    - -

    Parameters

    -
      -
    • - -

      #number DelaySeconds : -The amount of seconds to delay the action.

      - -
    • -
    • - -

      Wrapper.Controllable#CONTROLLABLE ToCarrier : -The Carrier that will hold the cargo.

      - -
    • -
    -
    -
    -
    -
    - - -CARGO:__UnBoard(DelaySeconds, ToPointVec2) - -
    -
    - -

    UnBoards the cargo to a Carrier.

    - - -

    The event will create a movement (= running or driving) of the cargo from the Carrier. -The cargo must be in the Loaded state.

    - -

    Parameters

    -
      -
    • - -

      #number DelaySeconds : -The amount of seconds to delay the action.

      - -
    • -
    • - -

      Core.Point#POINT_VEC2 ToPointVec2 : -(optional) @{Point#POINT_VEC2) to where the cargo should run after onboarding. If not provided, the cargo will run to 60 meters behind the Carrier location.

      - -
    • -
    -
    -
    -
    -
    - - -CARGO:__UnLoad(DelaySeconds, ToPointVec2) - -
    -
    - -

    UnLoads the cargo to a Carrier.

    - - -

    The event will unload the cargo from the Carrier. There will be no movement simulated of the cargo loading. -The cargo must be in the Loaded state.

    - -

    Parameters

    -
      -
    • - -

      #number DelaySeconds : -The amount of seconds to delay the action.

      - -
    • -
    • - -

      Core.Point#POINT_VEC2 ToPointVec2 : -(optional) @{Point#POINT_VEC2) to where the cargo will be placed after unloading. If not provided, the cargo will be placed 60 meters behind the Carrier location.

      - -
    • -
    -
    -
    - -

    Type CARGO.CargoObjects

    - -

    Type CARGO_CRATE

    - -

    Models the behaviour of cargo crates, which can be slingloaded and boarded on helicopters using the DCS menus.

    - -

    Field(s)

    -
    -
    - - - -CARGO_CRATE.CargoCarrier - -
    -
    - - - -
    -
    -
    -
    - - - -CARGO_CRATE.CargoObject - -
    -
    - - - -
    -
    -
    -
    - - -CARGO_CRATE:New(CrateName, Type, Name, Weight, ReportRadius, NearRadius, CargoCrateName) - -
    -
    - -

    CARGO_CRATE Constructor.

    - -

    Parameters

    -
      -
    • - -

      #string CrateName :

      - -
    • -
    • - -

      #string Type :

      - -
    • -
    • - -

      #string Name :

      - -
    • -
    • - -

      #number Weight :

      - -
    • -
    • - -

      #number ReportRadius : -(optional)

      - -
    • -
    • - -

      #number NearRadius : -(optional)

      - -
    • -
    • - -

      CargoCrateName :

      - -
    • -
    -

    Return value

    - -

    #CARGO_CRATE:

    - - -
    -
    -
    -
    - - -CARGO_CRATE.OnUnLoadedCallBack - -
    -
    - - - -
    -
    -
    -
    - - -CARGO_CRATE:onenterLoaded(Event, From, To, CargoCarrier) - -
    -
    - -

    Loaded State.

    - -

    Parameters

    -
      -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      Wrapper.Unit#UNIT CargoCarrier :

      - -
    • -
    -
    -
    -
    -
    - - -CARGO_CRATE:onenterUnLoaded(Event, From, To, Core, ToPointVec2) - -
    -
    - -

    Enter UnLoaded State.

    - -

    Parameters

    -
      -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      Core : -Point#POINT_VEC2

      - -
    • -
    • - -

      ToPointVec2 :

      - -
    • -
    -
    -
    - -

    Type CARGO_GROUP

    -

    Field(s)

    -
    -
    - - - -CARGO_GROUP.CargoCarrier - -
    -
    - - - - -

    self.CargoObject:Destroy()

    - -
    -
    -
    -
    - - - -CARGO_GROUP.CargoGroup - -
    -
    - - - -
    -
    -
    -
    - - - -CARGO_GROUP.CargoObject - -
    -
    - - - -
    -
    -
    -
    - - -CARGO_GROUP:GetCount() - -
    -
    - -

    Get the amount of cargo units in the group.

    - -

    Return value

    - -

    #CARGO_GROUP:

    - - -
    -
    -
    -
    - - -CARGO_GROUP:New(CargoGroup, Type, Name, ReportRadius, NearRadius) - -
    -
    - -

    CARGO_GROUP constructor.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP CargoGroup :

      - -
    • -
    • - -

      #string Type :

      - -
    • -
    • - -

      #string Name :

      - -
    • -
    • - -

      #number ReportRadius : -(optional)

      - -
    • -
    • - -

      #number NearRadius : -(optional)

      - -
    • -
    -

    Return value

    - -

    #CARGO_GROUP:

    - - -
    -
    -
    -
    - - -CARGO_GROUP:OnEventCargoDead(EventData) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -CARGO_GROUP:RespawnOnDestroyed(RespawnDestroyed) - -
    -
    - -

    Respawn the cargo when destroyed

    - -

    Parameter

    -
      -
    • - -

      #boolean RespawnDestroyed :

      - -
    • -
    -
    -
    -
    -
    - - -CARGO_GROUP:onafterBoarding(CargoCarrier, Event, From, To, NearRadius, ...) - -
    -
    - -

    Leave Boarding State.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT CargoCarrier :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      NearRadius :

      - -
    • -
    • - -

      ... :

      - -
    • -
    -
    -
    -
    -
    - - -CARGO_GROUP:onafterUnBoarding(ToPointVec2, Event, From, To, NearRadius, ...) - -
    -
    - -

    UnBoard Event.

    - -

    Parameters

    -
      -
    • - -

      Core.Point#POINT_VEC2 ToPointVec2 :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      NearRadius :

      - -
    • -
    • - -

      ... :

      - -
    • -
    -
    -
    -
    -
    - - -CARGO_GROUP:onenterBoarding(CargoCarrier, Event, From, To, NearRadius, ...) - -
    -
    - -

    Enter Boarding State.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT CargoCarrier :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      NearRadius :

      - -
    • -
    • - -

      ... :

      - -
    • -
    -
    -
    -
    -
    - - -CARGO_GROUP:onenterDestroyed() - -
    -
    - - - -
    -
    -
    -
    - - -CARGO_GROUP:onenterLoaded(CargoCarrier, Event, From, To, ...) - -
    -
    - -

    Enter Loaded State.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT CargoCarrier :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      ... :

      - -
    • -
    -
    -
    -
    -
    - - -CARGO_GROUP:onenterUnBoarding(ToPointVec2, Event, From, To, NearRadius, ...) - -
    -
    - -

    Enter UnBoarding State.

    - -

    Parameters

    -
      -
    • - -

      Core.Point#POINT_VEC2 ToPointVec2 :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      NearRadius :

      - -
    • -
    • - -

      ... :

      - -
    • -
    -
    -
    -
    -
    - - -CARGO_GROUP:onenterUnLoaded(Core, Event, From, To, ToPointVec2, ...) - -
    -
    - -

    Enter UnLoaded State.

    - -

    Parameters

    -
      -
    • - -

      Core : -Point#POINT_VEC2

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      ToPointVec2 :

      - -
    • -
    • - -

      ... :

      - -
    • -
    -
    -
    -
    -
    - - -CARGO_GROUP:onleaveUnBoarding(ToPointVec2, Event, From, To, NearRadius, ...) - -
    -
    - -

    Leave UnBoarding State.

    - -

    Parameters

    -
      -
    • - -

      Core.Point#POINT_VEC2 ToPointVec2 :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      NearRadius :

      - -
    • -
    • - -

      ... :

      - -
    • -
    -
    -
    - -

    Type CARGO_PACKAGE

    -

    Field(s)

    -
    -
    - - - -CARGO_PACKAGE.CargoCarrier - -
    -
    - - - -
    -
    -
    -
    - - - -CARGO_PACKAGE.CargoInAir - -
    -
    - - - -
    -
    -
    -
    - - #string - -CARGO_PACKAGE.ClassName - -
    -
    - - - -
    -
    -
    -
    - - -CARGO_PACKAGE:IsNear(CargoCarrier) - -
    -
    - -

    Check if CargoCarrier is near the Cargo to be Loaded.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -CARGO_PACKAGE:New(CargoCarrier, Type, Name, Weight, ReportRadius, NearRadius) - -
    -
    - -

    CARGO_PACKAGE Constructor.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT CargoCarrier : -The UNIT carrying the package.

      - -
    • -
    • - -

      #string Type :

      - -
    • -
    • - -

      #string Name :

      - -
    • -
    • - -

      #number Weight :

      - -
    • -
    • - -

      #number ReportRadius : -(optional)

      - -
    • -
    • - -

      #number NearRadius : -(optional)

      - -
    • -
    -

    Return value

    - -

    #CARGO_PACKAGE:

    - - -
    -
    -
    -
    - - -CARGO_PACKAGE:onafterLoad(Event, From, To, CargoCarrier, Speed, LoadDistance, Angle) - -
    -
    - -

    Load Event.

    - -

    Parameters

    -
      -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      Wrapper.Unit#UNIT CargoCarrier :

      - -
    • -
    • - -

      #number Speed :

      - -
    • -
    • - -

      #number LoadDistance :

      - -
    • -
    • - -

      #number Angle :

      - -
    • -
    -
    -
    -
    -
    - - -CARGO_PACKAGE:onafterOnBoard(Event, From, To, CargoCarrier, Speed, BoardDistance, Angle, LoadDistance) - -
    -
    - -

    Board Event.

    - -

    Parameters

    -
      -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      Wrapper.Unit#UNIT CargoCarrier :

      - -
    • -
    • - -

      #number Speed :

      - -
    • -
    • - -

      #number BoardDistance :

      - -
    • -
    • - -

      #number Angle :

      - -
    • -
    • - -

      LoadDistance :

      - -
    • -
    -
    -
    -
    -
    - - -CARGO_PACKAGE:onafterOnBoarded(Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle) - -
    -
    - -

    Boarded Event.

    - -

    Parameters

    -
      -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      Wrapper.Unit#UNIT CargoCarrier :

      - -
    • -
    • - -

      Speed :

      - -
    • -
    • - -

      BoardDistance :

      - -
    • -
    • - -

      LoadDistance :

      - -
    • -
    • - -

      Angle :

      - -
    • -
    -
    -
    -
    -
    - - -CARGO_PACKAGE:onafterUnBoard(Event, From, To, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle, CargoCarrier) - -
    -
    - -

    UnBoard Event.

    - -

    Parameters

    -
      -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number Speed :

      - -
    • -
    • - -

      #number UnLoadDistance :

      - -
    • -
    • - -

      #number UnBoardDistance :

      - -
    • -
    • - -

      #number Radius :

      - -
    • -
    • - -

      #number Angle :

      - -
    • -
    • - -

      CargoCarrier :

      - -
    • -
    -
    -
    -
    -
    - - -CARGO_PACKAGE:onafterUnBoarded(Event, From, To, CargoCarrier, Speed) - -
    -
    - -

    UnBoarded Event.

    - -

    Parameters

    -
      -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      Wrapper.Unit#UNIT CargoCarrier :

      - -
    • -
    • - -

      Speed :

      - -
    • -
    -
    -
    -
    -
    - - -CARGO_PACKAGE:onafterUnLoad(Event, From, To, Distance, Angle, CargoCarrier, Speed) - -
    -
    - -

    UnLoad Event.

    - -

    Parameters

    -
      -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      #number Distance :

      - -
    • -
    • - -

      #number Angle :

      - -
    • -
    • - -

      CargoCarrier :

      - -
    • -
    • - -

      Speed :

      - -
    • -
    -
    -
    - -

    Type CARGO_REPORTABLE

    -

    Field(s)

    -
    -
    - - - -CARGO_REPORTABLE.CargoObject - -
    -
    - - - -
    -
    -
    -
    - - Core.Set#SET_CARGO - -CARGO_REPORTABLE.CargoSet - -
    -
    - - - -
    -
    -
    -
    - - #string - -CARGO_REPORTABLE.ClassName - -
    -
    - - - -
    -
    -
    -
    - - -CARGO_REPORTABLE:GetBoardingRange() - -
    -
    - -

    Get the range till cargo will board.

    - -

    Return value

    - -

    #number: -The range till cargo will board.

    - -
    -
    -
    -
    - - -CARGO_REPORTABLE:IsInRadius(PointVec2) - -
    -
    - -

    Check if CargoCarrier is in the ReportRadius for the Cargo to be Loaded.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -CARGO_REPORTABLE:MessageToGroup(Message, TaskGroup, Name) - -
    -
    - -

    Send a CC message to a GROUP.

    - -

    Parameters

    -
      -
    • - -

      #string Message :

      - -
    • -
    • - -

      Wrapper.Group#GROUP TaskGroup :

      - -
    • -
    • - -

      #sring Name : -(optional) The name of the Group used as a prefix for the message to the Group. If not provided, there will be nothing shown.

      - -
    • -
    -
    -
    -
    -
    - - -CARGO_REPORTABLE:New(CargoObject, Type, Name, Weight, ReportRadius, NearRadius) - -
    -
    - -

    CARGO_REPORTABLE Constructor.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#Controllable CargoObject :

      - -
    • -
    • - -

      #string Type :

      - -
    • -
    • - -

      #string Name :

      - -
    • -
    • - -

      #number Weight :

      - -
    • -
    • - -

      #number ReportRadius : -(optional)

      - -
    • -
    • - -

      #number NearRadius : -(optional)

      - -
    • -
    -

    Return value

    - -

    #CARGO_REPORTABLE:

    - - -
    -
    -
    -
    - - -CARGO_REPORTABLE.ReportRadius - -
    -
    - - - -
    -
    -
    -
    - - -CARGO_REPORTABLE:Respawn() - -
    -
    - -

    Respawn the cargo.

    - -
    -
    - -

    Type CARGO_REPRESENTABLE

    -

    Field(s)

    -
    -
    - - -CARGO_REPRESENTABLE:Destroy() - -
    -
    - -

    CARGO_REPRESENTABLE Destructor.

    - -

    Return value

    - -

    #CARGO_REPRESENTABLE:

    - - -
    -
    -
    -
    - - -CARGO_REPRESENTABLE:New(Type, Name, Weight, ReportRadius, NearRadius, CargoObject) - -
    -
    - -

    CARGO_REPRESENTABLE Constructor.

    - -

    Parameters

    -
      -
    • - -

      #string Type :

      - -
    • -
    • - -

      #string Name :

      - -
    • -
    • - -

      #number Weight :

      - -
    • -
    • - -

      #number ReportRadius : -(optional)

      - -
    • -
    • - -

      #number NearRadius : -(optional)

      - -
    • -
    • - -

      CargoObject :

      - -
    • -
    -

    Return value

    - -

    #CARGO_REPRESENTABLE:

    - - -
    -
    -
    -
    - - -CARGO_REPRESENTABLE:RouteTo(ToPointVec2, Speed) - -
    -
    - -

    Route a cargo unit to a PointVec2.

    - -

    Parameters

    - -

    Return value

    - -

    #CARGO_REPRESENTABLE:

    - - -
    -
    -
    -
    - - -CARGO_REPRESENTABLE.test - -
    -
    - - - -
    -
    - -

    Type CARGO_UNIT

    - -

    Models CARGO in the form of units, which can be boarded, unboarded, loaded, unloaded.

    - -

    Field(s)

    -
    -
    - - -CARGO_UNIT.CargoCarrier - -
    -
    - - - -
    -
    -
    -
    - - - -CARGO_UNIT.CargoInAir - -
    -
    - - - -
    -
    -
    -
    - - - -CARGO_UNIT.CargoObject - -
    -
    - - - -
    -
    -
    -
    - - -CARGO_UNIT:New(CargoUnit, Type, Name, Weight, ReportRadius, NearRadius) - -
    -
    - -

    CARGO_UNIT Constructor.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT CargoUnit :

      - -
    • -
    • - -

      #string Type :

      - -
    • -
    • - -

      #string Name :

      - -
    • -
    • - -

      #number Weight :

      - -
    • -
    • - -

      #number ReportRadius : -(optional)

      - -
    • -
    • - -

      #number NearRadius : -(optional)

      - -
    • -
    -

    Return value

    - -

    #CARGO_UNIT:

    - - -
    -
    -
    -
    - - -CARGO_UNIT.OnUnLoadedCallBack - -
    -
    - - - -
    -
    -
    -
    - - -CARGO_UNIT.RunCount - -
    -
    - - - -
    -
    -
    -
    - - -CARGO_UNIT:onafterBoard(Event, From, To, CargoCarrier, NearRadius, ...) - -
    -
    - -

    Board Event.

    - -

    Parameters

    -
      -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      CargoCarrier :

      - -
    • -
    • - -

      NearRadius :

      - -
    • -
    • - -

      ... :

      - -
    • -
    -
    -
    -
    -
    - - -CARGO_UNIT:onafterBoarding(Event, From, To, CargoCarrier, NearRadius, ...) - -
    -
    - -

    Boarding Event.

    - -

    Parameters

    -
      -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      Wrapper.Unit#UNIT CargoCarrier :

      - -
    • -
    • - -

      #number NearRadius :

      - -
    • -
    • - -

      ... :

      - -
    • -
    -
    -
    -
    -
    - - -CARGO_UNIT:onafterUnBoarding(Event, From, To, ToPointVec2, NearRadius) - -
    -
    - -

    UnBoard Event.

    - -

    Parameters

    -
      -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      Core.Point#POINT_VEC2 ToPointVec2 :

      - -
    • -
    • - -

      NearRadius :

      - -
    • -
    -
    -
    -
    -
    - - -CARGO_UNIT:onenterBoarding(Event, From, To, CargoCarrier, NearRadius, ...) - -
    -
    - -

    Enter Boarding State.

    - -

    Parameters

    -
      -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      Wrapper.Unit#UNIT CargoCarrier :

      - -
    • -
    • - -

      NearRadius :

      - -
    • -
    • - -

      ... :

      - -
    • -
    -
    -
    -
    -
    - - -CARGO_UNIT:onenterLoaded(Event, From, To, CargoCarrier) - -
    -
    - -

    Loaded State.

    - -

    Parameters

    -
      -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      Wrapper.Unit#UNIT CargoCarrier :

      - -
    • -
    -
    -
    -
    -
    - - -CARGO_UNIT:onenterUnBoarding(Event, From, To, ToPointVec2, NearRadius) - -
    -
    - -

    Enter UnBoarding State.

    - -

    Parameters

    -
      -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      Core.Point#POINT_VEC2 ToPointVec2 :

      - -
    • -
    • - -

      NearRadius :

      - -
    • -
    -
    -
    -
    -
    - - -CARGO_UNIT:onenterUnLoaded(Event, From, To, Core, ToPointVec2) - -
    -
    - -

    Enter UnLoaded State.

    - -

    Parameters

    -
      -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      Core : -Point#POINT_VEC2

      - -
    • -
    • - -

      ToPointVec2 :

      - -
    • -
    -
    -
    -
    -
    - - -CARGO_UNIT:onleaveUnBoarding(Event, From, To, ToPointVec2, NearRadius) - -
    -
    - -

    Leave UnBoarding State.

    - -

    Parameters

    -
      -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      Core.Point#POINT_VEC2 ToPointVec2 :

      - -
    • -
    • - -

      NearRadius :

      - -
    • -
    -
    -
    - -

    Type sring

    - -
    - -
    - - diff --git a/docs/Documentation/CleanUp.html b/docs/Documentation/CleanUp.html deleted file mode 100644 index 6338da226..000000000 --- a/docs/Documentation/CleanUp.html +++ /dev/null @@ -1,436 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module CleanUp

    - -

    Functional -- The CLEANUP_AIRBASE class keeps an area clean of crashing or colliding airplanes.

    - - -

    It also prevents airplanes from firing within this area.

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - -
    CLEANUP_AIRBASE -

    CLEANUP_AIRBASE, extends Base#BASE

    - -

    Banner Image

    - -

    The CLEANUP_AIRBASE class keeps airbases clean, and tries to guarantee continuous airbase operations, even under combat.

    -
    -

    Type CLEANUP_AIRBASE

    - - - - - - - - - - - - - - - - - - - - - -
    CLEANUP_AIRBASE:AddAirbase(AirbaseName) -

    Adds an airbase to the airbase validation list.

    -
    CLEANUP_AIRBASE:New(<, AirbaseNames) -

    Creates the main object which is handling the cleaning of the debris within the given Zone Names.

    -
    CLEANUP_AIRBASE:RemoveAirbase(AirbaseName) -

    Removes an airbase from the airbase validation list.

    -
    CLEANUP_AIRBASE:SetCleanMissiles(CleanMissiles) -

    Enables or disables the cleaning of missiles within the airbase zones.

    -
    CLEANUP_AIRBASE.__ - -
    - -

    Type CLEANUP_AIRBASE.__

    - - - - - -
    CLEANUP_AIRBASE.__.< -

    string,Wrapper.Airbase#AIRBASE> Airbases Map of Airbases.

    -
    - -

    Global(s)

    -
    -
    - - #CLEANUP_AIRBASE - -CLEANUP_AIRBASE - -
    -
    - -

    CLEANUP_AIRBASE, extends Base#BASE

    - -

    Banner Image

    - -

    The CLEANUP_AIRBASE class keeps airbases clean, and tries to guarantee continuous airbase operations, even under combat.

    - - -

    Specific airbases need to be provided that need to be guarded. Each airbase registered, will be guarded within a zone of 8 km around the airbase. -Any unit that fires a missile, or shoots within the zone of an airbase, will be monitored by CLEANUP_AIRBASE. -Within the 8km zone, units cannot fire any missile, which prevents the airbase runway to receive missile or bomb hits. -Any airborne or ground unit that is on the runway below 30 meters (default value) will be automatically removed if it is damaged.

    - -

    This is not a full 100% secure implementation. It is still possible that CLEANUP_AIRBASE cannot prevent (in-time) to keep the airbase clean. -The following situations may happen that will still stop the runway of an airbase:

    - -
      -
    • A damaged unit is not removed on time when above the runway, and crashes on the runway.
    • -
    • A bomb or missile is still able to dropped on the runway.
    • -
    • Units collide on the airbase, and could not be removed on time.
    • -
    - -

    When a unit is within the airbase zone and needs to be monitored, -its status will be checked every 0.25 seconds! This is required to ensure that the airbase is kept clean. -But as a result, there is more CPU overload.

    - -

    So as an advise, I suggest you use the CLEANUP_AIRBASE class with care:

    - -
      -
    • Only monitor airbases that really need to be monitored!
    • -
    • Try not to monitor airbases that are likely to be invaded by enemy troops. - For these airbases, there is little use to keep them clean, as they will be invaded anyway...
    • -
    - -

    By following the above guidelines, you can add airbase cleanup with acceptable CPU overhead.

    - -

    1. CLEANUP_AIRBASE Constructor

    - -

    Creates the main object which is preventing the airbase to get polluted with debris on the runway, which halts the airbase.

    - -
     -- Clean these Zones.
    - CleanUpAirports = CLEANUP_AIRBASE:New( { AIRBASE.Caucasus.Tbilisi, AIRBASE.Caucasus.Kutaisi )
    -
    - -- or
    - CleanUpTbilisi = CLEANUP_AIRBASE:New( AIRBASE.Caucasus.Tbilisi )
    - CleanUpKutaisi = CLEANUP_AIRBASE:New( AIRBASE.Caucasus.Kutaisi )
    -
    - -

    2. Add or Remove airbases

    - -

    The method CLEANUP_AIRBASE.AddAirbase() to add an airbase to the cleanup validation process. -The method CLEANUP_AIRBASE.RemoveAirbase() removes an airbase from the cleanup validation process.

    - -

    3. Clean missiles and bombs within the airbase zone.

    - -

    When missiles or bombs hit the runway, the airbase operations stop. -Use the method CLEANUP_AIRBASE.SetCleanMissiles() to control the cleaning of missiles, which will prevent airbases to stop. -Note that this method will not allow anymore airbases to be attacked, so there is a trade-off here to do.

    - - -
    -
    -

    Type CleanUp

    - -

    Type CLEANUP_AIRBASE

    -

    Field(s)

    -
    -
    - - -CLEANUP_AIRBASE:AddAirbase(AirbaseName) - -
    -
    - -

    Adds an airbase to the airbase validation list.

    - -

    Parameter

    -
      -
    • - -

      #string AirbaseName :

      - -
    • -
    -

    Return value

    - -

    #CLEANUP_AIRBASE:

    - - -
    -
    -
    -
    - - -CLEANUP_AIRBASE:New(<, AirbaseNames) - -
    -
    - -

    Creates the main object which is handling the cleaning of the debris within the given Zone Names.

    - -

    Parameters

    -
      -
    • - -

      #list < : -string> AirbaseNames Is a table of airbase names where the debris should be cleaned. Also a single string can be passed with one airbase name.

      - -
    • -
    • - -

      AirbaseNames :

      - -
    • -
    -

    Return value

    - -

    #CLEANUP_AIRBASE:

    - - -

    Usage:

    -
     -- Clean these Zones.
    -CleanUpAirports = CLEANUP_AIRBASE:New( { AIRBASE.Caucasus.Tbilisi, AIRBASE.Caucasus.Kutaisi )
    -or
    -CleanUpTbilisi = CLEANUP_AIRBASE:New( AIRBASE.Caucasus.Tbilisi )
    -CleanUpKutaisi = CLEANUP_AIRBASE:New( AIRBASE.Caucasus.Kutaisi )
    - -
    -
    -
    -
    - - -CLEANUP_AIRBASE:RemoveAirbase(AirbaseName) - -
    -
    - -

    Removes an airbase from the airbase validation list.

    - -

    Parameter

    -
      -
    • - -

      #string AirbaseName :

      - -
    • -
    -

    Return value

    - -

    #CLEANUP_AIRBASE:

    - - -
    -
    -
    -
    - - -CLEANUP_AIRBASE:SetCleanMissiles(CleanMissiles) - -
    -
    - -

    Enables or disables the cleaning of missiles within the airbase zones.

    - - -

    Airbase operations stop when a missile or bomb is dropped at a runway. -Note that when this method is used, the airbase operations won't stop if -the missile or bomb was cleaned within the airbase zone, which is 8km from the center of the airbase. -However, there is a trade-off to make. Attacks on airbases won't be possible anymore if this method is used. -Note, one can also use the method CLEANUP_AIRBASE.RemoveAirbase() to remove the airbase from the control process as a whole, -when an enemy unit is near. That is also an option...

    - -

    Parameter

    -
      -
    • - -

      #string CleanMissiles : -(Default=true) If true, missiles fired are immediately destroyed. If false missiles are not controlled.

      - -
    • -
    -

    Return value

    - -

    #CLEANUP_AIRBASE:

    - - -
    -
    -
    -
    - - - -CLEANUP_AIRBASE.__ - -
    -
    - - - - -

    @field #CLEANUPAIRBASE._

    - -
    -
    - -

    Type CLEANUP_AIRBASE.__

    -

    Field(s)

    -
    -
    - - #map - -CLEANUP_AIRBASE.__.< - -
    -
    - -

    string,Wrapper.Airbase#AIRBASE> Airbases Map of Airbases.

    - -
    -
    - -

    Type CLEANUP_AIRBASE.__.Airbases

    - -

    Type list

    - -

    Type map

    - -
    - -
    - - diff --git a/docs/Documentation/Client.html b/docs/Documentation/Client.html deleted file mode 100644 index 4176d7720..000000000 --- a/docs/Documentation/Client.html +++ /dev/null @@ -1,1045 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Client

    - -

    Wrapper -- CLIENT wraps DCS Unit objects acting as a Client or Player within a mission.

    - - - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - -
    CLIENT -

    CLIENT class, extends Unit#UNIT

    - -

    Clients are those Units defined within the Mission Editor that have the skillset defined as Client or Player.

    -
    -

    Type CLIENT

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    CLIENT:AddBriefing(ClientBriefing) -

    AddBriefing adds a briefing to a CLIENT when a player joins a mission.

    -
    CLIENT:Alive(CallBackFunction, ...) -

    Checks for a client alive event and calls a function on a continuous basis.

    -
    CLIENT.ClientAlive2 - -
    CLIENT.ClientBriefing - -
    CLIENT.ClientBriefingShown - -
    CLIENT.ClientCallBack - -
    CLIENT.ClientGroupID - -
    CLIENT.ClientGroupName - -
    CLIENT.ClientGroupUnit - -
    CLIENT.ClientParameters - -
    CLIENT.ClientTransport - -
    CLIENT:Find(ClientName, ClientBriefing, DCSUnit, Error) -

    Finds a CLIENT from the _DATABASE using the relevant DCS Unit.

    -
    CLIENT:FindByName(ClientName, ClientBriefing, Error) -

    Finds a CLIENT from the _DATABASE using the relevant Client Unit Name.

    -
    CLIENT:GetClientGroupDCSUnit() -

    Returns the DCSUnit of the CLIENT.

    -
    CLIENT:GetClientGroupID() - -
    CLIENT:GetClientGroupName() -

    Get the name of the group of the client.

    -
    CLIENT:GetClientGroupUnit() -

    Returns the UNIT of the CLIENT.

    -
    CLIENT:GetDCSGroup() -

    Return the DCSGroup of a Client.

    -
    CLIENT:IsMultiSeated() -

    Checks if the CLIENT is a multi-seated UNIT.

    -
    CLIENT:IsTransport() -

    Evaluates if the CLIENT is a transport.

    -
    CLIENT:Message(Message, MessageDuration, MessageCategory, MessageInterval, MessageID) -

    The main message driver for the CLIENT.

    -
    CLIENT:Register(ClientName) - -
    CLIENT:Reset(ClientName) -

    Resets a CLIENT.

    -
    CLIENT:ShowBriefing() -

    Show the briefing of a CLIENT.

    -
    CLIENT:ShowCargo() -

    Shows the AI_Cargo#CARGO contained within the CLIENT to the player as a message.

    -
    CLIENT:ShowMissionBriefing(MissionBriefing) -

    Show the mission briefing of a MISSION to the CLIENT.

    -
    CLIENT.SwitchMessages(PrmTable) - -
    CLIENT:Transport() -

    Transport defines that the Client is a Transport.

    -
    CLIENT:_AliveCheckScheduler(SchedulerName) - -
    CLIENT._Menus - -
    - -

    Global(s)

    -
    -
    - - #CLIENT - -CLIENT - -
    -
    - -

    CLIENT class, extends Unit#UNIT

    - -

    Clients are those Units defined within the Mission Editor that have the skillset defined as Client or Player.

    - - -

    Note that clients are NOT the same as Units, they are NOT necessarily alive. -The CLIENT class is a wrapper class to handle the DCS Unit objects that have the skillset defined as Client or Player:

    - -
      -
    • Wraps the DCS Unit objects with skill level set to Player or Client.
    • -
    • Support all DCS Unit APIs.
    • -
    • Enhance with Unit specific APIs not in the DCS Group API set.
    • -
    • When player joins Unit, execute alive init logic.
    • -
    • Handles messages to players.
    • -
    • Manage the "state" of the DCS Unit.
    • -
    - -

    Clients are being used by the MISSION class to follow players and register their successes.

    - -

    CLIENT reference methods

    - -

    For each DCS Unit having skill level Player or Client, a CLIENT wrapper object (instance) will be created within the _DATABASE object. -This is done at the beginning of the mission (when the mission starts).

    - -

    The CLIENT class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference -using the DCS Unit or the DCS UnitName.

    - -

    Another thing to know is that CLIENT objects do not "contain" the DCS Unit object. -The CLIENT methods will reference the DCS Unit object by name when it is needed during API execution. -If the DCS Unit object does not exist or is nil, the CLIENT methods will return nil and log an exception in the DCS.log file.

    - -

    The CLIENT class provides the following functions to retrieve quickly the relevant CLIENT instance:

    - -
      -
    • CLIENT.Find(): Find a CLIENT instance from the _DATABASE object using a DCS Unit object.
    • -
    • CLIENT.FindByName(): Find a CLIENT instance from the _DATABASE object using a DCS Unit name.
    • -
    - -

    IMPORTANT: ONE SHOULD NEVER SANATIZE these CLIENT OBJECT REFERENCES! (make the CLIENT object references nil).

    - - -
    -
    -

    Type Client

    - -

    Type CLIENT

    - -

    The CLIENT class

    - -

    Field(s)

    -
    -
    - - -CLIENT:AddBriefing(ClientBriefing) - -
    -
    - -

    AddBriefing adds a briefing to a CLIENT when a player joins a mission.

    - -

    Parameter

    -
      -
    • - -

      #string ClientBriefing : -is the text defining the Mission briefing.

      - -
    • -
    -

    Return value

    - -

    #CLIENT: -self

    - -
    -
    -
    -
    - - -CLIENT:Alive(CallBackFunction, ...) - -
    -
    - -

    Checks for a client alive event and calls a function on a continuous basis.

    - -

    Parameters

    -
      -
    • - -

      #function CallBackFunction : -Create a function that will be called when a player joins the slot.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #CLIENT:

    - - -
    -
    -
    -
    - - #boolean - -CLIENT.ClientAlive2 - -
    -
    - - - -
    -
    -
    -
    - - - -CLIENT.ClientBriefing - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -CLIENT.ClientBriefingShown - -
    -
    - - - -
    -
    -
    -
    - - - -CLIENT.ClientCallBack - -
    -
    - - - -
    -
    -
    -
    - - - -CLIENT.ClientGroupID - -
    -
    - - - -
    -
    -
    -
    - - - -CLIENT.ClientGroupName - -
    -
    - - - -
    -
    -
    -
    - - -CLIENT.ClientGroupUnit - -
    -
    - - - -
    -
    -
    -
    - - - -CLIENT.ClientParameters - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -CLIENT.ClientTransport - -
    -
    - - - -
    -
    -
    -
    - - -CLIENT:Find(ClientName, ClientBriefing, DCSUnit, Error) - -
    -
    - -

    Finds a CLIENT from the _DATABASE using the relevant DCS Unit.

    - -

    Parameters

    -
      -
    • - -

      #string ClientName : -Name of the DCS Unit as defined within the Mission Editor.

      - -
    • -
    • - -

      #string ClientBriefing : -Text that describes the briefing of the mission when a Player logs into the Client.

      - -
    • -
    • - -

      DCSUnit :

      - -
    • -
    • - -

      Error :

      - -
    • -
    -

    Return value

    - -

    #CLIENT:

    - - -

    Usage:

    -
    -- Create new Clients.
    - local Mission = MISSIONSCHEDULER.AddMission( 'Russia Transport Troops SA-6', 'Operational', 'Transport troops from the control center to one of the SA-6 SAM sites to activate their operation.', 'Russia' )
    - Mission:AddGoal( DeploySA6TroopsGoal )
    -
    - Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*HOT-Deploy Troops 1' ):Transport() )
    - Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*RAMP-Deploy Troops 3' ):Transport() )
    - Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*HOT-Deploy Troops 2' ):Transport() )
    - Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*RAMP-Deploy Troops 4' ):Transport() )
    - -
    -
    -
    -
    - - -CLIENT:FindByName(ClientName, ClientBriefing, Error) - -
    -
    - -

    Finds a CLIENT from the _DATABASE using the relevant Client Unit Name.

    - - -

    As an optional parameter, a briefing text can be given also.

    - -

    Parameters

    -
      -
    • - -

      #string ClientName : -Name of the DCS Unit as defined within the Mission Editor.

      - -
    • -
    • - -

      #string ClientBriefing : -Text that describes the briefing of the mission when a Player logs into the Client.

      - -
    • -
    • - -

      #boolean Error : -A flag that indicates whether an error should be raised if the CLIENT cannot be found. By default an error will be raised.

      - -
    • -
    -

    Return value

    - -

    #CLIENT:

    - - -

    Usage:

    -
    -- Create new Clients.
    -	local Mission = MISSIONSCHEDULER.AddMission( 'Russia Transport Troops SA-6', 'Operational', 'Transport troops from the control center to one of the SA-6 SAM sites to activate their operation.', 'Russia' )
    -	Mission:AddGoal( DeploySA6TroopsGoal )
    -
    -	Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*HOT-Deploy Troops 1' ):Transport() )
    -	Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*RAMP-Deploy Troops 3' ):Transport() )
    -	Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*HOT-Deploy Troops 2' ):Transport() )
    -	Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*RAMP-Deploy Troops 4' ):Transport() )
    - -
    -
    -
    -
    - - -CLIENT:GetClientGroupDCSUnit() - -
    -
    - -

    Returns the DCSUnit of the CLIENT.

    - -

    Return value

    - -

    Dcs.DCSTypes#Unit:

    - - -
    -
    -
    -
    - - -CLIENT:GetClientGroupID() - -
    -
    - - - - -

    TODO: Check Dcs.DCSTypes#Group.ID -- Get the group ID of the client. - @param #CLIENT self - @return Dcs.DCSTypes#Group.ID

    - -
    -
    -
    -
    - - -CLIENT:GetClientGroupName() - -
    -
    - -

    Get the name of the group of the client.

    - -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -CLIENT:GetClientGroupUnit() - -
    -
    - -

    Returns the UNIT of the CLIENT.

    - -

    Return value

    - -

    Wrapper.Unit#UNIT:

    - - -
    -
    -
    -
    - - -CLIENT:GetDCSGroup() - -
    -
    - -

    Return the DCSGroup of a Client.

    - - -

    This function is modified to deal with a couple of bugs in DCS 1.5.3

    - -

    Return value

    - -

    Dcs.DCSWrapper.Group#Group:

    - - -
    -
    -
    -
    - - -CLIENT:IsMultiSeated() - -
    -
    - -

    Checks if the CLIENT is a multi-seated UNIT.

    - -

    Return value

    - -

    #boolean: -true if multi-seated.

    - -
    -
    -
    -
    - - -CLIENT:IsTransport() - -
    -
    - -

    Evaluates if the CLIENT is a transport.

    - -

    Return value

    - -

    #boolean: -true is a transport.

    - -
    -
    -
    -
    - - -CLIENT:Message(Message, MessageDuration, MessageCategory, MessageInterval, MessageID) - -
    -
    - -

    The main message driver for the CLIENT.

    - - -

    This function displays various messages to the Player logged into the CLIENT through the DCS World Messaging system.

    - -

    Parameters

    -
      -
    • - -

      #string Message : -is the text describing the message.

      - -
    • -
    • - -

      #number MessageDuration : -is the duration in seconds that the Message should be displayed.

      - -
    • -
    • - -

      #string MessageCategory : -is the category of the message (the title).

      - -
    • -
    • - -

      #number MessageInterval : -is the interval in seconds between the display of the Message#MESSAGE when the CLIENT is in the air.

      - -
    • -
    • - -

      #string MessageID : -is the identifier of the message when displayed with intervals.

      - -
    • -
    -
    -
    -
    -
    - - -CLIENT:Register(ClientName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      ClientName :

      - -
    • -
    -
    -
    -
    -
    - - -CLIENT:Reset(ClientName) - -
    -
    - -

    Resets a CLIENT.

    - -

    Parameter

    -
      -
    • - -

      #string ClientName : -Name of the Group as defined within the Mission Editor. The Group must have a Unit with the type Client.

      - -
    • -
    -
    -
    -
    -
    - - -CLIENT:ShowBriefing() - -
    -
    - -

    Show the briefing of a CLIENT.

    - -

    Return value

    - -

    #CLIENT: -self

    - -
    -
    -
    -
    - - -CLIENT:ShowCargo() - -
    -
    - -

    Shows the AI_Cargo#CARGO contained within the CLIENT to the player as a message.

    - - -

    The AI_Cargo#CARGO is shown using the Message#MESSAGE distribution system.

    - -
    -
    -
    -
    - - -CLIENT:ShowMissionBriefing(MissionBriefing) - -
    -
    - -

    Show the mission briefing of a MISSION to the CLIENT.

    - -

    Parameter

    -
      -
    • - -

      #string MissionBriefing :

      - -
    • -
    -

    Return value

    - -

    #CLIENT: -self

    - -
    -
    -
    -
    - - -CLIENT.SwitchMessages(PrmTable) - -
    -
    - - - - -

    TODO (1) I urgently need to revise this. -- A local function called by the DCS World Menu system to switch off messages.

    - -

    Parameter

    -
      -
    • - -

      PrmTable :

      - -
    • -
    -
    -
    -
    -
    - - -CLIENT:Transport() - -
    -
    - -

    Transport defines that the Client is a Transport.

    - - -

    Transports show cargo.

    - -

    Return value

    - -

    #CLIENT:

    - - -
    -
    -
    -
    - - -CLIENT:_AliveCheckScheduler(SchedulerName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      SchedulerName :

      - -
    • -
    -
    -
    -
    -
    - - - -CLIENT._Menus - -
    -
    - - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/CommandCenter.html b/docs/Documentation/CommandCenter.html deleted file mode 100644 index 67b9ecc2d..000000000 --- a/docs/Documentation/CommandCenter.html +++ /dev/null @@ -1,932 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module CommandCenter

    - -

    Tasking -- A COMMANDCENTER is the owner of multiple missions within MOOSE.

    - - -

    A COMMANDCENTER governs multiple missions, the tasking and the reporting.

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - -
    COMMANDCENTER -

    COMMANDCENTER class, extends Base#BASE

    - -

    The COMMANDCENTER class governs multiple missions, the tasking and the reporting.

    -
    -

    Type COMMANDCENTER

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    COMMANDCENTER:AddMission(Mission) -

    Add a MISSION to be governed by the HQ command center.

    -
    COMMANDCENTER.CommandCenterCoalition - -
    COMMANDCENTER.CommandCenterMenu - -
    COMMANDCENTER.CommunicationMode - -
    COMMANDCENTER:GetMenu() -

    Gets the commandcenter menu structure governed by the HQ command center.

    -
    COMMANDCENTER:GetMissions() -

    Get the Missions governed by the HQ command center.

    -
    COMMANDCENTER:GetName() -

    Gets the name of the HQ command center.

    -
    COMMANDCENTER:GetPositionable() -

    Gets the POSITIONABLE of the HQ command center.

    -
    COMMANDCENTER.HQ - -
    COMMANDCENTER:HasGroup(Wrapper, MissionGroup) -

    Checks of the COMMANDCENTER has a GROUP.

    -
    COMMANDCENTER:IsModeWWII() -

    Returns if the commandcenter operations is in WWII mode

    -
    COMMANDCENTER:MessageToAll(Message) -

    Send a CC message to the coalition of the CC.

    -
    COMMANDCENTER:MessageToCoalition(Message) -

    Send a CC message to the coalition of the CC.

    -
    COMMANDCENTER:MessageToGroup(Message, TaskGroup) -

    Send a CC message to a GROUP.

    -
    COMMANDCENTER:MessageTypeToCoalition(Message, MessageType) -

    Send a CC message of a specified type to the coalition of the CC.

    -
    COMMANDCENTER:MessageTypeToGroup(Message, TaskGroup, MessageType) -

    Send a CC message of a specified type to a GROUP.

    -
    COMMANDCENTER:New(CommandCenterPositionable, CommandCenterName) -

    The constructor takes an IDENTIFIABLE as the HQ command center.

    -
    COMMANDCENTER:RemoveMission(Mission) -

    Removes a MISSION to be governed by the HQ command center.

    -
    COMMANDCENTER:ReportDetails(ReportGroup, Task) -

    Report the status of a Task to a Group.

    -
    COMMANDCENTER:ReportMissionsPlayers(ReportGroup) -

    Report the players of all MISSIONs to a GROUP.

    -
    COMMANDCENTER:ReportMissionsStatus(ReportGroup) -

    Report the status of all MISSIONs to a GROUP.

    -
    COMMANDCENTER:SetMenu() -

    Sets the menu structure of the Missions governed by the HQ command center.

    -
    COMMANDCENTER:SetModeWWII() -

    Set the commandcenter operations in WWII mode -This will disable LL, MGRS, BRA, BULLS navigatin messages sent by the Command Center, -and will be replaced by a navigation using Reference Zones.

    -
    COMMANDCENTER:SetReferenceZones(ReferenceZonePrefix) -

    Set special Reference Zones known by the Command Center to guide airborne pilots during WWII.

    -
    - -

    Global(s)

    -
    -
    - - #COMMANDCENTER - -COMMANDCENTER - -
    -
    - -

    COMMANDCENTER class, extends Base#BASE

    - -

    The COMMANDCENTER class governs multiple missions, the tasking and the reporting.

    - - -

    - The commandcenter communicates important messages between the various groups of human players executing tasks in missions.

    - -

    COMMANDCENTER constructor

    - - - -

    Mission Management

    - - - -

    Reference Zones

    - -

    Command Centers may be aware of certain Reference Zones within the battleground. These Reference Zones can refer to -known areas, recognizable buildings or sites, or any other point of interest. -Command Centers will use these Reference Zones to help pilots with defining coordinates in terms of navigation -during the WWII era. -The Reference Zones are related to the WWII mode that the Command Center will operate in. -Use the method COMMANDCENTER.SetModeWWII() to set the mode of communication to the WWII mode.

    - -

    In WWII mode, the Command Center will receive detected targets, and will select for each target the closest -nearby Reference Zone. This allows pilots to navigate easier through the battle field readying for combat.

    - -

    The Reference Zones need to be set by the Mission Designer in the Mission Editor. -Reference Zones are set by normal trigger zones. One can color the zones in a specific color, -and the radius of the zones doesn't matter, only the point is important. Place the center of these Reference Zones at -specific scenery objects or points of interest (like cities, rivers, hills, crossing etc). -The trigger zones indicating a Reference Zone need to follow a specific syntax. -The name of each trigger zone expressing a Reference Zone need to start with a classification name of the object, -followed by a #, followed by a symbolic name of the Reference Zone. -A few examples:

    - -
      -
    • A church at Tskinvali would be indicated as: Church#Tskinvali
    • -
    • A train station near Kobuleti would be indicated as: Station#Kobuleti
    • -
    - -

    The COMMANDCENTER class contains a method to indicate which trigger zones need to be used as Reference Zones. -This is done by using the method COMMANDCENTER.SetReferenceZones(). -For the moment, only one Reference Zone class can be specified, but in the future, more classes will become possible.

    - - -
    -
    -

    Type CommandCenter

    - -

    Type COMMANDCENTER

    - -

    The COMMANDCENTER class

    - -

    Field(s)

    -
    -
    - - -COMMANDCENTER:AddMission(Mission) - -
    -
    - -

    Add a MISSION to be governed by the HQ command center.

    - -

    Parameter

    - -

    Return value

    - -

    Tasking.Mission#MISSION:

    - - -
    -
    -
    -
    - - Dcs.DCSCoalitionWrapper.Object#coalition - -COMMANDCENTER.CommandCenterCoalition - -
    -
    - - - -
    -
    -
    -
    - - -COMMANDCENTER.CommandCenterMenu - -
    -
    - - - -
    -
    -
    -
    - - #string - -COMMANDCENTER.CommunicationMode - -
    -
    - - - -
    -
    -
    -
    - - -COMMANDCENTER:GetMenu() - -
    -
    - -

    Gets the commandcenter menu structure governed by the HQ command center.

    - -

    Return value

    - -

    Core.Menu#MENU_COALITION:

    - - -
    -
    -
    -
    - - -COMMANDCENTER:GetMissions() - -
    -
    - -

    Get the Missions governed by the HQ command center.

    - -

    Return value

    - -

    #list: -Tasking.Mission#MISSION>

    - -
    -
    -
    -
    - - -COMMANDCENTER:GetName() - -
    -
    - -

    Gets the name of the HQ command center.

    - -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -COMMANDCENTER:GetPositionable() - -
    -
    - -

    Gets the POSITIONABLE of the HQ command center.

    - -

    Return value

    - -

    Wrapper.Positionable#POSITIONABLE:

    - - -
    -
    -
    -
    - - Wrapper.Group#GROUP - -COMMANDCENTER.HQ - -
    -
    - - - -
    -
    -
    -
    - - -COMMANDCENTER:HasGroup(Wrapper, MissionGroup) - -
    -
    - -

    Checks of the COMMANDCENTER has a GROUP.

    - -

    Parameters

    -
      -
    • - -

      Wrapper : -Group#GROUP

      - -
    • -
    • - -

      MissionGroup :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -COMMANDCENTER:IsModeWWII() - -
    -
    - -

    Returns if the commandcenter operations is in WWII mode

    - -

    Return value

    - -

    #boolean: -true if in WWII mode.

    - -
    -
    -
    -
    - - -COMMANDCENTER:MessageToAll(Message) - -
    -
    - -

    Send a CC message to the coalition of the CC.

    - -

    Parameter

    -
      -
    • - -

      Message :

      - -
    • -
    -
    -
    -
    -
    - - -COMMANDCENTER:MessageToCoalition(Message) - -
    -
    - -

    Send a CC message to the coalition of the CC.

    - -

    Parameter

    -
      -
    • - -

      Message :

      - -
    • -
    -
    -
    -
    -
    - - -COMMANDCENTER:MessageToGroup(Message, TaskGroup) - -
    -
    - -

    Send a CC message to a GROUP.

    - -

    Parameters

    - -
    -
    -
    -
    - - -COMMANDCENTER:MessageTypeToCoalition(Message, MessageType) - -
    -
    - -

    Send a CC message of a specified type to the coalition of the CC.

    - -

    Parameters

    -
      -
    • - -

      #string Message : -The message.

      - -
    • -
    • - -

      Core.Message#MESSAGE.MessageType MessageType : -The type of the message, resulting in automatic time duration and prefix of the message.

      - -
    • -
    -
    -
    -
    -
    - - -COMMANDCENTER:MessageTypeToGroup(Message, TaskGroup, MessageType) - -
    -
    - -

    Send a CC message of a specified type to a GROUP.

    - -

    Parameters

    - -
    -
    -
    -
    - - -COMMANDCENTER:New(CommandCenterPositionable, CommandCenterName) - -
    -
    - -

    The constructor takes an IDENTIFIABLE as the HQ command center.

    - -

    Parameters

    - -

    Return value

    - -

    #COMMANDCENTER:

    - - -
    -
    -
    -
    - - -COMMANDCENTER:RemoveMission(Mission) - -
    -
    - -

    Removes a MISSION to be governed by the HQ command center.

    - - -

    The given Mission is not nilified.

    - -

    Parameter

    - -

    Return value

    - -

    Tasking.Mission#MISSION:

    - - -
    -
    -
    -
    - - -COMMANDCENTER:ReportDetails(ReportGroup, Task) - -
    -
    - -

    Report the status of a Task to a Group.

    - - -

    Report the details of a Mission, listing the Mission, and all the Task details.

    - -

    Parameters

    -
      -
    • - -

      ReportGroup :

      - -
    • -
    • - -

      Task :

      - -
    • -
    -
    -
    -
    -
    - - -COMMANDCENTER:ReportMissionsPlayers(ReportGroup) - -
    -
    - -

    Report the players of all MISSIONs to a GROUP.

    - - -

    Each Mission is listed, with an indication how many Tasks are still to be completed.

    - -

    Parameter

    -
      -
    • - -

      ReportGroup :

      - -
    • -
    -
    -
    -
    -
    - - -COMMANDCENTER:ReportMissionsStatus(ReportGroup) - -
    -
    - -

    Report the status of all MISSIONs to a GROUP.

    - - -

    Each Mission is listed, with an indication how many Tasks are still to be completed.

    - -

    Parameter

    -
      -
    • - -

      ReportGroup :

      - -
    • -
    -
    -
    -
    -
    - - -COMMANDCENTER:SetMenu() - -
    -
    - -

    Sets the menu structure of the Missions governed by the HQ command center.

    - -
    -
    -
    -
    - - -COMMANDCENTER:SetModeWWII() - -
    -
    - -

    Set the commandcenter operations in WWII mode -This will disable LL, MGRS, BRA, BULLS navigatin messages sent by the Command Center, -and will be replaced by a navigation using Reference Zones.

    - - -

    It will also disable the settings at the settings menu for these.

    - -

    Return value

    - -

    #COMMANDCENTER:

    - - -
    -
    -
    -
    - - -COMMANDCENTER:SetReferenceZones(ReferenceZonePrefix) - -
    -
    - -

    Set special Reference Zones known by the Command Center to guide airborne pilots during WWII.

    - - - -

    These Reference Zones are normal trigger zones, with a special naming. -The Reference Zones need to be set by the Mission Designer in the Mission Editor. -Reference Zones are set by normal trigger zones. One can color the zones in a specific color, -and the radius of the zones doesn't matter, only the center of the zone is important. Place the center of these Reference Zones at -specific scenery objects or points of interest (like cities, rivers, hills, crossing etc). -The trigger zones indicating a Reference Zone need to follow a specific syntax. -The name of each trigger zone expressing a Reference Zone need to start with a classification name of the object, -followed by a #, followed by a symbolic name of the Reference Zone. -A few examples:

    - -
      -
    • A church at Tskinvali would be indicated as: Church#Tskinvali
    • -
    • A train station near Kobuleti would be indicated as: Station#Kobuleti
    • -
    - -

    Taking the above example, this is how this method would be used:

    - -
    CC:SetReferenceZones( "Church" )
    -CC:SetReferenceZones( "Station" )
    -
    - - - -

    Parameter

    -
      -
    • - -

      #string ReferenceZonePrefix : -The name before the #-mark indicating the class of the Reference Zones.

      - -
    • -
    -

    Return value

    - -

    #COMMANDCENTER:

    - - -
    -
    - -

    Type TASK

    - -

    Type list

    - -
    - -
    - - diff --git a/docs/Documentation/Controllable.html b/docs/Documentation/Controllable.html deleted file mode 100644 index 4685c619d..000000000 --- a/docs/Documentation/Controllable.html +++ /dev/null @@ -1,4045 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Controllable

    - -

    Wrapper -- CONTROLLABLE is an intermediate class wrapping Group and Unit classes "controllers".

    - - - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - -
    CONTROLLABLE -

    CONTROLLABLE class, extends Positionable#POSITIONABLE

    - -

    CONTROLLABLE is a wrapper class to handle the "DCS Controllable objects", which are Groups and Units:

    - -
      -
    • Support all DCS Controllable APIs.
    • -
    -
    -

    Type CONTROLLABLE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    CONTROLLABLE:ClearTasks() -

    Clear all tasks from the controllable.

    -
    CONTROLLABLE:CommandDoScript(DoScript) -

    Do Script command

    -
    CONTROLLABLE:CommandStopRoute(StopRoute) -

    Create a stop route command, which returns a string containing the command.

    -
    CONTROLLABLE:CommandSwitchWayPoint(FromWayPoint, ToWayPoint) -

    Perform a switch waypoint command

    -
    CONTROLLABLE.ControllableName -

    The name of the controllable.

    -
    CONTROLLABLE:CopyRoute(Begin, End, Randomize, Radius) -

    Return the route of a controllable by using the Database#DATABASE class.

    -
    CONTROLLABLE.DCSControllable -

    The DCS controllable class.

    -
    CONTROLLABLE:EnRouteTaskAWACS() -

    (AIR) Aircraft will act as an AWACS for friendly units (will provide them with information about contacts).

    -
    CONTROLLABLE:EnRouteTaskEWR() -

    (GROUND) Ground unit (EW-radar) will act as an EWR for friendly units (will provide them with information about contacts).

    -
    CONTROLLABLE:EnRouteTaskEngageGroup(AttackGroup, Priority, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit) -

    (AIR) Engaging a controllable.

    -
    CONTROLLABLE:EnRouteTaskEngageTargets(Distance, TargetTypes, Priority) -

    (AIR) Engaging targets of defined types.

    -
    CONTROLLABLE:EnRouteTaskEngageTargetsInZone(Vec2, Radius, TargetTypes, Priority) -

    (AIR) Engaging a targets of defined types at circle-shaped zone.

    -
    CONTROLLABLE:EnRouteTaskEngageUnit(EngageUnit, Priority, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, ControllableAttack) -

    (AIR) Search and attack the Unit.

    -
    CONTROLLABLE:EnRouteTaskFAC(Radius, Priority) -

    (AIR + GROUND) The task makes the controllable/unit a FAC and lets the FAC to choose a targets (enemy ground controllable) around as well as other assigned targets.

    -
    CONTROLLABLE:EnRouteTaskFAC_EngageGroup(AttackGroup, Priority, WeaponType, Designation, Datalink) -

    (AIR + GROUND) The task makes the controllable/unit a FAC and lets the FAC to choose the target (enemy ground controllable) as well as other assigned targets.

    -
    CONTROLLABLE:EnRouteTaskTanker() -

    (AIR) Aircraft will act as a tanker for friendly units.

    -
    CONTROLLABLE:GetDetectedTargets(DetectVisual, DetectOptical, DetectRadar, DetectIRST, DetectRWR, DetectDLINK) -

    Return the detected targets of the controllable.

    -
    CONTROLLABLE:GetFuel() -

    Returns relative amount of fuel (from 0.0 to 1.0) the unit has in its internal tanks.

    -
    CONTROLLABLE:GetLife() -

    Returns the health.

    -
    CONTROLLABLE:GetLife0() -

    Returns the initial health.

    -
    CONTROLLABLE:GetSize() - -
    CONTROLLABLE:GetTaskMission() -

    Return the mission template of the controllable.

    -
    CONTROLLABLE:GetTaskRoute() -

    Return the mission route of the controllable.

    -
    CONTROLLABLE:GetUnits() -

    Returns the UNITs wrappers of the DCS Units of the Controllable (default is a GROUP).

    -
    CONTROLLABLE:GetWayPoints() -

    Get the current WayPoints set with the WayPoint functions( Note that the WayPoints can be nil, although there ARE waypoints).

    -
    CONTROLLABLE:HasTask() -

    Checking the Task Queue of the controllable.

    -
    CONTROLLABLE:IsAirPlane() -

    Returns if the Controllable contains AirPlanes.

    -
    CONTROLLABLE:IsTargetDetected(DCSObject, DetectVisual, DetectOptical, DetectRadar, DetectIRST, DetectRWR, DetectDLINK) - -
    CONTROLLABLE:New(ControllableName) -

    Create a new CONTROLLABLE from a DCSControllable

    -
    CONTROLLABLE:OptionAlarmStateAuto() -

    Alarm state to Auto: AI will automatically switch alarm states based on the presence of threats.

    -
    CONTROLLABLE:OptionAlarmStateGreen() -

    Alarm state to Green: Group is not combat ready.

    -
    CONTROLLABLE:OptionAlarmStateRed() -

    Alarm state to Red: Group is combat ready and actively searching for targets.

    -
    CONTROLLABLE:OptionROEHoldFire() -

    Holding weapons.

    -
    CONTROLLABLE:OptionROEHoldFirePossible() -

    Can the CONTROLLABLE hold their weapons?

    -
    CONTROLLABLE:OptionROEOpenFire() -

    Openfire.

    -
    CONTROLLABLE:OptionROEOpenFirePossible() -

    Can the CONTROLLABLE attack designated targets?

    -
    CONTROLLABLE:OptionROEReturnFire() -

    Return fire.

    -
    CONTROLLABLE:OptionROEReturnFirePossible() -

    Can the CONTROLLABLE attack returning on enemy fire?

    -
    CONTROLLABLE:OptionROEWeaponFree() -

    Weapon free.

    -
    CONTROLLABLE:OptionROEWeaponFreePossible() -

    Can the CONTROLLABLE attack targets of opportunity?

    -
    CONTROLLABLE:OptionROTEvadeFire() -

    Evade on fire.

    -
    CONTROLLABLE:OptionROTEvadeFirePossible() -

    Can the CONTROLLABLE evade on enemy fire?

    -
    CONTROLLABLE:OptionROTNoReaction() -

    No evasion on enemy threats.

    -
    CONTROLLABLE:OptionROTNoReactionPossible() -

    Can the CONTROLLABLE ignore enemy fire?

    -
    CONTROLLABLE:OptionROTPassiveDefense() -

    Evasion passive defense.

    -
    CONTROLLABLE:OptionROTPassiveDefensePossible() -

    Can the CONTROLLABLE evade using passive defenses?

    -
    CONTROLLABLE:OptionROTVertical() -

    Evade on fire using vertical manoeuvres.

    -
    CONTROLLABLE:OptionROTVerticalPossible() -

    Can the CONTROLLABLE evade on fire using vertical manoeuvres?

    -
    CONTROLLABLE:OptionRTBAmmo(WeaponsFlag) -

    Set RTB on ammo.

    -
    CONTROLLABLE:OptionRTBBingoFuel(RTB) -

    Set RTB on bingo fuel.

    -
    CONTROLLABLE:PatrolRoute() -

    (GROUND) Patrol iteratively using the waypoints the for the (parent) group.

    -
    CONTROLLABLE:PatrolRouteRandom(Speed, Formation, ToWaypoint) -

    (GROUND) Patrol randomly to the waypoints the for the (parent) group.

    -
    CONTROLLABLE:PatrolZones(ZoneList, Speed, Formation) -

    (GROUND) Patrol randomly to the waypoints the for the (parent) group.

    -
    CONTROLLABLE:PopCurrentTask() -

    Popping current Task from the controllable.

    -
    CONTROLLABLE:PushTask(DCSTask, WaitTime) -

    Pushing Task on the queue from the controllable.

    -
    CONTROLLABLE:Route(Route, DelaySeconds) -

    Make the controllable to follow a given route.

    -
    CONTROLLABLE:RouteAirTo(ToCoordinate, AltType, Type, Action, Speed, DelaySeconds) -

    Make the AIR Controllable fly towards a specific point.

    -
    CONTROLLABLE:RouteGroundTo(ToCoordinate, Speed, Formation, DelaySeconds) -

    Make the GROUND Controllable to drive towards a specific point.

    -
    CONTROLLABLE:RouteToVec2(Point, Speed) -

    (AIR + GROUND) Make the Controllable move to fly to a given point.

    -
    CONTROLLABLE:RouteToVec3(Point, Speed) -

    (AIR + GROUND) Make the Controllable move to a given point.

    -
    CONTROLLABLE:SetCommand(DCSCommand) -

    Executes a command action

    -
    CONTROLLABLE:SetTask(DCSTask, WaitTime) -

    Clearing the Task Queue and Setting the Task on the queue from the controllable.

    -
    CONTROLLABLE:SetTaskWaypoint(Waypoint, Task) -

    Set a Task at a Waypoint using a Route list.

    -
    CONTROLLABLE:TaskAttackGroup(AttackGroup, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit) -

    (AIR) Attack a Controllable.

    -
    CONTROLLABLE:TaskAttackMapObject(Vec2, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, WeaponType) -

    (AIR) Attacking the map object (building, structure, e.t.c).

    -
    CONTROLLABLE:TaskAttackUnit(AttackUnit, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, WeaponType) -

    (AIR) Attack the Unit.

    -
    CONTROLLABLE:TaskBombing(Vec2, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, WeaponType) -

    (AIR) Delivering weapon at the point on the ground.

    -
    CONTROLLABLE:TaskBombingRunway(Airbase, WeaponType, WeaponExpend, AttackQty, Direction, ControllableAttack) -

    (AIR) Delivering weapon on the runway.

    -
    CONTROLLABLE:TaskCombo(DCSTasks) -

    Return a Combo Task taking an array of Tasks.

    -
    CONTROLLABLE:TaskCondition(time, userFlag, userFlagValue, condition, duration, lastWayPoint) -

    Return a condition section for a controlled task.

    -
    CONTROLLABLE:TaskControlled(DCSTask, DCSStopCondition) -

    Return a Controlled Task taking a Task and a TaskCondition.

    -
    CONTROLLABLE:TaskEmbarkToTransport(Point, Radius) -

    Move to a defined Vec2 Point, and embark to a controllable when arrived within a defined Radius.

    -
    CONTROLLABLE:TaskEmbarking(Point, Duration, EmbarkingControllable) -

    (AIR) Move the controllable to a Vec2 Point, wait for a defined duration and embark a controllable.

    -
    CONTROLLABLE:TaskEscort(EscortControllable, Vec3, LastWaypointIndex, EngagementDistanceMax, TargetTypes, FollowControllable, EngagementDistance) -

    (AIR) Escort another airborne controllable.

    -
    CONTROLLABLE:TaskFAC_AttackGroup(AttackGroup, WeaponType, Designation, Datalink) -

    (AIR + GROUND) The task makes the controllable/unit a FAC and orders the FAC to control the target (enemy ground controllable) destruction.

    -
    CONTROLLABLE:TaskFireAtPoint(Vec2, Radius, AmmoCount) -

    (GROUND) Fire at a VEC2 point until ammunition is finished.

    -
    CONTROLLABLE:TaskFollow(FollowControllable, Vec3, LastWaypointIndex) -

    (AIR) Following another airborne controllable.

    -
    CONTROLLABLE:TaskFunction(FunctionString, ...) -

    This creates a Task element, with an action to call a function as part of a Wrapped Task.

    -
    CONTROLLABLE:TaskHold() -

    (GROUND) Hold ground controllable from moving.

    -
    CONTROLLABLE:TaskHoldPosition(Duration) -

    (AIR) Hold position at the current position of the first unit of the controllable.

    -
    CONTROLLABLE:TaskLandAtVec2(Point, Duration) -

    (AIR HELICOPTER) Landing at the ground.

    -
    CONTROLLABLE:TaskLandAtZone(Zone, Duration, RandomPoint) -

    (AIR) Land the controllable at a @{Zone#ZONE_RADIUS).

    -
    CONTROLLABLE:TaskMission(TaskMission) -

    (AIR + GROUND) Return a mission task from a mission template.

    -
    CONTROLLABLE:TaskOrbitCircle(Altitude, Speed) -

    (AIR) Orbit at the current position of the first unit of the controllable at a specified alititude.

    -
    CONTROLLABLE:TaskOrbitCircleAtVec2(Point, Altitude, Speed) -

    (AIR) Orbit at a specified position at a specified alititude during a specified duration with a specified speed.

    -
    CONTROLLABLE:TaskRefueling() -

    (AIR) Refueling from the nearest tanker.

    -
    CONTROLLABLE:TaskRoute(Points) -

    Return a Misson task to follow a given route defined by Points.

    -
    CONTROLLABLE:TaskRouteToVec2(Vec2, Speed, Formation) -

    (GROUND) Route the controllable to a given Vec2.

    -
    CONTROLLABLE:TaskRouteToZone(Zone, Randomize, Speed, Formation) -

    (AIR + GROUND) Route the controllable to a given zone.

    -
    CONTROLLABLE.TaskScheduler - -
    CONTROLLABLE:TaskWrappedAction(DCSCommand, Index) -

    Return a WrappedAction Task taking a Command.

    -
    CONTROLLABLE:WayPointExecute(WayPoint, WaitTime) -

    Executes the WayPoint plan.

    -
    CONTROLLABLE:WayPointFunction(WayPoint, WayPointIndex, WayPointFunction, ...) -

    Registers a waypoint function that will be executed when the controllable moves over the WayPoint.

    -
    CONTROLLABLE:WayPointInitialize(WayPoints) -

    Retrieve the controllable mission and allow to place function hooks within the mission waypoint plan.

    -
    CONTROLLABLE.WayPoints - -
    CONTROLLABLE:_GetController() -

    Get the controller for the CONTROLLABLE.

    -
    - -

    Type Vec2

    - - - - - - - - - -
    Vec2.x - -
    Vec2.y - -
    - -

    Global(s)

    -
    -
    - - #CONTROLLABLE - -CONTROLLABLE - -
    -
    - -

    CONTROLLABLE class, extends Positionable#POSITIONABLE

    - -

    CONTROLLABLE is a wrapper class to handle the "DCS Controllable objects", which are Groups and Units:

    - -
      -
    • Support all DCS Controllable APIs.
    • -
    - - -
      -
    • Enhance with Controllable specific APIs not in the DCS Controllable API set.
    • -
    • Handle local Controllable Controller.
    • -
    • Manage the "state" of the DCS Controllable.
    • -
    - -

    CONTROLLABLE constructor

    - -

    The CONTROLLABLE class provides the following functions to construct a CONTROLLABLE instance:

    - - - -

    CONTROLLABLE Task methods

    - -

    Several controllable task methods are available that help you to prepare tasks. -These methods return a string consisting of the task description, which can then be given to either a Controllable#CONTROLLABLE.PushTask or Controllable#SetTask method to assign the task to the CONTROLLABLE. -Tasks are specific for the category of the CONTROLLABLE, more specific, for AIR, GROUND or AIR and GROUND. -Each task description where applicable indicates for which controllable category the task is valid. -There are 2 main subdivisions of tasks: Assigned tasks and EnRoute tasks.

    - -

    Task assignment

    - -

    Assigned task methods make the controllable execute the task where the location of the (possible) targets of the task are known before being detected. -This is different from the EnRoute tasks, where the targets of the task need to be detected before the task can be executed.

    - -

    Find below a list of the assigned task methods:

    - - - -

    EnRoute assignment

    - -

    EnRoute tasks require the targets of the task need to be detected by the controllable (using its sensors) before the task can be executed:

    - - - -

    Task preparation

    - -

    There are certain task methods that allow to tailor the task behaviour:

    - - - -

    Call a function as a Task

    - -

    A function can be called which is part of a Task. The method CONTROLLABLE.TaskFunction() prepares -a Task that can call a GLOBAL function from within the Controller execution. -This method can also be used to embed a function call when a certain waypoint has been reached. -See below the Tasks at Waypoints section.

    - -

    Demonstration Mission: GRP-502 - Route at waypoint to random point

    - -

    Tasks at Waypoints

    - -

    Special Task methods are available to set tasks at certain waypoints. -The method CONTROLLABLE.SetTaskWaypoint() helps preparing a Route, embedding a Task at the Waypoint of the Route.

    - -

    This creates a Task element, with an action to call a function as part of a Wrapped Task.

    - -

    Obtain the mission from controllable templates

    - -

    Controllable templates contain complete mission descriptions. Sometimes you want to copy a complete mission from a controllable and assign it to another:

    - - - -

    CONTROLLABLE Command methods

    - -

    Controllable command methods prepare the execution of commands using the CONTROLLABLE.SetCommand method:

    - - - -

    Routing of Controllables

    - -

    Different routing methods exist to route GROUPs and UNITs to different locations:

    - - - -

    Option methods

    - -

    Controllable Option methods change the behaviour of the Controllable while being alive.

    - -

    Rule of Engagement:

    - - - -

    To check whether an ROE option is valid for a specific controllable, use:

    - - - -

    Rule on thread:

    - - - -

    To test whether an ROT option is valid for a specific controllable, use:

    - - - - -
    -
    -

    Type Controllable

    - -

    Type CONTROLLABLE

    -

    Field(s)

    -
    -
    - - -CONTROLLABLE:ClearTasks() - -
    -
    - -

    Clear all tasks from the controllable.

    - -

    Return value

    - -

    #CONTROLLABLE:

    - - -
    -
    -
    -
    - - -CONTROLLABLE:CommandDoScript(DoScript) - -
    -
    - -

    Do Script command

    - -

    Parameter

    -
      -
    • - -

      #string DoScript :

      - -
    • -
    -

    Return value

    - -

    #DCSCommand:

    - - -
    -
    -
    -
    - - -CONTROLLABLE:CommandStopRoute(StopRoute) - -
    -
    - -

    Create a stop route command, which returns a string containing the command.

    - - -

    Use the result in the method CONTROLLABLE.SetCommand(). -A value of true will make the ground group stop, a value of false will make it continue. -Note that this can only work on GROUP level, although individual UNITs can be commanded, the whole GROUP will react.

    - -

    Example missions:

    - -
      -
    • GRP-310 -
    • -
    - -

    Parameter

    -
      -
    • - -

      #boolean StopRoute : -true if the ground unit needs to stop, false if it needs to continue to move.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTasking.Task#Task:

    - - -
    -
    -
    -
    - - -CONTROLLABLE:CommandSwitchWayPoint(FromWayPoint, ToWayPoint) - -
    -
    - -

    Perform a switch waypoint command

    - -

    Parameters

    -
      -
    • - -

      #number FromWayPoint :

      - -
    • -
    • - -

      #number ToWayPoint :

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTasking.Task#Task:

    - - -

    Usage:

    -
    --- This test demonstrates the use(s) of the SwitchWayPoint method of the GROUP class.
    -HeliGroup = GROUP:FindByName( "Helicopter" )
    -
    ---- Route the helicopter back to the FARP after 60 seconds.
    --- We use the SCHEDULER class to do this.
    -SCHEDULER:New( nil,
    -  function( HeliGroup )
    -   local CommandRTB = HeliGroup:CommandSwitchWayPoint( 2, 8 )
    -   HeliGroup:SetCommand( CommandRTB )
    - end, { HeliGroup }, 90 
    -)
    - -
    -
    -
    -
    - - #string - -CONTROLLABLE.ControllableName - -
    -
    - -

    The name of the controllable.

    - -
    -
    -
    -
    - - -CONTROLLABLE:CopyRoute(Begin, End, Randomize, Radius) - -
    -
    - -

    Return the route of a controllable by using the Database#DATABASE class.

    - -

    Parameters

    -
      -
    • - -

      #number Begin : -The route point from where the copy will start. The base route point is 0.

      - -
    • -
    • - -

      #number End : -The route point where the copy will end. The End point is the last point - the End point. The last point has base 0.

      - -
    • -
    • - -

      #boolean Randomize : -Randomization of the route, when true.

      - -
    • -
    • - -

      #number Radius : -When randomization is on, the randomization is within the radius.

      - -
    • -
    -
    -
    -
    -
    - - Dcs.DCSWrapper.Controllable#Controllable - -CONTROLLABLE.DCSControllable - -
    -
    - -

    The DCS controllable class.

    - -
    -
    -
    -
    - - -CONTROLLABLE:EnRouteTaskAWACS() - -
    -
    - -

    (AIR) Aircraft will act as an AWACS for friendly units (will provide them with information about contacts).

    - - -

    No parameters.

    - -

    Return value

    - -

    Dcs.DCSTasking.Task#Task: -The DCS task structure.

    - -
    -
    -
    -
    - - -CONTROLLABLE:EnRouteTaskEWR() - -
    -
    - -

    (GROUND) Ground unit (EW-radar) will act as an EWR for friendly units (will provide them with information about contacts).

    - - -

    No parameters.

    - -

    Return value

    - -

    Dcs.DCSTasking.Task#Task: -The DCS task structure.

    - -
    -
    -
    -
    - - -CONTROLLABLE:EnRouteTaskEngageGroup(AttackGroup, Priority, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit) - -
    -
    - -

    (AIR) Engaging a controllable.

    - - -

    The task does not assign the target controllable to the unit/controllable to attack now; it just allows the unit/controllable to engage the target controllable as well as other assigned targets.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE AttackGroup : -The Controllable to be attacked.

      - -
    • -
    • - -

      #number Priority : -All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.

      - -
    • -
    • - -

      #number WeaponType : -(optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

      - -
    • -
    • - -

      Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : -(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

      - -
    • -
    • - -

      #number AttackQty : -(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

      - -
    • -
    • - -

      Dcs.DCSTypes#Azimuth Direction : -(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

      - -
    • -
    • - -

      Dcs.DCSTypes#Distance Altitude : -(optional) Desired attack start altitude. Controllable/aircraft will make its attacks from the altitude. If the altitude is too low or too high to use weapon aircraft/controllable will choose closest altitude to the desired attack start altitude. If the desired altitude is defined controllable/aircraft will not attack from safe altitude.

      - -
    • -
    • - -

      #boolean AttackQtyLimit : -(optional) The flag determines how to interpret attackQty parameter. If the flag is true then attackQty is a limit on maximal attack quantity for "AttackGroup" and "AttackUnit" tasks. If the flag is false then attackQty is a desired attack quantity for "Bombing" and "BombingRunway" tasks.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTasking.Task#Task: -The DCS task structure.

    - -
    -
    -
    -
    - - -CONTROLLABLE:EnRouteTaskEngageTargets(Distance, TargetTypes, Priority) - -
    -
    - -

    (AIR) Engaging targets of defined types.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Distance Distance : -Maximal distance from the target to a route leg. If the target is on a greater distance it will be ignored.

      - -
    • -
    • - -

      Dcs.DCSTypes#AttributeNameArray TargetTypes : -Array of target categories allowed to engage.

      - -
    • -
    • - -

      #number Priority : -All enroute tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTasking.Task#Task: -The DCS task structure.

    - -
    -
    -
    -
    - - -CONTROLLABLE:EnRouteTaskEngageTargetsInZone(Vec2, Radius, TargetTypes, Priority) - -
    -
    - -

    (AIR) Engaging a targets of defined types at circle-shaped zone.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Vec2 Vec2 : -2D-coordinates of the zone.

      - -
    • -
    • - -

      Dcs.DCSTypes#Distance Radius : -Radius of the zone.

      - -
    • -
    • - -

      Dcs.DCSTypes#AttributeNameArray TargetTypes : -Array of target categories allowed to engage.

      - -
    • -
    • - -

      #number Priority : -All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTasking.Task#Task: -The DCS task structure.

    - -
    -
    -
    -
    - - -CONTROLLABLE:EnRouteTaskEngageUnit(EngageUnit, Priority, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, ControllableAttack) - -
    -
    - -

    (AIR) Search and attack the Unit.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT EngageUnit : -The UNIT.

      - -
    • -
    • - -

      #number Priority : -(optional) All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.

      - -
    • -
    • - -

      #boolean GroupAttack : -(optional) If true, all units in the group will attack the Unit when found.

      - -
    • -
    • - -

      Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : -(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

      - -
    • -
    • - -

      #number AttackQty : -(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

      - -
    • -
    • - -

      Dcs.DCSTypes#Azimuth Direction : -(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

      - -
    • -
    • - -

      Dcs.DCSTypes#Distance Altitude : -(optional) Desired altitude to perform the unit engagement.

      - -
    • -
    • - -

      #boolean Visible : -(optional) Unit must be visible.

      - -
    • -
    • - -

      #boolean ControllableAttack : -(optional) Flag indicates that the target must be engaged by all aircrafts of the controllable. Has effect only if the task is assigned to a controllable, not to a single aircraft.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTasking.Task#Task: -The DCS task structure.

    - -
    -
    -
    -
    - - -CONTROLLABLE:EnRouteTaskFAC(Radius, Priority) - -
    -
    - -

    (AIR + GROUND) The task makes the controllable/unit a FAC and lets the FAC to choose a targets (enemy ground controllable) around as well as other assigned targets.

    - - -

    The killer is player-controlled allied CAS-aircraft that is in contact with the FAC. -If the task is assigned to the controllable lead unit will be a FAC.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Distance Radius : - The maximal distance from the FAC to a target.

      - -
    • -
    • - -

      #number Priority : -All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTasking.Task#Task: -The DCS task structure.

    - -
    -
    -
    -
    - - -CONTROLLABLE:EnRouteTaskFAC_EngageGroup(AttackGroup, Priority, WeaponType, Designation, Datalink) - -
    -
    - -

    (AIR + GROUND) The task makes the controllable/unit a FAC and lets the FAC to choose the target (enemy ground controllable) as well as other assigned targets.

    - - -

    The killer is player-controlled allied CAS-aircraft that is in contact with the FAC. -If the task is assigned to the controllable lead unit will be a FAC.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE AttackGroup : -Target CONTROLLABLE.

      - -
    • -
    • - -

      #number Priority : -All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.

      - -
    • -
    • - -

      #number WeaponType : -Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

      - -
    • -
    • - -

      Dcs.DCSTypes#AI.Task.Designation Designation : -(optional) Designation type.

      - -
    • -
    • - -

      #boolean Datalink : -(optional) Allows to use datalink to send the target information to attack aircraft. Enabled by default.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTasking.Task#Task: -The DCS task structure.

    - -
    -
    -
    -
    - - -CONTROLLABLE:EnRouteTaskTanker() - -
    -
    - -

    (AIR) Aircraft will act as a tanker for friendly units.

    - - -

    No parameters.

    - -

    Return value

    - -

    Dcs.DCSTasking.Task#Task: -The DCS task structure.

    - -
    -
    -
    -
    - - -CONTROLLABLE:GetDetectedTargets(DetectVisual, DetectOptical, DetectRadar, DetectIRST, DetectRWR, DetectDLINK) - -
    -
    - -

    Return the detected targets of the controllable.

    - - -

    The optional parametes specify the detection methods that can be applied. -If no detection method is given, the detection will use all the available methods by default.

    - -

    Parameters

    -
      -
    • - -

      #boolean DetectVisual : -(optional)

      - -
    • -
    • - -

      #boolean DetectOptical : -(optional)

      - -
    • -
    • - -

      #boolean DetectRadar : -(optional)

      - -
    • -
    • - -

      #boolean DetectIRST : -(optional)

      - -
    • -
    • - -

      #boolean DetectRWR : -(optional)

      - -
    • -
    • - -

      #boolean DetectDLINK : -(optional)

      - -
    • -
    -

    Return value

    - -

    #table: -DetectedTargets

    - -
    -
    -
    -
    - - -CONTROLLABLE:GetFuel() - -
    -
    - -

    Returns relative amount of fuel (from 0.0 to 1.0) the unit has in its internal tanks.

    - - -

    This method returns nil to ensure polymorphic behaviour! This method needs to be overridden by GROUP or UNIT.

    - -

    Return value

    - -

    #nil: -The CONTROLLABLE is not existing or alive.

    - -
    -
    -
    -
    - - -CONTROLLABLE:GetLife() - -
    -
    - -

    Returns the health.

    - - -

    Dead controllables have health <= 1.0.

    - -

    Return values

    -
      -
    1. - -

      #number: -The controllable health value (unit or group average).

      - -
    2. -
    3. - -

      #nil: -The controllable is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -CONTROLLABLE:GetLife0() - -
    -
    - -

    Returns the initial health.

    - -

    Return values

    -
      -
    1. - -

      #number: -The controllable health value (unit or group average).

      - -
    2. -
    3. - -

      #nil: -The controllable is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -CONTROLLABLE:GetSize() - -
    -
    - - - -
    -
    -
    -
    - - -CONTROLLABLE:GetTaskMission() - -
    -
    - -

    Return the mission template of the controllable.

    - -

    Return value

    - -

    #table: -The MissionTemplate -TODO: Rework the method how to retrieve a template ...

    - -
    -
    -
    -
    - - -CONTROLLABLE:GetTaskRoute() - -
    -
    - -

    Return the mission route of the controllable.

    - -

    Return value

    - -

    #table: -The mission route defined by points.

    - -
    -
    -
    -
    - - -CONTROLLABLE:GetUnits() - -
    -
    - -

    Returns the UNITs wrappers of the DCS Units of the Controllable (default is a GROUP).

    - -

    Return value

    - -

    #list: -Wrapper.Unit#UNIT> The UNITs wrappers.

    - -
    -
    -
    -
    - - -CONTROLLABLE:GetWayPoints() - -
    -
    - -

    Get the current WayPoints set with the WayPoint functions( Note that the WayPoints can be nil, although there ARE waypoints).

    - -

    Return value

    - -

    #table: -WayPoints If WayPoints is given, then return the WayPoints structure.

    - -
    -
    -
    -
    - - -CONTROLLABLE:HasTask() - -
    -
    - -

    Checking the Task Queue of the controllable.

    - - -

    Returns false if no task is on the queue. true if there is a task.

    - -

    Return value

    - -

    Wrapper.Controllable#CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:IsAirPlane() - -
    -
    - -

    Returns if the Controllable contains AirPlanes.

    - -

    Return value

    - -

    #boolean: -true if Controllable contains AirPlanes.

    - -
    -
    -
    -
    - - -CONTROLLABLE:IsTargetDetected(DCSObject, DetectVisual, DetectOptical, DetectRadar, DetectIRST, DetectRWR, DetectDLINK) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      DCSObject :

      - -
    • -
    • - -

      DetectVisual :

      - -
    • -
    • - -

      DetectOptical :

      - -
    • -
    • - -

      DetectRadar :

      - -
    • -
    • - -

      DetectIRST :

      - -
    • -
    • - -

      DetectRWR :

      - -
    • -
    • - -

      DetectDLINK :

      - -
    • -
    -
    -
    -
    -
    - - -CONTROLLABLE:New(ControllableName) - -
    -
    - -

    Create a new CONTROLLABLE from a DCSControllable

    - -

    Parameter

    - -

    Return value

    - -

    #CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:OptionAlarmStateAuto() - -
    -
    - -

    Alarm state to Auto: AI will automatically switch alarm states based on the presence of threats.

    - - -

    The AI kind of cheats in this regard.

    - -

    Return value

    - -

    #CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:OptionAlarmStateGreen() - -
    -
    - -

    Alarm state to Green: Group is not combat ready.

    - - -

    Sensors are stowed if possible.

    - -

    Return value

    - -

    #CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:OptionAlarmStateRed() - -
    -
    - -

    Alarm state to Red: Group is combat ready and actively searching for targets.

    - -

    Return value

    - -

    #CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:OptionROEHoldFire() - -
    -
    - -

    Holding weapons.

    - -

    Return value

    - -

    Wrapper.Controllable#CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:OptionROEHoldFirePossible() - -
    -
    - -

    Can the CONTROLLABLE hold their weapons?

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -CONTROLLABLE:OptionROEOpenFire() - -
    -
    - -

    Openfire.

    - -

    Return value

    - -

    #CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:OptionROEOpenFirePossible() - -
    -
    - -

    Can the CONTROLLABLE attack designated targets?

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -CONTROLLABLE:OptionROEReturnFire() - -
    -
    - -

    Return fire.

    - -

    Return value

    - -

    #CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:OptionROEReturnFirePossible() - -
    -
    - -

    Can the CONTROLLABLE attack returning on enemy fire?

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -CONTROLLABLE:OptionROEWeaponFree() - -
    -
    - -

    Weapon free.

    - -

    Return value

    - -

    #CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:OptionROEWeaponFreePossible() - -
    -
    - -

    Can the CONTROLLABLE attack targets of opportunity?

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -CONTROLLABLE:OptionROTEvadeFire() - -
    -
    - -

    Evade on fire.

    - -

    Return value

    - -

    #CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:OptionROTEvadeFirePossible() - -
    -
    - -

    Can the CONTROLLABLE evade on enemy fire?

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -CONTROLLABLE:OptionROTNoReaction() - -
    -
    - -

    No evasion on enemy threats.

    - -

    Return value

    - -

    #CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:OptionROTNoReactionPossible() - -
    -
    - -

    Can the CONTROLLABLE ignore enemy fire?

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -CONTROLLABLE:OptionROTPassiveDefense() - -
    -
    - -

    Evasion passive defense.

    - -

    Return value

    - -

    #CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:OptionROTPassiveDefensePossible() - -
    -
    - -

    Can the CONTROLLABLE evade using passive defenses?

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -CONTROLLABLE:OptionROTVertical() - -
    -
    - -

    Evade on fire using vertical manoeuvres.

    - -

    Return value

    - -

    #CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:OptionROTVerticalPossible() - -
    -
    - -

    Can the CONTROLLABLE evade on fire using vertical manoeuvres?

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -CONTROLLABLE:OptionRTBAmmo(WeaponsFlag) - -
    -
    - -

    Set RTB on ammo.

    - -

    Parameter

    -
      -
    • - -

      #boolean WeaponsFlag : -Weapons.flag enumerator.

      - -
    • -
    -

    Return value

    - -

    #CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:OptionRTBBingoFuel(RTB) - -
    -
    - -

    Set RTB on bingo fuel.

    - -

    Parameter

    -
      -
    • - -

      #boolean RTB : -true if RTB on bingo fuel (default), false if no RTB on bingo fuel. -Warning! When you switch this option off, the airborne group will continue to fly until all fuel has been consumed, and will crash.

      - -
    • -
    -

    Return value

    - -

    #CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:PatrolRoute() - -
    -
    - -

    (GROUND) Patrol iteratively using the waypoints the for the (parent) group.

    - -

    Return value

    - -

    #CONTROLLABLE:

    - - -
    -
    -
    -
    - - -CONTROLLABLE:PatrolRouteRandom(Speed, Formation, ToWaypoint) - -
    -
    - -

    (GROUND) Patrol randomly to the waypoints the for the (parent) group.

    - - -

    A random waypoint will be picked and the group will move towards that point.

    - -

    Parameters

    -
      -
    • - -

      Speed :

      - -
    • -
    • - -

      Formation :

      - -
    • -
    • - -

      ToWaypoint :

      - -
    • -
    -

    Return value

    - -

    #CONTROLLABLE:

    - - -
    -
    -
    -
    - - -CONTROLLABLE:PatrolZones(ZoneList, Speed, Formation) - -
    -
    - -

    (GROUND) Patrol randomly to the waypoints the for the (parent) group.

    - - -

    A random waypoint will be picked and the group will move towards that point.

    - -

    Parameters

    -
      -
    • - -

      ZoneList :

      - -
    • -
    • - -

      Speed :

      - -
    • -
    • - -

      Formation :

      - -
    • -
    -

    Return value

    - -

    #CONTROLLABLE:

    - - -
    -
    -
    -
    - - -CONTROLLABLE:PopCurrentTask() - -
    -
    - -

    Popping current Task from the controllable.

    - -

    Return value

    - -

    Wrapper.Controllable#CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:PushTask(DCSTask, WaitTime) - -
    -
    - -

    Pushing Task on the queue from the controllable.

    - -

    Parameters

    -
      -
    • - -

      DCSTask :

      - -
    • -
    • - -

      WaitTime :

      - -
    • -
    -

    Return value

    - -

    Wrapper.Controllable#CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:Route(Route, DelaySeconds) - -
    -
    - -

    Make the controllable to follow a given route.

    - -

    Parameters

    -
      -
    • - -

      #table Route : -A table of Route Points.

      - -
    • -
    • - -

      #number DelaySeconds : -Wait for the specified seconds before executing the Route.

      - -
    • -
    -

    Return value

    - -

    #CONTROLLABLE: -The CONTROLLABLE.

    - -
    -
    -
    -
    - - -CONTROLLABLE:RouteAirTo(ToCoordinate, AltType, Type, Action, Speed, DelaySeconds) - -
    -
    - -

    Make the AIR Controllable fly towards a specific point.

    - -

    Parameters

    - -

    Return value

    - -

    #CONTROLLABLE: -The CONTROLLABLE.

    - -
    -
    -
    -
    - - -CONTROLLABLE:RouteGroundTo(ToCoordinate, Speed, Formation, DelaySeconds) - -
    -
    - -

    Make the GROUND Controllable to drive towards a specific point.

    - -

    Parameters

    -
      -
    • - -

      Core.Point#COORDINATE ToCoordinate : -A Coordinate to drive to.

      - -
    • -
    • - -

      #number Speed : -(optional) Speed in km/h. The default speed is 999 km/h.

      - -
    • -
    • - -

      #string Formation : -(optional) The route point Formation, which is a text string that specifies exactly the Text in the Type of the route point, like "Vee", "Echelon Right".

      - -
    • -
    • - -

      #number DelaySeconds : -Wait for the specified seconds before executing the Route.

      - -
    • -
    -

    Return value

    - -

    #CONTROLLABLE: -The CONTROLLABLE.

    - -
    -
    -
    -
    - - -CONTROLLABLE:RouteToVec2(Point, Speed) - -
    -
    - -

    (AIR + GROUND) Make the Controllable move to fly to a given point.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Vec3 Point : -The destination point in Vec3 format.

      - -
    • -
    • - -

      #number Speed : -The speed to travel.

      - -
    • -
    -

    Return value

    - -

    #CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:RouteToVec3(Point, Speed) - -
    -
    - -

    (AIR + GROUND) Make the Controllable move to a given point.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Vec3 Point : -The destination point in Vec3 format.

      - -
    • -
    • - -

      #number Speed : -The speed to travel.

      - -
    • -
    -

    Return value

    - -

    #CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:SetCommand(DCSCommand) - -
    -
    - -

    Executes a command action

    - -

    Parameter

    - -

    Return value

    - -

    #CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:SetTask(DCSTask, WaitTime) - -
    -
    - -

    Clearing the Task Queue and Setting the Task on the queue from the controllable.

    - -

    Parameters

    -
      -
    • - -

      DCSTask :

      - -
    • -
    • - -

      WaitTime :

      - -
    • -
    -

    Return value

    - -

    Wrapper.Controllable#CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:SetTaskWaypoint(Waypoint, Task) - -
    -
    - -

    Set a Task at a Waypoint using a Route list.

    - -

    Parameters

    -
      -
    • - -

      #table Waypoint : -The Waypoint!

      - -
    • -
    • - -

      Dcs.DCSTasking.Task#Task Task : -The Task structure to be executed!

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTasking.Task#Task:

    - - -
    -
    -
    -
    - - -CONTROLLABLE:TaskAttackGroup(AttackGroup, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit) - -
    -
    - -

    (AIR) Attack a Controllable.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE AttackGroup : -The Controllable to be attacked.

      - -
    • -
    • - -

      #number WeaponType : -(optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

      - -
    • -
    • - -

      Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : -(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

      - -
    • -
    • - -

      #number AttackQty : -(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

      - -
    • -
    • - -

      Dcs.DCSTypes#Azimuth Direction : -(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

      - -
    • -
    • - -

      Dcs.DCSTypes#Distance Altitude : -(optional) Desired attack start altitude. Controllable/aircraft will make its attacks from the altitude. If the altitude is too low or too high to use weapon aircraft/controllable will choose closest altitude to the desired attack start altitude. If the desired altitude is defined controllable/aircraft will not attack from safe altitude.

      - -
    • -
    • - -

      #boolean AttackQtyLimit : -(optional) The flag determines how to interpret attackQty parameter. If the flag is true then attackQty is a limit on maximal attack quantity for "AttackGroup" and "AttackUnit" tasks. If the flag is false then attackQty is a desired attack quantity for "Bombing" and "BombingRunway" tasks.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTasking.Task#Task: -The DCS task structure.

    - -
    -
    -
    -
    - - -CONTROLLABLE:TaskAttackMapObject(Vec2, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, WeaponType) - -
    -
    - -

    (AIR) Attacking the map object (building, structure, e.t.c).

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Vec2 Vec2 : -2D-coordinates of the point to deliver weapon at.

      - -
    • -
    • - -

      #boolean GroupAttack : -(optional) If true, all units in the group will attack the Unit when found.

      - -
    • -
    • - -

      Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : -(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

      - -
    • -
    • - -

      #number AttackQty : -(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

      - -
    • -
    • - -

      Dcs.DCSTypes#Azimuth Direction : -(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

      - -
    • -
    • - -

      #number Altitude : -(optional) The altitude from where to attack.

      - -
    • -
    • - -

      #number WeaponType : -(optional) The WeaponType.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTasking.Task#Task: -The DCS task structure.

    - -
    -
    -
    -
    - - -CONTROLLABLE:TaskAttackUnit(AttackUnit, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, WeaponType) - -
    -
    - -

    (AIR) Attack the Unit.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT AttackUnit : -The UNIT.

      - -
    • -
    • - -

      #boolean GroupAttack : -(optional) If true, all units in the group will attack the Unit when found.

      - -
    • -
    • - -

      Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : -(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

      - -
    • -
    • - -

      #number AttackQty : -(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

      - -
    • -
    • - -

      Dcs.DCSTypes#Azimuth Direction : -(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

      - -
    • -
    • - -

      #number Altitude : -(optional) The altitude from where to attack.

      - -
    • -
    • - -

      #boolean Visible : -(optional) not a clue.

      - -
    • -
    • - -

      #number WeaponType : -(optional) The WeaponType.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTasking.Task#Task: -The DCS task structure.

    - -
    -
    -
    -
    - - -CONTROLLABLE:TaskBombing(Vec2, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, WeaponType) - -
    -
    - -

    (AIR) Delivering weapon at the point on the ground.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Vec2 Vec2 : -2D-coordinates of the point to deliver weapon at.

      - -
    • -
    • - -

      #boolean GroupAttack : -(optional) If true, all units in the group will attack the Unit when found.

      - -
    • -
    • - -

      Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : -(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

      - -
    • -
    • - -

      #number AttackQty : -(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

      - -
    • -
    • - -

      Dcs.DCSTypes#Azimuth Direction : -(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

      - -
    • -
    • - -

      #number Altitude : -(optional) The altitude from where to attack.

      - -
    • -
    • - -

      #number WeaponType : -(optional) The WeaponType.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTasking.Task#Task: -The DCS task structure.

    - -
    -
    -
    -
    - - -CONTROLLABLE:TaskBombingRunway(Airbase, WeaponType, WeaponExpend, AttackQty, Direction, ControllableAttack) - -
    -
    - -

    (AIR) Delivering weapon on the runway.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Airbase#AIRBASE Airbase : -Airbase to attack.

      - -
    • -
    • - -

      #number WeaponType : -(optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

      - -
    • -
    • - -

      Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : -(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

      - -
    • -
    • - -

      #number AttackQty : -(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

      - -
    • -
    • - -

      Dcs.DCSTypes#Azimuth Direction : -(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

      - -
    • -
    • - -

      #boolean ControllableAttack : -(optional) Flag indicates that the target must be engaged by all aircrafts of the controllable. Has effect only if the task is assigned to a controllable, not to a single aircraft.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTasking.Task#Task: -The DCS task structure.

    - -
    -
    -
    -
    - - -CONTROLLABLE:TaskCombo(DCSTasks) - -
    -
    - -

    Return a Combo Task taking an array of Tasks.

    - -

    Parameter

    - -

    Return value

    - -

    Dcs.DCSTasking.Task#Task:

    - - -
    -
    -
    -
    - - -CONTROLLABLE:TaskCondition(time, userFlag, userFlagValue, condition, duration, lastWayPoint) - -
    -
    - -

    Return a condition section for a controlled task.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTime#Time time :

      - -
    • -
    • - -

      #string userFlag :

      - -
    • -
    • - -

      #boolean userFlagValue :

      - -
    • -
    • - -

      #string condition :

      - -
    • -
    • - -

      Dcs.DCSTime#Time duration :

      - -
    • -
    • - -

      #number lastWayPoint : -return Dcs.DCSTasking.Task#Task

      - -
    • -
    -
    -
    -
    -
    - - -CONTROLLABLE:TaskControlled(DCSTask, DCSStopCondition) - -
    -
    - -

    Return a Controlled Task taking a Task and a TaskCondition.

    - -

    Parameters

    - -

    Return value

    - -

    Dcs.DCSTasking.Task#Task:

    - - -
    -
    -
    -
    - - -CONTROLLABLE:TaskEmbarkToTransport(Point, Radius) - -
    -
    - -

    Move to a defined Vec2 Point, and embark to a controllable when arrived within a defined Radius.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Vec2 Point : -The point where to wait.

      - -
    • -
    • - -

      #number Radius : -The radius of the embarking zone around the Point.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTasking.Task#Task: -The DCS task structure.

    - -
    -
    -
    -
    - - -CONTROLLABLE:TaskEmbarking(Point, Duration, EmbarkingControllable) - -
    -
    - -

    (AIR) Move the controllable to a Vec2 Point, wait for a defined duration and embark a controllable.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Vec2 Point : -The point where to wait.

      - -
    • -
    • - -

      #number Duration : -The duration in seconds to wait.

      - -
    • -
    • - -

      #CONTROLLABLE EmbarkingControllable : -The controllable to be embarked.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTasking.Task#Task: -The DCS task structure

    - -
    -
    -
    -
    - - -CONTROLLABLE:TaskEscort(EscortControllable, Vec3, LastWaypointIndex, EngagementDistanceMax, TargetTypes, FollowControllable, EngagementDistance) - -
    -
    - -

    (AIR) Escort another airborne controllable.

    - - -

    The unit / controllable will follow lead unit of another controllable, wingmens of both controllables will continue following their leaders. -The unit / controllable will also protect that controllable from threats of specified types.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE EscortControllable : -The controllable to be escorted.

      - -
    • -
    • - -

      Dcs.DCSTypes#Vec3 Vec3 : -Position of the unit / lead unit of the controllable relative lead unit of another controllable in frame reference oriented by course of lead unit of another controllable. If another controllable is on land the unit / controllable will orbit around.

      - -
    • -
    • - -

      #number LastWaypointIndex : -Detach waypoint of another controllable. Once reached the unit / controllable Follow task is finished.

      - -
    • -
    • - -

      #number EngagementDistanceMax : -Maximal distance from escorted controllable to threat. If the threat is already engaged by escort escort will disengage if the distance becomes greater than 1.5 * engagementDistMax.

      - -
    • -
    • - -

      Dcs.DCSTypes#AttributeNameArray TargetTypes : -Array of AttributeName that is contains threat categories allowed to engage.

      - -
    • -
    • - -

      FollowControllable :

      - -
    • -
    • - -

      EngagementDistance :

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTasking.Task#Task: -The DCS task structure.

    - -
    -
    -
    -
    - - -CONTROLLABLE:TaskFAC_AttackGroup(AttackGroup, WeaponType, Designation, Datalink) - -
    -
    - -

    (AIR + GROUND) The task makes the controllable/unit a FAC and orders the FAC to control the target (enemy ground controllable) destruction.

    - - -

    The killer is player-controlled allied CAS-aircraft that is in contact with the FAC. -If the task is assigned to the controllable lead unit will be a FAC.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE AttackGroup : -Target CONTROLLABLE.

      - -
    • -
    • - -

      #number WeaponType : -Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

      - -
    • -
    • - -

      Dcs.DCSTypes#AI.Task.Designation Designation : -(optional) Designation type.

      - -
    • -
    • - -

      #boolean Datalink : -(optional) Allows to use datalink to send the target information to attack aircraft. Enabled by default.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTasking.Task#Task: -The DCS task structure.

    - -
    -
    -
    -
    - - -CONTROLLABLE:TaskFireAtPoint(Vec2, Radius, AmmoCount) - -
    -
    - -

    (GROUND) Fire at a VEC2 point until ammunition is finished.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Vec2 Vec2 : -The point to fire at.

      - -
    • -
    • - -

      Dcs.DCSTypes#Distance Radius : -The radius of the zone to deploy the fire at.

      - -
    • -
    • - -

      #number AmmoCount : -(optional) Quantity of ammunition to expand (omit to fire until ammunition is depleted).

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTasking.Task#Task: -The DCS task structure.

    - -
    -
    -
    -
    - - -CONTROLLABLE:TaskFollow(FollowControllable, Vec3, LastWaypointIndex) - -
    -
    - -

    (AIR) Following another airborne controllable.

    - - -

    The unit / controllable will follow lead unit of another controllable, wingmens of both controllables will continue following their leaders. -If another controllable is on land the unit / controllable will orbit around.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE FollowControllable : -The controllable to be followed.

      - -
    • -
    • - -

      Dcs.DCSTypes#Vec3 Vec3 : -Position of the unit / lead unit of the controllable relative lead unit of another controllable in frame reference oriented by course of lead unit of another controllable. If another controllable is on land the unit / controllable will orbit around.

      - -
    • -
    • - -

      #number LastWaypointIndex : -Detach waypoint of another controllable. Once reached the unit / controllable Follow task is finished.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTasking.Task#Task: -The DCS task structure.

    - -
    -
    -
    -
    - - -CONTROLLABLE:TaskFunction(FunctionString, ...) - -
    -
    - -

    This creates a Task element, with an action to call a function as part of a Wrapped Task.

    - - -

    This Task can then be embedded at a Waypoint by calling the method CONTROLLABLE.SetTaskWaypoint.

    - -

    Parameters

    -
      -
    • - -

      #string FunctionString : -The function name embedded as a string that will be called.

      - -
    • -
    • - -

      ... : -The variable arguments passed to the function when called! These arguments can be of any type!

      - -
    • -
    -

    Return value

    - -

    #CONTROLLABLE:

    - - -

    Usage:

    -
    
    - local ZoneList = { 
    -   ZONE:New( "ZONE1" ), 
    -   ZONE:New( "ZONE2" ), 
    -   ZONE:New( "ZONE3" ), 
    -   ZONE:New( "ZONE4" ), 
    -   ZONE:New( "ZONE5" ) 
    - }
    - 
    - GroundGroup = GROUP:FindByName( "Vehicle" )
    - 
    - --- @param Wrapper.Group#GROUP GroundGroup
    - function RouteToZone( Vehicle, ZoneRoute )
    - 
    -   local Route = {}
    -   
    -   Vehicle:E( { ZoneRoute = ZoneRoute } )
    -   
    -   Vehicle:MessageToAll( "Moving to zone " .. ZoneRoute:GetName(), 10 )
    - 
    -   -- Get the current coordinate of the Vehicle
    -   local FromCoord = Vehicle:GetCoordinate()
    -   
    -   -- Select a random Zone and get the Coordinate of the new Zone.
    -   local RandomZone = ZoneList[ math.random( 1, #ZoneList ) ] -- Core.Zone#ZONE
    -   local ToCoord = RandomZone:GetCoordinate()
    -   
    -   -- Create a "ground route point", which is a "point" structure that can be given as a parameter to a Task
    -   Route[#Route+1] = FromCoord:WaypointGround( 72 )
    -   Route[#Route+1] = ToCoord:WaypointGround( 60, "Vee" )
    -   
    -   local TaskRouteToZone = Vehicle:TaskFunction( "RouteToZone", RandomZone )
    -   
    -   Vehicle:SetTaskWaypoint( Route, #Route, TaskRouteToZone ) -- Set for the given Route at Waypoint 2 the TaskRouteToZone.
    - 
    -   Vehicle:Route( Route, math.random( 10, 20 ) ) -- Move after a random seconds to the Route. See the Route method for details.
    -   
    - end
    -   
    -   RouteToZone( GroundGroup, ZoneList[1] )
    -
    - -
    -
    -
    -
    - - -CONTROLLABLE:TaskHold() - -
    -
    - -

    (GROUND) Hold ground controllable from moving.

    - -

    Return value

    - -

    Dcs.DCSTasking.Task#Task: -The DCS task structure.

    - -
    -
    -
    -
    - - -CONTROLLABLE:TaskHoldPosition(Duration) - -
    -
    - -

    (AIR) Hold position at the current position of the first unit of the controllable.

    - -

    Parameter

    -
      -
    • - -

      #number Duration : -The maximum duration in seconds to hold the position.

      - -
    • -
    -

    Return value

    - -

    #CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:TaskLandAtVec2(Point, Duration) - -
    -
    - -

    (AIR HELICOPTER) Landing at the ground.

    - - -

    For helicopters only.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Vec2 Point : -The point where to land.

      - -
    • -
    • - -

      #number Duration : -The duration in seconds to stay on the ground.

      - -
    • -
    -

    Return value

    - -

    #CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:TaskLandAtZone(Zone, Duration, RandomPoint) - -
    -
    - -

    (AIR) Land the controllable at a @{Zone#ZONE_RADIUS).

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE Zone : -The zone where to land.

      - -
    • -
    • - -

      #number Duration : -The duration in seconds to stay on the ground.

      - -
    • -
    • - -

      RandomPoint :

      - -
    • -
    -

    Return value

    - -

    #CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:TaskMission(TaskMission) - -
    -
    - -

    (AIR + GROUND) Return a mission task from a mission template.

    - -

    Parameter

    -
      -
    • - -

      #table TaskMission : -A table containing the mission task.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTasking.Task#Task:

    - - -
    -
    -
    -
    - - -CONTROLLABLE:TaskOrbitCircle(Altitude, Speed) - -
    -
    - -

    (AIR) Orbit at the current position of the first unit of the controllable at a specified alititude.

    - -

    Parameters

    -
      -
    • - -

      #number Altitude : -The altitude to hold the position.

      - -
    • -
    • - -

      #number Speed : -The speed flying when holding the position.

      - -
    • -
    -

    Return value

    - -

    #CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:TaskOrbitCircleAtVec2(Point, Altitude, Speed) - -
    -
    - -

    (AIR) Orbit at a specified position at a specified alititude during a specified duration with a specified speed.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Vec2 Point : -The point to hold the position.

      - -
    • -
    • - -

      #number Altitude : -The altitude to hold the position.

      - -
    • -
    • - -

      #number Speed : -The speed flying when holding the position.

      - -
    • -
    -

    Return value

    - -

    #CONTROLLABLE: -self

    - -
    -
    -
    -
    - - -CONTROLLABLE:TaskRefueling() - -
    -
    - -

    (AIR) Refueling from the nearest tanker.

    - - -

    No parameters.

    - -

    Return value

    - -

    Dcs.DCSTasking.Task#Task: -The DCS task structure.

    - -
    -
    -
    -
    - - -CONTROLLABLE:TaskRoute(Points) - -
    -
    - -

    Return a Misson task to follow a given route defined by Points.

    - -

    Parameter

    -
      -
    • - -

      #table Points : -A table of route points.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTasking.Task#Task:

    - - -
    -
    -
    -
    - - -CONTROLLABLE:TaskRouteToVec2(Vec2, Speed, Formation) - -
    -
    - -

    (GROUND) Route the controllable to a given Vec2.

    - - -

    A speed can be given in km/h. -A given formation can be given.

    - -

    Parameters

    -
      -
    • - -

      #Vec2 Vec2 : -The Vec2 where to route to.

      - -
    • -
    • - -

      #number Speed : -The speed.

      - -
    • -
    • - -

      Base#FORMATION Formation : -The formation string.

      - -
    • -
    -
    -
    -
    -
    - - -CONTROLLABLE:TaskRouteToZone(Zone, Randomize, Speed, Formation) - -
    -
    - -

    (AIR + GROUND) Route the controllable to a given zone.

    - - -

    The controllable final destination point can be randomized. -A speed can be given in km/h. -A given formation can be given.

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE Zone : -The zone where to route to.

      - -
    • -
    • - -

      #boolean Randomize : -Defines whether to target point gets randomized within the Zone.

      - -
    • -
    • - -

      #number Speed : -The speed.

      - -
    • -
    • - -

      Base#FORMATION Formation : -The formation string.

      - -
    • -
    -
    -
    -
    -
    - - - -CONTROLLABLE.TaskScheduler - -
    -
    - - - -
    -
    -
    -
    - - -CONTROLLABLE:TaskWrappedAction(DCSCommand, Index) - -
    -
    - -

    Return a WrappedAction Task taking a Command.

    - -

    Parameters

    - -

    Return value

    - -

    Dcs.DCSTasking.Task#Task:

    - - -
    -
    -
    -
    - - -CONTROLLABLE:WayPointExecute(WayPoint, WaitTime) - -
    -
    - -

    Executes the WayPoint plan.

    - - -

    The function gets a WayPoint parameter, that you can use to restart the mission at a specific WayPoint. -Note that when the WayPoint parameter is used, the new start mission waypoint of the controllable will be 1!

    - -

    Parameters

    -
      -
    • - -

      #number WayPoint : -The WayPoint from where to execute the mission.

      - -
    • -
    • - -

      #number WaitTime : -The amount seconds to wait before initiating the mission.

      - -
    • -
    -

    Return value

    - -

    #CONTROLLABLE:

    - - -
    -
    -
    -
    - - -CONTROLLABLE:WayPointFunction(WayPoint, WayPointIndex, WayPointFunction, ...) - -
    -
    - -

    Registers a waypoint function that will be executed when the controllable moves over the WayPoint.

    - -

    Parameters

    -
      -
    • - -

      #number WayPoint : -The waypoint number. Note that the start waypoint on the route is WayPoint 1!

      - -
    • -
    • - -

      #number WayPointIndex : -When defining multiple WayPoint functions for one WayPoint, use WayPointIndex to set the sequence of actions.

      - -
    • -
    • - -

      #function WayPointFunction : -The waypoint function to be called when the controllable moves over the waypoint. The waypoint function takes variable parameters.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #CONTROLLABLE:

    - - -
    -
    -
    -
    - - -CONTROLLABLE:WayPointInitialize(WayPoints) - -
    -
    - -

    Retrieve the controllable mission and allow to place function hooks within the mission waypoint plan.

    - - -

    Use the method Controllable#CONTROLLABLE to define the hook functions for specific waypoints. - Use the method @{Controllable@CONTROLLABLE:WayPointExecute) to start the execution of the new mission plan. - Note that when WayPointInitialize is called, the Mission of the controllable is RESTARTED!

    - -

    Parameter

    -
      -
    • - -

      #table WayPoints : -If WayPoints is given, then use the route.

      - -
    • -
    -

    Return value

    - -

    #CONTROLLABLE:

    - - -
    -
    -
    -
    - - - -CONTROLLABLE.WayPoints - -
    -
    - - - -
    -
    -
    -
    - - -CONTROLLABLE:_GetController() - -
    -
    - -

    Get the controller for the CONTROLLABLE.

    - -

    Return value

    - -

    Dcs.DCSController#Controller:

    - - -
    -
    - -

    Type DCSCommand

    - -

    Type DCSStopCondition

    - -

    Type Vec2

    -

    Field(s)

    -
    -
    - - - -Vec2.x - -
    -
    - - - -
    -
    -
    -
    - - - -Vec2.y - -
    -
    - - - -
    -
    - -

    Type list

    - -
    - -
    - - diff --git a/docs/Documentation/DCSAirbase.html b/docs/Documentation/DCSAirbase.html deleted file mode 100644 index d3aa90a32..000000000 --- a/docs/Documentation/DCSAirbase.html +++ /dev/null @@ -1,498 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module DCSAirbase

    - - - -

    Global(s)

    - - - - - -
    Airbase - -
    -

    Type Airbase

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Airbase.Category -

    enum contains identifiers of airbase categories.

    -
    Airbase.Desc -

    Airbase descriptor. Airdromes are unique and their types are unique, but helipads and ships are not always unique and may have the same type.

    -
    Airbase.ID -

    Identifier of an airbase. It assigned to an airbase by the Mission Editor automatically. This identifier is used in AI tasks to refer an airbase that exists (spawned and not dead) or not.

    -
    Airbase.getByName(name) -

    Returns airbase by its name.

    -
    Airbase:getCallsign() -

    Returns the airbase's callsign - the localized string.

    -
    Airbase:getDesc() -

    Returns descriptor of the airbase.

    -
    Airbase.getDescByName(typeName) -

    Returns airbase descriptor by type name.

    -
    Airbase:getID() -

    Returns identifier of the airbase.

    -
    Airbase:getUnit() -

    Returns Unit that is corresponded to the airbase.

    -
    - -

    Type Airbase.Category

    - - - - - - - - - - - - - -
    Airbase.Category.AIRDROME - -
    Airbase.Category.HELIPAD - -
    Airbase.Category.SHIP - -
    - -

    Type Airbase.Desc

    - - - - - -
    Airbase.Desc.category -

    Category of the airbase type.

    -
    - -

    Global(s)

    -
    -
    - - #Airbase - -Airbase - -
    -
    - - - -
    -
    -

    Type DCSAirbase

    - -

    Type Airbase

    - -

    Represents airbases: airdromes, helipads and ships with flying decks or landing pads.

    - - -

    - -

    Field(s)

    -
    -
    - - #Airbase.Category - -Airbase.Category - -
    -
    - -

    enum contains identifiers of airbase categories.

    - -
    -
    -
    -
    - - #Airbase.Desc - -Airbase.Desc - -
    -
    - -

    Airbase descriptor. Airdromes are unique and their types are unique, but helipads and ships are not always unique and may have the same type.

    - -
    -
    -
    -
    - - #Airbase.ID - -Airbase.ID - -
    -
    - -

    Identifier of an airbase. It assigned to an airbase by the Mission Editor automatically. This identifier is used in AI tasks to refer an airbase that exists (spawned and not dead) or not.

    - -
    -
    -
    -
    - - -Airbase.getByName(name) - -
    -
    - -

    Returns airbase by its name.

    - - -

    If no airbase found the function will return nil.

    - -

    Parameter

    -
      -
    • - -

      #string name :

      - -
    • -
    -

    Return value

    - -

    #Airbase:

    - - -
    -
    -
    -
    - - -Airbase:getCallsign() - -
    -
    - -

    Returns the airbase's callsign - the localized string.

    - -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -Airbase:getDesc() - -
    -
    - -

    Returns descriptor of the airbase.

    - -

    Return value

    - -

    #Airbase.Desc:

    - - -
    -
    -
    -
    - - -Airbase.getDescByName(typeName) - -
    -
    - -

    Returns airbase descriptor by type name.

    - - -

    If no descriptor is found the function will return nil.

    - -

    Parameter

    -
      -
    • - -

      #TypeName typeName : -Airbase type name.

      - -
    • -
    -

    Return value

    - -

    #Airbase.Desc:

    - - -
    -
    -
    -
    - - -Airbase:getID() - -
    -
    - -

    Returns identifier of the airbase.

    - -

    Return value

    - -

    #Airbase.ID:

    - - -
    -
    -
    -
    - - -Airbase:getUnit() - -
    -
    - -

    Returns Unit that is corresponded to the airbase.

    - - -

    Works only for ships.

    - -

    Return value

    - -

    Wrapper.Unit#Unit:

    - - -
    -
    - -

    Type Airbase.Category

    - -

    Enum contains identifiers of airbase categories.

    - -

    Field(s)

    -
    -
    - - -Airbase.Category.AIRDROME - -
    -
    - - - -
    -
    -
    -
    - - -Airbase.Category.HELIPAD - -
    -
    - - - -
    -
    -
    -
    - - -Airbase.Category.SHIP - -
    -
    - - - -
    -
    - -

    Type Airbase.Desc

    - -

    Airbase descriptor.

    - - -

    Airdromes are unique and their types are unique, but helipads and ships are not always unique and may have the same type.

    - -

    Field(s)

    -
    -
    - - #Airbase.Category - -Airbase.Desc.category - -
    -
    - -

    Category of the airbase type.

    - -
    -
    - -

    Type Airbase.ID

    - -

    Type TypeName

    - -
    - -
    - - diff --git a/docs/Documentation/DCSCoalitionObject.html b/docs/Documentation/DCSCoalitionObject.html deleted file mode 100644 index cb2fe508a..000000000 --- a/docs/Documentation/DCSCoalitionObject.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module DCSCoalitionObject

    - - - -

    Global(s)

    - - - - - - - - - -
    CoalitionObject - -
    coalition - -
    -

    Type CoalitionObject

    - - - - - - - - - -
    CoalitionObject:getCoalition() -

    Returns coalition of the object.

    -
    CoalitionObject:getCountry() -

    Returns object country.

    -
    - -

    Global(s)

    -
    -
    - - #CoalitionObject - -CoalitionObject - -
    -
    - - - -
    -
    -
    -
    - - #coalition - -coalition - -
    -
    - - - -
    -
    -

    Type DCSCoalitionObject

    - -

    Type CoalitionObject

    -

    Field(s)

    -
    -
    - - -CoalitionObject:getCoalition() - -
    -
    - -

    Returns coalition of the object.

    - -

    Return value

    - -

    Dcs.DCSTypes#coalition.side:

    - - -
    -
    -
    -
    - - -CoalitionObject:getCountry() - -
    -
    - -

    Returns object country.

    - -

    Return value

    - -

    #country.id:

    - - -
    -
    - -

    Type coalition

    - -

    Type country.id

    - -
    - -
    - - diff --git a/docs/Documentation/DCSCommand.html b/docs/Documentation/DCSCommand.html deleted file mode 100644 index c2776fc3f..000000000 --- a/docs/Documentation/DCSCommand.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    - - - diff --git a/docs/Documentation/DCSController.html b/docs/Documentation/DCSController.html deleted file mode 100644 index 74d16e392..000000000 --- a/docs/Documentation/DCSController.html +++ /dev/null @@ -1,773 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module DCSController

    - - - -

    Global(s)

    - - - - - -
    Controller - -
    -

    Type Controller

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Controller.Detection -

    Enum contains identifiers of surface types.

    -
    Controller:getDetectedTargets(detection) -

    Returns list of detected targets.

    -
    Controller:hasTask() -

    Returns true if the controller has a task.

    -
    Controller:isTargetDetected(target, detection) -

    Checks if the target is detected or not.

    -
    Controller:knowTarget(object, type, distance) -

    Know a target.

    -
    Controller:popTask() -

    Pops current (front) task from the queue and makes active next task in the queue (if exists).

    -
    Controller:pushTask(task) -

    Pushes the task to the front of the queue and makes the task active.

    -
    Controller:resetTask() -

    Resets current task of the controller.

    -
    Controller:setOnOff(value) -

    Enables and disables the controller.

    -
    Controller:setOption(optionId, optionValue) -

    Sets the option to the controller.

    -
    Controller:setTask(task) -

    Resets current task and then sets the task to the controller.

    -
    - -

    Type Controller.Detection

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    Controller.Detection.DLINK - -
    Controller.Detection.IRST - -
    Controller.Detection.OPTIC - -
    Controller.Detection.RADAR - -
    Controller.Detection.RWR - -
    Controller.Detection.VISUAL - -
    - -

    Type DetectedTarget

    - - - - - - - - - - - - - - - - - -
    DetectedTarget.distance -

    Distance to the target is known

    -
    DetectedTarget.object -

    The target

    -
    DetectedTarget.type -

    The target type is known

    -
    DetectedTarget.visible -

    The target is visible

    -
    - -

    Global(s)

    -
    -
    - - #Controller - -Controller - -
    -
    - - - -
    -
    -

    Type DCSController

    - -

    Type Controller

    - -

    Controller is an object that performs A.I.-routines.

    - - -

    Other words controller is an instance of A.I.. Controller stores current main task, active enroute tasks and behavior options. Controller performs commands. Please, read DCS A-10C GUI Manual EN.pdf chapter "Task Planning for Unit Groups", page 91 to understand A.I. system of DCS:A-10C.

    - -

    This class has 2 types of functions:

    - -
      -
    • Tasks
    • -
    • Commands: Commands are instant actions those required zero time to perform. Commands may be used both for control unit/group behavior and control game mechanics.
    • -
    - -

    Field(s)

    -
    -
    - - #Controller.Detection - -Controller.Detection - -
    -
    - -

    Enum contains identifiers of surface types.

    - -
    -
    -
    -
    - - -Controller:getDetectedTargets(detection) - -
    -
    - -

    Returns list of detected targets.

    - - -

    If one or more detection method is specified the function will return targets which were detected by at least one of these methods. If no detection methods are specified the function will return targets which were detected by any method.

    - -

    Parameter

    -
      -
    • - -

      #Controller.Detection detection : -Controller.Detection detection1, Controller.Detection detection2, ... Controller.Detection detectionN

      - -
    • -
    -

    Return value

    - -

    #list:

    -

    DetectedTarget> array of DetectedTarget

    - -
    -
    -
    -
    - - -Controller:hasTask() - -
    -
    - -

    Returns true if the controller has a task.

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -Controller:isTargetDetected(target, detection) - -
    -
    - -

    Checks if the target is detected or not.

    - - -

    If one or more detection method is specified the function will return true if the target is detected by at least one of these methods. If no detection methods are specified the function will return true if the target is detected by any method.

    - -

    Parameters

    - -

    Return values

    -
      -
    1. - -

      #boolean: -detected True if the target is detected.

      - -
    2. -
    3. - -

      #boolean: -visible Has effect only if detected is true. True if the target is visible now.

      - -
    4. -
    5. - -

      #ModelTime: -lastTime Has effect only if visible is false. Last time when target was seen.

      - -
    6. -
    7. - -

      #boolean: -type Has effect only if detected is true. True if the target type is known.

      - -
    8. -
    9. - -

      #boolean: -distance Has effect only if detected is true. True if the distance to the target is known.

      - -
    10. -
    11. - -

      #Vec3: -lastPos Has effect only if visible is false. Last position of the target when it was seen.

      - -
    12. -
    13. - -

      #Vec3: -lastVel Has effect only if visible is false. Last velocity of the target when it was seen.

      - -
    14. -
    -
    -
    -
    -
    - - -Controller:knowTarget(object, type, distance) - -
    -
    - -

    Know a target.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Object#Object object : -The target.

      - -
    • -
    • - -

      #boolean type : -Target type is known.

      - -
    • -
    • - -

      #boolean distance : -Distance to target is known.

      - -
    • -
    -
    -
    -
    -
    - - -Controller:popTask() - -
    -
    - -

    Pops current (front) task from the queue and makes active next task in the queue (if exists).

    - - -

    If no more tasks in the queue the function works like function Controller.resetTask() function. Does nothing if the queue is empty.

    - -
    -
    -
    -
    - - -Controller:pushTask(task) - -
    -
    - -

    Pushes the task to the front of the queue and makes the task active.

    - - -

    Further call of function Controller.setTask() function will stop current task, clear the queue and set the new task active. If the task queue is empty the function will work like function Controller.setTask() function.

    - -

    Parameter

    -
      -
    • - -

      #Task task :

      - -
    • -
    -
    -
    -
    -
    - - -Controller:resetTask() - -
    -
    - -

    Resets current task of the controller.

    - -
    -
    -
    -
    - - -Controller:setOnOff(value) - -
    -
    - -

    Enables and disables the controller.

    - - -

    Note: Now it works only for ground / naval groups!

    - -

    Parameter

    -
      -
    • - -

      #boolean value : -Enable / Disable.

      - -
    • -
    -
    -
    -
    -
    - - -Controller:setOption(optionId, optionValue) - -
    -
    - -

    Sets the option to the controller.

    - - -

    Option is a pair of identifier and value. Behavior options are global parameters those affect controller behavior in all tasks it performs. -Option identifiers and values are stored in table AI.Option in subtables Air, Ground and Naval.

    - -

    OptionId = AI.Option.Air.id or AI.Option.Ground.id or AI.Option.Naval.id -OptionValue = AI.Option.Air.val[optionName] or AI.Option.Ground.val[optionName] or AI.Option.Naval.val[optionName]

    - - -

    Parameters

    -
      -
    • - -

      #OptionId optionId : -Option identifier.

      - -
    • -
    • - -

      #OptionValue optionValue : -Value of the option.

      - -
    • -
    -
    -
    -
    -
    - - -Controller:setTask(task) - -
    -
    - -

    Resets current task and then sets the task to the controller.

    - - -

    Task is a table that contains task identifier and task parameters.

    - -

    Parameter

    -
      -
    • - -

      #Task task :

      - -
    • -
    -
    -
    - -

    Type Controller.Detection

    - -

    Enum contains identifiers of surface types.

    - -

    Field(s)

    -
    -
    - - -Controller.Detection.DLINK - -
    -
    - - - -
    -
    -
    -
    - - -Controller.Detection.IRST - -
    -
    - - - -
    -
    -
    -
    - - -Controller.Detection.OPTIC - -
    -
    - - - -
    -
    -
    -
    - - -Controller.Detection.RADAR - -
    -
    - - - -
    -
    -
    -
    - - -Controller.Detection.RWR - -
    -
    - - - -
    -
    -
    -
    - - -Controller.Detection.VISUAL - -
    -
    - - - -
    -
    - -

    Type DetectedTarget

    - -

    Detected target.

    - -

    Field(s)

    -
    -
    - - #boolean - -DetectedTarget.distance - -
    -
    - -

    Distance to the target is known

    - -
    -
    -
    -
    - - Wrapper.Object#Object - -DetectedTarget.object - -
    -
    - -

    The target

    - -
    -
    -
    -
    - - #boolean - -DetectedTarget.type - -
    -
    - -

    The target type is known

    - -
    -
    -
    -
    - - #boolean - -DetectedTarget.visible - -
    -
    - -

    The target is visible

    - -
    -
    - -

    Type ModelTime

    - -

    Type OptionId

    - -

    Type OptionValue

    - -

    Type Task

    - -

    Type Vec3

    - -

    Type list

    - -
    - -
    - - diff --git a/docs/Documentation/DCSGroup.html b/docs/Documentation/DCSGroup.html deleted file mode 100644 index 4d9c33b69..000000000 --- a/docs/Documentation/DCSGroup.html +++ /dev/null @@ -1,605 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module DCSGroup

    - - - -

    Global(s)

    - - - - - -
    Group - -
    -

    Type Group

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Group.Category -

    Enum contains identifiers of group types.

    -
    Group.ID -

    Identifier of a group. It is assigned to a group by Mission Editor automatically.

    -
    Group:destroy() -

    Destroys the group and all of its units.

    -
    Group.getByName(name) -

    Returns group by the name assigned to the group in Mission Editor.

    -
    Group:getCategory() -

    Returns category of the group.

    -
    Group:getCoalition() -

    Returns the coalition of the group.

    -
    Group:getController() -

    Returns controller of the group.

    -
    Group:getID() -

    Returns the group identifier.

    -
    Group:getInitialSize() -

    Returns initial size of the group.

    -
    Group:getName() -

    Returns the group's name.

    -
    Group:getSize() -

    Returns current size of the group.

    -
    Group:getUnit(unitNumber) -

    Returns the unit with number unitNumber.

    -
    Group:getUnits() -

    Returns array of the units present in the group now.

    -
    Group:isExist() -

    returns true if the group exist or false otherwise.

    -
    - -

    Type Group.Category

    - - - - - - - - - - - - - - - - - -
    Group.Category.AIRPLANE - -
    Group.Category.GROUND - -
    Group.Category.HELICOPTER - -
    Group.Category.SHIP - -
    - -

    Global(s)

    -
    -
    - - #Group - -Group - -
    -
    - - - -
    -
    -

    Type DCSGroup

    - -

    Type Group

    - -

    Represents group of Units.

    - -

    Field(s)

    -
    -
    - - #Group.Category - -Group.Category - -
    -
    - -

    Enum contains identifiers of group types.

    - -
    -
    -
    -
    - - #ID - -Group.ID - -
    -
    - -

    Identifier of a group. It is assigned to a group by Mission Editor automatically.

    - -
    -
    -
    -
    - - -Group:destroy() - -
    -
    - -

    Destroys the group and all of its units.

    - -
    -
    -
    -
    - - -Group.getByName(name) - -
    -
    - -

    Returns group by the name assigned to the group in Mission Editor.

    - -

    Parameter

    -
      -
    • - -

      #string name :

      - -
    • -
    -

    Return value

    - -

    #Group:

    - - -
    -
    -
    -
    - - -Group:getCategory() - -
    -
    - -

    Returns category of the group.

    - -

    Return value

    - -

    #Group.Category:

    - - -
    -
    -
    -
    - - -Group:getCoalition() - -
    -
    - -

    Returns the coalition of the group.

    - -

    Return value

    - -

    Dcs.DCSCoalitionWrapper.Object#coalition.side:

    - - -
    -
    -
    -
    - - -Group:getController() - -
    -
    - -

    Returns controller of the group.

    - -

    Return value

    - -

    Controller#Controller:

    - - -
    -
    -
    -
    - - -Group:getID() - -
    -
    - -

    Returns the group identifier.

    - -

    Return value

    - -

    #ID:

    - - -
    -
    -
    -
    - - -Group:getInitialSize() - -
    -
    - -

    Returns initial size of the group.

    - - -

    If some of the units will be destroyed, initial size of the group will not be changed. Initial size limits the unitNumber parameter for Group.getUnit() function.

    - -

    Return value

    - -

    #number:

    - - -
    -
    -
    -
    - - -Group:getName() - -
    -
    - -

    Returns the group's name.

    - - -

    This is the same name assigned to the group in Mission Editor.

    - -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -Group:getSize() - -
    -
    - -

    Returns current size of the group.

    - - -

    If some of the units will be destroyed, As units are destroyed the size of the group will be changed.

    - -

    Return value

    - -

    #number:

    - - -
    -
    -
    -
    - - -Group:getUnit(unitNumber) - -
    -
    - -

    Returns the unit with number unitNumber.

    - - -

    If the unit is not exists the function will return nil.

    - -

    Parameter

    -
      -
    • - -

      #number unitNumber :

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSWrapper.Unit#Unit:

    - - -
    -
    -
    -
    - - -Group:getUnits() - -
    -
    - -

    Returns array of the units present in the group now.

    - - -

    Destroyed units will not be enlisted at all.

    - -

    Return value

    - -

    #list: -Dcs.DCSWrapper.Unit#Unit> array of Units

    - -
    -
    -
    -
    - - -Group:isExist() - -
    -
    - -

    returns true if the group exist or false otherwise.

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    - -

    Type Group.Category

    - -

    Enum contains identifiers of group types.

    - -

    Field(s)

    -
    -
    - - -Group.Category.AIRPLANE - -
    -
    - - - -
    -
    -
    -
    - - -Group.Category.GROUND - -
    -
    - - - -
    -
    -
    -
    - - -Group.Category.HELICOPTER - -
    -
    - - - -
    -
    -
    -
    - - -Group.Category.SHIP - -
    -
    - - - -
    -
    - -

    Type ID

    - -

    Type list

    - -
    - -
    - - diff --git a/docs/Documentation/DCSObject.html b/docs/Documentation/DCSObject.html deleted file mode 100644 index 8d3b72e39..000000000 --- a/docs/Documentation/DCSObject.html +++ /dev/null @@ -1,626 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module DCSObject

    - - - -

    Global(s)

    - - - - - -
    Object - -
    -

    Type Object

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Object.Category - -
    Object.Desc - -
    Object:destroy() - -
    Object:getCategory() - -
    Object:getDesc() -

    Returns object descriptor.

    -
    Object:getName() -

    Returns name of the object.

    -
    Object:getPoint() -

    Returns object coordinates for current time.

    -
    Object:getPosition() -

    Returns object position for current time.

    -
    Object:getTypeName() -

    Returns type name of the Object.

    -
    Object:getVelocity() -

    Returns the unit's velocity vector.

    -
    Object:hasAttribute(attributeName) -

    Returns true if the object belongs to the category.

    -
    Object:inAir() -

    Returns true if the unit is in air.

    -
    Object:isExist() - -
    - -

    Type Object.Category

    - - - - - - - - - - - - - - - - - - - - - -
    Object.Category.BASE - -
    Object.Category.SCENERY - -
    Object.Category.STATIC - -
    Object.Category.UNIT - -
    Object.Category.WEAPON - -
    - -

    Type Object.Desc

    - - - - - - - - - -
    Object.Desc.box -

    bounding box of collision geometry

    -
    Object.Desc.life -

    initial life level

    -
    - -

    Global(s)

    -
    -
    - - #Object - -Object - -
    -
    - - - -
    -
    -

    Type DCSObject

    - -

    Type AttributeName

    - -

    Type Box3

    - -

    Type Object

    -

    Field(s)

    -
    -
    - - #Object.Category - -Object.Category - -
    -
    - - - -
    -
    -
    -
    - - #Object.Desc - -Object.Desc - -
    -
    - - - -
    -
    -
    -
    - - -Object:destroy() - -
    -
    - - - -
    -
    -
    -
    - - -Object:getCategory() - -
    -
    - - - -

    Return value

    - -

    #Object.Category:

    - - -
    -
    -
    -
    - - -Object:getDesc() - -
    -
    - -

    Returns object descriptor.

    - -

    Return value

    - -

    #Object.Desc:

    - - -
    -
    -
    -
    - - -Object:getName() - -
    -
    - -

    Returns name of the object.

    - - -

    This is the name that is assigned to the object in the Mission Editor.

    - -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -Object:getPoint() - -
    -
    - -

    Returns object coordinates for current time.

    - -

    Return value

    - -

    #Vec3:

    - - -
    -
    -
    -
    - - -Object:getPosition() - -
    -
    - -

    Returns object position for current time.

    - -

    Return value

    - -

    #Position3:

    - - -
    -
    -
    -
    - - -Object:getTypeName() - -
    -
    - -

    Returns type name of the Object.

    - -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -Object:getVelocity() - -
    -
    - -

    Returns the unit's velocity vector.

    - -

    Return value

    - -

    #Vec3:

    - - -
    -
    -
    -
    - - -Object:hasAttribute(attributeName) - -
    -
    - -

    Returns true if the object belongs to the category.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -Object:inAir() - -
    -
    - -

    Returns true if the unit is in air.

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -Object:isExist() - -
    -
    - - - -

    Return value

    - -

    #boolean:

    - - -
    -
    - -

    Type Object.Category

    -

    Field(s)

    -
    -
    - - -Object.Category.BASE - -
    -
    - - - -
    -
    -
    -
    - - -Object.Category.SCENERY - -
    -
    - - - -
    -
    -
    -
    - - -Object.Category.STATIC - -
    -
    - - - -
    -
    -
    -
    - - -Object.Category.UNIT - -
    -
    - - - -
    -
    -
    -
    - - -Object.Category.WEAPON - -
    -
    - - - -
    -
    - -

    Type Object.Desc

    -

    Field(s)

    -
    -
    - - #Box3 - -Object.Desc.box - -
    -
    - -

    bounding box of collision geometry

    - -
    -
    -
    -
    - - #number - -Object.Desc.life - -
    -
    - -

    initial life level

    - -
    -
    - -

    Type Position3

    - -

    Type Vec3

    - -
    - -
    - - diff --git a/docs/Documentation/DCSTask.html b/docs/Documentation/DCSTask.html deleted file mode 100644 index bbf5baa91..000000000 --- a/docs/Documentation/DCSTask.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    - - - diff --git a/docs/Documentation/DCSTypes.html b/docs/Documentation/DCSTypes.html deleted file mode 100644 index a336575bf..000000000 --- a/docs/Documentation/DCSTypes.html +++ /dev/null @@ -1,2541 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module DCSTypes

    - - - -

    Global(s)

    - - - - - -
    AI - -
    -

    Type AI

    - - - - - - - - - - - - - -
    AI.Option - -
    AI.Skill - -
    AI.Task - -
    - -

    Type AI.Option

    - - - - - - - - - - - - - -
    AI.Option.Air - -
    AI.Option.Ground - -
    AI.Option.Naval - -
    - -

    Type AI.Option.Air

    - - - - - - - - - -
    AI.Option.Air.id - -
    AI.Option.Air.val - -
    - -

    Type AI.Option.Air.val

    - - - - - - - - - - - - - - - - - -
    AI.Option.Air.val.FLARE_USING - -
    AI.Option.Air.val.RADAR_USING - -
    AI.Option.Air.val.REACTION_ON_THREAT - -
    AI.Option.Air.val.ROE - -
    - -

    Type AI.Option.Air.val.FLARE_USING

    - - - - - - - - - - - - - - - - - -
    AI.Option.Air.val.FLARE_USING.AGAINST_FIRED_MISSILE - -
    AI.Option.Air.val.FLARE_USING.NEVER - -
    AI.Option.Air.val.FLARE_USING.WHEN_FLYING_IN_SAM_WEZ - -
    AI.Option.Air.val.FLARE_USING.WHEN_FLYING_NEAR_ENEMIES - -
    - -

    Type AI.Option.Air.val.RADAR_USING

    - - - - - - - - - - - - - - - - - -
    AI.Option.Air.val.RADAR_USING.FOR_ATTACK_ONLY - -
    AI.Option.Air.val.RADAR_USING.FOR_CONTINUOUS_SEARCH - -
    AI.Option.Air.val.RADAR_USING.FOR_SEARCH_IF_REQUIRED - -
    AI.Option.Air.val.RADAR_USING.NEVER - -
    - -

    Type AI.Option.Air.val.REACTION_ON_THREAT

    - - - - - - - - - - - - - - - - - - - - - -
    AI.Option.Air.val.REACTION_ON_THREAT.ALLOW_ABORT_MISSION - -
    AI.Option.Air.val.REACTION_ON_THREAT.BYPASS_AND_ESCAPE - -
    AI.Option.Air.val.REACTION_ON_THREAT.EVADE_FIRE - -
    AI.Option.Air.val.REACTION_ON_THREAT.NO_REACTION - -
    AI.Option.Air.val.REACTION_ON_THREAT.PASSIVE_DEFENCE - -
    - -

    Type AI.Option.Air.val.ROE

    - - - - - - - - - - - - - - - - - - - - - -
    AI.Option.Air.val.ROE.OPEN_FIRE - -
    AI.Option.Air.val.ROE.OPEN_FIRE_WEAPON_FREE - -
    AI.Option.Air.val.ROE.RETURN_FIRE - -
    AI.Option.Air.val.ROE.WEAPON_FREE - -
    AI.Option.Air.val.ROE.WEAPON_HOLD - -
    - -

    Type AI.Option.Ground

    - - - - - - - - - -
    AI.Option.Ground.id - -
    AI.Option.Ground.val - -
    - -

    Type AI.Option.Ground.id

    - - - - - - - - - - - - - - - - - -
    AI.Option.Ground.id.ALARM_STATE -

    AI.Option.Ground.val.ALARM_STATE

    -
    AI.Option.Ground.id.DISPERSE_ON_ATTACK -

    true or false

    -
    AI.Option.Ground.id.NO_OPTION - -
    AI.Option.Ground.id.ROE -

    AI.Option.Ground.val.ROE

    -
    - -

    Type AI.Option.Ground.val

    - - - - - - - - - -
    AI.Option.Ground.val.ALARM_STATE - -
    AI.Option.Ground.val.ROE - -
    - -

    Type AI.Option.Ground.val.ALARM_STATE

    - - - - - - - - - - - - - -
    AI.Option.Ground.val.ALARM_STATE.AUTO - -
    AI.Option.Ground.val.ALARM_STATE.GREEN - -
    AI.Option.Ground.val.ALARM_STATE.RED - -
    - -

    Type AI.Option.Ground.val.ROE

    - - - - - - - - - - - - - -
    AI.Option.Ground.val.ROE.OPEN_FIRE - -
    AI.Option.Ground.val.ROE.RETURN_FIRE - -
    AI.Option.Ground.val.ROE.WEAPON_HOLD - -
    - -

    Type AI.Option.Naval

    - - - - - - - - - -
    AI.Option.Naval.id - -
    AI.Option.Naval.val - -
    - -

    Type AI.Option.Naval.id

    - - - - - - - - - -
    AI.Option.Naval.id.NO_OPTION - -
    AI.Option.Naval.id.ROE - -
    - -

    Type AI.Option.Naval.val

    - - - - - -
    AI.Option.Naval.val.ROE - -
    - -

    Type AI.Option.Naval.val.ROE

    - - - - - - - - - - - - - -
    AI.Option.Naval.val.ROE.OPEN_FIRE - -
    AI.Option.Naval.val.ROE.RETURN_FIRE - -
    AI.Option.Naval.val.ROE.WEAPON_HOLD - -
    - -

    Type AI.Skill

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    AI.Skill.AVERAGE - -
    AI.Skill.CLIENT - -
    AI.Skill.EXCELLENT - -
    AI.Skill.GOOD - -
    AI.Skill.HIGH - -
    AI.Skill.PLAYER - -
    - -

    Type AI.Task

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AI.Task.AltitudeType - -
    AI.Task.Designation - -
    AI.Task.OrbitPattern - -
    AI.Task.TurnMethod - -
    AI.Task.VehicleFormation - -
    AI.Task.WaypointType - -
    AI.Task.WeaponExpend - -
    - -

    Type AI.Task.AltitudeType

    - - - - - - - - - -
    AI.Task.AltitudeType.BARO - -
    AI.Task.AltitudeType.RADIO - -
    - -

    Type AI.Task.Designation

    - - - - - - - - - - - - - - - - - - - - - -
    AI.Task.Designation.AUTO - -
    AI.Task.Designation.IR_POINTER - -
    AI.Task.Designation.LASER - -
    AI.Task.Designation.NO - -
    AI.Task.Designation.WP - -
    - -

    Type AI.Task.OrbitPattern

    - - - - - - - - - -
    AI.Task.OrbitPattern.CIRCLE - -
    AI.Task.OrbitPattern.RACE_TRACK - -
    - -

    Type AI.Task.TurnMethod

    - - - - - - - - - -
    AI.Task.TurnMethod.FIN_POINT - -
    AI.Task.TurnMethod.FLY_OVER_POINT - -
    - -

    Type AI.Task.VehicleFormation

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AI.Task.VehicleFormation.CONE - -
    AI.Task.VehicleFormation.DIAMOND - -
    AI.Task.VehicleFormation.ECHELON_LEFT - -
    AI.Task.VehicleFormation.ECHELON_RIGHT - -
    AI.Task.VehicleFormation.OFF_ROAD - -
    AI.Task.VehicleFormation.ON_ROAD - -
    AI.Task.VehicleFormation.RANK - -
    AI.Task.VehicleFormation.VEE - -
    - -

    Type AI.Task.WaypointType

    - - - - - - - - - - - - - - - - - -
    AI.Task.WaypointType.LAND - -
    AI.Task.WaypointType.TAKEOFF - -
    AI.Task.WaypointType.TAKEOFF_PARKING - -
    AI.Task.WaypointType.TURNING_POINT - -
    - -

    Type AI.Task.WeaponExpend

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    AI.Task.WeaponExpend.ALL - -
    AI.Task.WeaponExpend.FOUR - -
    AI.Task.WeaponExpend.HALF - -
    AI.Task.WeaponExpend.ONE - -
    AI.Task.WeaponExpend.QUARTER - -
    AI.Task.WeaponExpend.TWO - -
    - -

    Type Box3

    - - - - - - - - - -
    Box3.max - -
    Box3.min - -
    - -

    Type Desc

    - - - - - - - - - - - - - -
    Desc.attributes -

    object type attributes

    -
    Desc.displayName -

    localized display name

    -
    Desc.typeName -

    type name

    -
    - -

    Type Position3

    - - - - - - - - - - - - - - - - - -
    Position3.p - -
    Position3.x - -
    Position3.y - -
    Position3.z - -
    - -

    Type Vec2

    - - - - - - - - - -
    Vec2.x -

    Vec2.x = Vec3.x

    -
    Vec2.y -

    Vec2.y = Vec3.z

    -
    - -

    Type Vec3

    - - - - - - - - - - - - - -
    Vec3.x -

    is directed to the north

    -
    Vec3.y -

    is directed up

    -
    Vec3.z -

    is directed to the east

    -
    - -

    Global(s)

    -
    -
    - - #AI - -AI - -
    -
    - - - -
    -
    -

    Type DCSTypes

    - -

    Type AI

    -

    Field(s)

    -
    -
    - - #AI.Option - -AI.Option - -
    -
    - - - -
    -
    -
    -
    - - #AI.Skill - -AI.Skill - -
    -
    - - - -
    -
    -
    -
    - - #AI.Task - -AI.Task - -
    -
    - - - -
    -
    - -

    Type AI.Option

    -

    Field(s)

    -
    -
    - - #AI.Option.Air - -AI.Option.Air - -
    -
    - - - -
    -
    -
    -
    - - #AI.Option.Ground - -AI.Option.Ground - -
    -
    - - - -
    -
    -
    -
    - - #AI.Option.Naval - -AI.Option.Naval - -
    -
    - - - -
    -
    - -

    Type AI.Option.Air

    -

    Field(s)

    -
    -
    - - #AI.Option.Air.id - -AI.Option.Air.id - -
    -
    - - - -
    -
    -
    -
    - - #AI.Option.Air.val - -AI.Option.Air.val - -
    -
    - - - -
    -
    - -

    Type AI.Option.Air.id

    - -

    Type AI.Option.Air.val

    -

    Field(s)

    -
    -
    - - #AI.Option.Air.val.FLARE_USING - -AI.Option.Air.val.FLARE_USING - -
    -
    - - - -
    -
    -
    -
    - - #AI.Option.Air.val.RADAR_USING - -AI.Option.Air.val.RADAR_USING - -
    -
    - - - -
    -
    -
    -
    - - #AI.Option.Air.val.REACTION_ON_THREAT - -AI.Option.Air.val.REACTION_ON_THREAT - -
    -
    - - - -
    -
    -
    -
    - - #AI.Option.Air.val.ROE - -AI.Option.Air.val.ROE - -
    -
    - - - -
    -
    - -

    Type AI.Option.Air.val.FLARE_USING

    -

    Field(s)

    -
    -
    - - -AI.Option.Air.val.FLARE_USING.AGAINST_FIRED_MISSILE - -
    -
    - - - -
    -
    -
    -
    - - -AI.Option.Air.val.FLARE_USING.NEVER - -
    -
    - - - -
    -
    -
    -
    - - -AI.Option.Air.val.FLARE_USING.WHEN_FLYING_IN_SAM_WEZ - -
    -
    - - - -
    -
    -
    -
    - - -AI.Option.Air.val.FLARE_USING.WHEN_FLYING_NEAR_ENEMIES - -
    -
    - - - -
    -
    - -

    Type AI.Option.Air.val.RADAR_USING

    -

    Field(s)

    -
    -
    - - -AI.Option.Air.val.RADAR_USING.FOR_ATTACK_ONLY - -
    -
    - - - -
    -
    -
    -
    - - -AI.Option.Air.val.RADAR_USING.FOR_CONTINUOUS_SEARCH - -
    -
    - - - -
    -
    -
    -
    - - -AI.Option.Air.val.RADAR_USING.FOR_SEARCH_IF_REQUIRED - -
    -
    - - - -
    -
    -
    -
    - - -AI.Option.Air.val.RADAR_USING.NEVER - -
    -
    - - - -
    -
    - -

    Type AI.Option.Air.val.REACTION_ON_THREAT

    -

    Field(s)

    -
    -
    - - -AI.Option.Air.val.REACTION_ON_THREAT.ALLOW_ABORT_MISSION - -
    -
    - - - -
    -
    -
    -
    - - -AI.Option.Air.val.REACTION_ON_THREAT.BYPASS_AND_ESCAPE - -
    -
    - - - -
    -
    -
    -
    - - -AI.Option.Air.val.REACTION_ON_THREAT.EVADE_FIRE - -
    -
    - - - -
    -
    -
    -
    - - -AI.Option.Air.val.REACTION_ON_THREAT.NO_REACTION - -
    -
    - - - -
    -
    -
    -
    - - -AI.Option.Air.val.REACTION_ON_THREAT.PASSIVE_DEFENCE - -
    -
    - - - -
    -
    - -

    Type AI.Option.Air.val.ROE

    -

    Field(s)

    -
    -
    - - -AI.Option.Air.val.ROE.OPEN_FIRE - -
    -
    - - - -
    -
    -
    -
    - - -AI.Option.Air.val.ROE.OPEN_FIRE_WEAPON_FREE - -
    -
    - - - -
    -
    -
    -
    - - -AI.Option.Air.val.ROE.RETURN_FIRE - -
    -
    - - - -
    -
    -
    -
    - - -AI.Option.Air.val.ROE.WEAPON_FREE - -
    -
    - - - -
    -
    -
    -
    - - -AI.Option.Air.val.ROE.WEAPON_HOLD - -
    -
    - - - -
    -
    - -

    Type AI.Option.Ground

    -

    Field(s)

    -
    -
    - - #AI.Option.Ground.id - -AI.Option.Ground.id - -
    -
    - - - -
    -
    -
    -
    - - #AI.Option.Ground.val - -AI.Option.Ground.val - -
    -
    - - - -
    -
    - -

    Type AI.Option.Ground.id

    -

    Field(s)

    -
    -
    - - -AI.Option.Ground.id.ALARM_STATE - -
    -
    - -

    AI.Option.Ground.val.ALARM_STATE

    - -
    -
    -
    -
    - - -AI.Option.Ground.id.DISPERSE_ON_ATTACK - -
    -
    - -

    true or false

    - -
    -
    -
    -
    - - -AI.Option.Ground.id.NO_OPTION - -
    -
    - - - -
    -
    -
    -
    - - -AI.Option.Ground.id.ROE - -
    -
    - -

    AI.Option.Ground.val.ROE

    - -
    -
    - -

    Type AI.Option.Ground.val

    -

    Field(s)

    -
    -
    - - #AI.Option.Ground.val.ALARM_STATE - -AI.Option.Ground.val.ALARM_STATE - -
    -
    - - - -
    -
    -
    -
    - - #AI.Option.Ground.val.ROE - -AI.Option.Ground.val.ROE - -
    -
    - - - -
    -
    - -

    Type AI.Option.Ground.val.ALARM_STATE

    -

    Field(s)

    -
    -
    - - -AI.Option.Ground.val.ALARM_STATE.AUTO - -
    -
    - - - -
    -
    -
    -
    - - -AI.Option.Ground.val.ALARM_STATE.GREEN - -
    -
    - - - -
    -
    -
    -
    - - -AI.Option.Ground.val.ALARM_STATE.RED - -
    -
    - - - -
    -
    - -

    Type AI.Option.Ground.val.ROE

    -

    Field(s)

    -
    -
    - - -AI.Option.Ground.val.ROE.OPEN_FIRE - -
    -
    - - - -
    -
    -
    -
    - - -AI.Option.Ground.val.ROE.RETURN_FIRE - -
    -
    - - - -
    -
    -
    -
    - - -AI.Option.Ground.val.ROE.WEAPON_HOLD - -
    -
    - - - -
    -
    - -

    Type AI.Option.Naval

    -

    Field(s)

    -
    -
    - - #AI.Option.Naval.id - -AI.Option.Naval.id - -
    -
    - - - -
    -
    -
    -
    - - #AI.Option.Naval.val - -AI.Option.Naval.val - -
    -
    - - - -
    -
    - -

    Type AI.Option.Naval.id

    -

    Field(s)

    -
    -
    - - -AI.Option.Naval.id.NO_OPTION - -
    -
    - - - -
    -
    -
    -
    - - -AI.Option.Naval.id.ROE - -
    -
    - - - -
    -
    - -

    Type AI.Option.Naval.val

    -

    Field(s)

    -
    -
    - - #AI.Option.Naval.val.ROE - -AI.Option.Naval.val.ROE - -
    -
    - - - -
    -
    - -

    Type AI.Option.Naval.val.ROE

    -

    Field(s)

    -
    -
    - - -AI.Option.Naval.val.ROE.OPEN_FIRE - -
    -
    - - - -
    -
    -
    -
    - - -AI.Option.Naval.val.ROE.RETURN_FIRE - -
    -
    - - - -
    -
    -
    -
    - - -AI.Option.Naval.val.ROE.WEAPON_HOLD - -
    -
    - - - -
    -
    - -

    Type AI.Skill

    -

    Field(s)

    -
    -
    - - -AI.Skill.AVERAGE - -
    -
    - - - -
    -
    -
    -
    - - -AI.Skill.CLIENT - -
    -
    - - - -
    -
    -
    -
    - - -AI.Skill.EXCELLENT - -
    -
    - - - -
    -
    -
    -
    - - -AI.Skill.GOOD - -
    -
    - - - -
    -
    -
    -
    - - -AI.Skill.HIGH - -
    -
    - - - -
    -
    -
    -
    - - -AI.Skill.PLAYER - -
    -
    - - - -
    -
    - -

    Type AI.Task

    -

    Field(s)

    -
    -
    - - #AI.Task.AltitudeType - -AI.Task.AltitudeType - -
    -
    - - - -
    -
    -
    -
    - - #AI.Task.Designation - -AI.Task.Designation - -
    -
    - - - -
    -
    -
    -
    - - #AI.Task.OrbitPattern - -AI.Task.OrbitPattern - -
    -
    - - - -
    -
    -
    -
    - - #AI.Task.TurnMethod - -AI.Task.TurnMethod - -
    -
    - - - -
    -
    -
    -
    - - #AI.Task.VehicleFormation - -AI.Task.VehicleFormation - -
    -
    - - - -
    -
    -
    -
    - - #AI.Task.WaypointType - -AI.Task.WaypointType - -
    -
    - - - -
    -
    -
    -
    - - #AI.Task.WeaponExpend - -AI.Task.WeaponExpend - -
    -
    - - - -
    -
    - -

    Type AI.Task.AltitudeType

    -

    Field(s)

    -
    -
    - - -AI.Task.AltitudeType.BARO - -
    -
    - - - -
    -
    -
    -
    - - -AI.Task.AltitudeType.RADIO - -
    -
    - - - -
    -
    - -

    Type AI.Task.Designation

    -

    Field(s)

    -
    -
    - - -AI.Task.Designation.AUTO - -
    -
    - - - -
    -
    -
    -
    - - -AI.Task.Designation.IR_POINTER - -
    -
    - - - -
    -
    -
    -
    - - -AI.Task.Designation.LASER - -
    -
    - - - -
    -
    -
    -
    - - -AI.Task.Designation.NO - -
    -
    - - - -
    -
    -
    -
    - - -AI.Task.Designation.WP - -
    -
    - - - -
    -
    - -

    Type AI.Task.OrbitPattern

    -

    Field(s)

    -
    -
    - - -AI.Task.OrbitPattern.CIRCLE - -
    -
    - - - -
    -
    -
    -
    - - -AI.Task.OrbitPattern.RACE_TRACK - -
    -
    - - - -
    -
    - -

    Type AI.Task.TurnMethod

    -

    Field(s)

    -
    -
    - - -AI.Task.TurnMethod.FIN_POINT - -
    -
    - - - -
    -
    -
    -
    - - -AI.Task.TurnMethod.FLY_OVER_POINT - -
    -
    - - - -
    -
    - -

    Type AI.Task.VehicleFormation

    -

    Field(s)

    -
    -
    - - -AI.Task.VehicleFormation.CONE - -
    -
    - - - -
    -
    -
    -
    - - -AI.Task.VehicleFormation.DIAMOND - -
    -
    - - - -
    -
    -
    -
    - - -AI.Task.VehicleFormation.ECHELON_LEFT - -
    -
    - - - -
    -
    -
    -
    - - -AI.Task.VehicleFormation.ECHELON_RIGHT - -
    -
    - - - -
    -
    -
    -
    - - -AI.Task.VehicleFormation.OFF_ROAD - -
    -
    - - - -
    -
    -
    -
    - - -AI.Task.VehicleFormation.ON_ROAD - -
    -
    - - - -
    -
    -
    -
    - - -AI.Task.VehicleFormation.RANK - -
    -
    - - - -
    -
    -
    -
    - - -AI.Task.VehicleFormation.VEE - -
    -
    - - - -
    -
    - -

    Type AI.Task.WaypointType

    -

    Field(s)

    -
    -
    - - -AI.Task.WaypointType.LAND - -
    -
    - - - -
    -
    -
    -
    - - -AI.Task.WaypointType.TAKEOFF - -
    -
    - - - -
    -
    -
    -
    - - -AI.Task.WaypointType.TAKEOFF_PARKING - -
    -
    - - - -
    -
    -
    -
    - - -AI.Task.WaypointType.TURNING_POINT - -
    -
    - - - -
    -
    - -

    Type AI.Task.WeaponExpend

    -

    Field(s)

    -
    -
    - - -AI.Task.WeaponExpend.ALL - -
    -
    - - - -
    -
    -
    -
    - - -AI.Task.WeaponExpend.FOUR - -
    -
    - - - -
    -
    -
    -
    - - -AI.Task.WeaponExpend.HALF - -
    -
    - - - -
    -
    -
    -
    - - -AI.Task.WeaponExpend.ONE - -
    -
    - - - -
    -
    -
    -
    - - -AI.Task.WeaponExpend.QUARTER - -
    -
    - - - -
    -
    -
    -
    - - -AI.Task.WeaponExpend.TWO - -
    -
    - - - -
    -
    - -

    Type Angle

    - -

    An angle type

    - - -

    Type AttributeName

    - -

    AttributeName = string -Each object type may have attributes.

    - - -

    Attributes are enlisted in ./Scripts/Database/db_attributes.Lua. -To know what attributes the object type has, look for the unit type script in sub-directories planes/, helicopter/s, vehicles, navy/ of ./Scripts/Database/ directory.

    - - -

    Type AttributeNameArray

    - -

    List of #AttributeName

    - - -

    Type Azimuth

    - -

    Azimuth is an angle of rotation around world axis y counter-clockwise.

    - - -

    Type Box3

    - -

    3-dimensional box.

    - -

    Field(s)

    -
    -
    - - #Vec3 - -Box3.max - -
    -
    - - - -
    -
    -
    -
    - - #Vec3 - -Box3.min - -
    -
    - - - -
    -
    - -

    Type Desc

    -

    Field(s)

    -
    -
    - - #table - -Desc.attributes - -
    -
    - -

    object type attributes

    - -
    -
    -
    -
    - - #string - -Desc.displayName - -
    -
    - -

    localized display name

    - -
    -
    -
    -
    - - #TypeName - -Desc.typeName - -
    -
    - -

    type name

    - -
    -
    - -

    Type Distance

    - -

    A distance type

    - - -

    Type Mass

    - -

    Mass is given in kilograms.

    - - -

    Type MissionTime

    - -

    Mission time is a model time plus time of the mission start.

    - - -

    Type ModelTime

    - -

    Model time is the time that drives the simulation.

    - - -

    Model time may be stopped, accelerated and decelerated relative real time.

    - - -

    Type Position3

    - -

    Position is a composite structure.

    - - -

    It consists of both coordinate vector and orientation matrix. Position3 (also known as "Pos3" for short) is a table that has following format:

    - -

    Field(s)

    -
    -
    - - #Vec3 - -Position3.p - -
    -
    - - - -
    -
    -
    -
    - - #Vec3 - -Position3.x - -
    -
    - - - -
    -
    -
    -
    - - #Vec3 - -Position3.y - -
    -
    - - - -
    -
    -
    -
    - - #Vec3 - -Position3.z - -
    -
    - - - -
    -
    - -

    Type Time

    - -

    Time is given in seconds.

    - - -

    Type TypeName

    - -

    Each object belongs to a type.

    - - -

    Object type is a named couple of properties those independent of mission and common for all units of the same type. Name of unit type is a string. Samples of unit type: "Su-27", "KAMAZ" and "M2 Bradley".

    - - -

    Type Vec2

    - -

    Vec2 is a 2D-vector for the ground plane as a reference plane.

    - -

    Field(s)

    -
    -
    - - #Distance - -Vec2.x - -
    -
    - -

    Vec2.x = Vec3.x

    - -
    -
    -
    -
    - - #Distance - -Vec2.y - -
    -
    - -

    Vec2.y = Vec3.z

    - -
    -
    - -

    Type Vec3

    - -

    Vec3 type is a 3D-vector.

    - - -

    DCS world has 3-dimensional coordinate system. DCS ground is an infinite plain.

    - -

    Field(s)

    -
    -
    - - #Distance - -Vec3.x - -
    -
    - -

    is directed to the north

    - -
    -
    -
    -
    - - #Distance - -Vec3.y - -
    -
    - -

    is directed up

    - -
    -
    -
    -
    - - #Distance - -Vec3.z - -
    -
    - -

    is directed to the east

    - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/DCSUnit.html b/docs/Documentation/DCSUnit.html deleted file mode 100644 index 6cf730ebf..000000000 --- a/docs/Documentation/DCSUnit.html +++ /dev/null @@ -1,2103 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module DCSUnit

    - - - -

    Global(s)

    - - - - - -
    Unit - -
    -

    Type Unit

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Unit.< -

    Unit.AmmoItem> Ammo

    -
    Unit.AmmoItem - -
    Unit.Category - -
    Unit.Desc - -
    Unit.DescAircraft - -
    Unit.DescAirplane - -
    Unit.DescHelicopter - -
    Unit.DescShip - -
    Unit.DescVehicle - -
    Unit.ID -

    Identifier of an unit. It assigned to an unit by the Mission Editor automatically.

    -
    Unit.IRST - -
    Unit.Optic - -
    Unit.OpticType - -
    Unit.Radar - -
    Unit.RadarType - -
    Unit.RefuelingSystem - -
    Unit.Sensor - -
    Unit.SensorType - -
    Unit:getAmmo() -

    Returns the unit ammunition.

    -
    Unit.getByName(name) -

    Returns unit object by the name assigned to the unit in Mission Editor.

    -
    Unit:getCallsign() -

    Returns the unit's callsign - the localized string.

    -
    Unit:getController() -

    Returns controller of the unit if it exist and nil otherwise

    -
    Unit:getDesc() -

    Returns unit descriptor.

    -
    Unit:getFuel() -

    Returns relative amount of fuel (from 0.0 to 1.0) the unit has in its internal tanks.

    -
    Unit:getGroup() -

    Returns the unit's group if it exist and nil otherwise

    -
    Unit:getID() -

    returns the unit's unique identifier.

    -
    Unit:getLife() -

    Returns the unit's health.

    -
    Unit:getLife0() -

    returns the unit's initial health.

    -
    Unit:getNumber() -

    Returns the unit's number in the group.

    -
    Unit:getPlayerName() -

    Returns name of the player that control the unit or nil if the unit is controlled by A.I.

    -
    Unit:getRadar() -

    returns two values: -First value indicates if at least one of the unit's radar(s) is on.

    -
    Unit:getSensors() -

    Returns the unit sensors.

    -
    Unit:hasSensors(sensorType, ...) -

    Returns true if the unit has specified types of sensors.

    -
    Unit:isActive() -

    Returns if the unit is activated.

    -
    - -

    Type Unit.AmmoItem

    - - - - - - - - - -
    Unit.AmmoItem.count -

    ammunition count

    -
    Unit.AmmoItem.desc -

    ammunition descriptor

    -
    - -

    Type Unit.Category

    - - - - - - - - - - - - - - - - - - - - - -
    Unit.Category.AIRPLANE - -
    Unit.Category.GROUND_UNIT - -
    Unit.Category.HELICOPTER - -
    Unit.Category.SHIP - -
    Unit.Category.STRUCTURE - -
    - -

    Type Unit.Desc

    - - - - - - - - - - - - - -
    Unit.Desc.category -

    Unit Category

    -
    Unit.Desc.massEmpty -

    mass of empty unit

    -
    Unit.Desc.speedMax -

    istance / Time, --maximal velocity

    -
    - -

    Type Unit.DescAircraft

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Unit.DescAircraft.Hmax -

    Ceiling

    -
    Unit.DescAircraft.NyMax -

    maximal safe acceleration

    -
    Unit.DescAircraft.NyMin -

    minimal safe acceleration

    -
    Unit.DescAircraft.VyMax -

    #Distance / #Time, --maximal climb rate

    -
    Unit.DescAircraft.fuelMassMax -

    maximal inner fuel mass

    -
    Unit.DescAircraft.range -

    Operational range

    -
    Unit.DescAircraft.tankerType -

    refueling system type

    -
    - -

    Type Unit.DescAirplane

    - - - - - - - - - -
    Unit.DescAirplane.speedMax0 -

    Distance / Time maximal TAS at ground level

    -
    Unit.DescAirplane.speedMax10K -

    Distance / Time maximal TAS at altitude of 10 km

    -
    - -

    Type Unit.DescHelicopter

    - - - - - -
    Unit.DescHelicopter.HmaxStat -

    static ceiling

    -
    - -

    Type Unit.DescVehicle

    - - - - - - - - - -
    Unit.DescVehicle.maxSlopeAngle -

    maximal slope angle

    -
    Unit.DescVehicle.riverCrossing -

    can the vehicle cross a rivers

    -
    - -

    Type Unit.Optic

    - - - - - -
    Unit.Optic.opticType - -
    - -

    Type Unit.OpticType

    - - - - - - - - - - - - - -
    Unit.OpticType.IR -

    Infra-Red optic sensor

    -
    Unit.OpticType.LLTV -

    Low-level TV-sensor

    -
    Unit.OpticType.TV -

    TV-sensor

    -
    - -

    Type Unit.Radar

    - - - - - - - - - - - - - -
    Unit.Radar.detectionDistanceAir -

    detection distance for RCS=1m^2 airborne target, nil if radar doesn't support air search

    -
    Unit.Radar.detectionDistanceHRM -

    detection distance for RCS=1m^2 in high-resolution mapping mode, nil if radar has no HRM

    -
    Unit.Radar.detectionDistanceRBM -

    detection distance for RCS=1m^2 in real-beam mapping mode, nil if radar doesn't support surface/land search

    -
    - -

    Type Unit.Radar.detectionDistanceAir

    - - - - - - - - - -
    Unit.Radar.detectionDistanceAir.lowerHemisphere - -
    Unit.Radar.detectionDistanceAir.upperHemisphere - -
    - -

    Type Unit.Radar.detectionDistanceAir.lowerHemisphere

    - - - - - - - - - -
    Unit.Radar.detectionDistanceAir.lowerHemisphere.headOn - -
    Unit.Radar.detectionDistanceAir.lowerHemisphere.tailOn - -
    - -

    Type Unit.Radar.detectionDistanceAir.upperHemisphere

    - - - - - - - - - -
    Unit.Radar.detectionDistanceAir.upperHemisphere.headOn - -
    Unit.Radar.detectionDistanceAir.upperHemisphere.tailOn - -
    - -

    Type Unit.RadarType

    - - - - - - - - - -
    Unit.RadarType.AS -

    air search radar

    -
    Unit.RadarType.SS -

    surface/land search radar

    -
    - -

    Type Unit.RefuelingSystem

    - - - - - - - - - -
    Unit.RefuelingSystem.BOOM_AND_RECEPTACLE - -
    Unit.RefuelingSystem.PROBE_AND_DROGUE - -
    - -

    Type Unit.Sensor

    - - - - - - - - - -
    Unit.Sensor.type - -
    Unit.Sensor.typeName - -
    - -

    Type Unit.SensorType

    - - - - - - - - - - - - - - - - - -
    Unit.SensorType.IRST - -
    Unit.SensorType.OPTIC - -
    Unit.SensorType.RADAR - -
    Unit.SensorType.RWR - -
    - -

    Type Wrapper.Unit

    - - - - - - - - - - - - - -
    Wrapper.Unit.detectionDistanceAfterburner -

    ..., engines are in afterburner mode

    -
    Wrapper.Unit.detectionDistanceIdle -

    detection of tail-on target with heat signature = 1 in upper hemisphere, engines are in idle

    -
    Wrapper.Unit.detectionDistanceMaximal -

    ..., engines are in maximal mode

    -
    - -

    Global(s)

    -
    -
    - - #Unit - -Unit - -
    -
    - - - -
    -
    -

    Type DCSUnit

    - -

    Type Angle

    - -

    Type Controller

    - -

    Type Distance

    - -

    Type Mass

    - -

    Type TypeName

    - -

    Type Unit

    -

    Field(s)

    -
    -
    - - #list - -Unit.< - -
    -
    - -

    Unit.AmmoItem> Ammo

    - -
    -
    -
    -
    - - #Unit.AmmoItem - -Unit.AmmoItem - -
    -
    - - - -
    -
    -
    -
    - - #Unit.Category - -Unit.Category - -
    -
    - - - -
    -
    -
    -
    - - #Unit.Desc - -Unit.Desc - -
    -
    - - - -
    -
    -
    -
    - - #Unit.DescAircraft - -Unit.DescAircraft - -
    -
    - - - -
    -
    -
    -
    - - #Unit.DescAirplane - -Unit.DescAirplane - -
    -
    - - - -
    -
    -
    -
    - - #Unit.DescHelicopter - -Unit.DescHelicopter - -
    -
    - - - -
    -
    -
    -
    - - #Unit.DescShip - -Unit.DescShip - -
    -
    - - - -
    -
    -
    -
    - - #Unit.DescVehicle - -Unit.DescVehicle - -
    -
    - - - -
    -
    -
    -
    - - -Unit.ID - -
    -
    - -

    Identifier of an unit. It assigned to an unit by the Mission Editor automatically.

    - -
    -
    -
    -
    - - #Unit.IRST - -Unit.IRST - -
    -
    - - - -
    -
    -
    -
    - - #Unit.Optic - -Unit.Optic - -
    -
    - - - -
    -
    -
    -
    - - #Unit.OpticType - -Unit.OpticType - -
    -
    - - - -
    -
    -
    -
    - - #Unit.Radar - -Unit.Radar - -
    -
    - - - -
    -
    -
    -
    - - #Unit.RadarType - -Unit.RadarType - -
    -
    - - - -
    -
    -
    -
    - - #Unit.RefuelingSystem - -Unit.RefuelingSystem - -
    -
    - - - -
    -
    -
    -
    - - #Unit.Sensor - -Unit.Sensor - -
    -
    - - - -
    -
    -
    -
    - - #Unit.SensorType - -Unit.SensorType - -
    -
    - - - -
    -
    -
    -
    - - -Unit:getAmmo() - -
    -
    - -

    Returns the unit ammunition.

    - -

    Return value

    - -

    #Unit.Ammo:

    - - -
    -
    -
    -
    - - -Unit.getByName(name) - -
    -
    - -

    Returns unit object by the name assigned to the unit in Mission Editor.

    - - -

    If there is unit with such name or the unit is destroyed the function will return nil. The function provides access to non-activated units too.

    - -

    Parameter

    -
      -
    • - -

      #string name :

      - -
    • -
    -

    Return value

    - -

    #Unit:

    - - -
    -
    -
    -
    - - -Unit:getCallsign() - -
    -
    - -

    Returns the unit's callsign - the localized string.

    - -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -Unit:getController() - -
    -
    - -

    Returns controller of the unit if it exist and nil otherwise

    - -

    Return value

    - -

    #Controller:

    - - -
    -
    -
    -
    - - -Unit:getDesc() - -
    -
    - -

    Returns unit descriptor.

    - - -

    Descriptor type depends on unit category.

    - -

    Return value

    - -

    #Unit.Desc:

    - - -
    -
    -
    -
    - - -Unit:getFuel() - -
    -
    - -

    Returns relative amount of fuel (from 0.0 to 1.0) the unit has in its internal tanks.

    - - -

    If there are additional fuel tanks the value may be greater than 1.0.

    - -

    Return value

    - -

    #number:

    - - -
    -
    -
    -
    - - -Unit:getGroup() - -
    -
    - -

    Returns the unit's group if it exist and nil otherwise

    - -

    Return value

    - -

    Dcs.DCSWrapper.Group#Group:

    - - -
    -
    -
    -
    - - -Unit:getID() - -
    -
    - -

    returns the unit's unique identifier.

    - -

    Return value

    - -

    #Unit.ID:

    - - -
    -
    -
    -
    - - -Unit:getLife() - -
    -
    - -

    Returns the unit's health.

    - - -

    Dead units has health <= 1.0

    - -

    Return value

    - -

    #number:

    - - -
    -
    -
    -
    - - -Unit:getLife0() - -
    -
    - -

    returns the unit's initial health.

    - -

    Return value

    - -

    #number:

    - - -
    -
    -
    -
    - - -Unit:getNumber() - -
    -
    - -

    Returns the unit's number in the group.

    - - -

    The number is the same number the unit has in ME. It may not be changed during the mission. If any unit in the group is destroyed, the numbers of another units will not be changed.

    - -

    Return value

    - -

    #number:

    - - -
    -
    -
    -
    - - -Unit:getPlayerName() - -
    -
    - -

    Returns name of the player that control the unit or nil if the unit is controlled by A.I.

    - -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -Unit:getRadar() - -
    -
    - -

    returns two values: -First value indicates if at least one of the unit's radar(s) is on.

    - - -

    Second value is the object of the radar's interest. Not nil only if at least one radar of the unit is tracking a target.

    - -

    Return value

    - -

    #boolean, Wrapper.Object#Object:

    - - -
    -
    -
    -
    - - -Unit:getSensors() - -
    -
    - -

    Returns the unit sensors.

    - -

    Return value

    - -

    #Unit.Sensors:

    - - -
    -
    -
    -
    - - -Unit:hasSensors(sensorType, ...) - -
    -
    - -

    Returns true if the unit has specified types of sensors.

    - - -

    This function is more preferable than Unit.getSensors() if you don't want to get information about all the unit's sensors, and just want to check if the unit has specified types of sensors.

    - -

    Parameters

    -
      -
    • - -

      #Unit.SensorType sensorType : -(= nil) Sensor type.

      - -
    • -
    • - -

      ... : -Additional parameters.

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -

    Usage:

    -
    If sensorType is Unit.SensorType.OPTIC, additional parameters are optic sensor types. Following example checks if the unit has LLTV or IR optics:
    -unit:hasSensors(Unit.SensorType.OPTIC, Unit.OpticType.LLTV, Unit.OpticType.IR)
    -If sensorType is Unit.SensorType.RADAR, additional parameters are radar types. Following example checks if the unit has air search radars:
    -unit:hasSensors(Unit.SensorType.RADAR, Unit.RadarType.AS)
    -If no additional parameters are specified the function returns true if the unit has at least one sensor of specified type.
    -If sensor type is not specified the function returns true if the unit has at least one sensor of any type.
    -
    - -
    -
    -
    -
    - - -Unit:isActive() - -
    -
    - -

    Returns if the unit is activated.

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    - -

    Type Unit.Ammo

    - -

    Type Unit.AmmoItem

    - -

    ammunition item: "type-count" pair.

    - -

    Field(s)

    -
    -
    - - #number - -Unit.AmmoItem.count - -
    -
    - -

    ammunition count

    - -
    -
    -
    -
    - - #Weapon.Desc - -Unit.AmmoItem.desc - -
    -
    - -

    ammunition descriptor

    - -
    -
    - -

    Type Unit.Category

    - -

    Enum that stores unit categories.

    - -

    Field(s)

    -
    -
    - - -Unit.Category.AIRPLANE - -
    -
    - - - -
    -
    -
    -
    - - -Unit.Category.GROUND_UNIT - -
    -
    - - - -
    -
    -
    -
    - - -Unit.Category.HELICOPTER - -
    -
    - - - -
    -
    -
    -
    - - -Unit.Category.SHIP - -
    -
    - - - -
    -
    -
    -
    - - -Unit.Category.STRUCTURE - -
    -
    - - - -
    -
    - -

    Type Unit.Desc

    - -

    A unit descriptor.

    - -

    Field(s)

    -
    -
    - - #Unit.Category - -Unit.Desc.category - -
    -
    - -

    Unit Category

    - -
    -
    -
    -
    - - #Mass - -Unit.Desc.massEmpty - -
    -
    - -

    mass of empty unit

    - -
    -
    -
    -
    - - #number - -Unit.Desc.speedMax - -
    -
    - -

    istance / Time, --maximal velocity

    - -
    -
    - -

    Type Unit.DescAircraft

    - -

    An aircraft descriptor.

    - -

    Field(s)

    -
    -
    - - #Distance - -Unit.DescAircraft.Hmax - -
    -
    - -

    Ceiling

    - -
    -
    -
    -
    - - #number - -Unit.DescAircraft.NyMax - -
    -
    - -

    maximal safe acceleration

    - -
    -
    -
    -
    - - #number - -Unit.DescAircraft.NyMin - -
    -
    - -

    minimal safe acceleration

    - -
    -
    -
    -
    - - #number - -Unit.DescAircraft.VyMax - -
    -
    - -

    #Distance / #Time, --maximal climb rate

    - -
    -
    -
    -
    - - #Mass - -Unit.DescAircraft.fuelMassMax - -
    -
    - -

    maximal inner fuel mass

    - -
    -
    -
    -
    - - #Distance - -Unit.DescAircraft.range - -
    -
    - -

    Operational range

    - -
    -
    -
    -
    - - #Unit.RefuelingSystem - -Unit.DescAircraft.tankerType - -
    -
    - -

    refueling system type

    - -
    -
    - -

    Type Unit.DescAirplane

    - -

    An airplane descriptor.

    - -

    Field(s)

    -
    -
    - - #number - -Unit.DescAirplane.speedMax0 - -
    -
    - -

    Distance / Time maximal TAS at ground level

    - -
    -
    -
    -
    - - #number - -Unit.DescAirplane.speedMax10K - -
    -
    - -

    Distance / Time maximal TAS at altitude of 10 km

    - -
    -
    - -

    Type Unit.DescHelicopter

    - -

    A helicopter descriptor.

    - -

    Field(s)

    -
    -
    - - #Distance - -Unit.DescHelicopter.HmaxStat - -
    -
    - -

    static ceiling

    - -
    -
    - -

    Type Unit.DescShip

    - -

    A ship descriptor.

    - - -

    Type Unit.DescVehicle

    - -

    A vehicle descriptor.

    - -

    Field(s)

    -
    -
    - - #Angle - -Unit.DescVehicle.maxSlopeAngle - -
    -
    - -

    maximal slope angle

    - -
    -
    -
    -
    - - #boolean - -Unit.DescVehicle.riverCrossing - -
    -
    - -

    can the vehicle cross a rivers

    - -
    -
    - -

    Type Unit.ID

    - -

    Type Unit.IRST

    - -

    Type Unit.Optic

    - -

    An optic sensor.

    - -

    Field(s)

    -
    -
    - - #Unit.OpticType - -Unit.Optic.opticType - -
    -
    - - - -
    -
    - -

    Type Unit.OpticType

    - -

    Enum that stores types of optic sensors.

    - -

    Field(s)

    -
    -
    - - -Unit.OpticType.IR - -
    -
    - -

    Infra-Red optic sensor

    - -
    -
    -
    -
    - - -Unit.OpticType.LLTV - -
    -
    - -

    Low-level TV-sensor

    - -
    -
    -
    -
    - - -Unit.OpticType.TV - -
    -
    - -

    TV-sensor

    - -
    -
    - -

    Type Unit.RWR

    - -

    An RWR.

    - - -

    Type Unit.Radar

    - -

    A radar.

    - -

    Field(s)

    -
    -
    - - #Unit.Radar.detectionDistanceAir - -Unit.Radar.detectionDistanceAir - -
    -
    - -

    detection distance for RCS=1m^2 airborne target, nil if radar doesn't support air search

    - -
    -
    -
    -
    - - #Distance - -Unit.Radar.detectionDistanceHRM - -
    -
    - -

    detection distance for RCS=1m^2 in high-resolution mapping mode, nil if radar has no HRM

    - -
    -
    -
    -
    - - #Distance - -Unit.Radar.detectionDistanceRBM - -
    -
    - -

    detection distance for RCS=1m^2 in real-beam mapping mode, nil if radar doesn't support surface/land search

    - -
    -
    - -

    Type Unit.Radar.detectionDistanceAir

    -

    Field(s)

    -
    -
    - - #Unit.Radar.detectionDistanceAir.lowerHemisphere - -Unit.Radar.detectionDistanceAir.lowerHemisphere - -
    -
    - - - -
    -
    -
    -
    - - #Unit.Radar.detectionDistanceAir.upperHemisphere - -Unit.Radar.detectionDistanceAir.upperHemisphere - -
    -
    - - - -
    -
    - -

    Type Unit.Radar.detectionDistanceAir.lowerHemisphere

    -

    Field(s)

    -
    -
    - - #Distance - -Unit.Radar.detectionDistanceAir.lowerHemisphere.headOn - -
    -
    - - - -
    -
    -
    -
    - - #Distance - -Unit.Radar.detectionDistanceAir.lowerHemisphere.tailOn - -
    -
    - - - -
    -
    - -

    Type Unit.Radar.detectionDistanceAir.upperHemisphere

    -

    Field(s)

    -
    -
    - - #Distance - -Unit.Radar.detectionDistanceAir.upperHemisphere.headOn - -
    -
    - - - -
    -
    -
    -
    - - #Distance - -Unit.Radar.detectionDistanceAir.upperHemisphere.tailOn - -
    -
    - - - -
    -
    - -

    Type Unit.RadarType

    - -

    Enum that stores radar types.

    - -

    Field(s)

    -
    -
    - - -Unit.RadarType.AS - -
    -
    - -

    air search radar

    - -
    -
    -
    -
    - - -Unit.RadarType.SS - -
    -
    - -

    surface/land search radar

    - -
    -
    - -

    Type Unit.RefuelingSystem

    - -

    Enum that stores aircraft refueling system types.

    - -

    Field(s)

    -
    -
    - - -Unit.RefuelingSystem.BOOM_AND_RECEPTACLE - -
    -
    - - - -
    -
    -
    -
    - - -Unit.RefuelingSystem.PROBE_AND_DROGUE - -
    -
    - - - -
    -
    - -

    Type Unit.Sensor

    - -

    A unit sensor.

    - -

    Field(s)

    -
    -
    - - #Unit.SensorType - -Unit.Sensor.type - -
    -
    - - - -
    -
    -
    -
    - - #TypeName - -Unit.Sensor.typeName - -
    -
    - - - -
    -
    - -

    Type Unit.SensorType

    - -

    Enum that stores sensor types.

    - -

    Field(s)

    -
    -
    - - -Unit.SensorType.IRST - -
    -
    - - - -
    -
    -
    -
    - - -Unit.SensorType.OPTIC - -
    -
    - - - -
    -
    -
    -
    - - -Unit.SensorType.RADAR - -
    -
    - - - -
    -
    -
    -
    - - -Unit.SensorType.RWR - -
    -
    - - - -
    -
    - -

    Type Unit.Sensors

    - -

    Type Weapon.Desc

    - -

    Type Wrapper.Unit

    - -

    An IRST.

    - -

    Field(s)

    -
    -
    - - #Distance - -Wrapper.Unit.detectionDistanceAfterburner - -
    -
    - -

    ..., engines are in afterburner mode

    - -
    -
    -
    -
    - - #Distance - -Wrapper.Unit.detectionDistanceIdle - -
    -
    - -

    detection of tail-on target with heat signature = 1 in upper hemisphere, engines are in idle

    - -
    -
    -
    -
    - - #Distance - -Wrapper.Unit.detectionDistanceMaximal - -
    -
    - -

    ..., engines are in maximal mode

    - -
    -
    - -

    Type list

    - -
    - -
    - - diff --git a/docs/Documentation/DCSVec3.html b/docs/Documentation/DCSVec3.html deleted file mode 100644 index 875ba7bf9..000000000 --- a/docs/Documentation/DCSVec3.html +++ /dev/null @@ -1,218 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    - - - diff --git a/docs/Documentation/DCSWorld.html b/docs/Documentation/DCSWorld.html deleted file mode 100644 index b730818f6..000000000 --- a/docs/Documentation/DCSWorld.html +++ /dev/null @@ -1,660 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module DCSWorld

    - - - -

    Global(s)

    - - - - - -
    world - -
    -

    Type world

    - - - - - -
    world.event - -
    - -

    Type world.event

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    world.event.S_EVENT_BASE_CAPTURED - -
    world.event.S_EVENT_BIRTH - -
    world.event.S_EVENT_CRASH - -
    world.event.S_EVENT_DEAD - -
    world.event.S_EVENT_EJECTION - -
    world.event.S_EVENT_ENGINE_SHUTDOWN - -
    world.event.S_EVENT_ENGINE_STARTUP - -
    world.event.S_EVENT_HIT - -
    world.event.S_EVENT_HUMAN_FAILURE - -
    world.event.S_EVENT_INVALID - -
    world.event.S_EVENT_LAND - -
    world.event.S_EVENT_MAX - -
    world.event.S_EVENT_MISSION_END - -
    world.event.S_EVENT_MISSION_START - -
    world.event.S_EVENT_PILOT_DEAD - -
    world.event.S_EVENT_PLAYER_COMMENT - -
    world.event.S_EVENT_PLAYER_ENTER_UNIT - -
    world.event.S_EVENT_PLAYER_LEAVE_UNIT - -
    world.event.S_EVENT_REFUELING - -
    world.event.S_EVENT_REFUELING_STOP - -
    world.event.S_EVENT_SHOOTING_END - -
    world.event.S_EVENT_SHOOTING_START - -
    world.event.S_EVENT_SHOT - -
    world.event.S_EVENT_TAKEOFF - -
    world.event.S_EVENT_TOOK_CONTROL - -
    - -

    Global(s)

    -
    -
    - - #world - -world - -
    -
    - - - -
    -
    -

    Type DCSWorld

    - -

    Type world

    -

    Field(s)

    -
    -
    - - #world.event - -world.event - -
    -
    - - - -
    -
    - -

    Type world.event

    -

    Field(s)

    -
    -
    - - -world.event.S_EVENT_BASE_CAPTURED - -
    -
    - - - -
    -
    -
    -
    - - -world.event.S_EVENT_BIRTH - -
    -
    - - - -
    -
    -
    -
    - - -world.event.S_EVENT_CRASH - -
    -
    - - - -
    -
    -
    -
    - - -world.event.S_EVENT_DEAD - -
    -
    - - - -
    -
    -
    -
    - - -world.event.S_EVENT_EJECTION - -
    -
    - - - -
    -
    -
    -
    - - -world.event.S_EVENT_ENGINE_SHUTDOWN - -
    -
    - - - -
    -
    -
    -
    - - -world.event.S_EVENT_ENGINE_STARTUP - -
    -
    - - - -
    -
    -
    -
    - - -world.event.S_EVENT_HIT - -
    -
    - - - -
    -
    -
    -
    - - -world.event.S_EVENT_HUMAN_FAILURE - -
    -
    - - - -
    -
    -
    -
    - - -world.event.S_EVENT_INVALID - -
    -
    - - - -
    -
    -
    -
    - - -world.event.S_EVENT_LAND - -
    -
    - - - -
    -
    -
    -
    - - -world.event.S_EVENT_MAX - -
    -
    - - - -
    -
    -
    -
    - - -world.event.S_EVENT_MISSION_END - -
    -
    - - - -
    -
    -
    -
    - - -world.event.S_EVENT_MISSION_START - -
    -
    - - - -
    -
    -
    -
    - - -world.event.S_EVENT_PILOT_DEAD - -
    -
    - - - -
    -
    -
    -
    - - -world.event.S_EVENT_PLAYER_COMMENT - -
    -
    - - - -
    -
    -
    -
    - - -world.event.S_EVENT_PLAYER_ENTER_UNIT - -
    -
    - - - -
    -
    -
    -
    - - -world.event.S_EVENT_PLAYER_LEAVE_UNIT - -
    -
    - - - -
    -
    -
    -
    - - -world.event.S_EVENT_REFUELING - -
    -
    - - - -
    -
    -
    -
    - - -world.event.S_EVENT_REFUELING_STOP - -
    -
    - - - -
    -
    -
    -
    - - -world.event.S_EVENT_SHOOTING_END - -
    -
    - - - -
    -
    -
    -
    - - -world.event.S_EVENT_SHOOTING_START - -
    -
    - - - -
    -
    -
    -
    - - -world.event.S_EVENT_SHOT - -
    -
    - - - -
    -
    -
    -
    - - -world.event.S_EVENT_TAKEOFF - -
    -
    - - - -
    -
    -
    -
    - - -world.event.S_EVENT_TOOK_CONTROL - -
    -
    - - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/DCSZone.html b/docs/Documentation/DCSZone.html deleted file mode 100644 index c3b6be5e4..000000000 --- a/docs/Documentation/DCSZone.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    - - - diff --git a/docs/Documentation/DCScountry.html b/docs/Documentation/DCScountry.html deleted file mode 100644 index 79609db55..000000000 --- a/docs/Documentation/DCScountry.html +++ /dev/null @@ -1,546 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module DCScountry

    - - - -

    Global(s)

    - - - - - -
    country - -
    -

    Type country

    - - - - - -
    country.id - -
    - -

    Type country.id

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    country.id.ABKHAZIA - -
    country.id.BELGIUM - -
    country.id.CANADA - -
    country.id.DENMARK - -
    country.id.FRANCE - -
    country.id.GEORGIA - -
    country.id.GERMANY - -
    country.id.INSURGENTS - -
    country.id.ISRAEL - -
    country.id.ITALY - -
    country.id.NORWAY - -
    country.id.RUSSIA - -
    country.id.SOUTH_OSETIA - -
    country.id.SPAIN - -
    country.id.THE_NETHERLANDS - -
    country.id.TURKEY - -
    country.id.UK - -
    country.id.UKRAINE - -
    country.id.USA - -
    - -

    Global(s)

    -
    -
    - - #country - -country - -
    -
    - - - -
    -
    -

    Type DCScountry

    - -

    Type country

    -

    Field(s)

    -
    -
    - - #country.id - -country.id - -
    -
    - - - -
    -
    - -

    Type country.id

    -

    Field(s)

    -
    -
    - - -country.id.ABKHAZIA - -
    -
    - - - -
    -
    -
    -
    - - -country.id.BELGIUM - -
    -
    - - - -
    -
    -
    -
    - - -country.id.CANADA - -
    -
    - - - -
    -
    -
    -
    - - -country.id.DENMARK - -
    -
    - - - -
    -
    -
    -
    - - -country.id.FRANCE - -
    -
    - - - -
    -
    -
    -
    - - -country.id.GEORGIA - -
    -
    - - - -
    -
    -
    -
    - - -country.id.GERMANY - -
    -
    - - - -
    -
    -
    -
    - - -country.id.INSURGENTS - -
    -
    - - - -
    -
    -
    -
    - - -country.id.ISRAEL - -
    -
    - - - -
    -
    -
    -
    - - -country.id.ITALY - -
    -
    - - - -
    -
    -
    -
    - - -country.id.NORWAY - -
    -
    - - - -
    -
    -
    -
    - - -country.id.RUSSIA - -
    -
    - - - -
    -
    -
    -
    - - -country.id.SOUTH_OSETIA - -
    -
    - - - -
    -
    -
    -
    - - -country.id.SPAIN - -
    -
    - - - -
    -
    -
    -
    - - -country.id.THE_NETHERLANDS - -
    -
    - - - -
    -
    -
    -
    - - -country.id.TURKEY - -
    -
    - - - -
    -
    -
    -
    - - -country.id.UK - -
    -
    - - - -
    -
    -
    -
    - - -country.id.UKRAINE - -
    -
    - - - -
    -
    -
    -
    - - -country.id.USA - -
    -
    - - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/DCStimer.html b/docs/Documentation/DCStimer.html deleted file mode 100644 index f0dabbc94..000000000 --- a/docs/Documentation/DCStimer.html +++ /dev/null @@ -1,352 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module DCStimer

    - - - -

    Global(s)

    - - - - - -
    timer - -
    -

    Type timer

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    timer.getAbsTime() -

    Returns mission time in seconds.

    -
    timer.getTime() -

    Returns model time in seconds.

    -
    timer.getTime0() -

    Returns mission start time in seconds.

    -
    timer.removeFunction(functionId) -

    Removes the function from schedule.

    -
    timer.scheduleFunction(functionToCall, functionArgument, time) -

    Schedules function to call at desired model time.

    -
    timer.setFunctionTime(functionId, time) -

    Re-schedules function to call at another model time.

    -
    - -

    Global(s)

    -
    -
    - - #timer - -timer - -
    -
    - - - -
    -
    -

    Type DCStimer

    - -

    Type FunctionToCall

    - -

    Type Time

    - -

    Type timer

    -

    Field(s)

    -
    -
    - - -timer.getAbsTime() - -
    -
    - -

    Returns mission time in seconds.

    - -

    Return value

    - -

    #Time:

    - - -
    -
    -
    -
    - - -timer.getTime() - -
    -
    - -

    Returns model time in seconds.

    - -

    Return value

    - -

    #Time: -

    - -
    -
    -
    -
    - - -timer.getTime0() - -
    -
    - -

    Returns mission start time in seconds.

    - -

    Return value

    - -

    #Time:

    - - -
    -
    -
    -
    - - -timer.removeFunction(functionId) - -
    -
    - -

    Removes the function from schedule.

    - -

    Parameter

    -
      -
    • - -

      functionId : -Function identifier to remove from schedule

      - -
    • -
    -
    -
    -
    -
    - - -timer.scheduleFunction(functionToCall, functionArgument, time) - -
    -
    - -

    Schedules function to call at desired model time.

    - - -

    Time function FunctionToCall(any argument, Time time)

    - -

    ...

    - -

    return ...

    - -

    end

    - -

    Must return model time of next call or nil. Note that the DCS scheduler calls the function in protected mode and any Lua errors in the called function will be trapped and not reported. If the function triggers a Lua error then it will be terminated and not scheduled to run again.

    - -

    Parameters

    -
      -
    • - -

      #FunctionToCall functionToCall : -Lua-function to call. Must have prototype of FunctionToCall.

      - -
    • -
    • - -

      functionArgument : -Function argument of any type to pass to functionToCall.

      - -
    • -
    • - -

      #Time time : -Model time of the function call.

      - -
    • -
    -

    Return value

    - - -

    functionId

    - -
    -
    -
    -
    - - -timer.setFunctionTime(functionId, time) - -
    -
    - -

    Re-schedules function to call at another model time.

    - -

    Parameters

    -
      -
    • - -

      functionId : -Lua-function to call. Must have prototype of FunctionToCall.

      - -
    • -
    • - -

      #Time time : -Model time of the function call.

      - -
    • -
    -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/DCStrigger.html b/docs/Documentation/DCStrigger.html deleted file mode 100644 index fb1d038f7..000000000 --- a/docs/Documentation/DCStrigger.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    - - - diff --git a/docs/Documentation/Database.html b/docs/Documentation/Database.html deleted file mode 100644 index 80ad67e61..000000000 --- a/docs/Documentation/Database.html +++ /dev/null @@ -1,2089 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Database

    - -

    Core -- DATABASE manages the database of mission objects.

    - - - -
    - -

    Author: Sven Van de Velde (FlightControl)

    -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - - - - - -
    DATABASE -

    DATABASE class, extends Base#BASE

    - -

    Mission designers can use the DATABASE class to refer to:

    - -
      -
    • STATICS
    • -
    • UNITS
    • -
    • GROUPS
    • -
    • CLIENTS
    • -
    • AIRBASES
    • -
    • PLAYERSJOINED
    • -
    • PLAYERS
    • -
    • CARGOS
    • -
    - -

    On top, for internal MOOSE administration purposes, the DATBASE administers the Unit and Group TEMPLATES as defined within the Mission Editor.

    -
    PlayerCheckSchedule - -
    -

    Type DATABASE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    DATABASE:AccountDestroys(Event) -

    Account the destroys.

    -
    DATABASE:AccountHits(Event) -

    Account the Hits of the Players.

    -
    DATABASE:AddAirbase(AirbaseName) -

    Adds a Airbase based on the Airbase Name in the DATABASE.

    -
    DATABASE:AddCargo(CargoName, Cargo) -

    Adds a Cargo based on the Cargo Name in the DATABASE.

    -
    DATABASE:AddClient(ClientName) -

    Adds a CLIENT based on the ClientName in the DATABASE.

    -
    DATABASE:AddGroup(GroupName) -

    Adds a GROUP based on the GroupName in the DATABASE.

    -
    DATABASE:AddPlayer(UnitName, PlayerName) -

    Adds a player based on the Player Name in the DATABASE.

    -
    DATABASE:AddStatic(DCSStaticName) -

    Adds a Static based on the Static Name in the DATABASE.

    -
    DATABASE:AddUnit(DCSUnitName) -

    Adds a Unit based on the Unit Name in the DATABASE.

    -
    DATABASE:DeleteAirbase(AirbaseName) -

    Deletes a Airbase from the DATABASE based on the Airbase Name.

    -
    DATABASE:DeleteCargo(CargoName) -

    Deletes a Cargo from the DATABASE based on the Cargo Name.

    -
    DATABASE:DeletePlayer(UnitName, PlayerName) -

    Deletes a player from the DATABASE based on the Player Name.

    -
    DATABASE:DeleteStatic(DCSStaticName) -

    Deletes a Static from the DATABASE based on the Static Name.

    -
    DATABASE:DeleteUnit(DCSUnitName) -

    Deletes a Unit from the DATABASE based on the Unit Name.

    -
    DATABASE:FindAirbase(AirbaseName) -

    Finds a AIRBASE based on the AirbaseName.

    -
    DATABASE:FindCargo(CargoName) -

    Finds an CARGO based on the CargoName.

    -
    DATABASE:FindClient(ClientName) -

    Finds a CLIENT based on the ClientName.

    -
    DATABASE:FindGroup(GroupName) -

    Finds a GROUP based on the GroupName.

    -
    DATABASE:FindStatic(StaticName) -

    Finds a STATIC based on the StaticName.

    -
    DATABASE:FindUnit(UnitName) -

    Finds a Unit based on the Unit Name.

    -
    DATABASE:ForEach(IteratorFunction, FinalizeFunction, arg, Set) -

    Iterate the DATABASE and call an iterator function for the given set, providing the Object for each element within the set and optional parameters.

    -
    DATABASE:ForEachCargo(IteratorFunction, ...) -

    Iterate the DATABASE and call an iterator function for each CARGO, providing the CARGO object to the function and optional parameters.

    -
    DATABASE:ForEachClient(IteratorFunction, ...) -

    Iterate the DATABASE and call an iterator function for each CLIENT, providing the CLIENT to the function and optional parameters.

    -
    DATABASE:ForEachGroup(IteratorFunction, FinalizeFunction, ...) -

    Iterate the DATABASE and call an iterator function for each alive GROUP, providing the GROUP and optional parameters.

    -
    DATABASE:ForEachPlayer(IteratorFunction, FinalizeFunction, ...) -

    Iterate the DATABASE and call an iterator function for each ALIVE player, providing the player name and optional parameters.

    -
    DATABASE:ForEachPlayerJoined(IteratorFunction, FinalizeFunction, ...) -

    Iterate the DATABASE and call an iterator function for each player who has joined the mission, providing the Unit of the player and optional parameters.

    -
    DATABASE:ForEachPlayerUnit(IteratorFunction, FinalizeFunction, ...) -

    Iterate the DATABASE and call an iterator function for each ALIVE player UNIT, providing the player UNIT and optional parameters.

    -
    DATABASE:ForEachStatic(IteratorFunction, FinalizeFunction, ...) -

    Iterate the DATABASE and call an iterator function for each alive STATIC, providing the STATIC and optional parameters.

    -
    DATABASE:ForEachUnit(IteratorFunction, FinalizeFunction, ...) -

    Iterate the DATABASE and call an iterator function for each alive UNIT, providing the UNIT and optional parameters.

    -
    DATABASE:GetCategoryFromAirbase(AirbaseName) - -
    DATABASE:GetCategoryFromClientTemplate(ClientName) - -
    DATABASE:GetCoalitionFromAirbase(AirbaseName) - -
    DATABASE:GetCoalitionFromClientTemplate(ClientName) - -
    DATABASE:GetCountryFromClientTemplate(ClientName) - -
    DATABASE:GetGroupNameFromUnitName(UnitName) - -
    DATABASE:GetGroupTemplate(GroupName) - -
    DATABASE:GetGroupTemplateFromUnitName(UnitName) - -
    DATABASE:GetPlayerSettings(PlayerName) -

    Gets the player settings

    -
    DATABASE:GetStaticUnitTemplate(StaticName) - -
    DATABASE:GetStatusGroup(GroupName) -

    Get a status to a Group within the Database, this to check crossing events for example.

    -
    DATABASE.Navpoints - -
    DATABASE:New() -

    Creates a new DATABASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

    -
    DATABASE:OnEventDeleteCargo(EventData) -

    Handles the OnEventDeleteCargo.

    -
    DATABASE:OnEventNewCargo(EventData) -

    Handles the OnEventNewCargo event.

    -
    DATABASE:SetPlayerSettings(PlayerName, Settings) -

    Sets the player settings

    -
    DATABASE:SetStatusGroup(GroupName, Status) -

    Set a status to a Group within the Database, this to check crossing events for example.

    -
    DATABASE:Spawn(SpawnTemplate) -

    Instantiate new Groups within the DCSRTE.

    -
    DATABASE.UNITS - -
    DATABASE.UNITS_Position - -
    DATABASE:_EventOnBirth(Event) -

    Handles the OnBirth event for the alive units set.

    -
    DATABASE:_EventOnDeadOrCrash(Event) -

    Handles the OnDead or OnCrash event for alive units set.

    -
    DATABASE:_EventOnPlayerEnterUnit(Event) -

    Handles the OnPlayerEnterUnit event to fill the active players table (with the unit filter applied).

    -
    DATABASE:_EventOnPlayerLeaveUnit(Event) -

    Handles the OnPlayerLeaveUnit event to clean the active players table.

    -
    DATABASE:_RegisterAirbases() - -
    DATABASE:_RegisterClients() -

    Private method that registers all Units of skill Client or Player within in the mission.

    -
    DATABASE:_RegisterGroupTemplate(GroupTemplate, CoalitionSide, CategoryID, CountryID, GroupName) -

    Private method that registers new Group Templates within the DATABASE Object.

    -
    DATABASE:_RegisterGroupsAndUnits() -

    Private method that registers all Groups and Units within in the mission.

    -
    DATABASE:_RegisterPlayers() -

    Private method that registers all alive players in the mission.

    -
    DATABASE:_RegisterStaticTemplate(GroupTemplate, StaticTemplate, CoalitionID, CategoryID, CountryID) -

    Private method that registers new Static Templates within the DATABASE Object.

    -
    DATABASE:_RegisterStatics() - -
    DATABASE:_RegisterTemplates() - -
    - -

    Global(s)

    -
    -
    - - #DATABASE - -DATABASE - -
    -
    - -

    DATABASE class, extends Base#BASE

    - -

    Mission designers can use the DATABASE class to refer to:

    - -
      -
    • STATICS
    • -
    • UNITS
    • -
    • GROUPS
    • -
    • CLIENTS
    • -
    • AIRBASES
    • -
    • PLAYERSJOINED
    • -
    • PLAYERS
    • -
    • CARGOS
    • -
    - -

    On top, for internal MOOSE administration purposes, the DATBASE administers the Unit and Group TEMPLATES as defined within the Mission Editor.

    - - - -

    The singleton object _DATABASE is automatically created by MOOSE, that administers all objects within the mission. -Moose refers to _DATABASE within the framework extensively, but you can also refer to the _DATABASE object within your missions if required.

    - - -
    -
    -
    -
    - - - -PlayerCheckSchedule - -
    -
    - - - -
    -
    -

    Type Database

    - -

    Type DATABASE

    -

    Field(s)

    -
    -
    - - -DATABASE:AccountDestroys(Event) - -
    -
    - -

    Account the destroys.

    - -

    Parameter

    - -
    -
    -
    -
    - - -DATABASE:AccountHits(Event) - -
    -
    - -

    Account the Hits of the Players.

    - -

    Parameter

    - -
    -
    -
    -
    - - -DATABASE:AddAirbase(AirbaseName) - -
    -
    - -

    Adds a Airbase based on the Airbase Name in the DATABASE.

    - -

    Parameter

    -
      -
    • - -

      #string AirbaseName : -The name of the airbase

      - -
    • -
    -
    -
    -
    -
    - - -DATABASE:AddCargo(CargoName, Cargo) - -
    -
    - -

    Adds a Cargo based on the Cargo Name in the DATABASE.

    - -

    Parameters

    -
      -
    • - -

      #string CargoName : -The name of the airbase

      - -
    • -
    • - -

      Cargo :

      - -
    • -
    -
    -
    -
    -
    - - -DATABASE:AddClient(ClientName) - -
    -
    - -

    Adds a CLIENT based on the ClientName in the DATABASE.

    - -

    Parameter

    -
      -
    • - -

      ClientName :

      - -
    • -
    -
    -
    -
    -
    - - -DATABASE:AddGroup(GroupName) - -
    -
    - -

    Adds a GROUP based on the GroupName in the DATABASE.

    - -

    Parameter

    -
      -
    • - -

      GroupName :

      - -
    • -
    -
    -
    -
    -
    - - -DATABASE:AddPlayer(UnitName, PlayerName) - -
    -
    - -

    Adds a player based on the Player Name in the DATABASE.

    - -

    Parameters

    -
      -
    • - -

      UnitName :

      - -
    • -
    • - -

      PlayerName :

      - -
    • -
    -
    -
    -
    -
    - - -DATABASE:AddStatic(DCSStaticName) - -
    -
    - -

    Adds a Static based on the Static Name in the DATABASE.

    - -

    Parameter

    -
      -
    • - -

      DCSStaticName :

      - -
    • -
    -
    -
    -
    -
    - - -DATABASE:AddUnit(DCSUnitName) - -
    -
    - -

    Adds a Unit based on the Unit Name in the DATABASE.

    - -

    Parameter

    -
      -
    • - -

      DCSUnitName :

      - -
    • -
    -
    -
    -
    -
    - - -DATABASE:DeleteAirbase(AirbaseName) - -
    -
    - -

    Deletes a Airbase from the DATABASE based on the Airbase Name.

    - -

    Parameter

    -
      -
    • - -

      #string AirbaseName : -The name of the airbase

      - -
    • -
    -
    -
    -
    -
    - - -DATABASE:DeleteCargo(CargoName) - -
    -
    - -

    Deletes a Cargo from the DATABASE based on the Cargo Name.

    - -

    Parameter

    -
      -
    • - -

      #string CargoName : -The name of the airbase

      - -
    • -
    -
    -
    -
    -
    - - -DATABASE:DeletePlayer(UnitName, PlayerName) - -
    -
    - -

    Deletes a player from the DATABASE based on the Player Name.

    - -

    Parameters

    -
      -
    • - -

      UnitName :

      - -
    • -
    • - -

      PlayerName :

      - -
    • -
    -
    -
    -
    -
    - - -DATABASE:DeleteStatic(DCSStaticName) - -
    -
    - -

    Deletes a Static from the DATABASE based on the Static Name.

    - -

    Parameter

    -
      -
    • - -

      DCSStaticName :

      - -
    • -
    -
    -
    -
    -
    - - -DATABASE:DeleteUnit(DCSUnitName) - -
    -
    - -

    Deletes a Unit from the DATABASE based on the Unit Name.

    - -

    Parameter

    -
      -
    • - -

      DCSUnitName :

      - -
    • -
    -
    -
    -
    -
    - - -DATABASE:FindAirbase(AirbaseName) - -
    -
    - -

    Finds a AIRBASE based on the AirbaseName.

    - -

    Parameter

    -
      -
    • - -

      #string AirbaseName :

      - -
    • -
    -

    Return value

    - -

    Wrapper.Airbase#AIRBASE: -The found AIRBASE.

    - -
    -
    -
    -
    - - -DATABASE:FindCargo(CargoName) - -
    -
    - -

    Finds an CARGO based on the CargoName.

    - -

    Parameter

    -
      -
    • - -

      #string CargoName :

      - -
    • -
    -

    Return value

    - -

    Wrapper.Cargo#CARGO: -The found CARGO.

    - -
    -
    -
    -
    - - -DATABASE:FindClient(ClientName) - -
    -
    - -

    Finds a CLIENT based on the ClientName.

    - -

    Parameter

    -
      -
    • - -

      #string ClientName :

      - -
    • -
    -

    Return value

    - -

    Wrapper.Client#CLIENT: -The found CLIENT.

    - -
    -
    -
    -
    - - -DATABASE:FindGroup(GroupName) - -
    -
    - -

    Finds a GROUP based on the GroupName.

    - -

    Parameter

    -
      -
    • - -

      #string GroupName :

      - -
    • -
    -

    Return value

    - -

    Wrapper.Group#GROUP: -The found GROUP.

    - -
    -
    -
    -
    - - -DATABASE:FindStatic(StaticName) - -
    -
    - -

    Finds a STATIC based on the StaticName.

    - -

    Parameter

    -
      -
    • - -

      #string StaticName :

      - -
    • -
    -

    Return value

    - -

    Wrapper.Static#STATIC: -The found STATIC.

    - -
    -
    -
    -
    - - -DATABASE:FindUnit(UnitName) - -
    -
    - -

    Finds a Unit based on the Unit Name.

    - -

    Parameter

    -
      -
    • - -

      #string UnitName :

      - -
    • -
    -

    Return value

    - -

    Wrapper.Unit#UNIT: -The found Unit.

    - -
    -
    -
    -
    - - -DATABASE:ForEach(IteratorFunction, FinalizeFunction, arg, Set) - -
    -
    - -

    Iterate the DATABASE and call an iterator function for the given set, providing the Object for each element within the set and optional parameters.

    - -

    Parameters

    -
      -
    • - -

      #function IteratorFunction : -The function that will be called when there is an alive player in the database.

      - -
    • -
    • - -

      FinalizeFunction :

      - -
    • -
    • - -

      arg :

      - -
    • -
    • - -

      Set :

      - -
    • -
    -

    Return value

    - -

    #DATABASE: -self

    - -
    -
    -
    -
    - - -DATABASE:ForEachCargo(IteratorFunction, ...) - -
    -
    - -

    Iterate the DATABASE and call an iterator function for each CARGO, providing the CARGO object to the function and optional parameters.

    - -

    Parameters

    -
      -
    • - -

      #function IteratorFunction : -The function that will be called for each object in the database. The function needs to accept a CLIENT parameter.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #DATABASE: -self

    - -
    -
    -
    -
    - - -DATABASE:ForEachClient(IteratorFunction, ...) - -
    -
    - -

    Iterate the DATABASE and call an iterator function for each CLIENT, providing the CLIENT to the function and optional parameters.

    - -

    Parameters

    -
      -
    • - -

      #function IteratorFunction : -The function that will be called object in the database. The function needs to accept a CLIENT parameter.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #DATABASE: -self

    - -
    -
    -
    -
    - - -DATABASE:ForEachGroup(IteratorFunction, FinalizeFunction, ...) - -
    -
    - -

    Iterate the DATABASE and call an iterator function for each alive GROUP, providing the GROUP and optional parameters.

    - -

    Parameters

    -
      -
    • - -

      #function IteratorFunction : -The function that will be called for each object in the database. The function needs to accept a GROUP parameter.

      - -
    • -
    • - -

      FinalizeFunction :

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #DATABASE: -self

    - -
    -
    -
    -
    - - -DATABASE:ForEachPlayer(IteratorFunction, FinalizeFunction, ...) - -
    -
    - -

    Iterate the DATABASE and call an iterator function for each ALIVE player, providing the player name and optional parameters.

    - -

    Parameters

    -
      -
    • - -

      #function IteratorFunction : -The function that will be called for each object in the database. The function needs to accept the player name.

      - -
    • -
    • - -

      FinalizeFunction :

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #DATABASE: -self

    - -
    -
    -
    -
    - - -DATABASE:ForEachPlayerJoined(IteratorFunction, FinalizeFunction, ...) - -
    -
    - -

    Iterate the DATABASE and call an iterator function for each player who has joined the mission, providing the Unit of the player and optional parameters.

    - -

    Parameters

    -
      -
    • - -

      #function IteratorFunction : -The function that will be called for each object in the database. The function needs to accept a UNIT parameter.

      - -
    • -
    • - -

      FinalizeFunction :

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #DATABASE: -self

    - -
    -
    -
    -
    - - -DATABASE:ForEachPlayerUnit(IteratorFunction, FinalizeFunction, ...) - -
    -
    - -

    Iterate the DATABASE and call an iterator function for each ALIVE player UNIT, providing the player UNIT and optional parameters.

    - -

    Parameters

    -
      -
    • - -

      #function IteratorFunction : -The function that will be called for each object in the database. The function needs to accept the player name.

      - -
    • -
    • - -

      FinalizeFunction :

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #DATABASE: -self

    - -
    -
    -
    -
    - - -DATABASE:ForEachStatic(IteratorFunction, FinalizeFunction, ...) - -
    -
    - -

    Iterate the DATABASE and call an iterator function for each alive STATIC, providing the STATIC and optional parameters.

    - -

    Parameters

    -
      -
    • - -

      #function IteratorFunction : -The function that will be called for each object in the database. The function needs to accept a STATIC parameter.

      - -
    • -
    • - -

      FinalizeFunction :

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #DATABASE: -self

    - -
    -
    -
    -
    - - -DATABASE:ForEachUnit(IteratorFunction, FinalizeFunction, ...) - -
    -
    - -

    Iterate the DATABASE and call an iterator function for each alive UNIT, providing the UNIT and optional parameters.

    - -

    Parameters

    -
      -
    • - -

      #function IteratorFunction : -The function that will be called for each object in the database. The function needs to accept a UNIT parameter.

      - -
    • -
    • - -

      FinalizeFunction :

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #DATABASE: -self

    - -
    -
    -
    -
    - - -DATABASE:GetCategoryFromAirbase(AirbaseName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      AirbaseName :

      - -
    • -
    -
    -
    -
    -
    - - -DATABASE:GetCategoryFromClientTemplate(ClientName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      ClientName :

      - -
    • -
    -
    -
    -
    -
    - - -DATABASE:GetCoalitionFromAirbase(AirbaseName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      AirbaseName :

      - -
    • -
    -
    -
    -
    -
    - - -DATABASE:GetCoalitionFromClientTemplate(ClientName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      ClientName :

      - -
    • -
    -
    -
    -
    -
    - - -DATABASE:GetCountryFromClientTemplate(ClientName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      ClientName :

      - -
    • -
    -
    -
    -
    -
    - - -DATABASE:GetGroupNameFromUnitName(UnitName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      UnitName :

      - -
    • -
    -
    -
    -
    -
    - - -DATABASE:GetGroupTemplate(GroupName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      GroupName :

      - -
    • -
    -
    -
    -
    -
    - - -DATABASE:GetGroupTemplateFromUnitName(UnitName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      UnitName :

      - -
    • -
    -
    -
    -
    -
    - - -DATABASE:GetPlayerSettings(PlayerName) - -
    -
    - -

    Gets the player settings

    - -

    Parameter

    -
      -
    • - -

      #string PlayerName :

      - -
    • -
    -

    Return value

    - -

    Core.Settings#SETTINGS:

    - - -
    -
    -
    -
    - - -DATABASE:GetStaticUnitTemplate(StaticName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      StaticName :

      - -
    • -
    -
    -
    -
    -
    - - -DATABASE:GetStatusGroup(GroupName) - -
    -
    - -

    Get a status to a Group within the Database, this to check crossing events for example.

    - -

    Parameter

    -
      -
    • - -

      GroupName :

      - -
    • -
    -
    -
    -
    -
    - - - -DATABASE.Navpoints - -
    -
    - - - -
    -
    -
    -
    - - -DATABASE:New() - -
    -
    - -

    Creates a new DATABASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

    - -

    Return value

    - -

    #DATABASE:

    - - -

    Usage:

    -
    -- Define a new DATABASE Object. This DBObject will contain a reference to all Group and Unit Templates defined within the ME and the DCSRTE.
    -DBObject = DATABASE:New()
    - -
    -
    -
    -
    - - -DATABASE:OnEventDeleteCargo(EventData) - -
    -
    - -

    Handles the OnEventDeleteCargo.

    - -

    Parameter

    - -
    -
    -
    -
    - - -DATABASE:OnEventNewCargo(EventData) - -
    -
    - -

    Handles the OnEventNewCargo event.

    - -

    Parameter

    - -
    -
    -
    -
    - - -DATABASE:SetPlayerSettings(PlayerName, Settings) - -
    -
    - -

    Sets the player settings

    - -

    Parameters

    - -

    Return value

    - -

    Core.Settings#SETTINGS:

    - - -
    -
    -
    -
    - - -DATABASE:SetStatusGroup(GroupName, Status) - -
    -
    - -

    Set a status to a Group within the Database, this to check crossing events for example.

    - -

    Parameters

    -
      -
    • - -

      GroupName :

      - -
    • -
    • - -

      Status :

      - -
    • -
    -
    -
    -
    -
    - - -DATABASE:Spawn(SpawnTemplate) - -
    -
    - -

    Instantiate new Groups within the DCSRTE.

    - - -

    This method expects EXACTLY the same structure as a structure within the ME, and needs 2 additional fields defined: -SpawnCountryID, SpawnCategoryID -This method is used by the SPAWN class.

    - -

    Parameter

    -
      -
    • - -

      #table SpawnTemplate :

      - -
    • -
    -

    Return value

    - -

    #DATABASE: -self

    - -
    -
    -
    -
    - - - -DATABASE.UNITS - -
    -
    - - - -
    -
    -
    -
    - - #number - -DATABASE.UNITS_Position - -
    -
    - - - -
    -
    -
    -
    - - -DATABASE:_EventOnBirth(Event) - -
    -
    - -

    Handles the OnBirth event for the alive units set.

    - -

    Parameter

    - -
    -
    -
    -
    - - -DATABASE:_EventOnDeadOrCrash(Event) - -
    -
    - -

    Handles the OnDead or OnCrash event for alive units set.

    - -

    Parameter

    - -
    -
    -
    -
    - - -DATABASE:_EventOnPlayerEnterUnit(Event) - -
    -
    - -

    Handles the OnPlayerEnterUnit event to fill the active players table (with the unit filter applied).

    - -

    Parameter

    - -
    -
    -
    -
    - - -DATABASE:_EventOnPlayerLeaveUnit(Event) - -
    -
    - -

    Handles the OnPlayerLeaveUnit event to clean the active players table.

    - -

    Parameter

    - -
    -
    -
    -
    - - -DATABASE:_RegisterAirbases() - -
    -
    - - - -
    -
    -
    -
    - - -DATABASE:_RegisterClients() - -
    -
    - -

    Private method that registers all Units of skill Client or Player within in the mission.

    - -

    Return value

    - -

    #DATABASE: -self

    - -
    -
    -
    -
    - - -DATABASE:_RegisterGroupTemplate(GroupTemplate, CoalitionSide, CategoryID, CountryID, GroupName) - -
    -
    - -

    Private method that registers new Group Templates within the DATABASE Object.

    - -

    Parameters

    - -

    Return value

    - -

    #DATABASE: -self

    - -
    -
    -
    -
    - - -DATABASE:_RegisterGroupsAndUnits() - -
    -
    - -

    Private method that registers all Groups and Units within in the mission.

    - -

    Return value

    - -

    #DATABASE: -self

    - -
    -
    -
    -
    - - -DATABASE:_RegisterPlayers() - -
    -
    - -

    Private method that registers all alive players in the mission.

    - -

    Return value

    - -

    #DATABASE: -self

    - -
    -
    -
    -
    - - -DATABASE:_RegisterStaticTemplate(GroupTemplate, StaticTemplate, CoalitionID, CategoryID, CountryID) - -
    -
    - -

    Private method that registers new Static Templates within the DATABASE Object.

    - -

    Parameters

    -
      -
    • - -

      #table GroupTemplate :

      - -
    • -
    • - -

      StaticTemplate :

      - -
    • -
    • - -

      CoalitionID :

      - -
    • -
    • - -

      CategoryID :

      - -
    • -
    • - -

      CountryID :

      - -
    • -
    -

    Return value

    - -

    #DATABASE: -self

    - -
    -
    -
    -
    - - -DATABASE:_RegisterStatics() - -
    -
    - - - -
    -
    -
    -
    - - -DATABASE:_RegisterTemplates() - -
    -
    - - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Designate.html b/docs/Documentation/Designate.html deleted file mode 100644 index 0df1c3540..000000000 --- a/docs/Documentation/Designate.html +++ /dev/null @@ -1,2878 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Designate

    - -

    Functional -- Management of target Designation.

    - - -

    Lase, smoke and illuminate targets.

    - -

    --Banner Image

    - -
    - -

    DESIGNATE is orchestrating the designation of potential targets executed by a Recce group, -and communicates these to a dedicated attacking group of players, -so that following a dynamically generated menu system, -each detected set of potential targets can be lased or smoked...

    - -

    Targets can be:

    - -
      -
    • Lased for a period of time.
    • -
    • Smoked. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.)
    • -
    • Illuminated through an illumination bomb. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.
    • -
    - -
    - -

    AUTHORS and CONTRIBUTIONS

    - -

    Contributions:

    - -
      -
    • Ciribob: Showing the way how to lase targets + how laser codes work!!! Explained the autolase script.
    • -
    • EasyEB: Ideas and Beta Testing
    • -
    • Wingthor: Beta Testing
    • -
    - - -

    Authors:

    - -
      -
    • FlightControl: Design & Programming
    • -
    - - -

    Global(s)

    - - - - - -
    DESIGNATE -

    DESIGNATE class, extends Fsm#FSM

    - -

    DESIGNATE is orchestrating the designation of potential targets executed by a Recce group, -and communicates these to a dedicated attacking group of players, -so that following a dynamically generated menu system, -each detected set of potential targets can be lased or smoked...

    -
    -

    Type DESIGNATE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    DESIGNATE:AddMenuLaserCode(LaserCode, MenuText) -

    Add a specific lase code to the designate lase menu to lase targets with a specific laser code.

    -
    DESIGNATE.AttackSet - -
    DESIGNATE.AutoLase - -
    DESIGNATE.CC - -
    DESIGNATE:CoordinateLase() -

    Coordinates the Auto Lase.

    -
    DESIGNATE.DesignateName - -
    DESIGNATE.Designating - -
    DESIGNATE:DesignationScope() -

    Adapt the designation scope according the detected items.

    -
    DESIGNATE:Detect() -

    Detect Trigger for DESIGNATE

    -
    DESIGNATE.Detection - -
    DESIGNATE.FlashStatusMenu - -
    DESIGNATE:GenerateLaserCodes() -

    Generate an array of possible laser codes.

    -
    DESIGNATE:Illuminate() -

    Illuminate Trigger for DESIGNATE

    -
    DESIGNATE.LaseDuration - -
    DESIGNATE:LaseOff() -

    LaseOff Trigger for DESIGNATE

    -
    DESIGNATE:LaseOn() -

    LaseOn Trigger for DESIGNATE

    -
    DESIGNATE.LaseStart - -
    DESIGNATE.LaserCodes - -
    DESIGNATE.LaserCodesUsed - -
    DESIGNATE.MarkScheduler - -
    DESIGNATE.MaximumDesignations - -
    DESIGNATE.MaximumDistanceAirDesignation - -
    DESIGNATE.MaximumDistanceDesignations - -
    DESIGNATE.MaximumDistanceGroundDesignation - -
    DESIGNATE.MaximumMarkings - -
    DESIGNATE:MenuAutoLase(AutoLase) - -
    DESIGNATE.MenuDesignate - -
    DESIGNATE:MenuFlashStatus(AttackGroup, Flash) - -
    DESIGNATE:MenuForget(Index) - -
    DESIGNATE:MenuIlluminate(Index) - -
    DESIGNATE:MenuLaseCode(Index, Duration, LaserCode) - -
    DESIGNATE:MenuLaseOff(Index, Duration) - -
    DESIGNATE:MenuLaseOn(Index, Duration) - -
    DESIGNATE.MenuLaserCodes - -
    DESIGNATE:MenuSmoke(Index, Color) - -
    DESIGNATE:MenuStatus(AttackGroup, Duration) - -
    DESIGNATE.Mission - -
    DESIGNATE:New(CC, Detection, AttackSet, Mission) -

    DESIGNATE Constructor.

    -
    DESIGNATE:OnAfterDetect(From, Event, To) -

    Detect Handler OnAfter for DESIGNATE

    -
    DESIGNATE:OnAfterIlluminate(From, Event, To) -

    Illuminate Handler OnAfter for DESIGNATE

    -
    DESIGNATE:OnAfterLaseOff(From, Event, To) -

    LaseOff Handler OnAfter for DESIGNATE

    -
    DESIGNATE:OnAfterLaseOn(From, Event, To) -

    LaseOn Handler OnAfter for DESIGNATE

    -
    DESIGNATE:OnAfterSmoke(From, Event, To) -

    Smoke Handler OnAfter for DESIGNATE

    -
    DESIGNATE:OnAfterStatus(From, Event, To) -

    Status Handler OnAfter for DESIGNATE

    -
    DESIGNATE:OnBeforeDetect(From, Event, To) -

    Detect Handler OnBefore for DESIGNATE

    -
    DESIGNATE:OnBeforeIlluminate(From, Event, To) -

    Illuminate Handler OnBefore for DESIGNATE

    -
    DESIGNATE:OnBeforeLaseOff(From, Event, To) -

    LaseOff Handler OnBefore for DESIGNATE

    -
    DESIGNATE:OnBeforeLaseOn(From, Event, To) -

    LaseOn Handler OnBefore for DESIGNATE

    -
    DESIGNATE:OnBeforeSmoke(From, Event, To) -

    Smoke Handler OnBefore for DESIGNATE

    -
    DESIGNATE:OnBeforeStatus(From, Event, To) -

    Status Handler OnBefore for DESIGNATE

    -
    DESIGNATE.RecceSet - -
    DESIGNATE.Recces - -
    DESIGNATE:RemoveMenuLaserCode(LaserCode) -

    Removes a specific lase code from the designate lase menu.

    -
    DESIGNATE:SendStatus(AttackGroup, Duration, MenuAttackGroup) -

    Sends the status to the Attack Groups.

    -
    DESIGNATE:SetAutoLase(AutoLase, Message) -

    Set auto lase.

    -
    DESIGNATE:SetDesignateMenu() -

    Sets the Designate Menu.

    -
    DESIGNATE:SetDesignateName(DesignateName) -

    Set the name of the designation.

    -
    DESIGNATE:SetFlashStatusMenu(FlashMenu) -

    Set the flashing of the status menu.

    -
    DESIGNATE:SetLaserCodes(<, LaserCodes) -

    Set an array of possible laser codes.

    -
    DESIGNATE:SetMaximumDesignations(MaximumDesignations) -

    Set the maximum amount of designations.

    -
    DESIGNATE:SetMaximumDistanceAirDesignation(MaximumDistanceAirDesignation) -

    Set the maximum air designation distance.

    -
    DESIGNATE:SetMaximumDistanceDesignations(MaximumDistanceDesignations) -

    Set the overall maximum distance when designations can be accepted.

    -
    DESIGNATE:SetMaximumDistanceGroundDesignation(MaximumDistanceGroundDesignation) -

    Set the maximum ground designation distance.

    -
    DESIGNATE:SetMaximumMarkings(MaximumMarkings) -

    Set the maximum amount of markings FACs will do, per designated target group.

    -
    DESIGNATE:SetMission(Mission) -

    Set the MISSION object for which designate will function.

    -
    DESIGNATE:SetThreatLevelPrioritization(Prioritize) -

    Set priorization of Targets based on the Threat Level of the Target in an Air to Ground context.

    -
    DESIGNATE:Smoke() -

    Smoke Trigger for DESIGNATE

    -
    DESIGNATE:Status() -

    Status Trigger for DESIGNATE

    -
    DESIGNATE.ThreatLevelPrioritization - -
    DESIGNATE:__Detect(Delay) -

    Detect Asynchronous Trigger for DESIGNATE

    -
    DESIGNATE:__Illuminate(Delay) -

    Illuminate Asynchronous Trigger for DESIGNATE

    -
    DESIGNATE:__LaseOff(Delay) -

    LaseOff Asynchronous Trigger for DESIGNATE

    -
    DESIGNATE:__LaseOn(Delay) -

    LaseOn Asynchronous Trigger for DESIGNATE

    -
    DESIGNATE:__Smoke(Delay) -

    Smoke Asynchronous Trigger for DESIGNATE

    -
    DESIGNATE:__Status(Delay) -

    Status Asynchronous Trigger for DESIGNATE

    -
    DESIGNATE:onafterDetect() - -
    DESIGNATE:onafterDone(From, Event, To, Index) -

    Done

    -
    DESIGNATE:onafterIlluminate(From, Event, To, Index) -

    Illuminating

    -
    DESIGNATE:onafterLaseOff(From, Event, To, Index) - -
    DESIGNATE:onafterLaseOn(From, Event, To, Index, Duration, LaserCode) - -
    DESIGNATE:onafterLasing(From, Event, To, Index, Duration, LaserCodeRequested) - -
    DESIGNATE:onafterSmoke(From, Event, To, Index, Color) - -
    - -

    Global(s)

    -
    -
    - - #DESIGNATE - -DESIGNATE - -
    -
    - -

    DESIGNATE class, extends Fsm#FSM

    - -

    DESIGNATE is orchestrating the designation of potential targets executed by a Recce group, -and communicates these to a dedicated attacking group of players, -so that following a dynamically generated menu system, -each detected set of potential targets can be lased or smoked...

    - - - -

    Targets can be:

    - -
      -
    • Lased for a period of time.
    • -
    • Smoked. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.)
    • -
    • Illuminated through an illumination bomb. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.
    • -
    - -

    The following terminology is being used throughout this document:

    - -
      -
    • The DesignateObject is the object of the DESIGNATE class, which is this class explained in the document.
    • -
    • The DetectionObject is the object of a DETECTION_ class (DETECTIONTYPES, DETECTIONAREAS, DETECTION_UNITS), which is executing the detection and grouping of Targets into DetectionItems.
    • -
    • DetectionItems is the list of detected target groupings by the DetectionObject. Each DetectionItem contains a TargetSet.
    • -
    • DetectionItem is one element of the DetectionItems list, and contains a TargetSet.
    • -
    • The TargetSet is a SET_UNITS collection of Targets, that have been detected by the DetectionObject.
    • -
    • A Target is a detected UNIT object by the DetectionObject.
    • -
    • A Threat Level is a number from 0 to 10 that is calculated based on the threat of the Target in an Air to Ground battle scenario.
    • -
    • The RecceSet is a SET_GROUP collection that contains the RecceGroups.
    • -
    • A RecceGroup is a GROUP object containing the Recces.
    • -
    • A Recce is a UNIT object executing the reconnaissance as part the DetectionObject. A Recce can be of any UNIT type.
    • -
    • An AttackGroup is a GROUP object that contain Players.
    • -
    • A Player is an active CLIENT object containing a human player.
    • -
    • A Designate Menu is the menu that is dynamically created during the designation process for each AttackGroup.
    • -
    - -

    The RecceSet is continuously detecting for potential Targets, executing its task as part of the DetectionObject. -Once Targets have been detected, the DesignateObject will trigger the Detect Event.

    - -

    In order to prevent an overflow in the DesignateObject of detected targets, there is a maximum -amount of DetectionItems that can be put in scope of the DesignateObject. -We call this the MaximumDesignations term.

    - -

    As part of the Detect Event, the DetectionItems list is used by the DesignateObject to provide the Players with:

    - -
      -
    • The RecceGroups are reporting to each AttackGroup, sending Messages containing the Threat Level and the TargetSet composition.
    • -
    • Menu options are created and updated for each AttackGroup, containing the Detection ID and the Coordinates.
    • -
    - -

    A Player can then select an action from the Designate Menu.

    - -

    Note that each selected action will be executed for a TargetSet, thus the Target grouping done by the DetectionObject.

    - -

    Each Menu Option in the Designate Menu has two modes:

    - -
      -
    1. If the TargetSet is not being designated, then the Designate Menu option for the target Set will provide options to Lase or Smoke the targets.
    2. -
    3. If the Target Set is being designated, then the Designate Menu option will provide an option to stop or cancel the designation.
    4. -
    - -

    While designating, the RecceGroups will report any change in TargetSet composition or Target presence.

    - -

    The following logic is executed when a TargetSet is selected to be lased from the Designation Menu:

    - -
      -
    • The RecceSet is searched for any Recce that is within designation distance from a Target in the TargetSet that is currently not being designated.
    • -
    • If there is a Recce found that is currently no designating a target, and is within designation distance from the Target, then that Target will be designated.
    • -
    • During designation, any Recce that does not have Line of Sight (LOS) and is not within disignation distance from the Target, will stop designating the Target, and a report is given.
    • -
    • When a Recce is designating a Target, and that Target is destroyed, then the Recce will stop designating the Target, and will report the event.
    • -
    • When a Recce is designating a Target, and that Recce is destroyed, then the Recce will be removed from the RecceSet and designation will stop without reporting.
    • -
    • When all RecceGroups are destroyed from the RecceSet, then the DesignationObject will stop functioning, and nothing will be reported.
    • -
    - -

    In this way, the DesignationObject assists players to designate ground targets for a coordinated attack!

    - -

    Have FUN!

    - -

    1. DESIGNATE constructor

    - - - -

    2. DESIGNATE is a FSM

    - -

    Process

    - -

    2.1 DESIGNATE States

    - -
      -
    • Designating ( Group ): The designation process.
    • -
    - -

    2.2 DESIGNATE Events

    - - - -

    3. Maximum Designations

    - -

    In order to prevent an overflow of designations due to many Detected Targets, there is a -Maximum Designations scope that is set in the DesignationObject.

    - -

    The method DESIGNATE.SetMaximumDesignations() will put a limit on the amount of designations put in scope of the DesignationObject. -Using the menu system, the player can "forget" a designation, so that gradually a new designation can be put in scope when detected.

    - -

    4. Laser codes

    - -

    4.1. Set possible laser codes

    - -

    An array of laser codes can be provided, that will be used by the DESIGNATE when lasing. -The laser code is communicated by the Recce when it is lasing a larget. -Note that the default laser code is 1113. -Working known laser codes are: 1113,1462,1483,1537,1362,1214,1131,1182,1644,1614,1515,1411,1621,1138,1542,1678,1573,1314,1643,1257,1467,1375,1341,1275,1237

    - -

    Use the method DESIGNATE.SetLaserCodes() to set the possible laser codes to be selected from. -One laser code can be given or an sequence of laser codes through an table...

    - -
    Designate:SetLaserCodes( 1214 )
    -
    - -

    The above sets one laser code with the value 1214.

    - -
    Designate:SetLaserCodes( { 1214, 1131, 1614, 1138 } )
    -
    - -

    The above sets a collection of possible laser codes that can be assigned. Note the { } notation!

    - -

    4.2. Auto generate laser codes

    - -

    Use the method DESIGNATE.GenerateLaserCodes() to generate all possible laser codes. Logic implemented and advised by Ciribob!

    - -

    4.3. Add specific lase codes to the lase menu

    - -

    Certain plane types can only drop laser guided ordonnance when targets are lased with specific laser codes. -The SU-25T needs targets to be lased using laser code 1113. -The A-10A needs targets to be lased using laser code 1680.

    - -

    The method DESIGNATE.AddMenuLaserCode() to allow a player to lase a target using a specific laser code. -Remove such a lase menu option using DESIGNATE.RemoveMenuLaserCode().

    - -

    5. Autolase to automatically lase detected targets.

    - -

    DetectionItems can be auto lased once detected by Recces. As such, there is almost no action required from the Players using the Designate Menu. -The auto lase function can be activated through the Designation Menu. -Use the method DESIGNATE.SetAutoLase() to activate or deactivate the auto lase function programmatically. -Note that autolase will automatically activate lasing for ALL DetectedItems. Individual items can be switched-off if required using the Designation Menu.

    - -
    Designate:SetAutoLase( true )
    -
    - -

    Activate the auto lasing.

    - -

    6. Target prioritization on threat level

    - -

    Targets can be detected of different types in one DetectionItem. Depending on the type of the Target, a different threat level applies in an Air to Ground combat context. -SAMs are of a higher threat than normal tanks. So, if the Target type was recognized, the Recces will select those targets that form the biggest threat first, -and will continue this until the remaining vehicles with the lowest threat have been reached.

    - -

    This threat level prioritization can be activated using the method DESIGNATE.SetThreatLevelPrioritization(). -If not activated, Targets will be selected in a random order, but most like those first which are the closest to the Recce marking the Target.

    - -
    Designate:SetThreatLevelPrioritization( true )
    -
    - -

    The example will activate the threat level prioritization for this the Designate object. Threats will be marked based on the threat level of the Target.

    - -

    6. Designate Menu Location for a Mission

    - -

    You can make DESIGNATE work for a Mission#MISSION object. In this way, the designate menu will not appear in the root of the radio menu, but in the menu of the Mission. -Use the method DESIGNATE.SetMission() to set the Mission object for the designate function.

    - -

    7. Status Report

    - -

    A status report is available that displays the current Targets detected, grouped per DetectionItem, and a list of which Targets are currently being marked.

    - -
      -
    • The status report can be shown by selecting "Status" -> "Report Status" from the Designation menu .

    • -
    • The status report can be automatically flashed by selecting "Status" -> "Flash Status On".

    • -
    • The automatic flashing of the status report can be deactivated by selecting "Status" -> "Flash Status Off".

    • -
    • The flashing of the status menu is disabled by default.

    • -
    • The method DESIGNATE.FlashStatusMenu() can be used to enable or disable to flashing of the status menu.

      - -

      Designate:FlashStatusMenu( true )

    • -
    - -

    The example will activate the flashing of the status menu for this Designate object.

    - - -
    -
    -

    Type Designate

    - -

    Type DESIGNATE

    -

    Field(s)

    -
    -
    - - -DESIGNATE:AddMenuLaserCode(LaserCode, MenuText) - -
    -
    - -

    Add a specific lase code to the designate lase menu to lase targets with a specific laser code.

    - - -

    The MenuText will appear in the lase menu.

    - -

    Parameters

    -
      -
    • - -

      #number LaserCode : -The specific laser code to be added to the lase menu.

      - -
    • -
    • - -

      #string MenuText : -The text to be shown to the player. If you specify a %d in the MenuText, the %d will be replaced with the LaserCode specified.

      - -
    • -
    -

    Return value

    - -

    #DESIGNATE:

    - - -

    Usage:

    -
      RecceDesignation:AddMenuLaserCode( 1113, "Lase with %d for Su-25T" )
    -  RecceDesignation:AddMenuLaserCode( 1680, "Lase with %d for A-10A" )
    -
    - -
    -
    -
    -
    - - - -DESIGNATE.AttackSet - -
    -
    - - - -
    -
    -
    -
    - - -DESIGNATE.AutoLase - -
    -
    - - - -
    -
    -
    -
    - - - -DESIGNATE.CC - -
    -
    - - - -
    -
    -
    -
    - - -DESIGNATE:CoordinateLase() - -
    -
    - -

    Coordinates the Auto Lase.

    - -

    Return value

    - -

    #DESIGNATE:

    - - -
    -
    -
    -
    - - -DESIGNATE.DesignateName - -
    -
    - - - -
    -
    -
    -
    - - - -DESIGNATE.Designating - -
    -
    - - - -
    -
    -
    -
    - - -DESIGNATE:DesignationScope() - -
    -
    - -

    Adapt the designation scope according the detected items.

    - -

    Return value

    - -

    #DESIGNATE:

    - - -
    -
    -
    -
    - - -DESIGNATE:Detect() - -
    -
    - -

    Detect Trigger for DESIGNATE

    - -
    -
    -
    -
    - - - -DESIGNATE.Detection - -
    -
    - - - -
    -
    -
    -
    - - - -DESIGNATE.FlashStatusMenu - -
    -
    - - - -
    -
    -
    -
    - - -DESIGNATE:GenerateLaserCodes() - -
    -
    - -

    Generate an array of possible laser codes.

    - - -

    Each new lase will select a code from this table. -The entered value can range from 1111 - 1788, --- but the first digit of the series must be a 1 or 2 --- and the last three digits must be between 1 and 8. - The range used to be bugged so its not 1 - 8 but 0 - 7. -function below will use the range 1-7 just in case

    - -

    Return value

    - -

    #DESIGNATE:

    - - -
    -
    -
    -
    - - -DESIGNATE:Illuminate() - -
    -
    - -

    Illuminate Trigger for DESIGNATE

    - -
    -
    -
    -
    - - #number - -DESIGNATE.LaseDuration - -
    -
    - - - -
    -
    -
    -
    - - -DESIGNATE:LaseOff() - -
    -
    - -

    LaseOff Trigger for DESIGNATE

    - -
    -
    -
    -
    - - -DESIGNATE:LaseOn() - -
    -
    - -

    LaseOn Trigger for DESIGNATE

    - -
    -
    -
    -
    - - - -DESIGNATE.LaseStart - -
    -
    - - - -
    -
    -
    -
    - - - -DESIGNATE.LaserCodes - -
    -
    - - - -
    -
    -
    -
    - - - -DESIGNATE.LaserCodesUsed - -
    -
    - - - -
    -
    -
    -
    - - - -DESIGNATE.MarkScheduler - -
    -
    - - - -
    -
    -
    -
    - - - -DESIGNATE.MaximumDesignations - -
    -
    - - - -
    -
    -
    -
    - - - -DESIGNATE.MaximumDistanceAirDesignation - -
    -
    - - - -
    -
    -
    -
    - - - -DESIGNATE.MaximumDistanceDesignations - -
    -
    - - - -
    -
    -
    -
    - - - -DESIGNATE.MaximumDistanceGroundDesignation - -
    -
    - - - -
    -
    -
    -
    - - - -DESIGNATE.MaximumMarkings - -
    -
    - - - -
    -
    -
    -
    - - -DESIGNATE:MenuAutoLase(AutoLase) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      AutoLase :

      - -
    • -
    -
    -
    -
    -
    - - -DESIGNATE.MenuDesignate - -
    -
    - - - -
    -
    -
    -
    - - -DESIGNATE:MenuFlashStatus(AttackGroup, Flash) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      AttackGroup :

      - -
    • -
    • - -

      Flash :

      - -
    • -
    -
    -
    -
    -
    - - -DESIGNATE:MenuForget(Index) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      Index :

      - -
    • -
    -
    -
    -
    -
    - - -DESIGNATE:MenuIlluminate(Index) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      Index :

      - -
    • -
    -
    -
    -
    -
    - - -DESIGNATE:MenuLaseCode(Index, Duration, LaserCode) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Index :

      - -
    • -
    • - -

      Duration :

      - -
    • -
    • - -

      LaserCode :

      - -
    • -
    -
    -
    -
    -
    - - -DESIGNATE:MenuLaseOff(Index, Duration) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Index :

      - -
    • -
    • - -

      Duration :

      - -
    • -
    -
    -
    -
    -
    - - -DESIGNATE:MenuLaseOn(Index, Duration) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Index :

      - -
    • -
    • - -

      Duration :

      - -
    • -
    -
    -
    -
    -
    - - - -DESIGNATE.MenuLaserCodes - -
    -
    - - - - -

    This map contains the laser codes that will be shown in the designate menu to lase with specific laser codes.

    - -
    -
    -
    -
    - - -DESIGNATE:MenuSmoke(Index, Color) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Index :

      - -
    • -
    • - -

      Color :

      - -
    • -
    -
    -
    -
    -
    - - -DESIGNATE:MenuStatus(AttackGroup, Duration) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      AttackGroup :

      - -
    • -
    • - -

      Duration :

      - -
    • -
    -
    -
    -
    -
    - - - -DESIGNATE.Mission - -
    -
    - - - -
    -
    -
    -
    - - -DESIGNATE:New(CC, Detection, AttackSet, Mission) - -
    -
    - -

    DESIGNATE Constructor.

    - - -

    This class is an abstract class and should not be instantiated.

    - -

    Parameters

    - -

    Return value

    - -

    #DESIGNATE:

    - - -
    -
    -
    -
    - - -DESIGNATE:OnAfterDetect(From, Event, To) - -
    -
    - -

    Detect Handler OnAfter for DESIGNATE

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -DESIGNATE:OnAfterIlluminate(From, Event, To) - -
    -
    - -

    Illuminate Handler OnAfter for DESIGNATE

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -DESIGNATE:OnAfterLaseOff(From, Event, To) - -
    -
    - -

    LaseOff Handler OnAfter for DESIGNATE

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -DESIGNATE:OnAfterLaseOn(From, Event, To) - -
    -
    - -

    LaseOn Handler OnAfter for DESIGNATE

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -DESIGNATE:OnAfterSmoke(From, Event, To) - -
    -
    - -

    Smoke Handler OnAfter for DESIGNATE

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -DESIGNATE:OnAfterStatus(From, Event, To) - -
    -
    - -

    Status Handler OnAfter for DESIGNATE

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -DESIGNATE:OnBeforeDetect(From, Event, To) - -
    -
    - -

    Detect Handler OnBefore for DESIGNATE

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -DESIGNATE:OnBeforeIlluminate(From, Event, To) - -
    -
    - -

    Illuminate Handler OnBefore for DESIGNATE

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -DESIGNATE:OnBeforeLaseOff(From, Event, To) - -
    -
    - -

    LaseOff Handler OnBefore for DESIGNATE

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -DESIGNATE:OnBeforeLaseOn(From, Event, To) - -
    -
    - -

    LaseOn Handler OnBefore for DESIGNATE

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -DESIGNATE:OnBeforeSmoke(From, Event, To) - -
    -
    - -

    Smoke Handler OnBefore for DESIGNATE

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -DESIGNATE:OnBeforeStatus(From, Event, To) - -
    -
    - -

    Status Handler OnBefore for DESIGNATE

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - - -DESIGNATE.RecceSet - -
    -
    - - - -
    -
    -
    -
    - - - -DESIGNATE.Recces - -
    -
    - - - -
    -
    -
    -
    - - -DESIGNATE:RemoveMenuLaserCode(LaserCode) - -
    -
    - -

    Removes a specific lase code from the designate lase menu.

    - -

    Parameter

    -
      -
    • - -

      #number LaserCode : -The specific laser code that was set to be added to the lase menu.

      - -
    • -
    -

    Return value

    - -

    #DESIGNATE:

    - - -

    Usage:

    -
      RecceDesignation:RemoveMenuLaserCode( 1113 )
    -  
    - -
    -
    -
    -
    - - -DESIGNATE:SendStatus(AttackGroup, Duration, MenuAttackGroup) - -
    -
    - -

    Sends the status to the Attack Groups.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP AttackGroup :

      - -
    • -
    • - -

      #number Duration : -The time in seconds the report should be visible.

      - -
    • -
    • - -

      MenuAttackGroup :

      - -
    • -
    -

    Return value

    - -

    #DESIGNATE:

    - - -
    -
    -
    -
    - - -DESIGNATE:SetAutoLase(AutoLase, Message) - -
    -
    - -

    Set auto lase.

    - - -

    Auto lase will start lasing targets immediately when these are in range.

    - -

    Parameters

    -
      -
    • - -

      #boolean AutoLase : -(optional) true sets autolase on, false off. Default is off.

      - -
    • -
    • - -

      #boolean Message : -(optional) true is send message, false or nil won't send a message. Default is no message sent.

      - -
    • -
    -

    Return value

    - -

    #DESIGNATE:

    - - -
    -
    -
    -
    - - -DESIGNATE:SetDesignateMenu() - -
    -
    - -

    Sets the Designate Menu.

    - -

    Return value

    - -

    #DESIGNATE:

    - - -
    -
    -
    -
    - - -DESIGNATE:SetDesignateName(DesignateName) - -
    -
    - -

    Set the name of the designation.

    - - -

    The name will appear in the menu. -This method can be used to control different designations for different plane types.

    - -

    Parameter

    -
      -
    • - -

      #string DesignateName :

      - -
    • -
    -

    Return value

    - -

    #DESIGNATE:

    - - -
    -
    -
    -
    - - -DESIGNATE:SetFlashStatusMenu(FlashMenu) - -
    -
    - -

    Set the flashing of the status menu.

    - -

    Parameter

    -
      -
    • - -

      #boolean FlashMenu : -true: the status menu will be flashed every detection run; false: no flashing of the menu.

      - -
    • -
    -

    Return value

    - -

    #DESIGNATE:

    - - -
    -
    -
    -
    - - -DESIGNATE:SetLaserCodes(<, LaserCodes) - -
    -
    - -

    Set an array of possible laser codes.

    - - -

    Each new lase will select a code from this table.

    - -

    Parameters

    -
      -
    • - -

      #list < : -number> LaserCodes

      - -
    • -
    • - -

      LaserCodes :

      - -
    • -
    -

    Return value

    - -

    #DESIGNATE:

    - - -
    -
    -
    -
    - - -DESIGNATE:SetMaximumDesignations(MaximumDesignations) - -
    -
    - -

    Set the maximum amount of designations.

    - -

    Parameter

    -
      -
    • - -

      #number MaximumDesignations :

      - -
    • -
    -

    Return value

    - -

    #DESIGNATE:

    - - -
    -
    -
    -
    - - -DESIGNATE:SetMaximumDistanceAirDesignation(MaximumDistanceAirDesignation) - -
    -
    - -

    Set the maximum air designation distance.

    - -

    Parameter

    -
      -
    • - -

      #number MaximumDistanceAirDesignation : -Maximum air designation distance in meters.

      - -
    • -
    -

    Return value

    - -

    #DESIGNATE:

    - - -
    -
    -
    -
    - - -DESIGNATE:SetMaximumDistanceDesignations(MaximumDistanceDesignations) - -
    -
    - -

    Set the overall maximum distance when designations can be accepted.

    - -

    Parameter

    -
      -
    • - -

      #number MaximumDistanceDesignations : -Maximum distance in meters to accept designations.

      - -
    • -
    -

    Return value

    - -

    #DESIGNATE:

    - - -
    -
    -
    -
    - - -DESIGNATE:SetMaximumDistanceGroundDesignation(MaximumDistanceGroundDesignation) - -
    -
    - -

    Set the maximum ground designation distance.

    - -

    Parameter

    -
      -
    • - -

      #number MaximumDistanceGroundDesignation : -Maximum ground designation distance in meters.

      - -
    • -
    -

    Return value

    - -

    #DESIGNATE:

    - - -
    -
    -
    -
    - - -DESIGNATE:SetMaximumMarkings(MaximumMarkings) - -
    -
    - -

    Set the maximum amount of markings FACs will do, per designated target group.

    - -

    Parameter

    -
      -
    • - -

      #number MaximumMarkings : -Maximum markings FACs will do, per designated target group.

      - -
    • -
    -

    Return value

    - -

    #DESIGNATE:

    - - -
    -
    -
    -
    - - -DESIGNATE:SetMission(Mission) - -
    -
    - -

    Set the MISSION object for which designate will function.

    - - -

    When a MISSION object is assigned, the menu for the designation will be located at the Mission Menu.

    - -

    Parameter

    - -

    Return value

    - -

    #DESIGNATE:

    - - -
    -
    -
    -
    - - -DESIGNATE:SetThreatLevelPrioritization(Prioritize) - -
    -
    - -

    Set priorization of Targets based on the Threat Level of the Target in an Air to Ground context.

    - -

    Parameter

    -
      -
    • - -

      #boolean Prioritize :

      - -
    • -
    -

    Return value

    - -

    #DESIGNATE:

    - - -
    -
    -
    -
    - - -DESIGNATE:Smoke() - -
    -
    - -

    Smoke Trigger for DESIGNATE

    - -
    -
    -
    -
    - - -DESIGNATE:Status() - -
    -
    - -

    Status Trigger for DESIGNATE

    - -
    -
    -
    -
    - - - -DESIGNATE.ThreatLevelPrioritization - -
    -
    - - - -
    -
    -
    -
    - - -DESIGNATE:__Detect(Delay) - -
    -
    - -

    Detect Asynchronous Trigger for DESIGNATE

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -DESIGNATE:__Illuminate(Delay) - -
    -
    - -

    Illuminate Asynchronous Trigger for DESIGNATE

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -DESIGNATE:__LaseOff(Delay) - -
    -
    - -

    LaseOff Asynchronous Trigger for DESIGNATE

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -DESIGNATE:__LaseOn(Delay) - -
    -
    - -

    LaseOn Asynchronous Trigger for DESIGNATE

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -DESIGNATE:__Smoke(Delay) - -
    -
    - -

    Smoke Asynchronous Trigger for DESIGNATE

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -DESIGNATE:__Status(Delay) - -
    -
    - -

    Status Asynchronous Trigger for DESIGNATE

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -DESIGNATE:onafterDetect() - -
    -
    - - - -

    Return value

    - -

    #DESIGNATE:

    - - -
    -
    -
    -
    - - -DESIGNATE:onafterDone(From, Event, To, Index) - -
    -
    - -

    Done

    - -

    Parameters

    -
      -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    • - -

      Index :

      - -
    • -
    -

    Return value

    - -

    #DESIGNATE:

    - - -
    -
    -
    -
    - - -DESIGNATE:onafterIlluminate(From, Event, To, Index) - -
    -
    - -

    Illuminating

    - -

    Parameters

    -
      -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    • - -

      Index :

      - -
    • -
    -

    Return value

    - -

    #DESIGNATE:

    - - -
    -
    -
    -
    - - -DESIGNATE:onafterLaseOff(From, Event, To, Index) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    • - -

      Index :

      - -
    • -
    -

    Return value

    - -

    #DESIGNATE:

    - - -
    -
    -
    -
    - - -DESIGNATE:onafterLaseOn(From, Event, To, Index, Duration, LaserCode) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    • - -

      Index :

      - -
    • -
    • - -

      Duration :

      - -
    • -
    • - -

      LaserCode :

      - -
    • -
    -
    -
    -
    -
    - - -DESIGNATE:onafterLasing(From, Event, To, Index, Duration, LaserCodeRequested) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    • - -

      Index :

      - -
    • -
    • - -

      Duration :

      - -
    • -
    • - -

      LaserCodeRequested :

      - -
    • -
    -

    Return value

    - -

    #DESIGNATE:

    - - -
    -
    -
    -
    - - -DESIGNATE:onafterSmoke(From, Event, To, Index, Color) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    • - -

      Index :

      - -
    • -
    • - -

      Color :

      - -
    • -
    -

    Return value

    - -

    #DESIGNATE:

    - - -
    -
    - -

    Type list

    - -
    - -
    - - diff --git a/docs/Documentation/Detection.html b/docs/Documentation/Detection.html deleted file mode 100644 index 9cdab9972..000000000 --- a/docs/Documentation/Detection.html +++ /dev/null @@ -1,5763 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Detection

    - -

    Functional -- DETECTION_ classes model the detection of enemy units by FACs or RECCEs and group them according various methods.

    - - - -

    Banner Image

    - -
    - -

    DETECTION classes facilitate the detection of enemy units within the battle zone executed by FACs (Forward Air Controllers) or RECCEs (Reconnassance Units). -DETECTION uses the in-built detection capabilities of DCS World, but adds new functionalities.

    - -

    Find the DETECTION classes documentation further in this document in the globals section.

    - -
    - -

    Demo Missions

    - -

    DETECTION Demo Missions and Source Code

    - -

    DETECTION Demo Missions, only for Beta Testers

    - -

    ALL Demo Missions pack of the Latest Release

    - -
    - -

    YouTube Channel

    - -

    DETECTION YouTube Channel

    - -
    - -

    Contributions:

    - -
      -
    • Mechanist : Early concept of DETECTION_AREAS.
    • -
    - -

    Authors:

    - -
      -
    • FlightControl : Analysis, Design, Programming, Testing
    • -
    - - -

    Global(s)

    - - - - - - - - - - - - - - - - - -
    DETECTION_AREAS - -
    DETECTION_BASE -

    DETECTION_BASE class, extends Fsm#FSM

    - -

    The DETECTION_BASE class defines the core functions to administer detected objects.

    -
    DETECTION_TYPES - -
    DETECTION_UNITS - -
    -

    Type DETECTION_AREAS

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    DETECTION_AREAS:BoundDetectedZones() -

    Bound the detected zones

    -
    DETECTION_AREAS:CalculateIntercept(DetectedItem) -

    Calculate the optimal intercept point of the DetectedItem.

    -
    DETECTION_AREAS.ClassName - -
    DETECTION_AREAS.CountryID - -
    DETECTION_AREAS:CreateDetectionItems() -

    Make a DetectionSet table.

    -
    DETECTION_AREAS:DetectedItemMenu(Index, AttackGroup) -

    Menu of a detected item using a given numeric index.

    -
    DETECTION_AREAS:DetectedItemReportSummary(Index, AttackGroup, Settings) -

    Report summary of a detected item using a given numeric index.

    -
    DETECTION_AREAS.DetectedItems -

    A list of areas containing the set of Units, Zones, the center Unit within the zone, and ID of each area that was detected within a DetectionZoneRange.

    -
    DETECTION_AREAS:DetectedReportDetailed(AttackGroup) -

    Report detailed of a detection result.

    -
    DETECTION_AREAS.DetectionZoneRange -

    The range till which targets are grouped upon the first detected target.

    -
    DETECTION_AREAS:FlareDetectedUnits() -

    Flare the detected units

    -
    DETECTION_AREAS:FlareDetectedZones() -

    Flare the detected zones

    -
    DETECTION_AREAS:GetChangeText(DetectedItem) -

    Make text documenting the changes of the detected zone.

    -
    DETECTION_AREAS:NearestFAC(DetectedItem) -

    Find the nearest FAC of the DetectedItem.

    -
    DETECTION_AREAS:New(DetectionSetGroup, DetectionZoneRange) -

    DETECTION_AREAS constructor.

    -
    DETECTION_AREAS:SmokeDetectedUnits() -

    Smoke the detected units

    -
    DETECTION_AREAS:SmokeDetectedZones() -

    Smoke the detected zones

    -
    DETECTION_AREAS._BoundDetectedZones - -
    DETECTION_AREAS._FlareDetectedUnits - -
    DETECTION_AREAS._FlareDetectedZones - -
    DETECTION_AREAS._SmokeDetectedUnits - -
    DETECTION_AREAS._SmokeDetectedZones - -
    - -

    Type DETECTION_BASE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    DETECTION_BASE:AcceptChanges(DetectedItem) -

    Accepts changes from the detected item.

    -
    DETECTION_BASE.AcceptRange - -
    DETECTION_BASE.AcceptZones - -
    DETECTION_BASE:AddChangeItem(DetectedItem, ChangeCode, ItemUnitType) -

    Add a change to the detected zone.

    -
    DETECTION_BASE:AddChangeUnit(DetectedItem, ChangeCode, ChangeUnitType) -

    Add a change to the detected zone.

    -
    DETECTION_BASE:AddDetectedItem(ItemPrefix, DetectedItemIndex, Set) -

    Adds a new DetectedItem to the DetectedItems list.

    -
    DETECTION_BASE:AddDetectedItemZone(DetectedItemIndex, Set, Zone) -

    Adds a new DetectedItem to the DetectedItems list.

    -
    DETECTION_BASE.AlphaAngleProbability - -
    DETECTION_BASE:CleanDetectionItem(DetectedItem, DetectedItemID) - -
    DETECTION_BASE:CreateDetectionItems() -

    Make a DetectionSet table.

    -
    DETECTION_BASE:Detect() -

    Synchronous Event Trigger for Event Detect.

    -
    DETECTION_BASE.DetectDLINK - -
    DETECTION_BASE.DetectIRST - -
    DETECTION_BASE.DetectOptical - -
    DETECTION_BASE.DetectRWR - -
    DETECTION_BASE.DetectRadar - -
    DETECTION_BASE.DetectVisual - -
    DETECTION_BASE:Detected() -

    Synchronous Event Trigger for Event Detected.

    -
    DETECTION_BASE.DetectedItemCount - -
    DETECTION_BASE.DetectedItemMax - -
    DETECTION_BASE:DetectedItemMenu(Index, AttackGroup) -

    Menu of a detected item using a given numeric index.

    -
    DETECTION_BASE:DetectedItemReportSummary(Index, AttackGroup, Settings) -

    Report summary of a detected item using a given numeric index.

    -
    DETECTION_BASE.DetectedItems - -
    DETECTION_BASE.DetectedObjects -

    The list of detected objects.

    -
    DETECTION_BASE.DetectedObjectsIdentified -

    Map of the DetectedObjects identified.

    -
    DETECTION_BASE:DetectedReportDetailed(AttackGroup) -

    Report detailed of a detectedion result.

    -
    DETECTION_BASE.DetectionCount - -
    DETECTION_BASE.DetectionRange -

    The range till which targets are accepted to be detected.

    -
    DETECTION_BASE.DetectionRun - -
    DETECTION_BASE.DetectionScheduler - -
    DETECTION_BASE.DetectionSetGroup -

    The Set of GROUPs in the Forward Air Controller role.

    -
    DETECTION_BASE.DistanceProbability - -
    DETECTION_BASE:FilterCategories(<, FilterCategories) -

    Filter the detected units based on Unit.Category
    -The different values of Unit.Category can be:

    - -
      -
    • Unit.Category.AIRPLANE
    • -
    • Unit.Category.GROUND_UNIT
    • -
    • Unit.Category.HELICOPTER
    • -
    • Unit.Category.SHIP
    • -
    • Unit.Category.STRUCTURE
    • -
    - -

    Multiple Unit.Category entries can be given as a table and then these will be evaluated as an OR expression.

    -
    DETECTION_BASE:FilterFriendliesCategory(FriendliesCategory) -

    Filters friendly units by unit category.

    -
    DETECTION_BASE:ForgetDetectedUnit(UnitName) -

    Forget a Unit from a DetectionItem

    -
    DETECTION_BASE.FriendliesCategory - -
    DETECTION_BASE.FriendliesRange - -
    DETECTION_BASE.FriendlyPrefixes - -
    DETECTION_BASE:GetDetectedID(Index) -

    Get a detected ID using a given numeric index.

    -
    DETECTION_BASE:GetDetectedItem(Index) -

    Get a detected item using a given numeric index.

    -
    DETECTION_BASE:GetDetectedItemCoordinate(Index) -

    Get the detected item coordinate.

    -
    DETECTION_BASE:GetDetectedItemID(Index) -

    Get a detected ItemID using a given numeric index.

    -
    DETECTION_BASE:GetDetectedItemThreatLevel(Index) -

    Get the detected item coordinate.

    -
    DETECTION_BASE:GetDetectedItemZone(Index) -

    Get the Zone#ZONE_UNIT of a detection area using a given numeric index.

    -
    DETECTION_BASE:GetDetectedItems() -

    Get the detected Set#SET_BASEs.

    -
    DETECTION_BASE:GetDetectedItemsCount() -

    Get the amount of SETs with detected objects.

    -
    DETECTION_BASE:GetDetectedObject(ObjectName) -

    Gets a detected object with a given name.

    -
    DETECTION_BASE:GetDetectedSet(Index) -

    Get the Set#SET_UNIT of a detecttion area using a given numeric index.

    -
    DETECTION_BASE:GetDetectedUnitTypeName(DetectedUnit) -

    Gets a detected unit type name, taking into account the detection results.

    -
    DETECTION_BASE:GetDetectionSetGroup() -

    Get the detection Groups.

    -
    DETECTION_BASE:GetFriendliesDistance(DetectedItem) -

    Returns the distance used to identify friendlies near the deteted item ...

    -
    DETECTION_BASE:GetFriendliesNearBy(DetectedItem) -

    Returns friendly units nearby the FAC units ...

    -
    DETECTION_BASE:GetFriendliesNearIntercept(DetectedItem) -

    Returns friendly units nearby the intercept point ...

    -
    DETECTION_BASE:GetPlayersNearBy(DetectedItem) -

    Returns friendly units nearby the FAC units ...

    -
    DETECTION_BASE:IdentifyDetectedObject(DetectedObject) -

    Identifies a detected object during detection processing.

    -
    DETECTION_BASE:InitDetectDLINK(DetectDLINK) -

    Detect DLINK.

    -
    DETECTION_BASE:InitDetectIRST(DetectIRST) -

    Detect IRST.

    -
    DETECTION_BASE:InitDetectOptical(DetectOptical) -

    Detect Optical.

    -
    DETECTION_BASE:InitDetectRWR(DetectRWR) -

    Detect RWR.

    -
    DETECTION_BASE:InitDetectRadar(DetectRadar) -

    Detect Radar.

    -
    DETECTION_BASE:InitDetectVisual(DetectVisual) -

    Detect Visual.

    -
    DETECTION_BASE.Intercept - -
    DETECTION_BASE.InterceptDelay - -
    DETECTION_BASE:IsDetectedItemDetected(DetectedItem) -

    Checks if there is at least one UNIT detected in the Set of the the DetectedItem.

    -
    DETECTION_BASE:IsDetectedObjectIdentified(DetectedObject) -

    Determines if a detected object has already been identified during detection processing.

    -
    DETECTION_BASE:IsFriendliesNearBy(DetectedItem) -

    Returns if there are friendlies nearby the FAC units ...

    -
    DETECTION_BASE:IsFriendliesNearIntercept(DetectedItem) -

    Returns if there are friendlies nearby the intercept ...

    -
    DETECTION_BASE:IsPlayersNearBy(DetectedItem) -

    Returns if there are friendlies nearby the FAC units ...

    -
    DETECTION_BASE:New(DetectionSetGroup) -

    DETECTION constructor.

    -
    DETECTION_BASE:OnAfterDetect(From, Event, To) -

    OnAfter Transition Handler for Event Detect.

    -
    DETECTION_BASE:OnAfterDetected(From, Event, To) -

    OnAfter Transition Handler for Event Detected.

    -
    DETECTION_BASE:OnAfterStart(From, Event, To) -

    OnAfter Transition Handler for Event Start.

    -
    DETECTION_BASE:OnAfterStop(From, Event, To) -

    OnAfter Transition Handler for Event Stop.

    -
    DETECTION_BASE:OnBeforeDetect(From, Event, To) -

    OnBefore Transition Handler for Event Detect.

    -
    DETECTION_BASE:OnBeforeDetected(From, Event, To) -

    OnBefore Transition Handler for Event Detected.

    -
    DETECTION_BASE:OnBeforeStart(From, Event, To) -

    OnBefore Transition Handler for Event Start.

    -
    DETECTION_BASE:OnBeforeStop(From, Event, To) -

    OnBefore Transition Handler for Event Stop.

    -
    DETECTION_BASE:OnEnterDetecting(From, Event, To) -

    OnEnter Transition Handler for State Detecting.

    -
    DETECTION_BASE:OnEnterStopped(From, Event, To) -

    OnEnter Transition Handler for State Stopped.

    -
    DETECTION_BASE:OnLeaveDetecting(From, Event, To) -

    OnLeave Transition Handler for State Detecting.

    -
    DETECTION_BASE:OnLeaveStopped(From, Event, To) -

    OnLeave Transition Handler for State Stopped.

    -
    DETECTION_BASE.RefreshTimeInterval - -
    DETECTION_BASE.RejectZones - -
    DETECTION_BASE:RemoveDetectedItem(DetectedItemIndex) -

    Removes an existing DetectedItem from the DetectedItems list.

    -
    DETECTION_BASE:ReportFriendliesNearBy(ReportGroupData) -

    Background worker function to determine if there are friendlies nearby ...

    -
    DETECTION_BASE:Schedule(DelayTime, RepeatInterval) -

    Schedule the DETECTION construction.

    -
    DETECTION_BASE.ScheduleDelayTime - -
    DETECTION_BASE.ScheduleRepeatInterval - -
    DETECTION_BASE:SetAcceptRange(AcceptRange) -

    Accept detections if within a range in meters.

    -
    DETECTION_BASE:SetAcceptZones(AcceptZones) -

    Accept detections if within the specified zone(s).

    -
    DETECTION_BASE:SetAlphaAngleProbability(AlphaAngleProbability) -

    Upon a visual detection, the higher the unit is during the detecting process, the more likely the detected unit is to be detected properly.

    -
    DETECTION_BASE:SetDetectedItemCoordinate(The, Coordinate, DetectedItemUnit, DetectedItem) -

    Set the detected item coordinate.

    -
    DETECTION_BASE:SetDetectedItemThreatLevel(The, DetectedItem) -

    Set the detected item threatlevel.

    -
    DETECTION_BASE:SetDistanceProbability(DistanceProbability) -

    Upon a visual detection, the further away a detected object is, the less likely it is to be detected properly.

    -
    DETECTION_BASE:SetFriendliesRange(FriendliesRange) -

    Set the radius in meters to validate if friendlies are nearby.

    -
    DETECTION_BASE:SetFriendlyPrefixes(FriendlyPrefixes) -

    This will allow during friendly search any recce or detection unit to be also considered as a friendly.

    -
    DETECTION_BASE:SetIntercept(Intercept, IntereptDelay, InterceptDelay) -

    Set the parameters to calculate to optimal intercept point.

    -
    DETECTION_BASE:SetRefreshTimeInterval(RefreshTimeInterval) -

    Set the detection interval time in seconds.

    -
    DETECTION_BASE:SetRejectZones(RejectZones) -

    Reject detections if within the specified zone(s).

    -
    DETECTION_BASE:SetZoneProbability(ZoneArray) -

    Upon a visual detection, the more a detected unit is within a cloudy zone, the less likely the detected unit is to be detected successfully.

    -
    DETECTION_BASE:Start() -

    Synchronous Event Trigger for Event Start.

    -
    DETECTION_BASE:Stop() -

    Synchronous Event Trigger for Event Stop.

    -
    DETECTION_BASE:UnIdentifyAllDetectedObjects() -

    UnIdentify all detected objects during detection processing.

    -
    DETECTION_BASE:UnIdentifyDetectedObject(DetectedObject) -

    UnIdentify a detected object during detection processing.

    -
    DETECTION_BASE:UpdateDetectedItemDetection(DetectedItem) -

    Set IsDetected flag for all DetectedItems.

    -
    DETECTION_BASE.ZoneProbability - -
    DETECTION_BASE:__Detect(Delay) -

    Asynchronous Event Trigger for Event Detect.

    -
    DETECTION_BASE:__Detected(Delay) -

    Asynchronous Event Trigger for Event Detected.

    -
    DETECTION_BASE:__Start(Delay) -

    Asynchronous Event Trigger for Event Start.

    -
    DETECTION_BASE:__Stop(Delay) -

    Asynchronous Event Trigger for Event Stop.

    -
    DETECTION_BASE:onafterDetect(From, Event, To) - -
    DETECTION_BASE:onafterDetectionGroup(From, Event, To, DetectionGroup, DetectionTimeStamp) - -
    DETECTION_BASE:onafterStart(From, Event, To) - -
    - -

    Type DETECTION_BASE.DetectedItem

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    DETECTION_BASE.DetectedItem.Changed -

    Documents if the detected area has changes.

    -
    DETECTION_BASE.DetectedItem.Changes -

    A list of the changes reported on the detected area. (It is up to the user of the detected area to consume those changes).

    -
    DETECTION_BASE.DetectedItem.Coordinate -

    The last known coordinate of the DetectedItem.

    -
    DETECTION_BASE.DetectedItem.DistanceRecce - -
    DETECTION_BASE.DetectedItem.FriendliesNearBy -

    Indicates if there are friendlies within the detected area.

    -
    DETECTION_BASE.DetectedItem.ID -

    -- The identifier of the detected area.

    -
    DETECTION_BASE.DetectedItem.InterceptCoord - -
    DETECTION_BASE.DetectedItem.NearestFAC -

    The nearest FAC near the Area.

    -
    DETECTION_BASE.DetectedItem.Set -

    -- The Set of Units in the detected area.

    -
    DETECTION_BASE.DetectedItem.Zone -

    -- The Zone of the detected area.

    -
    - -

    Type DETECTION_BASE.DetectedObject

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    DETECTION_BASE.DetectedObject.Distance - -
    DETECTION_BASE.DetectedObject.Identified - -
    DETECTION_BASE.DetectedObject.IsVisible - -
    DETECTION_BASE.DetectedObject.KnowDistance - -
    DETECTION_BASE.DetectedObject.KnowType - -
    DETECTION_BASE.DetectedObject.LastPos - -
    DETECTION_BASE.DetectedObject.LastTime - -
    DETECTION_BASE.DetectedObject.LastVelocity - -
    DETECTION_BASE.DetectedObject.Name - -
    DETECTION_BASE.DetectedObject.Type - -
    - -

    Type DETECTION_TYPES

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    DETECTION_TYPES.ClassName - -
    DETECTION_TYPES:CreateDetectionItems() -

    Create the DetectedItems list from the DetectedObjects table.

    -
    DETECTION_TYPES:DetectedItemMenu(Index, DetectedTypeName, AttackGroup) -

    Menu of a DetectedItem using a given numeric index.

    -
    DETECTION_TYPES:DetectedItemReportSummary(Index, AttackGroup, Settings, DetectedTypeName) -

    Report summary of a DetectedItem using a given numeric index.

    -
    DETECTION_TYPES:DetectedReportDetailed(AttackGroup) -

    Report detailed of a detection result.

    -
    DETECTION_TYPES.DetectionRange - -
    DETECTION_TYPES:GetChangeText(DetectedItem) -

    Make text documenting the changes of the detected zone.

    -
    DETECTION_TYPES:New(DetectionSetGroup) -

    DETECTION_TYPES constructor.

    -
    DETECTION_TYPES._BoundDetectedZones - -
    DETECTION_TYPES._FlareDetectedUnits - -
    DETECTION_TYPES._FlareDetectedZones - -
    DETECTION_TYPES._SmokeDetectedUnits - -
    DETECTION_TYPES._SmokeDetectedZones - -
    - -

    Type DETECTION_UNITS

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    DETECTION_UNITS.ClassName - -
    DETECTION_UNITS:CreateDetectionItems() -

    Create the DetectedItems list from the DetectedObjects table.

    -
    DETECTION_UNITS:DetectedItemMenu(Index, AttackGroup) -

    Menu of a DetectedItem using a given numeric index.

    -
    DETECTION_UNITS:DetectedItemReportSummary(Index, AttackGroup, Settings) -

    Report summary of a DetectedItem using a given numeric index.

    -
    DETECTION_UNITS:DetectedReportDetailed(AttackGroup) -

    Report detailed of a detection result.

    -
    DETECTION_UNITS.DetectionRange -

    The range till which targets are detected.

    -
    DETECTION_UNITS:GetChangeText(DetectedItem) -

    Make text documenting the changes of the detected zone.

    -
    DETECTION_UNITS:New(DetectionSetGroup) -

    DETECTION_UNITS constructor.

    -
    DETECTION_UNITS._BoundDetectedZones - -
    DETECTION_UNITS._FlareDetectedUnits - -
    DETECTION_UNITS._FlareDetectedZones - -
    DETECTION_UNITS._SmokeDetectedUnits - -
    DETECTION_UNITS._SmokeDetectedZones - -
    - -

    Global(s)

    -
    -
    - - #DETECTION_AREAS - -DETECTION_AREAS - -
    -
    - - - -
    -
    -
    -
    - - #DETECTION_BASE - -DETECTION_BASE - -
    -
    - -

    DETECTION_BASE class, extends Fsm#FSM

    - -

    The DETECTION_BASE class defines the core functions to administer detected objects.

    - - -

    The DETECTION_BASE class will detect objects within the battle zone for a list of Groups detecting targets following (a) detection method(s).

    - -

    DETECTION_BASE constructor

    - -

    Construct a new DETECTION_BASE instance using the DETECTION_BASE.New() method.

    - -

    Initialization

    - -

    By default, detection will return detected objects with all the detection sensors available. -However, you can ask how the objects were found with specific detection methods. -If you use one of the below methods, the detection will work with the detection method specified. -You can specify to apply multiple detection methods.

    - -

    Use the following functions to report the objects it detected using the methods Visual, Optical, Radar, IRST, RWR, DLINK:

    - - - -

    Filter detected units based on category of the unit

    - -

    Filter the detected units based on Unit.Category using the method DETECTION_BASE.FilterCategories().
    -The different values of Unit.Category can be:

    - -
      -
    • Unit.Category.AIRPLANE
    • -
    • Unit.Category.GROUND_UNIT
    • -
    • Unit.Category.HELICOPTER
    • -
    • Unit.Category.SHIP
    • -
    • Unit.Category.STRUCTURE
    • -
    - -

    Multiple Unit.Category entries can be given as a table and then these will be evaluated as an OR expression.

    - -

    Example to filter a single category (Unit.Category.AIRPLANE).

    - -
    DetectionObject:FilterCategories( Unit.Category.AIRPLANE ) 
    -
    - -

    Example to filter multiple categories (Unit.Category.AIRPLANE, Unit.Category.HELICOPTER). Note the {}.

    - -
    DetectionObject:FilterCategories( { Unit.Category.AIRPLANE, Unit.Category.HELICOPTER } )
    -
    - - -

    DETECTION_ derived classes group the detected units into a DetectedItems[] list

    - -

    DETECTIONBASE derived classes build a list called DetectedItems[], which is essentially a first later -of grouping of detected units. Each DetectedItem within the DetectedItems[] list contains -a SETUNIT object that contains the detected units that belong to that group.

    - -

    Derived classes will apply different methods to group the detected units. -Examples are per area, per quadrant, per distance, per type. -See further the derived DETECTION classes on which grouping methods are currently supported.

    - -

    Various methods exist how to retrieve the grouped items from a DETECTION_BASE derived class:

    - -
      -
    • The method Detection#DETECTION_BASE.GetDetectedItems() retrieves the DetectedItems[] list.
    • -
    • A DetectedItem from the DetectedItems[] list can be retrieved using the method Detection#DETECTION_BASE.GetDetectedItem( DetectedItemIndex ). - Note that this method returns a DetectedItem element from the list, that contains a Set variable and further information - about the DetectedItem that is set by the DETECTION_BASE derived classes, used to group the DetectedItem.
    • -
    • A DetectedSet from the DetectedItems[] list can be retrieved using the method Detection#DETECTION_BASE.GetDetectedSet( DetectedItemIndex ). - This method retrieves the Set from a DetectedItem element from the DetectedItem list (DetectedItems[ DetectedItemIndex ].Set ).
    • -
    - -

    Visual filters to fine-tune the probability of the detected objects

    - -

    By default, DCS World will return any object that is in LOS and within "visual reach", or detectable through one of the electronic detection means. -That being said, the DCS World detection algorithm can sometimes be unrealistic. -Especially for a visual detection, DCS World is able to report within 1 second a detailed detection of a group of 20 units (including types of the units) that are 10 kilometers away, using only visual capabilities. -Additionally, trees and other obstacles are not accounted during the DCS World detection.

    - -

    Therefore, an additional (optional) filtering has been built into the DETECTION_BASE class, that can be set for visual detected units. -For electronic detection, this filtering is not applied, only for visually detected targets.

    - -

    The following additional filtering can be applied for visual filtering:

    - -
      -
    • A probability factor per kilometer distance.
    • -
    • A probability factor based on the alpha angle between the detected object and the unit detecting. - A detection from a higher altitude allows for better detection than when on the ground.
    • -
    • Define a probability factor for "cloudy zones", which are zones where forests or villages are located. In these zones, detection will be much more difficult. - The mission designer needs to define these cloudy zones within the mission, and needs to register these zones in the DETECTION_ objects additing a probability factor per zone.
    • -
    - -

    I advise however, that, when you first use the DETECTION derived classes, that you don't use these filters. -Only when you experience unrealistic behaviour in your missions, these filters could be applied.

    - - -

    Distance visual detection probability

    - -

    Upon a visual detection, the further away a detected object is, the less likely it is to be detected properly. -Also, the speed of accurate detection plays a role.

    - -

    A distance probability factor between 0 and 1 can be given, that will model a linear extrapolated probability over 10 km distance.

    - -

    For example, if a probability factor of 0.6 (60%) is given, the extrapolated probabilities over 15 kilometers would like like: -1 km: 96%, 2 km: 92%, 3 km: 88%, 4 km: 84%, 5 km: 80%, 6 km: 76%, 7 km: 72%, 8 km: 68%, 9 km: 64%, 10 km: 60%, 11 km: 56%, 12 km: 52%, 13 km: 48%, 14 km: 44%, 15 km: 40%.

    - -

    Note that based on this probability factor, not only the detection but also the type of the unit will be applied!

    - -

    Use the method Detection#DETECTION_BASE.SetDistanceProbability() to set the probability factor upon a 10 km distance.

    - -

    Alpha Angle visual detection probability

    - -

    Upon a visual detection, the higher the unit is during the detecting process, the more likely the detected unit is to be detected properly. -A detection at a 90% alpha angle is the most optimal, a detection at 10% is less and a detection at 0% is less likely to be correct.

    - -

    A probability factor between 0 and 1 can be given, that will model a progressive extrapolated probability if the target would be detected at a 0° angle.

    - -

    For example, if a alpha angle probability factor of 0.7 is given, the extrapolated probabilities of the different angles would look like: -0°: 70%, 10°: 75,21%, 20°: 80,26%, 30°: 85%, 40°: 89,28%, 50°: 92,98%, 60°: 95,98%, 70°: 98,19%, 80°: 99,54%, 90°: 100%

    - -

    Use the method Detection#DETECTION_BASE.SetAlphaAngleProbability() to set the probability factor if 0°.

    - -

    Cloudy Zones detection probability

    - -

    Upon a visual detection, the more a detected unit is within a cloudy zone, the less likely the detected unit is to be detected successfully. -The Cloudy Zones work with the ZONE_BASE derived classes. The mission designer can define within the mission -zones that reflect cloudy areas where detected units may not be so easily visually detected.

    - -

    Use the method Detection#DETECTION_BASE.SetZoneProbability() to set for a defined number of zones, the probability factors.

    - -

    Note however, that the more zones are defined to be "cloudy" within a detection, the more performance it will take -from the DETECTIONBASE to calculate the presence of the detected unit within each zone. -Expecially for ZONEPOLYGON, try to limit the amount of nodes of the polygon!

    - -

    Typically, this kind of filter would be applied for very specific areas were a detection needs to be very realisting for -AI not to detect so easily targets within a forrest or village rich area.

    - -

    Accept / Reject detected units

    - -

    DETECTION_BASE can accept or reject successful detections based on the location of the detected object, -if it is located in range or located inside or outside of specific zones.

    - -

    Detection acceptance of within range limit

    - -

    A range can be set that will limit a successful detection for a unit. -Use the method Detection#DETECTION_BASE.SetAcceptRange() to apply a range in meters till where detected units will be accepted.

    - -
     local SetGroup = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterStart() -- Build a SetGroup of Forward Air Controllers.
    -
    - -- Build a detect object.
    - local Detection = DETECTION_UNITS:New( SetGroup )
    -
    - -- This will accept detected units if the range is below 5000 meters.
    - Detection:SetAcceptRange( 5000 ) 
    -
    - -- Start the Detection.
    - Detection:Start()
    -
    - - -

    Detection acceptance if within zone(s).

    - -

    Specific ZONEBASE object(s) can be given as a parameter, which will only accept a detection if the unit is within the specified ZONEBASE object(s). -Use the method Detection#DETECTION_BASE.SetAcceptZones() will accept detected units if they are within the specified zones.

    - -
     local SetGroup = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterStart() -- Build a SetGroup of Forward Air Controllers.
    -
    - -- Search fo the zones where units are to be accepted.
    - local ZoneAccept1 = ZONE:New( "AcceptZone1" )
    - local ZoneAccept2 = ZONE:New( "AcceptZone2" )
    -
    - -- Build a detect object.
    - local Detection = DETECTION_UNITS:New( SetGroup )
    -
    - -- This will accept detected units by Detection when the unit is within ZoneAccept1 OR ZoneAccept2.
    - Detection:SetAcceptZones( { ZoneAccept1, ZoneAccept2 } ) 
    -
    - -- Start the Detection.
    - Detection:Start()
    -
    - -

    Detection rejectance if within zone(s).

    - -

    Specific ZONEBASE object(s) can be given as a parameter, which will reject detection if the unit is within the specified ZONEBASE object(s). -Use the method Detection#DETECTION_BASE.SetRejectZones() will reject detected units if they are within the specified zones. -An example of how to use the method is shown below.

    - -
     local SetGroup = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterStart() -- Build a SetGroup of Forward Air Controllers.
    -
    - -- Search fo the zones where units are to be rejected.
    - local ZoneReject1 = ZONE:New( "RejectZone1" )
    - local ZoneReject2 = ZONE:New( "RejectZone2" )
    -
    - -- Build a detect object.
    - local Detection = DETECTION_UNITS:New( SetGroup )
    -
    - -- This will reject detected units by Detection when the unit is within ZoneReject1 OR ZoneReject2.
    - Detection:SetRejectZones( { ZoneReject1, ZoneReject2 } ) 
    -
    - -- Start the Detection.
    - Detection:Start()
    -
    - -

    Detection of Friendlies Nearby

    - -

    Use the method Detection#DETECTION_BASE.SetFriendliesRange() to set the range what will indicate when friendlies are nearby -a DetectedItem. The default range is 6000 meters. For air detections, it is advisory to use about 30.000 meters.

    - -

    DETECTION_BASE is a Finite State Machine

    - -

    Various Events and State Transitions can be tailored using DETECTION_BASE.

    - -

    DETECTION_BASE States

    - -
      -
    • Detecting: The detection is running.
    • -
    • Stopped: The detection is stopped.
    • -
    - -

    DETECTION_BASE Events

    - -
      -
    • Start: Start the detection process.
    • -
    • Detect: Detect new units.
    • -
    • Detected: New units have been detected.
    • -
    • Stop: Stop the detection process. -
    • -
    - -
    -
    -
    -
    - - #DETECTION_TYPES - -DETECTION_TYPES - -
    -
    - - - -
    -
    -
    -
    - - #DETECTION_UNITS - -DETECTION_UNITS - -
    -
    - - - -
    -
    -

    Type Detection

    - -

    Type DETECTION_AREAS

    - -

    # 4) DETECTION_AREAS class, extends Detection#DETECTION_BASE

    - -

    The DETECTION_AREAS class will detect units within the battle zone for a list of Groups detecting targets following (a) detection method(s), - and will build a list (table) of Set#SET_UNITs containing the Unit#UNITs detected.

    - - -

    The class is group the detected units within zones given a DetectedZoneRange parameter. - A set with multiple detected zones will be created as there are groups of units detected.

    - -

    ## 4.1) Retrieve the Detected Unit Sets and Detected Zones

    - -

    The methods to manage the DetectedItems[].Set(s) are implemented in Detection#DECTECTION_BASE and - the methods to manage the DetectedItems[].Zone(s) is implemented in Detection#DETECTION_AREAS.

    - -

    Retrieve the DetectedItems[].Set with the method Detection#DETECTION_BASE.GetDetectedSet(). A Set#SET_UNIT object will be returned.

    - -

    Retrieve the formed Zones as a result of the grouping the detected units within the DetectionZoneRange, use the method Detection#DETECTION_BASE.GetDetectionZones(). - To understand the amount of zones created, use the method Detection#DETECTION_BASE.GetDetectionZoneCount(). - If you want to obtain a specific zone from the DetectedZones, use the method Detection#DETECTION_BASE.GetDetectionZone() with a given index.

    - -

    ## 4.4) Flare or Smoke detected units

    - -

    Use the methods Detection#DETECTION_AREAS.FlareDetectedUnits() or Detection#DETECTION_AREAS.SmokeDetectedUnits() to flare or smoke the detected units when a new detection has taken place.

    - -

    ## 4.5) Flare or Smoke or Bound detected zones

    - -

    Use the methods:

    - - - -

    the detected zones when a new detection has taken place. -

    - -

    Field(s)

    -
    -
    - - -DETECTION_AREAS:BoundDetectedZones() - -
    -
    - -

    Bound the detected zones

    - -

    Return value

    - -

    #DETECTION_AREAS: -self

    - -
    -
    -
    -
    - - -DETECTION_AREAS:CalculateIntercept(DetectedItem) - -
    -
    - -

    Calculate the optimal intercept point of the DetectedItem.

    - -

    Parameter

    - -
    -
    -
    -
    - - #string - -DETECTION_AREAS.ClassName - -
    -
    - - - -
    -
    -
    -
    - - - -DETECTION_AREAS.CountryID - -
    -
    - - - -
    -
    -
    -
    - - -DETECTION_AREAS:CreateDetectionItems() - -
    -
    - -

    Make a DetectionSet table.

    - - -

    This function will be overridden in the derived clsses.

    - -

    Return value

    - -

    #DETECTION_AREAS: -self

    - -
    -
    -
    -
    - - -DETECTION_AREAS:DetectedItemMenu(Index, AttackGroup) - -
    -
    - -

    Menu of a detected item using a given numeric index.

    - -

    Parameters

    -
      -
    • - -

      Index :

      - -
    • -
    • - -

      AttackGroup :

      - -
    • -
    -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -DETECTION_AREAS:DetectedItemReportSummary(Index, AttackGroup, Settings) - -
    -
    - -

    Report summary of a detected item using a given numeric index.

    - -

    Parameters

    - -

    Return value

    - -

    Core.Report#REPORT: -The report of the detection items.

    - -
    -
    -
    -
    - - #DETECTION_BASE.DetectedItems - -DETECTION_AREAS.DetectedItems - -
    -
    - -

    A list of areas containing the set of Units, Zones, the center Unit within the zone, and ID of each area that was detected within a DetectionZoneRange.

    - -
    -
    -
    -
    - - -DETECTION_AREAS:DetectedReportDetailed(AttackGroup) - -
    -
    - -

    Report detailed of a detection result.

    - -

    Parameter

    - -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - Dcs.DCSTypes#Distance - -DETECTION_AREAS.DetectionZoneRange - -
    -
    - -

    The range till which targets are grouped upon the first detected target.

    - -
    -
    -
    -
    - - -DETECTION_AREAS:FlareDetectedUnits() - -
    -
    - -

    Flare the detected units

    - -

    Return value

    - -

    #DETECTION_AREAS: -self

    - -
    -
    -
    -
    - - -DETECTION_AREAS:FlareDetectedZones() - -
    -
    - -

    Flare the detected zones

    - -

    Return value

    - -

    #DETECTION_AREAS: -self

    - -
    -
    -
    -
    - - -DETECTION_AREAS:GetChangeText(DetectedItem) - -
    -
    - -

    Make text documenting the changes of the detected zone.

    - -

    Parameter

    - -

    Return value

    - -

    #string: -The Changes text

    - -
    -
    -
    -
    - - -DETECTION_AREAS:NearestFAC(DetectedItem) - -
    -
    - -

    Find the nearest FAC of the DetectedItem.

    - -

    Parameter

    - -

    Return value

    - -

    Wrapper.Unit#UNIT: -The nearest FAC unit

    - -
    -
    -
    -
    - - -DETECTION_AREAS:New(DetectionSetGroup, DetectionZoneRange) - -
    -
    - -

    DETECTION_AREAS constructor.

    - -

    Parameters

    -
      -
    • - -

      Core.Set#SET_GROUP DetectionSetGroup : -The Set of GROUPs in the Forward Air Controller role.

      - -
    • -
    • - -

      Dcs.DCSTypes#Distance DetectionZoneRange : -The range till which targets are grouped upon the first detected target.

      - -
    • -
    -

    Return value

    - -

    #DETECTION_AREAS:

    - - -
    -
    -
    -
    - - -DETECTION_AREAS:SmokeDetectedUnits() - -
    -
    - -

    Smoke the detected units

    - -

    Return value

    - -

    #DETECTION_AREAS: -self

    - -
    -
    -
    -
    - - -DETECTION_AREAS:SmokeDetectedZones() - -
    -
    - -

    Smoke the detected zones

    - -

    Return value

    - -

    #DETECTION_AREAS: -self

    - -
    -
    -
    -
    - - #boolean - -DETECTION_AREAS._BoundDetectedZones - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -DETECTION_AREAS._FlareDetectedUnits - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -DETECTION_AREAS._FlareDetectedZones - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -DETECTION_AREAS._SmokeDetectedUnits - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -DETECTION_AREAS._SmokeDetectedZones - -
    -
    - - - -
    -
    - -

    Type DETECTION_BASE

    -

    Field(s)

    -
    -
    - - -DETECTION_BASE:AcceptChanges(DetectedItem) - -
    -
    - -

    Accepts changes from the detected item.

    - -

    Parameter

    - -

    Return value

    - -

    #DETECTION_BASE: -self

    - -
    -
    -
    -
    - - - -DETECTION_BASE.AcceptRange - -
    -
    - - - -
    -
    -
    -
    - - - -DETECTION_BASE.AcceptZones - -
    -
    - - - -
    -
    -
    -
    - - -DETECTION_BASE:AddChangeItem(DetectedItem, ChangeCode, ItemUnitType) - -
    -
    - -

    Add a change to the detected zone.

    - -

    Parameters

    - -

    Return value

    - -

    #DETECTION_BASE: -self

    - -
    -
    -
    -
    - - -DETECTION_BASE:AddChangeUnit(DetectedItem, ChangeCode, ChangeUnitType) - -
    -
    - -

    Add a change to the detected zone.

    - -

    Parameters

    - -

    Return value

    - -

    #DETECTION_BASE: -self

    - -
    -
    -
    -
    - - -DETECTION_BASE:AddDetectedItem(ItemPrefix, DetectedItemIndex, Set) - -
    -
    - -

    Adds a new DetectedItem to the DetectedItems list.

    - - -

    The DetectedItem is a table and contains a SET_UNIT in the field Set.

    - -

    Parameters

    -
      -
    • - -

      ItemPrefix :

      - -
    • -
    • - -

      #string DetectedItemIndex : -The index of the DetectedItem.

      - -
    • -
    • - -

      Core.Set#SET_UNIT Set : -(optional) The Set of Units to be added.

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE.DetectedItem:

    - - -
    -
    -
    -
    - - -DETECTION_BASE:AddDetectedItemZone(DetectedItemIndex, Set, Zone) - -
    -
    - -

    Adds a new DetectedItem to the DetectedItems list.

    - - -

    The DetectedItem is a table and contains a SET_UNIT in the field Set.

    - -

    Parameters

    -
      -
    • - -

      #string DetectedItemIndex : -The index of the DetectedItem.

      - -
    • -
    • - -

      Core.Set#SET_UNIT Set : -(optional) The Set of Units to be added.

      - -
    • -
    • - -

      Core.Zone#ZONE_UNIT Zone : -(optional) The Zone to be added where the Units are located.

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE.DetectedItem:

    - - -
    -
    -
    -
    - - - -DETECTION_BASE.AlphaAngleProbability - -
    -
    - - - -
    -
    -
    -
    - - -DETECTION_BASE:CleanDetectionItem(DetectedItem, DetectedItemID) - -
    -
    - - - - -

    Clean the DetectedItem table. - @param #DETECTIONBASE self - @return #DETECTIONBASE

    - -

    Parameters

    -
      -
    • - -

      DetectedItem :

      - -
    • -
    • - -

      DetectedItemID :

      - -
    • -
    -
    -
    -
    -
    - - -DETECTION_BASE:CreateDetectionItems() - -
    -
    - -

    Make a DetectionSet table.

    - - -

    This function will be overridden in the derived clsses.

    - -

    Return value

    - -

    #DETECTION_BASE:

    - - -
    -
    -
    -
    - - -DETECTION_BASE:Detect() - -
    -
    - -

    Synchronous Event Trigger for Event Detect.

    - -
    -
    -
    -
    - - - -DETECTION_BASE.DetectDLINK - -
    -
    - - - -
    -
    -
    -
    - - - -DETECTION_BASE.DetectIRST - -
    -
    - - - -
    -
    -
    -
    - - - -DETECTION_BASE.DetectOptical - -
    -
    - - - -
    -
    -
    -
    - - - -DETECTION_BASE.DetectRWR - -
    -
    - - - -
    -
    -
    -
    - - - -DETECTION_BASE.DetectRadar - -
    -
    - - - -
    -
    -
    -
    - - - -DETECTION_BASE.DetectVisual - -
    -
    - - - -
    -
    -
    -
    - - -DETECTION_BASE:Detected() - -
    -
    - -

    Synchronous Event Trigger for Event Detected.

    - -
    -
    -
    -
    - - -DETECTION_BASE.DetectedItemCount - -
    -
    - - - -
    -
    -
    -
    - - #number - -DETECTION_BASE.DetectedItemMax - -
    -
    - - - -
    -
    -
    -
    - - -DETECTION_BASE:DetectedItemMenu(Index, AttackGroup) - -
    -
    - -

    Menu of a detected item using a given numeric index.

    - -

    Parameters

    -
      -
    • - -

      Index :

      - -
    • -
    • - -

      AttackGroup :

      - -
    • -
    -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -DETECTION_BASE:DetectedItemReportSummary(Index, AttackGroup, Settings) - -
    -
    - -

    Report summary of a detected item using a given numeric index.

    - -

    Parameters

    - -

    Return value

    - -

    Core.Report#REPORT:

    - - -
    -
    -
    -
    - - - -DETECTION_BASE.DetectedItems - -
    -
    - - - -
    -
    -
    -
    - - #DETECTION_BASE.DetectedObjects - -DETECTION_BASE.DetectedObjects - -
    -
    - -

    The list of detected objects.

    - -
    -
    -
    -
    - - #table - -DETECTION_BASE.DetectedObjectsIdentified - -
    -
    - -

    Map of the DetectedObjects identified.

    - -
    -
    -
    -
    - - -DETECTION_BASE:DetectedReportDetailed(AttackGroup) - -
    -
    - -

    Report detailed of a detectedion result.

    - -

    Parameter

    - -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - #number - -DETECTION_BASE.DetectionCount - -
    -
    - - - -
    -
    -
    -
    - - Dcs.DCSTypes#Distance - -DETECTION_BASE.DetectionRange - -
    -
    - -

    The range till which targets are accepted to be detected.

    - -
    -
    -
    -
    - - #number - -DETECTION_BASE.DetectionRun - -
    -
    - - - -
    -
    -
    -
    - - - -DETECTION_BASE.DetectionScheduler - -
    -
    - - - -
    -
    -
    -
    - - Core.Set#SET_GROUP - -DETECTION_BASE.DetectionSetGroup - -
    -
    - -

    The Set of GROUPs in the Forward Air Controller role.

    - -
    -
    -
    -
    - - - -DETECTION_BASE.DistanceProbability - -
    -
    - - - -
    -
    -
    -
    - - -DETECTION_BASE:FilterCategories(<, FilterCategories) - -
    -
    - -

    Filter the detected units based on Unit.Category
    -The different values of Unit.Category can be:

    - -
      -
    • Unit.Category.AIRPLANE
    • -
    • Unit.Category.GROUND_UNIT
    • -
    • Unit.Category.HELICOPTER
    • -
    • Unit.Category.SHIP
    • -
    • Unit.Category.STRUCTURE
    • -
    - -

    Multiple Unit.Category entries can be given as a table and then these will be evaluated as an OR expression.

    - - - -

    Example to filter a single category (Unit.Category.AIRPLANE).

    - -
    DetectionObject:FilterCategories( Unit.Category.AIRPLANE ) 
    -
    - -

    Example to filter multiple categories (Unit.Category.AIRPLANE, Unit.Category.HELICOPTER). Note the {}.

    - -
    DetectionObject:FilterCategories( { Unit.Category.AIRPLANE, Unit.Category.HELICOPTER } )
    -
    - - -

    Parameters

    -
      -
    • - -

      #list < : -cs.DCSUnit#Unit> FilterCategories The Categories entries

      - -
    • -
    • - -

      FilterCategories :

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE: -self

    - -
    -
    -
    -
    - - -DETECTION_BASE:FilterFriendliesCategory(FriendliesCategory) - -
    -
    - -

    Filters friendly units by unit category.

    - -

    Parameter

    -
      -
    • - -

      FriendliesCategory :

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE:

    - - -
    -
    -
    -
    - - -DETECTION_BASE:ForgetDetectedUnit(UnitName) - -
    -
    - -

    Forget a Unit from a DetectionItem

    - -

    Parameter

    -
      -
    • - -

      #string UnitName : -The UnitName that needs to be forgotten from the DetectionItem Sets.

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE:

    - - -
    -
    -
    -
    - - - -DETECTION_BASE.FriendliesCategory - -
    -
    - - - -
    -
    -
    -
    - - - -DETECTION_BASE.FriendliesRange - -
    -
    - - - -
    -
    -
    -
    - - -DETECTION_BASE.FriendlyPrefixes - -
    -
    - - - -
    -
    -
    -
    - - -DETECTION_BASE:GetDetectedID(Index) - -
    -
    - -

    Get a detected ID using a given numeric index.

    - -

    Parameter

    -
      -
    • - -

      #number Index :

      - -
    • -
    -

    Return value

    - -

    #string: -DetectedItemID

    - -
    -
    -
    -
    - - -DETECTION_BASE:GetDetectedItem(Index) - -
    -
    - -

    Get a detected item using a given numeric index.

    - -

    Parameter

    -
      -
    • - -

      #number Index :

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE.DetectedItem:

    - - -
    -
    -
    -
    - - -DETECTION_BASE:GetDetectedItemCoordinate(Index) - -
    -
    - -

    Get the detected item coordinate.

    - -

    Parameter

    -
      -
    • - -

      #number Index :

      - -
    • -
    -

    Return value

    - -

    Core.Point#COORDINATE:

    - - -
    -
    -
    -
    - - -DETECTION_BASE:GetDetectedItemID(Index) - -
    -
    - -

    Get a detected ItemID using a given numeric index.

    - -

    Parameter

    -
      -
    • - -

      #number Index :

      - -
    • -
    -

    Return value

    - -

    #string: -DetectedItemID

    - -
    -
    -
    -
    - - -DETECTION_BASE:GetDetectedItemThreatLevel(Index) - -
    -
    - -

    Get the detected item coordinate.

    - -

    Parameter

    -
      -
    • - -

      #number Index :

      - -
    • -
    -

    Return value

    - -

    #number: -ThreatLevel

    - -
    -
    -
    -
    - - -DETECTION_BASE:GetDetectedItemZone(Index) - -
    -
    - -

    Get the Zone#ZONE_UNIT of a detection area using a given numeric index.

    - -

    Parameter

    -
      -
    • - -

      #number Index :

      - -
    • -
    -

    Return value

    - -

    Core.Zone#ZONE_UNIT: -DetectedZone

    - -
    -
    -
    -
    - - -DETECTION_BASE:GetDetectedItems() - -
    -
    - -

    Get the detected Set#SET_BASEs.

    - -

    Return value

    - -

    #DETECTION_BASE.DetectedItems:

    - - -
    -
    -
    -
    - - -DETECTION_BASE:GetDetectedItemsCount() - -
    -
    - -

    Get the amount of SETs with detected objects.

    - -

    Return value

    - -

    #number: -The amount of detected items. Note that the amount of detected items can differ with the reality, because detections are not real-time but doen in intervals!

    - -
    -
    -
    -
    - - -DETECTION_BASE:GetDetectedObject(ObjectName) - -
    -
    - -

    Gets a detected object with a given name.

    - -

    Parameter

    -
      -
    • - -

      #string ObjectName :

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE.DetectedObject:

    - - -
    -
    -
    -
    - - -DETECTION_BASE:GetDetectedSet(Index) - -
    -
    - -

    Get the Set#SET_UNIT of a detecttion area using a given numeric index.

    - -

    Parameter

    -
      -
    • - -

      #number Index :

      - -
    • -
    -

    Return value

    - -

    Core.Set#SET_UNIT: -DetectedSet

    - -
    -
    -
    -
    - - -DETECTION_BASE:GetDetectedUnitTypeName(DetectedUnit) - -
    -
    - -

    Gets a detected unit type name, taking into account the detection results.

    - -

    Parameter

    - -

    Return value

    - -

    #string: -The type name

    - -
    -
    -
    -
    - - -DETECTION_BASE:GetDetectionSetGroup() - -
    -
    - -

    Get the detection Groups.

    - -

    Return value

    - -

    Core.Set#SET_GROUP:

    - - -
    -
    -
    -
    - - -DETECTION_BASE:GetFriendliesDistance(DetectedItem) - -
    -
    - -

    Returns the distance used to identify friendlies near the deteted item ...

    - -

    Parameter

    -
      -
    • - -

      DetectedItem :

      - -
    • -
    -

    Return value

    - -

    #number: -The distance.

    - -
    -
    -
    -
    - - -DETECTION_BASE:GetFriendliesNearBy(DetectedItem) - -
    -
    - -

    Returns friendly units nearby the FAC units ...

    - -

    Parameter

    -
      -
    • - -

      DetectedItem :

      - -
    • -
    -

    Return value

    - -

    #map:

    -

    string,Wrapper.Unit#UNIT> The map of Friendly UNITs.

    - -
    -
    -
    -
    - - -DETECTION_BASE:GetFriendliesNearIntercept(DetectedItem) - -
    -
    - -

    Returns friendly units nearby the intercept point ...

    - -

    Parameter

    -
      -
    • - -

      DetectedItem :

      - -
    • -
    -

    Return value

    - -

    #map:

    -

    string,Wrapper.Unit#UNIT> The map of Friendly UNITs.

    - -
    -
    -
    -
    - - -DETECTION_BASE:GetPlayersNearBy(DetectedItem) - -
    -
    - -

    Returns friendly units nearby the FAC units ...

    - -

    Parameter

    -
      -
    • - -

      DetectedItem :

      - -
    • -
    -

    Return value

    - -

    #map:

    -

    string,Wrapper.Unit#UNIT> The map of Friendly UNITs.

    - -
    -
    -
    -
    - - -DETECTION_BASE:IdentifyDetectedObject(DetectedObject) - -
    -
    - -

    Identifies a detected object during detection processing.

    - -

    Parameter

    - -
    -
    -
    -
    - - -DETECTION_BASE:InitDetectDLINK(DetectDLINK) - -
    -
    - -

    Detect DLINK.

    - -

    Parameter

    -
      -
    • - -

      #boolean DetectDLINK :

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE: -self

    - -
    -
    -
    -
    - - -DETECTION_BASE:InitDetectIRST(DetectIRST) - -
    -
    - -

    Detect IRST.

    - -

    Parameter

    -
      -
    • - -

      #boolean DetectIRST :

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE: -self

    - -
    -
    -
    -
    - - -DETECTION_BASE:InitDetectOptical(DetectOptical) - -
    -
    - -

    Detect Optical.

    - -

    Parameter

    -
      -
    • - -

      #boolean DetectOptical :

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE: -self

    - -
    -
    -
    -
    - - -DETECTION_BASE:InitDetectRWR(DetectRWR) - -
    -
    - -

    Detect RWR.

    - -

    Parameter

    -
      -
    • - -

      #boolean DetectRWR :

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE: -self

    - -
    -
    -
    -
    - - -DETECTION_BASE:InitDetectRadar(DetectRadar) - -
    -
    - -

    Detect Radar.

    - -

    Parameter

    -
      -
    • - -

      #boolean DetectRadar :

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE: -self

    - -
    -
    -
    -
    - - -DETECTION_BASE:InitDetectVisual(DetectVisual) - -
    -
    - -

    Detect Visual.

    - -

    Parameter

    -
      -
    • - -

      #boolean DetectVisual :

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE: -self

    - -
    -
    -
    -
    - - - -DETECTION_BASE.Intercept - -
    -
    - - - -
    -
    -
    -
    - - - -DETECTION_BASE.InterceptDelay - -
    -
    - - - -
    -
    -
    -
    - - -DETECTION_BASE:IsDetectedItemDetected(DetectedItem) - -
    -
    - -

    Checks if there is at least one UNIT detected in the Set of the the DetectedItem.

    - -

    Parameter

    -
      -
    • - -

      DetectedItem :

      - -
    • -
    -

    Return value

    - -

    #boolean: -true if at least one UNIT is detected from the DetectedSet, false if no UNIT was detected from the DetectedSet.

    - -
    -
    -
    -
    - - -DETECTION_BASE:IsDetectedObjectIdentified(DetectedObject) - -
    -
    - -

    Determines if a detected object has already been identified during detection processing.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean: -true if already identified.

    - -
    -
    -
    -
    - - -DETECTION_BASE:IsFriendliesNearBy(DetectedItem) - -
    -
    - -

    Returns if there are friendlies nearby the FAC units ...

    - -

    Parameter

    -
      -
    • - -

      DetectedItem :

      - -
    • -
    -

    Return value

    - -

    #boolean: -true if there are friendlies nearby

    - -
    -
    -
    -
    - - -DETECTION_BASE:IsFriendliesNearIntercept(DetectedItem) - -
    -
    - -

    Returns if there are friendlies nearby the intercept ...

    - -

    Parameter

    -
      -
    • - -

      DetectedItem :

      - -
    • -
    -

    Return value

    - -

    #boolean: -trhe if there are friendlies near the intercept.

    - -
    -
    -
    -
    - - -DETECTION_BASE:IsPlayersNearBy(DetectedItem) - -
    -
    - -

    Returns if there are friendlies nearby the FAC units ...

    - -

    Parameter

    -
      -
    • - -

      DetectedItem :

      - -
    • -
    -

    Return value

    - -

    #boolean: -trhe if there are friendlies nearby

    - -
    -
    -
    -
    - - -DETECTION_BASE:New(DetectionSetGroup) - -
    -
    - -

    DETECTION constructor.

    - -

    Parameter

    -
      -
    • - -

      Core.Set#SET_GROUP DetectionSetGroup : -The Set of GROUPs in the Forward Air Controller role.

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE: -self

    - -
    -
    -
    -
    - - -DETECTION_BASE:OnAfterDetect(From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Detect.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -DETECTION_BASE:OnAfterDetected(From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Detected.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -DETECTION_BASE:OnAfterStart(From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Start.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -DETECTION_BASE:OnAfterStop(From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Stop.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -DETECTION_BASE:OnBeforeDetect(From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Detect.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -DETECTION_BASE:OnBeforeDetected(From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Detected.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -DETECTION_BASE:OnBeforeStart(From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Start.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -DETECTION_BASE:OnBeforeStop(From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Stop.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -DETECTION_BASE:OnEnterDetecting(From, Event, To) - -
    -
    - -

    OnEnter Transition Handler for State Detecting.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -DETECTION_BASE:OnEnterStopped(From, Event, To) - -
    -
    - -

    OnEnter Transition Handler for State Stopped.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -DETECTION_BASE:OnLeaveDetecting(From, Event, To) - -
    -
    - -

    OnLeave Transition Handler for State Detecting.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -DETECTION_BASE:OnLeaveStopped(From, Event, To) - -
    -
    - -

    OnLeave Transition Handler for State Stopped.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - #number - -DETECTION_BASE.RefreshTimeInterval - -
    -
    - - - -
    -
    -
    -
    - - - -DETECTION_BASE.RejectZones - -
    -
    - - - -
    -
    -
    -
    - - -DETECTION_BASE:RemoveDetectedItem(DetectedItemIndex) - -
    -
    - -

    Removes an existing DetectedItem from the DetectedItems list.

    - - -

    The DetectedItem is a table and contains a SET_UNIT in the field Set.

    - -

    Parameter

    -
      -
    • - -

      #number DetectedItemIndex : -The index or position in the DetectedItems list where the item needs to be removed.

      - -
    • -
    -
    -
    -
    -
    - - -DETECTION_BASE:ReportFriendliesNearBy(ReportGroupData) - -
    -
    - -

    Background worker function to determine if there are friendlies nearby ...

    - -

    Parameter

    -
      -
    • - -

      ReportGroupData :

      - -
    • -
    -
    -
    -
    -
    - - -DETECTION_BASE:Schedule(DelayTime, RepeatInterval) - -
    -
    - -

    Schedule the DETECTION construction.

    - -

    Parameters

    -
      -
    • - -

      #number DelayTime : -The delay in seconds to wait the reporting.

      - -
    • -
    • - -

      #number RepeatInterval : -The repeat interval in seconds for the reporting to happen repeatedly.

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE: -self

    - -
    -
    -
    -
    - - - -DETECTION_BASE.ScheduleDelayTime - -
    -
    - - - -
    -
    -
    -
    - - - -DETECTION_BASE.ScheduleRepeatInterval - -
    -
    - - - -
    -
    -
    -
    - - -DETECTION_BASE:SetAcceptRange(AcceptRange) - -
    -
    - -

    Accept detections if within a range in meters.

    - -

    Parameter

    -
      -
    • - -

      #number AcceptRange : -Accept a detection if the unit is within the AcceptRange in meters.

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE: -self

    - -
    -
    -
    -
    - - -DETECTION_BASE:SetAcceptZones(AcceptZones) - -
    -
    - -

    Accept detections if within the specified zone(s).

    - -

    Parameter

    -
      -
    • - -

      Core.Zone#ZONE_BASE AcceptZones : -Can be a list or ZONEBASE objects, or a single ZONEBASE object.

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE: -self

    - -
    -
    -
    -
    - - -DETECTION_BASE:SetAlphaAngleProbability(AlphaAngleProbability) - -
    -
    - -

    Upon a visual detection, the higher the unit is during the detecting process, the more likely the detected unit is to be detected properly.

    - - -

    A detection at a 90% alpha angle is the most optimal, a detection at 10% is less and a detection at 0% is less likely to be correct.

    - -

    A probability factor between 0 and 1 can be given, that will model a progressive extrapolated probability if the target would be detected at a 0° angle.

    - -

    For example, if a alpha angle probability factor of 0.7 is given, the extrapolated probabilities of the different angles would look like: -0°: 70%, 10°: 75,21%, 20°: 80,26%, 30°: 85%, 40°: 89,28%, 50°: 92,98%, 60°: 95,98%, 70°: 98,19%, 80°: 99,54%, 90°: 100%

    - -

    Parameter

    -
      -
    • - -

      AlphaAngleProbability : -The probability factor.

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE: -self

    - -
    -
    -
    -
    - - -DETECTION_BASE:SetDetectedItemCoordinate(The, Coordinate, DetectedItemUnit, DetectedItem) - -
    -
    - -

    Set the detected item coordinate.

    - -

    Parameters

    - -

    Return value

    - -

    #DETECTION_BASE:

    - - -
    -
    -
    -
    - - -DETECTION_BASE:SetDetectedItemThreatLevel(The, DetectedItem) - -
    -
    - -

    Set the detected item threatlevel.

    - -

    Parameters

    - -

    Return value

    - -

    #DETECTION_BASE:

    - - -
    -
    -
    -
    - - -DETECTION_BASE:SetDistanceProbability(DistanceProbability) - -
    -
    - -

    Upon a visual detection, the further away a detected object is, the less likely it is to be detected properly.

    - - -

    Also, the speed of accurate detection plays a role. -A distance probability factor between 0 and 1 can be given, that will model a linear extrapolated probability over 10 km distance. -For example, if a probability factor of 0.6 (60%) is given, the extrapolated probabilities over 15 kilometers would like like: -1 km: 96%, 2 km: 92%, 3 km: 88%, 4 km: 84%, 5 km: 80%, 6 km: 76%, 7 km: 72%, 8 km: 68%, 9 km: 64%, 10 km: 60%, 11 km: 56%, 12 km: 52%, 13 km: 48%, 14 km: 44%, 15 km: 40%.

    - -

    Parameter

    -
      -
    • - -

      DistanceProbability : -The probability factor.

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE: -self

    - -
    -
    -
    -
    - - -DETECTION_BASE:SetFriendliesRange(FriendliesRange) - -
    -
    - -

    Set the radius in meters to validate if friendlies are nearby.

    - -

    Parameter

    -
      -
    • - -

      #number FriendliesRange : -Radius to use when checking if Friendlies are nearby.

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE: -self

    - -
    -
    -
    -
    - - -DETECTION_BASE:SetFriendlyPrefixes(FriendlyPrefixes) - -
    -
    - -

    This will allow during friendly search any recce or detection unit to be also considered as a friendly.

    - - -

    By default, recce aren't considered friendly, because that would mean that a recce would be also an attacking friendly, -and this is wrong. -However, in a CAP situation, when the CAP is part of an EWR network, the CAP is also an attacker. -This, this method allows to register for a detection the CAP unit name prefixes to be considered CAP.

    - -

    Parameter

    -
      -
    • - -

      #string FriendlyPrefixes : -A string or a list of prefixes.

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE:

    - - -
    -
    -
    -
    - - -DETECTION_BASE:SetIntercept(Intercept, IntereptDelay, InterceptDelay) - -
    -
    - -

    Set the parameters to calculate to optimal intercept point.

    - -

    Parameters

    -
      -
    • - -

      #boolean Intercept : -Intercept is true if an intercept point is calculated. Intercept is false if it is disabled. The default Intercept is false.

      - -
    • -
    • - -

      #number IntereptDelay : -If Intercept is true, then InterceptDelay is the average time it takes to get airplanes airborne.

      - -
    • -
    • - -

      InterceptDelay :

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE: -self

    - -
    -
    -
    -
    - - -DETECTION_BASE:SetRefreshTimeInterval(RefreshTimeInterval) - -
    -
    - -

    Set the detection interval time in seconds.

    - -

    Parameter

    -
      -
    • - -

      #number RefreshTimeInterval : -Interval in seconds.

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE: -self

    - -
    -
    -
    -
    - - -DETECTION_BASE:SetRejectZones(RejectZones) - -
    -
    - -

    Reject detections if within the specified zone(s).

    - -

    Parameter

    -
      -
    • - -

      Core.Zone#ZONE_BASE RejectZones : -Can be a list or ZONEBASE objects, or a single ZONEBASE object.

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE: -self

    - -
    -
    -
    -
    - - -DETECTION_BASE:SetZoneProbability(ZoneArray) - -
    -
    - -

    Upon a visual detection, the more a detected unit is within a cloudy zone, the less likely the detected unit is to be detected successfully.

    - - -

    The Cloudy Zones work with the ZONE_BASE derived classes. The mission designer can define within the mission -zones that reflect cloudy areas where detected units may not be so easily visually detected.

    - -

    Parameter

    -
      -
    • - -

      ZoneArray : -Aray of a The ZONE_BASE object and a ZoneProbability pair..

      - -
    • -
    -

    Return value

    - -

    #DETECTION_BASE: -self

    - -
    -
    -
    -
    - - -DETECTION_BASE:Start() - -
    -
    - -

    Synchronous Event Trigger for Event Start.

    - -
    -
    -
    -
    - - -DETECTION_BASE:Stop() - -
    -
    - -

    Synchronous Event Trigger for Event Stop.

    - -
    -
    -
    -
    - - -DETECTION_BASE:UnIdentifyAllDetectedObjects() - -
    -
    - -

    UnIdentify all detected objects during detection processing.

    - -
    -
    -
    -
    - - -DETECTION_BASE:UnIdentifyDetectedObject(DetectedObject) - -
    -
    - -

    UnIdentify a detected object during detection processing.

    - -

    Parameter

    - -
    -
    -
    -
    - - -DETECTION_BASE:UpdateDetectedItemDetection(DetectedItem) - -
    -
    - -

    Set IsDetected flag for all DetectedItems.

    - -

    Parameter

    -
      -
    • - -

      DetectedItem :

      - -
    • -
    -

    Return values

    -
      -
    1. - -

      #DETECTION_BASE.DetectedItem: -DetectedItem

      - -
    2. -
    3. - -

      #boolean: -true if at least one UNIT is detected from the DetectedSet, false if no UNIT was detected from the DetectedSet.

      - -
    4. -
    -
    -
    -
    -
    - - - -DETECTION_BASE.ZoneProbability - -
    -
    - - - -
    -
    -
    -
    - - -DETECTION_BASE:__Detect(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Detect.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -DETECTION_BASE:__Detected(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Detected.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -DETECTION_BASE:__Start(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Start.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -DETECTION_BASE:__Stop(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Stop.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -DETECTION_BASE:onafterDetect(From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -DETECTION_BASE:onafterDetectionGroup(From, Event, To, DetectionGroup, DetectionTimeStamp) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    • - -

      Wrapper.Group#GROUP DetectionGroup : -The Group detecting.

      - -
    • -
    • - -

      DetectionTimeStamp :

      - -
    • -
    -
    -
    -
    -
    - - -DETECTION_BASE:onafterStart(From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    - -

    Type DETECTION_BASE.DetectedItem

    -

    Field(s)

    -
    -
    - - #boolean - -DETECTION_BASE.DetectedItem.Changed - -
    -
    - -

    Documents if the detected area has changes.

    - -
    -
    -
    -
    - - #table - -DETECTION_BASE.DetectedItem.Changes - -
    -
    - -

    A list of the changes reported on the detected area. (It is up to the user of the detected area to consume those changes).

    - -
    -
    -
    -
    - - Core.Point#COORDINATE - -DETECTION_BASE.DetectedItem.Coordinate - -
    -
    - -

    The last known coordinate of the DetectedItem.

    - -
    -
    -
    -
    - - - -DETECTION_BASE.DetectedItem.DistanceRecce - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -DETECTION_BASE.DetectedItem.FriendliesNearBy - -
    -
    - -

    Indicates if there are friendlies within the detected area.

    - -
    -
    -
    -
    - - #number - -DETECTION_BASE.DetectedItem.ID - -
    -
    - -

    -- The identifier of the detected area.

    - -
    -
    -
    -
    - - - -DETECTION_BASE.DetectedItem.InterceptCoord - -
    -
    - - - -
    -
    -
    -
    - - Wrapper.Unit#UNIT - -DETECTION_BASE.DetectedItem.NearestFAC - -
    -
    - -

    The nearest FAC near the Area.

    - -
    -
    -
    -
    - - Core.Set#SET_UNIT - -DETECTION_BASE.DetectedItem.Set - -
    -
    - -

    -- The Set of Units in the detected area.

    - -
    -
    -
    -
    - - Core.Zone#ZONE_UNIT - -DETECTION_BASE.DetectedItem.Zone - -
    -
    - -

    -- The Zone of the detected area.

    - -
    -
    - -

    Type DETECTION_BASE.DetectedItems

    - -

    Type DETECTION_BASE.DetectedObject

    -

    Field(s)

    -
    -
    - - #number - -DETECTION_BASE.DetectedObject.Distance - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -DETECTION_BASE.DetectedObject.Identified - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -DETECTION_BASE.DetectedObject.IsVisible - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -DETECTION_BASE.DetectedObject.KnowDistance - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -DETECTION_BASE.DetectedObject.KnowType - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -DETECTION_BASE.DetectedObject.LastPos - -
    -
    - - - -
    -
    -
    -
    - - #number - -DETECTION_BASE.DetectedObject.LastTime - -
    -
    - - - -
    -
    -
    -
    - - #number - -DETECTION_BASE.DetectedObject.LastVelocity - -
    -
    - - - -
    -
    -
    -
    - - #string - -DETECTION_BASE.DetectedObject.Name - -
    -
    - - - -
    -
    -
    -
    - - #string - -DETECTION_BASE.DetectedObject.Type - -
    -
    - - - -
    -
    - -

    Type DETECTION_BASE.DetectedObjects

    - -

    Type DETECTION_TYPES

    - -

    3) DETECTION_TYPES class, extends Detection#DETECTION_BASE

    - -

    The DETECTION_TYPES class will detect units within the battle zone.

    - - -

    It will build a DetectedItems[] list filled with DetectedItems, grouped by the type of units detected. -Each DetectedItem will contain a field Set, which contains a Set#SET_UNIT containing ONE UNIT object reference. -Beware that when the amount of different types detected is large, the DetectedItems[] list will be large also.

    - - -

    Field(s)

    -
    -
    - - #string - -DETECTION_TYPES.ClassName - -
    -
    - - - -
    -
    -
    -
    - - -DETECTION_TYPES:CreateDetectionItems() - -
    -
    - -

    Create the DetectedItems list from the DetectedObjects table.

    - - -

    For each DetectedItem, a one field array is created containing the Unit detected.

    - -

    Return value

    - -

    #DETECTION_TYPES: -self

    - -
    -
    -
    -
    - - -DETECTION_TYPES:DetectedItemMenu(Index, DetectedTypeName, AttackGroup) - -
    -
    - -

    Menu of a DetectedItem using a given numeric index.

    - -

    Parameters

    -
      -
    • - -

      Index :

      - -
    • -
    • - -

      DetectedTypeName :

      - -
    • -
    • - -

      AttackGroup :

      - -
    • -
    -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -DETECTION_TYPES:DetectedItemReportSummary(Index, AttackGroup, Settings, DetectedTypeName) - -
    -
    - -

    Report summary of a DetectedItem using a given numeric index.

    - -

    Parameters

    -
      -
    • - -

      Index :

      - -
    • -
    • - -

      Wrapper.Group#GROUP AttackGroup : -The group to generate the report for.

      - -
    • -
    • - -

      Core.Settings#SETTINGS Settings : -Message formatting settings to use.

      - -
    • -
    • - -

      DetectedTypeName :

      - -
    • -
    -

    Return value

    - -

    Core.Report#REPORT: -The report of the detection items.

    - -
    -
    -
    -
    - - -DETECTION_TYPES:DetectedReportDetailed(AttackGroup) - -
    -
    - -

    Report detailed of a detection result.

    - -

    Parameter

    - -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -DETECTION_TYPES.DetectionRange - -
    -
    - - - -
    -
    -
    -
    - - -DETECTION_TYPES:GetChangeText(DetectedItem) - -
    -
    - -

    Make text documenting the changes of the detected zone.

    - -

    Parameter

    - -

    Return value

    - -

    #string: -The Changes text

    - -
    -
    -
    -
    - - -DETECTION_TYPES:New(DetectionSetGroup) - -
    -
    - -

    DETECTION_TYPES constructor.

    - -

    Parameter

    - -

    Return value

    - -

    Functional.Detection#DETECTION_TYPES: -self

    - -
    -
    -
    -
    - - #boolean - -DETECTION_TYPES._BoundDetectedZones - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -DETECTION_TYPES._FlareDetectedUnits - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -DETECTION_TYPES._FlareDetectedZones - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -DETECTION_TYPES._SmokeDetectedUnits - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -DETECTION_TYPES._SmokeDetectedZones - -
    -
    - - - -
    -
    - -

    Type DETECTION_TYPES.DetectedItem

    - -

    Type DETECTION_UNITS

    - -

    DETECTION_UNITS class, extends Detection#DETECTION_BASE

    - -

    The DETECTION_UNITS class will detect units within the battle zone.

    - - -

    It will build a DetectedItems list filled with DetectedItems. Each DetectedItem will contain a field Set, which contains a Set#SET_UNIT containing ONE UNIT object reference. -Beware that when the amount of units detected is large, the DetectedItems list will be large also.

    - - -

    Field(s)

    -
    -
    - - #string - -DETECTION_UNITS.ClassName - -
    -
    - - - -
    -
    -
    -
    - - -DETECTION_UNITS:CreateDetectionItems() - -
    -
    - -

    Create the DetectedItems list from the DetectedObjects table.

    - - -

    For each DetectedItem, a one field array is created containing the Unit detected.

    - -

    Return value

    - -

    #DETECTION_UNITS: -self

    - -
    -
    -
    -
    - - -DETECTION_UNITS:DetectedItemMenu(Index, AttackGroup) - -
    -
    - -

    Menu of a DetectedItem using a given numeric index.

    - -

    Parameters

    -
      -
    • - -

      Index :

      - -
    • -
    • - -

      AttackGroup :

      - -
    • -
    -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -DETECTION_UNITS:DetectedItemReportSummary(Index, AttackGroup, Settings) - -
    -
    - -

    Report summary of a DetectedItem using a given numeric index.

    - -

    Parameters

    - -

    Return value

    - -

    Core.Report#REPORT: -The report of the detection items.

    - -
    -
    -
    -
    - - -DETECTION_UNITS:DetectedReportDetailed(AttackGroup) - -
    -
    - -

    Report detailed of a detection result.

    - -

    Parameter

    - -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - Dcs.DCSTypes#Distance - -DETECTION_UNITS.DetectionRange - -
    -
    - -

    The range till which targets are detected.

    - -
    -
    -
    -
    - - -DETECTION_UNITS:GetChangeText(DetectedItem) - -
    -
    - -

    Make text documenting the changes of the detected zone.

    - -

    Parameter

    - -

    Return value

    - -

    #string: -The Changes text

    - -
    -
    -
    -
    - - -DETECTION_UNITS:New(DetectionSetGroup) - -
    -
    - -

    DETECTION_UNITS constructor.

    - -

    Parameter

    -
      -
    • - -

      Core.Set#SET_GROUP DetectionSetGroup : -The Set of GROUPs in the Forward Air Controller role.

      - -
    • -
    -

    Return value

    - -

    Functional.Detection#DETECTION_UNITS: -self

    - -
    -
    -
    -
    - - #boolean - -DETECTION_UNITS._BoundDetectedZones - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -DETECTION_UNITS._FlareDetectedUnits - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -DETECTION_UNITS._FlareDetectedZones - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -DETECTION_UNITS._SmokeDetectedUnits - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -DETECTION_UNITS._SmokeDetectedZones - -
    -
    - - - -
    -
    - -

    Type DETECTION_UNITS.DetectedItem

    - -

    Type list

    - -

    Type map

    - -
    - -
    - - diff --git a/docs/Documentation/DetectionManager.html b/docs/Documentation/DetectionManager.html deleted file mode 100644 index 479a1e818..000000000 --- a/docs/Documentation/DetectionManager.html +++ /dev/null @@ -1,981 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module DetectionManager

    - -

    This module contains the DETECTION_MANAGER class and derived classes.

    - - - -
    - -

    1) DetectionManager#DETECTION_MANAGER class, extends Fsm#FSM

    -

    The DetectionManager#DETECTION_MANAGER class defines the core functions to report detected objects to groups. -Reportings can be done in several manners, and it is up to the derived classes if DETECTION_MANAGER to model the reporting behaviour.

    - -

    1.1) DETECTION_MANAGER constructor:

    -

    * DetectionManager#DETECTION_MANAGER.New(): Create a new DETECTION_MANAGER instance.

    - -

    1.2) DETECTION_MANAGER reporting:

    -

    Derived DETECTION_MANAGER classes will reports detected units using the method DetectionManager#DETECTION_MANAGER.ReportDetected(). This method implements polymorphic behaviour.

    - -

    The time interval in seconds of the reporting can be changed using the methods DetectionManager#DETECTION_MANAGER.SetRefreshTimeInterval(). -To control how long a reporting message is displayed, use DetectionManager#DETECTION_MANAGER.SetReportDisplayTime(). -Derived classes need to implement the method DetectionManager#DETECTION_MANAGER.GetReportDisplayTime() to use the correct display time for displayed messages during a report.

    - -

    Reporting can be started and stopped using the methods DetectionManager#DETECTION_MANAGER.StartReporting() and DetectionManager#DETECTION_MANAGER.StopReporting() respectively. -If an ad-hoc report is requested, use the method DetectionManager#DETECTION_MANAGER().

    - -

    The default reporting interval is every 60 seconds. The reporting messages are displayed 15 seconds.

    - -
    - -

    2) DetectionManager#DETECTION_REPORTING class, extends DetectionManager#DETECTION_MANAGER

    -

    The DetectionManager#DETECTION_REPORTING class implements detected units reporting. Reporting can be controlled using the reporting methods available in the DetectionManager#DETECTION_MANAGER class.

    - -

    2.1) DETECTION_REPORTING constructor:

    -

    The DetectionManager#DETECTION_REPORTING.New() method creates a new DETECTION_REPORTING instance.

    - - -
    - -

    Contributions: Mechanist, Prof_Hilactic, FlightControl - Concept & Testing

    -

    Author: FlightControl - Framework Design & Programming

    - - -

    Global(s)

    - - - - - - - - - -
    DETECTION_MANAGER - -
    DETECTION_REPORTING - -
    -

    Type DETECTION_MANAGER

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    DETECTION_MANAGER.ClassName - -
    DETECTION_MANAGER.Detection -

    The DETECTION_BASE object that is used to report the detected objects.

    -
    DETECTION_MANAGER:GetReportDisplayTime() -

    Get the reporting message display time.

    -
    DETECTION_MANAGER:New(SetGroup, Detection) -

    FAC constructor.

    -
    DETECTION_MANAGER:OnAfterStart(From, Event, To) -

    Start Handler OnAfter for DETECTION_MANAGER

    -
    DETECTION_MANAGER:OnAfterStop(From, Event, To) -

    Stop Handler OnAfter for DETECTION_MANAGER

    -
    DETECTION_MANAGER:OnBeforeStart(From, Event, To) -

    Start Handler OnBefore for DETECTION_MANAGER

    -
    DETECTION_MANAGER:OnBeforeStop(From, Event, To) -

    Stop Handler OnBefore for DETECTION_MANAGER

    -
    DETECTION_MANAGER:ProcessDetected(Detection) -

    Reports the detected items to the Set#SET_GROUP.

    -
    DETECTION_MANAGER.SetGroup -

    The groups to which the FAC will report to.

    -
    DETECTION_MANAGER:SetRefreshTimeInterval(RefreshTimeInterval) -

    Set the reporting time interval.

    -
    DETECTION_MANAGER:SetReportDisplayTime(ReportDisplayTime) -

    Set the reporting message display time.

    -
    DETECTION_MANAGER:Start() -

    Start Trigger for DETECTION_MANAGER

    -
    DETECTION_MANAGER:Stop() -

    Stop Trigger for DETECTION_MANAGER

    -
    DETECTION_MANAGER._RefreshTimeInterval - -
    DETECTION_MANAGER._ReportDisplayTime - -
    DETECTION_MANAGER:__Start(Delay) -

    Start Asynchronous Trigger for DETECTION_MANAGER

    -
    DETECTION_MANAGER:__Stop(Delay) -

    Stop Asynchronous Trigger for DETECTION_MANAGER

    -
    DETECTION_MANAGER:onafterReport(From, Event, To) - -
    DETECTION_MANAGER:onafterStart(From, Event, To) - -
    - -

    Type DETECTION_REPORTING

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    DETECTION_REPORTING.ClassName - -
    DETECTION_REPORTING.Detection -

    The DETECTION_BASE object that is used to report the detected objects.

    -
    DETECTION_REPORTING:GetDetectedItemsText(DetectedSet) -

    Creates a string of the detected items in a Detection.

    -
    DETECTION_REPORTING:New(SetGroup, Detection) -

    DETECTION_REPORTING constructor.

    -
    DETECTION_REPORTING:ProcessDetected(Group, Detection) -

    Reports the detected items to the Set#SET_GROUP.

    -
    DETECTION_REPORTING.SetGroup -

    The groups to which the FAC will report to.

    -
    - -

    Global(s)

    -
    -
    - - #DETECTION_MANAGER - -DETECTION_MANAGER - -
    -
    - - - -
    -
    -
    -
    - - #DETECTION_REPORTING - -DETECTION_REPORTING - -
    -
    - - - -
    -
    -

    Type DetectionManager

    - -

    Type DETECTION_MANAGER

    - -

    DETECTION_MANAGER class.

    - -

    Field(s)

    -
    -
    - - #string - -DETECTION_MANAGER.ClassName - -
    -
    - - - -
    -
    -
    -
    - - Functional.Detection#DETECTION_BASE - -DETECTION_MANAGER.Detection - -
    -
    - -

    The DETECTION_BASE object that is used to report the detected objects.

    - -
    -
    -
    -
    - - -DETECTION_MANAGER:GetReportDisplayTime() - -
    -
    - -

    Get the reporting message display time.

    - -

    Return value

    - -

    #number: -ReportDisplayTime The display time in seconds when a report needs to be done.

    - -
    -
    -
    -
    - - -DETECTION_MANAGER:New(SetGroup, Detection) - -
    -
    - -

    FAC constructor.

    - -

    Parameters

    - -

    Return value

    - -

    #DETECTION_MANAGER: -self

    - -
    -
    -
    -
    - - -DETECTION_MANAGER:OnAfterStart(From, Event, To) - -
    -
    - -

    Start Handler OnAfter for DETECTION_MANAGER

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -DETECTION_MANAGER:OnAfterStop(From, Event, To) - -
    -
    - -

    Stop Handler OnAfter for DETECTION_MANAGER

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -DETECTION_MANAGER:OnBeforeStart(From, Event, To) - -
    -
    - -

    Start Handler OnBefore for DETECTION_MANAGER

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -DETECTION_MANAGER:OnBeforeStop(From, Event, To) - -
    -
    - -

    Stop Handler OnBefore for DETECTION_MANAGER

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -DETECTION_MANAGER:ProcessDetected(Detection) - -
    -
    - -

    Reports the detected items to the Set#SET_GROUP.

    - -

    Parameter

    - -

    Return value

    - -

    #DETECTION_MANAGER: -self

    - -
    -
    -
    -
    - - Set#SET_GROUP - -DETECTION_MANAGER.SetGroup - -
    -
    - -

    The groups to which the FAC will report to.

    - -
    -
    -
    -
    - - -DETECTION_MANAGER:SetRefreshTimeInterval(RefreshTimeInterval) - -
    -
    - -

    Set the reporting time interval.

    - -

    Parameter

    -
      -
    • - -

      #number RefreshTimeInterval : -The interval in seconds when a report needs to be done.

      - -
    • -
    -

    Return value

    - -

    #DETECTION_MANAGER: -self

    - -
    -
    -
    -
    - - -DETECTION_MANAGER:SetReportDisplayTime(ReportDisplayTime) - -
    -
    - -

    Set the reporting message display time.

    - -

    Parameter

    -
      -
    • - -

      #number ReportDisplayTime : -The display time in seconds when a report needs to be done.

      - -
    • -
    -

    Return value

    - -

    #DETECTION_MANAGER: -self

    - -
    -
    -
    -
    - - -DETECTION_MANAGER:Start() - -
    -
    - -

    Start Trigger for DETECTION_MANAGER

    - -
    -
    -
    -
    - - -DETECTION_MANAGER:Stop() - -
    -
    - -

    Stop Trigger for DETECTION_MANAGER

    - -
    -
    -
    -
    - - - -DETECTION_MANAGER._RefreshTimeInterval - -
    -
    - - - -
    -
    -
    -
    - - - -DETECTION_MANAGER._ReportDisplayTime - -
    -
    - - - -
    -
    -
    -
    - - -DETECTION_MANAGER:__Start(Delay) - -
    -
    - -

    Start Asynchronous Trigger for DETECTION_MANAGER

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -DETECTION_MANAGER:__Stop(Delay) - -
    -
    - -

    Stop Asynchronous Trigger for DETECTION_MANAGER

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -DETECTION_MANAGER:onafterReport(From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    -
    -
    -
    -
    - - -DETECTION_MANAGER:onafterStart(From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    -
    -
    - -

    Type DETECTION_REPORTING

    - -

    DETECTION_REPORTING class.

    - -

    Field(s)

    -
    -
    - - #string - -DETECTION_REPORTING.ClassName - -
    -
    - - - -
    -
    -
    -
    - - Functional.Detection#DETECTION_BASE - -DETECTION_REPORTING.Detection - -
    -
    - -

    The DETECTION_BASE object that is used to report the detected objects.

    - -
    -
    -
    -
    - - -DETECTION_REPORTING:GetDetectedItemsText(DetectedSet) - -
    -
    - -

    Creates a string of the detected items in a Detection.

    - -

    Parameter

    - -

    Return value

    - -

    #DETECTION_MANAGER: -self

    - -
    -
    -
    -
    - - -DETECTION_REPORTING:New(SetGroup, Detection) - -
    -
    - -

    DETECTION_REPORTING constructor.

    - -

    Parameters

    - -

    Return value

    - -

    #DETECTION_REPORTING: -self

    - -
    -
    -
    -
    - - -DETECTION_REPORTING:ProcessDetected(Group, Detection) - -
    -
    - -

    Reports the detected items to the Set#SET_GROUP.

    - -

    Parameters

    - -

    Return value

    - -

    #boolean: -Return true if you want the reporting to continue... false will cancel the reporting loop.

    - -
    -
    -
    -
    - - Set#SET_GROUP - -DETECTION_REPORTING.SetGroup - -
    -
    - -

    The groups to which the FAC will report to.

    - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Escort.html b/docs/Documentation/Escort.html deleted file mode 100644 index da0593b14..000000000 --- a/docs/Documentation/Escort.html +++ /dev/null @@ -1,2736 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Escort

    - -

    Functional -- Taking the lead of AI escorting your flight.

    - - - -
    - -

    #ESCORT class

    -

    The #ESCORT class allows you to interact with escorting AI on your flight and take the lead. -Each escorting group can be commanded with a whole set of radio commands (radio menu in your flight, and then F10).

    - -

    The radio commands will vary according the category of the group. The richest set of commands are with Helicopters and AirPlanes. -Ships and Ground troops will have a more limited set, but they can provide support through the bombing of targets designated by the other escorts.

    - -

    RADIO MENUs that can be created:

    -

    Find a summary below of the current available commands:

    - -

    Navigation ...:

    -

    Escort group navigation functions:

    - -
      -
    • "Join-Up and Follow at x meters": The escort group fill follow you at about x meters, and they will follow you.
    • -
    • "Flare": Provides menu commands to let the escort group shoot a flare in the air in a color.
    • -
    • "Smoke": Provides menu commands to let the escort group smoke the air in a color. Note that smoking is only available for ground and naval troops.
    • -
    - -

    Hold position ...:

    -

    Escort group navigation functions:

    - -
      -
    • "At current location": Stops the escort group and they will hover 30 meters above the ground at the position they stopped.
    • -
    • "At client location": Stops the escort group and they will hover 30 meters above the ground at the position they stopped.
    • -
    - -

    Report targets ...:

    -

    Report targets will make the escort group to report any target that it identifies within a 8km range. Any detected target can be attacked using the 4. Attack nearby targets function. (see below).

    - -
      -
    • "Report now": Will report the current detected targets.
    • -
    • "Report targets on": Will make the escort group to report detected targets and will fill the "Attack nearby targets" menu list.
    • -
    • "Report targets off": Will stop detecting targets.
    • -
    - -

    Scan targets ...:

    -

    Menu items to pop-up the escort group for target scanning. After scanning, the escort group will resume with the mission or defined task.

    - -
      -
    • "Scan targets 30 seconds": Scan 30 seconds for targets.
    • -
    • "Scan targets 60 seconds": Scan 60 seconds for targets.
    • -
    - -

    Attack targets ...:

    -

    This menu item will list all detected targets within a 15km range. Depending on the level of detection (known/unknown) and visuality, the targets type will also be listed.

    - -

    Request assistance from ...:

    -

    This menu item will list all detected targets within a 15km range, as with the menu item Attack Targets. -This menu item allows to request attack support from other escorts supporting the current client group. -eg. the function allows a player to request support from the Ship escort to attack a target identified by the Plane escort with its Tomahawk missiles. -eg. the function allows a player to request support from other Planes escorting to bomb the unit with illumination missiles or bombs, so that the main plane escort can attack the area.

    - -

    ROE ...:

    -

    Sets the Rules of Engagement (ROE) of the escort group when in flight.

    - -
      -
    • "Hold Fire": The escort group will hold fire.
    • -
    • "Return Fire": The escort group will return fire.
    • -
    • "Open Fire": The escort group will open fire on designated targets.
    • -
    • "Weapon Free": The escort group will engage with any target.
    • -
    - -

    Evasion ...:

    -

    Will define the evasion techniques that the escort group will perform during flight or combat.

    - -
      -
    • "Fight until death": The escort group will have no reaction to threats.
    • -
    • "Use flares, chaff and jammers": The escort group will use passive defense using flares and jammers. No evasive manoeuvres are executed.
    • -
    • "Evade enemy fire": The rescort group will evade enemy fire before firing.
    • -
    • "Go below radar and evade fire": The escort group will perform evasive vertical manoeuvres.
    • -
    - -

    Resume Mission ...:

    -

    Escort groups can have their own mission. This menu item will allow the escort group to resume their Mission from a given waypoint. -Note that this is really fantastic, as you now have the dynamic of taking control of the escort groups, and allowing them to resume their path or mission.

    - -

    ESCORT construction methods.

    -

    Create a new SPAWN object with the ESCORT.New method:

    - - - -

    ESCORT initialization methods.

    -

    The following menus are created within the RADIO MENU (F10) of an active unit hosted by a player:

    - - - - - -

    Usage:

    -
    -- Declare a new EscortPlanes object as follows:
    -
    --- First find the GROUP object and the CLIENT object.
    -local EscortClient = CLIENT:FindByName( "Unit Name" ) -- The Unit Name is the name of the unit flagged with the skill Client in the mission editor.
    -local EscortGroup = GROUP:FindByName( "Group Name" ) -- The Group Name is the name of the group that will escort the Escort Client.
    -
    --- Now use these 2 objects to construct the new EscortPlanes object.
    -EscortPlanes = ESCORT:New( EscortClient, EscortGroup, "Desert", "Welcome to the mission. You are escorted by a plane with code name 'Desert', which can be instructed through the F10 radio menu." )
    -
    -
    -
    - -

    Global(s)

    - - - - - - - - - -
    ESCORT - -
    _Resume(EscortGroup) - -
    -

    Type ESCORT

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ESCORT.CT1 - -
    ESCORT.ClassName - -
    ESCORT.Detection - -
    ESCORT.EscortBriefing - -
    ESCORT.EscortClient - -
    ESCORT.EscortGroup - -
    ESCORT.EscortMenu - -
    ESCORT.EscortMenuAttackNearbyTargets - -
    ESCORT.EscortMenuEvasion - -
    ESCORT.EscortMenuEvasionEvadeFire - -
    ESCORT.EscortMenuEvasionNoReaction - -
    ESCORT.EscortMenuEvasionPassiveDefense - -
    ESCORT.EscortMenuFlare - -
    ESCORT.EscortMenuFlareGreen - -
    ESCORT.EscortMenuFlareRed - -
    ESCORT.EscortMenuFlareWhite - -
    ESCORT.EscortMenuFlareYellow - -
    ESCORT.EscortMenuHold - -
    ESCORT.EscortMenuHoldAtLeaderPosition - -
    ESCORT.EscortMenuHoldPosition - -
    ESCORT.EscortMenuJoinUpAndFollow - -
    ESCORT.EscortMenuOptionEvasionVertical - -
    ESCORT.EscortMenuROE - -
    ESCORT.EscortMenuROEHoldFire - -
    ESCORT.EscortMenuROEOpenFire - -
    ESCORT.EscortMenuROEReturnFire - -
    ESCORT.EscortMenuROEWeaponFree - -
    ESCORT.EscortMenuReportNavigation - -
    ESCORT.EscortMenuReportNearbyTargets - -
    ESCORT.EscortMenuReportNearbyTargetsNow - -
    ESCORT.EscortMenuReportNearbyTargetsOff - -
    ESCORT.EscortMenuReportNearbyTargetsOn - -
    ESCORT.EscortMenuResumeMission - -
    ESCORT.EscortMenuScan - -
    ESCORT.EscortMenuScanForTargets - -
    ESCORT.EscortMenuSmoke - -
    ESCORT.EscortMenuSmokeBlue - -
    ESCORT.EscortMenuSmokeGreen - -
    ESCORT.EscortMenuSmokeOrange - -
    ESCORT.EscortMenuSmokeRed - -
    ESCORT.EscortMenuSmokeWhite - -
    ESCORT.EscortMenuTargetAssistance - -
    ESCORT.EscortMode -

    The mode the escort is in.

    -
    ESCORT.EscortName - -
    ESCORT.EscortSetGroup - -
    ESCORT.FollowDistance -

    The current follow distance.

    -
    ESCORT.FollowScheduler -

    The instance of the SCHEDULER class.

    -
    ESCORT.FunctionalMENU_GROUPDETECTION_BASE -

    Detection

    -
    ESCORT.GT1 - -
    ESCORT:JoinUpAndFollow(EscortGroup, EscortClient, Distance) -

    JoinsUp and Follows a CLIENT.

    -
    ESCORT.MODE - -
    ESCORT:MenuAssistedAttack() -

    Defines a menu slot to let the escort attack its detected targets using assisted attack from another escort joined also with the client.

    -
    ESCORT:MenuEvasion(MenuTextFormat) -

    Defines a menu to let the escort set its evasion when under threat.

    -
    ESCORT:MenuFlare(MenuTextFormat) -

    Defines a menu slot to let the escort disperse a flare in a certain color.

    -
    ESCORT:MenuFollowAt(Distance) -

    Defines a menu slot to let the escort Join and Follow you at a certain distance.

    -
    ESCORT:MenuHoldAtEscortPosition(Height, Seconds, MenuTextFormat) -

    Defines a menu slot to let the escort hold at their current position and stay low with a specified height during a specified time in seconds.

    -
    ESCORT:MenuHoldAtLeaderPosition(Height, Seconds, MenuTextFormat) -

    Defines a menu slot to let the escort hold at the client position and stay low with a specified height during a specified time in seconds.

    -
    ESCORT:MenuROE(MenuTextFormat) -

    Defines a menu to let the escort set its rules of engagement.

    -
    ESCORT:MenuReportTargets(Seconds) -

    Defines a menu slot to let the escort report their current detected targets with a specified time interval in seconds.

    -
    ESCORT:MenuResumeMission() -

    Defines a menu to let the escort resume its mission from a waypoint on its route.

    -
    ESCORT:MenuScanForTargets(Height, Seconds, MenuTextFormat) -

    Defines a menu slot to let the escort scan for targets at a certain height for a certain time in seconds.

    -
    ESCORT:MenuSmoke(MenuTextFormat) -

    Defines a menu slot to let the escort disperse a smoke in a certain color.

    -
    ESCORT:Menus() -

    Defines the default menus

    -
    ESCORT:New(EscortClient, EscortGroup, EscortName, EscortBriefing) -

    ESCORT class constructor for an AI group

    -
    ESCORT.OptionROE - -
    ESCORT.OptionReactionOnThreat -

    Which REACTIONONTHREAT is set to the EscortGroup.

    -
    ESCORT:RegisterRoute() -

    Registers the waypoints

    -
    ESCORT.ReportTargets -

    If true, nearby targets are reported.

    -
    ESCORT.ReportTargetsScheduler - -
    ESCORT:SetDetection(Detection) -

    Set a Detection method for the EscortClient to be reported upon.

    -
    ESCORT.SmokeDirectionVector - -
    ESCORT.Targets - -
    ESCORT.TaskPoints - -
    ESCORT:TestSmokeDirectionVector(SmokeDirection) -

    This function is for test, it will put on the frequency of the FollowScheduler a red smoke at the direction vector calculated for the escort to fly to.

    -
    ESCORT._AssistTarget(DetectedItemID, self, EscortGroupAttack) - -
    ESCORT:_AttackTarget(DetectedItemID) - -
    ESCORT._Flare(MenuParam, self, Color, Message) - -
    ESCORT:_FollowScheduler() - -
    ESCORT._HoldPosition(MenuParam, self, OrbitGroup, OrbitHeight, OrbitSeconds) - -
    ESCORT._JoinUpAndFollow(MenuParam, self, Distance) - -
    ESCORT._ROE(MenuParam, self, EscortROEFunction, EscortROEMessage) - -
    ESCORT._ROT(MenuParam, self, EscortROTFunction, EscortROTMessage) - -
    ESCORT._ReportNearbyTargetsNow(MenuParam, self) - -
    ESCORT:_ReportTargetsScheduler() -

    Report Targets Scheduler.

    -
    ESCORT._ResumeMission(MenuParam, self, WayPoint) - -
    ESCORT._ScanTargets(MenuParam, self, ScanDuration) - -
    ESCORT._Smoke(MenuParam, self, Color, Message) - -
    ESCORT:_SwitchReportNearbyTargets(ReportTargets) - -
    - -

    Type ESCORT.MODE

    - - - - - - - - - -
    ESCORT.MODE.FOLLOW - -
    ESCORT.MODE.MISSION - -
    - -

    Type MENUPARAM

    - - - - - - - - - - - - - - - - - - - - - -
    MENUPARAM.Distance - -
    MENUPARAM.ParamDistance - -
    MENUPARAM.ParamFunction - -
    MENUPARAM.ParamMessage - -
    MENUPARAM.ParamSelf - -
    - -

    Global(s)

    -
    -
    - - #ESCORT - -ESCORT - -
    -
    - - - -
    -
    -
    -
    - - -_Resume(EscortGroup) - -
    -
    - - - -

    Parameter

    - -
    -
    -

    Type Escort

    - -

    Type Distance

    - -

    Type ESCORT

    - -

    ESCORT class

    - -

    Field(s)

    -
    -
    - - #number - -ESCORT.CT1 - -
    -
    - - - -
    -
    -
    -
    - - #string - -ESCORT.ClassName - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.Detection - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortBriefing - -
    -
    - - - -
    -
    -
    -
    - - Wrapper.Client#CLIENT - -ESCORT.EscortClient - -
    -
    - - - -
    -
    -
    -
    - - Wrapper.Group#GROUP - -ESCORT.EscortGroup - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenu - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuAttackNearbyTargets - -
    -
    - - - - -

    Attack Targets

    - -
    -
    -
    -
    - - - -ESCORT.EscortMenuEvasion - -
    -
    - - - - -

    Reaction to Threats

    - -
    -
    -
    -
    - - - -ESCORT.EscortMenuEvasionEvadeFire - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuEvasionNoReaction - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuEvasionPassiveDefense - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuFlare - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuFlareGreen - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuFlareRed - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuFlareWhite - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuFlareYellow - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuHold - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuHoldAtLeaderPosition - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuHoldPosition - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuJoinUpAndFollow - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuOptionEvasionVertical - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuROE - -
    -
    - - - - -

    Rules of Engagement

    - -
    -
    -
    -
    - - - -ESCORT.EscortMenuROEHoldFire - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuROEOpenFire - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuROEReturnFire - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuROEWeaponFree - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuReportNavigation - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuReportNearbyTargets - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuReportNearbyTargetsNow - -
    -
    - - - - -

    Report Targets

    - -
    -
    -
    -
    - - - -ESCORT.EscortMenuReportNearbyTargetsOff - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuReportNearbyTargetsOn - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuResumeMission - -
    -
    - - - - -

    Mission Resume Menu Root

    - -
    -
    -
    -
    - - - -ESCORT.EscortMenuScan - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuScanForTargets - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuSmoke - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuSmokeBlue - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuSmokeGreen - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuSmokeOrange - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuSmokeRed - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuSmokeWhite - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortMenuTargetAssistance - -
    -
    - - - - -

    Request assistance from other escorts. - This is very useful to let f.e. an escorting ship attack a target detected by an escorting plane...

    - -
    -
    -
    -
    - - #ESCORT.MODE - -ESCORT.EscortMode - -
    -
    - -

    The mode the escort is in.

    - -
    -
    -
    -
    - - #string - -ESCORT.EscortName - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.EscortSetGroup - -
    -
    - - - -
    -
    -
    -
    - - #number - -ESCORT.FollowDistance - -
    -
    - -

    The current follow distance.

    - -
    -
    -
    -
    - - Core.Scheduler#SCHEDULER - -ESCORT.FollowScheduler - -
    -
    - -

    The instance of the SCHEDULER class.

    - -
    -
    -
    -
    - - -ESCORT.FunctionalMENU_GROUPDETECTION_BASE - -
    -
    - -

    Detection

    - -
    -
    -
    -
    - - #number - -ESCORT.GT1 - -
    -
    - - - -
    -
    -
    -
    - - -ESCORT:JoinUpAndFollow(EscortGroup, EscortClient, Distance) - -
    -
    - -

    JoinsUp and Follows a CLIENT.

    - -

    Parameters

    - -
    -
    -
    -
    - - - -ESCORT.MODE - -
    -
    - - - -
    -
    -
    -
    - - -ESCORT:MenuAssistedAttack() - -
    -
    - -

    Defines a menu slot to let the escort attack its detected targets using assisted attack from another escort joined also with the client.

    - - -

    This menu will appear under Request assistance from. -Note that this method needs to be preceded with the method MenuReportTargets.

    - -

    Return value

    - -

    #ESCORT:

    - - -
    -
    -
    -
    - - -ESCORT:MenuEvasion(MenuTextFormat) - -
    -
    - -

    Defines a menu to let the escort set its evasion when under threat.

    - - -

    All rules of engagement will appear under the menu Evasion.

    - -

    Parameter

    -
      -
    • - -

      MenuTextFormat :

      - -
    • -
    -

    Return value

    - -

    #ESCORT:

    - - -
    -
    -
    -
    - - -ESCORT:MenuFlare(MenuTextFormat) - -
    -
    - -

    Defines a menu slot to let the escort disperse a flare in a certain color.

    - - -

    This menu will appear under Navigation. -The flare will be fired from the first unit in the group.

    - -

    Parameter

    -
      -
    • - -

      #string MenuTextFormat : -Optional parameter that shows the menu option text. If no text is given, the default text will be displayed.

      - -
    • -
    -

    Return value

    - -

    #ESCORT:

    - - -
    -
    -
    -
    - - -ESCORT:MenuFollowAt(Distance) - -
    -
    - -

    Defines a menu slot to let the escort Join and Follow you at a certain distance.

    - - -

    This menu will appear under Navigation.

    - -

    Parameter

    -
      -
    • - -

      Dcs.DCSTypes#Distance Distance : -The distance in meters that the escort needs to follow the client.

      - -
    • -
    -

    Return value

    - -

    #ESCORT:

    - - -
    -
    -
    -
    - - -ESCORT:MenuHoldAtEscortPosition(Height, Seconds, MenuTextFormat) - -
    -
    - -

    Defines a menu slot to let the escort hold at their current position and stay low with a specified height during a specified time in seconds.

    - - -

    This menu will appear under Hold position.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Distance Height : -Optional parameter that sets the height in meters to let the escort orbit at the current location. The default value is 30 meters.

      - -
    • -
    • - -

      Dcs.DCSTypes#Time Seconds : -Optional parameter that lets the escort orbit at the current position for a specified time. (not implemented yet). The default value is 0 seconds, meaning, that the escort will orbit forever until a sequent command is given.

      - -
    • -
    • - -

      #string MenuTextFormat : -Optional parameter that shows the menu option text. The text string is formatted, and should contain two %d tokens in the string. The first for the Height, the second for the Time (if given). If no text is given, the default text will be displayed.

      - -
    • -
    -

    Return value

    - -

    #ESCORT: -TODO: Implement Seconds parameter. Challenge is to first develop the "continue from last activity" function.

    - -
    -
    -
    -
    - - -ESCORT:MenuHoldAtLeaderPosition(Height, Seconds, MenuTextFormat) - -
    -
    - -

    Defines a menu slot to let the escort hold at the client position and stay low with a specified height during a specified time in seconds.

    - - -

    This menu will appear under Navigation.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Distance Height : -Optional parameter that sets the height in meters to let the escort orbit at the current location. The default value is 30 meters.

      - -
    • -
    • - -

      Dcs.DCSTypes#Time Seconds : -Optional parameter that lets the escort orbit at the current position for a specified time. (not implemented yet). The default value is 0 seconds, meaning, that the escort will orbit forever until a sequent command is given.

      - -
    • -
    • - -

      #string MenuTextFormat : -Optional parameter that shows the menu option text. The text string is formatted, and should contain one or two %d tokens in the string. The first for the Height, the second for the Time (if given). If no text is given, the default text will be displayed.

      - -
    • -
    -

    Return value

    - -

    #ESCORT: -TODO: Implement Seconds parameter. Challenge is to first develop the "continue from last activity" function.

    - -
    -
    -
    -
    - - -ESCORT:MenuROE(MenuTextFormat) - -
    -
    - -

    Defines a menu to let the escort set its rules of engagement.

    - - -

    All rules of engagement will appear under the menu ROE.

    - -

    Parameter

    -
      -
    • - -

      MenuTextFormat :

      - -
    • -
    -

    Return value

    - -

    #ESCORT:

    - - -
    -
    -
    -
    - - -ESCORT:MenuReportTargets(Seconds) - -
    -
    - -

    Defines a menu slot to let the escort report their current detected targets with a specified time interval in seconds.

    - - -

    This menu will appear under Report targets. -Note that if a report targets menu is not specified, no targets will be detected by the escort, and the attack and assisted attack menus will not be displayed.

    - -

    Parameter

    -
      -
    • - -

      Dcs.DCSTypes#Time Seconds : -Optional parameter that lets the escort report their current detected targets after specified time interval in seconds. The default time is 30 seconds.

      - -
    • -
    -

    Return value

    - -

    #ESCORT:

    - - -
    -
    -
    -
    - - -ESCORT:MenuResumeMission() - -
    -
    - -

    Defines a menu to let the escort resume its mission from a waypoint on its route.

    - - -

    All rules of engagement will appear under the menu Resume mission from.

    - -

    Return value

    - -

    #ESCORT:

    - - -
    -
    -
    -
    - - -ESCORT:MenuScanForTargets(Height, Seconds, MenuTextFormat) - -
    -
    - -

    Defines a menu slot to let the escort scan for targets at a certain height for a certain time in seconds.

    - - -

    This menu will appear under Scan targets.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Distance Height : -Optional parameter that sets the height in meters to let the escort orbit at the current location. The default value is 30 meters.

      - -
    • -
    • - -

      Dcs.DCSTypes#Time Seconds : -Optional parameter that lets the escort orbit at the current position for a specified time. (not implemented yet). The default value is 0 seconds, meaning, that the escort will orbit forever until a sequent command is given.

      - -
    • -
    • - -

      #string MenuTextFormat : -Optional parameter that shows the menu option text. The text string is formatted, and should contain one or two %d tokens in the string. The first for the Height, the second for the Time (if given). If no text is given, the default text will be displayed.

      - -
    • -
    -

    Return value

    - -

    #ESCORT:

    - - -
    -
    -
    -
    - - -ESCORT:MenuSmoke(MenuTextFormat) - -
    -
    - -

    Defines a menu slot to let the escort disperse a smoke in a certain color.

    - - -

    This menu will appear under Navigation. -Note that smoke menu options will only be displayed for ships and ground units. Not for air units. -The smoke will be fired from the first unit in the group.

    - -

    Parameter

    -
      -
    • - -

      #string MenuTextFormat : -Optional parameter that shows the menu option text. If no text is given, the default text will be displayed.

      - -
    • -
    -

    Return value

    - -

    #ESCORT:

    - - -
    -
    -
    -
    - - -ESCORT:Menus() - -
    -
    - -

    Defines the default menus

    - -

    Return value

    - -

    #ESCORT:

    - - -
    -
    -
    -
    - - -ESCORT:New(EscortClient, EscortGroup, EscortName, EscortBriefing) - -
    -
    - -

    ESCORT class constructor for an AI group

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Client#CLIENT EscortClient : -The client escorted by the EscortGroup.

      - -
    • -
    • - -

      Wrapper.Group#GROUP EscortGroup : -The group AI escorting the EscortClient.

      - -
    • -
    • - -

      #string EscortName : -Name of the escort.

      - -
    • -
    • - -

      #string EscortBriefing : -A text showing the ESCORT briefing to the player. Note that if no EscortBriefing is provided, the default briefing will be shown.

      - -
    • -
    -

    Return value

    - -

    #ESCORT: -self

    - -

    Usage:

    -
    -- Declare a new EscortPlanes object as follows:
    -
    --- First find the GROUP object and the CLIENT object.
    -local EscortClient = CLIENT:FindByName( "Unit Name" ) -- The Unit Name is the name of the unit flagged with the skill Client in the mission editor.
    -local EscortGroup = GROUP:FindByName( "Group Name" ) -- The Group Name is the name of the group that will escort the Escort Client.
    -
    --- Now use these 2 objects to construct the new EscortPlanes object.
    -EscortPlanes = ESCORT:New( EscortClient, EscortGroup, "Desert", "Welcome to the mission. You are escorted by a plane with code name 'Desert', which can be instructed through the F10 radio menu." )
    - -
    -
    -
    -
    - - - -ESCORT.OptionROE - -
    -
    - - - -
    -
    -
    -
    - - Dcs.DCSTypes#AI.Option.Air.val.REACTION_ON_THREAT - -ESCORT.OptionReactionOnThreat - -
    -
    - -

    Which REACTIONONTHREAT is set to the EscortGroup.

    - -
    -
    -
    -
    - - -ESCORT:RegisterRoute() - -
    -
    - -

    Registers the waypoints

    - -

    Return value

    - -

    #table:

    - - -
    -
    -
    -
    - - #boolean - -ESCORT.ReportTargets - -
    -
    - -

    If true, nearby targets are reported.

    - -
    -
    -
    -
    - - - -ESCORT.ReportTargetsScheduler - -
    -
    - - - -
    -
    -
    -
    - - -ESCORT:SetDetection(Detection) - -
    -
    - -

    Set a Detection method for the EscortClient to be reported upon.

    - - -

    Detection methods are based on the derived classes from DETECTION_BASE.

    - -

    Parameter

    - -
    -
    -
    -
    - - -ESCORT.SmokeDirectionVector - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.Targets - -
    -
    - - - -
    -
    -
    -
    - - - -ESCORT.TaskPoints - -
    -
    - - - -
    -
    -
    -
    - - -ESCORT:TestSmokeDirectionVector(SmokeDirection) - -
    -
    - -

    This function is for test, it will put on the frequency of the FollowScheduler a red smoke at the direction vector calculated for the escort to fly to.

    - - -

    This allows to visualize where the escort is flying to.

    - -

    Parameter

    -
      -
    • - -

      #boolean SmokeDirection : -If true, then the direction vector will be smoked.

      - -
    • -
    -
    -
    -
    -
    - - -ESCORT._AssistTarget(DetectedItemID, self, EscortGroupAttack) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      #number DetectedItemID :

      - -
    • -
    • - -

      self :

      - -
    • -
    • - -

      EscortGroupAttack :

      - -
    • -
    -
    -
    -
    -
    - - -ESCORT:_AttackTarget(DetectedItemID) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      #number DetectedItemID :

      - -
    • -
    -
    -
    -
    -
    - - -ESCORT._Flare(MenuParam, self, Color, Message) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      #MENUPARAM MenuParam :

      - -
    • -
    • - -

      self :

      - -
    • -
    • - -

      Color :

      - -
    • -
    • - -

      Message :

      - -
    • -
    -
    -
    -
    -
    - - -ESCORT:_FollowScheduler() - -
    -
    - - - -
    -
    -
    -
    - - -ESCORT._HoldPosition(MenuParam, self, OrbitGroup, OrbitHeight, OrbitSeconds) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      #MENUPARAM MenuParam :

      - -
    • -
    • - -

      self :

      - -
    • -
    • - -

      OrbitGroup :

      - -
    • -
    • - -

      OrbitHeight :

      - -
    • -
    • - -

      OrbitSeconds :

      - -
    • -
    -
    -
    -
    -
    - - -ESCORT._JoinUpAndFollow(MenuParam, self, Distance) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      #MENUPARAM MenuParam :

      - -
    • -
    • - -

      self :

      - -
    • -
    • - -

      Distance :

      - -
    • -
    -
    -
    -
    -
    - - -ESCORT._ROE(MenuParam, self, EscortROEFunction, EscortROEMessage) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      #MENUPARAM MenuParam :

      - -
    • -
    • - -

      self :

      - -
    • -
    • - -

      EscortROEFunction :

      - -
    • -
    • - -

      EscortROEMessage :

      - -
    • -
    -
    -
    -
    -
    - - -ESCORT._ROT(MenuParam, self, EscortROTFunction, EscortROTMessage) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      #MENUPARAM MenuParam :

      - -
    • -
    • - -

      self :

      - -
    • -
    • - -

      EscortROTFunction :

      - -
    • -
    • - -

      EscortROTMessage :

      - -
    • -
    -
    -
    -
    -
    - - -ESCORT._ReportNearbyTargetsNow(MenuParam, self) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      #MENUPARAM MenuParam :

      - -
    • -
    • - -

      self :

      - -
    • -
    -
    -
    -
    -
    - - -ESCORT:_ReportTargetsScheduler() - -
    -
    - -

    Report Targets Scheduler.

    - -
    -
    -
    -
    - - -ESCORT._ResumeMission(MenuParam, self, WayPoint) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      #MENUPARAM MenuParam :

      - -
    • -
    • - -

      self :

      - -
    • -
    • - -

      WayPoint :

      - -
    • -
    -
    -
    -
    -
    - - -ESCORT._ScanTargets(MenuParam, self, ScanDuration) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      #MENUPARAM MenuParam :

      - -
    • -
    • - -

      self :

      - -
    • -
    • - -

      ScanDuration :

      - -
    • -
    -
    -
    -
    -
    - - -ESCORT._Smoke(MenuParam, self, Color, Message) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      #MENUPARAM MenuParam :

      - -
    • -
    • - -

      self :

      - -
    • -
    • - -

      Color :

      - -
    • -
    • - -

      Message :

      - -
    • -
    -
    -
    -
    -
    - - -ESCORT:_SwitchReportNearbyTargets(ReportTargets) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      ReportTargets :

      - -
    • -
    -
    -
    - -

    Type ESCORT.MODE

    - -

    ESCORT.Mode class

    - -

    Field(s)

    -
    -
    - - #number - -ESCORT.MODE.FOLLOW - -
    -
    - - - -
    -
    -
    -
    - - #number - -ESCORT.MODE.MISSION - -
    -
    - - - -
    -
    - -

    Type MENUPARAM

    - -

    MENUPARAM type

    - -

    Field(s)

    -
    -
    - - - -MENUPARAM.Distance - -
    -
    - - - -
    -
    -
    -
    - - #Distance - -MENUPARAM.ParamDistance - -
    -
    - - - -
    -
    -
    -
    - - #function - -MENUPARAM.ParamFunction - -
    -
    - - - -
    -
    -
    -
    - - #string - -MENUPARAM.ParamMessage - -
    -
    - - - -
    -
    -
    -
    - - #ESCORT - -MENUPARAM.ParamSelf - -
    -
    - - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Event.html b/docs/Documentation/Event.html deleted file mode 100644 index a7aa2559b..000000000 --- a/docs/Documentation/Event.html +++ /dev/null @@ -1,2617 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Event

    - -

    Core -- EVENT models DCS event dispatching using a publish-subscribe model.

    - - - -

    Banner Image

    - -
    - -

    1) Event Handling Overview

    - -

    Objects

    - -

    Within a running mission, various DCS events occur. Units are dynamically created, crash, die, shoot stuff, get hit etc. -This module provides a mechanism to dispatch those events occuring within your running mission, to the different objects orchestrating your mission.

    - -

    Objects

    - -

    Objects can subscribe to different events. The Event dispatcher will publish the received DCS events to the subscribed MOOSE objects, in a specified order. -In this way, the subscribed MOOSE objects are kept in sync with your evolving running mission.

    - -

    1.1) Event Dispatching

    - -

    Objects

    - -

    The _EVENTDISPATCHER object is automatically created within MOOSE, -and handles the dispatching of DCS Events occurring -in the simulator to the subscribed objects -in the correct processing order.

    - -

    Objects

    - -

    There are 5 levels of kind of objects that the _EVENTDISPATCHER services:

    - -
      -
    • _DATABASE object: The core of the MOOSE objects. Any object that is created, deleted or updated, is done in this database.
    • -
    • SET_ derived classes: Subsets of the _DATABASE object. These subsets are updated by the _EVENTDISPATCHER as the second priority.
    • -
    • UNIT objects: UNIT objects can subscribe to DCS events. Each DCS event will be directly published to teh subscribed UNIT object.
    • -
    • GROUP objects: GROUP objects can subscribe to DCS events. Each DCS event will be directly published to the subscribed GROUP object.
    • -
    • Any other object: Various other objects can subscribe to DCS events. Each DCS event triggered will be published to each subscribed object.
    • -
    - -

    Objects

    - -

    For most DCS events, the above order of updating will be followed.

    - -

    Objects

    - -

    But for some DCS events, the publishing order is reversed. This is due to the fact that objects need to be erased instead of added.

    - -

    1.2) Event Handling

    - -

    Objects

    - -

    The actual event subscribing and handling is not facilitated through the _EVENTDISPATCHER, but it is done through the BASE class, UNIT class and GROUP class. -The _EVENTDISPATCHER is a component that is quietly working in the background of MOOSE.

    - -

    Objects

    - -

    The BASE class provides methods to catch DCS Events. These are events that are triggered from within the DCS simulator, -and handled through lua scripting. MOOSE provides an encapsulation to handle these events more efficiently.

    - -

    1.2.1 Subscribe / Unsubscribe to DCS Events

    - -

    At first, the mission designer will need to Subscribe to a specific DCS event for the class. -So, when the DCS event occurs, the class will be notified of that event. -There are two functions which you use to subscribe to or unsubscribe from an event.

    - - - -

    Note that for a UNIT, the event will be handled for that UNIT only! -Note that for a GROUP, the event will be handled for all the UNITs in that GROUP only!

    - -

    For all objects of other classes, the subscribed events will be handled for all UNITs within the Mission! -So if a UNIT within the mission has the subscribed event for that object, -then the object event handler will receive the event for that UNIT!

    - -

    1.3.2 Event Handling of DCS Events

    - -

    Once the class is subscribed to the event, an Event Handling method on the object or class needs to be written that will be called -when the DCS event occurs. The Event Handling method receives an Event#EVENTDATA structure, which contains a lot of information -about the event that occurred.

    - -

    Find below an example of the prototype how to write an event handling function for two units:

    - -
     local Tank1 = UNIT:FindByName( "Tank A" )
    - local Tank2 = UNIT:FindByName( "Tank B" )
    -
    - -- Here we subscribe to the Dead events. So, if one of these tanks dies, the Tank1 or Tank2 objects will be notified.
    - Tank1:HandleEvent( EVENTS.Dead )
    - Tank2:HandleEvent( EVENTS.Dead )
    -
    - --- This function is an Event Handling function that will be called when Tank1 is Dead.
    - -- @param Wrapper.Unit#UNIT self 
    - -- @param Core.Event#EVENTDATA EventData
    - function Tank1:OnEventDead( EventData )
    -
    -   self:SmokeGreen()
    - end
    -
    - --- This function is an Event Handling function that will be called when Tank2 is Dead.
    - -- @param Wrapper.Unit#UNIT self 
    - -- @param Core.Event#EVENTDATA EventData
    - function Tank2:OnEventDead( EventData )
    -
    -   self:SmokeBlue()
    - end
    -
    - -

    1.3.3 Event Handling methods that are automatically called upon subscribed DCS events

    - -

    Objects

    - -

    The following list outlines which EVENTS item in the structure corresponds to which Event Handling method. -Always ensure that your event handling methods align with the events being subscribed to, or nothing will be executed.

    - -

    2) EVENTS type

    - -

    The EVENTS structure contains names for all the different DCS events that objects can subscribe to using the -Base#BASE.HandleEvent() method.

    - -

    3) EVENTDATA type

    - -

    The Event#EVENTDATA structure contains all the fields that are populated with event information before -an Event Handler method is being called by the event dispatcher. -The Event Handler received the EVENTDATA object as a parameter, and can be used to investigate further the different events. -There are basically 4 main categories of information stored in the EVENTDATA structure:

    - -
      -
    • Initiator Unit data: Several fields documenting the initiator unit related to the event.

    • -
    • Target Unit data: Several fields documenting the target unit related to the event.

    • -
    • Weapon data: Certain events populate weapon information.

    • -
    • Place data: Certain events populate place information.

      - -

      --- This function is an Event Handling function that will be called when Tank1 is Dead. - -- EventData is an EVENTDATA structure. - -- We use the EventData.IniUnit to smoke the tank Green. - -- @param Wrapper.Unit#UNIT self - -- @param Core.Event#EVENTDATA EventData - function Tank1:OnEventDead( EventData )

      - -

      EventData.IniUnit:SmokeGreen() - end

    • -
    - - -

    Find below an overview which events populate which information categories:

    - -

    Objects

    - -

    IMPORTANT NOTE: Some events can involve not just UNIT objects, but also STATIC objects!!! -In that case the initiator or target unit fields will refer to a STATIC object! -In case a STATIC object is involved, the documentation indicates which fields will and won't not be populated. -The fields IniObjectCategory and TgtObjectCategory contain the indicator which kind of object is involved in the event. -You can use the enumerator Object.Category.UNIT and Object.Category.STATIC to check on IniObjectCategory and TgtObjectCategory. -Example code snippet:

    - -
     if Event.IniObjectCategory == Object.Category.UNIT then
    -  ...
    - end
    - if Event.IniObjectCategory == Object.Category.STATIC then
    -  ...
    - end 
    -
    - -

    When a static object is involved in the event, the Group and Player fields won't be populated.

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - - - - - - - - - -
    EVENT - -
    EVENTHANDLER - -
    EVENTS - -
    -

    Type EVENT

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    EVENT.ClassID - -
    EVENT.ClassName - -
    EVENT:CreateEventDeleteCargo(Cargo) -

    Creation of a Cargo Deletion Event.

    -
    EVENT:CreateEventNewCargo(Cargo) -

    Creation of a New Cargo Event.

    -
    EVENT:CreateEventPlayerEnterUnit(PlayerUnit) -

    Creation of a SEVENTPLAYERENTERUNIT Event.

    -
    EVENT.Events - -
    EVENT:Init(EventID, EventClass) -

    Initializes the Events structure for the event

    -
    EVENT:New() - -
    EVENT:OnBirthForTemplate(EventGroup, EventFunction, EventClass, EventTemplate) -

    Create an OnBirth event handler for a group

    -
    EVENT:OnCrashForTemplate(EventGroup, EventFunction, EventClass, EventTemplate) -

    Create an OnCrash event handler for a group

    -
    EVENT:OnDeadForTemplate(EventGroup, EventFunction, EventClass, EventTemplate) -

    Create an OnDead event handler for a group

    -
    EVENT:OnEngineShutDownForTemplate(EventTemplate, EventFunction, EventClass) -

    Create an OnDead event handler for a group

    -
    EVENT:OnEventForGroup(GroupName, EventFunction, EventClass, EventID, ...) -

    Set a new listener for an SEVENTX event for a GROUP.

    -
    EVENT:OnEventForTemplate(EventTemplate, EventFunction, EventClass, OnEventFunction, EventID) -

    Create an OnDead event handler for a group

    -
    EVENT:OnEventForUnit(UnitName, EventFunction, EventClass, EventID) -

    Set a new listener for an SEVENTX event for a UNIT.

    -
    EVENT:OnEventGeneric(EventFunction, EventClass, EventID) -

    Set a new listener for an SEVENTX event independent from a unit or a weapon.

    -
    EVENT:OnLandForTemplate(EventTemplate, EventFunction, EventClass) - -
    EVENT:OnTakeOffForTemplate(EventTemplate, EventFunction, EventClass) - -
    EVENT:RemoveAll(EventObject) -

    Clears all event subscriptions for a Base#BASE derived object.

    -
    EVENT:RemoveEvent(EventClass, EventID) -

    Removes a subscription

    -
    EVENT:Reset(EventClass, EventID, EventObject) -

    Resets subscriptions

    -
    EVENT:onEvent(Event) - -
    - -

    Type EVENT.Events

    - - - - - -
    EVENT.Events.IniUnit - -
    - -

    Type EVENTDATA

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    EVENTDATA.Cargo - -
    EVENTDATA.CargoName - -
    EVENTDATA.IniCategory -

    (UNIT) The category of the initiator.

    -
    EVENTDATA.IniCoalition -

    (UNIT) The coalition of the initiator.

    -
    EVENTDATA.IniDCSGroup -

    (UNIT) The initiating {DCSGroup#Group}.

    -
    EVENTDATA.IniDCSGroupName -

    (UNIT) The initiating Group name.

    -
    EVENTDATA.IniDCSUnit -

    (UNIT/STATIC) The initiating DCSUnit#Unit or DCSStaticObject#StaticObject.

    -
    EVENTDATA.IniDCSUnitName -

    (UNIT/STATIC) The initiating Unit name.

    -
    EVENTDATA.IniGroup -

    (UNIT) The initiating MOOSE wrapper Group#GROUP of the initiator Group object.

    -
    EVENTDATA.IniGroupName -

    UNIT) The initiating GROUP name (same as IniDCSGroupName).

    -
    EVENTDATA.IniObjectCategory -

    (UNIT/STATIC/SCENERY) The initiator object category ( Object.Category.UNIT or Object.Category.STATIC ).

    -
    EVENTDATA.IniPlayerName -

    (UNIT) The name of the initiating player in case the Unit is a client or player slot.

    -
    EVENTDATA.IniTypeName -

    (UNIT) The type name of the initiator.

    - -
    EVENTDATA.IniUnit -

    (UNIT/STATIC) The initiating MOOSE wrapper Unit#UNIT of the initiator Unit object.

    -
    EVENTDATA.IniUnitName -

    (UNIT/STATIC) The initiating UNIT name (same as IniDCSUnitName).

    -
    EVENTDATA.TgtCategory -

    (UNIT) The category of the target.

    -
    EVENTDATA.TgtCoalition -

    (UNIT) The coalition of the target.

    -
    EVENTDATA.TgtDCSGroup -

    (UNIT) The target {DCSGroup#Group}.

    -
    EVENTDATA.TgtDCSGroupName -

    (UNIT) The target Group name.

    -
    EVENTDATA.TgtDCSUnit -

    (UNIT/STATIC) The target DCSUnit#Unit or DCSStaticObject#StaticObject.

    -
    EVENTDATA.TgtDCSUnitName -

    (UNIT/STATIC) The target Unit name.

    -
    EVENTDATA.TgtGroup -

    (UNIT) The target MOOSE wrapper Group#GROUP of the target Group object.

    -
    EVENTDATA.TgtGroupName -

    (UNIT) The target GROUP name (same as TgtDCSGroupName).

    -
    EVENTDATA.TgtObjectCategory -

    (UNIT/STATIC) The target object category ( Object.Category.UNIT or Object.Category.STATIC ).

    -
    EVENTDATA.TgtPlayerName -

    (UNIT) The name of the target player in case the Unit is a client or player slot.

    -
    EVENTDATA.TgtTypeName -

    (UNIT) The type name of the target.

    - -
    EVENTDATA.TgtUnit -

    (UNIT/STATIC) The target MOOSE wrapper Unit#UNIT of the target Unit object.

    -
    EVENTDATA.TgtUnitName -

    (UNIT/STATIC) The target UNIT name (same as TgtDCSUnitName).

    -
    EVENTDATA.Weapon - -
    EVENTDATA.WeaponCategory - -
    EVENTDATA.WeaponCoalition - -
    EVENTDATA.WeaponName - -
    EVENTDATA.WeaponPlayerName - -
    EVENTDATA.WeaponTgtDCSUnit - -
    EVENTDATA.WeaponTypeName - -
    EVENTDATA.WeaponUNIT - -
    EVENTDATA.id -

    The identifier of the event.

    - -
    EVENTDATA.initiator -

    (UNIT/STATIC/SCENERY) The initiating Dcs.DCSUnit#Unit or Dcs.DCSStaticObject#StaticObject.

    -
    EVENTDATA.target -

    (UNIT/STATIC) The target Dcs.DCSUnit#Unit or DCSStaticObject#StaticObject.

    -
    EVENTDATA.weapon -

    The weapon used during the event.

    -
    - -

    Type EVENTHANDLER

    - - - - - - - - - - - - - -
    EVENTHANDLER.ClassID - -
    EVENTHANDLER.ClassName - -
    EVENTHANDLER:New() -

    The EVENTHANDLER constructor

    -
    - -

    Type EVENTS

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    EVENTS.BaseCaptured - -
    EVENTS.Birth - -
    EVENTS.Crash - -
    EVENTS.Dead - -
    EVENTS.DeleteCargo - -
    EVENTS.Ejection - -
    EVENTS.EngineShutdown - -
    EVENTS.EngineStartup - -
    EVENTS.Hit - -
    EVENTS.HumanFailure - -
    EVENTS.Land - -
    EVENTS.MissionEnd - -
    EVENTS.MissionStart - -
    EVENTS.NewCargo - -
    EVENTS.PilotDead - -
    EVENTS.PlayerComment - -
    EVENTS.PlayerEnterUnit - -
    EVENTS.PlayerLeaveUnit - -
    EVENTS.Refueling - -
    EVENTS.RefuelingStop - -
    EVENTS.ShootingEnd - -
    EVENTS.ShootingStart - -
    EVENTS.Shot - -
    EVENTS.Takeoff - -
    EVENTS.TookControl - -
    - -

    Global(s)

    -
    -
    - - #EVENT - -EVENT - -
    -
    - - - -
    -
    -
    -
    - - #EVENTHANDLER - -EVENTHANDLER - -
    -
    - - - -
    -
    -
    -
    - - #EVENTS - -EVENTS - -
    -
    - - - -
    -
    -

    Type Event

    - -

    Type EVENT

    - -

    The EVENT structure

    - -

    Field(s)

    -
    -
    - - #number - -EVENT.ClassID - -
    -
    - - - -
    -
    -
    -
    - - #string - -EVENT.ClassName - -
    -
    - - - -
    -
    -
    -
    - - -EVENT:CreateEventDeleteCargo(Cargo) - -
    -
    - -

    Creation of a Cargo Deletion Event.

    - -

    Parameter

    - -
    -
    -
    -
    - - -EVENT:CreateEventNewCargo(Cargo) - -
    -
    - -

    Creation of a New Cargo Event.

    - -

    Parameter

    - -
    -
    -
    -
    - - -EVENT:CreateEventPlayerEnterUnit(PlayerUnit) - -
    -
    - -

    Creation of a SEVENTPLAYERENTERUNIT Event.

    - -

    Parameter

    - -
    -
    -
    -
    - - #EVENT.Events - -EVENT.Events - -
    -
    - - - -
    -
    -
    -
    - - -EVENT:Init(EventID, EventClass) - -
    -
    - -

    Initializes the Events structure for the event

    - -

    Parameters

    - -

    Return value

    - -

    #EVENT.Events:

    - - -
    -
    -
    -
    - - -EVENT:New() - -
    -
    - - - -
    -
    -
    -
    - - -EVENT:OnBirthForTemplate(EventGroup, EventFunction, EventClass, EventTemplate) - -
    -
    - -

    Create an OnBirth event handler for a group

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP EventGroup :

      - -
    • -
    • - -

      #function EventFunction : -The function to be called when the event occurs for the unit.

      - -
    • -
    • - -

      EventClass : -The self instance of the class for which the event is.

      - -
    • -
    • - -

      EventTemplate :

      - -
    • -
    -

    Return value

    - -

    #EVENT:

    - - -
    -
    -
    -
    - - -EVENT:OnCrashForTemplate(EventGroup, EventFunction, EventClass, EventTemplate) - -
    -
    - -

    Create an OnCrash event handler for a group

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP EventGroup :

      - -
    • -
    • - -

      #function EventFunction : -The function to be called when the event occurs for the unit.

      - -
    • -
    • - -

      EventClass : -The self instance of the class for which the event is.

      - -
    • -
    • - -

      EventTemplate :

      - -
    • -
    -

    Return value

    - -

    #EVENT:

    - - -
    -
    -
    -
    - - -EVENT:OnDeadForTemplate(EventGroup, EventFunction, EventClass, EventTemplate) - -
    -
    - -

    Create an OnDead event handler for a group

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP EventGroup :

      - -
    • -
    • - -

      #function EventFunction : -The function to be called when the event occurs for the unit.

      - -
    • -
    • - -

      EventClass : -The self instance of the class for which the event is.

      - -
    • -
    • - -

      EventTemplate :

      - -
    • -
    -

    Return value

    - -

    #EVENT:

    - - -
    -
    -
    -
    - - -EVENT:OnEngineShutDownForTemplate(EventTemplate, EventFunction, EventClass) - -
    -
    - -

    Create an OnDead event handler for a group

    - -

    Parameters

    -
      -
    • - -

      #table EventTemplate :

      - -
    • -
    • - -

      #function EventFunction : -The function to be called when the event occurs for the unit.

      - -
    • -
    • - -

      EventClass : -The self instance of the class for which the event is.

      - -
    • -
    -

    Return value

    - -

    #EVENT:

    - - -
    -
    -
    -
    - - -EVENT:OnEventForGroup(GroupName, EventFunction, EventClass, EventID, ...) - -
    -
    - -

    Set a new listener for an SEVENTX event for a GROUP.

    - -

    Parameters

    -
      -
    • - -

      #string GroupName : -The name of the GROUP.

      - -
    • -
    • - -

      #function EventFunction : -The function to be called when the event occurs for the GROUP.

      - -
    • -
    • - -

      Core.Base#BASE EventClass : -The self instance of the class for which the event is.

      - -
    • -
    • - -

      EventID :

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #EVENT:

    - - -
    -
    -
    -
    - - -EVENT:OnEventForTemplate(EventTemplate, EventFunction, EventClass, OnEventFunction, EventID) - -
    -
    - -

    Create an OnDead event handler for a group

    - -

    Parameters

    -
      -
    • - -

      #table EventTemplate :

      - -
    • -
    • - -

      #function EventFunction : -The function to be called when the event occurs for the unit.

      - -
    • -
    • - -

      EventClass : -The instance of the class for which the event is.

      - -
    • -
    • - -

      #function OnEventFunction :

      - -
    • -
    • - -

      EventID :

      - -
    • -
    -

    Return value

    - -

    #EVENT:

    - - -
    -
    -
    -
    - - -EVENT:OnEventForUnit(UnitName, EventFunction, EventClass, EventID) - -
    -
    - -

    Set a new listener for an SEVENTX event for a UNIT.

    - -

    Parameters

    -
      -
    • - -

      #string UnitName : -The name of the UNIT.

      - -
    • -
    • - -

      #function EventFunction : -The function to be called when the event occurs for the GROUP.

      - -
    • -
    • - -

      Core.Base#BASE EventClass : -The self instance of the class for which the event is.

      - -
    • -
    • - -

      EventID :

      - -
    • -
    -

    Return value

    - -

    #EVENT:

    - - -
    -
    -
    -
    - - -EVENT:OnEventGeneric(EventFunction, EventClass, EventID) - -
    -
    - -

    Set a new listener for an SEVENTX event independent from a unit or a weapon.

    - -

    Parameters

    -
      -
    • - -

      #function EventFunction : -The function to be called when the event occurs for the unit.

      - -
    • -
    • - -

      Core.Base#BASE EventClass : -The self instance of the class for which the event is captured. When the event happens, the event process will be called in this class provided.

      - -
    • -
    • - -

      EventID :

      - -
    • -
    -

    Return value

    - -

    #EVENT:

    - - -
    -
    -
    -
    - - -EVENT:OnLandForTemplate(EventTemplate, EventFunction, EventClass) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      EventTemplate :

      - -
    • -
    • - -

      EventFunction :

      - -
    • -
    • - -

      EventClass :

      - -
    • -
    -
    -
    -
    -
    - - -EVENT:OnTakeOffForTemplate(EventTemplate, EventFunction, EventClass) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      EventTemplate :

      - -
    • -
    • - -

      EventFunction :

      - -
    • -
    • - -

      EventClass :

      - -
    • -
    -
    -
    -
    -
    - - -EVENT:RemoveAll(EventObject) - -
    -
    - -

    Clears all event subscriptions for a Base#BASE derived object.

    - -

    Parameter

    - -
    -
    -
    -
    - - -EVENT:RemoveEvent(EventClass, EventID) - -
    -
    - -

    Removes a subscription

    - -

    Parameters

    - -

    Return value

    - -

    #EVENT.Events:

    - - -
    -
    -
    -
    - - -EVENT:Reset(EventClass, EventID, EventObject) - -
    -
    - -

    Resets subscriptions

    - -

    Parameters

    - -

    Return value

    - -

    #EVENT.Events:

    - - -
    -
    -
    -
    - - -EVENT:onEvent(Event) - -
    -
    - - - -

    Parameter

    - -
    -
    - -

    Type EVENT.Events

    - -

    The Events structure

    - -

    Field(s)

    -
    -
    - - #number - -EVENT.Events.IniUnit - -
    -
    - - - -
    -
    - -

    Type EVENTDATA

    - -

    The Event structure -Note that at the beginning of each field description, there is an indication which field will be populated depending on the object type involved in the Event:

    - -
      -
    • A (Object.Category.)UNIT : A UNIT object type is involved in the Event.
    • -
    - - -
      -
    • A (Object.Category.)STATIC : A STATIC object type is involved in the Event.µ -
    • -
    - -

    Field(s)

    -
    -
    - - - -EVENTDATA.Cargo - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTDATA.CargoName - -
    -
    - - - -
    -
    -
    -
    - - Dcs.DCSUnit#Unit.Category - -EVENTDATA.IniCategory - -
    -
    - -

    (UNIT) The category of the initiator.

    - -
    -
    -
    -
    - - Dcs.DCScoalition#coalition.side - -EVENTDATA.IniCoalition - -
    -
    - -

    (UNIT) The coalition of the initiator.

    - -
    -
    -
    -
    - - Dcs.DCSGroup#Group - -EVENTDATA.IniDCSGroup - -
    -
    - -

    (UNIT) The initiating {DCSGroup#Group}.

    - -
    -
    -
    -
    - - #string - -EVENTDATA.IniDCSGroupName - -
    -
    - -

    (UNIT) The initiating Group name.

    - -
    -
    -
    -
    - - Dcs.DCSUnit#Unit - -EVENTDATA.IniDCSUnit - -
    -
    - -

    (UNIT/STATIC) The initiating DCSUnit#Unit or DCSStaticObject#StaticObject.

    - -
    -
    -
    -
    - - #string - -EVENTDATA.IniDCSUnitName - -
    -
    - -

    (UNIT/STATIC) The initiating Unit name.

    - -
    -
    -
    -
    - - Wrapper.Group#GROUP - -EVENTDATA.IniGroup - -
    -
    - -

    (UNIT) The initiating MOOSE wrapper Group#GROUP of the initiator Group object.

    - -
    -
    -
    -
    - - #string - -EVENTDATA.IniGroupName - -
    -
    - -

    UNIT) The initiating GROUP name (same as IniDCSGroupName).

    - -
    -
    -
    -
    - - Dcs.DCSObject#Object.Category - -EVENTDATA.IniObjectCategory - -
    -
    - -

    (UNIT/STATIC/SCENERY) The initiator object category ( Object.Category.UNIT or Object.Category.STATIC ).

    - -
    -
    -
    -
    - - #string - -EVENTDATA.IniPlayerName - -
    -
    - -

    (UNIT) The name of the initiating player in case the Unit is a client or player slot.

    - -
    -
    -
    -
    - - #string - -EVENTDATA.IniTypeName - -
    -
    - -

    (UNIT) The type name of the initiator.

    - - -
    -
    -
    -
    - - Wrapper.Unit#UNIT - -EVENTDATA.IniUnit - -
    -
    - -

    (UNIT/STATIC) The initiating MOOSE wrapper Unit#UNIT of the initiator Unit object.

    - -
    -
    -
    -
    - - #string - -EVENTDATA.IniUnitName - -
    -
    - -

    (UNIT/STATIC) The initiating UNIT name (same as IniDCSUnitName).

    - -
    -
    -
    -
    - - Dcs.DCSUnit#Unit.Category - -EVENTDATA.TgtCategory - -
    -
    - -

    (UNIT) The category of the target.

    - -
    -
    -
    -
    - - Dcs.DCScoalition#coalition.side - -EVENTDATA.TgtCoalition - -
    -
    - -

    (UNIT) The coalition of the target.

    - -
    -
    -
    -
    - - Dcs.DCSGroup#Group - -EVENTDATA.TgtDCSGroup - -
    -
    - -

    (UNIT) The target {DCSGroup#Group}.

    - -
    -
    -
    -
    - - #string - -EVENTDATA.TgtDCSGroupName - -
    -
    - -

    (UNIT) The target Group name.

    - -
    -
    -
    -
    - - Dcs.DCSUnit#Unit - -EVENTDATA.TgtDCSUnit - -
    -
    - -

    (UNIT/STATIC) The target DCSUnit#Unit or DCSStaticObject#StaticObject.

    - -
    -
    -
    -
    - - #string - -EVENTDATA.TgtDCSUnitName - -
    -
    - -

    (UNIT/STATIC) The target Unit name.

    - -
    -
    -
    -
    - - Wrapper.Group#GROUP - -EVENTDATA.TgtGroup - -
    -
    - -

    (UNIT) The target MOOSE wrapper Group#GROUP of the target Group object.

    - -
    -
    -
    -
    - - #string - -EVENTDATA.TgtGroupName - -
    -
    - -

    (UNIT) The target GROUP name (same as TgtDCSGroupName).

    - -
    -
    -
    -
    - - Dcs.DCSObject#Object.Category - -EVENTDATA.TgtObjectCategory - -
    -
    - -

    (UNIT/STATIC) The target object category ( Object.Category.UNIT or Object.Category.STATIC ).

    - -
    -
    -
    -
    - - #string - -EVENTDATA.TgtPlayerName - -
    -
    - -

    (UNIT) The name of the target player in case the Unit is a client or player slot.

    - -
    -
    -
    -
    - - #string - -EVENTDATA.TgtTypeName - -
    -
    - -

    (UNIT) The type name of the target.

    - - -
    -
    -
    -
    - - Wrapper.Unit#UNIT - -EVENTDATA.TgtUnit - -
    -
    - -

    (UNIT/STATIC) The target MOOSE wrapper Unit#UNIT of the target Unit object.

    - -
    -
    -
    -
    - - #string - -EVENTDATA.TgtUnitName - -
    -
    - -

    (UNIT/STATIC) The target UNIT name (same as TgtDCSUnitName).

    - -
    -
    -
    -
    - - -EVENTDATA.Weapon - -
    -
    - - - -
    -
    -
    -
    - - -EVENTDATA.WeaponCategory - -
    -
    - - - -
    -
    -
    -
    - - -EVENTDATA.WeaponCoalition - -
    -
    - - - -
    -
    -
    -
    - - -EVENTDATA.WeaponName - -
    -
    - - - -
    -
    -
    -
    - - -EVENTDATA.WeaponPlayerName - -
    -
    - - - -
    -
    -
    -
    - - -EVENTDATA.WeaponTgtDCSUnit - -
    -
    - - - -
    -
    -
    -
    - - -EVENTDATA.WeaponTypeName - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTDATA.WeaponUNIT - -
    -
    - - - - -

    Sometimes, the weapon is a player unit!

    - -
    -
    -
    -
    - - #number - -EVENTDATA.id - -
    -
    - -

    The identifier of the event.

    - - -
    -
    -
    -
    - - Dcs.DCSUnit#Unit - -EVENTDATA.initiator - -
    -
    - -

    (UNIT/STATIC/SCENERY) The initiating Dcs.DCSUnit#Unit or Dcs.DCSStaticObject#StaticObject.

    - -
    -
    -
    -
    - - Dcs.DCSUnit#Unit - -EVENTDATA.target - -
    -
    - -

    (UNIT/STATIC) The target Dcs.DCSUnit#Unit or DCSStaticObject#StaticObject.

    - -
    -
    -
    -
    - - -EVENTDATA.weapon - -
    -
    - -

    The weapon used during the event.

    - -
    -
    - -

    Type EVENTHANDLER

    - -

    The EVENTHANDLER structure

    - -

    Field(s)

    -
    -
    - - #number - -EVENTHANDLER.ClassID - -
    -
    - - - -
    -
    -
    -
    - - #string - -EVENTHANDLER.ClassName - -
    -
    - - - -
    -
    -
    -
    - - -EVENTHANDLER:New() - -
    -
    - -

    The EVENTHANDLER constructor

    - -

    Return value

    - -

    #EVENTHANDLER:

    - - -
    -
    - -

    Type EVENTS

    - -

    The different types of events supported by MOOSE.

    - - -

    Use this structure to subscribe to events using the Base#BASE.HandleEvent() method.

    - -

    Field(s)

    -
    -
    - - - -EVENTS.BaseCaptured - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTS.Birth - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTS.Crash - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTS.Dead - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTS.DeleteCargo - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTS.Ejection - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTS.EngineShutdown - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTS.EngineStartup - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTS.Hit - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTS.HumanFailure - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTS.Land - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTS.MissionEnd - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTS.MissionStart - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTS.NewCargo - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTS.PilotDead - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTS.PlayerComment - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTS.PlayerEnterUnit - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTS.PlayerLeaveUnit - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTS.Refueling - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTS.RefuelingStop - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTS.ShootingEnd - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTS.ShootingStart - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTS.Shot - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTS.Takeoff - -
    -
    - - - -
    -
    -
    -
    - - - -EVENTS.TookControl - -
    -
    - - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Fsm.html b/docs/Documentation/Fsm.html deleted file mode 100644 index 6263b0650..000000000 --- a/docs/Documentation/Fsm.html +++ /dev/null @@ -1,2882 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Fsm

    - -

    Core -- The FSM (Finite State Machine) class and derived FSM_ classes -are design patterns allowing efficient (long-lasting) processes and workflows.

    - - - -

    Banner Image

    - -
    - -

    A Finite State Machine (FSM) models a process flow that transitions between various States through triggered Events.

    - -

    A FSM can only be in one of a finite number of states. -The machine is in only one state at a time; the state it is in at any given time is called the current state. -It can change from one state to another when initiated by an internal or external triggering event, which is called a transition. -An FSM implementation is defined by a list of its states, its initial state, and the triggering events for each possible transition. -An FSM implementation is composed out of two parts, a set of state transition rules, and an implementation set of state transition handlers, implementing those transitions.

    - -

    The FSM class supports a hierarchical implementation of a Finite State Machine, -that is, it allows to embed existing FSM implementations in a master FSM. -FSM hierarchies allow for efficient FSM re-use, not having to re-invent the wheel every time again when designing complex processes.

    - -

    Workflow Example

    - -

    The above diagram shows a graphical representation of a FSM implementation for a Task, which guides a Human towards a Zone, -orders him to destroy x targets and account the results. -Other examples of ready made FSM could be:

    - -
      -
    • route a plane to a zone flown by a human
    • -
    • detect targets by an AI and report to humans
    • -
    • account for destroyed targets by human players
    • -
    • handle AI infantry to deploy from or embark to a helicopter or airplane or vehicle
    • -
    • let an AI patrol a zone
    • -
    - -

    The MOOSE framework uses extensively the FSM class and derived FSM_ classes, -because the goal of MOOSE is to simplify mission design complexity for mission building. -By efficiently utilizing the FSM class and derived classes, MOOSE allows mission designers to quickly build processes. -Ready made FSM-based implementations classes exist within the MOOSE framework that can easily be re-used, -and tailored by mission designers through the implementation of Transition Handlers. -Each of these FSM implementation classes start either with:

    - -
      -
    • an acronym AI_, which indicates an FSM implementation directing AI controlled GROUP and/or UNIT. These AI_ classes derive the #FSM_CONTROLLABLE class.
    • -
    • an acronym TASK_, which indicates an FSM implementation executing a TASK executed by Groups of players. These TASK_ classes derive the #FSM_TASK class.
    • -
    • an acronym ACT_, which indicates an Sub-FSM implementation, directing Humans actions that need to be done in a TASK, seated in a CLIENT (slot) or a UNIT (CA join). These ACT_ classes derive the #FSM_PROCESS class.
    • -
    - -

    Detailed explanations and API specifics are further below clarified and FSM derived class specifics are described in those class documentation sections.

    - -

    Dislaimer:

    -

    The FSM class development is based on a finite state machine implementation made by Conroy Kyle. -The state machine can be found on github -I've reworked this development (taken the concept), and created a hierarchical state machine out of it, embedded within the DCS simulator. -Additionally, I've added extendability and created an API that allows seamless FSM implementation.

    - -

    The following derived classes are available in the MOOSE framework, that implement a specialised form of a FSM:

    - - - -
    - - -

    Author: Sven Van de Velde (FlightControl)

    -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - - - - - - - - - - - - - - - - - -
    FSM -

    FSM class, extends Base#BASE

    - -

    A Finite State Machine (FSM) models a process flow that transitions between various States through triggered Events.

    -
    FSM_CONTROLLABLE -

    FSM_CONTROLLABLE, extends #FSM

    - -

    FSM_CONTROLLABLE class models Finite State Machines for Controllables, which are Groups, Units, Clients.

    -
    FSM_PROCESS -

    FSM_PROCESS, extends #FSM

    - -

    FSM_PROCESS class models Finite State Machines for Task actions, which control Clients.

    -
    FSM_SET -

    FSM_SET, extends #FSM

    - -

    FSM_SET class models Finite State Machines for Sets.

    -
    FSM_TASK -

    FSM_TASK, extends #FSM

    - -

    FSM_TASK class models Finite State Machines for Tasks.

    -
    -

    Type FSM

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FSM:AddEndState(State) -

    Adds an End state.

    -
    FSM:AddProcess(From, Event, Process, ReturnEvents) -

    Set the default Process template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Controllable by the task.

    -
    FSM:AddScore(State, ScoreText, Score) -

    Adds a score for the FSM to be achieved.

    -
    FSM:AddScoreProcess(From, Event, State, ScoreText, Score) -

    Adds a score for the FSM_PROCESS to be achieved.

    -
    FSM:AddTransition(From, Event, To) -

    Add a new transition rule to the FSM.

    -
    FSM.CallScheduler - -
    FSM.Events - -
    FSM:GetEndStates() -

    Returns the End states.

    -
    FSM:GetProcess(From, Event) - -
    FSM:GetProcesses() -

    Returns a table of the SubFSM rules defined within the FSM.

    -
    FSM:GetScores() -

    Returns a table with the scores defined.

    -
    FSM:GetStartState() -

    Returns the start state of the FSM.

    -
    FSM:GetState() - -
    FSM:GetSubs() -

    Returns a table with the Subs defined.

    -
    FSM:GetTransitions() -

    Returns a table of the transition rules defined within the FSM.

    -
    FSM:Is(State) - -
    FSM:LoadCallBacks(CallBackTable) - -
    FSM:New(FsmT) -

    Creates a new FSM object.

    -
    FSM.Scores - -
    FSM:SetStartState(State) -

    Sets the start state of the FSM.

    -
    FSM._EndStates - -
    FSM._EventSchedules - -
    FSM._Processes - -
    FSM._Scores - -
    FSM._StartState - -
    FSM._Transitions - -
    FSM:_add_to_map(Map, Event) - -
    FSM:_call_handler(handler, params, EventName) - -
    FSM:_create_transition(EventName) - -
    FSM:_delayed_transition(EventName) - -
    FSM:_eventmap(Events, EventStructure) - -
    FSM:_gosub(ParentFrom, ParentEvent) - -
    FSM:_handler(EventName, ...) - -
    FSM:_isendstate(Current) - -
    FSM:_submap(subs, sub, name) - -
    FSM:can(e) - -
    FSM:cannot(e) - -
    FSM.current - -
    FSM.endstates - -
    FSM:is(state) - -
    FSM.options - -
    FSM.subs - -
    - -

    Type FSM_CONTROLLABLE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FSM_CONTROLLABLE.Controllable - -
    FSM_CONTROLLABLE:GetControllable() -

    Gets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

    -
    FSM_CONTROLLABLE:New(FSMT, Controllable) -

    Creates a new FSM_CONTROLLABLE object.

    -
    FSM_CONTROLLABLE:OnAfterStop(Controllable, From, Event, To) -

    OnAfter Transition Handler for Event Stop.

    -
    FSM_CONTROLLABLE:OnBeforeStop(Controllable, From, Event, To) -

    OnBefore Transition Handler for Event Stop.

    -
    FSM_CONTROLLABLE:OnEnterStopped(Controllable, From, Event, To) -

    OnEnter Transition Handler for State Stopped.

    -
    FSM_CONTROLLABLE:OnLeaveStopped(Controllable, From, Event, To) -

    OnLeave Transition Handler for State Stopped.

    -
    FSM_CONTROLLABLE:SetControllable(FSMControllable) -

    Sets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

    -
    FSM_CONTROLLABLE:Stop() -

    Synchronous Event Trigger for Event Stop.

    -
    FSM_CONTROLLABLE:__Stop(Delay) -

    Asynchronous Event Trigger for Event Stop.

    -
    FSM_CONTROLLABLE:_call_handler(handler, params, EventName) - -
    - -

    Type FSM_PROCESS

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FSM_PROCESS:Assign(Task, ProcessUnit) -

    Assign the process to a Unit and activate the process.

    -
    FSM_PROCESS:Copy(Controllable, Task) -

    Creates a new FSMPROCESS object based on this FSMPROCESS.

    -
    FSM_PROCESS:GetCommandCenter() -

    Gets the mission of the process.

    -
    FSM_PROCESS:GetMission() -

    Gets the mission of the process.

    -
    FSM_PROCESS:GetTask() -

    Gets the task of the process.

    -
    FSM_PROCESS:Init(FsmProcess) - -
    FSM_PROCESS:Message(Message) -

    Send a message of the Task to the Group of the Unit.

    -
    FSM_PROCESS:New(Controllable, Task) -

    Creates a new FSM_PROCESS object.

    -
    FSM_PROCESS:Remove() -

    Removes an FSM_PROCESS object.

    -
    FSM_PROCESS:SetTask(Task) -

    Sets the task of the process.

    -
    FSM_PROCESS.Task - -
    FSM_PROCESS:_call_handler(handler, params, EventName) - -
    FSM_PROCESS:onenterAssigned(ProcessUnit) - -
    FSM_PROCESS:onenterFailed(ProcessUnit) - -
    FSM_PROCESS:onstatechange(ProcessUnit, Event, From, To, Task, Dummy) -

    StateMachine callback function for a FSM_PROCESS

    -
    - -

    Type FSM_SET

    - - - - - - - - - - - - - - - - - -
    FSM_SET:Get() -

    Gets the SETBASE object that the FSMSET governs.

    -
    FSM_SET:New(FSMT, Set_SET_BASE, FSMSet) -

    Creates a new FSM_SET object.

    -
    FSM_SET.Set - -
    FSM_SET:_call_handler(handler, params, EventName) - -
    - -

    Type FSM_TASK

    - - - - - - - - - - - - - -
    FSM_TASK:New(FSMT, Task, TaskUnit) -

    Creates a new FSM_TASK object.

    -
    FSM_TASK.Task - -
    FSM_TASK:_call_handler(handler, params, EventName) - -
    - -

    Global(s)

    -
    -
    - - #FSM - -FSM - -
    -
    - -

    FSM class, extends Base#BASE

    - -

    A Finite State Machine (FSM) models a process flow that transitions between various States through triggered Events.

    - - - -

    A FSM can only be in one of a finite number of states. -The machine is in only one state at a time; the state it is in at any given time is called the current state. -It can change from one state to another when initiated by an internal or external triggering event, which is called a transition. -An FSM implementation is defined by a list of its states, its initial state, and the triggering events for each possible transition. -An FSM implementation is composed out of two parts, a set of state transition rules, and an implementation set of state transition handlers, implementing those transitions.

    - -

    The FSM class supports a hierarchical implementation of a Finite State Machine, -that is, it allows to embed existing FSM implementations in a master FSM. -FSM hierarchies allow for efficient FSM re-use, not having to re-invent the wheel every time again when designing complex processes.

    - -

    Workflow Example

    - -

    The above diagram shows a graphical representation of a FSM implementation for a Task, which guides a Human towards a Zone, -orders him to destroy x targets and account the results. -Other examples of ready made FSM could be:

    - -
      -
    • route a plane to a zone flown by a human
    • -
    • detect targets by an AI and report to humans
    • -
    • account for destroyed targets by human players
    • -
    • handle AI infantry to deploy from or embark to a helicopter or airplane or vehicle
    • -
    • let an AI patrol a zone
    • -
    - -

    The MOOSE framework uses extensively the FSM class and derived FSM_ classes, -because the goal of MOOSE is to simplify mission design complexity for mission building. -By efficiently utilizing the FSM class and derived classes, MOOSE allows mission designers to quickly build processes. -Ready made FSM-based implementations classes exist within the MOOSE framework that can easily be re-used, -and tailored by mission designers through the implementation of Transition Handlers. -Each of these FSM implementation classes start either with:

    - -
      -
    • an acronym AI_, which indicates an FSM implementation directing AI controlled GROUP and/or UNIT. These AI_ classes derive the #FSM_CONTROLLABLE class.
    • -
    • an acronym TASK_, which indicates an FSM implementation executing a TASK executed by Groups of players. These TASK_ classes derive the #FSM_TASK class.
    • -
    • an acronym ACT_, which indicates an Sub-FSM implementation, directing Humans actions that need to be done in a TASK, seated in a CLIENT (slot) or a UNIT (CA join). These ACT_ classes derive the #FSM_PROCESS class.
    • -
    - -

    Transition Rules and Transition Handlers and Event Triggers

    - -

    The FSM class is the base class of all FSM_ derived classes. It implements the main functionality to define and execute Finite State Machines. -The derived FSM_ classes extend the Finite State Machine functionality to run a workflow process for a specific purpose or component.

    - -

    Finite State Machines have Transition Rules, Transition Handlers and Event Triggers.

    - -

    The Transition Rules define the "Process Flow Boundaries", that is, -the path that can be followed hopping from state to state upon triggered events. -If an event is triggered, and there is no valid path found for that event, -an error will be raised and the FSM will stop functioning.

    - -

    The Transition Handlers are special methods that can be defined by the mission designer, following a defined syntax. -If the FSM object finds a method of such a handler, then the method will be called by the FSM, passing specific parameters. -The method can then define its own custom logic to implement the FSM workflow, and to conduct other actions.

    - -

    The Event Triggers are methods that are defined by the FSM, which the mission designer can use to implement the workflow. -Most of the time, these Event Triggers are used within the Transition Handler methods, so that a workflow is created running through the state machine.

    - -

    As explained above, a FSM supports Linear State Transitions and Hierarchical State Transitions, and both can be mixed to make a comprehensive FSM implementation. -The below documentation has a seperate chapter explaining both transition modes, taking into account the Transition Rules, Transition Handlers and Event Triggers.

    - -

    FSM Linear Transitions

    - -

    Linear Transitions are Transition Rules allowing an FSM to transition from one or multiple possible From state(s) towards a To state upon a Triggered Event. -The Lineair transition rule evaluation will always be done from the current state of the FSM. -If no valid Transition Rule can be found in the FSM, the FSM will log an error and stop.

    - -

    FSM Transition Rules

    - -

    The FSM has transition rules that it follows and validates, as it walks the process. -These rules define when an FSM can transition from a specific state towards an other specific state upon a triggered event.

    - -

    The method FSM.AddTransition() specifies a new possible Transition Rule for the FSM.

    - -

    The initial state can be defined using the method FSM.SetStartState(). The default start state of an FSM is "None".

    - -

    Find below an example of a Linear Transition Rule definition for an FSM.

    - -
     local Fsm3Switch = FSM:New() -- #FsmDemo
    - FsmSwitch:SetStartState( "Off" )
    - FsmSwitch:AddTransition( "Off", "SwitchOn", "On" )
    - FsmSwitch:AddTransition( "Off", "SwitchMiddle", "Middle" )
    - FsmSwitch:AddTransition( "On", "SwitchOff", "Off" )
    - FsmSwitch:AddTransition( "Middle", "SwitchOff", "Off" )
    -
    - -

    The above code snippet models a 3-way switch Linear Transition:

    - -
      -
    • It can be switched On by triggering event SwitchOn.
    • -
    • It can be switched to the Middle position, by triggering event SwitchMiddle.
    • -
    • It can be switched Off by triggering event SwitchOff.
    • -
    • Note that once the Switch is On or Middle, it can only be switched Off.
    • -
    - -

    Some additional comments:

    - -

    Note that Linear Transition Rules can be declared in a few variations:

    - -
      -
    • The From states can be a table of strings, indicating that the transition rule will be valid if the current state of the FSM will be one of the given From states.
    • -
    • The From state can be a "*", indicating that the transition rule will always be valid, regardless of the current state of the FSM.
    • -
    - -

    The below code snippet shows how the two last lines can be rewritten and consensed.

    - -
     FsmSwitch:AddTransition( { "On",  "Middle" }, "SwitchOff", "Off" )
    -
    - -

    Transition Handling

    - -

    Transition Handlers

    - -

    An FSM transitions in 4 moments when an Event is being triggered and processed.
    -The mission designer can define for each moment specific logic within methods implementations following a defined API syntax.
    -These methods define the flow of the FSM process; because in those methods the FSM Internal Events will be triggered.

    - -
      -
    • To handle State transition moments, create methods starting with OnLeave or OnEnter concatenated with the State name.
    • -
    • To handle Event transition moments, create methods starting with OnBefore or OnAfter concatenated with the Event name.
    • -
    - -

    The OnLeave and OnBefore transition methods may return false, which will cancel the transition!

    - -

    Transition Handler methods need to follow the above specified naming convention, but are also passed parameters from the FSM. -These parameters are on the correct order: From, Event, To:

    - -
      -
    • From = A string containing the From state.
    • -
    • Event = A string containing the Event name that was triggered.
    • -
    • To = A string containing the To state.
    • -
    - -

    On top, each of these methods can have a variable amount of parameters passed. See the example in section 1.1.3.

    - -

    Event Triggers

    - -

    Event Triggers

    - -

    The FSM creates for each Event two Event Trigger methods.
    -There are two modes how Events can be triggered, which is synchronous and asynchronous:

    - -
      -
    • The method FSM:Event() triggers an Event that will be processed synchronously or immediately.
    • -
    • The method FSM:Event( __seconds ) triggers an Event that will be processed asynchronously over time, waiting x seconds.
    • -
    - -

    The destinction between these 2 Event Trigger methods are important to understand. An asynchronous call will "log" the Event Trigger to be executed at a later time. -Processing will just continue. Synchronous Event Trigger methods are useful to change states of the FSM immediately, but may have a larger processing impact.

    - -

    The following example provides a little demonstration on the difference between synchronous and asynchronous Event Triggering.

    - -
      function FSM:OnAfterEvent( From, Event, To, Amount )
    -    self:T( { Amount = Amount } ) 
    -  end
    -
    -  local Amount = 1
    -  FSM:__Event( 5, Amount ) 
    -
    -  Amount = Amount + 1
    -  FSM:Event( Text, Amount )
    -
    - -

    In this example, the :OnAfterEvent() Transition Handler implementation will get called when Event is being triggered. -Before we go into more detail, let's look at the last 4 lines of the example. -The last line triggers synchronously the Event, and passes Amount as a parameter. -The 3rd last line of the example triggers asynchronously Event. -Event will be processed after 5 seconds, and Amount is given as a parameter.

    - -

    The output of this little code fragment will be:

    - -
      -
    • Amount = 2
    • -
    • Amount = 2
    • -
    - -

    Because ... When Event was asynchronously processed after 5 seconds, Amount was set to 2. So be careful when processing and passing values and objects in asynchronous processing!

    - -

    Linear Transition Example

    - -

    This example is fully implemented in the MOOSE test mission on GITHUB: FSM-100 - Transition Explanation

    - -

    It models a unit standing still near Batumi, and flaring every 5 seconds while switching between a Green flare and a Red flare. -The purpose of this example is not to show how exciting flaring is, but it demonstrates how a Linear Transition FSM can be build. -Have a look at the source code. The source code is also further explained below in this section.

    - -

    The example creates a new FsmDemo object from class FSM. -It will set the start state of FsmDemo to state Green. -Two Linear Transition Rules are created, where upon the event Switch, -the FsmDemo will transition from state Green to Red and from Red back to Green.

    - -

    Transition Example

    - -
     local FsmDemo = FSM:New() -- #FsmDemo
    - FsmDemo:SetStartState( "Green" )
    - FsmDemo:AddTransition( "Green", "Switch", "Red" )
    - FsmDemo:AddTransition( "Red", "Switch", "Green" )
    -
    - -

    In the above example, the FsmDemo could flare every 5 seconds a Green or a Red flare into the air. -The next code implements this through the event handling method OnAfterSwitch.

    - -

    Transition Flow

    - -
     function FsmDemo:OnAfterSwitch( From, Event, To, FsmUnit )
    -   self:T( { From, Event, To, FsmUnit } )
    -
    -   if From == "Green" then
    -     FsmUnit:Flare(FLARECOLOR.Green)
    -   else
    -     if From == "Red" then
    -       FsmUnit:Flare(FLARECOLOR.Red)
    -     end
    -   end
    -   self:__Switch( 5, FsmUnit ) -- Trigger the next Switch event to happen in 5 seconds.
    - end
    -
    - FsmDemo:__Switch( 5, FsmUnit ) -- Trigger the first Switch event to happen in 5 seconds.
    -
    - -

    The OnAfterSwitch implements a loop. The last line of the code fragment triggers the Switch Event within 5 seconds. -Upon the event execution (after 5 seconds), the OnAfterSwitch method is called of FsmDemo (cfr. the double point notation!!! ":"). -The OnAfterSwitch method receives from the FSM the 3 transition parameter details ( From, Event, To ), -and one additional parameter that was given when the event was triggered, which is in this case the Unit that is used within OnSwitchAfter.

    - -
     function FsmDemo:OnAfterSwitch( From, Event, To, FsmUnit )
    -
    - -

    For debugging reasons the received parameters are traced within the DCS.log.

    - -
        self:T( { From, Event, To, FsmUnit } )
    -
    - -

    The method will check if the From state received is either "Green" or "Red" and will flare the respective color from the FsmUnit.

    - -
       if From == "Green" then
    -     FsmUnit:Flare(FLARECOLOR.Green)
    -   else
    -     if From == "Red" then
    -       FsmUnit:Flare(FLARECOLOR.Red)
    -     end
    -   end
    -
    - -

    It is important that the Switch event is again triggered, otherwise, the FsmDemo would stop working after having the first Event being handled.

    - -
       FsmDemo:__Switch( 5, FsmUnit ) -- Trigger the next Switch event to happen in 5 seconds.
    -
    - -

    The below code fragment extends the FsmDemo, demonstrating multiple From states declared as a table, adding a Linear Transition Rule. -The new event Stop will cancel the Switching process. -The transition for event Stop can be executed if the current state of the FSM is either "Red" or "Green".

    - -
     local FsmDemo = FSM:New() -- #FsmDemo
    - FsmDemo:SetStartState( "Green" )
    - FsmDemo:AddTransition( "Green", "Switch", "Red" )
    - FsmDemo:AddTransition( "Red", "Switch", "Green" )
    - FsmDemo:AddTransition( { "Red", "Green" }, "Stop", "Stopped" )
    -
    - -

    The transition for event Stop can also be simplified, as any current state of the FSM is valid.

    - -
     FsmDemo:AddTransition( "*", "Stop", "Stopped" )
    -
    - -

    So... When FsmDemo:Stop() is being triggered, the state of FsmDemo will transition from Red or Green to Stopped. -And there is no transition handling method defined for that transition, thus, no new event is being triggered causing the FsmDemo process flow to halt.

    - -

    FSM Hierarchical Transitions

    - -

    Hierarchical Transitions allow to re-use readily available and implemented FSMs. -This becomes in very useful for mission building, where mission designers build complex processes and workflows, -combining smaller FSMs to one single FSM.

    - -

    The FSM can embed Sub-FSMs that will execute and return multiple possible Return (End) States.
    -Depending upon which state is returned, the main FSM can continue the flow triggering specific events.

    - -

    The method FSM.AddProcess() adds a new Sub-FSM to the FSM.

    - -
    - - -
    -
    -
    -
    - - #FSM_CONTROLLABLE - -FSM_CONTROLLABLE - -
    -
    - -

    FSM_CONTROLLABLE, extends #FSM

    - -

    FSM_CONTROLLABLE class models Finite State Machines for Controllables, which are Groups, Units, Clients.

    - - - -
    - - -
    -
    -
    -
    - - #FSM_PROCESS - -FSM_PROCESS - -
    -
    - -

    FSM_PROCESS, extends #FSM

    - -

    FSM_PROCESS class models Finite State Machines for Task actions, which control Clients.

    - - - -
    - - -
    -
    -
    -
    - - #FSM_SET - -FSM_SET - -
    -
    - -

    FSM_SET, extends #FSM

    - -

    FSM_SET class models Finite State Machines for Sets.

    - - -

    Note that these FSMs control multiple objects!!! So State concerns here -for multiple objects or the position of the state machine in the process.

    - -
    - - -
    -
    -
    -
    - - #FSM_TASK - -FSM_TASK - -
    -
    - -

    FSM_TASK, extends #FSM

    - -

    FSM_TASK class models Finite State Machines for Tasks.

    - - - -
    - - -
    -
    -

    Type Fsm

    - -

    Type FSM

    -

    Field(s)

    -
    -
    - - -FSM:AddEndState(State) - -
    -
    - -

    Adds an End state.

    - -

    Parameter

    -
      -
    • - -

      State :

      - -
    • -
    -
    -
    -
    -
    - - -FSM:AddProcess(From, Event, Process, ReturnEvents) - -
    -
    - -

    Set the default Process template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Controllable by the task.

    - -

    Parameters

    -
      -
    • - -

      #table From : -Can contain a string indicating the From state or a table of strings containing multiple From states.

      - -
    • -
    • - -

      #string Event : -The Event name.

      - -
    • -
    • - -

      Core.Fsm#FSM_PROCESS Process : -An sub-process FSM.

      - -
    • -
    • - -

      #table ReturnEvents : -A table indicating for which returned events of the SubFSM which Event must be triggered in the FSM.

      - -
    • -
    -

    Return value

    - -

    Core.Fsm#FSM_PROCESS: -The SubFSM.

    - -
    -
    -
    -
    - - -FSM:AddScore(State, ScoreText, Score) - -
    -
    - -

    Adds a score for the FSM to be achieved.

    - -

    Parameters

    -
      -
    • - -

      #string State : -is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).

      - -
    • -
    • - -

      #string ScoreText : -is a text describing the score that is given according the status.

      - -
    • -
    • - -

      #number Score : -is a number providing the score of the status.

      - -
    • -
    -

    Return value

    - -

    #FSM: -self

    - -
    -
    -
    -
    - - -FSM:AddScoreProcess(From, Event, State, ScoreText, Score) - -
    -
    - -

    Adds a score for the FSM_PROCESS to be achieved.

    - -

    Parameters

    -
      -
    • - -

      #string From : -is the From State of the main process.

      - -
    • -
    • - -

      #string Event : -is the Event of the main process.

      - -
    • -
    • - -

      #string State : -is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).

      - -
    • -
    • - -

      #string ScoreText : -is a text describing the score that is given according the status.

      - -
    • -
    • - -

      #number Score : -is a number providing the score of the status.

      - -
    • -
    -

    Return value

    - -

    #FSM: -self

    - -
    -
    -
    -
    - - -FSM:AddTransition(From, Event, To) - -
    -
    - -

    Add a new transition rule to the FSM.

    - - -

    A transition rule defines when and if the FSM can transition from a state towards another state upon a triggered event.

    - -

    Parameters

    -
      -
    • - -

      #table From : -Can contain a string indicating the From state or a table of strings containing multiple From states.

      - -
    • -
    • - -

      #string Event : -The Event name.

      - -
    • -
    • - -

      #string To : -The To state.

      - -
    • -
    -
    -
    -
    -
    - - - -FSM.CallScheduler - -
    -
    - - - -
    -
    -
    -
    - - - -FSM.Events - -
    -
    - - - -
    -
    -
    -
    - - -FSM:GetEndStates() - -
    -
    - -

    Returns the End states.

    - -
    -
    -
    -
    - - -FSM:GetProcess(From, Event) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    -
    -
    -
    -
    - - -FSM:GetProcesses() - -
    -
    - -

    Returns a table of the SubFSM rules defined within the FSM.

    - -

    Return value

    - -

    #table:

    - - -
    -
    -
    -
    - - -FSM:GetScores() - -
    -
    - -

    Returns a table with the scores defined.

    - -
    -
    -
    -
    - - -FSM:GetStartState() - -
    -
    - -

    Returns the start state of the FSM.

    - -

    Return value

    - -

    #string: -A string containing the start state.

    - -
    -
    -
    -
    - - -FSM:GetState() - -
    -
    - - - -
    -
    -
    -
    - - -FSM:GetSubs() - -
    -
    - -

    Returns a table with the Subs defined.

    - -
    -
    -
    -
    - - -FSM:GetTransitions() - -
    -
    - -

    Returns a table of the transition rules defined within the FSM.

    - -

    Return value

    - -

    #table:

    - - -
    -
    -
    -
    - - -FSM:Is(State) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      State :

      - -
    • -
    -
    -
    -
    -
    - - -FSM:LoadCallBacks(CallBackTable) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      CallBackTable :

      - -
    • -
    -
    -
    -
    -
    - - -FSM:New(FsmT) - -
    -
    - -

    Creates a new FSM object.

    - -

    Parameter

    -
      -
    • - -

      FsmT :

      - -
    • -
    -

    Return value

    - -

    #FSM:

    - - -
    -
    -
    -
    - - - -FSM.Scores - -
    -
    - - - -
    -
    -
    -
    - - -FSM:SetStartState(State) - -
    -
    - -

    Sets the start state of the FSM.

    - -

    Parameter

    -
      -
    • - -

      #string State : -A string defining the start state.

      - -
    • -
    -
    -
    -
    -
    - - - -FSM._EndStates - -
    -
    - - - -
    -
    -
    -
    - - - -FSM._EventSchedules - -
    -
    - - - -
    -
    -
    -
    - - - -FSM._Processes - -
    -
    - - - -
    -
    -
    -
    - - - -FSM._Scores - -
    -
    - - - -
    -
    -
    -
    - - - -FSM._StartState - -
    -
    - - - -
    -
    -
    -
    - - - -FSM._Transitions - -
    -
    - - - -
    -
    -
    -
    - - -FSM:_add_to_map(Map, Event) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Map :

      - -
    • -
    • - -

      Event :

      - -
    • -
    -
    -
    -
    -
    - - -FSM:_call_handler(handler, params, EventName) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      handler :

      - -
    • -
    • - -

      params :

      - -
    • -
    • - -

      EventName :

      - -
    • -
    -
    -
    -
    -
    - - -FSM:_create_transition(EventName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      EventName :

      - -
    • -
    -
    -
    -
    -
    - - -FSM:_delayed_transition(EventName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      EventName :

      - -
    • -
    -
    -
    -
    -
    - - -FSM:_eventmap(Events, EventStructure) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Events :

      - -
    • -
    • - -

      EventStructure :

      - -
    • -
    -
    -
    -
    -
    - - -FSM:_gosub(ParentFrom, ParentEvent) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      ParentFrom :

      - -
    • -
    • - -

      ParentEvent :

      - -
    • -
    -
    -
    -
    -
    - - -FSM:_handler(EventName, ...) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      EventName :

      - -
    • -
    • - -

      ... :

      - -
    • -
    -
    -
    -
    -
    - - -FSM:_isendstate(Current) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      Current :

      - -
    • -
    -
    -
    -
    -
    - - -FSM:_submap(subs, sub, name) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      subs :

      - -
    • -
    • - -

      sub :

      - -
    • -
    • - -

      name :

      - -
    • -
    -
    -
    -
    -
    - - -FSM:can(e) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      e :

      - -
    • -
    -
    -
    -
    -
    - - -FSM:cannot(e) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      e :

      - -
    • -
    -
    -
    -
    -
    - - - -FSM.current - -
    -
    - - - -
    -
    -
    -
    - - - -FSM.endstates - -
    -
    - - - -
    -
    -
    -
    - - -FSM:is(state) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      state :

      - -
    • -
    -
    -
    -
    -
    - - -FSM.options - -
    -
    - - - -
    -
    -
    -
    - - - -FSM.subs - -
    -
    - - - -
    -
    - -

    Type FSM_CONTROLLABLE

    -

    Field(s)

    -
    -
    - - Wrapper.Controllable#CONTROLLABLE - -FSM_CONTROLLABLE.Controllable - -
    -
    - - - -
    -
    -
    -
    - - -FSM_CONTROLLABLE:GetControllable() - -
    -
    - -

    Gets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

    - -

    Return value

    - -

    Wrapper.Controllable#CONTROLLABLE:

    - - -
    -
    -
    -
    - - -FSM_CONTROLLABLE:New(FSMT, Controllable) - -
    -
    - -

    Creates a new FSM_CONTROLLABLE object.

    - -

    Parameters

    -
      -
    • - -

      #table FSMT : -Finite State Machine Table

      - -
    • -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -(optional) The CONTROLLABLE object that the FSM_CONTROLLABLE governs.

      - -
    • -
    -

    Return value

    - -

    #FSM_CONTROLLABLE:

    - - -
    -
    -
    -
    - - -FSM_CONTROLLABLE:OnAfterStop(Controllable, From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Stop.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -FSM_CONTROLLABLE:OnBeforeStop(Controllable, From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Stop.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -FSM_CONTROLLABLE:OnEnterStopped(Controllable, From, Event, To) - -
    -
    - -

    OnEnter Transition Handler for State Stopped.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -FSM_CONTROLLABLE:OnLeaveStopped(Controllable, From, Event, To) - -
    -
    - -

    OnLeave Transition Handler for State Stopped.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

      - -
    • -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -FSM_CONTROLLABLE:SetControllable(FSMControllable) - -
    -
    - -

    Sets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

    - -

    Parameter

    - -

    Return value

    - -

    #FSM_CONTROLLABLE:

    - - -
    -
    -
    -
    - - -FSM_CONTROLLABLE:Stop() - -
    -
    - -

    Synchronous Event Trigger for Event Stop.

    - -
    -
    -
    -
    - - -FSM_CONTROLLABLE:__Stop(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Stop.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -FSM_CONTROLLABLE:_call_handler(handler, params, EventName) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      handler :

      - -
    • -
    • - -

      params :

      - -
    • -
    • - -

      EventName :

      - -
    • -
    -
    -
    - -

    Type FSM_PROCESS

    -

    Field(s)

    -
    -
    - - -FSM_PROCESS:Assign(Task, ProcessUnit) - -
    -
    - -

    Assign the process to a Unit and activate the process.

    - -

    Parameters

    - -

    Return value

    - -

    #FSM_PROCESS: -self

    - -
    -
    -
    -
    - - -FSM_PROCESS:Copy(Controllable, Task) - -
    -
    - -

    Creates a new FSMPROCESS object based on this FSMPROCESS.

    - -

    Parameters

    -
      -
    • - -

      Controllable :

      - -
    • -
    • - -

      Task :

      - -
    • -
    -

    Return value

    - -

    #FSM_PROCESS:

    - - -
    -
    -
    -
    - - -FSM_PROCESS:GetCommandCenter() - -
    -
    - -

    Gets the mission of the process.

    - -

    Return value

    - -

    Tasking.CommandCenter#COMMANDCENTER:

    - - -
    -
    -
    -
    - - -FSM_PROCESS:GetMission() - -
    -
    - -

    Gets the mission of the process.

    - -

    Return value

    - -

    Tasking.Mission#MISSION:

    - - -
    -
    -
    -
    - - -FSM_PROCESS:GetTask() - -
    -
    - -

    Gets the task of the process.

    - -

    Return value

    - -

    Tasking.Task#TASK:

    - - -
    -
    -
    -
    - - -FSM_PROCESS:Init(FsmProcess) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      FsmProcess :

      - -
    • -
    -
    -
    -
    -
    - - -FSM_PROCESS:Message(Message) - -
    -
    - -

    Send a message of the Task to the Group of the Unit.

    - -

    Parameter

    -
      -
    • - -

      Message :

      - -
    • -
    -
    -
    -
    -
    - - -FSM_PROCESS:New(Controllable, Task) - -
    -
    - -

    Creates a new FSM_PROCESS object.

    - -

    Parameters

    -
      -
    • - -

      Controllable :

      - -
    • -
    • - -

      Task :

      - -
    • -
    -

    Return value

    - -

    #FSM_PROCESS:

    - - -
    -
    -
    -
    - - -FSM_PROCESS:Remove() - -
    -
    - -

    Removes an FSM_PROCESS object.

    - -

    Return value

    - -

    #FSM_PROCESS:

    - - -
    -
    -
    -
    - - -FSM_PROCESS:SetTask(Task) - -
    -
    - -

    Sets the task of the process.

    - -

    Parameter

    - -

    Return value

    - -

    #FSM_PROCESS:

    - - -
    -
    -
    -
    - - Tasking.Task#TASK - -FSM_PROCESS.Task - -
    -
    - - - -
    -
    -
    -
    - - -FSM_PROCESS:_call_handler(handler, params, EventName) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      handler :

      - -
    • -
    • - -

      params :

      - -
    • -
    • - -

      EventName :

      - -
    • -
    -
    -
    -
    -
    - - -FSM_PROCESS:onenterAssigned(ProcessUnit) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      ProcessUnit :

      - -
    • -
    -
    -
    -
    -
    - - -FSM_PROCESS:onenterFailed(ProcessUnit) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      ProcessUnit :

      - -
    • -
    -
    -
    -
    -
    - - -FSM_PROCESS:onstatechange(ProcessUnit, Event, From, To, Task, Dummy) - -
    -
    - -

    StateMachine callback function for a FSM_PROCESS

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Controllable#CONTROLLABLE ProcessUnit :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      Task :

      - -
    • -
    • - -

      Dummy :

      - -
    • -
    -
    -
    - -

    Type FSM_SET

    - -

    FSM_SET class

    - -

    Field(s)

    -
    -
    - - -FSM_SET:Get() - -
    -
    - -

    Gets the SETBASE object that the FSMSET governs.

    - -

    Return value

    - -

    Core.Set#SET_BASE:

    - - -
    -
    -
    -
    - - -FSM_SET:New(FSMT, Set_SET_BASE, FSMSet) - -
    -
    - -

    Creates a new FSM_SET object.

    - -

    Parameters

    -
      -
    • - -

      #table FSMT : -Finite State Machine Table

      - -
    • -
    • - -

      SetSETBASE : -FSMSet (optional) The Set object that the FSM_SET governs.

      - -
    • -
    • - -

      FSMSet :

      - -
    • -
    -

    Return value

    - -

    #FSM_SET:

    - - -
    -
    -
    -
    - - Core.Set#SET_BASE - -FSM_SET.Set - -
    -
    - - - -
    -
    -
    -
    - - -FSM_SET:_call_handler(handler, params, EventName) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      handler :

      - -
    • -
    • - -

      params :

      - -
    • -
    • - -

      EventName :

      - -
    • -
    -
    -
    - -

    Type FSM_TASK

    - -

    FSM_TASK class

    - -

    Field(s)

    -
    -
    - - -FSM_TASK:New(FSMT, Task, TaskUnit) - -
    -
    - -

    Creates a new FSM_TASK object.

    - -

    Parameters

    - -

    Return value

    - -

    #FSM_TASK:

    - - -
    -
    -
    -
    - - Tasking.Task#TASK - -FSM_TASK.Task - -
    -
    - - - -
    -
    -
    -
    - - -FSM_TASK:_call_handler(handler, params, EventName) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      handler :

      - -
    • -
    • - -

      params :

      - -
    • -
    • - -

      EventName :

      - -
    • -
    -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Goal.html b/docs/Documentation/Goal.html deleted file mode 100644 index 2ce5c04d5..000000000 --- a/docs/Documentation/Goal.html +++ /dev/null @@ -1,589 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Goal

    - -

    Core (WIP) -- Base class to allow the modeling of processes to achieve Goals.

    - - - -
    - -

    GOAL models processes that have an objective with a defined achievement. Derived classes implement the ways how the achievements can be realized.

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -
    - - -

    Global(s)

    - - - - - -
    GOAL -

    GOAL class, extends Fsm#FSM

    - -

    GOAL models processes that have an objective with a defined achievement.

    -
    -

    Type GOAL

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    GOAL:Achieved() -

    Achieved Trigger for GOAL

    -
    GOAL:AddPlayerContribution(PlayerName) - -
    GOAL:GetPlayerContribution(Player, PlayerName) - -
    GOAL:GetPlayerContributions() - -
    GOAL:GetTotalContributions() - -
    GOAL:IsAchieved() - -
    GOAL:New() -

    GOAL Constructor.

    -
    GOAL:OnAfterAchieved(From, Event, To) -

    Achieved Handler OnAfter for GOAL

    -
    GOAL:OnBeforeAchieved(From, Event, To) -

    Achieved Handler OnBefore for GOAL

    -
    GOAL:OnEnterAchieved(From, Event, To) -

    Achieved State Handler OnEnter for GOAL

    -
    GOAL:OnLeaveAchieved(From, Event, To) -

    Achieved State Handler OnLeave for GOAL

    -
    GOAL.Players - -
    GOAL.TotalContributions - -
    GOAL:__Achieved(Delay) -

    Achieved Asynchronous Trigger for GOAL

    -
    - -

    Global(s)

    -
    -
    - - #GOAL - -GOAL - -
    -
    - -

    GOAL class, extends Fsm#FSM

    - -

    GOAL models processes that have an objective with a defined achievement.

    - - -

    Derived classes implement the ways how the achievements can be realized.

    - -

    1. GOAL constructor

    - -
      -
    • GOAL.New(): Creates a new GOAL object.
    • -
    - -

    2. GOAL is a finite state machine (FSM).

    - -

    2.1 GOAL States

    - -
      -
    • Pending: The goal object is in progress.
    • -
    • Achieved: The goal objective is Achieved.
    • -
    - -

    2.2 GOAL Events

    - -
      -
    • Achieved: Set the goal objective to Achieved.
    • -
    - - -
    -
    -

    Type Goal

    - -

    Type GOAL

    -

    Field(s)

    -
    -
    - - -GOAL:Achieved() - -
    -
    - -

    Achieved Trigger for GOAL

    - -
    -
    -
    -
    - - -GOAL:AddPlayerContribution(PlayerName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      #string PlayerName :

      - -
    • -
    -
    -
    -
    -
    - - -GOAL:GetPlayerContribution(Player, PlayerName) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      #number Player : -contribution.

      - -
    • -
    • - -

      PlayerName :

      - -
    • -
    -
    -
    -
    -
    - - -GOAL:GetPlayerContributions() - -
    -
    - - - -
    -
    -
    -
    - - -GOAL:GetTotalContributions() - -
    -
    - - - -
    -
    -
    -
    - - -GOAL:IsAchieved() - -
    -
    - - - -

    Return value

    - -

    #boolean: -true if the goal is Achieved

    - -
    -
    -
    -
    - - -GOAL:New() - -
    -
    - -

    GOAL Constructor.

    - -

    Return value

    - -

    #GOAL:

    - - -
    -
    -
    -
    - - -GOAL:OnAfterAchieved(From, Event, To) - -
    -
    - -

    Achieved Handler OnAfter for GOAL

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -GOAL:OnBeforeAchieved(From, Event, To) - -
    -
    - -

    Achieved Handler OnBefore for GOAL

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -GOAL:OnEnterAchieved(From, Event, To) - -
    -
    - -

    Achieved State Handler OnEnter for GOAL

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -GOAL:OnLeaveAchieved(From, Event, To) - -
    -
    - -

    Achieved State Handler OnLeave for GOAL

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - - -GOAL.Players - -
    -
    - - - -
    -
    -
    -
    - - -GOAL.TotalContributions - -
    -
    - - - -
    -
    -
    -
    - - -GOAL:__Achieved(Delay) - -
    -
    - -

    Achieved Asynchronous Trigger for GOAL

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Group.html b/docs/Documentation/Group.html deleted file mode 100644 index 2e87093a8..000000000 --- a/docs/Documentation/Group.html +++ /dev/null @@ -1,2278 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Group

    - -

    Wrapper -- GROUP wraps the DCS Class Group objects.

    - - - -
    - -

    The #GROUP class is a wrapper class to handle the DCS Group objects:

    - -
      -
    • Support all DCS Group APIs.
    • -
    • Enhance with Group specific APIs not in the DCS Group API set.
    • -
    • Handle local Group Controller.
    • -
    • Manage the "state" of the DCS Group.
    • -
    - -

    IMPORTANT: ONE SHOULD NEVER SANATIZE these GROUP OBJECT REFERENCES! (make the GROUP object references nil).

    - -

    See the detailed documentation on the GROUP class.

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions:

    - -
      -
    • Entropy, Afinegan: Came up with the requirement for AIOnOff().
    • -
    - -
    - - -

    Global(s)

    - - - - - - - - - -
    GROUP -

    GROUP class, extends Controllable#CONTROLLABLE

    - -

    For each DCS Group object alive within a running mission, a GROUP wrapper object (instance) will be created within the _DATABASE object.

    -
    GROUPTEMPLATE - -
    -

    Type GROUP

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    GROUP:Activate() -

    Activates a GROUP.

    -
    GROUP:AllOnGround() -

    Returns if all units of the group are on the ground or landed.

    -
    GROUP:CalculateThreatLevelA2G() -

    Calculate the maxium A2G threat level of the Group.

    -
    GROUP:CopyRoute(Begin, End, Randomize, Radius) -

    Return the route of a group by using the Database#DATABASE class.

    -
    GROUP:CountInZone(Zone) -

    Returns the number of UNITs that are in the Zone

    -
    GROUP:Destroy() -

    Destroys the DCS Group and all of its DCS Units.

    -
    GROUP:Find(DCSGroup) -

    Find the GROUP wrapper class instance using the DCS Group.

    -
    GROUP:FindByName(GroupName) -

    Find the created GROUP using the DCS Group Name.

    -
    GROUP:GetCallsign() -

    Gets the CallSign of the first DCS Unit of the DCS Group.

    -
    GROUP:GetCategory() -

    Returns category of the DCS Group.

    -
    GROUP:GetCategoryName() -

    Returns the category name of the #GROUP.

    -
    GROUP:GetCoalition() -

    Returns the coalition of the DCS Group.

    -
    GROUP:GetCoordinate() -

    Returns a COORDINATE object indicating the point of the first UNIT of the GROUP within the mission.

    -
    GROUP:GetCountry() -

    Returns the country of the DCS Group.

    -
    GROUP:GetDCSObject() -

    Returns the DCS Group.

    -
    GROUP:GetDCSUnit(UnitNumber) -

    Returns the DCS Unit with number UnitNumber.

    -
    GROUP:GetDCSUnits() -

    Returns the DCS Units of the DCS Group.

    -
    GROUP:GetFuel() -

    Returns relative amount of fuel (from 0.0 to 1.0) the group has in its internal tanks.

    -
    GROUP:GetHeading() -

    Returns the mean heading of every UNIT in the GROUP in degrees

    -
    GROUP:GetInitialSize() -
      -
    • Returns the initial size of the DCS Group.
    • -
    -
    GROUP:GetMaxHeight() -

    Returns the current maximum height of the group.

    -
    GROUP:GetMaxVelocity() -

    Returns the current maximum velocity of the group.

    -
    GROUP:GetMinHeight() -

    Returns the current minimum height of the group.

    -
    GROUP:GetPlayerName() -

    Gets the player name of the group.

    -
    GROUP:GetPlayerNames() -

    Get player names

    -
    GROUP:GetPointVec2() -

    Returns a POINT_VEC2 object indicating the point in 2D of the first UNIT of the GROUP within the mission.

    -
    GROUP:GetPositionVec3() -

    Returns the DCSTypes#Position3 position vectors indicating the point and direction vectors in 3D of the POSITIONABLE within the mission.

    -
    GROUP:GetRandomVec3(Radius) -

    Returns a random DCSTypes#Vec3 vector (point in 3D of the UNIT within the mission) within a range around the first UNIT of the GROUP.

    -
    GROUP:GetSize() -

    Returns current size of the DCS Group.

    -
    GROUP:GetTaskMission() -

    Return the mission template of the group.

    -
    GROUP:GetTaskRoute() -

    Return the mission route of the group.

    -
    GROUP:GetTemplate() -

    Returns the group template from the DATABASE (_DATABASE object).

    -
    GROUP:GetTemplateRoutePoints() -

    Returns the group template route.points[] (the waypoints) from the DATABASE (_DATABASE object).

    -
    GROUP:GetTypeName() -

    Gets the type name of the group.

    -
    GROUP:GetUnit(UnitNumber) -

    Returns the UNIT wrapper class with number UnitNumber.

    -
    GROUP:GetVec2() -

    Returns the current point (Vec2 vector) of the first DCS Unit in the DCS Group.

    -
    GROUP:GetVec3() -

    Returns the current Vec3 vector of the first DCS Unit in the GROUP.

    -
    GROUP.GroupName -

    The name of the group.

    -
    GROUP:HandleEvent(Event, EventFunction, ...) -

    Subscribe to a DCS Event.

    -
    GROUP:InAir() -

    Returns true if the first unit of the GROUP is in the air.

    -
    GROUP:IsAir() -

    Returns if the group is of an air category.

    -
    GROUP:IsAirPlane() -

    Returns if the DCS Group contains AirPlanes.

    -
    GROUP:IsAlive() -

    Returns if the Group is alive.

    -
    GROUP:IsCompletelyInZone(Zone) -

    Returns true if all units of the group are within a Zone.

    -
    GROUP:IsGround() -

    Returns if the DCS Group contains Ground troops.

    -
    GROUP:IsHelicopter() -

    Returns if the DCS Group contains Helicopters.

    -
    GROUP:IsNotInZone(Zone) -

    Returns true if none of the group units of the group are within a Zone.

    -
    GROUP:IsPartlyInZone(Zone) -

    Returns true if some units of the group are within a Zone.

    -
    GROUP:IsShip() -

    Returns if the DCS Group contains Ships.

    -
    GROUP:NewTemplate(GroupTemplate, CoalitionSide, CategoryID, CountryID) -

    Create a new GROUP from a given GroupTemplate as a parameter.

    -
    GROUP:OnReSpawn(ReSpawnFunction) - -
    GROUP:Register(GroupName) -

    Create a new GROUP from an existing Group in the Mission.

    -
    GROUP:ResetEvents() -

    Reset the subscriptions.

    -
    GROUP:Respawn(Template) -

    Respawn the GROUP using a (tweaked) template of the Group.

    -
    GROUP:RouteRTB(RTBAirbase, Speed) -

    (AIR) Return the Group to an Airbase#AIRBASE.

    -
    GROUP:SetAIOff() -

    Turns the AI Off for the GROUP.

    -
    GROUP:SetAIOn() -

    Turns the AI On for the GROUP.

    -
    GROUP:SetAIOnOff(AIOnOff) -

    Turns the AI On or Off for the GROUP.

    -
    GROUP:SetTemplateCoalition(CoalitionID, Template) -

    Sets the CoalitionID of the group in a Template.

    -
    GROUP:SetTemplateControlled(Controlled, Template) -

    Sets the controlled status in a Template.

    -
    GROUP:SetTemplateCountry(CountryID, Template) -

    Sets the CountryID of the group in a Template.

    -
    GROUP.Takeoff - -
    GROUP:UnHandleEvent(Event) -

    UnSubscribe to a DCS event.

    -
    - -

    Type GROUP.Takeoff

    - - - - - - - - - - - - - - - - - -
    GROUP.Takeoff.Air - -
    GROUP.Takeoff.Cold - -
    GROUP.Takeoff.Hot - -
    GROUP.Takeoff.Runway - -
    - -

    Global(s)

    -
    -
    - - #GROUP - -GROUP - -
    -
    - -

    GROUP class, extends Controllable#CONTROLLABLE

    - -

    For each DCS Group object alive within a running mission, a GROUP wrapper object (instance) will be created within the _DATABASE object.

    - - -

    This is done at the beginning of the mission (when the mission starts), and dynamically when new DCS Group objects are spawned (using the SPAWN class).

    - -

    The GROUP class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference -using the DCS Group or the DCS GroupName.

    - -

    Another thing to know is that GROUP objects do not "contain" the DCS Group object. -The GROUP methods will reference the DCS Group object by name when it is needed during API execution. -If the DCS Group object does not exist or is nil, the GROUP methods will return nil and log an exception in the DCS.log file.

    - -

    The GROUP class provides the following functions to retrieve quickly the relevant GROUP instance:

    - -
      -
    • GROUP.Find(): Find a GROUP instance from the _DATABASE object using a DCS Group object.
    • -
    • GROUP.FindByName(): Find a GROUP instance from the _DATABASE object using a DCS Group name.
    • -
    - -

    GROUP task methods

    - -

    A GROUP is a Controllable. See the Controllable task methods section for a description of the task methods.

    - -

    Obtain the mission from group templates

    - -

    Group templates contain complete mission descriptions. Sometimes you want to copy a complete mission from a group and assign it to another:

    - - - -

    GROUP Command methods

    - -

    A GROUP is a Controllable. See the Controllable command methods section for a description of the command methods.

    - -

    GROUP option methods

    - -

    A GROUP is a Controllable. See the Controllable option methods section for a description of the option methods.

    - -

    GROUP Zone validation methods

    - -

    The group can be validated whether it is completely, partly or not within a Zone. -Use the following Zone validation methods on the group:

    - - - -

    The zone can be of any Zone class derived from Zone#ZONE_BASE. So, these methods are polymorphic to the zones tested on.

    - -

    GROUP AI methods

    - -

    A GROUP has AI methods to control the AI activation.

    - - - - -
    -
    -
    -
    - - - -GROUPTEMPLATE - -
    -
    - - - -
    -
    -

    Type Group

    - -

    Type GROUP

    -

    Field(s)

    -
    -
    - - -GROUP:Activate() - -
    -
    - -

    Activates a GROUP.

    - -
    -
    -
    -
    - - -GROUP:AllOnGround() - -
    -
    - -

    Returns if all units of the group are on the ground or landed.

    - - -

    If all units of this group are on the ground, this function will return true, otherwise false.

    - -

    Return value

    - -

    #boolean: -All units on the ground result.

    - -
    -
    -
    -
    - - -GROUP:CalculateThreatLevelA2G() - -
    -
    - -

    Calculate the maxium A2G threat level of the Group.

    - -
    -
    -
    -
    - - -GROUP:CopyRoute(Begin, End, Randomize, Radius) - -
    -
    - -

    Return the route of a group by using the Database#DATABASE class.

    - -

    Parameters

    -
      -
    • - -

      #number Begin : -The route point from where the copy will start. The base route point is 0.

      - -
    • -
    • - -

      #number End : -The route point where the copy will end. The End point is the last point - the End point. The last point has base 0.

      - -
    • -
    • - -

      #boolean Randomize : -Randomization of the route, when true.

      - -
    • -
    • - -

      #number Radius : -When randomization is on, the randomization is within the radius.

      - -
    • -
    -
    -
    -
    -
    - - -GROUP:CountInZone(Zone) - -
    -
    - -

    Returns the number of UNITs that are in the Zone

    - -

    Parameter

    - -

    Return value

    - -

    #number: -The number of UNITs that are in the Zone

    - -
    -
    -
    -
    - - -GROUP:Destroy() - -
    -
    - -

    Destroys the DCS Group and all of its DCS Units.

    - - -

    Note that this destroy method also raises a destroy event at run-time. -So all event listeners will catch the destroy event of this DCS Group.

    - -
    -
    -
    -
    - - -GROUP:Find(DCSGroup) - -
    -
    - -

    Find the GROUP wrapper class instance using the DCS Group.

    - -

    Parameter

    - -

    Return value

    - -

    #GROUP: -The GROUP.

    - -
    -
    -
    -
    - - -GROUP:FindByName(GroupName) - -
    -
    - -

    Find the created GROUP using the DCS Group Name.

    - -

    Parameter

    -
      -
    • - -

      #string GroupName : -The DCS Group Name.

      - -
    • -
    -

    Return value

    - -

    #GROUP: -The GROUP.

    - -
    -
    -
    -
    - - -GROUP:GetCallsign() - -
    -
    - -

    Gets the CallSign of the first DCS Unit of the DCS Group.

    - -

    Return value

    - -

    #string: -The CallSign of the first DCS Unit of the DCS Group.

    - -
    -
    -
    -
    - - -GROUP:GetCategory() - -
    -
    - -

    Returns category of the DCS Group.

    - -

    Return value

    - -

    Dcs.DCSWrapper.Group#Group.Category: -The category ID

    - -
    -
    -
    -
    - - -GROUP:GetCategoryName() - -
    -
    - -

    Returns the category name of the #GROUP.

    - -

    Return value

    - -

    #string: -Category name = Helicopter, Airplane, Ground Unit, Ship

    - -
    -
    -
    -
    - - -GROUP:GetCoalition() - -
    -
    - -

    Returns the coalition of the DCS Group.

    - -

    Return value

    - -

    Dcs.DCSCoalitionWrapper.Object#coalition.side: -The coalition side of the DCS Group.

    - -
    -
    -
    -
    - - -GROUP:GetCoordinate() - -
    -
    - -

    Returns a COORDINATE object indicating the point of the first UNIT of the GROUP within the mission.

    - -

    Return value

    - -

    Core.Point#COORDINATE: -The COORDINATE of the GROUP.

    - -
    -
    -
    -
    - - -GROUP:GetCountry() - -
    -
    - -

    Returns the country of the DCS Group.

    - -

    Return values

    -
      -
    1. - -

      Dcs.DCScountry#country.id: -The country identifier.

      - -
    2. -
    3. - -

      #nil: -The DCS Group is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -GROUP:GetDCSObject() - -
    -
    - -

    Returns the DCS Group.

    - -

    Return value

    - -

    Dcs.DCSWrapper.Group#Group: -The DCS Group.

    - -
    -
    -
    -
    - - -GROUP:GetDCSUnit(UnitNumber) - -
    -
    - -

    Returns the DCS Unit with number UnitNumber.

    - - -

    If the underlying DCS Unit does not exist, the method will return nil. .

    - -

    Parameter

    -
      -
    • - -

      #number UnitNumber : -The number of the DCS Unit to be returned.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSWrapper.Unit#Unit: -The DCS Unit.

    - -
    -
    -
    -
    - - -GROUP:GetDCSUnits() - -
    -
    - -

    Returns the DCS Units of the DCS Group.

    - -

    Return value

    - -

    #table: -The DCS Units.

    - -
    -
    -
    -
    - - -GROUP:GetFuel() - -
    -
    - -

    Returns relative amount of fuel (from 0.0 to 1.0) the group has in its internal tanks.

    - - -

    If there are additional fuel tanks the value may be greater than 1.0.

    - -

    Return values

    -
      -
    1. - -

      #number: -The relative amount of fuel (from 0.0 to 1.0).

      - -
    2. -
    3. - -

      #nil: -The GROUP is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -GROUP:GetHeading() - -
    -
    - -

    Returns the mean heading of every UNIT in the GROUP in degrees

    - -

    Return values

    -
      -
    1. - -

      #number: -mean heading of the GROUP

      - -
    2. -
    3. - -

      #nil: -The first UNIT is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -GROUP:GetInitialSize() - -
    -
    - -
      -
    • Returns the initial size of the DCS Group.
    • -
    - - -

    If some of the DCS Units of the DCS Group are destroyed, the initial size of the DCS Group is unchanged.

    - -

    Return value

    - -

    #number: -The DCS Group initial size.

    - -
    -
    -
    -
    - - -GROUP:GetMaxHeight() - -
    -
    - -

    Returns the current maximum height of the group.

    - - -

    Each unit within the group gets evaluated, and the maximum height (= the unit which is the highest elevated) is returned.

    - -

    Return value

    - -

    #number: -Maximum height found.

    - -
    -
    -
    -
    - - -GROUP:GetMaxVelocity() - -
    -
    - -

    Returns the current maximum velocity of the group.

    - - -

    Each unit within the group gets evaluated, and the maximum velocity (= the unit which is going the fastest) is returned.

    - -

    Return value

    - -

    #number: -Maximum velocity found.

    - -
    -
    -
    -
    - - -GROUP:GetMinHeight() - -
    -
    - -

    Returns the current minimum height of the group.

    - - -

    Each unit within the group gets evaluated, and the minimum height (= the unit which is the lowest elevated) is returned.

    - -

    Return value

    - -

    #number: -Minimum height found.

    - -
    -
    -
    -
    - - -GROUP:GetPlayerName() - -
    -
    - -

    Gets the player name of the group.

    - -

    Return value

    - -

    #string: -The player name of the group.

    - -
    -
    -
    -
    - - -GROUP:GetPlayerNames() - -
    -
    - -

    Get player names

    - -

    Return values

    -
      -
    1. - -

      #table: -The group has players, an array of player names is returned.

      - -
    2. -
    3. - -

      #nil: -The group has no players

      - -
    4. -
    -
    -
    -
    -
    - - -GROUP:GetPointVec2() - -
    -
    - -

    Returns a POINT_VEC2 object indicating the point in 2D of the first UNIT of the GROUP within the mission.

    - -

    Return values

    -
      -
    1. - -

      Core.Point#POINT_VEC2: -The 2D point vector of the first DCS Unit of the GROUP.

      - -
    2. -
    3. - -

      #nil: -The first UNIT is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -GROUP:GetPositionVec3() - -
    -
    - -

    Returns the DCSTypes#Position3 position vectors indicating the point and direction vectors in 3D of the POSITIONABLE within the mission.

    - -

    Return values

    -
      -
    1. - -

      Dcs.DCSTypes#Position: -The 3D position vectors of the POSITIONABLE.

      - -
    2. -
    3. - -

      #nil: -The POSITIONABLE is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -GROUP:GetRandomVec3(Radius) - -
    -
    - -

    Returns a random DCSTypes#Vec3 vector (point in 3D of the UNIT within the mission) within a range around the first UNIT of the GROUP.

    - -

    Parameter

    -
      -
    • - -

      #number Radius :

      - -
    • -
    -

    Return values

    -
      -
    1. - -

      Dcs.DCSTypes#Vec3: -The random 3D point vector around the first UNIT of the GROUP.

      - -
    2. -
    3. - -

      #nil: -The GROUP is invalid or empty

      - -
    4. -
    -

    Usage:

    -
    
    --- If Radius is ignored, returns the Dcs.DCSTypes#Vec3 of first UNIT of the GROUP
    - -
    -
    -
    -
    - - -GROUP:GetSize() - -
    -
    - -

    Returns current size of the DCS Group.

    - - -

    If some of the DCS Units of the DCS Group are destroyed the size of the DCS Group is changed.

    - -

    Return value

    - -

    #number: -The DCS Group size.

    - -
    -
    -
    -
    - - -GROUP:GetTaskMission() - -
    -
    - -

    Return the mission template of the group.

    - -

    Return value

    - -

    #table: -The MissionTemplate

    - -
    -
    -
    -
    - - -GROUP:GetTaskRoute() - -
    -
    - -

    Return the mission route of the group.

    - -

    Return value

    - -

    #table: -The mission route defined by points.

    - -
    -
    -
    -
    - - -GROUP:GetTemplate() - -
    -
    - -

    Returns the group template from the DATABASE (_DATABASE object).

    - -

    Return value

    - -

    #table:

    - - -
    -
    -
    -
    - - -GROUP:GetTemplateRoutePoints() - -
    -
    - -

    Returns the group template route.points[] (the waypoints) from the DATABASE (_DATABASE object).

    - -

    Return value

    - -

    #table:

    - - -
    -
    -
    -
    - - -GROUP:GetTypeName() - -
    -
    - -

    Gets the type name of the group.

    - -

    Return value

    - -

    #string: -The type name of the group.

    - -
    -
    -
    -
    - - -GROUP:GetUnit(UnitNumber) - -
    -
    - -

    Returns the UNIT wrapper class with number UnitNumber.

    - - -

    If the underlying DCS Unit does not exist, the method will return nil. .

    - -

    Parameter

    -
      -
    • - -

      #number UnitNumber : -The number of the UNIT wrapper class to be returned.

      - -
    • -
    -

    Return value

    - -

    Wrapper.Unit#UNIT: -The UNIT wrapper class.

    - -
    -
    -
    -
    - - -GROUP:GetVec2() - -
    -
    - -

    Returns the current point (Vec2 vector) of the first DCS Unit in the DCS Group.

    - -

    Return value

    - -

    Dcs.DCSTypes#Vec2: -Current Vec2 point of the first DCS Unit of the DCS Group.

    - -
    -
    -
    -
    - - -GROUP:GetVec3() - -
    -
    - -

    Returns the current Vec3 vector of the first DCS Unit in the GROUP.

    - -

    Return value

    - -

    Dcs.DCSTypes#Vec3: -Current Vec3 of the first DCS Unit of the GROUP.

    - -
    -
    -
    -
    - - #string - -GROUP.GroupName - -
    -
    - -

    The name of the group.

    - -
    -
    -
    -
    - - -GROUP:HandleEvent(Event, EventFunction, ...) - -
    -
    - -

    Subscribe to a DCS Event.

    - -

    Parameters

    -
      -
    • - -

      Core.Event#EVENTS Event :

      - -
    • -
    • - -

      #function EventFunction : -(optional) The function to be called when the event occurs for the GROUP.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #GROUP:

    - - -
    -
    -
    -
    - - -GROUP:InAir() - -
    -
    - -

    Returns true if the first unit of the GROUP is in the air.

    - -

    Return values

    -
      -
    1. - -

      #boolean: -true if in the first unit of the group is in the air.

      - -
    2. -
    3. - -

      #nil: -The GROUP is not existing or not alive.

      - -
    4. -
    -
    -
    -
    -
    - - -GROUP:IsAir() - -
    -
    - -

    Returns if the group is of an air category.

    - - -

    If the group is a helicopter or a plane, then this method will return true, otherwise false.

    - -

    Return value

    - -

    #boolean: -Air category evaluation result.

    - -
    -
    -
    -
    - - -GROUP:IsAirPlane() - -
    -
    - -

    Returns if the DCS Group contains AirPlanes.

    - -

    Return value

    - -

    #boolean: -true if DCS Group contains AirPlanes.

    - -
    -
    -
    -
    - - -GROUP:IsAlive() - -
    -
    - -

    Returns if the Group is alive.

    - - -

    The Group must:

    - -
      -
    • Exist at run-time.
    • -
    • Has at least one unit.
    • -
    - -

    When the first Unit of the Group is active, it will return true. -If the first Unit of the Group is inactive, it will return false.

    - - -

    Return values

    -
      -
    1. - -

      #boolean: -true if the Group is alive and active.

      - -
    2. -
    3. - -

      #boolean: -false if the Group is alive but inactive.

      - -
    4. -
    5. - -

      #nil: -if the group does not exist anymore.

      - -
    6. -
    -
    -
    -
    -
    - - -GROUP:IsCompletelyInZone(Zone) - -
    -
    - -

    Returns true if all units of the group are within a Zone.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean: -Returns true if the Group is completely within the Zone#ZONE_BASE

    - -
    -
    -
    -
    - - -GROUP:IsGround() - -
    -
    - -

    Returns if the DCS Group contains Ground troops.

    - -

    Return value

    - -

    #boolean: -true if DCS Group contains Ground troops.

    - -
    -
    -
    -
    - - -GROUP:IsHelicopter() - -
    -
    - -

    Returns if the DCS Group contains Helicopters.

    - -

    Return value

    - -

    #boolean: -true if DCS Group contains Helicopters.

    - -
    -
    -
    -
    - - -GROUP:IsNotInZone(Zone) - -
    -
    - -

    Returns true if none of the group units of the group are within a Zone.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean: -Returns true if the Group is not within the Zone#ZONE_BASE

    - -
    -
    -
    -
    - - -GROUP:IsPartlyInZone(Zone) - -
    -
    - -

    Returns true if some units of the group are within a Zone.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean: -Returns true if the Group is partially within the Zone#ZONE_BASE

    - -
    -
    -
    -
    - - -GROUP:IsShip() - -
    -
    - -

    Returns if the DCS Group contains Ships.

    - -

    Return value

    - -

    #boolean: -true if DCS Group contains Ships.

    - -
    -
    -
    -
    - - -GROUP:NewTemplate(GroupTemplate, CoalitionSide, CategoryID, CountryID) - -
    -
    - -

    Create a new GROUP from a given GroupTemplate as a parameter.

    - - -

    Note that the GroupTemplate is NOT spawned into the mission. -It is merely added to the Database.

    - -

    Parameters

    - -

    Return value

    - -

    #GROUP: -self

    - -
    -
    -
    -
    - - -GROUP:OnReSpawn(ReSpawnFunction) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      ReSpawnFunction :

      - -
    • -
    -
    -
    -
    -
    - - -GROUP:Register(GroupName) - -
    -
    - -

    Create a new GROUP from an existing Group in the Mission.

    - -

    Parameter

    -
      -
    • - -

      #string GroupName : -The Group name

      - -
    • -
    -

    Return value

    - -

    #GROUP: -self

    - -
    -
    -
    -
    - - -GROUP:ResetEvents() - -
    -
    - -

    Reset the subscriptions.

    - -

    Return value

    - -

    #GROUP:

    - - -
    -
    -
    -
    - - -GROUP:Respawn(Template) - -
    -
    - -

    Respawn the GROUP using a (tweaked) template of the Group.

    - - -

    The template must be retrieved with the Group#GROUP.GetTemplate() function. -The template contains all the definitions as declared within the mission file. -To understand templates, do the following:

    - -
      -
    • unpack your .miz file into a directory using 7-zip.
    • -
    • browse in the directory created to the file mission.
    • -
    • open the file and search for the country group definitions.
    • -
    - -

    Your group template will contain the fields as described within the mission file.

    - -

    This function will:

    - -
      -
    • Get the current position and heading of the group.
    • -
    • When the group is alive, it will tweak the template x, y and heading coordinates of the group and the embedded units to the current units positions.
    • -
    • Then it will destroy the current alive group.
    • -
    • And it will respawn the group using your new template definition.
    • -
    - -

    Parameter

    -
      -
    • - -

      #table Template : -The template of the Group retrieved with GROUP:GetTemplate()

      - -
    • -
    -
    -
    -
    -
    - - -GROUP:RouteRTB(RTBAirbase, Speed) - -
    -
    - -

    (AIR) Return the Group to an Airbase#AIRBASE.

    - - -

    The following things are to be taken into account:

    - -
      -
    • The group is respawned to achieve the RTB, there may be side artefacts as a result of this. (Like weapons suddenly come back).
    • -
    • A group consisting out of more than one unit, may rejoin formation when respawned.
    • -
    • A speed can be given in km/h. If no speed is specified, the maximum speed of the first unit will be taken to return to base.
    • -
    • When there is no Airbase object specified, the group will return to the home base if the route of the group is pinned at take-off or at landing to a base.
    • -
    • When there is no Airbase object specified and the group route is not pinned to any airbase, it will return to the nearest airbase.
    • -
    - - -

    Parameters

    -
      -
    • - -

      Wrapper.Airbase#AIRBASE RTBAirbase : -(optional) The Airbase to return to. If blank, the controllable will return to the nearest friendly airbase.

      - -
    • -
    • - -

      #number Speed : -(optional) The Speed, if no Speed is given, the maximum Speed of the first unit is selected.

      - -
    • -
    -

    Return value

    - -

    #GROUP:

    - - -
    -
    -
    -
    - - -GROUP:SetAIOff() - -
    -
    - -

    Turns the AI Off for the GROUP.

    - -

    Return value

    - -

    #GROUP: -The GROUP.

    - -
    -
    -
    -
    - - -GROUP:SetAIOn() - -
    -
    - -

    Turns the AI On for the GROUP.

    - -

    Return value

    - -

    #GROUP: -The GROUP.

    - -
    -
    -
    -
    - - -GROUP:SetAIOnOff(AIOnOff) - -
    -
    - -

    Turns the AI On or Off for the GROUP.

    - -

    Parameter

    -
      -
    • - -

      #boolean AIOnOff : -The value true turns the AI On, the value false turns the AI Off.

      - -
    • -
    -

    Return value

    - -

    #GROUP: -The GROUP.

    - -
    -
    -
    -
    - - -GROUP:SetTemplateCoalition(CoalitionID, Template) - -
    -
    - -

    Sets the CoalitionID of the group in a Template.

    - -

    Parameters

    - -

    Return value

    - -

    #table:

    - - -
    -
    -
    -
    - - -GROUP:SetTemplateControlled(Controlled, Template) - -
    -
    - -

    Sets the controlled status in a Template.

    - -

    Parameters

    -
      -
    • - -

      #boolean Controlled : -true is controlled, false is uncontrolled.

      - -
    • -
    • - -

      Template :

      - -
    • -
    -

    Return value

    - -

    #table:

    - - -
    -
    -
    -
    - - -GROUP:SetTemplateCountry(CountryID, Template) - -
    -
    - -

    Sets the CountryID of the group in a Template.

    - -

    Parameters

    - -

    Return value

    - -

    #table:

    - - -
    -
    -
    -
    - - #GROUP.Takeoff - -GROUP.Takeoff - -
    -
    - - - -
    -
    -
    -
    - - -GROUP:UnHandleEvent(Event) - -
    -
    - -

    UnSubscribe to a DCS event.

    - -

    Parameter

    - -

    Return value

    - -

    #GROUP:

    - - -
    -
    - -

    Type GROUP.Takeoff

    - -

    Enumerator for location at airbases

    - -

    Field(s)

    -
    -
    - - #number - -GROUP.Takeoff.Air - -
    -
    - - - -
    -
    -
    -
    - - #number - -GROUP.Takeoff.Cold - -
    -
    - - - -
    -
    -
    -
    - - #number - -GROUP.Takeoff.Hot - -
    -
    - - - -
    -
    -
    -
    - - #number - -GROUP.Takeoff.Runway - -
    -
    - - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Identifiable.html b/docs/Documentation/Identifiable.html deleted file mode 100644 index b108c3bfe..000000000 --- a/docs/Documentation/Identifiable.html +++ /dev/null @@ -1,588 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Identifiable

    - -

    Wrapper -- IDENTIFIABLE is an intermediate class wrapping DCS Object class derived Objects.

    - - - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - -
    IDENTIFIABLE -

    IDENTIFIABLE class, extends Object#OBJECT

    - -

    The IDENTIFIABLE class is a wrapper class to handle the DCS Identifiable objects:

    - -
      -
    • Support all DCS Identifiable APIs.
    • -
    -
    -

    Type IDENTIFIABLE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    IDENTIFIABLE:GetCallsign() -

    Gets the CallSign of the IDENTIFIABLE, which is a blank by default.

    -
    IDENTIFIABLE:GetCategory() -

    Returns category of the DCS Identifiable.

    -
    IDENTIFIABLE:GetCategoryName() -

    Returns the DCS Identifiable category name as defined within the DCS Identifiable Descriptor.

    -
    IDENTIFIABLE:GetCoalition() -

    Returns coalition of the Identifiable.

    -
    IDENTIFIABLE:GetCoalitionName() -

    Returns the name of the coalition of the Identifiable.

    -
    IDENTIFIABLE:GetCountry() -

    Returns country of the Identifiable.

    -
    IDENTIFIABLE:GetDesc() -

    Returns Identifiable descriptor.

    -
    IDENTIFIABLE:GetName() -

    Returns DCS Identifiable object name.

    -
    IDENTIFIABLE:GetThreatLevel() - -
    IDENTIFIABLE:GetTypeName() -

    Returns the type name of the DCS Identifiable.

    -
    IDENTIFIABLE.IdentifiableName -

    The name of the identifiable.

    -
    IDENTIFIABLE:IsAlive() -

    Returns if the Identifiable is alive.

    -
    IDENTIFIABLE:New(IdentifiableName) -

    Create a new IDENTIFIABLE from a DCSIdentifiable

    -
    - -

    Global(s)

    -
    -
    - - #IDENTIFIABLE - -IDENTIFIABLE - -
    -
    - -

    IDENTIFIABLE class, extends Object#OBJECT

    - -

    The IDENTIFIABLE class is a wrapper class to handle the DCS Identifiable objects:

    - -
      -
    • Support all DCS Identifiable APIs.
    • -
    - - -
      -
    • Enhance with Identifiable specific APIs not in the DCS Identifiable API set.
    • -
    • Manage the "state" of the DCS Identifiable.
    • -
    - -

    IDENTIFIABLE constructor

    - -

    The IDENTIFIABLE class provides the following functions to construct a IDENTIFIABLE instance:

    - - - - -
    -
    -

    Type Identifiable

    - -

    Type IDENTIFIABLE

    -

    Field(s)

    -
    -
    - - -IDENTIFIABLE:GetCallsign() - -
    -
    - -

    Gets the CallSign of the IDENTIFIABLE, which is a blank by default.

    - -

    Return value

    - -

    #string: -The CallSign of the IDENTIFIABLE.

    - -
    -
    -
    -
    - - -IDENTIFIABLE:GetCategory() - -
    -
    - -

    Returns category of the DCS Identifiable.

    - -

    Return value

    - -

    Dcs.DCSWrapper.Object#Object.Category: -The category ID

    - -
    -
    -
    -
    - - -IDENTIFIABLE:GetCategoryName() - -
    -
    - -

    Returns the DCS Identifiable category name as defined within the DCS Identifiable Descriptor.

    - -

    Return value

    - -

    #string: -The DCS Identifiable Category Name

    - -
    -
    -
    -
    - - -IDENTIFIABLE:GetCoalition() - -
    -
    - -

    Returns coalition of the Identifiable.

    - -

    Return values

    -
      -
    1. - -

      Dcs.DCSCoalitionWrapper.Object#coalition.side: -The side of the coalition.

      - -
    2. -
    3. - -

      #nil: -The DCS Identifiable is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -IDENTIFIABLE:GetCoalitionName() - -
    -
    - -

    Returns the name of the coalition of the Identifiable.

    - -

    Return values

    -
      -
    1. - -

      #string: -The name of the coalition.

      - -
    2. -
    3. - -

      #nil: -The DCS Identifiable is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -IDENTIFIABLE:GetCountry() - -
    -
    - -

    Returns country of the Identifiable.

    - -

    Return values

    -
      -
    1. - -

      Dcs.DCScountry#country.id: -The country identifier.

      - -
    2. -
    3. - -

      #nil: -The DCS Identifiable is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -IDENTIFIABLE:GetDesc() - -
    -
    - -

    Returns Identifiable descriptor.

    - - -

    Descriptor type depends on Identifiable category.

    - -

    Return values

    -
      -
    1. - -

      Dcs.DCSWrapper.Identifiable#Identifiable.Desc: -The Identifiable descriptor.

      - -
    2. -
    3. - -

      #nil: -The DCS Identifiable is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -IDENTIFIABLE:GetName() - -
    -
    - -

    Returns DCS Identifiable object name.

    - - -

    The function provides access to non-activated objects too.

    - -

    Return values

    -
      -
    1. - -

      #string: -The name of the DCS Identifiable.

      - -
    2. -
    3. - -

      #nil: -The DCS Identifiable is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -IDENTIFIABLE:GetThreatLevel() - -
    -
    - - - -
    -
    -
    -
    - - -IDENTIFIABLE:GetTypeName() - -
    -
    - -

    Returns the type name of the DCS Identifiable.

    - -

    Return values

    -
      -
    1. - -

      #string: -The type name of the DCS Identifiable.

      - -
    2. -
    3. - -

      #nil: -The DCS Identifiable is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - #string - -IDENTIFIABLE.IdentifiableName - -
    -
    - -

    The name of the identifiable.

    - -
    -
    -
    -
    - - -IDENTIFIABLE:IsAlive() - -
    -
    - -

    Returns if the Identifiable is alive.

    - - -

    If the Identifiable is not alive, nil is returned.
    -If the Identifiable is alive, true is returned.

    - -

    Return values

    -
      -
    1. - -

      #boolean: -true if Identifiable is alive.

      - -
    2. -
    3. - -

      #nil: -if the Identifiable is not existing or is not alive.

      - -
    4. -
    -
    -
    -
    -
    - - -IDENTIFIABLE:New(IdentifiableName) - -
    -
    - -

    Create a new IDENTIFIABLE from a DCSIdentifiable

    - -

    Parameter

    - -

    Return value

    - -

    #IDENTIFIABLE: -self

    - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Menu.html b/docs/Documentation/Menu.html deleted file mode 100644 index c3f89ef1a..000000000 --- a/docs/Documentation/Menu.html +++ /dev/null @@ -1,1785 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Menu

    - -

    Core -- MENU_ classes model the definition of hierarchical menu structures and commands for players within a mission.

    - - - -
    - -

    DCS Menus can be managed using the MENU classes. -The advantage of using MENU classes is that it hides the complexity of dealing with menu management in more advanced scanerios where you need to -set menus and later remove them, and later set them again. You'll find while using use normal DCS scripting functions, that setting and removing -menus is not a easy feat if you have complex menu hierarchies defined. -Using the MOOSE menu classes, the removal and refreshing of menus are nicely being handled within these classes, and becomes much more easy. -On top, MOOSE implements variable parameter passing for command menus.

    - -

    There are basically two different MENU class types that you need to use:

    - -

    To manage main menus, the classes begin with MENU_:

    - - - -

    To manage command menus, which are menus that allow the player to issue functions, the classes begin with MENUCOMMAND:

    - - - -
    -

    -

    -

    Author: Sven Van de Velde (FlightControl)

    -

    Contributions:

    - -
    -

    - -

    Global(s)

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    MENU_BASE -

    MENU_BASE class, extends Base#BASE

    -

    The MENU_BASE class defines the main MENU class where other MENU classes are derived from.

    -
    MENU_COALITION -

    MENU_COALITION class, extends Menu#MENU_BASE

    - -

    The Menu#MENU_COALITION class manages the main menus for coalitions.

    -
    MENU_COALITION_COMMAND -

    MENUCOALITIONCOMMAND class, extends Menu#MENUCOMMANDBASE

    - -

    The MENUCOALITIONCOMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.

    -
    MENU_COMMAND_BASE -

    MENUCOMMANDBASE class, extends Base#BASE

    -
    -

    The MENUCOMMANDBASE class defines the main MENU class where other MENU COMMAND_ -classes are derived from, in order to set commands.

    - -
    MENU_GROUP -

    MENU_GROUP class, extends Menu#MENU_BASE

    - -

    The MENU_GROUP class manages the main menus for coalitions.

    -
    MENU_GROUP_COMMAND -

    MENUGROUPCOMMAND class, extends Menu#MENUCOMMANDBASE

    - -

    The Menu#MENUGROUPCOMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.

    -
    MENU_INDEX - -
    MENU_MISSION -

    MENU_MISSION class, extends Menu#MENU_BASE

    - -

    The MENU_MISSION class manages the main menus for a complete mission.

    -
    MENU_MISSION_COMMAND -

    MENUMISSIONCOMMAND class, extends Menu#MENUCOMMANDBASE

    - -

    The MENUMISSIONCOMMAND class manages the command menus for a complete mission, which allow players to execute functions during mission execution.

    -
    -

    Type MENU_BASE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    MENU_BASE:ClearParentMenu(MenuText) - -
    MENU_BASE:GetMenu(MenuText) -

    Gets a Menu from a parent Menu

    -
    MENU_BASE.MenuTag - -
    MENU_BASE.MenuTime - -
    MENU_BASE.New(#, self, MenuText, ParentMenu) -

    Consructor

    -
    MENU_BASE:SetParentMenu(MenuText, Menu) - -
    MENU_BASE:SetTag(MenuTag) -

    Sets a tag for later selection of menu refresh.

    -
    MENU_BASE:SetTime(MenuTime) -

    Sets a time stamp for later prevention of menu removal.

    -
    - -

    Type MENU_COALITION

    - - - - - - - - - - - - - - - - - -
    MENU_COALITION.Menus - -
    MENU_COALITION:New(Coalition, MenuText, ParentMenu) -

    MENU_COALITION constructor.

    -
    MENU_COALITION:Remove(MenuTime, MenuTag) -

    Removes the main menu and the sub menus recursively of this MENU_COALITION.

    -
    MENU_COALITION:RemoveSubMenus() -

    Removes the sub menus recursively of this MENU_COALITION.

    -
    - -

    Type MENU_COALITION_COMMAND

    - - - - - - - - - -
    MENU_COALITION_COMMAND:New(Coalition, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...) -

    MENU_COALITION constructor.

    -
    MENU_COALITION_COMMAND:Remove(MenuTime, MenuTag) -

    Removes a radio command item for a coalition

    -
    - -

    Type MENU_COMMAND_BASE

    - - - - - - - - - - - - - - - - - -
    MENU_COMMAND_BASE.MenuCallHandler - -
    MENU_COMMAND_BASE.New(#, self, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArguments) -

    Constructor

    -
    MENU_COMMAND_BASE.SetCommandMenuArguments(#, self, CommandMenuArguments) -

    This sets the new command arguments of a menu, -so that if a menu is regenerated, or if command arguments change, -that the arguments set for the menu are loosely coupled with the menu itself!!! -If the arguments change, no new menu needs to be generated if the menu text is the same!!!

    -
    MENU_COMMAND_BASE.SetCommandMenuFunction(#, self, CommandMenuFunction) -

    This sets the new command function of a menu, -so that if a menu is regenerated, or if command function changes, -that the function set for the menu is loosely coupled with the menu itself!!! -If the function changes, no new menu needs to be generated if the menu text is the same!!!

    -
    - -

    Type MENU_GROUP

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    MENU_GROUP.Group - -
    MENU_GROUP.GroupID - -
    MENU_GROUP.MenuPath - -
    MENU_GROUP.Menus - -
    MENU_GROUP:New(Group, MenuText, ParentMenu) -

    MENU_GROUP constructor.

    -
    MENU_GROUP:Remove(MenuTime, MenuTag) -

    Removes the main menu and sub menus recursively of this MENU_GROUP.

    -
    MENU_GROUP:RemoveSubMenus(MenuTime, MenuTag) -

    Removes the sub menus recursively of this MENU_GROUP.

    -
    - -

    Type MENU_GROUP_COMMAND

    - - - - - - - - - - - - - - - - - - - - - -
    MENU_GROUP_COMMAND.Group - -
    MENU_GROUP_COMMAND.GroupID - -
    MENU_GROUP_COMMAND.MenuPath - -
    MENU_GROUP_COMMAND:New(Group, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...) -

    Creates a new radio command item for a group

    -
    MENU_GROUP_COMMAND:Remove(MenuTime, MenuTag) -

    Removes a menu structure for a group.

    -
    - -

    Type MENU_MISSION

    - - - - - - - - - - - - - - - - - -
    MENU_MISSION.Menus - -
    MENU_MISSION:New(MenuText, ParentMenu) -

    MENU_MISSION constructor.

    -
    MENU_MISSION:Remove(MenuTime, MenuTag) -

    Removes the main menu and the sub menus recursively of this MENU_MISSION.

    -
    MENU_MISSION:RemoveSubMenus() -

    Removes the sub menus recursively of this MENU_MISSION.

    -
    - -

    Type MENU_MISSION_COMMAND

    - - - - - - - - - -
    MENU_MISSION_COMMAND:New(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...) -

    MENU_MISSION constructor.

    -
    MENU_MISSION_COMMAND:Remove() -

    Removes a radio command item for a coalition

    -
    - -

    Global(s)

    -
    -
    - - #MENU_BASE - -MENU_BASE - -
    -
    - -

    MENU_BASE class, extends Base#BASE

    -

    The MENU_BASE class defines the main MENU class where other MENU classes are derived from.

    - - -

    This is an abstract class, so don't use it.

    - -
    -
    -
    -
    - - #MENU_COALITION - -MENU_COALITION - -
    -
    - -

    MENU_COALITION class, extends Menu#MENU_BASE

    - -

    The Menu#MENU_COALITION class manages the main menus for coalitions.

    - - -

    You can add menus with the MENU_COALITION.New method, which constructs a MENU_COALITION object and returns you the object reference. -Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_COALITION.Remove.

    - - - -

    Usage:

    -
     -- This demo creates a menu structure for the planes within the red coalition.
    - -- To test, join the planes, then look at the other radio menus (Option F10).
    - -- Then switch planes and check if the menu is still there.
    -
    - local Plane1 = CLIENT:FindByName( "Plane 1" )
    - local Plane2 = CLIENT:FindByName( "Plane 2" )
    -
    -
    - -- This would create a menu for the red coalition under the main DCS "Others" menu.
    - local MenuCoalitionRed = MENU_COALITION:New( coalition.side.RED, "Manage Menus" )
    -
    -
    - local function ShowStatus( StatusText, Coalition )
    -
    -   MESSAGE:New( Coalition, 15 ):ToRed()
    -   Plane1:Message( StatusText, 15 )
    -   Plane2:Message( StatusText, 15 )
    - end
    -
    - local MenuStatus -- Menu#MENU_COALITION
    - local MenuStatusShow -- Menu#MENU_COALITION_COMMAND
    -
    - local function RemoveStatusMenu()
    -   MenuStatus:Remove()
    - end
    -
    - local function AddStatusMenu()
    -   
    -   -- This would create a menu for the red coalition under the MenuCoalitionRed menu object.
    -   MenuStatus = MENU_COALITION:New( coalition.side.RED, "Status for Planes" )
    -   MenuStatusShow = MENU_COALITION_COMMAND:New( coalition.side.RED, "Show Status", MenuStatus, ShowStatus, "Status of planes is ok!", "Message to Red Coalition" )
    - end
    -
    - local MenuAdd = MENU_COALITION_COMMAND:New( coalition.side.RED, "Add Status Menu", MenuCoalitionRed, AddStatusMenu )
    - local MenuRemove = MENU_COALITION_COMMAND:New( coalition.side.RED, "Remove Status Menu", MenuCoalitionRed, RemoveStatusMenu )
    - 
    - -
    -
    -
    -
    - - #MENU_COALITION_COMMAND - -MENU_COALITION_COMMAND - -
    -
    - -

    MENUCOALITIONCOMMAND class, extends Menu#MENUCOMMANDBASE

    - -

    The MENUCOALITIONCOMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.

    - - -

    You can add menus with the MENUCOALITIONCOMMAND.New method, which constructs a MENUCOALITIONCOMMAND object and returns you the object reference. -Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENUCOALITIONCOMMAND.Remove.

    - - -
    -
    -
    -
    - - #MENU_COMMAND_BASE - -MENU_COMMAND_BASE - -
    -
    - -

    MENUCOMMANDBASE class, extends Base#BASE

    -
    -

    The MENUCOMMANDBASE class defines the main MENU class where other MENU COMMAND_ -classes are derived from, in order to set commands.

    - - -
    -
    -
    -
    - - #MENU_GROUP - -MENU_GROUP - -
    -
    - -

    MENU_GROUP class, extends Menu#MENU_BASE

    - -

    The MENU_GROUP class manages the main menus for coalitions.

    - - -

    You can add menus with the MENU_GROUP.New method, which constructs a MENU_GROUP object and returns you the object reference. -Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_GROUP.Remove.

    - - -

    Usage:

    -
     -- This demo creates a menu structure for the two groups of planes.
    - -- Each group will receive a different menu structure.
    - -- To test, join the planes, then look at the other radio menus (Option F10).
    - -- Then switch planes and check if the menu is still there.
    - -- And play with the Add and Remove menu options.
    - 
    - -- Note that in multi player, this will only work after the DCS groups bug is solved.
    -
    - local function ShowStatus( PlaneGroup, StatusText, Coalition )
    -
    -   MESSAGE:New( Coalition, 15 ):ToRed()
    -   PlaneGroup:Message( StatusText, 15 )
    - end
    -
    - local MenuStatus = {}
    -
    - local function RemoveStatusMenu( MenuGroup )
    -   local MenuGroupName = MenuGroup:GetName()
    -   MenuStatus[MenuGroupName]:Remove()
    - end
    -
    - --- @param Wrapper.Group#GROUP MenuGroup
    - local function AddStatusMenu( MenuGroup )
    -   local MenuGroupName = MenuGroup:GetName()
    -   -- This would create a menu for the red coalition under the MenuCoalitionRed menu object.
    -   MenuStatus[MenuGroupName] = MENU_GROUP:New( MenuGroup, "Status for Planes" )
    -   MENU_GROUP_COMMAND:New( MenuGroup, "Show Status", MenuStatus[MenuGroupName], ShowStatus, MenuGroup, "Status of planes is ok!", "Message to Red Coalition" )
    - end
    -
    - SCHEDULER:New( nil,
    -   function()
    -     local PlaneGroup = GROUP:FindByName( "Plane 1" )
    -     if PlaneGroup and PlaneGroup:IsAlive() then
    -       local MenuManage = MENU_GROUP:New( PlaneGroup, "Manage Menus" )
    -       MENU_GROUP_COMMAND:New( PlaneGroup, "Add Status Menu Plane 1", MenuManage, AddStatusMenu, PlaneGroup )
    -       MENU_GROUP_COMMAND:New( PlaneGroup, "Remove Status Menu Plane 1", MenuManage, RemoveStatusMenu, PlaneGroup )
    -     end
    -   end, {}, 10, 10 )
    -
    - SCHEDULER:New( nil,
    -   function()
    -     local PlaneGroup = GROUP:FindByName( "Plane 2" )
    -     if PlaneGroup and PlaneGroup:IsAlive() then
    -       local MenuManage = MENU_GROUP:New( PlaneGroup, "Manage Menus" )
    -       MENU_GROUP_COMMAND:New( PlaneGroup, "Add Status Menu Plane 2", MenuManage, AddStatusMenu, PlaneGroup )
    -       MENU_GROUP_COMMAND:New( PlaneGroup, "Remove Status Menu Plane 2", MenuManage, RemoveStatusMenu, PlaneGroup )
    -     end
    -   end, {}, 10, 10 )
    -
    - -
    -
    -
    -
    - - #MENU_GROUP_COMMAND - -MENU_GROUP_COMMAND - -
    -
    - -

    MENUGROUPCOMMAND class, extends Menu#MENUCOMMANDBASE

    - -

    The Menu#MENUGROUPCOMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.

    - - -

    You can add menus with the MENUGROUPCOMMAND.New method, which constructs a MENUGROUPCOMMAND object and returns you the object reference. -Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENUGROUPCOMMAND.Remove.

    - - -
    -
    -
    -
    - - - -MENU_INDEX - -
    -
    - - - -
    -
    -
    -
    - - #MENU_MISSION - -MENU_MISSION - -
    -
    - -

    MENU_MISSION class, extends Menu#MENU_BASE

    - -

    The MENU_MISSION class manages the main menus for a complete mission.

    - - -

    You can add menus with the MENU_MISSION.New method, which constructs a MENU_MISSION object and returns you the object reference. -Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_MISSION.Remove.

    - -
    -
    -
    -
    - - #MENU_MISSION_COMMAND - -MENU_MISSION_COMMAND - -
    -
    - -

    MENUMISSIONCOMMAND class, extends Menu#MENUCOMMANDBASE

    - -

    The MENUMISSIONCOMMAND class manages the command menus for a complete mission, which allow players to execute functions during mission execution.

    - - -

    You can add menus with the MENUMISSIONCOMMAND.New method, which constructs a MENUMISSIONCOMMAND object and returns you the object reference. -Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENUMISSIONCOMMAND.Remove.

    - - -
    -
    -

    Type Menu

    - -

    Type MENU_BASE

    -

    Field(s)

    -
    -
    - - -MENU_BASE:ClearParentMenu(MenuText) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      MenuText :

      - -
    • -
    -
    -
    -
    -
    - - -MENU_BASE:GetMenu(MenuText) - -
    -
    - -

    Gets a Menu from a parent Menu

    - -

    Parameter

    -
      -
    • - -

      #string MenuText : -The text of the child menu.

      - -
    • -
    -

    Return value

    - -

    #MENU_BASE:

    - - -
    -
    -
    -
    - - - -MENU_BASE.MenuTag - -
    -
    - - - -
    -
    -
    -
    - - - -MENU_BASE.MenuTime - -
    -
    - - - -
    -
    -
    -
    - - -MENU_BASE.New(#, self, MenuText, ParentMenu) - -
    -
    - -

    Consructor

    - -

    Parameters

    -
      -
    • - -

      # : -ENU_BASE

      - -
    • -
    • - -

      self :

      - -
    • -
    • - -

      MenuText :

      - -
    • -
    • - -

      ParentMenu :

      - -
    • -
    -

    Return value

    - -

    #MENU_BASE:

    - - -
    -
    -
    -
    - - -MENU_BASE:SetParentMenu(MenuText, Menu) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      MenuText :

      - -
    • -
    • - -

      Menu :

      - -
    • -
    -
    -
    -
    -
    - - -MENU_BASE:SetTag(MenuTag) - -
    -
    - -

    Sets a tag for later selection of menu refresh.

    - -

    Parameter

    -
      -
    • - -

      #string MenuTag : -A Tag or Key that will filter only menu items set with this key.

      - -
    • -
    -

    Return value

    - -

    #MENU_BASE:

    - - -
    -
    -
    -
    - - -MENU_BASE:SetTime(MenuTime) - -
    -
    - -

    Sets a time stamp for later prevention of menu removal.

    - -

    Parameter

    -
      -
    • - -

      MenuTime :

      - -
    • -
    -

    Return value

    - -

    #MENU_BASE:

    - - -
    -
    - -

    Type MENU_COALITION

    -

    Field(s)

    -
    -
    - - -MENU_COALITION.Menus - -
    -
    - - - -
    -
    -
    -
    - - -MENU_COALITION:New(Coalition, MenuText, ParentMenu) - -
    -
    - -

    MENU_COALITION constructor.

    - - -

    Creates a new MENU_COALITION object and creates the menu for a complete coalition.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSCoalition#coalition.side Coalition : -The coalition owning the menu.

      - -
    • -
    • - -

      #string MenuText : -The text for the menu.

      - -
    • -
    • - -

      #table ParentMenu : -The parent menu. This parameter can be ignored if you want the menu to be located at the perent menu of DCS world (under F10 other).

      - -
    • -
    -

    Return value

    - -

    #MENU_COALITION: -self

    - -
    -
    -
    -
    - - -MENU_COALITION:Remove(MenuTime, MenuTag) - -
    -
    - -

    Removes the main menu and the sub menus recursively of this MENU_COALITION.

    - -

    Parameters

    -
      -
    • - -

      MenuTime :

      - -
    • -
    • - -

      MenuTag :

      - -
    • -
    -

    Return value

    - -

    #nil:

    - - -
    -
    -
    -
    - - -MENU_COALITION:RemoveSubMenus() - -
    -
    - -

    Removes the sub menus recursively of this MENU_COALITION.

    - - -

    Note that the main menu is kept!

    - -

    Return value

    - -

    #MENU_COALITION:

    - - -
    -
    - -

    Type MENU_COALITION_COMMAND

    -

    Field(s)

    -
    -
    - - -MENU_COALITION_COMMAND:New(Coalition, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...) - -
    -
    - -

    MENU_COALITION constructor.

    - - -

    Creates a new radio command item for a coalition, which can invoke a function with parameters.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSCoalition#coalition.side Coalition : -The coalition owning the menu.

      - -
    • -
    • - -

      #string MenuText : -The text for the menu.

      - -
    • -
    • - -

      Menu#MENU_COALITION ParentMenu : -The parent menu.

      - -
    • -
    • - -

      CommandMenuFunction : -A function that is called when the menu key is pressed.

      - -
    • -
    • - -

      CommandMenuArgument : -An argument for the function. There can only be ONE argument given. So multiple arguments must be wrapped into a table. See the below example how to do this.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #MENUCOALITIONCOMMAND:

    - - -
    -
    -
    -
    - - -MENU_COALITION_COMMAND:Remove(MenuTime, MenuTag) - -
    -
    - -

    Removes a radio command item for a coalition

    - -

    Parameters

    -
      -
    • - -

      MenuTime :

      - -
    • -
    • - -

      MenuTag :

      - -
    • -
    -

    Return value

    - -

    #nil:

    - - -
    -
    - -

    Type MENU_COMMAND_BASE

    -

    Field(s)

    -
    -
    - - #function - -MENU_COMMAND_BASE.MenuCallHandler - -
    -
    - - - -
    -
    -
    -
    - - -MENU_COMMAND_BASE.New(#, self, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArguments) - -
    -
    - -

    Constructor

    - -

    Parameters

    -
      -
    • - -

      # : -ENUCOMMANDBASE

      - -
    • -
    • - -

      self :

      - -
    • -
    • - -

      MenuText :

      - -
    • -
    • - -

      ParentMenu :

      - -
    • -
    • - -

      CommandMenuFunction :

      - -
    • -
    • - -

      CommandMenuArguments :

      - -
    • -
    -

    Return value

    - -

    #MENUCOMMANDBASE:

    - - -
    -
    -
    -
    - - -MENU_COMMAND_BASE.SetCommandMenuArguments(#, self, CommandMenuArguments) - -
    -
    - -

    This sets the new command arguments of a menu, -so that if a menu is regenerated, or if command arguments change, -that the arguments set for the menu are loosely coupled with the menu itself!!! -If the arguments change, no new menu needs to be generated if the menu text is the same!!!

    - -

    Parameters

    -
      -
    • - -

      # : -ENUCOMMANDBASE

      - -
    • -
    • - -

      self :

      - -
    • -
    • - -

      CommandMenuArguments :

      - -
    • -
    -

    Return value

    - -

    #MENUCOMMANDBASE:

    - - -
    -
    -
    -
    - - -MENU_COMMAND_BASE.SetCommandMenuFunction(#, self, CommandMenuFunction) - -
    -
    - -

    This sets the new command function of a menu, -so that if a menu is regenerated, or if command function changes, -that the function set for the menu is loosely coupled with the menu itself!!! -If the function changes, no new menu needs to be generated if the menu text is the same!!!

    - -

    Parameters

    -
      -
    • - -

      # : -ENUCOMMANDBASE

      - -
    • -
    • - -

      self :

      - -
    • -
    • - -

      CommandMenuFunction :

      - -
    • -
    -

    Return value

    - -

    #MENUCOMMANDBASE:

    - - -
    -
    - -

    Type MENU_GROUP

    -

    Field(s)

    -
    -
    - - - -MENU_GROUP.Group - -
    -
    - - - -
    -
    -
    -
    - - - -MENU_GROUP.GroupID - -
    -
    - - - -
    -
    -
    -
    - - - -MENU_GROUP.MenuPath - -
    -
    - - - -
    -
    -
    -
    - - -MENU_GROUP.Menus - -
    -
    - - - -
    -
    -
    -
    - - -MENU_GROUP:New(Group, MenuText, ParentMenu) - -
    -
    - -

    MENU_GROUP constructor.

    - - -

    Creates a new radio menu item for a group.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP Group : -The Group owning the menu.

      - -
    • -
    • - -

      #string MenuText : -The text for the menu.

      - -
    • -
    • - -

      #table ParentMenu : -The parent menu.

      - -
    • -
    -

    Return value

    - -

    #MENU_GROUP: -self

    - -
    -
    -
    -
    - - -MENU_GROUP:Remove(MenuTime, MenuTag) - -
    -
    - -

    Removes the main menu and sub menus recursively of this MENU_GROUP.

    - -

    Parameters

    -
      -
    • - -

      MenuTime :

      - -
    • -
    • - -

      MenuTag : -A Tag or Key to filter the menus to be refreshed with the Tag set.

      - -
    • -
    -

    Return value

    - -

    #nil:

    - - -
    -
    -
    -
    - - -MENU_GROUP:RemoveSubMenus(MenuTime, MenuTag) - -
    -
    - -

    Removes the sub menus recursively of this MENU_GROUP.

    - -

    Parameters

    -
      -
    • - -

      MenuTime :

      - -
    • -
    • - -

      MenuTag : -A Tag or Key to filter the menus to be refreshed with the Tag set.

      - -
    • -
    -

    Return value

    - -

    #MENU_GROUP: -self

    - -
    -
    - -

    Type MENU_GROUP_COMMAND

    -

    Field(s)

    -
    -
    - - - -MENU_GROUP_COMMAND.Group - -
    -
    - - - -
    -
    -
    -
    - - - -MENU_GROUP_COMMAND.GroupID - -
    -
    - - - -
    -
    -
    -
    - - - -MENU_GROUP_COMMAND.MenuPath - -
    -
    - - - -
    -
    -
    -
    - - -MENU_GROUP_COMMAND:New(Group, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...) - -
    -
    - -

    Creates a new radio command item for a group

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP Group : -The Group owning the menu.

      - -
    • -
    • - -

      MenuText : -The text for the menu.

      - -
    • -
    • - -

      ParentMenu : -The parent menu.

      - -
    • -
    • - -

      CommandMenuFunction : -A function that is called when the menu key is pressed.

      - -
    • -
    • - -

      CommandMenuArgument : -An argument for the function.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #MENUGROUPCOMMAND:

    - - -
    -
    -
    -
    - - -MENU_GROUP_COMMAND:Remove(MenuTime, MenuTag) - -
    -
    - -

    Removes a menu structure for a group.

    - -

    Parameters

    -
      -
    • - -

      MenuTime :

      - -
    • -
    • - -

      MenuTag : -A Tag or Key to filter the menus to be refreshed with the Tag set.

      - -
    • -
    -

    Return value

    - -

    #nil:

    - - -
    -
    - -

    Type MENU_MISSION

    -

    Field(s)

    -
    -
    - - -MENU_MISSION.Menus - -
    -
    - - - -
    -
    -
    -
    - - -MENU_MISSION:New(MenuText, ParentMenu) - -
    -
    - -

    MENU_MISSION constructor.

    - - -

    Creates a new MENU_MISSION object and creates the menu for a complete mission file.

    - -

    Parameters

    -
      -
    • - -

      #string MenuText : -The text for the menu.

      - -
    • -
    • - -

      #table ParentMenu : -The parent menu. This parameter can be ignored if you want the menu to be located at the perent menu of DCS world (under F10 other).

      - -
    • -
    -

    Return value

    - -

    #MENU_MISSION:

    - - -
    -
    -
    -
    - - -MENU_MISSION:Remove(MenuTime, MenuTag) - -
    -
    - -

    Removes the main menu and the sub menus recursively of this MENU_MISSION.

    - -

    Parameters

    -
      -
    • - -

      MenuTime :

      - -
    • -
    • - -

      MenuTag :

      - -
    • -
    -

    Return value

    - -

    #nil:

    - - -
    -
    -
    -
    - - -MENU_MISSION:RemoveSubMenus() - -
    -
    - -

    Removes the sub menus recursively of this MENU_MISSION.

    - - -

    Note that the main menu is kept!

    - -

    Return value

    - -

    #MENU_MISSION:

    - - -
    -
    - -

    Type MENU_MISSION_COMMAND

    -

    Field(s)

    -
    -
    - - -MENU_MISSION_COMMAND:New(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...) - -
    -
    - -

    MENU_MISSION constructor.

    - - -

    Creates a new radio command item for a complete mission file, which can invoke a function with parameters.

    - -

    Parameters

    -
      -
    • - -

      #string MenuText : -The text for the menu.

      - -
    • -
    • - -

      Menu#MENU_MISSION ParentMenu : -The parent menu.

      - -
    • -
    • - -

      CommandMenuFunction : -A function that is called when the menu key is pressed.

      - -
    • -
    • - -

      CommandMenuArgument : -An argument for the function. There can only be ONE argument given. So multiple arguments must be wrapped into a table. See the below example how to do this.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #MENUMISSIONCOMMAND: -self

    - -
    -
    -
    -
    - - -MENU_MISSION_COMMAND:Remove() - -
    -
    - -

    Removes a radio command item for a coalition

    - -

    Return value

    - -

    #nil:

    - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Message.html b/docs/Documentation/Message.html deleted file mode 100644 index 6077791d6..000000000 --- a/docs/Documentation/Message.html +++ /dev/null @@ -1,804 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Message

    - -

    Core -- MESSAGE class takes are of the real-time notifications and messages to players during a simulation.

    - - - -

    Banner Image

    - -
    - - -

    Global(s)

    - - - - - -
    MESSAGE -

    MESSAGE class, extends Base#BASE

    - -

    Message System to display Messages to Clients, Coalitions or All.

    -
    -

    Type MESSAGE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    MESSAGE.MessageCategory - -
    MESSAGE.MessageDuration - -
    MESSAGE:New(MessageText, MessageDuration, MessageCategory) -

    Creates a new MESSAGE object.

    -
    MESSAGE:NewType(MessageText, MessageType) -

    Creates a new MESSAGE object of a certain type.

    -
    MESSAGE:ToAll() -

    Sends a MESSAGE to all players.

    -
    MESSAGE:ToAllIf(Condition) -

    Sends a MESSAGE to all players if the given Condition is true.

    -
    MESSAGE:ToBlue() -

    Sends a MESSAGE to the Blue coalition.

    -
    MESSAGE:ToClient(Client, Settings) -

    Sends a MESSAGE to a Client Group.

    -
    MESSAGE:ToCoalition(CoalitionSide, Settings) -

    Sends a MESSAGE to a Coalition.

    -
    MESSAGE:ToCoalitionIf(CoalitionSide, Condition) -

    Sends a MESSAGE to a Coalition if the given Condition is true.

    -
    MESSAGE:ToGroup(Group, Settings) -

    Sends a MESSAGE to a Group.

    -
    MESSAGE:ToRed() -

    Sends a MESSAGE to the Red Coalition.

    -
    MESSAGE.Type - -
    - -

    Type MESSAGE.Type

    - - - - - - - - - - - - - - - - - - - - - -
    MESSAGE.Type.Briefing - -
    MESSAGE.Type.Detailed - -
    MESSAGE.Type.Information - -
    MESSAGE.Type.Overview - -
    MESSAGE.Type.Update - -
    - -

    Global(s)

    -
    -
    - - #MESSAGE - -MESSAGE - -
    -
    - -

    MESSAGE class, extends Base#BASE

    - -

    Message System to display Messages to Clients, Coalitions or All.

    - - -

    Messages are shown on the display panel for an amount of seconds, and will then disappear. -Messages can contain a category which is indicating the category of the message.

    - -

    MESSAGE construction

    - -

    Messages are created with Message#MESSAGE.New. Note that when the MESSAGE object is created, no message is sent yet. -To send messages, you need to use the To functions.

    - -

    Send messages to an audience

    - -

    Messages are sent:

    - - - -

    Send conditionally to an audience

    - -

    Messages can be sent conditionally to an audience (when a condition is true):

    - - - -
    - -

    Author: Sven Van de Velde (FlightControl)

    -

    Contributions:

    - -
    - - -
    -
    -

    Type Message

    - -

    Type MESSAGE

    - -

    The MESSAGE class

    - -

    Field(s)

    -
    -
    - - #string - -MESSAGE.MessageCategory - -
    -
    - - - - -

    self.MessageType .. ": "

    - -
    -
    -
    -
    - - - -MESSAGE.MessageDuration - -
    -
    - - - -
    -
    -
    -
    - - -MESSAGE:New(MessageText, MessageDuration, MessageCategory) - -
    -
    - -

    Creates a new MESSAGE object.

    - - -

    Note that these MESSAGE objects are not yet displayed on the display panel. You must use the functions ToClient or ToCoalition or ToAll to send these Messages to the respective recipients.

    - -

    Parameters

    -
      -
    • - -

      #string MessageText : -is the text of the Message.

      - -
    • -
    • - -

      #number MessageDuration : -is a number in seconds of how long the MESSAGE should be shown on the display panel.

      - -
    • -
    • - -

      #string MessageCategory : -(optional) is a string expressing the "category" of the Message. The category will be shown as the first text in the message followed by a ": ".

      - -
    • -
    -

    Return value

    - -

    #MESSAGE:

    - - -

    Usage:

    -
    -- Create a series of new Messages.
    --- MessageAll is meant to be sent to all players, for 25 seconds, and is classified as "Score".
    --- MessageRED is meant to be sent to the RED players only, for 10 seconds, and is classified as "End of Mission", with ID "Win".
    --- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
    --- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
    -MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!",  25, "End of Mission" )
    -MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", 25, "Penalty" )
    -MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target",  25, "Score" )
    -MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", 25, "Score")
    - -
    -
    -
    -
    - - -MESSAGE:NewType(MessageText, MessageType) - -
    -
    - -

    Creates a new MESSAGE object of a certain type.

    - - -

    Note that these MESSAGE objects are not yet displayed on the display panel. -You must use the functions ToClient or ToCoalition or ToAll to send these Messages to the respective recipients. -The message display times are automatically defined based on the timing settings in the Settings menu.

    - -

    Parameters

    -
      -
    • - -

      #string MessageText : -is the text of the Message.

      - -
    • -
    • - -

      #MESSAGE.Type MessageType : -The type of the message.

      - -
    • -
    -

    Return value

    - -

    #MESSAGE:

    - - -

    Usage:

    -
      MessageAll = MESSAGE:NewType( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", MESSAGE.Type.Information )
    -  MessageRED = MESSAGE:NewType( "To the RED Players: You receive a penalty because you've killed one of your own units", MESSAGE.Type.Information )
    -  MessageClient1 = MESSAGE:NewType( "Congratulations, you've just hit a target", MESSAGE.Type.Update )
    -  MessageClient2 = MESSAGE:NewType( "Congratulations, you've just killed a target", MESSAGE.Type.Update )
    - -
    -
    -
    -
    - - -MESSAGE:ToAll() - -
    -
    - -

    Sends a MESSAGE to all players.

    - -

    Return value

    - -

    #MESSAGE:

    - - -

    Usage:

    -
    -- Send a message created to all players.
    -MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" ):ToAll()
    -or
    -MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" ):ToAll()
    -or
    -MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" )
    -MessageAll:ToAll()
    - -
    -
    -
    -
    - - -MESSAGE:ToAllIf(Condition) - -
    -
    - -

    Sends a MESSAGE to all players if the given Condition is true.

    - -

    Parameter

    -
      -
    • - -

      Condition :

      - -
    • -
    -

    Return value

    - -

    #MESSAGE:

    - - -
    -
    -
    -
    - - -MESSAGE:ToBlue() - -
    -
    - -

    Sends a MESSAGE to the Blue coalition.

    - -

    Return value

    - -

    #MESSAGE:

    - - -

    Usage:

    -
    -- Send a message created with the @{New} method to the BLUE coalition.
    -MessageBLUE = MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToBlue()
    -or
    -MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToBlue()
    -or
    -MessageBLUE = MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" )
    -MessageBLUE:ToBlue()
    - -
    -
    -
    -
    - - -MESSAGE:ToClient(Client, Settings) - -
    -
    - -

    Sends a MESSAGE to a Client Group.

    - - -

    Note that the Group needs to be defined within the ME with the skillset "Client" or "Player".

    - -

    Parameters

    - -

    Return value

    - -

    #MESSAGE:

    - - -

    Usage:

    -
    -- Send the 2 messages created with the @{New} method to the Client Group.
    --- Note that the Message of MessageClient2 is overwriting the Message of MessageClient1.
    -ClientGroup = Group.getByName( "ClientGroup" )
    -
    -MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25, "Score" ):ToClient( ClientGroup )
    -MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" ):ToClient( ClientGroup )
    -or
    -MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25, "Score" ):ToClient( ClientGroup )
    -MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" ):ToClient( ClientGroup )
    -or
    -MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25, "Score" )
    -MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" )
    -MessageClient1:ToClient( ClientGroup )
    -MessageClient2:ToClient( ClientGroup )
    - -
    -
    -
    -
    - - -MESSAGE:ToCoalition(CoalitionSide, Settings) - -
    -
    - -

    Sends a MESSAGE to a Coalition.

    - -

    Parameters

    -
      -
    • - -

      CoalitionSide : -needs to be filled out by the defined structure of the standard scripting engine coalition.side.

      - -
    • -
    • - -

      Settings :

      - -
    • -
    -

    Return value

    - -

    #MESSAGE:

    - - -

    Usage:

    -
    -- Send a message created with the @{New} method to the RED coalition.
    -MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToCoalition( coalition.side.RED )
    -or
    -MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToCoalition( coalition.side.RED )
    -or
    -MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" )
    -MessageRED:ToCoalition( coalition.side.RED )
    - -
    -
    -
    -
    - - -MESSAGE:ToCoalitionIf(CoalitionSide, Condition) - -
    -
    - -

    Sends a MESSAGE to a Coalition if the given Condition is true.

    - -

    Parameters

    -
      -
    • - -

      CoalitionSide : -needs to be filled out by the defined structure of the standard scripting engine coalition.side.

      - -
    • -
    • - -

      Condition :

      - -
    • -
    -

    Return value

    - -

    #MESSAGE:

    - - -
    -
    -
    -
    - - -MESSAGE:ToGroup(Group, Settings) - -
    -
    - -

    Sends a MESSAGE to a Group.

    - -

    Parameters

    - -

    Return value

    - -

    #MESSAGE:

    - - -
    -
    -
    -
    - - -MESSAGE:ToRed() - -
    -
    - -

    Sends a MESSAGE to the Red Coalition.

    - -

    Return value

    - -

    #MESSAGE:

    - - -

    Usage:

    -
    -- Send a message created with the @{New} method to the RED coalition.
    -MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToRed()
    -or
    -MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToRed()
    -or
    -MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" )
    -MessageRED:ToRed()
    - -
    -
    -
    -
    - - #MESSAGE.Type - -MESSAGE.Type - -
    -
    - - - -
    -
    - -

    Type MESSAGE.Type

    - -

    Message Types

    - -

    Field(s)

    -
    -
    - - #string - -MESSAGE.Type.Briefing - -
    -
    - - - -
    -
    -
    -
    - - #string - -MESSAGE.Type.Detailed - -
    -
    - - - -
    -
    -
    -
    - - #string - -MESSAGE.Type.Information - -
    -
    - - - -
    -
    -
    -
    - - #string - -MESSAGE.Type.Overview - -
    -
    - - - -
    -
    -
    -
    - - #string - -MESSAGE.Type.Update - -
    -
    - - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/MissileTrainer.html b/docs/Documentation/MissileTrainer.html deleted file mode 100644 index eb2909293..000000000 --- a/docs/Documentation/MissileTrainer.html +++ /dev/null @@ -1,1066 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module MissileTrainer

    - -

    Functional -- MISSILETRAINER helps you to train missile avoidance.

    - - - -
    - -

    1) MissileTrainer#MISSILETRAINER class, extends Base#BASE

    -

    The #MISSILETRAINER class uses the DCS world messaging system to be alerted of any missiles fired, and when a missile would hit your aircraft, -the class will destroy the missile within a certain range, to avoid damage to your aircraft. -It suports the following functionality:

    - -
      -
    • Track the missiles fired at you and other players, providing bearing and range information of the missiles towards the airplanes.
    • -
    • Provide alerts of missile launches, including detailed information of the units launching, including bearing, range �
    • -
    • Provide alerts when a missile would have killed your aircraft.
    • -
    • Provide alerts when the missile self destructs.
    • -
    • Enable / Disable and Configure the Missile Trainer using the various menu options.
    • -
    - -

    When running a mission where MISSILETRAINER is used, the following radio menu structure ( 'Radio Menu' -> 'Other (F10)' -> 'MissileTrainer' ) options are available for the players:

    - -
      -
    • Messages: Menu to configure all messages. -
        -
      • Messages On: Show all messages.
      • -
      • Messages Off: Disable all messages.
      • -
    • -
    • Tracking: Menu to configure missile tracking messages. -
        -
      • To All: Shows missile tracking messages to all players.
      • -
      • To Target: Shows missile tracking messages only to the player where the missile is targetted at.
      • -
      • Tracking On: Show missile tracking messages.
      • -
      • Tracking Off: Disable missile tracking messages.
      • -
      • Frequency Increase: Increases the missile tracking message frequency with one second.
      • -
      • Frequency Decrease: Decreases the missile tracking message frequency with one second.
      • -
    • -
    • Alerts: Menu to configure alert messages. -
        -
      • To All: Shows alert messages to all players.
      • -
      • To Target: Shows alert messages only to the player where the missile is (was) targetted at.
      • -
      • Hits On: Show missile hit alert messages.
      • -
      • Hits Off: Disable missile hit alert messages.
      • -
      • Launches On: Show missile launch messages.
      • -
      • Launches Off: Disable missile launch messages.
      • -
    • -
    • Details: Menu to configure message details. -
        -
      • Range On: Shows range information when a missile is fired to a target.
      • -
      • Range Off: Disable range information when a missile is fired to a target.
      • -
      • Bearing On: Shows bearing information when a missile is fired to a target.
      • -
      • Bearing Off: Disable bearing information when a missile is fired to a target.
      • -
    • -
    • Distance: Menu to configure the distance when a missile needs to be destroyed when near to a player, during tracking. This will improve/influence hit calculation accuracy, but has the risk of damaging the aircraft when the missile reaches the aircraft before the distance is measured. -
        -
      • 50 meter: Destroys the missile when the distance to the aircraft is below or equal to 50 meter.
      • -
      • 100 meter: Destroys the missile when the distance to the aircraft is below or equal to 100 meter.
      • -
      • 150 meter: Destroys the missile when the distance to the aircraft is below or equal to 150 meter.
      • -
      • 200 meter: Destroys the missile when the distance to the aircraft is below or equal to 200 meter.
      • -
    • -
    - - -

    1.1) MISSILETRAINER construction methods:

    -

    Create a new MISSILETRAINER object with the MISSILETRAINER.New method:

    - -
      -
    • MISSILETRAINER.New: Creates a new MISSILETRAINER object taking the maximum distance to your aircraft to evaluate when a missile needs to be destroyed.
    • -
    - -

    MISSILETRAINER will collect each unit declared in the mission with a skill level "Client" and "Player", and will monitor the missiles shot at those.

    - -

    1.2) MISSILETRAINER initialization methods:

    -

    A MISSILETRAINER object will behave differently based on the usage of initialization methods:

    - - - -
    - -

    CREDITS

    -

    Stuka (Danny) Who you can search on the Eagle Dynamics Forums. -Working together with Danny has resulted in the MISSILETRAINER class. -Danny has shared his ideas and together we made a design. -Together with the 476 virtual team, we tested the MISSILETRAINER class, and got much positive feedback!

    - - -

    Global(s)

    - - - - - -
    MISSILETRAINER - -
    -

    Type MISSILETRAINER

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    MISSILETRAINER.AlertsHitsOnOff - -
    MISSILETRAINER.AlertsLaunchesOnOff - -
    MISSILETRAINER.AlertsToAll - -
    MISSILETRAINER.ClassName - -
    MISSILETRAINER.DBClients - -
    MISSILETRAINER.DetailsBearingOnOff - -
    MISSILETRAINER.DetailsRangeOnOff - -
    MISSILETRAINER:InitAlertsHitsOnOff(AlertsHitsOnOff) -

    Sets by default the display of hit alerts ON or OFF.

    -
    MISSILETRAINER:InitAlertsLaunchesOnOff(AlertsLaunchesOnOff) -

    Sets by default the display of launch alerts ON or OFF.

    -
    MISSILETRAINER:InitAlertsToAll(AlertsToAll) -

    Sets by default the display of alerts to be shown to all players or only to you.

    -
    MISSILETRAINER:InitBearingOnOff(DetailsBearingOnOff) -

    Sets by default the display of bearing information of missiles ON of OFF.

    -
    MISSILETRAINER:InitMenusOnOff(MenusOnOff) -

    Enables / Disables the menus.

    -
    MISSILETRAINER:InitMessagesOnOff(MessagesOnOff) -

    Sets by default the display of any message to be ON or OFF.

    -
    MISSILETRAINER:InitRangeOnOff(DetailsRangeOnOff) -

    Sets by default the display of range information of missiles ON of OFF.

    -
    MISSILETRAINER:InitTrackingFrequency(TrackingFrequency) -

    Increases, decreases the missile tracking message display frequency with the provided time interval in seconds.

    -
    MISSILETRAINER:InitTrackingOnOff(TrackingOnOff) -

    Sets by default the display of missile tracking report to be ON or OFF.

    -
    MISSILETRAINER:InitTrackingToAll(TrackingToAll) -

    Sets by default the missile tracking report for all players or only for those missiles targetted to you.

    -
    MISSILETRAINER.MenusOnOff - -
    MISSILETRAINER.MessagesOnOff - -
    MISSILETRAINER:New(Distance, Briefing) -

    Creates the main object which is handling missile tracking.

    -
    MISSILETRAINER:OnEventShot(EventData, EVentData) -

    Detects if an SA site was shot with an anti radiation missile.

    -
    MISSILETRAINER.TrackingFrequency - -
    MISSILETRAINER.TrackingMissiles - -
    MISSILETRAINER.TrackingOnOff - -
    MISSILETRAINER.TrackingToAll - -
    MISSILETRAINER:_AddBearing(Client, TrainerWeapon) - -
    MISSILETRAINER:_AddRange(Client, TrainerWeapon) - -
    MISSILETRAINER._Alive(Client, self) - -
    MISSILETRAINER._MenuMessages(MenuParameters) - -
    MISSILETRAINER:_TrackMissiles() - -
    - -

    Global(s)

    -
    -
    - - #MISSILETRAINER - -MISSILETRAINER - -
    -
    - - - -
    -
    -

    Type MissileTrainer

    - -

    Type MISSILETRAINER

    - -

    The MISSILETRAINER class

    - -

    Field(s)

    -
    -
    - - - -MISSILETRAINER.AlertsHitsOnOff - -
    -
    - - - -
    -
    -
    -
    - - - -MISSILETRAINER.AlertsLaunchesOnOff - -
    -
    - - - -
    -
    -
    -
    - - - -MISSILETRAINER.AlertsToAll - -
    -
    - - - -
    -
    -
    -
    - - #string - -MISSILETRAINER.ClassName - -
    -
    - - - -
    -
    -
    -
    - - Core.Set#SET_CLIENT - -MISSILETRAINER.DBClients - -
    -
    - - - -
    -
    -
    -
    - - - -MISSILETRAINER.DetailsBearingOnOff - -
    -
    - - - -
    -
    -
    -
    - - - -MISSILETRAINER.DetailsRangeOnOff - -
    -
    - - - -
    -
    -
    -
    - - -MISSILETRAINER:InitAlertsHitsOnOff(AlertsHitsOnOff) - -
    -
    - -

    Sets by default the display of hit alerts ON or OFF.

    - -

    Parameter

    -
      -
    • - -

      #boolean AlertsHitsOnOff : -true or false

      - -
    • -
    -

    Return value

    - -

    #MISSILETRAINER: -self

    - -
    -
    -
    -
    - - -MISSILETRAINER:InitAlertsLaunchesOnOff(AlertsLaunchesOnOff) - -
    -
    - -

    Sets by default the display of launch alerts ON or OFF.

    - -

    Parameter

    -
      -
    • - -

      #boolean AlertsLaunchesOnOff : -true or false

      - -
    • -
    -

    Return value

    - -

    #MISSILETRAINER: -self

    - -
    -
    -
    -
    - - -MISSILETRAINER:InitAlertsToAll(AlertsToAll) - -
    -
    - -

    Sets by default the display of alerts to be shown to all players or only to you.

    - -

    Parameter

    -
      -
    • - -

      #boolean AlertsToAll : -true or false

      - -
    • -
    -

    Return value

    - -

    #MISSILETRAINER: -self

    - -
    -
    -
    -
    - - -MISSILETRAINER:InitBearingOnOff(DetailsBearingOnOff) - -
    -
    - -

    Sets by default the display of bearing information of missiles ON of OFF.

    - -

    Parameter

    -
      -
    • - -

      #boolean DetailsBearingOnOff : -true or false

      - -
    • -
    -

    Return value

    - -

    #MISSILETRAINER: -self

    - -
    -
    -
    -
    - - -MISSILETRAINER:InitMenusOnOff(MenusOnOff) - -
    -
    - -

    Enables / Disables the menus.

    - -

    Parameter

    -
      -
    • - -

      #boolean MenusOnOff : -true or false

      - -
    • -
    -

    Return value

    - -

    #MISSILETRAINER: -self

    - -
    -
    -
    -
    - - -MISSILETRAINER:InitMessagesOnOff(MessagesOnOff) - -
    -
    - -

    Sets by default the display of any message to be ON or OFF.

    - -

    Parameter

    -
      -
    • - -

      #boolean MessagesOnOff : -true or false

      - -
    • -
    -

    Return value

    - -

    #MISSILETRAINER: -self

    - -
    -
    -
    -
    - - -MISSILETRAINER:InitRangeOnOff(DetailsRangeOnOff) - -
    -
    - -

    Sets by default the display of range information of missiles ON of OFF.

    - -

    Parameter

    -
      -
    • - -

      #boolean DetailsRangeOnOff : -true or false

      - -
    • -
    -

    Return value

    - -

    #MISSILETRAINER: -self

    - -
    -
    -
    -
    - - -MISSILETRAINER:InitTrackingFrequency(TrackingFrequency) - -
    -
    - -

    Increases, decreases the missile tracking message display frequency with the provided time interval in seconds.

    - - -

    The default frequency is a 3 second interval, so the Tracking Frequency parameter specifies the increase or decrease from the default 3 seconds or the last frequency update.

    - -

    Parameter

    -
      -
    • - -

      #number TrackingFrequency : -Provide a negative or positive value in seconds to incraese or decrease the display frequency.

      - -
    • -
    -

    Return value

    - -

    #MISSILETRAINER: -self

    - -
    -
    -
    -
    - - -MISSILETRAINER:InitTrackingOnOff(TrackingOnOff) - -
    -
    - -

    Sets by default the display of missile tracking report to be ON or OFF.

    - -

    Parameter

    -
      -
    • - -

      #boolean TrackingOnOff : -true or false

      - -
    • -
    -

    Return value

    - -

    #MISSILETRAINER: -self

    - -
    -
    -
    -
    - - -MISSILETRAINER:InitTrackingToAll(TrackingToAll) - -
    -
    - -

    Sets by default the missile tracking report for all players or only for those missiles targetted to you.

    - -

    Parameter

    -
      -
    • - -

      #boolean TrackingToAll : -true or false

      - -
    • -
    -

    Return value

    - -

    #MISSILETRAINER: -self

    - -
    -
    -
    -
    - - - -MISSILETRAINER.MenusOnOff - -
    -
    - - - -
    -
    -
    -
    - - - -MISSILETRAINER.MessagesOnOff - -
    -
    - - - -
    -
    -
    -
    - - -MISSILETRAINER:New(Distance, Briefing) - -
    -
    - -

    Creates the main object which is handling missile tracking.

    - - -

    When a missile is fired a SCHEDULER is set off that follows the missile. When near a certain a client player, the missile will be destroyed.

    - -

    Parameters

    -
      -
    • - -

      #number Distance : -The distance in meters when a tracked missile needs to be destroyed when close to a player.

      - -
    • -
    • - -

      #string Briefing : -(Optional) Will show a text to the players when starting their mission. Can be used for briefing purposes.

      - -
    • -
    -

    Return value

    - -

    #MISSILETRAINER:

    - - -
    -
    -
    -
    - - -MISSILETRAINER:OnEventShot(EventData, EVentData) - -
    -
    - -

    Detects if an SA site was shot with an anti radiation missile.

    - - -

    In this case, take evasive actions based on the skill level set within the ME.

    - -

    Parameters

    - -
    -
    -
    -
    - - -MISSILETRAINER.TrackingFrequency - -
    -
    - - - -
    -
    -
    -
    - - - -MISSILETRAINER.TrackingMissiles - -
    -
    - - - -
    -
    -
    -
    - - - -MISSILETRAINER.TrackingOnOff - -
    -
    - - - -
    -
    -
    -
    - - - -MISSILETRAINER.TrackingToAll - -
    -
    - - - -
    -
    -
    -
    - - -MISSILETRAINER:_AddBearing(Client, TrainerWeapon) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Client :

      - -
    • -
    • - -

      TrainerWeapon :

      - -
    • -
    -
    -
    -
    -
    - - -MISSILETRAINER:_AddRange(Client, TrainerWeapon) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Client :

      - -
    • -
    • - -

      TrainerWeapon :

      - -
    • -
    -
    -
    -
    -
    - - -MISSILETRAINER._Alive(Client, self) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Client :

      - -
    • -
    • - -

      self :

      - -
    • -
    -
    -
    -
    -
    - - -MISSILETRAINER._MenuMessages(MenuParameters) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      MenuParameters :

      - -
    • -
    -
    -
    -
    -
    - - -MISSILETRAINER:_TrackMissiles() - -
    -
    - - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Mission.html b/docs/Documentation/Mission.html deleted file mode 100644 index 626416cef..000000000 --- a/docs/Documentation/Mission.html +++ /dev/null @@ -1,2775 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Mission

    - -

    Tasking -- A MISSION is the main owner of a Mission orchestration within MOOSE.

    - - - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - -
    MISSION - -
    -

    Type MISSION

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    MISSION:AbortUnit(PlayerUnit) -

    Aborts a PlayerUnit from the Mission.

    -
    MISSION:AddPlayerName(PlayerName) - -
    MISSION:AddScoring(Scoring) -

    Add a scoring to the mission.

    -
    MISSION:AddTask(Task) -

    Register a Task to be completed within the Mission.

    -
    MISSION.AssignedGroups - -
    MISSION.ClassName - -
    MISSION:ClearGroupAssignment(MissionGroup) -

    Clear the Group assignment from the Mission.

    -
    MISSION:Complete() -

    Synchronous Event Trigger for Event Complete.

    -
    MISSION:CrashUnit(PlayerUnit) -

    Handles a crash of a PlayerUnit from the Mission.

    -
    MISSION:Fail() -

    Synchronous Event Trigger for Event Fail.

    -
    MISSION:GetCommandCenter() -

    Gets the COMMANDCENTER.

    -
    MISSION:GetGroups() -

    Get the groups for which TASKS are given in the mission

    -
    MISSION:GetMenu(TaskGroup) -

    Gets the mission menu for the TaskGroup.

    -
    MISSION:GetName() -

    Gets the mission name.

    -
    MISSION:GetNextTaskID(Task) -

    Return the next Task ID to be completed within the Mission.

    -
    MISSION:GetPlayerNames() - -
    MISSION:GetRootMenu(TaskGroup) -

    Gets the root mission menu for the TaskGroup.

    -
    MISSION:GetScoring() -

    Get the scoring object of a mission.

    -
    MISSION.GetTask(TaskName, self) -

    Get the TASK identified by the TaskNumber from the Mission.

    -
    MISSION:GetTaskTypes() - -
    MISSION:GetTasks() -

    Get all the TASKs from the Mission.

    -
    MISSION:GetTasksRemaining() - -
    MISSION.HasGroup(#, self, TaskGroup) -

    Validates if the Mission has a Group

    -
    MISSION:IsCOMPLETED() -

    Is the Mission COMPLETED.

    -
    MISSION:IsENGAGED() -

    Is the Mission ENGAGED.

    -
    MISSION:IsFAILED() -

    Is the Mission FAILED.

    -
    MISSION:IsGroupAssigned(MissionGroup) -

    Returns if the Mission is assigned to the Group.

    -
    MISSION:IsHOLD() -

    Is the Mission HOLD.

    -
    MISSION:IsIDLE() -

    Is the Mission IDLE.

    -
    MISSION:JoinUnit(PlayerUnit, PlayerGroup) -

    Add a Unit to join the Mission.

    -
    MISSION:MenuReportBriefing(ReportGroup) -

    Reports the briefing.

    -
    MISSION:MenuReportPlayersPerTask(ReportGroup) - -
    MISSION:MenuReportPlayersProgress(ReportGroup) - -
    MISSION:MenuReportTasksPerStatus(TaskStatus, ReportGroup) - -
    MISSION:MenuReportTasksSummary(ReportGroup) -

    Report the task summary.

    -
    MISSION.MissionBriefing - -
    MISSION:MissionGoals() -

    MissionGoals Trigger for MISSION

    -
    MISSION.MissionGroupMenu - -
    MISSION.MissionMenu - -
    MISSION.MissionStatus - -
    MISSION.Name - -
    MISSION:New(CommandCenter, MissionName, MissionPriority, MissionBriefing, MissionCoalition) -

    This is the main MISSION declaration method.

    -
    MISSION:OnAfterComplete(From, Event, To) -

    OnAfter Transition Handler for Event Complete.

    -
    MISSION:OnAfterFail(From, Event, To) -

    OnAfter Transition Handler for Event Fail.

    -
    MISSION:OnAfterMissionGoals(From, Event, To) -

    MissionGoals Handler OnAfter for MISSION

    -
    MISSION:OnAfterStart(From, Event, To) -

    OnAfter Transition Handler for Event Start.

    -
    MISSION:OnAfterStop(From, Event, To) -

    OnAfter Transition Handler for Event Stop.

    -
    MISSION:OnBeforeComplete(From, Event, To) -

    OnBefore Transition Handler for Event Complete.

    -
    MISSION:OnBeforeFail(From, Event, To) -

    OnBefore Transition Handler for Event Fail.

    -
    MISSION:OnBeforeMissionGoals(From, Event, To) -

    MissionGoals Handler OnBefore for MISSION

    -
    MISSION:OnBeforeStart(From, Event, To) -

    OnBefore Transition Handler for Event Start.

    -
    MISSION:OnBeforeStop(From, Event, To) -

    OnBefore Transition Handler for Event Stop.

    -
    MISSION:OnEnterCOMPLETED(From, Event, To) -

    OnEnter Transition Handler for State COMPLETED.

    -
    MISSION:OnEnterENGAGED(From, Event, To) -

    OnEnter Transition Handler for State ENGAGED.

    -
    MISSION:OnEnterFAILED(From, Event, To) -

    OnEnter Transition Handler for State FAILED.

    -
    MISSION:OnEnterIDLE(From, Event, To) -

    OnEnter Transition Handler for State IDLE.

    -
    MISSION:OnLeaveCOMPLETED(From, Event, To) -

    OnLeave Transition Handler for State COMPLETED.

    -
    MISSION:OnLeaveENGAGED(From, Event, To) -

    OnLeave Transition Handler for State ENGAGED.

    -
    MISSION:OnLeaveFAILED(From, Event, To) -

    OnLeave Transition Handler for State FAILED.

    -
    MISSION:OnLeaveIDLE(From, Event, To) -

    OnLeave Transition Handler for State IDLE.

    -
    MISSION:RemoveMenu(MenuTime) -

    Removes the Planned Task menu.

    -
    MISSION:RemoveTask(Task) -

    Removes a Task to be completed within the Mission.

    -
    MISSION:RemoveTaskMenu(Task) -

    Removes a Task menu.

    -
    MISSION:ReportBriefing() -

    Create a briefing report of the Mission.

    -
    MISSION:ReportDetails(ReportGroup) -

    Create a detailed report of the Mission, listing all the details of the Task.

    -
    MISSION:ReportOverview(ReportGroup, TaskStatus) -

    Create a overview report of the Mission (multiple lines).

    -
    MISSION:ReportPlayersPerTask(ReportGroup) -

    Create an active player report of the Mission.

    -
    MISSION:ReportPlayersProgress(ReportGroup) -

    Create an Mission Progress report of the Mission.

    -
    MISSION:ReportStatus() -

    Create a status report of the Mission.

    -
    MISSION:ReportSummary(ReportGroup) -

    Create a summary report of the Mission (one line).

    -
    MISSION.Scoring - -
    MISSION:SetGroupAssigned(MissionGroup) -

    Set Group assigned to the Mission.

    -
    MISSION:SetMenu(MenuTime) -

    Sets the Planned Task menu.

    -
    MISSION:Start() -

    Synchronous Event Trigger for Event Start.

    -
    MISSION:Stop() -

    Synchronous Event Trigger for Event Stop.

    -
    MISSION._Clients - -
    MISSION:__Complete(Delay) -

    Asynchronous Event Trigger for Event Complete.

    -
    MISSION:__Fail(Delay) -

    Asynchronous Event Trigger for Event Fail.

    -
    MISSION:__MissionGoals(Delay) -

    MissionGoals Asynchronous Trigger for MISSION

    -
    MISSION:__Start(Delay) -

    Asynchronous Event Trigger for Event Start.

    -
    MISSION:__Stop(Delay) -

    Asynchronous Event Trigger for Event Stop.

    -
    MISSION:onenterCOMPLETED(From, Event, To) -

    FSM function for a MISSION

    -
    - -

    Global(s)

    -
    -
    - - #MISSION - -MISSION - -
    -
    - - - -
    -
    -

    Type Mission

    - -

    Type MISSION

    - -

    The MISSION class

    - -

    Field(s)

    -
    -
    - - -MISSION:AbortUnit(PlayerUnit) - -
    -
    - -

    Aborts a PlayerUnit from the Mission.

    - - -

    For each Task within the Mission, the PlayerUnit is removed from Task where it is assigned. -If the Unit was not part of a Task in the Mission, false is returned. -If the Unit is part of a Task in the Mission, true is returned.

    - -

    Parameter

    -
      -
    • - -

      Wrapper.Unit#UNIT PlayerUnit : -The CLIENT or UNIT of the Player joining the Mission.

      - -
    • -
    -

    Return value

    - -

    #MISSION:

    - - -
    -
    -
    -
    - - -MISSION:AddPlayerName(PlayerName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      PlayerName :

      - -
    • -
    -
    -
    -
    -
    - - -MISSION:AddScoring(Scoring) - -
    -
    - -

    Add a scoring to the mission.

    - -

    Parameter

    -
      -
    • - -

      Scoring :

      - -
    • -
    -

    Return value

    - -

    #MISSION: -self

    - -
    -
    -
    -
    - - -MISSION:AddTask(Task) - -
    -
    - -

    Register a Task to be completed within the Mission.

    - - -

    Note that there can be multiple Tasks registered to be completed. -Each Task can be set a certain Goals. The Mission will not be completed until all Goals are reached.

    - -

    Parameter

    - -

    Return value

    - -

    Tasking.Task#TASK: -The task added.

    - -
    -
    -
    -
    - - - -MISSION.AssignedGroups - -
    -
    - - - -
    -
    -
    -
    - - #string - -MISSION.ClassName - -
    -
    - - - -
    -
    -
    -
    - - -MISSION:ClearGroupAssignment(MissionGroup) - -
    -
    - -

    Clear the Group assignment from the Mission.

    - -

    Parameter

    - -

    Return value

    - -

    #MISSION:

    - - -
    -
    -
    -
    - - -MISSION:Complete() - -
    -
    - -

    Synchronous Event Trigger for Event Complete.

    - -
    -
    -
    -
    - - -MISSION:CrashUnit(PlayerUnit) - -
    -
    - -

    Handles a crash of a PlayerUnit from the Mission.

    - - -

    For each Task within the Mission, the PlayerUnit is removed from Task where it is assigned. -If the Unit was not part of a Task in the Mission, false is returned. -If the Unit is part of a Task in the Mission, true is returned.

    - -

    Parameter

    -
      -
    • - -

      Wrapper.Unit#UNIT PlayerUnit : -The CLIENT or UNIT of the Player crashing.

      - -
    • -
    -

    Return value

    - -

    #MISSION:

    - - -
    -
    -
    -
    - - -MISSION:Fail() - -
    -
    - -

    Synchronous Event Trigger for Event Fail.

    - -
    -
    -
    -
    - - -MISSION:GetCommandCenter() - -
    -
    - -

    Gets the COMMANDCENTER.

    - -

    Return value

    - -

    Tasking.CommandCenter#COMMANDCENTER:

    - - -
    -
    -
    -
    - - -MISSION:GetGroups() - -
    -
    - -

    Get the groups for which TASKS are given in the mission

    - -

    Return value

    - -

    Core.Set#SET_GROUP:

    - - -
    -
    -
    -
    - - -MISSION:GetMenu(TaskGroup) - -
    -
    - -

    Gets the mission menu for the TaskGroup.

    - -

    Parameter

    -
      -
    • - -

      TaskGroup :

      - -
    • -
    -

    Return value

    - -

    Core.Menu#MENU_COALITION: -self

    - -
    -
    -
    -
    - - -MISSION:GetName() - -
    -
    - -

    Gets the mission name.

    - -

    Return value

    - -

    #MISSION: -self

    - -
    -
    -
    -
    - - -MISSION:GetNextTaskID(Task) - -
    -
    - -

    Return the next Task ID to be completed within the Mission.

    - -

    Parameter

    - -

    Return value

    - -

    Tasking.Task#TASK: -The task added.

    - -
    -
    -
    -
    - - -MISSION:GetPlayerNames() - -
    -
    - - - -
    -
    -
    -
    - - -MISSION:GetRootMenu(TaskGroup) - -
    -
    - -

    Gets the root mission menu for the TaskGroup.

    - -

    Parameter

    -
      -
    • - -

      TaskGroup :

      - -
    • -
    -

    Return value

    - -

    Core.Menu#MENU_COALITION: -self

    - -
    -
    -
    -
    - - -MISSION:GetScoring() - -
    -
    - -

    Get the scoring object of a mission.

    - -

    Return value

    - -

    #SCORING: -Scoring

    - -
    -
    -
    -
    - - -MISSION.GetTask(TaskName, self) - -
    -
    - -

    Get the TASK identified by the TaskNumber from the Mission.

    - - -

    This function is useful in GoalFunctions.

    - -

    Parameters

    -
      -
    • - -

      #string TaskName : -The Name of the Task within the Mission.

      - -
    • -
    • - -

      self :

      - -
    • -
    -

    Return values

    -
      -
    1. - -

      Tasking.Task#TASK: -The Task

      - -
    2. -
    3. - -

      #nil: -Returns nil if no task was found.

      - -
    4. -
    -
    -
    -
    -
    - - -MISSION:GetTaskTypes() - -
    -
    - - - -

    Return value

    - -

    #number:

    - - -
    -
    -
    -
    - - -MISSION:GetTasks() - -
    -
    - -

    Get all the TASKs from the Mission.

    - - -

    This function is useful in GoalFunctions.

    - -

    Return value

    - - -

    {TASK,...} Structure of TASKS with the TASK number as the key.

    - -

    Usage:

    -
    -- Get Tasks from the Mission.
    -Tasks = Mission:GetTasks()
    -env.info( "Task 2 Completion = " .. Tasks[2]:GetGoalPercentage() .. "%" )
    - -
    -
    -
    -
    - - -MISSION:GetTasksRemaining() - -
    -
    - - - -

    Return value

    - -

    #number:

    - - -
    -
    -
    -
    - - -MISSION.HasGroup(#, self, TaskGroup) - -
    -
    - -

    Validates if the Mission has a Group

    - -

    Parameters

    -
      -
    • - -

      # : -ISSION

      - -
    • -
    • - -

      self :

      - -
    • -
    • - -

      TaskGroup :

      - -
    • -
    -

    Return value

    - -

    #boolean: -true if the Mission has a Group.

    - -
    -
    -
    -
    - - -MISSION:IsCOMPLETED() - -
    -
    - -

    Is the Mission COMPLETED.

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -MISSION:IsENGAGED() - -
    -
    - -

    Is the Mission ENGAGED.

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -MISSION:IsFAILED() - -
    -
    - -

    Is the Mission FAILED.

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -MISSION:IsGroupAssigned(MissionGroup) - -
    -
    - -

    Returns if the Mission is assigned to the Group.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -MISSION:IsHOLD() - -
    -
    - -

    Is the Mission HOLD.

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -MISSION:IsIDLE() - -
    -
    - -

    Is the Mission IDLE.

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -MISSION:JoinUnit(PlayerUnit, PlayerGroup) - -
    -
    - -

    Add a Unit to join the Mission.

    - - -

    For each Task within the Mission, the Unit is joined with the Task. -If the Unit was not part of a Task in the Mission, false is returned. -If the Unit is part of a Task in the Mission, true is returned.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT PlayerUnit : -The CLIENT or UNIT of the Player joining the Mission.

      - -
    • -
    • - -

      Wrapper.Group#GROUP PlayerGroup : -The GROUP of the player joining the Mission.

      - -
    • -
    -

    Return value

    - -

    #boolean: -true if Unit is part of a Task in the Mission.

    - -
    -
    -
    -
    - - -MISSION:MenuReportBriefing(ReportGroup) - -
    -
    - -

    Reports the briefing.

    - -

    Parameter

    -
      -
    • - -

      Wrapper.Group#GROUP ReportGroup : -The group to which the report needs to be sent.

      - -
    • -
    -
    -
    -
    -
    - - -MISSION:MenuReportPlayersPerTask(ReportGroup) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -MISSION:MenuReportPlayersProgress(ReportGroup) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -MISSION:MenuReportTasksPerStatus(TaskStatus, ReportGroup) - -
    -
    - - - -

    Parameters

    - -
    -
    -
    -
    - - -MISSION:MenuReportTasksSummary(ReportGroup) - -
    -
    - -

    Report the task summary.

    - -

    Parameter

    - -
    -
    -
    -
    - - #string - -MISSION.MissionBriefing - -
    -
    - - - -
    -
    -
    -
    - - -MISSION:MissionGoals() - -
    -
    - -

    MissionGoals Trigger for MISSION

    - -
    -
    -
    -
    - - -MISSION.MissionGroupMenu - -
    -
    - - - -
    -
    -
    -
    - - Core.Menu#MENU_COALITION - -MISSION.MissionMenu - -
    -
    - - - -
    -
    -
    -
    - - #string - -MISSION.MissionStatus - -
    -
    - - - -
    -
    -
    -
    - - #string - -MISSION.Name - -
    -
    - - - -
    -
    -
    -
    - - -MISSION:New(CommandCenter, MissionName, MissionPriority, MissionBriefing, MissionCoalition) - -
    -
    - -

    This is the main MISSION declaration method.

    - - -

    Each Mission is like the master or a Mission orchestration between, Clients, Tasks, Stages etc.

    - -

    Parameters

    -
      -
    • - -

      Tasking.CommandCenter#COMMANDCENTER CommandCenter :

      - -
    • -
    • - -

      #string MissionName : -is the name of the mission. This name will be used to reference the status of each mission by the players.

      - -
    • -
    • - -

      #string MissionPriority : -is a string indicating the "priority" of the Mission. f.e. "Primary", "Secondary" or "First", "Second". It is free format and up to the Mission designer to choose. There are no rules behind this field.

      - -
    • -
    • - -

      #string MissionBriefing : -is a string indicating the mission briefing to be shown when a player joins a CLIENT.

      - -
    • -
    • - -

      Dcs.DCSCoalitionWrapper.Object#coalition MissionCoalition : -is a string indicating the coalition or party to which this mission belongs to. It is free format and can be chosen freely by the mission designer. Note that this field is not to be confused with the coalition concept of the ME. Examples of a Mission Coalition could be "NATO", "CCCP", "Intruders", "Terrorists"...

      - -
    • -
    -

    Return value

    - -

    #MISSION: -self

    - -
    -
    -
    -
    - - -MISSION:OnAfterComplete(From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Complete.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -MISSION:OnAfterFail(From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Fail.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -MISSION:OnAfterMissionGoals(From, Event, To) - -
    -
    - -

    MissionGoals Handler OnAfter for MISSION

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -MISSION:OnAfterStart(From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Start.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -MISSION:OnAfterStop(From, Event, To) - -
    -
    - -

    OnAfter Transition Handler for Event Stop.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -MISSION:OnBeforeComplete(From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Complete.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -MISSION:OnBeforeFail(From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Fail.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -MISSION:OnBeforeMissionGoals(From, Event, To) - -
    -
    - -

    MissionGoals Handler OnBefore for MISSION

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -MISSION:OnBeforeStart(From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Start.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -MISSION:OnBeforeStop(From, Event, To) - -
    -
    - -

    OnBefore Transition Handler for Event Stop.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -MISSION:OnEnterCOMPLETED(From, Event, To) - -
    -
    - -

    OnEnter Transition Handler for State COMPLETED.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -MISSION:OnEnterENGAGED(From, Event, To) - -
    -
    - -

    OnEnter Transition Handler for State ENGAGED.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -MISSION:OnEnterFAILED(From, Event, To) - -
    -
    - -

    OnEnter Transition Handler for State FAILED.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -MISSION:OnEnterIDLE(From, Event, To) - -
    -
    - -

    OnEnter Transition Handler for State IDLE.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -
    -
    -
    -
    - - -MISSION:OnLeaveCOMPLETED(From, Event, To) - -
    -
    - -

    OnLeave Transition Handler for State COMPLETED.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -MISSION:OnLeaveENGAGED(From, Event, To) - -
    -
    - -

    OnLeave Transition Handler for State ENGAGED.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -MISSION:OnLeaveFAILED(From, Event, To) - -
    -
    - -

    OnLeave Transition Handler for State FAILED.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -MISSION:OnLeaveIDLE(From, Event, To) - -
    -
    - -

    OnLeave Transition Handler for State IDLE.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -MISSION:RemoveMenu(MenuTime) - -
    -
    - -

    Removes the Planned Task menu.

    - -

    Parameter

    -
      -
    • - -

      #number MenuTime :

      - -
    • -
    -
    -
    -
    -
    - - -MISSION:RemoveTask(Task) - -
    -
    - -

    Removes a Task to be completed within the Mission.

    - - -

    Note that there can be multiple Tasks registered to be completed. -Each Task can be set a certain Goals. The Mission will not be completed until all Goals are reached.

    - -

    Parameter

    - -

    Return value

    - -

    #nil: -The cleaned Task reference.

    - -
    -
    -
    -
    - - -MISSION:RemoveTaskMenu(Task) - -
    -
    - -

    Removes a Task menu.

    - -

    Parameter

    - -

    Return value

    - -

    #MISSION: -self

    - -
    -
    -
    -
    - - -MISSION:ReportBriefing() - -
    -
    - -

    Create a briefing report of the Mission.

    - -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -MISSION:ReportDetails(ReportGroup) - -
    -
    - -

    Create a detailed report of the Mission, listing all the details of the Task.

    - -

    Parameter

    -
      -
    • - -

      ReportGroup :

      - -
    • -
    -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -MISSION:ReportOverview(ReportGroup, TaskStatus) - -
    -
    - -

    Create a overview report of the Mission (multiple lines).

    - -

    Parameters

    -
      -
    • - -

      ReportGroup :

      - -
    • -
    • - -

      TaskStatus :

      - -
    • -
    -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -MISSION:ReportPlayersPerTask(ReportGroup) - -
    -
    - -

    Create an active player report of the Mission.

    - - -

    This reports provides a one liner of the mission status. It indicates how many players and how many Tasks.

    - -
    Mission "<MissionName>" - <MissionStatus> - Active Players Report
    - - Player "<PlayerName>: Task <TaskName> <TaskStatus>, Task <TaskName> <TaskStatus>
    - - Player <PlayerName>: Task <TaskName> <TaskStatus>, Task <TaskName> <TaskStatus>
    - - ..
    -
    - - -

    Parameter

    -
      -
    • - -

      ReportGroup :

      - -
    • -
    -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -MISSION:ReportPlayersProgress(ReportGroup) - -
    -
    - -

    Create an Mission Progress report of the Mission.

    - - -

    This reports provides a one liner per player of the mission achievements per task.

    - -
    Mission "<MissionName>" - <MissionStatus> - Active Players Report
    - - Player <PlayerName>: Task <TaskName> <TaskStatus>: <Progress>
    - - Player <PlayerName>: Task <TaskName> <TaskStatus>: <Progress>
    - - ..
    -
    - - -

    Parameter

    -
      -
    • - -

      ReportGroup :

      - -
    • -
    -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -MISSION:ReportStatus() - -
    -
    - -

    Create a status report of the Mission.

    - - -

    This reports provides a one liner of the mission status. It indicates how many players and how many Tasks.

    - -
    Mission "<MissionName>" - Status "<MissionStatus>"
    - - Task Types: <TaskType>, <TaskType>
    - - <xx> Planned Tasks (xp)
    - - <xx> Assigned Tasks(xp)
    - - <xx> Success Tasks (xp)
    - - <xx> Hold Tasks (xp)
    - - <xx> Cancelled Tasks (xp)
    - - <xx> Aborted Tasks (xp)
    - - <xx> Failed Tasks (xp)
    -
    - - -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -MISSION:ReportSummary(ReportGroup) - -
    -
    - -

    Create a summary report of the Mission (one line).

    - -

    Parameter

    - -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - - -MISSION.Scoring - -
    -
    - - - -
    -
    -
    -
    - - -MISSION:SetGroupAssigned(MissionGroup) - -
    -
    - -

    Set Group assigned to the Mission.

    - -

    Parameter

    - -

    Return value

    - -

    #MISSION:

    - - -
    -
    -
    -
    - - -MISSION:SetMenu(MenuTime) - -
    -
    - -

    Sets the Planned Task menu.

    - -

    Parameter

    -
      -
    • - -

      #number MenuTime :

      - -
    • -
    -
    -
    -
    -
    - - -MISSION:Start() - -
    -
    - -

    Synchronous Event Trigger for Event Start.

    - -
    -
    -
    -
    - - -MISSION:Stop() - -
    -
    - -

    Synchronous Event Trigger for Event Stop.

    - -
    -
    -
    -
    - - #MISSION.Clients - -MISSION._Clients - -
    -
    - - - -
    -
    -
    -
    - - -MISSION:__Complete(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Complete.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -MISSION:__Fail(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Fail.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -MISSION:__MissionGoals(Delay) - -
    -
    - -

    MissionGoals Asynchronous Trigger for MISSION

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -MISSION:__Start(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Start.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -MISSION:__Stop(Delay) - -
    -
    - -

    Asynchronous Event Trigger for Event Stop.

    - -

    Parameter

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    -
    -
    -
    -
    - - -MISSION:onenterCOMPLETED(From, Event, To) - -
    -
    - -

    FSM function for a MISSION

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    - -

    Type MISSION.Clients

    - -

    Type SCORING

    - -
    - -
    - - diff --git a/docs/Documentation/Movement.html b/docs/Documentation/Movement.html deleted file mode 100644 index 32b0acb34..000000000 --- a/docs/Documentation/Movement.html +++ /dev/null @@ -1,450 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Movement

    - -

    Functional -- Limit the MOVEMENT of simulaneous moving ground vehicles.

    - - - -
    - -

    Limit the simultaneous movement of Groups within a running Mission. -This module is defined to improve the performance in missions, and to bring additional realism for GROUND vehicles. -Performance: If in a DCSRTE there are a lot of moving GROUND units, then in a multi player mission, this WILL create lag if -the main DCS execution core of your CPU is fully utilized. So, this class will limit the amount of simultaneous moving GROUND units -on defined intervals (currently every minute).

    - -

    Global(s)

    - - - - - -
    MOVEMENT - -
    -

    Type MOVEMENT

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    MOVEMENT.AliveUnits - -
    MOVEMENT.ClassName - -
    MOVEMENT.MoveCount - -
    MOVEMENT.MoveMaximum - -
    MOVEMENT.MovePrefixes - -
    MOVEMENT.MoveUnits - -
    MOVEMENT:New(MovePrefixes, MoveMaximum) - -
    MOVEMENT:OnDeadOrCrash(Event) -

    Captures the Dead or Crash events when Units crash or are destroyed.

    -
    MOVEMENT:OnEventBirth(self, EventData) -

    Captures the birth events when new Units were spawned.

    -
    MOVEMENT:ScheduleStart() -

    Call this function to start the MOVEMENT scheduling.

    -
    MOVEMENT:ScheduleStop() -

    Call this function to stop the MOVEMENT scheduling.

    -
    MOVEMENT:_Scheduler() -

    This function is called automatically by the MOVEMENT scheduler.

    -
    - -

    Global(s)

    -
    -
    - - #MOVEMENT - -MOVEMENT - -
    -
    - - - -
    -
    -

    Type Movement

    - -

    Type MOVEMENT

    - -

    the MOVEMENT class

    - -

    Field(s)

    -
    -
    - - -MOVEMENT.AliveUnits - -
    -
    - - - -
    -
    -
    -
    - - #string - -MOVEMENT.ClassName - -
    -
    - - - -
    -
    -
    -
    - - #number - -MOVEMENT.MoveCount - -
    -
    - - - - -

    The internal counter of the amount of Moveing the has happened since MoveStart.

    - -
    -
    -
    -
    - - - -MOVEMENT.MoveMaximum - -
    -
    - - - - -

    Contains the Maximum amount of units that are allowed to move...

    - -
    -
    -
    -
    - - - -MOVEMENT.MovePrefixes - -
    -
    - - - -
    -
    -
    -
    - - - -MOVEMENT.MoveUnits - -
    -
    - - - - -

    Reflects if the Moving for this MovePrefixes is going to be scheduled or not.

    - -
    -
    -
    -
    - - -MOVEMENT:New(MovePrefixes, MoveMaximum) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      MovePrefixes :

      - -
    • -
    • - -

      MoveMaximum :

      - -
    • -
    -
    -
    -
    -
    - - -MOVEMENT:OnDeadOrCrash(Event) - -
    -
    - -

    Captures the Dead or Crash events when Units crash or are destroyed.

    - -

    Parameter

    -
      -
    • - -

      Event :

      - -
    • -
    -
    -
    -
    -
    - - -MOVEMENT:OnEventBirth(self, EventData) - -
    -
    - -

    Captures the birth events when new Units were spawned.

    - -

    Parameters

    - -
    -
    -
    -
    - - -MOVEMENT:ScheduleStart() - -
    -
    - -

    Call this function to start the MOVEMENT scheduling.

    - -
    -
    -
    -
    - - -MOVEMENT:ScheduleStop() - -
    -
    - -

    Call this function to stop the MOVEMENT scheduling.

    - -
    -
    -
    -
    - - -MOVEMENT:_Scheduler() - -
    -
    - -

    This function is called automatically by the MOVEMENT scheduler.

    - - -

    A new function is scheduled when MoveScheduled is true.

    - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Object.html b/docs/Documentation/Object.html deleted file mode 100644 index 24b2ac418..000000000 --- a/docs/Documentation/Object.html +++ /dev/null @@ -1,341 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Object

    - -

    Wrapper -- OBJECT wraps the DCS Object derived objects.

    - - - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - -
    OBJECT -

    OBJECT class, extends Base#BASE

    - -

    OBJECT handles the DCS Object objects:

    - -
      -
    • Support all DCS Object APIs.
    • -
    -
    -

    Type DCSObject

    - - - - - -
    DCSObject.id_ -

    The ID of the controllable in DCS

    -
    - -

    Type OBJECT

    - - - - - - - - - - - - - - - - - -
    OBJECT:Destroy() -

    Destroys the OBJECT.

    -
    OBJECT:GetID() -

    Returns the unit's unique identifier.

    -
    OBJECT:New(ObjectName, Test) -

    Create a new OBJECT from a DCSObject

    -
    OBJECT.ObjectName -

    The name of the Object.

    -
    - -

    Global(s)

    -
    -
    - - #OBJECT - -OBJECT - -
    -
    - -

    OBJECT class, extends Base#BASE

    - -

    OBJECT handles the DCS Object objects:

    - -
      -
    • Support all DCS Object APIs.
    • -
    - - -
      -
    • Enhance with Object specific APIs not in the DCS Object API set.
    • -
    • Manage the "state" of the DCS Object.
    • -
    - -

    OBJECT constructor:

    - -

    The OBJECT class provides the following functions to construct a OBJECT instance:

    - - - - -
    -
    -

    Type Object

    - -

    Type DCSObject

    - -

    A DCSObject

    - -

    Field(s)

    -
    -
    - - -DCSObject.id_ - -
    -
    - -

    The ID of the controllable in DCS

    - -
    -
    - -

    Type OBJECT

    -

    Field(s)

    -
    -
    - - -OBJECT:Destroy() - -
    -
    - -

    Destroys the OBJECT.

    - -

    Return value

    - -

    #nil: -The DCS Unit is not existing or alive.

    - -
    -
    -
    -
    - - -OBJECT:GetID() - -
    -
    - -

    Returns the unit's unique identifier.

    - -

    Return values

    -
      -
    1. - -

      Dcs.DCSWrapper.Object#Object.ID: -ObjectID

      - -
    2. -
    3. - -

      #nil: -The DCS Object is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -OBJECT:New(ObjectName, Test) - -
    -
    - -

    Create a new OBJECT from a DCSObject

    - -

    Parameters

    - -

    Return value

    - -

    #OBJECT: -self

    - -
    -
    -
    -
    - - #string - -OBJECT.ObjectName - -
    -
    - -

    The name of the Object.

    - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Point.html b/docs/Documentation/Point.html deleted file mode 100644 index 41dcc1ea3..000000000 --- a/docs/Documentation/Point.html +++ /dev/null @@ -1,4358 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Point

    - -

    Core -- POINT_VEC classes define an extensive API to manage 3D points in the simulation space.

    - - - -

    Banner Image

    - -
    - -

    Demo Missions

    - -

    POINT_VEC Demo Missions source code

    - -

    POINT_VEC Demo Missions, only for beta testers

    - -

    ALL Demo Missions pack of the last release

    - -
    - -

    YouTube Channel

    - -

    POINT_VEC YouTube Channel

    - -
    - -

    Authors:

    - -
      -
    • FlightControl : Design & Programming
    • -
    - -

    Contributions:

    - - -

    Global(s)

    - - - - - - - - - - - - - -
    COORDINATE -

    COORDINATE class, extends Base#BASE

    - -

    COORDINATE defines a 3D point in the simulator and with its methods, you can use or manipulate the point in 3D space.

    -
    POINT_VEC2 -

    POINT_VEC2 class, extends Point#COORDINATE

    - -

    The Point#POINT_VEC2 class defines a 2D point in the simulator.

    -
    POINT_VEC3 -

    POINT_VEC3 class, extends Point#COORDINATE

    - -

    POINT_VEC3 defines a 3D point in the simulator and with its methods, you can use or manipulate the point in 3D space.

    -
    -

    Type COORDINATE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    COORDINATE:DistanceFromVec2(Vec2Reference) - -
    COORDINATE:Explosion(ExplosionIntensity) -

    Creates an explosion at the point of a certain intensity.

    -
    COORDINATE:Flare(FlareColor, (, Azimuth) -

    Flares the point in a color.

    -
    COORDINATE:FlareGreen((, Azimuth) -

    Flare the COORDINATE Green.

    -
    COORDINATE:FlareRed(Azimuth) -

    Flare the COORDINATE Red.

    -
    COORDINATE:FlareWhite((, Azimuth) -

    Flare the COORDINATE White.

    -
    COORDINATE:FlareYellow((, Azimuth) -

    Flare the COORDINATE Yellow.

    -
    COORDINATE:Get2DDistance(TargetCoordinate) -

    Return the 2D distance in meters between the target COORDINATE and the COORDINATE.

    -
    COORDINATE:Get3DDistance(TargetCoordinate) -

    Return the 3D distance in meters between the target COORDINATE and the COORDINATE.

    -
    COORDINATE:GetAltitudeText(Settings) -

    Return the altitude text of the COORDINATE.

    -
    COORDINATE:GetAngleDegrees(DirectionVec3) -

    Return an angle in degrees from the COORDINATE using a direction vector in Vec3 format.

    -
    COORDINATE:GetAngleRadians(DirectionVec3) -

    Return an angle in radians from the COORDINATE using a direction vector in Vec3 format.

    -
    COORDINATE:GetBRAText(AngleRadians, Distance, Settings) -

    Provides a Bearing / Range / Altitude string

    -
    COORDINATE:GetBRText(AngleRadians, Distance, Settings) -

    Provides a Bearing / Range string

    -
    COORDINATE:GetBearingText(AngleRadians, Precision, Settings) -

    Provides a bearing text in degrees.

    -
    COORDINATE:GetDirectionVec3(TargetCoordinate) -

    Return a direction vector Vec3 from COORDINATE to the COORDINATE.

    -
    COORDINATE:GetDistanceText(Distance, Settings) -

    Provides a distance text expressed in the units of measurement.

    -
    COORDINATE:GetHeading() -

    Get the heading of the coordinate, if applicable.

    -
    COORDINATE:GetHeadingText(Settings) -

    Return the heading text of the COORDINATE.

    -
    COORDINATE:GetLandHeight() -

    Return the height of the land at the coordinate.

    -
    COORDINATE:GetMovingText(Settings) -

    Return velocity text of the COORDINATE.

    -
    COORDINATE:GetNorthCorrectionRadians() -

    Get a correction in radians of the real magnetic north of the COORDINATE.

    -
    COORDINATE:GetRandomVec2InRadius(OuterRadius, InnerRadius) -

    Return a random Vec2 within an Outer Radius and optionally NOT within an Inner Radius of the COORDINATE.

    -
    COORDINATE:GetRandomVec3InRadius(OuterRadius, InnerRadius) -

    Return a random Vec3 within an Outer Radius and optionally NOT within an Inner Radius of the COORDINATE.

    -
    COORDINATE:GetVec2() -

    Return the coordinates of the COORDINATE in Vec2 format.

    -
    COORDINATE:GetVec3() -

    Return the coordinates of the COORDINATE in Vec3 format.

    -
    COORDINATE:GetVelocity() -

    Return the velocity of the COORDINATE.

    -
    COORDINATE:GetVelocityText(Settings) -

    Return the velocity text of the COORDINATE.

    -
    COORDINATE.Heading - -
    COORDINATE:IlluminationBomb() -

    Creates an illumination bomb at the point.

    -
    COORDINATE:IsInRadius(ToCoordinate, Radius, Coordinate) -

    Returns if a Coordinate is in a certain Radius of this Coordinate in 2D plane using the X and Z axis.

    -
    COORDINATE:IsInSphere(ToCoordinate, Radius, Coordinate) -

    Returns if a Coordinate is in a certain radius of this Coordinate in 3D space using the X, Y and Z axis.

    -
    COORDINATE:IsLOS(ToCoordinate) -

    Returns if a Coordinate has Line of Sight (LOS) with the ToCoordinate.

    -
    COORDINATE:MarkToAll(MarkText) -

    Mark to All

    -
    COORDINATE:MarkToCoalition(MarkText, Coalition) -

    Mark to Coalition

    -
    COORDINATE:MarkToCoalitionBlue(MarkText) -

    Mark to Blue Coalition

    -
    COORDINATE:MarkToCoalitionRed(MarkText) -

    Mark to Red Coalition

    -
    COORDINATE:MarkToGroup(MarkText, MarkGroup) -

    Mark to Group

    -
    COORDINATE:New(x, y, z) -

    COORDINATE constructor.

    -
    COORDINATE:NewFromVec2(Vec2, LandHeightAdd) -

    Create a new COORDINATE object from Vec2 coordinates.

    -
    COORDINATE:NewFromVec3(Vec3) -

    Create a new COORDINATE object from Vec3 coordinates.

    -
    COORDINATE:RemoveMark(MarkID) -

    Remove a mark

    -
    COORDINATE:SetHeading(Heading) -

    Set the heading of the coordinate, if applicable.

    -
    COORDINATE:SetVelocity(Velocity) -

    Set the velocity of the COORDINATE.

    -
    COORDINATE:Smoke(SmokeColor) -

    Smokes the point in a color.

    -
    COORDINATE:SmokeBlue() -

    Smoke the COORDINATE Blue.

    -
    COORDINATE:SmokeGreen() -

    Smoke the COORDINATE Green.

    -
    COORDINATE:SmokeOrange() -

    Smoke the COORDINATE Orange.

    -
    COORDINATE:SmokeRed() -

    Smoke the COORDINATE Red.

    -
    COORDINATE:SmokeWhite() -

    Smoke the COORDINATE White.

    -
    COORDINATE:ToString(Controllable, Settings, Task) -

    Provides a coordinate string of the point, based on a coordinate format system: - * Uses default settings in COORDINATE.

    -
    COORDINATE:ToStringA2A(Controllable, Settings) -

    Provides a coordinate string of the point, based on the A2A coordinate format system.

    -
    COORDINATE:ToStringA2G(Controllable, Settings) -

    Provides a coordinate string of the point, based on the A2G coordinate format system.

    -
    COORDINATE:ToStringAspect(TargetCoordinate) -

    Return an aspect string from a COORDINATE to the Angle of the object.

    -
    COORDINATE:ToStringBR(TargetCoordinate, FromCoordinate, Settings) -

    Return a BR string from a COORDINATE to the COORDINATE.

    -
    COORDINATE:ToStringBRA(TargetCoordinate, FromCoordinate, Settings) -

    Return a BRAA string from a COORDINATE to the COORDINATE.

    -
    COORDINATE:ToStringBULLS(Coalition, Settings) -

    Return a BULLS string from a COORDINATE to the BULLS of the coalition.

    -
    COORDINATE:ToStringFromRP(Controllable, Settings, ReferenceCoord, ReferenceName) -

    Provides a coordinate string of the point, based on a coordinate format system: - * Uses default settings in COORDINATE.

    -
    COORDINATE:ToStringLLDDM(Settings) -

    Provides a Lat Lon string in Degree Decimal Minute format.

    -
    COORDINATE:ToStringLLDMS(Settings) -

    Provides a Lat Lon string in Degree Minute Second format.

    -
    COORDINATE:ToStringMGRS(Settings) -

    Provides a MGRS string

    -
    COORDINATE:Translate(Distance, Angle) -

    Add a Distance in meters from the COORDINATE orthonormal plane, with the given angle, and calculate the new COORDINATE.

    -
    COORDINATE.Velocity - -
    COORDINATE.WaypointAction - -
    COORDINATE:WaypointAir(AltType, Type, Action, Speed, SpeedLocked) -

    Build an air type route point.

    -
    COORDINATE:WaypointAirFlyOverPoint(AltType, Speed) -

    Build a Waypoint Air "Fly Over Point".

    -
    COORDINATE:WaypointAirLanding(Speed) -

    Build a Waypoint Air "Landing".

    -
    COORDINATE:WaypointAirTakeOffParking(AltType, Speed) -

    Build a Waypoint Air "Take Off Parking".

    -
    COORDINATE:WaypointAirTakeOffParkingHot(AltType, Speed) -

    Build a Waypoint Air "Take Off Parking Hot".

    -
    COORDINATE:WaypointAirTakeOffRunway(AltType, Speed) -

    Build a Waypoint Air "Take Off Runway".

    -
    COORDINATE:WaypointAirTurningPoint(AltType, Speed) -

    Build a Waypoint Air "Turning Point".

    -
    COORDINATE.WaypointAltType - -
    COORDINATE:WaypointGround(Speed, Formation) -

    Build an ground type route point.

    -
    COORDINATE.WaypointType - -
    COORDINATE.x - -
    COORDINATE.y - -
    COORDINATE.z - -
    - -

    Type POINT_VEC2

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    POINT_VEC2:AddAlt(Altitude) -

    Add to the current land height an altitude.

    -
    POINT_VEC2:AddX(x) -

    Add to the x coordinate of the POINT_VEC2.

    -
    POINT_VEC2:AddY(y) -

    Add to the y coordinate of the POINT_VEC2.

    -
    POINT_VEC2:DistanceFromPointVec2(PointVec2Reference) - -
    POINT_VEC2:GetAlt() -

    Return the altitude (height) of the land at the POINT_VEC2.

    -
    POINT_VEC2:GetLat() -

    Return Return the Lat(itude) coordinate of the POINTVEC2 (ie: (parent)POINTVEC3.x).

    -
    POINT_VEC2:GetLon() -

    Return the Lon(gitude) coordinate of the POINTVEC2 (ie: (parent)POINTVEC3.z).

    -
    POINT_VEC2:GetRandomPointVec2InRadius(OuterRadius, InnerRadius) -

    Return a random POINTVEC2 within an Outer Radius and optionally NOT within an Inner Radius of the POINTVEC2.

    -
    POINT_VEC2:GetX() -

    Return the x coordinate of the POINT_VEC2.

    -
    POINT_VEC2:GetY() -

    Return the y coordinate of the POINT_VEC2.

    -
    POINT_VEC2:New(x, y, LandHeightAdd) -

    POINT_VEC2 constructor.

    -
    POINT_VEC2:NewFromVec2(Vec2, LandHeightAdd) -

    Create a new POINT_VEC2 object from Vec2 coordinates.

    -
    POINT_VEC2:NewFromVec3(Vec3) -

    Create a new POINT_VEC2 object from Vec3 coordinates.

    -
    POINT_VEC2:SetAlt(Altitude) -

    Set the altitude of the POINT_VEC2.

    -
    POINT_VEC2:SetLat(x) -

    Set the Lat(itude) coordinate of the POINTVEC2 (ie: POINTVEC3.x).

    -
    POINT_VEC2:SetLon(y, z) -

    Set the Lon(gitude) coordinate of the POINTVEC2 (ie: POINTVEC3.z).

    -
    POINT_VEC2:SetX(x) -

    Set the x coordinate of the POINT_VEC2.

    -
    POINT_VEC2:SetY(y) -

    Set the y coordinate of the POINT_VEC2.

    -
    POINT_VEC2.x -

    The x coordinate in meters.

    -
    POINT_VEC2.y -

    the y coordinate in meters.

    -
    POINT_VEC2.z - -
    - -

    Type POINT_VEC3

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    POINT_VEC3:AddX(x) -

    Add to the x coordinate of the POINT_VEC3.

    -
    POINT_VEC3:AddY(y) -

    Add to the y coordinate of the POINT_VEC3.

    -
    POINT_VEC3:AddZ(z) -

    Add to the z coordinate of the POINT_VEC3.

    -
    POINT_VEC3.FlareColor - -
    POINT_VEC3:GetRandomPointVec3InRadius(OuterRadius, InnerRadius) -

    Return a random POINTVEC3 within an Outer Radius and optionally NOT within an Inner Radius of the POINTVEC3.

    -
    POINT_VEC3:GetX() -

    Return the x coordinate of the POINT_VEC3.

    -
    POINT_VEC3:GetY() -

    Return the y coordinate of the POINT_VEC3.

    -
    POINT_VEC3:GetZ() -

    Return the z coordinate of the POINT_VEC3.

    -
    POINT_VEC3:New(x, y, z) -

    Create a new POINT_VEC3 object.

    -
    POINT_VEC3:NewFromVec2(Vec2, LandHeightAdd) -

    Create a new POINT_VEC3 object from Vec2 coordinates.

    -
    POINT_VEC3:NewFromVec3(Vec3) -

    Create a new POINT_VEC3 object from Vec3 coordinates.

    -
    POINT_VEC3.RoutePointAction - -
    POINT_VEC3.RoutePointAltType - -
    POINT_VEC3.RoutePointType - -
    POINT_VEC3:SetX(x) -

    Set the x coordinate of the POINT_VEC3.

    -
    POINT_VEC3:SetY(y) -

    Set the y coordinate of the POINT_VEC3.

    -
    POINT_VEC3:SetZ(z) -

    Set the z coordinate of the POINT_VEC3.

    -
    POINT_VEC3.SmokeColor - -
    POINT_VEC3.x -

    The x coordinate in 3D space.

    -
    POINT_VEC3.y -

    The y coordinate in 3D space.

    -
    POINT_VEC3.z -

    The z coordiante in 3D space.

    -
    - -

    Type POINT_VEC3.RoutePointAction

    - - - - - - - - - -
    POINT_VEC3.RoutePointAction.FromParkingArea -

    "From Parking Area"

    -
    POINT_VEC3.RoutePointAction.TurningPoint -

    "Turning Point"

    -
    - -

    Type POINT_VEC3.RoutePointAltType

    - - - - - -
    POINT_VEC3.RoutePointAltType.BARO -

    "BARO"

    -
    - -

    Type POINT_VEC3.RoutePointType

    - - - - - - - - - -
    POINT_VEC3.RoutePointType.TakeOffParking -

    "TakeOffParking"

    -
    POINT_VEC3.RoutePointType.TurningPoint -

    "Turning Point"

    -
    - -

    Global(s)

    -
    -
    - - #COORDINATE - -COORDINATE - -
    -
    - -

    COORDINATE class, extends Base#BASE

    - -

    COORDINATE defines a 3D point in the simulator and with its methods, you can use or manipulate the point in 3D space.

    - - - -

    COORDINATE constructor

    - -

    A new COORDINATE object can be created with:

    - - - -

    Create waypoints for routes

    - -

    A COORDINATE can prepare waypoints for Ground and Air groups to be embedded into a Route.

    - - - -

    Route points can be used in the Route methods of the Group#GROUP class.

    - - -

    Smoke, flare, explode, illuminate

    - -

    At the point a smoke, flare, explosion and illumination bomb can be triggered. Use the following methods:

    - -

    Smoke

    - - - -

    Flare

    - - - -

    Explode

    - - - -

    Illuminate

    - - - - -

    Markings

    - -

    Place markers (text boxes with clarifications for briefings, target locations or any other reference point) on the map for all players, coalitions or specific groups:

    - - - - -

    3D calculation methods

    - -

    Various calculation methods exist to use or manipulate 3D space. Find below a short description of each method:

    - -

    Distance

    - - - -

    Angle

    - - - -

    Translation

    - -
      -
    • COORDINATE.Translate(): Translate the current 3D point towards an other 3D point using the given Distance and Angle.
    • -
    - -

    Get the North correction of the current location

    - - - - -

    Point Randomization

    - -

    Various methods exist to calculate random locations around a given 3D point.

    - - - - -

    Metric system

    - - - - -

    Coorinate text generation

    - - - - -
    -
    -
    -
    - - #POINT_VEC2 - -POINT_VEC2 - -
    -
    - -

    POINT_VEC2 class, extends Point#COORDINATE

    - -

    The Point#POINT_VEC2 class defines a 2D point in the simulator.

    - - -

    The height coordinate (if needed) will be the land height + an optional added height specified.

    - -

    POINT_VEC2 constructor

    - -

    A new POINT_VEC2 instance can be created with:

    - - - -

    Manupulate the X, Altitude, Y coordinates of the 2D point

    - -

    A POINT_VEC2 class works in 2D space, with an altitude setting. It contains internally an X, Altitude, Y coordinate. -Methods exist to manupulate these coordinates.

    - -

    The current X, Altitude, Y axis can be retrieved with the methods POINT_VEC2.GetX(), POINT_VEC2.GetAlt(), POINT_VEC2.GetY() respectively. -The methods POINT_VEC2.SetX(), POINT_VEC2.SetAlt(), POINT_VEC2.SetY() change the respective axis with a new value. -The current Lat(itude), Alt(itude), Lon(gitude) values can also be retrieved with the methods POINT_VEC2.GetLat(), POINT_VEC2.GetAlt(), POINT_VEC2.GetLon() respectively. -The current axis values can be changed by using the methods POINT_VEC2.AddX(), POINT_VEC2.AddAlt(), POINT_VEC2.AddY() -to add or substract a value from the current respective axis value. -Note that the Set and Add methods return the current POINT_VEC2 object, so these manipulation methods can be chained... For example:

    - -
     local Vec2 = PointVec2:AddX( 100 ):AddY( 2000 ):GetVec2()
    -
    - - -
    -
    -
    -
    - - #POINT_VEC3 - -POINT_VEC3 - -
    -
    - -

    POINT_VEC3 class, extends Point#COORDINATE

    - -

    POINT_VEC3 defines a 3D point in the simulator and with its methods, you can use or manipulate the point in 3D space.

    - - - -

    Important Note: Most of the functions in this section were taken from MIST, and reworked to OO concepts. -In order to keep the credibility of the the author, -I want to emphasize that the formulas embedded in the MIST framework were created by Grimes or previous authors, -who you can find on the Eagle Dynamics Forums.

    - - -

    POINT_VEC3 constructor

    - -

    A new POINT_VEC3 object can be created with:

    - - - - -

    Manupulate the X, Y, Z coordinates of the POINT_VEC3

    - -

    A POINT_VEC3 class works in 3D space. It contains internally an X, Y, Z coordinate. -Methods exist to manupulate these coordinates.

    - -

    The current X, Y, Z axis can be retrieved with the methods POINT_VEC3.GetX(), POINT_VEC3.GetY(), POINT_VEC3.GetZ() respectively. -The methods POINT_VEC3.SetX(), POINT_VEC3.SetY(), POINT_VEC3.SetZ() change the respective axis with a new value. -The current axis values can be changed by using the methods POINT_VEC3.AddX(), POINT_VEC3.AddY(), POINT_VEC3.AddZ() -to add or substract a value from the current respective axis value. -Note that the Set and Add methods return the current POINT_VEC3 object, so these manipulation methods can be chained... For example:

    - -
     local Vec3 = PointVec3:AddX( 100 ):AddZ( 150 ):GetVec3()
    -
    - - -

    3D calculation methods

    - -

    Various calculation methods exist to use or manipulate 3D space. Find below a short description of each method:

    - - -

    Point Randomization

    - -

    Various methods exist to calculate random locations around a given 3D point.

    - - - - - -
    -
    -

    Type Point

    - -

    Type COORDINATE

    -

    Field(s)

    -
    -
    - - -COORDINATE:DistanceFromVec2(Vec2Reference) - -
    -
    - - - - -

    TODO: check this to replace -- Calculate the distance from a reference DCSTypes#Vec2. - @param #COORDINATE self - @param Dcs.DCSTypes#Vec2 Vec2Reference The reference DCSTypes#Vec2. - @return Dcs.DCSTypes#Distance The distance from the reference DCSTypes#Vec2 in meters.

    - -

    Parameter

    -
      -
    • - -

      Vec2Reference :

      - -
    • -
    -
    -
    -
    -
    - - -COORDINATE:Explosion(ExplosionIntensity) - -
    -
    - -

    Creates an explosion at the point of a certain intensity.

    - -

    Parameter

    -
      -
    • - -

      #number ExplosionIntensity :

      - -
    • -
    -
    -
    -
    -
    - - -COORDINATE:Flare(FlareColor, (, Azimuth) - -
    -
    - -

    Flares the point in a color.

    - -

    Parameters

    - -
    -
    -
    -
    - - -COORDINATE:FlareGreen((, Azimuth) - -
    -
    - -

    Flare the COORDINATE Green.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Azimuth ( : -ptional) Azimuth The azimuth of the flare direction. The default azimuth is 0.

      - -
    • -
    • - -

      Azimuth :

      - -
    • -
    -
    -
    -
    -
    - - -COORDINATE:FlareRed(Azimuth) - -
    -
    - -

    Flare the COORDINATE Red.

    - -

    Parameter

    -
      -
    • - -

      Azimuth :

      - -
    • -
    -
    -
    -
    -
    - - -COORDINATE:FlareWhite((, Azimuth) - -
    -
    - -

    Flare the COORDINATE White.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Azimuth ( : -ptional) Azimuth The azimuth of the flare direction. The default azimuth is 0.

      - -
    • -
    • - -

      Azimuth :

      - -
    • -
    -
    -
    -
    -
    - - -COORDINATE:FlareYellow((, Azimuth) - -
    -
    - -

    Flare the COORDINATE Yellow.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Azimuth ( : -ptional) Azimuth The azimuth of the flare direction. The default azimuth is 0.

      - -
    • -
    • - -

      Azimuth :

      - -
    • -
    -
    -
    -
    -
    - - -COORDINATE:Get2DDistance(TargetCoordinate) - -
    -
    - -

    Return the 2D distance in meters between the target COORDINATE and the COORDINATE.

    - -

    Parameter

    -
      -
    • - -

      #COORDINATE TargetCoordinate : -The target COORDINATE.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTypes#Distance: -Distance The distance in meters.

    - -
    -
    -
    -
    - - -COORDINATE:Get3DDistance(TargetCoordinate) - -
    -
    - -

    Return the 3D distance in meters between the target COORDINATE and the COORDINATE.

    - -

    Parameter

    -
      -
    • - -

      #COORDINATE TargetCoordinate : -The target COORDINATE.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTypes#Distance: -Distance The distance in meters.

    - -
    -
    -
    -
    - - -COORDINATE:GetAltitudeText(Settings) - -
    -
    - -

    Return the altitude text of the COORDINATE.

    - -

    Parameter

    -
      -
    • - -

      Settings :

      - -
    • -
    -

    Return value

    - -

    #string: -Altitude text.

    - -
    -
    -
    -
    - - -COORDINATE:GetAngleDegrees(DirectionVec3) - -
    -
    - -

    Return an angle in degrees from the COORDINATE using a direction vector in Vec3 format.

    - -

    Parameter

    - -

    Return value

    - -

    #number: -DirectionRadians The angle in degrees.

    - -
    -
    -
    -
    - - -COORDINATE:GetAngleRadians(DirectionVec3) - -
    -
    - -

    Return an angle in radians from the COORDINATE using a direction vector in Vec3 format.

    - -

    Parameter

    - -

    Return value

    - -

    #number: -DirectionRadians The angle in radians.

    - -
    -
    -
    -
    - - -COORDINATE:GetBRAText(AngleRadians, Distance, Settings) - -
    -
    - -

    Provides a Bearing / Range / Altitude string

    - -

    Parameters

    -
      -
    • - -

      #number AngleRadians : -The angle in randians

      - -
    • -
    • - -

      #number Distance : -The distance

      - -
    • -
    • - -

      Core.Settings#SETTINGS Settings :

      - -
    • -
    -

    Return value

    - -

    #string: -The BRA Text

    - -
    -
    -
    -
    - - -COORDINATE:GetBRText(AngleRadians, Distance, Settings) - -
    -
    - -

    Provides a Bearing / Range string

    - -

    Parameters

    -
      -
    • - -

      #number AngleRadians : -The angle in randians

      - -
    • -
    • - -

      #number Distance : -The distance

      - -
    • -
    • - -

      Core.Settings#SETTINGS Settings :

      - -
    • -
    -

    Return value

    - -

    #string: -The BR Text

    - -
    -
    -
    -
    - - -COORDINATE:GetBearingText(AngleRadians, Precision, Settings) - -
    -
    - -

    Provides a bearing text in degrees.

    - -

    Parameters

    -
      -
    • - -

      #number AngleRadians : -The angle in randians.

      - -
    • -
    • - -

      #number Precision : -The precision.

      - -
    • -
    • - -

      Core.Settings#SETTINGS Settings :

      - -
    • -
    -

    Return value

    - -

    #string: -The bearing text in degrees.

    - -
    -
    -
    -
    - - -COORDINATE:GetDirectionVec3(TargetCoordinate) - -
    -
    - -

    Return a direction vector Vec3 from COORDINATE to the COORDINATE.

    - -

    Parameter

    -
      -
    • - -

      #COORDINATE TargetCoordinate : -The target COORDINATE.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTypes#Vec3: -DirectionVec3 The direction vector in Vec3 format.

    - -
    -
    -
    -
    - - -COORDINATE:GetDistanceText(Distance, Settings) - -
    -
    - -

    Provides a distance text expressed in the units of measurement.

    - -

    Parameters

    - -

    Return value

    - -

    #string: -The distance text expressed in the units of measurement.

    - -
    -
    -
    -
    - - -COORDINATE:GetHeading() - -
    -
    - -

    Get the heading of the coordinate, if applicable.

    - -

    Return value

    - -

    #number: -or nil

    - -
    -
    -
    -
    - - -COORDINATE:GetHeadingText(Settings) - -
    -
    - -

    Return the heading text of the COORDINATE.

    - -

    Parameter

    -
      -
    • - -

      Settings :

      - -
    • -
    -

    Return value

    - -

    #string: -Heading text.

    - -
    -
    -
    -
    - - -COORDINATE:GetLandHeight() - -
    -
    - -

    Return the height of the land at the coordinate.

    - -

    Return value

    - -

    #number:

    - - -
    -
    -
    -
    - - -COORDINATE:GetMovingText(Settings) - -
    -
    - -

    Return velocity text of the COORDINATE.

    - -

    Parameter

    -
      -
    • - -

      Settings :

      - -
    • -
    -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -COORDINATE:GetNorthCorrectionRadians() - -
    -
    - -

    Get a correction in radians of the real magnetic north of the COORDINATE.

    - -

    Return value

    - -

    #number: -CorrectionRadians The correction in radians.

    - -
    -
    -
    -
    - - -COORDINATE:GetRandomVec2InRadius(OuterRadius, InnerRadius) - -
    -
    - -

    Return a random Vec2 within an Outer Radius and optionally NOT within an Inner Radius of the COORDINATE.

    - -

    Parameters

    - -

    Return value

    - -

    Dcs.DCSTypes#Vec2: -Vec2

    - -
    -
    -
    -
    - - -COORDINATE:GetRandomVec3InRadius(OuterRadius, InnerRadius) - -
    -
    - -

    Return a random Vec3 within an Outer Radius and optionally NOT within an Inner Radius of the COORDINATE.

    - -

    Parameters

    - -

    Return value

    - -

    Dcs.DCSTypes#Vec3: -Vec3

    - -
    -
    -
    -
    - - -COORDINATE:GetVec2() - -
    -
    - -

    Return the coordinates of the COORDINATE in Vec2 format.

    - -

    Return value

    - -

    Dcs.DCSTypes#Vec2: -The Vec2 format coordinate.

    - -
    -
    -
    -
    - - -COORDINATE:GetVec3() - -
    -
    - -

    Return the coordinates of the COORDINATE in Vec3 format.

    - -

    Return value

    - -

    Dcs.DCSTypes#Vec3: -The Vec3 format coordinate.

    - -
    -
    -
    -
    - - -COORDINATE:GetVelocity() - -
    -
    - -

    Return the velocity of the COORDINATE.

    - -

    Return value

    - -

    #number: -Velocity in meters per second.

    - -
    -
    -
    -
    - - -COORDINATE:GetVelocityText(Settings) - -
    -
    - -

    Return the velocity text of the COORDINATE.

    - -

    Parameter

    -
      -
    • - -

      Settings :

      - -
    • -
    -

    Return value

    - -

    #string: -Velocity text.

    - -
    -
    -
    -
    - - - -COORDINATE.Heading - -
    -
    - - - -
    -
    -
    -
    - - -COORDINATE:IlluminationBomb() - -
    -
    - -

    Creates an illumination bomb at the point.

    - -
    -
    -
    -
    - - -COORDINATE:IsInRadius(ToCoordinate, Radius, Coordinate) - -
    -
    - -

    Returns if a Coordinate is in a certain Radius of this Coordinate in 2D plane using the X and Z axis.

    - -

    Parameters

    -
      -
    • - -

      #COORDINATE ToCoordinate : -The coordinate that will be tested if it is in the radius of this coordinate.

      - -
    • -
    • - -

      #number Radius : -The radius of the circle on the 2D plane around this coordinate.

      - -
    • -
    • - -

      Coordinate :

      - -
    • -
    -

    Return value

    - -

    #boolean: -true if in the Radius.

    - -
    -
    -
    -
    - - -COORDINATE:IsInSphere(ToCoordinate, Radius, Coordinate) - -
    -
    - -

    Returns if a Coordinate is in a certain radius of this Coordinate in 3D space using the X, Y and Z axis.

    - - -

    So Radius defines the radius of the a Sphere in 3D space around this coordinate.

    - -

    Parameters

    -
      -
    • - -

      #COORDINATE ToCoordinate : -The coordinate that will be tested if it is in the radius of this coordinate.

      - -
    • -
    • - -

      #number Radius : -The radius of the sphere in the 3D space around this coordinate.

      - -
    • -
    • - -

      Coordinate :

      - -
    • -
    -

    Return value

    - -

    #boolean: -true if in the Sphere.

    - -
    -
    -
    -
    - - -COORDINATE:IsLOS(ToCoordinate) - -
    -
    - -

    Returns if a Coordinate has Line of Sight (LOS) with the ToCoordinate.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean: -true If the ToCoordinate has LOS with the Coordinate, otherwise false.

    - -
    -
    -
    -
    - - -COORDINATE:MarkToAll(MarkText) - -
    -
    - -

    Mark to All

    - -

    Parameter

    -
      -
    • - -

      #string MarkText : -Free format text that shows the marking clarification.

      - -
    • -
    -

    Return value

    - -

    #number: -The resulting Mark ID which is a number.

    - -

    Usage:

    -
      local TargetCoord = TargetGroup:GetCoordinate()
    -  local MarkID = TargetCoord:MarkToAll( "This is a target for all players" )
    - -
    -
    -
    -
    - - -COORDINATE:MarkToCoalition(MarkText, Coalition) - -
    -
    - -

    Mark to Coalition

    - -

    Parameters

    -
      -
    • - -

      #string MarkText : -Free format text that shows the marking clarification.

      - -
    • -
    • - -

      Coalition :

      - -
    • -
    -

    Return value

    - -

    #number: -The resulting Mark ID which is a number.

    - -

    Usage:

    -
      local TargetCoord = TargetGroup:GetCoordinate()
    -  local MarkID = TargetCoord:MarkToCoalition( "This is a target for the red coalition", coalition.side.RED )
    - -
    -
    -
    -
    - - -COORDINATE:MarkToCoalitionBlue(MarkText) - -
    -
    - -

    Mark to Blue Coalition

    - -

    Parameter

    -
      -
    • - -

      #string MarkText : -Free format text that shows the marking clarification.

      - -
    • -
    -

    Return value

    - -

    #number: -The resulting Mark ID which is a number.

    - -

    Usage:

    -
      local TargetCoord = TargetGroup:GetCoordinate()
    -  local MarkID = TargetCoord:MarkToCoalitionBlue( "This is a target for the blue coalition" )
    - -
    -
    -
    -
    - - -COORDINATE:MarkToCoalitionRed(MarkText) - -
    -
    - -

    Mark to Red Coalition

    - -

    Parameter

    -
      -
    • - -

      #string MarkText : -Free format text that shows the marking clarification.

      - -
    • -
    -

    Return value

    - -

    #number: -The resulting Mark ID which is a number.

    - -

    Usage:

    -
      local TargetCoord = TargetGroup:GetCoordinate()
    -  local MarkID = TargetCoord:MarkToCoalitionRed( "This is a target for the red coalition" )
    - -
    -
    -
    -
    - - -COORDINATE:MarkToGroup(MarkText, MarkGroup) - -
    -
    - -

    Mark to Group

    - -

    Parameters

    -
      -
    • - -

      #string MarkText : -Free format text that shows the marking clarification.

      - -
    • -
    • - -

      Wrapper.Group#GROUP MarkGroup : -The Group that receives the mark.

      - -
    • -
    -

    Return value

    - -

    #number: -The resulting Mark ID which is a number.

    - -

    Usage:

    -
      local TargetCoord = TargetGroup:GetCoordinate()
    -  local MarkGroup = GROUP:FindByName( "AttackGroup" )
    -  local MarkID = TargetCoord:MarkToGroup( "This is a target for the attack group", AttackGroup )
    - -
    -
    -
    -
    - - -COORDINATE:New(x, y, z) - -
    -
    - -

    COORDINATE constructor.

    - -

    Parameters

    - -

    Return value

    - -

    #COORDINATE:

    - - -
    -
    -
    -
    - - -COORDINATE:NewFromVec2(Vec2, LandHeightAdd) - -
    -
    - -

    Create a new COORDINATE object from Vec2 coordinates.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Vec2 Vec2 : -The Vec2 point.

      - -
    • -
    • - -

      Dcs.DCSTypes#Distance LandHeightAdd : -(optional) The default height if required to be evaluated will be the land height of the x, y coordinate. You can specify an extra height to be added to the land height.

      - -
    • -
    -

    Return value

    - -

    #COORDINATE:

    - - -
    -
    -
    -
    - - -COORDINATE:NewFromVec3(Vec3) - -
    -
    - -

    Create a new COORDINATE object from Vec3 coordinates.

    - -

    Parameter

    - -

    Return value

    - -

    #COORDINATE:

    - - -
    -
    -
    -
    - - -COORDINATE:RemoveMark(MarkID) - -
    -
    - -

    Remove a mark

    - -

    Parameter

    -
      -
    • - -

      #number MarkID : -The ID of the mark to be removed.

      - -
    • -
    -

    Usage:

    -
      local TargetCoord = TargetGroup:GetCoordinate()
    -  local MarkGroup = GROUP:FindByName( "AttackGroup" )
    -  local MarkID = TargetCoord:MarkToGroup( "This is a target for the attack group", AttackGroup )
    -  <<< logic >>>
    -  RemoveMark( MarkID ) -- The mark is now removed
    - -
    -
    -
    -
    - - -COORDINATE:SetHeading(Heading) - -
    -
    - -

    Set the heading of the coordinate, if applicable.

    - -

    Parameter

    -
      -
    • - -

      Heading :

      - -
    • -
    -
    -
    -
    -
    - - -COORDINATE:SetVelocity(Velocity) - -
    -
    - -

    Set the velocity of the COORDINATE.

    - -

    Parameter

    -
      -
    • - -

      #string Velocity : -Velocity in meters per second.

      - -
    • -
    -
    -
    -
    -
    - - -COORDINATE:Smoke(SmokeColor) - -
    -
    - -

    Smokes the point in a color.

    - -

    Parameter

    - -
    -
    -
    -
    - - -COORDINATE:SmokeBlue() - -
    -
    - -

    Smoke the COORDINATE Blue.

    - -
    -
    -
    -
    - - -COORDINATE:SmokeGreen() - -
    -
    - -

    Smoke the COORDINATE Green.

    - -
    -
    -
    -
    - - -COORDINATE:SmokeOrange() - -
    -
    - -

    Smoke the COORDINATE Orange.

    - -
    -
    -
    -
    - - -COORDINATE:SmokeRed() - -
    -
    - -

    Smoke the COORDINATE Red.

    - -
    -
    -
    -
    - - -COORDINATE:SmokeWhite() - -
    -
    - -

    Smoke the COORDINATE White.

    - -
    -
    -
    -
    - - -COORDINATE:ToString(Controllable, Settings, Task) - -
    -
    - -

    Provides a coordinate string of the point, based on a coordinate format system: - * Uses default settings in COORDINATE.

    - - -
      -
    • Can be overridden if for a GROUP containing x clients, a menu was selected to override the default.
    • -
    - -

    Parameters

    - -

    Return value

    - -

    #string: -The coordinate Text in the configured coordinate system.

    - -
    -
    -
    -
    - - -COORDINATE:ToStringA2A(Controllable, Settings) - -
    -
    - -

    Provides a coordinate string of the point, based on the A2A coordinate format system.

    - -

    Parameters

    - -

    Return value

    - -

    #string: -The coordinate Text in the configured coordinate system.

    - -
    -
    -
    -
    - - -COORDINATE:ToStringA2G(Controllable, Settings) - -
    -
    - -

    Provides a coordinate string of the point, based on the A2G coordinate format system.

    - -

    Parameters

    - -

    Return value

    - -

    #string: -The coordinate Text in the configured coordinate system.

    - -
    -
    -
    -
    - - -COORDINATE:ToStringAspect(TargetCoordinate) - -
    -
    - -

    Return an aspect string from a COORDINATE to the Angle of the object.

    - -

    Parameter

    -
      -
    • - -

      #COORDINATE TargetCoordinate : -The target COORDINATE.

      - -
    • -
    -

    Return value

    - -

    #string: -The Aspect string, which is Hot, Cold or Flanking.

    - -
    -
    -
    -
    - - -COORDINATE:ToStringBR(TargetCoordinate, FromCoordinate, Settings) - -
    -
    - -

    Return a BR string from a COORDINATE to the COORDINATE.

    - -

    Parameters

    -
      -
    • - -

      #COORDINATE TargetCoordinate : -The target COORDINATE.

      - -
    • -
    • - -

      FromCoordinate :

      - -
    • -
    • - -

      Settings :

      - -
    • -
    -

    Return value

    - -

    #string: -The BR text.

    - -
    -
    -
    -
    - - -COORDINATE:ToStringBRA(TargetCoordinate, FromCoordinate, Settings) - -
    -
    - -

    Return a BRAA string from a COORDINATE to the COORDINATE.

    - -

    Parameters

    -
      -
    • - -

      #COORDINATE TargetCoordinate : -The target COORDINATE.

      - -
    • -
    • - -

      FromCoordinate :

      - -
    • -
    • - -

      Settings :

      - -
    • -
    -

    Return value

    - -

    #string: -The BR text.

    - -
    -
    -
    -
    - - -COORDINATE:ToStringBULLS(Coalition, Settings) - -
    -
    - -

    Return a BULLS string from a COORDINATE to the BULLS of the coalition.

    - -

    Parameters

    - -

    Return value

    - -

    #string: -The BR text.

    - -
    -
    -
    -
    - - -COORDINATE:ToStringFromRP(Controllable, Settings, ReferenceCoord, ReferenceName) - -
    -
    - -

    Provides a coordinate string of the point, based on a coordinate format system: - * Uses default settings in COORDINATE.

    - - -
      -
    • Can be overridden if for a GROUP containing x clients, a menu was selected to override the default.
    • -
    - -

    Parameters

    - -

    Return value

    - -

    #string: -The coordinate Text in the configured coordinate system.

    - -
    -
    -
    -
    - - -COORDINATE:ToStringLLDDM(Settings) - -
    -
    - -

    Provides a Lat Lon string in Degree Decimal Minute format.

    - -

    Parameter

    - -

    Return value

    - -

    #string: -The LL DDM Text

    - -
    -
    -
    -
    - - -COORDINATE:ToStringLLDMS(Settings) - -
    -
    - -

    Provides a Lat Lon string in Degree Minute Second format.

    - -

    Parameter

    - -

    Return value

    - -

    #string: -The LL DMS Text

    - -
    -
    -
    -
    - - -COORDINATE:ToStringMGRS(Settings) - -
    -
    - -

    Provides a MGRS string

    - -

    Parameter

    - -

    Return value

    - -

    #string: -The MGRS Text

    - -
    -
    -
    -
    - - -COORDINATE:Translate(Distance, Angle) - -
    -
    - -

    Add a Distance in meters from the COORDINATE orthonormal plane, with the given angle, and calculate the new COORDINATE.

    - -

    Parameters

    - -

    Return value

    - -

    #COORDINATE: -The new calculated COORDINATE.

    - -
    -
    -
    -
    - - - -COORDINATE.Velocity - -
    -
    - - - -
    -
    -
    -
    - - - -COORDINATE.WaypointAction - -
    -
    - - - -
    -
    -
    -
    - - -COORDINATE:WaypointAir(AltType, Type, Action, Speed, SpeedLocked) - -
    -
    - -

    Build an air type route point.

    - -

    Parameters

    - -

    Return value

    - -

    #table: -The route point.

    - -
    -
    -
    -
    - - -COORDINATE:WaypointAirFlyOverPoint(AltType, Speed) - -
    -
    - -

    Build a Waypoint Air "Fly Over Point".

    - -

    Parameters

    - -

    Return value

    - -

    #table: -The route point.

    - -
    -
    -
    -
    - - -COORDINATE:WaypointAirLanding(Speed) - -
    -
    - -

    Build a Waypoint Air "Landing".

    - -

    Parameter

    - -

    Return value

    - -

    #table: -The route point.

    - -

    Usage:

    -
    
    -   LandingZone = ZONE:New( "LandingZone" )
    -   LandingCoord = LandingZone:GetCoordinate()
    -   LandingWaypoint = LandingCoord:WaypointAirLanding( 60 )
    -   HeliGroup:Route( { LandWaypoint }, 1 ) -- Start landing the helicopter in one second.
    -
    - -
    -
    -
    -
    - - -COORDINATE:WaypointAirTakeOffParking(AltType, Speed) - -
    -
    - -

    Build a Waypoint Air "Take Off Parking".

    - -

    Parameters

    - -

    Return value

    - -

    #table: -The route point.

    - -
    -
    -
    -
    - - -COORDINATE:WaypointAirTakeOffParkingHot(AltType, Speed) - -
    -
    - -

    Build a Waypoint Air "Take Off Parking Hot".

    - -

    Parameters

    - -

    Return value

    - -

    #table: -The route point.

    - -
    -
    -
    -
    - - -COORDINATE:WaypointAirTakeOffRunway(AltType, Speed) - -
    -
    - -

    Build a Waypoint Air "Take Off Runway".

    - -

    Parameters

    - -

    Return value

    - -

    #table: -The route point.

    - -
    -
    -
    -
    - - -COORDINATE:WaypointAirTurningPoint(AltType, Speed) - -
    -
    - -

    Build a Waypoint Air "Turning Point".

    - -

    Parameters

    - -

    Return value

    - -

    #table: -The route point.

    - -
    -
    -
    -
    - - - -COORDINATE.WaypointAltType - -
    -
    - - - -
    -
    -
    -
    - - -COORDINATE:WaypointGround(Speed, Formation) - -
    -
    - -

    Build an ground type route point.

    - -

    Parameters

    -
      -
    • - -

      #number Speed : -(optional) Speed in km/h. The default speed is 999 km/h.

      - -
    • -
    • - -

      #string Formation : -(optional) The route point Formation, which is a text string that specifies exactly the Text in the Type of the route point, like "Vee", "Echelon Right".

      - -
    • -
    -

    Return value

    - -

    #table: -The route point.

    - -
    -
    -
    -
    - - - -COORDINATE.WaypointType - -
    -
    - - - -
    -
    -
    -
    - - - -COORDINATE.x - -
    -
    - - - -
    -
    -
    -
    - - - -COORDINATE.y - -
    -
    - - - -
    -
    -
    -
    - - - -COORDINATE.z - -
    -
    - - - -
    -
    - -

    Type COORDINATE.WaypointAction

    - -

    Type COORDINATE.WaypointAltType

    - -

    Type COORDINATE.WaypointType

    - -

    Type POINT_VEC2

    -

    Field(s)

    -
    -
    - - -POINT_VEC2:AddAlt(Altitude) - -
    -
    - -

    Add to the current land height an altitude.

    - -

    Parameter

    -
      -
    • - -

      #number Altitude : -The Altitude to add. If nothing (nil) is given, then the current land altitude is set.

      - -
    • -
    -

    Return value

    - -

    #POINT_VEC2:

    - - -
    -
    -
    -
    - - -POINT_VEC2:AddX(x) - -
    -
    - -

    Add to the x coordinate of the POINT_VEC2.

    - -

    Parameter

    -
      -
    • - -

      #number x : -The x coordinate.

      - -
    • -
    -

    Return value

    - -

    #POINT_VEC2:

    - - -
    -
    -
    -
    - - -POINT_VEC2:AddY(y) - -
    -
    - -

    Add to the y coordinate of the POINT_VEC2.

    - -

    Parameter

    -
      -
    • - -

      #number y : -The y coordinate.

      - -
    • -
    -

    Return value

    - -

    #POINT_VEC2:

    - - -
    -
    -
    -
    - - -POINT_VEC2:DistanceFromPointVec2(PointVec2Reference) - -
    -
    - - - - -

    TODO: Check this to replace -- Calculate the distance from a reference #POINT_VEC2. - @param #POINTVEC2 self - @param #POINTVEC2 PointVec2Reference The reference #POINT_VEC2. - @return Dcs.DCSTypes#Distance The distance from the reference #POINT_VEC2 in meters.

    - -

    Parameter

    -
      -
    • - -

      PointVec2Reference :

      - -
    • -
    -
    -
    -
    -
    - - -POINT_VEC2:GetAlt() - -
    -
    - -

    Return the altitude (height) of the land at the POINT_VEC2.

    - -

    Return value

    - -

    #number: -The land altitude.

    - -
    -
    -
    -
    - - -POINT_VEC2:GetLat() - -
    -
    - -

    Return Return the Lat(itude) coordinate of the POINTVEC2 (ie: (parent)POINTVEC3.x).

    - -

    Return value

    - -

    #number: -The x coodinate.

    - -
    -
    -
    -
    - - -POINT_VEC2:GetLon() - -
    -
    - -

    Return the Lon(gitude) coordinate of the POINTVEC2 (ie: (parent)POINTVEC3.z).

    - -

    Return value

    - -

    #number: -The y coodinate.

    - -
    -
    -
    -
    - - -POINT_VEC2:GetRandomPointVec2InRadius(OuterRadius, InnerRadius) - -
    -
    - -

    Return a random POINTVEC2 within an Outer Radius and optionally NOT within an Inner Radius of the POINTVEC2.

    - -

    Parameters

    - -

    Return value

    - -

    #POINT_VEC2:

    - - -
    -
    -
    -
    - - -POINT_VEC2:GetX() - -
    -
    - -

    Return the x coordinate of the POINT_VEC2.

    - -

    Return value

    - -

    #number: -The x coodinate.

    - -
    -
    -
    -
    - - -POINT_VEC2:GetY() - -
    -
    - -

    Return the y coordinate of the POINT_VEC2.

    - -

    Return value

    - -

    #number: -The y coodinate.

    - -
    -
    -
    -
    - - -POINT_VEC2:New(x, y, LandHeightAdd) - -
    -
    - -

    POINT_VEC2 constructor.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Distance x : -The x coordinate of the Vec3 point, pointing to the North.

      - -
    • -
    • - -

      Dcs.DCSTypes#Distance y : -The y coordinate of the Vec3 point, pointing to the Right.

      - -
    • -
    • - -

      Dcs.DCSTypes#Distance LandHeightAdd : -(optional) The default height if required to be evaluated will be the land height of the x, y coordinate. You can specify an extra height to be added to the land height.

      - -
    • -
    -

    Return value

    - -

    Core.Point#POINT_VEC2:

    - - -
    -
    -
    -
    - - -POINT_VEC2:NewFromVec2(Vec2, LandHeightAdd) - -
    -
    - -

    Create a new POINT_VEC2 object from Vec2 coordinates.

    - -

    Parameters

    - -

    Return value

    - -

    Core.Point#POINT_VEC2: -self

    - -
    -
    -
    -
    - - -POINT_VEC2:NewFromVec3(Vec3) - -
    -
    - -

    Create a new POINT_VEC2 object from Vec3 coordinates.

    - -

    Parameter

    - -

    Return value

    - -

    Core.Point#POINT_VEC2: -self

    - -
    -
    -
    -
    - - -POINT_VEC2:SetAlt(Altitude) - -
    -
    - -

    Set the altitude of the POINT_VEC2.

    - -

    Parameter

    -
      -
    • - -

      #number Altitude : -The land altitude. If nothing (nil) is given, then the current land altitude is set.

      - -
    • -
    -

    Return value

    - -

    #POINT_VEC2:

    - - -
    -
    -
    -
    - - -POINT_VEC2:SetLat(x) - -
    -
    - -

    Set the Lat(itude) coordinate of the POINTVEC2 (ie: POINTVEC3.x).

    - -

    Parameter

    -
      -
    • - -

      #number x : -The x coordinate.

      - -
    • -
    -

    Return value

    - -

    #POINT_VEC2:

    - - -
    -
    -
    -
    - - -POINT_VEC2:SetLon(y, z) - -
    -
    - -

    Set the Lon(gitude) coordinate of the POINTVEC2 (ie: POINTVEC3.z).

    - -

    Parameters

    -
      -
    • - -

      #number y : -The y coordinate.

      - -
    • -
    • - -

      z :

      - -
    • -
    -

    Return value

    - -

    #POINT_VEC2:

    - - -
    -
    -
    -
    - - -POINT_VEC2:SetX(x) - -
    -
    - -

    Set the x coordinate of the POINT_VEC2.

    - -

    Parameter

    -
      -
    • - -

      #number x : -The x coordinate.

      - -
    • -
    -

    Return value

    - -

    #POINT_VEC2:

    - - -
    -
    -
    -
    - - -POINT_VEC2:SetY(y) - -
    -
    - -

    Set the y coordinate of the POINT_VEC2.

    - -

    Parameter

    -
      -
    • - -

      #number y : -The y coordinate.

      - -
    • -
    -

    Return value

    - -

    #POINT_VEC2:

    - - -
    -
    -
    -
    - - Dcs.DCSTypes#Distance - -POINT_VEC2.x - -
    -
    - -

    The x coordinate in meters.

    - -
    -
    -
    -
    - - Dcs.DCSTypes#Distance - -POINT_VEC2.y - -
    -
    - -

    the y coordinate in meters.

    - -
    -
    -
    -
    - - - -POINT_VEC2.z - -
    -
    - - - -
    -
    - -

    Type POINT_VEC3

    - -

    The POINT_VEC3 class

    - -

    Field(s)

    -
    -
    - - -POINT_VEC3:AddX(x) - -
    -
    - -

    Add to the x coordinate of the POINT_VEC3.

    - -

    Parameter

    -
      -
    • - -

      #number x : -The x coordinate value to add to the current x coodinate.

      - -
    • -
    -

    Return value

    - -

    #POINT_VEC3:

    - - -
    -
    -
    -
    - - -POINT_VEC3:AddY(y) - -
    -
    - -

    Add to the y coordinate of the POINT_VEC3.

    - -

    Parameter

    -
      -
    • - -

      #number y : -The y coordinate value to add to the current y coodinate.

      - -
    • -
    -

    Return value

    - -

    #POINT_VEC3:

    - - -
    -
    -
    -
    - - -POINT_VEC3:AddZ(z) - -
    -
    - -

    Add to the z coordinate of the POINT_VEC3.

    - -

    Parameter

    -
      -
    • - -

      #number z : -The z coordinate value to add to the current z coodinate.

      - -
    • -
    -

    Return value

    - -

    #POINT_VEC3:

    - - -
    -
    -
    -
    - - Utilities.Utils#FLARECOLOR - -POINT_VEC3.FlareColor - -
    -
    - - - -
    -
    -
    -
    - - -POINT_VEC3:GetRandomPointVec3InRadius(OuterRadius, InnerRadius) - -
    -
    - -

    Return a random POINTVEC3 within an Outer Radius and optionally NOT within an Inner Radius of the POINTVEC3.

    - -

    Parameters

    - -

    Return value

    - -

    #POINT_VEC3:

    - - -
    -
    -
    -
    - - -POINT_VEC3:GetX() - -
    -
    - -

    Return the x coordinate of the POINT_VEC3.

    - -

    Return value

    - -

    #number: -The x coodinate.

    - -
    -
    -
    -
    - - -POINT_VEC3:GetY() - -
    -
    - -

    Return the y coordinate of the POINT_VEC3.

    - -

    Return value

    - -

    #number: -The y coodinate.

    - -
    -
    -
    -
    - - -POINT_VEC3:GetZ() - -
    -
    - -

    Return the z coordinate of the POINT_VEC3.

    - -

    Return value

    - -

    #number: -The z coodinate.

    - -
    -
    -
    -
    - - -POINT_VEC3:New(x, y, z) - -
    -
    - -

    Create a new POINT_VEC3 object.

    - -

    Parameters

    - -

    Return value

    - -

    Core.Point#POINT_VEC3:

    - - -
    -
    -
    -
    - - -POINT_VEC3:NewFromVec2(Vec2, LandHeightAdd) - -
    -
    - -

    Create a new POINT_VEC3 object from Vec2 coordinates.

    - -

    Parameters

    - -

    Return value

    - -

    Core.Point#POINT_VEC3: -self

    - -
    -
    -
    -
    - - -POINT_VEC3:NewFromVec3(Vec3) - -
    -
    - -

    Create a new POINT_VEC3 object from Vec3 coordinates.

    - -

    Parameter

    - -

    Return value

    - -

    Core.Point#POINT_VEC3: -self

    - -
    -
    -
    -
    - - #POINT_VEC3.RoutePointAction - -POINT_VEC3.RoutePointAction - -
    -
    - - - -
    -
    -
    -
    - - #POINT_VEC3.RoutePointAltType - -POINT_VEC3.RoutePointAltType - -
    -
    - - - -
    -
    -
    -
    - - #POINT_VEC3.RoutePointType - -POINT_VEC3.RoutePointType - -
    -
    - - - -
    -
    -
    -
    - - -POINT_VEC3:SetX(x) - -
    -
    - -

    Set the x coordinate of the POINT_VEC3.

    - -

    Parameter

    -
      -
    • - -

      #number x : -The x coordinate.

      - -
    • -
    -

    Return value

    - -

    #POINT_VEC3:

    - - -
    -
    -
    -
    - - -POINT_VEC3:SetY(y) - -
    -
    - -

    Set the y coordinate of the POINT_VEC3.

    - -

    Parameter

    -
      -
    • - -

      #number y : -The y coordinate.

      - -
    • -
    -

    Return value

    - -

    #POINT_VEC3:

    - - -
    -
    -
    -
    - - -POINT_VEC3:SetZ(z) - -
    -
    - -

    Set the z coordinate of the POINT_VEC3.

    - -

    Parameter

    -
      -
    • - -

      #number z : -The z coordinate.

      - -
    • -
    -

    Return value

    - -

    #POINT_VEC3:

    - - -
    -
    -
    -
    - - Utilities.Utils#SMOKECOLOR - -POINT_VEC3.SmokeColor - -
    -
    - - - -
    -
    -
    -
    - - #number - -POINT_VEC3.x - -
    -
    - -

    The x coordinate in 3D space.

    - -
    -
    -
    -
    - - #number - -POINT_VEC3.y - -
    -
    - -

    The y coordinate in 3D space.

    - -
    -
    -
    -
    - - #number - -POINT_VEC3.z - -
    -
    - -

    The z coordiante in 3D space.

    - -
    -
    - -

    Type POINT_VEC3.RoutePointAction

    - -

    RoutePoint Actions

    - -

    Field(s)

    -
    -
    - - -POINT_VEC3.RoutePointAction.FromParkingArea - -
    -
    - -

    "From Parking Area"

    - -
    -
    -
    -
    - - -POINT_VEC3.RoutePointAction.TurningPoint - -
    -
    - -

    "Turning Point"

    - -
    -
    - -

    Type POINT_VEC3.RoutePointAltType

    - -

    RoutePoint AltTypes

    - -

    Field(s)

    -
    -
    - - -POINT_VEC3.RoutePointAltType.BARO - -
    -
    - -

    "BARO"

    - -
    -
    - -

    Type POINT_VEC3.RoutePointType

    - -

    RoutePoint Types

    - -

    Field(s)

    -
    -
    - - -POINT_VEC3.RoutePointType.TakeOffParking - -
    -
    - -

    "TakeOffParking"

    - -
    -
    -
    -
    - - -POINT_VEC3.RoutePointType.TurningPoint - -
    -
    - -

    "Turning Point"

    - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Positionable.html b/docs/Documentation/Positionable.html deleted file mode 100644 index 7b0f35730..000000000 --- a/docs/Documentation/Positionable.html +++ /dev/null @@ -1,2072 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Positionable

    - -

    Wrapper -- POSITIONABLE wraps DCS classes that are "positionable".

    - - - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - -
    POSITIONABLE -

    POSITIONABLE class, extends Identifiable#IDENTIFIABLE

    - -

    The POSITIONABLE class is a wrapper class to handle the POSITIONABLE objects:

    - -
      -
    • Support all DCS APIs.
    • -
    -
    -

    Type DCSPositionable

    - - - - - -
    DCSPositionable.id_ -

    The ID of the controllable in DCS

    -
    - -

    Type POSITIONABLE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    POSITIONABLE:AddCargo(Cargo) -

    Add cargo.

    -
    POSITIONABLE:CargoItemCount() -

    Get cargo item count.

    -
    POSITIONABLE:ClearCargo() -

    Clear all cargo.

    -
    POSITIONABLE:Flare(FlareColor) -

    Signal a flare at the position of the POSITIONABLE.

    -
    POSITIONABLE:FlareGreen() -

    Signal a green flare at the position of the POSITIONABLE.

    -
    POSITIONABLE:FlareRed() -

    Signal a red flare at the position of the POSITIONABLE.

    -
    POSITIONABLE:FlareWhite() -

    Signal a white flare at the position of the POSITIONABLE.

    -
    POSITIONABLE:FlareYellow() -

    Signal a yellow flare at the position of the POSITIONABLE.

    -
    POSITIONABLE:GetAltitude() -

    Returns the altitude of the POSITIONABLE.

    -
    POSITIONABLE:GetBeacon() -

    Create a Radio#BEACON, to allow this POSITIONABLE to broadcast beacon signals

    -
    POSITIONABLE:GetBoundingBox() -

    Get the bounding box of the underlying POSITIONABLE DCS Object.

    -
    POSITIONABLE:GetCoordinate() -

    Returns a COORDINATE object indicating the point in 3D of the POSITIONABLE within the mission.

    -
    POSITIONABLE:GetHeading() -

    Returns the POSITIONABLE heading in degrees.

    -
    POSITIONABLE:GetHeight() -

    Returns the POSITIONABLE height in meters.

    -
    POSITIONABLE:GetLaserCode() -

    Get the last assigned laser code

    -
    POSITIONABLE:GetMessage(Message, Duration, Name) -

    Returns a message with the callsign embedded (if there is one).

    -
    POSITIONABLE:GetMessageText(Message, Name) -

    Returns the message text with the callsign embedded (if there is one).

    -
    POSITIONABLE:GetMessageType(Message, MessageType, Name) -

    Returns a message of a specified type with the callsign embedded (if there is one).

    -
    POSITIONABLE:GetPointVec2() -

    Returns a POINT_VEC2 object indicating the point in 2D of the POSITIONABLE within the mission.

    -
    POSITIONABLE:GetPointVec3() -

    Returns a POINT_VEC3 object indicating the point in 3D of the POSITIONABLE within the mission.

    -
    POSITIONABLE:GetPositionVec3() -

    Returns the DCSTypes#Position3 position vectors indicating the point and direction vectors in 3D of the POSITIONABLE within the mission.

    -
    POSITIONABLE:GetRadio() -

    Create a Radio#RADIO, to allow radio transmission for this POSITIONABLE.

    -
    POSITIONABLE:GetRandomVec3(Radius) -

    Returns a random DCSTypes#Vec3 vector within a range, indicating the point in 3D of the POSITIONABLE within the mission.

    -
    POSITIONABLE:GetSpot() -

    Get the Spot

    -
    POSITIONABLE:GetVec2() -

    Returns the DCSTypes#Vec2 vector indicating the point in 2D of the POSITIONABLE within the mission.

    -
    POSITIONABLE:GetVec3() -

    Returns the DCSTypes#Vec3 vector indicating the 3D vector of the POSITIONABLE within the mission.

    -
    POSITIONABLE:GetVelocity() -

    Returns the a Velocity object from the positionable.

    -
    POSITIONABLE:GetVelocityKMH() -

    Returns the POSITIONABLE velocity in km/h.

    -
    POSITIONABLE:GetVelocityMPS() -

    Returns the POSITIONABLE velocity in meters per second.

    -
    POSITIONABLE:GetVelocityVec3() -

    Returns the POSITIONABLE velocity Vec3 vector.

    -
    POSITIONABLE:HasCargo(Cargo) -

    Returns if carrier has given cargo.

    -
    POSITIONABLE:InAir() -

    Returns true if the POSITIONABLE is in the air.

    -
    POSITIONABLE:IsAboveRunway() -

    Returns if the Positionable is located above a runway.

    -
    POSITIONABLE:IsLasing() -

    Check if the POSITIONABLE is lasing a target

    -
    POSITIONABLE:LaseOff() -

    Stop Lasing a POSITIONABLE

    -
    POSITIONABLE:LaseUnit(Target, LaserCode, Duration) -

    Start Lasing a POSITIONABLE

    -
    POSITIONABLE.LaserCode - -
    POSITIONABLE:Message(Message, Duration, Name) -

    Send a message to the players in the Group.

    -
    POSITIONABLE:MessageToAll(Message, Duration, Name) -

    Send a message to all coalitions.

    -
    POSITIONABLE:MessageToBlue(Message, Duration, Name) -

    Send a message to the blue coalition.

    -
    POSITIONABLE:MessageToClient(Message, Duration, Client, Name) -

    Send a message to a client.

    -
    POSITIONABLE:MessageToCoalition(Message, Duration, MessageCoalition) -

    Send a message to a coalition.

    -
    POSITIONABLE:MessageToGroup(Message, Duration, MessageGroup, Name) -

    Send a message to a Group.

    -
    POSITIONABLE:MessageToRed(Message, Duration, Name) -

    Send a message to the red coalition.

    -
    POSITIONABLE:MessageToSetGroup(Message, Duration, MessageSetGroup, Name) -

    Send a message to a Set#SET_GROUP.

    -
    POSITIONABLE:MessageTypeToCoalition(Message, MessageType, MessageCoalition) -

    Send a message to a coalition.

    -
    POSITIONABLE:MessageTypeToGroup(Message, MessageType, MessageGroup, Name) -

    Send a message of a message type to a Group.

    -
    POSITIONABLE:New(PositionableName) -

    Create a new POSITIONABLE from a DCSPositionable

    -
    POSITIONABLE:RemoveCargo(Cargo) -

    Remove cargo.

    -
    POSITIONABLE:Smoke(SmokeColor, Range, AddHeight) -

    Smoke the POSITIONABLE.

    -
    POSITIONABLE:SmokeBlue() -

    Smoke the POSITIONABLE Blue.

    -
    POSITIONABLE:SmokeGreen() -

    Smoke the POSITIONABLE Green.

    -
    POSITIONABLE:SmokeOrange() -

    Smoke the POSITIONABLE Orange.

    -
    POSITIONABLE:SmokeRed() -

    Smoke the POSITIONABLE Red.

    -
    POSITIONABLE:SmokeWhite() -

    Smoke the POSITIONABLE White.

    -
    POSITIONABLE.Spot - -
    POSITIONABLE.__ - -
    - -

    Type POSITIONABLE.__

    - - - - - -
    POSITIONABLE.__.Cargo - -
    - -

    Global(s)

    -
    -
    - - #POSITIONABLE - -POSITIONABLE - -
    -
    - -

    POSITIONABLE class, extends Identifiable#IDENTIFIABLE

    - -

    The POSITIONABLE class is a wrapper class to handle the POSITIONABLE objects:

    - -
      -
    • Support all DCS APIs.
    • -
    - - -
      -
    • Enhance with POSITIONABLE specific APIs not in the DCS API set.
    • -
    • Manage the "state" of the POSITIONABLE.
    • -
    - -

    POSITIONABLE constructor

    - -

    The POSITIONABLE class provides the following functions to construct a POSITIONABLE instance:

    - - - -

    Get the current speed

    - -

    There are 3 methods that can be used to determine the speed. -Use POSITIONABLE.GetVelocityKMH() to retrieve the current speed in km/h. Use POSITIONABLE.GetVelocityMPS() to retrieve the speed in meters per second. -The method POSITIONABLE.GetVelocity() returns the speed vector (a Vec3).

    - -

    Get the current altitude

    - -

    Altitude can be retrieved using the method POSITIONABLE.GetHeight() and returns the current altitude in meters from the orthonormal plane.

    - - - -
    -
    -

    Type Positionable

    - -

    Type DCSPositionable

    - -

    A DCSPositionable

    - -

    Field(s)

    -
    -
    - - -DCSPositionable.id_ - -
    -
    - -

    The ID of the controllable in DCS

    - -
    -
    - -

    Type POSITIONABLE

    -

    Field(s)

    -
    -
    - - -POSITIONABLE:AddCargo(Cargo) - -
    -
    - -

    Add cargo.

    - -

    Parameter

    - -

    Return value

    - -

    #POSITIONABLE:

    - - -
    -
    -
    -
    - - -POSITIONABLE:CargoItemCount() - -
    -
    - -

    Get cargo item count.

    - -

    Return value

    - -

    Core.Cargo#CARGO: -Cargo

    - -
    -
    -
    -
    - - -POSITIONABLE:ClearCargo() - -
    -
    - -

    Clear all cargo.

    - -
    -
    -
    -
    - - -POSITIONABLE:Flare(FlareColor) - -
    -
    - -

    Signal a flare at the position of the POSITIONABLE.

    - -

    Parameter

    - -
    -
    -
    -
    - - -POSITIONABLE:FlareGreen() - -
    -
    - -

    Signal a green flare at the position of the POSITIONABLE.

    - -
    -
    -
    -
    - - -POSITIONABLE:FlareRed() - -
    -
    - -

    Signal a red flare at the position of the POSITIONABLE.

    - -
    -
    -
    -
    - - -POSITIONABLE:FlareWhite() - -
    -
    - -

    Signal a white flare at the position of the POSITIONABLE.

    - -
    -
    -
    -
    - - -POSITIONABLE:FlareYellow() - -
    -
    - -

    Signal a yellow flare at the position of the POSITIONABLE.

    - -
    -
    -
    -
    - - -POSITIONABLE:GetAltitude() - -
    -
    - -

    Returns the altitude of the POSITIONABLE.

    - -

    Return values

    -
      -
    1. - -

      Dcs.DCSTypes#Distance: -The altitude of the POSITIONABLE.

      - -
    2. -
    3. - -

      #nil: -The POSITIONABLE is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -POSITIONABLE:GetBeacon() - -
    -
    - -

    Create a Radio#BEACON, to allow this POSITIONABLE to broadcast beacon signals

    - -

    Return value

    - -

    #RADIO: -Radio

    - -
    -
    -
    -
    - - -POSITIONABLE:GetBoundingBox() - -
    -
    - -

    Get the bounding box of the underlying POSITIONABLE DCS Object.

    - -

    Return values

    -
      -
    1. - -

      Dcs.DCSTypes#Distance: -The bounding box of the POSITIONABLE.

      - -
    2. -
    3. - -

      #nil: -The POSITIONABLE is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -POSITIONABLE:GetCoordinate() - -
    -
    - -

    Returns a COORDINATE object indicating the point in 3D of the POSITIONABLE within the mission.

    - -

    Return value

    - -

    Core.Point#COORDINATE: -The COORDINATE of the POSITIONABLE.

    - -
    -
    -
    -
    - - -POSITIONABLE:GetHeading() - -
    -
    - -

    Returns the POSITIONABLE heading in degrees.

    - -

    Return values

    -
      -
    1. - -

      #number: -The POSTIONABLE heading

      - -
    2. -
    3. - -

      #nil: -The POSITIONABLE is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -POSITIONABLE:GetHeight() - -
    -
    - -

    Returns the POSITIONABLE height in meters.

    - -

    Return values

    -
      -
    1. - -

      Dcs.DCSTypes#Vec3: -The height of the positionable.

      - -
    2. -
    3. - -

      #nil: -The POSITIONABLE is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -POSITIONABLE:GetLaserCode() - -
    -
    - -

    Get the last assigned laser code

    - -

    Return value

    - -

    #number: -The laser code

    - -
    -
    -
    -
    - - -POSITIONABLE:GetMessage(Message, Duration, Name) - -
    -
    - -

    Returns a message with the callsign embedded (if there is one).

    - -

    Parameters

    -
      -
    • - -

      #string Message : -The message text

      - -
    • -
    • - -

      Dcs.DCSTypes#Duration Duration : -The duration of the message.

      - -
    • -
    • - -

      #string Name : -(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.

      - -
    • -
    -

    Return value

    - -

    Core.Message#MESSAGE:

    - - -
    -
    -
    -
    - - -POSITIONABLE:GetMessageText(Message, Name) - -
    -
    - -

    Returns the message text with the callsign embedded (if there is one).

    - -

    Parameters

    -
      -
    • - -

      #string Message : -The message text

      - -
    • -
    • - -

      #string Name : -(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.

      - -
    • -
    -

    Return value

    - -

    #string: -The message text

    - -
    -
    -
    -
    - - -POSITIONABLE:GetMessageType(Message, MessageType, Name) - -
    -
    - -

    Returns a message of a specified type with the callsign embedded (if there is one).

    - -

    Parameters

    -
      -
    • - -

      #string Message : -The message text

      - -
    • -
    • - -

      Core.Message#MESSAGE MessageType : -MessageType The message type.

      - -
    • -
    • - -

      #string Name : -(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.

      - -
    • -
    -

    Return value

    - -

    Core.Message#MESSAGE:

    - - -
    -
    -
    -
    - - -POSITIONABLE:GetPointVec2() - -
    -
    - -

    Returns a POINT_VEC2 object indicating the point in 2D of the POSITIONABLE within the mission.

    - -

    Return values

    -
      -
    1. - -

      Core.Point#POINT_VEC2: -The 2D point vector of the POSITIONABLE.

      - -
    2. -
    3. - -

      #nil: -The POSITIONABLE is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -POSITIONABLE:GetPointVec3() - -
    -
    - -

    Returns a POINT_VEC3 object indicating the point in 3D of the POSITIONABLE within the mission.

    - -

    Return values

    -
      -
    1. - -

      Core.Point#POINT_VEC3: -The 3D point vector of the POSITIONABLE.

      - -
    2. -
    3. - -

      #nil: -The POSITIONABLE is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -POSITIONABLE:GetPositionVec3() - -
    -
    - -

    Returns the DCSTypes#Position3 position vectors indicating the point and direction vectors in 3D of the POSITIONABLE within the mission.

    - -

    Return values

    -
      -
    1. - -

      Dcs.DCSTypes#Position: -The 3D position vectors of the POSITIONABLE.

      - -
    2. -
    3. - -

      #nil: -The POSITIONABLE is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -POSITIONABLE:GetRadio() - -
    -
    - -

    Create a Radio#RADIO, to allow radio transmission for this POSITIONABLE.

    - - -

    Set parameters with the methods provided, then use RADIO:Broadcast() to actually broadcast the message

    - -

    Return value

    - -

    #RADIO: -Radio

    - -
    -
    -
    -
    - - -POSITIONABLE:GetRandomVec3(Radius) - -
    -
    - -

    Returns a random DCSTypes#Vec3 vector within a range, indicating the point in 3D of the POSITIONABLE within the mission.

    - -

    Parameter

    -
      -
    • - -

      #number Radius :

      - -
    • -
    -

    Return values

    -
      -
    1. - -

      Dcs.DCSTypes#Vec3: -The 3D point vector of the POSITIONABLE.

      - -
    2. -
    3. - -

      #nil: -The POSITIONABLE is not existing or alive.

      - -
    4. -
    -

    Usage:

    -
    
    --- If Radius is ignored, returns the Dcs.DCSTypes#Vec3 of first UNIT of the GROUP
    - -
    -
    -
    -
    - - -POSITIONABLE:GetSpot() - -
    -
    - -

    Get the Spot

    - -

    Return value

    - -

    Core.Spot#SPOT: -The Spot

    - -
    -
    -
    -
    - - -POSITIONABLE:GetVec2() - -
    -
    - -

    Returns the DCSTypes#Vec2 vector indicating the point in 2D of the POSITIONABLE within the mission.

    - -

    Return values

    -
      -
    1. - -

      Dcs.DCSTypes#Vec2: -The 2D point vector of the POSITIONABLE.

      - -
    2. -
    3. - -

      #nil: -The POSITIONABLE is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -POSITIONABLE:GetVec3() - -
    -
    - -

    Returns the DCSTypes#Vec3 vector indicating the 3D vector of the POSITIONABLE within the mission.

    - -

    Return values

    -
      -
    1. - -

      Dcs.DCSTypes#Vec3: -The 3D point vector of the POSITIONABLE.

      - -
    2. -
    3. - -

      #nil: -The POSITIONABLE is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -POSITIONABLE:GetVelocity() - -
    -
    - -

    Returns the a Velocity object from the positionable.

    - -

    Return values

    -
      -
    1. - -

      Core.Velocity#VELOCITY: -Velocity The Velocity object.

      - -
    2. -
    3. - -

      #nil: -The POSITIONABLE is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -POSITIONABLE:GetVelocityKMH() - -
    -
    - -

    Returns the POSITIONABLE velocity in km/h.

    - -

    Return value

    - -

    #number: -The velocity in km/h

    - -
    -
    -
    -
    - - -POSITIONABLE:GetVelocityMPS() - -
    -
    - -

    Returns the POSITIONABLE velocity in meters per second.

    - -

    Return value

    - -

    #number: -The velocity in meters per second.

    - -
    -
    -
    -
    - - -POSITIONABLE:GetVelocityVec3() - -
    -
    - -

    Returns the POSITIONABLE velocity Vec3 vector.

    - -

    Return values

    -
      -
    1. - -

      Dcs.DCSTypes#Vec3: -The velocity Vec3 vector

      - -
    2. -
    3. - -

      #nil: -The POSITIONABLE is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -POSITIONABLE:HasCargo(Cargo) - -
    -
    - -

    Returns if carrier has given cargo.

    - -

    Parameter

    -
      -
    • - -

      Cargo :

      - -
    • -
    -

    Return value

    - -

    Core.Cargo#CARGO: -Cargo

    - -
    -
    -
    -
    - - -POSITIONABLE:InAir() - -
    -
    - -

    Returns true if the POSITIONABLE is in the air.

    - - -

    Polymorphic, is overridden in GROUP and UNIT.

    - -

    Return values

    -
      -
    1. - -

      #boolean: -true if in the air.

      - -
    2. -
    3. - -

      #nil: -The POSITIONABLE is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -POSITIONABLE:IsAboveRunway() - -
    -
    - -

    Returns if the Positionable is located above a runway.

    - -

    Return values

    -
      -
    1. - -

      #boolean: -true if Positionable is above a runway.

      - -
    2. -
    3. - -

      #nil: -The POSITIONABLE is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -POSITIONABLE:IsLasing() - -
    -
    - -

    Check if the POSITIONABLE is lasing a target

    - -

    Return value

    - -

    #boolean: -true if it is lasing a target

    - -
    -
    -
    -
    - - -POSITIONABLE:LaseOff() - -
    -
    - -

    Stop Lasing a POSITIONABLE

    - -

    Return value

    - -

    #POSITIONABLE:

    - - -
    -
    -
    -
    - - -POSITIONABLE:LaseUnit(Target, LaserCode, Duration) - -
    -
    - -

    Start Lasing a POSITIONABLE

    - -

    Parameters

    -
      -
    • - -

      #POSITIONABLE Target :

      - -
    • -
    • - -

      #number LaserCode :

      - -
    • -
    • - -

      #number Duration :

      - -
    • -
    -

    Return value

    - -

    Core.Spot#SPOT:

    - - -
    -
    -
    -
    - - - -POSITIONABLE.LaserCode - -
    -
    - - - -
    -
    -
    -
    - - -POSITIONABLE:Message(Message, Duration, Name) - -
    -
    - -

    Send a message to the players in the Group.

    - - -

    The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.

    - -

    Parameters

    -
      -
    • - -

      #string Message : -The message text

      - -
    • -
    • - -

      Dcs.DCSTypes#Duration Duration : -The duration of the message.

      - -
    • -
    • - -

      #string Name : -(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.

      - -
    • -
    -
    -
    -
    -
    - - -POSITIONABLE:MessageToAll(Message, Duration, Name) - -
    -
    - -

    Send a message to all coalitions.

    - - -

    The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.

    - -

    Parameters

    -
      -
    • - -

      #string Message : -The message text

      - -
    • -
    • - -

      Dcs.DCSTypes#Duration Duration : -The duration of the message.

      - -
    • -
    • - -

      #string Name : -(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.

      - -
    • -
    -
    -
    -
    -
    - - -POSITIONABLE:MessageToBlue(Message, Duration, Name) - -
    -
    - -

    Send a message to the blue coalition.

    - - -

    The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.

    - -

    Parameters

    -
      -
    • - -

      #string Message : -The message text

      - -
    • -
    • - -

      Dcs.DCSTypes#Duration Duration : -The duration of the message.

      - -
    • -
    • - -

      #string Name : -(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.

      - -
    • -
    -
    -
    -
    -
    - - -POSITIONABLE:MessageToClient(Message, Duration, Client, Name) - -
    -
    - -

    Send a message to a client.

    - - -

    The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.

    - -

    Parameters

    -
      -
    • - -

      #string Message : -The message text

      - -
    • -
    • - -

      Dcs.DCSTypes#Duration Duration : -The duration of the message.

      - -
    • -
    • - -

      Wrapper.Client#CLIENT Client : -The client object receiving the message.

      - -
    • -
    • - -

      #string Name : -(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.

      - -
    • -
    -
    -
    -
    -
    - - -POSITIONABLE:MessageToCoalition(Message, Duration, MessageCoalition) - -
    -
    - -

    Send a message to a coalition.

    - - -

    The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.

    - -

    Parameters

    - -
    -
    -
    -
    - - -POSITIONABLE:MessageToGroup(Message, Duration, MessageGroup, Name) - -
    -
    - -

    Send a message to a Group.

    - - -

    The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.

    - -

    Parameters

    -
      -
    • - -

      #string Message : -The message text

      - -
    • -
    • - -

      Dcs.DCSTypes#Duration Duration : -The duration of the message.

      - -
    • -
    • - -

      Wrapper.Group#GROUP MessageGroup : -The GROUP object receiving the message.

      - -
    • -
    • - -

      #string Name : -(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.

      - -
    • -
    -
    -
    -
    -
    - - -POSITIONABLE:MessageToRed(Message, Duration, Name) - -
    -
    - -

    Send a message to the red coalition.

    - - -

    The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.

    - -

    Parameters

    -
      -
    • - -

      #string Message : -The message text

      - -
    • -
    • - -

      Dcs.DCSTYpes#Duration Duration : -The duration of the message.

      - -
    • -
    • - -

      #string Name : -(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.

      - -
    • -
    -
    -
    -
    -
    - - -POSITIONABLE:MessageToSetGroup(Message, Duration, MessageSetGroup, Name) - -
    -
    - -

    Send a message to a Set#SET_GROUP.

    - - -

    The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.

    - -

    Parameters

    -
      -
    • - -

      #string Message : -The message text

      - -
    • -
    • - -

      Dcs.DCSTypes#Duration Duration : -The duration of the message.

      - -
    • -
    • - -

      Core.Set#SET_GROUP MessageSetGroup : -The SET_GROUP collection receiving the message.

      - -
    • -
    • - -

      #string Name : -(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.

      - -
    • -
    -
    -
    -
    -
    - - -POSITIONABLE:MessageTypeToCoalition(Message, MessageType, MessageCoalition) - -
    -
    - -

    Send a message to a coalition.

    - - -

    The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.

    - -

    Parameters

    - -
    -
    -
    -
    - - -POSITIONABLE:MessageTypeToGroup(Message, MessageType, MessageGroup, Name) - -
    -
    - -

    Send a message of a message type to a Group.

    - - -

    The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.

    - -

    Parameters

    -
      -
    • - -

      #string Message : -The message text

      - -
    • -
    • - -

      Core.Message#MESSAGE.Type MessageType : -The message type that determines the duration.

      - -
    • -
    • - -

      Wrapper.Group#GROUP MessageGroup : -The GROUP object receiving the message.

      - -
    • -
    • - -

      #string Name : -(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.

      - -
    • -
    -
    -
    -
    -
    - - -POSITIONABLE:New(PositionableName) - -
    -
    - -

    Create a new POSITIONABLE from a DCSPositionable

    - -

    Parameter

    - -

    Return value

    - -

    #POSITIONABLE: -self

    - -
    -
    -
    -
    - - -POSITIONABLE:RemoveCargo(Cargo) - -
    -
    - -

    Remove cargo.

    - -

    Parameter

    - -

    Return value

    - -

    #POSITIONABLE:

    - - -
    -
    -
    -
    - - -POSITIONABLE:Smoke(SmokeColor, Range, AddHeight) - -
    -
    - -

    Smoke the POSITIONABLE.

    - -

    Parameters

    -
      -
    • - -

      Utilities.Utils#SMOKECOLOR SmokeColor : -The color to smoke to positionable.

      - -
    • -
    • - -

      #number Range : -The range in meters to randomize the smoking around the positionable.

      - -
    • -
    • - -

      #number AddHeight : -The height in meters to add to the altitude of the positionable.

      - -
    • -
    -
    -
    -
    -
    - - -POSITIONABLE:SmokeBlue() - -
    -
    - -

    Smoke the POSITIONABLE Blue.

    - -
    -
    -
    -
    - - -POSITIONABLE:SmokeGreen() - -
    -
    - -

    Smoke the POSITIONABLE Green.

    - -
    -
    -
    -
    - - -POSITIONABLE:SmokeOrange() - -
    -
    - -

    Smoke the POSITIONABLE Orange.

    - -
    -
    -
    -
    - - -POSITIONABLE:SmokeRed() - -
    -
    - -

    Smoke the POSITIONABLE Red.

    - -
    -
    -
    -
    - - -POSITIONABLE:SmokeWhite() - -
    -
    - -

    Smoke the POSITIONABLE White.

    - -
    -
    -
    -
    - - Core.Spot#SPOT - -POSITIONABLE.Spot - -
    -
    - - - -
    -
    -
    -
    - - #POSITIONABLE.__ - -POSITIONABLE.__ - -
    -
    - - - -
    -
    - -

    Type POSITIONABLE.__

    -

    Field(s)

    -
    -
    - - #POSITIONABLE.__.Cargo - -POSITIONABLE.__.Cargo - -
    -
    - - - -
    -
    - -

    Type POSITIONABLE.__.Cargo

    - -

    Type RADIO

    - -
    - -
    - - diff --git a/docs/Documentation/Process_JTAC.html b/docs/Documentation/Process_JTAC.html deleted file mode 100644 index 35e9a46df..000000000 --- a/docs/Documentation/Process_JTAC.html +++ /dev/null @@ -1,634 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Process_JTAC

    - - - -

    Global(s)

    - - - - - -
    PROCESS_JTAC - -
    -

    Type PROCESS_JTAC

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    PROCESS_JTAC.ClassName - -
    PROCESS_JTAC.DisplayCategory - -
    PROCESS_JTAC.DisplayCount - -
    PROCESS_JTAC.DisplayInterval - -
    PROCESS_JTAC.DisplayMessage - -
    PROCESS_JTAC.DisplayTime - -
    PROCESS_JTAC.FACUnit - -
    PROCESS_JTAC.Fsm - -
    PROCESS_JTAC:New(Task, ProcessUnit, TargetSetUnit, FACUnit) -

    Creates a new DESTROY process.

    -
    PROCESS_JTAC:OnJTACMenuAwait(Fsm, Event, From, To) -

    StateMachine callback function for a PROCESS

    -
    PROCESS_JTAC:OnJTACMenuCancel(Fsm, Event, From, To, TargetUnit) -

    StateMachine callback function for a PROCESS

    -
    PROCESS_JTAC:OnJTACMenuSpot(Fsm, Event, From, To, TargetUnit) -

    StateMachine callback function for a PROCESS

    -
    PROCESS_JTAC:OnJTACMenuUpdate(Fsm, Event, From, To) -

    StateMachine callback function for a PROCESS

    -
    PROCESS_JTAC:OnStart(Fsm, Event, From, To) -

    StateMachine callback function for a PROCESS

    -
    PROCESS_JTAC.ProcessUnit - -
    PROCESS_JTAC.TargetSetUnit - -
    - -

    Global(s)

    -
    -
    - - #PROCESS_JTAC - -PROCESS_JTAC - -
    -
    - - - -
    -
    -

    Type Process_JTAC

    - -

    Type PROCESS_JTAC

    - -

    PROCESS_JTAC class

    - -

    Field(s)

    -
    -
    - - #string - -PROCESS_JTAC.ClassName - -
    -
    - - - -
    -
    -
    -
    - - #string - -PROCESS_JTAC.DisplayCategory - -
    -
    - - - - -

    Targets is the default display category

    - -
    -
    -
    -
    - - #number - -PROCESS_JTAC.DisplayCount - -
    -
    - - - -
    -
    -
    -
    - - #number - -PROCESS_JTAC.DisplayInterval - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -PROCESS_JTAC.DisplayMessage - -
    -
    - - - -
    -
    -
    -
    - - #number - -PROCESS_JTAC.DisplayTime - -
    -
    - - - - -

    10 seconds is the default

    - -
    -
    -
    -
    - - - -PROCESS_JTAC.FACUnit - -
    -
    - - - -
    -
    -
    -
    - - - -PROCESS_JTAC.Fsm - -
    -
    - - - -
    -
    -
    -
    - - -PROCESS_JTAC:New(Task, ProcessUnit, TargetSetUnit, FACUnit) - -
    -
    - -

    Creates a new DESTROY process.

    - -

    Parameters

    - -

    Return value

    - -

    #PROCESS_JTAC: -self

    - -
    -
    -
    -
    - - -PROCESS_JTAC:OnJTACMenuAwait(Fsm, Event, From, To) - -
    -
    - -

    StateMachine callback function for a PROCESS

    - -

    Parameters

    -
      -
    • - -

      Core.Fsm#FSM_PROCESS Fsm :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -PROCESS_JTAC:OnJTACMenuCancel(Fsm, Event, From, To, TargetUnit) - -
    -
    - -

    StateMachine callback function for a PROCESS

    - -

    Parameters

    - -
    -
    -
    -
    - - -PROCESS_JTAC:OnJTACMenuSpot(Fsm, Event, From, To, TargetUnit) - -
    -
    - -

    StateMachine callback function for a PROCESS

    - -

    Parameters

    - -
    -
    -
    -
    - - -PROCESS_JTAC:OnJTACMenuUpdate(Fsm, Event, From, To) - -
    -
    - -

    StateMachine callback function for a PROCESS

    - -

    Parameters

    -
      -
    • - -

      Core.Fsm#FSM_PROCESS Fsm :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -PROCESS_JTAC:OnStart(Fsm, Event, From, To) - -
    -
    - -

    StateMachine callback function for a PROCESS

    - -

    Parameters

    -
      -
    • - -

      Core.Fsm#FSM_PROCESS Fsm :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - Wrapper.Unit#UNIT - -PROCESS_JTAC.ProcessUnit - -
    -
    - - - -
    -
    -
    -
    - - Core.Set#SET_UNIT - -PROCESS_JTAC.TargetSetUnit - -
    -
    - - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Process_Pickup.html b/docs/Documentation/Process_Pickup.html deleted file mode 100644 index 719b1ee9c..000000000 --- a/docs/Documentation/Process_Pickup.html +++ /dev/null @@ -1,725 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Process_Pickup

    - - - -

    Global(s)

    - - - - - -
    PROCESS_PICKUP - -
    -

    Type PROCESS_PICKUP

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    PROCESS_PICKUP.ClassName - -
    PROCESS_PICKUP.DisplayCategory - -
    PROCESS_PICKUP.DisplayCount - -
    PROCESS_PICKUP.DisplayInterval - -
    PROCESS_PICKUP.DisplayMessage - -
    PROCESS_PICKUP.DisplayTime - -
    PROCESS_PICKUP:EventDead(Event) - -
    PROCESS_PICKUP.Fsm - -
    PROCESS_PICKUP:New(Task, ProcessUnit, TargetSetUnit, ProcessName) -

    Creates a new DESTROY process.

    -
    PROCESS_PICKUP:OnDestroyed(Fsm, Event, From, To) -

    StateMachine callback function for a PROCESS

    -
    PROCESS_PICKUP:OnHitTarget(Fsm, Event, From, To, Event) -

    StateMachine callback function for a PROCESS

    -
    PROCESS_PICKUP:OnKilled(Fsm, Event, From, To, DCSEvent) -

    StateMachine callback function for a PROCESS

    -
    PROCESS_PICKUP:OnMoreTargets(Fsm, Event, From, To) -

    StateMachine callback function for a PROCESS

    -
    PROCESS_PICKUP:OnNavigating(Fsm, Event, From, To) -

    StateMachine callback function for a PROCESS

    -
    PROCESS_PICKUP:OnRestart(Fsm, Event, From, To) -

    StateMachine callback function for a PROCESS

    -
    PROCESS_PICKUP:OnStart(Fsm, Event, From, To) -

    StateMachine callback function for a PROCESS

    -
    PROCESS_PICKUP.ProcessUnit - -
    PROCESS_PICKUP.TargetSetUnit - -
    - -

    Global(s)

    -
    -
    - - #PROCESS_PICKUP - -PROCESS_PICKUP - -
    -
    - - - -
    -
    -

    Type Process_Pickup

    - -

    Type PROCESS_PICKUP

    - -

    PROCESS_PICKUP class

    - -

    Field(s)

    -
    -
    - - #string - -PROCESS_PICKUP.ClassName - -
    -
    - - - -
    -
    -
    -
    - - #string - -PROCESS_PICKUP.DisplayCategory - -
    -
    - - - - -

    Targets is the default display category

    - -
    -
    -
    -
    - - #number - -PROCESS_PICKUP.DisplayCount - -
    -
    - - - -
    -
    -
    -
    - - #number - -PROCESS_PICKUP.DisplayInterval - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -PROCESS_PICKUP.DisplayMessage - -
    -
    - - - -
    -
    -
    -
    - - #number - -PROCESS_PICKUP.DisplayTime - -
    -
    - - - - -

    10 seconds is the default

    - -
    -
    -
    -
    - - -PROCESS_PICKUP:EventDead(Event) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - - -PROCESS_PICKUP.Fsm - -
    -
    - - - -
    -
    -
    -
    - - -PROCESS_PICKUP:New(Task, ProcessUnit, TargetSetUnit, ProcessName) - -
    -
    - -

    Creates a new DESTROY process.

    - -

    Parameters

    - -

    Return value

    - -

    #PROCESS_PICKUP: -self

    - -
    -
    -
    -
    - - -PROCESS_PICKUP:OnDestroyed(Fsm, Event, From, To) - -
    -
    - -

    StateMachine callback function for a PROCESS

    - -

    Parameters

    -
      -
    • - -

      Core.Fsm#FSM_PROCESS Fsm :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -PROCESS_PICKUP:OnHitTarget(Fsm, Event, From, To, Event) - -
    -
    - -

    StateMachine callback function for a PROCESS

    - -

    Parameters

    - -
    -
    -
    -
    - - -PROCESS_PICKUP:OnKilled(Fsm, Event, From, To, DCSEvent) - -
    -
    - -

    StateMachine callback function for a PROCESS

    - -

    Parameters

    - -
    -
    -
    -
    - - -PROCESS_PICKUP:OnMoreTargets(Fsm, Event, From, To) - -
    -
    - -

    StateMachine callback function for a PROCESS

    - -

    Parameters

    -
      -
    • - -

      Core.Fsm#FSM_PROCESS Fsm :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -PROCESS_PICKUP:OnNavigating(Fsm, Event, From, To) - -
    -
    - -

    StateMachine callback function for a PROCESS

    - -

    Parameters

    -
      -
    • - -

      Core.Fsm#FSM_PROCESS Fsm :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -PROCESS_PICKUP:OnRestart(Fsm, Event, From, To) - -
    -
    - -

    StateMachine callback function for a PROCESS

    - -

    Parameters

    -
      -
    • - -

      Core.Fsm#FSM_PROCESS Fsm :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -PROCESS_PICKUP:OnStart(Fsm, Event, From, To) - -
    -
    - -

    StateMachine callback function for a PROCESS

    - -

    Parameters

    -
      -
    • - -

      Core.Fsm#FSM_PROCESS Fsm :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - Wrapper.Unit#UNIT - -PROCESS_PICKUP.ProcessUnit - -
    -
    - - - -
    -
    -
    -
    - - Core.Set#SET_UNIT - -PROCESS_PICKUP.TargetSetUnit - -
    -
    - - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Protect.html b/docs/Documentation/Protect.html deleted file mode 100644 index de7a57685..000000000 --- a/docs/Documentation/Protect.html +++ /dev/null @@ -1,758 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Protect

    - -

    Functional -- The PROTECT class handles the protection of objects, which can be zones, units, scenery.

    - - - -
    - -

    Author: Sven Van de Velde (FlightControl)

    -

    Contributions: MillerTime

    - -
    - - -

    Global(s)

    - - - - - -
    PROTECT -

    PROTECT, extends Base#BASE

    - -
    -

    Type PROTECT

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    PROTECT:AreProtectStaticsAlive() -

    Check if the statics are still alive.

    -
    PROTECT:AreProtectUnitsAlive() -

    Check if the units are still alive.

    -
    PROTECT.Coalition - -
    PROTECT:Flare(FlareColor) -

    Flare.

    -
    PROTECT:GetCoalition() -

    Get the owning coalition of the zone.

    -
    PROTECT:GetCoalitionName() -

    Get the owning coalition name of the zone.

    -
    PROTECT:GetProtectZone() -

    Get the ProtectZone

    -
    PROTECT:GetProtectZoneName() -

    Get the name of the ProtectZone

    -
    PROTECT:IsAttacked() - -
    PROTECT:IsCaptureUnitInZone() -

    Check if there is a capture unit in the zone.

    -
    PROTECT:IsCaptured() - -
    PROTECT:IsEmpty() - -
    PROTECT:IsGuarded() - -
    PROTECT:Mark() -

    Mark.

    -
    PROTECT.MarkBlue - -
    PROTECT.MarkRed - -
    PROTECT:SetCoalition(Coalition) -

    Set the owning coalition of the zone.

    -
    PROTECT:Smoke(SmokeColor) -

    Smoke.

    -
    PROTECT.SmokeColor - -
    PROTECT.SmokeTime - -
    PROTECT:StatusCoalition() -

    Check status Coalition ownership.

    -
    PROTECT:StatusSmoke() -

    Check status Smoke.

    -
    PROTECT:StatusZone() -

    Check status Zone.

    -
    PROTECT:onafterStart() -

    Bound.

    -
    PROTECT:onenterAttacked() - -
    PROTECT:onenterCaptured() - -
    PROTECT:onenterEmpty() - -
    PROTECT:onenterGuarded() -

    Bound.

    -
    - -

    Global(s)

    -
    -
    - - #PROTECT - -PROTECT - -
    -
    - -

    PROTECT, extends Base#BASE

    - - -
    -
    -

    Type Protect

    - -

    Type PROTECT

    -

    Field(s)

    -
    -
    - - -PROTECT:AreProtectStaticsAlive() - -
    -
    - -

    Check if the statics are still alive.

    - -
    -
    -
    -
    - - -PROTECT:AreProtectUnitsAlive() - -
    -
    - -

    Check if the units are still alive.

    - -
    -
    -
    -
    - - - -PROTECT.Coalition - -
    -
    - - - -
    -
    -
    -
    - - -PROTECT:Flare(FlareColor) - -
    -
    - -

    Flare.

    - -

    Parameter

    - -
    -
    -
    -
    - - -PROTECT:GetCoalition() - -
    -
    - -

    Get the owning coalition of the zone.

    - -

    Return value

    - -

    DCSCoalition.DCSCoalition#coalition: -Coalition.

    - -
    -
    -
    -
    - - -PROTECT:GetCoalitionName() - -
    -
    - -

    Get the owning coalition name of the zone.

    - -

    Return value

    - -

    #string: -Coalition name.

    - -
    -
    -
    -
    - - -PROTECT:GetProtectZone() - -
    -
    - -

    Get the ProtectZone

    - -

    Return value

    - -

    Core.Zone#ZONE_BASE:

    - - -
    -
    -
    -
    - - -PROTECT:GetProtectZoneName() - -
    -
    - -

    Get the name of the ProtectZone

    - -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -PROTECT:IsAttacked() - -
    -
    - - - -
    -
    -
    -
    - - -PROTECT:IsCaptureUnitInZone() - -
    -
    - -

    Check if there is a capture unit in the zone.

    - -
    -
    -
    -
    - - -PROTECT:IsCaptured() - -
    -
    - - - -
    -
    -
    -
    - - -PROTECT:IsEmpty() - -
    -
    - - - -
    -
    -
    -
    - - -PROTECT:IsGuarded() - -
    -
    - - - -
    -
    -
    -
    - - -PROTECT:Mark() - -
    -
    - -

    Mark.

    - -
    -
    -
    -
    - - - -PROTECT.MarkBlue - -
    -
    - - - -
    -
    -
    -
    - - - -PROTECT.MarkRed - -
    -
    - - - -
    -
    -
    -
    - - -PROTECT:SetCoalition(Coalition) - -
    -
    - -

    Set the owning coalition of the zone.

    - -

    Parameter

    - -
    -
    -
    -
    - - -PROTECT:Smoke(SmokeColor) - -
    -
    - -

    Smoke.

    - -

    Parameter

    - -
    -
    -
    -
    - - - -PROTECT.SmokeColor - -
    -
    - - - -
    -
    -
    -
    - - - -PROTECT.SmokeTime - -
    -
    - - - - -

    self.SmokeColor = nil

    - -
    -
    -
    -
    - - -PROTECT:StatusCoalition() - -
    -
    - -

    Check status Coalition ownership.

    - -
    -
    -
    -
    - - -PROTECT:StatusSmoke() - -
    -
    - -

    Check status Smoke.

    - -
    -
    -
    -
    - - -PROTECT:StatusZone() - -
    -
    - -

    Check status Zone.

    - -
    -
    -
    -
    - - -PROTECT:onafterStart() - -
    -
    - -

    Bound.

    - -
    -
    -
    -
    - - -PROTECT:onenterAttacked() - -
    -
    - - - -
    -
    -
    -
    - - -PROTECT:onenterCaptured() - -
    -
    - - - -
    -
    -
    -
    - - -PROTECT:onenterEmpty() - -
    -
    - - - -
    -
    -
    -
    - - -PROTECT:onenterGuarded() - -
    -
    - -

    Bound.

    - -
    -
    - -

    Type PROTECT.__

    - -

    Type SMOKECOLOR.Color

    - -
    - -
    - - diff --git a/docs/Documentation/Radio.html b/docs/Documentation/Radio.html deleted file mode 100644 index 5db376990..000000000 --- a/docs/Documentation/Radio.html +++ /dev/null @@ -1,1230 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Radio

    - -

    Core -- The RADIO Module is responsible for everything that is related to radio transmission and you can hear in DCS, be it TACAN beacons, Radio transmissions...

    - - - -

    Banner Image

    - -
    - -

    The Radio contains 2 classes : RADIO and BEACON

    - -

    What are radio communications in DCS ?

    - -
      -
    • Radio transmissions consist of sound files that are broadcasted on a specific frequency (e.g. 115MHz) and modulation (e.g. AM),
    • -
    • They can be subtitled for a specific duration, the power in Watts of the transmiter's antenna can be set, and the transmission can be looped.
    • -
    - -

    How to supply DCS my own Sound Files ?

    - -
      -
    • Your sound files need to be encoded in .ogg or .wav,
    • -
    • Your sound files should be as tiny as possible. It is suggested you encode in .ogg with low bitrate and sampling settings,
    • -
    • They need to be added in .\l10n\DEFAULT\ in you .miz file (wich can be decompressed like a .zip file),
    • -
    • For simplicty sake, you can let DCS' Mission Editor add the file itself, by creating a new Trigger with the action "Sound to Country", and choosing your sound file and a country you don't use in your mission.
    • -
    - -

    Due to weird DCS quirks, radio communications behave differently if sent by a Unit#UNIT or a Group#GROUP or by any other Positionable#POSITIONABLE

    - - - -

    Note that obviously, the frequency and the modulation of the transmission are important only if the players are piloting an Advanced System Modelling enabled aircraft, -like the A10C or the Mirage 2000C. They will hear the transmission if they are tuned on the right frequency and modulation (and if they are close enough - more on that below). -If a FC3 airacraft is used, it will hear every communication, whatever the frequency and the modulation is set to. The same is true for TACAN beacons. If your aircaft isn't compatible, -you won't hear/be able to use the TACAN beacon informations.

    - -
    - -

    Author: Hugues "Grey_Echo" Bousquet

    - - -

    Global(s)

    - - - - - - - - - -
    BEACON - -
    RADIO - -
    -

    Type BEACON

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    BEACON:AATACAN(TACANChannel, Message, Bearing, BeaconDuration) -

    Activates a TACAN BEACON on an Aircraft.

    -
    BEACON.ClassName - -
    BEACON:New(Positionable) -

    Create a new BEACON Object.

    -
    BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDuration) -

    Activates a general pupose Radio Beacon -This uses the very generic singleton function "trigger.action.radioTransmission()" provided by DCS to broadcast a sound file on a specific frequency.

    -
    BEACON:StopAATACAN() -

    Stops the AA TACAN BEACON

    -
    BEACON:StopRadioBeacon() -

    Stops the AA TACAN BEACON

    -
    BEACON:_TACANToFrequency(TACANChannel, TACANMode) -

    Converts a TACAN Channel/Mode couple into a frequency in Hz

    -
    - -

    Type RADIO

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    RADIO:Broadcast() -

    Actually Broadcast the transmission -* The Radio has to be populated with the new transmission before broadcasting.

    -
    RADIO.ClassName - -
    RADIO.FileName -

    Name of the sound file

    -
    RADIO.Frequency -

    Frequency of the transmission in Hz

    -
    RADIO.Loop -

    (default true)

    -
    RADIO.Modulation -

    Modulation of the transmission (either radio.modulation.AM or radio.modulation.FM)

    -
    RADIO:New(Positionable) -

    Create a new RADIO Object.

    -
    RADIO:NewGenericTransmission(FileName, Frequency, Modulation, Power, Loop) -

    Create a new transmission, that is to say, populate the RADIO with relevant data -In this function the data is especially relevant if the broadcaster is anything but a UNIT or a GROUP, -but it will work with a UNIT or a GROUP anyway.

    -
    RADIO:NewUnitTransmission(FileName, Subtitle, SubtitleDuration, Frequency, Modulation, Loop) -

    Create a new transmission, that is to say, populate the RADIO with relevant data -In this function the data is especially relevant if the broadcaster is a UNIT or a GROUP, -but it will work for any Positionable#POSITIONABLE.

    -
    RADIO.Positionable -

    The transmiter

    -
    RADIO.Power -

    Power of the antenna is Watts

    -
    RADIO:SetFileName(FileName) -

    Check validity of the filename passed and sets RADIO.FileName

    -
    RADIO:SetFrequency(Frequency) -

    Check validity of the frequency passed and sets RADIO.Frequency

    -
    RADIO:SetLoop(Loop) -

    Check validity of the loop passed and sets RADIO.Loop

    -
    RADIO:SetModulation(Modulation) -

    Check validity of the frequency passed and sets RADIO.Modulation

    -
    RADIO:SetPower(Power) -

    Check validity of the power passed and sets RADIO.Power

    -
    RADIO:SetSubtitle(Subtitle, SubtitleDuration) -

    Check validity of the subtitle and the subtitleDuration passed and sets RADIO.subtitle and RADIO.subtitleDuration -Both parameters are mandatory, since it wouldn't make much sense to change the Subtitle and not its duration

    -
    RADIO:StopBroadcast() -

    Stops a transmission -This function is especially usefull to stop the broadcast of looped transmissions

    -
    RADIO.Subtitle -

    Subtitle of the transmission

    -
    RADIO.SubtitleDuration -

    Duration of the Subtitle in seconds

    -
    - -

    Global(s)

    -
    -
    - - #BEACON - -BEACON - -
    -
    - - - -
    -
    -
    -
    - - #RADIO - -RADIO - -
    -
    - - - -
    -
    -

    Type Radio

    - -

    Type BEACON

    - -

    BEACON class, extends Base#BASE

    - -

    After attaching a #BEACON to your Positionable#POSITIONABLE, you need to select the right function to activate the kind of beacon you want.

    - - -

    There are two types of BEACONs available : the AA TACAN Beacon and the general purpose Radio Beacon. -Note that in both case, you can set an optional parameter : the BeaconDuration. This can be very usefull to simulate the battery time if your BEACON is -attach to a cargo crate, for exemple.

    - -

    AA TACAN Beacon usage

    - -

    This beacon only works with airborne Unit#UNIT or a Group#GROUP. Use #BEACON() to set the beacon parameters and start the beacon. -Use @#BEACON:StopAATACAN}() to stop it.

    - -

    General Purpose Radio Beacon usage

    - -

    This beacon will work with any Positionable#POSITIONABLE, but **it won't follow the Positionable#POSITIONABLE** ! This means that you should only use it with -Positionable#POSITIONABLE that don't move, or move very slowly. Use #BEACON() to set the beacon parameters and start the beacon. -Use #BEACON() to stop it.

    - - -

    Field(s)

    -
    -
    - - -BEACON:AATACAN(TACANChannel, Message, Bearing, BeaconDuration) - -
    -
    - -

    Activates a TACAN BEACON on an Aircraft.

    - -

    Parameters

    -
      -
    • - -

      #number TACANChannel : -(the "10" part in "10Y"). Note that AA TACAN are only available on Y Channels

      - -
    • -
    • - -

      #string Message : -The Message that is going to be coded in Morse and broadcasted by the beacon

      - -
    • -
    • - -

      #boolean Bearing : -Can the BEACON be homed on ?

      - -
    • -
    • - -

      #number BeaconDuration : -How long will the beacon last in seconds. Omit for forever.

      - -
    • -
    -

    Return value

    - -

    #BEACON: -self

    - -

    Usage:

    -
    -- Let's create a TACAN Beacon for a tanker
    -local myUnit = UNIT:FindByName("MyUnit") 
    -local myBeacon = myUnit:GetBeacon() -- Creates the beacon
    -
    -myBeacon:AATACAN(20, "TEXACO", true) -- Activate the beacon
    - -
    -
    -
    -
    - - #string - -BEACON.ClassName - -
    -
    - - - -
    -
    -
    -
    - - -BEACON:New(Positionable) - -
    -
    - -

    Create a new BEACON Object.

    - - -

    This doesn't activate the beacon, though, use BEACON.AATACAN or BEACON.Generic -If you want to create a BEACON, you probably should use Positionable#POSITIONABLE.GetBeacon() instead.

    - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      #BEACON: -Beacon

      - -
    2. -
    3. - -

      #nil: -If Positionable is invalid

      - -
    4. -
    -
    -
    -
    -
    - - -BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDuration) - -
    -
    - -

    Activates a general pupose Radio Beacon -This uses the very generic singleton function "trigger.action.radioTransmission()" provided by DCS to broadcast a sound file on a specific frequency.

    - - -

    Although any frequency could be used, only 2 DCS Modules can home on radio beacons at the time of writing : the Huey and the Mi-8. -They can home in on these specific frequencies : - Mi8 - R-828 -> 20-60MHz -* ARKUD -> 100-150MHz (canal 1 : 114166, canal 2 : 114333, canal 3 : 114583, canal 4 : 121500, canal 5 : 123100, canal 6 : 124100) AM -* ARK9 -> 150-1300KHz - Huey - AN/ARC-131 -> 30-76 Mhz FM

    - -

    Parameters

    -
      -
    • - -

      #string FileName : -The name of the audio file

      - -
    • -
    • - -

      #number Frequency : -in MHz

      - -
    • -
    • - -

      #number Modulation : -either radio.modulation.AM or radio.modulation.FM

      - -
    • -
    • - -

      #number Power : -in W

      - -
    • -
    • - -

      #number BeaconDuration : -How long will the beacon last in seconds. Omit for forever.

      - -
    • -
    -

    Return value

    - -

    #BEACON: -self

    - -

    Usage:

    -
    -- Let's create a beacon for a unit in distress.
    --- Frequency will be 40MHz FM (home-able by a Huey's AN/ARC-131)
    --- The beacon they use is battery-powered, and only lasts for 5 min
    -local UnitInDistress = UNIT:FindByName("Unit1")
    -local UnitBeacon = UnitInDistress:GetBeacon()
    -
    --- Set the beacon and start it
    -UnitBeacon:RadioBeacon("MySoundFileSOS.ogg", 40, radio.modulation.FM, 20, 5*60)
    - -
    -
    -
    -
    - - -BEACON:StopAATACAN() - -
    -
    - -

    Stops the AA TACAN BEACON

    - -

    Return value

    - -

    #BEACON: -self

    - -
    -
    -
    -
    - - -BEACON:StopRadioBeacon() - -
    -
    - -

    Stops the AA TACAN BEACON

    - -

    Return value

    - -

    #BEACON: -self

    - -
    -
    -
    -
    - - -BEACON:_TACANToFrequency(TACANChannel, TACANMode) - -
    -
    - -

    Converts a TACAN Channel/Mode couple into a frequency in Hz

    - -

    Parameters

    -
      -
    • - -

      #number TACANChannel :

      - -
    • -
    • - -

      #string TACANMode :

      - -
    • -
    -

    Return values

    -
      -
    1. - -

      #number: -Frequecy

      - -
    2. -
    3. - -

      #nil: -if parameters are invalid

      - -
    4. -
    -
    -
    - -

    Type RADIO

    - -

    RADIO class, extends Base#BASE

    - -

    RADIO usage

    - -

    There are 3 steps to a successful radio transmission.

    - - - - - -

    Methods to set relevant parameters for both a Unit#UNIT or a Group#GROUP or any other Positionable#POSITIONABLE

    - - - -

    Additional Methods to set relevant parameters if the transmiter is a Unit#UNIT or a Group#GROUP

    - - - -

    Additional Methods to set relevant parameters if the transmiter is any other Positionable#POSITIONABLE

    - - - -

    What is this power thing ?

    - -
      -
    • If your transmission is sent by a Positionable#POSITIONABLE other than a Unit#UNIT or a Group#GROUP, you can set the power of the antenna,
    • -
    • Otherwise, DCS sets it automatically, depending on what's available on your Unit,
    • -
    • If the player gets too far from the transmiter, or if the antenna is too weak, the transmission will fade and become noisyer,
    • -
    • This an automated DCS calculation you have no say on,
    • -
    • For reference, a standard VOR station has a 100W antenna, a standard AA TACAN has a 120W antenna, and civilian ATC's antenna usually range between 300 and 500W,
    • -
    • Note that if the transmission has a subtitle, it will be readable, regardless of the quality of the transmission. -
    • -
    - -

    Field(s)

    -
    -
    - - -RADIO:Broadcast() - -
    -
    - -

    Actually Broadcast the transmission -* The Radio has to be populated with the new transmission before broadcasting.

    - - -
      -
    • Please use RADIO setters or either Radio#RADIO.NewGenericTransmission or Radio#RADIO.NewUnitTransmission
    • -
    • This class is in fact pretty smart, it determines the right DCS function to use depending on the type of POSITIONABLE
    • -
    • If the POSITIONABLE is not a UNIT or a GROUP, we use the generic (but limited) trigger.action.radioTransmission()
    • -
    • If the POSITIONABLE is a UNIT or a GROUP, we use the "TransmitMessage" Command
    • -
    • If your POSITIONABLE is a UNIT or a GROUP, the Power is ignored.
    • -
    • If your POSITIONABLE is not a UNIT or a GROUP, the Subtitle, SubtitleDuration are ignored
    • -
    - -

    Return value

    - -

    #RADIO: -self

    - -
    -
    -
    -
    - - #string - -RADIO.ClassName - -
    -
    - - - -
    -
    -
    -
    - - #string - -RADIO.FileName - -
    -
    - -

    Name of the sound file

    - -
    -
    -
    -
    - - #number - -RADIO.Frequency - -
    -
    - -

    Frequency of the transmission in Hz

    - -
    -
    -
    -
    - - #boolean - -RADIO.Loop - -
    -
    - -

    (default true)

    - -
    -
    -
    -
    - - #number - -RADIO.Modulation - -
    -
    - -

    Modulation of the transmission (either radio.modulation.AM or radio.modulation.FM)

    - -
    -
    -
    -
    - - -RADIO:New(Positionable) - -
    -
    - -

    Create a new RADIO Object.

    - - -

    This doesn't broadcast a transmission, though, use RADIO.Broadcast to actually broadcast -If you want to create a RADIO, you probably should use Positionable#POSITIONABLE.GetRadio() instead

    - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      #RADIO: -Radio

      - -
    2. -
    3. - -

      #nil: -If Positionable is invalid

      - -
    4. -
    -
    -
    -
    -
    - - -RADIO:NewGenericTransmission(FileName, Frequency, Modulation, Power, Loop) - -
    -
    - -

    Create a new transmission, that is to say, populate the RADIO with relevant data -In this function the data is especially relevant if the broadcaster is anything but a UNIT or a GROUP, -but it will work with a UNIT or a GROUP anyway.

    - - -

    Only the #RADIO and the Filename are mandatory

    - -

    Parameters

    -
      -
    • - -

      #string FileName :

      - -
    • -
    • - -

      #number Frequency : -in MHz

      - -
    • -
    • - -

      #number Modulation : -either radio.modulation.AM or radio.modulation.FM

      - -
    • -
    • - -

      #number Power : -in W

      - -
    • -
    • - -

      Loop :

      - -
    • -
    -

    Return value

    - -

    #RADIO: -self

    - -
    -
    -
    -
    - - -RADIO:NewUnitTransmission(FileName, Subtitle, SubtitleDuration, Frequency, Modulation, Loop) - -
    -
    - -

    Create a new transmission, that is to say, populate the RADIO with relevant data -In this function the data is especially relevant if the broadcaster is a UNIT or a GROUP, -but it will work for any Positionable#POSITIONABLE.

    - - -

    Only the RADIO and the Filename are mandatory.

    - -

    Parameters

    -
      -
    • - -

      #string FileName :

      - -
    • -
    • - -

      #string Subtitle :

      - -
    • -
    • - -

      #number SubtitleDuration : -in s

      - -
    • -
    • - -

      #number Frequency : -in MHz

      - -
    • -
    • - -

      #number Modulation : -either radio.modulation.AM or radio.modulation.FM

      - -
    • -
    • - -

      #boolean Loop :

      - -
    • -
    -

    Return value

    - -

    #RADIO: -self

    - -
    -
    -
    -
    - - Positionable#POSITIONABLE - -RADIO.Positionable - -
    -
    - -

    The transmiter

    - -
    -
    -
    -
    - - #number - -RADIO.Power - -
    -
    - -

    Power of the antenna is Watts

    - -
    -
    -
    -
    - - -RADIO:SetFileName(FileName) - -
    -
    - -

    Check validity of the filename passed and sets RADIO.FileName

    - -

    Parameter

    -
      -
    • - -

      #string FileName : -File name of the sound file (i.e. "Noise.ogg")

      - -
    • -
    -

    Return value

    - -

    #RADIO: -self

    - -
    -
    -
    -
    - - -RADIO:SetFrequency(Frequency) - -
    -
    - -

    Check validity of the frequency passed and sets RADIO.Frequency

    - -

    Parameter

    -
      -
    • - -

      #number Frequency : -in MHz (Ranges allowed for radio transmissions in DCS : 30-88 / 108-152 / 225-400MHz)

      - -
    • -
    -

    Return value

    - -

    #RADIO: -self

    - -
    -
    -
    -
    - - -RADIO:SetLoop(Loop) - -
    -
    - -

    Check validity of the loop passed and sets RADIO.Loop

    - -

    Parameter

    -
      -
    • - -

      #boolean Loop :

      - -
    • -
    -

    Return value

    - -

    #RADIO: -self

    - -

    Usage:

    -
    - -
    -
    -
    -
    - - -RADIO:SetModulation(Modulation) - -
    -
    - -

    Check validity of the frequency passed and sets RADIO.Modulation

    - -

    Parameter

    -
      -
    • - -

      #number Modulation : -either radio.modulation.AM or radio.modulation.FM

      - -
    • -
    -

    Return value

    - -

    #RADIO: -self

    - -
    -
    -
    -
    - - -RADIO:SetPower(Power) - -
    -
    - -

    Check validity of the power passed and sets RADIO.Power

    - -

    Parameter

    -
      -
    • - -

      #number Power : -in W

      - -
    • -
    -

    Return value

    - -

    #RADIO: -self

    - -
    -
    -
    -
    - - -RADIO:SetSubtitle(Subtitle, SubtitleDuration) - -
    -
    - -

    Check validity of the subtitle and the subtitleDuration passed and sets RADIO.subtitle and RADIO.subtitleDuration -Both parameters are mandatory, since it wouldn't make much sense to change the Subtitle and not its duration

    - -

    Parameters

    -
      -
    • - -

      #string Subtitle :

      - -
    • -
    • - -

      #number SubtitleDuration : -in s

      - -
    • -
    -

    Return value

    - -

    #RADIO: -self

    - -

    Usage:

    -
    -- create the broadcaster and attaches it a RADIO
    -local MyUnit = UNIT:FindByName("MyUnit")
    -local MyUnitRadio = MyUnit:GetRadio()
    -
    --- add a subtitle for the next transmission, which will be up for 10s
    -MyUnitRadio:SetSubtitle("My Subtitle, 10)
    - -
    -
    -
    -
    - - -RADIO:StopBroadcast() - -
    -
    - -

    Stops a transmission -This function is especially usefull to stop the broadcast of looped transmissions

    - -

    Return value

    - -

    #RADIO: -self

    - -
    -
    -
    -
    - - #string - -RADIO.Subtitle - -
    -
    - -

    Subtitle of the transmission

    - -
    -
    -
    -
    - - #number - -RADIO.SubtitleDuration - -
    -
    - -

    Duration of the Subtitle in seconds

    - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Rat.html b/docs/Documentation/Rat.html deleted file mode 100644 index 7f597274e..000000000 --- a/docs/Documentation/Rat.html +++ /dev/null @@ -1,5659 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Rat

    - -
      -
    • Functional - Create random airtraffic in your missions.
    • -
    - - -

    -Banner Image

    - -
    - -

    The aim of the RAT class is to fill the empty DCS world with randomized air traffic and bring more life to your airports.

    - -

    In particular, it is designed to spawn AI air units at random airports. These units will be assigned a random flight path to another random airport on the map.

    - -

    Even the mission designer will not know where aircraft will be spawned and which route they follow.

    - -

    Features

    - -
      -
    • Very simple interface. Just one unit and two lines of Lua code needed to fill your map.
    • -
    • High degree of randomization. Aircraft will spawn at random airports, have random routes and random destinations.
    • -
    • Specific departure and/or destination airports can be chosen.
    • -
    • Departure and destination airports can be restricted by coalition.
    • -
    • Planes and helicopters supported. Helicopters can also be send to FARPs and ships.
    • -
    • Units can also be spawned in air within pre-defined zones of the map.
    • -
    • Aircraft will be removed when they arrive at their destination (or get stuck on the ground).
    • -
    • When a unit is removed a new unit with a different flight plan is respawned.
    • -
    • Aircraft can report their status during the route.
    • -
    • All of the above can be customized by the user if necessary.
    • -
    • All current (Caucasus, Nevada, Normandy) and future maps are supported.
    • -
    - -

    The RAT class creates an entry in the F10 menu which allows to

    - -
      -
    • Create new groups on-the-fly, i.e. at run time within the mission,
    • -
    • Destroy specific groups (e.g. if they get stuck or damaged and block a runway),
    • -
    • Request the status of all RAT aircraft or individual groups,
    • -
    • Place markers at waypoints on the F10 map for each group.
    • -
    - -

    Note that by its very nature, this class is suited best for civil or transport aircraft. However, it also works perfectly fine for military aircraft of any kind.

    - -

    More of the documentation include some simple examples can be found further down this page.

    - -
    - -

    Demo Missions

    - -

    RAT Demo Missions

    -

    ALL Demo Missions pack of the last release

    - -
    - -

    YouTube Channel

    - -

    RAT videos are work in progress.

    -

    MOOSE YouTube Channel

    - -
    - -

    Author: funkyfranky

    - -

    Contributions: Sven van de Velde (FlightControl)

    - -
    - -

    Global(s)

    - - - - - -
    RAT -

    RAT class, extends Spawn#SPAWN

    -

    The RAT class implements an easy to use way to randomly fill your map with AI aircraft.

    -
    -

    Type RAT

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    RAT.ATC - -
    RAT:ATC_Clearance(n) -

    Max number of planes that get landing clearance of the RAT ATC.

    -
    RAT:ATC_Delay(time) -

    Delay between granting landing clearance for simultanious landings.

    -
    RAT.ATCswitch -

    Enable/disable ATC if set to true/false.

    -
    RAT:AddFriendlyAirportsToDepartures() -

    Add all friendly airports to the list of possible departures.

    -
    RAT:AddFriendlyAirportsToDestinations() -

    Add all friendly airports to the list of possible destinations

    -
    RAT.AlphaDescent -

    Default angle of descenti in degrees. A value of 3.6 follows the 3:1 rule of 3 miles of travel and 1000 ft descent.

    -
    RAT:ChangeAircraft(actype) -

    Change aircraft type.

    -
    RAT.ClassName -

    Name of the Class.

    -
    RAT:ClearForLanding(name) -

    Clear flight for landing.

    -
    RAT:Commute() -

    Aircraft will commute between their departure and destination airports or zones.

    -
    RAT:ContinueJourney() -

    Aircraft will continue their journey from their destination.

    -
    RAT:DestinationZone() -

    Destinations are treated as zones.

    -
    RAT:EnableATC(switch) -

    Enable ATC, which manages the landing queue for RAT aircraft if they arrive simultaniously at the same airport.

    -
    RAT:ExcludedAirports(ports) -

    Airports, FARPs and ships explicitly excluded as departures and destinations.

    -
    RAT.FLcruise -

    Cruise altitude of aircraft. Default FL200 for planes and F005 for helos.

    -
    RAT.FLmaxuser -

    Maximum flight level set by user.

    -
    RAT.FLminuser -

    Minimum flight level set by user.

    -
    RAT.FLuser -

    Flight level set by users explicitly.

    -
    RAT:Livery(skins) -

    Set livery of aircraft.

    -
    RAT.Menu -

    F10 menu items for this RAT object.

    -
    RAT.MenuF10 -

    Main F10 menu.

    -
    RAT:MenuName(name) -

    Set the name of the F10 submenu.

    -
    RAT.Ndeparture_Airports -

    Number of departure airports set via SetDeparture().

    -
    RAT.Ndeparture_Zones -

    Number of departure zones set via SetDeparture.

    -
    RAT.Ndestination_Airports -

    Number of destination airports set via SetDestination().

    -
    RAT.Ndestination_Zones -

    Number of destination zones set via SetDestination().

    -
    RAT:New(groupname, alias) -

    Create a new RAT object.

    -
    RAT:NoRespawn() -

    Aircraft will not get respawned when they finished their route.

    -
    RAT:PlaceMarkers(switch) -

    Place markers of waypoints on the F10 map.

    -
    RAT.ROE -

    RAT rules of engagement.

    -
    RAT.ROT -

    RAT reaction to threat.

    -
    RAT:RadioFrequency(frequency) -

    Set radio frequency.

    -
    RAT:RadioModulation(modulation) -

    Set radio modulation.

    -
    RAT:RadioOFF() -

    Disable Radio.

    -
    RAT:RadioON() -

    Enable Radio.

    -
    RAT:RespawnAfterLanding(delay) -

    Make aircraft respawn the moment they land rather than at engine shut down.

    -
    RAT:RespawnAfterTakeoff() -

    Aircraft will be respawned directly after take-off.

    -
    RAT:ReturnZone() -

    Aircraft will fly to a random point within a zone and then return to its departure airport or zone.

    -
    RAT:SetAISkill(skill) -

    Set skill of AI aircraft.

    -
    RAT:SetClimbRate(rate) -

    Set the climb rate.

    -
    RAT:SetCoalition(friendly) -

    Set the friendly coalitions from which the airports can be used as departure and destination.

    -
    RAT:SetCoalitionAircraft(color) -

    Set coalition of RAT group.

    -
    RAT:SetCountry(id) -

    Set country of RAT group.

    -
    RAT:SetCruiseAltitude(alt) -

    Set cruising altitude.

    -
    RAT:SetDeparture(departurenames) -

    Set possible departure ports.

    -
    RAT:SetDeparturesFromZone(zone) -

    Include all airports which lie in a zone as possible destinations.

    -
    RAT:SetDescentAngle(angle) -

    Set the angle of descent.

    -
    RAT:SetDestination(destinationnames) -

    Set name of destination airports or zones for the AI aircraft.

    -
    RAT:SetDestinationsFromZone(zone) -

    Include all airports which lie in a zone as possible destinations.

    -
    RAT:SetFL(FL) -

    Set flight level.

    -
    RAT:SetFLcruise(FL) -

    Set flight level of cruising part.

    -
    RAT:SetFLmax(FL) -

    Set max flight level.

    -
    RAT:SetFLmin(FL) -

    Set min flight level.

    -
    RAT:SetMaxCruiseAltitude(alt) -

    Set max cruising altitude above sea level.

    -
    RAT:SetMaxCruiseSpeed(speed) -

    Set the maximum cruise speed of the aircraft.

    -
    RAT:SetMaxDistance(dist) -

    Set maximum distance between departure and destination.

    -
    RAT:SetMinCruiseAltitude(alt) -

    Set min cruising altitude above sea level.

    -
    RAT:SetMinDistance(dist) -

    Set minimum distance between departure and destination.

    -
    RAT:SetParkingID(id) -

    Set parking id of aircraft.

    -
    RAT:SetROE(roe) -

    Set rules of engagement (ROE).

    -
    RAT:SetROT(rot) -

    Set reaction to threat (ROT).

    -
    RAT:SetSpawnDelay(delay) -

    Set the delay before first group is spawned.

    -
    RAT:SetSpawnInterval(interval) -

    Set the interval between spawnings of the template group.

    -
    RAT:SetTakeoff(type) -

    Set takeoff type.

    -
    RAT:Spawn(naircraft) -

    Triggers the spawning of AI aircraft.

    -
    RAT:Status(message, forID) -

    Report status of RAT groups.

    -
    RAT:StatusReports(switch) -

    Aircraft report status update messages along the route.

    -
    RAT.SubMenuName -

    Submenu name for RAT object.

    -
    RAT:TimeDestroyInactive(time) -

    Set the time after which inactive groups will be destroyed.

    -
    RAT.Tinactive -

    Time in seconds after which inactive units will be destroyed. Default is 300 seconds.

    -
    RAT:Uncontrolled() -

    Spawn aircraft in uncontolled state.

    -
    RAT.Vclimb -

    Default climb rate in ft/min.

    -
    RAT.Vcruisemax -

    Max cruise speed in m/s (250 m/s = 900 km/h = 486 kt) set by user.

    -
    RAT:_ATCAddFlight(name, dest) -

    Adds andd initializes a new flight after it was spawned.

    -
    RAT:_ATCCheck() -

    Main ATC function.

    -
    RAT:_ATCClearForLanding(airport, flight) -

    Giving landing clearance for aircraft by setting user flag.

    -
    RAT:_ATCDelFlight(t, entry) -

    Deletes a flight from ATC lists after it landed.

    -
    RAT:_ATCFlightLanded(name) -

    Takes care of organisational stuff after a plane has landed.

    -
    RAT:_ATCInit(airports_map) -

    Initializes the ATC arrays and starts schedulers.

    -
    RAT:_ATCQueue() -

    Creates a landing queue for all flights holding at airports.

    -
    RAT:_ATCRegisterFlight(name, time) -

    Registers a flight once it is near its holding point at the final destination.

    -
    RAT:_ATCStatus() -

    ATC status report about flights.

    -
    RAT:_AddFriendlyAirports(ports) -

    Add names of all friendly airports to possible departure or destination airports if they are not already in the list.

    -
    RAT:_AirportExists(name) -

    Test if an airport exists on the current map.

    -
    RAT:_AnticipatedGroupName(index) -

    Anticipated group name from alias and spawn index.

    -
    RAT:_CheckConsistency() -

    Function checks consistency of user input and automatically adjusts parameters if necessary.

    -
    RAT:_Course(a, b) -

    Determine the heading from point a to point b.

    -
    RAT:_Debug(switch) -

    Turn debug messages on or off.

    -
    RAT:_DeleteMarkers() -

    Delete all markers on F10 map.

    -
    RAT:_Despawn(group) -

    Despawn unit.

    -
    RAT:_EngineStartup(EventData) -

    Function is executed when a unit starts its engines.

    -
    RAT:_Excluded(port) -

    Check if airport is excluded from possible departures and destinations.

    -
    RAT:_FLmax(alpha, beta, d, phi, h0) -

    Calculate the max flight level for a given distance and fixed climb and descent rates.

    -
    RAT:_GetAirportsInZone(zone) -

    Find airports within a zone.

    -
    RAT:_GetAirportsOfCoalition() -

    Get all "friendly" airports of the current map.

    -
    RAT:_GetAirportsOfMap() -

    Get all airports of the current map.

    -
    RAT:_GetLife(group) -

    Get (relative) life of first unit of a group.

    -
    RAT:_Heading(course) -

    Determine the heading for an aircraft to be entered in the route template.

    -
    RAT:_InitAircraft(DCSgroup) -

    Initialize basic parameters of the aircraft based on its (template) group in the mission editor.

    -
    RAT:_IsFriendly(port) -

    Check if airport is friendly, i.e.

    -
    RAT:_MinDistance(alpha, beta, ha, hb) -

    Calculate minimum distance between departure and destination for given minimum flight level and climb/decent rates.

    -
    RAT:_ModifySpawnTemplate(waypoints, livery) -

    Modifies the template of the group to be spawned.

    -
    RAT:_NameInList(liste, name) -

    Check if a name/string is in a list or not.

    -
    RAT:_OnBirth(EventData) -

    Function is executed when a unit is spawned.

    -
    RAT:_OnCrash(EventData) -

    Function is executed when a unit crashes.

    -
    RAT:_OnDead(EventData) -

    Function is executed when a unit is dead.

    -
    RAT:_OnEngineShutdown(EventData) -

    Function is executed when a unit shuts down its engines.

    -
    RAT:_OnLand(EventData) -

    Function is executed when a unit lands.

    -
    RAT:_OnTakeoff(EventData) -

    Function is executed when a unit takes off.

    -
    RAT:_PickDeparture(takeoff) -

    Set the departure airport of the AI.

    -
    RAT:_PickDestination(departure, q, minrange, maxrange, random, landing) -

    Pick destination airport or zone depending on departure position.

    -
    RAT:_PlaceMarkers(waypoints, index) -

    Place markers of the waypoints.

    -
    RAT._Random_Gaussian(x0, sigma, xmin, xmax, self) -

    Generate Gaussian pseudo-random numbers.

    -
    RAT:_Randomize(value, fac, lower, upper) -

    Randomize a value by a certain amount.

    -
    RAT:_Respawn(group) -

    Respawn a group.

    -
    RAT:_Routeinfo(waypoints, comment) -

    Provide information about the assigned flightplan.

    -
    RAT:_SetCoalitionTable() -

    Create a table with the valid coalitions for departure and destination airports.

    -
    RAT:_SetMarker(text, wp, index) -

    Set a marker visible for all on the F10 map.

    -
    RAT:_SetROE(group, roe) -

    Set ROE for a group.

    -
    RAT:_SetROT(group, rot) -

    Set ROT for a group.

    -
    RAT:_SetRoute(Takeoff, Landing, _departure, _destination, takeoff, landing, _waypoint) -

    Set the route of the AI plane.

    -
    RAT:_SetStatus(group, status) -

    Set status of group.

    -
    RAT:_SpawnWithRoute(_departure, _destination, _takeoff, _landing, _livery, _waypoint) -

    Spawn the AI aircraft with a route.

    -
    RAT:_TaskFunction(FunctionString, ...) -

    Task function.

    -
    RAT:_TaskHolding(P1, Altitude, Speed, Duration) -

    Orbit at a specified position at a specified alititude with a specified speed.

    -
    RAT:_Waypoint(Running, Type, Coord, Speed, Altitude, Airport, index) -

    Create a waypoint that can be used with the Route command.

    -
    RAT._WaypointFunction(group, rat, wp) -

    Function which is called after passing every waypoint.

    -
    RAT:_ZoneExists(name) -

    Test if a trigger zone defined in the mission editor exists.

    -
    RAT.actype - -
    RAT.addfriendlydepartures -

    Add all friendly airports to departures.

    -
    RAT.addfriendlydestinations -

    Add all friendly airports to destinations.

    -
    RAT.aircraft -

    Table which holds the basic aircraft properties (speed, range, ...).

    -
    RAT.airports -

    All airports of friedly coalitions.

    -
    RAT.airports_map -

    All airports available on current map (Caucasus, Nevada, Normandy, ...).

    -
    RAT.alias -

    Alias for spawned group.

    -
    RAT.alive -

    Number of groups which are alive.

    -
    RAT.cat - -
    RAT.category -

    Category of aircarft: "plane" or "heli".

    -
    RAT.coal -

    RAT friendly coalitions.

    -
    RAT.coalition -

    Coalition of spawn group template.

    -
    RAT.commute -

    Aircraft commute between departure and destination, i.e. when respawned the departure airport becomes the new destiation.

    -
    RAT.continuejourney -

    Aircraft will continue their journey, i.e. get respawned at their destination with a new random destination.

    -
    RAT.country -

    Country of spawn group template.

    -
    RAT.ctable -

    Table with the valid coalitons from choice self.friendly.

    -
    RAT.debug -

    Turn debug messages on or off.

    -
    RAT.departure_Azone -

    Zone containing the departure airports.

    -
    RAT.departure_ports -

    Array containing the names of the destination airports or zones.

    -
    RAT.destination_Azone -

    Zone containing the destination airports.

    -
    RAT.destination_ports -

    Array containing the names of the destination airports or zones.

    -
    RAT.destinationzone -

    Destination is a zone and not an airport.

    -
    RAT.excluded_ports -

    Array containing the names of explicitly excluded airports.

    -
    RAT.f10menu -

    Add an F10 menu for RAT.

    -
    RAT.frequency -

    Radio frequency used by the RAT groups.

    -
    RAT.friendly -

    Possible departure/destination airport: all=blue+red+neutral, same=spawn+neutral, spawnonly=spawn, blue=blue+neutral, blueonly=blue, red=red+neutral, redonly=red.

    -
    RAT.id -

    Some ID to identify who we are in output of the DCS.log file.

    -
    RAT.landing -

    Landing type. Determines if we actually land at an airport or treat it as zone.

    -
    RAT.livery -

    Livery of the aircraft set by user.

    -
    RAT.markerid -

    Running number of placed markers on the F10 map.

    -
    RAT.markerids -

    Array with marker IDs.

    -
    RAT.maxdist -

    Max distance from departure to destination in meters. Default 5000 km.

    -
    RAT.mindist -

    Min distance from departure to destination in meters. Default 5 km.

    -
    RAT.modulation -

    Ratio modulation. Either "FM" or "AM".

    -
    RAT.ngroups -

    Number of groups to be spawned in total.

    -
    RAT.norespawn -

    Aircraft will not be respawned after they have finished their route.

    -
    RAT.onboard_num - -
    RAT.parking_id -

    String with a special parking ID for the aircraft.

    -
    RAT.placemarkers -

    Place markers of waypoints on F10 map.

    -
    RAT.radio -

    If true/false disables radio messages from the RAT groups.

    -
    RAT.random_departure -

    By default a random friendly airport is chosen as departure.

    -
    RAT.random_destination -

    By default a random friendly airport is chosen as destination.

    -
    RAT.ratcraft -

    Array with the spawned RAT aircraft.

    -
    RAT.reportstatus -

    Aircraft report status.

    -
    RAT.respawn_after_takeoff -

    Aircraft will be respawned directly after take-off.

    -
    RAT.respawn_at_landing -

    Respawn aircraft the moment they land rather than at engine shutdown.

    -
    RAT.respawn_delay -

    Delay in seconds until repawn happens after landing.

    -
    RAT.return_zones -

    Array containing the names of the return zones.

    -
    RAT.returnzone -

    Zone where aircraft will fly to before returning to their departure airport.

    -
    RAT.roe -

    ROE of spawned groups, default is weapon hold (this is a peaceful class for civil aircraft or ferry missions). Possible: "hold", "return", "free".

    -
    RAT.rot -

    ROT of spawned groups, default is no reaction. Possible: "noreaction", "passive", "evade".

    -
    RAT.skill -

    Skill of AI.

    -
    RAT.spawndelay -

    Delay time in seconds before first spawning happens.

    -
    RAT.spawninitialized -

    If RAT:Spawn() was already called this RAT object is set to true to prevent users to call it again.

    -
    RAT.spawninterval -

    Interval between spawning units/groups. Note that we add a randomization of 50%.

    -
    RAT.status -

    RAT aircraft status.

    -
    RAT.statusinterval -

    Intervall between status checks (and reports if enabled).

    -
    RAT.takeoff -

    Takeoff type. 0=coldorhot.

    -
    RAT.templategroup -

    Group serving as template for the RAT aircraft.

    -
    RAT.type - -
    RAT.uncontrolled -

    If true aircraft are spawned in uncontrolled state and will only sit on their parking spots.

    -
    RAT.unit -

    RAT unit conversions.

    -
    RAT.version -

    RAT version.

    -
    RAT.waypointdescriptions -

    Table with strings for waypoint descriptions of markers.

    -
    RAT.waypointstatus -

    Table with strings of waypoint status.

    -
    RAT.wp -

    RAT waypoint type.

    -
    - -

    Global(s)

    -
    -
    - - #RAT - -RAT - -
    -
    - -

    RAT class, extends Spawn#SPAWN

    -

    The RAT class implements an easy to use way to randomly fill your map with AI aircraft.

    - - - - -

    Airport Selection

    - -

    Process

    - -

    Default settings:

    - -
      -
    • By default, aircraft are spawned at airports of their own coalition (blue or red) or neutral airports.
    • -
    • Destination airports are by default also of neutral or of the same coalition as the template group of the spawned aircraft.
    • -
    • Possible destinations are restricted by their distance to the departure airport. The maximal distance depends on the max range of spawned aircraft type and its initial fuel amount.
    • -
    - -

    The default behavior can be changed:

    - -
      -
    • A specific departure and/or destination airport can be chosen.
    • -
    • Valid coalitions can be set, e.g. only red, blue or neutral, all three "colours".
    • -
    • It is possible to start in air within a zone defined in the mission editor or within a zone above an airport of the map.
    • -
    - -

    Flight Plan

    - -

    Process

    - -
      -
    • A general flight plan has five main airborne segments: Climb, cruise, descent, holding and final approach.
    • -
    • Events monitored during the flight are: birth, engine-start, take-off, landing and engine-shutdown.
    • -
    • The default flight level (FL) is set to ~FL200, i.e. 20000 feet ASL but randomized for each aircraft. - Service ceiling of aircraft type is into account for max FL as well as the distance between departure and destination.
    • -
    • Maximal distance between destination and departure airports depends on range and initial fuel of aircraft.
    • -
    • Climb rate is set to a moderate value of ~1500 ft/min.
    • -
    • The standard descent rate follows the 3:1 rule, i.e. 1000 ft decent per 3 miles of travel. Hence, angle of descent is ~3.6 degrees.
    • -
    • A holding point is randomly selected at a distance between 5 and 10 km away from destination airport.
    • -
    • The altitude of theholding point is ~1200 m AGL. Holding patterns might or might not happen with variable duration.
    • -
    • If an aircraft is spawned in air, the procedure omitts taxi and take-off and starts with the climb/cruising part.
    • -
    • All values are randomized for each spawned aircraft.
    • -
    - -

    Mission Editor Setup

    - -

    Process

    - -

    Basic mission setup is very simple and essentially a three step process:

    - -
      -
    • Place your aircraft anywhere on the map. It really does not matter where you put it.
    • -
    • Give the group a good name. In the example above the group is named "RAT_YAK".
    • -
    • Activate the "LATE ACTIVATION" tick box. Note that this aircraft will not be spawned itself but serves a template for each RAT aircraft spawned when the mission starts.
    • -
    - -

    Voilà, your already done!

    - -

    Optionally, you can set a specific livery for the aircraft or give it some weapons. -However, the aircraft will by default not engage any enemies. Think of them as beeing on a peaceful or ferry mission.

    - -

    Basic Lua Script

    - -

    Process

    - -

    The basic Lua script for one template group consits of two simple lines as shown in the picture above.

    - -
      -
    • Line 2 creates a new RAT object "yak". The only required parameter for the constructor RAT.New() is the name of the group as defined in the mission editor. In this example it is "RAT_YAK".
    • -
    • Line 5 trigger the command to spawn the aircraft. The (optional) parameter for the RAT.Spawn() function is the number of aircraft to be spawned of this object. - By default each of these aircraft gets a random departure airport anywhere on the map and a random destination airport, which lies within range of the of the selected aircraft type.
    • -
    - -

    In this simple example aircraft are respawned with a completely new flightplan when they have reached their destination airport. -The "old" aircraft is despawned (destroyed) after it has shut-down its engines and a new aircraft of the same type is spawned at a random departure airport anywhere on the map. -Hence, the default flight plan for a RAT aircraft will be: Fly from airport A to B, get respawned at C and fly to D, get respawned at E and fly to F, ... -This ensures that you always have a constant number of AI aircraft on your map.

    - -

    Examples

    - -

    Here are a few examples, how you can modify the default settings of RAT class objects.

    - -

    Specify Departure and Destinations

    - -

    Process

    - -

    In the picture above you find a few possibilities how to modify the default behaviour to spawn at random airports and fly to random destinations.

    - -

    In particular, you can specify fixed departure and/or destination airports. This is done via the RAT.SetDeparture() or RAT.SetDestination() functions, respectively.

    - -
      -
    • If you only fix a specific departure airport via RAT.SetDeparture() all aircraft will be spawned at that airport and get random destination airports.
    • -
    • If you only fix the destination airport via RAT.SetDestination(), aircraft a spawned at random departure airports but will all fly to the destination airport.
    • -
    • If you fix departure and destination airports, aircraft will only travel from between those airports. - When the aircraft reaches its destination, it will be respawned at its departure and fly again to its destination.
    • -
    - -

    There is also an option that allows aircraft to "continue their journey" from their destination. This is achieved by the RAT.ContinueJourney() function. -In that case, when the aircraft arrives at its first destination it will be respawned at that very airport and get a new random destination. -So the flight plan in this case would be: Fly from airport A to B, then from B to C, then from C to D, ...

    - -

    It is also possible to make aircraft "commute" between two airports, i.e. flying from airport A to B and then back from B to A, etc. -This can be done by the RAT.Commute() function. Note that if no departure or destination airports are specified, the first departure and destination are chosen randomly. -Then the aircraft will fly back and forth between those two airports indefinetly.

    - - -

    Spawn in Air

    - -

    Process

    - -

    Aircraft can also be spawned in air rather than at airports on the ground. This is done by setting RAT.SetTakeoff() to "air".

    - -

    By default, aircraft are spawned randomly above airports of the map.

    - -

    The RAT.SetDeparture() option can be used to specify zones, which have been defined in the mission editor as departure zones. -Aircraft will then be spawned at a random point within the zone or zones.

    - -

    Note that RAT.SetDeparture() also accepts airport names. For an air takeoff these are treated like zones with a radius of XX kilometers. -Again, aircraft are spawned at random points within these zones around the airport.

    - -

    Misc Options

    - -

    Process

    - -

    The default "takeoff" type of RAT aircraft is that they are spawned with hot or cold engines. -The choice is random, so 50% of aircraft will be spawned with hot engines while the other 50% will be spawned with cold engines. -This setting can be changed using the RAT.SetTakeoff() function. The possible parameters for starting on ground are:

    - -
      -
    • RAT.SetTakeoff("cold"), which means that all aircraft are spawned with their engines off,
    • -
    • RAT.SetTakeoff("hot"), which means that all aircraft are spawned with their engines on,
    • -
    • RAT.SetTakeoff("runway"), which means that all aircraft are spawned already at the runway ready to takeoff. - Note that in this case the default spawn intervall is set to 180 seconds in order to avoid aircraft jamms on the runway. Generally, this takeoff at runways should be used with care and problems are to be expected.
    • -
    - - -

    The options RAT.SetMinDistance() and RAT.SetMaxDistance() can be used to restrict the range from departure to destination. For example

    - -
      -
    • RAT.SetMinDistance(100) will cause only random destination airports to be selected which are at least 100 km away from the departure airport.
    • -
    • RAT.SetMaxDistance(150) will allow only destination airports which are less than 150 km away from the departure airport.
    • -
    - -

    Process

    - -

    By default planes get a cruise altitude of ~20,000 ft ASL. The actual altitude is sampled from a Gaussian distribution. The picture shows this distribution -if one would spawn 1000 planes. As can be seen most planes get a cruising alt of around FL200. Other values are possible but less likely the further away -one gets from the expectation value.

    - -

    The expectation value, i.e. the altitude most aircraft get, can be set with the function RAT.SetFLcruise(). -It is possible to restrict the minimum cruise altitude by RAT.SetFLmin() and the maximum cruise altitude by RAT.SetFLmax()

    - -

    The cruise altitude can also be given in meters ASL by the functions RAT.SetCruiseAltitude(), RAT.SetMinCruiseAltitude() and RAT.SetMaxCruiseAltitude().

    - -

    For example:

    - -
      -
    • RAT.SetFLcruise(300) will cause most planes fly around FL300.
    • -
    • RAT.SetFLmin(100) restricts the cruising alt such that no plane will fly below FL100. Note that this automatically changes the minimum distance from departure to destination. - That means that only destinations are possible for which the aircraft has had enought time to reach that flight level and descent again.
    • -
    • RAT.SetFLmax(200) will restrict the cruise alt to maximum FL200, i.e. no aircraft will travel above this height.
    • -
    - - - -
    -
    -

    Type Rat

    - -

    Type RAT

    - -
      -
    • RAT class
    • -
    - -

    Field(s)

    -
    -
    - - - -RAT.ATC - -
    -
    - - - -
    -
    -
    -
    - - -RAT:ATC_Clearance(n) - -
    -
    - -

    Max number of planes that get landing clearance of the RAT ATC.

    - - -

    This setting effects all RAT objects and groups!

    - -

    Parameter

    -
      -
    • - -

      #number n : -Number of aircraft that are allowed to land simultaniously. Default is 2.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:ATC_Delay(time) - -
    -
    - -

    Delay between granting landing clearance for simultanious landings.

    - - -

    This setting effects all RAT objects and groups!

    - -

    Parameter

    -
      -
    • - -

      #number time : -Delay time when the next aircraft will get landing clearance event if the previous one did not land yet. Default is 240 sec.

      - -
    • -
    -
    -
    -
    -
    - - #boolean - -RAT.ATCswitch - -
    -
    - -

    Enable/disable ATC if set to true/false.

    - -
    -
    -
    -
    - - -RAT:AddFriendlyAirportsToDepartures() - -
    -
    - -

    Add all friendly airports to the list of possible departures.

    - -
    -
    -
    -
    - - -RAT:AddFriendlyAirportsToDestinations() - -
    -
    - -

    Add all friendly airports to the list of possible destinations

    - -
    -
    -
    -
    - - #number - -RAT.AlphaDescent - -
    -
    - -

    Default angle of descenti in degrees. A value of 3.6 follows the 3:1 rule of 3 miles of travel and 1000 ft descent.

    - -
    -
    -
    -
    - - -RAT:ChangeAircraft(actype) - -
    -
    - -

    Change aircraft type.

    - - -

    This is a dirty hack which allows to change the aircraft type of the template group. -Note that all parameters like cruise speed, climb rate, range etc are still taken from the template group which likely leads to strange behaviour.

    - -

    Parameter

    -
      -
    • - -

      #string actype : -Type of aircraft which is spawned independent of the template group. Use with care and expect problems!

      - -
    • -
    -
    -
    -
    -
    - - #string - -RAT.ClassName - -
    -
    - -

    Name of the Class.

    - -
    -
    -
    -
    - - -RAT:ClearForLanding(name) - -
    -
    - -

    Clear flight for landing.

    - - -

    Sets tigger value to 1.

    - -

    Parameter

    -
      -
    • - -

      #string name : -Name of flight to be cleared for landing.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:Commute() - -
    -
    - -

    Aircraft will commute between their departure and destination airports or zones.

    - -
    -
    -
    -
    - - -RAT:ContinueJourney() - -
    -
    - -

    Aircraft will continue their journey from their destination.

    - - -

    This means they are respawned at their destination and get a new random destination.

    - -
    -
    -
    -
    - - -RAT:DestinationZone() - -
    -
    - -

    Destinations are treated as zones.

    - - -

    Aircraft will not land but rather be despawned when they reach a random point in the zone.

    - -
    -
    -
    -
    - - -RAT:EnableATC(switch) - -
    -
    - -

    Enable ATC, which manages the landing queue for RAT aircraft if they arrive simultaniously at the same airport.

    - -

    Parameter

    -
      -
    • - -

      #boolean switch : -Enable ATC (true) or Disable ATC (false). No argument means ATC enabled.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:ExcludedAirports(ports) - -
    -
    - -

    Airports, FARPs and ships explicitly excluded as departures and destinations.

    - -

    Parameter

    -
      -
    • - -

      #string ports : -Name or table of names of excluded airports.

      - -
    • -
    -
    -
    -
    -
    - - #number - -RAT.FLcruise - -
    -
    - -

    Cruise altitude of aircraft. Default FL200 for planes and F005 for helos.

    - -
    -
    -
    -
    - - #number - -RAT.FLmaxuser - -
    -
    - -

    Maximum flight level set by user.

    - -
    -
    -
    -
    - - #number - -RAT.FLminuser - -
    -
    - -

    Minimum flight level set by user.

    - -
    -
    -
    -
    - - #number - -RAT.FLuser - -
    -
    - -

    Flight level set by users explicitly.

    - -
    -
    -
    -
    - - -RAT:Livery(skins) - -
    -
    - -

    Set livery of aircraft.

    - - -

    If more than one livery is specified in a table, the actually used one is chosen randomly from the selection.

    - -

    Parameter

    -
      -
    • - -

      #table skins : -Name of livery or table of names of liveries.

      - -
    • -
    -
    -
    -
    -
    - - #table - -RAT.Menu - -
    -
    - -

    F10 menu items for this RAT object.

    - -
    -
    -
    -
    - - #string - -RAT.MenuF10 - -
    -
    - -

    Main F10 menu.

    - -
    -
    -
    -
    - - -RAT:MenuName(name) - -
    -
    - -

    Set the name of the F10 submenu.

    - - -

    Default is the name of the template group.

    - -

    Parameter

    -
      -
    • - -

      #string name : -Submenu name.

      - -
    • -
    -
    -
    -
    -
    - - #number - -RAT.Ndeparture_Airports - -
    -
    - -

    Number of departure airports set via SetDeparture().

    - -
    -
    -
    -
    - - #number - -RAT.Ndeparture_Zones - -
    -
    - -

    Number of departure zones set via SetDeparture.

    - -
    -
    -
    -
    - - #number - -RAT.Ndestination_Airports - -
    -
    - -

    Number of destination airports set via SetDestination().

    - -
    -
    -
    -
    - - #number - -RAT.Ndestination_Zones - -
    -
    - -

    Number of destination zones set via SetDestination().

    - -
    -
    -
    -
    - - -RAT:New(groupname, alias) - -
    -
    - -

    Create a new RAT object.

    - -

    Parameters

    -
      -
    • - -

      #string groupname : -Name of the group as defined in the mission editor. This group is serving as a template for all spawned units.

      - -
    • -
    • - -

      #string alias : -(Optional) Alias of the group. This is and optional parameter but must(!) be used if the same template group is used for more than one RAT object.

      - -
    • -
    -

    Return values

    -
      -
    1. - -

      #RAT: -Object of RAT class.

      - -
    2. -
    3. - -

      #nil: -If the group does not exist in the mission editor.

      - -
    4. -
    -

    Usages:

    -
      -
    • yak1:RAT("RAT_YAK") will create a RAT object called "yak1". The template group in the mission editor must have the name "RAT_YAK".
    • -
    • yak2:RAT("RAT_YAK", "Yak2") will create a RAT object "yak2". The template group in the mission editor must have the name "RAT_YAK" but the group will be called "Yak2" in e.g. the F10 menu.
    • -
    - -
    -
    -
    -
    - - -RAT:NoRespawn() - -
    -
    - -

    Aircraft will not get respawned when they finished their route.

    - -
    -
    -
    -
    - - -RAT:PlaceMarkers(switch) - -
    -
    - -

    Place markers of waypoints on the F10 map.

    - - -

    Default is off.

    - -

    Parameter

    -
      -
    • - -

      #boolean switch : -true=yes, false=no.

      - -
    • -
    -
    -
    -
    -
    - - - -RAT.ROE - -
    -
    - -

    RAT rules of engagement.

    - -
    -
    -
    -
    - - - -RAT.ROT - -
    -
    - -

    RAT reaction to threat.

    - -
    -
    -
    -
    - - -RAT:RadioFrequency(frequency) - -
    -
    - -

    Set radio frequency.

    - -

    Parameter

    -
      -
    • - -

      #number frequency : -Radio frequency.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:RadioModulation(modulation) - -
    -
    - -

    Set radio modulation.

    - - -

    Default is AM.

    - -

    Parameter

    -
      -
    • - -

      #string modulation : -Either "FM" or "AM". If no value is given, modulation is set to AM.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:RadioOFF() - -
    -
    - -

    Disable Radio.

    - - -

    Overrules the ME setting.

    - -
    -
    -
    -
    - - -RAT:RadioON() - -
    -
    - -

    Enable Radio.

    - - -

    Overrules the ME setting.

    - -
    -
    -
    -
    - - -RAT:RespawnAfterLanding(delay) - -
    -
    - -

    Make aircraft respawn the moment they land rather than at engine shut down.

    - -

    Parameter

    -
      -
    • - -

      #number delay : -(Optional) Delay in seconds until respawn happens after landing. Default is 180 seconds. Minimum is 0.5 seconds.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:RespawnAfterTakeoff() - -
    -
    - -

    Aircraft will be respawned directly after take-off.

    - -
    -
    -
    -
    - - -RAT:ReturnZone() - -
    -
    - -

    Aircraft will fly to a random point within a zone and then return to its departure airport or zone.

    - -
    -
    -
    -
    - - -RAT:SetAISkill(skill) - -
    -
    - -

    Set skill of AI aircraft.

    - - -

    Default is "High".

    - -

    Parameter

    -
      -
    • - -

      #string skill : -Skill, options are "Average", "Good", "High", "Excellent" and "Random". Parameter is case insensitive.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:SetClimbRate(rate) - -
    -
    - -

    Set the climb rate.

    - - -

    This automatically sets the climb angle.

    - -

    Parameter

    -
      -
    • - -

      #number rate : -Climb rate in ft/min. Default is 1500 ft/min. Minimum is 100 ft/min. Maximum is 15,000 ft/min.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:SetCoalition(friendly) - -
    -
    - -

    Set the friendly coalitions from which the airports can be used as departure and destination.

    - -

    Parameter

    -
      -
    • - -

      #string friendly : -"same"=own coalition+neutral (default), "sameonly"=own coalition only, "neutral"=all neutral airports. -Default is "same", so aircraft will use airports of the coalition their spawn template has plus all neutral airports.

      - -
    • -
    -

    Usages:

    -
      -
    • yak:SetCoalition("neutral") will spawn aircraft randomly on all neutral airports.
    • -
    • yak:SetCoalition("sameonly") will spawn aircraft randomly on airports belonging to the same coalition only as the template.
    • -
    - -
    -
    -
    -
    - - -RAT:SetCoalitionAircraft(color) - -
    -
    - -

    Set coalition of RAT group.

    - - -

    You can make red templates blue and vice versa.

    - -

    Parameter

    -
      -
    • - -

      #string color : -Color of coalition, i.e. "red" or blue".

      - -
    • -
    -
    -
    -
    -
    - - -RAT:SetCountry(id) - -
    -
    - -

    Set country of RAT group.

    - - -

    This overrules the coalition settings.

    - -

    Parameter

    -
      -
    • - -

      #number id : -DCS country enumerator ID. For example country.id.USA or country.id.RUSSIA.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:SetCruiseAltitude(alt) - -
    -
    - -

    Set cruising altitude.

    - - -

    This is still be checked for consitancy with selected route and prone to radomization.

    - -

    Parameter

    -
      -
    • - -

      #number alt : -Cruising altitude ASL in meters.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:SetDeparture(departurenames) - -
    -
    - -

    Set possible departure ports.

    - - -

    This can be an airport or a zone defined in the mission editor.

    - -

    Parameter

    -
      -
    • - -

      #string departurenames : -Name or table of names of departure airports or zones.

      - -
    • -
    -

    Usages:

    -
      -
    • RAT:SetDeparture("Sochi-Adler") will spawn RAT objects at Sochi-Adler airport.
    • -
    • RAT:SetDeparture({"Sochi-Adler", "Gudauta"}) will spawn RAT aircraft radomly at Sochi-Adler or Gudauta airport.
    • -
    • RAT:SetDeparture({"Zone A", "Gudauta"}) will spawn RAT aircraft in air randomly within Zone A, which has to be defined in the mission editor, or within a zone around Gudauta airport. Note that this also requires RAT:takeoff("air") to be set.
    • -
    - -
    -
    -
    -
    - - -RAT:SetDeparturesFromZone(zone) - -
    -
    - -

    Include all airports which lie in a zone as possible destinations.

    - -

    Parameter

    -
      -
    • - -

      Core.Zone#ZONE zone : -Zone in which the destination airports lie. Has to be a MOOSE zone.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:SetDescentAngle(angle) - -
    -
    - -

    Set the angle of descent.

    - - -

    Default is 3.6 degrees, which corresponds to 3000 ft descent after one mile of travel.

    - -

    Parameter

    -
      -
    • - -

      #number angle : -Angle of descent in degrees. Minimum is 0.5 deg. Maximum 50 deg.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:SetDestination(destinationnames) - -
    -
    - -

    Set name of destination airports or zones for the AI aircraft.

    - -

    Parameter

    -
      -
    • - -

      #string destinationnames : -Name of the destination airport or table of destination airports.

      - -
    • -
    -

    Usage:

    -
    RAT:SetDestination("Krymsk") makes all aircraft of this RAT oject fly to Krymsk airport.
    - -
    -
    -
    -
    - - -RAT:SetDestinationsFromZone(zone) - -
    -
    - -

    Include all airports which lie in a zone as possible destinations.

    - -

    Parameter

    -
      -
    • - -

      Core.Zone#ZONE zone : -Zone in which the departure airports lie. Has to be a MOOSE zone.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:SetFL(FL) - -
    -
    - -

    Set flight level.

    - - -

    Setting this value will overrule all other logic. Aircraft will try to fly at this height regardless.

    - -

    Parameter

    -
      -
    • - -

      #number FL : -Fight Level in hundrets of feet. E.g. FL200 = 20000 ft ASL.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:SetFLcruise(FL) - -
    -
    - -

    Set flight level of cruising part.

    - - -

    This is still be checked for consitancy with selected route and prone to radomization. -Default is FL200 for planes and FL005 for helicopters.

    - -

    Parameter

    -
      -
    • - -

      #number FL : -Flight level in hundrets of feet. E.g. FL200 = 20000 ft ASL.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:SetFLmax(FL) - -
    -
    - -

    Set max flight level.

    - - -

    Setting this value will overrule all other logic. Aircraft will try to fly at less than this FL regardless.

    - -

    Parameter

    -
      -
    • - -

      #number FL : -Maximum Fight Level in hundrets of feet.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:SetFLmin(FL) - -
    -
    - -

    Set min flight level.

    - - -

    Setting this value will overrule all other logic. Aircraft will try to fly at higher than this FL regardless.

    - -

    Parameter

    -
      -
    • - -

      #number FL : -Maximum Fight Level in hundrets of feet.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:SetMaxCruiseAltitude(alt) - -
    -
    - -

    Set max cruising altitude above sea level.

    - -

    Parameter

    -
      -
    • - -

      #number alt : -Altitude ASL in meters.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:SetMaxCruiseSpeed(speed) - -
    -
    - -

    Set the maximum cruise speed of the aircraft.

    - -

    Parameter

    -
      -
    • - -

      #number speed : -Speed in km/h.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:SetMaxDistance(dist) - -
    -
    - -

    Set maximum distance between departure and destination.

    - - -

    Default is 5000 km but aircarft range is also taken into account automatically.

    - -

    Parameter

    -
      -
    • - -

      #number dist : -Distance in km.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:SetMinCruiseAltitude(alt) - -
    -
    - -

    Set min cruising altitude above sea level.

    - -

    Parameter

    -
      -
    • - -

      #number alt : -Altitude ASL in meters.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:SetMinDistance(dist) - -
    -
    - -

    Set minimum distance between departure and destination.

    - - -

    Default is 5 km. -Minimum distance should not be smaller than maybe ~500 meters to ensure that departure and destination are different.

    - -

    Parameter

    -
      -
    • - -

      #number dist : -Distance in km.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:SetParkingID(id) - -
    -
    - -

    Set parking id of aircraft.

    - -

    Parameter

    -
      -
    • - -

      #string id : -Parking ID of the aircraft.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:SetROE(roe) - -
    -
    - -

    Set rules of engagement (ROE).

    - - -

    Default is weapon hold. This is a peaceful class.

    - -

    Parameter

    -
      -
    • - -

      #string roe : -"hold" = weapon hold, "return" = return fire, "free" = weapons free.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:SetROT(rot) - -
    -
    - -

    Set reaction to threat (ROT).

    - - -

    Default is no reaction, i.e. aircraft will simply ignore all enemies.

    - -

    Parameter

    -
      -
    • - -

      #string rot : -"noreaction" = no reaction to threats, "passive" = passive defence, "evade" = evade enemy attacks.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:SetSpawnDelay(delay) - -
    -
    - -

    Set the delay before first group is spawned.

    - -

    Parameter

    -
      -
    • - -

      #number delay : -Delay in seconds. Default is 5 seconds. Minimum delay is 0.5 seconds.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:SetSpawnInterval(interval) - -
    -
    - -

    Set the interval between spawnings of the template group.

    - -

    Parameter

    -
      -
    • - -

      #number interval : -Interval in seconds. Default is 5 seconds. Minimum is 0.5 seconds.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:SetTakeoff(type) - -
    -
    - -

    Set takeoff type.

    - - -

    Starting cold at airport, starting hot at airport, starting at runway, starting in the air. -Default is "takeoff-coldorhot". So there is a 50% chance that the aircraft starts with cold engines and 50% that it starts with hot engines.

    - -

    Parameter

    -
      -
    • - -

      #string type : -Type can be "takeoff-cold" or "cold", "takeoff-hot" or "hot", "takeoff-runway" or "runway", "air".

      - -
    • -
    -

    Usages:

    -
      -
    • RAT:Takeoff("hot") will spawn RAT objects at airports with engines started.
    • -
    • RAT:Takeoff("cold") will spawn RAT objects at airports with engines off.
    • -
    • RAT:Takeoff("air") will spawn RAT objects in air over random airports or within pre-defined zones. 
    • -
    - -
    -
    -
    -
    - - -RAT:Spawn(naircraft) - -
    -
    - -

    Triggers the spawning of AI aircraft.

    - - -

    Note that all additional options should be set before giving the spawn command.

    - -

    Parameter

    -
      -
    • - -

      #number naircraft : -(Optional) Number of aircraft to spawn. Default is one aircraft.

      - -
    • -
    -

    Usage:

    -
    yak:Spawn(5) will spawn five aircraft. By default aircraft will spawn at neutral and red airports if the template group is part of the red coaliton.
    - -
    -
    -
    -
    - - -RAT:Status(message, forID) - -
    -
    - -

    Report status of RAT groups.

    - -

    Parameters

    -
      -
    • - -

      #boolean message : -(Optional) Send message with report to all if true.

      - -
    • -
    • - -

      #number forID : -(Optional) Send message only for this ID.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:StatusReports(switch) - -
    -
    - -

    Aircraft report status update messages along the route.

    - -

    Parameter

    -
      -
    • - -

      #boolean switch : -Swtich reports on (true) or off (false). No argument is on.

      - -
    • -
    -
    -
    -
    -
    - - #string - -RAT.SubMenuName - -
    -
    - -

    Submenu name for RAT object.

    - -
    -
    -
    -
    - - -RAT:TimeDestroyInactive(time) - -
    -
    - -

    Set the time after which inactive groups will be destroyed.

    - -

    Parameter

    -
      -
    • - -

      #number time : -Time in seconds. Default is 600 seconds = 10 minutes. Minimum is 60 seconds.

      - -
    • -
    -
    -
    -
    -
    - - #number - -RAT.Tinactive - -
    -
    - -

    Time in seconds after which inactive units will be destroyed. Default is 300 seconds.

    - -
    -
    -
    -
    - - -RAT:Uncontrolled() - -
    -
    - -

    Spawn aircraft in uncontolled state.

    - - -

    Aircraft will only sit at their parking spots. Only for populating airfields.

    - -
    -
    -
    -
    - - #number - -RAT.Vclimb - -
    -
    - -

    Default climb rate in ft/min.

    - -
    -
    -
    -
    - - #number - -RAT.Vcruisemax - -
    -
    - -

    Max cruise speed in m/s (250 m/s = 900 km/h = 486 kt) set by user.

    - -
    -
    -
    -
    - - -RAT:_ATCAddFlight(name, dest) - -
    -
    - -

    Adds andd initializes a new flight after it was spawned.

    - -

    Parameters

    -
      -
    • - -

      #string name : -Group name of the flight.

      - -
    • -
    • - -

      #string dest : -Name of the destination airport.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:_ATCCheck() - -
    -
    - -

    Main ATC function.

    - - -

    Updates the landing queue of all airports and inceases holding time for all flights.

    - -
    -
    -
    -
    - - -RAT:_ATCClearForLanding(airport, flight) - -
    -
    - -

    Giving landing clearance for aircraft by setting user flag.

    - -

    Parameters

    -
      -
    • - -

      #string airport : -Name of destination airport.

      - -
    • -
    • - -

      #string flight : -Group name of flight, which gets landing clearence.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:_ATCDelFlight(t, entry) - -
    -
    - -

    Deletes a flight from ATC lists after it landed.

    - -

    Parameters

    -
      -
    • - -

      #table t : -Table.

      - -
    • -
    • - -

      #string entry : -Flight name which shall be deleted.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:_ATCFlightLanded(name) - -
    -
    - -

    Takes care of organisational stuff after a plane has landed.

    - -

    Parameter

    -
      -
    • - -

      #string name : -Group name of flight.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:_ATCInit(airports_map) - -
    -
    - -

    Initializes the ATC arrays and starts schedulers.

    - -

    Parameter

    -
      -
    • - -

      #table airports_map : -List of all airports of the map.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:_ATCQueue() - -
    -
    - -

    Creates a landing queue for all flights holding at airports.

    - - -

    Aircraft with longest holding time gets first permission to land.

    - -
    -
    -
    -
    - - -RAT:_ATCRegisterFlight(name, time) - -
    -
    - -

    Registers a flight once it is near its holding point at the final destination.

    - -

    Parameters

    -
      -
    • - -

      #string name : -Group name of the flight.

      - -
    • -
    • - -

      #number time : -Time the fight first registered.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:_ATCStatus() - -
    -
    - -

    ATC status report about flights.

    - -
    -
    -
    -
    - - -RAT:_AddFriendlyAirports(ports) - -
    -
    - -

    Add names of all friendly airports to possible departure or destination airports if they are not already in the list.

    - -

    Parameter

    -
      -
    • - -

      #table ports : -List of departure or destination airports/zones that will be added.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:_AirportExists(name) - -
    -
    - -

    Test if an airport exists on the current map.

    - -

    Parameter

    -
      -
    • - -

      #string name :

      - -
    • -
    -

    Return value

    - -

    #boolean: -True if airport exsits, false otherwise.

    - -
    -
    -
    -
    - - -RAT:_AnticipatedGroupName(index) - -
    -
    - -

    Anticipated group name from alias and spawn index.

    - -

    Parameter

    -
      -
    • - -

      #number index : -Spawnindex of group if given or self.SpawnIndex+1 by default.

      - -
    • -
    -

    Return value

    - -

    #string: -Name the group will get after it is spawned.

    - -
    -
    -
    -
    - - -RAT:_CheckConsistency() - -
    -
    - -

    Function checks consistency of user input and automatically adjusts parameters if necessary.

    - -
    -
    -
    -
    - - -RAT:_Course(a, b) - -
    -
    - -

    Determine the heading from point a to point b.

    - -

    Parameters

    - -

    Return value

    - -

    #number: -Heading/angle in degrees.

    - -
    -
    -
    -
    - - -RAT:_Debug(switch) - -
    -
    - -

    Turn debug messages on or off.

    - - -

    Default is off.

    - -

    Parameter

    -
      -
    • - -

      #boolean switch : -Turn debug on=true or off=false. No argument means on.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:_DeleteMarkers() - -
    -
    - -

    Delete all markers on F10 map.

    - -
    -
    -
    -
    - - -RAT:_Despawn(group) - -
    -
    - -

    Despawn unit.

    - - -

    Unit gets destoyed and group is set to nil. -Index of ratcraft array is taken from spawned group name.

    - -

    Parameter

    - -
    -
    -
    -
    - - -RAT:_EngineStartup(EventData) - -
    -
    - -

    Function is executed when a unit starts its engines.

    - -

    Parameter

    -
      -
    • - -

      EventData :

      - -
    • -
    -
    -
    -
    -
    - - -RAT:_Excluded(port) - -
    -
    - -

    Check if airport is excluded from possible departures and destinations.

    - -

    Parameter

    -
      -
    • - -

      #string port : -Name of airport, FARP or ship to check.

      - -
    • -
    -

    Return value

    - -

    #boolean: -true if airport is excluded and false otherwise.

    - -
    -
    -
    -
    - - -RAT:_FLmax(alpha, beta, d, phi, h0) - -
    -
    - -

    Calculate the max flight level for a given distance and fixed climb and descent rates.

    - - -

    In other words we have a distance between two airports and want to know how high we -can climb before we must descent again to arrive at the destination without any level/cruising part.

    - -

    Parameters

    -
      -
    • - -

      #number alpha : -Angle of climb [rad].

      - -
    • -
    • - -

      #number beta : -Angle of descent [rad].

      - -
    • -
    • - -

      #number d : -Distance between the two airports [m].

      - -
    • -
    • - -

      #number phi : -Angle between departure and destination [rad].

      - -
    • -
    • - -

      #number h0 : -Height [m] of departure airport. Note we implicitly assume that the height difference between departure and destination is negligible.

      - -
    • -
    -

    Return value

    - -

    #number: -Maximal flight level in meters.

    - -
    -
    -
    -
    - - -RAT:_GetAirportsInZone(zone) - -
    -
    - -

    Find airports within a zone.

    - -

    Parameter

    - -

    Return value

    - -

    #list: -Table with airport names that lie within the zone.

    - -
    -
    -
    -
    - - -RAT:_GetAirportsOfCoalition() - -
    -
    - -

    Get all "friendly" airports of the current map.

    - -
    -
    -
    -
    - - -RAT:_GetAirportsOfMap() - -
    -
    - -

    Get all airports of the current map.

    - -
    -
    -
    -
    - - -RAT:_GetLife(group) - -
    -
    - -

    Get (relative) life of first unit of a group.

    - -

    Parameter

    - -

    Return value

    - -

    #number: -Life of unit in percent.

    - -
    -
    -
    -
    - - -RAT:_Heading(course) - -
    -
    - -

    Determine the heading for an aircraft to be entered in the route template.

    - -

    Parameter

    -
      -
    • - -

      #number course : -The course between two points in degrees.

      - -
    • -
    -

    Return value

    - -

    #number: -heading Heading in rad.

    - -
    -
    -
    -
    - - -RAT:_InitAircraft(DCSgroup) - -
    -
    - -

    Initialize basic parameters of the aircraft based on its (template) group in the mission editor.

    - -

    Parameter

    - -
    -
    -
    -
    - - -RAT:_IsFriendly(port) - -
    -
    - -

    Check if airport is friendly, i.e.

    - - -

    belongs to the right coalition.

    - -

    Parameter

    -
      -
    • - -

      #string port : -Name of airport, FARP or ship to check.

      - -
    • -
    -

    Return value

    - -

    #boolean: -true if airport is friendly and false otherwise.

    - -
    -
    -
    -
    - - -RAT:_MinDistance(alpha, beta, ha, hb) - -
    -
    - -

    Calculate minimum distance between departure and destination for given minimum flight level and climb/decent rates.

    - -

    Parameters

    -
      -
    • - -

      #number alpha : -Angle of climb [rad].

      - -
    • -
    • - -

      #number beta : -Angle of descent [rad].

      - -
    • -
    • - -

      #number ha : -Height difference between departure and cruise altiude.

      - -
    • -
    • - -

      #number hb : -Height difference between cruise altitude and destination.

      - -
    • -
    -

    Return values

    -
      -
    1. - -

      #number: -d1 Minimum distance for climb phase to reach cruise altitude.

      - -
    2. -
    3. - -

      #number: -d2 Minimum distance for descent phase to reach destination height.

      - -
    4. -
    5. - -

      #number: -dtot Minimum total distance to climb and descent.

      - -
    6. -
    -
    -
    -
    -
    - - -RAT:_ModifySpawnTemplate(waypoints, livery) - -
    -
    - -

    Modifies the template of the group to be spawned.

    - - -

    In particular, the waypoints of the group's flight plan are copied into the spawn template. -This allows to spawn at airports and also land at other airports, i.e. circumventing the DCS "landing bug".

    - -

    Parameters

    -
      -
    • - -

      #table waypoints : -The waypoints of the AI flight plan.

      - -
    • -
    • - -

      #string livery : -(Optional) Livery of the aircraft. All members of a flight will get the same livery.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:_NameInList(liste, name) - -
    -
    - -

    Check if a name/string is in a list or not.

    - -

    Parameters

    -
      -
    • - -

      #table liste : -List of names to be checked.

      - -
    • -
    • - -

      #string name : -Name to be checked for.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:_OnBirth(EventData) - -
    -
    - -

    Function is executed when a unit is spawned.

    - -

    Parameter

    -
      -
    • - -

      EventData :

      - -
    • -
    -
    -
    -
    -
    - - -RAT:_OnCrash(EventData) - -
    -
    - -

    Function is executed when a unit crashes.

    - -

    Parameter

    -
      -
    • - -

      EventData :

      - -
    • -
    -
    -
    -
    -
    - - -RAT:_OnDead(EventData) - -
    -
    - -

    Function is executed when a unit is dead.

    - -

    Parameter

    -
      -
    • - -

      EventData :

      - -
    • -
    -
    -
    -
    -
    - - -RAT:_OnEngineShutdown(EventData) - -
    -
    - -

    Function is executed when a unit shuts down its engines.

    - -

    Parameter

    -
      -
    • - -

      EventData :

      - -
    • -
    -
    -
    -
    -
    - - -RAT:_OnLand(EventData) - -
    -
    - -

    Function is executed when a unit lands.

    - -

    Parameter

    -
      -
    • - -

      EventData :

      - -
    • -
    -
    -
    -
    -
    - - -RAT:_OnTakeoff(EventData) - -
    -
    - -

    Function is executed when a unit takes off.

    - -

    Parameter

    -
      -
    • - -

      EventData :

      - -
    • -
    -
    -
    -
    -
    - - -RAT:_PickDeparture(takeoff) - -
    -
    - -

    Set the departure airport of the AI.

    - - -

    If no airport name is given explicitly an airport from the coalition is chosen randomly. -If takeoff style is set to "air", we use zones around the airports or the zones specified by user input.

    - -

    Parameter

    -
      -
    • - -

      #number takeoff : -Takeoff type.

      - -
    • -
    -

    Return values

    -
      -
    1. - -

      Wrapper.Airbase#AIRBASE: -Departure airport if spawning at airport.

      - -
    2. -
    3. - -

      Core.Zone#ZONE: -Departure zone if spawning in air.

      - -
    4. -
    -
    -
    -
    -
    - - -RAT:_PickDestination(departure, q, minrange, maxrange, random, landing) - -
    -
    - -

    Pick destination airport or zone depending on departure position.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Airbase#AIRBASE departure : -Departure airport or zone.

      - -
    • -
    • - -

      Core.Point#COORDINATE q : -Coordinate of the departure point.

      - -
    • -
    • - -

      #number minrange : -Minimum range to q in meters.

      - -
    • -
    • - -

      #number maxrange : -Maximum range to q in meters.

      - -
    • -
    • - -

      #boolean random : -Destination is randomly selected from friendly airport (true) or from destinations specified by user input (false).

      - -
    • -
    • - -

      #number landing : -Number indicating whether we land at a destination airport or fly to a zone object.

      - -
    • -
    -

    Return value

    - -

    Wrapper.Airbase#AIRBASE: -destination Destination airport or zone.

    - -
    -
    -
    -
    - - -RAT:_PlaceMarkers(waypoints, index) - -
    -
    - -

    Place markers of the waypoints.

    - - -

    Note we assume a very specific number and type of waypoints here.

    - -

    Parameters

    -
      -
    • - -

      #table waypoints : -Table with waypoints.

      - -
    • -
    • - -

      #number index : -Spawn index of group.

      - -
    • -
    -
    -
    -
    -
    - - -RAT._Random_Gaussian(x0, sigma, xmin, xmax, self) - -
    -
    - -

    Generate Gaussian pseudo-random numbers.

    - -

    Parameters

    -
      -
    • - -

      #number x0 : -Expectation value of distribution.

      - -
    • -
    • - -

      #number sigma : -(Optional) Standard deviation. Default 10.

      - -
    • -
    • - -

      #number xmin : -(Optional) Lower cut-off value.

      - -
    • -
    • - -

      #number xmax : -(Optional) Upper cut-off value.

      - -
    • -
    • - -

      self :

      - -
    • -
    -

    Return value

    - -

    #number: -Gaussian random number.

    - -
    -
    -
    -
    - - -RAT:_Randomize(value, fac, lower, upper) - -
    -
    - -

    Randomize a value by a certain amount.

    - -

    Parameters

    -
      -
    • - -

      #number value : -The value which should be randomized

      - -
    • -
    • - -

      #number fac : -Randomization factor.

      - -
    • -
    • - -

      #number lower : -(Optional) Lower limit of the returned value.

      - -
    • -
    • - -

      #number upper : -(Optional) Upper limit of the returned value.

      - -
    • -
    -

    Return value

    - -

    #number: -Randomized value.

    - -

    Usages:

    -
      -
    • _Randomize(100, 0.1) returns a value between 90 and 110, i.e. a plus/minus ten percent variation.
    • -
    • _Randomize(100, 0.5, nil, 120) returns a value between 50 and 120, i.e. a plus/minus fivty percent variation with upper bound 120.
    • -
    - -
    -
    -
    -
    - - -RAT:_Respawn(group) - -
    -
    - -

    Respawn a group.

    - -

    Parameter

    - -
    -
    -
    -
    - - -RAT:_Routeinfo(waypoints, comment) - -
    -
    - -

    Provide information about the assigned flightplan.

    - -

    Parameters

    -
      -
    • - -

      #table waypoints : -Waypoints of the flight plan.

      - -
    • -
    • - -

      #string comment : -Some comment to identify the provided information.

      - -
    • -
    -

    Return value

    - -

    #number: -total Total route length in meters.

    - -
    -
    -
    -
    - - -RAT:_SetCoalitionTable() - -
    -
    - -

    Create a table with the valid coalitions for departure and destination airports.

    - -
    -
    -
    -
    - - -RAT:_SetMarker(text, wp, index) - -
    -
    - -

    Set a marker visible for all on the F10 map.

    - -

    Parameters

    -
      -
    • - -

      #string text : -Info text displayed at maker.

      - -
    • -
    • - -

      #table wp : -Position of marker coming in as waypoint, i.e. has x, y and alt components.

      - -
    • -
    • - -

      #number index : -Spawn index of group.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:_SetROE(group, roe) - -
    -
    - -

    Set ROE for a group.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP group : -Group for which the ROE is set.

      - -
    • -
    • - -

      #string roe : -ROE of group.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:_SetROT(group, rot) - -
    -
    - -

    Set ROT for a group.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP group : -Group for which the ROT is set.

      - -
    • -
    • - -

      #string rot : -ROT of group.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:_SetRoute(Takeoff, Landing, _departure, _destination, takeoff, landing, _waypoint) - -
    -
    - -

    Set the route of the AI plane.

    - - -

    Due to DCS landing bug, this has to be done before the unit is spawned.

    - -

    Parameters

    - -

    Return values

    -
      -
    1. - -

      Wrapper.Airport#AIRBASE: -Departure airbase.

      - -
    2. -
    3. - -

      Wrapper.Airport#AIRBASE: -Destination airbase.

      - -
    4. -
    5. - -

      #table: -Table of flight plan waypoints.

      - -
    6. -
    7. - -

      #nil: -If no valid departure or destination airport could be found.

      - -
    8. -
    -
    -
    -
    -
    - - -RAT:_SetStatus(group, status) - -
    -
    - -

    Set status of group.

    - -

    Parameters

    -
      -
    • - -

      group :

      - -
    • -
    • - -

      status :

      - -
    • -
    -
    -
    -
    -
    - - -RAT:_SpawnWithRoute(_departure, _destination, _takeoff, _landing, _livery, _waypoint) - -
    -
    - -

    Spawn the AI aircraft with a route.

    - - -

    Sets the departure and destination airports and waypoints. -Modifies the spawn template. -Sets ROE/ROT. -Initializes the ratcraft array and group menu.

    - -

    Parameters

    -
      -
    • - -

      #string _departure : -(Optional) Name of departure airbase.

      - -
    • -
    • - -

      #string _destination : -(Optional) Name of destination airbase.

      - -
    • -
    • - -

      #number _takeoff : -Takeoff type id.

      - -
    • -
    • - -

      _landing :

      - -
    • -
    • - -

      _livery :

      - -
    • -
    • - -

      _waypoint :

      - -
    • -
    -
    -
    -
    -
    - - -RAT:_TaskFunction(FunctionString, ...) - -
    -
    - -

    Task function.

    - -

    Parameters

    -
      -
    • - -

      #string FunctionString : -Name of the function to be called.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -
    -
    -
    -
    - - -RAT:_TaskHolding(P1, Altitude, Speed, Duration) - -
    -
    - -

    Orbit at a specified position at a specified alititude with a specified speed.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Vec2 P1 : -The point to hold the position.

      - -
    • -
    • - -

      #number Altitude : -The altitude ASL at which to hold the position.

      - -
    • -
    • - -

      #number Speed : -The speed flying when holding the position in m/s.

      - -
    • -
    • - -

      #number Duration : -Duration of holding pattern in seconds.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTasking.Task#Task: -DCSTask

    - -
    -
    -
    -
    - - -RAT:_Waypoint(Running, Type, Coord, Speed, Altitude, Airport, index) - -
    -
    - -

    Create a waypoint that can be used with the Route command.

    - -

    Parameters

    -
      -
    • - -

      #number Running : -index of waypoints. Starts with 1 which is normally departure/spawn waypoint.

      - -
    • -
    • - -

      #number Type : -Type of waypoint.

      - -
    • -
    • - -

      Core.Point#COORDINATE Coord : -3D coordinate of the waypoint.

      - -
    • -
    • - -

      #number Speed : -Speed in m/s.

      - -
    • -
    • - -

      #number Altitude : -Altitude in m.

      - -
    • -
    • - -

      Wrapper.Airbase#AIRBASE Airport : -Airport of object to spawn.

      - -
    • -
    • - -

      index :

      - -
    • -
    -

    Return value

    - -

    #table: -Waypoints for DCS task route or spawn template.

    - -
    -
    -
    -
    - - -RAT._WaypointFunction(group, rat, wp) - -
    -
    - -

    Function which is called after passing every waypoint.

    - - -

    Info on waypoint is given and special functions are executed.

    - -

    Parameters

    -
      -
    • - -

      Core.Group#GROUP group : -Group of aircraft.

      - -
    • -
    • - -

      #RAT rat : -RAT object.

      - -
    • -
    • - -

      #number wp : -Waypoint index. Running number of the waypoints. Determines the actions to be executed.

      - -
    • -
    -
    -
    -
    -
    - - -RAT:_ZoneExists(name) - -
    -
    - -

    Test if a trigger zone defined in the mission editor exists.

    - -

    Parameter

    -
      -
    • - -

      #string name :

      - -
    • -
    -

    Return value

    - -

    #boolean: -True if zone exsits, false otherwise.

    - -
    -
    -
    -
    - - - -RAT.actype - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -RAT.addfriendlydepartures - -
    -
    - -

    Add all friendly airports to departures.

    - -
    -
    -
    -
    - - #boolean - -RAT.addfriendlydestinations - -
    -
    - -

    Add all friendly airports to destinations.

    - -
    -
    -
    -
    - - #table - -RAT.aircraft - -
    -
    - -

    Table which holds the basic aircraft properties (speed, range, ...).

    - -
    -
    -
    -
    - - #table - -RAT.airports - -
    -
    - -

    All airports of friedly coalitions.

    - -
    -
    -
    -
    - - #table - -RAT.airports_map - -
    -
    - -

    All airports available on current map (Caucasus, Nevada, Normandy, ...).

    - -
    -
    -
    -
    - - #string - -RAT.alias - -
    -
    - -

    Alias for spawned group.

    - -
    -
    -
    -
    - - #number - -RAT.alive - -
    -
    - -

    Number of groups which are alive.

    - -
    -
    -
    -
    - - - -RAT.cat - -
    -
    - - - -
    -
    -
    -
    - - #string - -RAT.category - -
    -
    - -

    Category of aircarft: "plane" or "heli".

    - -
    -
    -
    -
    - - - -RAT.coal - -
    -
    - -

    RAT friendly coalitions.

    - -
    -
    -
    -
    - - #number - -RAT.coalition - -
    -
    - -

    Coalition of spawn group template.

    - -
    -
    -
    -
    - - #boolean - -RAT.commute - -
    -
    - -

    Aircraft commute between departure and destination, i.e. when respawned the departure airport becomes the new destiation.

    - -
    -
    -
    -
    - - #boolean - -RAT.continuejourney - -
    -
    - -

    Aircraft will continue their journey, i.e. get respawned at their destination with a new random destination.

    - -
    -
    -
    -
    - - #number - -RAT.country - -
    -
    - -

    Country of spawn group template.

    - -
    -
    -
    -
    - - #table - -RAT.ctable - -
    -
    - -

    Table with the valid coalitons from choice self.friendly.

    - -
    -
    -
    -
    - - #boolean - -RAT.debug - -
    -
    - -

    Turn debug messages on or off.

    - -
    -
    -
    -
    - - Core.Zone#ZONE - -RAT.departure_Azone - -
    -
    - -

    Zone containing the departure airports.

    - -
    -
    -
    -
    - - #table - -RAT.departure_ports - -
    -
    - -

    Array containing the names of the destination airports or zones.

    - -
    -
    -
    -
    - - Core.Zone#ZONE - -RAT.destination_Azone - -
    -
    - -

    Zone containing the destination airports.

    - -
    -
    -
    -
    - - #table - -RAT.destination_ports - -
    -
    - -

    Array containing the names of the destination airports or zones.

    - -
    -
    -
    -
    - - #boolean - -RAT.destinationzone - -
    -
    - -

    Destination is a zone and not an airport.

    - -
    -
    -
    -
    - - #table - -RAT.excluded_ports - -
    -
    - -

    Array containing the names of explicitly excluded airports.

    - -
    -
    -
    -
    - - #boolean - -RAT.f10menu - -
    -
    - -

    Add an F10 menu for RAT.

    - -
    -
    -
    -
    - - #number - -RAT.frequency - -
    -
    - -

    Radio frequency used by the RAT groups.

    - -
    -
    -
    -
    - - #string - -RAT.friendly - -
    -
    - -

    Possible departure/destination airport: all=blue+red+neutral, same=spawn+neutral, spawnonly=spawn, blue=blue+neutral, blueonly=blue, red=red+neutral, redonly=red.

    - -
    -
    -
    -
    - - #string - -RAT.id - -
    -
    - -

    Some ID to identify who we are in output of the DCS.log file.

    - -
    -
    -
    -
    - - #number - -RAT.landing - -
    -
    - -

    Landing type. Determines if we actually land at an airport or treat it as zone.

    - -
    -
    -
    -
    - - #string - -RAT.livery - -
    -
    - -

    Livery of the aircraft set by user.

    - -
    -
    -
    -
    - - #number - -RAT.markerid - -
    -
    - -

    Running number of placed markers on the F10 map.

    - -
    -
    -
    -
    - - #table - -RAT.markerids - -
    -
    - -

    Array with marker IDs.

    - -
    -
    -
    -
    - - #number - -RAT.maxdist - -
    -
    - -

    Max distance from departure to destination in meters. Default 5000 km.

    - -
    -
    -
    -
    - - #number - -RAT.mindist - -
    -
    - -

    Min distance from departure to destination in meters. Default 5 km.

    - -
    -
    -
    -
    - - #string - -RAT.modulation - -
    -
    - -

    Ratio modulation. Either "FM" or "AM".

    - -
    -
    -
    -
    - - #number - -RAT.ngroups - -
    -
    - -

    Number of groups to be spawned in total.

    - -
    -
    -
    -
    - - #boolean - -RAT.norespawn - -
    -
    - -

    Aircraft will not be respawned after they have finished their route.

    - -
    -
    -
    -
    - - - -RAT.onboard_num - -
    -
    - - - - -

    Onboard number.

    - -
    -
    -
    -
    - - #string - -RAT.parking_id - -
    -
    - -

    String with a special parking ID for the aircraft.

    - -
    -
    -
    -
    - - #boolean - -RAT.placemarkers - -
    -
    - -

    Place markers of waypoints on F10 map.

    - -
    -
    -
    -
    - - #boolean - -RAT.radio - -
    -
    - -

    If true/false disables radio messages from the RAT groups.

    - -
    -
    -
    -
    - - #boolean - -RAT.random_departure - -
    -
    - -

    By default a random friendly airport is chosen as departure.

    - -
    -
    -
    -
    - - #boolean - -RAT.random_destination - -
    -
    - -

    By default a random friendly airport is chosen as destination.

    - -
    -
    -
    -
    - - #table - -RAT.ratcraft - -
    -
    - -

    Array with the spawned RAT aircraft.

    - -
    -
    -
    -
    - - #boolean - -RAT.reportstatus - -
    -
    - -

    Aircraft report status.

    - -
    -
    -
    -
    - - #boolean - -RAT.respawn_after_takeoff - -
    -
    - -

    Aircraft will be respawned directly after take-off.

    - -
    -
    -
    -
    - - #boolean - -RAT.respawn_at_landing - -
    -
    - -

    Respawn aircraft the moment they land rather than at engine shutdown.

    - -
    -
    -
    -
    - - #number - -RAT.respawn_delay - -
    -
    - -

    Delay in seconds until repawn happens after landing.

    - -
    -
    -
    -
    - - #table - -RAT.return_zones - -
    -
    - -

    Array containing the names of the return zones.

    - -
    -
    -
    -
    - - #boolean - -RAT.returnzone - -
    -
    - -

    Zone where aircraft will fly to before returning to their departure airport.

    - -
    -
    -
    -
    - - #string - -RAT.roe - -
    -
    - -

    ROE of spawned groups, default is weapon hold (this is a peaceful class for civil aircraft or ferry missions). Possible: "hold", "return", "free".

    - -
    -
    -
    -
    - - #string - -RAT.rot - -
    -
    - -

    ROT of spawned groups, default is no reaction. Possible: "noreaction", "passive", "evade".

    - -
    -
    -
    -
    - - #string - -RAT.skill - -
    -
    - -

    Skill of AI.

    - -
    -
    -
    -
    - - #number - -RAT.spawndelay - -
    -
    - -

    Delay time in seconds before first spawning happens.

    - -
    -
    -
    -
    - - #boolean - -RAT.spawninitialized - -
    -
    - -

    If RAT:Spawn() was already called this RAT object is set to true to prevent users to call it again.

    - -
    -
    -
    -
    - - #number - -RAT.spawninterval - -
    -
    - -

    Interval between spawning units/groups. Note that we add a randomization of 50%.

    - -
    -
    -
    -
    - - - -RAT.status - -
    -
    - -

    RAT aircraft status.

    - -
    -
    -
    -
    - - #number - -RAT.statusinterval - -
    -
    - -

    Intervall between status checks (and reports if enabled).

    - -
    -
    -
    -
    - - #number - -RAT.takeoff - -
    -
    - -

    Takeoff type. 0=coldorhot.

    - -
    -
    -
    -
    - - Core.Group#GROUP - -RAT.templategroup - -
    -
    - -

    Group serving as template for the RAT aircraft.

    - -
    -
    -
    -
    - - - -RAT.type - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -RAT.uncontrolled - -
    -
    - -

    If true aircraft are spawned in uncontrolled state and will only sit on their parking spots.

    - -
    -
    -
    -
    - - - -RAT.unit - -
    -
    - -

    RAT unit conversions.

    - -
    -
    -
    -
    - - #string - -RAT.version - -
    -
    - -

    RAT version.

    - -
    -
    -
    -
    - - #table - -RAT.waypointdescriptions - -
    -
    - -

    Table with strings for waypoint descriptions of markers.

    - -
    -
    -
    -
    - - #table - -RAT.waypointstatus - -
    -
    - -

    Table with strings of waypoint status.

    - -
    -
    -
    -
    - - - -RAT.wp - -
    -
    - -

    RAT waypoint type.

    - -
    -
    - -

    Type list

    - -
    - -
    - - diff --git a/docs/Documentation/Route.html b/docs/Documentation/Route.html deleted file mode 100644 index 5588ac2f1..000000000 --- a/docs/Documentation/Route.html +++ /dev/null @@ -1,1543 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Route

    - -

    (SP) (MP) (FSM) Route AI or players through waypoints or to zones.

    - - - -
    - -

    #ACT_ROUTE FSM class, extends Fsm#FSM_PROCESS

    - -

    ACT_ROUTE state machine:

    - -

    This class is a state machine: it manages a process that is triggered by events causing state transitions to occur. -All derived classes from this class will start with the class name, followed by a _. See the relevant derived class descriptions below. -Each derived class follows exactly the same process, using the same events and following the same state transitions, -but will have different implementation behaviour upon each event or state transition.

    - -

    ACT_ROUTE Events:

    - -

    These are the events defined in this class:

    - -
      -
    • Start: The process is started. The process will go into the Report state.
    • -
    • Report: The process is reporting to the player the route to be followed.
    • -
    • Route: The process is routing the controllable.
    • -
    • Pause: The process is pausing the route of the controllable.
    • -
    • Arrive: The controllable has arrived at a route point.
    • -
    • More: There are more route points that need to be followed. The process will go back into the Report state.
    • -
    • NoMore: There are no more route points that need to be followed. The process will go into the Success state.
    • -
    - -

    ACT_ROUTE Event methods:

    - -

    Event methods are available (dynamically allocated by the state machine), that accomodate for state transitions occurring in the process. -There are two types of event methods, which you can use to influence the normal mechanisms in the state machine:

    - -
      -
    • Immediate: The event method has exactly the name of the event.
    • -
    • Delayed: The event method starts with a __ + the name of the event. The first parameter of the event method is a number value, expressing the delay in seconds when the event will be executed.
    • -
    - -

    ACT_ROUTE States:

    - -
      -
    • None: The controllable did not receive route commands.
    • -
    • Arrived (*): The controllable has arrived at a route point.
    • -
    • Aborted (*): The controllable has aborted the route path.
    • -
    • Routing: The controllable is understay to the route point.
    • -
    • Pausing: The process is pausing the routing. AI air will go into hover, AI ground will stop moving. Players can fly around.
    • -
    • Success (*): All route points were reached.
    • -
    • Failed (*): The process has failed.
    • -
    - -

    (*) End states of the process.

    - -

    ACT_ROUTE state transition methods:

    - -

    State transition functions can be set by the mission designer customizing or improving the behaviour of the state. -There are 2 moments when state transition methods will be called by the state machine:

    - -
      -
    • Before the state transition. - The state transition method needs to start with the name OnBefore + the name of the state. - If the state transition method returns false, then the processing of the state transition will not be done! - If you want to change the behaviour of the AIControllable at this event, return false, - but then you'll need to specify your own logic using the AIControllable!

    • -
    • After the state transition. - The state transition method needs to start with the name OnAfter + the name of the state. - These state transition methods need to provide a return value, which is specified at the function description.

    • -
    - -
    - -

    1) #ACTROUTEZONE class, extends Fsm.Route#ACT_ROUTE

    - -

    The ACTROUTEZONE class implements the core functions to route an AIR Controllable player Unit to a Zone. -The player receives on perioding times messages with the coordinates of the route to follow. -Upon arrival at the zone, a confirmation of arrival is sent, and the process will be ended.

    - -

    1.1) ACTROUTEZONE constructor:

    - - - -
    - - -

    Global(s)

    - - - - - - - - - - - - - -
    ACT_ROUTE - -
    ACT_ROUTE_POINT - -
    ACT_ROUTE_ZONE - -
    -

    Type ACT_ROUTE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ACT_ROUTE.ClassName - -
    ACT_ROUTE.Coordinate - -
    ACT_ROUTE.DisplayCount - -
    ACT_ROUTE:GetRouteText(Controllable) -

    Get the routing text to be displayed.

    -
    ACT_ROUTE:MenuCancel() - -
    ACT_ROUTE:New() -

    Creates a new routing state machine.

    -
    ACT_ROUTE.ProcessUnit - -
    ACT_ROUTE.RouteMode - -
    ACT_ROUTE:SetMenuCancel(MenuGroup, MenuText, ParentMenu, MenuTime) -

    Set a Cancel Menu item.

    -
    ACT_ROUTE:SetRouteMode(RouteMode) -

    Set the route mode.

    -
    ACT_ROUTE.TASK - -
    ACT_ROUTE.Zone - -
    ACT_ROUTE:onafterStart(ProcessUnit, Event, From, To) -

    StateMachine callback function

    -
    ACT_ROUTE:onbeforeRoute(ProcessUnit, Event, From, To) -

    StateMachine callback function

    -
    ACT_ROUTE:onfuncHasArrived(ProcessUnit) -

    Check if the controllable has arrived.

    -
    - -

    Type ACT_ROUTE_POINT

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ACT_ROUTE_POINT.ClassName - -
    ACT_ROUTE_POINT.Coordinate - -
    ACT_ROUTE_POINT.DisplayCount - -
    ACT_ROUTE_POINT.DisplayInterval - -
    ACT_ROUTE_POINT.DisplayMessage - -
    ACT_ROUTE_POINT.DisplayTime - -
    ACT_ROUTE_POINT:GetCoordinate() -

    Get Coordinate

    -
    ACT_ROUTE_POINT:GetRange() -

    Get Range around Coordinate

    -
    ACT_ROUTE_POINT:Init(FsmRoute) -

    Creates a new routing state machine.

    -
    ACT_ROUTE_POINT:New(The, Range, Zone, Coordinate) -

    Creates a new routing state machine.

    -
    ACT_ROUTE_POINT.Range - -
    ACT_ROUTE_POINT:SetCoordinate(Coordinate) -

    Set Coordinate

    -
    ACT_ROUTE_POINT:SetRange(Range) -

    Set Range around Coordinate

    -
    ACT_ROUTE_POINT.TASK - -
    ACT_ROUTE_POINT:onafterReport(ProcessUnit, Event, From, To) -

    StateMachine callback function

    -
    ACT_ROUTE_POINT:onfuncHasArrived(ProcessUnit) -

    Method override to check if the controllable has arrived.

    -
    - -

    Type ACT_ROUTE_ZONE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ACT_ROUTE_ZONE.Altitude - -
    ACT_ROUTE_ZONE.ClassName - -
    ACT_ROUTE_ZONE.DisplayCount - -
    ACT_ROUTE_ZONE.DisplayInterval - -
    ACT_ROUTE_ZONE.DisplayMessage - -
    ACT_ROUTE_ZONE.DisplayTime - -
    ACT_ROUTE_ZONE:GetZone() -

    Get Zone

    -
    ACT_ROUTE_ZONE.Heading - -
    ACT_ROUTE_ZONE:Init(FsmRoute) - -
    ACT_ROUTE_ZONE:New(Zone) -

    Creates a new routing state machine.

    -
    ACT_ROUTE_ZONE.ProcessUnit - -
    ACT_ROUTE_ZONE:SetZone(Zone, Altitude, Heading) -

    Set Zone

    -
    ACT_ROUTE_ZONE.TASK - -
    ACT_ROUTE_ZONE.Zone - -
    ACT_ROUTE_ZONE:onafterReport(ProcessUnit, Event, From, To) -

    StateMachine callback function

    -
    ACT_ROUTE_ZONE:onfuncHasArrived(ProcessUnit) -

    Method override to check if the controllable has arrived.

    -
    - -

    Global(s)

    -
    -
    - - #ACT_ROUTE - -ACT_ROUTE - -
    -
    - - - -
    -
    -
    -
    - - #ACT_ROUTE_POINT - -ACT_ROUTE_POINT - -
    -
    - - - -
    -
    -
    -
    - - #ACT_ROUTE_ZONE - -ACT_ROUTE_ZONE - -
    -
    - - - -
    -
    -

    Type Route

    - -

    Type ACT_ROUTE

    - -

    ACT_ROUTE class

    - -

    Field(s)

    -
    -
    - - #string - -ACT_ROUTE.ClassName - -
    -
    - - - -
    -
    -
    -
    - - Core.Point#COORDINATE - -ACT_ROUTE.Coordinate - -
    -
    - - - -
    -
    -
    -
    - - #number - -ACT_ROUTE.DisplayCount - -
    -
    - - - -
    -
    -
    -
    - - -ACT_ROUTE:GetRouteText(Controllable) - -
    -
    - -

    Get the routing text to be displayed.

    - - -

    The route mode determines the text displayed.

    - -

    Parameter

    - -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -ACT_ROUTE:MenuCancel() - -
    -
    - - - -
    -
    -
    -
    - - -ACT_ROUTE:New() - -
    -
    - -

    Creates a new routing state machine.

    - - -

    The process will route a CLIENT to a ZONE until the CLIENT is within that ZONE.

    - -

    Return value

    - -

    #ACT_ROUTE: -self

    - -
    -
    -
    -
    - - Wrapper.Unit#UNIT - -ACT_ROUTE.ProcessUnit - -
    -
    - - - -
    -
    -
    -
    - - - -ACT_ROUTE.RouteMode - -
    -
    - - - -
    -
    -
    -
    - - -ACT_ROUTE:SetMenuCancel(MenuGroup, MenuText, ParentMenu, MenuTime) - -
    -
    - -

    Set a Cancel Menu item.

    - -

    Parameters

    -
      -
    • - -

      MenuGroup :

      - -
    • -
    • - -

      MenuText :

      - -
    • -
    • - -

      ParentMenu :

      - -
    • -
    • - -

      MenuTime :

      - -
    • -
    -

    Return value

    - -

    #ACT_ROUTE:

    - - -
    -
    -
    -
    - - -ACT_ROUTE:SetRouteMode(RouteMode) - -
    -
    - -

    Set the route mode.

    - - -

    There are 2 route modes supported:

    - -
      -
    • SetRouteMode( "B" ): Route mode is Bearing and Range.
    • -
    • SetRouteMode( "C" ): Route mode is LL or MGRS according coordinate system setup.
    • -
    - - -

    Parameter

    -
      -
    • - -

      RouteMode :

      - -
    • -
    -

    Return value

    - -

    #ACT_ROUTE:

    - - -
    -
    -
    -
    - - Tasking.Task#TASK - -ACT_ROUTE.TASK - -
    -
    - - - -
    -
    -
    -
    - - Core.Zone#ZONE_BASE - -ACT_ROUTE.Zone - -
    -
    - - - -
    -
    -
    -
    - - -ACT_ROUTE:onafterStart(ProcessUnit, Event, From, To) - -
    -
    - -

    StateMachine callback function

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT ProcessUnit :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -ACT_ROUTE:onbeforeRoute(ProcessUnit, Event, From, To) - -
    -
    - -

    StateMachine callback function

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT ProcessUnit :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -ACT_ROUTE:onfuncHasArrived(ProcessUnit) - -
    -
    - -

    Check if the controllable has arrived.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    - -

    Type ACT_ROUTE_POINT

    - -

    ACTROUTEPOINT class

    - -

    Field(s)

    -
    -
    - - #string - -ACT_ROUTE_POINT.ClassName - -
    -
    - - - -
    -
    -
    -
    - - - -ACT_ROUTE_POINT.Coordinate - -
    -
    - - - -
    -
    -
    -
    - - #number - -ACT_ROUTE_POINT.DisplayCount - -
    -
    - - - -
    -
    -
    -
    - - #number - -ACT_ROUTE_POINT.DisplayInterval - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -ACT_ROUTE_POINT.DisplayMessage - -
    -
    - - - -
    -
    -
    -
    - - #number - -ACT_ROUTE_POINT.DisplayTime - -
    -
    - - - - -

    10 seconds is the default

    - -
    -
    -
    -
    - - -ACT_ROUTE_POINT:GetCoordinate() - -
    -
    - -

    Get Coordinate

    - -

    Return value

    - -

    Core.Point#COORDINATE: -Coordinate The Coordinate to route to.

    - -
    -
    -
    -
    - - -ACT_ROUTE_POINT:GetRange() - -
    -
    - -

    Get Range around Coordinate

    - -

    Return value

    - -

    #number: -The Range to consider the arrival. Default is 10000 meters.

    - -
    -
    -
    -
    - - -ACT_ROUTE_POINT:Init(FsmRoute) - -
    -
    - -

    Creates a new routing state machine.

    - - -

    The task will route a controllable to a Coordinate until the controllable is within the Range.

    - -

    Parameter

    -
      -
    • - -

      FsmRoute :

      - -
    • -
    -
    -
    -
    -
    - - -ACT_ROUTE_POINT:New(The, Range, Zone, Coordinate) - -
    -
    - -

    Creates a new routing state machine.

    - - -

    The task will route a controllable to a Coordinate until the controllable is within the Range.

    - -

    Parameters

    - -
    -
    -
    -
    - - -ACT_ROUTE_POINT.Range - -
    -
    - - - -
    -
    -
    -
    - - -ACT_ROUTE_POINT:SetCoordinate(Coordinate) - -
    -
    - -

    Set Coordinate

    - -

    Parameter

    - -
    -
    -
    -
    - - -ACT_ROUTE_POINT:SetRange(Range) - -
    -
    - -

    Set Range around Coordinate

    - -

    Parameter

    -
      -
    • - -

      #number Range : -The Range to consider the arrival. Default is 10000 meters.

      - -
    • -
    -
    -
    -
    -
    - - Tasking.Task#TASK - -ACT_ROUTE_POINT.TASK - -
    -
    - - - -
    -
    -
    -
    - - -ACT_ROUTE_POINT:onafterReport(ProcessUnit, Event, From, To) - -
    -
    - -

    StateMachine callback function

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT ProcessUnit :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -ACT_ROUTE_POINT:onfuncHasArrived(ProcessUnit) - -
    -
    - -

    Method override to check if the controllable has arrived.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    - -

    Type ACT_ROUTE_ZONE

    - -

    ACTROUTEZONE class

    - -

    Field(s)

    -
    -
    - - - -ACT_ROUTE_ZONE.Altitude - -
    -
    - - - -
    -
    -
    -
    - - #string - -ACT_ROUTE_ZONE.ClassName - -
    -
    - - - -
    -
    -
    -
    - - #number - -ACT_ROUTE_ZONE.DisplayCount - -
    -
    - - - -
    -
    -
    -
    - - #number - -ACT_ROUTE_ZONE.DisplayInterval - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -ACT_ROUTE_ZONE.DisplayMessage - -
    -
    - - - -
    -
    -
    -
    - - #number - -ACT_ROUTE_ZONE.DisplayTime - -
    -
    - - - - -

    10 seconds is the default

    - -
    -
    -
    -
    - - -ACT_ROUTE_ZONE:GetZone() - -
    -
    - -

    Get Zone

    - -

    Return value

    - -

    Core.Zone#ZONE_BASE: -Zone The Zone object where to route to.

    - -
    -
    -
    -
    - - - -ACT_ROUTE_ZONE.Heading - -
    -
    - - - -
    -
    -
    -
    - - -ACT_ROUTE_ZONE:Init(FsmRoute) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      FsmRoute :

      - -
    • -
    -
    -
    -
    -
    - - -ACT_ROUTE_ZONE:New(Zone) - -
    -
    - -

    Creates a new routing state machine.

    - - -

    The task will route a controllable to a ZONE until the controllable is within that ZONE.

    - -

    Parameter

    - -
    -
    -
    -
    - - Wrapper.Unit#UNIT - -ACT_ROUTE_ZONE.ProcessUnit - -
    -
    - - - -
    -
    -
    -
    - - -ACT_ROUTE_ZONE:SetZone(Zone, Altitude, Heading) - -
    -
    - -

    Set Zone

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE_BASE Zone : -The Zone object where to route to.

      - -
    • -
    • - -

      #number Altitude :

      - -
    • -
    • - -

      #number Heading :

      - -
    • -
    -
    -
    -
    -
    - - Tasking.Task#TASK - -ACT_ROUTE_ZONE.TASK - -
    -
    - - - -
    -
    -
    -
    - - Core.Zone#ZONE_BASE - -ACT_ROUTE_ZONE.Zone - -
    -
    - - - -
    -
    -
    -
    - - -ACT_ROUTE_ZONE:onafterReport(ProcessUnit, Event, From, To) - -
    -
    - -

    StateMachine callback function

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT ProcessUnit :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -ACT_ROUTE_ZONE:onfuncHasArrived(ProcessUnit) - -
    -
    - -

    Method override to check if the controllable has arrived.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Scenery.html b/docs/Documentation/Scenery.html deleted file mode 100644 index cedf8ad0d..000000000 --- a/docs/Documentation/Scenery.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Scenery

    - -

    Wrapper -- SCENERY models scenery within the DCS simulator.

    - - - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - -
    SCENERY -

    SCENERY class, extends Positionable#POSITIONABLE

    - -

    Scenery objects are defined on the map.

    -
    -

    Type SCENERY

    - - - - - - - - - - - - - -
    SCENERY:GetDCSObject() - -
    SCENERY:GetThreatLevel() - -
    SCENERY:Register(SceneryName, SceneryObject) - -
    - -

    Global(s)

    -
    -
    - - #SCENERY - -SCENERY - -
    -
    - -

    SCENERY class, extends Positionable#POSITIONABLE

    - -

    Scenery objects are defined on the map.

    - - -

    The Scenery#SCENERY class is a wrapper class to handle the DCS Scenery objects:

    - -
      -
    • Wraps the DCS Scenery objects.
    • -
    • Support all DCS Scenery APIs.
    • -
    • Enhance with Scenery specific APIs not in the DCS API set.
    • -
    - - -
    -
    -

    Type Scenery

    - -

    Type SCENERY

    -

    Field(s)

    -
    -
    - - -SCENERY:GetDCSObject() - -
    -
    - - - -
    -
    -
    -
    - - -SCENERY:GetThreatLevel() - -
    -
    - - - -
    -
    -
    -
    - - -SCENERY:Register(SceneryName, SceneryObject) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      SceneryName :

      - -
    • -
    • - -

      SceneryObject :

      - -
    • -
    -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/ScheduleDispatcher.html b/docs/Documentation/ScheduleDispatcher.html deleted file mode 100644 index 5b55ba06a..000000000 --- a/docs/Documentation/ScheduleDispatcher.html +++ /dev/null @@ -1,505 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module ScheduleDispatcher

    - -

    Core -- SCHEDULEDISPATCHER dispatches the different schedules.

    - - - -
    - -

    Takes care of the creation and dispatching of scheduled functions for SCHEDULER objects.

    - -

    This class is tricky and needs some thorought explanation. -SCHEDULE classes are used to schedule functions for objects, or as persistent objects. -The SCHEDULEDISPATCHER class ensures that:

    - -
      -
    • Scheduled functions are planned according the SCHEDULER object parameters.
    • -
    • Scheduled functions are repeated when requested, according the SCHEDULER object parameters.
    • -
    • Scheduled functions are automatically removed when the schedule is finished, according the SCHEDULER object parameters.
    • -
    - -

    The SCHEDULEDISPATCHER class will manage SCHEDULER object in memory during garbage collection: - - When a SCHEDULER object is not attached to another object (that is, it's first :Schedule() parameter is nil), then the SCHEDULER

    -
    object is _persistent_ within memory.
    -
    -

    - When a SCHEDULER object is attached to another object, then the SCHEDULER object is not persistent within memory after a garbage collection! -The none persistency of SCHEDULERS attached to objects is required to allow SCHEDULER objects to be garbage collectged, when the parent object is also desroyed or nillified and garbage collected. -Even when there are pending timer scheduled functions to be executed for the SCHEDULER object,
    -these will not be executed anymore when the SCHEDULER object has been destroyed.

    - -

    The SCHEDULEDISPATCHER allows multiple scheduled functions to be planned and executed for one SCHEDULER object. -The SCHEDULER object therefore keeps a table of "CallID's", which are returned after each planning of a new scheduled function by the SCHEDULEDISPATCHER. -The SCHEDULER object plans new scheduled functions through the Scheduler#SCHEDULER.Schedule() method. -The Schedule() method returns the CallID that is the reference ID for each planned schedule.

    - -
    - -

    Contributions: -

    -

    Authors: FlightControl : Design & Programming

    - - -

    Global(s)

    - - - - - -
    SCHEDULEDISPATCHER - -
    -

    Type SCHEDULEDISPATCHER

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SCHEDULEDISPATCHER:AddSchedule(Scheduler, ScheduleFunction, ScheduleArguments, Start, Repeat, Randomize, Stop) -

    Add a Schedule to the ScheduleDispatcher.

    -
    SCHEDULEDISPATCHER.CallID - -
    SCHEDULEDISPATCHER.ClassName - -
    SCHEDULEDISPATCHER:Clear(Scheduler) - -
    SCHEDULEDISPATCHER:New() - -
    SCHEDULEDISPATCHER.ObjectSchedulers - -
    SCHEDULEDISPATCHER.PersistentSchedulers - -
    SCHEDULEDISPATCHER:RemoveSchedule(Scheduler, CallID) - -
    SCHEDULEDISPATCHER.Schedule - -
    SCHEDULEDISPATCHER:Start(Scheduler, CallID) - -
    SCHEDULEDISPATCHER:Stop(Scheduler, CallID) - -
    - -

    Global(s)

    -
    -
    - - #SCHEDULEDISPATCHER - -SCHEDULEDISPATCHER - -
    -
    - - - -
    -
    -

    Type ScheduleDispatcher

    - -

    Type SCHEDULEDISPATCHER

    - -

    The SCHEDULEDISPATCHER structure

    - -

    Field(s)

    -
    -
    - - -SCHEDULEDISPATCHER:AddSchedule(Scheduler, ScheduleFunction, ScheduleArguments, Start, Repeat, Randomize, Stop) - -
    -
    - -

    Add a Schedule to the ScheduleDispatcher.

    - - -

    The development of this method was really tidy. -It is constructed as such that a garbage collection is executed on the weak tables, when the Scheduler is nillified. -Nothing of this code should be modified without testing it thoroughly.

    - -

    Parameters

    -
      -
    • - -

      Core.Scheduler#SCHEDULER Scheduler :

      - -
    • -
    • - -

      ScheduleFunction :

      - -
    • -
    • - -

      ScheduleArguments :

      - -
    • -
    • - -

      Start :

      - -
    • -
    • - -

      Repeat :

      - -
    • -
    • - -

      Randomize :

      - -
    • -
    • - -

      Stop :

      - -
    • -
    -
    -
    -
    -
    - - -SCHEDULEDISPATCHER.CallID - -
    -
    - - - -
    -
    -
    -
    - - #string - -SCHEDULEDISPATCHER.ClassName - -
    -
    - - - -
    -
    -
    -
    - - -SCHEDULEDISPATCHER:Clear(Scheduler) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      Scheduler :

      - -
    • -
    -
    -
    -
    -
    - - -SCHEDULEDISPATCHER:New() - -
    -
    - - - -
    -
    -
    -
    - - -SCHEDULEDISPATCHER.ObjectSchedulers - -
    -
    - - - - -

    Initialize the ObjectSchedulers array, which is a weakly coupled table. - If the object used as the key is nil, then the garbage collector will remove the item from the Functions array.

    - -
    -
    -
    -
    - - -SCHEDULEDISPATCHER.PersistentSchedulers - -
    -
    - - - - -

    Initialize the ObjectSchedulers array, which is a weakly coupled table. - If the object used as the key is nil, then the garbage collector will remove the item from the Functions array.

    - -
    -
    -
    -
    - - -SCHEDULEDISPATCHER:RemoveSchedule(Scheduler, CallID) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Scheduler :

      - -
    • -
    • - -

      CallID :

      - -
    • -
    -
    -
    -
    -
    - - -SCHEDULEDISPATCHER.Schedule - -
    -
    - - - -
    -
    -
    -
    - - -SCHEDULEDISPATCHER:Start(Scheduler, CallID) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Scheduler :

      - -
    • -
    • - -

      CallID :

      - -
    • -
    -
    -
    -
    -
    - - -SCHEDULEDISPATCHER:Stop(Scheduler, CallID) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Scheduler :

      - -
    • -
    • - -

      CallID :

      - -
    • -
    -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Scheduler.html b/docs/Documentation/Scheduler.html deleted file mode 100644 index e7fac3bf8..000000000 --- a/docs/Documentation/Scheduler.html +++ /dev/null @@ -1,688 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Scheduler

    - -

    Core -- SCHEDULER prepares and handles the execution of functions over scheduled time (intervals).

    - - - -

    Banner Image

    - -
    - -

    SCHEDULER manages the scheduling of functions:

    - -
      -
    • optionally in an optional specified time interval,
    • -
    • optionally repeating with a specified time repeat interval,
    • -
    • optionally randomizing with a specified time interval randomization factor,
    • -
    • optionally stop the repeating after a specified time interval.
    • -
    - -
    - -

    Demo Missions

    - -

    SCHEDULER Demo Missions source code

    - -

    SCHEDULER Demo Missions, only for beta testers

    - -

    ALL Demo Missions pack of the last release

    - -
    - -

    YouTube Channel

    - -

    SCHEDULER YouTube Channel (none)

    - -
    - -

    Contributions:

    - -
      -
    • FlightControl : Concept & Testing
    • -
    - -

    Authors:

    - -
      -
    • FlightControl : Design & Programming
    • -
    - -
    - - -

    Global(s)

    - - - - - -
    SCHEDULER -

    SCHEDULER class, extends Base#BASE

    - -

    The SCHEDULER class creates schedule.

    -
    -

    Type SCHEDULER

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SCHEDULER:Clear() -

    Clears all pending schedules.

    -
    SCHEDULER.MasterObject - -
    SCHEDULER:New(SchedulerObject, SchedulerFunction, SchedulerArguments, Start, Repeat, RandomizeFactor, Stop) -

    SCHEDULER constructor.

    -
    SCHEDULER:Remove(ScheduleID) -

    Removes a specific schedule if a valid ScheduleID is provided.

    -
    SCHEDULER:Schedule(SchedulerObject, SchedulerFunction, SchedulerArguments, Start, Repeat, RandomizeFactor, Stop) -

    Schedule a new time event.

    -
    SCHEDULER.ScheduleID -

    the ID of the scheduler.

    -
    SCHEDULER.SchedulerObject - -
    SCHEDULER:Start(ScheduleID) -

    (Re-)Starts the schedules or a specific schedule if a valid ScheduleID is provided.

    -
    SCHEDULER:Stop(ScheduleID) -

    Stops the schedules or a specific schedule if a valid ScheduleID is provided.

    -
    - -

    Global(s)

    -
    -
    - - #SCHEDULER - -SCHEDULER - -
    -
    - -

    SCHEDULER class, extends Base#BASE

    - -

    The SCHEDULER class creates schedule.

    - - - -

    A SCHEDULER can manage multiple (repeating) schedules. Each planned or executing schedule has a unique ScheduleID. -The ScheduleID is returned when the method SCHEDULER.Schedule() is called. -It is recommended to store the ScheduleID in a variable, as it is used in the methods SCHEDULER.Start() and SCHEDULER.Stop(), -which can start and stop specific repeating schedules respectively within a SCHEDULER object.

    - -

    SCHEDULER constructor

    - -

    The SCHEDULER class is quite easy to use, but note that the New constructor has variable parameters:

    - -

    The SCHEDULER.New() method returns 2 variables:

    - -
      -
    1. The SCHEDULER object reference.
    2. -
    3. The first schedule planned in the SCHEDULER object.
    4. -
    - -

    To clarify the different appliances, lets have a look at the following examples:

    - -

    Construct a SCHEDULER object without a persistent schedule.

    - -
      -
    • SCHEDULER.New( nil ): Setup a new SCHEDULER object, which is persistently executed after garbage collection.

      - -

      SchedulerObject = SCHEDULER:New() - SchedulerID = SchedulerObject:Schedule( nil, ScheduleFunction, {} )

    • -
    - -

    The above example creates a new SchedulerObject, but does not schedule anything. -A separate schedule is created by using the SchedulerObject using the method :Schedule..., which returns a ScheduleID

    - -

    Construct a SCHEDULER object without a volatile schedule, but volatile to the Object existence...

    - -
      -
    • SCHEDULER.New( Object ): Setup a new SCHEDULER object, which is linked to the Object. When the Object is nillified or destroyed, the SCHEDULER object will also be destroyed and stopped after garbage collection.

      - -

      ZoneObject = ZONE:New( "ZoneName" ) - SchedulerObject = SCHEDULER:New( ZoneObject ) - SchedulerID = SchedulerObject:Schedule( ZoneObject, ScheduleFunction, {} ) - ... - ZoneObject = nil - garbagecollect()

    • -
    - -

    The above example creates a new SchedulerObject, but does not schedule anything, and is bound to the existence of ZoneObject, which is a ZONE. -A separate schedule is created by using the SchedulerObject using the method :Schedule()..., which returns a ScheduleID -Later in the logic, the ZoneObject is put to nil, and garbage is collected. -As a result, the ScheduleObject will cancel any planned schedule.

    - -

    Construct a SCHEDULER object with a persistent schedule.

    - -
      -
    • SCHEDULER.New( nil, Function, FunctionArguments, Start, ... ): Setup a new persistent SCHEDULER object, and start a new schedule for the Function with the defined FunctionArguments according the Start and sequent parameters.

      - -

      SchedulerObject, SchedulerID = SCHEDULER:New( nil, ScheduleFunction, {} )

    • -
    - -

    The above example creates a new SchedulerObject, and does schedule the first schedule as part of the call. -Note that 2 variables are returned here: SchedulerObject, ScheduleID...

    - -

    Construct a SCHEDULER object without a schedule, but volatile to the Object existence...

    - -
      -
    • SCHEDULER.New( Object, Function, FunctionArguments, Start, ... ): Setup a new SCHEDULER object, linked to Object, and start a new schedule for the Function with the defined FunctionArguments according the Start and sequent parameters.

      - -

      ZoneObject = ZONE:New( "ZoneName" ) - SchedulerObject, SchedulerID = SCHEDULER:New( ZoneObject, ScheduleFunction, {} ) - SchedulerID = SchedulerObject:Schedule( ZoneObject, ScheduleFunction, {} ) - ... - ZoneObject = nil - garbagecollect()

    • -
    - -

    The above example creates a new SchedulerObject, and schedules a method call (ScheduleFunction), -and is bound to the existence of ZoneObject, which is a ZONE object (ZoneObject). -Both a ScheduleObject and a SchedulerID variable are returned. -Later in the logic, the ZoneObject is put to nil, and garbage is collected. -As a result, the ScheduleObject will cancel the planned schedule.

    - -

    SCHEDULER timer stopping and (re-)starting.

    - -

    The SCHEDULER can be stopped and restarted with the following methods:

    - -
      -
    • SCHEDULER.Start(): (Re-)Start the schedules within the SCHEDULER object. If a CallID is provided to :Start(), only the schedule referenced by CallID will be (re-)started.

    • -
    • SCHEDULER.Stop(): Stop the schedules within the SCHEDULER object. If a CallID is provided to :Stop(), then only the schedule referenced by CallID will be stopped.

      - -

      ZoneObject = ZONE:New( "ZoneName" ) - SchedulerObject, SchedulerID = SCHEDULER:New( ZoneObject, ScheduleFunction, {} ) - SchedulerID = SchedulerObject:Schedule( ZoneObject, ScheduleFunction, {}, 10, 10 ) - ... - SchedulerObject:Stop( SchedulerID ) - ... - SchedulerObject:Start( SchedulerID )

    • -
    - -

    The above example creates a new SchedulerObject, and does schedule the first schedule as part of the call. -Note that 2 variables are returned here: SchedulerObject, ScheduleID...
    -Later in the logic, the repeating schedule with SchedulerID is stopped.
    -A bit later, the repeating schedule with SchedulerId is (re)-started.

    - -

    Create a new schedule

    - -

    With the method SCHEDULER.Schedule() a new time event can be scheduled. -This method is used by the :New() constructor when a new schedule is planned.

    - -

    Consider the following code fragment of the SCHEDULER object creation.

    - -
    ZoneObject = ZONE:New( "ZoneName" )
    -SchedulerObject = SCHEDULER:New( ZoneObject )
    -
    - -

    Several parameters can be specified that influence the behaviour of a Schedule.

    - -

    A single schedule, immediately executed

    - -
    SchedulerID = SchedulerObject:Schedule( ZoneObject, ScheduleFunction, {} )
    -
    - -

    The above example schedules a new ScheduleFunction call to be executed asynchronously, within milleseconds ...

    - -

    A single schedule, planned over time

    - -
    SchedulerID = SchedulerObject:Schedule( ZoneObject, ScheduleFunction, {}, 10 )
    -
    - -

    The above example schedules a new ScheduleFunction call to be executed asynchronously, within 10 seconds ...

    - -

    A schedule with a repeating time interval, planned over time

    - -
    SchedulerID = SchedulerObject:Schedule( ZoneObject, ScheduleFunction, {}, 10, 60 )
    -
    - -

    The above example schedules a new ScheduleFunction call to be executed asynchronously, within 10 seconds, -and repeating 60 every seconds ...

    - -

    A schedule with a repeating time interval, planned over time, with time interval randomization

    - -
    SchedulerID = SchedulerObject:Schedule( ZoneObject, ScheduleFunction, {}, 10, 60, 0.5 )
    -
    - -

    The above example schedules a new ScheduleFunction call to be executed asynchronously, within 10 seconds, -and repeating 60 seconds, with a 50% time interval randomization ... -So the repeating time interval will be randomized using the 0.5,
    -and will calculate between 60 - ( 60 * 0.5 ) and 60 + ( 60 * 0.5 ) for each repeat, -which is in this example between 30 and 90 seconds.

    - -

    A schedule with a repeating time interval, planned over time, with time interval randomization, and stop after a time interval

    - -
    SchedulerID = SchedulerObject:Schedule( ZoneObject, ScheduleFunction, {}, 10, 60, 0.5, 300 )
    -
    - -

    The above example schedules a new ScheduleFunction call to be executed asynchronously, within 10 seconds, -The schedule will repeat every 60 seconds. -So the repeating time interval will be randomized using the 0.5,
    -and will calculate between 60 - ( 60 * 0.5 ) and 60 + ( 60 * 0.5 ) for each repeat, -which is in this example between 30 and 90 seconds. -The schedule will stop after 300 seconds.

    - - -
    -
    -

    Type Scheduler

    - -

    Type SCHEDULER

    - -

    The SCHEDULER class

    - -

    Field(s)

    -
    -
    - - -SCHEDULER:Clear() - -
    -
    - -

    Clears all pending schedules.

    - -
    -
    -
    -
    - - - -SCHEDULER.MasterObject - -
    -
    - - - -
    -
    -
    -
    - - -SCHEDULER:New(SchedulerObject, SchedulerFunction, SchedulerArguments, Start, Repeat, RandomizeFactor, Stop) - -
    -
    - -

    SCHEDULER constructor.

    - -

    Parameters

    -
      -
    • - -

      #table SchedulerObject : -Specified for which Moose object the timer is setup. If a value of nil is provided, a scheduler will be setup without an object reference.

      - -
    • -
    • - -

      #function SchedulerFunction : -The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

      - -
    • -
    • - -

      #table SchedulerArguments : -Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

      - -
    • -
    • - -

      #number Start : -Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

      - -
    • -
    • - -

      #number Repeat : -Specifies the interval in seconds when the scheduler will call the event function.

      - -
    • -
    • - -

      #number RandomizeFactor : -Specifies a randomization factor between 0 and 1 to randomize the Repeat.

      - -
    • -
    • - -

      #number Stop : -Specifies the amount of seconds when the scheduler will be stopped.

      - -
    • -
    -

    Return values

    -
      -
    1. - -

      #SCHEDULER: -self.

      - -
    2. -
    3. - -

      #number: -The ScheduleID of the planned schedule.

      - -
    4. -
    -
    -
    -
    -
    - - -SCHEDULER:Remove(ScheduleID) - -
    -
    - -

    Removes a specific schedule if a valid ScheduleID is provided.

    - -

    Parameter

    -
      -
    • - -

      #number ScheduleID : -(optional) The ScheduleID of the planned (repeating) schedule.

      - -
    • -
    -
    -
    -
    -
    - - -SCHEDULER:Schedule(SchedulerObject, SchedulerFunction, SchedulerArguments, Start, Repeat, RandomizeFactor, Stop) - -
    -
    - -

    Schedule a new time event.

    - - -

    Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

    - -

    Parameters

    -
      -
    • - -

      #table SchedulerObject : -Specified for which Moose object the timer is setup. If a value of nil is provided, a scheduler will be setup without an object reference.

      - -
    • -
    • - -

      #function SchedulerFunction : -The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

      - -
    • -
    • - -

      #table SchedulerArguments : -Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

      - -
    • -
    • - -

      #number Start : -Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

      - -
    • -
    • - -

      #number Repeat : -Specifies the interval in seconds when the scheduler will call the event function.

      - -
    • -
    • - -

      #number RandomizeFactor : -Specifies a randomization factor between 0 and 1 to randomize the Repeat.

      - -
    • -
    • - -

      #number Stop : -Specifies the amount of seconds when the scheduler will be stopped.

      - -
    • -
    -

    Return value

    - -

    #number: -The ScheduleID of the planned schedule.

    - -
    -
    -
    -
    - - #number - -SCHEDULER.ScheduleID - -
    -
    - -

    the ID of the scheduler.

    - -
    -
    -
    -
    - - - -SCHEDULER.SchedulerObject - -
    -
    - - - -
    -
    -
    -
    - - -SCHEDULER:Start(ScheduleID) - -
    -
    - -

    (Re-)Starts the schedules or a specific schedule if a valid ScheduleID is provided.

    - -

    Parameter

    -
      -
    • - -

      #number ScheduleID : -(optional) The ScheduleID of the planned (repeating) schedule.

      - -
    • -
    -
    -
    -
    -
    - - -SCHEDULER:Stop(ScheduleID) - -
    -
    - -

    Stops the schedules or a specific schedule if a valid ScheduleID is provided.

    - -

    Parameter

    -
      -
    • - -

      #number ScheduleID : -(optional) The ScheduleID of the planned (repeating) schedule.

      - -
    • -
    -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Scoring.html b/docs/Documentation/Scoring.html deleted file mode 100644 index f395d533f..000000000 --- a/docs/Documentation/Scoring.html +++ /dev/null @@ -1,2425 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Scoring

    - -

    Functional -- Administer the SCORING of player achievements, -and create a CSV file logging the scoring events for use at team or squadron websites.

    - -

    Banner Image

    - -
    - -

    The #SCORING class administers the scoring of player achievements, -and creates a CSV file logging the scoring events and results for use at team or squadron websites.

    - - - -

    SCORING automatically calculates the threat level of the objects hit and destroyed by players, -which can be Unit, Static objects.

    - -

    Positive score points are granted when enemy or neutral targets are destroyed. -Negative score points or penalties are given when a friendly target is hit or destroyed. -This brings a lot of dynamism in the scoring, where players need to take care to inflict damage on the right target. -By default, penalties weight heavier in the scoring, to ensure that players don't commit fratricide. -The total score of the player is calculated by adding the scores minus the penalties.

    - -

    Banner Image

    - -

    The score value is calculated based on the threat level of the player and the threat level of the target. -A calculated score takes the threat level of the target divided by a balanced threat level of the player unit.
    -As such, if the threat level of the target is high, and the player threat level is low, a higher score will be given than -if the threat level of the player would be high too.

    - -

    Banner Image

    - -

    When multiple players hit the same target, and finally succeed in destroying the target, then each player who contributed to the target -destruction, will receive a score. This is important for targets that require significant damage before it can be destroyed, like -ships or heavy planes.

    - -

    Banner Image

    - -

    Optionally, the score values can be scaled by a scale. Specific scales can be set for positive cores or negative penalties. -The default range of the scores granted is a value between 0 and 10. The default range of penalties given is a value between 0 and 30.

    - -

    Banner Image

    - -

    Additional scores can be granted to specific objects, when the player(s) destroy these objects.

    - -

    Banner Image

    - -

    Various Zones can be defined for which scores are also granted when objects in that Zone are destroyed. -This is specifically useful to designate scenery targets on the map that will generate points when destroyed.

    - -

    With a small change in MissionScripting.lua, the scoring results can also be logged in a CSV file.
    -These CSV files can be used to:

    - -
      -
    • Upload scoring to a database or a BI tool to publish the scoring results to the player community.
    • -
    • Upload scoring in an (online) Excel like tool, using pivot tables and pivot charts to show mission results.
    • -
    • Share scoring amoung players after the mission to discuss mission results.
    • -
    - -

    Scores can be reported. Menu options are automatically added to each player group when a player joins a client slot or a CA unit. -Use the radio menu F10 to consult the scores while running the mission. -Scores can be reported for your user, or an overall score can be reported of all players currently active in the mission.

    - -

    1) Scoring#SCORING class, extends Base#BASE

    - -

    1.1) Set the destroy score or penalty scale

    - -

    Score scales can be set for scores granted when enemies or friendlies are destroyed. -Use the method SCORING.SetScaleDestroyScore() to set the scale of enemy destroys (positive destroys). -Use the method SCORING.SetScaleDestroyPenalty() to set the scale of friendly destroys (negative destroys).

    - -
     local Scoring = SCORING:New( "Scoring File" )
    - Scoring:SetScaleDestroyScore( 10 )
    - Scoring:SetScaleDestroyPenalty( 40 )
    -
    - -

    The above sets the scale for valid scores to 10. So scores will be given in a scale from 0 to 10. -The penalties will be given in a scale from 0 to 40.

    - -

    1.2) Define special targets that will give extra scores.

    - -

    Special targets can be set that will give extra scores to the players when these are destroyed. -Use the methods SCORING.AddUnitScore() and SCORING.RemoveUnitScore() to specify a special additional score for a specific Units.
    -Use the methods SCORING.AddStaticScore() and SCORING.RemoveStaticScore() to specify a special additional score for a specific Statics.
    -Use the method SCORING.SetGroupGroup() to specify a special additional score for a specific Groups.

    - -
     local Scoring = SCORING:New( "Scoring File" )
    - Scoring:AddUnitScore( UNIT:FindByName( "Unit #001" ), 200 )
    - Scoring:AddStaticScore( STATIC:FindByName( "Static #1" ), 100 )
    -
    - -

    The above grants an additional score of 200 points for Unit #001 and an additional 100 points of Static #1 if these are destroyed. -Note that later in the mission, one can remove these scores set, for example, when the a goal achievement time limit is over. -For example, this can be done as follows:

    - -
     Scoring:RemoveUnitScore( UNIT:FindByName( "Unit #001" ) )
    -
    - -

    1.3) Define destruction zones that will give extra scores.

    - -

    Define zones of destruction. Any object destroyed within the zone of the given category will give extra points. -Use the method SCORING.AddZoneScore() to add a Zone for additional scoring.
    -Use the method SCORING.RemoveZoneScore() to remove a Zone for additional scoring.
    -There are interesting variations that can be achieved with this functionality. For example, if the Zone is a Zone#ZONE_UNIT, -then the zone is a moving zone, and anything destroyed within that Zone will generate points. -The other implementation could be to designate a scenery target (a building) in the mission editor surrounded by a Zone, -just large enough around that building.

    - -

    1.4) Add extra Goal scores upon an event or a condition.

    - -

    A mission has goals and achievements. The scoring system provides an API to set additional scores when a goal or achievement event happens. -Use the method SCORING.AddGoalScore() to add a score for a Player at any time in your mission.

    - -

    1.5) (Decommissioned) Configure fratricide level.

    - -

    This functionality is decomissioned until the DCS bug concerning Unit:destroy() not being functional in multi player for player units has been fixed by ED.

    - -

    When a player commits too much damage to friendlies, his penalty score will reach a certain level. -Use the method SCORING.SetFratricide() to define the level when a player gets kicked.
    -By default, the fratricide level is the default penalty mutiplier * 2 for the penalty score.

    - -

    1.6) Penalty score when a player changes the coalition.

    - -

    When a player changes the coalition, he can receive a penalty score. -Use the method SCORING.SetCoalitionChangePenalty() to define the penalty when a player changes coalition. -By default, the penalty for changing coalition is the default penalty scale.

    - -

    1.8) Define output CSV files.

    - -

    The CSV file is given the name of the string given in the SCORING.New{} constructor, followed by the .csv extension. -The file is incrementally saved in the **\Saved Games\DCS\Logs** folder, and has a time stamp indicating each mission run. -See the following example:

    - -
    local ScoringFirstMission = SCORING:New( "FirstMission" )
    -local ScoringSecondMission = SCORING:New( "SecondMission" )
    -
    - -

    The above documents that 2 Scoring objects are created, ScoringFirstMission and ScoringSecondMission.

    - -

    *IMPORTANT!!!

    -

    In order to allow DCS world to write CSV files, you need to adapt a configuration file in your DCS world installation on the server. -For this, browse to the missionscripting.lua file in your DCS world installation folder. -For me, this installation folder is in D:\Program Files\Eagle Dynamics\DCS World\Scripts.

    - -

    Edit a few code lines in the MissionScripting.lua file. Comment out the lines os, io and lfs:

    - -
       do
    -     --sanitizeModule('os')
    -     --sanitizeModule('io')
    -     --sanitizeModule('lfs')
    -     require = nil
    -     loadlib = nil
    -   end
    -
    - -

    When these lines are not sanitized, functions become available to check the time, and to write files to your system at the above specified location.
    -Note that the MissionScripting.lua file provides a warning. So please beware of this warning as outlined by Eagle Dynamics!

    - -
       --Sanitize Mission Scripting environment
    -   --This makes unavailable some unsecure functions. 
    -   --Mission downloaded from server to client may contain potentialy harmful lua code that may use these functions.
    -   --You can remove the code below and make availble these functions at your own risk.
    -
    - -

    The MOOSE designer cannot take any responsibility of any damage inflicted as a result of the de-sanitization. -That being said, I hope that the SCORING class provides you with a great add-on to score your squad mates achievements.

    - -

    1.9) Configure messages.

    - -

    When players hit or destroy targets, messages are sent. -Various methods exist to configure:

    - -
      -
    • Which messages are sent upon the event.
    • -
    • Which audience receives the message.
    • -
    - -

    1.9.1) Configure the messages sent upon the event.

    - -

    Use the following methods to configure when to send messages. By default, all messages are sent.

    - - - -

    1.9.2) Configure the audience of the messages.

    - -

    Use the following methods to configure the audience of the messages. By default, the messages are sent to all players in the mission.

    - - - - -
    - -

    API CHANGE HISTORY

    - -

    The underlying change log documents the API changes. Please read this carefully. The following notation is used:

    - -
      -
    • Added parts are expressed in bold type face.
    • -
    • Removed parts are expressed in italic type face.
    • -
    - -

    Hereby the change log:

    - -

    2017-02-26: Initial class and API.

    - -
    - -

    AUTHORS and CONTRIBUTIONS

    - -

    Contributions:

    - -
      -
    • Wingthor (TAW): Testing & Advice.
    • -
    • Dutch-Baron (TAW): Testing & Advice.
    • -
    • **Whisper: Testing and Advice.
    • -
    - -

    Authors:

    - -
      -
    • FlightControl: Concept, Design & Programming.
    • -
    - - -

    Global(s)

    - - - - - - - - - - - - - - - - - -
    SCORING - -
    nHours - -
    nMins - -
    nSecs - -
    -

    Type SCORING

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SCORING:AddGoalScore(PlayerUnit, GoalTag, Text, Score) -

    Add a goal score for a player.

    -
    SCORING:AddGoalScorePlayer(PlayerName, GoalTag, Text, Score) -

    Add a goal score for a player.

    -
    SCORING:AddScoreGroup(ScoreGroup, Score) -

    Specify a special additional score for a Group.

    -
    SCORING:AddStaticScore(ScoreStatic, Score) -

    Add a Static for additional scoring when the Static is destroyed.

    -
    SCORING:AddUnitScore(ScoreUnit, Score) -

    Add a Unit for additional scoring when the Unit is destroyed.

    -
    SCORING:AddZoneScore(ScoreZone, Score) -

    Add a Zone to define additional scoring when any object is destroyed in that zone.

    -
    SCORING.ClassID - -
    SCORING.ClassName - -
    SCORING:CloseCSV() - -
    SCORING.CoalitionChangePenalty - -
    SCORING.DisplayMessagePrefix - -
    SCORING.Fratricide - -
    SCORING.GameName - -
    SCORING:IfMessagesDestroy() -

    If to send messages after a target has been destroyed.

    -
    SCORING:IfMessagesHit() -

    If to send messages after a target has been hit.

    -
    SCORING:IfMessagesScore() -

    If to send messages after a target has been destroyed and receives additional scores.

    -
    SCORING:IfMessagesToAll() -

    If to send messages to all players.

    -
    SCORING:IfMessagesToCoalition() -

    If to send messages to only those players within the same coalition as the player.

    -
    SCORING:IfMessagesZone() -

    If to send messages after a target has been hit in a zone, and additional score is received.

    -
    SCORING.MessagesAudience - -
    SCORING.MessagesDestroy - -
    SCORING.MessagesHit - -
    SCORING.MessagesScore - -
    SCORING.MessagesZone - -
    SCORING:New(GameName) -

    Creates a new SCORING object to administer the scoring achieved by players.

    -
    SCORING:OnEventPlayerEnterUnit(Event) -

    Handles the OnPlayerEnterUnit event for the scoring.

    -
    SCORING:OnEventPlayerLeaveUnit(Event) -

    Handles the OnPlayerLeaveUnit event for the scoring.

    -
    SCORING:OpenCSV(ScoringCSV) -

    Opens a score CSV file to log the scores.

    -
    SCORING.Players -

    A collection of the current players that have joined the game.

    -
    SCORING:RemoveStaticScore(ScoreStatic) -

    Removes a Static for additional scoring when the Static is destroyed.

    -
    SCORING:RemoveUnitScore(ScoreUnit) -

    Removes a Unit for additional scoring when the Unit is destroyed.

    -
    SCORING:RemoveZoneScore(ScoreZone) -

    Remove a Zone for additional scoring.

    -
    SCORING:ReportDetailedPlayerCoalitionChanges(PlayerName) -

    Produce detailed report of player penalty scores because of changing the coalition.

    -
    SCORING:ReportDetailedPlayerDestroys(PlayerName) -

    Produce detailed report of player destroy scores.

    -
    SCORING:ReportDetailedPlayerGoals(PlayerName) -

    Produce detailed report of player goal scores.

    -
    SCORING:ReportDetailedPlayerHits(PlayerName) -

    Produce detailed report of player hit scores.

    -
    SCORING:ReportDetailedPlayerMissions(PlayerName) -

    Produce detailed report of player penalty scores because of changing the coalition.

    -
    SCORING:ReportScoreAllSummary(PlayerGroup) -

    Report all players score

    -
    SCORING:ReportScoreGroupDetailed(PlayerGroup) -

    Report Group Score Detailed

    -
    SCORING:ReportScoreGroupSummary(PlayerGroup) -

    Report Group Score Summary

    -
    SCORING.RunTime - -
    SCORING.ScaleDestroyPenalty - -
    SCORING.ScaleDestroyScore - -
    SCORING:ScoreCSV(PlayerName, TargetPlayerName, ScoreType, ScoreTimes, ScoreAmount, PlayerUnitName, PlayerUnitCoalition, PlayerUnitCategory, PlayerUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType) -

    Registers a score for a player.

    -
    SCORING.ScoringCSV - -
    SCORING.ScoringObjects - -
    SCORING.ScoringZones - -
    SCORING:SecondsToClock(sSeconds) - -
    SCORING:SetCoalitionChangePenalty(CoalitionChangePenalty) -

    When a player changes the coalition, he can receive a penalty score.

    -
    SCORING:SetDisplayMessagePrefix(DisplayMessagePrefix) -

    Set a prefix string that will be displayed at each scoring message sent.

    -
    SCORING:SetFratricide(Fratricide) -

    When a player commits too much damage to friendlies, his penalty score will reach a certain level.

    -
    SCORING:SetMessagesDestroy(OnOff) -

    Configure to send messages after a target has been destroyed.

    -
    SCORING:SetMessagesHit(OnOff) -

    Configure to send messages after a target has been hit.

    -
    SCORING:SetMessagesScore(OnOff) -

    Configure to send messages after a target has been destroyed and receives additional scores.

    -
    SCORING:SetMessagesToAll() -

    Configure to send messages to all players.

    -
    SCORING:SetMessagesToCoalition() -

    Configure to send messages to only those players within the same coalition as the player.

    -
    SCORING:SetMessagesZone(OnOff) -

    Configure to send messages after a target has been hit in a zone, and additional score is received.

    -
    SCORING:SetScaleDestroyPenalty(Scale) -

    Set the scale for scoring penalty destroys (friendly destroys).

    -
    SCORING:SetScaleDestroyScore(Scale) -

    Set the scale for scoring valid destroys (enemy destroys).

    -
    SCORING:_AddMissionGoalScore(Mission, PlayerName, Text, Score) -

    Registers Scores the players completing a Mission Task.

    -
    SCORING:_AddMissionScore(Mission, PlayerUnit, Text, Score) -

    Registers Mission Scores for possible multiple players that contributed in the Mission.

    -
    SCORING:_AddMissionTaskScore(Mission, PlayerUnit, Text, Score) -

    Registers Scores the players completing a Mission Task.

    -
    SCORING:_AddPlayerFromUnit(UnitData) -

    Add a new player entering a Unit.

    -
    SCORING:_EventOnDeadOrCrash(Event) -

    Track DEAD or CRASH events for the scoring.

    -
    SCORING:_EventOnHit(Event) -

    Handles the OnHit event for the scoring.

    -
    - -

    Global(s)

    -
    -
    - - #SCORING - -SCORING - -
    -
    - - - -
    -
    -
    -
    - - - -nHours - -
    -
    - - - -
    -
    -
    -
    - - - -nMins - -
    -
    - - - -
    -
    -
    -
    - - - -nSecs - -
    -
    - - - -
    -
    -

    Type Scoring

    - -

    Type SCORING

    - -

    The Scoring class

    - -

    Field(s)

    -
    -
    - - -SCORING:AddGoalScore(PlayerUnit, GoalTag, Text, Score) - -
    -
    - -

    Add a goal score for a player.

    - - -

    The method takes the PlayerUnit for which the Goal score needs to be set. -The GoalTag is a string or identifier that is taken into the CSV file scoring log to identify the goal. -A free text can be given that is shown to the players. -The Score can be both positive and negative.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT PlayerUnit : -The Unit of the Player. Other Properties for the scoring are taken from this PlayerUnit, like coalition, type etc.

      - -
    • -
    • - -

      #string GoalTag : -The string or identifier that is used in the CSV file to identify the goal (sort or group later in Excel).

      - -
    • -
    • - -

      #string Text : -A free text that is shown to the players.

      - -
    • -
    • - -

      #number Score : -The score can be both positive or negative ( Penalty ).

      - -
    • -
    -
    -
    -
    -
    - - -SCORING:AddGoalScorePlayer(PlayerName, GoalTag, Text, Score) - -
    -
    - -

    Add a goal score for a player.

    - - -

    The method takes the Player name for which the Goal score needs to be set. -The GoalTag is a string or identifier that is taken into the CSV file scoring log to identify the goal. -A free text can be given that is shown to the players. -The Score can be both positive and negative.

    - -

    Parameters

    -
      -
    • - -

      #string PlayerName : -The name of the Player.

      - -
    • -
    • - -

      #string GoalTag : -The string or identifier that is used in the CSV file to identify the goal (sort or group later in Excel).

      - -
    • -
    • - -

      #string Text : -A free text that is shown to the players.

      - -
    • -
    • - -

      #number Score : -The score can be both positive or negative ( Penalty ).

      - -
    • -
    -
    -
    -
    -
    - - -SCORING:AddScoreGroup(ScoreGroup, Score) - -
    -
    - -

    Specify a special additional score for a Group.

    - -

    Parameters

    - -

    Return value

    - -

    #SCORING:

    - - -
    -
    -
    -
    - - -SCORING:AddStaticScore(ScoreStatic, Score) - -
    -
    - -

    Add a Static for additional scoring when the Static is destroyed.

    - - -

    Note that if there was already a Static declared within the scoring with the same name, -then the old Static will be replaced with the new Static.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Static#UNIT ScoreStatic : -The Static for which the Score needs to be given.

      - -
    • -
    • - -

      #number Score : -The Score value.

      - -
    • -
    -

    Return value

    - -

    #SCORING:

    - - -
    -
    -
    -
    - - -SCORING:AddUnitScore(ScoreUnit, Score) - -
    -
    - -

    Add a Unit for additional scoring when the Unit is destroyed.

    - - -

    Note that if there was already a Unit declared within the scoring with the same name, -then the old Unit will be replaced with the new Unit.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT ScoreUnit : -The Unit for which the Score needs to be given.

      - -
    • -
    • - -

      #number Score : -The Score value.

      - -
    • -
    -

    Return value

    - -

    #SCORING:

    - - -
    -
    -
    -
    - - -SCORING:AddZoneScore(ScoreZone, Score) - -
    -
    - -

    Add a Zone to define additional scoring when any object is destroyed in that zone.

    - - -

    Note that if a Zone with the same name is already within the scoring added, the Zone (type) and Score will be replaced! -This allows for a dynamic destruction zone evolution within your mission.

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE_BASE ScoreZone : -The Zone which defines the destruction score perimeters. -Note that a zone can be a polygon or a moving zone.

      - -
    • -
    • - -

      #number Score : -The Score value.

      - -
    • -
    -

    Return value

    - -

    #SCORING:

    - - -
    -
    -
    -
    - - #number - -SCORING.ClassID - -
    -
    - - - -
    -
    -
    -
    - - #string - -SCORING.ClassName - -
    -
    - - - -
    -
    -
    -
    - - -SCORING:CloseCSV() - -
    -
    - - - -
    -
    -
    -
    - - - -SCORING.CoalitionChangePenalty - -
    -
    - - - -
    -
    -
    -
    - - -SCORING.DisplayMessagePrefix - -
    -
    - - - -
    -
    -
    -
    - - - -SCORING.Fratricide - -
    -
    - - - -
    -
    -
    -
    - - - -SCORING.GameName - -
    -
    - - - -
    -
    -
    -
    - - -SCORING:IfMessagesDestroy() - -
    -
    - -

    If to send messages after a target has been destroyed.

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -SCORING:IfMessagesHit() - -
    -
    - -

    If to send messages after a target has been hit.

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -SCORING:IfMessagesScore() - -
    -
    - -

    If to send messages after a target has been destroyed and receives additional scores.

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -SCORING:IfMessagesToAll() - -
    -
    - -

    If to send messages to all players.

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -SCORING:IfMessagesToCoalition() - -
    -
    - -

    If to send messages to only those players within the same coalition as the player.

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -SCORING:IfMessagesZone() - -
    -
    - -

    If to send messages after a target has been hit in a zone, and additional score is received.

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - #number - -SCORING.MessagesAudience - -
    -
    - - - -
    -
    -
    -
    - - - -SCORING.MessagesDestroy - -
    -
    - - - -
    -
    -
    -
    - - - -SCORING.MessagesHit - -
    -
    - - - -
    -
    -
    -
    - - - -SCORING.MessagesScore - -
    -
    - - - -
    -
    -
    -
    - - - -SCORING.MessagesZone - -
    -
    - - - -
    -
    -
    -
    - - -SCORING:New(GameName) - -
    -
    - -

    Creates a new SCORING object to administer the scoring achieved by players.

    - -

    Parameter

    -
      -
    • - -

      #string GameName : -The name of the game. This name is also logged in the CSV score file.

      - -
    • -
    -

    Return value

    - -

    #SCORING: -self

    - -

    Usage:

    -
    -- Define a new scoring object for the mission Gori Valley.
    -ScoringObject = SCORING:New( "Gori Valley" )
    - -
    -
    -
    -
    - - -SCORING:OnEventPlayerEnterUnit(Event) - -
    -
    - -

    Handles the OnPlayerEnterUnit event for the scoring.

    - -

    Parameter

    - -
    -
    -
    -
    - - -SCORING:OnEventPlayerLeaveUnit(Event) - -
    -
    - -

    Handles the OnPlayerLeaveUnit event for the scoring.

    - -

    Parameter

    - -
    -
    -
    -
    - - -SCORING:OpenCSV(ScoringCSV) - -
    -
    - -

    Opens a score CSV file to log the scores.

    - -

    Parameter

    -
      -
    • - -

      #string ScoringCSV :

      - -
    • -
    -

    Return value

    - -

    #SCORING: -self

    - -

    Usage:

    -
    -- Open a new CSV file to log the scores of the game Gori Valley. Let the name of the CSV file begin with "Player Scores".
    -ScoringObject = SCORING:New( "Gori Valley" )
    -ScoringObject:OpenCSV( "Player Scores" )
    - -
    -
    -
    -
    - - -SCORING.Players - -
    -
    - -

    A collection of the current players that have joined the game.

    - -
    -
    -
    -
    - - -SCORING:RemoveStaticScore(ScoreStatic) - -
    -
    - -

    Removes a Static for additional scoring when the Static is destroyed.

    - -

    Parameter

    - -

    Return value

    - -

    #SCORING:

    - - -
    -
    -
    -
    - - -SCORING:RemoveUnitScore(ScoreUnit) - -
    -
    - -

    Removes a Unit for additional scoring when the Unit is destroyed.

    - -

    Parameter

    - -

    Return value

    - -

    #SCORING:

    - - -
    -
    -
    -
    - - -SCORING:RemoveZoneScore(ScoreZone) - -
    -
    - -

    Remove a Zone for additional scoring.

    - - -

    The scoring will search if any Zone is added with the given name, and will remove that zone from the scoring. -This allows for a dynamic destruction zone evolution within your mission.

    - -

    Parameter

    -
      -
    • - -

      Core.Zone#ZONE_BASE ScoreZone : -The Zone which defines the destruction score perimeters. -Note that a zone can be a polygon or a moving zone.

      - -
    • -
    -

    Return value

    - -

    #SCORING:

    - - -
    -
    -
    -
    - - -SCORING:ReportDetailedPlayerCoalitionChanges(PlayerName) - -
    -
    - -

    Produce detailed report of player penalty scores because of changing the coalition.

    - -

    Parameter

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    -

    Return value

    - -

    #string: -The report.

    - -
    -
    -
    -
    - - -SCORING:ReportDetailedPlayerDestroys(PlayerName) - -
    -
    - -

    Produce detailed report of player destroy scores.

    - -

    Parameter

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    -

    Return value

    - -

    #string: -The report.

    - -
    -
    -
    -
    - - -SCORING:ReportDetailedPlayerGoals(PlayerName) - -
    -
    - -

    Produce detailed report of player goal scores.

    - -

    Parameter

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    -

    Return value

    - -

    #string: -The report.

    - -
    -
    -
    -
    - - -SCORING:ReportDetailedPlayerHits(PlayerName) - -
    -
    - -

    Produce detailed report of player hit scores.

    - -

    Parameter

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    -

    Return value

    - -

    #string: -The report.

    - -
    -
    -
    -
    - - -SCORING:ReportDetailedPlayerMissions(PlayerName) - -
    -
    - -

    Produce detailed report of player penalty scores because of changing the coalition.

    - -

    Parameter

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    -

    Return value

    - -

    #string: -The report.

    - -
    -
    -
    -
    - - -SCORING:ReportScoreAllSummary(PlayerGroup) - -
    -
    - -

    Report all players score

    - -

    Parameter

    - -
    -
    -
    -
    - - -SCORING:ReportScoreGroupDetailed(PlayerGroup) - -
    -
    - -

    Report Group Score Detailed

    - -

    Parameter

    - -
    -
    -
    -
    - - -SCORING:ReportScoreGroupSummary(PlayerGroup) - -
    -
    - -

    Report Group Score Summary

    - -

    Parameter

    - -
    -
    -
    -
    - - - -SCORING.RunTime - -
    -
    - - - -
    -
    -
    -
    - - - -SCORING.ScaleDestroyPenalty - -
    -
    - - - -
    -
    -
    -
    - - - -SCORING.ScaleDestroyScore - -
    -
    - - - -
    -
    -
    -
    - - -SCORING:ScoreCSV(PlayerName, TargetPlayerName, ScoreType, ScoreTimes, ScoreAmount, PlayerUnitName, PlayerUnitCoalition, PlayerUnitCategory, PlayerUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType) - -
    -
    - -

    Registers a score for a player.

    - -

    Parameters

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    • - -

      #string TargetPlayerName : -The name of the target player.

      - -
    • -
    • - -

      #string ScoreType : -The type of the score.

      - -
    • -
    • - -

      #string ScoreTimes : -The amount of scores achieved.

      - -
    • -
    • - -

      #string ScoreAmount : -The score given.

      - -
    • -
    • - -

      #string PlayerUnitName : -The unit name of the player.

      - -
    • -
    • - -

      #string PlayerUnitCoalition : -The coalition of the player unit.

      - -
    • -
    • - -

      #string PlayerUnitCategory : -The category of the player unit.

      - -
    • -
    • - -

      #string PlayerUnitType : -The type of the player unit.

      - -
    • -
    • - -

      #string TargetUnitName : -The name of the target unit.

      - -
    • -
    • - -

      #string TargetUnitCoalition : -The coalition of the target unit.

      - -
    • -
    • - -

      #string TargetUnitCategory : -The category of the target unit.

      - -
    • -
    • - -

      #string TargetUnitType : -The type of the target unit.

      - -
    • -
    -

    Return value

    - -

    #SCORING: -self

    - -
    -
    -
    -
    - - - -SCORING.ScoringCSV - -
    -
    - - - -
    -
    -
    -
    - - - -SCORING.ScoringObjects - -
    -
    - - - - -

    Additional Object scores

    - -
    -
    -
    -
    - - - -SCORING.ScoringZones - -
    -
    - - - - -

    Additional Zone scores.

    - -
    -
    -
    -
    - - -SCORING:SecondsToClock(sSeconds) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      sSeconds :

      - -
    • -
    -
    -
    -
    -
    - - -SCORING:SetCoalitionChangePenalty(CoalitionChangePenalty) - -
    -
    - -

    When a player changes the coalition, he can receive a penalty score.

    - - -

    Use the method SCORING.SetCoalitionChangePenalty() to define the penalty when a player changes coalition. -By default, the penalty for changing coalition is the default penalty scale.

    - -

    Parameter

    -
      -
    • - -

      #number CoalitionChangePenalty : -The amount of penalty that is given.

      - -
    • -
    -

    Return value

    - -

    #SCORING:

    - - -
    -
    -
    -
    - - -SCORING:SetDisplayMessagePrefix(DisplayMessagePrefix) - -
    -
    - -

    Set a prefix string that will be displayed at each scoring message sent.

    - -

    Parameter

    -
      -
    • - -

      #string DisplayMessagePrefix : -(Default="Scoring: ") The scoring prefix string.

      - -
    • -
    -

    Return value

    - -

    #SCORING:

    - - -
    -
    -
    -
    - - -SCORING:SetFratricide(Fratricide) - -
    -
    - -

    When a player commits too much damage to friendlies, his penalty score will reach a certain level.

    - - -

    Use this method to define the level when a player gets kicked.
    -By default, the fratricide level is the default penalty mutiplier * 2 for the penalty score.

    - -

    Parameter

    -
      -
    • - -

      #number Fratricide : -The amount of maximum penalty that may be inflicted by a friendly player before he gets kicked.

      - -
    • -
    -

    Return value

    - -

    #SCORING:

    - - -
    -
    -
    -
    - - -SCORING:SetMessagesDestroy(OnOff) - -
    -
    - -

    Configure to send messages after a target has been destroyed.

    - -

    Parameter

    -
      -
    • - -

      #boolean OnOff : -If true is given, the messages are sent.

      - -
    • -
    -

    Return value

    - -

    #SCORING:

    - - -
    -
    -
    -
    - - -SCORING:SetMessagesHit(OnOff) - -
    -
    - -

    Configure to send messages after a target has been hit.

    - -

    Parameter

    -
      -
    • - -

      #boolean OnOff : -If true is given, the messages are sent.

      - -
    • -
    -

    Return value

    - -

    #SCORING:

    - - -
    -
    -
    -
    - - -SCORING:SetMessagesScore(OnOff) - -
    -
    - -

    Configure to send messages after a target has been destroyed and receives additional scores.

    - -

    Parameter

    -
      -
    • - -

      #boolean OnOff : -If true is given, the messages are sent.

      - -
    • -
    -

    Return value

    - -

    #SCORING:

    - - -
    -
    -
    -
    - - -SCORING:SetMessagesToAll() - -
    -
    - -

    Configure to send messages to all players.

    - -

    Return value

    - -

    #SCORING:

    - - -
    -
    -
    -
    - - -SCORING:SetMessagesToCoalition() - -
    -
    - -

    Configure to send messages to only those players within the same coalition as the player.

    - -

    Return value

    - -

    #SCORING:

    - - -
    -
    -
    -
    - - -SCORING:SetMessagesZone(OnOff) - -
    -
    - -

    Configure to send messages after a target has been hit in a zone, and additional score is received.

    - -

    Parameter

    -
      -
    • - -

      #boolean OnOff : -If true is given, the messages are sent.

      - -
    • -
    -

    Return value

    - -

    #SCORING:

    - - -
    -
    -
    -
    - - -SCORING:SetScaleDestroyPenalty(Scale) - -
    -
    - -

    Set the scale for scoring penalty destroys (friendly destroys).

    - - -

    A default calculated penalty is a value between 1 and 10. -The scale magnifies the scores given to the players.

    - -

    Parameter

    -
      -
    • - -

      #number Scale : -The scale of the score given.

      - -
    • -
    -

    Return value

    - -

    #SCORING:

    - - -
    -
    -
    -
    - - -SCORING:SetScaleDestroyScore(Scale) - -
    -
    - -

    Set the scale for scoring valid destroys (enemy destroys).

    - - -

    A default calculated score is a value between 1 and 10. -The scale magnifies the scores given to the players.

    - -

    Parameter

    -
      -
    • - -

      #number Scale : -The scale of the score given.

      - -
    • -
    -
    -
    -
    -
    - - -SCORING:_AddMissionGoalScore(Mission, PlayerName, Text, Score) - -
    -
    - -

    Registers Scores the players completing a Mission Task.

    - -

    Parameters

    -
      -
    • - -

      Tasking.Mission#MISSION Mission :

      - -
    • -
    • - -

      #string PlayerName :

      - -
    • -
    • - -

      #string Text :

      - -
    • -
    • - -

      #number Score :

      - -
    • -
    -
    -
    -
    -
    - - -SCORING:_AddMissionScore(Mission, PlayerUnit, Text, Score) - -
    -
    - -

    Registers Mission Scores for possible multiple players that contributed in the Mission.

    - -

    Parameters

    - -
    -
    -
    -
    - - -SCORING:_AddMissionTaskScore(Mission, PlayerUnit, Text, Score) - -
    -
    - -

    Registers Scores the players completing a Mission Task.

    - -

    Parameters

    - -
    -
    -
    -
    - - -SCORING:_AddPlayerFromUnit(UnitData) - -
    -
    - -

    Add a new player entering a Unit.

    - -

    Parameter

    - -
    -
    -
    -
    - - -SCORING:_EventOnDeadOrCrash(Event) - -
    -
    - -

    Track DEAD or CRASH events for the scoring.

    - -

    Parameter

    - -
    -
    -
    -
    - - -SCORING:_EventOnHit(Event) - -
    -
    - -

    Handles the OnHit event for the scoring.

    - -

    Parameter

    - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Sead.html b/docs/Documentation/Sead.html deleted file mode 100644 index ef7ee8a05..000000000 --- a/docs/Documentation/Sead.html +++ /dev/null @@ -1,319 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Sead

    - -

    Functional -- Provides defensive behaviour to a set of SAM sites within a running Mission.

    - - - -
    - - -

    Global(s)

    - - - - - -
    SEAD - -
    -

    Type SEAD

    - - - - - - - - - - - - - - - - - - - - - -
    SEAD.ClassName - -
    SEAD.New(table, self, SEADGroupPrefixes) -

    Creates the main object which is handling defensive actions for SA sites or moving SA vehicles.

    -
    SEAD.OnEventShot(#, EventData, self) -

    Detects if an SA site was shot with an anti radiation missile.

    -
    SEAD.SEADGroupPrefixes - -
    SEAD.TargetSkill - -
    - -

    Global(s)

    -
    -
    - - #SEAD - -SEAD - -
    -
    - - - -
    -
    -

    Type Sead

    - -

    Type SEAD

    - -

    The SEAD class

    - -

    Field(s)

    -
    -
    - - #string - -SEAD.ClassName - -
    -
    - - - -
    -
    -
    -
    - - -SEAD.New(table, self, SEADGroupPrefixes) - -
    -
    - -

    Creates the main object which is handling defensive actions for SA sites or moving SA vehicles.

    - - -

    When an anti radiation missile is fired (KH-58, KH-31P, KH-31A, KH-25MPU, HARM missiles), the SA will shut down their radars and will take evasive actions... -Chances are big that the missile will miss.

    - -

    Parameters

    -
      -
    • - -

      table : -string,...}|string SEADGroupPrefixes which is a table of Prefixes of the SA Groups in the DCSRTE on which evasive actions need to be taken.

      - -
    • -
    • - -

      self :

      - -
    • -
    • - -

      SEADGroupPrefixes :

      - -
    • -
    -

    Return value

    - - -

    SEAD

    - -

    Usage:

    -
    -- CCCP SEAD Defenses
    --- Defends the Russian SA installations from SEAD attacks.
    -SEAD_RU_SAM_Defenses = SEAD:New( { 'RU SA-6 Kub', 'RU SA-6 Defenses', 'RU MI-26 Troops', 'RU Attack Gori' } )
    - -
    -
    -
    -
    - - -SEAD.OnEventShot(#, EventData, self) - -
    -
    - -

    Detects if an SA site was shot with an anti radiation missile.

    - - -

    In this case, take evasive actions based on the skill level set within the ME.

    - -

    Parameters

    - -
    -
    -
    -
    - - - -SEAD.SEADGroupPrefixes - -
    -
    - - - -
    -
    -
    -
    - - - -SEAD.TargetSkill - -
    -
    - - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Set.html b/docs/Documentation/Set.html deleted file mode 100644 index 020a07e22..000000000 --- a/docs/Documentation/Set.html +++ /dev/null @@ -1,7154 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Set

    - -

    Core -- SET_ classes define collections of objects to perform bulk actions and logically group objects.

    - - - -

    Banner Image

    - -
    - -

    SET_ classes group objects of the same type into a collection, which is either:

    - -
      -
    • Manually managed using the :Add...() or :Remove...() methods. The initial SET can be filtered with the **SET_BASE.FilterOnce()** method
    • -
    • Dynamically updated when new objects are created or objects are destroyed using the **SET_BASE.FilterStart()** method.
    • -
    - -

    Various types of SET_ classes are available:

    - - - -

    These classes are derived from #SET_BASE, which contains the main methods to manage SETs.

    - -

    A multitude of other methods are available in SET_ classes that allow to:

    - -
      -
    • Validate the presence of objects in the SET.
    • -
    • Trigger events when objects in the SET change a zone presence.
    • -
    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SET_AIRBASE -

    5) SET_AIRBASE class, extends Set#SET_BASE

    - -

    Mission designers can use the Set#SET_AIRBASE class to build sets of airbases optionally belonging to certain:

    - -
      -
    • Coalitions
    • -
    - -

    5.1) SET_AIRBASE constructor

    - -

    Create a new SET_AIRBASE object with the SET_AIRBASE.New method:

    - - -
    SET_BASE -

    1) SET_BASE class, extends Base#BASE

    -

    The Set#SET_BASE class defines the core functions that define a collection of objects.

    -
    SET_CARGO -

    (R2.1) SET_CARGO class, extends Set#SET_BASE

    - -

    Mission designers can use the Set#SET_CARGO class to build sets of cargos optionally belonging to certain:

    - -
      -
    • Coalitions
    • -
    • Types
    • -
    • Name or Prefix
    • -
    - -

    SET_CARGO constructor

    - -

    Create a new SET_CARGO object with the SET_CARGO.New method:

    - - -
    SET_CLIENT -

    4) SET_CLIENT class, extends Set#SET_BASE

    - -

    Mission designers can use the Set#SET_CLIENT class to build sets of units belonging to certain:

    - -
      -
    • Coalitions
    • -
    • Categories
    • -
    • Countries
    • -
    • Client types
    • -
    • Starting with certain prefix strings.
    • -
    -
    SET_GROUP -

    SET_GROUP class, extends Set#SET_BASE

    - -

    Mission designers can use the Set#SET_GROUP class to build sets of groups belonging to certain:

    - -
      -
    • Coalitions
    • -
    • Categories
    • -
    • Countries
    • -
    • Starting with certain prefix strings.
    • -
    -
    SET_PLAYER -

    4) SET_PLAYER class, extends Set#SET_BASE

    - -

    Mission designers can use the Set#SET_PLAYER class to build sets of units belonging to alive players:

    - -

    4.1) SET_PLAYER constructor

    - -

    Create a new SET_PLAYER object with the SET_PLAYER.New method:

    - - -
    SET_STATIC -

    3) SET_STATIC class, extends Set#SET_BASE

    - -

    Mission designers can use the SET_STATIC class to build sets of Statics belonging to certain:

    - -
      -
    • Coalitions
    • -
    • Categories
    • -
    • Countries
    • -
    • Static types
    • -
    • Starting with certain prefix strings.
    • -
    -
    SET_UNIT -

    3) SET_UNIT class, extends Set#SET_BASE

    - -

    Mission designers can use the SET_UNIT class to build sets of units belonging to certain:

    - -
      -
    • Coalitions
    • -
    • Categories
    • -
    • Countries
    • -
    • Unit types
    • -
    • Starting with certain prefix strings.
    • -
    -
    -

    Type SET_AIRBASE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SET_AIRBASE:AddAirbasesByName(AddAirbaseNames) -

    Add AIRBASEs to SET_AIRBASE.

    -
    SET_AIRBASE:AddInDatabase(Event) -

    Handles the Database to check on an event (birth) that the Object was added in the Database.

    -
    SET_AIRBASE:FilterCategories(Categories) -

    Builds a set of airbases out of categories.

    -
    SET_AIRBASE:FilterCoalitions(Coalitions) -

    Builds a set of airbases of coalitions.

    -
    SET_AIRBASE:FilterStart() -

    Starts the filtering.

    -
    SET_AIRBASE:FindAirbase(AirbaseName) -

    Finds a Airbase based on the Airbase Name.

    -
    SET_AIRBASE:FindInDatabase(Event) -

    Handles the Database to check on any event that Object exists in the Database.

    -
    SET_AIRBASE:FindNearestAirbaseFromPointVec2(PointVec2) -

    Iterate the SET_AIRBASE while identifying the nearest Airbase#AIRBASE from a Point#POINT_VEC2.

    -
    SET_AIRBASE:ForEachAirbase(IteratorFunction, ...) -

    Iterate the SET_AIRBASE and call an interator function for each AIRBASE, providing the AIRBASE and optional parameters.

    -
    SET_AIRBASE:IsIncludeObject(MAirbase) - -
    SET_AIRBASE:New() -

    Creates a new SET_AIRBASE object, building a set of airbases belonging to a coalitions and categories.

    -
    SET_AIRBASE:RemoveAirbasesByName(RemoveAirbaseNames) -

    Remove AIRBASEs from SET_AIRBASE.

    -
    - -

    Type SET_BASE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SET_BASE:Add(ObjectName, Object) -

    Adds a Base#BASE object in the Set#SET_BASE, using a given ObjectName as the index.

    -
    SET_BASE:AddObject(Object) -

    Adds a Base#BASE object in the Set#SET_BASE, using the Object Name as the index.

    -
    SET_BASE.CallScheduler - -
    SET_BASE:Count() -

    Retrieves the amount of objects in the Set#SET_BASE and derived classes.

    -
    SET_BASE.Database - -
    SET_BASE.Filter - -
    SET_BASE:FilterCrashes() -

    Starts the filtering of the Crash events for the collection.

    -
    SET_BASE:FilterDeads() -

    Starts the filtering of the Dead events for the collection.

    -
    SET_BASE:FilterOnce() -

    Filters for the defined collection.

    -
    SET_BASE:FilterStop() -

    Stops the filtering for the defined collection.

    -
    SET_BASE:FindNearestObjectFromPointVec2(PointVec2) -

    Iterate the SET_BASE while identifying the nearest object from a Point#POINT_VEC2.

    -
    SET_BASE:Flush() -

    Flushes the current SET_BASE contents in the log ...

    -
    SET_BASE:ForEach(IteratorFunction, arg, Set, Function, FunctionArguments) -

    Iterate the SETBASE and derived classes and call an iterator function for the given SETBASE, providing the Object for each element within the set and optional parameters.

    -
    SET_BASE:Get(ObjectName) -

    Gets a Base#BASE object from the Set#SET_BASE and derived classes, based on the Object Name.

    -
    SET_BASE:GetFirst() -

    Gets the first object from the Set#SET_BASE and derived classes.

    -
    SET_BASE:GetLast() -

    Gets the last object from the Set#SET_BASE and derived classes.

    -
    SET_BASE:GetObjectNames() -

    Gets a string with all the object names.

    -
    SET_BASE:GetRandom() -

    Gets a random object from the Set#SET_BASE and derived classes.

    -
    SET_BASE:GetSet() -

    Gets the Set.

    -
    SET_BASE:GetSetNames() -

    Gets a list of the Names of the Objects in the Set.

    -
    SET_BASE:GetSetObjects() -

    Gets a list of the Objects in the Set.

    -
    SET_BASE:IsIncludeObject(Object) -

    Decides whether to include the Object

    -
    SET_BASE.List - -
    SET_BASE:New(Database) -

    Creates a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

    -
    SET_BASE:Remove(ObjectName) -

    Removes a Base#BASE object from the Set#SET_BASE and derived classes, based on the Object Name.

    -
    SET_BASE.Set - -
    SET_BASE:SetDatabase(BaseSet) -

    Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

    -
    SET_BASE:SetIteratorIntervals(YieldInterval, TimeInterval) -

    Define the SET iterator "yield interval" and the "time interval".

    -
    SET_BASE.TimeInterval - -
    SET_BASE.YieldInterval - -
    SET_BASE:_EventOnBirth(Event) -

    Handles the OnBirth event for the Set.

    -
    SET_BASE:_EventOnDeadOrCrash(Event) -

    Handles the OnDead or OnCrash event for alive units set.

    -
    SET_BASE:_FilterStart() -

    Starts the filtering for the defined collection.

    -
    SET_BASE:_Find(ObjectName) -

    Finds an Base#BASE object based on the object Name.

    -
    - -

    Type SET_CARGO

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SET_CARGO:AddCargosByName(AddCargoNames) -

    (R2.1) Add CARGOs to SET_CARGO.

    -
    SET_CARGO:AddInDatabase(Event) -

    (R2.1) Handles the Database to check on an event (birth) that the Object was added in the Database.

    -
    SET_CARGO:FilterCoalitions(Coalitions) -

    (R2.1) Builds a set of cargos of coalitions.

    -
    SET_CARGO:FilterCountries(Countries) -

    (R2.1) Builds a set of cargos of defined countries.

    -
    SET_CARGO:FilterPrefixes(Prefixes) -

    (R2.1) Builds a set of cargos of defined cargo prefixes.

    -
    SET_CARGO:FilterStart() -

    (R2.1) Starts the filtering.

    -
    SET_CARGO:FilterTypes(Types) -

    (R2.1) Builds a set of cargos of defined cargo types.

    -
    SET_CARGO:FindCargo(CargoName) -

    (R2.1) Finds a Cargo based on the Cargo Name.

    -
    SET_CARGO:FindInDatabase(Event) -

    (R2.1) Handles the Database to check on any event that Object exists in the Database.

    -
    SET_CARGO:FindNearestCargoFromPointVec2(PointVec2) -

    (R2.1) Iterate the SET_CARGO while identifying the nearest Cargo#CARGO from a Point#POINT_VEC2.

    -
    SET_CARGO:ForEachCargo(IteratorFunction, ...) -

    (R2.1) Iterate the SET_CARGO and call an interator function for each CARGO, providing the CARGO and optional parameters.

    -
    SET_CARGO:IsIncludeObject(MCargo) -

    (R2.1)

    -
    SET_CARGO:New() -

    (R2.1) Creates a new SET_CARGO object, building a set of cargos belonging to a coalitions and categories.

    -
    SET_CARGO:OnEventDeleteCargo(EventData) -

    (R2.1) Handles the OnDead or OnCrash event for alive units set.

    -
    SET_CARGO:OnEventNewCargo(EventData) -

    (R2.1) Handles the OnEventNewCargo event for the Set.

    -
    SET_CARGO:RemoveCargosByName(RemoveCargoNames) -

    (R2.1) Remove CARGOs from SET_CARGO.

    -
    - -

    Type SET_CLIENT

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SET_CLIENT:AddClientsByName(AddClientNames) -

    Add CLIENT(s) to SET_CLIENT.

    -
    SET_CLIENT:AddInDatabase(Event) -

    Handles the Database to check on an event (birth) that the Object was added in the Database.

    -
    SET_CLIENT:FilterCategories(Categories) -

    Builds a set of clients out of categories.

    -
    SET_CLIENT:FilterCoalitions(Coalitions) -

    Builds a set of clients of coalitions.

    -
    SET_CLIENT:FilterCountries(Countries) -

    Builds a set of clients of defined countries.

    -
    SET_CLIENT:FilterPrefixes(Prefixes) -

    Builds a set of clients of defined client prefixes.

    -
    SET_CLIENT:FilterStart() -

    Starts the filtering.

    -
    SET_CLIENT:FilterTypes(Types) -

    Builds a set of clients of defined client types.

    -
    SET_CLIENT:FindClient(ClientName) -

    Finds a Client based on the Client Name.

    -
    SET_CLIENT:FindInDatabase(Event) -

    Handles the Database to check on any event that Object exists in the Database.

    -
    SET_CLIENT:ForEachClient(IteratorFunction, ...) -

    Iterate the SET_CLIENT and call an interator function for each alive CLIENT, providing the CLIENT and optional parameters.

    -
    SET_CLIENT:ForEachClientInZone(ZoneObject, IteratorFunction, ...) -

    Iterate the SET_CLIENT and call an iterator function for each alive CLIENT presence completely in a Zone, providing the CLIENT and optional parameters to the called function.

    -
    SET_CLIENT:ForEachClientNotInZone(ZoneObject, IteratorFunction, ...) -

    Iterate the SET_CLIENT and call an iterator function for each alive CLIENT presence not in a Zone, providing the CLIENT and optional parameters to the called function.

    -
    SET_CLIENT:IsIncludeObject(MClient) - -
    SET_CLIENT:New() -

    Creates a new SET_CLIENT object, building a set of clients belonging to a coalitions, categories, countries, types or with defined prefix names.

    -
    SET_CLIENT:RemoveClientsByName(RemoveClientNames) -

    Remove CLIENT(s) from SET_CLIENT.

    -
    - -

    Type SET_GROUP

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SET_GROUP:AddGroupsByName(AddGroupNames) -

    Add GROUP(s) to SET_GROUP.

    -
    SET_GROUP:AddInDatabase(Event) -

    Handles the Database to check on an event (birth) that the Object was added in the Database.

    -
    SET_GROUP:AllCompletelyInZone(ZoneObject, Zone) -

    Iterate the SET_GROUP and return true if all the Wrapper.Group#GROUP are completely in the Core.Zone#ZONE

    -
    SET_GROUP:AnyCompletelyInZone(ZoneObject, Zone) -

    Iterate the SET_GROUP and return true if at least one of the Wrapper.Group#GROUP is completely inside the Core.Zone#ZONE

    -
    SET_GROUP:AnyInZone(ZoneObject, Zone) -

    Iterate the SET_GROUP and return true if at least one #UNIT of one GROUP of the SET_GROUP is in ZONE

    -
    SET_GROUP:AnyPartlyInZone(ZoneObject, Zone) -

    Iterate the SET_GROUP and return true if at least one GROUP of the SET_GROUP is partly in ZONE.

    -
    SET_GROUP:CountInZone(ZoneObject, Zone) -

    Iterate the SETGROUP and count how many GROUPs are completely in the Zone -That could easily be done with SETGROUP:ForEachGroupCompletelyInZone(), but this function -provides an easy to use shortcut...

    -
    SET_GROUP:CountUnitInZone(ZoneObject, Zone) -

    Iterate the SET_GROUP and count how many UNITs are completely in the Zone

    -
    SET_GROUP:FilterCategories(Categories) -

    Builds a set of groups out of categories.

    -
    SET_GROUP:FilterCategoryAirplane() -

    Builds a set of groups out of airplane category.

    -
    SET_GROUP:FilterCategoryGround() -

    Builds a set of groups out of ground category.

    -
    SET_GROUP:FilterCategoryHelicopter() -

    Builds a set of groups out of helicopter category.

    -
    SET_GROUP:FilterCategoryShip() -

    Builds a set of groups out of ship category.

    -
    SET_GROUP:FilterCategoryStructure() -

    Builds a set of groups out of structure category.

    -
    SET_GROUP:FilterCoalitions(Coalitions) -

    Builds a set of groups of coalitions.

    -
    SET_GROUP:FilterCountries(Countries) -

    Builds a set of groups of defined countries.

    -
    SET_GROUP:FilterPrefixes(Prefixes) -

    Builds a set of groups of defined GROUP prefixes.

    -
    SET_GROUP:FilterStart() -

    Starts the filtering.

    -
    SET_GROUP:FindGroup(GroupName) -

    Finds a Group based on the Group Name.

    -
    SET_GROUP:FindInDatabase(Event) -

    Handles the Database to check on any event that Object exists in the Database.

    -
    SET_GROUP:FindNearestGroupFromPointVec2(PointVec2) -

    Iterate the SET_GROUP while identifying the nearest object from a Point#POINT_VEC2.

    -
    SET_GROUP:ForEachGroup(IteratorFunction, ...) -

    Iterate the SET_GROUP and call an iterator function for each alive GROUP, providing the GROUP and optional parameters.

    -
    SET_GROUP:ForEachGroupCompletelyInZone(ZoneObject, IteratorFunction, ...) -

    Iterate the SET_GROUP and call an iterator function for each alive GROUP presence completely in a Zone, providing the GROUP and optional parameters to the called function.

    -
    SET_GROUP:ForEachGroupNotInZone(ZoneObject, IteratorFunction, ...) -

    Iterate the SET_GROUP and call an iterator function for each alive GROUP presence not in a Zone, providing the GROUP and optional parameters to the called function.

    -
    SET_GROUP:ForEachGroupPartlyInZone(ZoneObject, IteratorFunction, ...) -

    Iterate the SET_GROUP and call an iterator function for each alive GROUP presence partly in a Zone, providing the GROUP and optional parameters to the called function.

    -
    SET_GROUP:IsIncludeObject(MooseGroup) - -
    SET_GROUP:New() -

    Creates a new SET_GROUP object, building a set of groups belonging to a coalitions, categories, countries, types or with defined prefix names.

    -
    SET_GROUP:NoneInZone(ZoneObject, Zone) -

    Iterate the SET_GROUP and return true if no GROUP of the SET_GROUP is in ZONE -This could also be achieved with not SET_GROUP:AnyPartlyInZone(Zone), but it's easier for the -mission designer to add a dedicated method

    -
    SET_GROUP:RemoveGroupsByName(RemoveGroupNames) -

    Remove GROUP(s) from SET_GROUP.

    -
    SET_GROUP:_EventOnDeadOrCrash(Event) -

    Handles the OnDead or OnCrash event for alive groups set.

    -
    - -

    Type SET_PLAYER

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SET_PLAYER:AddClientsByName(AddClientNames) -

    Add CLIENT(s) to SET_PLAYER.

    -
    SET_PLAYER:AddInDatabase(Event) -

    Handles the Database to check on an event (birth) that the Object was added in the Database.

    -
    SET_PLAYER:FilterCategories(Categories) -

    Builds a set of clients out of categories joined by players.

    -
    SET_PLAYER:FilterCoalitions(Coalitions) -

    Builds a set of clients of coalitions joined by specific players.

    -
    SET_PLAYER:FilterCountries(Countries) -

    Builds a set of clients of defined countries.

    -
    SET_PLAYER:FilterPrefixes(Prefixes) -

    Builds a set of clients of defined client prefixes.

    -
    SET_PLAYER:FilterStart() -

    Starts the filtering.

    -
    SET_PLAYER:FilterTypes(Types) -

    Builds a set of clients of defined client types joined by players.

    -
    SET_PLAYER:FindClient(PlayerName) -

    Finds a Client based on the Player Name.

    -
    SET_PLAYER:FindInDatabase(Event) -

    Handles the Database to check on any event that Object exists in the Database.

    -
    SET_PLAYER:ForEachPlayer(IteratorFunction, ...) -

    Iterate the SET_PLAYER and call an interator function for each alive CLIENT, providing the CLIENT and optional parameters.

    -
    SET_PLAYER:ForEachPlayerInZone(ZoneObject, IteratorFunction, ...) -

    Iterate the SET_PLAYER and call an iterator function for each alive CLIENT presence completely in a Zone, providing the CLIENT and optional parameters to the called function.

    -
    SET_PLAYER:ForEachPlayerNotInZone(ZoneObject, IteratorFunction, ...) -

    Iterate the SET_PLAYER and call an iterator function for each alive CLIENT presence not in a Zone, providing the CLIENT and optional parameters to the called function.

    -
    SET_PLAYER:IsIncludeObject(MClient) - -
    SET_PLAYER:New() -

    Creates a new SET_PLAYER object, building a set of clients belonging to a coalitions, categories, countries, types or with defined prefix names.

    -
    SET_PLAYER:RemoveClientsByName(RemoveClientNames) -

    Remove CLIENT(s) from SET_PLAYER.

    -
    - -

    Type SET_STATIC

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SET_STATIC:AddInDatabase(Event) -

    Handles the Database to check on an event (birth) that the Object was added in the Database.

    -
    SET_STATIC:AddStatic(AddStatic) -

    Add STATIC(s) to SET_STATIC.

    -
    SET_STATIC:AddStaticsByName(AddStaticNames) -

    Add STATIC(s) to SET_STATIC.

    -
    SET_STATIC:FilterCategories(Categories) -

    Builds a set of units out of categories.

    -
    SET_STATIC:FilterCoalitions(Coalitions) -

    Builds a set of units of coalitions.

    -
    SET_STATIC:FilterCountries(Countries) -

    Builds a set of units of defined countries.

    -
    SET_STATIC:FilterPrefixes(Prefixes) -

    Builds a set of units of defined unit prefixes.

    -
    SET_STATIC:FilterStart() -

    Starts the filtering.

    -
    SET_STATIC:FilterTypes(Types) -

    Builds a set of units of defined unit types.

    -
    SET_STATIC:FindInDatabase(Event) -

    Handles the Database to check on any event that Object exists in the Database.

    -
    SET_STATIC:FindStatic(StaticName) -

    Finds a Static based on the Static Name.

    -
    SET_STATIC:ForEachStatic(IteratorFunction, ...) -

    Iterate the SET_STATIC and call an interator function for each alive STATIC, providing the STATIC and optional parameters.

    -
    SET_STATIC:ForEachStaticCompletelyInZone(ZoneObject, IteratorFunction, ...) -

    Iterate the SET_STATIC and call an iterator function for each alive STATIC presence completely in a Zone, providing the STATIC and optional parameters to the called function.

    -
    SET_STATIC:ForEachStaticInZone(IteratorFunction, ...) -

    Check if minimal one element of the SET_STATIC is in the Zone.

    -
    SET_STATIC:ForEachStaticNotInZone(ZoneObject, IteratorFunction, ...) -

    Iterate the SET_STATIC and call an iterator function for each alive STATIC presence not in a Zone, providing the STATIC and optional parameters to the called function.

    -
    SET_STATIC:GetCoordinate() -

    Get the center coordinate of the SET_STATIC.

    -
    SET_STATIC:GetFirst() -

    Get the first unit from the set.

    -
    SET_STATIC:GetHeading() -

    Get the average heading of the SET_STATIC.

    -
    SET_STATIC:GetStaticTypes() -

    Returns map of unit types.

    -
    SET_STATIC:GetStaticTypesText() -

    Returns a comma separated string of the unit types with a count in the Set.

    -
    SET_STATIC:GetTypeNames(Delimiter) -

    Retrieve the type names of the Statics in the SET, delimited by an optional delimiter.

    -
    SET_STATIC:GetVelocity() -

    Get the maximum velocity of the SET_STATIC.

    -
    SET_STATIC:IsIncludeObject(MStatic) - -
    SET_STATIC:IsNotInZone(ZoneObject, Zone) -

    Check if no element of the SET_STATIC is in the Zone.

    -
    SET_STATIC:IsPatriallyInZone(Zone) -

    Check if minimal one element of the SET_STATIC is in the Zone.

    -
    SET_STATIC:New() -

    Creates a new SET_STATIC object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

    -
    SET_STATIC:RemoveStaticsByName(RemoveStaticNames) -

    Remove STATIC(s) from SET_STATIC.

    -
    - -

    Type SET_UNIT

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SET_UNIT:AddInDatabase(Event) -

    Handles the Database to check on an event (birth) that the Object was added in the Database.

    -
    SET_UNIT:AddUnit(AddUnit) -

    Add UNIT(s) to SET_UNIT.

    -
    SET_UNIT:AddUnitsByName(AddUnitNames) -

    Add UNIT(s) to SET_UNIT.

    -
    SET_UNIT:CalculateThreatLevelA2G() -

    Calculate the maxium A2G threat level of the SET_UNIT.

    -
    SET_UNIT:FilterCategories(Categories) -

    Builds a set of units out of categories.

    -
    SET_UNIT:FilterCoalitions(Coalitions) -

    Builds a set of units of coalitions.

    -
    SET_UNIT:FilterCountries(Countries) -

    Builds a set of units of defined countries.

    -
    SET_UNIT:FilterHasRadar(RadarTypes) -

    Builds a set of units having a radar of give types.

    -
    SET_UNIT:FilterHasSEAD() -

    Builds a set of SEADable units.

    -
    SET_UNIT:FilterPrefixes(Prefixes) -

    Builds a set of units of defined unit prefixes.

    -
    SET_UNIT:FilterStart() -

    Starts the filtering.

    -
    SET_UNIT:FilterTypes(Types) -

    Builds a set of units of defined unit types.

    -
    SET_UNIT:FindInDatabase(Event) -

    Handles the Database to check on any event that Object exists in the Database.

    -
    SET_UNIT:FindUnit(UnitName) -

    Finds a Unit based on the Unit Name.

    -
    SET_UNIT:ForEachUnit(IteratorFunction, ...) -

    Iterate the SET_UNIT and call an interator function for each alive UNIT, providing the UNIT and optional parameters.

    -
    SET_UNIT:ForEachUnitCompletelyInZone(ZoneObject, IteratorFunction, ...) -

    Iterate the SET_UNIT and call an iterator function for each alive UNIT presence completely in a Zone, providing the UNIT and optional parameters to the called function.

    -
    SET_UNIT:ForEachUnitInZone(IteratorFunction, ...) -

    Check if minimal one element of the SET_UNIT is in the Zone.

    -
    SET_UNIT:ForEachUnitNotInZone(ZoneObject, IteratorFunction, ...) -

    Iterate the SET_UNIT and call an iterator function for each alive UNIT presence not in a Zone, providing the UNIT and optional parameters to the called function.

    -
    SET_UNIT:ForEachUnitPerThreatLevel(FromThreatLevel, ToThreatLevel, IteratorFunction, ...) -

    Iterate the SET_UNIT sorted *per Threat Level and call an interator function for each alive UNIT, providing the UNIT and optional parameters.

    - -
    SET_UNIT:GetCoordinate() -

    Get the center coordinate of the SET_UNIT.

    -
    SET_UNIT:GetFirst() -

    Get the first unit from the set.

    -
    SET_UNIT:GetHeading() -

    Get the average heading of the SET_UNIT.

    -
    SET_UNIT:GetTypeNames(Delimiter) -

    Retrieve the type names of the Units in the SET, delimited by an optional delimiter.

    -
    SET_UNIT:GetUnitThreatLevels() -

    Returns map of unit threat levels.

    -
    SET_UNIT:GetUnitTypes() -

    Returns map of unit types.

    -
    SET_UNIT:GetUnitTypesText() -

    Returns a comma separated string of the unit types with a count in the Set.

    -
    SET_UNIT:GetVelocity() -

    Get the maximum velocity of the SET_UNIT.

    -
    SET_UNIT:HasFriendlyUnits(FriendlyCoalition) -

    Returns if the Set has friendly ground units.

    -
    SET_UNIT:HasGroundUnits() -

    Returns if the Set has ground targets.

    -
    SET_UNIT:HasRadar(RadarType) -

    Returns if the Set has targets having a radar (of a given type).

    -
    SET_UNIT:HasSEAD() -

    Returns if the Set has targets that can be SEADed.

    -
    SET_UNIT:IsIncludeObject(MUnit) - -
    SET_UNIT:IsNotInZone(ZoneObject, Zone) -

    Check if no element of the SET_UNIT is in the Zone.

    -
    SET_UNIT:IsPartiallyInZone(ZoneTest) -

    Check if minimal one element of the SET_UNIT is in the Zone.

    -
    SET_UNIT:New() -

    Creates a new SET_UNIT object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

    -
    SET_UNIT:RemoveUnitsByName(RemoveUnitNames) -

    Remove UNIT(s) from SET_UNIT.

    -
    - -

    Global(s)

    -
    -
    - - #SET_AIRBASE - -SET_AIRBASE - -
    -
    - -

    5) SET_AIRBASE class, extends Set#SET_BASE

    - -

    Mission designers can use the Set#SET_AIRBASE class to build sets of airbases optionally belonging to certain:

    - -
      -
    • Coalitions
    • -
    - -

    5.1) SET_AIRBASE constructor

    - -

    Create a new SET_AIRBASE object with the SET_AIRBASE.New method:

    - - - - -

    -

    5.2) Add or Remove AIRBASEs from SET_AIRBASE

    - -

    AIRBASEs can be added and removed using the Set#SET_AIRBASE.AddAirbasesByName and Set#SET_AIRBASE.RemoveAirbasesByName respectively. -These methods take a single AIRBASE name or an array of AIRBASE names to be added or removed from SET_AIRBASE.

    - -

    5.3) SET_AIRBASE filter criteria

    - -

    You can set filter criteria to define the set of clients within the SET_AIRBASE. -Filter criteria are defined by:

    - - - -

    Once the filter criteria have been set for the SET_AIRBASE, you can start filtering using:

    - - - -

    5.4) SET_AIRBASE iterators

    - -

    Once the filters have been defined and the SETAIRBASE has been built, you can iterate the SETAIRBASE with the available iterator methods. -The iterator methods will walk the SETAIRBASE set, and call for each airbase within the set a function that you provide. -The following iterator methods are currently available within the SETAIRBASE:

    - - - -
    - -
    -
    -
    -
    - - #SET_BASE - -SET_BASE - -
    -
    - -

    1) SET_BASE class, extends Base#BASE

    -

    The Set#SET_BASE class defines the core functions that define a collection of objects.

    - - -

    A SET provides iterators to iterate the SET, but will temporarily yield the ForEach interator loop at defined "intervals" to the mail simulator loop. -In this way, large loops can be done while not blocking the simulator main processing loop. -The default "yield interval" is after 10 objects processed. -The default "time interval" is after 0.001 seconds.

    - -

    1.1) Add or remove objects from the SET

    - -

    Some key core functions are Set#SET_BASE.Add and Set#SET_BASE.Remove to add or remove objects from the SET in your logic.

    - -

    1.2) Define the SET iterator "yield interval" and the "time interval"

    - -

    Modify the iterator intervals with the Set#SET_BASE.SetInteratorIntervals method. -You can set the "yield interval", and the "time interval". (See above).

    - - -
    -
    -
    -
    - - #SET_CARGO - -SET_CARGO - -
    -
    - -

    (R2.1) SET_CARGO class, extends Set#SET_BASE

    - -

    Mission designers can use the Set#SET_CARGO class to build sets of cargos optionally belonging to certain:

    - -
      -
    • Coalitions
    • -
    • Types
    • -
    • Name or Prefix
    • -
    - -

    SET_CARGO constructor

    - -

    Create a new SET_CARGO object with the SET_CARGO.New method:

    - - - - -

    -

    Add or Remove CARGOs from SET_CARGO

    - -

    CARGOs can be added and removed using the Set#SET_CARGO.AddCargosByName and Set#SET_CARGO.RemoveCargosByName respectively. -These methods take a single CARGO name or an array of CARGO names to be added or removed from SET_CARGO.

    - -

    SET_CARGO filter criteria

    - -

    You can set filter criteria to automatically maintain the SET_CARGO contents. -Filter criteria are defined by:

    - - - -

    Once the filter criteria have been set for the SET_CARGO, you can start filtering using:

    - - - -

    SET_CARGO iterators

    - -

    Once the filters have been defined and the SETCARGO has been built, you can iterate the SETCARGO with the available iterator methods. -The iterator methods will walk the SETCARGO set, and call for each cargo within the set a function that you provide. -The following iterator methods are currently available within the SETCARGO:

    - - - - -
    -
    -
    -
    - - #SET_CLIENT - -SET_CLIENT - -
    -
    - -

    4) SET_CLIENT class, extends Set#SET_BASE

    - -

    Mission designers can use the Set#SET_CLIENT class to build sets of units belonging to certain:

    - -
      -
    • Coalitions
    • -
    • Categories
    • -
    • Countries
    • -
    • Client types
    • -
    • Starting with certain prefix strings.
    • -
    - - -

    -

    4.1) SET_CLIENT constructor

    - -

    Create a new SET_CLIENT object with the SET_CLIENT.New method:

    - - - -

    4.2) Add or Remove CLIENT(s) from SET_CLIENT

    - -

    CLIENTs can be added and removed using the Set#SET_CLIENT.AddClientsByName and Set#SET_CLIENT.RemoveClientsByName respectively. -These methods take a single CLIENT name or an array of CLIENT names to be added or removed from SET_CLIENT.

    - -

    4.3) SET_CLIENT filter criteria

    - -

    You can set filter criteria to define the set of clients within the SET_CLIENT. -Filter criteria are defined by:

    - - - -

    Once the filter criteria have been set for the SET_CLIENT, you can start filtering using:

    - - - -

    Planned filter criteria within development are (so these are not yet available):

    - - - -

    4.4) SET_CLIENT iterators

    - -

    Once the filters have been defined and the SETCLIENT has been built, you can iterate the SETCLIENT with the available iterator methods. -The iterator methods will walk the SETCLIENT set, and call for each element within the set a function that you provide. -The following iterator methods are currently available within the SETCLIENT:

    - - - -
    - -
    -
    -
    -
    - - #SET_GROUP - -SET_GROUP - -
    -
    - -

    SET_GROUP class, extends Set#SET_BASE

    - -

    Mission designers can use the Set#SET_GROUP class to build sets of groups belonging to certain:

    - -
      -
    • Coalitions
    • -
    • Categories
    • -
    • Countries
    • -
    • Starting with certain prefix strings.
    • -
    - - -

    -

    1. SET_GROUP constructor

    - -

    Create a new SET_GROUP object with the SET_GROUP.New method:

    - - - -

    2. Add or Remove GROUP(s) from SET_GROUP

    - -

    GROUPS can be added and removed using the Set#SET_GROUP.AddGroupsByName and Set#SET_GROUP.RemoveGroupsByName respectively. -These methods take a single GROUP name or an array of GROUP names to be added or removed from SET_GROUP.

    - -

    3. SET_GROUP filter criteria

    - -

    You can set filter criteria to define the set of groups within the SET_GROUP. -Filter criteria are defined by:

    - - - -

    For the Category Filter, extra methods have been added:

    - - - - -

    Once the filter criteria have been set for the SET_GROUP, you can start filtering using:

    - -
      -
    • SET_GROUP.FilterStart: Starts the filtering of the groups within the SET_GROUP and add or remove GROUP objects dynamically.
    • -
    - -

    Planned filter criteria within development are (so these are not yet available):

    - - - -

    4. SET_GROUP iterators

    - -

    Once the filters have been defined and the SETGROUP has been built, you can iterate the SETGROUP with the available iterator methods. -The iterator methods will walk the SETGROUP set, and call for each element within the set a function that you provide. -The following iterator methods are currently available within the SETGROUP:

    - -
      -
    • SET_GROUP.ForEachGroup: Calls a function for each alive group it finds within the SET_GROUP.
    • -
    • SET_GROUP.ForEachGroupCompletelyInZone: Iterate the SET_GROUP and call an iterator function for each alive GROUP presence completely in a Zone, providing the GROUP and optional parameters to the called function.
    • -
    • SET_GROUP.ForEachGroupPartlyInZone: Iterate the SET_GROUP and call an iterator function for each alive GROUP presence partly in a Zone, providing the GROUP and optional parameters to the called function.
    • -
    • SET_GROUP.ForEachGroupNotInZone: Iterate the SET_GROUP and call an iterator function for each alive GROUP presence not in a Zone, providing the GROUP and optional parameters to the called function.
    • -
    - -
    - -
    -
    -
    -
    - - #SET_PLAYER - -SET_PLAYER - -
    -
    - -

    4) SET_PLAYER class, extends Set#SET_BASE

    - -

    Mission designers can use the Set#SET_PLAYER class to build sets of units belonging to alive players:

    - -

    4.1) SET_PLAYER constructor

    - -

    Create a new SET_PLAYER object with the SET_PLAYER.New method:

    - - - - -

    -

    4.3) SET_PLAYER filter criteria

    - -

    You can set filter criteria to define the set of clients within the SET_PLAYER. -Filter criteria are defined by:

    - - - -

    Once the filter criteria have been set for the SET_PLAYER, you can start filtering using:

    - - - -

    Planned filter criteria within development are (so these are not yet available):

    - - - -

    4.4) SET_PLAYER iterators

    - -

    Once the filters have been defined and the SETPLAYER has been built, you can iterate the SETPLAYER with the available iterator methods. -The iterator methods will walk the SETPLAYER set, and call for each element within the set a function that you provide. -The following iterator methods are currently available within the SETPLAYER:

    - - - -
    - -
    -
    -
    -
    - - #SET_STATIC - -SET_STATIC - -
    -
    - -

    3) SET_STATIC class, extends Set#SET_BASE

    - -

    Mission designers can use the SET_STATIC class to build sets of Statics belonging to certain:

    - -
      -
    • Coalitions
    • -
    • Categories
    • -
    • Countries
    • -
    • Static types
    • -
    • Starting with certain prefix strings.
    • -
    - - -

    -

    3.1) SET_STATIC constructor

    - -

    Create a new SET_STATIC object with the SET_STATIC.New method:

    - - - -

    3.2) Add or Remove STATIC(s) from SET_STATIC

    - -

    STATICs can be added and removed using the Set#SET_STATIC.AddStaticsByName and Set#SET_STATIC.RemoveStaticsByName respectively. -These methods take a single STATIC name or an array of STATIC names to be added or removed from SET_STATIC.

    - -

    3.3) SET_STATIC filter criteria

    - -

    You can set filter criteria to define the set of units within the SET_STATIC. -Filter criteria are defined by:

    - - - -

    Once the filter criteria have been set for the SET_STATIC, you can start filtering using:

    - - - -

    Planned filter criteria within development are (so these are not yet available):

    - - - -

    3.4) SET_STATIC iterators

    - -

    Once the filters have been defined and the SETSTATIC has been built, you can iterate the SETSTATIC with the available iterator methods. -The iterator methods will walk the SETSTATIC set, and call for each element within the set a function that you provide. -The following iterator methods are currently available within the SETSTATIC:

    - -
      -
    • SET_STATIC.ForEachStatic: Calls a function for each alive unit it finds within the SET_STATIC.
    • -
    • SET_GROUP.ForEachGroupCompletelyInZone: Iterate the SET_GROUP and call an iterator function for each alive GROUP presence completely in a Zone, providing the GROUP and optional parameters to the called function.
    • -
    • SET_GROUP.ForEachGroupNotInZone: Iterate the SET_GROUP and call an iterator function for each alive GROUP presence not in a Zone, providing the GROUP and optional parameters to the called function.
    • -
    - -

    Planned iterators methods in development are (so these are not yet available):

    - - - -

    3.5 ) SET_STATIC atomic methods

    - -

    Various methods exist for a SETSTATIC to perform actions or calculations and retrieve results from the SETSTATIC:

    - - - -
    - -
    -
    -
    -
    - - #SET_UNIT - -SET_UNIT - -
    -
    - -

    3) SET_UNIT class, extends Set#SET_BASE

    - -

    Mission designers can use the SET_UNIT class to build sets of units belonging to certain:

    - -
      -
    • Coalitions
    • -
    • Categories
    • -
    • Countries
    • -
    • Unit types
    • -
    • Starting with certain prefix strings.
    • -
    - - -

    -

    3.1) SET_UNIT constructor

    - -

    Create a new SET_UNIT object with the SET_UNIT.New method:

    - - - -

    3.2) Add or Remove UNIT(s) from SET_UNIT

    - -

    UNITs can be added and removed using the Set#SET_UNIT.AddUnitsByName and Set#SET_UNIT.RemoveUnitsByName respectively. -These methods take a single UNIT name or an array of UNIT names to be added or removed from SET_UNIT.

    - -

    3.3) SET_UNIT filter criteria

    - -

    You can set filter criteria to define the set of units within the SET_UNIT. -Filter criteria are defined by:

    - - - -

    Once the filter criteria have been set for the SET_UNIT, you can start filtering using:

    - - - -

    Planned filter criteria within development are (so these are not yet available):

    - - - -

    3.4) SET_UNIT iterators

    - -

    Once the filters have been defined and the SETUNIT has been built, you can iterate the SETUNIT with the available iterator methods. -The iterator methods will walk the SETUNIT set, and call for each element within the set a function that you provide. -The following iterator methods are currently available within the SETUNIT:

    - -
      -
    • SET_UNIT.ForEachUnit: Calls a function for each alive unit it finds within the SET_UNIT.
    • -
    • SET_GROUP.ForEachGroupCompletelyInZone: Iterate the SET_GROUP and call an iterator function for each alive GROUP presence completely in a Zone, providing the GROUP and optional parameters to the called function.
    • -
    • SET_GROUP.ForEachGroupNotInZone: Iterate the SET_GROUP and call an iterator function for each alive GROUP presence not in a Zone, providing the GROUP and optional parameters to the called function.
    • -
    - -

    Planned iterators methods in development are (so these are not yet available):

    - - - -

    3.5 ) SET_UNIT atomic methods

    - -

    Various methods exist for a SETUNIT to perform actions or calculations and retrieve results from the SETUNIT:

    - - - -
    - -
    -
    -

    Type Set

    - -

    Type SET_AIRBASE

    -

    Field(s)

    -
    -
    - - -SET_AIRBASE:AddAirbasesByName(AddAirbaseNames) - -
    -
    - -

    Add AIRBASEs to SET_AIRBASE.

    - -

    Parameter

    -
      -
    • - -

      #string AddAirbaseNames : -A single name or an array of AIRBASE names.

      - -
    • -
    -

    Return value

    - - -

    self

    - -
    -
    -
    -
    - - -SET_AIRBASE:AddInDatabase(Event) - -
    -
    - -

    Handles the Database to check on an event (birth) that the Object was added in the Database.

    - - -

    This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

    - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      #string: -The name of the AIRBASE

      - -
    2. -
    3. - -

      #table: -The AIRBASE

      - -
    4. -
    -
    -
    -
    -
    - - -SET_AIRBASE:FilterCategories(Categories) - -
    -
    - -

    Builds a set of airbases out of categories.

    - - -

    Possible current categories are plane, helicopter, ground, ship.

    - -

    Parameter

    -
      -
    • - -

      #string Categories : -Can take the following values: "airdrome", "helipad", "ship".

      - -
    • -
    -

    Return value

    - -

    #SET_AIRBASE: -self

    - -
    -
    -
    -
    - - -SET_AIRBASE:FilterCoalitions(Coalitions) - -
    -
    - -

    Builds a set of airbases of coalitions.

    - - -

    Possible current coalitions are red, blue and neutral.

    - -

    Parameter

    -
      -
    • - -

      #string Coalitions : -Can take the following values: "red", "blue", "neutral".

      - -
    • -
    -

    Return value

    - -

    #SET_AIRBASE: -self

    - -
    -
    -
    -
    - - -SET_AIRBASE:FilterStart() - -
    -
    - -

    Starts the filtering.

    - -

    Return value

    - -

    #SET_AIRBASE: -self

    - -
    -
    -
    -
    - - -SET_AIRBASE:FindAirbase(AirbaseName) - -
    -
    - -

    Finds a Airbase based on the Airbase Name.

    - -

    Parameter

    -
      -
    • - -

      #string AirbaseName :

      - -
    • -
    -

    Return value

    - -

    Wrapper.Airbase#AIRBASE: -The found Airbase.

    - -
    -
    -
    -
    - - -SET_AIRBASE:FindInDatabase(Event) - -
    -
    - -

    Handles the Database to check on any event that Object exists in the Database.

    - - -

    This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

    - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      #string: -The name of the AIRBASE

      - -
    2. -
    3. - -

      #table: -The AIRBASE

      - -
    4. -
    -
    -
    -
    -
    - - -SET_AIRBASE:FindNearestAirbaseFromPointVec2(PointVec2) - -
    -
    - -

    Iterate the SET_AIRBASE while identifying the nearest Airbase#AIRBASE from a Point#POINT_VEC2.

    - -

    Parameter

    - -

    Return value

    - -

    Wrapper.Airbase#AIRBASE: -The closest Airbase#AIRBASE.

    - -
    -
    -
    -
    - - -SET_AIRBASE:ForEachAirbase(IteratorFunction, ...) - -
    -
    - -

    Iterate the SET_AIRBASE and call an interator function for each AIRBASE, providing the AIRBASE and optional parameters.

    - -

    Parameters

    -
      -
    • - -

      #function IteratorFunction : -The function that will be called when there is an alive AIRBASE in the SET_AIRBASE. The function needs to accept a AIRBASE parameter.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #SET_AIRBASE: -self

    - -
    -
    -
    -
    - - -SET_AIRBASE:IsIncludeObject(MAirbase) - -
    -
    - - - -

    Parameter

    - -

    Return value

    - -

    #SET_AIRBASE: -self

    - -
    -
    -
    -
    - - -SET_AIRBASE:New() - -
    -
    - -

    Creates a new SET_AIRBASE object, building a set of airbases belonging to a coalitions and categories.

    - -

    Return value

    - -

    #SET_AIRBASE: -self

    - -

    Usage:

    -
    -- Define a new SET_AIRBASE Object. The DatabaseSet will contain a reference to all Airbases.
    -DatabaseSet = SET_AIRBASE:New()
    - -
    -
    -
    -
    - - -SET_AIRBASE:RemoveAirbasesByName(RemoveAirbaseNames) - -
    -
    - -

    Remove AIRBASEs from SET_AIRBASE.

    - -

    Parameter

    - -

    Return value

    - - -

    self

    - -
    -
    - -

    Type SET_BASE

    -

    Field(s)

    -
    -
    - - -SET_BASE:Add(ObjectName, Object) - -
    -
    - -

    Adds a Base#BASE object in the Set#SET_BASE, using a given ObjectName as the index.

    - -

    Parameters

    - -

    Return value

    - -

    Core.Base#BASE: -The added BASE Object.

    - -
    -
    -
    -
    - - -SET_BASE:AddObject(Object) - -
    -
    - -

    Adds a Base#BASE object in the Set#SET_BASE, using the Object Name as the index.

    - -

    Parameter

    - -

    Return value

    - -

    Core.Base#BASE: -The added BASE Object.

    - -
    -
    -
    -
    - - Core.Scheduler#SCHEDULER - -SET_BASE.CallScheduler - -
    -
    - - - -
    -
    -
    -
    - - -SET_BASE:Count() - -
    -
    - -

    Retrieves the amount of objects in the Set#SET_BASE and derived classes.

    - -

    Return value

    - -

    #number: -Count

    - -
    -
    -
    -
    - - - -SET_BASE.Database - -
    -
    - - - - -

    Now base the new Set on the BaseSet

    - -
    -
    -
    -
    - - #table - -SET_BASE.Filter - -
    -
    - - - -
    -
    -
    -
    - - -SET_BASE:FilterCrashes() - -
    -
    - -

    Starts the filtering of the Crash events for the collection.

    - -

    Return value

    - -

    #SET_BASE: -self

    - -
    -
    -
    -
    - - -SET_BASE:FilterDeads() - -
    -
    - -

    Starts the filtering of the Dead events for the collection.

    - -

    Return value

    - -

    #SET_BASE: -self

    - -
    -
    -
    -
    - - -SET_BASE:FilterOnce() - -
    -
    - -

    Filters for the defined collection.

    - -

    Return value

    - -

    #SET_BASE: -self

    - -
    -
    -
    -
    - - -SET_BASE:FilterStop() - -
    -
    - -

    Stops the filtering for the defined collection.

    - -

    Return value

    - -

    #SET_BASE: -self

    - -
    -
    -
    -
    - - -SET_BASE:FindNearestObjectFromPointVec2(PointVec2) - -
    -
    - -

    Iterate the SET_BASE while identifying the nearest object from a Point#POINT_VEC2.

    - -

    Parameter

    - -

    Return value

    - -

    Core.Base#BASE: -The closest object.

    - -
    -
    -
    -
    - - -SET_BASE:Flush() - -
    -
    - -

    Flushes the current SET_BASE contents in the log ...

    - - -

    (for debugging reasons).

    - -

    Return value

    - -

    #string: -A string with the names of the objects.

    - -
    -
    -
    -
    - - -SET_BASE:ForEach(IteratorFunction, arg, Set, Function, FunctionArguments) - -
    -
    - -

    Iterate the SETBASE and derived classes and call an iterator function for the given SETBASE, providing the Object for each element within the set and optional parameters.

    - -

    Parameters

    -
      -
    • - -

      #function IteratorFunction : -The function that will be called.

      - -
    • -
    • - -

      arg :

      - -
    • -
    • - -

      Set :

      - -
    • -
    • - -

      Function :

      - -
    • -
    • - -

      FunctionArguments :

      - -
    • -
    -

    Return value

    - -

    #SET_BASE: -self

    - -
    -
    -
    -
    - - -SET_BASE:Get(ObjectName) - -
    -
    - -

    Gets a Base#BASE object from the Set#SET_BASE and derived classes, based on the Object Name.

    - -

    Parameter

    -
      -
    • - -

      #string ObjectName :

      - -
    • -
    -

    Return value

    - -

    Core.Base#BASE:

    - - -
    -
    -
    -
    - - -SET_BASE:GetFirst() - -
    -
    - -

    Gets the first object from the Set#SET_BASE and derived classes.

    - -

    Return value

    - -

    Core.Base#BASE:

    - - -
    -
    -
    -
    - - -SET_BASE:GetLast() - -
    -
    - -

    Gets the last object from the Set#SET_BASE and derived classes.

    - -

    Return value

    - -

    Core.Base#BASE:

    - - -
    -
    -
    -
    - - -SET_BASE:GetObjectNames() - -
    -
    - -

    Gets a string with all the object names.

    - -

    Return value

    - -

    #string: -A string with the names of the objects.

    - -
    -
    -
    -
    - - -SET_BASE:GetRandom() - -
    -
    - -

    Gets a random object from the Set#SET_BASE and derived classes.

    - -

    Return value

    - -

    Core.Base#BASE:

    - - -
    -
    -
    -
    - - -SET_BASE:GetSet() - -
    -
    - -

    Gets the Set.

    - -

    Return value

    - -

    #SET_BASE: -self

    - -
    -
    -
    -
    - - -SET_BASE:GetSetNames() - -
    -
    - -

    Gets a list of the Names of the Objects in the Set.

    - -

    Return value

    - -

    #SET_BASE: -self

    - -
    -
    -
    -
    - - -SET_BASE:GetSetObjects() - -
    -
    - -

    Gets a list of the Objects in the Set.

    - -

    Return value

    - -

    #SET_BASE: -self

    - -
    -
    -
    -
    - - -SET_BASE:IsIncludeObject(Object) - -
    -
    - -

    Decides whether to include the Object

    - -

    Parameter

    -
      -
    • - -

      #table Object :

      - -
    • -
    -

    Return value

    - -

    #SET_BASE: -self

    - -
    -
    -
    -
    - - #table - -SET_BASE.List - -
    -
    - - - -
    -
    -
    -
    - - -SET_BASE:New(Database) - -
    -
    - -

    Creates a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

    - -

    Parameter

    -
      -
    • - -

      Database :

      - -
    • -
    -

    Return value

    - -

    #SET_BASE:

    - - -

    Usage:

    -
    -- Define a new SET_BASE Object. This DBObject will contain a reference to all Group and Unit Templates defined within the ME and the DCSRTE.
    -DBObject = SET_BASE:New()
    - -
    -
    -
    -
    - - -SET_BASE:Remove(ObjectName) - -
    -
    - -

    Removes a Base#BASE object from the Set#SET_BASE and derived classes, based on the Object Name.

    - -

    Parameter

    -
      -
    • - -

      #string ObjectName :

      - -
    • -
    -
    -
    -
    -
    - - #table - -SET_BASE.Set - -
    -
    - - - -
    -
    -
    -
    - - -SET_BASE:SetDatabase(BaseSet) - -
    -
    - -

    Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

    - -

    Parameter

    - -

    Return value

    - -

    #SET_BASE:

    - - -
    -
    -
    -
    - - -SET_BASE:SetIteratorIntervals(YieldInterval, TimeInterval) - -
    -
    - -

    Define the SET iterator "yield interval" and the "time interval".

    - -

    Parameters

    -
      -
    • - -

      #number YieldInterval : -Sets the frequency when the iterator loop will yield after the number of objects processed. The default frequency is 10 objects processed.

      - -
    • -
    • - -

      #number TimeInterval : -Sets the time in seconds when the main logic will resume the iterator loop. The default time is 0.001 seconds.

      - -
    • -
    -

    Return value

    - -

    #SET_BASE: -self

    - -
    -
    -
    -
    - - - -SET_BASE.TimeInterval - -
    -
    - - - -
    -
    -
    -
    - - - -SET_BASE.YieldInterval - -
    -
    - - - -
    -
    -
    -
    - - -SET_BASE:_EventOnBirth(Event) - -
    -
    - -

    Handles the OnBirth event for the Set.

    - -

    Parameter

    - -
    -
    -
    -
    - - -SET_BASE:_EventOnDeadOrCrash(Event) - -
    -
    - -

    Handles the OnDead or OnCrash event for alive units set.

    - -

    Parameter

    - -
    -
    -
    -
    - - -SET_BASE:_FilterStart() - -
    -
    - -

    Starts the filtering for the defined collection.

    - -

    Return value

    - -

    #SET_BASE: -self

    - -
    -
    -
    -
    - - -SET_BASE:_Find(ObjectName) - -
    -
    - -

    Finds an Base#BASE object based on the object Name.

    - -

    Parameter

    -
      -
    • - -

      #string ObjectName :

      - -
    • -
    -

    Return value

    - -

    Core.Base#BASE: -The Object found.

    - -
    -
    - -

    Type SET_CARGO

    -

    Field(s)

    -
    -
    - - -SET_CARGO:AddCargosByName(AddCargoNames) - -
    -
    - -

    (R2.1) Add CARGOs to SET_CARGO.

    - -

    Parameter

    -
      -
    • - -

      #string AddCargoNames : -A single name or an array of CARGO names.

      - -
    • -
    -

    Return value

    - - -

    self

    - -
    -
    -
    -
    - - -SET_CARGO:AddInDatabase(Event) - -
    -
    - -

    (R2.1) Handles the Database to check on an event (birth) that the Object was added in the Database.

    - - -

    This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

    - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      #string: -The name of the CARGO

      - -
    2. -
    3. - -

      #table: -The CARGO

      - -
    4. -
    -
    -
    -
    -
    - - -SET_CARGO:FilterCoalitions(Coalitions) - -
    -
    - -

    (R2.1) Builds a set of cargos of coalitions.

    - - -

    Possible current coalitions are red, blue and neutral.

    - -

    Parameter

    -
      -
    • - -

      #string Coalitions : -Can take the following values: "red", "blue", "neutral".

      - -
    • -
    -

    Return value

    - -

    #SET_CARGO: -self

    - -
    -
    -
    -
    - - -SET_CARGO:FilterCountries(Countries) - -
    -
    - -

    (R2.1) Builds a set of cargos of defined countries.

    - - -

    Possible current countries are those known within DCS world.

    - -

    Parameter

    -
      -
    • - -

      #string Countries : -Can take those country strings known within DCS world.

      - -
    • -
    -

    Return value

    - -

    #SET_CARGO: -self

    - -
    -
    -
    -
    - - -SET_CARGO:FilterPrefixes(Prefixes) - -
    -
    - -

    (R2.1) Builds a set of cargos of defined cargo prefixes.

    - - -

    All the cargos starting with the given prefixes will be included within the set.

    - -

    Parameter

    -
      -
    • - -

      #string Prefixes : -The prefix of which the cargo name starts with.

      - -
    • -
    -

    Return value

    - -

    #SET_CARGO: -self

    - -
    -
    -
    -
    - - -SET_CARGO:FilterStart() - -
    -
    - -

    (R2.1) Starts the filtering.

    - -

    Return value

    - -

    #SET_CARGO: -self

    - -
    -
    -
    -
    - - -SET_CARGO:FilterTypes(Types) - -
    -
    - -

    (R2.1) Builds a set of cargos of defined cargo types.

    - - -

    Possible current types are those types known within DCS world.

    - -

    Parameter

    -
      -
    • - -

      #string Types : -Can take those type strings known within DCS world.

      - -
    • -
    -

    Return value

    - -

    #SET_CARGO: -self

    - -
    -
    -
    -
    - - -SET_CARGO:FindCargo(CargoName) - -
    -
    - -

    (R2.1) Finds a Cargo based on the Cargo Name.

    - -

    Parameter

    -
      -
    • - -

      #string CargoName :

      - -
    • -
    -

    Return value

    - -

    Wrapper.Cargo#CARGO: -The found Cargo.

    - -
    -
    -
    -
    - - -SET_CARGO:FindInDatabase(Event) - -
    -
    - -

    (R2.1) Handles the Database to check on any event that Object exists in the Database.

    - - -

    This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

    - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      #string: -The name of the CARGO

      - -
    2. -
    3. - -

      #table: -The CARGO

      - -
    4. -
    -
    -
    -
    -
    - - -SET_CARGO:FindNearestCargoFromPointVec2(PointVec2) - -
    -
    - -

    (R2.1) Iterate the SET_CARGO while identifying the nearest Cargo#CARGO from a Point#POINT_VEC2.

    - -

    Parameter

    - -

    Return value

    - -

    Wrapper.Cargo#CARGO: -The closest Cargo#CARGO.

    - -
    -
    -
    -
    - - -SET_CARGO:ForEachCargo(IteratorFunction, ...) - -
    -
    - -

    (R2.1) Iterate the SET_CARGO and call an interator function for each CARGO, providing the CARGO and optional parameters.

    - -

    Parameters

    -
      -
    • - -

      #function IteratorFunction : -The function that will be called when there is an alive CARGO in the SET_CARGO. The function needs to accept a CARGO parameter.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #SET_CARGO: -self

    - -
    -
    -
    -
    - - -SET_CARGO:IsIncludeObject(MCargo) - -
    -
    - -

    (R2.1)

    - -

    Parameter

    - -

    Return value

    - -

    #SET_CARGO: -self

    - -
    -
    -
    -
    - - -SET_CARGO:New() - -
    -
    - -

    (R2.1) Creates a new SET_CARGO object, building a set of cargos belonging to a coalitions and categories.

    - -

    Return value

    - -

    #SET_CARGO:

    - - -

    Usage:

    -
    -- Define a new SET_CARGO Object. The DatabaseSet will contain a reference to all Cargos.
    -DatabaseSet = SET_CARGO:New()
    - -
    -
    -
    -
    - - -SET_CARGO:OnEventDeleteCargo(EventData) - -
    -
    - -

    (R2.1) Handles the OnDead or OnCrash event for alive units set.

    - -

    Parameter

    - -
    -
    -
    -
    - - -SET_CARGO:OnEventNewCargo(EventData) - -
    -
    - -

    (R2.1) Handles the OnEventNewCargo event for the Set.

    - -

    Parameter

    - -
    -
    -
    -
    - - -SET_CARGO:RemoveCargosByName(RemoveCargoNames) - -
    -
    - -

    (R2.1) Remove CARGOs from SET_CARGO.

    - -

    Parameter

    - -

    Return value

    - - -

    self

    - -
    -
    - -

    Type SET_CLIENT

    -

    Field(s)

    -
    -
    - - -SET_CLIENT:AddClientsByName(AddClientNames) - -
    -
    - -

    Add CLIENT(s) to SET_CLIENT.

    - -

    Parameter

    -
      -
    • - -

      #string AddClientNames : -A single name or an array of CLIENT names.

      - -
    • -
    -

    Return value

    - - -

    self

    - -
    -
    -
    -
    - - -SET_CLIENT:AddInDatabase(Event) - -
    -
    - -

    Handles the Database to check on an event (birth) that the Object was added in the Database.

    - - -

    This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

    - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      #string: -The name of the CLIENT

      - -
    2. -
    3. - -

      #table: -The CLIENT

      - -
    4. -
    -
    -
    -
    -
    - - -SET_CLIENT:FilterCategories(Categories) - -
    -
    - -

    Builds a set of clients out of categories.

    - - -

    Possible current categories are plane, helicopter, ground, ship.

    - -

    Parameter

    -
      -
    • - -

      #string Categories : -Can take the following values: "plane", "helicopter", "ground", "ship".

      - -
    • -
    -

    Return value

    - -

    #SET_CLIENT: -self

    - -
    -
    -
    -
    - - -SET_CLIENT:FilterCoalitions(Coalitions) - -
    -
    - -

    Builds a set of clients of coalitions.

    - - -

    Possible current coalitions are red, blue and neutral.

    - -

    Parameter

    -
      -
    • - -

      #string Coalitions : -Can take the following values: "red", "blue", "neutral".

      - -
    • -
    -

    Return value

    - -

    #SET_CLIENT: -self

    - -
    -
    -
    -
    - - -SET_CLIENT:FilterCountries(Countries) - -
    -
    - -

    Builds a set of clients of defined countries.

    - - -

    Possible current countries are those known within DCS world.

    - -

    Parameter

    -
      -
    • - -

      #string Countries : -Can take those country strings known within DCS world.

      - -
    • -
    -

    Return value

    - -

    #SET_CLIENT: -self

    - -
    -
    -
    -
    - - -SET_CLIENT:FilterPrefixes(Prefixes) - -
    -
    - -

    Builds a set of clients of defined client prefixes.

    - - -

    All the clients starting with the given prefixes will be included within the set.

    - -

    Parameter

    -
      -
    • - -

      #string Prefixes : -The prefix of which the client name starts with.

      - -
    • -
    -

    Return value

    - -

    #SET_CLIENT: -self

    - -
    -
    -
    -
    - - -SET_CLIENT:FilterStart() - -
    -
    - -

    Starts the filtering.

    - -

    Return value

    - -

    #SET_CLIENT: -self

    - -
    -
    -
    -
    - - -SET_CLIENT:FilterTypes(Types) - -
    -
    - -

    Builds a set of clients of defined client types.

    - - -

    Possible current types are those types known within DCS world.

    - -

    Parameter

    -
      -
    • - -

      #string Types : -Can take those type strings known within DCS world.

      - -
    • -
    -

    Return value

    - -

    #SET_CLIENT: -self

    - -
    -
    -
    -
    - - -SET_CLIENT:FindClient(ClientName) - -
    -
    - -

    Finds a Client based on the Client Name.

    - -

    Parameter

    -
      -
    • - -

      #string ClientName :

      - -
    • -
    -

    Return value

    - -

    Wrapper.Client#CLIENT: -The found Client.

    - -
    -
    -
    -
    - - -SET_CLIENT:FindInDatabase(Event) - -
    -
    - -

    Handles the Database to check on any event that Object exists in the Database.

    - - -

    This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

    - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      #string: -The name of the CLIENT

      - -
    2. -
    3. - -

      #table: -The CLIENT

      - -
    4. -
    -
    -
    -
    -
    - - -SET_CLIENT:ForEachClient(IteratorFunction, ...) - -
    -
    - -

    Iterate the SET_CLIENT and call an interator function for each alive CLIENT, providing the CLIENT and optional parameters.

    - -

    Parameters

    -
      -
    • - -

      #function IteratorFunction : -The function that will be called when there is an alive CLIENT in the SET_CLIENT. The function needs to accept a CLIENT parameter.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #SET_CLIENT: -self

    - -
    -
    -
    -
    - - -SET_CLIENT:ForEachClientInZone(ZoneObject, IteratorFunction, ...) - -
    -
    - -

    Iterate the SET_CLIENT and call an iterator function for each alive CLIENT presence completely in a Zone, providing the CLIENT and optional parameters to the called function.

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

      - -
    • -
    • - -

      #function IteratorFunction : -The function that will be called when there is an alive CLIENT in the SET_CLIENT. The function needs to accept a CLIENT parameter.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #SET_CLIENT: -self

    - -
    -
    -
    -
    - - -SET_CLIENT:ForEachClientNotInZone(ZoneObject, IteratorFunction, ...) - -
    -
    - -

    Iterate the SET_CLIENT and call an iterator function for each alive CLIENT presence not in a Zone, providing the CLIENT and optional parameters to the called function.

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

      - -
    • -
    • - -

      #function IteratorFunction : -The function that will be called when there is an alive CLIENT in the SET_CLIENT. The function needs to accept a CLIENT parameter.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #SET_CLIENT: -self

    - -
    -
    -
    -
    - - -SET_CLIENT:IsIncludeObject(MClient) - -
    -
    - - - -

    Parameter

    - -

    Return value

    - -

    #SET_CLIENT: -self

    - -
    -
    -
    -
    - - -SET_CLIENT:New() - -
    -
    - -

    Creates a new SET_CLIENT object, building a set of clients belonging to a coalitions, categories, countries, types or with defined prefix names.

    - -

    Return value

    - -

    #SET_CLIENT:

    - - -

    Usage:

    -
    -- Define a new SET_CLIENT Object. This DBObject will contain a reference to all Clients.
    -DBObject = SET_CLIENT:New()
    - -
    -
    -
    -
    - - -SET_CLIENT:RemoveClientsByName(RemoveClientNames) - -
    -
    - -

    Remove CLIENT(s) from SET_CLIENT.

    - -

    Parameter

    - -

    Return value

    - - -

    self

    - -
    -
    - -

    Type SET_GROUP

    -

    Field(s)

    -
    -
    - - -SET_GROUP:AddGroupsByName(AddGroupNames) - -
    -
    - -

    Add GROUP(s) to SET_GROUP.

    - -

    Parameter

    -
      -
    • - -

      #string AddGroupNames : -A single name or an array of GROUP names.

      - -
    • -
    -

    Return value

    - - -

    self

    - -
    -
    -
    -
    - - -SET_GROUP:AddInDatabase(Event) - -
    -
    - -

    Handles the Database to check on an event (birth) that the Object was added in the Database.

    - - -

    This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

    - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      #string: -The name of the GROUP

      - -
    2. -
    3. - -

      #table: -The GROUP

      - -
    4. -
    -
    -
    -
    -
    - - -SET_GROUP:AllCompletelyInZone(ZoneObject, Zone) - -
    -
    - -

    Iterate the SET_GROUP and return true if all the Wrapper.Group#GROUP are completely in the Core.Zone#ZONE

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

      - -
    • -
    • - -

      Zone :

      - -
    • -
    -

    Return value

    - -

    #boolean: -true if all the Wrapper.Group#GROUP are completly in the Core.Zone#ZONE, false otherwise

    - -

    Usage:

    -
    local MyZone = ZONE:New("Zone1")
    -local MySetGroup = SET_GROUP:New()
    -MySetGroup:AddGroupsByName({"Group1", "Group2"})
    -
    -if MySetGroup:AllCompletelyInZone(MyZone) then
    -  MESSAGE:New("All the SET's GROUP are in zone !", 10):ToAll()
    -else
    -  MESSAGE:New("Some or all SET's GROUP are outside zone !", 10):ToAll()
    -end
    - -
    -
    -
    -
    - - -SET_GROUP:AnyCompletelyInZone(ZoneObject, Zone) - -
    -
    - -

    Iterate the SET_GROUP and return true if at least one of the Wrapper.Group#GROUP is completely inside the Core.Zone#ZONE

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

      - -
    • -
    • - -

      Zone :

      - -
    • -
    -

    Return value

    - -

    #boolean: -true if at least one of the Wrapper.Group#GROUP is completly inside the Core.Zone#ZONE, false otherwise.

    - -

    Usage:

    -
    local MyZone = ZONE:New("Zone1")
    -local MySetGroup = SET_GROUP:New()
    -MySetGroup:AddGroupsByName({"Group1", "Group2"})
    -
    -if MySetGroup:AnyCompletelyInZone(MyZone) then
    -  MESSAGE:New("At least one GROUP is completely in zone !", 10):ToAll()
    -else
    -  MESSAGE:New("No GROUP is completely in zone !", 10):ToAll()
    -end
    - -
    -
    -
    -
    - - -SET_GROUP:AnyInZone(ZoneObject, Zone) - -
    -
    - -

    Iterate the SET_GROUP and return true if at least one #UNIT of one GROUP of the SET_GROUP is in ZONE

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

      - -
    • -
    • - -

      Zone :

      - -
    • -
    -

    Return value

    - -

    #boolean: -true if at least one of the Wrapper.Group#GROUP is partly or completly inside the Core.Zone#ZONE, false otherwise.

    - -

    Usage:

    -
    local MyZone = ZONE:New("Zone1")
    -local MySetGroup = SET_GROUP:New()
    -MySetGroup:AddGroupsByName({"Group1", "Group2"})
    -
    -if MySetGroup:AnyPartlyInZone(MyZone) then
    -  MESSAGE:New("At least one GROUP has at least one UNIT in zone !", 10):ToAll()
    -else
    -  MESSAGE:New("No UNIT of any GROUP is in zone !", 10):ToAll()
    -end
    - -
    -
    -
    -
    - - -SET_GROUP:AnyPartlyInZone(ZoneObject, Zone) - -
    -
    - -

    Iterate the SET_GROUP and return true if at least one GROUP of the SET_GROUP is partly in ZONE.

    - - -

    Will return false if a GROUP is fully in the ZONE

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

      - -
    • -
    • - -

      Zone :

      - -
    • -
    -

    Return value

    - -

    #boolean: -true if at least one of the Wrapper.Group#GROUP is partly or completly inside the Core.Zone#ZONE, false otherwise.

    - -

    Usage:

    -
    local MyZone = ZONE:New("Zone1")
    -local MySetGroup = SET_GROUP:New()
    -MySetGroup:AddGroupsByName({"Group1", "Group2"})
    -
    -if MySetGroup:AnyPartlyInZone(MyZone) then
    -  MESSAGE:New("At least one GROUP is partially in the zone, but none are fully in it !", 10):ToAll()
    -else
    -  MESSAGE:New("No GROUP are in zone, or one (or more) GROUP is completely in it !", 10):ToAll()
    -end
    - -
    -
    -
    -
    - - -SET_GROUP:CountInZone(ZoneObject, Zone) - -
    -
    - -

    Iterate the SETGROUP and count how many GROUPs are completely in the Zone -That could easily be done with SETGROUP:ForEachGroupCompletelyInZone(), but this function -provides an easy to use shortcut...

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

      - -
    • -
    • - -

      Zone :

      - -
    • -
    -

    Return value

    - -

    #number: -the number of GROUPs completely in the Zone

    - -

    Usage:

    -
    local MyZone = ZONE:New("Zone1")
    -local MySetGroup = SET_GROUP:New()
    -MySetGroup:AddGroupsByName({"Group1", "Group2"})
    -
    -MESSAGE:New("There are " .. MySetGroup:CountInZone(MyZone) .. " GROUPs in the Zone !", 10):ToAll()
    - -
    -
    -
    -
    - - -SET_GROUP:CountUnitInZone(ZoneObject, Zone) - -
    -
    - -

    Iterate the SET_GROUP and count how many UNITs are completely in the Zone

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

      - -
    • -
    • - -

      Zone :

      - -
    • -
    -

    Return value

    - -

    #number: -the number of GROUPs completely in the Zone

    - -

    Usage:

    -
    local MyZone = ZONE:New("Zone1")
    -local MySetGroup = SET_GROUP:New()
    -MySetGroup:AddGroupsByName({"Group1", "Group2"})
    -
    -MESSAGE:New("There are " .. MySetGroup:CountUnitInZone(MyZone) .. " UNITs in the Zone !", 10):ToAll()
    - -
    -
    -
    -
    - - -SET_GROUP:FilterCategories(Categories) - -
    -
    - -

    Builds a set of groups out of categories.

    - - -

    Possible current categories are plane, helicopter, ground, ship.

    - -

    Parameter

    -
      -
    • - -

      #string Categories : -Can take the following values: "plane", "helicopter", "ground", "ship".

      - -
    • -
    -

    Return value

    - -

    #SET_GROUP: -self

    - -
    -
    -
    -
    - - -SET_GROUP:FilterCategoryAirplane() - -
    -
    - -

    Builds a set of groups out of airplane category.

    - -

    Return value

    - -

    #SET_GROUP: -self

    - -
    -
    -
    -
    - - -SET_GROUP:FilterCategoryGround() - -
    -
    - -

    Builds a set of groups out of ground category.

    - -

    Return value

    - -

    #SET_GROUP: -self

    - -
    -
    -
    -
    - - -SET_GROUP:FilterCategoryHelicopter() - -
    -
    - -

    Builds a set of groups out of helicopter category.

    - -

    Return value

    - -

    #SET_GROUP: -self

    - -
    -
    -
    -
    - - -SET_GROUP:FilterCategoryShip() - -
    -
    - -

    Builds a set of groups out of ship category.

    - -

    Return value

    - -

    #SET_GROUP: -self

    - -
    -
    -
    -
    - - -SET_GROUP:FilterCategoryStructure() - -
    -
    - -

    Builds a set of groups out of structure category.

    - -

    Return value

    - -

    #SET_GROUP: -self

    - -
    -
    -
    -
    - - -SET_GROUP:FilterCoalitions(Coalitions) - -
    -
    - -

    Builds a set of groups of coalitions.

    - - -

    Possible current coalitions are red, blue and neutral.

    - -

    Parameter

    -
      -
    • - -

      #string Coalitions : -Can take the following values: "red", "blue", "neutral".

      - -
    • -
    -

    Return value

    - -

    #SET_GROUP: -self

    - -
    -
    -
    -
    - - -SET_GROUP:FilterCountries(Countries) - -
    -
    - -

    Builds a set of groups of defined countries.

    - - -

    Possible current countries are those known within DCS world.

    - -

    Parameter

    -
      -
    • - -

      #string Countries : -Can take those country strings known within DCS world.

      - -
    • -
    -

    Return value

    - -

    #SET_GROUP: -self

    - -
    -
    -
    -
    - - -SET_GROUP:FilterPrefixes(Prefixes) - -
    -
    - -

    Builds a set of groups of defined GROUP prefixes.

    - - -

    All the groups starting with the given prefixes will be included within the set.

    - -

    Parameter

    -
      -
    • - -

      #string Prefixes : -The prefix of which the group name starts with.

      - -
    • -
    -

    Return value

    - -

    #SET_GROUP: -self

    - -
    -
    -
    -
    - - -SET_GROUP:FilterStart() - -
    -
    - -

    Starts the filtering.

    - -

    Return value

    - -

    #SET_GROUP: -self

    - -
    -
    -
    -
    - - -SET_GROUP:FindGroup(GroupName) - -
    -
    - -

    Finds a Group based on the Group Name.

    - -

    Parameter

    -
      -
    • - -

      #string GroupName :

      - -
    • -
    -

    Return value

    - -

    Wrapper.Group#GROUP: -The found Group.

    - -
    -
    -
    -
    - - -SET_GROUP:FindInDatabase(Event) - -
    -
    - -

    Handles the Database to check on any event that Object exists in the Database.

    - - -

    This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

    - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      #string: -The name of the GROUP

      - -
    2. -
    3. - -

      #table: -The GROUP

      - -
    4. -
    -
    -
    -
    -
    - - -SET_GROUP:FindNearestGroupFromPointVec2(PointVec2) - -
    -
    - -

    Iterate the SET_GROUP while identifying the nearest object from a Point#POINT_VEC2.

    - -

    Parameter

    - -

    Return value

    - -

    Wrapper.Group#GROUP: -The closest group.

    - -
    -
    -
    -
    - - -SET_GROUP:ForEachGroup(IteratorFunction, ...) - -
    -
    - -

    Iterate the SET_GROUP and call an iterator function for each alive GROUP, providing the GROUP and optional parameters.

    - -

    Parameters

    -
      -
    • - -

      #function IteratorFunction : -The function that will be called when there is an alive GROUP in the SET_GROUP. The function needs to accept a GROUP parameter.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #SET_GROUP: -self

    - -
    -
    -
    -
    - - -SET_GROUP:ForEachGroupCompletelyInZone(ZoneObject, IteratorFunction, ...) - -
    -
    - -

    Iterate the SET_GROUP and call an iterator function for each alive GROUP presence completely in a Zone, providing the GROUP and optional parameters to the called function.

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

      - -
    • -
    • - -

      #function IteratorFunction : -The function that will be called when there is an alive GROUP in the SET_GROUP. The function needs to accept a GROUP parameter.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #SET_GROUP: -self

    - -
    -
    -
    -
    - - -SET_GROUP:ForEachGroupNotInZone(ZoneObject, IteratorFunction, ...) - -
    -
    - -

    Iterate the SET_GROUP and call an iterator function for each alive GROUP presence not in a Zone, providing the GROUP and optional parameters to the called function.

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

      - -
    • -
    • - -

      #function IteratorFunction : -The function that will be called when there is an alive GROUP in the SET_GROUP. The function needs to accept a GROUP parameter.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #SET_GROUP: -self

    - -
    -
    -
    -
    - - -SET_GROUP:ForEachGroupPartlyInZone(ZoneObject, IteratorFunction, ...) - -
    -
    - -

    Iterate the SET_GROUP and call an iterator function for each alive GROUP presence partly in a Zone, providing the GROUP and optional parameters to the called function.

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

      - -
    • -
    • - -

      #function IteratorFunction : -The function that will be called when there is an alive GROUP in the SET_GROUP. The function needs to accept a GROUP parameter.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #SET_GROUP: -self

    - -
    -
    -
    -
    - - -SET_GROUP:IsIncludeObject(MooseGroup) - -
    -
    - - - -

    Parameter

    - -

    Return value

    - -

    #SET_GROUP: -self

    - -
    -
    -
    -
    - - -SET_GROUP:New() - -
    -
    - -

    Creates a new SET_GROUP object, building a set of groups belonging to a coalitions, categories, countries, types or with defined prefix names.

    - -

    Return value

    - -

    #SET_GROUP:

    - - -

    Usage:

    -
    -- Define a new SET_GROUP Object. This DBObject will contain a reference to all alive GROUPS.
    -DBObject = SET_GROUP:New()
    - -
    -
    -
    -
    - - -SET_GROUP:NoneInZone(ZoneObject, Zone) - -
    -
    - -

    Iterate the SET_GROUP and return true if no GROUP of the SET_GROUP is in ZONE -This could also be achieved with not SET_GROUP:AnyPartlyInZone(Zone), but it's easier for the -mission designer to add a dedicated method

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

      - -
    • -
    • - -

      Zone :

      - -
    • -
    -

    Return value

    - -

    #boolean: -true if no Wrapper.Group#GROUP is inside the Core.Zone#ZONE in any way, false otherwise.

    - -

    Usage:

    -
    local MyZone = ZONE:New("Zone1")
    -local MySetGroup = SET_GROUP:New()
    -MySetGroup:AddGroupsByName({"Group1", "Group2"})
    -
    -if MySetGroup:NoneInZone(MyZone) then
    -  MESSAGE:New("No GROUP is completely in zone !", 10):ToAll()
    -else
    -  MESSAGE:New("No UNIT of any GROUP is in zone !", 10):ToAll()
    -end
    - -
    -
    -
    -
    - - -SET_GROUP:RemoveGroupsByName(RemoveGroupNames) - -
    -
    - -

    Remove GROUP(s) from SET_GROUP.

    - -

    Parameter

    - -

    Return value

    - - -

    self

    - -
    -
    -
    -
    - - -SET_GROUP:_EventOnDeadOrCrash(Event) - -
    -
    - -

    Handles the OnDead or OnCrash event for alive groups set.

    - - -

    Note: The GROUP object in the SET_GROUP collection will only be removed if the last unit is destroyed of the GROUP.

    - -

    Parameter

    - -
    -
    - -

    Type SET_PLAYER

    -

    Field(s)

    -
    -
    - - -SET_PLAYER:AddClientsByName(AddClientNames) - -
    -
    - -

    Add CLIENT(s) to SET_PLAYER.

    - -

    Parameter

    -
      -
    • - -

      #string AddClientNames : -A single name or an array of CLIENT names.

      - -
    • -
    -

    Return value

    - - -

    self

    - -
    -
    -
    -
    - - -SET_PLAYER:AddInDatabase(Event) - -
    -
    - -

    Handles the Database to check on an event (birth) that the Object was added in the Database.

    - - -

    This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

    - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      #string: -The name of the CLIENT

      - -
    2. -
    3. - -

      #table: -The CLIENT

      - -
    4. -
    -
    -
    -
    -
    - - -SET_PLAYER:FilterCategories(Categories) - -
    -
    - -

    Builds a set of clients out of categories joined by players.

    - - -

    Possible current categories are plane, helicopter, ground, ship.

    - -

    Parameter

    -
      -
    • - -

      #string Categories : -Can take the following values: "plane", "helicopter", "ground", "ship".

      - -
    • -
    -

    Return value

    - -

    #SET_PLAYER: -self

    - -
    -
    -
    -
    - - -SET_PLAYER:FilterCoalitions(Coalitions) - -
    -
    - -

    Builds a set of clients of coalitions joined by specific players.

    - - -

    Possible current coalitions are red, blue and neutral.

    - -

    Parameter

    -
      -
    • - -

      #string Coalitions : -Can take the following values: "red", "blue", "neutral".

      - -
    • -
    -

    Return value

    - -

    #SET_PLAYER: -self

    - -
    -
    -
    -
    - - -SET_PLAYER:FilterCountries(Countries) - -
    -
    - -

    Builds a set of clients of defined countries.

    - - -

    Possible current countries are those known within DCS world.

    - -

    Parameter

    -
      -
    • - -

      #string Countries : -Can take those country strings known within DCS world.

      - -
    • -
    -

    Return value

    - -

    #SET_PLAYER: -self

    - -
    -
    -
    -
    - - -SET_PLAYER:FilterPrefixes(Prefixes) - -
    -
    - -

    Builds a set of clients of defined client prefixes.

    - - -

    All the clients starting with the given prefixes will be included within the set.

    - -

    Parameter

    -
      -
    • - -

      #string Prefixes : -The prefix of which the client name starts with.

      - -
    • -
    -

    Return value

    - -

    #SET_PLAYER: -self

    - -
    -
    -
    -
    - - -SET_PLAYER:FilterStart() - -
    -
    - -

    Starts the filtering.

    - -

    Return value

    - -

    #SET_PLAYER: -self

    - -
    -
    -
    -
    - - -SET_PLAYER:FilterTypes(Types) - -
    -
    - -

    Builds a set of clients of defined client types joined by players.

    - - -

    Possible current types are those types known within DCS world.

    - -

    Parameter

    -
      -
    • - -

      #string Types : -Can take those type strings known within DCS world.

      - -
    • -
    -

    Return value

    - -

    #SET_PLAYER: -self

    - -
    -
    -
    -
    - - -SET_PLAYER:FindClient(PlayerName) - -
    -
    - -

    Finds a Client based on the Player Name.

    - -

    Parameter

    -
      -
    • - -

      #string PlayerName :

      - -
    • -
    -

    Return value

    - -

    Wrapper.Client#CLIENT: -The found Client.

    - -
    -
    -
    -
    - - -SET_PLAYER:FindInDatabase(Event) - -
    -
    - -

    Handles the Database to check on any event that Object exists in the Database.

    - - -

    This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

    - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      #string: -The name of the CLIENT

      - -
    2. -
    3. - -

      #table: -The CLIENT

      - -
    4. -
    -
    -
    -
    -
    - - -SET_PLAYER:ForEachPlayer(IteratorFunction, ...) - -
    -
    - -

    Iterate the SET_PLAYER and call an interator function for each alive CLIENT, providing the CLIENT and optional parameters.

    - -

    Parameters

    -
      -
    • - -

      #function IteratorFunction : -The function that will be called when there is an alive CLIENT in the SET_PLAYER. The function needs to accept a CLIENT parameter.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #SET_PLAYER: -self

    - -
    -
    -
    -
    - - -SET_PLAYER:ForEachPlayerInZone(ZoneObject, IteratorFunction, ...) - -
    -
    - -

    Iterate the SET_PLAYER and call an iterator function for each alive CLIENT presence completely in a Zone, providing the CLIENT and optional parameters to the called function.

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

      - -
    • -
    • - -

      #function IteratorFunction : -The function that will be called when there is an alive CLIENT in the SET_PLAYER. The function needs to accept a CLIENT parameter.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #SET_PLAYER: -self

    - -
    -
    -
    -
    - - -SET_PLAYER:ForEachPlayerNotInZone(ZoneObject, IteratorFunction, ...) - -
    -
    - -

    Iterate the SET_PLAYER and call an iterator function for each alive CLIENT presence not in a Zone, providing the CLIENT and optional parameters to the called function.

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

      - -
    • -
    • - -

      #function IteratorFunction : -The function that will be called when there is an alive CLIENT in the SET_PLAYER. The function needs to accept a CLIENT parameter.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #SET_PLAYER: -self

    - -
    -
    -
    -
    - - -SET_PLAYER:IsIncludeObject(MClient) - -
    -
    - - - -

    Parameter

    - -

    Return value

    - -

    #SET_PLAYER: -self

    - -
    -
    -
    -
    - - -SET_PLAYER:New() - -
    -
    - -

    Creates a new SET_PLAYER object, building a set of clients belonging to a coalitions, categories, countries, types or with defined prefix names.

    - -

    Return value

    - -

    #SET_PLAYER:

    - - -

    Usage:

    -
    -- Define a new SET_PLAYER Object. This DBObject will contain a reference to all Clients.
    -DBObject = SET_PLAYER:New()
    - -
    -
    -
    -
    - - -SET_PLAYER:RemoveClientsByName(RemoveClientNames) - -
    -
    - -

    Remove CLIENT(s) from SET_PLAYER.

    - -

    Parameter

    - -

    Return value

    - - -

    self

    - -
    -
    - -

    Type SET_STATIC

    -

    Field(s)

    -
    -
    - - -SET_STATIC:AddInDatabase(Event) - -
    -
    - -

    Handles the Database to check on an event (birth) that the Object was added in the Database.

    - - -

    This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

    - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      #string: -The name of the STATIC

      - -
    2. -
    3. - -

      #table: -The STATIC

      - -
    4. -
    -
    -
    -
    -
    - - -SET_STATIC:AddStatic(AddStatic) - -
    -
    - -

    Add STATIC(s) to SET_STATIC.

    - -

    Parameter

    -
      -
    • - -

      #string AddStatic : -A single STATIC.

      - -
    • -
    -

    Return value

    - -

    #SET_STATIC: -self

    - -
    -
    -
    -
    - - -SET_STATIC:AddStaticsByName(AddStaticNames) - -
    -
    - -

    Add STATIC(s) to SET_STATIC.

    - -

    Parameter

    -
      -
    • - -

      #string AddStaticNames : -A single name or an array of STATIC names.

      - -
    • -
    -

    Return value

    - -

    #SET_STATIC: -self

    - -
    -
    -
    -
    - - -SET_STATIC:FilterCategories(Categories) - -
    -
    - -

    Builds a set of units out of categories.

    - - -

    Possible current categories are plane, helicopter, ground, ship.

    - -

    Parameter

    -
      -
    • - -

      #string Categories : -Can take the following values: "plane", "helicopter", "ground", "ship".

      - -
    • -
    -

    Return value

    - -

    #SET_STATIC: -self

    - -
    -
    -
    -
    - - -SET_STATIC:FilterCoalitions(Coalitions) - -
    -
    - -

    Builds a set of units of coalitions.

    - - -

    Possible current coalitions are red, blue and neutral.

    - -

    Parameter

    -
      -
    • - -

      #string Coalitions : -Can take the following values: "red", "blue", "neutral".

      - -
    • -
    -

    Return value

    - -

    #SET_STATIC: -self

    - -
    -
    -
    -
    - - -SET_STATIC:FilterCountries(Countries) - -
    -
    - -

    Builds a set of units of defined countries.

    - - -

    Possible current countries are those known within DCS world.

    - -

    Parameter

    -
      -
    • - -

      #string Countries : -Can take those country strings known within DCS world.

      - -
    • -
    -

    Return value

    - -

    #SET_STATIC: -self

    - -
    -
    -
    -
    - - -SET_STATIC:FilterPrefixes(Prefixes) - -
    -
    - -

    Builds a set of units of defined unit prefixes.

    - - -

    All the units starting with the given prefixes will be included within the set.

    - -

    Parameter

    -
      -
    • - -

      #string Prefixes : -The prefix of which the unit name starts with.

      - -
    • -
    -

    Return value

    - -

    #SET_STATIC: -self

    - -
    -
    -
    -
    - - -SET_STATIC:FilterStart() - -
    -
    - -

    Starts the filtering.

    - -

    Return value

    - -

    #SET_STATIC: -self

    - -
    -
    -
    -
    - - -SET_STATIC:FilterTypes(Types) - -
    -
    - -

    Builds a set of units of defined unit types.

    - - -

    Possible current types are those types known within DCS world.

    - -

    Parameter

    -
      -
    • - -

      #string Types : -Can take those type strings known within DCS world.

      - -
    • -
    -

    Return value

    - -

    #SET_STATIC: -self

    - -
    -
    -
    -
    - - -SET_STATIC:FindInDatabase(Event) - -
    -
    - -

    Handles the Database to check on any event that Object exists in the Database.

    - - -

    This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

    - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      #string: -The name of the STATIC

      - -
    2. -
    3. - -

      #table: -The STATIC

      - -
    4. -
    -
    -
    -
    -
    - - -SET_STATIC:FindStatic(StaticName) - -
    -
    - -

    Finds a Static based on the Static Name.

    - -

    Parameter

    -
      -
    • - -

      #string StaticName :

      - -
    • -
    -

    Return value

    - -

    Wrapper.Static#STATIC: -The found Static.

    - -
    -
    -
    -
    - - -SET_STATIC:ForEachStatic(IteratorFunction, ...) - -
    -
    - -

    Iterate the SET_STATIC and call an interator function for each alive STATIC, providing the STATIC and optional parameters.

    - -

    Parameters

    -
      -
    • - -

      #function IteratorFunction : -The function that will be called when there is an alive STATIC in the SET_STATIC. The function needs to accept a STATIC parameter.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #SET_STATIC: -self

    - -
    -
    -
    -
    - - -SET_STATIC:ForEachStaticCompletelyInZone(ZoneObject, IteratorFunction, ...) - -
    -
    - -

    Iterate the SET_STATIC and call an iterator function for each alive STATIC presence completely in a Zone, providing the STATIC and optional parameters to the called function.

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

      - -
    • -
    • - -

      #function IteratorFunction : -The function that will be called when there is an alive STATIC in the SET_STATIC. The function needs to accept a STATIC parameter.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #SET_STATIC: -self

    - -
    -
    -
    -
    - - -SET_STATIC:ForEachStaticInZone(IteratorFunction, ...) - -
    -
    - -

    Check if minimal one element of the SET_STATIC is in the Zone.

    - -

    Parameters

    -
      -
    • - -

      #function IteratorFunction : -The function that will be called when there is an alive STATIC in the SET_STATIC. The function needs to accept a STATIC parameter.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #SET_STATIC: -self

    - -
    -
    -
    -
    - - -SET_STATIC:ForEachStaticNotInZone(ZoneObject, IteratorFunction, ...) - -
    -
    - -

    Iterate the SET_STATIC and call an iterator function for each alive STATIC presence not in a Zone, providing the STATIC and optional parameters to the called function.

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

      - -
    • -
    • - -

      #function IteratorFunction : -The function that will be called when there is an alive STATIC in the SET_STATIC. The function needs to accept a STATIC parameter.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #SET_STATIC: -self

    - -
    -
    -
    -
    - - -SET_STATIC:GetCoordinate() - -
    -
    - -

    Get the center coordinate of the SET_STATIC.

    - -

    Return value

    - -

    Core.Point#COORDINATE: -The center coordinate of all the units in the set, including heading in degrees and speed in mps in case of moving units.

    - -
    -
    -
    -
    - - -SET_STATIC:GetFirst() - -
    -
    - -

    Get the first unit from the set.

    - -

    Return value

    - -

    Wrapper.Static#STATIC: -The STATIC object.

    - -
    -
    -
    -
    - - -SET_STATIC:GetHeading() - -
    -
    - -

    Get the average heading of the SET_STATIC.

    - -

    Return value

    - -

    #number: -Heading Heading in degrees and speed in mps in case of moving units.

    - -
    -
    -
    -
    - - -SET_STATIC:GetStaticTypes() - -
    -
    - -

    Returns map of unit types.

    - -

    Return value

    - -

    #map:

    -

    string,#number> A map of the unit types found. The key is the StaticTypeName and the value is the amount of unit types found.

    - -
    -
    -
    -
    - - -SET_STATIC:GetStaticTypesText() - -
    -
    - -

    Returns a comma separated string of the unit types with a count in the Set.

    - -

    Return value

    - -

    #string: -The unit types string

    - -
    -
    -
    -
    - - -SET_STATIC:GetTypeNames(Delimiter) - -
    -
    - -

    Retrieve the type names of the Statics in the SET, delimited by an optional delimiter.

    - -

    Parameter

    -
      -
    • - -

      #string Delimiter : -(optional) The delimiter, which is default a comma.

      - -
    • -
    -

    Return value

    - -

    #string: -The types of the Statics delimited.

    - -
    -
    -
    -
    - - -SET_STATIC:GetVelocity() - -
    -
    - -

    Get the maximum velocity of the SET_STATIC.

    - -

    Return value

    - -

    #number: -The speed in mps in case of moving units.

    - -
    -
    -
    -
    - - -SET_STATIC:IsIncludeObject(MStatic) - -
    -
    - - - -

    Parameter

    - -

    Return value

    - -

    #SET_STATIC: -self

    - -
    -
    -
    -
    - - -SET_STATIC:IsNotInZone(ZoneObject, Zone) - -
    -
    - -

    Check if no element of the SET_STATIC is in the Zone.

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

      - -
    • -
    • - -

      Zone :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -SET_STATIC:IsPatriallyInZone(Zone) - -
    -
    - -

    Check if minimal one element of the SET_STATIC is in the Zone.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -SET_STATIC:New() - -
    -
    - -

    Creates a new SET_STATIC object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

    - -

    Return value

    - -

    #SET_STATIC:

    - - -

    Usage:

    -
    -- Define a new SET_STATIC Object. This DBObject will contain a reference to all alive Statics.
    -DBObject = SET_STATIC:New()
    - -
    -
    -
    -
    - - -SET_STATIC:RemoveStaticsByName(RemoveStaticNames) - -
    -
    - -

    Remove STATIC(s) from SET_STATIC.

    - -

    Parameter

    - -

    Return value

    - - -

    self

    - -
    -
    - -

    Type SET_UNIT

    -

    Field(s)

    -
    -
    - - -SET_UNIT:AddInDatabase(Event) - -
    -
    - -

    Handles the Database to check on an event (birth) that the Object was added in the Database.

    - - -

    This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

    - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      #string: -The name of the UNIT

      - -
    2. -
    3. - -

      #table: -The UNIT

      - -
    4. -
    -
    -
    -
    -
    - - -SET_UNIT:AddUnit(AddUnit) - -
    -
    - -

    Add UNIT(s) to SET_UNIT.

    - -

    Parameter

    -
      -
    • - -

      #string AddUnit : -A single UNIT.

      - -
    • -
    -

    Return value

    - -

    #SET_UNIT: -self

    - -
    -
    -
    -
    - - -SET_UNIT:AddUnitsByName(AddUnitNames) - -
    -
    - -

    Add UNIT(s) to SET_UNIT.

    - -

    Parameter

    -
      -
    • - -

      #string AddUnitNames : -A single name or an array of UNIT names.

      - -
    • -
    -

    Return value

    - -

    #SET_UNIT: -self

    - -
    -
    -
    -
    - - -SET_UNIT:CalculateThreatLevelA2G() - -
    -
    - -

    Calculate the maxium A2G threat level of the SET_UNIT.

    - -

    Return value

    - -

    #number: -The maximum threatlevel

    - -
    -
    -
    -
    - - -SET_UNIT:FilterCategories(Categories) - -
    -
    - -

    Builds a set of units out of categories.

    - - -

    Possible current categories are plane, helicopter, ground, ship.

    - -

    Parameter

    -
      -
    • - -

      #string Categories : -Can take the following values: "plane", "helicopter", "ground", "ship".

      - -
    • -
    -

    Return value

    - -

    #SET_UNIT: -self

    - -
    -
    -
    -
    - - -SET_UNIT:FilterCoalitions(Coalitions) - -
    -
    - -

    Builds a set of units of coalitions.

    - - -

    Possible current coalitions are red, blue and neutral.

    - -

    Parameter

    -
      -
    • - -

      #string Coalitions : -Can take the following values: "red", "blue", "neutral".

      - -
    • -
    -

    Return value

    - -

    #SET_UNIT: -self

    - -
    -
    -
    -
    - - -SET_UNIT:FilterCountries(Countries) - -
    -
    - -

    Builds a set of units of defined countries.

    - - -

    Possible current countries are those known within DCS world.

    - -

    Parameter

    -
      -
    • - -

      #string Countries : -Can take those country strings known within DCS world.

      - -
    • -
    -

    Return value

    - -

    #SET_UNIT: -self

    - -
    -
    -
    -
    - - -SET_UNIT:FilterHasRadar(RadarTypes) - -
    -
    - -

    Builds a set of units having a radar of give types.

    - - -

    All the units having a radar of a given type will be included within the set.

    - -

    Parameter

    -
      -
    • - -

      #table RadarTypes : -The radar types.

      - -
    • -
    -

    Return value

    - -

    #SET_UNIT: -self

    - -
    -
    -
    -
    - - -SET_UNIT:FilterHasSEAD() - -
    -
    - -

    Builds a set of SEADable units.

    - -

    Return value

    - -

    #SET_UNIT: -self

    - -
    -
    -
    -
    - - -SET_UNIT:FilterPrefixes(Prefixes) - -
    -
    - -

    Builds a set of units of defined unit prefixes.

    - - -

    All the units starting with the given prefixes will be included within the set.

    - -

    Parameter

    -
      -
    • - -

      #string Prefixes : -The prefix of which the unit name starts with.

      - -
    • -
    -

    Return value

    - -

    #SET_UNIT: -self

    - -
    -
    -
    -
    - - -SET_UNIT:FilterStart() - -
    -
    - -

    Starts the filtering.

    - -

    Return value

    - -

    #SET_UNIT: -self

    - -
    -
    -
    -
    - - -SET_UNIT:FilterTypes(Types) - -
    -
    - -

    Builds a set of units of defined unit types.

    - - -

    Possible current types are those types known within DCS world.

    - -

    Parameter

    -
      -
    • - -

      #string Types : -Can take those type strings known within DCS world.

      - -
    • -
    -

    Return value

    - -

    #SET_UNIT: -self

    - -
    -
    -
    -
    - - -SET_UNIT:FindInDatabase(Event) - -
    -
    - -

    Handles the Database to check on any event that Object exists in the Database.

    - - -

    This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

    - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      #string: -The name of the UNIT

      - -
    2. -
    3. - -

      #table: -The UNIT

      - -
    4. -
    -
    -
    -
    -
    - - -SET_UNIT:FindUnit(UnitName) - -
    -
    - -

    Finds a Unit based on the Unit Name.

    - -

    Parameter

    -
      -
    • - -

      #string UnitName :

      - -
    • -
    -

    Return value

    - -

    Wrapper.Unit#UNIT: -The found Unit.

    - -
    -
    -
    -
    - - -SET_UNIT:ForEachUnit(IteratorFunction, ...) - -
    -
    - -

    Iterate the SET_UNIT and call an interator function for each alive UNIT, providing the UNIT and optional parameters.

    - -

    Parameters

    -
      -
    • - -

      #function IteratorFunction : -The function that will be called when there is an alive UNIT in the SET_UNIT. The function needs to accept a UNIT parameter.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #SET_UNIT: -self

    - -
    -
    -
    -
    - - -SET_UNIT:ForEachUnitCompletelyInZone(ZoneObject, IteratorFunction, ...) - -
    -
    - -

    Iterate the SET_UNIT and call an iterator function for each alive UNIT presence completely in a Zone, providing the UNIT and optional parameters to the called function.

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

      - -
    • -
    • - -

      #function IteratorFunction : -The function that will be called when there is an alive UNIT in the SET_UNIT. The function needs to accept a UNIT parameter.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #SET_UNIT: -self

    - -
    -
    -
    -
    - - -SET_UNIT:ForEachUnitInZone(IteratorFunction, ...) - -
    -
    - -

    Check if minimal one element of the SET_UNIT is in the Zone.

    - -

    Parameters

    -
      -
    • - -

      #function IteratorFunction : -The function that will be called when there is an alive UNIT in the SET_UNIT. The function needs to accept a UNIT parameter.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #SET_UNIT: -self

    - -
    -
    -
    -
    - - -SET_UNIT:ForEachUnitNotInZone(ZoneObject, IteratorFunction, ...) - -
    -
    - -

    Iterate the SET_UNIT and call an iterator function for each alive UNIT presence not in a Zone, providing the UNIT and optional parameters to the called function.

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

      - -
    • -
    • - -

      #function IteratorFunction : -The function that will be called when there is an alive UNIT in the SET_UNIT. The function needs to accept a UNIT parameter.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #SET_UNIT: -self

    - -
    -
    -
    -
    - - -SET_UNIT:ForEachUnitPerThreatLevel(FromThreatLevel, ToThreatLevel, IteratorFunction, ...) - -
    -
    - -

    Iterate the SET_UNIT sorted *per Threat Level and call an interator function for each alive UNIT, providing the UNIT and optional parameters.

    - - -

    Parameters

    -
      -
    • - -

      #number FromThreatLevel : -The TreatLevel to start the evaluation From (this must be a value between 0 and 10).

      - -
    • -
    • - -

      #number ToThreatLevel : -The TreatLevel to stop the evaluation To (this must be a value between 0 and 10).

      - -
    • -
    • - -

      #function IteratorFunction : -The function that will be called when there is an alive UNIT in the SET_UNIT. The function needs to accept a UNIT parameter.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #SET_UNIT: -self

    - -

    Usage:

    -
    
    -    UnitSet:ForEachUnitPerThreatLevel( 10, 0,
    -      -- @param Wrapper.Unit#UNIT UnitObject The UNIT object in the UnitSet, that will be passed to the local function for evaluation.
    -      function( UnitObject )
    -        .. logic ..
    -      end
    -    )
    -
    - -
    -
    -
    -
    - - -SET_UNIT:GetCoordinate() - -
    -
    - -

    Get the center coordinate of the SET_UNIT.

    - -

    Return value

    - -

    Core.Point#COORDINATE: -The center coordinate of all the units in the set, including heading in degrees and speed in mps in case of moving units.

    - -
    -
    -
    -
    - - -SET_UNIT:GetFirst() - -
    -
    - -

    Get the first unit from the set.

    - -

    Return value

    - -

    Wrapper.Unit#UNIT: -The UNIT object.

    - -
    -
    -
    -
    - - -SET_UNIT:GetHeading() - -
    -
    - -

    Get the average heading of the SET_UNIT.

    - -

    Return value

    - -

    #number: -Heading Heading in degrees and speed in mps in case of moving units.

    - -
    -
    -
    -
    - - -SET_UNIT:GetTypeNames(Delimiter) - -
    -
    - -

    Retrieve the type names of the Units in the SET, delimited by an optional delimiter.

    - -

    Parameter

    -
      -
    • - -

      #string Delimiter : -(optional) The delimiter, which is default a comma.

      - -
    • -
    -

    Return value

    - -

    #string: -The types of the Units delimited.

    - -
    -
    -
    -
    - - -SET_UNIT:GetUnitThreatLevels() - -
    -
    - -

    Returns map of unit threat levels.

    - -

    Return value

    - -

    #table:

    - - -
    -
    -
    -
    - - -SET_UNIT:GetUnitTypes() - -
    -
    - -

    Returns map of unit types.

    - -

    Return value

    - -

    #map:

    -

    string,#number> A map of the unit types found. The key is the UnitTypeName and the value is the amount of unit types found.

    - -
    -
    -
    -
    - - -SET_UNIT:GetUnitTypesText() - -
    -
    - -

    Returns a comma separated string of the unit types with a count in the Set.

    - -

    Return value

    - -

    #string: -The unit types string

    - -
    -
    -
    -
    - - -SET_UNIT:GetVelocity() - -
    -
    - -

    Get the maximum velocity of the SET_UNIT.

    - -

    Return value

    - -

    #number: -The speed in mps in case of moving units.

    - -
    -
    -
    -
    - - -SET_UNIT:HasFriendlyUnits(FriendlyCoalition) - -
    -
    - -

    Returns if the Set has friendly ground units.

    - -

    Parameter

    -
      -
    • - -

      FriendlyCoalition :

      - -
    • -
    -

    Return value

    - -

    #number: -The amount of ground targets in the Set.

    - -
    -
    -
    -
    - - -SET_UNIT:HasGroundUnits() - -
    -
    - -

    Returns if the Set has ground targets.

    - -

    Return value

    - -

    #number: -The amount of ground targets in the Set.

    - -
    -
    -
    -
    - - -SET_UNIT:HasRadar(RadarType) - -
    -
    - -

    Returns if the Set has targets having a radar (of a given type).

    - -

    Parameter

    - -

    Return value

    - -

    #number: -The amount of radars in the Set with the given type

    - -
    -
    -
    -
    - - -SET_UNIT:HasSEAD() - -
    -
    - -

    Returns if the Set has targets that can be SEADed.

    - -

    Return value

    - -

    #number: -The amount of SEADable units in the Set

    - -
    -
    -
    -
    - - -SET_UNIT:IsIncludeObject(MUnit) - -
    -
    - - - -

    Parameter

    - -

    Return value

    - -

    #SET_UNIT: -self

    - -
    -
    -
    -
    - - -SET_UNIT:IsNotInZone(ZoneObject, Zone) - -
    -
    - -

    Check if no element of the SET_UNIT is in the Zone.

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

      - -
    • -
    • - -

      Zone :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -SET_UNIT:IsPartiallyInZone(ZoneTest) - -
    -
    - -

    Check if minimal one element of the SET_UNIT is in the Zone.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -SET_UNIT:New() - -
    -
    - -

    Creates a new SET_UNIT object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

    - -

    Return value

    - -

    #SET_UNIT:

    - - -

    Usage:

    -
    -- Define a new SET_UNIT Object. This DBObject will contain a reference to all alive Units.
    -DBObject = SET_UNIT:New()
    - -
    -
    -
    -
    - - -SET_UNIT:RemoveUnitsByName(RemoveUnitNames) - -
    -
    - -

    Remove UNIT(s) from SET_UNIT.

    - -

    Parameter

    -
      -
    • - -

      Wrapper.Unit#UNIT RemoveUnitNames : -A single name or an array of UNIT names.

      - -
    • -
    -

    Return value

    - - -

    self

    - -
    -
    - -

    Type map

    - -
    - -
    - - diff --git a/docs/Documentation/Settings.html b/docs/Documentation/Settings.html deleted file mode 100644 index 6ecb40ac1..000000000 --- a/docs/Documentation/Settings.html +++ /dev/null @@ -1,1676 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Settings

    - -

    Core -- SETTINGS classe defines the format settings management for measurement.

    - - - -

    Banner Image

    - -
    - -

    Demo Missions

    - -

    SETTINGS Demo Missions source code

    - -

    SETTINGS Demo Missions, only for beta testers

    - -

    ALL Demo Missions pack of the last release

    - -
    - -

    YouTube Channel

    - -

    SETTINGS YouTube Channel

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - -
    SETTINGS -

    SETTINGS class, extends Base#BASE

    - -
    -

    Type SETTINGS

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SETTINGS:A2AMenuSystem(MenuGroup, RootMenu, A2ASystem) - -
    SETTINGS.A2ASystem - -
    SETTINGS:A2GMenuSystem(MenuGroup, RootMenu, A2GSystem) - -
    SETTINGS.A2GSystem - -
    SETTINGS:GetLL_DDM_Accuracy() -

    Gets the SETTINGS LL accuracy.

    -
    SETTINGS:GetMGRS_Accuracy() -

    Gets the SETTINGS MGRS accuracy.

    -
    SETTINGS:GetMessageTime(MessageType) -

    Gets the SETTINGS Message Display Timing of a MessageType

    -
    SETTINGS:IsA2A_BRAA() -

    Is BRA

    -
    SETTINGS:IsA2A_BULLS() -

    Is BULLS

    -
    SETTINGS:IsA2A_LL_DDM() -

    Is LL DDM

    -
    SETTINGS:IsA2A_LL_DMS() -

    Is LL DMS

    -
    SETTINGS:IsA2A_MGRS() -

    Is MGRS

    -
    SETTINGS:IsA2G_BR() -

    Is BRA

    -
    SETTINGS:IsA2G_LL_DDM() -

    Is LL DDM

    -
    SETTINGS:IsA2G_LL_DMS() -

    Is LL DMS

    -
    SETTINGS:IsA2G_MGRS() -

    Is MGRS

    -
    SETTINGS:IsImperial() -

    Gets if the SETTINGS is imperial.

    -
    SETTINGS:IsMetric() -

    Gets if the SETTINGS is metric.

    -
    SETTINGS.LL_Accuracy - -
    SETTINGS.LL_DMS - -
    SETTINGS.MGRS_Accuracy - -
    SETTINGS:MenuGroupA2ASystem(PlayerUnit, PlayerGroup, PlayerName, A2ASystem) - -
    SETTINGS:MenuGroupA2GSystem(PlayerUnit, PlayerGroup, PlayerName, A2GSystem) - -
    SETTINGS:MenuGroupLL_DDM_AccuracySystem(PlayerUnit, PlayerGroup, PlayerName, LL_Accuracy) - -
    SETTINGS:MenuGroupMGRS_AccuracySystem(PlayerUnit, PlayerGroup, PlayerName, MGRS_Accuracy) - -
    SETTINGS:MenuGroupMWSystem(PlayerUnit, PlayerGroup, PlayerName, MW) - -
    SETTINGS:MenuGroupMessageTimingsSystem(PlayerUnit, PlayerGroup, PlayerName, MessageType, MessageTime) - -
    SETTINGS:MenuLL_DDM_Accuracy(MenuGroup, RootMenu, LL_Accuracy) - -
    SETTINGS:MenuMGRS_Accuracy(MenuGroup, RootMenu, MGRS_Accuracy) - -
    SETTINGS:MenuMWSystem(MenuGroup, RootMenu, MW) - -
    SETTINGS:MenuMessageTimingsSystem(MenuGroup, RootMenu, MessageType, MessageTime) - -
    SETTINGS.MessageTypeTimings - -
    SETTINGS.Metric - -
    SETTINGS.PlayerMenu - -
    SETTINGS:RemovePlayerMenu(RootMenu, PlayerUnit) - -
    SETTINGS:Set(PlayerName) -

    SETTINGS constructor.

    -
    SETTINGS:SetA2A_BRAA() -

    Sets A2A BRA

    -
    SETTINGS:SetA2A_BULLS() -

    Sets A2A BULLS

    -
    SETTINGS:SetA2A_LL_DDM() -

    Sets A2A LL DDM

    -
    SETTINGS:SetA2A_LL_DMS() -

    Sets A2A LL DMS

    -
    SETTINGS:SetA2A_MGRS() -

    Sets A2A MGRS

    -
    SETTINGS:SetA2G_BR() -

    Sets A2G BRA

    -
    SETTINGS:SetA2G_LL_DDM() -

    Sets A2G LL DDM

    -
    SETTINGS:SetA2G_LL_DMS() -

    Sets A2G LL DMS

    -
    SETTINGS:SetA2G_MGRS() -

    Sets A2G MGRS

    -
    SETTINGS:SetImperial() -

    Sets the SETTINGS imperial.

    -
    SETTINGS:SetLL_Accuracy(LL_Accuracy) -

    Sets the SETTINGS LL accuracy.

    -
    SETTINGS:SetMGRS_Accuracy(MGRS_Accuracy) -

    Sets the SETTINGS MGRS accuracy.

    -
    SETTINGS:SetMessageTime(MessageType, MessageTime) -

    Sets the SETTINGS Message Display Timing of a MessageType

    -
    SETTINGS:SetMetric() -

    Sets the SETTINGS metric.

    -
    SETTINGS:SetPlayerMenu(RootMenu, PlayerUnit, MenuText) - -
    SETTINGS:SetSystemMenu(MenuGroup, RootMenu) - -
    - -

    Global(s)

    -
    -
    - - #SETTINGS - -SETTINGS - -
    -
    - -

    SETTINGS class, extends Base#BASE

    - - -
    -
    -

    Type Settings

    - -

    Type SETTINGS

    -

    Field(s)

    -
    -
    - - -SETTINGS:A2AMenuSystem(MenuGroup, RootMenu, A2ASystem) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      MenuGroup :

      - -
    • -
    • - -

      RootMenu :

      - -
    • -
    • - -

      A2ASystem :

      - -
    • -
    -
    -
    -
    -
    - - #string - -SETTINGS.A2ASystem - -
    -
    - - - -
    -
    -
    -
    - - -SETTINGS:A2GMenuSystem(MenuGroup, RootMenu, A2GSystem) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      MenuGroup :

      - -
    • -
    • - -

      RootMenu :

      - -
    • -
    • - -

      A2GSystem :

      - -
    • -
    -
    -
    -
    -
    - - #string - -SETTINGS.A2GSystem - -
    -
    - - - -
    -
    -
    -
    - - -SETTINGS:GetLL_DDM_Accuracy() - -
    -
    - -

    Gets the SETTINGS LL accuracy.

    - -

    Return value

    - -

    #number:

    - - -
    -
    -
    -
    - - -SETTINGS:GetMGRS_Accuracy() - -
    -
    - -

    Gets the SETTINGS MGRS accuracy.

    - -

    Return value

    - -

    #number:

    - - -
    -
    -
    -
    - - -SETTINGS:GetMessageTime(MessageType) - -
    -
    - -

    Gets the SETTINGS Message Display Timing of a MessageType

    - -

    Parameter

    - -

    Return value

    - -

    #number:

    - - -
    -
    -
    -
    - - -SETTINGS:IsA2A_BRAA() - -
    -
    - -

    Is BRA

    - -

    Return value

    - -

    #boolean: -true if BRA

    - -
    -
    -
    -
    - - -SETTINGS:IsA2A_BULLS() - -
    -
    - -

    Is BULLS

    - -

    Return value

    - -

    #boolean: -true if BULLS

    - -
    -
    -
    -
    - - -SETTINGS:IsA2A_LL_DDM() - -
    -
    - -

    Is LL DDM

    - -

    Return value

    - -

    #boolean: -true if LL DDM

    - -
    -
    -
    -
    - - -SETTINGS:IsA2A_LL_DMS() - -
    -
    - -

    Is LL DMS

    - -

    Return value

    - -

    #boolean: -true if LL DMS

    - -
    -
    -
    -
    - - -SETTINGS:IsA2A_MGRS() - -
    -
    - -

    Is MGRS

    - -

    Return value

    - -

    #boolean: -true if MGRS

    - -
    -
    -
    -
    - - -SETTINGS:IsA2G_BR() - -
    -
    - -

    Is BRA

    - -

    Return value

    - -

    #boolean: -true if BRA

    - -
    -
    -
    -
    - - -SETTINGS:IsA2G_LL_DDM() - -
    -
    - -

    Is LL DDM

    - -

    Return value

    - -

    #boolean: -true if LL DDM

    - -
    -
    -
    -
    - - -SETTINGS:IsA2G_LL_DMS() - -
    -
    - -

    Is LL DMS

    - -

    Return value

    - -

    #boolean: -true if LL DMS

    - -
    -
    -
    -
    - - -SETTINGS:IsA2G_MGRS() - -
    -
    - -

    Is MGRS

    - -

    Return value

    - -

    #boolean: -true if MGRS

    - -
    -
    -
    -
    - - -SETTINGS:IsImperial() - -
    -
    - -

    Gets if the SETTINGS is imperial.

    - -

    Return value

    - -

    #boolean: -true if imperial.

    - -
    -
    -
    -
    - - -SETTINGS:IsMetric() - -
    -
    - -

    Gets if the SETTINGS is metric.

    - -

    Return value

    - -

    #boolean: -true if metric.

    - -
    -
    -
    -
    - - #number - -SETTINGS.LL_Accuracy - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -SETTINGS.LL_DMS - -
    -
    - - - -
    -
    -
    -
    - - #number - -SETTINGS.MGRS_Accuracy - -
    -
    - - - -
    -
    -
    -
    - - -SETTINGS:MenuGroupA2ASystem(PlayerUnit, PlayerGroup, PlayerName, A2ASystem) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      PlayerUnit :

      - -
    • -
    • - -

      PlayerGroup :

      - -
    • -
    • - -

      PlayerName :

      - -
    • -
    • - -

      A2ASystem :

      - -
    • -
    -
    -
    -
    -
    - - -SETTINGS:MenuGroupA2GSystem(PlayerUnit, PlayerGroup, PlayerName, A2GSystem) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      PlayerUnit :

      - -
    • -
    • - -

      PlayerGroup :

      - -
    • -
    • - -

      PlayerName :

      - -
    • -
    • - -

      A2GSystem :

      - -
    • -
    -
    -
    -
    -
    - - -SETTINGS:MenuGroupLL_DDM_AccuracySystem(PlayerUnit, PlayerGroup, PlayerName, LL_Accuracy) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      PlayerUnit :

      - -
    • -
    • - -

      PlayerGroup :

      - -
    • -
    • - -

      PlayerName :

      - -
    • -
    • - -

      LL_Accuracy :

      - -
    • -
    -
    -
    -
    -
    - - -SETTINGS:MenuGroupMGRS_AccuracySystem(PlayerUnit, PlayerGroup, PlayerName, MGRS_Accuracy) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      PlayerUnit :

      - -
    • -
    • - -

      PlayerGroup :

      - -
    • -
    • - -

      PlayerName :

      - -
    • -
    • - -

      MGRS_Accuracy :

      - -
    • -
    -
    -
    -
    -
    - - -SETTINGS:MenuGroupMWSystem(PlayerUnit, PlayerGroup, PlayerName, MW) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      PlayerUnit :

      - -
    • -
    • - -

      PlayerGroup :

      - -
    • -
    • - -

      PlayerName :

      - -
    • -
    • - -

      MW :

      - -
    • -
    -
    -
    -
    -
    - - -SETTINGS:MenuGroupMessageTimingsSystem(PlayerUnit, PlayerGroup, PlayerName, MessageType, MessageTime) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      PlayerUnit :

      - -
    • -
    • - -

      PlayerGroup :

      - -
    • -
    • - -

      PlayerName :

      - -
    • -
    • - -

      MessageType :

      - -
    • -
    • - -

      MessageTime :

      - -
    • -
    -
    -
    -
    -
    - - -SETTINGS:MenuLL_DDM_Accuracy(MenuGroup, RootMenu, LL_Accuracy) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      MenuGroup :

      - -
    • -
    • - -

      RootMenu :

      - -
    • -
    • - -

      LL_Accuracy :

      - -
    • -
    -
    -
    -
    -
    - - -SETTINGS:MenuMGRS_Accuracy(MenuGroup, RootMenu, MGRS_Accuracy) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      MenuGroup :

      - -
    • -
    • - -

      RootMenu :

      - -
    • -
    • - -

      MGRS_Accuracy :

      - -
    • -
    -
    -
    -
    -
    - - -SETTINGS:MenuMWSystem(MenuGroup, RootMenu, MW) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      MenuGroup :

      - -
    • -
    • - -

      RootMenu :

      - -
    • -
    • - -

      MW :

      - -
    • -
    -
    -
    -
    -
    - - -SETTINGS:MenuMessageTimingsSystem(MenuGroup, RootMenu, MessageType, MessageTime) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      MenuGroup :

      - -
    • -
    • - -

      RootMenu :

      - -
    • -
    • - -

      MessageType :

      - -
    • -
    • - -

      MessageTime :

      - -
    • -
    -
    -
    -
    -
    - - -SETTINGS.MessageTypeTimings - -
    -
    - - - -
    -
    -
    -
    - - - -SETTINGS.Metric - -
    -
    - - - -
    -
    -
    -
    - - - -SETTINGS.PlayerMenu - -
    -
    - - - -
    -
    -
    -
    - - -SETTINGS:RemovePlayerMenu(RootMenu, PlayerUnit) - -
    -
    - - - -

    Parameters

    - -

    Return value

    - -

    #SETTINGS:

    - - -
    -
    -
    -
    - - -SETTINGS:Set(PlayerName) - -
    -
    - -

    SETTINGS constructor.

    - -

    Parameter

    -
      -
    • - -

      PlayerName :

      - -
    • -
    -

    Return value

    - -

    #SETTINGS:

    - - -
    -
    -
    -
    - - -SETTINGS:SetA2A_BRAA() - -
    -
    - -

    Sets A2A BRA

    - -

    Return value

    - -

    #SETTINGS:

    - - -
    -
    -
    -
    - - -SETTINGS:SetA2A_BULLS() - -
    -
    - -

    Sets A2A BULLS

    - -

    Return value

    - -

    #SETTINGS:

    - - -
    -
    -
    -
    - - -SETTINGS:SetA2A_LL_DDM() - -
    -
    - -

    Sets A2A LL DDM

    - -

    Return value

    - -

    #SETTINGS:

    - - -
    -
    -
    -
    - - -SETTINGS:SetA2A_LL_DMS() - -
    -
    - -

    Sets A2A LL DMS

    - -

    Return value

    - -

    #SETTINGS:

    - - -
    -
    -
    -
    - - -SETTINGS:SetA2A_MGRS() - -
    -
    - -

    Sets A2A MGRS

    - -

    Return value

    - -

    #SETTINGS:

    - - -
    -
    -
    -
    - - -SETTINGS:SetA2G_BR() - -
    -
    - -

    Sets A2G BRA

    - -

    Return value

    - -

    #SETTINGS:

    - - -
    -
    -
    -
    - - -SETTINGS:SetA2G_LL_DDM() - -
    -
    - -

    Sets A2G LL DDM

    - -

    Return value

    - -

    #SETTINGS:

    - - -
    -
    -
    -
    - - -SETTINGS:SetA2G_LL_DMS() - -
    -
    - -

    Sets A2G LL DMS

    - -

    Return value

    - -

    #SETTINGS:

    - - -
    -
    -
    -
    - - -SETTINGS:SetA2G_MGRS() - -
    -
    - -

    Sets A2G MGRS

    - -

    Return value

    - -

    #SETTINGS:

    - - -
    -
    -
    -
    - - -SETTINGS:SetImperial() - -
    -
    - -

    Sets the SETTINGS imperial.

    - -
    -
    -
    -
    - - -SETTINGS:SetLL_Accuracy(LL_Accuracy) - -
    -
    - -

    Sets the SETTINGS LL accuracy.

    - -

    Parameter

    -
      -
    • - -

      #number LL_Accuracy :

      - -
    • -
    -

    Return value

    - -

    #SETTINGS:

    - - -
    -
    -
    -
    - - -SETTINGS:SetMGRS_Accuracy(MGRS_Accuracy) - -
    -
    - -

    Sets the SETTINGS MGRS accuracy.

    - -

    Parameter

    -
      -
    • - -

      #number MGRS_Accuracy :

      - -
    • -
    -

    Return value

    - -

    #SETTINGS:

    - - -
    -
    -
    -
    - - -SETTINGS:SetMessageTime(MessageType, MessageTime) - -
    -
    - -

    Sets the SETTINGS Message Display Timing of a MessageType

    - -

    Parameters

    -
      -
    • - -

      Core.Message#MESSAGE MessageType : -The type of the message.

      - -
    • -
    • - -

      #number MessageTime : -The display time duration in seconds of the MessageType.

      - -
    • -
    -
    -
    -
    -
    - - -SETTINGS:SetMetric() - -
    -
    - -

    Sets the SETTINGS metric.

    - -
    -
    -
    -
    - - -SETTINGS:SetPlayerMenu(RootMenu, PlayerUnit, MenuText) - -
    -
    - - - -

    Parameters

    - -

    Return value

    - -

    #SETTINGS:

    - - -
    -
    -
    -
    - - -SETTINGS:SetSystemMenu(MenuGroup, RootMenu) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      MenuGroup :

      - -
    • -
    • - -

      RootMenu :

      - -
    • -
    -

    Return value

    - -

    #SETTINGS:

    - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Smoke.html b/docs/Documentation/Smoke.html deleted file mode 100644 index 30eea03ad..000000000 --- a/docs/Documentation/Smoke.html +++ /dev/null @@ -1,722 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Smoke

    - -

    (SP) (MP) (FSM) Route AI or players through waypoints or to zones.

    - - - -
    - -

    #ACT_ASSIST FSM class, extends Fsm#FSM_PROCESS

    - -

    ACT_ASSIST state machine:

    - -

    This class is a state machine: it manages a process that is triggered by events causing state transitions to occur. -All derived classes from this class will start with the class name, followed by a _. See the relevant derived class descriptions below. -Each derived class follows exactly the same process, using the same events and following the same state transitions, -but will have different implementation behaviour upon each event or state transition.

    - -

    ACT_ASSIST Events:

    - -

    These are the events defined in this class:

    - -
      -
    • Start: The process is started.
    • -
    • Next: The process is smoking the targets in the given zone.
    • -
    - -

    ACT_ASSIST Event methods:

    - -

    Event methods are available (dynamically allocated by the state machine), that accomodate for state transitions occurring in the process. -There are two types of event methods, which you can use to influence the normal mechanisms in the state machine:

    - -
      -
    • Immediate: The event method has exactly the name of the event.
    • -
    • Delayed: The event method starts with a __ + the name of the event. The first parameter of the event method is a number value, expressing the delay in seconds when the event will be executed.
    • -
    - -

    ACT_ASSIST States:

    - -
      -
    • None: The controllable did not receive route commands.
    • -
    • AwaitSmoke (*): The process is awaiting to smoke the targets in the zone.
    • -
    • Smoking (*): The process is smoking the targets in the zone.
    • -
    • Failed (*): The process has failed.
    • -
    - -

    (*) End states of the process.

    - -

    ACT_ASSIST state transition methods:

    - -

    State transition functions can be set by the mission designer customizing or improving the behaviour of the state. -There are 2 moments when state transition methods will be called by the state machine:

    - -
      -
    • Before the state transition. - The state transition method needs to start with the name OnBefore + the name of the state. - If the state transition method returns false, then the processing of the state transition will not be done! - If you want to change the behaviour of the AIControllable at this event, return false, - but then you'll need to specify your own logic using the AIControllable!

    • -
    • After the state transition. - The state transition method needs to start with the name OnAfter + the name of the state. - These state transition methods need to provide a return value, which is specified at the function description.

    • -
    - -
    - -

    1) #ACTASSISTSMOKETARGETSZONE class, extends Fsm.Route#ACT_ASSIST

    - -

    The ACTASSISTSMOKETARGETSZONE class implements the core functions to smoke targets in a Zone. -The targets are smoked within a certain range around each target, simulating a realistic smoking behaviour. -At random intervals, a new target is smoked.

    - -

    1.1) ACTASSISTSMOKETARGETSZONE constructor:

    - - - -
    - - -

    Global(s)

    - - - - - - - - - -
    ACT_ASSIST - -
    ACT_ASSIST_SMOKE_TARGETS_ZONE - -
    -

    Type ACT_ASSIST

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ACT_ASSIST.ClassName - -
    ACT_ASSIST.Menu - -
    ACT_ASSIST.MenuSmokeBlue - -
    ACT_ASSIST.MenuSmokeGreen - -
    ACT_ASSIST.MenuSmokeOrange - -
    ACT_ASSIST.MenuSmokeRed - -
    ACT_ASSIST.MenuSmokeWhite - -
    ACT_ASSIST:New() -

    Creates a new target smoking state machine.

    -
    ACT_ASSIST.TargetSetUnit - -
    ACT_ASSIST.TargetZone - -
    ACT_ASSIST:onafterStart(ProcessUnit, Event, From, To) -

    StateMachine callback function

    -
    ACT_ASSIST:onafterStop(ProcessUnit, Event, From, To) -

    StateMachine callback function

    -
    - -

    Type ACT_ASSIST_SMOKE_TARGETS_ZONE

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    ACT_ASSIST_SMOKE_TARGETS_ZONE.ClassName - -
    ACT_ASSIST_SMOKE_TARGETS_ZONE:Init(FsmSmoke) - -
    ACT_ASSIST_SMOKE_TARGETS_ZONE:New(TargetSetUnit, TargetZone) -

    Creates a new target smoking state machine.

    -
    ACT_ASSIST_SMOKE_TARGETS_ZONE.TargetSetUnit - -
    ACT_ASSIST_SMOKE_TARGETS_ZONE.TargetZone - -
    ACT_ASSIST_SMOKE_TARGETS_ZONE:onenterSmoking(ProcessUnit, Event, From, To) -

    StateMachine callback function

    -
    - -

    Global(s)

    -
    -
    - - #ACT_ASSIST - -ACT_ASSIST - -
    -
    - - - -
    -
    -
    -
    - - #ACT_ASSIST_SMOKE_TARGETS_ZONE - -ACT_ASSIST_SMOKE_TARGETS_ZONE - -
    -
    - - - -
    -
    -

    Type Smoke

    - -

    Type ACT_ASSIST

    - -

    ACT_ASSIST class

    - -

    Field(s)

    -
    -
    - - #string - -ACT_ASSIST.ClassName - -
    -
    - - - -
    -
    -
    -
    - - - -ACT_ASSIST.Menu - -
    -
    - - - -
    -
    -
    -
    - - - -ACT_ASSIST.MenuSmokeBlue - -
    -
    - - - -
    -
    -
    -
    - - - -ACT_ASSIST.MenuSmokeGreen - -
    -
    - - - -
    -
    -
    -
    - - - -ACT_ASSIST.MenuSmokeOrange - -
    -
    - - - -
    -
    -
    -
    - - - -ACT_ASSIST.MenuSmokeRed - -
    -
    - - - -
    -
    -
    -
    - - - -ACT_ASSIST.MenuSmokeWhite - -
    -
    - - - -
    -
    -
    -
    - - -ACT_ASSIST:New() - -
    -
    - -

    Creates a new target smoking state machine.

    - - -

    The process will request from the menu if it accepts the task, if not, the unit is removed from the simulator.

    - -

    Return value

    - -

    #ACT_ASSIST:

    - - -
    -
    -
    -
    - - - -ACT_ASSIST.TargetSetUnit - -
    -
    - - - -
    -
    -
    -
    - - - -ACT_ASSIST.TargetZone - -
    -
    - - - -
    -
    -
    -
    - - -ACT_ASSIST:onafterStart(ProcessUnit, Event, From, To) - -
    -
    - -

    StateMachine callback function

    - -

    Parameters

    - -
    -
    -
    -
    - - -ACT_ASSIST:onafterStop(ProcessUnit, Event, From, To) - -
    -
    - -

    StateMachine callback function

    - -

    Parameters

    - -
    -
    - -

    Type ACT_ASSIST_SMOKE_TARGETS_ZONE

    - -

    ACTASSISTSMOKETARGETSZONE class

    - -

    Field(s)

    -
    -
    - - #string - -ACT_ASSIST_SMOKE_TARGETS_ZONE.ClassName - -
    -
    - - - -
    -
    -
    -
    - - -ACT_ASSIST_SMOKE_TARGETS_ZONE:Init(FsmSmoke) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      FsmSmoke :

      - -
    • -
    -
    -
    -
    -
    - - -ACT_ASSIST_SMOKE_TARGETS_ZONE:New(TargetSetUnit, TargetZone) - -
    -
    - -

    Creates a new target smoking state machine.

    - - -

    The process will request from the menu if it accepts the task, if not, the unit is removed from the simulator.

    - -

    Parameters

    - -
    -
    -
    -
    - - Set#SET_UNIT - -ACT_ASSIST_SMOKE_TARGETS_ZONE.TargetSetUnit - -
    -
    - - - -
    -
    -
    -
    - - Core.Zone#ZONE_BASE - -ACT_ASSIST_SMOKE_TARGETS_ZONE.TargetZone - -
    -
    - - - -
    -
    -
    -
    - - -ACT_ASSIST_SMOKE_TARGETS_ZONE:onenterSmoking(ProcessUnit, Event, From, To) - -
    -
    - -

    StateMachine callback function

    - -

    Parameters

    - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Spawn.html b/docs/Documentation/Spawn.html deleted file mode 100644 index 1fcf3d881..000000000 --- a/docs/Documentation/Spawn.html +++ /dev/null @@ -1,4025 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Spawn

    - -

    Core -- SPAWN class dynamically spawns new groups of units in your missions.

    - - -

    -Banner Image

    - -
    - -

    The documentation of the SPAWN class can be found further in this document.

    - -
    - -

    Demo Missions

    - -

    SPAWN Demo Missions source code

    - -

    SPAWN Demo Missions, only for beta testers

    - -

    ALL Demo Missions pack of the last release

    - -
    - -

    YouTube Channel

    - -

    SPAWN YouTube Channel

    - -
    - -

    AUTHORS and CONTRIBUTIONS

    - -

    Contributions:

    - -
      -
    • Aaron: Posed the idea for Group position randomization at SpawnInZone and make the Unit randomization separate from the Group randomization.
    • -
    • Entropy, Afinegan: Came up with the requirement for AIOnOff().
    • -
    - -

    Authors:

    - -
      -
    • FlightControl: Design & Programming
    • -
    - - -

    Global(s)

    - - - - - -
    SPAWN -

    SPAWN class, extends Base#BASE

    - -

    -- Banner Image

    - -
    - -

    The SPAWN class allows to spawn dynamically new groups.

    -
    -

    Type SPAWN

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SPAWN.AIOnOff - -
    SPAWN.AliveUnits - -
    SPAWN.ClassName - -
    SPAWN.CleanUpScheduler - -
    SPAWN.DelayOnOff - -
    SPAWN:GetCoordinate() -

    Get the Coordinate of the Group that is Late Activated as the template for the SPAWN object.

    -
    SPAWN:GetFirstAliveGroup() -

    Will find the first alive Group it has spawned, and return the alive Group object and the first Index where the first alive Group object has been found.

    -
    SPAWN:GetGroupFromIndex(SpawnIndex) -

    Get the group from an index.

    -
    SPAWN:GetLastAliveGroup() -

    Will find the last alive Group object, and will return a reference to the last live Group object and the last Index where the last alive Group object has been found.

    -
    SPAWN:GetNextAliveGroup(SpawnIndexStart) -

    Will find the next alive Group object from a given Index, and return a reference to the alive Group object and the next Index where the alive Group has been found.

    -
    SPAWN:GetSpawnIndexFromGroup(SpawnGroup) -

    Get the index from a given group.

    -
    SPAWN.Grouping - -
    SPAWN:InitAIOff() -

    Turns the AI Off for the Group when spawning.

    -
    SPAWN:InitAIOn() -

    Turns the AI On for the Group when spawning.

    -
    SPAWN:InitAIOnOff(AIOnOff) - -
    SPAWN:InitArray(SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY) -

    Makes the groups visible before start (like a batallion).

    -
    SPAWN:InitCleanUp(SpawnCleanUpInterval) -

    CleanUp groups when they are still alive, but inactive.

    -
    SPAWN:InitDelayOff() -

    Turns the Delay Off for the Group when spawning.

    -
    SPAWN:InitDelayOn() -

    Turns the Delay On for the Group when spawning.

    -
    SPAWN:InitDelayOnOff(DelayOnOff) - -
    SPAWN:InitGrouping(Grouping) -

    When spawning a new group, make the grouping of the units according the InitGrouping setting.

    -
    SPAWN:InitKeepUnitNames() -

    Keeps the unit names as defined within the mission editor, -but note that anything after a # mark is ignored, -and any spaces before and after the resulting name are removed.

    -
    SPAWN:InitLimit(SpawnMaxUnitsAlive, SpawnMaxGroups) -

    Limits the Maximum amount of Units that can be alive at the same time, and the maximum amount of groups that can be spawned.

    -
    SPAWN:InitRandomizePosition(RandomizePosition, OuterRadius, InnerRadius) -

    Randomizes the position of Groups that are spawned within a radius band, given an Outer and Inner radius, from the point that the spawn happens.

    -
    SPAWN:InitRandomizeRoute(SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight) -

    Randomizes the defined route of the SpawnTemplatePrefix group in the ME.

    -
    SPAWN:InitRandomizeTemplate(SpawnTemplatePrefixTable) -

    This method is rather complicated to understand.

    -
    SPAWN:InitRandomizeTemplatePrefixes(SpawnTemplatePrefixes) -

    Randomize templates to be used as the unit representatives for the Spawned group, defined by specifying the prefix names.

    -
    SPAWN:InitRandomizeTemplateSet(SpawnTemplateSet) -

    Randomize templates to be used as the unit representatives for the Spawned group, defined using a SET_GROUP object.

    -
    SPAWN:InitRandomizeUnits(RandomizeUnits, OuterRadius, InnerRadius) -

    Randomizes the UNITs that are spawned within a radius band given an Outer and Inner radius.

    -
    SPAWN:InitRandomizeZones(SpawnZoneTable) - -
    SPAWN:InitRepeat() -

    For planes and helicopters, when these groups go home and land on their home airbases and farps, they normally would taxi to the parking spot, shut-down their engines and wait forever until the Group is removed by the runtime environment.

    -
    SPAWN:InitRepeatOnEngineShutDown() -

    Respawn after landing when its engines have shut down.

    -
    SPAWN:InitRepeatOnLanding() -

    Respawn group after landing.

    -
    SPAWN:InitUnControlled(UnControlled) -

    (AIR) Will spawn a plane group in UnControlled or Controlled mode...

    -
    SPAWN.MaxAliveGroups - -
    SPAWN.MaxAliveUnits - -
    SPAWN:New(SpawnTemplatePrefix) -

    Creates the main object to spawn a Group defined in the DCS ME.

    -
    SPAWN:NewWithAlias(SpawnTemplatePrefix, SpawnAliasPrefix) -

    Creates a new SPAWN instance to create new groups based on the defined template and using a new alias for each new group.

    -
    SPAWN:OnSpawnGroup(SpawnCallBackFunction, SpawnFunctionArguments, ...) -

    Allows to place a CallFunction hook when a new group spawns.

    -
    SPAWN:ReSpawn(SpawnIndex) -

    Will re-spawn a group based on a given index.

    -
    SPAWN.Repeat - -
    SPAWN.RepeatOnEngineShutDown - -
    SPAWN.RepeatOnLanding - -
    SPAWN:Spawn() -

    Will spawn a group based on the internal index.

    -
    SPAWN.SpawnAliasPrefix - -
    SPAWN:SpawnAtAirbase(SpawnAirbase, Takeoff, TakeoffAltitude) -

    Will spawn a group at an Airbase.

    -
    SPAWN.SpawnCleanUpInterval - -
    SPAWN.SpawnCleanUpTimeStamps - -
    SPAWN.SpawnCount - -
    SPAWN:SpawnFromStatic(HostStatic, MinHeight, MaxHeight, SpawnIndex) -

    Will spawn a group from a hosting static.

    -
    SPAWN:SpawnFromUnit(HostUnit, MinHeight, MaxHeight, SpawnIndex) -

    Will spawn a group from a hosting unit.

    -
    SPAWN:SpawnFromVec2(Vec2, MinHeight, MaxHeight, SpawnIndex) -

    Will spawn a group from a Vec2 in 3D space.

    -
    SPAWN:SpawnFromVec3(Vec3, SpawnIndex) -

    Will spawn a group from a Vec3 in 3D space.

    -
    SPAWN.SpawnFunctionArguments - -
    SPAWN.SpawnFunctionHook - -
    SPAWN:SpawnGroupName(SpawnIndex) -

    Will return the SpawnGroupName either with with a specific count number or without any count.

    -
    SPAWN.SpawnGrouping - -
    SPAWN.SpawnGroups - -
    SPAWN.SpawnHookScheduler - -
    SPAWN:SpawnInZone(Zone, RandomizeGroup, MinHeight, MaxHeight, SpawnIndex) -

    Will spawn a Group within a given Zone.

    -
    SPAWN.SpawnIndex - -
    SPAWN.SpawnInitKeepUnitNames - -
    SPAWN.SpawnInitLimit - -
    SPAWN.SpawnInnerRadius - -
    SPAWN.SpawnIsScheduled - -
    SPAWN.SpawnMaxGroups - -
    SPAWN.SpawnMaxUnitsAlive - -
    SPAWN.SpawnOuterRadius - -
    SPAWN.SpawnRandomize - -
    SPAWN.SpawnRandomizePosition - -
    SPAWN.SpawnRandomizePositionInnerRadius - -
    SPAWN.SpawnRandomizePositionOuterRadius - -
    SPAWN.SpawnRandomizeRoute - -
    SPAWN.SpawnRandomizeRouteEndPoint - -
    SPAWN.SpawnRandomizeRouteHeight - -
    SPAWN.SpawnRandomizeRouteRadius - -
    SPAWN.SpawnRandomizeRouteStartPoint - -
    SPAWN.SpawnRandomizeTemplate - -
    SPAWN.SpawnRandomizeUnits - -
    SPAWN:SpawnScheduleStart() -

    Will re-start the spawning scheduler.

    -
    SPAWN:SpawnScheduleStop() -

    Will stop the scheduled spawning scheduler.

    -
    SPAWN:SpawnScheduled(SpawnTime, SpawnTimeVariation) -

    Spawns new groups at varying time intervals.

    -
    SPAWN.SpawnScheduler - -
    SPAWN.SpawnTemplate - -
    SPAWN.SpawnTemplatePrefix - -
    SPAWN.SpawnTemplatePrefixTable - -
    SPAWN.SpawnUnControlled - -
    SPAWN.SpawnVisible - -
    SPAWN:SpawnWithIndex(SpawnIndex) -

    Will spawn a group with a specified index number.

    -
    SPAWN.SpawnZoneTable - -
    SPAWN.Takeoff - -
    SPAWN.UnControlled - -
    SPAWN:_GetGroupCategoryID(SpawnPrefix) -

    Gets the CategoryID of the Group with the given SpawnPrefix

    -
    SPAWN:_GetGroupCoalitionID(SpawnPrefix) -

    Gets the CoalitionID of the Group with the given SpawnPrefix

    -
    SPAWN:_GetGroupCountryID(SpawnPrefix) -

    Gets the CountryID of the Group with the given SpawnPrefix

    -
    SPAWN:_GetLastIndex() -

    Return the last maximum index that can be used.

    -
    SPAWN:_GetPrefixFromGroup(DCSUnit, SpawnGroup) -

    Return the prefix of a SpawnUnit.

    -
    SPAWN:_GetSpawnIndex(SpawnIndex) -

    Get the next index of the groups to be spawned.

    -
    SPAWN:_GetTemplate(SpawnTemplatePrefix) -

    Gets the Group Template from the ME environment definition.

    -
    SPAWN:_InitializeSpawnGroups(SpawnIndex) -

    Initalize the SpawnGroups collection.

    -
    SPAWN:_OnBirth(EventData) - -
    SPAWN:_OnDeadOrCrash(EventData) - -
    SPAWN:_OnEngineShutDown(EventData) -

    Will detect AIR Units shutting down their engines ...

    -
    SPAWN:_OnLand(EventData) -

    Will detect AIR Units landing...

    -
    SPAWN:_OnTakeOff(EventData) -

    Will detect AIR Units taking off...

    -
    SPAWN:_Prepare(SpawnTemplatePrefix, SpawnIndex) -

    Prepares the new Group Template.

    -
    SPAWN:_RandomizeRoute(SpawnIndex) -

    Private method randomizing the routes.

    -
    SPAWN:_RandomizeTemplate(SpawnIndex) -

    Private method that randomizes the template of the group.

    -
    SPAWN:_RandomizeZones(SpawnIndex) -

    Private method that randomizes the Zones where the Group will be spawned.

    -
    SPAWN:_Scheduler() -

    This function is called automatically by the Spawning scheduler.

    -
    SPAWN:_SpawnCleanUpScheduler() -

    Schedules the CleanUp of Groups

    -
    SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle) - -
    SPAWN.uncontrolled - -
    - -

    Global(s)

    -
    -
    - - #SPAWN - -SPAWN - -
    -
    - -

    SPAWN class, extends Base#BASE

    - -

    -- Banner Image

    - -
    - -

    The SPAWN class allows to spawn dynamically new groups.

    - - -

    Each SPAWN object needs to be have related template groups setup in the Mission Editor (ME), -which is a normal group with the Late Activation flag set. -This template group will never be activated in your mission.
    -SPAWN uses that template group to reference to all the characteristics -(air, ground, livery, unit composition, formation, skill level etc) of each new group to be spawned.

    - -

    Therefore, when creating a SPAWN object, the SPAWN.New and SPAWN.NewWithAlias require -the name of the template group to be given as a string to those constructor methods.

    - -

    Initialization settings can be applied on the SPAWN object, -which modify the behaviour or the way groups are spawned. -These initialization methods have the prefix Init. -There are also spawn methods with the prefix Spawn and will spawn new groups in various ways.

    - -

    IMPORTANT! The methods with prefix Init must be used before any methods with prefix Spawn method are used, or unexpected results may appear!!!

    - -

    Because SPAWN can spawn multiple groups of a template group, -SPAWN has an internal index that keeps track -which was the latest group that was spawned.

    - -

    Limits can be set on how many groups can be spawn in each SPAWN object, -using the method SPAWN.InitLimit. SPAWN has 2 kind of limits:

    - -
      -
    • The maximum amount of Units that can be alive at the same time...
    • -
    • The maximum amount of Groups that can be spawned... This is more of a resource-type of limit.
    • -
    - -

    When new groups get spawned using the Spawn methods, -it will be evaluated whether any limits have been reached. -When no spawn limit is reached, a new group will be created by the spawning methods, -and the internal index will be increased with 1.

    - -

    These limits ensure that your mission does not accidentally get flooded with spawned groups.
    -Additionally, it also guarantees that independent of the group composition, -at any time, the most optimal amount of groups are alive in your mission. -For example, if your template group has a group composition of 10 units, and you specify a limit of 100 units alive at the same time, -with unlimited resources = :InitLimit( 100, 0 ) and 10 groups are alive, but two groups have only one unit alive in the group, -then a sequent Spawn(Scheduled) will allow a new group to be spawned!!!

    - -

    IMPORTANT!! If a limit has been reached, it is possible that a Spawn method returns nil, meaning, no Group had been spawned!!!

    - -

    Spawned groups get the same name as the name of the template group.
    -Spawned units in those groups keep by default the same name as the name of the template group.
    -However, because multiple groups and units are created from the template group, -a suffix is added to each spawned group and unit.

    - -

    Newly spawned groups will get the following naming structure at run-time:

    - -
      -
    1. Spawned groups will have the name _GroupName#nnn_, where GroupName is the name of the template group, - and nnn is a counter from 0 to 999.
    2. -
    3. Spawned units will have the name _GroupName#nnn-uu_, - where uu is a counter from 0 to 99 for each new spawned unit belonging to the group.
    4. -
    - -

    That being said, there is a way to keep the same unit names!
    -The method SPAWN.InitKeepUnitNames() will keep the same unit names as defined within the template group, thus:

    - -
      -
    1. Spawned units will have the name _UnitName#nnn-uu_, - where UnitName is the unit name as defined in the template group*, - and uu is a **counter from 0 to 99 for each new spawned unit belonging to the group.
    2. -
    - -

    Some additional notes that need to be considered!!:

    - -
      -
    • templates are actually groups defined within the mission editor, with the flag "Late Activation" set. - As such, these groups are never used within the mission, but are used by the #SPAWN module.
    • -
    • It is important to defined BEFORE you spawn new groups, - a proper initialization of the SPAWN instance is done with the options you want to use.
    • -
    • When designing a mission, NEVER name groups using a "#" within the name of the group Spawn template(s), - or the SPAWN module logic won't work anymore.
    • -
    - -

    SPAWN construction methods

    - -

    Create a new SPAWN object with the SPAWN.New() or the SPAWN.NewWithAlias() methods:

    - -
      -
    • SPAWN.New(): Creates a new SPAWN object taking the name of the group that represents the GROUP template (definition).
    • -
    • SPAWN.NewWithAlias(): Creates a new SPAWN object taking the name of the group that represents the GROUP template (definition), and gives each spawned Group an different name.
    • -
    - -

    It is important to understand how the SPAWN class works internally. The SPAWN object created will contain internally a list of groups that will be spawned and that are already spawned. -The initialization methods will modify this list of groups so that when a group gets spawned, ALL information is already prepared when spawning. This is done for performance reasons. -So in principle, the group list will contain all parameters and configurations after initialization, and when groups get actually spawned, this spawning can be done quickly and efficient.

    - -

    SPAWN Initialization methods

    - -

    A spawn object will behave differently based on the usage of initialization methods, which all start with the Init prefix:

    - -

    Unit Names

    - -
      -
    • SPAWN.InitKeepUnitNames(): Keeps the unit names as defined within the mission editor, but note that anything after a # mark is ignored, and any spaces before and after the resulting name are removed. IMPORTANT! This method MUST be the first used after :New !!!
    • -
    - -

    Route randomization

    - - - -

    Group composition randomization

    - -
      -
    • SPAWN.InitRandomizeTemplate(): Randomize the group templates so that when a new group is spawned, a random group template is selected from one of the templates defined.
    • -
    - -

    Uncontrolled

    - - - -

    Array formation

    - -
      -
    • SPAWN.InitArray(): Make groups visible before they are actually activated, and order these groups like a batallion in an array.
    • -
    - -

    Position randomization

    - -
      -
    • SPAWN.InitRandomizePosition(): Randomizes the position of Groups that are spawned within a radius band, given an Outer and Inner radius, from the point that the spawn happens.
    • -
    • SPAWN.InitRandomizeUnits(): Randomizes the Units in the Group that is spawned within a radius band, given an Outer and Inner radius.
    • -
    • SPAWN.InitRandomizeZones(): Randomizes the spawning between a predefined list of Zones that are declared using this function. Each zone can be given a probability factor.
    • -
    - -

    Enable / Disable AI when spawning a new Group

    - - - -

    Limit scheduled spawning

    - -
      -
    • SPAWN.InitLimit(): Limits the amount of groups that can be alive at the same time and that can be dynamically spawned.
    • -
    - -

    Delay initial scheduled spawn

    - - - -

    Repeat spawned Groups upon landing

    - - - - -

    SPAWN Spawn methods

    - -

    Groups can be spawned at different times and methods:

    - -

    Single spawning methods

    - - - -

    Note that SPAWN.Spawn and SPAWN.ReSpawn return a GROUP#GROUP.New object, that contains a reference to the DCSGroup object. -You can use the GROUP object to do further actions with the DCSGroup.

    - -

    Scheduled spawning methods

    - - - - - -

    Retrieve alive GROUPs spawned by the SPAWN object

    - -

    The SPAWN class administers which GROUPS it has reserved (in stock) or has created during mission execution. -Every time a SPAWN object spawns a new GROUP object, a reference to the GROUP object is added to an internal table of GROUPS. -SPAWN provides methods to iterate through that internal GROUP object reference table:

    - -
      -
    • SPAWN.GetFirstAliveGroup(): Will find the first alive GROUP it has spawned, and return the alive GROUP object and the first Index where the first alive GROUP object has been found.
    • -
    • SPAWN.GetNextAliveGroup(): Will find the next alive GROUP object from a given Index, and return a reference to the alive GROUP object and the next Index where the alive GROUP has been found.
    • -
    • SPAWN.GetLastAliveGroup(): Will find the last alive GROUP object, and will return a reference to the last live GROUP object and the last Index where the last alive GROUP object has been found.
    • -
    - -

    You can use the methods SPAWN.GetFirstAliveGroup() and sequently SPAWN.GetNextAliveGroup() to iterate through the alive GROUPS within the SPAWN object, and to actions... See the respective methods for an example. -The method SPAWN.GetGroupFromIndex() will return the GROUP object reference from the given Index, dead or alive...

    - -

    Spawned cleaning of inactive groups

    - -

    Sometimes, it will occur during a mission run-time, that ground or especially air objects get damaged, and will while being damged stop their activities, while remaining alive. -In such cases, the SPAWN object will just sit there and wait until that group gets destroyed, but most of the time it won't, -and it may occur that no new groups are or can be spawned as limits are reached. -To prevent this, a SPAWN.InitCleanUp() initialization method has been defined that will silently monitor the status of each spawned group. -Once a group has a velocity = 0, and has been waiting for a defined interval, that group will be cleaned or removed from run-time. -There is a catch however :-) If a damaged group has returned to an airbase within the coalition, that group will not be considered as "lost"... -In such a case, when the inactive group is cleaned, a new group will Re-spawned automatically. -This models AI that has succesfully returned to their airbase, to restart their combat activities. -Check the SPAWN.InitCleanUp() for further info.

    - -

    Catch the Group Spawn Event in a callback function!

    - -

    When using the SPAWN.SpawnScheduleds are created following the spawn time interval parameters. -When a new Group is spawned, you maybe want to execute actions with that group spawned at the spawn event. -The SPAWN class supports this functionality through the method SPAWN.OnSpawnGroup( *function( SpawnedGroup ) end * ), -which takes a function as a parameter that you can define locally. -Whenever a new Group is spawned, the given function is called, and the Group that was just spawned, is given as a parameter. -As a result, your spawn event handling function requires one parameter to be declared, which will contain the spawned Group object. -A coding example is provided at the description of the SPAWN.OnSpawnGroup( *function( SpawnedGroup ) end * ) method.

    - -

    Delay the initial spawning

    - -

    When using the SPAWN.SpawnScheduled -immediately when :SpawnScheduled() is initiated. The methods SPAWN.InitDelayOnOff() and SPAWN.InitDelayOn() can be used to -activate a delay before the first Group is spawned. For completeness, a method SPAWN.InitDelayOff() is also available, that -can be used to switch off the initial delay. Because there is no delay by default, this method would only be used when a -SPAWN.SpawnScheduledStop() ; SPAWN.SpawnScheduledStart() sequence would have been used.

    - - - -
    -
    -

    Type Spawn

    - -

    Type SPAWN

    - -

    SPAWN Class

    - -

    Field(s)

    -
    -
    - - #boolean - -SPAWN.AIOnOff - -
    -
    - - - - -

    The AI is on by default when spawning a group.

    - -
    -
    -
    -
    - - #number - -SPAWN.AliveUnits - -
    -
    - - - -
    -
    -
    -
    - - -SPAWN.ClassName - -
    -
    - - - -
    -
    -
    -
    - - - -SPAWN.CleanUpScheduler - -
    -
    - - - - -

    self.CleanUpFunction = routines.scheduleFunction( self._SpawnCleanUpScheduler, { self }, timer.getTime() + 1, SpawnCleanUpInterval )

    - -
    -
    -
    -
    - - #boolean - -SPAWN.DelayOnOff - -
    -
    - - - - -

    No intial delay when spawning the first group.

    - -
    -
    -
    -
    - - -SPAWN:GetCoordinate() - -
    -
    - -

    Get the Coordinate of the Group that is Late Activated as the template for the SPAWN object.

    - -

    Return value

    - -

    Core.Point#COORDINATE: -The Coordinate

    - -
    -
    -
    -
    - - -SPAWN:GetFirstAliveGroup() - -
    -
    - -

    Will find the first alive Group it has spawned, and return the alive Group object and the first Index where the first alive Group object has been found.

    - -

    Return values

    -
      -
    1. - -

      Wrapper.Group#GROUP, #number: -The Group object found, the new Index where the group was found.

      - -
    2. -
    3. - -

      #nil, #nil: -When no group is found, #nil is returned.

      - -
    4. -
    -

    Usage:

    -
    -- Find the first alive @{Group} object of the SpawnPlanes SPAWN object @{Group} collection that it has spawned during the mission.
    -local GroupPlane, Index = SpawnPlanes:GetFirstAliveGroup()
    -while GroupPlane ~= nil do
    -  -- Do actions with the GroupPlane object.
    -  GroupPlane, Index = SpawnPlanes:GetNextAliveGroup( Index )
    -end
    - -
    -
    -
    -
    - - -SPAWN:GetGroupFromIndex(SpawnIndex) - -
    -
    - -

    Get the group from an index.

    - - -

    Returns the group from the SpawnGroups list. -If no index is given, it will return the first group in the list.

    - -

    Parameter

    -
      -
    • - -

      #number SpawnIndex : -The index of the group to return.

      - -
    • -
    -

    Return value

    - -

    Wrapper.Group#GROUP: -self

    - -
    -
    -
    -
    - - -SPAWN:GetLastAliveGroup() - -
    -
    - -

    Will find the last alive Group object, and will return a reference to the last live Group object and the last Index where the last alive Group object has been found.

    - -

    Return values

    -
      -
    1. - -

      Wrapper.Group#GROUP, #number: -The last alive Group object found, the last Index where the last alive Group object was found.

      - -
    2. -
    3. - -

      #nil, #nil: -When no alive Group object is found, #nil is returned.

      - -
    4. -
    -

    Usage:

    -
    -- Find the last alive @{Group} object of the SpawnPlanes SPAWN object @{Group} collection that it has spawned during the mission.
    -local GroupPlane, Index = SpawnPlanes:GetLastAliveGroup()
    -if GroupPlane then -- GroupPlane can be nil!!!
    -  -- Do actions with the GroupPlane object.
    -end
    - -
    -
    -
    -
    - - -SPAWN:GetNextAliveGroup(SpawnIndexStart) - -
    -
    - -

    Will find the next alive Group object from a given Index, and return a reference to the alive Group object and the next Index where the alive Group has been found.

    - -

    Parameter

    -
      -
    • - -

      #number SpawnIndexStart : -A Index holding the start position to search from. This method can also be used to find the first alive Group object from the given Index.

      - -
    • -
    -

    Return values

    -
      -
    1. - -

      Wrapper.Group#GROUP, #number: -The next alive Group object found, the next Index where the next alive Group object was found.

      - -
    2. -
    3. - -

      #nil, #nil: -When no alive Group object is found from the start Index position, #nil is returned.

      - -
    4. -
    -

    Usage:

    -
    -- Find the first alive @{Group} object of the SpawnPlanes SPAWN object @{Group} collection that it has spawned during the mission.
    -local GroupPlane, Index = SpawnPlanes:GetFirstAliveGroup()
    -while GroupPlane ~= nil do
    -  -- Do actions with the GroupPlane object.
    -  GroupPlane, Index = SpawnPlanes:GetNextAliveGroup( Index )
    -end
    - -
    -
    -
    -
    - - -SPAWN:GetSpawnIndexFromGroup(SpawnGroup) - -
    -
    - -

    Get the index from a given group.

    - - -

    The function will search the name of the group for a #, and will return the number behind the #-mark.

    - -

    Parameter

    -
      -
    • - -

      SpawnGroup :

      - -
    • -
    -
    -
    -
    -
    - - -SPAWN.Grouping - -
    -
    - - - - -

    No grouping

    - -
    -
    -
    -
    - - -SPAWN:InitAIOff() - -
    -
    - -

    Turns the AI Off for the Group when spawning.

    - -

    Return value

    - -

    #SPAWN: -The SPAWN object

    - -
    -
    -
    -
    - - -SPAWN:InitAIOn() - -
    -
    - -

    Turns the AI On for the Group when spawning.

    - -

    Return value

    - -

    #SPAWN: -The SPAWN object

    - -
    -
    -
    -
    - - -SPAWN:InitAIOnOff(AIOnOff) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      AIOnOff :

      - -
    • -
    -
    -
    -
    -
    - - -SPAWN:InitArray(SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY) - -
    -
    - -

    Makes the groups visible before start (like a batallion).

    - - -

    The method will take the position of the group as the first position in the array.

    - -

    Parameters

    -
      -
    • - -

      #number SpawnAngle :

      -
          The angle in degrees how the groups and each unit of the group will be positioned.
      -
      - -
    • -
    • - -

      #number SpawnWidth :

      -
           The amount of Groups that will be positioned on the X axis.
      -
      - -
    • -
    • - -

      #number SpawnDeltaX :

      -
         The space between each Group on the X-axis.
      -
      - -
    • -
    • - -

      #number SpawnDeltaY :

      -
           The space between each Group on the Y-axis.
      -
      - -
    • -
    -

    Return value

    - -

    #SPAWN: -self

    - -

    Usage:

    -
    -- Define an array of Groups.
    -Spawn_BE_Ground = SPAWN:New( 'BE Ground' ):InitLimit( 2, 24 ):InitArray( 90, "Diamond", 10, 100, 50 )
    - -
    -
    -
    -
    - - -SPAWN:InitCleanUp(SpawnCleanUpInterval) - -
    -
    - -

    CleanUp groups when they are still alive, but inactive.

    - - -

    When groups are still alive and have become inactive due to damage and are unable to contribute anything, then this group will be removed at defined intervals in seconds.

    - -

    Parameter

    -
      -
    • - -

      #string SpawnCleanUpInterval : -The interval to check for inactive groups within seconds.

      - -
    • -
    -

    Return value

    - -

    #SPAWN: -self

    - -

    Usage:

    -
    Spawn_Helicopter:CleanUp( 20 )  -- CleanUp the spawning of the helicopters every 20 seconds when they become inactive.
    - -
    -
    -
    -
    - - -SPAWN:InitDelayOff() - -
    -
    - -

    Turns the Delay Off for the Group when spawning.

    - -

    Return value

    - -

    #SPAWN: -The SPAWN object

    - -
    -
    -
    -
    - - -SPAWN:InitDelayOn() - -
    -
    - -

    Turns the Delay On for the Group when spawning.

    - -

    Return value

    - -

    #SPAWN: -The SPAWN object

    - -
    -
    -
    -
    - - -SPAWN:InitDelayOnOff(DelayOnOff) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      DelayOnOff :

      - -
    • -
    -
    -
    -
    -
    - - -SPAWN:InitGrouping(Grouping) - -
    -
    - -

    When spawning a new group, make the grouping of the units according the InitGrouping setting.

    - -

    Parameter

    -
      -
    • - -

      #number Grouping : -Indicates the maximum amount of units in the group.

      - -
    • -
    -

    Return value

    - -

    #SPAWN:

    - - -
    -
    -
    -
    - - -SPAWN:InitKeepUnitNames() - -
    -
    - -

    Keeps the unit names as defined within the mission editor, -but note that anything after a # mark is ignored, -and any spaces before and after the resulting name are removed.

    - - -

    IMPORTANT! This method MUST be the first used after :New !!!

    - -

    Return value

    - -

    #SPAWN: -self

    - -
    -
    -
    -
    - - -SPAWN:InitLimit(SpawnMaxUnitsAlive, SpawnMaxGroups) - -
    -
    - -

    Limits the Maximum amount of Units that can be alive at the same time, and the maximum amount of groups that can be spawned.

    - - -

    Note that this method is exceptionally important to balance the performance of the mission. Depending on the machine etc, a mission can only process a maximum amount of units. -If the time interval must be short, but there should not be more Units or Groups alive than a maximum amount of units, then this method should be used... -When a SPAWN.New is executed and the limit of the amount of units alive is reached, then no new spawn will happen of the group, until some of these units of the spawn object will be destroyed.

    - -

    Parameters

    -
      -
    • - -

      #number SpawnMaxUnitsAlive : -The maximum amount of units that can be alive at runtime.

      - -
    • -
    • - -

      #number SpawnMaxGroups : -The maximum amount of groups that can be spawned. When the limit is reached, then no more actual spawns will happen of the group. -This parameter is useful to define a maximum amount of airplanes, ground troops, helicopters, ships etc within a supply area. -This parameter accepts the value 0, which defines that there are no maximum group limits, but there are limits on the maximum of units that can be alive at the same time.

      - -
    • -
    -

    Return value

    - -

    #SPAWN: -self

    - -

    Usage:

    -
    -- NATO helicopters engaging in the battle field.
    --- This helicopter group consists of one Unit. So, this group will SPAWN maximum 2 groups simultaneously within the DCSRTE.
    --- There will be maximum 24 groups spawned during the whole mission lifetime. 
    -Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitLimit( 2, 24 )
    - -
    -
    -
    -
    - - -SPAWN:InitRandomizePosition(RandomizePosition, OuterRadius, InnerRadius) - -
    -
    - -

    Randomizes the position of Groups that are spawned within a radius band, given an Outer and Inner radius, from the point that the spawn happens.

    - -

    Parameters

    -
      -
    • - -

      #boolean RandomizePosition : -If true, SPAWN will perform the randomization of the Groups position between a given outer and inner radius.

      - -
    • -
    • - -

      Dcs.DCSTypes#Distance OuterRadius : -(optional) The outer radius in meters where the new group will be spawned.

      - -
    • -
    • - -

      Dcs.DCSTypes#Distance InnerRadius : -(optional) The inner radius in meters where the new group will NOT be spawned.

      - -
    • -
    -

    Return value

    - -

    #SPAWN:

    - - -
    -
    -
    -
    - - -SPAWN:InitRandomizeRoute(SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight) - -
    -
    - -

    Randomizes the defined route of the SpawnTemplatePrefix group in the ME.

    - - -

    This is very useful to define extra variation of the behaviour of groups.

    - -

    Parameters

    -
      -
    • - -

      #number SpawnStartPoint : -is the waypoint where the randomization begins. -Note that the StartPoint = 0 equaling the point where the group is spawned.

      - -
    • -
    • - -

      #number SpawnEndPoint : -is the waypoint where the randomization ends counting backwards. -This parameter is useful to avoid randomization to end at a waypoint earlier than the last waypoint on the route.

      - -
    • -
    • - -

      #number SpawnRadius : -is the radius in meters in which the randomization of the new waypoints, with the original waypoint of the original template located in the middle ...

      - -
    • -
    • - -

      #number SpawnHeight : -(optional) Specifies the additional height in meters that can be added to the base height specified at each waypoint in the ME.

      - -
    • -
    -

    Return value

    - -

    #SPAWN:

    - - -

    Usage:

    -
    -- NATO helicopters engaging in the battle field. 
    --- The KA-50 has waypoints Start point ( =0 or SP ), 1, 2, 3, 4, End point (= 5 or DP). 
    --- Waypoints 2 and 3 will only be randomized. The others will remain on their original position with each new spawn of the helicopter.
    --- The randomization of waypoint 2 and 3 will take place within a radius of 2000 meters.
    -Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitRandomizeRoute( 2, 2, 2000 )
    - -
    -
    -
    -
    - - -SPAWN:InitRandomizeTemplate(SpawnTemplatePrefixTable) - -
    -
    - -

    This method is rather complicated to understand.

    - - -

    But I'll try to explain. -This method becomes useful when you need to spawn groups with random templates of groups defined within the mission editor, -but they will all follow the same Template route and have the same prefix name. -In other words, this method randomizes between a defined set of groups the template to be used for each new spawn of a group.

    - -

    Parameter

    -
      -
    • - -

      #string SpawnTemplatePrefixTable : -A table with the names of the groups defined within the mission editor, from which one will be choosen when a new group will be spawned.

      - -
    • -
    -

    Return value

    - -

    #SPAWN:

    - - -

    Usage:

    -
    -- NATO Tank Platoons invading Gori.
    --- Choose between 13 different 'US Tank Platoon' configurations for each new SPAWN the Group to be spawned for the 
    --- 'US Tank Platoon Left', 'US Tank Platoon Middle' and 'US Tank Platoon Right' SpawnTemplatePrefixes.
    --- Each new SPAWN will randomize the route, with a defined time interval of 200 seconds with 40% time variation (randomization) and 
    --- with a limit set of maximum 12 Units alive simulteneously  and 150 Groups to be spawned during the whole mission.
    -Spawn_US_Platoon = { 'US Tank Platoon 1', 'US Tank Platoon 2', 'US Tank Platoon 3', 'US Tank Platoon 4', 'US Tank Platoon 5', 
    -                     'US Tank Platoon 6', 'US Tank Platoon 7', 'US Tank Platoon 8', 'US Tank Platoon 9', 'US Tank Platoon 10', 
    -                     'US Tank Platoon 11', 'US Tank Platoon 12', 'US Tank Platoon 13' }
    -Spawn_US_Platoon_Left = SPAWN:New( 'US Tank Platoon Left' ):InitLimit( 12, 150 ):Schedule( 200, 0.4 ):InitRandomizeTemplate( Spawn_US_Platoon ):InitRandomizeRoute( 3, 3, 2000 )
    -Spawn_US_Platoon_Middle = SPAWN:New( 'US Tank Platoon Middle' ):InitLimit( 12, 150 ):Schedule( 200, 0.4 ):InitRandomizeTemplate( Spawn_US_Platoon ):InitRandomizeRoute( 3, 3, 2000 )
    -Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150 ):Schedule( 200, 0.4 ):InitRandomizeTemplate( Spawn_US_Platoon ):InitRandomizeRoute( 3, 3, 2000 )
    - -
    -
    -
    -
    - - -SPAWN:InitRandomizeTemplatePrefixes(SpawnTemplatePrefixes) - -
    -
    - -

    Randomize templates to be used as the unit representatives for the Spawned group, defined by specifying the prefix names.

    - - -

    This method becomes useful when you need to spawn groups with random templates of groups defined within the mission editor, -but they will all follow the same Template route and have the same prefix name. -In other words, this method randomizes between a defined set of groups the template to be used for each new spawn of a group.

    - -

    Parameter

    -
      -
    • - -

      #string SpawnTemplatePrefixes : -A string or a list of string that contains the prefixes of the groups that are possible unit representatives of the group to be spawned.

      - -
    • -
    -

    Return value

    - -

    #SPAWN:

    - - -

    Usage:

    -
    -- NATO Tank Platoons invading Gori.
    -
    --- Choose between different 'US Tank Platoon Templates' configurations to be spawned for the 
    --- 'US Tank Platoon Left', 'US Tank Platoon Middle' and 'US Tank Platoon Right' SPAWN objects.
    -
    --- Each new SPAWN will randomize the route, with a defined time interval of 200 seconds with 40% time variation (randomization) and 
    --- with a limit set of maximum 12 Units alive simulteneously  and 150 Groups to be spawned during the whole mission.
    -
    -Spawn_US_Platoon_Left = SPAWN:New( 'US Tank Platoon Left' ):InitLimit( 12, 150 ):Schedule( 200, 0.4 ):InitRandomizeTemplatePrefixes( "US Tank Platoon Templates" ):InitRandomizeRoute( 3, 3, 2000 )
    -Spawn_US_Platoon_Middle = SPAWN:New( 'US Tank Platoon Middle' ):InitLimit( 12, 150 ):Schedule( 200, 0.4 ):InitRandomizeTemplatePrefixes( "US Tank Platoon Templates" ):InitRandomizeRoute( 3, 3, 2000 )
    -Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150 ):Schedule( 200, 0.4 ):InitRandomizeTemplatePrefixes( "US Tank Platoon Templates" ):InitRandomizeRoute( 3, 3, 2000 )
    - -
    -
    -
    -
    - - -SPAWN:InitRandomizeTemplateSet(SpawnTemplateSet) - -
    -
    - -

    Randomize templates to be used as the unit representatives for the Spawned group, defined using a SET_GROUP object.

    - - -

    This method becomes useful when you need to spawn groups with random templates of groups defined within the mission editor, -but they will all follow the same Template route and have the same prefix name. -In other words, this method randomizes between a defined set of groups the template to be used for each new spawn of a group.

    - -

    Parameter

    -
      -
    • - -

      Core.Set#SET_GROUP SpawnTemplateSet : -A SET_GROUP object set, that contains the groups that are possible unit representatives of the group to be spawned.

      - -
    • -
    -

    Return value

    - -

    #SPAWN:

    - - -

    Usage:

    -
    -- NATO Tank Platoons invading Gori.
    -
    --- Choose between different 'US Tank Platoon Template' configurations to be spawned for the 
    --- 'US Tank Platoon Left', 'US Tank Platoon Middle' and 'US Tank Platoon Right' SPAWN objects.
    -
    --- Each new SPAWN will randomize the route, with a defined time interval of 200 seconds with 40% time variation (randomization) and 
    --- with a limit set of maximum 12 Units alive simulteneously  and 150 Groups to be spawned during the whole mission.
    -
    -Spawn_US_PlatoonSet = SET_GROUP:New():FilterPrefixes( "US Tank Platoon Templates" ):FilterOnce()
    -
    ---- Now use the Spawn_US_PlatoonSet to define the templates using InitRandomizeTemplateSet.
    -Spawn_US_Platoon_Left = SPAWN:New( 'US Tank Platoon Left' ):InitLimit( 12, 150 ):Schedule( 200, 0.4 ):InitRandomizeTemplateSet( Spawn_US_PlatoonSet ):InitRandomizeRoute( 3, 3, 2000 )
    -Spawn_US_Platoon_Middle = SPAWN:New( 'US Tank Platoon Middle' ):InitLimit( 12, 150 ):Schedule( 200, 0.4 ):InitRandomizeTemplateSet( Spawn_US_PlatoonSet ):InitRandomizeRoute( 3, 3, 2000 )
    -Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150 ):Schedule( 200, 0.4 ):InitRandomizeTemplateSet( Spawn_US_PlatoonSet ):InitRandomizeRoute( 3, 3, 2000 )
    - -
    -
    -
    -
    - - -SPAWN:InitRandomizeUnits(RandomizeUnits, OuterRadius, InnerRadius) - -
    -
    - -

    Randomizes the UNITs that are spawned within a radius band given an Outer and Inner radius.

    - -

    Parameters

    -
      -
    • - -

      #boolean RandomizeUnits : -If true, SPAWN will perform the randomization of the UNITs position within the group between a given outer and inner radius.

      - -
    • -
    • - -

      Dcs.DCSTypes#Distance OuterRadius : -(optional) The outer radius in meters where the new group will be spawned.

      - -
    • -
    • - -

      Dcs.DCSTypes#Distance InnerRadius : -(optional) The inner radius in meters where the new group will NOT be spawned.

      - -
    • -
    -

    Return value

    - -

    #SPAWN:

    - - -

    Usage:

    -
    -- NATO helicopters engaging in the battle field. 
    --- The KA-50 has waypoints Start point ( =0 or SP ), 1, 2, 3, 4, End point (= 5 or DP). 
    --- Waypoints 2 and 3 will only be randomized. The others will remain on their original position with each new spawn of the helicopter.
    --- The randomization of waypoint 2 and 3 will take place within a radius of 2000 meters.
    -Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitRandomizeRoute( 2, 2, 2000 )
    - -
    -
    -
    -
    - - -SPAWN:InitRandomizeZones(SpawnZoneTable) - -
    -
    - - - - -

    TODO: Add example. -- This method provides the functionality to randomize the spawning of the Groups at a given list of zones of different types. - @param #SPAWN self - @param #table SpawnZoneTable A table with Zone objects. If this table is given, then each spawn will be executed within the given list of Zones objects. - @return #SPAWN - @usage - -- NATO Tank Platoons invading Gori. - -- Choose between 3 different zones for each new SPAWN the Group to be executed, regardless of the zone type.

    - -

    Parameter

    -
      -
    • - -

      SpawnZoneTable :

      - -
    • -
    -
    -
    -
    -
    - - -SPAWN:InitRepeat() - -
    -
    - -

    For planes and helicopters, when these groups go home and land on their home airbases and farps, they normally would taxi to the parking spot, shut-down their engines and wait forever until the Group is removed by the runtime environment.

    - - -

    This method is used to re-spawn automatically (so no extra call is needed anymore) the same group after it has landed. -This will enable a spawned group to be re-spawned after it lands, until it is destroyed... -Note: When the group is respawned, it will re-spawn from the original airbase where it took off. -So ensure that the routes for groups that respawn, always return to the original airbase, or players may get confused ...

    - -

    Return value

    - -

    #SPAWN: -self

    - -

    Usage:

    -
    -- RU Su-34 - AI Ship Attack
    --- Re-SPAWN the Group(s) after each landing and Engine Shut-Down automatically. 
    -SpawnRU_SU34 = SPAWN:New( 'TF1 RU Su-34 Krymsk@AI - Attack Ships' ):Schedule( 2, 3, 1800, 0.4 ):SpawnUncontrolled():InitRandomizeRoute( 1, 1, 3000 ):RepeatOnEngineShutDown()
    - -
    -
    -
    -
    - - -SPAWN:InitRepeatOnEngineShutDown() - -
    -
    - -

    Respawn after landing when its engines have shut down.

    - -

    Return value

    - -

    #SPAWN: -self

    - -
    -
    -
    -
    - - -SPAWN:InitRepeatOnLanding() - -
    -
    - -

    Respawn group after landing.

    - -

    Return value

    - -

    #SPAWN: -self

    - -
    -
    -
    -
    - - -SPAWN:InitUnControlled(UnControlled) - -
    -
    - -

    (AIR) Will spawn a plane group in UnControlled or Controlled mode...

    - - -

    This will be similar to the uncontrolled flag setting in the ME. -You can use UnControlled mode to simulate planes startup and ready for take-off but aren't moving (yet). -ReSpawn the plane in Controlled mode, and the plane will move...

    - -

    Parameter

    -
      -
    • - -

      #boolean UnControlled : -true if UnControlled, false if Controlled.

      - -
    • -
    -

    Return value

    - -

    #SPAWN: -self

    - -
    -
    -
    -
    - - #number - -SPAWN.MaxAliveGroups - -
    -
    - - - -
    -
    -
    -
    - - #number - -SPAWN.MaxAliveUnits - -
    -
    - - - -
    -
    -
    -
    - - -SPAWN:New(SpawnTemplatePrefix) - -
    -
    - -

    Creates the main object to spawn a Group defined in the DCS ME.

    - -

    Parameter

    -
      -
    • - -

      #string SpawnTemplatePrefix : -is the name of the Group in the ME that defines the Template. Each new group will have the name starting with SpawnTemplatePrefix.

      - -
    • -
    -

    Return value

    - -

    #SPAWN:

    - - -

    Usages:

    -
      -
    • -- NATO helicopters engaging in the battle field.
      -Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' )
    • -
    • local Plane = SPAWN:New( "Plane" ) -- Creates a new local variable that can initiate new planes with the name "Plane#ddd" using the template "Plane" as defined within the ME.
    • -
    - -
    -
    -
    -
    - - -SPAWN:NewWithAlias(SpawnTemplatePrefix, SpawnAliasPrefix) - -
    -
    - -

    Creates a new SPAWN instance to create new groups based on the defined template and using a new alias for each new group.

    - -

    Parameters

    -
      -
    • - -

      #string SpawnTemplatePrefix : -is the name of the Group in the ME that defines the Template.

      - -
    • -
    • - -

      #string SpawnAliasPrefix : -is the name that will be given to the Group at runtime.

      - -
    • -
    -

    Return value

    - -

    #SPAWN:

    - - -

    Usages:

    -
      -
    • -- NATO helicopters engaging in the battle field.
      -Spawn_BE_KA50 = SPAWN:NewWithAlias( 'BE KA-50@RAMP-Ground Defense', 'Helicopter Attacking a City' )
    • -
    • local PlaneWithAlias = SPAWN:NewWithAlias( "Plane", "Bomber" ) -- Creates a new local variable that can instantiate new planes with the name "Bomber#ddd" using the template "Plane" as defined within the ME.
    • -
    - -
    -
    -
    -
    - - -SPAWN:OnSpawnGroup(SpawnCallBackFunction, SpawnFunctionArguments, ...) - -
    -
    - -

    Allows to place a CallFunction hook when a new group spawns.

    - - -

    The provided method will be called when a new group is spawned, including its given parameters. -The first parameter of the SpawnFunction is the Group#GROUP that was spawned.

    - -

    Parameters

    -
      -
    • - -

      #function SpawnCallBackFunction : -The function to be called when a group spawns.

      - -
    • -
    • - -

      SpawnFunctionArguments : -A random amount of arguments to be provided to the function when the group spawns.

      - -
    • -
    • - -

      ... :

      - -
    • -
    -

    Return value

    - -

    #SPAWN:

    - - -

    Usage:

    -
    -- Declare SpawnObject and call a function when a new Group is spawned.
    -local SpawnObject = SPAWN
    -  :New( "SpawnObject" )
    -  :InitLimit( 2, 10 )
    -  :OnSpawnGroup(
    -    function( SpawnGroup )
    -      SpawnGroup:E( "I am spawned" )
    -    end 
    -    )
    -  :SpawnScheduled( 300, 0.3 )
    - -
    -
    -
    -
    - - -SPAWN:ReSpawn(SpawnIndex) - -
    -
    - -

    Will re-spawn a group based on a given index.

    - - -

    Note: Uses DATABASE module defined in MOOSE.

    - -

    Parameter

    -
      -
    • - -

      #string SpawnIndex : -The index of the group to be spawned.

      - -
    • -
    -

    Return value

    - -

    Wrapper.Group#GROUP: -The group that was spawned. You can use this group for further actions.

    - -
    -
    -
    -
    - - #boolean - -SPAWN.Repeat - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -SPAWN.RepeatOnEngineShutDown - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -SPAWN.RepeatOnLanding - -
    -
    - - - -
    -
    -
    -
    - - -SPAWN:Spawn() - -
    -
    - -

    Will spawn a group based on the internal index.

    - - -

    Note: Uses DATABASE module defined in MOOSE.

    - -

    Return value

    - -

    Wrapper.Group#GROUP: -The group that was spawned. You can use this group for further actions.

    - -
    -
    -
    -
    - - #string - -SPAWN.SpawnAliasPrefix - -
    -
    - - - -
    -
    -
    -
    - - -SPAWN:SpawnAtAirbase(SpawnAirbase, Takeoff, TakeoffAltitude) - -
    -
    - -

    Will spawn a group at an Airbase.

    - - -

    This method is mostly advisable to be used if you want to simulate spawning units at an airbase. -Note that each point in the route assigned to the spawning group is reset to the point of the spawn. -You can use the returned group to further define the route to be followed.

    - -

    The Airbase#AIRBASE object must refer to a valid airbase known in the sim. -You can use the following enumerations to search for the pre-defined airbases on the current known maps of DCS:

    - - - -

    Use the method Airbase#AIRBASE.FindByName() to retrieve the airbase object. -The known AIRBASE objects are automatically imported at mission start by MOOSE. -Therefore, there isn't any New() constructor defined for AIRBASE objects.

    - -

    Ships and Farps are added within the mission, and are therefore not known. -For these AIRBASE objects, there isn't an Airbase#AIRBASE enumeration defined. -You need to provide the exact name of the airbase as the parameter to the Airbase#AIRBASE.FindByName() method!

    - - -

    Parameters

    -
      -
    • - -

      Wrapper.Airbase#AIRBASE SpawnAirbase : -The Airbase where to spawn the group.

      - -
    • -
    • - -

      #SPAWN.Takeoff Takeoff : -(optional) The location and takeoff method. Default is Hot.

      - -
    • -
    • - -

      #number TakeoffAltitude : -(optional) The altitude above the ground.

      - -
    • -
    -

    Return values

    -
      -
    1. - -

      Wrapper.Group#GROUP: -that was spawned.

      - -
    2. -
    3. - -

      #nil: -Nothing was spawned.

      - -
    4. -
    -

    Usage:

    -
      Spawn_Plane = SPAWN:New( "Plane" )
    -  Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Krymsk ), SPAWN.Takeoff.Cold )
    -  Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Krymsk ), SPAWN.Takeoff.Hot )
    -  Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Krymsk ), SPAWN.Takeoff.Runway )
    -  
    -  Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( "Carrier" ), SPAWN.Takeoff.Cold )
    -  
    -  Spawn_Heli = SPAWN:New( "Heli")
    -  
    -  Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "FARP Cold" ), SPAWN.Takeoff.Cold )
    -  Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "FARP Hot" ), SPAWN.Takeoff.Hot )
    -  Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "FARP Runway" ), SPAWN.Takeoff.Runway )
    -  Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "FARP Air" ), SPAWN.Takeoff.Air )
    -  
    -  Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "Carrier" ), SPAWN.Takeoff.Cold )
    -
    - -
    -
    -
    -
    - - - -SPAWN.SpawnCleanUpInterval - -
    -
    - - - -
    -
    -
    -
    - - - -SPAWN.SpawnCleanUpTimeStamps - -
    -
    - - - -
    -
    -
    -
    - - #number - -SPAWN.SpawnCount - -
    -
    - - - - -

    The internal counter of the amount of spawning the has happened since SpawnStart.

    - -
    -
    -
    -
    - - -SPAWN:SpawnFromStatic(HostStatic, MinHeight, MaxHeight, SpawnIndex) - -
    -
    - -

    Will spawn a group from a hosting static.

    - - -

    This method is mostly advisable to be used if you want to simulate spawning from buldings and structures (static buildings). -You can use the returned group to further define the route to be followed.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Static#STATIC HostStatic : -The static dropping or unloading the group.

      - -
    • -
    • - -

      #number MinHeight : -(optional) The minimum height to spawn an airborne group into the zone.

      - -
    • -
    • - -

      #number MaxHeight : -(optional) The maximum height to spawn an airborne group into the zone.

      - -
    • -
    • - -

      #number SpawnIndex : -(optional) The index which group to spawn within the given zone.

      - -
    • -
    -

    Return values

    -
      -
    1. - -

      Wrapper.Group#GROUP: -that was spawned.

      - -
    2. -
    3. - -

      #nil: -Nothing was spawned.

      - -
    4. -
    -

    Usage:

    -
    
    -  local SpawnStatic = STATIC:FindByName( StaticName )
    -
    -  -- Spawn from the static position at the height specified in the ME of the group template!
    -  SpawnAirplanes:SpawnFromStatic( SpawnStatic )  
    -  
    -  -- Spawn from the static position at the height randomized between 2000 and 4000 meters.
    -  SpawnAirplanes:SpawnFromStatic( SpawnStatic, 2000, 4000 )  
    -
    - -
    -
    -
    -
    - - -SPAWN:SpawnFromUnit(HostUnit, MinHeight, MaxHeight, SpawnIndex) - -
    -
    - -

    Will spawn a group from a hosting unit.

    - - -

    This method is mostly advisable to be used if you want to simulate spawning from air units, like helicopters, which are dropping infantry into a defined Landing Zone. -Note that each point in the route assigned to the spawning group is reset to the point of the spawn. -You can use the returned group to further define the route to be followed.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT HostUnit : -The air or ground unit dropping or unloading the group.

      - -
    • -
    • - -

      #number MinHeight : -(optional) The minimum height to spawn an airborne group into the zone.

      - -
    • -
    • - -

      #number MaxHeight : -(optional) The maximum height to spawn an airborne group into the zone.

      - -
    • -
    • - -

      #number SpawnIndex : -(optional) The index which group to spawn within the given zone.

      - -
    • -
    -

    Return values

    -
      -
    1. - -

      Wrapper.Group#GROUP: -that was spawned.

      - -
    2. -
    3. - -

      #nil: -Nothing was spawned.

      - -
    4. -
    -

    Usage:

    -
    
    -  local SpawnStatic = STATIC:FindByName( StaticName )
    -
    -  -- Spawn from the static position at the height specified in the ME of the group template!
    -  SpawnAirplanes:SpawnFromUnit( SpawnStatic )  
    -  
    -  -- Spawn from the static position at the height randomized between 2000 and 4000 meters.
    -  SpawnAirplanes:SpawnFromUnit( SpawnStatic, 2000, 4000 )  
    -
    - -
    -
    -
    -
    - - -SPAWN:SpawnFromVec2(Vec2, MinHeight, MaxHeight, SpawnIndex) - -
    -
    - -

    Will spawn a group from a Vec2 in 3D space.

    - - -

    This method is mostly advisable to be used if you want to simulate spawning groups on the ground from air units, like vehicles. -Note that each point in the route assigned to the spawning group is reset to the point of the spawn. -You can use the returned group to further define the route to be followed.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Vec2 Vec2 : -The Vec2 coordinates where to spawn the group.

      - -
    • -
    • - -

      #number MinHeight : -(optional) The minimum height to spawn an airborne group into the zone.

      - -
    • -
    • - -

      #number MaxHeight : -(optional) The maximum height to spawn an airborne group into the zone.

      - -
    • -
    • - -

      #number SpawnIndex : -(optional) The index which group to spawn within the given zone.

      - -
    • -
    -

    Return values

    -
      -
    1. - -

      Wrapper.Group#GROUP: -that was spawned.

      - -
    2. -
    3. - -

      #nil: -Nothing was spawned.

      - -
    4. -
    -

    Usage:

    -
    
    -  local SpawnVec2 = ZONE:New( ZoneName ):GetVec2()
    -
    -  -- Spawn at the zone center position at the height specified in the ME of the group template!
    -  SpawnAirplanes:SpawnFromVec2( SpawnVec2 )  
    -  
    -  -- Spawn from the static position at the height randomized between 2000 and 4000 meters.
    -  SpawnAirplanes:SpawnFromVec2( SpawnVec2, 2000, 4000 )  
    -
    - -
    -
    -
    -
    - - -SPAWN:SpawnFromVec3(Vec3, SpawnIndex) - -
    -
    - -

    Will spawn a group from a Vec3 in 3D space.

    - - -

    This method is mostly advisable to be used if you want to simulate spawning units in the air, like helicopters or airplanes. -Note that each point in the route assigned to the spawning group is reset to the point of the spawn. -You can use the returned group to further define the route to be followed.

    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Vec3 Vec3 : -The Vec3 coordinates where to spawn the group.

      - -
    • -
    • - -

      #number SpawnIndex : -(optional) The index which group to spawn within the given zone.

      - -
    • -
    -

    Return values

    -
      -
    1. - -

      Wrapper.Group#GROUP: -that was spawned.

      - -
    2. -
    3. - -

      #nil: -Nothing was spawned.

      - -
    4. -
    -
    -
    -
    -
    - - - -SPAWN.SpawnFunctionArguments - -
    -
    - - - -
    -
    -
    -
    - - - -SPAWN.SpawnFunctionHook - -
    -
    - - - -
    -
    -
    -
    - - -SPAWN:SpawnGroupName(SpawnIndex) - -
    -
    - -

    Will return the SpawnGroupName either with with a specific count number or without any count.

    - -

    Parameter

    -
      -
    • - -

      #number SpawnIndex : -Is the number of the Group that is to be spawned.

      - -
    • -
    -

    Return value

    - -

    #string: -SpawnGroupName

    - -
    -
    -
    -
    - - - -SPAWN.SpawnGrouping - -
    -
    - - - -
    -
    -
    -
    - - - -SPAWN.SpawnGroups - -
    -
    - - - - -

    Array containing the descriptions of each Group to be Spawned.

    - -
    -
    -
    -
    - - - -SPAWN.SpawnHookScheduler - -
    -
    - - - - -

    delay calling this for .1 seconds so that it hopefully comes after the BIRTH event of the group.

    - -
    -
    -
    -
    - - -SPAWN:SpawnInZone(Zone, RandomizeGroup, MinHeight, MaxHeight, SpawnIndex) - -
    -
    - -

    Will spawn a Group within a given Zone.

    - - -

    The Zone can be of any type derived from Zone#ZONE_BASE. -Once the Group is spawned within the zone, the Group will continue on its route. -The first waypoint (where the group is spawned) is replaced with the zone location coordinates.

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE Zone : -The zone where the group is to be spawned.

      - -
    • -
    • - -

      #boolean RandomizeGroup : -(optional) Randomization of the Group position in the zone.

      - -
    • -
    • - -

      #number MinHeight : -(optional) The minimum height to spawn an airborne group into the zone.

      - -
    • -
    • - -

      #number MaxHeight : -(optional) The maximum height to spawn an airborne group into the zone.

      - -
    • -
    • - -

      #number SpawnIndex : -(optional) The index which group to spawn within the given zone.

      - -
    • -
    -

    Return values

    -
      -
    1. - -

      Wrapper.Group#GROUP: -that was spawned.

      - -
    2. -
    3. - -

      #nil: -when nothing was spawned.

      - -
    4. -
    -

    Usage:

    -
    
    -  local SpawnZone = ZONE:New( ZoneName )
    -
    -  -- Spawn at the zone center position at the height specified in the ME of the group template!
    -  SpawnAirplanes:SpawnInZone( SpawnZone )  
    -  
    -  -- Spawn in the zone at a random position at the height specified in the Me of the group template.
    -  SpawnAirplanes:SpawnInZone( SpawnZone, true )  
    -  
    -  -- Spawn in the zone at a random position at the height randomized between 2000 and 4000 meters.
    -  SpawnAirplanes:SpawnInZone( SpawnZone, true, 2000, 4000 )  
    -
    -  -- Spawn at the zone center position at the height randomized between 2000 and 4000 meters.
    -  SpawnAirplanes:SpawnInZone( SpawnZone, false, 2000, 4000 )  
    -  
    -  -- Spawn at the zone center position at the height randomized between 2000 and 4000 meters.
    -  SpawnAirplanes:SpawnInZone( SpawnZone, nil, 2000, 4000 )  
    -  
    - -
    -
    -
    -
    - - #number - -SPAWN.SpawnIndex - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -SPAWN.SpawnInitKeepUnitNames - -
    -
    - - - - -

    Overwrite unit names by default with group name.

    - -
    -
    -
    -
    - - #boolean - -SPAWN.SpawnInitLimit - -
    -
    - - - - -

    By default, no InitLimit

    - -
    -
    -
    -
    - - -SPAWN.SpawnInnerRadius - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -SPAWN.SpawnIsScheduled - -
    -
    - - - - -

    Reflects if the spawning for this SpawnTemplatePrefix is going to be scheduled or not.

    - -
    -
    -
    -
    - - #number - -SPAWN.SpawnMaxGroups - -
    -
    - - - - -

    The maximum amount of groups that can be spawned.

    - -
    -
    -
    -
    - - #number - -SPAWN.SpawnMaxUnitsAlive - -
    -
    - - - - -

    The maximum amount of groups that can be alive of SpawnTemplatePrefix at the same time.

    - -
    -
    -
    -
    - - -SPAWN.SpawnOuterRadius - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -SPAWN.SpawnRandomize - -
    -
    - - - - -

    Sets the randomization flag of new Spawned units to false.

    - -
    -
    -
    -
    - - -SPAWN.SpawnRandomizePosition - -
    -
    - - - -
    -
    -
    -
    - - -SPAWN.SpawnRandomizePositionInnerRadius - -
    -
    - - - -
    -
    -
    -
    - - -SPAWN.SpawnRandomizePositionOuterRadius - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -SPAWN.SpawnRandomizeRoute - -
    -
    - - - -
    -
    -
    -
    - - - -SPAWN.SpawnRandomizeRouteEndPoint - -
    -
    - - - -
    -
    -
    -
    - - - -SPAWN.SpawnRandomizeRouteHeight - -
    -
    - - - -
    -
    -
    -
    - - - -SPAWN.SpawnRandomizeRouteRadius - -
    -
    - - - -
    -
    -
    -
    - - - -SPAWN.SpawnRandomizeRouteStartPoint - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -SPAWN.SpawnRandomizeTemplate - -
    -
    - - - -
    -
    -
    -
    - - -SPAWN.SpawnRandomizeUnits - -
    -
    - - - -
    -
    -
    -
    - - -SPAWN:SpawnScheduleStart() - -
    -
    - -

    Will re-start the spawning scheduler.

    - - -

    Note: This method is only required to be called when the schedule was stopped.

    - -

    Return value

    - -

    #SPAWN:

    - - -
    -
    -
    -
    - - -SPAWN:SpawnScheduleStop() - -
    -
    - -

    Will stop the scheduled spawning scheduler.

    - -

    Return value

    - -

    #SPAWN:

    - - -
    -
    -
    -
    - - -SPAWN:SpawnScheduled(SpawnTime, SpawnTimeVariation) - -
    -
    - -

    Spawns new groups at varying time intervals.

    - - -

    This is useful if you want to have continuity within your missions of certain (AI) groups to be present (alive) within your missions.

    - -

    Parameters

    -
      -
    • - -

      #number SpawnTime : -The time interval defined in seconds between each new spawn of new groups.

      - -
    • -
    • - -

      #number SpawnTimeVariation : -The variation to be applied on the defined time interval between each new spawn. -The variation is a number between 0 and 1, representing the %-tage of variation to be applied on the time interval.

      - -
    • -
    -

    Return value

    - -

    #SPAWN: -self

    - -

    Usage:

    -
    -- NATO helicopters engaging in the battle field.
    --- The time interval is set to SPAWN new helicopters between each 600 seconds, with a time variation of 50%.
    --- The time variation in this case will be between 450 seconds and 750 seconds. 
    --- This is calculated as follows: 
    ---      Low limit:   600 * ( 1 - 0.5 / 2 ) = 450 
    ---      High limit:  600 * ( 1 + 0.5 / 2 ) = 750
    --- Between these two values, a random amount of seconds will be choosen for each new spawn of the helicopters.
    -Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
    - -
    -
    -
    -
    - - - -SPAWN.SpawnScheduler - -
    -
    - - - -
    -
    -
    -
    - - - -SPAWN.SpawnTemplate - -
    -
    - - - - -

    Contains the template structure for a Group Spawn from the Mission Editor. Note that this group must have lateActivation always on!!!

    - -
    -
    -
    -
    - - #string - -SPAWN.SpawnTemplatePrefix - -
    -
    - - - -
    -
    -
    -
    - - - -SPAWN.SpawnTemplatePrefixTable - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -SPAWN.SpawnUnControlled - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -SPAWN.SpawnVisible - -
    -
    - - - - -

    Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.

    - -
    -
    -
    -
    - - -SPAWN:SpawnWithIndex(SpawnIndex) - -
    -
    - -

    Will spawn a group with a specified index number.

    - - -

    Uses DATABASE global object defined in MOOSE.

    - -

    Parameter

    -
      -
    • - -

      #string SpawnIndex : -The index of the group to be spawned.

      - -
    • -
    -

    Return value

    - -

    Wrapper.Group#GROUP: -The group that was spawned. You can use this group for further actions.

    - -
    -
    -
    -
    - - #SPAWN.SpawnZoneTable - -SPAWN.SpawnZoneTable - -
    -
    - - - -
    -
    -
    -
    - - #SPAWN.Takeoff - -SPAWN.Takeoff - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -SPAWN.UnControlled - -
    -
    - - - - -

    When working in UnControlled mode, all planes are Spawned in UnControlled mode before the scheduler starts.

    - -
    -
    -
    -
    - - -SPAWN:_GetGroupCategoryID(SpawnPrefix) - -
    -
    - -

    Gets the CategoryID of the Group with the given SpawnPrefix

    - -

    Parameter

    -
      -
    • - -

      SpawnPrefix :

      - -
    • -
    -
    -
    -
    -
    - - -SPAWN:_GetGroupCoalitionID(SpawnPrefix) - -
    -
    - -

    Gets the CoalitionID of the Group with the given SpawnPrefix

    - -

    Parameter

    -
      -
    • - -

      SpawnPrefix :

      - -
    • -
    -
    -
    -
    -
    - - -SPAWN:_GetGroupCountryID(SpawnPrefix) - -
    -
    - -

    Gets the CountryID of the Group with the given SpawnPrefix

    - -

    Parameter

    -
      -
    • - -

      SpawnPrefix :

      - -
    • -
    -
    -
    -
    -
    - - -SPAWN:_GetLastIndex() - -
    -
    - -

    Return the last maximum index that can be used.

    - -
    -
    -
    -
    - - -SPAWN:_GetPrefixFromGroup(DCSUnit, SpawnGroup) - -
    -
    - -

    Return the prefix of a SpawnUnit.

    - - -

    The method will search for a #-mark, and will return the text before the #-mark. -It will return nil of no prefix was found.

    - -

    Parameters

    - -

    Return values

    -
      -
    1. - -

      #string: -The prefix

      - -
    2. -
    3. - -

      #nil: -Nothing found

      - -
    4. -
    -
    -
    -
    -
    - - -SPAWN:_GetSpawnIndex(SpawnIndex) - -
    -
    - -

    Get the next index of the groups to be spawned.

    - - -

    This method is complicated, as it is used at several spaces.

    - -

    Parameter

    -
      -
    • - -

      SpawnIndex :

      - -
    • -
    -
    -
    -
    -
    - - -SPAWN:_GetTemplate(SpawnTemplatePrefix) - -
    -
    - -

    Gets the Group Template from the ME environment definition.

    - - -

    This method used the DATABASE object, which contains ALL initial and new spawned object in MOOSE.

    - -

    Parameter

    -
      -
    • - -

      #string SpawnTemplatePrefix :

      - -
    • -
    -

    Return value

    - - -

    @SPAWN self

    - -
    -
    -
    -
    - - -SPAWN:_InitializeSpawnGroups(SpawnIndex) - -
    -
    - -

    Initalize the SpawnGroups collection.

    - -

    Parameter

    -
      -
    • - -

      SpawnIndex :

      - -
    • -
    -
    -
    -
    -
    - - -SPAWN:_OnBirth(EventData) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -SPAWN:_OnDeadOrCrash(EventData) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -SPAWN:_OnEngineShutDown(EventData) - -
    -
    - -

    Will detect AIR Units shutting down their engines ...

    - - -

    When the event takes place, and the method RepeatOnEngineShutDown was called, the spawned Group will Re-SPAWN. -But only when the Unit was registered to have landed.

    - -

    Parameter

    - -
    -
    -
    -
    - - -SPAWN:_OnLand(EventData) - -
    -
    - -

    Will detect AIR Units landing...

    - - -

    When the event takes place, the spawned Group is registered as landed. -This is needed to ensure that Re-SPAWNing is only done for landed AIR Groups.

    - -

    Parameter

    - -
    -
    -
    -
    - - -SPAWN:_OnTakeOff(EventData) - -
    -
    - -

    Will detect AIR Units taking off...

    - - -

    When the event takes place, the spawned Group is registered as airborne... -This is needed to ensure that Re-SPAWNing only is done for landed AIR Groups.

    - -

    Parameter

    - -
    -
    -
    -
    - - -SPAWN:_Prepare(SpawnTemplatePrefix, SpawnIndex) - -
    -
    - -

    Prepares the new Group Template.

    - -

    Parameters

    -
      -
    • - -

      #string SpawnTemplatePrefix :

      - -
    • -
    • - -

      #number SpawnIndex :

      - -
    • -
    -

    Return value

    - -

    #SPAWN: -self

    - -
    -
    -
    -
    - - -SPAWN:_RandomizeRoute(SpawnIndex) - -
    -
    - -

    Private method randomizing the routes.

    - -

    Parameter

    -
      -
    • - -

      #number SpawnIndex : -The index of the group to be spawned.

      - -
    • -
    -

    Return value

    - -

    #SPAWN:

    - - -
    -
    -
    -
    - - -SPAWN:_RandomizeTemplate(SpawnIndex) - -
    -
    - -

    Private method that randomizes the template of the group.

    - -

    Parameter

    -
      -
    • - -

      #number SpawnIndex :

      - -
    • -
    -

    Return value

    - -

    #SPAWN: -self

    - -
    -
    -
    -
    - - -SPAWN:_RandomizeZones(SpawnIndex) - -
    -
    - -

    Private method that randomizes the Zones where the Group will be spawned.

    - -

    Parameter

    -
      -
    • - -

      #number SpawnIndex :

      - -
    • -
    -

    Return value

    - -

    #SPAWN: -self

    - -
    -
    -
    -
    - - -SPAWN:_Scheduler() - -
    -
    - -

    This function is called automatically by the Spawning scheduler.

    - - -

    It is the internal worker method SPAWNing new Groups on the defined time intervals.

    - -
    -
    -
    -
    - - -SPAWN:_SpawnCleanUpScheduler() - -
    -
    - -

    Schedules the CleanUp of Groups

    - -

    Return value

    - -

    #boolean: -True = Continue Scheduler

    - -
    -
    -
    -
    - - -SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      SpawnIndex :

      - -
    • -
    • - -

      SpawnRootX :

      - -
    • -
    • - -

      SpawnRootY :

      - -
    • -
    • - -

      SpawnX :

      - -
    • -
    • - -

      SpawnY :

      - -
    • -
    • - -

      SpawnAngle :

      - -
    • -
    -
    -
    -
    -
    - - - -SPAWN.uncontrolled - -
    -
    - - - -
    -
    - -

    Type SPAWN.SpawnZoneTable

    - -

    Type SPAWN.Takeoff

    - -

    Enumerator for spawns at airbases

    - - -
    - -
    - - diff --git a/docs/Documentation/SpawnStatic.html b/docs/Documentation/SpawnStatic.html deleted file mode 100644 index 12b659f1e..000000000 --- a/docs/Documentation/SpawnStatic.html +++ /dev/null @@ -1,539 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module SpawnStatic

    - -

    Core -- Spawn dynamically new STATICs in your missions.

    - - -

    -Banner Image

    - -
    - -

    SPAWNSTATIC spawns static structures in your missions dynamically. See below the SPAWNSTATIC class documentation.

    - -
    - -

    Demo Missions

    - -

    SPAWNSTATIC Demo Missions source code

    - -

    SPAWNSTATIC Demo Missions, only for beta testers

    - -

    ALL Demo Missions pack of the last release

    - -
    - -

    YouTube Channel

    - -

    SPAWNSTATIC YouTube Channel

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - -
    SPAWNSTATIC -

    SPAWNSTATIC class, extends Base#BASE

    - -

    The SPAWNSTATIC class allows to spawn dynamically new Statics.

    -
    -

    Type SPAWNSTATIC

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SPAWNSTATIC.CountryID - -
    SPAWNSTATIC:NewFromStatic(SpawnTemplatePrefix, CountryID) -

    Creates the main object to spawn a Static defined in the ME.

    -
    SPAWNSTATIC:NewFromType(SpawnTypeName, SpawnShapeName, SpawnCategory, CountryID) -

    Creates the main object to spawn a Static based on a type name.

    -
    SPAWNSTATIC:Spawn(Heading, (, NewName) -

    Creates a new Static at the original position.

    -
    SPAWNSTATIC:SpawnFromPointVec2(PointVec2, Heading, (, NewName) -

    Creates a new Static from a POINT_VEC2.

    -
    SPAWNSTATIC:SpawnFromZone(Zone, Heading, (, NewName) -

    Creates a new Static from a Zone.

    -
    SPAWNSTATIC.SpawnIndex - -
    SPAWNSTATIC.SpawnTemplatePrefix - -
    SPAWNSTATIC.SpawnTypeName - -
    - -

    Global(s)

    -
    -
    - - #SPAWNSTATIC - -SPAWNSTATIC - -
    -
    - -

    SPAWNSTATIC class, extends Base#BASE

    - -

    The SPAWNSTATIC class allows to spawn dynamically new Statics.

    - - -

    Through creating a copy of an existing static object template as defined in the Mission Editor (ME), -SPAWNSTATIC can retireve the properties of the defined static object template (like type, category etc), and "copy" -these properties to create a new static object and place it at the desired coordinate.

    - -

    New spawned Statics get the same name as the name of the template Static, -or gets the given name when a new name is provided at the Spawn method.
    -By default, spawned Statics will follow a naming convention at run-time:

    - -
      -
    • Spawned Statics will have the name _StaticName#nnn_, where StaticName is the name of the Template Static, - and nnn is a counter from 0 to 99999.
    • -
    - - -

    SPAWNSTATIC construction methods

    - -

    Create a new SPAWNSTATIC object with the SPAWNSTATIC.NewFromStatic():

    - -
      -
    • SPAWNSTATIC.NewFromStatic(): Creates a new SPAWNSTATIC object given a name that is used as the base of the naming of each spawned Static.
    • -
    - -

    Spawn methods

    - -

    Groups can be spawned at different times and methods:

    - - - -
    -
    -

    Type SpawnStatic

    - -

    Type SPAWNSTATIC

    -

    Field(s)

    -
    -
    - - - -SPAWNSTATIC.CountryID - -
    -
    - - - -
    -
    -
    -
    - - -SPAWNSTATIC:NewFromStatic(SpawnTemplatePrefix, CountryID) - -
    -
    - -

    Creates the main object to spawn a Static defined in the ME.

    - -

    Parameters

    -
      -
    • - -

      #string SpawnTemplatePrefix : -is the name of the Group in the ME that defines the Template. Each new group will have the name starting with SpawnTemplatePrefix.

      - -
    • -
    • - -

      CountryID :

      - -
    • -
    -

    Return value

    - -

    #SPAWNSTATIC:

    - - -
    -
    -
    -
    - - -SPAWNSTATIC:NewFromType(SpawnTypeName, SpawnShapeName, SpawnCategory, CountryID) - -
    -
    - -

    Creates the main object to spawn a Static based on a type name.

    - -

    Parameters

    -
      -
    • - -

      #string SpawnTypeName : -is the name of the type.

      - -
    • -
    • - -

      SpawnShapeName :

      - -
    • -
    • - -

      SpawnCategory :

      - -
    • -
    • - -

      CountryID :

      - -
    • -
    -

    Return value

    - -

    #SPAWNSTATIC:

    - - -
    -
    -
    -
    - - -SPAWNSTATIC:Spawn(Heading, (, NewName) - -
    -
    - -

    Creates a new Static at the original position.

    - -

    Parameters

    -
      -
    • - -

      #number Heading : -The heading of the static, which is a number in degrees from 0 to 360.

      - -
    • -
    • - -

      #string ( : -ptional) The name of the new static.

      - -
    • -
    • - -

      NewName :

      - -
    • -
    -

    Return value

    - -

    #SPAWNSTATIC:

    - - -
    -
    -
    -
    - - -SPAWNSTATIC:SpawnFromPointVec2(PointVec2, Heading, (, NewName) - -
    -
    - -

    Creates a new Static from a POINT_VEC2.

    - -

    Parameters

    -
      -
    • - -

      Core.Point#POINT_VEC2 PointVec2 : -The 2D coordinate where to spawn the static.

      - -
    • -
    • - -

      #number Heading : -The heading of the static, which is a number in degrees from 0 to 360.

      - -
    • -
    • - -

      #string ( : -ptional) The name of the new static.

      - -
    • -
    • - -

      NewName :

      - -
    • -
    -

    Return value

    - -

    #SPAWNSTATIC:

    - - -
    -
    -
    -
    - - -SPAWNSTATIC:SpawnFromZone(Zone, Heading, (, NewName) - -
    -
    - -

    Creates a new Static from a Zone.

    - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE_BASE Zone : -The Zone where to spawn the static.

      - -
    • -
    • - -

      #number Heading : -The heading of the static, which is a number in degrees from 0 to 360.

      - -
    • -
    • - -

      #string ( : -ptional) The name of the new static.

      - -
    • -
    • - -

      NewName :

      - -
    • -
    -

    Return value

    - -

    #SPAWNSTATIC:

    - - -
    -
    -
    -
    - - -SPAWNSTATIC.SpawnIndex - -
    -
    - - - -
    -
    -
    -
    - - - -SPAWNSTATIC.SpawnTemplatePrefix - -
    -
    - - - -
    -
    -
    -
    - - - -SPAWNSTATIC.SpawnTypeName - -
    -
    - - - -
    -
    - -

    Type SPAWNSTATIC.SpawnZoneTable

    - -
    - -
    - - diff --git a/docs/Documentation/Spot.html b/docs/Documentation/Spot.html deleted file mode 100644 index 3978fd2d6..000000000 --- a/docs/Documentation/Spot.html +++ /dev/null @@ -1,1009 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Spot

    - -

    Core -- Management of SPOT logistics, that can be transported from and to transportation carriers.

    - - - -

    Banner Image

    - -
    - -

    SPOT implements the DCS Spot class functionality, but adds additional luxury to be able to:

    - -
      -
    • Spot for a defined duration.
    • -
    • wiggle the spot at the target.
    • -
    • Provide a Unit as a target, instead of a point.
    • -
    • Implement a status machine, LaseOn, LaseOff.
    • -
    - -
    - -

    Demo Missions

    - -

    SPOT Demo Missions source code

    - -

    SPOT Demo Missions, only for beta testers

    - -

    ALL Demo Missions pack of the last release

    - -
    - -

    YouTube Channel

    - -

    SPOT YouTube Channel

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    -

    Contributions:

    - -
      -
    • Ciribob: Showing the way how to lase targets + how laser codes work!!! Explained the autolase script.
    • -
    • EasyEB: Ideas and Beta Testing
    • -
    • Wingthor: Beta Testing
    • -
    - -
    - - -

    Global(s)

    - - - - - -
    SPOT -

    SPOT class, extends Fsm#FSM

    - -

    SPOT implements the DCS Spot class functionality, but adds additional luxury to be able to:

    - -
      -
    • Mark targets for a defined duration.
    • -
    -
    -

    Type SPOT

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    SPOT:Destroyed() -

    Destroyed Trigger for SPOT

    -
    SPOT:IsLasing() -

    Check if the SPOT is lasing

    -
    SPOT:LaseOff() -

    LaseOff Trigger for SPOT

    -
    SPOT:LaseOn() -

    LaseOn Trigger for SPOT

    -
    SPOT.LaseScheduler - -
    SPOT.LaserCode - -
    SPOT.Lasing - -
    SPOT:New(Recce, LaserCode, Duration) -

    SPOT Constructor.

    -
    SPOT:OnAfterDestroyed(From, Event, To) -

    Destroyed Handler OnAfter for SPOT

    -
    SPOT:OnAfterLaseOff(From, Event, To) -

    LaseOff Handler OnAfter for SPOT

    -
    SPOT:OnAfterLaseOn(From, Event, To) -

    LaseOn Handler OnAfter for SPOT

    -
    SPOT:OnBeforeDestroyed(From, Event, To) -

    Destroyed Handler OnBefore for SPOT

    -
    SPOT:OnBeforeLaseOff(From, Event, To) -

    LaseOff Handler OnBefore for SPOT

    -
    SPOT:OnBeforeLaseOn(From, Event, To) -

    LaseOn Handler OnBefore for SPOT

    -
    SPOT:OnEventDead(EventData) - -
    SPOT.Recce - -
    SPOT.ScheduleID - -
    SPOT.SpotIR - -
    SPOT.SpotLaser - -
    SPOT.Target - -
    SPOT:__Destroyed(Delay) -

    Destroyed Asynchronous Trigger for SPOT

    -
    SPOT:__LaseOff(Delay) -

    LaseOff Asynchronous Trigger for SPOT

    -
    SPOT:__LaseOn(Delay) -

    LaseOn Asynchronous Trigger for SPOT

    -
    SPOT:onafterLaseOff(From, Event, To) - -
    SPOT:onafterLaseOn(From, Event, To, Target, LaserCode, Duration) - -
    SPOT:onafterLasing(From, Event, To) - -
    - -

    Global(s)

    -
    -
    - - #SPOT - -SPOT - -
    -
    - -

    SPOT class, extends Fsm#FSM

    - -

    SPOT implements the DCS Spot class functionality, but adds additional luxury to be able to:

    - -
      -
    • Mark targets for a defined duration.
    • -
    - - -
      -
    • wiggle the spot at the target.
    • -
    • Provide a Unit as a target, instead of a point.
    • -
    • Implement a status machine, LaseOn, LaseOff.
    • -
    - -

    1. SPOT constructor

    - -
      -
    • SPOT.New(..\Presentations\SPOT\Dia2.JPG): Creates a new SPOT object.
    • -
    - -

    2. SPOT is a FSM

    - -

    Process

    - -

    2.1 SPOT States

    - -
      -
    • Off: Lasing is switched off.
    • -
    • On: Lasing is switched on.
    • -
    • Destroyed: Target is destroyed.
    • -
    - -

    2.2 SPOT Events

    - - - -

    3. Check if a Target is being lased

    - -

    The method SPOT.IsLasing() indicates whether lasing is on or off.

    - - -
    -
    -

    Type Spot

    - -

    Type SPOT

    -

    Field(s)

    -
    -
    - - -SPOT:Destroyed() - -
    -
    - -

    Destroyed Trigger for SPOT

    - -
    -
    -
    -
    - - -SPOT:IsLasing() - -
    -
    - -

    Check if the SPOT is lasing

    - -

    Return value

    - -

    #boolean: -true if it is lasing

    - -
    -
    -
    -
    - - -SPOT:LaseOff() - -
    -
    - -

    LaseOff Trigger for SPOT

    - -
    -
    -
    -
    - - -SPOT:LaseOn() - -
    -
    - -

    LaseOn Trigger for SPOT

    - -
    -
    -
    -
    - - - -SPOT.LaseScheduler - -
    -
    - - - -
    -
    -
    -
    - - - -SPOT.LaserCode - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -SPOT.Lasing - -
    -
    - - - -
    -
    -
    -
    - - -SPOT:New(Recce, LaserCode, Duration) - -
    -
    - -

    SPOT Constructor.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT Recce :

      - -
    • -
    • - -

      #number LaserCode :

      - -
    • -
    • - -

      #number Duration :

      - -
    • -
    -

    Return value

    - -

    #SPOT:

    - - -
    -
    -
    -
    - - -SPOT:OnAfterDestroyed(From, Event, To) - -
    -
    - -

    Destroyed Handler OnAfter for SPOT

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -SPOT:OnAfterLaseOff(From, Event, To) - -
    -
    - -

    LaseOff Handler OnAfter for SPOT

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -SPOT:OnAfterLaseOn(From, Event, To) - -
    -
    - -

    LaseOn Handler OnAfter for SPOT

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -SPOT:OnBeforeDestroyed(From, Event, To) - -
    -
    - -

    Destroyed Handler OnBefore for SPOT

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -SPOT:OnBeforeLaseOff(From, Event, To) - -
    -
    - -

    LaseOff Handler OnBefore for SPOT

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -SPOT:OnBeforeLaseOn(From, Event, To) - -
    -
    - -

    LaseOn Handler OnBefore for SPOT

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -SPOT:OnEventDead(EventData) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - - -SPOT.Recce - -
    -
    - - - -
    -
    -
    -
    - - -SPOT.ScheduleID - -
    -
    - - - -
    -
    -
    -
    - - -SPOT.SpotIR - -
    -
    - - - -
    -
    -
    -
    - - -SPOT.SpotLaser - -
    -
    - - - -
    -
    -
    -
    - - -SPOT.Target - -
    -
    - - - -
    -
    -
    -
    - - -SPOT:__Destroyed(Delay) - -
    -
    - -

    Destroyed Asynchronous Trigger for SPOT

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -SPOT:__LaseOff(Delay) - -
    -
    - -

    LaseOff Asynchronous Trigger for SPOT

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -SPOT:__LaseOn(Delay) - -
    -
    - -

    LaseOn Asynchronous Trigger for SPOT

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -SPOT:onafterLaseOff(From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    -

    Return value

    - -

    #SPOT:

    - - -
    -
    -
    -
    - - -SPOT:onafterLaseOn(From, Event, To, Target, LaserCode, Duration) - -
    -
    - - - -

    Parameters

    - -
    -
    -
    -
    - - -SPOT:onafterLasing(From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Static.html b/docs/Documentation/Static.html deleted file mode 100644 index c7a8dc808..000000000 --- a/docs/Documentation/Static.html +++ /dev/null @@ -1,367 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Static

    - -

    Wrapper -- STATIC wraps the DCS StaticObject class.

    - - - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - -
    STATIC -

    STATIC class, extends Positionable#POSITIONABLE

    - -

    Statics are Static Units defined within the Mission Editor.

    -
    -

    Type STATIC

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    STATIC:FindByName(StaticName, RaiseError) -

    Finds a STATIC from the _DATABASE using the relevant Static Name.

    -
    STATIC:GetDCSObject() - -
    STATIC:GetThreatLevel() - -
    STATIC:ReSpawn(Coordinate, Heading) -

    Respawn the Unit using a (tweaked) template of the parent Group.

    -
    STATIC:Register(StaticName) - -
    STATIC.StaticName - -
    - -

    Global(s)

    -
    -
    - - #STATIC - -STATIC - -
    -
    - -

    STATIC class, extends Positionable#POSITIONABLE

    - -

    Statics are Static Units defined within the Mission Editor.

    - - -

    Note that Statics are almost the same as Units, but they don't have a controller. -The Static#STATIC class is a wrapper class to handle the DCS Static objects:

    - -
      -
    • Wraps the DCS Static objects.
    • -
    • Support all DCS Static APIs.
    • -
    • Enhance with Static specific APIs not in the DCS API set.
    • -
    - -

    STATIC reference methods

    - -

    For each DCS Static will have a STATIC wrapper object (instance) within the _DATABASE object. -This is done at the beginning of the mission (when the mission starts).

    - -

    The STATIC class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference -using the Static Name.

    - -

    Another thing to know is that STATIC objects do not "contain" the DCS Static object. -The STATIc methods will reference the DCS Static object by name when it is needed during API execution. -If the DCS Static object does not exist or is nil, the STATIC methods will return nil and log an exception in the DCS.log file.

    - -

    The STATIc class provides the following functions to retrieve quickly the relevant STATIC instance:

    - -
      -
    • STATIC.FindByName(): Find a STATIC instance from the _DATABASE object using a DCS Static name.
    • -
    - -

    IMPORTANT: ONE SHOULD NEVER SANATIZE these STATIC OBJECT REFERENCES! (make the STATIC object references nil).

    - - -
    -
    -

    Type Static

    - -

    Type STATIC

    -

    Field(s)

    -
    -
    - - -STATIC:FindByName(StaticName, RaiseError) - -
    -
    - -

    Finds a STATIC from the _DATABASE using the relevant Static Name.

    - - -

    As an optional parameter, a briefing text can be given also.

    - -

    Parameters

    -
      -
    • - -

      #string StaticName : -Name of the DCS Static as defined within the Mission Editor.

      - -
    • -
    • - -

      #boolean RaiseError : -Raise an error if not found.

      - -
    • -
    -

    Return value

    - -

    #STATIC:

    - - -
    -
    -
    -
    - - -STATIC:GetDCSObject() - -
    -
    - - - -
    -
    -
    -
    - - -STATIC:GetThreatLevel() - -
    -
    - - - -
    -
    -
    -
    - - -STATIC:ReSpawn(Coordinate, Heading) - -
    -
    - -

    Respawn the Unit using a (tweaked) template of the parent Group.

    - -

    Parameters

    -
      -
    • - -

      Core.Point#COORDINATE Coordinate : -The coordinate where to spawn the new Static.

      - -
    • -
    • - -

      #number Heading : -The heading of the unit respawn.

      - -
    • -
    -
    -
    -
    -
    - - -STATIC:Register(StaticName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      StaticName :

      - -
    • -
    -
    -
    -
    -
    - - - -STATIC.StaticName - -
    -
    - - - -
    -
    - -

    Type UNIT

    - -
    - -
    - - diff --git a/docs/Documentation/StaticObject.html b/docs/Documentation/StaticObject.html deleted file mode 100644 index 0638c4e5a..000000000 --- a/docs/Documentation/StaticObject.html +++ /dev/null @@ -1,295 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module StaticObject

    - - - -

    Global(s)

    - - - - - -
    StaticObject - -
    -

    Type StaticObject

    - - - - - - - - - - - - - - - - - - - - - -
    StaticObject.Desc -

    Descriptor of StaticObject and Unit are equal. StaticObject is just a passive variant of Unit.

    -
    StaticObject.ID -

    Identifier of a StaticObject. It assigned to an StaticObject by the Mission Editor automatically.

    -
    StaticObject.getByName(name) -

    Returns static object by its name.

    -
    StaticObject:getDesc() -

    Returns descriptor of the StaticObject.

    -
    StaticObject:getID() -

    returns identifier of the static object.

    -
    - -

    Global(s)

    -
    -
    - - #StaticObject - -StaticObject - -
    -
    - - - -
    -
    -

    Type DCSStaticObject

    - -

    Type StaticObject

    - -

    Represents static object added in the Mission Editor.

    - -

    Field(s)

    -
    -
    - - #StaticObject.Desc - -StaticObject.Desc - -
    -
    - -

    Descriptor of StaticObject and Unit are equal. StaticObject is just a passive variant of Unit.

    - -
    -
    -
    -
    - - #StaticObject.ID - -StaticObject.ID - -
    -
    - -

    Identifier of a StaticObject. It assigned to an StaticObject by the Mission Editor automatically.

    - -
    -
    -
    -
    - - -StaticObject.getByName(name) - -
    -
    - -

    Returns static object by its name.

    - - -

    If no static object found nil will be returned.

    - -

    Parameter

    -
      -
    • - -

      #string name : -Name of static object to find.

      - -
    • -
    -

    Return value

    - -

    #StaticObject:

    - - -
    -
    -
    -
    - - -StaticObject:getDesc() - -
    -
    - -

    Returns descriptor of the StaticObject.

    - -

    Return value

    - -

    #StaticObject.Desc:

    - - -
    -
    -
    -
    - - -StaticObject:getID() - -
    -
    - -

    returns identifier of the static object.

    - -

    Return value

    - -

    #StaticObject.ID:

    - - -
    -
    - -

    Type StaticObject.Desc

    - -

    StaticObject descriptor.

    - - -

    Airdromes are unique and their types are unique, but helipads and ships are not always unique and may have the same type.

    - - -

    Type StaticObject.ID

    - -
    - -
    - - diff --git a/docs/Documentation/Task.html b/docs/Documentation/Task.html deleted file mode 100644 index e17fc7c8d..000000000 --- a/docs/Documentation/Task.html +++ /dev/null @@ -1,3779 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Task

    - -

    Tasking -- This module contains the TASK class, the main engine to run human taskings.

    - - - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - -
    TASK -

    TASK class, extends Base#BASE

    - -

    The TASK class implements the methods for task orchestration within MOOSE.

    -
    -

    Type TASK

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TASK:Abort() -

    FSM Abort synchronous event function for TASK.

    -
    TASK:AbortGroup(PlayerUnit, PlayerGroup) -

    Abort a PlayerUnit from a Task.

    -
    TASK:AddProgress(PlayerName, ProgressText, ProgressTime, ProgressPoints) -

    Add Task Progress for a Player Name

    -
    TASK:AssignToGroup(TaskGroup) -

    Assign the Task to a Group.

    -
    TASK:AssignToUnit(TaskUnit) -

    Assign the Task to an alive Unit.

    -
    TASK:Cancel() -

    FSM Cancel synchronous event function for TASK.

    -
    TASK:ClearGroupAssignment(TaskGroup) -

    Clear the Group assignment from the Task.

    -
    TASK.CommandCenter - -
    TASK:CrashGroup(PlayerUnit, PlayerGroup) -

    A PlayerUnit crashed in a Task.

    -
    TASK.DetectedItemIndex - -
    TASK.Detection - -
    TASK.Dispatcher - -
    TASK:Fail() -

    FSM Fail synchronous event function for TASK.

    -
    TASK:FailProcesses(TaskUnitName) - -
    TASK.FsmTemplate - -
    TASK:GetBriefing() -

    Gets the Task briefing.

    -
    TASK:GetGroups() -

    Gets the SET_GROUP assigned to the TASK.

    -
    TASK:GetID() -

    Gets the ID of the Task

    -
    TASK:GetInfo(TaskInfo) -

    Gets the Information of the Task

    -
    TASK:GetMission() -

    Gets the Mission to where the TASK belongs.

    -
    TASK:GetName() -

    Gets the Name of the Task

    -
    TASK:GetPlayerCount() -

    Create a count of the players in the Task.

    -
    TASK:GetPlayerNames() -

    Create a list of the players in the Task.

    -
    TASK:GetPlayerProgress(PlayerName) - -
    TASK:GetProcessTemplate(ProcessName) -

    Get the default or currently assigned Process template with key ProcessName.

    -
    TASK:GetScoring() -

    Gets the Scoring of the task

    -
    TASK:GetStateMachine(TaskUnit) -

    Gets the FiniteStateMachine of Task with key TaskUnit

    -
    TASK:GetStateString() -

    Gets the Task status.

    -
    TASK:GetTaskBriefing() -

    Returns the Task briefing.

    -
    TASK:GetTaskIndex() -

    Gets the Task Index, which is a combination of the Task type, the Task name.

    -
    TASK:GetTaskName() -

    Returns the Task name.

    -
    TASK:GetType() -

    Gets the Type of the Task

    -
    TASK:GetUnitProcess(TaskUnit) -

    Get the Task FSM Process Template

    -
    TASK:Goal(PlayerUnit, PlayerName) -

    Goal Trigger for TASK

    -
    TASK:HasAliveUnits() -

    Returns if the Task has still alive and assigned Units.

    -
    TASK:HasGroup(FindGroup) - -
    TASK:HasStateMachine(TaskUnit) -

    Checks if there is a FiniteStateMachine assigned to TaskUnit for Task

    -
    TASK:IsGroupAssigned(TaskGroup) -

    Returns if the Task is assigned to the Group.

    -
    TASK:IsStateAborted() -

    Is the Task status Aborted.

    -
    TASK:IsStateAssigned() -

    Is the Task status Assigned.

    -
    TASK:IsStateCancelled() -

    Is the Task status Cancelled.

    -
    TASK:IsStateFailed() -

    Is the Task status Failed.

    -
    TASK:IsStateHold() -

    Is the Task status Hold.

    -
    TASK:IsStatePlanned() -

    Is the Task status Planned.

    -
    TASK:IsStateReplanned() -

    Is the Task status Replanned.

    -
    TASK:IsStateSuccess() -

    Is the Task status Success.

    -
    TASK:JoinUnit(PlayerUnit, PlayerGroup) -

    Add a PlayerUnit to join the Task.

    -
    TASK:MenuAssignToGroup(TaskGroup) - -
    TASK.MenuAssigned - -
    TASK:MenuMarkToGroup(TaskGroup) - -
    TASK.MenuPlanned - -
    TASK:MenuTaskAbort(TaskGroup) -

    Report the task status.

    -
    TASK:MenuTaskStatus(TaskGroup) -

    Report the task status.

    -
    TASK:MessageToGroups(Message) -

    Send a message of the Task to the assigned Groups.

    -
    TASK.Mission - -
    TASK:New(Mission, SetGroupAssign, TaskName, TaskType, TaskBriefing) -

    Instantiates a new TASK.

    -
    TASK:OnAfterGoal(From, Event, To, PlayerUnit, PlayerName) -

    Goal Handler OnAfter for TASK

    -
    TASK:OnAfterPlayerAborted(PlayerUnit, PlayerName) -

    FSM PlayerAborted event handler prototype for TASK.

    -
    TASK:OnAfterPlayerCrashed(PlayerUnit, PlayerName) -

    FSM PlayerCrashed event handler prototype for TASK.

    -
    TASK:OnAfterPlayerDead(PlayerUnit, PlayerName) -

    FSM PlayerDead event handler prototype for TASK.

    -
    TASK:OnBeforeGoal(From, Event, To, PlayerUnit, PlayerName) -

    Goal Handler OnBefore for TASK

    -
    TASK:RefreshMenus(TaskGroup, MenuTime) -

    Remove the menu option of the Task for a Group.

    -
    TASK:RemoveAssignedMenuForGroup(TaskGroup, MenuTime) -

    Remove the assigned menu option of the Task for a Group.

    -
    TASK:RemoveMenu(MenuTime) -

    Remove the menu options of the Task to all the groups in the SetGroup.

    -
    TASK:RemoveStateMachine(TaskUnit) -

    Remove FiniteStateMachines from Task with key TaskUnit

    -
    TASK:Replan() -

    FSM Replan synchronous event function for TASK.

    -
    TASK:ReportDetails(TaskGroup, ReportGroup) -

    Create a detailed report of the Task.

    -
    TASK:ReportOverview(ReportGroup) -

    Create an overiew report of the Task.

    -
    TASK:ReportSummary(ReportGroup) -

    Create a summary report of the Task.

    -
    TASK:SendBriefingToAssignedGroups() -

    Send the briefng message of the Task to the assigned Groups.

    -
    TASK:SetAssignedMenuForGroup(TaskGroup, MenuTime) -

    Set the assigned menu options of the Task.

    -
    TASK:SetBriefing(TaskBriefing) -

    Sets a Task briefing.

    -
    TASK:SetDetection(Detection, DetectedItemIndex) -

    Set detection of a task

    -
    TASK:SetDispatcher(Dispatcher) -

    Set dispatcher of a task

    -
    TASK.SetGroup -

    The Set of Groups assigned to the Task

    -
    TASK:SetGroupAssigned(TaskGroup) -

    Set Group assigned to the Task.

    -
    TASK:SetID(TaskID) -

    Sets the ID of the Task

    -
    TASK:SetInfo(TaskInfo, TaskInfoText, TaskInfoOrder) -

    Sets the Information on the Task

    -
    TASK:SetMenu(MenuTime) -

    Set the menu options of the Task to all the groups in the SetGroup.

    -
    TASK:SetMenuForGroup(MenuTime, TaskGroup) -

    Set the Menu for a Group

    -
    TASK:SetName(TaskName) -

    Sets the Name of the Task

    -
    TASK:SetPlannedMenuForGroup(TaskGroup, MenuText, MenuTime) -

    Set the planned menu option of the Task.

    -
    TASK:SetScoreOnFail(PlayerName, Penalty, TaskUnit) -

    Set a penalty when the A2A attack has failed.

    -
    TASK:SetScoreOnProgress(PlayerName, Score, TaskUnit) -

    Set a score when progress has been made by the player.

    -
    TASK:SetScoreOnSuccess(PlayerName, Score, TaskUnit) -

    Set a score when all the targets in scope of the A2A attack, have been destroyed.

    -
    TASK:SetStateMachine(TaskUnit, Fsm) -

    Add a FiniteStateMachine to Task with key TaskUnit

    -
    TASK:SetTimeOut(Timer) -

    Sets the TimeOut for the Task.

    -
    TASK:SetType(TaskType) -

    Sets the Type of the Task

    -
    TASK:SetUnitProcess(Core, FsmTemplate) -

    Sets the Task FSM Process Template

    -
    TASK:StateAborted() -

    Sets a Task to status Aborted.

    -
    TASK:StateAssigned() -

    Sets a Task to status Assigned.

    -
    TASK:StateCancelled() -

    Sets a Task to status Cancelled.

    -
    TASK:StateFailed() -

    Sets a Task to status Failed.

    -
    TASK:StateHold() -

    Sets a Task to status Hold.

    -
    TASK:StatePlanned() -

    Sets a Task to status Planned.

    -
    TASK:StateReplanned() -

    Sets a Task to status Replanned.

    -
    TASK:StateSuccess() -

    Sets a Task to status Success.

    -
    TASK:Success() -

    FSM Success synchronous event function for TASK.

    -
    TASK.TaskBriefing - -
    TASK.TaskID - -
    TASK.TaskInfo - -
    TASK.TaskName - -
    TASK.TaskProgress - -
    TASK.TaskScheduler - -
    TASK.TaskType - -
    TASK.TimeOut - -
    TASK:UnAssignFromGroup(TaskGroup) -

    UnAssign the Task from a Group.

    -
    TASK:UnAssignFromGroups() -

    UnAssign the Task from the Groups.

    -
    TASK:UnAssignFromUnit(TaskUnit) -

    UnAssign the Task from an alive Unit.

    -
    TASK:__Abort() -

    FSM Abort asynchronous event function for TASK.

    -
    TASK:__Cancel() -

    FSM Cancel asynchronous event function for TASK.

    -
    TASK:__Fail() -

    FSM Fail asynchronous event function for TASK.

    -
    TASK:__Goal(Delay, PlayerUnit, PlayerName) -

    Goal Asynchronous Trigger for TASK

    -
    TASK:__Replan() -

    FSM Replan asynchronous event function for TASK.

    -
    TASK:__Success() -

    FSM Success asynchronous event function for TASK.

    -
    TASK:onafterReplan(From, Event, To) -

    FSM function for a TASK

    -
    TASK:onbeforeTimeOut(Event, From, To) -

    FSM function for a TASK

    -
    TASK:onenterAborted(From, Event, To) -

    FSM function for a TASK

    -
    TASK:onenterAssigned(Event, From, To, PlayerUnit, PlayerName) -

    FSM function for a TASK

    -
    TASK:onenterCancelled(From, Event, To) -

    FSM function for a TASK

    -
    TASK:onenterFailed(From, Event, To) -

    FSM function for a TASK

    -
    TASK:onenterPlanned(Event, From, To) -

    FSM function for a TASK

    -
    TASK:onenterSuccess(Event, From, To) -

    FSM function for a TASK

    -
    TASK:onstatechange(Event, From, To) -

    FSM function for a TASK

    -
    - -

    Global(s)

    -
    -
    - - #TASK - -TASK - -
    -
    - -

    TASK class, extends Base#BASE

    - -

    The TASK class implements the methods for task orchestration within MOOSE.

    - - - -

    The class provides a couple of methods to:

    - - - -

    1.2) Set and enquire task status (beyond the task state machine processing).

    - -

    A task needs to implement as a minimum the following task states:

    - -
      -
    • Success: Expresses the successful execution and finalization of the task.
    • -
    • Failed: Expresses the failure of a task.
    • -
    • Planned: Expresses that the task is created, but not yet in execution and is not assigned yet.
    • -
    • Assigned: Expresses that the task is assigned to a Group of players, and that the task is in execution mode.
    • -
    - -

    A task may also implement the following task states:

    - -
      -
    • Rejected: Expresses that the task is rejected by a player, who was requested to accept the task.
    • -
    • Cancelled: Expresses that the task is cancelled by HQ or through a logical situation where a cancellation of the task is required.
    • -
    - -

    A task can implement more statusses than the ones outlined above. Please consult the documentation of the specific tasks to understand the different status modelled.

    - -

    The status of tasks can be set by the methods State followed by the task status. An example is StateAssigned(). -The status of tasks can be enquired by the methods IsState followed by the task status name. An example is if IsStateAssigned() then.

    - -

    1.3) Add scoring when reaching a certain task status:

    - -

    Upon reaching a certain task status in a task, additional scoring can be given. If the Mission has a scoring system attached, the scores will be added to the mission scoring. -Use the method TASK.AddScore() to add scores when a status is reached.

    - -

    1.4) Task briefing:

    - -

    A task briefing can be given that is shown to the player when he is assigned to the task.

    - - -
    -
    -

    Type Task

    - -

    Type TASK

    -

    Field(s)

    -
    -
    - - -TASK:Abort() - -
    -
    - -

    FSM Abort synchronous event function for TASK.

    - - -

    Use this event to Abort the Task.

    - -
    -
    -
    -
    - - -TASK:AbortGroup(PlayerUnit, PlayerGroup) - -
    -
    - -

    Abort a PlayerUnit from a Task.

    - - -

    If the Unit was not part of the Task, false is returned. -If the Unit is part of the Task, true is returned.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT PlayerUnit : -The CLIENT or UNIT of the Player aborting the Task.

      - -
    • -
    • - -

      PlayerGroup :

      - -
    • -
    -

    Return value

    - -

    #TASK:

    - - -
    -
    -
    -
    - - -TASK:AddProgress(PlayerName, ProgressText, ProgressTime, ProgressPoints) - -
    -
    - -

    Add Task Progress for a Player Name

    - -

    Parameters

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    • - -

      #string ProgressText : -The text that explains the Progress achieved.

      - -
    • -
    • - -

      #number ProgressTime : -The time the progress was achieved.

      - -
    • -
    • - -

      ProgressPoints :

      - -
    • -
    -

    Return value

    - -

    #TASK:

    - - -
    -
    -
    -
    - - -TASK:AssignToGroup(TaskGroup) - -
    -
    - -

    Assign the Task to a Group.

    - -

    Parameter

    - -

    Return value

    - -

    #TASK:

    - - -
    -
    -
    -
    - - -TASK:AssignToUnit(TaskUnit) - -
    -
    - -

    Assign the Task to an alive Unit.

    - -

    Parameter

    - -

    Return value

    - -

    #TASK: -self

    - -
    -
    -
    -
    - - -TASK:Cancel() - -
    -
    - -

    FSM Cancel synchronous event function for TASK.

    - - -

    Use this event to Cancel the Task.

    - -
    -
    -
    -
    - - -TASK:ClearGroupAssignment(TaskGroup) - -
    -
    - -

    Clear the Group assignment from the Task.

    - -

    Parameter

    - -

    Return value

    - -

    #TASK:

    - - -
    -
    -
    -
    - - Tasking.CommandCenter#COMMANDCENTER - -TASK.CommandCenter - -
    -
    - - - -
    -
    -
    -
    - - -TASK:CrashGroup(PlayerUnit, PlayerGroup) - -
    -
    - -

    A PlayerUnit crashed in a Task.

    - - -

    Abort the Player. -If the Unit was not part of the Task, false is returned. -If the Unit is part of the Task, true is returned.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT PlayerUnit : -The CLIENT or UNIT of the Player aborting the Task.

      - -
    • -
    • - -

      PlayerGroup :

      - -
    • -
    -

    Return value

    - -

    #TASK:

    - - -
    -
    -
    -
    - - - -TASK.DetectedItemIndex - -
    -
    - - - -
    -
    -
    -
    - - - -TASK.Detection - -
    -
    - - - -
    -
    -
    -
    - - - -TASK.Dispatcher - -
    -
    - - - -
    -
    -
    -
    - - -TASK:Fail() - -
    -
    - -

    FSM Fail synchronous event function for TASK.

    - - -

    Use this event to Fail the Task.

    - -
    -
    -
    -
    - - -TASK:FailProcesses(TaskUnitName) - -
    -
    - - - - -

    TODO: Obscolete? -- Fail processes from Task with key Unit - @param #TASK self - @param #string TaskUnitName - @return #TASK self

    - -

    Parameter

    -
      -
    • - -

      TaskUnitName :

      - -
    • -
    -
    -
    -
    -
    - - Core.Fsm#FSM_PROCESS - -TASK.FsmTemplate - -
    -
    - - - -
    -
    -
    -
    - - -TASK:GetBriefing() - -
    -
    - -

    Gets the Task briefing.

    - -

    Return value

    - -

    #string: -The briefing text.

    - -
    -
    -
    -
    - - -TASK:GetGroups() - -
    -
    - -

    Gets the SET_GROUP assigned to the TASK.

    - -

    Return value

    - -

    Core.Set#SET_GROUP:

    - - -
    -
    -
    -
    - - -TASK:GetID() - -
    -
    - -

    Gets the ID of the Task

    - -

    Return value

    - -

    #string: -TaskID

    - -
    -
    -
    -
    - - -TASK:GetInfo(TaskInfo) - -
    -
    - -

    Gets the Information of the Task

    - -

    Parameter

    -
      -
    • - -

      #string TaskInfo : -The key and title of the task information.

      - -
    • -
    -

    Return value

    - -

    #string: -TaskInfoText The Task info text.

    - -
    -
    -
    -
    - - -TASK:GetMission() - -
    -
    - -

    Gets the Mission to where the TASK belongs.

    - -

    Return value

    - -

    Tasking.Mission#MISSION:

    - - -
    -
    -
    -
    - - -TASK:GetName() - -
    -
    - -

    Gets the Name of the Task

    - -

    Return value

    - -

    #string: -The Task Name

    - -
    -
    -
    -
    - - -TASK:GetPlayerCount() - -
    -
    - -

    Create a count of the players in the Task.

    - -

    Return value

    - -

    #number: -The total number of players in the task.

    - -
    -
    -
    -
    - - -TASK:GetPlayerNames() - -
    -
    - -

    Create a list of the players in the Task.

    - -

    Return value

    - -

    #map:

    -

    string,Wrapper.Group#GROUP> A map of the players

    - -
    -
    -
    -
    - - -TASK:GetPlayerProgress(PlayerName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      PlayerName :

      - -
    • -
    -
    -
    -
    -
    - - -TASK:GetProcessTemplate(ProcessName) - -
    -
    - -

    Get the default or currently assigned Process template with key ProcessName.

    - -

    Parameter

    -
      -
    • - -

      #string ProcessName :

      - -
    • -
    -

    Return value

    - -

    Core.Fsm#FSM_PROCESS:

    - - -
    -
    -
    -
    - - -TASK:GetScoring() - -
    -
    - -

    Gets the Scoring of the task

    - -

    Return value

    - -

    Functional.Scoring#SCORING: -Scoring

    - -
    -
    -
    -
    - - -TASK:GetStateMachine(TaskUnit) - -
    -
    - -

    Gets the FiniteStateMachine of Task with key TaskUnit

    - -

    Parameter

    - -

    Return value

    - -

    Core.Fsm#FSM_PROCESS:

    - - -
    -
    -
    -
    - - -TASK:GetStateString() - -
    -
    - -

    Gets the Task status.

    - -
    -
    -
    -
    - - -TASK:GetTaskBriefing() - -
    -
    - -

    Returns the Task briefing.

    - -

    Return value

    - -

    #string: -Task briefing.

    - -
    -
    -
    -
    - - -TASK:GetTaskIndex() - -
    -
    - -

    Gets the Task Index, which is a combination of the Task type, the Task name.

    - -

    Return value

    - -

    #string: -The Task ID

    - -
    -
    -
    -
    - - -TASK:GetTaskName() - -
    -
    - -

    Returns the Task name.

    - -

    Return value

    - -

    #string: -TaskName

    - -
    -
    -
    -
    - - -TASK:GetType() - -
    -
    - -

    Gets the Type of the Task

    - -

    Return value

    - -

    #string: -TaskType

    - -
    -
    -
    -
    - - -TASK:GetUnitProcess(TaskUnit) - -
    -
    - -

    Get the Task FSM Process Template

    - -

    Parameter

    -
      -
    • - -

      TaskUnit :

      - -
    • -
    -

    Return value

    - -

    Core.Fsm#FSM_PROCESS:

    - - -
    -
    -
    -
    - - -TASK:Goal(PlayerUnit, PlayerName) - -
    -
    - -

    Goal Trigger for TASK

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT PlayerUnit : -The Unit of the player.

      - -
    • -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    -
    -
    -
    -
    - - -TASK:HasAliveUnits() - -
    -
    - -

    Returns if the Task has still alive and assigned Units.

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -TASK:HasGroup(FindGroup) - -
    -
    - - - -

    Parameter

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -TASK:HasStateMachine(TaskUnit) - -
    -
    - -

    Checks if there is a FiniteStateMachine assigned to TaskUnit for Task

    - -

    Parameter

    - -

    Return value

    - -

    #TASK: -self

    - -
    -
    -
    -
    - - -TASK:IsGroupAssigned(TaskGroup) - -
    -
    - -

    Returns if the Task is assigned to the Group.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -TASK:IsStateAborted() - -
    -
    - -

    Is the Task status Aborted.

    - -
    -
    -
    -
    - - -TASK:IsStateAssigned() - -
    -
    - -

    Is the Task status Assigned.

    - -
    -
    -
    -
    - - -TASK:IsStateCancelled() - -
    -
    - -

    Is the Task status Cancelled.

    - -
    -
    -
    -
    - - -TASK:IsStateFailed() - -
    -
    - -

    Is the Task status Failed.

    - -
    -
    -
    -
    - - -TASK:IsStateHold() - -
    -
    - -

    Is the Task status Hold.

    - -
    -
    -
    -
    - - -TASK:IsStatePlanned() - -
    -
    - -

    Is the Task status Planned.

    - -
    -
    -
    -
    - - -TASK:IsStateReplanned() - -
    -
    - -

    Is the Task status Replanned.

    - -
    -
    -
    -
    - - -TASK:IsStateSuccess() - -
    -
    - -

    Is the Task status Success.

    - -
    -
    -
    -
    - - -TASK:JoinUnit(PlayerUnit, PlayerGroup) - -
    -
    - -

    Add a PlayerUnit to join the Task.

    - - -

    For each Group within the Task, the Unit is checked if it can join the Task. -If the Unit was not part of the Task, false is returned. -If the Unit is part of the Task, true is returned.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT PlayerUnit : -The CLIENT or UNIT of the Player joining the Mission.

      - -
    • -
    • - -

      Wrapper.Group#GROUP PlayerGroup : -The GROUP of the player joining the Mission.

      - -
    • -
    -

    Return value

    - -

    #boolean: -true if Unit is part of the Task.

    - -
    -
    -
    -
    - - -TASK:MenuAssignToGroup(TaskGroup) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -TASK.MenuAssigned - -
    -
    - - - -
    -
    -
    -
    - - -TASK:MenuMarkToGroup(TaskGroup) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -TASK.MenuPlanned - -
    -
    - - - -
    -
    -
    -
    - - -TASK:MenuTaskAbort(TaskGroup) - -
    -
    - -

    Report the task status.

    - -

    Parameter

    -
      -
    • - -

      TaskGroup :

      - -
    • -
    -
    -
    -
    -
    - - -TASK:MenuTaskStatus(TaskGroup) - -
    -
    - -

    Report the task status.

    - -

    Parameter

    -
      -
    • - -

      TaskGroup :

      - -
    • -
    -
    -
    -
    -
    - - -TASK:MessageToGroups(Message) - -
    -
    - -

    Send a message of the Task to the assigned Groups.

    - -

    Parameter

    -
      -
    • - -

      Message :

      - -
    • -
    -
    -
    -
    -
    - - Tasking.Mission#MISSION - -TASK.Mission - -
    -
    - - - -
    -
    -
    -
    - - -TASK:New(Mission, SetGroupAssign, TaskName, TaskType, TaskBriefing) - -
    -
    - -

    Instantiates a new TASK.

    - - -

    Should never be used. Interface Class.

    - -

    Parameters

    -
      -
    • - -

      Tasking.Mission#MISSION Mission : -The mission wherein the Task is registered.

      - -
    • -
    • - -

      Core.Set#SET_GROUP SetGroupAssign : -The set of groups for which the Task can be assigned.

      - -
    • -
    • - -

      #string TaskName : -The name of the Task

      - -
    • -
    • - -

      #string TaskType : -The type of the Task

      - -
    • -
    • - -

      TaskBriefing :

      - -
    • -
    -

    Return value

    - -

    #TASK: -self

    - -
    -
    -
    -
    - - -TASK:OnAfterGoal(From, Event, To, PlayerUnit, PlayerName) - -
    -
    - -

    Goal Handler OnAfter for TASK

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      Wrapper.Unit#UNIT PlayerUnit : -The Unit of the player.

      - -
    • -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    -
    -
    -
    -
    - - -TASK:OnAfterPlayerAborted(PlayerUnit, PlayerName) - -
    -
    - -

    FSM PlayerAborted event handler prototype for TASK.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT PlayerUnit : -The Unit of the Player when he went back to spectators or left the mission.

      - -
    • -
    • - -

      #string PlayerName : -The name of the Player.

      - -
    • -
    -
    -
    -
    -
    - - -TASK:OnAfterPlayerCrashed(PlayerUnit, PlayerName) - -
    -
    - -

    FSM PlayerCrashed event handler prototype for TASK.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT PlayerUnit : -The Unit of the Player when he crashed in the mission.

      - -
    • -
    • - -

      #string PlayerName : -The name of the Player.

      - -
    • -
    -
    -
    -
    -
    - - -TASK:OnAfterPlayerDead(PlayerUnit, PlayerName) - -
    -
    - -

    FSM PlayerDead event handler prototype for TASK.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT PlayerUnit : -The Unit of the Player when he died in the mission.

      - -
    • -
    • - -

      #string PlayerName : -The name of the Player.

      - -
    • -
    -
    -
    -
    -
    - - -TASK:OnBeforeGoal(From, Event, To, PlayerUnit, PlayerName) - -
    -
    - -

    Goal Handler OnBefore for TASK

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      Wrapper.Unit#UNIT PlayerUnit : -The Unit of the player.

      - -
    • -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -TASK:RefreshMenus(TaskGroup, MenuTime) - -
    -
    - -

    Remove the menu option of the Task for a Group.

    - -

    Parameters

    - -

    Return value

    - -

    #TASK: -self

    - -
    -
    -
    -
    - - -TASK:RemoveAssignedMenuForGroup(TaskGroup, MenuTime) - -
    -
    - -

    Remove the assigned menu option of the Task for a Group.

    - -

    Parameters

    - -

    Return value

    - -

    #TASK: -self

    - -
    -
    -
    -
    - - -TASK:RemoveMenu(MenuTime) - -
    -
    - -

    Remove the menu options of the Task to all the groups in the SetGroup.

    - -

    Parameter

    -
      -
    • - -

      #number MenuTime :

      - -
    • -
    -

    Return value

    - -

    #TASK:

    - - -
    -
    -
    -
    - - -TASK:RemoveStateMachine(TaskUnit) - -
    -
    - -

    Remove FiniteStateMachines from Task with key TaskUnit

    - -

    Parameter

    - -

    Return value

    - -

    #TASK: -self

    - -
    -
    -
    -
    - - -TASK:Replan() - -
    -
    - -

    FSM Replan synchronous event function for TASK.

    - - -

    Use this event to Replan the Task.

    - -
    -
    -
    -
    - - -TASK:ReportDetails(TaskGroup, ReportGroup) - -
    -
    - -

    Create a detailed report of the Task.

    - - -

    List the Task Status, and the Players assigned to the Task.

    - -

    Parameters

    - -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -TASK:ReportOverview(ReportGroup) - -
    -
    - -

    Create an overiew report of the Task.

    - - -

    List the Task Name and Status

    - -

    Parameter

    -
      -
    • - -

      ReportGroup :

      - -
    • -
    -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -TASK:ReportSummary(ReportGroup) - -
    -
    - -

    Create a summary report of the Task.

    - - -

    List the Task Name and Status

    - -

    Parameter

    - -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - -TASK:SendBriefingToAssignedGroups() - -
    -
    - -

    Send the briefng message of the Task to the assigned Groups.

    - -
    -
    -
    -
    - - -TASK:SetAssignedMenuForGroup(TaskGroup, MenuTime) - -
    -
    - -

    Set the assigned menu options of the Task.

    - -

    Parameters

    - -

    Return value

    - -

    #TASK: -self

    - -
    -
    -
    -
    - - -TASK:SetBriefing(TaskBriefing) - -
    -
    - -

    Sets a Task briefing.

    - -

    Parameter

    -
      -
    • - -

      #string TaskBriefing :

      - -
    • -
    -

    Return value

    - -

    #TASK: -self

    - -
    -
    -
    -
    - - -TASK:SetDetection(Detection, DetectedItemIndex) - -
    -
    - -

    Set detection of a task

    - -

    Parameters

    - -

    Return value

    - -

    #TASK:

    - - -
    -
    -
    -
    - - -TASK:SetDispatcher(Dispatcher) - -
    -
    - -

    Set dispatcher of a task

    - -

    Parameter

    - -

    Return value

    - -

    #TASK:

    - - -
    -
    -
    -
    - - Core.Set#SET_GROUP - -TASK.SetGroup - -
    -
    - -

    The Set of Groups assigned to the Task

    - -
    -
    -
    -
    - - -TASK:SetGroupAssigned(TaskGroup) - -
    -
    - -

    Set Group assigned to the Task.

    - -

    Parameter

    - -

    Return value

    - -

    #TASK:

    - - -
    -
    -
    -
    - - -TASK:SetID(TaskID) - -
    -
    - -

    Sets the ID of the Task

    - -

    Parameter

    -
      -
    • - -

      #string TaskID :

      - -
    • -
    -
    -
    -
    -
    - - -TASK:SetInfo(TaskInfo, TaskInfoText, TaskInfoOrder) - -
    -
    - -

    Sets the Information on the Task

    - -

    Parameters

    -
      -
    • - -

      #string TaskInfo : -The key and title of the task information.

      - -
    • -
    • - -

      #string TaskInfoText : -The Task info text.

      - -
    • -
    • - -

      #number TaskInfoOrder : -The ordering, a number between 0 and 99.

      - -
    • -
    -
    -
    -
    -
    - - -TASK:SetMenu(MenuTime) - -
    -
    - -

    Set the menu options of the Task to all the groups in the SetGroup.

    - -

    Parameter

    -
      -
    • - -

      #number MenuTime :

      - -
    • -
    -

    Return value

    - -

    #TASK:

    - - -
    -
    -
    -
    - - -TASK:SetMenuForGroup(MenuTime, TaskGroup) - -
    -
    - -

    Set the Menu for a Group

    - -

    Parameters

    -
      -
    • - -

      #number MenuTime :

      - -
    • -
    • - -

      TaskGroup :

      - -
    • -
    -

    Return value

    - -

    #TASK:

    - - -
    -
    -
    -
    - - -TASK:SetName(TaskName) - -
    -
    - -

    Sets the Name of the Task

    - -

    Parameter

    -
      -
    • - -

      #string TaskName :

      - -
    • -
    -
    -
    -
    -
    - - -TASK:SetPlannedMenuForGroup(TaskGroup, MenuText, MenuTime) - -
    -
    - -

    Set the planned menu option of the Task.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Group#GROUP TaskGroup :

      - -
    • -
    • - -

      #string MenuText : -The menu text.

      - -
    • -
    • - -

      #number MenuTime :

      - -
    • -
    -

    Return value

    - -

    #TASK: -self

    - -
    -
    -
    -
    - - -TASK:SetScoreOnFail(PlayerName, Penalty, TaskUnit) - -
    -
    - -

    Set a penalty when the A2A attack has failed.

    - -

    Parameters

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    • - -

      #number Penalty : -The penalty in points, must be a negative value!

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -

    Return value

    - -

    #TASK:

    - - -
    -
    -
    -
    - - -TASK:SetScoreOnProgress(PlayerName, Score, TaskUnit) - -
    -
    - -

    Set a score when progress has been made by the player.

    - -

    Parameters

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    • - -

      #number Score : -The score in points to be granted when task process has been achieved.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -

    Return value

    - -

    #TASK:

    - - -
    -
    -
    -
    - - -TASK:SetScoreOnSuccess(PlayerName, Score, TaskUnit) - -
    -
    - -

    Set a score when all the targets in scope of the A2A attack, have been destroyed.

    - -

    Parameters

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    • - -

      #number Score : -The score in points.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -

    Return value

    - -

    #TASK:

    - - -
    -
    -
    -
    - - -TASK:SetStateMachine(TaskUnit, Fsm) - -
    -
    - -

    Add a FiniteStateMachine to Task with key TaskUnit

    - -

    Parameters

    - -

    Return value

    - -

    #TASK: -self

    - -
    -
    -
    -
    - - -TASK:SetTimeOut(Timer) - -
    -
    - -

    Sets the TimeOut for the Task.

    - - -

    If Task stayed planned for longer than TimeOut, it gets into Cancelled status.

    - -

    Parameter

    -
      -
    • - -

      #integer Timer : -in seconds

      - -
    • -
    -

    Return value

    - -

    #TASK: -self

    - -
    -
    -
    -
    - - -TASK:SetType(TaskType) - -
    -
    - -

    Sets the Type of the Task

    - -

    Parameter

    -
      -
    • - -

      #string TaskType :

      - -
    • -
    -
    -
    -
    -
    - - -TASK:SetUnitProcess(Core, FsmTemplate) - -
    -
    - -

    Sets the Task FSM Process Template

    - -

    Parameters

    -
      -
    • - -

      Core : -Fsm#FSM_PROCESS

      - -
    • -
    • - -

      FsmTemplate :

      - -
    • -
    -
    -
    -
    -
    - - -TASK:StateAborted() - -
    -
    - -

    Sets a Task to status Aborted.

    - -
    -
    -
    -
    - - -TASK:StateAssigned() - -
    -
    - -

    Sets a Task to status Assigned.

    - -
    -
    -
    -
    - - -TASK:StateCancelled() - -
    -
    - -

    Sets a Task to status Cancelled.

    - -
    -
    -
    -
    - - -TASK:StateFailed() - -
    -
    - -

    Sets a Task to status Failed.

    - -
    -
    -
    -
    - - -TASK:StateHold() - -
    -
    - -

    Sets a Task to status Hold.

    - -
    -
    -
    -
    - - -TASK:StatePlanned() - -
    -
    - -

    Sets a Task to status Planned.

    - -
    -
    -
    -
    - - -TASK:StateReplanned() - -
    -
    - -

    Sets a Task to status Replanned.

    - -
    -
    -
    -
    - - -TASK:StateSuccess() - -
    -
    - -

    Sets a Task to status Success.

    - -
    -
    -
    -
    - - -TASK:Success() - -
    -
    - -

    FSM Success synchronous event function for TASK.

    - - -

    Use this event to make the Task a Success.

    - -
    -
    -
    -
    - - - -TASK.TaskBriefing - -
    -
    - - - -
    -
    -
    -
    - - - -TASK.TaskID - -
    -
    - - - -
    -
    -
    -
    - - -TASK.TaskInfo - -
    -
    - - - -
    -
    -
    -
    - - - -TASK.TaskName - -
    -
    - - - -
    -
    -
    -
    - - -TASK.TaskProgress - -
    -
    - - - -
    -
    -
    -
    - - Core.Scheduler#SCHEDULER - -TASK.TaskScheduler - -
    -
    - - - -
    -
    -
    -
    - - - -TASK.TaskType - -
    -
    - - - -
    -
    -
    -
    - - - -TASK.TimeOut - -
    -
    - - - -
    -
    -
    -
    - - -TASK:UnAssignFromGroup(TaskGroup) - -
    -
    - -

    UnAssign the Task from a Group.

    - -

    Parameter

    - -
    -
    -
    -
    - - -TASK:UnAssignFromGroups() - -
    -
    - -

    UnAssign the Task from the Groups.

    - -
    -
    -
    -
    - - -TASK:UnAssignFromUnit(TaskUnit) - -
    -
    - -

    UnAssign the Task from an alive Unit.

    - -

    Parameter

    - -

    Return value

    - -

    #TASK: -self

    - -
    -
    -
    -
    - - -TASK:__Abort() - -
    -
    - -

    FSM Abort asynchronous event function for TASK.

    - - -

    Use this event to Abort the Task.

    - -
    -
    -
    -
    - - -TASK:__Cancel() - -
    -
    - -

    FSM Cancel asynchronous event function for TASK.

    - - -

    Use this event to Cancel the Task.

    - -
    -
    -
    -
    - - -TASK:__Fail() - -
    -
    - -

    FSM Fail asynchronous event function for TASK.

    - - -

    Use this event to Fail the Task.

    - -
    -
    -
    -
    - - -TASK:__Goal(Delay, PlayerUnit, PlayerName) - -
    -
    - -

    Goal Asynchronous Trigger for TASK

    - -

    Parameters

    -
      -
    • - -

      #number Delay :

      - -
    • -
    • - -

      Wrapper.Unit#UNIT PlayerUnit : -The Unit of the player.

      - -
    • -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    -
    -
    -
    -
    - - -TASK:__Replan() - -
    -
    - -

    FSM Replan asynchronous event function for TASK.

    - - -

    Use this event to Replan the Task.

    - -
    -
    -
    -
    - - -TASK:__Success() - -
    -
    - -

    FSM Success asynchronous event function for TASK.

    - - -

    Use this event to make the Task a Success.

    - -
    -
    -
    -
    - - -TASK:onafterReplan(From, Event, To) - -
    -
    - -

    FSM function for a TASK

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -TASK:onbeforeTimeOut(Event, From, To) - -
    -
    - -

    FSM function for a TASK

    - -

    Parameters

    -
      -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -TASK:onenterAborted(From, Event, To) - -
    -
    - -

    FSM function for a TASK

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -TASK:onenterAssigned(Event, From, To, PlayerUnit, PlayerName) - -
    -
    - -

    FSM function for a TASK

    - -

    Parameters

    -
      -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      PlayerUnit :

      - -
    • -
    • - -

      PlayerName :

      - -
    • -
    -
    -
    -
    -
    - - -TASK:onenterCancelled(From, Event, To) - -
    -
    - -

    FSM function for a TASK

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -TASK:onenterFailed(From, Event, To) - -
    -
    - -

    FSM function for a TASK

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -TASK:onenterPlanned(Event, From, To) - -
    -
    - -

    FSM function for a TASK

    - -

    Parameters

    -
      -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -TASK:onenterSuccess(Event, From, To) - -
    -
    - -

    FSM function for a TASK

    - -

    Parameters

    -
      -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -TASK:onstatechange(Event, From, To) - -
    -
    - -

    FSM function for a TASK

    - -

    Parameters

    -
      -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string From :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    - -

    Type integer

    - -

    Type map

    - -
    - -
    - - diff --git a/docs/Documentation/TaskZoneCapture.html b/docs/Documentation/TaskZoneCapture.html deleted file mode 100644 index 684cce1e9..000000000 --- a/docs/Documentation/TaskZoneCapture.html +++ /dev/null @@ -1,800 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module TaskZoneCapture

    - -

    Tasking - The TASK_Protect models tasks for players to protect or capture specific zones.

    - - - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions: MillerTime

    - -
    -

    - -

    Global(s)

    - - - - - - - - - -
    TASK_ZONE_CAPTURE -

    TASKZONECAPTURE class, extends TaskZoneGoal#TASKZONEGOAL

    - -

    The TASKZONECAPTURE class defines an Suppression or Extermination of Air Defenses task for a human player to be executed.

    -
    TASK_ZONE_GOAL -

    TASKZONEGOAL class, extends Task#TASK

    - -

    The TASKZONEGOAL class defines the task to protect or capture a protection zone.

    -
    -

    Type TASK_ZONE_CAPTURE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TASK_ZONE_CAPTURE:New(Mission, SetGroup, TaskName, ZoneGoalCoalition, TaskBriefing) -

    Instantiates a new TASKZONECAPTURE.

    -
    TASK_ZONE_CAPTURE:OnAfterGoal(TaskUnit, From, Event, To, PlayerUnit, PlayerName) - -
    TASK_ZONE_CAPTURE:ReportOrder(ReportGroup) - -
    TASK_ZONE_CAPTURE.TaskCoalition - -
    TASK_ZONE_CAPTURE.TaskCoalitionName - -
    TASK_ZONE_CAPTURE.TaskZoneName - -
    TASK_ZONE_CAPTURE:UpdateTaskInfo() -

    Instantiates a new TASKZONECAPTURE.

    -
    TASK_ZONE_CAPTURE.ZoneGoal - -
    - -

    Type TASK_ZONE_GOAL

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TASK_ZONE_GOAL:GetGoalTotal() - -
    TASK_ZONE_GOAL:GetMarkInfo(TaskInfoID, TaskInfo) - -
    TASK_ZONE_GOAL:GetPlannedMenuText() - -
    TASK_ZONE_GOAL:GetReportDetail(ReportGroup, TaskInfoID, TaskInfo) - -
    TASK_ZONE_GOAL:GetTargetZone(TaskUnit) - -
    TASK_ZONE_GOAL:New(Mission, SetGroup, TaskName, ZoneGoal, TaskType, TaskBriefing) -

    Instantiates a new TASKZONEGOAL.

    -
    TASK_ZONE_GOAL:SetGoalTotal(GoalTotal) - -
    TASK_ZONE_GOAL:SetProtect(ZoneGoal) - -
    TASK_ZONE_GOAL:SetTargetZone(TargetZone, TaskUnit) - -
    TASK_ZONE_GOAL.TaskType - -
    TASK_ZONE_GOAL.ZoneGoal - -
    - -

    Global(s)

    -
    -
    - - #TASK_ZONE_CAPTURE - -TASK_ZONE_CAPTURE - -
    -
    - -

    TASKZONECAPTURE class, extends TaskZoneGoal#TASKZONEGOAL

    - -

    The TASKZONECAPTURE class defines an Suppression or Extermination of Air Defenses task for a human player to be executed.

    - - -

    These tasks are important to be executed as they will help to achieve air superiority at the vicinity.

    - -

    The TASKZONECAPTURE is used by the TaskA2GDispatcher#TASKA2GDISPATCHER to automatically create SEAD tasks -based on detected enemy ground targets.

    - - -
    -
    -
    -
    - - #TASK_ZONE_GOAL - -TASK_ZONE_GOAL - -
    -
    - -

    TASKZONEGOAL class, extends Task#TASK

    - -

    The TASKZONEGOAL class defines the task to protect or capture a protection zone.

    - - -

    The TASKZONEGOAL is implemented using a Fsm#FSM_TASK, and has the following statuses:

    - -
      -
    • None: Start of the process
    • -
    • Planned: The A2G task is planned.
    • -
    • Assigned: The A2G task is assigned to a Group#GROUP.
    • -
    • Success: The A2G task is successfully completed.
    • -
    • Failed: The A2G task has failed. This will happen if the player exists the task early, without communicating a possible cancellation to HQ.
    • -
    - -

    Set the scoring of achievements in an A2G attack.

    - -

    Scoring or penalties can be given in the following circumstances:

    - - - - -
    -
    -

    Type TaskZoneCapture

    - -

    Type FSM_PROCESS

    - -

    Type TASK_ZONE_CAPTURE

    - -

    The TASKZONECAPTURE class

    - -

    Field(s)

    -
    -
    - - -TASK_ZONE_CAPTURE:New(Mission, SetGroup, TaskName, ZoneGoalCoalition, TaskBriefing) - -
    -
    - -

    Instantiates a new TASKZONECAPTURE.

    - -

    Parameters

    - -

    Return value

    - -

    #TASKZONECAPTURE: -self

    - -
    -
    -
    -
    - - -TASK_ZONE_CAPTURE:OnAfterGoal(TaskUnit, From, Event, To, PlayerUnit, PlayerName) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    • - -

      PlayerUnit :

      - -
    • -
    • - -

      PlayerName :

      - -
    • -
    -
    -
    -
    -
    - - -TASK_ZONE_CAPTURE:ReportOrder(ReportGroup) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      ReportGroup :

      - -
    • -
    -
    -
    -
    -
    - - - -TASK_ZONE_CAPTURE.TaskCoalition - -
    -
    - - - -
    -
    -
    -
    - - - -TASK_ZONE_CAPTURE.TaskCoalitionName - -
    -
    - - - -
    -
    -
    -
    - - - -TASK_ZONE_CAPTURE.TaskZoneName - -
    -
    - - - -
    -
    -
    -
    - - -TASK_ZONE_CAPTURE:UpdateTaskInfo() - -
    -
    - -

    Instantiates a new TASKZONECAPTURE.

    - -
    -
    -
    -
    - - Core.ZoneGoalCoalition#ZONE_GOAL_COALITION - -TASK_ZONE_CAPTURE.ZoneGoal - -
    -
    - - - -
    -
    - -

    Type TASK_ZONE_GOAL

    - -

    The TASKZONEGOAL class

    - -

    Field(s)

    -
    -
    - - -TASK_ZONE_GOAL:GetGoalTotal() - -
    -
    - - - -
    -
    -
    -
    - - -TASK_ZONE_GOAL:GetMarkInfo(TaskInfoID, TaskInfo) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      TaskInfoID :

      - -
    • -
    • - -

      TaskInfo :

      - -
    • -
    -
    -
    -
    -
    - - -TASK_ZONE_GOAL:GetPlannedMenuText() - -
    -
    - - - -
    -
    -
    -
    - - -TASK_ZONE_GOAL:GetReportDetail(ReportGroup, TaskInfoID, TaskInfo) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      ReportGroup :

      - -
    • -
    • - -

      TaskInfoID :

      - -
    • -
    • - -

      TaskInfo :

      - -
    • -
    -
    -
    -
    -
    - - -TASK_ZONE_GOAL:GetTargetZone(TaskUnit) - -
    -
    - - - -

    Parameter

    - -

    Return value

    - -

    Core.Zone#ZONE_BASE: -The Zone object where the Target is located on the map.

    - -
    -
    -
    -
    - - -TASK_ZONE_GOAL:New(Mission, SetGroup, TaskName, ZoneGoal, TaskType, TaskBriefing) - -
    -
    - -

    Instantiates a new TASKZONEGOAL.

    - -

    Parameters

    - -

    Return value

    - -

    #TASKZONEGOAL: -self

    - -
    -
    -
    -
    - - -TASK_ZONE_GOAL:SetGoalTotal(GoalTotal) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      GoalTotal :

      - -
    • -
    -
    -
    -
    -
    - - -TASK_ZONE_GOAL:SetProtect(ZoneGoal) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -TASK_ZONE_GOAL:SetTargetZone(TargetZone, TaskUnit) - -
    -
    - - - -

    Parameters

    - -
    -
    -
    -
    - - - -TASK_ZONE_GOAL.TaskType - -
    -
    - - - -
    -
    -
    -
    - - Core.ZoneGoal#ZONE_GOAL - -TASK_ZONE_GOAL.ZoneGoal - -
    -
    - - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Task_A2A.html b/docs/Documentation/Task_A2A.html deleted file mode 100644 index 03568dc9f..000000000 --- a/docs/Documentation/Task_A2A.html +++ /dev/null @@ -1,1732 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Task_A2A

    - -

    Tasking - The TASK_A2A models tasks for players in Air to Air engagements.

    - - - -

    Banner Image

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions:

    - -
    -

    - -

    Global(s)

    - - - - - - - - - - - - - - - - - -
    TASK_A2A -

    TASK_A2A class, extends Task#TASK

    - -

    The TASK_A2A class defines Air To Air tasks for a Set of Target Units, -based on the tasking capabilities defined in Task#TASK.

    -
    TASK_A2A_ENGAGE -

    TASKA2AENGAGE class, extends TaskA2A#TASKA2A

    - -

    The TASKA2AENGAGE class defines an engage task for a human player to be executed.

    -
    TASK_A2A_INTERCEPT -

    TASKA2AINTERCEPT class, extends TaskA2A#TASKA2A

    - -

    The TASKA2AINTERCEPT class defines an intercept task for a human player to be executed.

    -
    TASK_A2A_SWEEP -

    TASKA2ASWEEP class, extends TaskA2A#TASKA2A

    - -

    The TASKA2ASWEEP class defines a sweep task for a human player to be executed.

    -
    -

    Type TASK_A2A

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TASK_A2A:GetGoalTotal() - -
    TASK_A2A:GetMarkInfo(TaskInfoID, TaskInfo) - -
    TASK_A2A:GetPlannedMenuText() - -
    TASK_A2A:GetRendezVousCoordinate(TaskUnit) - -
    TASK_A2A:GetRendezVousZone(TaskUnit) - -
    TASK_A2A:GetReportDetail(ReportGroup, TaskInfoID, TaskInfo) - -
    TASK_A2A:GetTargetCoordinate(TaskUnit) - -
    TASK_A2A:GetTargetZone(TaskUnit) - -
    TASK_A2A:New(Mission, SetAttack, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit, TaskType, TaskBriefing) -

    Instantiates a new TASK_A2A.

    -
    TASK_A2A:SetGoalTotal() - -
    TASK_A2A:SetRendezVousCoordinate(RendezVousCoordinate, RendezVousRange, TaskUnit) - -
    TASK_A2A:SetRendezVousZone(RendezVousZone, TaskUnit) - -
    TASK_A2A:SetTargetCoordinate(TargetCoordinate, TaskUnit) - -
    TASK_A2A:SetTargetZone(TargetZone, TaskUnit, Altitude, Heading) - -
    TASK_A2A.TargetSetUnit - -
    - -

    Type TASK_A2A_ENGAGE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TASK_A2A_ENGAGE:New(Mission, SetGroup, TaskName, TargetSetUnit, TaskBriefing) -

    Instantiates a new TASKA2AENGAGE.

    -
    TASK_A2A_ENGAGE:ReportOrder(ReportGroup) - -
    TASK_A2A_ENGAGE:SetScoreOnFail(PlayerName, Penalty, TaskUnit) -

    Set a penalty when the A2A attack has failed.

    -
    TASK_A2A_ENGAGE:SetScoreOnProgress(PlayerName, Score, TaskUnit) -

    Set a score when a target in scope of the A2A attack, has been destroyed .

    -
    TASK_A2A_ENGAGE:SetScoreOnSuccess(PlayerName, Score, TaskUnit) -

    Set a score when all the targets in scope of the A2A attack, have been destroyed.

    -
    TASK_A2A_ENGAGE.TargetSetUnit - -
    TASK_A2A_ENGAGE:UpdateTaskInfo() - -
    TASK_A2A_ENGAGE:onafterGoal(TaskUnit, From, Event, To) - -
    - -

    Type TASK_A2A_INTERCEPT

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TASK_A2A_INTERCEPT:New(Mission, SetGroup, TaskName, TargetSetUnit, TaskBriefing) -

    Instantiates a new TASKA2AINTERCEPT.

    -
    TASK_A2A_INTERCEPT:ReportOrder(ReportGroup) - -
    TASK_A2A_INTERCEPT:SetScoreOnFail(PlayerName, Penalty, TaskUnit) -

    Set a penalty when the A2A attack has failed.

    -
    TASK_A2A_INTERCEPT:SetScoreOnProgress(PlayerName, Score, TaskUnit) -

    Set a score when a target in scope of the A2A attack, has been destroyed .

    -
    TASK_A2A_INTERCEPT:SetScoreOnSuccess(PlayerName, Score, TaskUnit) -

    Set a score when all the targets in scope of the A2A attack, have been destroyed.

    -
    TASK_A2A_INTERCEPT.TargetSetUnit - -
    TASK_A2A_INTERCEPT:UpdateTaskInfo() - -
    TASK_A2A_INTERCEPT:onafterGoal(TaskUnit, From, Event, To) - -
    - -

    Type TASK_A2A_SWEEP

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TASK_A2A_SWEEP:New(Mission, SetGroup, TaskName, TargetSetUnit, TaskBriefing) -

    Instantiates a new TASKA2ASWEEP.

    -
    TASK_A2A_SWEEP:ReportOrder(ReportGroup) - -
    TASK_A2A_SWEEP:SetScoreOnFail(PlayerName, Penalty, TaskUnit) -

    Set a penalty when the A2A attack has failed.

    -
    TASK_A2A_SWEEP:SetScoreOnProgress(PlayerName, Score, TaskUnit) -

    Set a score when a target in scope of the A2A attack, has been destroyed .

    -
    TASK_A2A_SWEEP:SetScoreOnSuccess(PlayerName, Score, TaskUnit) -

    Set a score when all the targets in scope of the A2A attack, have been destroyed.

    -
    TASK_A2A_SWEEP.TargetSetUnit - -
    TASK_A2A_SWEEP:UpdateTaskInfo() - -
    TASK_A2A_SWEEP:onafterGoal(TaskUnit, From, Event, To) - -
    - -

    Global(s)

    -
    -
    - - #TASK_A2A - -TASK_A2A - -
    -
    - -

    TASK_A2A class, extends Task#TASK

    - -

    The TASK_A2A class defines Air To Air tasks for a Set of Target Units, -based on the tasking capabilities defined in Task#TASK.

    - - -

    The TASK_A2A is implemented using a Fsm#FSM_TASK, and has the following statuses:

    - -
      -
    • None: Start of the process
    • -
    • Planned: The A2A task is planned.
    • -
    • Assigned: The A2A task is assigned to a Group#GROUP.
    • -
    • Success: The A2A task is successfully completed.
    • -
    • Failed: The A2A task has failed. This will happen if the player exists the task early, without communicating a possible cancellation to HQ.
    • -
    - -

    1.1) Set the scoring of achievements in an A2A attack.

    - -

    Scoring or penalties can be given in the following circumstances:

    - - - - -
    -
    -
    -
    - - #TASK_A2A_ENGAGE - -TASK_A2A_ENGAGE - -
    -
    - -

    TASKA2AENGAGE class, extends TaskA2A#TASKA2A

    - -

    The TASKA2AENGAGE class defines an engage task for a human player to be executed.

    - - -

    When enemy planes are close to human players, use this task type is used urge the players to get out there!

    - -

    The TASKA2AENGAGE is used by the TaskA2ADispatcher#TASKA2ADISPATCHER to automatically create engage tasks -based on detected airborne enemy targets intruding friendly airspace.

    - -

    The task is defined for a Mission#MISSION, where a friendly Set#SET_GROUP consisting of GROUPs with one human players each, is engaging the targets. -The task is given a name and a briefing, that is used in the menu structure and in the reporting.

    - - -
    -
    -
    -
    - - #TASK_A2A_INTERCEPT - -TASK_A2A_INTERCEPT - -
    -
    - -

    TASKA2AINTERCEPT class, extends TaskA2A#TASKA2A

    - -

    The TASKA2AINTERCEPT class defines an intercept task for a human player to be executed.

    - - -

    When enemy planes need to be intercepted by human players, use this task type to urgen the players to get out there!

    - -

    The TASKA2AINTERCEPT is used by the TaskA2ADispatcher#TASKA2ADISPATCHER to automatically create intercept tasks -based on detected airborne enemy targets intruding friendly airspace.

    - -

    The task is defined for a Mission#MISSION, where a friendly Set#SET_GROUP consisting of GROUPs with one human players each, is intercepting the targets. -The task is given a name and a briefing, that is used in the menu structure and in the reporting.

    - - -
    -
    -
    -
    - - #TASK_A2A_SWEEP - -TASK_A2A_SWEEP - -
    -
    - -

    TASKA2ASWEEP class, extends TaskA2A#TASKA2A

    - -

    The TASKA2ASWEEP class defines a sweep task for a human player to be executed.

    - - -

    A sweep task needs to be given when targets were detected but somehow the detection was lost. -Most likely, these enemy planes are hidden in the mountains or are flying under radar. -These enemy planes need to be sweeped by human players, and use this task type to urge the players to get out there and find those enemy fighters.

    - -

    The TASKA2ASWEEP is used by the TaskA2ADispatcher#TASKA2ADISPATCHER to automatically create sweep tasks -based on detected airborne enemy targets intruding friendly airspace, for which the detection has been lost for more than 60 seconds.

    - -

    The task is defined for a Mission#MISSION, where a friendly Set#SET_GROUP consisting of GROUPs with one human players each, is sweeping the targets. -The task is given a name and a briefing, that is used in the menu structure and in the reporting.

    - - -
    -
    -

    Type Task_A2A

    - -

    Type FSM_PROCESS

    - -

    Type TASK_A2A

    - -

    The TASK_A2A class

    - -

    Field(s)

    -
    -
    - - -TASK_A2A:GetGoalTotal() - -
    -
    - - - -
    -
    -
    -
    - - -TASK_A2A:GetMarkInfo(TaskInfoID, TaskInfo) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      TaskInfoID :

      - -
    • -
    • - -

      TaskInfo :

      - -
    • -
    -
    -
    -
    -
    - - -TASK_A2A:GetPlannedMenuText() - -
    -
    - - - -
    -
    -
    -
    - - -TASK_A2A:GetRendezVousCoordinate(TaskUnit) - -
    -
    - - - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      Core.Point#COORDINATE: -The Coordinate object referencing to the 2D point where the RendezVous point is located on the map.

      - -
    2. -
    3. - -

      #number: -The RendezVousRange that defines when the player is considered to have arrived at the RendezVous point.

      - -
    4. -
    -
    -
    -
    -
    - - -TASK_A2A:GetRendezVousZone(TaskUnit) - -
    -
    - - - -

    Parameter

    - -

    Return value

    - -

    Core.Zone#ZONE_BASE: -The Zone object where the RendezVous is located on the map.

    - -
    -
    -
    -
    - - -TASK_A2A:GetReportDetail(ReportGroup, TaskInfoID, TaskInfo) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      ReportGroup :

      - -
    • -
    • - -

      TaskInfoID :

      - -
    • -
    • - -

      TaskInfo :

      - -
    • -
    -
    -
    -
    -
    - - -TASK_A2A:GetTargetCoordinate(TaskUnit) - -
    -
    - - - -

    Parameter

    - -

    Return value

    - -

    Core.Point#COORDINATE: -The Coordinate object where the Target is located on the map.

    - -
    -
    -
    -
    - - -TASK_A2A:GetTargetZone(TaskUnit) - -
    -
    - - - -

    Parameter

    - -

    Return value

    - -

    Core.Zone#ZONE_BASE: -The Zone object where the Target is located on the map.

    - -
    -
    -
    -
    - - -TASK_A2A:New(Mission, SetAttack, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit, TaskType, TaskBriefing) - -
    -
    - -

    Instantiates a new TASK_A2A.

    - -

    Parameters

    -
      -
    • - -

      Tasking.Mission#MISSION Mission :

      - -
    • -
    • - -

      Set#SET_GROUP SetAttack : -The set of groups for which the Task can be assigned.

      - -
    • -
    • - -

      #string TaskName : -The name of the Task.

      - -
    • -
    • - -

      Set#SET_UNIT UnitSetTargets :

      - -
    • -
    • - -

      #number TargetDistance : -The distance to Target when the Player is considered to have "arrived" at the engagement range.

      - -
    • -
    • - -

      Core.Zone#ZONE_BASE TargetZone : -The target zone, if known. -If the TargetZone parameter is specified, the player will be routed to the center of the zone where all the targets are assumed to be.

      - -
    • -
    • - -

      TargetSetUnit :

      - -
    • -
    • - -

      TaskType :

      - -
    • -
    • - -

      TaskBriefing :

      - -
    • -
    -

    Return value

    - -

    #TASK_A2A: -self

    - -
    -
    -
    -
    - - -TASK_A2A:SetGoalTotal() - -
    -
    - - - -
    -
    -
    -
    - - -TASK_A2A:SetRendezVousCoordinate(RendezVousCoordinate, RendezVousRange, TaskUnit) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Core.Point#COORDINATE RendezVousCoordinate : -The Coordinate object referencing to the 2D point where the RendezVous point is located on the map.

      - -
    • -
    • - -

      #number RendezVousRange : -The RendezVousRange that defines when the player is considered to have arrived at the RendezVous point.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -
    -
    -
    -
    - - -TASK_A2A:SetRendezVousZone(RendezVousZone, TaskUnit) - -
    -
    - - - -

    Parameters

    - -
    -
    -
    -
    - - -TASK_A2A:SetTargetCoordinate(TargetCoordinate, TaskUnit) - -
    -
    - - - -

    Parameters

    - -
    -
    -
    -
    - - -TASK_A2A:SetTargetZone(TargetZone, TaskUnit, Altitude, Heading) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Core.Zone#ZONE_BASE TargetZone : -The Zone object where the Target is located on the map.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    • - -

      Altitude :

      - -
    • -
    • - -

      Heading :

      - -
    • -
    -
    -
    -
    -
    - - Set#SET_UNIT - -TASK_A2A.TargetSetUnit - -
    -
    - - - -
    -
    - -

    Type TASK_A2A_ENGAGE

    - -

    The TASKA2AENGAGE class

    - -

    Field(s)

    -
    -
    - - -TASK_A2A_ENGAGE:New(Mission, SetGroup, TaskName, TargetSetUnit, TaskBriefing) - -
    -
    - -

    Instantiates a new TASKA2AENGAGE.

    - -

    Parameters

    -
      -
    • - -

      Tasking.Mission#MISSION Mission :

      - -
    • -
    • - -

      Core.Set#SET_GROUP SetGroup : -The set of groups for which the Task can be assigned.

      - -
    • -
    • - -

      #string TaskName : -The name of the Task.

      - -
    • -
    • - -

      Core.Set#SET_UNIT TargetSetUnit :

      - -
    • -
    • - -

      #string TaskBriefing : -The briefing of the task.

      - -
    • -
    -

    Return value

    - -

    #TASKA2AENGAGE: -self

    - -
    -
    -
    -
    - - -TASK_A2A_ENGAGE:ReportOrder(ReportGroup) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      ReportGroup :

      - -
    • -
    -
    -
    -
    -
    - - -TASK_A2A_ENGAGE:SetScoreOnFail(PlayerName, Penalty, TaskUnit) - -
    -
    - -

    Set a penalty when the A2A attack has failed.

    - -

    Parameters

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    • - -

      #number Penalty : -The penalty in points, must be a negative value!

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -

    Return value

    - -

    #TASKA2AENGAGE:

    - - -
    -
    -
    -
    - - -TASK_A2A_ENGAGE:SetScoreOnProgress(PlayerName, Score, TaskUnit) - -
    -
    - -

    Set a score when a target in scope of the A2A attack, has been destroyed .

    - -

    Parameters

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    • - -

      #number Score : -The score in points to be granted when task process has been achieved.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -

    Return value

    - -

    #TASKA2AENGAGE:

    - - -
    -
    -
    -
    - - -TASK_A2A_ENGAGE:SetScoreOnSuccess(PlayerName, Score, TaskUnit) - -
    -
    - -

    Set a score when all the targets in scope of the A2A attack, have been destroyed.

    - -

    Parameters

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    • - -

      #number Score : -The score in points.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -

    Return value

    - -

    #TASKA2AENGAGE:

    - - -
    -
    -
    -
    - - Set#SET_UNIT - -TASK_A2A_ENGAGE.TargetSetUnit - -
    -
    - - - -
    -
    -
    -
    - - -TASK_A2A_ENGAGE:UpdateTaskInfo() - -
    -
    - - - -
    -
    -
    -
    - - -TASK_A2A_ENGAGE:onafterGoal(TaskUnit, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      TaskUnit :

      - -
    • -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    -
    -
    - -

    Type TASK_A2A_INTERCEPT

    - -

    The TASKA2AINTERCEPT class

    - -

    Field(s)

    -
    -
    - - -TASK_A2A_INTERCEPT:New(Mission, SetGroup, TaskName, TargetSetUnit, TaskBriefing) - -
    -
    - -

    Instantiates a new TASKA2AINTERCEPT.

    - -

    Parameters

    -
      -
    • - -

      Tasking.Mission#MISSION Mission :

      - -
    • -
    • - -

      Core.Set#SET_GROUP SetGroup : -The set of groups for which the Task can be assigned.

      - -
    • -
    • - -

      #string TaskName : -The name of the Task.

      - -
    • -
    • - -

      Core.Set#SET_UNIT TargetSetUnit :

      - -
    • -
    • - -

      #string TaskBriefing : -The briefing of the task.

      - -
    • -
    -

    Return value

    - -

    #TASKA2AINTERCEPT:

    - - -
    -
    -
    -
    - - -TASK_A2A_INTERCEPT:ReportOrder(ReportGroup) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -TASK_A2A_INTERCEPT:SetScoreOnFail(PlayerName, Penalty, TaskUnit) - -
    -
    - -

    Set a penalty when the A2A attack has failed.

    - -

    Parameters

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    • - -

      #number Penalty : -The penalty in points, must be a negative value!

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -

    Return value

    - -

    #TASKA2AINTERCEPT:

    - - -
    -
    -
    -
    - - -TASK_A2A_INTERCEPT:SetScoreOnProgress(PlayerName, Score, TaskUnit) - -
    -
    - -

    Set a score when a target in scope of the A2A attack, has been destroyed .

    - -

    Parameters

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    • - -

      #number Score : -The score in points to be granted when task process has been achieved.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -

    Return value

    - -

    #TASKA2AINTERCEPT:

    - - -
    -
    -
    -
    - - -TASK_A2A_INTERCEPT:SetScoreOnSuccess(PlayerName, Score, TaskUnit) - -
    -
    - -

    Set a score when all the targets in scope of the A2A attack, have been destroyed.

    - -

    Parameters

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    • - -

      #number Score : -The score in points.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -

    Return value

    - -

    #TASKA2AINTERCEPT:

    - - -
    -
    -
    -
    - - Set#SET_UNIT - -TASK_A2A_INTERCEPT.TargetSetUnit - -
    -
    - - - -
    -
    -
    -
    - - -TASK_A2A_INTERCEPT:UpdateTaskInfo() - -
    -
    - - - -
    -
    -
    -
    - - -TASK_A2A_INTERCEPT:onafterGoal(TaskUnit, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      TaskUnit :

      - -
    • -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    -
    -
    - -

    Type TASK_A2A_SWEEP

    - -

    The TASKA2ASWEEP class

    - -

    Field(s)

    -
    -
    - - -TASK_A2A_SWEEP:New(Mission, SetGroup, TaskName, TargetSetUnit, TaskBriefing) - -
    -
    - -

    Instantiates a new TASKA2ASWEEP.

    - -

    Parameters

    -
      -
    • - -

      Tasking.Mission#MISSION Mission :

      - -
    • -
    • - -

      Core.Set#SET_GROUP SetGroup : -The set of groups for which the Task can be assigned.

      - -
    • -
    • - -

      #string TaskName : -The name of the Task.

      - -
    • -
    • - -

      Core.Set#SET_UNIT TargetSetUnit :

      - -
    • -
    • - -

      #string TaskBriefing : -The briefing of the task.

      - -
    • -
    -

    Return value

    - -

    #TASKA2ASWEEP: -self

    - -
    -
    -
    -
    - - -TASK_A2A_SWEEP:ReportOrder(ReportGroup) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      ReportGroup :

      - -
    • -
    -
    -
    -
    -
    - - -TASK_A2A_SWEEP:SetScoreOnFail(PlayerName, Penalty, TaskUnit) - -
    -
    - -

    Set a penalty when the A2A attack has failed.

    - -

    Parameters

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    • - -

      #number Penalty : -The penalty in points, must be a negative value!

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -

    Return value

    - -

    #TASKA2ASWEEP:

    - - -
    -
    -
    -
    - - -TASK_A2A_SWEEP:SetScoreOnProgress(PlayerName, Score, TaskUnit) - -
    -
    - -

    Set a score when a target in scope of the A2A attack, has been destroyed .

    - -

    Parameters

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    • - -

      #number Score : -The score in points to be granted when task process has been achieved.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -

    Return value

    - -

    #TASKA2ASWEEP:

    - - -
    -
    -
    -
    - - -TASK_A2A_SWEEP:SetScoreOnSuccess(PlayerName, Score, TaskUnit) - -
    -
    - -

    Set a score when all the targets in scope of the A2A attack, have been destroyed.

    - -

    Parameters

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    • - -

      #number Score : -The score in points.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -

    Return value

    - -

    #TASKA2ASWEEP:

    - - -
    -
    -
    -
    - - Set#SET_UNIT - -TASK_A2A_SWEEP.TargetSetUnit - -
    -
    - - - -
    -
    -
    -
    - - -TASK_A2A_SWEEP:UpdateTaskInfo() - -
    -
    - - - -
    -
    -
    -
    - - -TASK_A2A_SWEEP:onafterGoal(TaskUnit, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      TaskUnit :

      - -
    • -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Task_A2A_Dispatcher.html b/docs/Documentation/Task_A2A_Dispatcher.html deleted file mode 100644 index 2dd3bd9ee..000000000 --- a/docs/Documentation/Task_A2A_Dispatcher.html +++ /dev/null @@ -1,850 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Task_A2A_Dispatcher

    - -

    Tasking - The TASKA2ADISPATCHER creates and manages player TASK_A2A tasks based on detected targets.

    - - - -

    The #TASKA2ADISPATCHER classes implement the dynamic dispatching of tasks upon groups of detected units determined a Set of EWR installation groups.

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - -
    TASK_A2A_DISPATCHER -

    TASKA2ADISPATCHER class, extends Tasking#DETECTION_MANAGER

    - -

    Banner Image

    - -

    The #TASKA2ADISPATCHER class implements the dynamic dispatching of tasks upon groups of detected units determined a Set of EWR installation groups.

    -
    -

    Type TASK_A2A_DISPATCHER

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TASK_A2A_DISPATCHER.Detection - -
    TASK_A2A_DISPATCHER:EvaluateENGAGE(DetectedItem) -

    Creates an ENGAGE task when there are human friendlies airborne near the targets.

    -
    TASK_A2A_DISPATCHER:EvaluateINTERCEPT(DetectedItem) -

    Creates an INTERCEPT task when there are targets for it.

    -
    TASK_A2A_DISPATCHER:EvaluateRemoveTask(Mission, Task, Detection, DetectedItemID, DetectedItemChange, DetectedItem, DetectedItemIndex, DetectedItemChanged) -

    Evaluates the removal of the Task from the Mission.

    -
    TASK_A2A_DISPATCHER:EvaluateSWEEP(DetectedItem) -

    Creates an SWEEP task when there are targets for it.

    -
    TASK_A2A_DISPATCHER:GetFriendliesNearBy(DetectedItem) -

    Calculates which friendlies are nearby the area

    -
    TASK_A2A_DISPATCHER:GetPlayerFriendliesNearBy(DetectedItem) -

    Calculates which HUMAN friendlies are nearby the area

    -
    TASK_A2A_DISPATCHER.Mission - -
    TASK_A2A_DISPATCHER:New(Mission, SetGroup, Detection) -

    TASKA2ADISPATCHER constructor.

    -
    TASK_A2A_DISPATCHER:OnAfterAssign(From, Event, To, Task, TaskUnit, PlayerName) -

    OnAfter Transition Handler for Event Assign.

    -
    TASK_A2A_DISPATCHER:ProcessDetected(Detection) -

    Assigns tasks in relation to the detected items to the Set#SET_GROUP.

    -
    TASK_A2A_DISPATCHER:RemoveTask(TaskIndex) - -
    TASK_A2A_DISPATCHER:SetEngageRadius(EngageRadius) -

    Define the radius to when an ENGAGE task will be generated for any nearby by airborne friendlies, which are executing cap or returning from an intercept mission.

    -
    - -

    Global(s)

    -
    -
    - - #TASK_A2A_DISPATCHER - -TASK_A2A_DISPATCHER - -
    -
    - -

    TASKA2ADISPATCHER class, extends Tasking#DETECTION_MANAGER

    - -

    Banner Image

    - -

    The #TASKA2ADISPATCHER class implements the dynamic dispatching of tasks upon groups of detected units determined a Set of EWR installation groups.

    - - - -

    Banner Image

    - -

    The EWR will detect units, will group them, and will dispatch Tasks to groups. Depending on the type of target detected, different tasks will be dispatched. -Find a summary below describing for which situation a task type is created:

    - -

    Banner Image

    - -
      -
    • INTERCEPT Task: Is created when the target is known, is detected and within a danger zone, and there is no friendly airborne in range.
    • -
    • SWEEP Task: Is created when the target is unknown, was detected and the last position is only known, and within a danger zone, and there is no friendly airborne in range.
    • -
    • ENGAGE Task: Is created when the target is known, is detected and within a danger zone, and there is a friendly airborne in range, that will receive this task.
    • -
    - -

    1. TASK_A2A_DISPATCHER constructor:

    - -

    The TASKA2ADISPATCHER.New() method creates a new TASK_A2A_DISPATCHER instance.

    - -

    1.1. Define or set the Mission:

    - -

    Tasking is executed to accomplish missions. Therefore, a MISSION object needs to be given as the first parameter.

    - -
    local HQ = GROUP:FindByName( "HQ", "Bravo" )
    -local CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
    -local Mission = MISSION:New( CommandCenter, "A2A Mission", "High", "Watch the air enemy units being detected.", coalition.side.RED )
    -
    - -

    Missions are governed by COMMANDCENTERS, so, ensure you have a COMMANDCENTER object installed and setup within your mission. -Create the MISSION object, and hook it under the command center.

    - -

    1.2. Build a set of the groups seated by human players:

    - -

    Banner Image

    - -

    A set or collection of the groups wherein human players can be seated, these can be clients or units that can be joined as a slot or jumping into.

    - -
    local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Defender" ):FilterStart()
    -
    - -

    The set is built using the SET_GROUP class. Apply any filter criteria to identify the correct groups for your mission. -Only these slots or units will be able to execute the mission and will receive tasks for this mission, once available.

    - -

    1.3. Define the EWR network:

    - -

    As part of the TASK_A2A_DISPATCHER constructor, an EWR network must be given as the third parameter. -An EWR network, or, Early Warning Radar network, is used to early detect potential airborne targets and to understand the position of patrolling targets of the enemy.

    - -

    Banner Image

    - -

    Typically EWR networks are setup using 55G6 EWR, 1L13 EWR, Hawk sr and Patriot str ground based radar units. -These radars have different ranges and 55G6 EWR and 1L13 EWR radars are Eastern Bloc units (eg Russia, Ukraine, Georgia) while the Hawk and Patriot radars are Western (eg US). -Additionally, ANY other radar capable unit can be part of the EWR network! Also AWACS airborne units, planes, helicopters can help to detect targets, as long as they have radar. -The position of these units is very important as they need to provide enough coverage -to pick up enemy aircraft as they approach so that CAP and GCI flights can be tasked to intercept them.

    - -

    Banner Image

    - -

    Additionally in a hot war situation where the border is no longer respected the placement of radars has a big effect on how fast the war escalates. -For example if they are a long way forward and can detect enemy planes on the ground and taking off -they will start to vector CAP and GCI flights to attack them straight away which will immediately draw a response from the other coalition. -Having the radars further back will mean a slower escalation because fewer targets will be detected and -therefore less CAP and GCI flights will spawn and this will tend to make just the border area active rather than a melee over the whole map. -It all depends on what the desired effect is.

    - -

    EWR networks are dynamically constructed, that is, they form part of the Functional#DETECTION_BASE object that is given as the input parameter of the TASK_A2A_DISPATCHER class. -By defining in a smart way the names or name prefixes of the groups with EWR capable units, these groups will be automatically added or deleted from the EWR network, -increasing or decreasing the radar coverage of the Early Warning System.

    - -

    See the following example to setup an EWR network containing EWR stations and AWACS.

    - -
    local EWRSet = SET_GROUP:New():FilterPrefixes( "EWR" ):FilterCoalitions("red"):FilterStart()
    -
    -local EWRDetection = DETECTION_AREAS:New( EWRSet, 6000 )
    -EWRDetection:SetFriendliesRange( 10000 )
    -EWRDetection:SetRefreshTimeInterval(30)
    -
    --- Setup the A2A dispatcher, and initialize it.
    -A2ADispatcher = TASK_A2A_DISPATCHER:New( Mission, AttackGroups, EWRDetection )
    -
    - -

    The above example creates a SET_GROUP instance, and stores this in the variable (object) EWRSet. -EWRSet is then being configured to filter all active groups with a group name starting with EWR to be included in the Set. -EWRSet is then being ordered to start the dynamic filtering. Note that any destroy or new spawn of a group with the above names will be removed or added to the Set. -Then a new EWRDetection object is created from the class DETECTION_AREAS. A grouping radius of 6000 is choosen, which is 6km. -The EWRDetection object is then passed to the TASKA2ADISPATCHER.New() method to indicate the EWR network configuration and setup the A2A tasking and detection mechanism.

    - -

    2. Define the detected target grouping radius:

    - -

    Banner Image

    - -

    The target grouping radius is a property of the Detection object, that was passed to the AI_A2A_DISPATCHER object, but can be changed. -The grouping radius should not be too small, but also depends on the types of planes and the era of the simulation. -Fast planes like in the 80s, need a larger radius than WWII planes.
    -Typically I suggest to use 30000 for new generation planes and 10000 for older era aircraft.

    - -

    Note that detected targets are constantly re-grouped, that is, when certain detected aircraft are moving further than the group radius, then these aircraft will become a separate -group being detected. This may result in additional GCI being started by the dispatcher! So don't make this value too small!

    - -

    3. Set the Engage radius:

    - -

    Define the radius to engage any target by airborne friendlies, which are executing cap or returning from an intercept mission.

    - -

    Banner Image

    - -

    So, if there is a target area detected and reported, -then any friendlies that are airborne near this target area, -will be commanded to (re-)engage that target when available (if no other tasks were commanded). -For example, if 100000 is given as a value, then any friendly that is airborne within 100km from the detected target, -will be considered to receive the command to engage that target area. -You need to evaluate the value of this parameter carefully. -If too small, more intercept missions may be triggered upon detected target areas. -If too large, any airborne cap may not be able to reach the detected target area in time, because it is too far.

    - -

    4. Set Scoring and Messages:

    - -

    The TASK_A2A_DISPATCHER is a state machine. It triggers the event Assign when a new player joins a Task dispatched by the TASK_A2A_DISPATCHER. -An event handler can be defined to catch the Assign event, and add additional processing to set scoring and to define messages, -when the player reaches certain achievements in the task.

    - -

    The prototype to handle the Assign event needs to be developed as follows:

    - -
     TaskDispatcher = TASK_A2A_DISPATCHER:New( ... )
    -
    - --- @param #TaskDispatcher self
    - -- @param #string From Contains the name of the state from where the Event was triggered.
    - -- @param #string Event Contains the name of the event that was triggered. In this case Assign.
    - -- @param #string To Contains the name of the state that will be transitioned to.
    - -- @param Tasking.Task_A2A#TASK_A2A Task The Task object, which is any derived object from TASK_A2A.
    - -- @param Wrapper.Unit#UNIT TaskUnit The Unit or Client that contains the Player.
    - -- @param #string PlayerName The name of the Player that joined the TaskUnit.
    - function TaskDispatcher:OnAfterAssign( From, Event, To, Task, TaskUnit, PlayerName )
    -   Task:SetScoreOnProgress( PlayerName, 20, TaskUnit )
    -   Task:SetScoreOnSuccess( PlayerName, 200, TaskUnit )
    -   Task:SetScoreOnFail( PlayerName, -100, TaskUnit )
    - end
    -
    - -

    The OnAfterAssign method (function) is added to the TaskDispatcher object. -This method will be called when a new player joins a unit in the set of groups in scope of the dispatcher. -So, this method will be called only ONCE when a player joins a unit in scope of the task.

    - -

    The TASK class implements various methods to additional set scoring for player achievements:

    - -
      -
    • Tasking.Task#TASK.SetScoreOnProgress() will add additional scores when a player achieves Progress while executing the task. - Examples of task progress can be destroying units, arriving at zones etc.

    • -
    • Tasking.Task#TASK.SetScoreOnSuccess() will add additional scores when the task goes into Success state. - This means the task has been successfully completed.

    • -
    • Tasking.Task#TASK.SetScoreOnSuccess() will add additional (negative) scores when the task goes into Failed state. - This means the task has not been successfully completed, and the scores must be given with a negative value!

    • -
    - - -
    -
    -

    Type Task_A2A_Dispatcher

    - -

    Type TASK_A2A_DISPATCHER

    - -

    TASKA2ADISPATCHER class.

    - -

    Field(s)

    -
    -
    - - - -TASK_A2A_DISPATCHER.Detection - -
    -
    - - - -
    -
    -
    -
    - - -TASK_A2A_DISPATCHER:EvaluateENGAGE(DetectedItem) - -
    -
    - -

    Creates an ENGAGE task when there are human friendlies airborne near the targets.

    - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      Set#SET_UNIT: -TargetSetUnit: The target set of units.

      - -
    2. -
    3. - -

      #nil: -If there are no targets to be set.

      - -
    4. -
    -
    -
    -
    -
    - - -TASK_A2A_DISPATCHER:EvaluateINTERCEPT(DetectedItem) - -
    -
    - -

    Creates an INTERCEPT task when there are targets for it.

    - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      Set#SET_UNIT: -TargetSetUnit: The target set of units.

      - -
    2. -
    3. - -

      #nil: -If there are no targets to be set.

      - -
    4. -
    -
    -
    -
    -
    - - -TASK_A2A_DISPATCHER:EvaluateRemoveTask(Mission, Task, Detection, DetectedItemID, DetectedItemChange, DetectedItem, DetectedItemIndex, DetectedItemChanged) - -
    -
    - -

    Evaluates the removal of the Task from the Mission.

    - - -

    Can only occur when the DetectedItem is Changed AND the state of the Task is "Planned".

    - -

    Parameters

    - -

    Return value

    - -

    Tasking.Task#TASK:

    - - -
    -
    -
    -
    - - -TASK_A2A_DISPATCHER:EvaluateSWEEP(DetectedItem) - -
    -
    - -

    Creates an SWEEP task when there are targets for it.

    - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      Set#SET_UNIT: -TargetSetUnit: The target set of units.

      - -
    2. -
    3. - -

      #nil: -If there are no targets to be set.

      - -
    4. -
    -
    -
    -
    -
    - - -TASK_A2A_DISPATCHER:GetFriendliesNearBy(DetectedItem) - -
    -
    - -

    Calculates which friendlies are nearby the area

    - -

    Parameter

    -
      -
    • - -

      DetectedItem :

      - -
    • -
    -

    Return value

    - -

    #number, Core.CommandCenter#REPORT:

    - - -
    -
    -
    -
    - - -TASK_A2A_DISPATCHER:GetPlayerFriendliesNearBy(DetectedItem) - -
    -
    - -

    Calculates which HUMAN friendlies are nearby the area

    - -

    Parameter

    -
      -
    • - -

      DetectedItem :

      - -
    • -
    -

    Return value

    - -

    #number, Core.CommandCenter#REPORT:

    - - -
    -
    -
    -
    - - - -TASK_A2A_DISPATCHER.Mission - -
    -
    - - - -
    -
    -
    -
    - - -TASK_A2A_DISPATCHER:New(Mission, SetGroup, Detection) - -
    -
    - -

    TASKA2ADISPATCHER constructor.

    - -

    Parameters

    - -

    Return value

    - -

    #TASKA2ADISPATCHER: -self

    - -
    -
    -
    -
    - - -TASK_A2A_DISPATCHER:OnAfterAssign(From, Event, To, Task, TaskUnit, PlayerName) - -
    -
    - -

    OnAfter Transition Handler for Event Assign.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    • - -

      Tasking.TaskA2A#TASKA2A Task :

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    • - -

      #string PlayerName :

      - -
    • -
    -
    -
    -
    -
    - - -TASK_A2A_DISPATCHER:ProcessDetected(Detection) - -
    -
    - -

    Assigns tasks in relation to the detected items to the Set#SET_GROUP.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean: -Return true if you want the task assigning to continue... false will cancel the loop.

    - -
    -
    -
    -
    - - -TASK_A2A_DISPATCHER:RemoveTask(TaskIndex) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      TaskIndex :

      - -
    • -
    -
    -
    -
    -
    - - -TASK_A2A_DISPATCHER:SetEngageRadius(EngageRadius) - -
    -
    - -

    Define the radius to when an ENGAGE task will be generated for any nearby by airborne friendlies, which are executing cap or returning from an intercept mission.

    - - -

    So, if there is a target area detected and reported, -then any friendlies that are airborne near this target area, -will be commanded to (re-)engage that target when available (if no other tasks were commanded). -An ENGAGE task will be created for those pilots. -For example, if 100000 is given as a value, then any friendly that is airborne within 100km from the detected target, -will be considered to receive the command to engage that target area. -You need to evaluate the value of this parameter carefully. -If too small, more intercept missions may be triggered upon detected target areas. -If too large, any airborne cap may not be able to reach the detected target area in time, because it is too far.

    - -

    Parameter

    -
      -
    • - -

      #number EngageRadius : -(Optional, Default = 100000) The radius to report friendlies near the target.

      - -
    • -
    -

    Return value

    - -

    #TASKA2ADISPATCHER:

    - - -

    Usage:

    -
    
    -  -- Set 50km as the radius to engage any target by airborne friendlies.
    -  TaskA2ADispatcher:SetEngageRadius( 50000 )
    -  
    -  -- Set 100km as the radius to engage any target by airborne friendlies.
    -  TaskA2ADispatcher:SetEngageRadius() -- 100000 is the default value.
    -  
    - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Task_A2G.html b/docs/Documentation/Task_A2G.html deleted file mode 100644 index be8874b0e..000000000 --- a/docs/Documentation/Task_A2G.html +++ /dev/null @@ -1,1604 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Task_A2G

    - -

    Tasking - The TASK_A2G models tasks for players in Air to Ground engagements.

    - - - -

    Banner Image

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions:

    - -
    -

    - -

    Global(s)

    - - - - - - - - - - - - - - - - - -
    TASK_A2G -

    TASK_A2G class, extends Task#TASK

    - -

    The TASK_A2G class defines Air To Ground tasks for a Set of Target Units, -based on the tasking capabilities defined in Task#TASK.

    -
    TASK_A2G_BAI -

    TASKA2GBAI class, extends TaskA2G#TASKA2G

    - -

    The TASKA2GBAI class defines an Battlefield Air Interdiction task for a human player to be executed.

    -
    TASK_A2G_CAS -

    TASKA2GCAS class, extends TaskA2G#TASKA2G

    - -

    The TASKA2GCAS class defines an Close Air Support task for a human player to be executed.

    -
    TASK_A2G_SEAD -

    TASKA2GSEAD class, extends TaskA2G#TASKA2G

    - -

    The TASKA2GSEAD class defines an Suppression or Extermination of Air Defenses task for a human player to be executed.

    -
    -

    Type TASK_A2G

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TASK_A2G:GetGoalTotal() - -
    TASK_A2G:GetMarkInfo(TaskInfoID, TaskInfo) - -
    TASK_A2G:GetPlannedMenuText() - -
    TASK_A2G:GetRendezVousCoordinate(TaskUnit) - -
    TASK_A2G:GetRendezVousZone(TaskUnit) - -
    TASK_A2G:GetReportDetail(ReportGroup, TaskInfoID, TaskInfo) - -
    TASK_A2G:GetTargetCoordinate(TaskUnit) - -
    TASK_A2G:GetTargetZone(TaskUnit) - -
    TASK_A2G.InitialTargets - -
    TASK_A2G.InitialThreat - -
    TASK_A2G:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit, TaskType, TaskBriefing) -

    Instantiates a new TASK_A2G.

    -
    TASK_A2G:ReportOrder(ReportGroup) -

    Return the relative distance to the target vicinity from the player, in order to sort the targets in the reports per distance from the threats.

    -
    TASK_A2G:SetGoalTotal() - -
    TASK_A2G:SetRendezVousCoordinate(RendezVousCoordinate, RendezVousRange, TaskUnit) - -
    TASK_A2G:SetRendezVousZone(RendezVousZone, TaskUnit) - -
    TASK_A2G:SetTargetCoordinate(TargetCoordinate, TaskUnit) - -
    TASK_A2G:SetTargetSetUnit(TargetSetUnit) - -
    TASK_A2G:SetTargetZone(TargetZone, TaskUnit) - -
    TASK_A2G.TargetSetUnit - -
    TASK_A2G:UpdateTaskInfo() - -
    TASK_A2G:onafterGoal(TaskUnit, From, Event, To) -

    This method checks every 10 seconds if the goal has been reached of the task.

    -
    - -

    Type TASK_A2G_BAI

    - - - - - - - - - - - - - - - - - - - - - -
    TASK_A2G_BAI:New(Mission, SetGroup, TaskName, TargetSetUnit, TaskBriefing) -

    Instantiates a new TASKA2GBAI.

    -
    TASK_A2G_BAI:SetScoreOnFail(PlayerName, Penalty, TaskUnit) -

    Set a penalty when the A2G attack has failed.

    -
    TASK_A2G_BAI:SetScoreOnProgress(PlayerName, Score, TaskUnit) -

    Set a score when a target in scope of the A2G attack, has been destroyed .

    -
    TASK_A2G_BAI:SetScoreOnSuccess(PlayerName, Score, TaskUnit) -

    Set a score when all the targets in scope of the A2G attack, have been destroyed.

    -
    TASK_A2G_BAI.TargetSetUnit - -
    - -

    Type TASK_A2G_CAS

    - - - - - - - - - - - - - - - - - - - - - -
    TASK_A2G_CAS:New(Mission, SetGroup, TaskName, TargetSetUnit, TaskBriefing) -

    Instantiates a new TASKA2GCAS.

    -
    TASK_A2G_CAS:SetScoreOnFail(PlayerName, Penalty, TaskUnit) -

    Set a penalty when the A2G attack has failed.

    -
    TASK_A2G_CAS:SetScoreOnProgress(PlayerName, Score, TaskUnit) -

    Set a score when a target in scope of the A2G attack, has been destroyed .

    -
    TASK_A2G_CAS:SetScoreOnSuccess(PlayerName, Score, TaskUnit) -

    Set a score when all the targets in scope of the A2G attack, have been destroyed.

    -
    TASK_A2G_CAS.TargetSetUnit - -
    - -

    Type TASK_A2G_SEAD

    - - - - - - - - - - - - - - - - - - - - - -
    TASK_A2G_SEAD:New(Mission, SetGroup, TaskName, TargetSetUnit, TaskBriefing) -

    Instantiates a new TASKA2GSEAD.

    -
    TASK_A2G_SEAD:SetScoreOnFail(PlayerName, Penalty, TaskUnit) -

    Set a penalty when the A2G attack has failed.

    -
    TASK_A2G_SEAD:SetScoreOnProgress(PlayerName, Score, TaskUnit) -

    Set a score when a target in scope of the A2G attack, has been destroyed .

    -
    TASK_A2G_SEAD:SetScoreOnSuccess(PlayerName, Score, TaskUnit) -

    Set a score when all the targets in scope of the A2G attack, have been destroyed.

    -
    TASK_A2G_SEAD.TargetSetUnit - -
    - -

    Global(s)

    -
    -
    - - #TASK_A2G - -TASK_A2G - -
    -
    - -

    TASK_A2G class, extends Task#TASK

    - -

    The TASK_A2G class defines Air To Ground tasks for a Set of Target Units, -based on the tasking capabilities defined in Task#TASK.

    - - -

    The TASK_A2G is implemented using a Fsm#FSM_TASK, and has the following statuses:

    - -
      -
    • None: Start of the process
    • -
    • Planned: The A2G task is planned.
    • -
    • Assigned: The A2G task is assigned to a Group#GROUP.
    • -
    • Success: The A2G task is successfully completed.
    • -
    • Failed: The A2G task has failed. This will happen if the player exists the task early, without communicating a possible cancellation to HQ.
    • -
    - -

    Set the scoring of achievements in an A2G attack.

    - -

    Scoring or penalties can be given in the following circumstances:

    - - - - -
    -
    -
    -
    - - #TASK_A2G_BAI - -TASK_A2G_BAI - -
    -
    - -

    TASKA2GBAI class, extends TaskA2G#TASKA2G

    - -

    The TASKA2GBAI class defines an Battlefield Air Interdiction task for a human player to be executed.

    - - -

    These tasks are more strategic in nature and are most of the time further away from friendly forces. -BAI tasks can also be used to express the abscence of friendly forces near the vicinity.

    - -

    The TASKA2GBAI is used by the TaskA2GDispatcher#TASKA2GDISPATCHER to automatically create BAI tasks -based on detected enemy ground targets.

    - - -
    -
    -
    -
    - - #TASK_A2G_CAS - -TASK_A2G_CAS - -
    -
    - -

    TASKA2GCAS class, extends TaskA2G#TASKA2G

    - -

    The TASKA2GCAS class defines an Close Air Support task for a human player to be executed.

    - - -

    Friendly forces will be in the vicinity within 6km from the enemy.

    - -

    The TASKA2GCAS is used by the TaskA2GDispatcher#TASKA2GDISPATCHER to automatically create CAS tasks -based on detected enemy ground targets.

    - - -
    -
    -
    -
    - - #TASK_A2G_SEAD - -TASK_A2G_SEAD - -
    -
    - -

    TASKA2GSEAD class, extends TaskA2G#TASKA2G

    - -

    The TASKA2GSEAD class defines an Suppression or Extermination of Air Defenses task for a human player to be executed.

    - - -

    These tasks are important to be executed as they will help to achieve air superiority at the vicinity.

    - -

    The TASKA2GSEAD is used by the TaskA2GDispatcher#TASKA2GDISPATCHER to automatically create SEAD tasks -based on detected enemy ground targets.

    - - -
    -
    -

    Type Task_A2G

    - -

    Type FSM_PROCESS

    - -

    Type TASK_A2G

    - -

    The TASK_A2G class

    - -

    Field(s)

    -
    -
    - - -TASK_A2G:GetGoalTotal() - -
    -
    - - - -
    -
    -
    -
    - - -TASK_A2G:GetMarkInfo(TaskInfoID, TaskInfo) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      TaskInfoID :

      - -
    • -
    • - -

      TaskInfo :

      - -
    • -
    -
    -
    -
    -
    - - -TASK_A2G:GetPlannedMenuText() - -
    -
    - - - -
    -
    -
    -
    - - -TASK_A2G:GetRendezVousCoordinate(TaskUnit) - -
    -
    - - - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      Core.Point#COORDINATE: -The Coordinate object referencing to the 2D point where the RendezVous point is located on the map.

      - -
    2. -
    3. - -

      #number: -The RendezVousRange that defines when the player is considered to have arrived at the RendezVous point.

      - -
    4. -
    -
    -
    -
    -
    - - -TASK_A2G:GetRendezVousZone(TaskUnit) - -
    -
    - - - -

    Parameter

    - -

    Return value

    - -

    Core.Zone#ZONE_BASE: -The Zone object where the RendezVous is located on the map.

    - -
    -
    -
    -
    - - -TASK_A2G:GetReportDetail(ReportGroup, TaskInfoID, TaskInfo) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      ReportGroup :

      - -
    • -
    • - -

      TaskInfoID :

      - -
    • -
    • - -

      TaskInfo :

      - -
    • -
    -
    -
    -
    -
    - - -TASK_A2G:GetTargetCoordinate(TaskUnit) - -
    -
    - - - -

    Parameter

    - -

    Return value

    - -

    Core.Point#COORDINATE: -The Coordinate object where the Target is located on the map.

    - -
    -
    -
    -
    - - -TASK_A2G:GetTargetZone(TaskUnit) - -
    -
    - - - -

    Parameter

    - -

    Return value

    - -

    Core.Zone#ZONE_BASE: -The Zone object where the Target is located on the map.

    - -
    -
    -
    -
    - - - -TASK_A2G.InitialTargets - -
    -
    - - - -
    -
    -
    -
    - - - -TASK_A2G.InitialThreat - -
    -
    - - - -
    -
    -
    -
    - - -TASK_A2G:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit, TaskType, TaskBriefing) - -
    -
    - -

    Instantiates a new TASK_A2G.

    - -

    Parameters

    -
      -
    • - -

      Tasking.Mission#MISSION Mission :

      - -
    • -
    • - -

      Set#SET_GROUP SetGroup : -The set of groups for which the Task can be assigned.

      - -
    • -
    • - -

      #string TaskName : -The name of the Task.

      - -
    • -
    • - -

      Set#SET_UNIT UnitSetTargets :

      - -
    • -
    • - -

      #number TargetDistance : -The distance to Target when the Player is considered to have "arrived" at the engagement range.

      - -
    • -
    • - -

      Core.Zone#ZONE_BASE TargetZone : -The target zone, if known. -If the TargetZone parameter is specified, the player will be routed to the center of the zone where all the targets are assumed to be.

      - -
    • -
    • - -

      TargetSetUnit :

      - -
    • -
    • - -

      TaskType :

      - -
    • -
    • - -

      TaskBriefing :

      - -
    • -
    -

    Return value

    - -

    #TASK_A2G: -self

    - -
    -
    -
    -
    - - -TASK_A2G:ReportOrder(ReportGroup) - -
    -
    - -

    Return the relative distance to the target vicinity from the player, in order to sort the targets in the reports per distance from the threats.

    - -

    Parameter

    -
      -
    • - -

      ReportGroup :

      - -
    • -
    -
    -
    -
    -
    - - -TASK_A2G:SetGoalTotal() - -
    -
    - - - -
    -
    -
    -
    - - -TASK_A2G:SetRendezVousCoordinate(RendezVousCoordinate, RendezVousRange, TaskUnit) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Core.Point#COORDINATE RendezVousCoordinate : -The Coordinate object referencing to the 2D point where the RendezVous point is located on the map.

      - -
    • -
    • - -

      #number RendezVousRange : -The RendezVousRange that defines when the player is considered to have arrived at the RendezVous point.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -
    -
    -
    -
    - - -TASK_A2G:SetRendezVousZone(RendezVousZone, TaskUnit) - -
    -
    - - - -

    Parameters

    - -
    -
    -
    -
    - - -TASK_A2G:SetTargetCoordinate(TargetCoordinate, TaskUnit) - -
    -
    - - - -

    Parameters

    - -
    -
    -
    -
    - - -TASK_A2G:SetTargetSetUnit(TargetSetUnit) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -TASK_A2G:SetTargetZone(TargetZone, TaskUnit) - -
    -
    - - - -

    Parameters

    - -
    -
    -
    -
    - - Set#SET_UNIT - -TASK_A2G.TargetSetUnit - -
    -
    - - - -
    -
    -
    -
    - - -TASK_A2G:UpdateTaskInfo() - -
    -
    - - - -
    -
    -
    -
    - - -TASK_A2G:onafterGoal(TaskUnit, From, Event, To) - -
    -
    - -

    This method checks every 10 seconds if the goal has been reached of the task.

    - -

    Parameters

    -
      -
    • - -

      TaskUnit :

      - -
    • -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    -
    -
    - -

    Type TASK_A2G_BAI

    - -

    The TASKA2GBAI class

    - -

    Field(s)

    -
    -
    - - -TASK_A2G_BAI:New(Mission, SetGroup, TaskName, TargetSetUnit, TaskBriefing) - -
    -
    - -

    Instantiates a new TASKA2GBAI.

    - -

    Parameters

    -
      -
    • - -

      Tasking.Mission#MISSION Mission :

      - -
    • -
    • - -

      Core.Set#SET_GROUP SetGroup : -The set of groups for which the Task can be assigned.

      - -
    • -
    • - -

      #string TaskName : -The name of the Task.

      - -
    • -
    • - -

      Core.Set#SET_UNIT TargetSetUnit :

      - -
    • -
    • - -

      #string TaskBriefing : -The briefing of the task.

      - -
    • -
    -

    Return value

    - -

    #TASKA2GBAI: -self

    - -
    -
    -
    -
    - - -TASK_A2G_BAI:SetScoreOnFail(PlayerName, Penalty, TaskUnit) - -
    -
    - -

    Set a penalty when the A2G attack has failed.

    - -

    Parameters

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    • - -

      #number Penalty : -The penalty in points, must be a negative value!

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -

    Return value

    - -

    #TASKA2GBAI:

    - - -
    -
    -
    -
    - - -TASK_A2G_BAI:SetScoreOnProgress(PlayerName, Score, TaskUnit) - -
    -
    - -

    Set a score when a target in scope of the A2G attack, has been destroyed .

    - -

    Parameters

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    • - -

      #number Score : -The score in points to be granted when task process has been achieved.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -

    Return value

    - -

    #TASKA2GBAI:

    - - -
    -
    -
    -
    - - -TASK_A2G_BAI:SetScoreOnSuccess(PlayerName, Score, TaskUnit) - -
    -
    - -

    Set a score when all the targets in scope of the A2G attack, have been destroyed.

    - -

    Parameters

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    • - -

      #number Score : -The score in points.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -

    Return value

    - -

    #TASKA2GBAI:

    - - -
    -
    -
    -
    - - Set#SET_UNIT - -TASK_A2G_BAI.TargetSetUnit - -
    -
    - - - -
    -
    - -

    Type TASK_A2G_CAS

    - -

    The TASKA2GCAS class

    - -

    Field(s)

    -
    -
    - - -TASK_A2G_CAS:New(Mission, SetGroup, TaskName, TargetSetUnit, TaskBriefing) - -
    -
    - -

    Instantiates a new TASKA2GCAS.

    - -

    Parameters

    -
      -
    • - -

      Tasking.Mission#MISSION Mission :

      - -
    • -
    • - -

      Core.Set#SET_GROUP SetGroup : -The set of groups for which the Task can be assigned.

      - -
    • -
    • - -

      #string TaskName : -The name of the Task.

      - -
    • -
    • - -

      Core.Set#SET_UNIT TargetSetUnit :

      - -
    • -
    • - -

      #string TaskBriefing : -The briefing of the task.

      - -
    • -
    -

    Return value

    - -

    #TASKA2GCAS: -self

    - -
    -
    -
    -
    - - -TASK_A2G_CAS:SetScoreOnFail(PlayerName, Penalty, TaskUnit) - -
    -
    - -

    Set a penalty when the A2G attack has failed.

    - -

    Parameters

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    • - -

      #number Penalty : -The penalty in points, must be a negative value!

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -

    Return value

    - -

    #TASKA2GCAS:

    - - -
    -
    -
    -
    - - -TASK_A2G_CAS:SetScoreOnProgress(PlayerName, Score, TaskUnit) - -
    -
    - -

    Set a score when a target in scope of the A2G attack, has been destroyed .

    - -

    Parameters

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    • - -

      #number Score : -The score in points to be granted when task process has been achieved.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -

    Return value

    - -

    #TASKA2GCAS:

    - - -
    -
    -
    -
    - - -TASK_A2G_CAS:SetScoreOnSuccess(PlayerName, Score, TaskUnit) - -
    -
    - -

    Set a score when all the targets in scope of the A2G attack, have been destroyed.

    - -

    Parameters

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    • - -

      #number Score : -The score in points.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -

    Return value

    - -

    #TASKA2GCAS:

    - - -
    -
    -
    -
    - - Set#SET_UNIT - -TASK_A2G_CAS.TargetSetUnit - -
    -
    - - - -
    -
    - -

    Type TASK_A2G_SEAD

    - -

    The TASKA2GSEAD class

    - -

    Field(s)

    -
    -
    - - -TASK_A2G_SEAD:New(Mission, SetGroup, TaskName, TargetSetUnit, TaskBriefing) - -
    -
    - -

    Instantiates a new TASKA2GSEAD.

    - -

    Parameters

    -
      -
    • - -

      Tasking.Mission#MISSION Mission :

      - -
    • -
    • - -

      Core.Set#SET_GROUP SetGroup : -The set of groups for which the Task can be assigned.

      - -
    • -
    • - -

      #string TaskName : -The name of the Task.

      - -
    • -
    • - -

      Core.Set#SET_UNIT TargetSetUnit :

      - -
    • -
    • - -

      #string TaskBriefing : -The briefing of the task.

      - -
    • -
    -

    Return value

    - -

    #TASKA2GSEAD: -self

    - -
    -
    -
    -
    - - -TASK_A2G_SEAD:SetScoreOnFail(PlayerName, Penalty, TaskUnit) - -
    -
    - -

    Set a penalty when the A2G attack has failed.

    - -

    Parameters

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    • - -

      #number Penalty : -The penalty in points, must be a negative value!

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -

    Return value

    - -

    #TASKA2GSEAD:

    - - -
    -
    -
    -
    - - -TASK_A2G_SEAD:SetScoreOnProgress(PlayerName, Score, TaskUnit) - -
    -
    - -

    Set a score when a target in scope of the A2G attack, has been destroyed .

    - -

    Parameters

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    • - -

      #number Score : -The score in points to be granted when task process has been achieved.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -

    Return value

    - -

    #TASKA2GSEAD:

    - - -
    -
    -
    -
    - - -TASK_A2G_SEAD:SetScoreOnSuccess(PlayerName, Score, TaskUnit) - -
    -
    - -

    Set a score when all the targets in scope of the A2G attack, have been destroyed.

    - -

    Parameters

    -
      -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    • - -

      #number Score : -The score in points.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -

    Return value

    - -

    #TASKA2GSEAD:

    - - -
    -
    -
    -
    - - Set#SET_UNIT - -TASK_A2G_SEAD.TargetSetUnit - -
    -
    - - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Task_A2G_Dispatcher.html b/docs/Documentation/Task_A2G_Dispatcher.html deleted file mode 100644 index f7ec79ac2..000000000 --- a/docs/Documentation/Task_A2G_Dispatcher.html +++ /dev/null @@ -1,604 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Task_A2G_Dispatcher

    - -

    Tasking - The TASKA2GDISPATCHER creates and manages player TASK_A2G tasks based on detected targets.

    - - - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - -
    TASK_A2G_DISPATCHER -

    TASKA2GDISPATCHE} class, extends #DETECTION_MANAGER

    - -

    The TASKA2GDISPATCHER class implements the dynamic dispatching of tasks upon groups of detected units determined a Set of FAC (groups).

    -
    -

    Type TASK_A2G_DISPATCHER

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TASK_A2G_DISPATCHER.Detection -

    The DETECTION_BASE object that is used to report the detected objects.

    -
    TASK_A2G_DISPATCHER:EvaluateBAI(DetectedItem, FriendlyCoalition) -

    Creates a BAI task when there are targets for it.

    -
    TASK_A2G_DISPATCHER:EvaluateCAS(DetectedItem) -

    Creates a CAS task when there are targets for it.

    -
    TASK_A2G_DISPATCHER:EvaluateRemoveTask(Mission, Task, DetectedItemID, DetectedItemChange, TaskIndex, DetectedItemChanged) -

    Evaluates the removal of the Task from the Mission.

    -
    TASK_A2G_DISPATCHER:EvaluateSEAD(DetectedItem) -

    Creates a SEAD task when there are targets for it.

    -
    TASK_A2G_DISPATCHER.Mission - -
    TASK_A2G_DISPATCHER:New(Mission, SetGroup, Detection) -

    TASKA2GDISPATCHER constructor.

    -
    TASK_A2G_DISPATCHER:OnAfterAssign(From, Event, To, Task, TaskUnit, PlayerName) -

    OnAfter Transition Handler for Event Assign.

    -
    TASK_A2G_DISPATCHER:ProcessDetected(Detection) -

    Assigns tasks in relation to the detected items to the Set#SET_GROUP.

    -
    TASK_A2G_DISPATCHER:RemoveTask(TaskIndex) - -
    TASK_A2G_DISPATCHER.SetGroup -

    The groups to which the FAC will report to.

    -
    - -

    Global(s)

    -
    -
    - - #TASK_A2G_DISPATCHER - -TASK_A2G_DISPATCHER - -
    -
    - -

    TASKA2GDISPATCHE} class, extends #DETECTION_MANAGER

    - -

    The TASKA2GDISPATCHER class implements the dynamic dispatching of tasks upon groups of detected units determined a Set of FAC (groups).

    - - -

    The FAC will detect units, will group them, and will dispatch Tasks to groups. Depending on the type of target detected, different tasks will be dispatched. -Find a summary below describing for which situation a task type is created:

    - -
      -
    • CAS Task: Is created when there are enemy ground units within range of the FAC, while there are friendly units in the FAC perimeter.
    • -
    • BAI Task: Is created when there are enemy ground units within range of the FAC, while there are NO other friendly units within the FAC perimeter.
    • -
    • SEAD Task: Is created when there are enemy ground units wihtin range of the FAC, with air search radars.
    • -
    - -

    Other task types will follow...

    - -

    TASKA2GDISPATCHER constructor

    - -

    The TASKA2GDISPATCHER.New() method creates a new TASKA2GDISPATCHER instance.

    - - -
    -
    -

    Type Task_A2G_Dispatcher

    - -

    Type TASK_A2G_DISPATCHER

    - -

    TASKA2GDISPATCHER class.

    - -

    Field(s)

    -
    -
    - - Functional.Detection#DETECTION_BASE - -TASK_A2G_DISPATCHER.Detection - -
    -
    - -

    The DETECTION_BASE object that is used to report the detected objects.

    - -
    -
    -
    -
    - - -TASK_A2G_DISPATCHER:EvaluateBAI(DetectedItem, FriendlyCoalition) - -
    -
    - -

    Creates a BAI task when there are targets for it.

    - -

    Parameters

    - -

    Return values

    -
      -
    1. - -

      Core.Set#SET_UNIT: -TargetSetUnit: The target set of units.

      - -
    2. -
    3. - -

      #nil: -If there are no targets to be set.

      - -
    4. -
    -
    -
    -
    -
    - - -TASK_A2G_DISPATCHER:EvaluateCAS(DetectedItem) - -
    -
    - -

    Creates a CAS task when there are targets for it.

    - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      Core.Set#SET_UNIT: -TargetSetUnit: The target set of units.

      - -
    2. -
    3. - -

      #nil: -If there are no targets to be set.

      - -
    4. -
    -
    -
    -
    -
    - - -TASK_A2G_DISPATCHER:EvaluateRemoveTask(Mission, Task, DetectedItemID, DetectedItemChange, TaskIndex, DetectedItemChanged) - -
    -
    - -

    Evaluates the removal of the Task from the Mission.

    - - -

    Can only occur when the DetectedItem is Changed AND the state of the Task is "Planned".

    - -

    Parameters

    -
      -
    • - -

      Tasking.Mission#MISSION Mission :

      - -
    • -
    • - -

      Tasking.Task#TASK Task :

      - -
    • -
    • - -

      #boolean DetectedItemID :

      - -
    • -
    • - -

      #boolean DetectedItemChange :

      - -
    • -
    • - -

      TaskIndex :

      - -
    • -
    • - -

      DetectedItemChanged :

      - -
    • -
    -

    Return value

    - -

    Tasking.Task#TASK:

    - - -
    -
    -
    -
    - - -TASK_A2G_DISPATCHER:EvaluateSEAD(DetectedItem) - -
    -
    - -

    Creates a SEAD task when there are targets for it.

    - -

    Parameter

    - -

    Return values

    -
      -
    1. - -

      Core.Set#SET_UNIT: -TargetSetUnit: The target set of units.

      - -
    2. -
    3. - -

      #nil: -If there are no targets to be set.

      - -
    4. -
    -
    -
    -
    -
    - - Tasking.Mission#MISSION - -TASK_A2G_DISPATCHER.Mission - -
    -
    - - - -
    -
    -
    -
    - - -TASK_A2G_DISPATCHER:New(Mission, SetGroup, Detection) - -
    -
    - -

    TASKA2GDISPATCHER constructor.

    - -

    Parameters

    - -

    Return value

    - -

    #TASKA2GDISPATCHER: -self

    - -
    -
    -
    -
    - - -TASK_A2G_DISPATCHER:OnAfterAssign(From, Event, To, Task, TaskUnit, PlayerName) - -
    -
    - -

    OnAfter Transition Handler for Event Assign.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    • - -

      Tasking.TaskA2G#TASKA2G Task :

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    • - -

      #string PlayerName :

      - -
    • -
    -
    -
    -
    -
    - - -TASK_A2G_DISPATCHER:ProcessDetected(Detection) - -
    -
    - -

    Assigns tasks in relation to the detected items to the Set#SET_GROUP.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean: -Return true if you want the task assigning to continue... false will cancel the loop.

    - -
    -
    -
    -
    - - -TASK_A2G_DISPATCHER:RemoveTask(TaskIndex) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      TaskIndex :

      - -
    • -
    -
    -
    -
    -
    - - Set#SET_GROUP - -TASK_A2G_DISPATCHER.SetGroup - -
    -
    - -

    The groups to which the FAC will report to.

    - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Task_Cargo.html b/docs/Documentation/Task_Cargo.html deleted file mode 100644 index 52b1027ed..000000000 --- a/docs/Documentation/Task_Cargo.html +++ /dev/null @@ -1,1686 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Task_Cargo

    - -

    Tasking -- The TASK_CARGO models tasks for players to transport Cargo.

    - - - -

    Banner Image

    - -
    - -

    The Moose framework provides various CARGO classes that allow DCS phisical or logical objects to be transported or sling loaded by Carriers. -The CARGO_ classes, as part of the moose core, are able to Board, Load, UnBoard and UnLoad cargo between Carrier units.

    - -

    This collection of classes in this module define tasks for human players to handle these cargo objects. -Cargo can be transported, picked-up, deployed and sling-loaded from and to other places.

    - -

    The following classes are important to consider:

    - -
      -
    • #TASKCARGOTRANSPORT: Defines a task for a human player to transport a set of cargo between various zones.
    • -
    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions:

    - -
    -

    - -

    Global(s)

    - - - - - - - - - -
    TASK_CARGO -

    TASK_CARGO class, extends Task#TASK

    - -

    A flexible tasking system

    - -

    The TASK_CARGO classes provide you with a flexible tasking sytem, -that allows you to transport cargo of various types between various locations -and various dedicated deployment zones.

    -
    TASK_CARGO_TRANSPORT - -
    -

    Type FSM_PROCESS

    - - - - - - - - - -
    FSM_PROCESS.Cargo - -
    FSM_PROCESS.DeployZone - -
    - -

    Type TASK_CARGO

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TASK_CARGO:AddDeployZone(DeployZone, TaskUnit) - -
    TASK_CARGO.CargoItemCount - -
    TASK_CARGO.CargoLimit - -
    TASK_CARGO.DeployZones - -
    TASK_CARGO:GetCargoSet() - -
    TASK_CARGO:GetDeployZones() - -
    TASK_CARGO:GetGoalTotal() - -
    TASK_CARGO:GetPlannedMenuText() - -
    TASK_CARGO:GetSmokeColor() - -
    TASK_CARGO:GetTargetZone(TaskUnit) - -
    TASK_CARGO:New(Mission, SetGroup, TaskName, SetCargo, TaskType, TaskBriefing) -

    Instantiates a new TASK_CARGO.

    -
    TASK_CARGO:RemoveDeployZone(DeployZone, TaskUnit) - -
    TASK_CARGO.SetCargo - -
    TASK_CARGO:SetCargoLimit(CargoLimit) -

    Set a limit on the amount of cargo items that can be loaded into the Carriers.

    -
    TASK_CARGO:SetCargoPickup(Cargo, TaskUnit) - -
    TASK_CARGO:SetDeployZone(DeployZone, TaskUnit) - -
    TASK_CARGO:SetDeployZones(@, TaskUnit, DeployZones) - -
    TASK_CARGO:SetGoalTotal() - -
    TASK_CARGO:SetScoreOnFail(Text, Penalty, TaskUnit) -

    Set a penalty when the A2G attack has failed.

    -
    TASK_CARGO:SetScoreOnProgress(Text, Score, TaskUnit) -

    Set a score when a target in scope of the A2G attack, has been destroyed .

    -
    TASK_CARGO:SetScoreOnSuccess(Text, Score, TaskUnit) -

    Set a score when all the targets in scope of the A2G attack, have been destroyed.

    -
    TASK_CARGO.SetSmokeColor(Color, self, SmokeColor) - -
    TASK_CARGO.SmokeColor - -
    TASK_CARGO.TaskType - -
    - -

    Type TASK_CARGO_TRANSPORT

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TASK_CARGO_TRANSPORT:CargoDeployed(TaskUnit, Cargo, DeployZone) -

    Synchronous Event Trigger for Event CargoDeployed.

    -
    TASK_CARGO_TRANSPORT:CargoPickedUp(TaskUnit, Cargo) -

    Synchronous Event Trigger for Event CargoPickedUp.

    -
    TASK_CARGO_TRANSPORT.ClassName - -
    TASK_CARGO_TRANSPORT:IsAllCargoTransported() - -
    TASK_CARGO_TRANSPORT:New(Mission, SetGroup, TaskName, SetCargo, TaskBriefing) -

    Instantiates a new TASKCARGOTRANSPORT.

    -
    TASK_CARGO_TRANSPORT:OnAfterCargoDeployed(From, Event, To, TaskUnit, Cargo, DeployZone) -

    OnAfter Transition Handler for Event CargoDeployed.

    -
    TASK_CARGO_TRANSPORT:OnAfterCargoPickedUp(From, Event, To, TaskUnit, Cargo) -

    OnAfter Transition Handler for Event CargoPickedUp.

    -
    TASK_CARGO_TRANSPORT:OnBeforeCargoDeployed(From, Event, To, TaskUnit, Cargo, DeployZone) -

    OnBefore Transition Handler for Event CargoDeployed.

    -
    TASK_CARGO_TRANSPORT:OnBeforeCargoPickedUp(From, Event, To, TaskUnit, Cargo) -

    OnBefore Transition Handler for Event CargoPickedUp.

    -
    TASK_CARGO_TRANSPORT:ReportOrder(ReportGroup) - -
    TASK_CARGO_TRANSPORT:__CargoDeployed(Delay, TaskUnit, Cargo, DeployZone) -

    Asynchronous Event Trigger for Event CargoDeployed.

    -
    TASK_CARGO_TRANSPORT:__CargoPickedUp(Delay, TaskUnit, Cargo) -

    Asynchronous Event Trigger for Event CargoPickedUp.

    -
    TASK_CARGO_TRANSPORT:onafterGoal(TaskUnit, From, Event, To) - -
    - -

    Global(s)

    -
    -
    - - #TASK_CARGO - -TASK_CARGO - -
    -
    - -

    TASK_CARGO class, extends Task#TASK

    - -

    A flexible tasking system

    - -

    The TASK_CARGO classes provide you with a flexible tasking sytem, -that allows you to transport cargo of various types between various locations -and various dedicated deployment zones.

    - - - -

    The cargo in scope of the TASKCARGO classes must be explicitly given, and is of type SETCARGO. -The SET_CARGO contains a collection of CARGO objects that must be handled by the players in the mission.

    - - -

    Task execution experience from the player perspective

    - -

    A human player can join the battle field in a client airborne slot or a ground vehicle within the CA module (ALT-J). -The player needs to accept the task from the task overview list within the mission, using the radio menus.

    - -

    Once the TASK_CARGO is assigned to the player and accepted by the player, the player will obtain -an extra Cargo Handling Radio Menu that contains the CARGO objects that need to be transported.

    - -

    Each CARGO object has a certain state:

    - -
      -
    • UnLoaded: The CARGO is located within the battlefield. It may still need to be transported.
    • -
    • Loaded: The CARGO is loaded within a Carrier. This can be your air unit, or another air unit, or even a vehicle.
    • -
    • Boarding: The CARGO is running or moving towards your Carrier for loading.
    • -
    • UnBoarding: The CARGO is driving or jumping out of your Carrier and moves to a location in the Deployment Zone.
    • -
    - -

    Cargo must be transported towards different **Deployment Zones**.

    - -

    The Cargo Handling Radio Menu system allows to execute various actions to handle the cargo. -In the menu, you'll find for each CARGO, that is part of the scope of the task, various actions that can be completed. -Depending on the location of your Carrier unit, the menu options will vary.

    - - -

    Cargo Pickup and Boarding

    - -

    For cargo boarding, a cargo can only execute the boarding actions if it is within the foreseen Reporting Range. -Therefore, it is important that you steer your Carrier within the Reporting Range, -so that boarding actions can be executed on the cargo. -To Pickup and Board cargo, the following menu items will be shown in your carrier radio menu:

    - -

    Board Cargo

    - -

    If your Carrier is within the Reporting Range of the cargo, it will allow to pickup the cargo by selecting this menu option. -Depending on the Cargo type, the cargo will either move to your Carrier or you will receive instructions how to handle the cargo -pickup. If the cargo moves to your carrier, it will indicate the boarding status. -Note that multiple units need to board your Carrier, so it is required to await the full boarding process. -Once the cargo is fully boarded within your Carrier, you will be notified of this.

    - -

    Note that for airborne Carriers, it is required to land first before the Boarding process can be initiated. -If during boarding the Carrier gets airborne, the boarding process will be cancelled.

    - -

    Pickup Cargo

    - -

    If your Carrier is not within the Reporting Range of the cargo, the HQ will guide you to its location. -Routing information is shown in flight that directs you to the cargo within Reporting Range. -Upon arrival, the Cargo will contact you and further instructions will be given. -When your Carrier is airborne, you will receive instructions to land your Carrier. -The action will not be completed until you've landed your Carrier.

    - - -

    Cargo Deploy and UnBoarding

    - -

    Various Deployment Zones can be foreseen in the scope of the Cargo transportation. Each deployment zone can be of varying Zone type. -The Cargo Handling Radio Menu provides with menu options to execute an action to steer your Carrier to a specific Zone.

    - -

    UnBoard Cargo

    - -

    If your Carrier is already within a Deployment Zone, -then the Cargo Handling Radio Menu allows to UnBoard a specific cargo that is -loaded within your Carrier group into the Deployment Zone. -Note that the Unboarding process takes a while, as the cargo units (infantry or vehicles) must unload from your Carrier. -Ensure that you stay at the position or stay on the ground while Unboarding. -If any unforeseen manoeuvre is done by the Carrier, then the Unboarding will be cancelled.

    - -

    Deploy Cargo

    - -

    If your Carrier is not within a Deployment Zone, you'll need to fly towards one. -Fortunately, the Cargo Handling Radio Menu provides you with menu options to select a specific Deployment Zone to fly towards. -Once a Deployment Zone has been selected, your Carrier will receive routing information from HQ towards the Deployment Zone center. -Upon arrival, the HQ will provide you with further instructions. -When your Carrier is airborne, you will receive instructions to land your Carrier. -The action will not be completed until you've landed your Carrier!

    - -

    Handle TASK_CARGO Events ...

    - -

    The TASK_CARGO classes define Cargo transport tasks, -based on the tasking capabilities defined in Task#TASK.

    - -

    Specific TASK_CARGO Events

    - -

    Specific Cargo Handling event can be captured, that allow to trigger specific actions!

    - -
      -
    • Boarded: Triggered when the Cargo has been Boarded into your Carrier.
    • -
    • UnBoarded: Triggered when the cargo has been Unboarded from your Carrier and has arrived at the Deployment Zone.
    • -
    - -

    Standard TASK_CARGO Events

    - -

    The TASK_CARGO is implemented using a Statemachine#FSM_TASK, and has the following standard statuses:

    - -
      -
    • None: Start of the process.
    • -
    • Planned: The cargo task is planned.
    • -
    • Assigned: The cargo task is assigned to a Group#GROUP.
    • -
    • Success: The cargo task is successfully completed.
    • -
    • Failed: The cargo task has failed. This will happen if the player exists the task early, without communicating a possible cancellation to HQ.
    • -
    - -
    - - -
    -
    -
    -
    - - #TASK_CARGO_TRANSPORT - -TASK_CARGO_TRANSPORT - -
    -
    - - - -
    -
    -

    Type Task_Cargo

    - -

    Type FSM_PROCESS

    -

    Field(s)

    -
    -
    - - - -FSM_PROCESS.Cargo - -
    -
    - - - -
    -
    -
    -
    - - - -FSM_PROCESS.DeployZone - -
    -
    - - - -
    -
    - -

    Type TASK_CARGO

    -

    Field(s)

    -
    -
    - - -TASK_CARGO:AddDeployZone(DeployZone, TaskUnit) - -
    -
    - - - -

    Parameters

    - -

    Return value

    - -

    #TASK_CARGO:

    - - -
    -
    -
    -
    - - - -TASK_CARGO.CargoItemCount - -
    -
    - - - - -

    Map of Carriers having a cargo item count to check the cargo loading limits.

    - -
    -
    -
    -
    - - #number - -TASK_CARGO.CargoLimit - -
    -
    - - - -
    -
    -
    -
    - - - -TASK_CARGO.DeployZones - -
    -
    - - - - -

    setmetatable( {}, { __mode = "v" } ) -- weak table on value

    - -
    -
    -
    -
    - - -TASK_CARGO:GetCargoSet() - -
    -
    - - - -

    Return value

    - -

    Core.Set#SET_CARGO: -The Cargo Set.

    - -
    -
    -
    -
    - - -TASK_CARGO:GetDeployZones() - -
    -
    - - - -

    Return value

    - -

    #list: -Core.Zone#ZONE_BASE> The Deployment Zones.

    - -
    -
    -
    -
    - - -TASK_CARGO:GetGoalTotal() - -
    -
    - - - -
    -
    -
    -
    - - -TASK_CARGO:GetPlannedMenuText() - -
    -
    - - - -
    -
    -
    -
    - - -TASK_CARGO:GetSmokeColor() - -
    -
    - - - - -

    @return SmokeColor

    - -
    -
    -
    -
    - - -TASK_CARGO:GetTargetZone(TaskUnit) - -
    -
    - - - -

    Parameter

    - -

    Return value

    - -

    Core.Zone#ZONE_BASE: -The Zone object where the Target is located on the map.

    - -
    -
    -
    -
    - - -TASK_CARGO:New(Mission, SetGroup, TaskName, SetCargo, TaskType, TaskBriefing) - -
    -
    - -

    Instantiates a new TASK_CARGO.

    - -

    Parameters

    -
      -
    • - -

      Tasking.Mission#MISSION Mission :

      - -
    • -
    • - -

      Set#SET_GROUP SetGroup : -The set of groups for which the Task can be assigned.

      - -
    • -
    • - -

      #string TaskName : -The name of the Task.

      - -
    • -
    • - -

      Core.Set#SET_CARGO SetCargo : -The scope of the cargo to be transported.

      - -
    • -
    • - -

      #string TaskType : -The type of Cargo task.

      - -
    • -
    • - -

      #string TaskBriefing : -The Cargo Task briefing.

      - -
    • -
    -

    Return value

    - -

    #TASK_CARGO: -self

    - -
    -
    -
    -
    - - -TASK_CARGO:RemoveDeployZone(DeployZone, TaskUnit) - -
    -
    - - - -

    Parameters

    - -

    Return value

    - -

    #TASK_CARGO:

    - - -
    -
    -
    -
    - - - -TASK_CARGO.SetCargo - -
    -
    - - - -
    -
    -
    -
    - - -TASK_CARGO:SetCargoLimit(CargoLimit) - -
    -
    - -

    Set a limit on the amount of cargo items that can be loaded into the Carriers.

    - -

    Parameter

    -
      -
    • - -

      CargoLimit : -Specifies a number of cargo items that can be loaded in the helicopter.

      - -
    • -
    -

    Return value

    - -

    #TASK_CARGO:

    - - -
    -
    -
    -
    - - -TASK_CARGO:SetCargoPickup(Cargo, TaskUnit) - -
    -
    - - - -

    Parameters

    - -

    Return value

    - -

    #TASK_CARGO:

    - - -
    -
    -
    -
    - - -TASK_CARGO:SetDeployZone(DeployZone, TaskUnit) - -
    -
    - - - -

    Parameters

    - -

    Return value

    - -

    #TASK_CARGO:

    - - -
    -
    -
    -
    - - -TASK_CARGO:SetDeployZones(@, TaskUnit, DeployZones) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      @ : -ist DeployZones

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    • - -

      DeployZones :

      - -
    • -
    -

    Return value

    - -

    #TASK_CARGO:

    - - -
    -
    -
    -
    - - -TASK_CARGO:SetGoalTotal() - -
    -
    - - - -
    -
    -
    -
    - - -TASK_CARGO:SetScoreOnFail(Text, Penalty, TaskUnit) - -
    -
    - -

    Set a penalty when the A2G attack has failed.

    - -

    Parameters

    -
      -
    • - -

      #string Text : -The text to display to the player, when the A2G attack has failed.

      - -
    • -
    • - -

      #number Penalty : -The penalty in points.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -

    Return value

    - -

    #TASK_CARGO:

    - - -
    -
    -
    -
    - - -TASK_CARGO:SetScoreOnProgress(Text, Score, TaskUnit) - -
    -
    - -

    Set a score when a target in scope of the A2G attack, has been destroyed .

    - -

    Parameters

    -
      -
    • - -

      #string Text : -The text to display to the player, when the target has been destroyed.

      - -
    • -
    • - -

      #number Score : -The score in points.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -

    Return value

    - -

    #TASK_CARGO:

    - - -
    -
    -
    -
    - - -TASK_CARGO:SetScoreOnSuccess(Text, Score, TaskUnit) - -
    -
    - -

    Set a score when all the targets in scope of the A2G attack, have been destroyed.

    - -

    Parameters

    -
      -
    • - -

      #string Text : -The text to display to the player, when all targets hav been destroyed.

      - -
    • -
    • - -

      #number Score : -The score in points.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit :

      - -
    • -
    -

    Return value

    - -

    #TASK_CARGO:

    - - -
    -
    -
    -
    - - -TASK_CARGO.SetSmokeColor(Color, self, SmokeColor) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      Color : -Might be SMOKECOLOR.Blue, SMOKECOLOR.Red SMOKECOLOR.Orange, SMOKECOLOR.White or SMOKECOLOR.Green

      - -
    • -
    • - -

      self :

      - -
    • -
    • - -

      SmokeColor :

      - -
    • -
    -
    -
    -
    -
    - - - -TASK_CARGO.SmokeColor - -
    -
    - - - -
    -
    -
    -
    - - - -TASK_CARGO.TaskType - -
    -
    - - - -
    -
    - -

    Type TASK_CARGO_TRANSPORT

    - -

    The TASKCARGOTRANSPORT class

    - -

    Field(s)

    -
    -
    - - -TASK_CARGO_TRANSPORT:CargoDeployed(TaskUnit, Cargo, DeployZone) - -
    -
    - -

    Synchronous Event Trigger for Event CargoDeployed.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT TaskUnit : -The Unit (Client) that Deployed the cargo. You can use this to retrieve the PlayerName etc.

      - -
    • -
    • - -

      Core.Cargo#CARGO Cargo : -The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Status.

      - -
    • -
    • - -

      Core.Zone#ZONE DeployZone : -The zone where the Cargo got Deployed or UnBoarded.

      - -
    • -
    -
    -
    -
    -
    - - -TASK_CARGO_TRANSPORT:CargoPickedUp(TaskUnit, Cargo) - -
    -
    - -

    Synchronous Event Trigger for Event CargoPickedUp.

    - -

    Parameters

    -
      -
    • - -

      Wrapper.Unit#UNIT TaskUnit : -The Unit (Client) that PickedUp the cargo. You can use this to retrieve the PlayerName etc.

      - -
    • -
    • - -

      Core.Cargo#CARGO Cargo : -The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Status.

      - -
    • -
    -
    -
    -
    -
    - - #string - -TASK_CARGO_TRANSPORT.ClassName - -
    -
    - - - -
    -
    -
    -
    - - -TASK_CARGO_TRANSPORT:IsAllCargoTransported() - -
    -
    - - - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -TASK_CARGO_TRANSPORT:New(Mission, SetGroup, TaskName, SetCargo, TaskBriefing) - -
    -
    - -

    Instantiates a new TASKCARGOTRANSPORT.

    - -

    Parameters

    -
      -
    • - -

      Tasking.Mission#MISSION Mission :

      - -
    • -
    • - -

      Set#SET_GROUP SetGroup : -The set of groups for which the Task can be assigned.

      - -
    • -
    • - -

      #string TaskName : -The name of the Task.

      - -
    • -
    • - -

      Core.Set#SET_CARGO SetCargo : -The scope of the cargo to be transported.

      - -
    • -
    • - -

      #string TaskBriefing : -The Cargo Task briefing.

      - -
    • -
    -

    Return value

    - -

    #TASKCARGOTRANSPORT: -self

    - -
    -
    -
    -
    - - -TASK_CARGO_TRANSPORT:OnAfterCargoDeployed(From, Event, To, TaskUnit, Cargo, DeployZone) - -
    -
    - -

    OnAfter Transition Handler for Event CargoDeployed.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit : -The Unit (Client) that Deployed the cargo. You can use this to retrieve the PlayerName etc.

      - -
    • -
    • - -

      Core.Cargo#CARGO Cargo : -The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Status.

      - -
    • -
    • - -

      Core.Zone#ZONE DeployZone : -The zone where the Cargo got Deployed or UnBoarded.

      - -
    • -
    -
    -
    -
    -
    - - -TASK_CARGO_TRANSPORT:OnAfterCargoPickedUp(From, Event, To, TaskUnit, Cargo) - -
    -
    - -

    OnAfter Transition Handler for Event CargoPickedUp.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit : -The Unit (Client) that PickedUp the cargo. You can use this to retrieve the PlayerName etc.

      - -
    • -
    • - -

      Core.Cargo#CARGO Cargo : -The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Status.

      - -
    • -
    -
    -
    -
    -
    - - -TASK_CARGO_TRANSPORT:OnBeforeCargoDeployed(From, Event, To, TaskUnit, Cargo, DeployZone) - -
    -
    - -

    OnBefore Transition Handler for Event CargoDeployed.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit : -The Unit (Client) that Deployed the cargo. You can use this to retrieve the PlayerName etc.

      - -
    • -
    • - -

      Core.Cargo#CARGO Cargo : -The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Status.

      - -
    • -
    • - -

      Core.Zone#ZONE DeployZone : -The zone where the Cargo got Deployed or UnBoarded.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -TASK_CARGO_TRANSPORT:OnBeforeCargoPickedUp(From, Event, To, TaskUnit, Cargo) - -
    -
    - -

    OnBefore Transition Handler for Event CargoPickedUp.

    - -

    Parameters

    -
      -
    • - -

      #string From : -The From State string.

      - -
    • -
    • - -

      #string Event : -The Event string.

      - -
    • -
    • - -

      #string To : -The To State string.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit : -The Unit (Client) that PickedUp the cargo. You can use this to retrieve the PlayerName etc.

      - -
    • -
    • - -

      Core.Cargo#CARGO Cargo : -The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Status.

      - -
    • -
    -

    Return value

    - -

    #boolean: -Return false to cancel Transition.

    - -
    -
    -
    -
    - - -TASK_CARGO_TRANSPORT:ReportOrder(ReportGroup) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      ReportGroup :

      - -
    • -
    -
    -
    -
    -
    - - -TASK_CARGO_TRANSPORT:__CargoDeployed(Delay, TaskUnit, Cargo, DeployZone) - -
    -
    - -

    Asynchronous Event Trigger for Event CargoDeployed.

    - -

    Parameters

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit : -The Unit (Client) that Deployed the cargo. You can use this to retrieve the PlayerName etc.

      - -
    • -
    • - -

      Core.Cargo#CARGO Cargo : -The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Status.

      - -
    • -
    • - -

      Core.Zone#ZONE DeployZone : -The zone where the Cargo got Deployed or UnBoarded.

      - -
    • -
    -
    -
    -
    -
    - - -TASK_CARGO_TRANSPORT:__CargoPickedUp(Delay, TaskUnit, Cargo) - -
    -
    - -

    Asynchronous Event Trigger for Event CargoPickedUp.

    - -

    Parameters

    -
      -
    • - -

      #number Delay : -The delay in seconds.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT TaskUnit : -The Unit (Client) that PickedUp the cargo. You can use this to retrieve the PlayerName etc.

      - -
    • -
    • - -

      Core.Cargo#CARGO Cargo : -The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Status.

      - -
    • -
    -
    -
    -
    -
    - - -TASK_CARGO_TRANSPORT:onafterGoal(TaskUnit, From, Event, To) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      TaskUnit :

      - -
    • -
    • - -

      From :

      - -
    • -
    • - -

      Event :

      - -
    • -
    • - -

      To :

      - -
    • -
    -
    -
    - -

    Type list

    - -
    - -
    - - diff --git a/docs/Documentation/Task_PICKUP.html b/docs/Documentation/Task_PICKUP.html deleted file mode 100644 index 57beddbe9..000000000 --- a/docs/Documentation/Task_PICKUP.html +++ /dev/null @@ -1,441 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Task_PICKUP

    - -

    This module contains the TASK_PICKUP classes.

    - - - -

    1) #TASK_PICKUP class, extends Task#TASK

    -

    The #TASK_PICKUP class defines a pickup task of a Set of CARGO objects defined within the mission. -based on the tasking capabilities defined in Task#TASK. -The TASK_PICKUP is implemented using a Statemachine#FSM_TASK, and has the following statuses:

    - -
      -
    • None: Start of the process
    • -
    • Planned: The SEAD task is planned. Upon Planned, the sub-process ProcessFsm.Assign#ACTASSIGN_ACCEPT is started to accept the task.
    • -
    • Assigned: The SEAD task is assigned to a Group#GROUP. Upon Assigned, the sub-process ProcessFsm.Route#ACTROUTE is started to route the active Units in the Group to the attack zone.
    • -
    • Success: The SEAD task is successfully completed. Upon Success, the sub-process ProcessSEAD#PROCESSSEAD is started to follow-up successful SEADing of the targets assigned in the task.
    • -
    • Failed: The SEAD task has failed. This will happen if the player exists the task early, without communicating a possible cancellation to HQ.
    • -
    - -
    - -

    Authors: FlightControl - Design and Programming

    - - -

    Global(s)

    - - - - - -
    TASK_PICKUP - -
    -

    Type TASK_PICKUP

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TASK_PICKUP:AssignToUnit(TaskUnit) -

    Assign the Task to a Unit.

    -
    TASK_PICKUP.ClassName - -
    TASK_PICKUP:CleanUp() -

    Removes a TASK_PICKUP.

    -
    TASK_PICKUP:GetPlannedMenuText() - -
    TASK_PICKUP:New(Mission, AssignedSetGroup, TaskName, TaskType, UnitSetTargets, TargetZone) -

    Instantiates a new TASK_PICKUP.

    -
    TASK_PICKUP:OnNext(Fsm, Event, From, To, Event) -

    StateMachine callback function for a TASK

    -
    TASK_PICKUP.TaskScheduler - -
    TASK_PICKUP:_Schedule() - -
    TASK_PICKUP:_Scheduler() - -
    - -

    Global(s)

    -
    -
    - - #TASK_PICKUP - -TASK_PICKUP - -
    -
    - - - -
    -
    -

    Type Task_PICKUP

    - -

    Type TASK_PICKUP

    - -

    The TASK_PICKUP class

    - -

    Field(s)

    -
    -
    - - -TASK_PICKUP:AssignToUnit(TaskUnit) - -
    -
    - -

    Assign the Task to a Unit.

    - -

    Parameter

    - -

    Return value

    - -

    #TASK_PICKUP: -self

    - -
    -
    -
    -
    - - #string - -TASK_PICKUP.ClassName - -
    -
    - - - -
    -
    -
    -
    - - -TASK_PICKUP:CleanUp() - -
    -
    - -

    Removes a TASK_PICKUP.

    - -

    Return value

    - -

    #nil:

    - - -
    -
    -
    -
    - - -TASK_PICKUP:GetPlannedMenuText() - -
    -
    - - - -
    -
    -
    -
    - - -TASK_PICKUP:New(Mission, AssignedSetGroup, TaskName, TaskType, UnitSetTargets, TargetZone) - -
    -
    - -

    Instantiates a new TASK_PICKUP.

    - -

    Parameters

    - -

    Return value

    - -

    #TASK_PICKUP: -self

    - -
    -
    -
    -
    - - -TASK_PICKUP:OnNext(Fsm, Event, From, To, Event) - -
    -
    - -

    StateMachine callback function for a TASK

    - -

    Parameters

    - -
    -
    -
    -
    - - - -TASK_PICKUP.TaskScheduler - -
    -
    - - - -
    -
    -
    -
    - - -TASK_PICKUP:_Schedule() - -
    -
    - - - -
    -
    -
    -
    - - -TASK_PICKUP:_Scheduler() - -
    -
    - - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Unit.html b/docs/Documentation/Unit.html deleted file mode 100644 index 867b1f29a..000000000 --- a/docs/Documentation/Unit.html +++ /dev/null @@ -1,1623 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Unit

    - -

    Wrapper - UNIT is a wrapper class for the DCS Class Unit.

    - - - -
    - -

    The #UNIT class is a wrapper class to handle the DCS Unit objects:

    - -
      -
    • Support all DCS Unit APIs.
    • -
    • Enhance with Unit specific APIs not in the DCS Unit API set.
    • -
    • Handle local Unit Controller.
    • -
    • Manage the "state" of the DCS Unit.
    • -
    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - -
    UNIT -

    UNIT class, extends Controllable#CONTROLLABLE

    - -

    For each DCS Unit object alive within a running mission, a UNIT wrapper object (instance) will be created within the _DATABASE object.

    -
    -

    Type UNIT

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    UNIT:Destroy() -

    Destroys the UNIT.

    -
    UNIT:Find(DCSUnit) -

    Finds a UNIT from the _DATABASE using a DCSUnit object.

    -
    UNIT:FindByName(UnitName) -

    Find a UNIT in the _DATABASE using the name of an existing DCS Unit.

    -
    UNIT:GetAmmo() -

    Returns the Unit's ammunition.

    -
    UNIT:GetCallsign() -

    Returns the Unit's callsign - the localized string.

    -
    UNIT:GetCategoryName() -

    Returns the category name of the #UNIT.

    -
    UNIT:GetDCSObject() - -
    UNIT:GetFuel() -

    Returns relative amount of fuel (from 0.0 to 1.0) the UNIT has in its internal tanks.

    -
    UNIT:GetGroup() -

    Returns the unit's group if it exist and nil otherwise.

    -
    UNIT:GetLife() -

    Returns the unit's health.

    -
    UNIT:GetLife0() -

    Returns the Unit's initial health.

    -
    UNIT:GetNumber() -

    Returns the unit's number in the group.

    -
    UNIT:GetPlayerName() -

    Returns name of the player that control the unit or nil if the unit is controlled by A.I.

    -
    UNIT:GetPrefix() -

    Returns the prefix name of the DCS Unit.

    -
    UNIT:GetRadar() -

    Returns two values:

    - -
      -
    • First value indicates if at least one of the unit's radar(s) is on.
    • -
    -
    UNIT:GetSensors() -

    Returns the unit sensors.

    -
    UNIT:GetThreatLevel() -

    Returns the Unit's A2G threat level on a scale from 1 to 10 ...

    -
    UNIT:GetUnits() -

    Returns the UNIT in a UNIT list of one element.

    -
    UNIT:HandleEvent(Event, EventFunction) -

    Subscribe to a DCS Event.

    -
    UNIT:HasSEAD() -

    Returns if the unit is SEADable.

    -
    UNIT:HasSensors(...) -

    Returns if the unit has sensors of a certain type.

    -
    UNIT:InAir() -

    Returns true if the UNIT is in the air.

    -
    UNIT:IsActive() -

    Returns if the unit is activated.

    -
    UNIT:IsAir() -

    Returns if the unit is of an air category.

    -
    UNIT:IsAlive() -

    Returns if the Unit is alive.

    -
    UNIT:IsDetected(TargetUnit) -

    Returns if a unit is detecting the TargetUnit.

    -
    UNIT:IsFriendly(FriendlyCoalition) -

    Returns if the unit is a friendly unit.

    -
    UNIT:IsGround() -

    Returns if the unit is of an ground category.

    -
    UNIT:IsInZone(Zone) -

    Returns true if the unit is within a Zone.

    -
    UNIT:IsLOS(TargetUnit) -

    Returns if a unit has Line of Sight (LOS) with the TargetUnit.

    -
    UNIT:IsNotInZone(Zone) -

    Returns true if the unit is not within a Zone.

    -
    UNIT:IsShip() -

    Returns if the unit is of a ship category.

    -
    UNIT:Name() -

    Return the name of the UNIT.

    -
    UNIT:OtherUnitInRadius(AwaitUnit, Radius) -

    Returns true if there is an other DCS Unit within a radius of the current 2D point of the DCS Unit.

    -
    UNIT:ReSpawn(SpawnVec3, Heading) -

    Respawn the Unit using a (tweaked) template of the parent Group.

    -
    UNIT:Register(UnitName) -

    Create a new UNIT from DCSUnit.

    -
    UNIT:ResetEvents() -

    Reset the subscriptions.

    -
    UNIT:UnHandleEvent(Event) -

    UnSubscribe to a DCS event.

    -
    - -

    Type Unit.SensorType

    - - - - - - - - - - - - - - - - - -
    Unit.SensorType.IRST - -
    Unit.SensorType.OPTIC - -
    Unit.SensorType.RADAR - -
    Unit.SensorType.RWR - -
    - -

    Global(s)

    -
    -
    - - #UNIT - -UNIT - -
    -
    - -

    UNIT class, extends Controllable#CONTROLLABLE

    - -

    For each DCS Unit object alive within a running mission, a UNIT wrapper object (instance) will be created within the _DATABASE object.

    - - -

    This is done at the beginning of the mission (when the mission starts), and dynamically when new DCS Unit objects are spawned (using the SPAWN class).

    - -

    The UNIT class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference -using the DCS Unit or the DCS UnitName.

    - -

    Another thing to know is that UNIT objects do not "contain" the DCS Unit object. -The UNIT methods will reference the DCS Unit object by name when it is needed during API execution. -If the DCS Unit object does not exist or is nil, the UNIT methods will return nil and log an exception in the DCS.log file.

    - -

    The UNIT class provides the following functions to retrieve quickly the relevant UNIT instance:

    - -
      -
    • UNIT.Find(): Find a UNIT instance from the _DATABASE object using a DCS Unit object.
    • -
    • UNIT.FindByName(): Find a UNIT instance from the _DATABASE object using a DCS Unit name.
    • -
    - -

    IMPORTANT: ONE SHOULD NEVER SANATIZE these UNIT OBJECT REFERENCES! (make the UNIT object references nil).

    - -

    DCS UNIT APIs

    - -

    The DCS Unit APIs are used extensively within MOOSE. The UNIT class has for each DCS Unit API a corresponding method. -To be able to distinguish easily in your code the difference between a UNIT API call and a DCS Unit API call, -the first letter of the method is also capitalized. So, by example, the DCS Unit method DCSWrapper.Unit#Unit.getName() -is implemented in the UNIT class as UNIT.GetName().

    - -

    Smoke, Flare Units

    - -

    The UNIT class provides methods to smoke or flare units easily. -The UNIT.SmokeBlue(), UNIT.SmokeGreen(),UNIT.SmokeOrange(), UNIT.SmokeRed(), UNIT.SmokeRed() methods -will smoke the unit in the corresponding color. Note that smoking a unit is done at the current position of the DCS Unit. -When the DCS Unit moves for whatever reason, the smoking will still continue! -The UNIT.FlareGreen(), UNIT.FlareRed(), UNIT.FlareWhite(), UNIT.FlareYellow() -methods will fire off a flare in the air with the corresponding color. Note that a flare is a one-off shot and its effect is of very short duration.

    - -

    Location Position, Point

    - -

    The UNIT class provides methods to obtain the current point or position of the DCS Unit. -The UNIT.GetPointVec2(), UNIT.GetVec3() will obtain the current location of the DCS Unit in a Vec2 (2D) or a point in a Vec3 (3D) vector respectively. -If you want to obtain the complete 3D position including ori�ntation and direction vectors, consult the UNIT.GetPositionVec3() method respectively.

    - -

    Test if alive

    - -

    The UNIT.IsAlive(), UNIT.IsActive() methods determines if the DCS Unit is alive, meaning, it is existing and active.

    - -

    Test for proximity

    - -

    The UNIT class contains methods to test the location or proximity against zones or other objects.

    - -

    Zones range

    - -

    To test whether the Unit is within a zone, use the UNIT.IsInZone() or the UNIT.IsNotInZone() methods. Any zone can be tested on, but the zone must be derived from Zone#ZONE_BASE.

    - -

    Unit range

    - -
      -
    • Test if another DCS Unit is within a given radius of the current DCS Unit, use the UNIT.OtherUnitInRadius() method.
    • -
    - -

    Test Line of Sight

    - -
      -
    • Use the UNIT.IsLOS() method to check if the given unit is within line of sight.
    • -
    - - - -
    -
    -

    Type Unit

    - -

    Type UNIT

    -

    Field(s)

    -
    -
    - - -UNIT:Destroy() - -
    -
    - -

    Destroys the UNIT.

    - -

    Return value

    - -

    #nil: -The DCS Unit is not existing or alive.

    - -
    -
    -
    -
    - - -UNIT:Find(DCSUnit) - -
    -
    - -

    Finds a UNIT from the _DATABASE using a DCSUnit object.

    - -

    Parameter

    - -

    Return value

    - -

    #UNIT: -self

    - -
    -
    -
    -
    - - -UNIT:FindByName(UnitName) - -
    -
    - -

    Find a UNIT in the _DATABASE using the name of an existing DCS Unit.

    - -

    Parameter

    -
      -
    • - -

      #string UnitName : -The Unit Name.

      - -
    • -
    -

    Return value

    - -

    #UNIT: -self

    - -
    -
    -
    -
    - - -UNIT:GetAmmo() - -
    -
    - -

    Returns the Unit's ammunition.

    - -

    Return values

    -
      -
    1. - -

      Dcs.DCSWrapper.Unit#Unit.Ammo:

      - - -
    2. -
    3. - -

      #nil: -The DCS Unit is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -UNIT:GetCallsign() - -
    -
    - -

    Returns the Unit's callsign - the localized string.

    - -

    Return values

    -
      -
    1. - -

      #string: -The Callsign of the Unit.

      - -
    2. -
    3. - -

      #nil: -The DCS Unit is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -UNIT:GetCategoryName() - -
    -
    - -

    Returns the category name of the #UNIT.

    - -

    Return value

    - -

    #string: -Category name = Helicopter, Airplane, Ground Unit, Ship

    - -
    -
    -
    -
    - - -UNIT:GetDCSObject() - -
    -
    - - - -

    Return value

    - -

    Dcs.DCSWrapper.Unit#Unit:

    - - -
    -
    -
    -
    - - -UNIT:GetFuel() - -
    -
    - -

    Returns relative amount of fuel (from 0.0 to 1.0) the UNIT has in its internal tanks.

    - - -

    If there are additional fuel tanks the value may be greater than 1.0.

    - -

    Return values

    -
      -
    1. - -

      #number: -The relative amount of fuel (from 0.0 to 1.0).

      - -
    2. -
    3. - -

      #nil: -The DCS Unit is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -UNIT:GetGroup() - -
    -
    - -

    Returns the unit's group if it exist and nil otherwise.

    - -

    Return values

    -
      -
    1. - -

      Wrapper.Group#GROUP: -The Group of the Unit.

      - -
    2. -
    3. - -

      #nil: -The DCS Unit is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -UNIT:GetLife() - -
    -
    - -

    Returns the unit's health.

    - - -

    Dead units has health <= 1.0.

    - -

    Return values

    -
      -
    1. - -

      #number: -The Unit's health value.

      - -
    2. -
    3. - -

      #nil: -The DCS Unit is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -UNIT:GetLife0() - -
    -
    - -

    Returns the Unit's initial health.

    - -

    Return values

    -
      -
    1. - -

      #number: -The Unit's initial health value.

      - -
    2. -
    3. - -

      #nil: -The DCS Unit is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -UNIT:GetNumber() - -
    -
    - -

    Returns the unit's number in the group.

    - - -

    The number is the same number the unit has in ME. -It may not be changed during the mission. -If any unit in the group is destroyed, the numbers of another units will not be changed.

    - -

    Return values

    -
      -
    1. - -

      #number: -The Unit number.

      - -
    2. -
    3. - -

      #nil: -The DCS Unit is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -UNIT:GetPlayerName() - -
    -
    - -

    Returns name of the player that control the unit or nil if the unit is controlled by A.I.

    - -

    Return values

    -
      -
    1. - -

      #string: -Player Name

      - -
    2. -
    3. - -

      #nil: -The DCS Unit is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -UNIT:GetPrefix() - -
    -
    - -

    Returns the prefix name of the DCS Unit.

    - - -

    A prefix name is a part of the name before a '#'-sign. -DCS Units spawned with the SPAWN class contain a '#'-sign to indicate the end of the (base) DCS Unit name. -The spawn sequence number and unit number are contained within the name after the '#' sign.

    - -

    Return values

    -
      -
    1. - -

      #string: -The name of the DCS Unit.

      - -
    2. -
    3. - -

      #nil: -The DCS Unit is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -UNIT:GetRadar() - -
    -
    - -

    Returns two values:

    - -
      -
    • First value indicates if at least one of the unit's radar(s) is on.
    • -
    - - -
      -
    • Second value is the object of the radar's interest. Not nil only if at least one radar of the unit is tracking a target.
    • -
    - -

    Return values

    -
      -
    1. - -

      #boolean: - Indicates if at least one of the unit's radar(s) is on.

      - -
    2. -
    3. - -

      Dcs.DCSWrapper.Object#Object: -The object of the radar's interest. Not nil only if at least one radar of the unit is tracking a target.

      - -
    4. -
    5. - -

      #nil: -The DCS Unit is not existing or alive.

      - -
    6. -
    -
    -
    -
    -
    - - -UNIT:GetSensors() - -
    -
    - -

    Returns the unit sensors.

    - -

    Return values

    -
      -
    1. - -

      Dcs.DCSWrapper.Unit#Unit.Sensors:

      - - -
    2. -
    3. - -

      #nil: -The DCS Unit is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -UNIT:GetThreatLevel() - -
    -
    - -

    Returns the Unit's A2G threat level on a scale from 1 to 10 ...

    - - -

    The following threat levels are foreseen:

    - -
      -
    • Threat level 0: Unit is unarmed.
    • -
    • Threat level 1: Unit is infantry.
    • -
    • Threat level 2: Unit is an infantry vehicle.
    • -
    • Threat level 3: Unit is ground artillery.
    • -
    • Threat level 4: Unit is a tank.
    • -
    • Threat level 5: Unit is a modern tank or ifv with ATGM.
    • -
    • Threat level 6: Unit is a AAA.
    • -
    • Threat level 7: Unit is a SAM or manpad, IR guided.
    • -
    • Threat level 8: Unit is a Short Range SAM, radar guided.
    • -
    • Threat level 9: Unit is a Medium Range SAM, radar guided.
    • -
    • Threat level 10: Unit is a Long Range SAM, radar guided.
    • -
    - -
    -
    -
    -
    - - -UNIT:GetUnits() - -
    -
    - -

    Returns the UNIT in a UNIT list of one element.

    - -

    Return value

    - -

    #list: -Wrapper.Unit#UNIT> The UNITs wrappers.

    - -
    -
    -
    -
    - - -UNIT:HandleEvent(Event, EventFunction) - -
    -
    - -

    Subscribe to a DCS Event.

    - -

    Parameters

    -
      -
    • - -

      Core.Event#EVENTS Event :

      - -
    • -
    • - -

      #function EventFunction : -(optional) The function to be called when the event occurs for the unit.

      - -
    • -
    -

    Return value

    - -

    #UNIT:

    - - -
    -
    -
    -
    - - -UNIT:HasSEAD() - -
    -
    - -

    Returns if the unit is SEADable.

    - -

    Return values

    -
      -
    1. - -

      #boolean: -returns true if the unit is SEADable.

      - -
    2. -
    3. - -

      #nil: -The DCS Unit is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -UNIT:HasSensors(...) - -
    -
    - -

    Returns if the unit has sensors of a certain type.

    - -

    Parameter

    -
      -
    • - -

      ... :

      - -
    • -
    -

    Return values

    -
      -
    1. - -

      #boolean: -returns true if the unit has specified types of sensors. This function is more preferable than Unit.getSensors() if you don't want to get information about all the unit's sensors, and just want to check if the unit has specified types of sensors.

      - -
    2. -
    3. - -

      #nil: -The DCS Unit is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -UNIT:InAir() - -
    -
    - -

    Returns true if the UNIT is in the air.

    - -

    Return values

    -
      -
    1. - -

      #boolean: -true if in the air.

      - -
    2. -
    3. - -

      #nil: -The UNIT is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -UNIT:IsActive() - -
    -
    - -

    Returns if the unit is activated.

    - -

    Return values

    -
      -
    1. - -

      #boolean: -true if Unit is activated.

      - -
    2. -
    3. - -

      #nil: -The DCS Unit is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -UNIT:IsAir() - -
    -
    - -

    Returns if the unit is of an air category.

    - - -

    If the unit is a helicopter or a plane, then this method will return true, otherwise false.

    - -

    Return value

    - -

    #boolean: -Air category evaluation result.

    - -
    -
    -
    -
    - - -UNIT:IsAlive() - -
    -
    - -

    Returns if the Unit is alive.

    - - -

    If the Unit is not alive, nil is returned.
    -If the Unit is alive and active, true is returned.
    -If the Unit is alive but not active, false is returned.

    - -

    Return values

    -
      -
    1. - -

      #boolean: -true if Unit is alive and active.

      - -
    2. -
    3. - -

      #boolean: -false if Unit is alive but not active.

      - -
    4. -
    5. - -

      #nil: -if the Unit is not existing or is not alive.

      - -
    6. -
    -
    -
    -
    -
    - - -UNIT:IsDetected(TargetUnit) - -
    -
    - -

    Returns if a unit is detecting the TargetUnit.

    - -

    Parameter

    -
      -
    • - -

      #UNIT TargetUnit :

      - -
    • -
    -

    Return value

    - -

    #boolean: -true If the TargetUnit is detected by the unit, otherwise false.

    - -
    -
    -
    -
    - - -UNIT:IsFriendly(FriendlyCoalition) - -
    -
    - -

    Returns if the unit is a friendly unit.

    - -

    Parameter

    -
      -
    • - -

      FriendlyCoalition :

      - -
    • -
    -

    Return value

    - -

    #boolean: -IsFriendly evaluation result.

    - -
    -
    -
    -
    - - -UNIT:IsGround() - -
    -
    - -

    Returns if the unit is of an ground category.

    - - -

    If the unit is a ground vehicle or infantry, this method will return true, otherwise false.

    - -

    Return value

    - -

    #boolean: -Ground category evaluation result.

    - -
    -
    -
    -
    - - -UNIT:IsInZone(Zone) - -
    -
    - -

    Returns true if the unit is within a Zone.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean: -Returns true if the unit is within the Zone#ZONE_BASE

    - -
    -
    -
    -
    - - -UNIT:IsLOS(TargetUnit) - -
    -
    - -

    Returns if a unit has Line of Sight (LOS) with the TargetUnit.

    - -

    Parameter

    -
      -
    • - -

      #UNIT TargetUnit :

      - -
    • -
    -

    Return value

    - -

    #boolean: -true If the TargetUnit has LOS with the unit, otherwise false.

    - -
    -
    -
    -
    - - -UNIT:IsNotInZone(Zone) - -
    -
    - -

    Returns true if the unit is not within a Zone.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean: -Returns true if the unit is not within the Zone#ZONE_BASE

    - -
    -
    -
    -
    - - -UNIT:IsShip() - -
    -
    - -

    Returns if the unit is of a ship category.

    - - -

    If the unit is a ship, this method will return true, otherwise false.

    - -

    Return value

    - -

    #boolean: -Ship category evaluation result.

    - -
    -
    -
    -
    - - -UNIT:Name() - -
    -
    - -

    Return the name of the UNIT.

    - -

    Return value

    - -

    #string: -The UNIT name.

    - -
    -
    -
    -
    - - -UNIT:OtherUnitInRadius(AwaitUnit, Radius) - -
    -
    - -

    Returns true if there is an other DCS Unit within a radius of the current 2D point of the DCS Unit.

    - -

    Parameters

    -
      -
    • - -

      #UNIT AwaitUnit : -The other UNIT wrapper object.

      - -
    • -
    • - -

      Radius : -The radius in meters with the DCS Unit in the centre.

      - -
    • -
    -

    Return values

    -
      -
    1. - - -

      true If the other DCS Unit is within the radius of the 2D point of the DCS Unit.

      - -
    2. -
    3. - -

      #nil: -The DCS Unit is not existing or alive.

      - -
    4. -
    -
    -
    -
    -
    - - -UNIT:ReSpawn(SpawnVec3, Heading) - -
    -
    - -

    Respawn the Unit using a (tweaked) template of the parent Group.

    - - - -

    This function will:

    - -
      -
    • Get the current position and heading of the group.
    • -
    • When the unit is alive, it will tweak the template x, y and heading coordinates of the group and the embedded units to the current units positions.
    • -
    • Then it will respawn the re-modelled group. -
    • -
    - -

    Parameters

    -
      -
    • - -

      Dcs.DCSTypes#Vec3 SpawnVec3 : -The position where to Spawn the new Unit at.

      - -
    • -
    • - -

      #number Heading : -The heading of the unit respawn.

      - -
    • -
    -
    -
    -
    -
    - - -UNIT:Register(UnitName) - -
    -
    - -

    Create a new UNIT from DCSUnit.

    - -

    Parameter

    -
      -
    • - -

      #string UnitName : -The name of the DCS unit.

      - -
    • -
    -

    Return value

    - -

    #UNIT:

    - - -
    -
    -
    -
    - - -UNIT:ResetEvents() - -
    -
    - -

    Reset the subscriptions.

    - -

    Return value

    - -

    #UNIT:

    - - -
    -
    -
    -
    - - -UNIT:UnHandleEvent(Event) - -
    -
    - -

    UnSubscribe to a DCS event.

    - -

    Parameter

    - -

    Return value

    - -

    #UNIT:

    - - -
    -
    - -

    Type Unit.SensorType

    - -

    Unit.SensorType

    - -

    Field(s)

    -
    -
    - - -Unit.SensorType.IRST - -
    -
    - - - -
    -
    -
    -
    - - -Unit.SensorType.OPTIC - -
    -
    - - - -
    -
    -
    -
    - - -Unit.SensorType.RADAR - -
    -
    - - - -
    -
    -
    -
    - - -Unit.SensorType.RWR - -
    -
    - - - -
    -
    - -

    Type list

    - -
    - -
    - - diff --git a/docs/Documentation/UserFlag.html b/docs/Documentation/UserFlag.html deleted file mode 100644 index 15d1f7e91..000000000 --- a/docs/Documentation/UserFlag.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module UserFlag

    - -

    Core (WIP) -- Manage user flags.

    - - - -
    - -

    Management of DCS User Flags.

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -
    - - -

    Global(s)

    - - - - - -
    USERFLAG -

    USERFLAG class, extends Base#BASE

    - -

    Management of DCS User Flags.

    -
    -

    Type USERFLAG

    - - - - - - - - - - - - - - - - - - - - - -
    USERFLAG:Get(Number) -

    Get the userflag Number.

    -
    USERFLAG:Is(Number) -

    Check if the userflag has a value of Number.

    -
    USERFLAG:New(UserFlagName) -

    USERFLAG Constructor.

    -
    USERFLAG:Set(Number) -

    Set the userflag to a given Number.

    -
    USERFLAG.UserFlagName - -
    - -

    Global(s)

    -
    -
    - - #USERFLAG - -USERFLAG - -
    -
    - -

    USERFLAG class, extends Base#BASE

    - -

    Management of DCS User Flags.

    - - - -

    1. USERFLAG constructor

    - - - - -
    -
    -

    Type UserFlag

    - -

    Type USERFLAG

    -

    Field(s)

    -
    -
    - - -USERFLAG:Get(Number) - -
    -
    - -

    Get the userflag Number.

    - -

    Parameter

    -
      -
    • - -

      Number :

      - -
    • -
    -

    Return value

    - -

    #number: -Number The number value to be checked if it is the same as the userflag.

    - -

    Usage:

    -
      local BlueVictory = USERFLAG:New( "VictoryBlue" )
    -  local BlueVictoryValue = BlueVictory:Get() -- Get the UserFlag VictoryBlue value.
    -  
    - -
    -
    -
    -
    - - -USERFLAG:Is(Number) - -
    -
    - -

    Check if the userflag has a value of Number.

    - -

    Parameter

    -
      -
    • - -

      #number Number : -The number value to be checked if it is the same as the userflag.

      - -
    • -
    -

    Return value

    - -

    #boolean: -true if the Number is the value of the userflag.

    - -

    Usage:

    -
      local BlueVictory = USERFLAG:New( "VictoryBlue" )
    -  if BlueVictory:Is( 1 ) then
    -    return "Blue has won"
    -  end
    - -
    -
    -
    -
    - - -USERFLAG:New(UserFlagName) - -
    -
    - -

    USERFLAG Constructor.

    - -

    Parameter

    -
      -
    • - -

      #string UserFlagName : -The name of the userflag, which is a free text string.

      - -
    • -
    -

    Return value

    - -

    #USERFLAG:

    - - -
    -
    -
    -
    - - -USERFLAG:Set(Number) - -
    -
    - -

    Set the userflag to a given Number.

    - -

    Parameter

    -
      -
    • - -

      #number Number : -The number value to be checked if it is the same as the userflag.

      - -
    • -
    -

    Return value

    - -

    #USERFLAG: -The userflag instance.

    - -

    Usage:

    -
      local BlueVictory = USERFLAG:New( "VictoryBlue" )
    -  BlueVictory:Set( 100 ) -- Set the UserFlag VictoryBlue to 100.
    -  
    - -
    -
    -
    -
    - - - -USERFLAG.UserFlagName - -
    -
    - - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/UserSound.html b/docs/Documentation/UserSound.html deleted file mode 100644 index 853080b6b..000000000 --- a/docs/Documentation/UserSound.html +++ /dev/null @@ -1,419 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module UserSound

    - -

    Core (WIP) -- Manage user sound.

    - - - -
    - -

    Management of DCS User Sound.

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -
    - - -

    Global(s)

    - - - - - -
    USERSOUND -

    USERSOUND class, extends Base#BASE

    - -

    Management of DCS User Sound.

    -
    -

    Type USERSOUND

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    USERSOUND:New(UserSoundFileName) -

    USERSOUND Constructor.

    -
    USERSOUND:SetFileName(UserSoundFileName) -

    Set usersound filename.

    -
    USERSOUND:ToAll() -

    Play the usersound to all players.

    -
    USERSOUND:ToCoalition(Coalition) -

    Play the usersound to the given coalition.

    -
    USERSOUND:ToCountry(Country) -

    Play the usersound to the given country.

    -
    USERSOUND:ToGroup(Group) -

    Play the usersound to the given Group.

    -
    USERSOUND.UserSoundFileName - -
    - -

    Global(s)

    -
    -
    - - #USERSOUND - -USERSOUND - -
    -
    - -

    USERSOUND class, extends Base#BASE

    - -

    Management of DCS User Sound.

    - - - -

    1. USERSOUND constructor

    - - - - -
    -
    -

    Type UserSound

    - -

    Type USERSOUND

    -

    Field(s)

    -
    -
    - - -USERSOUND:New(UserSoundFileName) - -
    -
    - -

    USERSOUND Constructor.

    - -

    Parameter

    -
      -
    • - -

      #string UserSoundFileName : -The filename of the usersound.

      - -
    • -
    -

    Return value

    - -

    #USERSOUND:

    - - -
    -
    -
    -
    - - -USERSOUND:SetFileName(UserSoundFileName) - -
    -
    - -

    Set usersound filename.

    - -

    Parameter

    -
      -
    • - -

      #string UserSoundFileName : -The filename of the usersound.

      - -
    • -
    -

    Return value

    - -

    #USERSOUND: -The usersound instance.

    - -

    Usage:

    -
      local BlueVictory = USERSOUND:New( "BlueVictory.ogg" )
    -  BlueVictory:SetFileName( "BlueVictoryLoud.ogg" ) -- Set the BlueVictory to change the file name to play a louder sound.
    -  
    - -
    -
    -
    -
    - - -USERSOUND:ToAll() - -
    -
    - -

    Play the usersound to all players.

    - -

    Return value

    - -

    #USERSOUND: -The usersound instance.

    - -

    Usage:

    -
      local BlueVictory = USERSOUND:New( "BlueVictory.ogg" )
    -  BlueVictory:ToAll() -- Play the sound that Blue has won.
    -  
    - -
    -
    -
    -
    - - -USERSOUND:ToCoalition(Coalition) - -
    -
    - -

    Play the usersound to the given coalition.

    - -

    Parameter

    - -

    Return value

    - -

    #USERSOUND: -The usersound instance.

    - -

    Usage:

    -
      local BlueVictory = USERSOUND:New( "BlueVictory.ogg" )
    -  BlueVictory:ToCoalition( coalition.side.BLUE ) -- Play the sound that Blue has won to the blue coalition.
    -  
    - -
    -
    -
    -
    - - -USERSOUND:ToCountry(Country) - -
    -
    - -

    Play the usersound to the given country.

    - -

    Parameter

    - -

    Return value

    - -

    #USERSOUND: -The usersound instance.

    - -

    Usage:

    -
      local BlueVictory = USERSOUND:New( "BlueVictory.ogg" )
    -  BlueVictory:ToCountry( country.id.USA ) -- Play the sound that Blue has won to the USA country.
    -  
    - -
    -
    -
    -
    - - -USERSOUND:ToGroup(Group) - -
    -
    - -

    Play the usersound to the given Group.

    - -

    Parameter

    - -

    Return value

    - -

    #USERSOUND: -The usersound instance.

    - -

    Usage:

    -
      local BlueVictory = USERSOUND:New( "BlueVictory.ogg" )
    -  local PlayerGroup = GROUP:FindByName( "PlayerGroup" ) -- Search for the active group named "PlayerGroup", that contains a human player.
    -  BlueVictory:ToGroup( PlayerGroup ) -- Play the sound that Blue has won to the player group.
    -  
    - -
    -
    -
    -
    - - - -USERSOUND.UserSoundFileName - -
    -
    - - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Utils.html b/docs/Documentation/Utils.html deleted file mode 100644 index 8b4a74daa..000000000 --- a/docs/Documentation/Utils.html +++ /dev/null @@ -1,1243 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Utils

    - -

    This module contains derived utilities taken from the MIST framework, -which are excellent tools to be reused in an OO environment!.

    - - - -

    Authors:

    - -
      -
    • Grimes : Design & Programming of the MIST framework.
    • -
    - -

    Contributions:

    - -
      -
    • FlightControl : Rework to OO framework
    • -
    - - -

    Global(s)

    - - - - - - - - - - - - - - - - - -
    FLARECOLOR - -
    SMOKECOLOR - -
    UTILS - -
    lookup_table - -
    -

    Type FLARECOLOR

    - - - - - - - - - - - - - - - - - -
    FLARECOLOR.Green - -
    FLARECOLOR.Red - -
    FLARECOLOR.White - -
    FLARECOLOR.Yellow - -
    - -

    Type SMOKECOLOR

    - - - - - - - - - - - - - - - - - - - - - -
    SMOKECOLOR.Blue - -
    SMOKECOLOR.Green - -
    SMOKECOLOR.Orange - -
    SMOKECOLOR.Red - -
    SMOKECOLOR.White - -
    - -

    Type UTILS

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    UTILS.BasicSerialize(s) - -
    UTILS.DeepCopy(object) - -
    UTILS.DoString(s) - -
    UTILS.FeetToMeters(feet) - -
    UTILS.GetMarkID() - -
    UTILS.IsInRadius(InVec2, Vec2, Radius) - -
    UTILS.IsInSphere(InVec3, Vec3, Radius) - -
    UTILS.IsInstanceOf(object, className) -

    Function to infer instance of an object

    - -

    Examples:

    - -
      -
    • UTILS.IsInstanceOf( 'some text', 'string' ) will return true

    • -
    • UTILS.IsInstanceOf( some_function, 'function' ) will return true

    • -
    • UTILS.IsInstanceOf( 10, 'number' ) will return true

    • -
    • UTILS.IsInstanceOf( false, 'boolean' ) will return true

    • -
    • UTILS.IsInstanceOf( nil, 'nil' ) will return true

    • -
    • UTILS.IsInstanceOf( ZONE:New( 'some zone', ZONE ) will return true

    • -
    • UTILS.IsInstanceOf( ZONE:New( 'some zone', 'ZONE' ) will return true

    • -
    • UTILS.IsInstanceOf( ZONE:New( 'some zone', 'zone' ) will return true

    • -
    • UTILS.IsInstanceOf( ZONE:New( 'some zone', 'BASE' ) will return true

    • -
    • UTILS.IsInstanceOf( ZONE:New( 'some zone', 'GROUP' ) will return false

    • -
    - - -
    UTILS.KmphToMps(kmph) - -
    UTILS.KnotsToKmph(knots) - -
    UTILS.KnotsToMps(knots) - -
    UTILS.MetersToFeet(meters) - -
    UTILS.MetersToNM(meters) - -
    UTILS.MiphToMps(miph) - -
    UTILS.MpsToKmph(mps) - -
    UTILS.MpsToKnots(mps) - -
    UTILS.MpsToMiph(mps) - -
    UTILS.NMToMeters(NM) - -
    UTILS.OneLineSerialize(tbl) - -
    UTILS.Round(num, idp) -

    From http://lua-users.org/wiki/SimpleRound -use negative idp for rounding ahead of decimal place, positive for rounding after decimal place

    -
    UTILS.ToDegree(angle) - -
    UTILS.ToRadian(angle) - -
    UTILS._MarkID - -
    UTILS.spairs(t, order) - -
    UTILS.tostringLL(lat, lon, acc, DMS) - -
    UTILS.tostringMGRS(MGRS, acc) - -
    - -

    Global(s)

    -
    -
    - - #FLARECOLOR - -FLARECOLOR - -
    -
    - - - -
    -
    -
    -
    - - #SMOKECOLOR - -SMOKECOLOR - -
    -
    - - - -
    -
    -
    -
    - - #UTILS - -UTILS - -
    -
    - - - -
    -
    -
    -
    - - - -lookup_table - -
    -
    - - - -
    -
    -

    Type Utils

    - -

    Type FLARECOLOR

    -

    Field(s)

    -
    -
    - - -FLARECOLOR.Green - -
    -
    - - - -
    -
    -
    -
    - - -FLARECOLOR.Red - -
    -
    - - - -
    -
    -
    -
    - - -FLARECOLOR.White - -
    -
    - - - -
    -
    -
    -
    - - -FLARECOLOR.Yellow - -
    -
    - - - -
    -
    - -

    Type SMOKECOLOR

    -

    Field(s)

    -
    -
    - - -SMOKECOLOR.Blue - -
    -
    - - - -
    -
    -
    -
    - - -SMOKECOLOR.Green - -
    -
    - - - -
    -
    -
    -
    - - -SMOKECOLOR.Orange - -
    -
    - - - -
    -
    -
    -
    - - -SMOKECOLOR.Red - -
    -
    - - - -
    -
    -
    -
    - - -SMOKECOLOR.White - -
    -
    - - - -
    -
    - -

    Type UTILS

    - -

    Utilities static class.

    - -

    Field(s)

    -
    -
    - - -UTILS.BasicSerialize(s) - -
    -
    - - - - -

    porting in Slmod's "safestring" basic serialize

    - -

    Parameter

    -
      -
    • - -

      s :

      - -
    • -
    -
    -
    -
    -
    - - -UTILS.DeepCopy(object) - -
    -
    - - - - -

    from http://lua-users.org/wiki/CopyTable

    - -

    Parameter

    -
      -
    • - -

      object :

      - -
    • -
    -
    -
    -
    -
    - - -UTILS.DoString(s) - -
    -
    - - - - -

    porting in Slmod's dostring

    - -

    Parameter

    -
      -
    • - -

      s :

      - -
    • -
    -
    -
    -
    -
    - - -UTILS.FeetToMeters(feet) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      feet :

      - -
    • -
    -
    -
    -
    -
    - - -UTILS.GetMarkID() - -
    -
    - - - - -

    get a new mark ID for markings

    - -
    -
    -
    -
    - - -UTILS.IsInRadius(InVec2, Vec2, Radius) - -
    -
    - - - - -

    Test if a Vec2 is in a radius of another Vec2

    - -

    Parameters

    -
      -
    • - -

      InVec2 :

      - -
    • -
    • - -

      Vec2 :

      - -
    • -
    • - -

      Radius :

      - -
    • -
    -
    -
    -
    -
    - - -UTILS.IsInSphere(InVec3, Vec3, Radius) - -
    -
    - - - - -

    Test if a Vec3 is in the sphere of another Vec3

    - -

    Parameters

    -
      -
    • - -

      InVec3 :

      - -
    • -
    • - -

      Vec3 :

      - -
    • -
    • - -

      Radius :

      - -
    • -
    -
    -
    -
    -
    - - -UTILS.IsInstanceOf(object, className) - -
    -
    - -

    Function to infer instance of an object

    - -

    Examples:

    - -
      -
    • UTILS.IsInstanceOf( 'some text', 'string' ) will return true

    • -
    • UTILS.IsInstanceOf( some_function, 'function' ) will return true

    • -
    • UTILS.IsInstanceOf( 10, 'number' ) will return true

    • -
    • UTILS.IsInstanceOf( false, 'boolean' ) will return true

    • -
    • UTILS.IsInstanceOf( nil, 'nil' ) will return true

    • -
    • UTILS.IsInstanceOf( ZONE:New( 'some zone', ZONE ) will return true

    • -
    • UTILS.IsInstanceOf( ZONE:New( 'some zone', 'ZONE' ) will return true

    • -
    • UTILS.IsInstanceOf( ZONE:New( 'some zone', 'zone' ) will return true

    • -
    • UTILS.IsInstanceOf( ZONE:New( 'some zone', 'BASE' ) will return true

    • -
    • UTILS.IsInstanceOf( ZONE:New( 'some zone', 'GROUP' ) will return false

    • -
    - - - -

    Parameters

    -
      -
    • - -

      object : -is the object to be evaluated

      - -
    • -
    • - -

      className : -is the name of the class to evaluate (can be either a string or a Moose class)

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -UTILS.KmphToMps(kmph) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      kmph :

      - -
    • -
    -
    -
    -
    -
    - - -UTILS.KnotsToKmph(knots) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      knots :

      - -
    • -
    -
    -
    -
    -
    - - -UTILS.KnotsToMps(knots) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      knots :

      - -
    • -
    -
    -
    -
    -
    - - -UTILS.MetersToFeet(meters) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      meters :

      - -
    • -
    -
    -
    -
    -
    - - -UTILS.MetersToNM(meters) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      meters :

      - -
    • -
    -
    -
    -
    -
    - - -UTILS.MiphToMps(miph) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      miph :

      - -
    • -
    -
    -
    -
    -
    - - -UTILS.MpsToKmph(mps) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      mps :

      - -
    • -
    -
    -
    -
    -
    - - -UTILS.MpsToKnots(mps) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      mps :

      - -
    • -
    -
    -
    -
    -
    - - -UTILS.MpsToMiph(mps) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      mps :

      - -
    • -
    -
    -
    -
    -
    - - -UTILS.NMToMeters(NM) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      NM :

      - -
    • -
    -
    -
    -
    -
    - - -UTILS.OneLineSerialize(tbl) - -
    -
    - - - - -

    porting in Slmod's serialize_slmod2

    - -

    Parameter

    -
      -
    • - -

      tbl :

      - -
    • -
    -
    -
    -
    -
    - - -UTILS.Round(num, idp) - -
    -
    - -

    From http://lua-users.org/wiki/SimpleRound -use negative idp for rounding ahead of decimal place, positive for rounding after decimal place

    - -

    Parameters

    -
      -
    • - -

      num :

      - -
    • -
    • - -

      idp :

      - -
    • -
    -
    -
    -
    -
    - - -UTILS.ToDegree(angle) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      angle :

      - -
    • -
    -
    -
    -
    -
    - - -UTILS.ToRadian(angle) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      angle :

      - -
    • -
    -
    -
    -
    -
    - - #number - -UTILS._MarkID - -
    -
    - - - -
    -
    -
    -
    - - -UTILS.spairs(t, order) - -
    -
    - - - - -

    Here is a customized version of pairs, which I called spairs because it iterates over the table in a sorted order.

    - -

    Parameters

    -
      -
    • - -

      t :

      - -
    • -
    • - -

      order :

      - -
    • -
    -
    -
    -
    -
    - - -UTILS.tostringLL(lat, lon, acc, DMS) - -
    -
    - - - - -

    acc: -in DM: decimal point of minutes. -In DMS: decimal point of seconds. -position after the decimal of the least significant digit: -So: -42.32 - acc of 2.

    - - -

    Parameters

    -
      -
    • - -

      lat :

      - -
    • -
    • - -

      lon :

      - -
    • -
    • - -

      acc :

      - -
    • -
    • - -

      DMS :

      - -
    • -
    -
    -
    -
    -
    - - -UTILS.tostringMGRS(MGRS, acc) - -
    -
    - - - - -

    acc- the accuracy of each easting/northing. 0, 1, 2, 3, 4, or 5.

    - -

    Parameters

    -
      -
    • - -

      MGRS :

      - -
    • -
    • - -

      acc :

      - -
    • -
    -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Velocity.html b/docs/Documentation/Velocity.html deleted file mode 100644 index 2db4efb84..000000000 --- a/docs/Documentation/Velocity.html +++ /dev/null @@ -1,688 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Velocity

    - -

    Core -- VELOCITY models a speed, which can be expressed in various formats according the Settings.

    - - - -
    - -

    Author: Sven Van de Velde (FlightControl)

    -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - - - - - -
    VELOCITY -

    VELOCITY class, extends Base#BASE

    - -

    VELOCITY models a speed, which can be expressed in various formats according the Settings.

    -
    VELOCITY_POSITIONABLE -

    VELOCITY_POSITIONABLE class, extends Base#BASE

    - -

    VELOCITY_POSITIONABLE monitors the speed of an Positionable in the simulation, which can be expressed in various formats according the Settings.

    -
    -

    Type VELOCITY

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    VELOCITY:Get() -

    Get the velocity in Mps (meters per second).

    -
    VELOCITY:GetKmph() -

    Get the velocity in Kmph (kilometers per hour).

    -
    VELOCITY:GetMiph() -

    Get the velocity in Miph (miles per hour).

    -
    VELOCITY:GetText(Settings) -

    Get the velocity in text, according the player Settings.

    -
    VELOCITY:New(VelocityMps) -

    VELOCITY Constructor.

    -
    VELOCITY:Set(VelocityMps) -

    Set the velocity in Mps (meters per second).

    -
    VELOCITY:SetKmph(VelocityKmph) -

    Set the velocity in Kmph (kilometers per hour).

    -
    VELOCITY:SetMiph(VelocityMiph) -

    Set the velocity in Miph (miles per hour).

    -
    VELOCITY:ToString(Controllable, Settings, VelocityGroup) -

    Get the velocity in text, according the player or default Settings.

    -
    VELOCITY.Velocity - -
    - -

    Type VELOCITY_POSITIONABLE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    VELOCITY_POSITIONABLE:Get() -

    Get the velocity in Mps (meters per second).

    -
    VELOCITY_POSITIONABLE:GetKmph() -

    Get the velocity in Kmph (kilometers per hour).

    -
    VELOCITY_POSITIONABLE:GetMiph() -

    Get the velocity in Miph (miles per hour).

    -
    VELOCITY_POSITIONABLE:New(Positionable) -

    VELOCITY_POSITIONABLE Constructor.

    -
    VELOCITY_POSITIONABLE.Positionable - -
    VELOCITY_POSITIONABLE:ToString() -

    Get the velocity in text, according the player or default Settings.

    -
    VELOCITY_POSITIONABLE.Velocity - -
    - -

    Global(s)

    -
    -
    - - #VELOCITY - -VELOCITY - -
    -
    - -

    VELOCITY class, extends Base#BASE

    - -

    VELOCITY models a speed, which can be expressed in various formats according the Settings.

    - - - -

    1. VELOCITY constructor

    - - - - -
    -
    -
    -
    - - #VELOCITY_POSITIONABLE - -VELOCITY_POSITIONABLE - -
    -
    - -

    VELOCITY_POSITIONABLE class, extends Base#BASE

    - -

    VELOCITY_POSITIONABLE monitors the speed of an Positionable in the simulation, which can be expressed in various formats according the Settings.

    - - - -

    1. VELOCITY_POSITIONABLE constructor

    - - - - -
    -
    -

    Type Velocity

    - -

    Type VELOCITY

    -

    Field(s)

    -
    -
    - - -VELOCITY:Get() - -
    -
    - -

    Get the velocity in Mps (meters per second).

    - -

    Return value

    - -

    #number: -The velocity in meters per second.

    - -
    -
    -
    -
    - - -VELOCITY:GetKmph() - -
    -
    - -

    Get the velocity in Kmph (kilometers per hour).

    - -

    Return value

    - -

    #number: -The velocity in kilometers per hour.

    - -
    -
    -
    -
    - - -VELOCITY:GetMiph() - -
    -
    - -

    Get the velocity in Miph (miles per hour).

    - -

    Return value

    - -

    #number: -The velocity in miles per hour.

    - -
    -
    -
    -
    - - -VELOCITY:GetText(Settings) - -
    -
    - -

    Get the velocity in text, according the player Settings.

    - -

    Parameter

    - -

    Return value

    - -

    #string: -The velocity in text.

    - -
    -
    -
    -
    - - -VELOCITY:New(VelocityMps) - -
    -
    - -

    VELOCITY Constructor.

    - -

    Parameter

    -
      -
    • - -

      #number VelocityMps : -The velocity in meters per second.

      - -
    • -
    -

    Return value

    - -

    #VELOCITY:

    - - -
    -
    -
    -
    - - -VELOCITY:Set(VelocityMps) - -
    -
    - -

    Set the velocity in Mps (meters per second).

    - -

    Parameter

    -
      -
    • - -

      #number VelocityMps : -The velocity in meters per second.

      - -
    • -
    -

    Return value

    - -

    #VELOCITY:

    - - -
    -
    -
    -
    - - -VELOCITY:SetKmph(VelocityKmph) - -
    -
    - -

    Set the velocity in Kmph (kilometers per hour).

    - -

    Parameter

    -
      -
    • - -

      #number VelocityKmph : -The velocity in kilometers per hour.

      - -
    • -
    -

    Return value

    - -

    #VELOCITY:

    - - -
    -
    -
    -
    - - -VELOCITY:SetMiph(VelocityMiph) - -
    -
    - -

    Set the velocity in Miph (miles per hour).

    - -

    Parameter

    -
      -
    • - -

      #number VelocityMiph : -The velocity in miles per hour.

      - -
    • -
    -

    Return value

    - -

    #VELOCITY:

    - - -
    -
    -
    -
    - - -VELOCITY:ToString(Controllable, Settings, VelocityGroup) - -
    -
    - -

    Get the velocity in text, according the player or default Settings.

    - -

    Parameters

    - -

    Return value

    - -

    #string: -The velocity in text according the player or default Settings

    - -
    -
    -
    -
    - - - -VELOCITY.Velocity - -
    -
    - - - -
    -
    - -

    Type VELOCITY_POSITIONABLE

    -

    Field(s)

    -
    -
    - - -VELOCITY_POSITIONABLE:Get() - -
    -
    - -

    Get the velocity in Mps (meters per second).

    - -

    Return value

    - -

    #number: -The velocity in meters per second.

    - -
    -
    -
    -
    - - -VELOCITY_POSITIONABLE:GetKmph() - -
    -
    - -

    Get the velocity in Kmph (kilometers per hour).

    - -

    Return value

    - -

    #number: -The velocity in kilometers per hour.

    - -
    -
    -
    -
    - - -VELOCITY_POSITIONABLE:GetMiph() - -
    -
    - -

    Get the velocity in Miph (miles per hour).

    - -

    Return value

    - -

    #number: -The velocity in miles per hour.

    - -
    -
    -
    -
    - - -VELOCITY_POSITIONABLE:New(Positionable) - -
    -
    - -

    VELOCITY_POSITIONABLE Constructor.

    - -

    Parameter

    - -

    Return value

    - -

    #VELOCITY_POSITIONABLE:

    - - -
    -
    -
    -
    - - - -VELOCITY_POSITIONABLE.Positionable - -
    -
    - - - -
    -
    -
    -
    - - -VELOCITY_POSITIONABLE:ToString() - -
    -
    - -

    Get the velocity in text, according the player or default Settings.

    - -

    Return value

    - -

    #string: -The velocity in text according the player or default Settings

    - -
    -
    -
    -
    - - - -VELOCITY_POSITIONABLE.Velocity - -
    -
    - - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/Zone.html b/docs/Documentation/Zone.html deleted file mode 100644 index ffd633f60..000000000 --- a/docs/Documentation/Zone.html +++ /dev/null @@ -1,2920 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module Zone

    - -

    Core -- ZONE classes define zones within your mission of various forms, with various capabilities.

    - - - -

    Banner Image

    - -
    - -

    There are essentially two core functions that zones accomodate:

    - -
      -
    • Test if an object is within the zone boundaries.
    • -
    • Provide the zone behaviour. Some zones are static, while others are moveable.
    • -
    - -

    The object classes are using the zone classes to test the zone boundaries, which can take various forms:

    - -
      -
    • Test if completely within the zone.
    • -
    • Test if partly within the zone (for Group#GROUP objects).
    • -
    • Test if not in the zone.
    • -
    • Distance to the nearest intersecting point of the zone.
    • -
    • Distance to the center of the zone.
    • -
    • ...
    • -
    - -

    Each of these ZONE classes have a zone name, and specific parameters defining the zone type:

    - -
      -
    • #ZONE_BASE: The ZONE_BASE class defining the base for all other zone classes.
    • -
    • #ZONE_RADIUS: The ZONE_RADIUS class defined by a zone name, a location and a radius.
    • -
    • #ZONE: The ZONE class, defined by the zone name as defined within the Mission Editor.
    • -
    • #ZONE_UNIT: The ZONE_UNIT class defines by a zone around a Unit#UNIT with a radius.
    • -
    • #ZONE_GROUP: The ZONE_GROUP class defines by a zone around a Group#GROUP with a radius.
    • -
    • #ZONE_POLYGON: The ZONE_POLYGON class defines by a sequence of Group#GROUP waypoints within the Mission Editor, forming a polygon.
    • -
    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    -

    Contributions:

    - -
    - - -

    Global(s)

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ZONE -

    ZONE class, extends Zone#ZONE_RADIUS

    - -

    The ZONE class, defined by the zone name as defined within the Mission Editor.

    -
    ZONE_BASE -

    ZONE_BASE class, extends Base#BASE

    - -

    This class is an abstract BASE class for derived classes, and is not meant to be instantiated.

    -
    ZONE_GROUP -

    ZONE_GROUP class, extends Zone#ZONE_RADIUS

    - -

    The ZONE_GROUP class defines by a zone around a Group#GROUP with a radius.

    -
    ZONE_POLYGON -

    ZONE_POLYGON class, extends Zone#ZONEPOLYGONBASE

    - -

    The ZONE_POLYGON class defined by a sequence of Group#GROUP waypoints within the Mission Editor, forming a polygon.

    -
    ZONE_POLYGON_BASE -

    ZONEPOLYGONBASE class, extends Zone#ZONE_BASE

    - -

    The ZONEPOLYGONBASE class defined by a sequence of Group#GROUP waypoints within the Mission Editor, forming a polygon.

    -
    ZONE_RADIUS -

    ZONE_RADIUS class, extends Zone#ZONE_BASE

    - -

    The ZONE_RADIUS class defined by a zone name, a location and a radius.

    -
    ZONE_UNIT -

    ZONE_UNIT class, extends Zone#ZONE_RADIUS

    - -

    The ZONE_UNIT class defined by a zone around a Unit#UNIT with a radius.

    -
    -

    Type ZONE

    - - - - - -
    ZONE:New(ZoneName) -

    Constructor of ZONE, taking the zone name.

    -
    - -

    Type ZONE_BASE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ZONE_BASE:BoundZone() -

    Bound the zone boundaries with a tires.

    -
    ZONE_BASE:GetBoundingSquare() -

    Get the bounding square the zone.

    -
    ZONE_BASE:GetCoordinate() -

    Returns a Point#COORDINATE of the zone.

    -
    ZONE_BASE:GetName() -

    Returns the name of the zone.

    -
    ZONE_BASE:GetPointVec2(Height) -

    Returns a Point#POINT_VEC2 of the zone.

    -
    ZONE_BASE:GetPointVec3(Height) -

    Returns a Point#POINT_VEC3 of the zone.

    -
    ZONE_BASE:GetRandomPointVec2() -

    Define a random Point#POINT_VEC2 within the zone.

    -
    ZONE_BASE:GetRandomPointVec3() -

    Define a random Point#POINT_VEC3 within the zone.

    -
    ZONE_BASE:GetRandomVec2() -

    Define a random DCSTypes#Vec2 within the zone.

    -
    ZONE_BASE:GetVec2() -

    Returns the DCSTypes#Vec2 coordinate of the zone.

    -
    ZONE_BASE:GetVec3(Height) -

    Returns the DCSTypes#Vec3 of the zone.

    -
    ZONE_BASE:GetZoneMaybe() -

    Get the zone taking into account the randomization probability of a zone to be selected.

    -
    ZONE_BASE:GetZoneProbability() -

    Get the randomization probability of a zone to be selected.

    -
    ZONE_BASE:IsPointVec2InZone(PointVec2) -

    Returns if a PointVec2 is within the zone.

    -
    ZONE_BASE:IsPointVec3InZone(PointVec3) -

    Returns if a PointVec3 is within the zone.

    -
    ZONE_BASE:IsVec2InZone(Vec2) -

    Returns if a Vec2 is within the zone.

    -
    ZONE_BASE:IsVec3InZone(Vec3) -

    Returns if a Vec3 is within the zone.

    -
    ZONE_BASE:New(ZoneName) -

    ZONE_BASE constructor

    -
    ZONE_BASE:SetName(ZoneName) -

    Sets the name of the zone.

    -
    ZONE_BASE:SetZoneProbability(ZoneProbability) -

    Set the randomization probability of a zone to be selected.

    -
    ZONE_BASE:SmokeZone(SmokeColor) -

    Smokes the zone boundaries in a color.

    -
    ZONE_BASE.ZoneName -

    Name of the zone.

    -
    ZONE_BASE.ZoneProbability -

    A value between 0 and 1. 0 = 0% and 1 = 100% probability.

    -
    - -

    Type ZONE_BASE.BoundingSquare

    - - - - - - - - - - - - - - - - - -
    ZONE_BASE.BoundingSquare.x1 -

    The lower x coordinate (left down)

    -
    ZONE_BASE.BoundingSquare.x2 -

    The higher x coordinate (right up)

    -
    ZONE_BASE.BoundingSquare.y1 -

    The lower y coordinate (left down)

    -
    ZONE_BASE.BoundingSquare.y2 -

    The higher y coordinate (right up)

    -
    - -

    Type ZONE_GROUP

    - - - - - - - - - - - - - - - - - -
    ZONE_GROUP:GetRandomPointVec2(inner, outer) -

    Returns a Point#POINT_VEC2 object reflecting a random 2D location within the zone.

    -
    ZONE_GROUP:GetRandomVec2() -

    Returns a random location within the zone of the Group.

    -
    ZONE_GROUP:GetVec2() -

    Returns the current location of the Group.

    -
    ZONE_GROUP:New(ZoneName, ZoneGROUP, Radius) -

    Constructor to create a ZONE_GROUP instance, taking the zone name, a zone Group#GROUP and a radius.

    -
    - -

    Type ZONE_POLYGON

    - - - - - - - - - -
    ZONE_POLYGON:New(ZoneName, ZoneGroup) -

    Constructor to create a ZONE_POLYGON instance, taking the zone name and the Group#GROUP defined within the Mission Editor.

    -
    ZONE_POLYGON:NewFromGroupName(ZoneName, GroupName) -

    Constructor to create a ZONE_POLYGON instance, taking the zone name and the name of the Group#GROUP defined within the Mission Editor.

    -
    - -

    Type ZONE_POLYGON_BASE

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ZONE_POLYGON_BASE:BoundZone(UnBound) -

    Smokes the zone boundaries in a color.

    -
    ZONE_POLYGON_BASE:Flush() -

    Flush polygon coordinates as a table in DCS.log.

    -
    ZONE_POLYGON_BASE:GetBoundingSquare() -

    Get the bounding square the zone.

    -
    ZONE_POLYGON_BASE:GetRandomCoordinate() -

    Return a Point#COORDINATE object representing a random 3D point at landheight within the zone.

    -
    ZONE_POLYGON_BASE:GetRandomPointVec2() -

    Return a Point#POINT_VEC2 object representing a random 2D point at landheight within the zone.

    -
    ZONE_POLYGON_BASE:GetRandomPointVec3() -

    Return a Point#POINT_VEC3 object representing a random 3D point at landheight within the zone.

    -
    ZONE_POLYGON_BASE:GetRandomVec2() -

    Define a random DCSTypes#Vec2 within the zone.

    -
    ZONE_POLYGON_BASE:GetVec2() -

    Returns the center location of the polygon.

    -
    ZONE_POLYGON_BASE:IsVec2InZone(Vec2) -

    Returns if a location is within the zone.

    -
    ZONE_POLYGON_BASE:New(ZoneName, PointsArray) -

    Constructor to create a ZONEPOLYGONBASE instance, taking the zone name and an array of DCSTypes#Vec2, forming a polygon.

    -
    ZONE_POLYGON_BASE:SmokeZone(SmokeColor) -

    Smokes the zone boundaries in a color.

    -
    - -

    Type ZONE_RADIUS

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ZONE_RADIUS:BoundZone(Points, UnBound, CountryID) -

    Bounds the zone with tires.

    -
    ZONE_RADIUS:CountScannedCoalitions() - -
    ZONE_RADIUS:FlareZone(FlareColor, Points, Azimuth, AddHeight) -

    Flares the zone boundaries in a color.

    -
    ZONE_RADIUS:GetRadius() -

    Returns the radius of the zone.

    -
    ZONE_RADIUS:GetRandomCoordinate(inner, outer) -

    Returns a Point#COORDINATE object reflecting a random 3D location within the zone.

    -
    ZONE_RADIUS:GetRandomPointVec2(inner, outer) -

    Returns a Point#POINT_VEC2 object reflecting a random 2D location within the zone.

    -
    ZONE_RADIUS:GetRandomPointVec3(inner, outer) -

    Returns a Point#POINT_VEC3 object reflecting a random 3D location within the zone.

    -
    ZONE_RADIUS:GetRandomVec2(inner, outer) -

    Returns a random Vec2 location within the zone.

    -
    ZONE_RADIUS:GetScannedCoalition(Coalition) -

    Get Coalitions of the units in the Zone, or Check if there are units of the given Coalition in the Zone.

    -
    ZONE_RADIUS:GetScannedScenery() - -
    ZONE_RADIUS:GetScannedSceneryType(SceneryType) - -
    ZONE_RADIUS:GetVec2() -

    Returns the DCSTypes#Vec2 of the zone.

    -
    ZONE_RADIUS:GetVec3(Height) -

    Returns the DCSTypes#Vec3 of the ZONE_RADIUS.

    -
    ZONE_RADIUS:IsAllInZoneOfCoalition(Coalition) -

    Is All in Zone of Coalition?

    -
    ZONE_RADIUS:IsAllInZoneOfOtherCoalition(Coalition) -

    Is All in Zone of Other Coalition?

    -
    ZONE_RADIUS:IsNoneInZone() -

    Is None in Zone?

    -
    ZONE_RADIUS:IsNoneInZoneOfCoalition(Coalition) -

    Is None in Zone of Coalition?

    -
    ZONE_RADIUS:IsSomeInZoneOfCoalition(Coalition) -

    Is Some in Zone of Coalition?

    -
    ZONE_RADIUS:IsVec2InZone(Vec2) -

    Returns if a location is within the zone.

    -
    ZONE_RADIUS:IsVec3InZone(Vec3) -

    Returns if a point is within the zone.

    -
    ZONE_RADIUS:New(ZoneName, Vec2, Radius) -

    Constructor of #ZONE_RADIUS, taking the zone name, the zone location and a radius.

    -
    ZONE_RADIUS.Radius -

    The radius of the zone.

    -
    ZONE_RADIUS:Scan(ObjectCategories, Coalition) -

    Scan the zone

    -
    ZONE_RADIUS.ScanData - -
    ZONE_RADIUS:SearchZone(ObjectCategories, EvaluateFunction) -

    Searches the zone

    -
    ZONE_RADIUS:SetRadius(Radius) -

    Sets the radius of the zone.

    -
    ZONE_RADIUS:SetVec2(Vec2) -

    Sets the DCSTypes#Vec2 of the zone.

    -
    ZONE_RADIUS:SmokeZone(SmokeColor, Points, AddHeight, AddOffSet, AngleOffset) -

    Smokes the zone boundaries in a color.

    -
    ZONE_RADIUS.Vec2 -

    The current location of the zone.

    -
    - -

    Type ZONE_UNIT

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    ZONE_UNIT:GetRandomVec2() -

    Returns a random location within the zone.

    -
    ZONE_UNIT:GetVec2() -

    Returns the current location of the Unit#UNIT.

    -
    ZONE_UNIT:GetVec3(Height) -

    Returns the DCSTypes#Vec3 of the ZONE_UNIT.

    -
    ZONE_UNIT.LastVec2 - -
    ZONE_UNIT:New(ZoneName, ZoneUNIT, Radius) -

    Constructor to create a ZONE_UNIT instance, taking the zone name, a zone unit and a radius.

    -
    ZONE_UNIT.ZoneUNIT - -
    - -

    Global(s)

    -
    -
    - - #ZONE - -ZONE - -
    -
    - -

    ZONE class, extends Zone#ZONE_RADIUS

    - -

    The ZONE class, defined by the zone name as defined within the Mission Editor.

    - - -

    This class implements the inherited functions from #ZONE_RADIUS taking into account the own zone format and properties.

    - - -
    -
    -
    -
    - - #ZONE_BASE - -ZONE_BASE - -
    -
    - -

    ZONE_BASE class, extends Base#BASE

    - -

    This class is an abstract BASE class for derived classes, and is not meant to be instantiated.

    - - - -

    Each zone has a name:

    - - - - -

    Each zone implements two polymorphic functions defined in Zone#ZONE_BASE:

    - - - -

    A zone has a probability factor that can be set to randomize a selection between zones:

    - -
      -
    • ZONE_BASE.SetZoneProbability(): Set the randomization probability of a zone to be selected, taking a value between 0 and 1 ( 0 = 0%, 1 = 100% )
    • -
    • ZONE_BASE.GetZoneProbability(): Get the randomization probability of a zone to be selected, passing a value between 0 and 1 ( 0 = 0%, 1 = 100% )
    • -
    • ZONE_BASE.GetZoneMaybe(): Get the zone taking into account the randomization probability. nil is returned if this zone is not a candidate.
    • -
    - -

    A zone manages vectors:

    - - - -

    A zone has a bounding square:

    - - - -

    A zone can be marked:

    - - - - -
    -
    -
    -
    - - #ZONE_GROUP - -ZONE_GROUP - -
    -
    - -

    ZONE_GROUP class, extends Zone#ZONE_RADIUS

    - -

    The ZONE_GROUP class defines by a zone around a Group#GROUP with a radius.

    - - -

    The current leader of the group defines the center of the zone. -This class implements the inherited functions from Zone#ZONE_RADIUS taking into account the own zone format and properties.

    - - -
    -
    -
    -
    - - #ZONE_POLYGON - -ZONE_POLYGON - -
    -
    - -

    ZONE_POLYGON class, extends Zone#ZONEPOLYGONBASE

    - -

    The ZONE_POLYGON class defined by a sequence of Group#GROUP waypoints within the Mission Editor, forming a polygon.

    - - -

    This class implements the inherited functions from Zone#ZONE_RADIUS taking into account the own zone format and properties.

    - - -
    -
    -
    -
    - - #ZONE_POLYGON_BASE - -ZONE_POLYGON_BASE - -
    -
    - -

    ZONEPOLYGONBASE class, extends Zone#ZONE_BASE

    - -

    The ZONEPOLYGONBASE class defined by a sequence of Group#GROUP waypoints within the Mission Editor, forming a polygon.

    - - -

    This class implements the inherited functions from Zone#ZONE_RADIUS taking into account the own zone format and properties. -This class is an abstract BASE class for derived classes, and is not meant to be instantiated.

    - -

    Zone point randomization

    - -

    Various functions exist to find random points within the zone.

    - - - - -
    -
    -
    -
    - - #ZONE_RADIUS - -ZONE_RADIUS - -
    -
    - -

    ZONE_RADIUS class, extends Zone#ZONE_BASE

    - -

    The ZONE_RADIUS class defined by a zone name, a location and a radius.

    - - -

    This class implements the inherited functions from Core.Zone#ZONE_BASE taking into account the own zone format and properties.

    - -

    ZONE_RADIUS constructor

    - - - -

    Manage the radius of the zone

    - - - -

    Manage the location of the zone

    - - - -

    Zone point randomization

    - -

    Various functions exist to find random points within the zone.

    - - - - -
    -
    -
    -
    - - #ZONE_UNIT - -ZONE_UNIT - -
    -
    - -

    ZONE_UNIT class, extends Zone#ZONE_RADIUS

    - -

    The ZONE_UNIT class defined by a zone around a Unit#UNIT with a radius.

    - - -

    This class implements the inherited functions from #ZONE_RADIUS taking into account the own zone format and properties.

    - - -
    -
    -

    Type Zone

    - -

    Type ZONE

    -

    Field(s)

    -
    -
    - - -ZONE:New(ZoneName) - -
    -
    - -

    Constructor of ZONE, taking the zone name.

    - -

    Parameter

    -
      -
    • - -

      #string ZoneName : -The name of the zone as defined within the mission editor.

      - -
    • -
    -

    Return value

    - -

    #ZONE:

    - - -
    -
    - -

    Type ZONE_BASE

    -

    Field(s)

    -
    -
    - - -ZONE_BASE:BoundZone() - -
    -
    - -

    Bound the zone boundaries with a tires.

    - -
    -
    -
    -
    - - -ZONE_BASE:GetBoundingSquare() - -
    -
    - -

    Get the bounding square the zone.

    - -

    Return value

    - -

    #nil: -The bounding square.

    - -
    -
    -
    -
    - - -ZONE_BASE:GetCoordinate() - -
    -
    - -

    Returns a Point#COORDINATE of the zone.

    - -

    Return value

    - -

    Core.Point#COORDINATE: -The Coordinate of the zone.

    - -
    -
    -
    -
    - - -ZONE_BASE:GetName() - -
    -
    - -

    Returns the name of the zone.

    - -

    Return value

    - -

    #string: -The name of the zone.

    - -
    -
    -
    -
    - - -ZONE_BASE:GetPointVec2(Height) - -
    -
    - -

    Returns a Point#POINT_VEC2 of the zone.

    - -

    Parameter

    -
      -
    • - -

      Dcs.DCSTypes#Distance Height : -The height to add to the land height where the center of the zone is located.

      - -
    • -
    -

    Return value

    - -

    Core.Point#POINT_VEC2: -The PointVec2 of the zone.

    - -
    -
    -
    -
    - - -ZONE_BASE:GetPointVec3(Height) - -
    -
    - -

    Returns a Point#POINT_VEC3 of the zone.

    - -

    Parameter

    -
      -
    • - -

      Dcs.DCSTypes#Distance Height : -The height to add to the land height where the center of the zone is located.

      - -
    • -
    -

    Return value

    - -

    Core.Point#POINT_VEC3: -The PointVec3 of the zone.

    - -
    -
    -
    -
    - - -ZONE_BASE:GetRandomPointVec2() - -
    -
    - -

    Define a random Point#POINT_VEC2 within the zone.

    - -

    Return value

    - -

    Core.Point#POINT_VEC2: -The PointVec2 coordinates.

    - -
    -
    -
    -
    - - -ZONE_BASE:GetRandomPointVec3() - -
    -
    - -

    Define a random Point#POINT_VEC3 within the zone.

    - -

    Return value

    - -

    Core.Point#POINT_VEC3: -The PointVec3 coordinates.

    - -
    -
    -
    -
    - - -ZONE_BASE:GetRandomVec2() - -
    -
    - -

    Define a random DCSTypes#Vec2 within the zone.

    - -

    Return value

    - -

    Dcs.DCSTypes#Vec2: -The Vec2 coordinates.

    - -
    -
    -
    -
    - - -ZONE_BASE:GetVec2() - -
    -
    - -

    Returns the DCSTypes#Vec2 coordinate of the zone.

    - -

    Return value

    - -

    #nil:

    - - -
    -
    -
    -
    - - -ZONE_BASE:GetVec3(Height) - -
    -
    - -

    Returns the DCSTypes#Vec3 of the zone.

    - -

    Parameter

    -
      -
    • - -

      Dcs.DCSTypes#Distance Height : -The height to add to the land height where the center of the zone is located.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTypes#Vec3: -The Vec3 of the zone.

    - -
    -
    -
    -
    - - -ZONE_BASE:GetZoneMaybe() - -
    -
    - -

    Get the zone taking into account the randomization probability of a zone to be selected.

    - -

    Return values

    -
      -
    1. - -

      #ZONE_BASE: -The zone is selected taking into account the randomization probability factor.

      - -
    2. -
    3. - -

      #nil: -The zone is not selected taking into account the randomization probability factor.

      - -
    4. -
    -
    -
    -
    -
    - - -ZONE_BASE:GetZoneProbability() - -
    -
    - -

    Get the randomization probability of a zone to be selected.

    - -

    Return value

    - -

    #number: -A value between 0 and 1. 0 = 0% and 1 = 100% probability.

    - -
    -
    -
    -
    - - -ZONE_BASE:IsPointVec2InZone(PointVec2) - -
    -
    - -

    Returns if a PointVec2 is within the zone.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean: -true if the PointVec2 is within the zone.

    - -
    -
    -
    -
    - - -ZONE_BASE:IsPointVec3InZone(PointVec3) - -
    -
    - -

    Returns if a PointVec3 is within the zone.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean: -true if the PointVec3 is within the zone.

    - -
    -
    -
    -
    - - -ZONE_BASE:IsVec2InZone(Vec2) - -
    -
    - -

    Returns if a Vec2 is within the zone.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean: -true if the Vec2 is within the zone.

    - -
    -
    -
    -
    - - -ZONE_BASE:IsVec3InZone(Vec3) - -
    -
    - -

    Returns if a Vec3 is within the zone.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean: -true if the Vec3 is within the zone.

    - -
    -
    -
    -
    - - -ZONE_BASE:New(ZoneName) - -
    -
    - -

    ZONE_BASE constructor

    - -

    Parameter

    -
      -
    • - -

      #string ZoneName : -Name of the zone.

      - -
    • -
    -

    Return value

    - -

    #ZONE_BASE: -self

    - -
    -
    -
    -
    - - -ZONE_BASE:SetName(ZoneName) - -
    -
    - -

    Sets the name of the zone.

    - -

    Parameter

    -
      -
    • - -

      #string ZoneName : -The name of the zone.

      - -
    • -
    -

    Return value

    - -

    #ZONE_BASE:

    - - -
    -
    -
    -
    - - -ZONE_BASE:SetZoneProbability(ZoneProbability) - -
    -
    - -

    Set the randomization probability of a zone to be selected.

    - -

    Parameter

    -
      -
    • - -

      ZoneProbability : -A value between 0 and 1. 0 = 0% and 1 = 100% probability.

      - -
    • -
    -
    -
    -
    -
    - - -ZONE_BASE:SmokeZone(SmokeColor) - -
    -
    - -

    Smokes the zone boundaries in a color.

    - -

    Parameter

    - -
    -
    -
    -
    - - #string - -ZONE_BASE.ZoneName - -
    -
    - -

    Name of the zone.

    - -
    -
    -
    -
    - - #number - -ZONE_BASE.ZoneProbability - -
    -
    - -

    A value between 0 and 1. 0 = 0% and 1 = 100% probability.

    - -
    -
    - -

    Type ZONE_BASE.BoundingSquare

    - -

    The ZONE_BASE.BoundingSquare

    - -

    Field(s)

    -
    -
    - - Dcs.DCSTypes#Distance - -ZONE_BASE.BoundingSquare.x1 - -
    -
    - -

    The lower x coordinate (left down)

    - -
    -
    -
    -
    - - Dcs.DCSTypes#Distance - -ZONE_BASE.BoundingSquare.x2 - -
    -
    - -

    The higher x coordinate (right up)

    - -
    -
    -
    -
    - - Dcs.DCSTypes#Distance - -ZONE_BASE.BoundingSquare.y1 - -
    -
    - -

    The lower y coordinate (left down)

    - -
    -
    -
    -
    - - Dcs.DCSTypes#Distance - -ZONE_BASE.BoundingSquare.y2 - -
    -
    - -

    The higher y coordinate (right up)

    - -
    -
    - -

    Type ZONE_GROUP

    -

    Field(s)

    -
    -
    - - -ZONE_GROUP:GetRandomPointVec2(inner, outer) - -
    -
    - -

    Returns a Point#POINT_VEC2 object reflecting a random 2D location within the zone.

    - -

    Parameters

    -
      -
    • - -

      #number inner : -(optional) Minimal distance from the center of the zone. Default is 0.

      - -
    • -
    • - -

      #number outer : -(optional) Maximal distance from the outer edge of the zone. Default is the radius of the zone.

      - -
    • -
    -

    Return value

    - -

    Core.Point#POINT_VEC2: -The Point#POINT_VEC2 object reflecting the random 3D location within the zone.

    - -
    -
    -
    -
    - - -ZONE_GROUP:GetRandomVec2() - -
    -
    - -

    Returns a random location within the zone of the Group.

    - -

    Return value

    - -

    Dcs.DCSTypes#Vec2: -The random location of the zone based on the Group location.

    - -
    -
    -
    -
    - - -ZONE_GROUP:GetVec2() - -
    -
    - -

    Returns the current location of the Group.

    - -

    Return value

    - -

    Dcs.DCSTypes#Vec2: -The location of the zone based on the Group location.

    - -
    -
    -
    -
    - - -ZONE_GROUP:New(ZoneName, ZoneGROUP, Radius) - -
    -
    - -

    Constructor to create a ZONE_GROUP instance, taking the zone name, a zone Group#GROUP and a radius.

    - -

    Parameters

    - -

    Return value

    - -

    #ZONE_GROUP: -self

    - -
    -
    - -

    Type ZONE_POLYGON

    -

    Field(s)

    -
    -
    - - -ZONE_POLYGON:New(ZoneName, ZoneGroup) - -
    -
    - -

    Constructor to create a ZONE_POLYGON instance, taking the zone name and the Group#GROUP defined within the Mission Editor.

    - - -

    The Group#GROUP waypoints define the polygon corners. The first and the last point are automatically connected by ZONE_POLYGON.

    - -

    Parameters

    -
      -
    • - -

      #string ZoneName : -Name of the zone.

      - -
    • -
    • - -

      Wrapper.Group#GROUP ZoneGroup : -The GROUP waypoints as defined within the Mission Editor define the polygon shape.

      - -
    • -
    -

    Return value

    - -

    #ZONE_POLYGON: -self

    - -
    -
    -
    -
    - - -ZONE_POLYGON:NewFromGroupName(ZoneName, GroupName) - -
    -
    - -

    Constructor to create a ZONE_POLYGON instance, taking the zone name and the name of the Group#GROUP defined within the Mission Editor.

    - - -

    The Group#GROUP waypoints define the polygon corners. The first and the last point are automatically connected by ZONE_POLYGON.

    - -

    Parameters

    -
      -
    • - -

      #string ZoneName : -Name of the zone.

      - -
    • -
    • - -

      #string GroupName : -The group name of the GROUP defining the waypoints within the Mission Editor to define the polygon shape.

      - -
    • -
    -

    Return value

    - -

    #ZONE_POLYGON: -self

    - -
    -
    - -

    Type ZONE_POLYGON_BASE

    -

    Field(s)

    -
    -
    - - -ZONE_POLYGON_BASE:BoundZone(UnBound) - -
    -
    - -

    Smokes the zone boundaries in a color.

    - -

    Parameter

    -
      -
    • - -

      #boolean UnBound : -If true, the tyres will be destroyed.

      - -
    • -
    -

    Return value

    - -

    #ZONEPOLYGONBASE: -self

    - -
    -
    -
    -
    - - -ZONE_POLYGON_BASE:Flush() - -
    -
    - -

    Flush polygon coordinates as a table in DCS.log.

    - -

    Return value

    - -

    #ZONEPOLYGONBASE: -self

    - -
    -
    -
    -
    - - -ZONE_POLYGON_BASE:GetBoundingSquare() - -
    -
    - -

    Get the bounding square the zone.

    - -

    Return value

    - -

    #ZONEPOLYGONBASE.BoundingSquare: -The bounding square.

    - -
    -
    -
    -
    - - -ZONE_POLYGON_BASE:GetRandomCoordinate() - -
    -
    - -

    Return a Point#COORDINATE object representing a random 3D point at landheight within the zone.

    - -

    Return value

    - -

    Core.Point#COORDINATE:

    - - -
    -
    -
    -
    - - -ZONE_POLYGON_BASE:GetRandomPointVec2() - -
    -
    - -

    Return a Point#POINT_VEC2 object representing a random 2D point at landheight within the zone.

    - -

    Return value

    - - -

    Point#POINT_VEC2

    - -
    -
    -
    -
    - - -ZONE_POLYGON_BASE:GetRandomPointVec3() - -
    -
    - -

    Return a Point#POINT_VEC3 object representing a random 3D point at landheight within the zone.

    - -

    Return value

    - - -

    Point#POINT_VEC3

    - -
    -
    -
    -
    - - -ZONE_POLYGON_BASE:GetRandomVec2() - -
    -
    - -

    Define a random DCSTypes#Vec2 within the zone.

    - -

    Return value

    - -

    Dcs.DCSTypes#Vec2: -The Vec2 coordinate.

    - -
    -
    -
    -
    - - -ZONE_POLYGON_BASE:GetVec2() - -
    -
    - -

    Returns the center location of the polygon.

    - -

    Return value

    - -

    Dcs.DCSTypes#Vec2: -The location of the zone based on the Group location.

    - -
    -
    -
    -
    - - -ZONE_POLYGON_BASE:IsVec2InZone(Vec2) - -
    -
    - -

    Returns if a location is within the zone.

    - - -

    Source learned and taken from: https://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html

    - -

    Parameter

    - -

    Return value

    - -

    #boolean: -true if the location is within the zone.

    - -
    -
    -
    -
    - - -ZONE_POLYGON_BASE:New(ZoneName, PointsArray) - -
    -
    - -

    Constructor to create a ZONEPOLYGONBASE instance, taking the zone name and an array of DCSTypes#Vec2, forming a polygon.

    - - -

    The Group#GROUP waypoints define the polygon corners. The first and the last point are automatically connected.

    - -

    Parameters

    - -

    Return value

    - -

    #ZONEPOLYGONBASE: -self

    - -
    -
    -
    -
    - - -ZONE_POLYGON_BASE:SmokeZone(SmokeColor) - -
    -
    - -

    Smokes the zone boundaries in a color.

    - -

    Parameter

    - -

    Return value

    - -

    #ZONEPOLYGONBASE: -self

    - -
    -
    - -

    Type ZONE_POLYGON_BASE.BoundingSquare

    - -

    Type ZONE_POLYGON_BASE.ListVec2

    - -

    A points array.

    - - -

    Type ZONE_RADIUS

    - -

    The ZONE_RADIUS class, defined by a zone name, a location and a radius.

    - -

    Field(s)

    -
    -
    - - -ZONE_RADIUS:BoundZone(Points, UnBound, CountryID) - -
    -
    - -

    Bounds the zone with tires.

    - -

    Parameters

    -
      -
    • - -

      #number Points : -(optional) The amount of points in the circle.

      - -
    • -
    • - -

      #boolean UnBound : -If true the tyres will be destroyed.

      - -
    • -
    • - -

      CountryID :

      - -
    • -
    -

    Return value

    - -

    #ZONE_RADIUS: -self

    - -
    -
    -
    -
    - - -ZONE_RADIUS:CountScannedCoalitions() - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_RADIUS:FlareZone(FlareColor, Points, Azimuth, AddHeight) - -
    -
    - -

    Flares the zone boundaries in a color.

    - -

    Parameters

    -
      -
    • - -

      Utilities.Utils#FLARECOLOR FlareColor : -The flare color.

      - -
    • -
    • - -

      #number Points : -(optional) The amount of points in the circle.

      - -
    • -
    • - -

      Dcs.DCSTypes#Azimuth Azimuth : -(optional) Azimuth The azimuth of the flare.

      - -
    • -
    • - -

      #number AddHeight : -(optional) The height to be added for the smoke.

      - -
    • -
    -

    Return value

    - -

    #ZONE_RADIUS: -self

    - -
    -
    -
    -
    - - -ZONE_RADIUS:GetRadius() - -
    -
    - -

    Returns the radius of the zone.

    - -

    Return value

    - -

    Dcs.DCSTypes#Distance: -The radius of the zone.

    - -
    -
    -
    -
    - - -ZONE_RADIUS:GetRandomCoordinate(inner, outer) - -
    -
    - -

    Returns a Point#COORDINATE object reflecting a random 3D location within the zone.

    - -

    Parameters

    -
      -
    • - -

      #number inner : -(optional) Minimal distance from the center of the zone. Default is 0.

      - -
    • -
    • - -

      #number outer : -(optional) Maximal distance from the outer edge of the zone. Default is the radius of the zone.

      - -
    • -
    -

    Return value

    - -

    Core.Point#COORDINATE:

    - - -
    -
    -
    -
    - - -ZONE_RADIUS:GetRandomPointVec2(inner, outer) - -
    -
    - -

    Returns a Point#POINT_VEC2 object reflecting a random 2D location within the zone.

    - -

    Parameters

    -
      -
    • - -

      #number inner : -(optional) Minimal distance from the center of the zone. Default is 0.

      - -
    • -
    • - -

      #number outer : -(optional) Maximal distance from the outer edge of the zone. Default is the radius of the zone.

      - -
    • -
    -

    Return value

    - -

    Core.Point#POINT_VEC2: -The Point#POINT_VEC2 object reflecting the random 3D location within the zone.

    - -
    -
    -
    -
    - - -ZONE_RADIUS:GetRandomPointVec3(inner, outer) - -
    -
    - -

    Returns a Point#POINT_VEC3 object reflecting a random 3D location within the zone.

    - -

    Parameters

    -
      -
    • - -

      #number inner : -(optional) Minimal distance from the center of the zone. Default is 0.

      - -
    • -
    • - -

      #number outer : -(optional) Maximal distance from the outer edge of the zone. Default is the radius of the zone.

      - -
    • -
    -

    Return value

    - -

    Core.Point#POINT_VEC3: -The Point#POINT_VEC3 object reflecting the random 3D location within the zone.

    - -
    -
    -
    -
    - - -ZONE_RADIUS:GetRandomVec2(inner, outer) - -
    -
    - -

    Returns a random Vec2 location within the zone.

    - -

    Parameters

    -
      -
    • - -

      #number inner : -(optional) Minimal distance from the center of the zone. Default is 0.

      - -
    • -
    • - -

      #number outer : -(optional) Maximal distance from the outer edge of the zone. Default is the radius of the zone.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTypes#Vec2: -The random location within the zone.

    - -
    -
    -
    -
    - - -ZONE_RADIUS:GetScannedCoalition(Coalition) - -
    -
    - -

    Get Coalitions of the units in the Zone, or Check if there are units of the given Coalition in the Zone.

    - - -

    Returns nil if there are none ot two Coalitions in the zone! -Returns one Coalition if there are only Units of one Coalition in the Zone. -Returns the Coalition for the given Coalition if there are units of the Coalition in the Zone

    - -

    Parameter

    -
      -
    • - -

      Coalition :

      - -
    • -
    -

    Return value

    - -

    #table:

    - - -
    -
    -
    -
    - - -ZONE_RADIUS:GetScannedScenery() - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_RADIUS:GetScannedSceneryType(SceneryType) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      SceneryType :

      - -
    • -
    -
    -
    -
    -
    - - -ZONE_RADIUS:GetVec2() - -
    -
    - -

    Returns the DCSTypes#Vec2 of the zone.

    - -

    Return value

    - -

    Dcs.DCSTypes#Vec2: -The location of the zone.

    - -
    -
    -
    -
    - - -ZONE_RADIUS:GetVec3(Height) - -
    -
    - -

    Returns the DCSTypes#Vec3 of the ZONE_RADIUS.

    - -

    Parameter

    -
      -
    • - -

      Dcs.DCSTypes#Distance Height : -The height to add to the land height where the center of the zone is located.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTypes#Vec3: -The point of the zone.

    - -
    -
    -
    -
    - - -ZONE_RADIUS:IsAllInZoneOfCoalition(Coalition) - -
    -
    - -

    Is All in Zone of Coalition?

    - -

    Parameter

    -
      -
    • - -

      Coalition :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -ZONE_RADIUS:IsAllInZoneOfOtherCoalition(Coalition) - -
    -
    - -

    Is All in Zone of Other Coalition?

    - -

    Parameter

    -
      -
    • - -

      Coalition :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -ZONE_RADIUS:IsNoneInZone() - -
    -
    - -

    Is None in Zone?

    - -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -ZONE_RADIUS:IsNoneInZoneOfCoalition(Coalition) - -
    -
    - -

    Is None in Zone of Coalition?

    - -

    Parameter

    -
      -
    • - -

      Coalition :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -ZONE_RADIUS:IsSomeInZoneOfCoalition(Coalition) - -
    -
    - -

    Is Some in Zone of Coalition?

    - -

    Parameter

    -
      -
    • - -

      Coalition :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -ZONE_RADIUS:IsVec2InZone(Vec2) - -
    -
    - -

    Returns if a location is within the zone.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean: -true if the location is within the zone.

    - -
    -
    -
    -
    - - -ZONE_RADIUS:IsVec3InZone(Vec3) - -
    -
    - -

    Returns if a point is within the zone.

    - -

    Parameter

    - -

    Return value

    - -

    #boolean: -true if the point is within the zone.

    - -
    -
    -
    -
    - - -ZONE_RADIUS:New(ZoneName, Vec2, Radius) - -
    -
    - -

    Constructor of #ZONE_RADIUS, taking the zone name, the zone location and a radius.

    - -

    Parameters

    - -

    Return value

    - -

    #ZONE_RADIUS: -self

    - -
    -
    -
    -
    - - Dcs.DCSTypes#Distance - -ZONE_RADIUS.Radius - -
    -
    - -

    The radius of the zone.

    - -
    -
    -
    -
    - - -ZONE_RADIUS:Scan(ObjectCategories, Coalition) - -
    -
    - -

    Scan the zone

    - -

    Parameters

    -
      -
    • - -

      ObjectCategories :

      - -
    • -
    • - -

      Coalition :

      - -
    • -
    -
    -
    -
    -
    - - - -ZONE_RADIUS.ScanData - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_RADIUS:SearchZone(ObjectCategories, EvaluateFunction) - -
    -
    - -

    Searches the zone

    - -

    Parameters

    -
      -
    • - -

      ObjectCategories : -A list of categories, which are members of Object.Category

      - -
    • -
    • - -

      EvaluateFunction :

      - -
    • -
    -
    -
    -
    -
    - - -ZONE_RADIUS:SetRadius(Radius) - -
    -
    - -

    Sets the radius of the zone.

    - -

    Parameter

    - -

    Return value

    - -

    Dcs.DCSTypes#Distance: -The radius of the zone.

    - -
    -
    -
    -
    - - -ZONE_RADIUS:SetVec2(Vec2) - -
    -
    - -

    Sets the DCSTypes#Vec2 of the zone.

    - -

    Parameter

    - -

    Return value

    - -

    Dcs.DCSTypes#Vec2: -The new location of the zone.

    - -
    -
    -
    -
    - - -ZONE_RADIUS:SmokeZone(SmokeColor, Points, AddHeight, AddOffSet, AngleOffset) - -
    -
    - -

    Smokes the zone boundaries in a color.

    - -

    Parameters

    -
      -
    • - -

      Utilities.Utils#SMOKECOLOR SmokeColor : -The smoke color.

      - -
    • -
    • - -

      #number Points : -(optional) The amount of points in the circle.

      - -
    • -
    • - -

      #number AddHeight : -(optional) The height to be added for the smoke.

      - -
    • -
    • - -

      #number AddOffSet : -(optional) The angle to be added for the smoking start position.

      - -
    • -
    • - -

      AngleOffset :

      - -
    • -
    -

    Return value

    - -

    #ZONE_RADIUS: -self

    - -
    -
    -
    -
    - - Dcs.DCSTypes#Vec2 - -ZONE_RADIUS.Vec2 - -
    -
    - -

    The current location of the zone.

    - -
    -
    - -

    Type ZONE_UNIT

    -

    Field(s)

    -
    -
    - - -ZONE_UNIT:GetRandomVec2() - -
    -
    - -

    Returns a random location within the zone.

    - -

    Return value

    - -

    Dcs.DCSTypes#Vec2: -The random location within the zone.

    - -
    -
    -
    -
    - - -ZONE_UNIT:GetVec2() - -
    -
    - -

    Returns the current location of the Unit#UNIT.

    - -

    Return value

    - -

    Dcs.DCSTypes#Vec2: -The location of the zone based on the Unit#UNITlocation.

    - -
    -
    -
    -
    - - -ZONE_UNIT:GetVec3(Height) - -
    -
    - -

    Returns the DCSTypes#Vec3 of the ZONE_UNIT.

    - -

    Parameter

    -
      -
    • - -

      Dcs.DCSTypes#Distance Height : -The height to add to the land height where the center of the zone is located.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTypes#Vec3: -The point of the zone.

    - -
    -
    -
    -
    - - - -ZONE_UNIT.LastVec2 - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_UNIT:New(ZoneName, ZoneUNIT, Radius) - -
    -
    - -

    Constructor to create a ZONE_UNIT instance, taking the zone name, a zone unit and a radius.

    - -

    Parameters

    -
      -
    • - -

      #string ZoneName : -Name of the zone.

      - -
    • -
    • - -

      Wrapper.Unit#UNIT ZoneUNIT : -The unit as the center of the zone.

      - -
    • -
    • - -

      Dcs.DCSTypes#Distance Radius : -The radius of the zone.

      - -
    • -
    -

    Return value

    - -

    #ZONE_UNIT: -self

    - -
    -
    -
    -
    - - Wrapper.Unit#UNIT - -ZONE_UNIT.ZoneUNIT - -
    -
    - - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/ZoneCaptureCoalition.html b/docs/Documentation/ZoneCaptureCoalition.html deleted file mode 100644 index 1aac7fba6..000000000 --- a/docs/Documentation/ZoneCaptureCoalition.html +++ /dev/null @@ -1,1074 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module ZoneCaptureCoalition

    - -

    Functional -- (WIP R2.3) Models the process to capture a Zone for a Coalition, which is guarded by another Coalition.

    - - - -
    - -

    Banner Image

    - -
    - -

    Contributions: Millertime: Concept

    -

    Author: Sven Van de Velde (FlightControl)

    - -
    - - -

    Global(s)

    - - - - - -
    ZONE_CAPTURE_COALITION -

    ZONE_CAPTURE_COALITION class, extends ZoneGoalCoalition#ZONEGOALCOALITION

    - -

    Models the process to capture a Zone for a Coalition, which is guarded by another Coalition.

    -
    -

    Type ZONE_CAPTURE_COALITION

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ZONE_CAPTURE_COALITION:Attack() -

    Attack Trigger for ZONE_CAPTURE_COALITION

    -
    ZONE_CAPTURE_COALITION:Capture() -

    Capture Trigger for ZONE_CAPTURE_COALITION

    -
    ZONE_CAPTURE_COALITION:Empty() -

    Empty Trigger for ZONE_CAPTURE_COALITION

    -
    ZONE_CAPTURE_COALITION:Guard() -

    Guard Trigger for ZONE_CAPTURE_COALITION

    -
    ZONE_CAPTURE_COALITION:IsAttacked() - -
    ZONE_CAPTURE_COALITION:IsCaptured() - -
    ZONE_CAPTURE_COALITION:IsEmpty() - -
    ZONE_CAPTURE_COALITION:IsGuarded() - -
    ZONE_CAPTURE_COALITION:Mark() -

    Mark.

    -
    ZONE_CAPTURE_COALITION.MarkBlue - -
    ZONE_CAPTURE_COALITION.MarkRed - -
    ZONE_CAPTURE_COALITION:New(Zone, Coalition) -

    ZONECAPTURECOALITION Constructor.

    -
    ZONE_CAPTURE_COALITION:OnAfterAttack(From, Event, To) -

    Attack Handler OnAfter for ZONE_CAPTURE_COALITION

    -
    ZONE_CAPTURE_COALITION:OnAfterCapture(From, Event, To) -

    Capture Handler OnAfter for ZONE_CAPTURE_COALITION

    -
    ZONE_CAPTURE_COALITION:OnAfterEmpty(From, Event, To) -

    Empty Handler OnAfter for ZONE_CAPTURE_COALITION

    -
    ZONE_CAPTURE_COALITION:OnAfterGuard(From, Event, To) -

    Guard Handler OnAfter for ZONE_CAPTURE_COALITION

    -
    ZONE_CAPTURE_COALITION:OnBeforeAttack(From, Event, To) -

    Attack Handler OnBefore for ZONE_CAPTURE_COALITION

    -
    ZONE_CAPTURE_COALITION:OnBeforeCapture(From, Event, To) -

    Capture Handler OnBefore for ZONE_CAPTURE_COALITION

    -
    ZONE_CAPTURE_COALITION:OnBeforeEmpty(From, Event, To) -

    Empty Handler OnBefore for ZONE_CAPTURE_COALITION

    -
    ZONE_CAPTURE_COALITION:OnBeforeGuard(From, Event, To) -

    Guard Handler OnBefore for ZONE_CAPTURE_COALITION

    -
    ZONE_CAPTURE_COALITION.ScheduleStatusZone - -
    ZONE_CAPTURE_COALITION.SmokeScheduler - -
    ZONE_CAPTURE_COALITION.States - -
    ZONE_CAPTURE_COALITION:StatusZone() -

    Check status Coalition ownership.

    -
    ZONE_CAPTURE_COALITION:__Attack(Delay) -

    Attack Asynchronous Trigger for ZONE_CAPTURE_COALITION

    -
    ZONE_CAPTURE_COALITION:__Capture(Delay) -

    Capture Asynchronous Trigger for ZONE_CAPTURE_COALITION

    -
    ZONE_CAPTURE_COALITION:__Empty(Delay) -

    Empty Asynchronous Trigger for ZONE_CAPTURE_COALITION

    -
    ZONE_CAPTURE_COALITION:__Guard(Delay) -

    Guard Asynchronous Trigger for ZONE_CAPTURE_COALITION

    -
    ZONE_CAPTURE_COALITION:onafterGuard() -

    When started, check the Coalition status.

    -
    ZONE_CAPTURE_COALITION:onenterAttacked() - -
    ZONE_CAPTURE_COALITION:onenterCaptured() - -
    ZONE_CAPTURE_COALITION:onenterEmpty() - -
    ZONE_CAPTURE_COALITION:onenterGuarded() -

    Bound.

    -
    - -

    Global(s)

    -
    -
    - - #ZONE_CAPTURE_COALITION - -ZONE_CAPTURE_COALITION - -
    -
    - -

    ZONE_CAPTURE_COALITION class, extends ZoneGoalCoalition#ZONEGOALCOALITION

    - -

    Models the process to capture a Zone for a Coalition, which is guarded by another Coalition.

    - - - -
    - -

    Banner Image

    - -
    - -

    The Zone is initially Guarded by the owning coalition, which is the coalition that initially occupies the zone with units of its coalition. -Once units of an other coalition are entering the Zone, the state will change to Attacked. As long as these units remain in the zone, the state keeps set to Attacked. -When all units are destroyed in the Zone, the state will change to Empty, which expresses that the Zone is empty, and can be captured. -When units of the other coalition are in the Zone, and no other units of the owning coalition is in the Zone, the Zone is captured, and its state will change to Captured.

    - -

    Event handlers can be defined by the mission designer to action on the state transitions.

    - -

    1. ZONE_CAPTURE_COALITION constructor

    - - - -

    2. ZONE_CAPTURE_COALITION is a finite state machine (FSM).

    - -

    2.1 ZONE_CAPTURE_COALITION States

    - -
      -
    • Captured: The Zone has been captured by an other coalition.
    • -
    • Attacked: The Zone is currently intruded by an other coalition. There are units of the owning coalition and an other coalition in the Zone.
    • -
    • Guarded: The Zone is guarded by the owning coalition. There is no other unit of an other coalition in the Zone.
    • -
    • Empty: The Zone is empty. There is not valid unit in the Zone.
    • -
    - -

    2.2 ZONE_CAPTURE_COALITION Events

    - -
      -
    • Capture: The Zone has been captured by an other coalition.
    • -
    • Attack: The Zone is currently intruded by an other coalition. There are units of the owning coalition and an other coalition in the Zone.
    • -
    • Guard: The Zone is guarded by the owning coalition. There is no other unit of an other coalition in the Zone.
    • -
    • Empty: The Zone is empty. There is not valid unit in the Zone. -
    • -
    - -
    -
    -

    Type ZoneCaptureCoalition

    - -

    Type ZONE_CAPTURE_COALITION

    -

    Field(s)

    -
    -
    - - -ZONE_CAPTURE_COALITION:Attack() - -
    -
    - -

    Attack Trigger for ZONE_CAPTURE_COALITION

    - -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:Capture() - -
    -
    - -

    Capture Trigger for ZONE_CAPTURE_COALITION

    - -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:Empty() - -
    -
    - -

    Empty Trigger for ZONE_CAPTURE_COALITION

    - -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:Guard() - -
    -
    - -

    Guard Trigger for ZONE_CAPTURE_COALITION

    - -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:IsAttacked() - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:IsCaptured() - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:IsEmpty() - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:IsGuarded() - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:Mark() - -
    -
    - -

    Mark.

    - -
    -
    -
    -
    - - - -ZONE_CAPTURE_COALITION.MarkBlue - -
    -
    - - - -
    -
    -
    -
    - - - -ZONE_CAPTURE_COALITION.MarkRed - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:New(Zone, Coalition) - -
    -
    - -

    ZONECAPTURECOALITION Constructor.

    - -

    Parameters

    - -

    Return value

    - -

    #ZONECAPTURECOALITION:

    - - -

    Usage:

    -
    
    - AttackZone = ZONE:New( "AttackZone" )
    -
    - ZoneCaptureCoalition = ZONE_CAPTURE_COALITION:New( AttackZone, coalition.side.RED ) -- Create a new ZONE_CAPTURE_COALITION object of zone AttackZone with ownership RED coalition.
    - ZoneCaptureCoalition:__Guard( 1 ) -- Start the Guarding of the AttackZone.
    - 
    - -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:OnAfterAttack(From, Event, To) - -
    -
    - -

    Attack Handler OnAfter for ZONE_CAPTURE_COALITION

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:OnAfterCapture(From, Event, To) - -
    -
    - -

    Capture Handler OnAfter for ZONE_CAPTURE_COALITION

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:OnAfterEmpty(From, Event, To) - -
    -
    - -

    Empty Handler OnAfter for ZONE_CAPTURE_COALITION

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:OnAfterGuard(From, Event, To) - -
    -
    - -

    Guard Handler OnAfter for ZONE_CAPTURE_COALITION

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:OnBeforeAttack(From, Event, To) - -
    -
    - -

    Attack Handler OnBefore for ZONE_CAPTURE_COALITION

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:OnBeforeCapture(From, Event, To) - -
    -
    - -

    Capture Handler OnBefore for ZONE_CAPTURE_COALITION

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:OnBeforeEmpty(From, Event, To) - -
    -
    - -

    Empty Handler OnBefore for ZONE_CAPTURE_COALITION

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:OnBeforeGuard(From, Event, To) - -
    -
    - -

    Guard Handler OnBefore for ZONE_CAPTURE_COALITION

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - - -ZONE_CAPTURE_COALITION.ScheduleStatusZone - -
    -
    - - - -
    -
    -
    -
    - - - -ZONE_CAPTURE_COALITION.SmokeScheduler - -
    -
    - - - -
    -
    -
    -
    - - - -ZONE_CAPTURE_COALITION.States - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:StatusZone() - -
    -
    - -

    Check status Coalition ownership.

    - -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:__Attack(Delay) - -
    -
    - -

    Attack Asynchronous Trigger for ZONE_CAPTURE_COALITION

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:__Capture(Delay) - -
    -
    - -

    Capture Asynchronous Trigger for ZONE_CAPTURE_COALITION

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:__Empty(Delay) - -
    -
    - -

    Empty Asynchronous Trigger for ZONE_CAPTURE_COALITION

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:__Guard(Delay) - -
    -
    - -

    Guard Asynchronous Trigger for ZONE_CAPTURE_COALITION

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:onafterGuard() - -
    -
    - -

    When started, check the Coalition status.

    - -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:onenterAttacked() - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:onenterCaptured() - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:onenterEmpty() - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_CAPTURE_COALITION:onenterGuarded() - -
    -
    - -

    Bound.

    - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/ZoneGoal.html b/docs/Documentation/ZoneGoal.html deleted file mode 100644 index 564fc72b7..000000000 --- a/docs/Documentation/ZoneGoal.html +++ /dev/null @@ -1,569 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module ZoneGoal

    - -

    Functional (WIP) -- Base class that models processes to achieve goals involving a Zone.

    - - - -
    - -

    ZONE_GOAL models processes that have a Goal with a defined achievement involving a Zone. -Derived classes implement the ways how the achievements can be realized.

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -
    - - -

    Global(s)

    - - - - - -
    ZONE_GOAL -

    ZONE_GOAL class, extends Fsm#FSM

    - -

    ZONE_GOAL models processes that have a Goal with a defined achievement involving a Zone.

    -
    -

    Type ZONE_GOAL

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ZONE_GOAL:Flare(FlareColor) -

    Flare the center of the zone.

    -
    ZONE_GOAL:GetZone() -

    Get the Zone

    -
    ZONE_GOAL:GetZoneName() -

    Get the name of the ProtectZone

    -
    ZONE_GOAL.Goal - -
    ZONE_GOAL:MonitorDestroyedUnits() -

    Activate the event UnitDestroyed to be fired when a unit is destroyed in the zone.

    -
    ZONE_GOAL:New(Zone) -

    ZONE_GOAL Constructor.

    -
    ZONE_GOAL:OnAfterDestroyedUnit(From, Event, To, DestroyedUnit, PlayerName) -

    DestroyedUnit Handler OnAfter for ZONE_GOAL

    -
    ZONE_GOAL:Smoke(SmokeColor) -

    Smoke the center of theh zone.

    -
    ZONE_GOAL.SmokeColor - -
    ZONE_GOAL.SmokeScheduler - -
    ZONE_GOAL.SmokeTime - -
    ZONE_GOAL:StatusSmoke() -

    Check status Smoke.

    -
    ZONE_GOAL.Zone - -
    ZONE_GOAL:__Destroyed(EventData) - -
    ZONE_GOAL:onafterGuard() -

    When started, check the Smoke and the Zone status.

    -
    - -

    Global(s)

    -
    -
    - - #ZONE_GOAL - -ZONE_GOAL - -
    -
    - -

    ZONE_GOAL class, extends Fsm#FSM

    - -

    ZONE_GOAL models processes that have a Goal with a defined achievement involving a Zone.

    - - -

    Derived classes implement the ways how the achievements can be realized.

    - -

    1. ZONE_GOAL constructor

    - - - -

    2. ZONE_GOAL is a finite state machine (FSM).

    - -

    2.1 ZONE_GOAL States

    - -
      -
    • None: Initial State
    • -
    - -

    2.2 ZONE_GOAL Events

    - - - - -
    -
    -

    Type ZoneGoal

    - -

    Type SMOKECOLOR.Color

    - -

    Type ZONE_GOAL

    -

    Field(s)

    -
    -
    - - -ZONE_GOAL:Flare(FlareColor) - -
    -
    - -

    Flare the center of the zone.

    - -

    Parameter

    - -
    -
    -
    -
    - - -ZONE_GOAL:GetZone() - -
    -
    - -

    Get the Zone

    - -

    Return value

    - -

    Core.Zone#ZONE_BASE:

    - - -
    -
    -
    -
    - - -ZONE_GOAL:GetZoneName() - -
    -
    - -

    Get the name of the ProtectZone

    - -

    Return value

    - -

    #string:

    - - -
    -
    -
    -
    - - - -ZONE_GOAL.Goal - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_GOAL:MonitorDestroyedUnits() - -
    -
    - -

    Activate the event UnitDestroyed to be fired when a unit is destroyed in the zone.

    - -
    -
    -
    -
    - - -ZONE_GOAL:New(Zone) - -
    -
    - -

    ZONE_GOAL Constructor.

    - -

    Parameter

    - -

    Return value

    - -

    #ZONE_GOAL:

    - - -
    -
    -
    -
    - - -ZONE_GOAL:OnAfterDestroyedUnit(From, Event, To, DestroyedUnit, PlayerName) - -
    -
    - -

    DestroyedUnit Handler OnAfter for ZONE_GOAL

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    • - -

      Wrapper.Unit#UNIT DestroyedUnit : -The destroyed unit.

      - -
    • -
    • - -

      #string PlayerName : -The name of the player.

      - -
    • -
    -
    -
    -
    -
    - - -ZONE_GOAL:Smoke(SmokeColor) - -
    -
    - -

    Smoke the center of theh zone.

    - -

    Parameter

    - -
    -
    -
    -
    - - - -ZONE_GOAL.SmokeColor - -
    -
    - - - -
    -
    -
    -
    - - - -ZONE_GOAL.SmokeScheduler - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_GOAL.SmokeTime - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_GOAL:StatusSmoke() - -
    -
    - -

    Check status Smoke.

    - -
    -
    -
    -
    - - Core.Zone#ZONE_BASE - -ZONE_GOAL.Zone - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_GOAL:__Destroyed(EventData) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - - -ZONE_GOAL:onafterGuard() - -
    -
    - -

    When started, check the Smoke and the Zone status.

    - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/ZoneGoalCargo.html b/docs/Documentation/ZoneGoalCargo.html deleted file mode 100644 index a78db9225..000000000 --- a/docs/Documentation/ZoneGoalCargo.html +++ /dev/null @@ -1,1151 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module ZoneGoalCargo

    - -

    Functional (WIP) -- Base class that models processes to achieve goals involving a Zone and Cargo.

    - - - -
    - -

    ZONEGOALCARGO models processes that have a Goal with a defined achievement involving a Zone and Cargo.
    -Derived classes implement the ways how the achievements can be realized.

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -
    - - -

    Global(s)

    - - - - - -
    ZONE_GOAL_CARGO -

    ZONEGOALCARGO class, extends ZoneGoal#ZONE_GOAL

    - -

    ZONEGOALCARGO models processes that have a Goal with a defined achievement involving a Zone and Cargo.

    -
    -

    Type ZONE_GOAL_CARGO

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ZONE_GOAL_CARGO:Attack() -

    Attack Trigger for ZONEGOALCARGO

    -
    ZONE_GOAL_CARGO:Capture() -

    Capture Trigger for ZONEGOALCARGO

    -
    ZONE_GOAL_CARGO.Coalition - -
    ZONE_GOAL_CARGO:Empty() -

    Empty Trigger for ZONEGOALCARGO

    -
    ZONE_GOAL_CARGO:GetCoalition() -

    Get the owning coalition of the zone.

    -
    ZONE_GOAL_CARGO:GetCoalitionName() -

    Get the owning coalition name of the zone.

    -
    ZONE_GOAL_CARGO:Guard() -

    Guard Trigger for ZONEGOALCARGO

    -
    ZONE_GOAL_CARGO:IsAttacked() - -
    ZONE_GOAL_CARGO:IsCaptured() - -
    ZONE_GOAL_CARGO:IsEmpty() - -
    ZONE_GOAL_CARGO:IsGuarded() - -
    ZONE_GOAL_CARGO:Mark() -

    Mark.

    -
    ZONE_GOAL_CARGO.MarkBlue - -
    ZONE_GOAL_CARGO.MarkRed - -
    ZONE_GOAL_CARGO:New(Zone, Coalition) -

    ZONEGOALCARGO Constructor.

    -
    ZONE_GOAL_CARGO:OnAfterAttack(From, Event, To) -

    Attack Handler OnAfter for ZONEGOALCARGO

    -
    ZONE_GOAL_CARGO:OnAfterCapture(From, Event, To) -

    Capture Handler OnAfter for ZONEGOALCARGO

    -
    ZONE_GOAL_CARGO:OnAfterEmpty(From, Event, To) -

    Empty Handler OnAfter for ZONEGOALCARGO

    -
    ZONE_GOAL_CARGO:OnAfterGuard(From, Event, To) -

    Guard Handler OnAfter for ZONEGOALCARGO

    -
    ZONE_GOAL_CARGO:OnBeforeAttack(From, Event, To) -

    Attack Handler OnBefore for ZONEGOALCARGO

    -
    ZONE_GOAL_CARGO:OnBeforeCapture(From, Event, To) -

    Capture Handler OnBefore for ZONEGOALCARGO

    -
    ZONE_GOAL_CARGO:OnBeforeEmpty(From, Event, To) -

    Empty Handler OnBefore for ZONEGOALCARGO

    -
    ZONE_GOAL_CARGO:OnBeforeGuard(From, Event, To) -

    Guard Handler OnBefore for ZONEGOALCARGO

    -
    ZONE_GOAL_CARGO.ScheduleStatusZone - -
    ZONE_GOAL_CARGO:SetCoalition(Coalition) -

    Set the owning coalition of the zone.

    -
    ZONE_GOAL_CARGO.SmokeScheduler - -
    ZONE_GOAL_CARGO.States - -
    ZONE_GOAL_CARGO:StatusZone() -

    Check status Coalition ownership.

    -
    ZONE_GOAL_CARGO:__Attack(Delay) -

    Attack Asynchronous Trigger for ZONEGOALCARGO

    -
    ZONE_GOAL_CARGO:__Capture(Delay) -

    Capture Asynchronous Trigger for ZONEGOALCARGO

    -
    ZONE_GOAL_CARGO:__Empty(Delay) -

    Empty Asynchronous Trigger for ZONEGOALCARGO

    -
    ZONE_GOAL_CARGO:__Guard(Delay) -

    Guard Asynchronous Trigger for ZONEGOALCARGO

    -
    ZONE_GOAL_CARGO:onafterGuard() -

    When started, check the Coalition status.

    -
    ZONE_GOAL_CARGO:onenterAttacked() - -
    ZONE_GOAL_CARGO:onenterCaptured() - -
    ZONE_GOAL_CARGO:onenterEmpty() - -
    ZONE_GOAL_CARGO:onenterGuarded() -

    Bound.

    -
    - -

    Global(s)

    -
    -
    - - #ZONE_GOAL_CARGO - -ZONE_GOAL_CARGO - -
    -
    - -

    ZONEGOALCARGO class, extends ZoneGoal#ZONE_GOAL

    - -

    ZONEGOALCARGO models processes that have a Goal with a defined achievement involving a Zone and Cargo.

    - - -

    Derived classes implement the ways how the achievements can be realized.

    - -

    1. ZONEGOALCARGO constructor

    - - - -

    2. ZONEGOALCARGO is a finite state machine (FSM).

    - -

    2.1 ZONEGOALCARGO States

    - -
      -
    • Deployed: The Zone has been captured by an other coalition.
    • -
    • Airborne: The Zone is currently intruded by an other coalition. There are units of the owning coalition and an other coalition in the Zone.
    • -
    • Loaded: The Zone is guarded by the owning coalition. There is no other unit of an other coalition in the Zone.
    • -
    • Empty: The Zone is empty. There is not valid unit in the Zone.
    • -
    - -

    2.2 ZONEGOALCARGO Events

    - -
      -
    • Capture: The Zone has been captured by an other coalition.
    • -
    • Attack: The Zone is currently intruded by an other coalition. There are units of the owning coalition and an other coalition in the Zone.
    • -
    • Guard: The Zone is guarded by the owning coalition. There is no other unit of an other coalition in the Zone.
    • -
    • Empty: The Zone is empty. There is not valid unit in the Zone.
    • -
    - -

    2.3 ZONEGOALCARGO State Machine

    - - -
    -
    -

    Type ZoneGoalCargo

    - -

    Type ZONE_GOAL_CARGO

    -

    Field(s)

    -
    -
    - - -ZONE_GOAL_CARGO:Attack() - -
    -
    - -

    Attack Trigger for ZONEGOALCARGO

    - -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:Capture() - -
    -
    - -

    Capture Trigger for ZONEGOALCARGO

    - -
    -
    -
    -
    - - - -ZONE_GOAL_CARGO.Coalition - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:Empty() - -
    -
    - -

    Empty Trigger for ZONEGOALCARGO

    - -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:GetCoalition() - -
    -
    - -

    Get the owning coalition of the zone.

    - -

    Return value

    - -

    DCSCoalition.DCSCoalition#coalition: -Coalition.

    - -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:GetCoalitionName() - -
    -
    - -

    Get the owning coalition name of the zone.

    - -

    Return value

    - -

    #string: -Coalition name.

    - -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:Guard() - -
    -
    - -

    Guard Trigger for ZONEGOALCARGO

    - -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:IsAttacked() - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:IsCaptured() - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:IsEmpty() - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:IsGuarded() - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:Mark() - -
    -
    - -

    Mark.

    - -
    -
    -
    -
    - - - -ZONE_GOAL_CARGO.MarkBlue - -
    -
    - - - -
    -
    -
    -
    - - - -ZONE_GOAL_CARGO.MarkRed - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:New(Zone, Coalition) - -
    -
    - -

    ZONEGOALCARGO Constructor.

    - -

    Parameters

    - -

    Return value

    - -

    #ZONEGOALCARGO:

    - - -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:OnAfterAttack(From, Event, To) - -
    -
    - -

    Attack Handler OnAfter for ZONEGOALCARGO

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:OnAfterCapture(From, Event, To) - -
    -
    - -

    Capture Handler OnAfter for ZONEGOALCARGO

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:OnAfterEmpty(From, Event, To) - -
    -
    - -

    Empty Handler OnAfter for ZONEGOALCARGO

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:OnAfterGuard(From, Event, To) - -
    -
    - -

    Guard Handler OnAfter for ZONEGOALCARGO

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:OnBeforeAttack(From, Event, To) - -
    -
    - -

    Attack Handler OnBefore for ZONEGOALCARGO

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:OnBeforeCapture(From, Event, To) - -
    -
    - -

    Capture Handler OnBefore for ZONEGOALCARGO

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:OnBeforeEmpty(From, Event, To) - -
    -
    - -

    Empty Handler OnBefore for ZONEGOALCARGO

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:OnBeforeGuard(From, Event, To) - -
    -
    - -

    Guard Handler OnBefore for ZONEGOALCARGO

    - -

    Parameters

    -
      -
    • - -

      #string From :

      - -
    • -
    • - -

      #string Event :

      - -
    • -
    • - -

      #string To :

      - -
    • -
    -

    Return value

    - -

    #boolean:

    - - -
    -
    -
    -
    - - - -ZONE_GOAL_CARGO.ScheduleStatusZone - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:SetCoalition(Coalition) - -
    -
    - -

    Set the owning coalition of the zone.

    - -

    Parameter

    - -
    -
    -
    -
    - - - -ZONE_GOAL_CARGO.SmokeScheduler - -
    -
    - - - -
    -
    -
    -
    - - - -ZONE_GOAL_CARGO.States - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:StatusZone() - -
    -
    - -

    Check status Coalition ownership.

    - -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:__Attack(Delay) - -
    -
    - -

    Attack Asynchronous Trigger for ZONEGOALCARGO

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:__Capture(Delay) - -
    -
    - -

    Capture Asynchronous Trigger for ZONEGOALCARGO

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:__Empty(Delay) - -
    -
    - -

    Empty Asynchronous Trigger for ZONEGOALCARGO

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:__Guard(Delay) - -
    -
    - -

    Guard Asynchronous Trigger for ZONEGOALCARGO

    - -

    Parameter

    -
      -
    • - -

      #number Delay :

      - -
    • -
    -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:onafterGuard() - -
    -
    - -

    When started, check the Coalition status.

    - -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:onenterAttacked() - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:onenterCaptured() - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:onenterEmpty() - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_GOAL_CARGO:onenterGuarded() - -
    -
    - -

    Bound.

    - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/ZoneGoalCoalition.html b/docs/Documentation/ZoneGoalCoalition.html deleted file mode 100644 index 054c9ff22..000000000 --- a/docs/Documentation/ZoneGoalCoalition.html +++ /dev/null @@ -1,367 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module ZoneGoalCoalition

    - -

    Functional (WIP) -- Base class that models processes to achieve goals involving a Zone for a Coalition.

    - - - -
    - -

    ZONEGOALCOALITION models processes that have a Goal with a defined achievement involving a Zone for a Coalition.
    -Derived classes implement the ways how the achievements can be realized.

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    - -
    - - -

    Global(s)

    - - - - - -
    ZONE_GOAL_COALITION -

    ZONEGOALCOALITION class, extends ZoneGoal#ZONE_GOAL

    - -

    ZONEGOALCOALITION models processes that have a Goal with a defined achievement involving a Zone for a Coalition.

    -
    -

    Type ZONE_GOAL_COALITION

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ZONE_GOAL_COALITION.Coalition - -
    ZONE_GOAL_COALITION:GetCoalition() -

    Get the owning coalition of the zone.

    -
    ZONE_GOAL_COALITION:GetCoalitionName() -

    Get the owning coalition name of the zone.

    -
    ZONE_GOAL_COALITION:New(Zone, Coalition) -

    ZONEGOALCOALITION Constructor.

    -
    ZONE_GOAL_COALITION:SetCoalition(Coalition) -

    Set the owning coalition of the zone.

    -
    ZONE_GOAL_COALITION.States - -
    ZONE_GOAL_COALITION:StatusZone() -

    Check status Coalition ownership.

    -
    - -

    Global(s)

    -
    -
    - - #ZONE_GOAL_COALITION - -ZONE_GOAL_COALITION - -
    -
    - -

    ZONEGOALCOALITION class, extends ZoneGoal#ZONE_GOAL

    - -

    ZONEGOALCOALITION models processes that have a Goal with a defined achievement involving a Zone for a Coalition.

    - - -

    Derived classes implement the ways how the achievements can be realized.

    - -

    1. ZONEGOALCOALITION constructor

    - - - -

    2. ZONEGOALCOALITION is a finite state machine (FSM).

    - -

    2.1 ZONEGOALCOALITION States

    - -

    2.2 ZONEGOALCOALITION Events

    - -

    2.3 ZONEGOALCOALITION State Machine

    - - -
    -
    -

    Type ZoneGoalCoalition

    - -

    Type ZONE_GOAL_COALITION

    -

    Field(s)

    -
    -
    - - - -ZONE_GOAL_COALITION.Coalition - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_GOAL_COALITION:GetCoalition() - -
    -
    - -

    Get the owning coalition of the zone.

    - -

    Return value

    - -

    DCSCoalition.DCSCoalition#coalition: -Coalition.

    - -
    -
    -
    -
    - - -ZONE_GOAL_COALITION:GetCoalitionName() - -
    -
    - -

    Get the owning coalition name of the zone.

    - -

    Return value

    - -

    #string: -Coalition name.

    - -
    -
    -
    -
    - - -ZONE_GOAL_COALITION:New(Zone, Coalition) - -
    -
    - -

    ZONEGOALCOALITION Constructor.

    - -

    Parameters

    - -

    Return value

    - -

    #ZONEGOALCOALITION:

    - - -
    -
    -
    -
    - - -ZONE_GOAL_COALITION:SetCoalition(Coalition) - -
    -
    - -

    Set the owning coalition of the zone.

    - -

    Parameter

    - -
    -
    -
    -
    - - - -ZONE_GOAL_COALITION.States - -
    -
    - - - -
    -
    -
    -
    - - -ZONE_GOAL_COALITION:StatusZone() - -
    -
    - -

    Check status Coalition ownership.

    - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/env.html b/docs/Documentation/env.html deleted file mode 100644 index 7b8b8a626..000000000 --- a/docs/Documentation/env.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    - - - diff --git a/docs/Documentation/index.html b/docs/Documentation/index.html deleted file mode 100644 index 4a5acfd58..000000000 --- a/docs/Documentation/index.html +++ /dev/null @@ -1,780 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AI_A2A -

    AI -- AI A2A Air Patrolling or Staging.

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    -

    Contributions:

    - -
      -
    • Dutch_Baron: Working together with James has resulted in the creation of the AI_BALANCER class.
    • -
    -
    AI_A2A_Cap -

    AI -- Execute Combat Air Patrol (CAP).

    - -

    Banner Image

    - -
    - -

    AI CAP classes makes AI Groups execute a Combat Air Patrol.

    -
    AI_A2A_Dispatcher -

    AI - The AIA2ADISPATCHER creates an automatic A2A defense system based on an EWR network targets and coordinating CAP and GCI.

    -
    AI_A2A_GCI -

    AI -- Execute Ground Controlled Interception (GCI).

    - -

    Banner Image

    - -
    - -

    AI A2A_INTEREPT class makes AI Groups execute an Intercept.

    -
    AI_A2A_Patrol -

    AI -- Air Patrolling or Staging.

    - -

    Banner Image

    - -
    - -

    AI PATROL classes makes AI Groups execute an Patrol.

    -
    AI_Bai -

    AI -- Provide Battlefield Air Interdiction (bombing).

    - -

    Banner Image

    - -
    - -

    AI_BAI classes makes AI Controllables execute bombing tasks.

    -
    AI_Balancer -

    AI -- AI Balancing will replace in multi player missions -non-occupied human slots with AI groups, in order to provide an engaging simulation environment, -even when there are hardly any players in the mission.

    - -

    Banner Image

    - -
    - -

    Demo Missions

    - -

    AI_BALANCER Demo Missions source code

    - -

    AI_BALANCER Demo Missions, only for beta testers

    - -

    ALL Demo Missions pack of the last release

    - -
    - -

    YouTube Channel

    - -

    AI_BALANCER YouTube Channel

    - -
    - -

    Author: Sven Van de Velde (FlightControl)

    -

    Contributions:

    - -
      -
    • Dutch_Baron: Working together with James has resulted in the creation of the AI_BALANCER class.
    • -
    -
    AI_Cap -

    AI -- Execute Combat Air Patrol (CAP).

    - -

    Banner Image

    - -
    - -

    AI CAP classes makes AI Controllables execute a Combat Air Patrol.

    -
    AI_Cas -

    AI -- Provide Close Air Support to friendly ground troops.

    - -

    Banner Image

    - -
    - -

    AI CAS classes makes AI Controllables execute a Close Air Support.

    -
    AI_Formation -

    AI -- Build large formations of AI Groups flying together.

    -
    AI_Patrol -

    AI -- Air Patrolling or Staging.

    - -

    Banner Image

    - -
    - -

    AI PATROL classes makes AI Controllables execute an Patrol.

    -
    ATC_Ground -

    Functional -- The ATC_GROUND classes monitor airbase traffic and regulate speed while taxiing.

    -
    Account -

    Actions - ACTACCOUNT classes account for (detect, count & report) various DCS events occuring on Units.

    -
    Airbase -

    Wrapper -- AIRBASE is a wrapper class to handle the DCS Airbase objects.

    -
    Assign -

    (SP) (MP) (FSM) Accept or reject process for player (task) assignments.

    -
    Base -

    Core -- BASE forms the basis of the MOOSE framework.

    -
    Cargo -

    Core -- Management of CARGO logistics, that can be transported from and to transportation carriers.

    -
    CleanUp -

    Functional -- The CLEANUP_AIRBASE class keeps an area clean of crashing or colliding airplanes.

    -
    Client -

    Wrapper -- CLIENT wraps DCS Unit objects acting as a Client or Player within a mission.

    -
    CommandCenter -

    Tasking -- A COMMANDCENTER is the owner of multiple missions within MOOSE.

    -
    Controllable -

    Wrapper -- CONTROLLABLE is an intermediate class wrapping Group and Unit classes "controllers".

    -
    DCSAirbase - -
    DCSCoalitionObject - -
    DCSCommand - -
    DCSController - -
    DCSGroup - -
    DCSObject - -
    DCSTask - -
    DCSTypes - -
    DCSUnit - -
    DCSVec3 - -
    DCSWorld - -
    DCSZone - -
    DCScountry - -
    DCStimer - -
    DCStrigger - -
    Database -

    Core -- DATABASE manages the database of mission objects.

    -
    Designate -

    Functional -- Management of target Designation.

    -
    Detection -

    Functional -- DETECTION_ classes model the detection of enemy units by FACs or RECCEs and group them according various methods.

    -
    DetectionManager -

    This module contains the DETECTION_MANAGER class and derived classes.

    -
    Escort -

    Functional -- Taking the lead of AI escorting your flight.

    -
    Event -

    Core -- EVENT models DCS event dispatching using a publish-subscribe model.

    -
    Fsm -

    Core -- The FSM (Finite State Machine) class and derived FSM_ classes -are design patterns allowing efficient (long-lasting) processes and workflows.

    -
    Goal -

    Core (WIP) -- Base class to allow the modeling of processes to achieve Goals.

    -
    Group -

    Wrapper -- GROUP wraps the DCS Class Group objects.

    -
    Identifiable -

    Wrapper -- IDENTIFIABLE is an intermediate class wrapping DCS Object class derived Objects.

    -
    Menu -

    Core -- MENU_ classes model the definition of hierarchical menu structures and commands for players within a mission.

    -
    Message -

    Core -- MESSAGE class takes are of the real-time notifications and messages to players during a simulation.

    -
    MissileTrainer -

    Functional -- MISSILETRAINER helps you to train missile avoidance.

    -
    Mission -

    Tasking -- A MISSION is the main owner of a Mission orchestration within MOOSE.

    -
    Movement -

    Functional -- Limit the MOVEMENT of simulaneous moving ground vehicles.

    -
    Object -

    Wrapper -- OBJECT wraps the DCS Object derived objects.

    -
    Point -

    Core -- POINT_VEC classes define an extensive API to manage 3D points in the simulation space.

    -
    Positionable -

    Wrapper -- POSITIONABLE wraps DCS classes that are "positionable".

    -
    Process_JTAC - -
    Process_Pickup - -
    Protect -

    Functional -- The PROTECT class handles the protection of objects, which can be zones, units, scenery.

    -
    Radio -

    Core -- The RADIO Module is responsible for everything that is related to radio transmission and you can hear in DCS, be it TACAN beacons, Radio transmissions...

    -
    Rat -
      -
    • Functional - Create random airtraffic in your missions.
    • -
    -
    Route -

    (SP) (MP) (FSM) Route AI or players through waypoints or to zones.

    -
    Scenery -

    Wrapper -- SCENERY models scenery within the DCS simulator.

    -
    ScheduleDispatcher -

    Core -- SCHEDULEDISPATCHER dispatches the different schedules.

    -
    Scheduler -

    Core -- SCHEDULER prepares and handles the execution of functions over scheduled time (intervals).

    -
    Scoring -

    Functional -- Administer the SCORING of player achievements, -and create a CSV file logging the scoring events for use at team or squadron websites.

    - -

    Banner Image

    - -
    - -

    The #SCORING class administers the scoring of player achievements, -and creates a CSV file logging the scoring events and results for use at team or squadron websites.

    -
    Sead -

    Functional -- Provides defensive behaviour to a set of SAM sites within a running Mission.

    -
    Set -

    Core -- SET_ classes define collections of objects to perform bulk actions and logically group objects.

    -
    Settings -

    Core -- SETTINGS classe defines the format settings management for measurement.

    -
    Smoke -

    (SP) (MP) (FSM) Route AI or players through waypoints or to zones.

    -
    Spawn -

    Core -- SPAWN class dynamically spawns new groups of units in your missions.

    -
    SpawnStatic -

    Core -- Spawn dynamically new STATICs in your missions.

    -
    Spot -

    Core -- Management of SPOT logistics, that can be transported from and to transportation carriers.

    -
    Static -

    Wrapper -- STATIC wraps the DCS StaticObject class.

    -
    StaticObject - -
    Task -

    Tasking -- This module contains the TASK class, the main engine to run human taskings.

    -
    TaskZoneCapture -

    Tasking - The TASK_Protect models tasks for players to protect or capture specific zones.

    -
    Task_A2A -

    Tasking - The TASK_A2A models tasks for players in Air to Air engagements.

    -
    Task_A2A_Dispatcher -

    Tasking - The TASKA2ADISPATCHER creates and manages player TASK_A2A tasks based on detected targets.

    -
    Task_A2G -

    Tasking - The TASK_A2G models tasks for players in Air to Ground engagements.

    -
    Task_A2G_Dispatcher -

    Tasking - The TASKA2GDISPATCHER creates and manages player TASK_A2G tasks based on detected targets.

    -
    Task_Cargo -

    Tasking -- The TASK_CARGO models tasks for players to transport Cargo.

    -
    Task_PICKUP -

    This module contains the TASK_PICKUP classes.

    -
    Unit -

    Wrapper - UNIT is a wrapper class for the DCS Class Unit.

    -
    UserFlag -

    Core (WIP) -- Manage user flags.

    -
    UserSound -

    Core (WIP) -- Manage user sound.

    -
    Utils -

    This module contains derived utilities taken from the MIST framework, -which are excellent tools to be reused in an OO environment!.

    -
    Velocity -

    Core -- VELOCITY models a speed, which can be expressed in various formats according the Settings.

    -
    Zone -

    Core -- ZONE classes define zones within your mission of various forms, with various capabilities.

    -
    ZoneCaptureCoalition -

    Functional -- (WIP R2.3) Models the process to capture a Zone for a Coalition, which is guarded by another Coalition.

    -
    ZoneGoal -

    Functional (WIP) -- Base class that models processes to achieve goals involving a Zone.

    -
    ZoneGoalCargo -

    Functional (WIP) -- Base class that models processes to achieve goals involving a Zone and Cargo.

    -
    ZoneGoalCoalition -

    Functional (WIP) -- Base class that models processes to achieve goals involving a Zone for a Coalition.

    -
    env - -
    land - -
    routines -

    Various routines

    -
    -
    - -
    - - diff --git a/docs/Documentation/land.html b/docs/Documentation/land.html deleted file mode 100644 index 1369d87b8..000000000 --- a/docs/Documentation/land.html +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module land

    - - - -

    Global(s)

    - - - - - -
    land - -
    -

    Type land

    - - - - - - - - - - - - - -
    land.SurfaceType - -
    land.getHeight(point) -

    Returns altitude MSL of the point.

    -
    land.getSurfaceType(point) -

    returns surface type at the given point.

    -
    - -

    Type land.SurfaceType

    - - - - - - - - - - - - - - - - - - - - - -
    land.SurfaceType.LAND - -
    land.SurfaceType.ROAD - -
    land.SurfaceType.RUNWAY - -
    land.SurfaceType.SHALLOW_WATER - -
    land.SurfaceType.WATER - -
    - -

    Global(s)

    -
    -
    - - #land - -land - -
    -
    - - - -
    -
    -

    Type land

    -

    Field(s)

    -
    -
    - - #land.SurfaceType - -land.SurfaceType - -
    -
    - - - -
    -
    -
    -
    - - -land.getHeight(point) - -
    -
    - -

    Returns altitude MSL of the point.

    - -

    Parameter

    -
      -
    • - -

      #Vec2 point : -point on the ground.

      - -
    • -
    -

    Return value

    - -

    Dcs.DCSTypes#Distance:

    - - -
    -
    -
    -
    - - -land.getSurfaceType(point) - -
    -
    - -

    returns surface type at the given point.

    - -

    Parameter

    -
      -
    • - -

      #Vec2 point : -Point on the land.

      - -
    • -
    -

    Return value

    - -

    #land.SurfaceType:

    - - -
    -
    - -

    Type Vec2

    - -

    Type land.SurfaceType

    -

    Field(s)

    -
    -
    - - -land.SurfaceType.LAND - -
    -
    - - - -
    -
    -
    -
    - - -land.SurfaceType.ROAD - -
    -
    - - - -
    -
    -
    -
    - - -land.SurfaceType.RUNWAY - -
    -
    - - - -
    -
    -
    -
    - - -land.SurfaceType.SHALLOW_WATER - -
    -
    - - - -
    -
    -
    -
    - - -land.SurfaceType.WATER - -
    -
    - - - -
    -
    - -
    - -
    - - diff --git a/docs/Documentation/routines.html b/docs/Documentation/routines.html deleted file mode 100644 index ccea4da2e..000000000 --- a/docs/Documentation/routines.html +++ /dev/null @@ -1,1255 +0,0 @@ - - - - - - -
    -
    - -
    -
    -
    -
    - -
    -

    Module routines

    - -

    Various routines

    - -

    Global(s)

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Alive - -
    ChooseInfantry(TeleportPrefixTable, TeleportMax) - -
    EscortCarrier(CarrierGroup, EscortPrefix, EscortLastWayPoint, EscortEngagementDistanceMax, EscortTargetTypes) - -
    EscortCount - -
    EscortMissionName - -
    GetUnitHeight(CheckUnit) - -
    GroupAlive(groupName) - -
    LandCarrier(CarrierGroup, LandingZonePrefix) - -
    MessageToAll(MsgText, MsgTime, MsgName) - -
    MessageToBlue(MsgText, MsgTime, MsgName) - -
    MessageToUnit(UnitName, MsgText, MsgTime, MsgName) - -
    MusicRegister(SndRef, SndFile, SndTime) - -
    MusicReset(flg) - -
    MusicToPlayer(SndRef, PlayerName, SndContinue) - -
    PlaneActivate(groupNameFormat, flg) - -
    PlayerGroup - -
    SendMessageToCarrier(CarrierGroup, CarrierMessage) - -
    SpawnSettings - -
    SpawnedInfantry - -
    Su34AttackCarlVinson(groupName) - -
    Su34AttackNorth(groupName) - -
    Su34AttackWest(groupName) - -
    Su34Destroyed(groupName) - -
    Su34Hold(groupName) - -
    Su34IsDead() - -
    Su34Menu(groupName) - -
    Su34MenuPath - -
    Su34Menus - -
    Su34Orbit(groupName) - -
    Su34OverviewStatus() - -
    Su34RTB(groupName) - -
    Su34Status - -
    Su34TakeOff(groupName) - -
    TeleportPrefixTableCount - -
    TeleportPrefixTableIndex - -
    UpdateBoardMsg() - -
    _MusicTable - -
    boardMsgAll - -
    boardMsgRed - -
    getCarrierHeight(CarrierGroup) - -
    lookup_table - -
    routines - -
    spairs(t, order) - -
    -

    Global(s)

    -
    -
    - - - -Alive - -
    -
    - - - -
    -
    -
    -
    - - -ChooseInfantry(TeleportPrefixTable, TeleportMax) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      TeleportPrefixTable :

      - -
    • -
    • - -

      TeleportMax :

      - -
    • -
    -
    -
    -
    -
    - - -EscortCarrier(CarrierGroup, EscortPrefix, EscortLastWayPoint, EscortEngagementDistanceMax, EscortTargetTypes) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      CarrierGroup :

      - -
    • -
    • - -

      EscortPrefix :

      - -
    • -
    • - -

      EscortLastWayPoint :

      - -
    • -
    • - -

      EscortEngagementDistanceMax :

      - -
    • -
    • - -

      EscortTargetTypes :

      - -
    • -
    -
    -
    -
    -
    - - #number - -EscortCount - -
    -
    - - - -
    -
    -
    -
    - - - -EscortMissionName - -
    -
    - - - -
    -
    -
    -
    - - -GetUnitHeight(CheckUnit) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      CheckUnit :

      - -
    • -
    -
    -
    -
    -
    - - -GroupAlive(groupName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      groupName :

      - -
    • -
    -
    -
    -
    -
    - - -LandCarrier(CarrierGroup, LandingZonePrefix) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      CarrierGroup :

      - -
    • -
    • - -

      LandingZonePrefix :

      - -
    • -
    -
    -
    -
    -
    - - -MessageToAll(MsgText, MsgTime, MsgName) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      MsgText :

      - -
    • -
    • - -

      MsgTime :

      - -
    • -
    • - -

      MsgName :

      - -
    • -
    -
    -
    -
    -
    - - -MessageToBlue(MsgText, MsgTime, MsgName) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      MsgText :

      - -
    • -
    • - -

      MsgTime :

      - -
    • -
    • - -

      MsgName :

      - -
    • -
    -
    -
    -
    -
    - - -MessageToUnit(UnitName, MsgText, MsgTime, MsgName) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      UnitName :

      - -
    • -
    • - -

      MsgText :

      - -
    • -
    • - -

      MsgTime :

      - -
    • -
    • - -

      MsgName :

      - -
    • -
    -
    -
    -
    -
    - - -MusicRegister(SndRef, SndFile, SndTime) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      SndRef :

      - -
    • -
    • - -

      SndFile :

      - -
    • -
    • - -

      SndTime :

      - -
    • -
    -
    -
    -
    -
    - - -MusicReset(flg) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      flg :

      - -
    • -
    -
    -
    -
    -
    - - -MusicToPlayer(SndRef, PlayerName, SndContinue) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      SndRef :

      - -
    • -
    • - -

      PlayerName :

      - -
    • -
    • - -

      SndContinue :

      - -
    • -
    -
    -
    -
    -
    - - -PlaneActivate(groupNameFormat, flg) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      groupNameFormat :

      - -
    • -
    • - -

      flg :

      - -
    • -
    -
    -
    -
    -
    - - - -PlayerGroup - -
    -
    - - - -
    -
    -
    -
    - - -SendMessageToCarrier(CarrierGroup, CarrierMessage) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      CarrierGroup :

      - -
    • -
    • - -

      CarrierMessage :

      - -
    • -
    -
    -
    -
    -
    - - - -SpawnSettings - -
    -
    - - - -
    -
    -
    -
    - - #number - -SpawnedInfantry - -
    -
    - - - -
    -
    -
    -
    - - -Su34AttackCarlVinson(groupName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      groupName :

      - -
    • -
    -
    -
    -
    -
    - - -Su34AttackNorth(groupName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      groupName :

      - -
    • -
    -
    -
    -
    -
    - - -Su34AttackWest(groupName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      groupName :

      - -
    • -
    -
    -
    -
    -
    - - -Su34Destroyed(groupName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      groupName :

      - -
    • -
    -
    -
    -
    -
    - - -Su34Hold(groupName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      groupName :

      - -
    • -
    -
    -
    -
    -
    - - -Su34IsDead() - -
    -
    - - - -
    -
    -
    -
    - - -Su34Menu(groupName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      groupName :

      - -
    • -
    -
    -
    -
    -
    - - - -Su34MenuPath - -
    -
    - - - -
    -
    -
    -
    - - #number - -Su34Menus - -
    -
    - - - -
    -
    -
    -
    - - -Su34Orbit(groupName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      groupName :

      - -
    • -
    -
    -
    -
    -
    - - -Su34OverviewStatus() - -
    -
    - - - -
    -
    -
    -
    - - -Su34RTB(groupName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      groupName :

      - -
    • -
    -
    -
    -
    -
    - - - -Su34Status - -
    -
    - - - -
    -
    -
    -
    - - -Su34TakeOff(groupName) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      groupName :

      - -
    • -
    -
    -
    -
    -
    - - -TeleportPrefixTableCount - -
    -
    - - - -
    -
    -
    -
    - - - -TeleportPrefixTableIndex - -
    -
    - - - -
    -
    -
    -
    - - -UpdateBoardMsg() - -
    -
    - - - -
    -
    -
    -
    - - - -_MusicTable - -
    -
    - - - -
    -
    -
    -
    - - - -boardMsgAll - -
    -
    - - - -
    -
    -
    -
    - - - -boardMsgRed - -
    -
    - - - -
    -
    -
    -
    - - -getCarrierHeight(CarrierGroup) - -
    -
    - - - -

    Parameter

    -
      -
    • - -

      CarrierGroup :

      - -
    • -
    -
    -
    -
    -
    - - - -lookup_table - -
    -
    - - - -
    -
    -
    -
    - - - -routines - -
    -
    - - - -
    -
    -
    -
    - - -spairs(t, order) - -
    -
    - - - -

    Parameters

    -
      -
    • - -

      t :

      - -
    • -
    • - -

      order :

      - -
    • -
    -
    -
    -

    Type routines

    - -
    - -
    - - diff --git a/docs/Documentation/stylesheet.css b/docs/Documentation/stylesheet.css deleted file mode 100644 index 206209132..000000000 --- a/docs/Documentation/stylesheet.css +++ /dev/null @@ -1,1038 +0,0 @@ -/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ - -/** - * 1. Set default font family to sans-serif. - * 2. Prevent iOS text size adjust after orientation change, without disabling - * user zoom. - */ - -@import url('https://fonts.googleapis.com/css?family=Architects+Daughter'); - -html { - font-family: sans-serif; /* 1 */ - -webkit-text-size-adjust: 100%; /* 2 */ - -ms-text-size-adjust: 100%; /* 2 */ -} - -/** - * Remove default margin. - */ - -body { - margin: 0; -} - -/* HTML5 display definitions - ========================================================================== */ - -/** - * Correct `block` display not defined for any HTML5 element in IE 8/9. - * Correct `block` display not defined for `details` or `summary` in IE 10/11 - * and Firefox. - * Correct `block` display not defined for `main` in IE 11. - */ - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -menu, -nav, -section, -summary { - display: block; -} - -/** - * 1. Correct `inline-block` display not defined in IE 8/9. - * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. - */ - -audio, -canvas, -progress, -video { - display: inline-block; /* 1 */ - vertical-align: baseline; /* 2 */ -} - -/** - * Prevent modern browsers from displaying `audio` without controls. - * Remove excess height in iOS 5 devices. - */ - -audio:not([controls]) { - display: none; - height: 0; -} - -/** - * Address `[hidden]` styling not present in IE 8/9/10. - * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. - */ - -[hidden], -template { - display: none; -} - -/* Links - ========================================================================== */ - -/** - * Remove the gray background color from active links in IE 10. - */ - -a { - background-color: transparent; -} - -/** - * Improve readability when focused and also mouse hovered in all browsers. - */ - -a:active, -a:hover { - outline: 0; -} - -/* Text-level semantics - ========================================================================== */ - -/** - * Address styling not present in IE 8/9/10/11, Safari, and Chrome. - */ - -abbr[title] { - border-bottom: 1px dotted; -} - -/** - * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. - */ - -b, -strong { - font-weight: bold; -} - -/** - * Address styling not present in Safari and Chrome. - */ - -dfn { - font-style: italic; -} - -/** - * Address variable `h1` font-size and margin within `section` and `article` - * contexts in Firefox 4+, Safari, and Chrome. - */ - -h1 { - margin: 0.67em 0; - font-size: 2em; -} - -/** - * Address styling not present in IE 8/9. - */ - -mark { - color: #000; - background: #ff0; -} - -/** - * Address inconsistent and variable font size in all browsers. - */ - -small { - font-size: 80%; -} - -/** - * Prevent `sub` and `sup` affecting `line-height` in all browsers. - */ - -sub, -sup { - position: relative; - font-size: 75%; - line-height: 0; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -/* Embedded content - ========================================================================== */ - -/** - * Remove border when inside `a` element in IE 8/9/10. - */ - -img { - border: 0; - max-width:100%; - height:auto; -} - -/** - * Correct overflow not hidden in IE 9/10/11. - */ - -svg:not(:root) { - overflow: hidden; -} - -/* Grouping content - ========================================================================== */ - -/** - * Address margin not present in IE 8/9 and Safari. - */ - -figure { - margin: 1em 40px; -} - -/** - * Address differences between Firefox and other browsers. - */ - -hr { - height: 0; - -moz-box-sizing: content-box; - box-sizing: content-box; -} - -/** - * Contain overflow in all browsers. - */ - -pre { - overflow: auto; -} - -/** - * Address odd `em`-unit font size rendering in all browsers. - */ - -code, -kbd, -pre, -samp { - font-family: monospace, monospace; - font-size: 1em; -} - -/* Forms - ========================================================================== */ - -/** - * Known limitation: by default, Chrome and Safari on OS X allow very limited - * styling of `select`, unless a `border` property is set. - */ - -/** - * 1. Correct color not being inherited. - * Known issue: affects color of disabled elements. - * 2. Correct font properties not being inherited. - * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. - */ - -button, -input, -optgroup, -select, -textarea { - margin: 0; /* 3 */ - font: inherit; /* 2 */ - color: inherit; /* 1 */ -} - -/** - * Address `overflow` set to `hidden` in IE 8/9/10/11. - */ - -button { - overflow: visible; -} - -/** - * Address inconsistent `text-transform` inheritance for `button` and `select`. - * All other form control elements do not inherit `text-transform` values. - * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. - * Correct `select` style inheritance in Firefox. - */ - -button, -select { - text-transform: none; -} - -/** - * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` - * and `video` controls. - * 2. Correct inability to style clickable `input` types in iOS. - * 3. Improve usability and consistency of cursor style between image-type - * `input` and others. - */ - -button, -html input[type="button"], /* 1 */ -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; /* 2 */ - cursor: pointer; /* 3 */ -} - -/** - * Re-set default cursor for disabled elements. - */ - -button[disabled], -html input[disabled] { - cursor: default; -} - -/** - * Remove inner padding and border in Firefox 4+. - */ - -button::-moz-focus-inner, -input::-moz-focus-inner { - padding: 0; - border: 0; -} - -/** - * Address Firefox 4+ setting `line-height` on `input` using `!important` in - * the UA stylesheet. - */ - -input { - line-height: normal; -} - -/** - * It's recommended that you don't attempt to style these elements. - * Firefox's implementation doesn't respect box-sizing, padding, or width. - * - * 1. Address box sizing set to `content-box` in IE 8/9/10. - * 2. Remove excess padding in IE 8/9/10. - */ - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Fix the cursor style for Chrome's increment/decrement buttons. For certain - * `font-size` values of the `input`, it causes the cursor style of the - * decrement button to change from `default` to `text`. - */ - -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -/** - * 1. Address `appearance` set to `searchfield` in Safari and Chrome. - * 2. Address `box-sizing` set to `border-box` in Safari and Chrome - * (include `-moz` to future-proof). - */ - -input[type="search"] { - -webkit-box-sizing: content-box; /* 2 */ - -moz-box-sizing: content-box; - box-sizing: content-box; - -webkit-appearance: textfield; /* 1 */ -} - -/** - * Remove inner padding and search cancel button in Safari and Chrome on OS X. - * Safari (but not Chrome) clips the cancel button when the search input has - * padding (and `textfield` appearance). - */ - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * Define consistent border, margin, and padding. - */ - -fieldset { - padding: 0.35em 0.625em 0.75em; - margin: 0 2px; - border: 1px solid #c0c0c0; -} - -/** - * 1. Correct `color` not being inherited in IE 8/9/10/11. - * 2. Remove padding so people aren't caught out if they zero out fieldsets. - */ - -legend { - padding: 0; /* 2 */ - border: 0; /* 1 */ -} - -/** - * Remove default vertical scrollbar in IE 8/9/10/11. - */ - -textarea { - overflow: auto; -} - -/** - * Don't inherit the `font-weight` (applied by a rule above). - * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. - */ - -optgroup { - font-weight: bold; -} - -/* Tables - ========================================================================== */ - -/** - * Remove most spacing between table cells. - */ - -table { - border-spacing: 0; - border-collapse: collapse; -} - -td, -th { - padding: 0; -} - -/* LAYOUT STYLES */ -body { - font-family: 'Helvetica Neue', Helvetica, Arial, serif; - font-size: 15px; - font-weight: 400; - line-height: 1.5; - color: #666; - background: #fafafa url(../../images/body-bg.jpg) 0 0 repeat; - margin-left: 1em; - margin-right: 1em; - margin: 0px; -} - -p { - margin-top: 0; -} - - -a { - color: #2879d0; -} -a:hover { - color: #2268b2; -} - -header { - padding-top: 40px; - padding-bottom: 40px; - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - background: #2e7bcf url(../images/header-bg.jpg) 0 0 repeat-x; - border-bottom: solid 1px #275da1; -} - -h1 { - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - font-size: 32px; - font-weight: normal; - line-height: 1.5; -} - -h2 { - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - font-size: 26px; - font-weight: normal; - line-height: 1.3; -} - -h3 { - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - font-size: 22px; - font-weight: normal; - line-height: 1.1; -} - -.inner { - position: relative; - width: 940px; - margin: 0 auto; -} - -#content-wrapper { - padding-top: 30px; - border-top: solid 1px #fff; -} - -#main-content { - float: left; - width: 690px; -} - -#main-content img { - max-width: 100%; - height: auto; -} - -aside#sidebar { - float: right; - width: 200px; - min-height: 504px; - padding-left: 20px; - font-size: 12px; - line-height: 1.3; - background: transparent url(../../images/sidebar-bg.jpg) 0 0 no-repeat; -} - -aside#sidebar p.repo-owner, -aside#sidebar p.repo-owner a { - font-weight: bold; -} - -#downloads { - margin-bottom: 40px; -} - -a.button { - width: 134px; - height: 58px; - padding-top: 22px; - padding-left: 68px; - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - font-size: 23px; - line-height: 1.2; - color: #fff; -} -a.button small { - display: block; - font-size: 11px; -} -header a.button { - position: absolute; - top: 0; - right: 0; - background: transparent url(../images/github-button.png) 0 0 no-repeat; -} -aside a.button { - display: block; - width: 138px; - padding-left: 64px; - margin-bottom: 20px; - font-size: 21px; - background: transparent url(../images/download-button.png) 0 0 no-repeat; -} - -code, pre { - margin-bottom: 30px; - font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace; - font-size: 13px; - color: #222; -} - -code { - padding: 0 3px; - background-color: #f2f8fc; - border: solid 1px #dbe7f3; -} - -pre { - padding: 20px; - overflow: auto; - text-shadow: none; - background: #fff; - border: solid 1px #f2f2f2; -} -pre code { - padding: 0; - color: #2879d0; - background-color: #fff; - border: none; -} - -ul, ol, dl { - margin-bottom: 20px; -} - - -/* COMMON STYLES */ - -hr { - height: 0; - margin-top: 1em; - margin-bottom: 1em; - border: 0; - border-top: solid 1px #ddd; -} - -table { - width: 100%; - border: 1px solid #ebebeb; -} - -th { - font-weight: 500; -} - -td { - font-weight: 300; - text-align: center; - border: 1px solid #ebebeb; -} - -form { - padding: 20px; - background: #f2f2f2; - -} - - -/* GENERAL ELEMENT TYPE STYLES */ - -#main-content h1 { - margin-top: 0; - margin-bottom: 0; - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - font-size: 2.8em; - font-weight: normal; - color: #474747; - text-indent: 6px; - letter-spacing: -1px; -} - -#main-content h1:before { - padding-right: 0.3em; - margin-left: -0.9em; - color: #9ddcff; - content: "/"; -} - -#main-content h2 { - margin-bottom: 8px; - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - font-size: 22px; - font-weight: bold; - color: #474747; - text-indent: 4px; -} -#main-content h2:before { - padding-right: 0.3em; - margin-left: -1.5em; - content: "//"; - color: #9ddcff; -} - -#main-content h3 { - margin-top: 24px; - margin-bottom: 8px; - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - font-size: 18px; - font-weight: bold; - color: #474747; - text-indent: 3px; -} - -#main-content h3:before { - padding-right: 0.3em; - margin-left: -2em; - content: "///"; - color: #9ddcff; -} - -#main-content h4 { - margin-bottom: 8px; - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - font-size: 15px; - font-weight: bold; - color: #474747; - text-indent: 3px; -} - -h4:before { - padding-right: 0.3em; - margin-left: -2.8em; - content: "////"; - color: #9ddcff; -} - -#main-content h5 { - margin-bottom: 8px; - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - font-size: 14px; - color: #474747; - text-indent: 3px; -} -h5:before { - padding-right: 0.3em; - margin-left: -3.2em; - content: "/////"; - color: #9ddcff; -} - -#main-content h6 { - margin-bottom: 8px; - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - font-size: .8em; - color: #474747; - text-indent: 3px; -} -h6:before { - padding-right: 0.3em; - margin-left: -3.7em; - content: "//////"; - color: #9ddcff; -} - -p { - margin-bottom: 20px; -} - -a { - text-decoration: none; -} - -p a { - font-weight: 400; -} - -blockquote { - padding: 0 0 0 30px; - margin-bottom: 20px; - font-size: 1.6em; - border-left: 10px solid #e9e9e9; -} - -ul { - list-style-position: inside; - list-style: disc; - padding-left: 20px; -} - -ol { - list-style-position: inside; - list-style: decimal; - padding-left: 3px; -} - -footer { - padding-top: 20px; - padding-bottom: 30px; - margin-top: 40px; - font-size: 13px; - color: #aaa; - background: transparent url('../../images/hr.png') 0 0 no-repeat; -} - -footer a { - color: #666; -} -footer a:hover { - color: #444; -} - -/* MISC */ -.clearfix:after { - display: block; - height: 0; - clear: both; - visibility: hidden; - content: '.'; -} - -.clearfix {display: inline-block;} -* html .clearfix {height: 1%;} -.clearfix {display: block;} - -/* #Media Queries -================================================== */ - -/* Smaller than standard 960 (devices and browsers) */ -@media only screen and (max-width: 959px) { } - -/* Tablet Portrait size to standard 960 (devices and browsers) */ -@media only screen and (min-width: 768px) and (max-width: 959px) { - .inner { - width: 740px; - } - header h1, header h2 { - width: 340px; - } - header h1 { - font-size: 60px; - } - header h2 { - font-size: 30px; - } - #main-content { - width: 490px; - } - #main-content h1:before, - #main-content h2:before, - #main-content h3:before, - #main-content h4:before, - #main-content h5:before, - #main-content h6:before { - padding-right: 0; - margin-left: 0; - content: none; - } -} - -/* All Mobile Sizes (devices and browser) */ -@media only screen and (max-width: 767px) { - .inner { - width: 93%; - } - header { - padding: 20px 0; - } - header .inner { - position: relative; - } - header h1, header h2 { - width: 100%; - } - header h1 { - font-size: 48px; - } - header h2 { - font-size: 24px; - } - header a.button { - position: relative; - display: inline-block; - width: auto; - height: auto; - padding: 5px 10px; - margin-top: 15px; - font-size: 13px; - line-height: 1; - color: #2879d0; - text-align: center; - background-color: #9ddcff; - background-image: none; - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - } - header a.button small { - display: inline; - font-size: 13px; - } - #main-content, - aside#sidebar { - float: none; - width: 100% ! important; - } - aside#sidebar { - min-height: 0; - padding: 20px 0; - margin-top: 20px; - background-image: none; - border-top: solid 1px #ddd; - } - aside#sidebar a.button { - display: none; - } - #main-content h1:before, - #main-content h2:before, - #main-content h3:before, - #main-content h4:before, - #main-content h5:before, - #main-content h6:before { - padding-right: 0; - margin-left: 0; - content: none; - } -} - -/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */ -@media only screen and (min-width: 480px) and (max-width: 767px) { } - -/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */ -@media only screen and (max-width: 479px) { } - - -#container { - margin-left: 1em; - margin-right: 1em; - background-color: #f0f0f0; -} - -#product { - text-align: center; - border-bottom: 1px solid #cccccc; - background-color: #ffffff; -} - -#product big { - font-size: 2em; -} - -#main { - color: #666; - background: #fafafa url(../../images/body-bg.jpg) 0 0 repeat; - border-left: 2px solid #cccccc; -} - -#navigation { - float: left; - width: 18em; - vertical-align: top; - overflow: scroll; - position: fixed; - height:100%; - background: #2e7bcf url(../../images/header-bg.jpg) 0 0 repeat-x; - color: #fff; -} - -#navigation h2 { - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - background: #2e7bcf url(../images/header-bg.jpg) 0 0 repeat-x; - border-bottom: solid 1px #275da1; - width: 540px; - margin-top: 0; - margin-bottom: 0.2em; - font-size: 36px; - font-weight: normal; - line-height: 1; - color: #fff; - letter-spacing: -1px; - text-align: left; - padding:0.2em; - border-top:1px solid #dddddd; -} - -#navigation ul -{ - font-size:1em; - list-style-type: none; - margin: 1px 1px 10px 1px; - color: #fff; -} - -#navigation li { - text-indent: -1em; - display: block; - margin: 3px 0px 0px 22px; - color: #fff; -} - -#navigation ul li a { - color: #fff; -} - - -#navigation li li a { - margin: 0px 3px 0px -1em; - color: #fff; -} - -#content { - margin-left: 18em; - padding: 1em; - border-left: 2px solid #cccccc; - border-right: 2px solid #cccccc; - background-color: #ffffff; -} - - -#content h2 a { - color: #000; - border-bottom: 1px solid #000; -} - -#content h2 a code { -font-size: 22px; -font-weight: 400; -background-color: transparent; -color: #2879d0; -border: none; -} - -#content h1 code { -font-size: 26px; -font-weight: 400; -background-color: transparent; -border: none; -} - -#about { - clear: both; - padding: 5px; - border-top: 2px solid #cccccc; - background-color: #ffffff; -} - -table.function_list { - border-width: 1px; - border-style: solid; - border-color: #cccccc; - border-collapse: collapse; -} - -table.function_list td { - border-width: 1px; - padding: 3px; - border-style: solid; - border-color: #cccccc; - word-wrap:break-word; -} - -table.function_list td.name { font-weight: 400; width:50%; white-space: normal; text-align:left;} -table.function_list td.summary { width: 50%; } - - -dl.table dt, dl.function { - border-left: 1px solid #ccc; - border-right: 1px solid #ccc; - border-bottom: 1px solid #ccc; -} - -dl.table dt, dl.function dt { - border-top: 1px solid #000; - padding-top: 0.5em; - padding-bottom: 0.5em; - border-bottom: 1px solid #ccc; -} - -dl.table dd, dl.function dd { - padding-bottom: 0.5em; - margin: 20px 0 0 20px; -} - -dl.table dd, dl.function dd p { - font-weight : normal; -} - -dl.table h3, dl.function h3 {font-size: 1.5em;} diff --git a/docs/Installation/DCS_Triggers_Empty.JPG b/docs/Installation/DCS_Triggers_Empty.JPG deleted file mode 100644 index 2daab421e..000000000 Binary files a/docs/Installation/DCS_Triggers_Empty.JPG and /dev/null differ diff --git a/docs/Installation/DCS_Triggers_Load_Mission_Add.JPG b/docs/Installation/DCS_Triggers_Load_Mission_Add.JPG deleted file mode 100644 index 68335a57b..000000000 Binary files a/docs/Installation/DCS_Triggers_Load_Mission_Add.JPG and /dev/null differ diff --git a/docs/Installation/DCS_Triggers_Load_Mission_File_Added.JPG b/docs/Installation/DCS_Triggers_Load_Mission_File_Added.JPG deleted file mode 100644 index 7faa21e48..000000000 Binary files a/docs/Installation/DCS_Triggers_Load_Mission_File_Added.JPG and /dev/null differ diff --git a/docs/Installation/DCS_Triggers_Load_Mission_File_Select.JPG b/docs/Installation/DCS_Triggers_Load_Mission_File_Select.JPG deleted file mode 100644 index 34febf8c2..000000000 Binary files a/docs/Installation/DCS_Triggers_Load_Mission_File_Select.JPG and /dev/null differ diff --git a/docs/Installation/DCS_Triggers_Load_Moose_Add.JPG b/docs/Installation/DCS_Triggers_Load_Moose_Add.JPG deleted file mode 100644 index b12c4d94d..000000000 Binary files a/docs/Installation/DCS_Triggers_Load_Moose_Add.JPG and /dev/null differ diff --git a/docs/Installation/DCS_Triggers_Load_Moose_File_Added.JPG b/docs/Installation/DCS_Triggers_Load_Moose_File_Added.JPG deleted file mode 100644 index 56ee0e742..000000000 Binary files a/docs/Installation/DCS_Triggers_Load_Moose_File_Added.JPG and /dev/null differ diff --git a/docs/Installation/DCS_Triggers_Load_Moose_Select_File.JPG b/docs/Installation/DCS_Triggers_Load_Moose_Select_File.JPG deleted file mode 100644 index 21a8f1f21..000000000 Binary files a/docs/Installation/DCS_Triggers_Load_Moose_Select_File.JPG and /dev/null differ diff --git a/docs/Installation/GitHub_Clone.JPG b/docs/Installation/GitHub_Clone.JPG deleted file mode 100644 index 7ea187890..000000000 Binary files a/docs/Installation/GitHub_Clone.JPG and /dev/null differ diff --git a/docs/Installation/GitHub_Issue_example.JPG b/docs/Installation/GitHub_Issue_example.JPG deleted file mode 100644 index 4107ca45a..000000000 Binary files a/docs/Installation/GitHub_Issue_example.JPG and /dev/null differ diff --git a/docs/Installation/LDT_Add_Folder.JPG b/docs/Installation/LDT_Add_Folder.JPG deleted file mode 100644 index 919f4821e..000000000 Binary files a/docs/Installation/LDT_Add_Folder.JPG and /dev/null differ diff --git a/docs/Installation/LDT_Delete_Src.JPG b/docs/Installation/LDT_Delete_Src.JPG deleted file mode 100644 index 8093f335f..000000000 Binary files a/docs/Installation/LDT_Delete_Src.JPG and /dev/null differ diff --git a/docs/Installation/LDT_Mission_Folder_Name.JPG b/docs/Installation/LDT_Mission_Folder_Name.JPG deleted file mode 100644 index 5d7f7d1b4..000000000 Binary files a/docs/Installation/LDT_Mission_Folder_Name.JPG and /dev/null differ diff --git a/docs/Installation/LDT_Mission_Lua_File_Name.JPG b/docs/Installation/LDT_Mission_Lua_File_Name.JPG deleted file mode 100644 index a18694315..000000000 Binary files a/docs/Installation/LDT_Mission_Lua_File_Name.JPG and /dev/null differ diff --git a/docs/Installation/LDT_Moose_Framework_Finish.JPG b/docs/Installation/LDT_Moose_Framework_Finish.JPG deleted file mode 100644 index a97887e29..000000000 Binary files a/docs/Installation/LDT_Moose_Framework_Finish.JPG and /dev/null differ diff --git a/docs/Installation/LDT_New_Lua_File.JPG b/docs/Installation/LDT_New_Lua_File.JPG deleted file mode 100644 index 376ca4453..000000000 Binary files a/docs/Installation/LDT_New_Lua_File.JPG and /dev/null differ diff --git a/docs/Installation/LDT_New_Project.JPG b/docs/Installation/LDT_New_Project.JPG deleted file mode 100644 index fb9894a01..000000000 Binary files a/docs/Installation/LDT_New_Project.JPG and /dev/null differ diff --git a/docs/Installation/LDT_New_Project_Projects.JPG b/docs/Installation/LDT_New_Project_Projects.JPG deleted file mode 100644 index 6598fc253..000000000 Binary files a/docs/Installation/LDT_New_Project_Projects.JPG and /dev/null differ diff --git a/docs/Installation/LDT_Project.JPG b/docs/Installation/LDT_Project.JPG deleted file mode 100644 index 2faedee6b..000000000 Binary files a/docs/Installation/LDT_Project.JPG and /dev/null differ diff --git a/docs/Installation/LDT_Project_Existing_Location.JPG b/docs/Installation/LDT_Project_Existing_Location.JPG deleted file mode 100644 index a36765470..000000000 Binary files a/docs/Installation/LDT_Project_Existing_Location.JPG and /dev/null differ diff --git a/docs/Installation/LDT_Project_My_Missions.JPG b/docs/Installation/LDT_Project_My_Missions.JPG deleted file mode 100644 index 72613f549..000000000 Binary files a/docs/Installation/LDT_Project_My_Missions.JPG and /dev/null differ diff --git a/docs/Installation/LDT_Project_Source_Directory.JPG b/docs/Installation/LDT_Project_Source_Directory.JPG deleted file mode 100644 index 142616a14..000000000 Binary files a/docs/Installation/LDT_Project_Source_Directory.JPG and /dev/null differ diff --git a/docs/Installation/LDT_Script_Explorer.JPG b/docs/Installation/LDT_Script_Explorer.JPG deleted file mode 100644 index fc58d0582..000000000 Binary files a/docs/Installation/LDT_Script_Explorer.JPG and /dev/null differ diff --git a/docs/Installation/LDT_Select_Moose_Framework.JPG b/docs/Installation/LDT_Select_Moose_Framework.JPG deleted file mode 100644 index 8252e05c9..000000000 Binary files a/docs/Installation/LDT_Select_Moose_Framework.JPG and /dev/null differ diff --git a/docs/Installation/MDES_Splash_Screen.JPG b/docs/Installation/MDES_Splash_Screen.JPG deleted file mode 100644 index 2084e4768..000000000 Binary files a/docs/Installation/MDES_Splash_Screen.JPG and /dev/null differ diff --git a/docs/Installation/MOOSE_Release_Cycle.JPG b/docs/Installation/MOOSE_Release_Cycle.JPG deleted file mode 100644 index 29e41a618..000000000 Binary files a/docs/Installation/MOOSE_Release_Cycle.JPG and /dev/null differ diff --git a/docs/Installation/Originals/LDT_Moose_Framework_Finish.JPG b/docs/Installation/Originals/LDT_Moose_Framework_Finish.JPG deleted file mode 100644 index b433f392c..000000000 Binary files a/docs/Installation/Originals/LDT_Moose_Framework_Finish.JPG and /dev/null differ diff --git a/docs/Installation/Originals/LDT_New_Project.JPG b/docs/Installation/Originals/LDT_New_Project.JPG deleted file mode 100644 index 0d0fe94e7..000000000 Binary files a/docs/Installation/Originals/LDT_New_Project.JPG and /dev/null differ diff --git a/docs/Installation/Originals/LDT_Project.JPG b/docs/Installation/Originals/LDT_Project.JPG deleted file mode 100644 index ac36141e4..000000000 Binary files a/docs/Installation/Originals/LDT_Project.JPG and /dev/null differ diff --git a/docs/Installation/Originals/LDT_Project_Source_Directory.JPG b/docs/Installation/Originals/LDT_Project_Source_Directory.JPG deleted file mode 100644 index abb1e78ad..000000000 Binary files a/docs/Installation/Originals/LDT_Project_Source_Directory.JPG and /dev/null differ diff --git a/docs/Installation/Originals/LDT_Script_Explorer.JPG b/docs/Installation/Originals/LDT_Script_Explorer.JPG deleted file mode 100644 index 67df16696..000000000 Binary files a/docs/Installation/Originals/LDT_Script_Explorer.JPG and /dev/null differ diff --git a/docs/Installation/README.md b/docs/Installation/README.md deleted file mode 100644 index 0a27f5bf4..000000000 --- a/docs/Installation/README.md +++ /dev/null @@ -1,266 +0,0 @@ -# Context - - -MOOSE is a **M**ission **O**bject **O**riented **S**cripting **E**nvironment, and is meant for mission designers and mission hosters. -It allows to quickly setup complex missions using pre-scripted scenarios using the available classes within the MOOSE Framework. -MOOSE is designed to work with DCS world 1.5. and 2.0. - -![Banner](Presentations\MOOSE\Dia1.JPG) - -# Goals - -The goal of MOOSE is to allow mission designers to enhance their scripting with mission orchestration objects, which can be instantiated from defined classes within the framework. This will allow to write mission scripts with minimal code embedded. Of course, the richness of the framework will determine the richness of the misson scenarios. We can expect that MOOSE will evolve over time, as more missions will be designed within the framework. - -## GitHub Repository - -You can find the source of [MOOSE on GITHUB](https://github.com/FlightControl-Master/MOOSE/). It is free for download. - -# Installation of tools and sync the MOOSE repository. - -1. Install [Eclipse LDT](https://eclipse.org/ldt) on your Windows 64 bit system. This is a free lua editor based on the Eclipse ecosystem. The advantage of LDT is that it greatly enhances your lua development environment with intellisense, better search capabilities etc. You may have to install [java](https://www.java.com/en/download) first. Ensure you install the **64-bit versions** of both Eclipse LDT and java! -2. Install [GITHUB](https://desktop.github.com) desktop. We use GITHUB desktop to sync the moose repository to your system. -3. Link the MOOSE repository on GITHUB to your freshly installed GITHUB desktop. Do this by browing to the MOOSE repository at GITHUB, and select the green button **Clone or Download** -> **Open in Desktop**. -4. Specify a local directory on your PC where you want to store the MOOSE repository contents. -5. Sync the MOOSE repository to a defined local MOOSE directory on your PC using GITHUB desktop (press the sync button). -6. On your local MOOOSE directory, execute the batch file [DCS_Folder_Sync.bat](https://github.com/FlightControl-Master/MOOSE/blob/master/DCS_Folder_Sync.bat). This will sync the dcs folder in the MOOSE repository from the submodule DCS API. - -As a result, you have installed the MOOSE repository on your PC, and it is fully synced. - -# Setup Eclipse LDT to work with MOOSE and activate your intellisense etc. - -1. Open Eclipse LDT. -2. Select the workspace to be stored at your user id. -3. Select from the Menu: File -> New -> Lua Project. - -![LDT_New_Project](Setup/LDT_New_Project.JPG) - -4. A dialog box is shown. - -![LDT_Project](Setup/LDT_Project.JPG) - -5. Type the Project Name: Moose_Framework -6. In the sub-box Project Contents, select the option Create Project at existing location (from existing source). Browse to the local MOOSE directory and select the root directory of MOOSE. -7. Select the Next button. -8. You should see now a dialog box with the following properties. Note that the Moose_Framework/Moose Development/Moose directory is flagged as the **Source Directory*. This is important because it will search in the files in this directory and sub directories for lua documentator enabled lua files. It will make the intellisense work! - -![LDT Finish](Setup/LDT_Moose_Framework_Finish.JPG) - -9. Press the Finish button. - -As a result, when you browse to the Script Explorer, you'll see the following: - -![LDT_Script_Explorer](Setup/LDT_Script_Explorer.JPG) - -## YouTube Broadcast Channel - -MOOSE has a [broadcast channel](https://www.youtube.com/channel/UCjrA9j5LQoWsG4SpS8i79Qg/playlists) on youtube. -These videos are grouped into playlists, which explain specific MOOSE capabilities, -and gradually build up the "understanding" and "what is possible" to do with the MOOSE framework. -I really, really encourage all to watch the explanation videos. - -Some mandatory videos to watch are: - - * [MOOSE Introduction](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl1JEtVcyf9sazUV5_fGICz4) - - * [MOOSE Setup](https://www.youtube.com/watch?v=-Hxae3mTCE8&t=159s&index=1&list=PL7ZUrU4zZUl0riB9ULVh-bZvFlw1_Wym2) - * [MOOSE Spawning](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl1jirWIo4t4YxqN-HxjqRkL) - * [MOOSE Tasking](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl3CgxN2iAViiGLTPpQ-Ajdg) - * [MOOSE Task Dispatching](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl3I6ieFM-cjey-rncF1ktNI) - -## MOOSE community - -There is a MOOSE community at various places out there. The main community can be found at slack.com. -Various channels and people are helping each other out using the framework. -If you would like to join, please contact me on skype: FlightControl_Skype. - - -## Test Missions - -The framework comes with [Test Missions](https://github.com/FlightControl-Master/MOOSE/tree/master/Moose%20Test%20Missions), that you can try out and helps you to code. -You can copy/paste code the code snippets into your missions, as it accellerates your mission developments. - -These exact test missions are demonstrated at the demo videos in the YouTube channel. - -Note: MOOSE is complementary to [MIST](https://github.com/mrSkortch/MissionScriptingTools/releases), so if you use MIST in parallel with MOOSE objects, this should work. - -# MOOSE Directory Structure - -As you can see at the GitHub site, the MOOSE framework is devided into a couple of directories: - -* Moose Development: Contains the collection of lua files that define the MOOSE classes. You can use this directory to build the dynamic luadoc documentation intellisense in your eclipse development environment. -* Moose Mission Setup: Contains the Moose.lua file to be included in your scripts when using MOOSE classes (see below the point Mission Design with Moose). -* Moose Test Missions: Contains a directory structure with Moose Test Missions and examples. In each directory, you will find a miz file and a lua file containing the main mission script. -* Moose Training: Contains the documentation of Moose generated with luadoc from the Moose source code. The presentations used during the videos in my [youtube channel](https://www.youtube.com/channel/UCjrA9j5LQoWsG4SpS8i79Qg), are also to be found here. - -# Mission Design with Moose - -In order to create a mission using MOOSE, you'll have to include a file named **Moose.lua**: - -1. Create a new mission in the DCS World Mission Editor. -2. In the mission editor, create a new trigger. -3. Name the trigger Moose Load and let it execute only at MISSION START. -4. Add an action DO SCRIPT FILE (without a condition, so the middle column must be empty). -5. In the action, browse to the **[Moose.lua](https://github.com/FlightControl-Master/MOOSE/tree/master/Moose%20Mission%20Setup)** file in the **Moose Mission Setup** directory, and include this file within your mission. -6. Make sure that the "Moose Load" trigger is completely at the top of your mission. - -Voila, MOOSE is now included in your mission. During the execution of this mission, all MOOSE classes will be loaded, and all MOOSE initializations will be exectuted before any other mission action is executed. - -IMPORTANT NOTE: When a new version of MOOSE is released, you'll have to UPDATE the Moose.lua file in EACH OF YOUR MISSION. -This can be a tedious task, and for this purpose, a tool has been developed that will update the Moose.lua files automatically within your missions. -Refer to the tool at [Moose Mission Setup\Moose Mission Update](https://github.com/FlightControl-Master/MOOSE/tree/master/Moose%20Mission%20Setup/Moose%20Mission%20Update) directory for further information included in the [READ.ME]() file. - -# MOOSE Classes - -The following classes are currently embedded within MOOSE and can be included within your mission scripts: - -![Classes](Presentations\MOOSE\Dia2.JPG) - -## MOOSE Core Classes - -These classes define the base building blocks of the MOOSE framework. These classes are heavily used within the MOOSE framework. - -* [BASE](Documentation/Base.html): The main class from which all MOOSE classes are derived from. The BASE class contains essential functions to support inheritance and MOOSE object execution tracing (logging within the DCS.log file in the saved games folder of the user). - -* [DATABASE](Documentation/Database.html): Creates a collection of GROUPS[], UNITS[], CLIENTS[] and managed these sets automatically. Provides an API set to retrieve a GROUP, UNIT or CLIENT instance from the _DATABASE object using defined APIs. The collections are maintained dynamically during the execution of the mission, so when players join, leave, when units are created or destroyed, the collections are dynamically updated. - -* [EVENT](Documentation/Event.html): Provides the Event Dispatcher base class to handle DCS Events, being fired upon registered events within the DCS simulator. Note that EVENT is used by BASE, exposing OnEvent() methods to catch these DCS events. - -* [FSM](Documentation/Fsm.html): The main FSM class can be used to build a Finite State Machine. The derived FSM_ classes provide Finite State Machine building capability for CONTROLLABLEs, ACT_ (Task Actions) classes, TASKs and SETs. - -* [MENU](Documentation/Menu.html): Set Menu options (F10) for All Players, Coalitions, Groups, Clients. MENU also manages the recursive removal of menus, which is a big asset! - -* [SETS](Documentation/Set.html): Create SETs of MOOSE objects. SETs can be created for GROUPs, UNITs, AIRBASEs, ... -The SET can be filtered with defined filter criteria. -Iterators are available that iterate through the GROUPSET, calling a function for each object within the SET. - -* [MESSAGE](Documentation/Message.html): A message publishing system, displaying messages to Clients, Coalitions or All players. - -* [POINTS](Documentation/Point.html): A set of point classes to manage the 2D or 3D simulation space, through an extensive method library. -The POINT_VEC3 class manages the 3D simulation space, while the POINT_VEC2 class manages the 2D simulation space. - -* [ZONES](Documentation/Zone.html): A set of zone classes that provide the functionality to validate the presence of GROUPS, UNITS, CLIENTS, STATICS within a certain ZONE. The zones can take various forms and can be movable. - -* [SCHEDULER](Documentation/Scheduler.html): This class implements a timer scheduler that will call at optional specified intervals repeatedly or just one time a scheduled function. - - -## MOOSE Wrapper Classes - -MOOSE Wrapper Classes provide an object oriented hierarchical mechanism to manage the DCS objects within the simulator. -Wrapper classes provide another easier mechanism to control Groups, Units, Statics, Airbases and other objects. - -* **[OBJECT](Documentation/Object.html)**: This class provides the base for MOOSE objects. - -* **[IDENTIFIABLE](Documentation/Identifiable.html)**: This class provides the base for MOOSE identifiable objects, which is every object within the simulator :-). - -* **[POSITIONABLE](Documentation/Positionable.html)**: This class provides the base for MOOSE positionable objects. These are AIRBASEs, STATICs, GROUPs, UNITs ... - -* **[CONTROLLABLE](Documentation/Controllable.html)**: This class provides the base for MOOSE controllable objects. These are GROUPs, UNITs, CLIENTs. - -* **[AIRBASE](Documentation/Airbase.html)**: This class wraps a DCS Airbase object within the simulator. - -* **[GROUP](Documentation/Group.html)**: This class wraps a DCS Group objects within the simulator, which are currently alive. -It provides a more extensive API set. -It takes an abstraction of the complexity to give tasks, commands and set various options to DCS Groups. -Additionally, the GROUP class provides a much richer API to identify various properties of the DCS Group. -For each DCS Group created object within a running mission, a GROUP object will be created automatically, beging managed within the DATABASE. - -* **[UNIT](Documentation/Unit.html)**: This class wraps a DCS Unit object within the simulator, which are currently alive. It provides a more extensive API set, as well takes an abstraction of the complexity to give commands and set various options to DCS Units. Additionally, the UNIT class provides a much richer API to identify various properties of the DCS Unit. For each DCS Unit object created within a running mission, a UNIT object will be created automatically, that is stored within the DATABASE, under the _DATABASE object. -the UNIT class provides a more extensive API set, taking an abstraction of the complexity to give tasks, commands and set various options to DCS Units. -For each DCS Unit created object within a running mission, a UNIT object will be created automatically, beging managed within the DATABASE. - -* **[CLIENT](Documentation/Client.html)**: This class wraps a DCS Unit object within the simulator, which has a skill Client or Player. -The CLIENT class derives from the UNIT class, thus contains the complete UNIT API set, and additionally, the CLIENT class provides an API set to manage players joining or leaving clients, sending messages to players, and manage the state of units joined by players. For each DCS Unit object created within a running mission that can be joined by a player, a CLIENT object will be created automatically, that is stored within the DATABASE, under the _DATABASE object. - -* **[STATIC](Documentation/Static.html)**: This class wraps a DCS StaticObject object within the simulator. -The STATIC class derives from the POSITIONABLE class, thus contains also the position API set. - - -## MOOSE Functional Classes - -MOOSE Functional Classes provide various functions that are useful in mission design. - -* [SPAWN](Documentation/Spawn.html): Spawn new groups (and units) during mission execution. - -* [ESCORT](Moose Training/Documentation/Escort.html): Makes groups consisting of helicopters, airplanes, ground troops or ships within a mission joining your flight. You can control these groups through the ratio menu during your flight. Available commands are around: Navigation, Position Hold, Reporting (Target Detection), Attacking, Assisted Attacks, ROE, Evasion, Mission Execution and more ... - -* [MISSILETRAINER](Moose Training/Documentation/MissileTrainer.html): Missile trainer, it destroys missiles when they are within a certain range of player airplanes, displays tracking and alert messages of missile launches; approach; destruction, and configure with radio menu commands. Various APIs available to configure the trainer. - -* [DETECTION](Moose Training/Documentation/Detection.html): Detect other units using the available sensors of the detection unit. The DETECTION_BASE derived classes will provide different methods how the sets of detected objects are built. - -## MOOSE AI Controlling Classes - -MOOSE AI Controlling Classes provide mechanisms to control AI over long lasting processes. -These AI Controlling Classes are based on FSM (Finite State Machine) Classes, and provided an encapsulated way to make AI behave or execute an activity. - -* [AI_BALANCER](Documentation/AI_Balancer.html): Compensate in a multi player mission the abscence of players with dynamically spawned AI air units. When players join CLIENTS, the AI will either be destroyed, or will fly back to the home or nearest friendly airbase. - -* [AI_PATROLZONE](Documentation/AI_PatrolZone.html): Make an alive AI Group patrol a zone derived from the ZONE_BASE class. Manage out-of-fuel events and set altitude and speed ranges for the patrol. - -* [AI_CARGO](Documentation/AI_Cargo.html): Make AI behave as cargo. Various CARGO types exist. - -## MOOSE Tasking Classes - -MOOSE Tasking Classes provide a comprehensive Mission Orchestration System. -Through COMMANDCENTERs, multiple logical MISSIONs can be orchestrated for coalitions. -Within each MISSION, various TASKs can be defined. -Each TASK has a TASK ACTION flow, which is the flow that a player (hosted by a UNIT) within the simulator needs to follow and accomplish. - -* [COMMANDCENTER](Documentation/CommandCenter.html): Orchestrates various logical MISSIONs for a coalition. - -* [MISSION](Documentation/Mission.html): Each MISSION has various TASKs to be executed and accomplished by players. - -* [TASK](Documentation/Task.html): Each TASK has a status, and has a TASK ACTION flow for each Player acting and executing the TASK. - -* [TASK_SEAD](Documentation/Task_SEAD.html): Models a SEAD Task, where a Player is routed towards an attack zone, and various SEADing targets need to be eliminated. - -* [TASK_A2G](Documentation/Task_A2G.html): Models a A2G Task, where a Player is routed towards an attack zone, and various A2G targets need to be eliminated. - -## MOOSE Action Classes - -MOOSE Action Classes are task action sub-flows, that can be used and combined, to quickly define a comprehensive end-to-end task action flow. -For example, for the SEAD Task, the task action flow combines the actions ASSIGN, ROUTE, ACCOUNT and ASSIST task action sub-flows. - -* [ACT_ASSIGN](Documentation/Assign.html): Mechanism to accept a TASK by a player. For example, assign the task only after the player accepts the task using the menu. - -* [ACT_ROUTE](Documentation/Route.html): Mechanisms to route players to zones or any other positionable coordinate. For example, route a player towards a zone. - -* [ACT_ACCOUNT](Documentation/Account.html): Mechanisms to account various events within the simulator. For example, account the dead events, accounting dead units within a Target SET within a ZONE. - -* [ACT_ASSIST](Documentation/Assist.html): Mechanisms to assist players executing a task. For example, acquire targets through smoking them. - - -# Credits - -Note that the framework is based on code i've written myself, but some of it is also based on code that i've seen as great scripting code and ideas, and which i've revised. I see this framework evolving towards a broader public, and the ownership may dissapear (or parts of it). Consider this code public domain. Therefore a list of credits to all who have or are contributing (this list will increase over time): Grimes, Prof_Hilactic, xcom, the 476 virtual squadron team, ... - -You'll notice that within this framework, there are functions used from mist. I've taken the liberty to copy those atomic mist functions that are very nice and useful, and used those. - -**Grimes** -Without the effort of Grimes with MIST and his continuous documentation, the development of MOOSE would not have been possible. MOOSE is not replacing MIST, but is compensating it. - -**Prof_hilactic** -SEAD Defenses. I've taken the script, and reworded it to fit within MOOSE. The script within MOOSE is hardly recognizable anymore from the original. Find here the posts: http://forums.eagle.ru/showpost.php?...59&postcount=1 - -**xcom** -His contribution is related to the Event logging system. I've analyzed and studied his scripts, and reworked it a bit to use it also within the framework (I've also tweaked it a bit). Find his post here: http://forums.eagle.ru/showpost.php?...73&postcount=1 - -**Dutch_Baron (James)** -Working together with James has resulted in the creation of the AIBALANCER class. James has shared his ideas on balancing AI with air units, and together we made a first design which you can use now :-) - -**Stuka (Danny)** -Working together with Danny has resulted in the MISSILETRAINER class. Stuka has shared his ideas and together we made a design. Together with the 476 virtual team, we tested this CLASS, and got much positive feedback! - -**Mechanic (Gabor)** -Worked together with Gabor to create the concept of the DETECTION and FAC classes. Mechanic shared his ideas and concepts to group detected targets into sets within detection zones... Will continue to work with G�bor to workout the DETECTION and FAC classes. - -**Shadoh** -Interacted on the eagle dynamics forum to build the FOLLOW class to build large WWII airplane formations. - -For the rest I also would like to thank the numerous feedback and help and assistance of the moose community at SLACK.COM. -Note that there is a vast amount of other scripts out there. -I may contact you personally to ask for your contribution / permission if i can use your idea or script to tweak it to the framework. -Parts of these scripts will have to be redesigned to fit it into an OO framework. - -The rest of the framework functions and class definitions were my own developments, especially the core of MOOSE. -Trust I've spent hours and hours investigating, trying and writing and documenting code building this framework. -Hope you think the idea is great and useful. \ No newline at end of file diff --git a/docs/Interactive_Debug_Guide.md b/docs/Interactive_Debug_Guide.md deleted file mode 100644 index dd6e2270d..000000000 --- a/docs/Interactive_Debug_Guide.md +++ /dev/null @@ -1,329 +0,0 @@ -# Interactive DEBUG using Lua Development Tools from the Eclipse open source suite. - -The Lua Development Tools in the Eclipse suite has a possibility to "attach a lua debugger" to your LDT environment. -Read this section to setup a debugger in our DCS World environment. - -The people who have used debuggers before, will recognize a lot in this explanation! - -How it works: - - * Setup a **debug listener** within LDT. When running, it will listen over IP on the local host (127.0.0.1) on a port. - * Attach a **debug client** to your DCS World configuration. This **debug client** will attach itself to the **debug listener** over IP. - * Modify your mission, so that your source files are loaded **dynamically**. This is very important because DCS World **renames** unfortunately the name of the source files when it runs a mission! - * Set breakpoints where needed. The debugger will stop at the breakpoints set. - * Run the **debug listener** on LDT. - * Run the DCS World mission, which uses the **debug client** to connect to the **debug listener** over IP. - * The logic will stop at the set breakpoints. Using LDT, you can walk through the logic (statements), while inspecting variable contents and evaluate expressions. - * You can set breakpoints during the process where you want, you can add / delete variables in the views where you want. - -**This capability will give you a new experience in DCS World mission design!** - -**Note:** The assets that are used in this description, were modified to accomodate the debugging, so the LDT off-the-shelf assets aren't working. -So use the assets as listed here, or your debugger won't work! - - -## 1. Explanation of the LDT debugging environment. - -![](Debugging/DEBUG_Intro.JPG) - -The following pictures outline some of the interesting places in LDT to debug your lua code... A quick manual. - -![](Debugging/DEBUG_Bug.JPG) - -This picture shows a debug view of the LDT environment. You can activate the debug view through the debug icon that is located in the upper right corner of the LDT. - -![](Debugging/DEBUG_Tracking.JPG) - -Various windows exist to track the content of: - - * Variables: local and global variables will appear automatically in the Variables window where used. - * Breakpoints: Breakpoints that are set at lines of various sources, are listed here. - * Expressions: Various expressions can be entered to evaluate a more complex statement. - * Interactive Console: Here you can type in commands that will be executed. Here you can SPAWN for example new groups. - -![](Debugging/DEBUG_Source.JPG) - -This window lists the sources active in Eclipse. -During a debug sessions, the sources where the process is at the moment of debugging, should be loaded automatically. -If not, something is wrong. -All the other sources that are currently open in the LDT are also listed. - -![](Debugging/DEBUG_Engine.JPG) - -This window shows the status of the "attach debug engine". -If this process is running, it will listen to the IP 127.0.0.1 or localhost if setup on your PC. - - - -## 2. Setup your **debug listener** in LDT. - -To use the debug enviornment in LDT, you'll need to setup within LDT a " Lua Attach to Application" **debug listener**. - -![](Debugging/DEBUG_Engine.JPG) - -You can access this screen through the LDT editor menu **Run->Debug Configurations...**. - -This is the meaning of each field: - - * Project: The name of the project that you are debugging within your workspace. You need to have a project registered here! - * IDE key: this string is used connect the **debug client** to the **debug listener**. - * Timeout: the amount of miliseconds you want DCS World to wait for the **debug listener** to be connecting. - * Source mapping: Select the option "Local Resolution". All the sources are loaded locally from your PC automatically when debugging. - -For the IDE key, this key will be the "link" to the debug connection on the client side! -As will be explained a bit further, `initconnection( "127.0.0.1", 10000, "dcsserver", nil, "win", "" )` will make a connection on the **debug client**. -Ensure that the IDE key specified matches up in the **debug listener** and the **debug client**. -So in this example, `"dcsserver"` is the IDE key and should match in the debug Configuration panel and the `initconnection` parameters! - - - -## 3. Setup your **debug client** and attach it to DCS World mission runtime. - -This process is essential. - -Within the MOOSE repository, there are two important files that you need to consider. -These files are located in the MOOSE repository [here](https://github.com/FlightControl-Master/MOOSE/tree/master/Moose%20Development/Debugger). - -Download the MOOSE repository or the files on your disk, and read further ... - -You should have at least on your disk: - - * debugger.lua - * READ.ME - * MissionScripting.lua - -### 3.1. debugger.lua. - -This is the **debug client**. The source is part of the LDT debug suite, but has been modified to work together with the DCS World scripting engine. -You need to copy this file to the root directory of your DCS World installation in Program Files. - -![](Debugging/DEBUG_debugger.JPG) - -By example, the location of debugger.lua is here on my DCS World installation PC. - -### 3.2. Modify the MissionScripting.lua file. - -The READ.ME file is a file that contains an explanation of how to modify the MissionScripting.lua. - -But for clarity reasons, I've also attached my version of the MissionScripting.lua. - -![](Debugging/DEBUG_MissionScripting.JPG) - - -Take the MissionScripting.lua from the folder, and copy / paste (overwrite) the version in your DCS World installation directory under the Scripts folder. -If you want, you can first rename the existing MissionScripting.lua file to MissionScripting_old.lua -Don't mistake yourself, a lot of mods/tools modify this file during installation. - -Tools like **slmod** etc also change the MissionScripting.lua file (during installation). -So beware that when copying over the file there may be unwanted changes. -If you are using a mod, it is better to do the change manually according the direction in the READ.ME file! - -And a validation needs to be done. Once you've modified/overwritten the MissionScripting.lua file, check if the contents are indeed changed! -Sometimes it seems that the file is saved, but the contents aren't updated due to lack of administration rights and extra security done by windows. - -MissionScripting.lua should contain (at least) the following: - -``` ---Initialization script for the Mission lua Environment (SSE) - -dofile('Scripts/ScriptingSystem.lua') - --- Add LuaSocket to the LUAPATH, so that it can be found. -package.path = package.path..";.\\LuaSocket\\?.lua;" - --- Connect to the debugger, first require it. -local initconnection = require("debugger") - --- Now make the connection.. --- "127.0.0.1" is the localhost. --- 1000 is the timeout in ms on IP level. --- "dcsserver" is the name of the server. Ensure the same name is used at the Debug Configuration panel! --- nil (is for transport protocol, but not using this) --- "win" don't touch. But is important to indicate that we are in a windows environment to the debugger script. -initconnection( "127.0.0.1", 10000, "dcsserver", nil, "win", "" ) - ---Sanitize Mission Scripting environment ---This makes unavailable some unsecure functions. ---Mission downloaded from server to client may contain potentialy harmful lua code that may use these functions. ---You can remove the code below and make availble these functions at your own risk. - -local function sanitizeModule(name) - _G[name] = nil - package.loaded[name] = nil -end - - -do - sanitizeModule('os') - --sanitizeModule('io') - sanitizeModule('lfs') - require = nil - loadlib = nil -end -``` - -Please read through the comment lines for a detailed description what it does. -The io module has been de-sanitized because the debugger.lua needs to use the io module while debugging. - - - -## 4. Setup your .miz file. - -When you run a mission in single player in DCS World, a couple of things are happening. - - 1. The .miz (mission) file that was selected to run, is unzipped in a temp folder on your drive. - 2. Each lua file that is included in a DO SCRIPT FILE, is **RENAMED** to a file structure like ~mis__nnnnn__.lua. - This is very bad. Because this prevents you from settings breakpoints at the source file and ensure that the debugger - recognizes the source during run and the location of the breakpoint! - -So we need to do something special. The trick is **dynamic loading**. -And believe me, it is the only way to be able to debug your sources. -So this is a little task that you need to learn how to do, but once you understand it, it will become very easy to do. - -Instead of executing a DO SCRIPT FILE, you need to add a couple of things in your .miz file. - - -### 4.1 Conditionalize the DO SCRIPT FILE execution. - -Keep the DO SCRIPT FILE line in your mission. Why? Because if you would remove it, and you woudn't debug your code, your mission file would be deleted. -Instead, we are going to put a flag before this part of the execution. A debug flag. For example, in my mission I put a debug flag 999. When 999 is ON, I would NOT execute the mission file... - -Follow this process how to do that... As my recommendation... - -![](Debugging/DEBUG_Flag.JPG) - -Setup a debug flag... If you wanna debug, set flag 999 to ON. - -![](Debugging/DEBUG_Static.JPG) - -Conditionalize the DO SCRIPT FILE execution by evaluating if the 999 is OFF. - - -### 4.2 Add a dynamic loader to debug your mission script. - -Now we are adding a little line. -We are now going to ADD a **dynamic loader** of your mission source. - -![](Debugging/DEBUG_Dynamic.JPG) - -This loads the file dynamically. Instead of a DO SCRIPT FILE, we execute here a DO SCRIPT. -The DO SCRIPT contains a little piece of code that loads your source file from a location on your disk. - -![](Debugging/DEBUG_Loader.JPG) - -This is how my piece of code looks like. I am using a stub of the MOOSE framework to load the file. - -`MOOSE.Include( full_path_name, file_name )` - - * The `full_path_name` needs to be between quotes, **follows unix folder notation** and **needs to end with a /** - * The `file name` is the full file name, **including the .lua extension**! - - -If you don't wanna use __Moose.Include, no worries, there is another method. - -`_G.loadfile( full_path_name .. file_name )` - -The MOOSE.Include loader uses _G.loadfile to load the sources. But it does a bit more checking and logs in dcs.log which files were dynamically loaded, and from which location! - - - -### 5. Run the **debug listener** on LDT. - -Now we are all setup! You've got your **debug listener** setup in LDT, you got your **debug client** setup and connected to your DCS World environment, and you got your mission file ready for debug! - -Now we are going to run a debug. To have a successful debug run, you need to start the listener in LDT. - -### 5.1. Setup your debug favorite. - -First we setup the Debug as your "favorite", so that it is easy for your to repeat the run easily. - -![](Debugging/DEBUG_Favorites.JPG) - -Click on the "Bug" icon that you'll find in the task bar. The "Bug" icon is the place where you will start your **debug listener**. -However, first, click on Organize Favorites. You need to do this one time only. - -![](Debugging/DEBUG_Add Favorites.JPG) - -Just click on the Debug Name that you entered (for me DCS 1.5) in the Debug Configuration window and it will be added ot your favorites. -I did already that, so it was already added as an example in the previous picture. - -### 5.2. Run the **debug listener**. - -Now you can easily activate the **debug listener**. - -![](Debugging/DEBUG_Run_Listener.JPG) - -Just click the "Bug" again, and select the **debug listener** that you configured. - -![](Debugging/DEBUG_Listener.JPG) - -When done, you'll see that the **debug listener** is running! - -It will be listening quietly to IP 127.0.0.1 on port 100000. - - - -### 6. Set breakpoints. - -Open your source file **from the exact location** from where you have specified it to be loaded as part of the **dynamic loading**. -Once it is loaded, you can attach breakpoints within the editor. - -![](Debugging/DEBUG_Breakpoint.JPG) - -How? Right click on the source line number or the grey area before the line, and a pop-up window will appear. Select "Toggle Breakpoint". - -![](Debugging/DEBUG_Breakpoint_List.JPG) - -As a result, the breakpoint will be listed in the "Breakpoints" list at the debug view, and it will show also the line number where the breakpoint is set. -When your mission runs, the logic will stop at this line!!! - - - -### 7. Run your DCS World mission. - -Now it is time to start your DCS World mission. Just run it as you would like have it. - - 1. The **debug client** (debugger.lua) is loaded as part of the MissionScripting.lua file. - 2. The **debug client** connects to the **debug listener** on ldt using 127.0.0.1 using port 10000. - 3. Your **mission source** will be **loaded dynamically**. - 4. Your mission will start running. - 5. Debugger is active and will monitor if a breakpoint has been set at the source currently active during runtime of your mission. - 6. Once it matches a valid breakpoint at a valid source and a specified line, it will stop the logic! - - -![](Debugging/DEBUG_Session.JPG) - - - -### 8. Next steps. - -There is a lot to say about debugging and the techniques that you can use how to track the code. -For this, videos will be made in the MOOSE For Dummies video series. - -Please consult the youtube channel for more info on debugging. - - - -### 9. Sequel. - -When I started to use DCS World (discovered it by accident), I was sold. -After a while I started to discover the SSE capabilities of DCS World and started to code lua. -But a very important piece was missing while developing the MOOSE framework. - -**A debugger**. - -I've been searching for about 4 years to get this working. There was a huge learning curve. -I had to "hack" myself into the LDT environment and modify the LDT assets to make this work. -There were moments of "clarity" that made me understand how it all fits together. -And now it is there. Wanted to share this for all users of DCS World. - -It does require a bit of effort to use this in the DCS World environment, but the little effort -is a small trade against the huge advantages here! - -I also encourage you to use the MOOSE Framework, as it brings you a lot of great capabilities -you will never have in any editor. Being able to debug your code, will solve a lot of your questions now! - -I hope you will all have fun with the new debug capability and that it may result in greater missions. - -kind regards, -FC \ No newline at end of file diff --git a/docs/Presentations/ACT_ACCOUNT/Dia1.JPG b/docs/Presentations/ACT_ACCOUNT/Dia1.JPG deleted file mode 100644 index 299783d46..000000000 Binary files a/docs/Presentations/ACT_ACCOUNT/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/AIRBASEPOLICE/Dia1.JPG b/docs/Presentations/AIRBASEPOLICE/Dia1.JPG deleted file mode 100644 index 80970f0f2..000000000 Binary files a/docs/Presentations/AIRBASEPOLICE/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_1.JPG b/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_1.JPG deleted file mode 100644 index bb638ea9b..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_1.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_10.JPG b/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_10.JPG deleted file mode 100644 index 31aaf520d..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_10.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_11.JPG b/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_11.JPG deleted file mode 100644 index b27640e76..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_11.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_2.JPG b/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_2.JPG deleted file mode 100644 index db129826b..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_2.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_3.JPG b/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_3.JPG deleted file mode 100644 index ea4f6beaa..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_3.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_4.JPG b/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_4.JPG deleted file mode 100644 index e0b1db230..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_4.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_5.JPG b/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_5.JPG deleted file mode 100644 index 749b96e85..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_5.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_6.JPG b/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_6.JPG deleted file mode 100644 index df6b1f564..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_6.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_7.JPG b/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_7.JPG deleted file mode 100644 index b6765497e..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_7.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_8.JPG b/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_8.JPG deleted file mode 100644 index 513dbc503..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_8.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_9.JPG b/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_9.JPG deleted file mode 100644 index f012cb431..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_DISPATCHER-ME_9.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_GCICAP-ME_1.JPG b/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_GCICAP-ME_1.JPG deleted file mode 100644 index cb043205f..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_GCICAP-ME_1.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_GCICAP-ME_2.JPG b/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_GCICAP-ME_2.JPG deleted file mode 100644 index dea32f3dd..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_GCICAP-ME_2.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_GCICAP-ME_3.JPG b/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_GCICAP-ME_3.JPG deleted file mode 100644 index 4be3b4dbc..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_GCICAP-ME_3.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_GCICAP-ME_4.JPG b/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_GCICAP-ME_4.JPG deleted file mode 100644 index cb043205f..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_GCICAP-ME_4.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_GCICAP-ME_5.JPG b/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_GCICAP-ME_5.JPG deleted file mode 100644 index 12dcb59da..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_GCICAP-ME_5.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_GCICAP-ME_6.JPG b/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_GCICAP-ME_6.JPG deleted file mode 100644 index 87d52dbce..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/AI_A2A_GCICAP-ME_6.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia1.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia1.JPG deleted file mode 100644 index e14f55463..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia10.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia10.JPG deleted file mode 100644 index d5e37c339..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia10.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia11.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia11.JPG deleted file mode 100644 index c5ded7dc8..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia11.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia12.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia12.JPG deleted file mode 100644 index ae1f6aece..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia12.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia13.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia13.JPG deleted file mode 100644 index 0a8a2d548..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia13.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia14.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia14.JPG deleted file mode 100644 index ec30b1767..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia14.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia15.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia15.JPG deleted file mode 100644 index 9b2a3736f..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia15.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia16.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia16.JPG deleted file mode 100644 index ff20d7b7e..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia16.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia17.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia17.JPG deleted file mode 100644 index 39eaa493c..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia17.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia18.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia18.JPG deleted file mode 100644 index e04dd5ddc..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia18.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia19.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia19.JPG deleted file mode 100644 index 64ec68d98..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia19.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia2.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia2.JPG deleted file mode 100644 index 422201ac6..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia2.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia20.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia20.JPG deleted file mode 100644 index 1c03869cc..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia20.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia21.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia21.JPG deleted file mode 100644 index 86b50ace8..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia21.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia22.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia22.JPG deleted file mode 100644 index 4480e7644..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia22.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia23.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia23.JPG deleted file mode 100644 index 58b60d2fd..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia23.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia24.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia24.JPG deleted file mode 100644 index 2c505d5a6..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia24.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia25.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia25.JPG deleted file mode 100644 index d23d0e432..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia25.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia26.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia26.JPG deleted file mode 100644 index 8a70a531b..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia26.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia27.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia27.JPG deleted file mode 100644 index f6b9bb461..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia27.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia28.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia28.JPG deleted file mode 100644 index 59a4bd0a9..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia28.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia29.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia29.JPG deleted file mode 100644 index 59569bcf1..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia29.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia3.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia3.JPG deleted file mode 100644 index 34be6072e..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia3.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia4.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia4.JPG deleted file mode 100644 index f50f62c6d..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia4.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia5.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia5.JPG deleted file mode 100644 index 766fb4a7b..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia5.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia6.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia6.JPG deleted file mode 100644 index ffe9728d6..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia6.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia7.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia7.JPG deleted file mode 100644 index 4f916d8dc..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia7.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia8.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia8.JPG deleted file mode 100644 index eb7f43662..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia8.JPG and /dev/null differ diff --git a/docs/Presentations/AI_A2A_DISPATCHER/Dia9.JPG b/docs/Presentations/AI_A2A_DISPATCHER/Dia9.JPG deleted file mode 100644 index 8fcef4200..000000000 Binary files a/docs/Presentations/AI_A2A_DISPATCHER/Dia9.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BAI/Dia1.JPG b/docs/Presentations/AI_BAI/Dia1.JPG deleted file mode 100644 index ea2e8afbd..000000000 Binary files a/docs/Presentations/AI_BAI/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BAI/Dia10.JPG b/docs/Presentations/AI_BAI/Dia10.JPG deleted file mode 100644 index 2d5fb6055..000000000 Binary files a/docs/Presentations/AI_BAI/Dia10.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BAI/Dia11.JPG b/docs/Presentations/AI_BAI/Dia11.JPG deleted file mode 100644 index e1509d8f4..000000000 Binary files a/docs/Presentations/AI_BAI/Dia11.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BAI/Dia12.JPG b/docs/Presentations/AI_BAI/Dia12.JPG deleted file mode 100644 index d5f054d2d..000000000 Binary files a/docs/Presentations/AI_BAI/Dia12.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BAI/Dia13.JPG b/docs/Presentations/AI_BAI/Dia13.JPG deleted file mode 100644 index f37811369..000000000 Binary files a/docs/Presentations/AI_BAI/Dia13.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BAI/Dia2.JPG b/docs/Presentations/AI_BAI/Dia2.JPG deleted file mode 100644 index ba382b9b7..000000000 Binary files a/docs/Presentations/AI_BAI/Dia2.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BAI/Dia3.JPG b/docs/Presentations/AI_BAI/Dia3.JPG deleted file mode 100644 index dbb63cee9..000000000 Binary files a/docs/Presentations/AI_BAI/Dia3.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BAI/Dia4.JPG b/docs/Presentations/AI_BAI/Dia4.JPG deleted file mode 100644 index 1952fa188..000000000 Binary files a/docs/Presentations/AI_BAI/Dia4.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BAI/Dia5.JPG b/docs/Presentations/AI_BAI/Dia5.JPG deleted file mode 100644 index e9cd79126..000000000 Binary files a/docs/Presentations/AI_BAI/Dia5.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BAI/Dia6.JPG b/docs/Presentations/AI_BAI/Dia6.JPG deleted file mode 100644 index 75ca905ad..000000000 Binary files a/docs/Presentations/AI_BAI/Dia6.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BAI/Dia7.JPG b/docs/Presentations/AI_BAI/Dia7.JPG deleted file mode 100644 index 9d5ac3a58..000000000 Binary files a/docs/Presentations/AI_BAI/Dia7.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BAI/Dia8.JPG b/docs/Presentations/AI_BAI/Dia8.JPG deleted file mode 100644 index daa96a088..000000000 Binary files a/docs/Presentations/AI_BAI/Dia8.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BAI/Dia9.JPG b/docs/Presentations/AI_BAI/Dia9.JPG deleted file mode 100644 index be4379581..000000000 Binary files a/docs/Presentations/AI_BAI/Dia9.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BALANCER/Dia10.JPG b/docs/Presentations/AI_BALANCER/Dia10.JPG deleted file mode 100644 index f962157e0..000000000 Binary files a/docs/Presentations/AI_BALANCER/Dia10.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BALANCER/Dia11.JPG b/docs/Presentations/AI_BALANCER/Dia11.JPG deleted file mode 100644 index af20ec0db..000000000 Binary files a/docs/Presentations/AI_BALANCER/Dia11.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BALANCER/Dia12.JPG b/docs/Presentations/AI_BALANCER/Dia12.JPG deleted file mode 100644 index 5e3b78d09..000000000 Binary files a/docs/Presentations/AI_BALANCER/Dia12.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BALANCER/Dia13.JPG b/docs/Presentations/AI_BALANCER/Dia13.JPG deleted file mode 100644 index 4e8e09743..000000000 Binary files a/docs/Presentations/AI_BALANCER/Dia13.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BALANCER/Dia14.JPG b/docs/Presentations/AI_BALANCER/Dia14.JPG deleted file mode 100644 index 3da8b07e4..000000000 Binary files a/docs/Presentations/AI_BALANCER/Dia14.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BALANCER/Dia15.JPG b/docs/Presentations/AI_BALANCER/Dia15.JPG deleted file mode 100644 index 0c292625a..000000000 Binary files a/docs/Presentations/AI_BALANCER/Dia15.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BALANCER/Dia16.JPG b/docs/Presentations/AI_BALANCER/Dia16.JPG deleted file mode 100644 index 889ea2e57..000000000 Binary files a/docs/Presentations/AI_BALANCER/Dia16.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BALANCER/Dia17.JPG b/docs/Presentations/AI_BALANCER/Dia17.JPG deleted file mode 100644 index 9631a9b13..000000000 Binary files a/docs/Presentations/AI_BALANCER/Dia17.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BALANCER/Dia18.JPG b/docs/Presentations/AI_BALANCER/Dia18.JPG deleted file mode 100644 index 6c0cbd795..000000000 Binary files a/docs/Presentations/AI_BALANCER/Dia18.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BALANCER/Dia3.JPG b/docs/Presentations/AI_BALANCER/Dia3.JPG deleted file mode 100644 index 3d5d7ba51..000000000 Binary files a/docs/Presentations/AI_BALANCER/Dia3.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BALANCER/Dia4.JPG b/docs/Presentations/AI_BALANCER/Dia4.JPG deleted file mode 100644 index 67f77f56d..000000000 Binary files a/docs/Presentations/AI_BALANCER/Dia4.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BALANCER/Dia5.JPG b/docs/Presentations/AI_BALANCER/Dia5.JPG deleted file mode 100644 index d79c546ec..000000000 Binary files a/docs/Presentations/AI_BALANCER/Dia5.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BALANCER/Dia6.JPG b/docs/Presentations/AI_BALANCER/Dia6.JPG deleted file mode 100644 index d80d336ad..000000000 Binary files a/docs/Presentations/AI_BALANCER/Dia6.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BALANCER/Dia7.JPG b/docs/Presentations/AI_BALANCER/Dia7.JPG deleted file mode 100644 index e5ed0ec89..000000000 Binary files a/docs/Presentations/AI_BALANCER/Dia7.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BALANCER/Dia8.JPG b/docs/Presentations/AI_BALANCER/Dia8.JPG deleted file mode 100644 index 1f56ed6d9..000000000 Binary files a/docs/Presentations/AI_BALANCER/Dia8.JPG and /dev/null differ diff --git a/docs/Presentations/AI_BALANCER/Dia9.JPG b/docs/Presentations/AI_BALANCER/Dia9.JPG deleted file mode 100644 index e390c69a2..000000000 Binary files a/docs/Presentations/AI_BALANCER/Dia9.JPG and /dev/null differ diff --git a/docs/Presentations/AI_Balancer/Dia1.JPG b/docs/Presentations/AI_Balancer/Dia1.JPG deleted file mode 100644 index 81228b230..000000000 Binary files a/docs/Presentations/AI_Balancer/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/AI_Balancer/Dia2.JPG b/docs/Presentations/AI_Balancer/Dia2.JPG deleted file mode 100644 index 9a3a2bfa6..000000000 Binary files a/docs/Presentations/AI_Balancer/Dia2.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAP/Dia1.JPG b/docs/Presentations/AI_CAP/Dia1.JPG deleted file mode 100644 index f9250debb..000000000 Binary files a/docs/Presentations/AI_CAP/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAP/Dia10.JPG b/docs/Presentations/AI_CAP/Dia10.JPG deleted file mode 100644 index 978279355..000000000 Binary files a/docs/Presentations/AI_CAP/Dia10.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAP/Dia11.JPG b/docs/Presentations/AI_CAP/Dia11.JPG deleted file mode 100644 index 4f3f5a120..000000000 Binary files a/docs/Presentations/AI_CAP/Dia11.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAP/Dia12.JPG b/docs/Presentations/AI_CAP/Dia12.JPG deleted file mode 100644 index f150e8d91..000000000 Binary files a/docs/Presentations/AI_CAP/Dia12.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAP/Dia13.JPG b/docs/Presentations/AI_CAP/Dia13.JPG deleted file mode 100644 index bea6c1b8d..000000000 Binary files a/docs/Presentations/AI_CAP/Dia13.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAP/Dia14.JPG b/docs/Presentations/AI_CAP/Dia14.JPG deleted file mode 100644 index afcb5afda..000000000 Binary files a/docs/Presentations/AI_CAP/Dia14.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAP/Dia2.JPG b/docs/Presentations/AI_CAP/Dia2.JPG deleted file mode 100644 index 5da4e0286..000000000 Binary files a/docs/Presentations/AI_CAP/Dia2.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAP/Dia3.JPG b/docs/Presentations/AI_CAP/Dia3.JPG deleted file mode 100644 index a0ad8c606..000000000 Binary files a/docs/Presentations/AI_CAP/Dia3.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAP/Dia4.JPG b/docs/Presentations/AI_CAP/Dia4.JPG deleted file mode 100644 index 7cfc20fc0..000000000 Binary files a/docs/Presentations/AI_CAP/Dia4.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAP/Dia5.JPG b/docs/Presentations/AI_CAP/Dia5.JPG deleted file mode 100644 index 5690a60fc..000000000 Binary files a/docs/Presentations/AI_CAP/Dia5.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAP/Dia6.JPG b/docs/Presentations/AI_CAP/Dia6.JPG deleted file mode 100644 index 08969ac4c..000000000 Binary files a/docs/Presentations/AI_CAP/Dia6.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAP/Dia7.JPG b/docs/Presentations/AI_CAP/Dia7.JPG deleted file mode 100644 index 503c9bde7..000000000 Binary files a/docs/Presentations/AI_CAP/Dia7.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAP/Dia8.JPG b/docs/Presentations/AI_CAP/Dia8.JPG deleted file mode 100644 index 2c9fda84f..000000000 Binary files a/docs/Presentations/AI_CAP/Dia8.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAP/Dia9.JPG b/docs/Presentations/AI_CAP/Dia9.JPG deleted file mode 100644 index 510ce2231..000000000 Binary files a/docs/Presentations/AI_CAP/Dia9.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CARGO/CARGO.JPG b/docs/Presentations/AI_CARGO/CARGO.JPG deleted file mode 100644 index 8f80a25cc..000000000 Binary files a/docs/Presentations/AI_CARGO/CARGO.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAS/Dia1.JPG b/docs/Presentations/AI_CAS/Dia1.JPG deleted file mode 100644 index 7f223938d..000000000 Binary files a/docs/Presentations/AI_CAS/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAS/Dia10.JPG b/docs/Presentations/AI_CAS/Dia10.JPG deleted file mode 100644 index e732e9c6d..000000000 Binary files a/docs/Presentations/AI_CAS/Dia10.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAS/Dia11.JPG b/docs/Presentations/AI_CAS/Dia11.JPG deleted file mode 100644 index 1968a6cef..000000000 Binary files a/docs/Presentations/AI_CAS/Dia11.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAS/Dia12.JPG b/docs/Presentations/AI_CAS/Dia12.JPG deleted file mode 100644 index 41d01e84c..000000000 Binary files a/docs/Presentations/AI_CAS/Dia12.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAS/Dia13.JPG b/docs/Presentations/AI_CAS/Dia13.JPG deleted file mode 100644 index 956051e91..000000000 Binary files a/docs/Presentations/AI_CAS/Dia13.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAS/Dia2.JPG b/docs/Presentations/AI_CAS/Dia2.JPG deleted file mode 100644 index 135c3822b..000000000 Binary files a/docs/Presentations/AI_CAS/Dia2.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAS/Dia3.JPG b/docs/Presentations/AI_CAS/Dia3.JPG deleted file mode 100644 index d713f4c70..000000000 Binary files a/docs/Presentations/AI_CAS/Dia3.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAS/Dia4.JPG b/docs/Presentations/AI_CAS/Dia4.JPG deleted file mode 100644 index cee857405..000000000 Binary files a/docs/Presentations/AI_CAS/Dia4.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAS/Dia5.JPG b/docs/Presentations/AI_CAS/Dia5.JPG deleted file mode 100644 index e9cd79126..000000000 Binary files a/docs/Presentations/AI_CAS/Dia5.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAS/Dia6.JPG b/docs/Presentations/AI_CAS/Dia6.JPG deleted file mode 100644 index 75ca905ad..000000000 Binary files a/docs/Presentations/AI_CAS/Dia6.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAS/Dia7.JPG b/docs/Presentations/AI_CAS/Dia7.JPG deleted file mode 100644 index ebdabf602..000000000 Binary files a/docs/Presentations/AI_CAS/Dia7.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAS/Dia8.JPG b/docs/Presentations/AI_CAS/Dia8.JPG deleted file mode 100644 index cce26918b..000000000 Binary files a/docs/Presentations/AI_CAS/Dia8.JPG and /dev/null differ diff --git a/docs/Presentations/AI_CAS/Dia9.JPG b/docs/Presentations/AI_CAS/Dia9.JPG deleted file mode 100644 index d91460dda..000000000 Binary files a/docs/Presentations/AI_CAS/Dia9.JPG and /dev/null differ diff --git a/docs/Presentations/AI_FORMATION/Dia1.JPG b/docs/Presentations/AI_FORMATION/Dia1.JPG deleted file mode 100644 index 101d201e6..000000000 Binary files a/docs/Presentations/AI_FORMATION/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/AI_PATROL/Dia1.JPG b/docs/Presentations/AI_PATROL/Dia1.JPG deleted file mode 100644 index cc03be842..000000000 Binary files a/docs/Presentations/AI_PATROL/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/AI_PATROL/Dia10.JPG b/docs/Presentations/AI_PATROL/Dia10.JPG deleted file mode 100644 index be365448c..000000000 Binary files a/docs/Presentations/AI_PATROL/Dia10.JPG and /dev/null differ diff --git a/docs/Presentations/AI_PATROL/Dia11.JPG b/docs/Presentations/AI_PATROL/Dia11.JPG deleted file mode 100644 index 32e956447..000000000 Binary files a/docs/Presentations/AI_PATROL/Dia11.JPG and /dev/null differ diff --git a/docs/Presentations/AI_PATROL/Dia12.JPG b/docs/Presentations/AI_PATROL/Dia12.JPG deleted file mode 100644 index ac6219c85..000000000 Binary files a/docs/Presentations/AI_PATROL/Dia12.JPG and /dev/null differ diff --git a/docs/Presentations/AI_PATROL/Dia2.JPG b/docs/Presentations/AI_PATROL/Dia2.JPG deleted file mode 100644 index ea1ed8cc9..000000000 Binary files a/docs/Presentations/AI_PATROL/Dia2.JPG and /dev/null differ diff --git a/docs/Presentations/AI_PATROL/Dia3.JPG b/docs/Presentations/AI_PATROL/Dia3.JPG deleted file mode 100644 index a0ad8c606..000000000 Binary files a/docs/Presentations/AI_PATROL/Dia3.JPG and /dev/null differ diff --git a/docs/Presentations/AI_PATROL/Dia4.JPG b/docs/Presentations/AI_PATROL/Dia4.JPG deleted file mode 100644 index 7cfc20fc0..000000000 Binary files a/docs/Presentations/AI_PATROL/Dia4.JPG and /dev/null differ diff --git a/docs/Presentations/AI_PATROL/Dia5.JPG b/docs/Presentations/AI_PATROL/Dia5.JPG deleted file mode 100644 index 5690a60fc..000000000 Binary files a/docs/Presentations/AI_PATROL/Dia5.JPG and /dev/null differ diff --git a/docs/Presentations/AI_PATROL/Dia6.JPG b/docs/Presentations/AI_PATROL/Dia6.JPG deleted file mode 100644 index bb3a03a4a..000000000 Binary files a/docs/Presentations/AI_PATROL/Dia6.JPG and /dev/null differ diff --git a/docs/Presentations/AI_PATROL/Dia7.JPG b/docs/Presentations/AI_PATROL/Dia7.JPG deleted file mode 100644 index d12628c2f..000000000 Binary files a/docs/Presentations/AI_PATROL/Dia7.JPG and /dev/null differ diff --git a/docs/Presentations/AI_PATROL/Dia8.JPG b/docs/Presentations/AI_PATROL/Dia8.JPG deleted file mode 100644 index cfcff5755..000000000 Binary files a/docs/Presentations/AI_PATROL/Dia8.JPG and /dev/null differ diff --git a/docs/Presentations/AI_PATROL/Dia9.JPG b/docs/Presentations/AI_PATROL/Dia9.JPG deleted file mode 100644 index 510ce2231..000000000 Binary files a/docs/Presentations/AI_PATROL/Dia9.JPG and /dev/null differ diff --git a/docs/Presentations/ATC_GROUND/Dia1.JPG b/docs/Presentations/ATC_GROUND/Dia1.JPG deleted file mode 100644 index c0cecdfed..000000000 Binary files a/docs/Presentations/ATC_GROUND/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/ATC_GROUND/Dia2.JPG b/docs/Presentations/ATC_GROUND/Dia2.JPG deleted file mode 100644 index 3b71efc15..000000000 Binary files a/docs/Presentations/ATC_GROUND/Dia2.JPG and /dev/null differ diff --git a/docs/Presentations/ATC_GROUND/Dia3.JPG b/docs/Presentations/ATC_GROUND/Dia3.JPG deleted file mode 100644 index 1b3ff5a76..000000000 Binary files a/docs/Presentations/ATC_GROUND/Dia3.JPG and /dev/null differ diff --git a/docs/Presentations/ATC_GROUND/Dia4.JPG b/docs/Presentations/ATC_GROUND/Dia4.JPG deleted file mode 100644 index a2af363ad..000000000 Binary files a/docs/Presentations/ATC_GROUND/Dia4.JPG and /dev/null differ diff --git a/docs/Presentations/ATC_GROUND/Dia5.JPG b/docs/Presentations/ATC_GROUND/Dia5.JPG deleted file mode 100644 index 9a76bf5c8..000000000 Binary files a/docs/Presentations/ATC_GROUND/Dia5.JPG and /dev/null differ diff --git a/docs/Presentations/ATC_GROUND/Dia6.JPG b/docs/Presentations/ATC_GROUND/Dia6.JPG deleted file mode 100644 index 46f65218d..000000000 Binary files a/docs/Presentations/ATC_GROUND/Dia6.JPG and /dev/null differ diff --git a/docs/Presentations/BASE/Dia1.JPG b/docs/Presentations/BASE/Dia1.JPG deleted file mode 100644 index 683a74371..000000000 Binary files a/docs/Presentations/BASE/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/CARGO/Dia1.JPG b/docs/Presentations/CARGO/Dia1.JPG deleted file mode 100644 index 8f80a25cc..000000000 Binary files a/docs/Presentations/CARGO/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/CARGO/Dia2.JPG b/docs/Presentations/CARGO/Dia2.JPG deleted file mode 100644 index 8c03cbad5..000000000 Binary files a/docs/Presentations/CARGO/Dia2.JPG and /dev/null differ diff --git a/docs/Presentations/CARGO/Dia3.JPG b/docs/Presentations/CARGO/Dia3.JPG deleted file mode 100644 index 4a5ce49ab..000000000 Binary files a/docs/Presentations/CARGO/Dia3.JPG and /dev/null differ diff --git a/docs/Presentations/CARGO/Dia4.JPG b/docs/Presentations/CARGO/Dia4.JPG deleted file mode 100644 index 9e786e61a..000000000 Binary files a/docs/Presentations/CARGO/Dia4.JPG and /dev/null differ diff --git a/docs/Presentations/CARGO/Dia5.JPG b/docs/Presentations/CARGO/Dia5.JPG deleted file mode 100644 index b33571559..000000000 Binary files a/docs/Presentations/CARGO/Dia5.JPG and /dev/null differ diff --git a/docs/Presentations/CARGO/Dia6.JPG b/docs/Presentations/CARGO/Dia6.JPG deleted file mode 100644 index a52bdcb49..000000000 Binary files a/docs/Presentations/CARGO/Dia6.JPG and /dev/null differ diff --git a/docs/Presentations/CARGO/Dia7.JPG b/docs/Presentations/CARGO/Dia7.JPG deleted file mode 100644 index 2d103b1e5..000000000 Binary files a/docs/Presentations/CARGO/Dia7.JPG and /dev/null differ diff --git a/docs/Presentations/CARGO/Dia8.JPG b/docs/Presentations/CARGO/Dia8.JPG deleted file mode 100644 index 0bb6fed51..000000000 Binary files a/docs/Presentations/CARGO/Dia8.JPG and /dev/null differ diff --git a/docs/Presentations/CARGO/Dia9.JPG b/docs/Presentations/CARGO/Dia9.JPG deleted file mode 100644 index 5009b2063..000000000 Binary files a/docs/Presentations/CARGO/Dia9.JPG and /dev/null differ diff --git a/docs/Presentations/CLEANUP_AIRBASE/Dia1.JPG b/docs/Presentations/CLEANUP_AIRBASE/Dia1.JPG deleted file mode 100644 index b5d0e85b8..000000000 Binary files a/docs/Presentations/CLEANUP_AIRBASE/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/DESIGNATE/Dia1.JPG b/docs/Presentations/DESIGNATE/Dia1.JPG deleted file mode 100644 index 4ea3fde1b..000000000 Binary files a/docs/Presentations/DESIGNATE/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/DESIGNATE/Dia10.JPG b/docs/Presentations/DESIGNATE/Dia10.JPG deleted file mode 100644 index cc950be4e..000000000 Binary files a/docs/Presentations/DESIGNATE/Dia10.JPG and /dev/null differ diff --git a/docs/Presentations/DESIGNATE/Dia11.JPG b/docs/Presentations/DESIGNATE/Dia11.JPG deleted file mode 100644 index bd2b4e0ee..000000000 Binary files a/docs/Presentations/DESIGNATE/Dia11.JPG and /dev/null differ diff --git a/docs/Presentations/DESIGNATE/Dia12.JPG b/docs/Presentations/DESIGNATE/Dia12.JPG deleted file mode 100644 index 16a566a77..000000000 Binary files a/docs/Presentations/DESIGNATE/Dia12.JPG and /dev/null differ diff --git a/docs/Presentations/DESIGNATE/Dia13.JPG b/docs/Presentations/DESIGNATE/Dia13.JPG deleted file mode 100644 index 2fb888778..000000000 Binary files a/docs/Presentations/DESIGNATE/Dia13.JPG and /dev/null differ diff --git a/docs/Presentations/DESIGNATE/Dia14.JPG b/docs/Presentations/DESIGNATE/Dia14.JPG deleted file mode 100644 index 72a123624..000000000 Binary files a/docs/Presentations/DESIGNATE/Dia14.JPG and /dev/null differ diff --git a/docs/Presentations/DESIGNATE/Dia2.JPG b/docs/Presentations/DESIGNATE/Dia2.JPG deleted file mode 100644 index 35c65e42a..000000000 Binary files a/docs/Presentations/DESIGNATE/Dia2.JPG and /dev/null differ diff --git a/docs/Presentations/DESIGNATE/Dia3.JPG b/docs/Presentations/DESIGNATE/Dia3.JPG deleted file mode 100644 index e96e565af..000000000 Binary files a/docs/Presentations/DESIGNATE/Dia3.JPG and /dev/null differ diff --git a/docs/Presentations/DESIGNATE/Dia4.JPG b/docs/Presentations/DESIGNATE/Dia4.JPG deleted file mode 100644 index 382e65e62..000000000 Binary files a/docs/Presentations/DESIGNATE/Dia4.JPG and /dev/null differ diff --git a/docs/Presentations/DESIGNATE/Dia5.JPG b/docs/Presentations/DESIGNATE/Dia5.JPG deleted file mode 100644 index 67eec2ee2..000000000 Binary files a/docs/Presentations/DESIGNATE/Dia5.JPG and /dev/null differ diff --git a/docs/Presentations/DESIGNATE/Dia6.JPG b/docs/Presentations/DESIGNATE/Dia6.JPG deleted file mode 100644 index 48b0eaa87..000000000 Binary files a/docs/Presentations/DESIGNATE/Dia6.JPG and /dev/null differ diff --git a/docs/Presentations/DESIGNATE/Dia7.JPG b/docs/Presentations/DESIGNATE/Dia7.JPG deleted file mode 100644 index 3a730dc21..000000000 Binary files a/docs/Presentations/DESIGNATE/Dia7.JPG and /dev/null differ diff --git a/docs/Presentations/DESIGNATE/Dia8.JPG b/docs/Presentations/DESIGNATE/Dia8.JPG deleted file mode 100644 index 7807e604d..000000000 Binary files a/docs/Presentations/DESIGNATE/Dia8.JPG and /dev/null differ diff --git a/docs/Presentations/DESIGNATE/Dia9.JPG b/docs/Presentations/DESIGNATE/Dia9.JPG deleted file mode 100644 index 0e24ab9aa..000000000 Binary files a/docs/Presentations/DESIGNATE/Dia9.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia1.JPG b/docs/Presentations/DETECTION/Dia1.JPG deleted file mode 100644 index c086b1079..000000000 Binary files a/docs/Presentations/DETECTION/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia10.JPG b/docs/Presentations/DETECTION/Dia10.JPG deleted file mode 100644 index 954a0d3d0..000000000 Binary files a/docs/Presentations/DETECTION/Dia10.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia11.JPG b/docs/Presentations/DETECTION/Dia11.JPG deleted file mode 100644 index 810f16483..000000000 Binary files a/docs/Presentations/DETECTION/Dia11.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia12.JPG b/docs/Presentations/DETECTION/Dia12.JPG deleted file mode 100644 index a0ca1b061..000000000 Binary files a/docs/Presentations/DETECTION/Dia12.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia13.JPG b/docs/Presentations/DETECTION/Dia13.JPG deleted file mode 100644 index 497c005dd..000000000 Binary files a/docs/Presentations/DETECTION/Dia13.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia14.JPG b/docs/Presentations/DETECTION/Dia14.JPG deleted file mode 100644 index ef976534d..000000000 Binary files a/docs/Presentations/DETECTION/Dia14.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia15.JPG b/docs/Presentations/DETECTION/Dia15.JPG deleted file mode 100644 index 58981f28c..000000000 Binary files a/docs/Presentations/DETECTION/Dia15.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia16.JPG b/docs/Presentations/DETECTION/Dia16.JPG deleted file mode 100644 index 4a65ce240..000000000 Binary files a/docs/Presentations/DETECTION/Dia16.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia17.JPG b/docs/Presentations/DETECTION/Dia17.JPG deleted file mode 100644 index 7409d05e5..000000000 Binary files a/docs/Presentations/DETECTION/Dia17.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia18.JPG b/docs/Presentations/DETECTION/Dia18.JPG deleted file mode 100644 index 44c74ef17..000000000 Binary files a/docs/Presentations/DETECTION/Dia18.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia19.JPG b/docs/Presentations/DETECTION/Dia19.JPG deleted file mode 100644 index c758c27cb..000000000 Binary files a/docs/Presentations/DETECTION/Dia19.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia2.JPG b/docs/Presentations/DETECTION/Dia2.JPG deleted file mode 100644 index aee215bf0..000000000 Binary files a/docs/Presentations/DETECTION/Dia2.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia20.JPG b/docs/Presentations/DETECTION/Dia20.JPG deleted file mode 100644 index c43490687..000000000 Binary files a/docs/Presentations/DETECTION/Dia20.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia21.JPG b/docs/Presentations/DETECTION/Dia21.JPG deleted file mode 100644 index db6c1bbc2..000000000 Binary files a/docs/Presentations/DETECTION/Dia21.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia22.JPG b/docs/Presentations/DETECTION/Dia22.JPG deleted file mode 100644 index e51732a44..000000000 Binary files a/docs/Presentations/DETECTION/Dia22.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia23.JPG b/docs/Presentations/DETECTION/Dia23.JPG deleted file mode 100644 index 0bd7c6c48..000000000 Binary files a/docs/Presentations/DETECTION/Dia23.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia24.JPG b/docs/Presentations/DETECTION/Dia24.JPG deleted file mode 100644 index 4b2f126c9..000000000 Binary files a/docs/Presentations/DETECTION/Dia24.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia25.JPG b/docs/Presentations/DETECTION/Dia25.JPG deleted file mode 100644 index e1faa4db4..000000000 Binary files a/docs/Presentations/DETECTION/Dia25.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia26.JPG b/docs/Presentations/DETECTION/Dia26.JPG deleted file mode 100644 index 90a86e1ae..000000000 Binary files a/docs/Presentations/DETECTION/Dia26.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia3.JPG b/docs/Presentations/DETECTION/Dia3.JPG deleted file mode 100644 index 785e31624..000000000 Binary files a/docs/Presentations/DETECTION/Dia3.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia4.JPG b/docs/Presentations/DETECTION/Dia4.JPG deleted file mode 100644 index 07dac89f6..000000000 Binary files a/docs/Presentations/DETECTION/Dia4.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia5.JPG b/docs/Presentations/DETECTION/Dia5.JPG deleted file mode 100644 index a21624e45..000000000 Binary files a/docs/Presentations/DETECTION/Dia5.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia6.JPG b/docs/Presentations/DETECTION/Dia6.JPG deleted file mode 100644 index 29cbff2b7..000000000 Binary files a/docs/Presentations/DETECTION/Dia6.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia7.JPG b/docs/Presentations/DETECTION/Dia7.JPG deleted file mode 100644 index effd511aa..000000000 Binary files a/docs/Presentations/DETECTION/Dia7.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia8.JPG b/docs/Presentations/DETECTION/Dia8.JPG deleted file mode 100644 index b409d8b08..000000000 Binary files a/docs/Presentations/DETECTION/Dia8.JPG and /dev/null differ diff --git a/docs/Presentations/DETECTION/Dia9.JPG b/docs/Presentations/DETECTION/Dia9.JPG deleted file mode 100644 index 5e2211712..000000000 Binary files a/docs/Presentations/DETECTION/Dia9.JPG and /dev/null differ diff --git a/docs/Presentations/EVENT/Dia1.JPG b/docs/Presentations/EVENT/Dia1.JPG deleted file mode 100644 index 921c06a70..000000000 Binary files a/docs/Presentations/EVENT/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/EVENT/Dia10.JPG b/docs/Presentations/EVENT/Dia10.JPG deleted file mode 100644 index b7a47e267..000000000 Binary files a/docs/Presentations/EVENT/Dia10.JPG and /dev/null differ diff --git a/docs/Presentations/EVENT/Dia11.JPG b/docs/Presentations/EVENT/Dia11.JPG deleted file mode 100644 index 381c4d94e..000000000 Binary files a/docs/Presentations/EVENT/Dia11.JPG and /dev/null differ diff --git a/docs/Presentations/EVENT/Dia12.JPG b/docs/Presentations/EVENT/Dia12.JPG deleted file mode 100644 index 5bada0bee..000000000 Binary files a/docs/Presentations/EVENT/Dia12.JPG and /dev/null differ diff --git a/docs/Presentations/EVENT/Dia13.JPG b/docs/Presentations/EVENT/Dia13.JPG deleted file mode 100644 index 690c685ff..000000000 Binary files a/docs/Presentations/EVENT/Dia13.JPG and /dev/null differ diff --git a/docs/Presentations/EVENT/Dia14.JPG b/docs/Presentations/EVENT/Dia14.JPG deleted file mode 100644 index 4be5e8994..000000000 Binary files a/docs/Presentations/EVENT/Dia14.JPG and /dev/null differ diff --git a/docs/Presentations/EVENT/Dia15.JPG b/docs/Presentations/EVENT/Dia15.JPG deleted file mode 100644 index 6762bc5f5..000000000 Binary files a/docs/Presentations/EVENT/Dia15.JPG and /dev/null differ diff --git a/docs/Presentations/EVENT/Dia16.JPG b/docs/Presentations/EVENT/Dia16.JPG deleted file mode 100644 index 4624879a2..000000000 Binary files a/docs/Presentations/EVENT/Dia16.JPG and /dev/null differ diff --git a/docs/Presentations/EVENT/Dia17.JPG b/docs/Presentations/EVENT/Dia17.JPG deleted file mode 100644 index 760004b09..000000000 Binary files a/docs/Presentations/EVENT/Dia17.JPG and /dev/null differ diff --git a/docs/Presentations/EVENT/Dia18.JPG b/docs/Presentations/EVENT/Dia18.JPG deleted file mode 100644 index 7743882c2..000000000 Binary files a/docs/Presentations/EVENT/Dia18.JPG and /dev/null differ diff --git a/docs/Presentations/EVENT/Dia2.JPG b/docs/Presentations/EVENT/Dia2.JPG deleted file mode 100644 index c01cf6f48..000000000 Binary files a/docs/Presentations/EVENT/Dia2.JPG and /dev/null differ diff --git a/docs/Presentations/EVENT/Dia3.JPG b/docs/Presentations/EVENT/Dia3.JPG deleted file mode 100644 index f668b6fc6..000000000 Binary files a/docs/Presentations/EVENT/Dia3.JPG and /dev/null differ diff --git a/docs/Presentations/EVENT/Dia4.JPG b/docs/Presentations/EVENT/Dia4.JPG deleted file mode 100644 index cd3a3ae64..000000000 Binary files a/docs/Presentations/EVENT/Dia4.JPG and /dev/null differ diff --git a/docs/Presentations/EVENT/Dia5.JPG b/docs/Presentations/EVENT/Dia5.JPG deleted file mode 100644 index de7ebba61..000000000 Binary files a/docs/Presentations/EVENT/Dia5.JPG and /dev/null differ diff --git a/docs/Presentations/EVENT/Dia6.JPG b/docs/Presentations/EVENT/Dia6.JPG deleted file mode 100644 index 39b17bddc..000000000 Binary files a/docs/Presentations/EVENT/Dia6.JPG and /dev/null differ diff --git a/docs/Presentations/EVENT/Dia7.JPG b/docs/Presentations/EVENT/Dia7.JPG deleted file mode 100644 index 36ec17212..000000000 Binary files a/docs/Presentations/EVENT/Dia7.JPG and /dev/null differ diff --git a/docs/Presentations/EVENT/Dia8.JPG b/docs/Presentations/EVENT/Dia8.JPG deleted file mode 100644 index e83589c00..000000000 Binary files a/docs/Presentations/EVENT/Dia8.JPG and /dev/null differ diff --git a/docs/Presentations/EVENT/Dia9.JPG b/docs/Presentations/EVENT/Dia9.JPG deleted file mode 100644 index 41d44256b..000000000 Binary files a/docs/Presentations/EVENT/Dia9.JPG and /dev/null differ diff --git a/docs/Presentations/FSM/Dia1.JPG b/docs/Presentations/FSM/Dia1.JPG deleted file mode 100644 index 0bcb86189..000000000 Binary files a/docs/Presentations/FSM/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/FSM/Dia2.JPG b/docs/Presentations/FSM/Dia2.JPG deleted file mode 100644 index 6893d1a38..000000000 Binary files a/docs/Presentations/FSM/Dia2.JPG and /dev/null differ diff --git a/docs/Presentations/FSM/Dia3.JPG b/docs/Presentations/FSM/Dia3.JPG deleted file mode 100644 index 597fb5911..000000000 Binary files a/docs/Presentations/FSM/Dia3.JPG and /dev/null differ diff --git a/docs/Presentations/FSM/Dia4.JPG b/docs/Presentations/FSM/Dia4.JPG deleted file mode 100644 index dd21b0ccb..000000000 Binary files a/docs/Presentations/FSM/Dia4.JPG and /dev/null differ diff --git a/docs/Presentations/FSM/Dia5.JPG b/docs/Presentations/FSM/Dia5.JPG deleted file mode 100644 index 78270f132..000000000 Binary files a/docs/Presentations/FSM/Dia5.JPG and /dev/null differ diff --git a/docs/Presentations/FSM/Dia6.JPG b/docs/Presentations/FSM/Dia6.JPG deleted file mode 100644 index e9b5f804f..000000000 Binary files a/docs/Presentations/FSM/Dia6.JPG and /dev/null differ diff --git a/docs/Presentations/FSM/Dia7.JPG b/docs/Presentations/FSM/Dia7.JPG deleted file mode 100644 index 535109064..000000000 Binary files a/docs/Presentations/FSM/Dia7.JPG and /dev/null differ diff --git a/docs/Presentations/MESSAGE/Dia1.JPG b/docs/Presentations/MESSAGE/Dia1.JPG deleted file mode 100644 index fa6a8532e..000000000 Binary files a/docs/Presentations/MESSAGE/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/MOOSE/Dia1.JPG b/docs/Presentations/MOOSE/Dia1.JPG deleted file mode 100644 index 0543af860..000000000 Binary files a/docs/Presentations/MOOSE/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/MOOSE/Dia2.JPG b/docs/Presentations/MOOSE/Dia2.JPG deleted file mode 100644 index fd56450a7..000000000 Binary files a/docs/Presentations/MOOSE/Dia2.JPG and /dev/null differ diff --git a/docs/Presentations/POINT/Dia1.JPG b/docs/Presentations/POINT/Dia1.JPG deleted file mode 100644 index 7470c42f4..000000000 Binary files a/docs/Presentations/POINT/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/RADIO/Dia1.JPG b/docs/Presentations/RADIO/Dia1.JPG deleted file mode 100644 index e37b3b33b..000000000 Binary files a/docs/Presentations/RADIO/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/RAT/RAT.png b/docs/Presentations/RAT/RAT.png deleted file mode 100644 index 1cfd25ca1..000000000 Binary files a/docs/Presentations/RAT/RAT.png and /dev/null differ diff --git a/docs/Presentations/RAT/RAT_Airport_Selection.png b/docs/Presentations/RAT/RAT_Airport_Selection.png deleted file mode 100644 index 505a53353..000000000 Binary files a/docs/Presentations/RAT/RAT_Airport_Selection.png and /dev/null differ diff --git a/docs/Presentations/RAT/RAT_Basic_Lua_Script.png b/docs/Presentations/RAT/RAT_Basic_Lua_Script.png deleted file mode 100644 index 6aacf0afb..000000000 Binary files a/docs/Presentations/RAT/RAT_Basic_Lua_Script.png and /dev/null differ diff --git a/docs/Presentations/RAT/RAT_Examples_Misc.png b/docs/Presentations/RAT/RAT_Examples_Misc.png deleted file mode 100644 index 357194eeb..000000000 Binary files a/docs/Presentations/RAT/RAT_Examples_Misc.png and /dev/null differ diff --git a/docs/Presentations/RAT/RAT_Examples_Spawn_at_Zones.png b/docs/Presentations/RAT/RAT_Examples_Spawn_at_Zones.png deleted file mode 100644 index 95ce76ce6..000000000 Binary files a/docs/Presentations/RAT/RAT_Examples_Spawn_at_Zones.png and /dev/null differ diff --git a/docs/Presentations/RAT/RAT_Examples_Spawn_in_Air.png b/docs/Presentations/RAT/RAT_Examples_Spawn_in_Air.png deleted file mode 100644 index 9096525f3..000000000 Binary files a/docs/Presentations/RAT/RAT_Examples_Spawn_in_Air.png and /dev/null differ diff --git a/docs/Presentations/RAT/RAT_Examples_Specify_Departure_and_Destination.png b/docs/Presentations/RAT/RAT_Examples_Specify_Departure_and_Destination.png deleted file mode 100644 index f27339fe6..000000000 Binary files a/docs/Presentations/RAT/RAT_Examples_Specify_Departure_and_Destination.png and /dev/null differ diff --git a/docs/Presentations/RAT/RAT_Flight_Plan.png b/docs/Presentations/RAT/RAT_Flight_Plan.png deleted file mode 100644 index 159c53a23..000000000 Binary files a/docs/Presentations/RAT/RAT_Flight_Plan.png and /dev/null differ diff --git a/docs/Presentations/RAT/RAT_Gaussian.png b/docs/Presentations/RAT/RAT_Gaussian.png deleted file mode 100644 index c67b1cadd..000000000 Binary files a/docs/Presentations/RAT/RAT_Gaussian.png and /dev/null differ diff --git a/docs/Presentations/RAT/RAT_Mission_Setup.png b/docs/Presentations/RAT/RAT_Mission_Setup.png deleted file mode 100644 index b30dadb13..000000000 Binary files a/docs/Presentations/RAT/RAT_Mission_Setup.png and /dev/null differ diff --git a/docs/Presentations/SCHEDULER/Dia1.JPG b/docs/Presentations/SCHEDULER/Dia1.JPG deleted file mode 100644 index a5a7d750b..000000000 Binary files a/docs/Presentations/SCHEDULER/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/SCORING/Dia1.JPG b/docs/Presentations/SCORING/Dia1.JPG deleted file mode 100644 index 631db9574..000000000 Binary files a/docs/Presentations/SCORING/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/SCORING/Dia10.JPG b/docs/Presentations/SCORING/Dia10.JPG deleted file mode 100644 index 8635218e8..000000000 Binary files a/docs/Presentations/SCORING/Dia10.JPG and /dev/null differ diff --git a/docs/Presentations/SCORING/Dia11.JPG b/docs/Presentations/SCORING/Dia11.JPG deleted file mode 100644 index e9650a741..000000000 Binary files a/docs/Presentations/SCORING/Dia11.JPG and /dev/null differ diff --git a/docs/Presentations/SCORING/Dia12.JPG b/docs/Presentations/SCORING/Dia12.JPG deleted file mode 100644 index d6227e889..000000000 Binary files a/docs/Presentations/SCORING/Dia12.JPG and /dev/null differ diff --git a/docs/Presentations/SCORING/Dia13.JPG b/docs/Presentations/SCORING/Dia13.JPG deleted file mode 100644 index a376c7b50..000000000 Binary files a/docs/Presentations/SCORING/Dia13.JPG and /dev/null differ diff --git a/docs/Presentations/SCORING/Dia14.JPG b/docs/Presentations/SCORING/Dia14.JPG deleted file mode 100644 index 6cf31ebaf..000000000 Binary files a/docs/Presentations/SCORING/Dia14.JPG and /dev/null differ diff --git a/docs/Presentations/SCORING/Dia2.JPG b/docs/Presentations/SCORING/Dia2.JPG deleted file mode 100644 index 0436a79ad..000000000 Binary files a/docs/Presentations/SCORING/Dia2.JPG and /dev/null differ diff --git a/docs/Presentations/SCORING/Dia3.JPG b/docs/Presentations/SCORING/Dia3.JPG deleted file mode 100644 index ce310c789..000000000 Binary files a/docs/Presentations/SCORING/Dia3.JPG and /dev/null differ diff --git a/docs/Presentations/SCORING/Dia4.JPG b/docs/Presentations/SCORING/Dia4.JPG deleted file mode 100644 index 6326cfa13..000000000 Binary files a/docs/Presentations/SCORING/Dia4.JPG and /dev/null differ diff --git a/docs/Presentations/SCORING/Dia5.JPG b/docs/Presentations/SCORING/Dia5.JPG deleted file mode 100644 index c4e7c8696..000000000 Binary files a/docs/Presentations/SCORING/Dia5.JPG and /dev/null differ diff --git a/docs/Presentations/SCORING/Dia6.JPG b/docs/Presentations/SCORING/Dia6.JPG deleted file mode 100644 index 644652096..000000000 Binary files a/docs/Presentations/SCORING/Dia6.JPG and /dev/null differ diff --git a/docs/Presentations/SCORING/Dia7.JPG b/docs/Presentations/SCORING/Dia7.JPG deleted file mode 100644 index db73f303c..000000000 Binary files a/docs/Presentations/SCORING/Dia7.JPG and /dev/null differ diff --git a/docs/Presentations/SCORING/Dia8.JPG b/docs/Presentations/SCORING/Dia8.JPG deleted file mode 100644 index b73aecc0e..000000000 Binary files a/docs/Presentations/SCORING/Dia8.JPG and /dev/null differ diff --git a/docs/Presentations/SCORING/Dia9.JPG b/docs/Presentations/SCORING/Dia9.JPG deleted file mode 100644 index 01c9703c6..000000000 Binary files a/docs/Presentations/SCORING/Dia9.JPG and /dev/null differ diff --git a/docs/Presentations/SET/Dia1.JPG b/docs/Presentations/SET/Dia1.JPG deleted file mode 100644 index a78c95048..000000000 Binary files a/docs/Presentations/SET/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/SPAWN/Dia1.JPG b/docs/Presentations/SPAWN/Dia1.JPG deleted file mode 100644 index 05ab34ec5..000000000 Binary files a/docs/Presentations/SPAWN/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/SPAWN/Dia2.JPG b/docs/Presentations/SPAWN/Dia2.JPG deleted file mode 100644 index aadb98ed2..000000000 Binary files a/docs/Presentations/SPAWN/Dia2.JPG and /dev/null differ diff --git a/docs/Presentations/SPAWN/Dia3.JPG b/docs/Presentations/SPAWN/Dia3.JPG deleted file mode 100644 index 338700a80..000000000 Binary files a/docs/Presentations/SPAWN/Dia3.JPG and /dev/null differ diff --git a/docs/Presentations/SPAWN/Dia4.JPG b/docs/Presentations/SPAWN/Dia4.JPG deleted file mode 100644 index a5170e8b5..000000000 Binary files a/docs/Presentations/SPAWN/Dia4.JPG and /dev/null differ diff --git a/docs/Presentations/SPAWN/Dia5.JPG b/docs/Presentations/SPAWN/Dia5.JPG deleted file mode 100644 index 5a37bb090..000000000 Binary files a/docs/Presentations/SPAWN/Dia5.JPG and /dev/null differ diff --git a/docs/Presentations/SPAWN/Dia6.JPG b/docs/Presentations/SPAWN/Dia6.JPG deleted file mode 100644 index 65adc4636..000000000 Binary files a/docs/Presentations/SPAWN/Dia6.JPG and /dev/null differ diff --git a/docs/Presentations/SPAWN/Dia7.JPG b/docs/Presentations/SPAWN/Dia7.JPG deleted file mode 100644 index 32f890147..000000000 Binary files a/docs/Presentations/SPAWN/Dia7.JPG and /dev/null differ diff --git a/docs/Presentations/SPAWN/Dia8.JPG b/docs/Presentations/SPAWN/Dia8.JPG deleted file mode 100644 index ee57c73bb..000000000 Binary files a/docs/Presentations/SPAWN/Dia8.JPG and /dev/null differ diff --git a/docs/Presentations/SPAWN/Dia9.JPG b/docs/Presentations/SPAWN/Dia9.JPG deleted file mode 100644 index 5009b2063..000000000 Binary files a/docs/Presentations/SPAWN/Dia9.JPG and /dev/null differ diff --git a/docs/Presentations/SPAWN/SPAWN.JPG b/docs/Presentations/SPAWN/SPAWN.JPG deleted file mode 100644 index efb582913..000000000 Binary files a/docs/Presentations/SPAWN/SPAWN.JPG and /dev/null differ diff --git a/docs/Presentations/SPAWNSTATIC/Dia1.JPG b/docs/Presentations/SPAWNSTATIC/Dia1.JPG deleted file mode 100644 index 6447e7241..000000000 Binary files a/docs/Presentations/SPAWNSTATIC/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/SPOT/Dia1.JPG b/docs/Presentations/SPOT/Dia1.JPG deleted file mode 100644 index b23abb17e..000000000 Binary files a/docs/Presentations/SPOT/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/SPOT/Dia2.JPG b/docs/Presentations/SPOT/Dia2.JPG deleted file mode 100644 index b6c8a1dff..000000000 Binary files a/docs/Presentations/SPOT/Dia2.JPG and /dev/null differ diff --git a/docs/Presentations/SPOT/Dia3.JPG b/docs/Presentations/SPOT/Dia3.JPG deleted file mode 100644 index 599c22b24..000000000 Binary files a/docs/Presentations/SPOT/Dia3.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2A/Dia1.JPG b/docs/Presentations/TASK_A2A/Dia1.JPG deleted file mode 100644 index 6abcff448..000000000 Binary files a/docs/Presentations/TASK_A2A/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2A/Dia10.JPG b/docs/Presentations/TASK_A2A/Dia10.JPG deleted file mode 100644 index 004e8a810..000000000 Binary files a/docs/Presentations/TASK_A2A/Dia10.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2A/Dia11.JPG b/docs/Presentations/TASK_A2A/Dia11.JPG deleted file mode 100644 index 8ae19920e..000000000 Binary files a/docs/Presentations/TASK_A2A/Dia11.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2A/Dia2.JPG b/docs/Presentations/TASK_A2A/Dia2.JPG deleted file mode 100644 index df1a4f593..000000000 Binary files a/docs/Presentations/TASK_A2A/Dia2.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2A/Dia3.JPG b/docs/Presentations/TASK_A2A/Dia3.JPG deleted file mode 100644 index e7d452c2b..000000000 Binary files a/docs/Presentations/TASK_A2A/Dia3.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2A/Dia4.JPG b/docs/Presentations/TASK_A2A/Dia4.JPG deleted file mode 100644 index 49eafe1ae..000000000 Binary files a/docs/Presentations/TASK_A2A/Dia4.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2A/Dia5.JPG b/docs/Presentations/TASK_A2A/Dia5.JPG deleted file mode 100644 index 77e2d78a4..000000000 Binary files a/docs/Presentations/TASK_A2A/Dia5.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2A/Dia6.JPG b/docs/Presentations/TASK_A2A/Dia6.JPG deleted file mode 100644 index 7ae05ba76..000000000 Binary files a/docs/Presentations/TASK_A2A/Dia6.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2A/Dia7.JPG b/docs/Presentations/TASK_A2A/Dia7.JPG deleted file mode 100644 index e826fda26..000000000 Binary files a/docs/Presentations/TASK_A2A/Dia7.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2A/Dia8.JPG b/docs/Presentations/TASK_A2A/Dia8.JPG deleted file mode 100644 index 3ca858a8d..000000000 Binary files a/docs/Presentations/TASK_A2A/Dia8.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2A/Dia9.JPG b/docs/Presentations/TASK_A2A/Dia9.JPG deleted file mode 100644 index f608efda1..000000000 Binary files a/docs/Presentations/TASK_A2A/Dia9.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2A_DISPATCHER/Dia1.JPG b/docs/Presentations/TASK_A2A_DISPATCHER/Dia1.JPG deleted file mode 100644 index d2cce8ba7..000000000 Binary files a/docs/Presentations/TASK_A2A_DISPATCHER/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2A_DISPATCHER/Dia10.JPG b/docs/Presentations/TASK_A2A_DISPATCHER/Dia10.JPG deleted file mode 100644 index 0ec74665a..000000000 Binary files a/docs/Presentations/TASK_A2A_DISPATCHER/Dia10.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2A_DISPATCHER/Dia11.JPG b/docs/Presentations/TASK_A2A_DISPATCHER/Dia11.JPG deleted file mode 100644 index ab024e79e..000000000 Binary files a/docs/Presentations/TASK_A2A_DISPATCHER/Dia11.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2A_DISPATCHER/Dia2.JPG b/docs/Presentations/TASK_A2A_DISPATCHER/Dia2.JPG deleted file mode 100644 index 1cedf0488..000000000 Binary files a/docs/Presentations/TASK_A2A_DISPATCHER/Dia2.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2A_DISPATCHER/Dia3.JPG b/docs/Presentations/TASK_A2A_DISPATCHER/Dia3.JPG deleted file mode 100644 index 9575ddf60..000000000 Binary files a/docs/Presentations/TASK_A2A_DISPATCHER/Dia3.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2A_DISPATCHER/Dia4.JPG b/docs/Presentations/TASK_A2A_DISPATCHER/Dia4.JPG deleted file mode 100644 index 5527c3c91..000000000 Binary files a/docs/Presentations/TASK_A2A_DISPATCHER/Dia4.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2A_DISPATCHER/Dia5.JPG b/docs/Presentations/TASK_A2A_DISPATCHER/Dia5.JPG deleted file mode 100644 index e034e3b6e..000000000 Binary files a/docs/Presentations/TASK_A2A_DISPATCHER/Dia5.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2A_DISPATCHER/Dia6.JPG b/docs/Presentations/TASK_A2A_DISPATCHER/Dia6.JPG deleted file mode 100644 index 6ec63947d..000000000 Binary files a/docs/Presentations/TASK_A2A_DISPATCHER/Dia6.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2A_DISPATCHER/Dia7.JPG b/docs/Presentations/TASK_A2A_DISPATCHER/Dia7.JPG deleted file mode 100644 index 4a81a7d77..000000000 Binary files a/docs/Presentations/TASK_A2A_DISPATCHER/Dia7.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2A_DISPATCHER/Dia8.JPG b/docs/Presentations/TASK_A2A_DISPATCHER/Dia8.JPG deleted file mode 100644 index ec2b4d47a..000000000 Binary files a/docs/Presentations/TASK_A2A_DISPATCHER/Dia8.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2A_DISPATCHER/Dia9.JPG b/docs/Presentations/TASK_A2A_DISPATCHER/Dia9.JPG deleted file mode 100644 index 40d612b50..000000000 Binary files a/docs/Presentations/TASK_A2A_DISPATCHER/Dia9.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2G/Dia1.JPG b/docs/Presentations/TASK_A2G/Dia1.JPG deleted file mode 100644 index 160431a1b..000000000 Binary files a/docs/Presentations/TASK_A2G/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2G_DISPATCHER/Dia1.JPG b/docs/Presentations/TASK_A2G_DISPATCHER/Dia1.JPG deleted file mode 100644 index 6be504e18..000000000 Binary files a/docs/Presentations/TASK_A2G_DISPATCHER/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2G_DISPATCHER/Dia10.JPG b/docs/Presentations/TASK_A2G_DISPATCHER/Dia10.JPG deleted file mode 100644 index 0ec74665a..000000000 Binary files a/docs/Presentations/TASK_A2G_DISPATCHER/Dia10.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2G_DISPATCHER/Dia11.JPG b/docs/Presentations/TASK_A2G_DISPATCHER/Dia11.JPG deleted file mode 100644 index ab024e79e..000000000 Binary files a/docs/Presentations/TASK_A2G_DISPATCHER/Dia11.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2G_DISPATCHER/Dia2.JPG b/docs/Presentations/TASK_A2G_DISPATCHER/Dia2.JPG deleted file mode 100644 index 1cedf0488..000000000 Binary files a/docs/Presentations/TASK_A2G_DISPATCHER/Dia2.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2G_DISPATCHER/Dia3.JPG b/docs/Presentations/TASK_A2G_DISPATCHER/Dia3.JPG deleted file mode 100644 index 9575ddf60..000000000 Binary files a/docs/Presentations/TASK_A2G_DISPATCHER/Dia3.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2G_DISPATCHER/Dia4.JPG b/docs/Presentations/TASK_A2G_DISPATCHER/Dia4.JPG deleted file mode 100644 index 5527c3c91..000000000 Binary files a/docs/Presentations/TASK_A2G_DISPATCHER/Dia4.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2G_DISPATCHER/Dia5.JPG b/docs/Presentations/TASK_A2G_DISPATCHER/Dia5.JPG deleted file mode 100644 index e034e3b6e..000000000 Binary files a/docs/Presentations/TASK_A2G_DISPATCHER/Dia5.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2G_DISPATCHER/Dia6.JPG b/docs/Presentations/TASK_A2G_DISPATCHER/Dia6.JPG deleted file mode 100644 index 6ec63947d..000000000 Binary files a/docs/Presentations/TASK_A2G_DISPATCHER/Dia6.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2G_DISPATCHER/Dia7.JPG b/docs/Presentations/TASK_A2G_DISPATCHER/Dia7.JPG deleted file mode 100644 index 4a81a7d77..000000000 Binary files a/docs/Presentations/TASK_A2G_DISPATCHER/Dia7.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2G_DISPATCHER/Dia8.JPG b/docs/Presentations/TASK_A2G_DISPATCHER/Dia8.JPG deleted file mode 100644 index ec2b4d47a..000000000 Binary files a/docs/Presentations/TASK_A2G_DISPATCHER/Dia8.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_A2G_DISPATCHER/Dia9.JPG b/docs/Presentations/TASK_A2G_DISPATCHER/Dia9.JPG deleted file mode 100644 index 40d612b50..000000000 Binary files a/docs/Presentations/TASK_A2G_DISPATCHER/Dia9.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_CARGO/Dia1.JPG b/docs/Presentations/TASK_CARGO/Dia1.JPG deleted file mode 100644 index d56bce0bf..000000000 Binary files a/docs/Presentations/TASK_CARGO/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_DISPATCHER/Dia1.JPG b/docs/Presentations/TASK_DISPATCHER/Dia1.JPG deleted file mode 100644 index f71ee5d5d..000000000 Binary files a/docs/Presentations/TASK_DISPATCHER/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_DISPATCHER/Dia10.JPG b/docs/Presentations/TASK_DISPATCHER/Dia10.JPG deleted file mode 100644 index 3fdf22073..000000000 Binary files a/docs/Presentations/TASK_DISPATCHER/Dia10.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_DISPATCHER/Dia11.JPG b/docs/Presentations/TASK_DISPATCHER/Dia11.JPG deleted file mode 100644 index 659c6c2be..000000000 Binary files a/docs/Presentations/TASK_DISPATCHER/Dia11.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_DISPATCHER/Dia12.JPG b/docs/Presentations/TASK_DISPATCHER/Dia12.JPG deleted file mode 100644 index d1ed49b67..000000000 Binary files a/docs/Presentations/TASK_DISPATCHER/Dia12.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_DISPATCHER/Dia13.JPG b/docs/Presentations/TASK_DISPATCHER/Dia13.JPG deleted file mode 100644 index 967b83fce..000000000 Binary files a/docs/Presentations/TASK_DISPATCHER/Dia13.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_DISPATCHER/Dia14.JPG b/docs/Presentations/TASK_DISPATCHER/Dia14.JPG deleted file mode 100644 index 43995d797..000000000 Binary files a/docs/Presentations/TASK_DISPATCHER/Dia14.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_DISPATCHER/Dia15.JPG b/docs/Presentations/TASK_DISPATCHER/Dia15.JPG deleted file mode 100644 index a702252f7..000000000 Binary files a/docs/Presentations/TASK_DISPATCHER/Dia15.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_DISPATCHER/Dia16.JPG b/docs/Presentations/TASK_DISPATCHER/Dia16.JPG deleted file mode 100644 index 4c00ac4e6..000000000 Binary files a/docs/Presentations/TASK_DISPATCHER/Dia16.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_DISPATCHER/Dia17.JPG b/docs/Presentations/TASK_DISPATCHER/Dia17.JPG deleted file mode 100644 index 28dc9d79e..000000000 Binary files a/docs/Presentations/TASK_DISPATCHER/Dia17.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_DISPATCHER/Dia18.JPG b/docs/Presentations/TASK_DISPATCHER/Dia18.JPG deleted file mode 100644 index b6bc05504..000000000 Binary files a/docs/Presentations/TASK_DISPATCHER/Dia18.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_DISPATCHER/Dia2.JPG b/docs/Presentations/TASK_DISPATCHER/Dia2.JPG deleted file mode 100644 index 1dfd6d9c6..000000000 Binary files a/docs/Presentations/TASK_DISPATCHER/Dia2.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_DISPATCHER/Dia3.JPG b/docs/Presentations/TASK_DISPATCHER/Dia3.JPG deleted file mode 100644 index 20212e5f8..000000000 Binary files a/docs/Presentations/TASK_DISPATCHER/Dia3.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_DISPATCHER/Dia4.JPG b/docs/Presentations/TASK_DISPATCHER/Dia4.JPG deleted file mode 100644 index 02195aecb..000000000 Binary files a/docs/Presentations/TASK_DISPATCHER/Dia4.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_DISPATCHER/Dia5.JPG b/docs/Presentations/TASK_DISPATCHER/Dia5.JPG deleted file mode 100644 index cc64e30c7..000000000 Binary files a/docs/Presentations/TASK_DISPATCHER/Dia5.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_DISPATCHER/Dia6.JPG b/docs/Presentations/TASK_DISPATCHER/Dia6.JPG deleted file mode 100644 index c81ef0960..000000000 Binary files a/docs/Presentations/TASK_DISPATCHER/Dia6.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_DISPATCHER/Dia7.JPG b/docs/Presentations/TASK_DISPATCHER/Dia7.JPG deleted file mode 100644 index a989eef34..000000000 Binary files a/docs/Presentations/TASK_DISPATCHER/Dia7.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_DISPATCHER/Dia8.JPG b/docs/Presentations/TASK_DISPATCHER/Dia8.JPG deleted file mode 100644 index 194c65558..000000000 Binary files a/docs/Presentations/TASK_DISPATCHER/Dia8.JPG and /dev/null differ diff --git a/docs/Presentations/TASK_DISPATCHER/Dia9.JPG b/docs/Presentations/TASK_DISPATCHER/Dia9.JPG deleted file mode 100644 index 0c2c48816..000000000 Binary files a/docs/Presentations/TASK_DISPATCHER/Dia9.JPG and /dev/null differ diff --git a/docs/Presentations/ZONE/Dia1.JPG b/docs/Presentations/ZONE/Dia1.JPG deleted file mode 100644 index 75c601caa..000000000 Binary files a/docs/Presentations/ZONE/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/ZONE_CAPTURE_COALITION/Dia1.JPG b/docs/Presentations/ZONE_CAPTURE_COALITION/Dia1.JPG deleted file mode 100644 index 87777ced7..000000000 Binary files a/docs/Presentations/ZONE_CAPTURE_COALITION/Dia1.JPG and /dev/null differ diff --git a/docs/Presentations/ZONE_CAPTURE_COALITION/Dia2.JPG b/docs/Presentations/ZONE_CAPTURE_COALITION/Dia2.JPG deleted file mode 100644 index 602372ec3..000000000 Binary files a/docs/Presentations/ZONE_CAPTURE_COALITION/Dia2.JPG and /dev/null differ diff --git a/docs/Presentations/ZONE_CAPTURE_COALITION/Dia3.JPG b/docs/Presentations/ZONE_CAPTURE_COALITION/Dia3.JPG deleted file mode 100644 index dc3c953ac..000000000 Binary files a/docs/Presentations/ZONE_CAPTURE_COALITION/Dia3.JPG and /dev/null differ diff --git a/docs/Presentations/ZONE_CAPTURE_COALITION/Dia4.JPG b/docs/Presentations/ZONE_CAPTURE_COALITION/Dia4.JPG deleted file mode 100644 index 6edd323eb..000000000 Binary files a/docs/Presentations/ZONE_CAPTURE_COALITION/Dia4.JPG and /dev/null differ diff --git a/docs/Presentations/ZONE_CAPTURE_COALITION/Dia5.JPG b/docs/Presentations/ZONE_CAPTURE_COALITION/Dia5.JPG deleted file mode 100644 index 88435fbbe..000000000 Binary files a/docs/Presentations/ZONE_CAPTURE_COALITION/Dia5.JPG and /dev/null differ diff --git a/docs/Presentations/ZONE_CAPTURE_COALITION/Dia6.JPG b/docs/Presentations/ZONE_CAPTURE_COALITION/Dia6.JPG deleted file mode 100644 index 90d60e99c..000000000 Binary files a/docs/Presentations/ZONE_CAPTURE_COALITION/Dia6.JPG and /dev/null differ diff --git a/docs/Presentations/ZONE_CAPTURE_COALITION/Dia7.JPG b/docs/Presentations/ZONE_CAPTURE_COALITION/Dia7.JPG deleted file mode 100644 index b332cd3e4..000000000 Binary files a/docs/Presentations/ZONE_CAPTURE_COALITION/Dia7.JPG and /dev/null differ diff --git a/docs/Presentations/ZONE_CAPTURE_COALITION/Dia8.JPG b/docs/Presentations/ZONE_CAPTURE_COALITION/Dia8.JPG deleted file mode 100644 index 019cef4db..000000000 Binary files a/docs/Presentations/ZONE_CAPTURE_COALITION/Dia8.JPG and /dev/null differ diff --git a/docs/Stylesheet/stylesheet.css b/docs/Stylesheet/stylesheet.css deleted file mode 100644 index 206209132..000000000 --- a/docs/Stylesheet/stylesheet.css +++ /dev/null @@ -1,1038 +0,0 @@ -/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ - -/** - * 1. Set default font family to sans-serif. - * 2. Prevent iOS text size adjust after orientation change, without disabling - * user zoom. - */ - -@import url('https://fonts.googleapis.com/css?family=Architects+Daughter'); - -html { - font-family: sans-serif; /* 1 */ - -webkit-text-size-adjust: 100%; /* 2 */ - -ms-text-size-adjust: 100%; /* 2 */ -} - -/** - * Remove default margin. - */ - -body { - margin: 0; -} - -/* HTML5 display definitions - ========================================================================== */ - -/** - * Correct `block` display not defined for any HTML5 element in IE 8/9. - * Correct `block` display not defined for `details` or `summary` in IE 10/11 - * and Firefox. - * Correct `block` display not defined for `main` in IE 11. - */ - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -menu, -nav, -section, -summary { - display: block; -} - -/** - * 1. Correct `inline-block` display not defined in IE 8/9. - * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. - */ - -audio, -canvas, -progress, -video { - display: inline-block; /* 1 */ - vertical-align: baseline; /* 2 */ -} - -/** - * Prevent modern browsers from displaying `audio` without controls. - * Remove excess height in iOS 5 devices. - */ - -audio:not([controls]) { - display: none; - height: 0; -} - -/** - * Address `[hidden]` styling not present in IE 8/9/10. - * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. - */ - -[hidden], -template { - display: none; -} - -/* Links - ========================================================================== */ - -/** - * Remove the gray background color from active links in IE 10. - */ - -a { - background-color: transparent; -} - -/** - * Improve readability when focused and also mouse hovered in all browsers. - */ - -a:active, -a:hover { - outline: 0; -} - -/* Text-level semantics - ========================================================================== */ - -/** - * Address styling not present in IE 8/9/10/11, Safari, and Chrome. - */ - -abbr[title] { - border-bottom: 1px dotted; -} - -/** - * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. - */ - -b, -strong { - font-weight: bold; -} - -/** - * Address styling not present in Safari and Chrome. - */ - -dfn { - font-style: italic; -} - -/** - * Address variable `h1` font-size and margin within `section` and `article` - * contexts in Firefox 4+, Safari, and Chrome. - */ - -h1 { - margin: 0.67em 0; - font-size: 2em; -} - -/** - * Address styling not present in IE 8/9. - */ - -mark { - color: #000; - background: #ff0; -} - -/** - * Address inconsistent and variable font size in all browsers. - */ - -small { - font-size: 80%; -} - -/** - * Prevent `sub` and `sup` affecting `line-height` in all browsers. - */ - -sub, -sup { - position: relative; - font-size: 75%; - line-height: 0; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -/* Embedded content - ========================================================================== */ - -/** - * Remove border when inside `a` element in IE 8/9/10. - */ - -img { - border: 0; - max-width:100%; - height:auto; -} - -/** - * Correct overflow not hidden in IE 9/10/11. - */ - -svg:not(:root) { - overflow: hidden; -} - -/* Grouping content - ========================================================================== */ - -/** - * Address margin not present in IE 8/9 and Safari. - */ - -figure { - margin: 1em 40px; -} - -/** - * Address differences between Firefox and other browsers. - */ - -hr { - height: 0; - -moz-box-sizing: content-box; - box-sizing: content-box; -} - -/** - * Contain overflow in all browsers. - */ - -pre { - overflow: auto; -} - -/** - * Address odd `em`-unit font size rendering in all browsers. - */ - -code, -kbd, -pre, -samp { - font-family: monospace, monospace; - font-size: 1em; -} - -/* Forms - ========================================================================== */ - -/** - * Known limitation: by default, Chrome and Safari on OS X allow very limited - * styling of `select`, unless a `border` property is set. - */ - -/** - * 1. Correct color not being inherited. - * Known issue: affects color of disabled elements. - * 2. Correct font properties not being inherited. - * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. - */ - -button, -input, -optgroup, -select, -textarea { - margin: 0; /* 3 */ - font: inherit; /* 2 */ - color: inherit; /* 1 */ -} - -/** - * Address `overflow` set to `hidden` in IE 8/9/10/11. - */ - -button { - overflow: visible; -} - -/** - * Address inconsistent `text-transform` inheritance for `button` and `select`. - * All other form control elements do not inherit `text-transform` values. - * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. - * Correct `select` style inheritance in Firefox. - */ - -button, -select { - text-transform: none; -} - -/** - * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` - * and `video` controls. - * 2. Correct inability to style clickable `input` types in iOS. - * 3. Improve usability and consistency of cursor style between image-type - * `input` and others. - */ - -button, -html input[type="button"], /* 1 */ -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; /* 2 */ - cursor: pointer; /* 3 */ -} - -/** - * Re-set default cursor for disabled elements. - */ - -button[disabled], -html input[disabled] { - cursor: default; -} - -/** - * Remove inner padding and border in Firefox 4+. - */ - -button::-moz-focus-inner, -input::-moz-focus-inner { - padding: 0; - border: 0; -} - -/** - * Address Firefox 4+ setting `line-height` on `input` using `!important` in - * the UA stylesheet. - */ - -input { - line-height: normal; -} - -/** - * It's recommended that you don't attempt to style these elements. - * Firefox's implementation doesn't respect box-sizing, padding, or width. - * - * 1. Address box sizing set to `content-box` in IE 8/9/10. - * 2. Remove excess padding in IE 8/9/10. - */ - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Fix the cursor style for Chrome's increment/decrement buttons. For certain - * `font-size` values of the `input`, it causes the cursor style of the - * decrement button to change from `default` to `text`. - */ - -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -/** - * 1. Address `appearance` set to `searchfield` in Safari and Chrome. - * 2. Address `box-sizing` set to `border-box` in Safari and Chrome - * (include `-moz` to future-proof). - */ - -input[type="search"] { - -webkit-box-sizing: content-box; /* 2 */ - -moz-box-sizing: content-box; - box-sizing: content-box; - -webkit-appearance: textfield; /* 1 */ -} - -/** - * Remove inner padding and search cancel button in Safari and Chrome on OS X. - * Safari (but not Chrome) clips the cancel button when the search input has - * padding (and `textfield` appearance). - */ - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * Define consistent border, margin, and padding. - */ - -fieldset { - padding: 0.35em 0.625em 0.75em; - margin: 0 2px; - border: 1px solid #c0c0c0; -} - -/** - * 1. Correct `color` not being inherited in IE 8/9/10/11. - * 2. Remove padding so people aren't caught out if they zero out fieldsets. - */ - -legend { - padding: 0; /* 2 */ - border: 0; /* 1 */ -} - -/** - * Remove default vertical scrollbar in IE 8/9/10/11. - */ - -textarea { - overflow: auto; -} - -/** - * Don't inherit the `font-weight` (applied by a rule above). - * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. - */ - -optgroup { - font-weight: bold; -} - -/* Tables - ========================================================================== */ - -/** - * Remove most spacing between table cells. - */ - -table { - border-spacing: 0; - border-collapse: collapse; -} - -td, -th { - padding: 0; -} - -/* LAYOUT STYLES */ -body { - font-family: 'Helvetica Neue', Helvetica, Arial, serif; - font-size: 15px; - font-weight: 400; - line-height: 1.5; - color: #666; - background: #fafafa url(../../images/body-bg.jpg) 0 0 repeat; - margin-left: 1em; - margin-right: 1em; - margin: 0px; -} - -p { - margin-top: 0; -} - - -a { - color: #2879d0; -} -a:hover { - color: #2268b2; -} - -header { - padding-top: 40px; - padding-bottom: 40px; - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - background: #2e7bcf url(../images/header-bg.jpg) 0 0 repeat-x; - border-bottom: solid 1px #275da1; -} - -h1 { - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - font-size: 32px; - font-weight: normal; - line-height: 1.5; -} - -h2 { - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - font-size: 26px; - font-weight: normal; - line-height: 1.3; -} - -h3 { - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - font-size: 22px; - font-weight: normal; - line-height: 1.1; -} - -.inner { - position: relative; - width: 940px; - margin: 0 auto; -} - -#content-wrapper { - padding-top: 30px; - border-top: solid 1px #fff; -} - -#main-content { - float: left; - width: 690px; -} - -#main-content img { - max-width: 100%; - height: auto; -} - -aside#sidebar { - float: right; - width: 200px; - min-height: 504px; - padding-left: 20px; - font-size: 12px; - line-height: 1.3; - background: transparent url(../../images/sidebar-bg.jpg) 0 0 no-repeat; -} - -aside#sidebar p.repo-owner, -aside#sidebar p.repo-owner a { - font-weight: bold; -} - -#downloads { - margin-bottom: 40px; -} - -a.button { - width: 134px; - height: 58px; - padding-top: 22px; - padding-left: 68px; - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - font-size: 23px; - line-height: 1.2; - color: #fff; -} -a.button small { - display: block; - font-size: 11px; -} -header a.button { - position: absolute; - top: 0; - right: 0; - background: transparent url(../images/github-button.png) 0 0 no-repeat; -} -aside a.button { - display: block; - width: 138px; - padding-left: 64px; - margin-bottom: 20px; - font-size: 21px; - background: transparent url(../images/download-button.png) 0 0 no-repeat; -} - -code, pre { - margin-bottom: 30px; - font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace; - font-size: 13px; - color: #222; -} - -code { - padding: 0 3px; - background-color: #f2f8fc; - border: solid 1px #dbe7f3; -} - -pre { - padding: 20px; - overflow: auto; - text-shadow: none; - background: #fff; - border: solid 1px #f2f2f2; -} -pre code { - padding: 0; - color: #2879d0; - background-color: #fff; - border: none; -} - -ul, ol, dl { - margin-bottom: 20px; -} - - -/* COMMON STYLES */ - -hr { - height: 0; - margin-top: 1em; - margin-bottom: 1em; - border: 0; - border-top: solid 1px #ddd; -} - -table { - width: 100%; - border: 1px solid #ebebeb; -} - -th { - font-weight: 500; -} - -td { - font-weight: 300; - text-align: center; - border: 1px solid #ebebeb; -} - -form { - padding: 20px; - background: #f2f2f2; - -} - - -/* GENERAL ELEMENT TYPE STYLES */ - -#main-content h1 { - margin-top: 0; - margin-bottom: 0; - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - font-size: 2.8em; - font-weight: normal; - color: #474747; - text-indent: 6px; - letter-spacing: -1px; -} - -#main-content h1:before { - padding-right: 0.3em; - margin-left: -0.9em; - color: #9ddcff; - content: "/"; -} - -#main-content h2 { - margin-bottom: 8px; - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - font-size: 22px; - font-weight: bold; - color: #474747; - text-indent: 4px; -} -#main-content h2:before { - padding-right: 0.3em; - margin-left: -1.5em; - content: "//"; - color: #9ddcff; -} - -#main-content h3 { - margin-top: 24px; - margin-bottom: 8px; - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - font-size: 18px; - font-weight: bold; - color: #474747; - text-indent: 3px; -} - -#main-content h3:before { - padding-right: 0.3em; - margin-left: -2em; - content: "///"; - color: #9ddcff; -} - -#main-content h4 { - margin-bottom: 8px; - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - font-size: 15px; - font-weight: bold; - color: #474747; - text-indent: 3px; -} - -h4:before { - padding-right: 0.3em; - margin-left: -2.8em; - content: "////"; - color: #9ddcff; -} - -#main-content h5 { - margin-bottom: 8px; - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - font-size: 14px; - color: #474747; - text-indent: 3px; -} -h5:before { - padding-right: 0.3em; - margin-left: -3.2em; - content: "/////"; - color: #9ddcff; -} - -#main-content h6 { - margin-bottom: 8px; - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - font-size: .8em; - color: #474747; - text-indent: 3px; -} -h6:before { - padding-right: 0.3em; - margin-left: -3.7em; - content: "//////"; - color: #9ddcff; -} - -p { - margin-bottom: 20px; -} - -a { - text-decoration: none; -} - -p a { - font-weight: 400; -} - -blockquote { - padding: 0 0 0 30px; - margin-bottom: 20px; - font-size: 1.6em; - border-left: 10px solid #e9e9e9; -} - -ul { - list-style-position: inside; - list-style: disc; - padding-left: 20px; -} - -ol { - list-style-position: inside; - list-style: decimal; - padding-left: 3px; -} - -footer { - padding-top: 20px; - padding-bottom: 30px; - margin-top: 40px; - font-size: 13px; - color: #aaa; - background: transparent url('../../images/hr.png') 0 0 no-repeat; -} - -footer a { - color: #666; -} -footer a:hover { - color: #444; -} - -/* MISC */ -.clearfix:after { - display: block; - height: 0; - clear: both; - visibility: hidden; - content: '.'; -} - -.clearfix {display: inline-block;} -* html .clearfix {height: 1%;} -.clearfix {display: block;} - -/* #Media Queries -================================================== */ - -/* Smaller than standard 960 (devices and browsers) */ -@media only screen and (max-width: 959px) { } - -/* Tablet Portrait size to standard 960 (devices and browsers) */ -@media only screen and (min-width: 768px) and (max-width: 959px) { - .inner { - width: 740px; - } - header h1, header h2 { - width: 340px; - } - header h1 { - font-size: 60px; - } - header h2 { - font-size: 30px; - } - #main-content { - width: 490px; - } - #main-content h1:before, - #main-content h2:before, - #main-content h3:before, - #main-content h4:before, - #main-content h5:before, - #main-content h6:before { - padding-right: 0; - margin-left: 0; - content: none; - } -} - -/* All Mobile Sizes (devices and browser) */ -@media only screen and (max-width: 767px) { - .inner { - width: 93%; - } - header { - padding: 20px 0; - } - header .inner { - position: relative; - } - header h1, header h2 { - width: 100%; - } - header h1 { - font-size: 48px; - } - header h2 { - font-size: 24px; - } - header a.button { - position: relative; - display: inline-block; - width: auto; - height: auto; - padding: 5px 10px; - margin-top: 15px; - font-size: 13px; - line-height: 1; - color: #2879d0; - text-align: center; - background-color: #9ddcff; - background-image: none; - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - } - header a.button small { - display: inline; - font-size: 13px; - } - #main-content, - aside#sidebar { - float: none; - width: 100% ! important; - } - aside#sidebar { - min-height: 0; - padding: 20px 0; - margin-top: 20px; - background-image: none; - border-top: solid 1px #ddd; - } - aside#sidebar a.button { - display: none; - } - #main-content h1:before, - #main-content h2:before, - #main-content h3:before, - #main-content h4:before, - #main-content h5:before, - #main-content h6:before { - padding-right: 0; - margin-left: 0; - content: none; - } -} - -/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */ -@media only screen and (min-width: 480px) and (max-width: 767px) { } - -/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */ -@media only screen and (max-width: 479px) { } - - -#container { - margin-left: 1em; - margin-right: 1em; - background-color: #f0f0f0; -} - -#product { - text-align: center; - border-bottom: 1px solid #cccccc; - background-color: #ffffff; -} - -#product big { - font-size: 2em; -} - -#main { - color: #666; - background: #fafafa url(../../images/body-bg.jpg) 0 0 repeat; - border-left: 2px solid #cccccc; -} - -#navigation { - float: left; - width: 18em; - vertical-align: top; - overflow: scroll; - position: fixed; - height:100%; - background: #2e7bcf url(../../images/header-bg.jpg) 0 0 repeat-x; - color: #fff; -} - -#navigation h2 { - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - background: #2e7bcf url(../images/header-bg.jpg) 0 0 repeat-x; - border-bottom: solid 1px #275da1; - width: 540px; - margin-top: 0; - margin-bottom: 0.2em; - font-size: 36px; - font-weight: normal; - line-height: 1; - color: #fff; - letter-spacing: -1px; - text-align: left; - padding:0.2em; - border-top:1px solid #dddddd; -} - -#navigation ul -{ - font-size:1em; - list-style-type: none; - margin: 1px 1px 10px 1px; - color: #fff; -} - -#navigation li { - text-indent: -1em; - display: block; - margin: 3px 0px 0px 22px; - color: #fff; -} - -#navigation ul li a { - color: #fff; -} - - -#navigation li li a { - margin: 0px 3px 0px -1em; - color: #fff; -} - -#content { - margin-left: 18em; - padding: 1em; - border-left: 2px solid #cccccc; - border-right: 2px solid #cccccc; - background-color: #ffffff; -} - - -#content h2 a { - color: #000; - border-bottom: 1px solid #000; -} - -#content h2 a code { -font-size: 22px; -font-weight: 400; -background-color: transparent; -color: #2879d0; -border: none; -} - -#content h1 code { -font-size: 26px; -font-weight: 400; -background-color: transparent; -border: none; -} - -#about { - clear: both; - padding: 5px; - border-top: 2px solid #cccccc; - background-color: #ffffff; -} - -table.function_list { - border-width: 1px; - border-style: solid; - border-color: #cccccc; - border-collapse: collapse; -} - -table.function_list td { - border-width: 1px; - padding: 3px; - border-style: solid; - border-color: #cccccc; - word-wrap:break-word; -} - -table.function_list td.name { font-weight: 400; width:50%; white-space: normal; text-align:left;} -table.function_list td.summary { width: 50%; } - - -dl.table dt, dl.function { - border-left: 1px solid #ccc; - border-right: 1px solid #ccc; - border-bottom: 1px solid #ccc; -} - -dl.table dt, dl.function dt { - border-top: 1px solid #000; - padding-top: 0.5em; - padding-bottom: 0.5em; - border-bottom: 1px solid #ccc; -} - -dl.table dd, dl.function dd { - padding-bottom: 0.5em; - margin: 20px 0 0 20px; -} - -dl.table dd, dl.function dd p { - font-weight : normal; -} - -dl.table h3, dl.function h3 {font-size: 1.5em;} diff --git a/docs/Usage/Intellisense.JPG b/docs/Usage/Intellisense.JPG deleted file mode 100644 index 203140e5e..000000000 Binary files a/docs/Usage/Intellisense.JPG and /dev/null differ diff --git a/docs/Usage_Guide.md b/docs/Usage_Guide.md deleted file mode 100644 index dba4e3368..000000000 --- a/docs/Usage_Guide.md +++ /dev/null @@ -1,332 +0,0 @@ -# 1) MOOSE Usage Guide - -Using the MOOSE framework is very easy, and this document provides you with a detailed explanation how to install -and use MOOSE within your missions. - - -## 1.1) MOOSE framework at GitHub - -You can find the source of [MOOSE framework on GITHUB](https://github.com/FlightControl-Master/MOOSE/). -It is free for download and usage, since it is released under the GNU 3.0 open source license policy. -Although the MOOSE contributors and tester are using the GitHub service to enforces a structured approval process, release and change management, and a communicative distribution and deployment, you, as a mission designer, don't need to mess with it. Still, if you are interrested intesting the latest features of MOOSE of in adding your own, you can read the [relevant](http://flightcontrol-master.github.io/MOOSE/Beta_Test_Guide.html) [guides](http://flightcontrol-master.github.io/MOOSE/Contribution_Guide.html) and/or contact FlightControl -The MOOSE framework development is an open source project, and as such, contributors are welcome and encouraged to contribute on the development.Some key users have already started with this process. - -## 1.2) MOOSE using a normal editor - -You can use the MOOSE framework with a normal editor. This is perfectly okay. -But you won't have IntelliSense enabled, which allows you to quickly search for the correct methods per class. - -## 1.2) Eclipse LDT - -The LDT environment or "Eclipse Lua Development Tools" is a fully integrated development environment for LUA developers. -It is recommended to use the LDT as your mission design editor using MOOSE. The MOOSE framework is documented using the luadocumentor standard. -Every class, method and variable is documented within the source, and mission designers can write mission script lua code that is **intellisense**(-ed) ... -What that means is that while you are coding your mission, your object and variables (derived from MOOSE classes) will list the methods and properties of that class interactively while coding ... - -![Intellisense](Usage/Intellisense.JPG) - -This highly increases the quality and the speed of your scripting. - -## 1.3) LUA training - -In order to efficiently use the MOOSE framework, it is highly recommended that you learn a couple of basic principles of lua. -I recommend you learn the basic lua principles following this [lua tutorial](https://www.tutorialspoint.com/lua). -We're not asking you to become an expert in lua, leave that to the experts, but, you'll need to have some basic lua coding -knowledge to "understand" the code, and also, to understand the syntax. - -**Therefore, I suggest you walk through this [lua quick guide](https://www.tutorialspoint.com/lua/lua_quick_guide.htm)**. -Ignore the lua environment setup. DCS comes with a pre-defined lua environment. - - - -# 2) Download the latest release of MOOSE - -The delivery of MOOSE follows a structured release process. Over time, new features are added that can be used in your mission. - - -## The latest release of MOOSE can be downloaded **[here](https://github.com/FlightControl-Master/MOOSE/releases)**. - -**Unzip the files into a directory of your choice, but keep the folder structure intact**. - - - -# 3) Download the software - - -## 3.1) Download and install the Eclipse Lua Development Tools **(LDT)**, which is an advanced lua editor. - -1. If you don't have JAVA yet, you may have to install [java](https://www.java.com/en/download) first. -2. Download and Install [Eclipse LDT](https://eclipse.org/ldt) on your Windows 64 bit system. - -TNow you should have a working LDT on your system. -Don't skip this step, LDT is a game-changer. Don't believe us ? Well we challenge you to test and tell us what you think ! Once you tried coding with intellisense, you won't go back ! - - - -# 4) Setup the **Moose_Framework project** in LDT. - -You need to configure your Eclipse LDT environment and link it with the Moose code. -This will enable you to **start developing mission scripts** in lua, which will be **fully intellisense enabled**!!! - -Please follow the steps outlined! - - -## 4.1) Create a new **Workspace** in LDT. - -The LDT editor has a concept of **Workspaces**, which contains all your settings of your editing environment, -like views, menu options etc, and your code... Nothing to pay attention to really, but you need to set it up! -When you open EclipseLDT for the first time, it will ask you where to put your *workspace area*... - -1. Open Eclipse LDT. -2. Select the default workspace that LDT suggests. - - -## 4.2) Setup a **new project** in LDT and name it **Moose_Framework**. - -### 4.2.1) Select from the Menu: **File** -> **New** -> **Lua Project**. - -![LDT_New_Project](Installation/LDT_New_Project.JPG) - -Here, we will create a **New Project** called **Moose_Framework** in your LDT environment. - -### Important! Name your project **Moose_Framework** - -The project details are already defined within the MOOSE framework repository, -which is unzipped in your **local Moose folder** on your PC. -We will link into that directory and **automatically load the Project properties**. - - -### 4.2.2) Type the Project Name: **Moose_Framework**. - -![LDT_Project](Installation/LDT_Project.JPG) - -### 4.2.3) In the sub-box "Project Contents", select the option **Create Project at existing location** (from existing source). - -![LDT_Project](Installation/LDT_Project_Existing_Location.JPG) - -### 4.2.4) **Browse** to the local MOOSE directory (press on the Browse button) and select the **local Moose folder on your PC, which you unzipped**. Press OK. - -### 4.2.5) You're back at the "New Project" dialog box. Press the **Next** button below the dialog box. - -__(All the other settings are by default ok)__. - -### 4.2.6) You should see now a dialog box with the following properties. - -The Moose Development/Moose directory should be flagged as the **Source Directory*. (It is listed totally on top.) -This is important because it will search in the files in this directory and sub directories for lua documentator enabled lua files. -This will enable the intellisense of the MOOSE repository! - -![LDT Finish](Installation/LDT_Moose_Framework_Finish.JPG) - -### 4.2.7) Press the **Finish** button. - -As a result, when you browse to the Script Explorer, you'll see the following: - -![LDT_Script_Explorer](Installation/LDT_Script_Explorer.JPG) - -### 4.2.8) **Congratulations! You have now setup your Moose_Framework project LDT environment!** - - - -# 5) Setup a new project **Moose_Missions** in LDT, containing the the Moose demonstration missions. - -The framework comes with demonstration missions which can be downloaded [here](https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases), that you can try out and helps you to code. -These missions provide examples of defined use cases how the MOOSE framework can be utilized. Each test mission is located in a separate directory, which contains at least one .lua file and .miz file. The .lua file contains the mission script file that shows how the use case was implemented. You can copy/paste code the code snippets from this .lua file into your missions, as it will accellerate your mission developments. You will learn, see, and understand how the different MOOSE classes need to be applied, and how you can create more complex mission scenarios by combining these MOOSE classes into a complex but powerful mission engine. -Some of these exact test missions are also demonstrated in a video format on the [YouTube channel](https://www.youtube.com/channel/UCjrA9j5LQoWsG4SpS8i79Qg). - -## 5.1) Download the [Moose demonstration missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases) latest release package. - - -## 5.2) Unzip the package into a local folder on your PC. - - -## 5.3) Setup a **new project** in LDT and name it **Moose_Missions**. - -### 5.3.1) In LDT, select from the menu **New lua project**, and name it Moose_Missions. - -### 5.3.2) Select the local folder on your PC, where you saved the demonstration missions contents. - -### 5.3.3) Press Finish - - - -# 6) Setup Your first mission - -## 6.1) Setup a new project in LDT and name it **My_Missions** - -In order to design your own missions, it is recommended you create a separate directory on your PC -which contains your mission files. Your mission will be designed consisting possibly -out of a couple of components, which are: - - * (Mandatory) An include of the Moose.lua file (see 2.3.2). - * (Mandatory) An include of your lua mission script file(s) (also with a .lua extension). - * (Optionally) Sound files (.ogg) and pictures (.jpg) which are added into your mission. - -Using the menu system of the DCS World Mission Editor, you need to include files in your mission (.miz) file. -However, once included, maintaining these files is a tedious task, -having to replace each time manually these files when they change -(due to a new release or a change in your mission script). - -Therefore, **the recommendation is that your create for each mission a separate folder**. -The MOOSE test mission folder structure is a good example how this could be organized. -The LDT has been customized and provides a tool to **automatically** maintain your existing .miz files. - -### 6.1.1. Select from the Menu: **File** -> **New** -> **Lua Project**. - -![LDT_New_Project](Installation/LDT_New_Project.JPG) - -### 6.1.2. A **New Project** dialog box is shown. - -![LDT_Project](Installation/LDT_Project.JPG) - -### 6.1.3. Type your Project Name: (In my example it is **DCS_Caucasus_Missions**. - -Note the indicated options in yellow: - - * Note that you can select the option **No execution environment**. - * Deselect the option **Create default project template ready to run**. - -![LDT_Project](Installation/LDT_Project_My_Missions.JPG) - -### 6.1.4. Press **Next >** - -### 6.1.5. Click the **Projects** tab at the top of the window. - -![LDT_Project](Installation/LDT_New_Project_Projects.JPG) - -### 6.1.6. Press the **Add...** button. - -### 6.1.7. A new windows will be displayed: **Required Project Selection**. - -This is an important step. This will _link_ your project to the Moose_Framework project and will activate **intellisense**. - -![LDT_Project](Installation/LDT_Select_Moose_Framework.JPG) - -### 6.1.8. After the selection, press the **OK** button. - -### 6.1.9. Watch your newly created project in the Script Explorer of LDT. - -You can delete the possibly created SRC directory. You won't need it at all. - -![LDT_Project](Installation/LDT_Delete_Src.JPG) - -### 6.1.10. Within your newly created Missions Project, right click and select **New -> Folder**. - -As explained above, each of your missions will be stored in a separate folder. Please follow the explanation how to do that. - -![LDT_Project](Installation/LDT_Add_Folder.JPG) - -### 6.1.11. Type the **Folder Name**. - -This can be any descriptive text explaining the title of your mission. - -![LDT_Project](Installation/LDT_Mission_Folder_Name.JPG) - -### 6.1.12. In your newly created **Mission Folder**, right click and select **New -> Lua File**. - -This will create your **mission script file**, -the file that contains all the lua code using the Moose framework using your mission. - -### 6.1.13. Type the **Lua Mission Script Name**. - -![LDT_Project](Installation/LDT_Mission_Lua_File_Name.JPG) - - -## 6.2) Create your first Mission file - -In the root of the MOOSE package, a file named **Moose.lua** can be found. -In order to create or design a mission using the MOOSE framework, -you'll have to include this **Moose.lua** file into your missions: - - 1. Create a new mission in the DCS World Mission Editor. - 2. In the mission editor, create a new trigger. - 3. Name the trigger Moose Load and let it execute only at MISSION START. - 4. Add an action DO SCRIPT FILE (without a condition, so the middle column must be empty). - 5. In the action, browse to the **[Moose.lua](https://github.com/FlightControl-Master/MOOSE/tree/master/Moose%20Mission%20Setup)** file in the **Moose Mission Setup** directory, and include this file within your mission. - 6. Make sure that the "Moose Load" trigger is completely at the top of your mission. - -Voila, MOOSE is now included in your mission. During the execution of this mission, all MOOSE classes will be loaded, and all MOOSE initializations will be exectuted before any other mission action is executed. - -Find below a detailed explanation of the actions to follow: - -### 6.2.1. Open the Mission Editor in DCS, select an empty mission, and click the triggers button. - -![LDT_Project](Installation/DCS_Triggers_Empty.JPG) - -### 6.2.2. Add a new trigger, that will load the Moose.lua file. - -Check the cyan colored circles: - - * This trigger is loaded at MISSION START. - * It is the first trigger in your mission. - * It contains a DO SCRIPT FILE action. - * No additional conditions! - -![LDT_Project](Installation/DCS_Triggers_Load_Moose_Add.JPG) - -### 6.2.3. Select the Moose.lua loader from the **Moose Mission Setup** folder in the Moose_Framework pack. - -Additional notes: - - * If you've setup a folder link into Saved Games/DCS/Missions/Moose Mission Setup, then you can directly select this folder from **My Missions**. - * See point ... - -Press the **OK** button. - -![LDT_Project](Installation/DCS_Triggers_Load_Moose_Select_File.JPG) - -### 6.2.4. Check that the Moose.lua file has been correctly added to your Mission. - -![LDT_Project](Installation/DCS_Triggers_Load_Moose_File_Added.JPG) - -### 6.2.5. Add a new trigger, that will load your mission .lua file. - -Check the cyan colored circles: - - * This trigger is loaded at MISSION START. - * It is the second trigger in your mission. - * It contains a DO SCRIPT FILE action. - * No additional conditions! - -![LDT_Project](Installation/DCS_Triggers_Load_Mission_Add.JPG) - -### 6.2.6. Select the mission .lua file from your **missions** folder you just created or already have. - -Additional notes: - - * If you've setup a folder link into Saved Games/DCS/Missions/Moose Mission Setup, then you can directly select this folder from **My Missions**. - * See point ... - -Press the **OK** button. - -![LDT_Project](Installation/DCS_Triggers_Load_Mission_File_Select.JPG) - -### 6.2.7. Check that your mission .lua script file has been correctly added to your mission. - -![LDT_Project](Installation/DCS_Triggers_Load_Mission_File_Added.JPG) - - -## 6.3) Maintain your .miz files - -IMPORTANT NOTE: When a new version of MOOSE is released, you'll have to UPDATE the Moose.lua file in EACH OF YOUR MISSION. -This can be a tedious task, and for this purpose, a tool has been developed that will update the Moose.lua files automatically within your missions. - -### 6.3.1. Select the **Update SELECTED Mission** from the External Tools in LDT. - -This will activate a script that will automatically re-insert your mission .lua file into your mission. - -![LDT_Project](Installation/DCS_Triggers_Load_Mission_File_Added.JPG) - - -## 6.4) Create folder links into your "My Missions" folder in Saved Games/DCS/Missions. - -***TODO : Detail how hard links work, explain how they help the wworkflow*** - -This trick will save you a lot of time. You need to install the tool ... to create easily new links. - -Select from the following possible links that can be created to save you time while browing through the different folders to include script files: - -### 6.4.1. Create a link to your **Moose Mission Setup** folder ... - -### 6.4.2. Create a link to your **missions** folder ... - diff --git a/docs/index.html b/index.html similarity index 100% rename from docs/index.html rename to index.html